From 0f514f634d67a2a4492c12dd62a8f28844533a3e Mon Sep 17 00:00:00 2001 From: Romain Lenzotti Date: Sat, 1 Jun 2024 14:47:25 +0200 Subject: [PATCH] chore: add explicit extension to all import --- .../core/src/decorators/configurable.spec.ts | 2 +- packages/core/src/decorators/configurable.ts | 2 +- .../core/src/decorators/deprecated.spec.ts | 2 +- packages/core/src/decorators/deprecated.ts | 2 +- .../core/src/decorators/enumerable.spec.ts | 2 +- packages/core/src/decorators/enumerable.ts | 2 +- .../core/src/decorators/notConfigurable.ts | 2 +- packages/core/src/decorators/notEnumerable.ts | 2 +- packages/core/src/decorators/readOnly.ts | 2 +- packages/core/src/decorators/storeFn.ts | 4 +- packages/core/src/decorators/storeMerge.ts | 4 +- packages/core/src/decorators/storeSet.ts | 4 +- packages/core/src/decorators/writable.spec.ts | 2 +- packages/core/src/decorators/writable.ts | 2 +- packages/core/src/domain/AnyToPromise.spec.ts | 6 +- packages/core/src/domain/AnyToPromise.ts | 8 +- packages/core/src/domain/Hooks.spec.ts | 2 +- packages/core/src/domain/Metadata.spec.ts | 2 +- packages/core/src/domain/Metadata.ts | 2 +- packages/core/src/domain/Store.spec.ts | 4 +- packages/core/src/domain/Store.ts | 18 +- .../errors/UnsupportedDecoratorType.spec.ts | 2 +- .../src/errors/UnsupportedDecoratorType.ts | 6 +- packages/core/src/index.ts | 164 ++++---- packages/core/src/interfaces/MetadataTypes.ts | 2 +- packages/core/src/utils/catchError.spec.ts | 2 +- .../decorators/decorateMethodsOf.spec.ts | 10 +- .../src/utils/decorators/decorateMethodsOf.ts | 10 +- .../utils/decorators/decoratorArgs.spec.ts | 6 +- .../src/utils/decorators/decoratorArgs.ts | 4 +- .../utils/decorators/decoratorTypeOf.spec.ts | 2 +- .../src/utils/decorators/decoratorTypeOf.ts | 4 +- .../utils/decorators/inheritedDescriptorOf.ts | 2 +- .../utils/decorators/useDecorators.spec.ts | 8 +- .../src/utils/decorators/useDecorators.ts | 4 +- .../decorators/useMethodDecorator.spec.ts | 8 +- .../utils/decorators/useMethodDecorators.ts | 4 +- packages/core/src/utils/getRandomId.spec.ts | 2 +- .../utils/http/getHostInfoFromPort.spec.ts | 2 +- .../src/utils/imports/importPackage.spec.ts | 4 +- .../src/utils/objects/ObjectUtils.spec.ts | 2 +- .../core/src/utils/objects/ancestorsOf.ts | 6 +- .../src/utils/objects/cleanObject.spec.ts | 2 +- .../core/src/utils/objects/cleanObject.ts | 2 +- .../core/src/utils/objects/constructorOf.ts | 2 +- .../core/src/utils/objects/createInstance.ts | 2 +- .../core/src/utils/objects/deepClone.spec.ts | 2 +- packages/core/src/utils/objects/deepClone.ts | 14 +- .../core/src/utils/objects/deepMerge.spec.ts | 2 +- packages/core/src/utils/objects/deepMerge.ts | 10 +- .../src/utils/objects/descriptorOf.spec.ts | 2 +- .../src/utils/objects/getClassOrSymbol.ts | 4 +- .../objects/getConstructorArgNames.spec.ts | 2 +- .../utils/objects/getConstructorArgNames.ts | 2 +- .../utils/objects/getEnumerableKeys.spec.ts | 4 +- .../src/utils/objects/getEnumerableKeys.ts | 4 +- .../core/src/utils/objects/getValue.spec.ts | 2 +- packages/core/src/utils/objects/getValue.ts | 6 +- .../src/utils/objects/hasJsonMethod.spec.ts | 2 +- packages/core/src/utils/objects/isArrowFn.ts | 2 +- .../core/src/utils/objects/isBuffer.spec.ts | 2 +- packages/core/src/utils/objects/isBuffer.ts | 2 +- .../core/src/utils/objects/isClass.spec.ts | 2 +- packages/core/src/utils/objects/isClass.ts | 16 +- .../core/src/utils/objects/isCollection.ts | 2 +- .../core/src/utils/objects/isEmpty.spec.ts | 2 +- packages/core/src/utils/objects/isEmpty.ts | 2 +- .../core/src/utils/objects/isEnumerable.ts | 4 +- .../core/src/utils/objects/isInheritedFrom.ts | 6 +- .../src/utils/objects/isMomentObject.spec.ts | 2 +- .../utils/objects/isMongooseObject.spec.ts | 2 +- .../src/utils/objects/isMongooseObject.ts | 2 +- packages/core/src/utils/objects/isNil.spec.ts | 2 +- .../src/utils/objects/isPlainObject.spec.ts | 2 +- .../core/src/utils/objects/isPlainObject.ts | 2 +- .../src/utils/objects/isPrimitive.spec.ts | 2 +- .../core/src/utils/objects/isPrimitive.ts | 6 +- .../src/utils/objects/isProtectedKey.spec.ts | 2 +- .../src/utils/objects/isSerializable.spec.ts | 2 +- .../core/src/utils/objects/isSerializable.ts | 10 +- .../core/src/utils/objects/isSymbol.spec.ts | 2 +- packages/core/src/utils/objects/methodsOf.ts | 8 +- .../core/src/utils/objects/objectKeys.spec.ts | 2 +- packages/core/src/utils/objects/objectKeys.ts | 2 +- .../core/src/utils/objects/primitiveOf.ts | 6 +- .../core/src/utils/objects/prototypeOf.ts | 2 +- .../core/src/utils/objects/setValue.spec.ts | 2 +- packages/core/src/utils/objects/setValue.ts | 2 +- packages/core/src/utils/objects/toMap.spec.ts | 2 +- packages/core/src/utils/objects/toMap.ts | 4 +- .../src/utils/objects/toStringConstructor.ts | 2 +- .../utils/objects/toStringConstrutor.spec.ts | 2 +- .../core/src/utils/proxyDelegation.spec.ts | 2 +- packages/core/src/utils/proxyDelegation.ts | 2 +- packages/core/src/utils/uniq.spec.ts | 2 +- packages/di/readme.md | 8 +- .../decorators/__mock__/lazy.import.module.ts | 2 +- .../common/decorators/__mock__/lazy.module.ts | 2 +- .../__mock__/lazy.nodefault.module.ts | 2 +- .../common/decorators/configuration.spec.ts | 12 +- .../di/src/common/decorators/configuration.ts | 4 +- .../di/src/common/decorators/constant.spec.ts | 4 +- packages/di/src/common/decorators/constant.ts | 6 +- .../src/common/decorators/controller.spec.ts | 8 +- .../di/src/common/decorators/controller.ts | 4 +- .../di/src/common/decorators/inject.spec.ts | 8 +- packages/di/src/common/decorators/inject.ts | 10 +- .../src/common/decorators/injectable.spec.ts | 6 +- .../di/src/common/decorators/injectable.ts | 4 +- .../src/common/decorators/intercept.spec.ts | 10 +- .../di/src/common/decorators/intercept.ts | 8 +- .../di/src/common/decorators/interceptor.ts | 4 +- .../src/common/decorators/lazyInject.spec.ts | 8 +- .../di/src/common/decorators/lazyInject.ts | 2 +- packages/di/src/common/decorators/module.ts | 12 +- packages/di/src/common/decorators/opts.ts | 8 +- .../decorators/overrideProvider.spec.ts | 6 +- .../src/common/decorators/overrideProvider.ts | 2 +- .../di/src/common/decorators/scope.spec.ts | 2 +- packages/di/src/common/decorators/scope.ts | 2 +- packages/di/src/common/decorators/service.ts | 2 +- .../di/src/common/decorators/useOpts.spec.ts | 14 +- packages/di/src/common/decorators/useOpts.ts | 2 +- .../di/src/common/decorators/value.spec.ts | 4 +- packages/di/src/common/decorators/value.ts | 6 +- .../di/src/common/domain/Container.spec.ts | 6 +- packages/di/src/common/domain/Container.ts | 10 +- .../common/domain/ControllerProvider.spec.ts | 4 +- .../src/common/domain/ControllerProvider.ts | 8 +- .../src/common/domain/LocalsContainer.spec.ts | 2 +- .../di/src/common/domain/LocalsContainer.ts | 2 +- .../di/src/common/domain/Provider.spec.ts | 4 +- packages/di/src/common/domain/Provider.ts | 8 +- .../src/common/errors/InjectionError.spec.ts | 2 +- .../di/src/common/errors/InjectionError.ts | 4 +- packages/di/src/common/index.ts | 102 ++--- .../common/integration/async-factory.spec.ts | 12 +- packages/di/src/common/integration/di.spec.ts | 25 +- .../di/src/common/integration/imports.spec.ts | 8 +- .../common/integration/interceptor.spec.ts | 16 +- .../di/src/common/integration/request.spec.ts | 21 +- .../src/common/integration/resolvers.spec.ts | 4 +- .../src/common/integration/singleton.spec.ts | 22 +- .../interfaces/DIConfigurationOptions.ts | 8 +- .../di/src/common/interfaces/DIResolver.ts | 2 +- .../common/interfaces/InjectableProperties.ts | 10 +- .../common/interfaces/InterceptorMethods.ts | 2 +- .../di/src/common/interfaces/InvokeOptions.ts | 4 +- .../di/src/common/interfaces/ProviderOpts.ts | 8 +- .../src/common/interfaces/RegistrySettings.ts | 6 +- .../interfaces/ResolvedInvokeOptions.ts | 6 +- .../di/src/common/interfaces/TokenRoute.ts | 2 +- .../common/registries/GlobalProviders.spec.ts | 12 +- .../src/common/registries/GlobalProviders.ts | 16 +- .../registries/ProviderRegistry.spec.ts | 8 +- .../src/common/registries/ProviderRegistry.ts | 10 +- .../common/services/DIConfiguration.spec.ts | 2 +- .../di/src/common/services/DIConfiguration.ts | 10 +- .../di/src/common/services/DILogger.spec.ts | 2 +- packages/di/src/common/services/DILogger.ts | 6 +- .../common/services/InjectorService.spec.ts | 24 +- .../di/src/common/services/InjectorService.ts | 56 +-- .../common/utils/__mock__/module1/Module1.ts | 6 +- .../__mock__/module1/controllers/M1Ctrl1.ts | 4 +- .../__mock__/module1/services/M1Service.ts | 4 +- .../__mock__/module1/submodule/SubModule.ts | 4 +- .../__mock__/module1/submodule/SubService.ts | 2 +- .../common/utils/__mock__/module2/Module2.ts | 4 +- .../__mock__/module2/controllers/M2Ctrl.ts | 2 +- packages/di/src/common/utils/colors.spec.ts | 2 +- .../src/common/utils/createContainer.spec.ts | 6 +- .../di/src/common/utils/createContainer.ts | 4 +- .../src/common/utils/getConfiguration.spec.ts | 4 +- .../common/utils/resolveControllers.spec.ts | 12 +- .../di/src/common/utils/resolveControllers.ts | 10 +- packages/di/src/index.ts | 4 +- .../di/src/node/decorators/injectContext.ts | 4 +- .../di/src/node/domain/ContextLogger.spec.ts | 4 +- packages/di/src/node/domain/ContextLogger.ts | 2 +- packages/di/src/node/domain/DIContext.spec.ts | 6 +- packages/di/src/node/domain/DIContext.ts | 6 +- packages/di/src/node/index.ts | 22 +- .../integration/async-factory-invoke.spec.ts | 2 +- .../node/integration/inject-context.spec.ts | 10 +- .../node/integration/invoke-oninit.spec.ts | 2 +- .../di/src/node/services/DILogger.spec.ts | 2 +- packages/di/src/node/services/DILogger.ts | 2 +- packages/di/src/node/services/DITest.spec.ts | 4 +- packages/di/src/node/services/DITest.ts | 6 +- .../node/utils/__mock__/module1/Module1.ts | 6 +- .../__mock__/module1/controllers/M1Ctrl1.ts | 4 +- .../__mock__/module1/services/M1Service.ts | 4 +- .../__mock__/module1/submodule/SubModule.ts | 4 +- .../__mock__/module1/submodule/SubService.ts | 2 +- .../node/utils/__mock__/module2/Module2.ts | 4 +- .../__mock__/module2/controllers/M2Ctrl.ts | 2 +- .../src/node/utils/asyncHookContext.spec.ts | 4 +- .../di/src/node/utils/asyncHookContext.ts | 4 +- .../di/src/node/utils/attachLogger.spec.ts | 4 +- packages/di/src/node/utils/attachLogger.ts | 4 +- .../node/utils/setLoggerConfiguration.spec.ts | 4 +- .../src/node/utils/setLoggerConfiguration.ts | 6 +- packages/di/src/node/utils/setLoggerFormat.ts | 2 +- packages/di/src/node/utils/setLoggerLevel.ts | 2 +- packages/engines/readme.md | 2 +- packages/engines/src/components/AtplEngine.ts | 4 +- .../engines/src/components/BracketEngine.ts | 4 +- packages/engines/src/components/DotEngine.ts | 4 +- packages/engines/src/components/DustEngine.ts | 6 +- packages/engines/src/components/EctEngine.ts | 4 +- packages/engines/src/components/EjsEngine.ts | 4 +- packages/engines/src/components/Engine.ts | 7 +- .../src/components/HamlCoffeeEngine.ts | 4 +- packages/engines/src/components/HamlEngine.ts | 4 +- .../engines/src/components/HamletEngine.ts | 4 +- .../src/components/HandlebarsEngine.ts | 4 +- .../src/components/HoganEngine.spec.ts | 4 +- .../engines/src/components/HoganEngine.ts | 4 +- .../engines/src/components/HtmlingEngine.ts | 4 +- packages/engines/src/components/JazzEngine.ts | 4 +- .../engines/src/components/JqtplEngine.ts | 4 +- packages/engines/src/components/JustEngine.ts | 4 +- .../engines/src/components/LiquorEngine.ts | 4 +- .../engines/src/components/LodashEngine.ts | 4 +- packages/engines/src/components/MoteEngine.ts | 4 +- .../engines/src/components/MustacheEngine.ts | 4 +- .../engines/src/components/NunjucksEngine.ts | 4 +- .../engines/src/components/PlatesEngine.ts | 4 +- .../engines/src/components/PugEngine.spec.ts | 4 +- packages/engines/src/components/PugEngine.ts | 4 +- .../src/components/RactiveEngine.spec.ts | 4 +- .../engines/src/components/RactiveEngine.ts | 4 +- .../engines/src/components/ReactEngine.ts | 6 +- packages/engines/src/components/SlmEngine.ts | 4 +- .../src/components/SquirrellyEngine.spec.ts | 6 +- .../src/components/SquirrellyEngine.ts | 4 +- packages/engines/src/components/SwigEngine.ts | 4 +- .../engines/src/components/TemplayedEngine.ts | 4 +- .../engines/src/components/TwigEngine.spec.ts | 4 +- packages/engines/src/components/TwigEngine.ts | 4 +- .../src/components/TwingEngine.spec.ts | 4 +- .../engines/src/components/TwingEngine.ts | 4 +- .../src/components/UnderscoreEngine.ts | 4 +- packages/engines/src/components/VashEngine.ts | 4 +- .../src/components/VelocityEngine.spec.ts | 4 +- .../engines/src/components/VelocityEngine.ts | 4 +- .../engines/src/components/WalrusEngine.ts | 4 +- packages/engines/src/decorators/viewEngine.ts | 4 +- packages/engines/src/index.ts | 78 ++-- .../src/registries/EnginesContainer.ts | 2 +- packages/engines/src/utils/cache.spec.ts | 2 +- packages/engines/src/utils/getEngines.spec.ts | 2 +- packages/engines/src/utils/getEngines.ts | 4 +- packages/engines/test/getEngineFixture.ts | 4 +- packages/engines/test/integration.spec.ts | 10 +- packages/engines/test/shared/dust.ts | 2 +- packages/engines/test/shared/filters.ts | 2 +- packages/engines/test/shared/helpers.ts | 2 +- packages/engines/test/shared/includes.ts | 2 +- packages/engines/test/shared/index.ts | 2 +- packages/engines/test/shared/partials.ts | 2 +- packages/engines/test/shared/react.ts | 2 +- packages/graphql/apollo/src/ApolloModule.ts | 4 +- .../apollo/src/decorators/dataSource.ts | 2 +- packages/graphql/apollo/src/index.ts | 10 +- .../apollo/src/services/ApolloService.spec.ts | 4 +- .../apollo/src/services/ApolloService.ts | 6 +- .../graphql/graphql-ws/src/GraphQLWSModule.ts | 2 +- packages/graphql/graphql-ws/src/index.ts | 4 +- packages/graphql/typegraphql/readme.md | 6 +- .../typegraphql/src/TypeGraphQLModule.ts | 4 +- .../typegraphql/src/decorators/resolver.ts | 2 +- packages/graphql/typegraphql/src/index.ts | 16 +- .../typegraphql/src/interfaces/interfaces.ts | 4 +- .../src/services/TypeGraphQLService.spec.ts | 4 +- .../src/services/TypeGraphQLService.ts | 6 +- .../graphql/typegraphql/test/app/Server.ts | 6 +- .../test/app/graphql/auth/AuthResolver.ts | 2 +- .../typegraphql/test/app/graphql/index.ts | 12 +- .../app/graphql/recipes/RecipeResolver.ts | 6 +- .../typegraphql/test/app/index.express.ts | 2 +- .../graphql/typegraphql/test/app/index.koa.ts | 2 +- .../test/app/protocols/GraphQLProtocol.ts | 2 +- .../test/app/services/RecipeService.ts | 2 +- .../test/app/services/UsersRepository.ts | 2 +- .../typegraphql/test/graphql-passport.spec.ts | 2 +- .../graphql/typegraphql/test/graphql.spec.ts | 4 +- .../src/adapters/OIDCRedisAdapter.spec.ts | 2 +- .../src/adapters/OIDCRedisAdapter.ts | 2 +- .../src/adapters/RedisAdapter.spec.ts | 2 +- packages/orm/adapters-redis/src/index.ts | 6 +- .../src/adapters/FileSyncAdapter.spec.ts | 6 +- .../adapters/src/adapters/FileSyncAdapter.ts | 4 +- .../orm/adapters/src/adapters/LowDbAdapter.ts | 2 +- .../src/adapters/MemoryAdapter.spec.ts | 6 +- .../adapters/src/adapters/MemoryAdapter.ts | 2 +- .../adapters/src/decorators/indexed.spec.ts | 8 +- .../src/decorators/injectAdapter.spec.ts | 6 +- .../adapters/src/decorators/injectAdapter.ts | 2 +- .../adapters/src/domain/AdaptersSettings.ts | 2 +- packages/orm/adapters/src/index.ts | 16 +- .../orm/adapters/src/services/Adapters.ts | 4 +- .../test/discrinimator.integration.spec.ts | 2 +- packages/orm/ioredis/readme.md | 10 +- .../ioredis/src/domain/IORedisStore.spec.ts | 2 +- .../ioredis/src/domain/IORedisTest.spec.ts | 4 +- .../orm/ioredis/src/domain/IORedisTest.ts | 2 +- packages/orm/ioredis/src/index.ts | 10 +- .../orm/ioredis/src/utils/mockConnections.ts | 2 +- .../utils/registerConnectionProvider.spec.ts | 7 +- .../src/utils/registerConnectionProvider.ts | 4 +- .../orm/mikro-orm/src/MikroOrmModule.spec.ts | 8 +- packages/orm/mikro-orm/src/MikroOrmModule.ts | 10 +- .../src/decorators/entityManager.spec.ts | 2 +- .../mikro-orm/src/decorators/entityManager.ts | 2 +- .../orm/mikro-orm/src/decorators/orm.spec.ts | 2 +- packages/orm/mikro-orm/src/decorators/orm.ts | 2 +- .../src/decorators/subscriber.spec.ts | 4 +- .../mikro-orm/src/decorators/subscriber.ts | 2 +- .../src/decorators/transactional.spec.ts | 4 +- .../mikro-orm/src/decorators/transactional.ts | 2 +- .../filters/OptimisticLockErrorFilter.spec.ts | 2 +- packages/orm/mikro-orm/src/index.ts | 28 +- .../TransactionalInterceptor.spec.ts | 8 +- .../interceptors/TransactionalInterceptor.ts | 8 +- .../src/services/MikroOrmContext.spec.ts | 2 +- .../mikro-orm/src/services/MikroOrmFactory.ts | 2 +- .../src/services/MikroOrmRegistry.spec.ts | 4 +- .../src/services/MikroOrmRegistry.ts | 7 +- .../mikro-orm/test/helpers/services/Hooks.ts | 2 +- .../services/ManagedEventSubscriber.ts | 2 +- .../test/helpers/services/UserService.ts | 4 +- .../orm/mikro-orm/test/integration.spec.ts | 14 +- packages/orm/mongoose/readme.md | 2 +- packages/orm/mongoose/src/MongooseModule.ts | 9 +- .../orm/mongoose/src/decorators/auto.spec.ts | 4 +- packages/orm/mongoose/src/decorators/auto.ts | 2 +- .../src/decorators/dynamicRef.spec.ts | 4 +- .../orm/mongoose/src/decorators/dynamicRef.ts | 4 +- .../src/decorators/excludeIndexes.spec.ts | 4 +- .../mongoose/src/decorators/excludeIndexes.ts | 2 +- .../mongoose/src/decorators/expires.spec.ts | 4 +- .../orm/mongoose/src/decorators/expires.ts | 2 +- .../mongoose/src/decorators/immutable.spec.ts | 4 +- .../orm/mongoose/src/decorators/immutable.ts | 2 +- .../mongoose/src/decorators/indexed.spec.ts | 4 +- .../orm/mongoose/src/decorators/indexed.ts | 2 +- .../mongoose/src/decorators/lowercase.spec.ts | 4 +- .../orm/mongoose/src/decorators/lowercase.ts | 2 +- packages/orm/mongoose/src/decorators/model.ts | 10 +- .../src/decorators/mongooseIndex.spec.ts | 4 +- .../mongoose/src/decorators/mongooseIndex.ts | 2 +- .../src/decorators/mongooseIndexes.spec.ts | 4 +- .../src/decorators/mongooseIndexes.ts | 2 +- .../src/decorators/mongoosePlugin.spec.ts | 4 +- .../mongoose/src/decorators/mongoosePlugin.ts | 2 +- .../src/decorators/numberDecimal.spec.ts | 4 +- .../mongoose/src/decorators/numberDecimal.ts | 2 +- .../mongoose/src/decorators/objectID.spec.ts | 2 +- .../orm/mongoose/src/decorators/objectID.ts | 4 +- .../mongoose/src/decorators/postHook.spec.ts | 4 +- .../orm/mongoose/src/decorators/postHook.ts | 4 +- .../mongoose/src/decorators/preHook.spec.ts | 2 +- .../orm/mongoose/src/decorators/preHook.ts | 4 +- .../orm/mongoose/src/decorators/ref.spec.ts | 6 +- packages/orm/mongoose/src/decorators/ref.ts | 6 +- .../orm/mongoose/src/decorators/schema.ts | 6 +- .../src/decorators/schemaIgnore.spec.ts | 4 +- .../mongoose/src/decorators/schemaIgnore.ts | 2 +- .../mongoose/src/decorators/select.spec.ts | 4 +- .../orm/mongoose/src/decorators/select.ts | 2 +- .../mongoose/src/decorators/sparse.spec.ts | 4 +- .../orm/mongoose/src/decorators/sparse.ts | 2 +- .../orm/mongoose/src/decorators/text.spec.ts | 4 +- packages/orm/mongoose/src/decorators/text.ts | 2 +- .../orm/mongoose/src/decorators/trim.spec.ts | 4 +- packages/orm/mongoose/src/decorators/trim.ts | 2 +- .../mongoose/src/decorators/unique.spec.ts | 4 +- .../orm/mongoose/src/decorators/unique.ts | 2 +- .../mongoose/src/decorators/uppercase.spec.ts | 4 +- .../orm/mongoose/src/decorators/uppercase.ts | 2 +- .../src/decorators/versionKey.spec.ts | 6 +- .../orm/mongoose/src/decorators/versionKey.ts | 2 +- .../src/decorators/virtualRef.spec.ts | 6 +- .../orm/mongoose/src/decorators/virtualRef.ts | 6 +- packages/orm/mongoose/src/index.ts | 88 ++--- .../src/interfaces/MongooseModelOptions.ts | 2 +- .../src/interfaces/MongooseSchemaOptions.ts | 2 +- .../orm/mongoose/src/interfaces/interfaces.ts | 2 +- .../src/services/MongooseConnection.spec.ts | 4 +- .../src/services/MongooseConnections.ts | 4 +- .../src/services/MongooseService.spec.ts | 2 +- .../src/utils/buildMongooseSchema.spec.ts | 4 +- .../mongoose/src/utils/createModel.spec.ts | 2 +- .../orm/mongoose/src/utils/createModel.ts | 6 +- .../mongoose/src/utils/createSchema.spec.ts | 18 +- .../orm/mongoose/src/utils/createSchema.ts | 10 +- .../mongoose/src/utils/resolveRefType.spec.ts | 4 +- .../orm/mongoose/src/utils/resolveRefType.ts | 2 +- .../mongoose/src/utils/schemaOptions.spec.ts | 2 +- .../orm/mongoose/src/utils/schemaOptions.ts | 4 +- .../mongoose/test/array.integration.spec.ts | 4 +- .../mongoose/test/buffer.integration.spec.ts | 4 +- .../test/circularRef.integration.spec.ts | 6 +- .../test/discriminators.integration.spec.ts | 6 +- .../test/dynamicRef.integration.spec.ts | 6 +- .../mongoose/test/helpers/models/Avatar.ts | 2 +- .../mongoose/test/helpers/models/Client.ts | 4 +- .../mongoose/test/helpers/models/Contract.ts | 4 +- .../mongoose/test/helpers/models/Customer.ts | 4 +- .../multipleConnection.integration.spec.ts | 2 +- .../test/readonly.integration.spec.ts | 2 +- .../test/ref-array.integration.spec.ts | 4 +- .../orm/mongoose/test/ref.integration.spec.ts | 4 +- .../test/resources.integration.spec.ts | 4 +- .../test/subdocument.integration.spec.ts | 2 +- .../mongoose/test/user.integration.spec.ts | 6 +- .../test/versioning.integration.spec.ts | 6 +- .../test/virtualRef.integration.spec.ts | 2 +- .../components/createBooleanColumn.spec.ts | 6 +- .../src/components/createBooleanColumn.ts | 4 +- .../src/components/createIdColumn.spec.ts | 8 +- .../src/components/createIdColumn.ts | 4 +- .../src/components/createNumberColumn.spec.ts | 8 +- .../src/components/createNumberColumn.ts | 4 +- .../src/components/createStringColumn.spec.ts | 6 +- .../src/components/createStringColumn.ts | 4 +- .../src/decorators/belongsToOne.spec.ts | 6 +- .../objection/src/decorators/belongsToOne.ts | 4 +- .../objection/src/decorators/columnOptions.ts | 2 +- .../objection/src/decorators/decimal.spec.ts | 2 +- .../orm/objection/src/decorators/decimal.ts | 2 +- .../objection/src/decorators/entity.spec.ts | 2 +- .../orm/objection/src/decorators/entity.ts | 4 +- .../objection/src/decorators/hasMany.spec.ts | 6 +- .../orm/objection/src/decorators/hasMany.ts | 4 +- .../objection/src/decorators/hasOne.spec.ts | 6 +- .../orm/objection/src/decorators/hasOne.ts | 4 +- .../decorators/hasOneThroughRelation.spec.ts | 6 +- .../src/decorators/hasOneThroughRelation.ts | 4 +- .../objection/src/decorators/idColumn.spec.ts | 2 +- .../orm/objection/src/decorators/idColumn.ts | 4 +- .../src/decorators/manyToMany.spec.ts | 6 +- .../objection/src/decorators/manyToMany.ts | 4 +- .../src/decorators/relatesTo.spec.ts | 6 +- .../orm/objection/src/decorators/relatesTo.ts | 6 +- packages/orm/objection/src/index.ts | 52 +-- .../src/services/ColumnTypesContainer.ts | 2 +- .../src/services/ObjectionConnection.ts | 2 +- .../objection/src/utils/createColumns.spec.ts | 10 +- .../orm/objection/src/utils/createColumns.ts | 4 +- .../orm/objection/src/utils/createJoinKeys.ts | 2 +- .../src/utils/createRelationshipMapping.ts | 4 +- .../orm/objection/src/utils/getColumnCtx.ts | 2 +- .../src/utils/getJsonEntityRelationships.ts | 2 +- .../test/helpers/migrations/01_users.ts | 4 +- .../orm/objection/test/helpers/models/User.ts | 2 +- .../orm/objection/test/integration.spec.ts | 2 +- packages/orm/prisma/scripts/backup-index.d.ts | 2 +- .../orm/prisma/scripts/backup-index.esm.js | 2 +- .../src/__mock__/createContextFixture.ts | 2 +- .../src/__mock__/createDmmfFieldFixture.ts | 2 +- .../src/__mock__/createDmmfModelFixture.ts | 2 +- packages/orm/prisma/src/cli/generator.ts | 2 +- .../orm/prisma/src/cli/prismaGenerator.ts | 4 +- .../prisma/src/generator/domain/DmmfField.ts | 4 +- .../prisma/src/generator/domain/DmmfModel.ts | 2 +- .../prisma/src/generator/generateCode.spec.ts | 6 +- .../orm/prisma/src/generator/generateCode.ts | 16 +- .../transform/transformEnumsToEnums.spec.ts | 4 +- .../transform/transformEnumsToEnums.ts | 2 +- .../transformFieldToDecorators.spec.ts | 8 +- .../transform/transformFieldToDecorators.ts | 10 +- .../transform/transformFieldToProperty.ts | 8 +- .../transform/transformModelToClass.spec.ts | 8 +- .../transform/transformModelToClass.ts | 6 +- .../transform/transformScalarToType.spec.ts | 6 +- .../transform/transformScalarToType.ts | 8 +- .../generator/utils/generateClientIndex.ts | 2 +- .../src/generator/utils/generateEnums.spec.ts | 8 +- .../src/generator/utils/generateEnums.ts | 8 +- .../generator/utils/generateModels.spec.ts | 6 +- .../src/generator/utils/generateModels.ts | 8 +- .../utils/generatePrismaService.spec.ts | 4 +- .../generator/utils/generateRepositories.ts | 4 +- .../utils/generateRespositories.spec.ts | 6 +- .../src/generator/utils/isCircularRef.spec.ts | 4 +- .../src/generator/utils/isCircularRef.ts | 2 +- .../parseDocumentationAttributes.spec.ts | 2 +- packages/orm/prisma/src/index.ts | 2 +- .../snapshots/generate_code/enums/index.ts | 2 +- .../test/snapshots/generate_code/index.ts | 10 +- .../generate_code/interfaces/index.ts | 2 +- .../generate_code/models/PostModel.ts | 7 +- .../generate_code/models/UserModel.ts | 9 +- .../snapshots/generate_code/models/index.ts | 4 +- .../repositories/PostsRepository.ts | 6 +- .../repositories/UsersRepository.ts | 6 +- .../generate_code/repositories/index.ts | 4 +- .../generate_code/services/PrismaService.ts | 8 +- packages/orm/testing-mongoose/readme.md | 4 +- packages/orm/testing-mongoose/src/index.ts | 2 +- packages/orm/typeorm/src/TypeORMModule.ts | 7 +- packages/orm/typeorm/src/index.ts | 10 +- .../src/services/TypeORMService.spec.ts | 2 +- .../typeorm/src/services/TypeORMService.ts | 2 +- .../src/utils/createConnection.spec.ts | 2 +- .../test/helpers/repository/UserRepository.ts | 2 +- .../test/helpers/services/UserService.ts | 9 +- packages/orm/typeorm/test/integration.spec.ts | 8 +- packages/perf/readme.md | 2 +- packages/perf/src/domain/Perf.ts | 2 +- packages/perf/src/domain/PerfLogger.ts | 7 +- packages/perf/src/index.ts | 4 +- packages/platform/common/readme.md | 6 +- .../src/builder/PlatformBuilder.spec.ts | 20 +- .../common/src/builder/PlatformBuilder.ts | 24 +- .../services/PlatformConfiguration.spec.ts | 2 +- .../config/services/PlatformConfiguration.ts | 2 +- .../common/src/decorators/PlatformProvider.ts | 4 +- .../decorators/multer/multerFileSize.spec.ts | 4 +- .../src/decorators/multer/multerFileSize.ts | 2 +- .../decorators/multer/multerOptions.spec.ts | 4 +- .../src/decorators/multer/multerOptions.ts | 4 +- .../decorators/multer/multipartFile.spec.ts | 4 +- .../src/decorators/multer/multipartFile.ts | 4 +- .../src/decorators/params/error.spec.ts | 2 +- .../common/src/decorators/params/next.spec.ts | 2 +- .../src/decorators/params/request.spec.ts | 4 +- .../src/decorators/params/response.spec.ts | 4 +- .../src/domain/AnyToPromiseWithCtx.spec.ts | 4 +- .../common/src/domain/AnyToPromiseWithCtx.ts | 2 +- .../common/src/domain/PlatformContext.spec.ts | 6 +- .../common/src/domain/PlatformContext.ts | 8 +- packages/platform/common/src/index.ts | 120 +++--- .../common/src/interfaces/OnRequest.ts | 2 +- .../common/src/interfaces/OnResponse.ts | 2 +- .../PlatformAcceptMimesMiddleware.spec.ts | 6 +- .../PlatformMulterMiddleware.spec.ts | 12 +- .../middlewares/PlatformMulterMiddleware.ts | 6 +- .../common/src/services/FakeAdapter.ts | 2 +- .../common/src/services/Platform.spec.ts | 4 +- .../platform/common/src/services/Platform.ts | 6 +- .../common/src/services/PlatformAdapter.ts | 14 +- .../src/services/PlatformApplication.spec.ts | 8 +- .../src/services/PlatformApplication.ts | 9 +- .../src/services/PlatformHandler.spec.ts | 4 +- .../common/src/services/PlatformHandler.ts | 10 +- .../services/PlatformMiddlewaresChain.spec.ts | 10 +- .../src/services/PlatformMiddlewaresChain.ts | 6 +- .../src/services/PlatformRequest.spec.ts | 4 +- .../common/src/services/PlatformRequest.ts | 4 +- .../src/services/PlatformResponse.spec.ts | 4 +- .../common/src/services/PlatformResponse.ts | 4 +- .../common/src/services/PlatformTest.spec.ts | 4 +- .../common/src/services/PlatformTest.ts | 12 +- .../src/utils/__mock__/module1/Module1.ts | 4 +- .../__mock__/module1/controllers/M1Ctrl1.ts | 2 +- .../__mock__/module1/services/M1Service.ts | 2 +- .../__mock__/module1/submodule/SubModule.ts | 2 +- .../src/utils/__mock__/module2/Module2.ts | 2 +- .../common/src/utils/closeServer.spec.ts | 2 +- .../common/src/utils/createContext.spec.ts | 6 +- .../common/src/utils/createContext.ts | 8 +- .../common/src/utils/createHttpServer.spec.ts | 2 +- .../common/src/utils/createHttpServer.ts | 2 +- .../src/utils/createHttpsServer.spec.ts | 2 +- .../common/src/utils/createHttpsServer.ts | 2 +- .../common/src/utils/createInjector.spec.ts | 8 +- .../common/src/utils/createInjector.ts | 14 +- .../platform/common/src/utils/createServer.ts | 2 +- .../common/src/utils/ensureContext.spec.ts | 4 +- .../common/src/utils/ensureContext.ts | 2 +- .../common/src/utils/getConfiguration.spec.ts | 2 +- .../src/utils/getStaticsOptions.spec.ts | 2 +- .../common/src/utils/getStaticsOptions.ts | 17 +- .../src/utils/mapReturnedResponse.spec.ts | 2 +- .../common/src/utils/printRoutes.spec.ts | 2 +- .../platform/common/src/utils/printRoutes.ts | 2 +- .../src/utils/registerPlatformAdapter.ts | 6 +- .../src/utils/setResponseHeaders.spec.ts | 4 +- .../common/src/utils/setResponseHeaders.ts | 2 +- .../returns.spec.integration.spec.ts | 2 +- .../platform-cache/src/decorators/useCache.ts | 4 +- packages/platform/platform-cache/src/index.ts | 18 +- .../PlatformCacheInterceptor.spec.ts | 8 +- .../interceptors/PlatformCacheInterceptor.ts | 10 +- .../src/interfaces/PlatformCacheOptions.ts | 2 +- .../src/interfaces/interfaces.ts | 2 +- .../src/services/PlatformCache.spec.ts | 6 +- .../src/services/PlatformCache.ts | 8 +- .../src/utils/getInterceptorOptions.ts | 2 +- .../platform-cache/src/utils/getPrefix.ts | 2 +- .../test/cache.integration.spec.ts | 4 +- .../src/components/ErrorFilter.spec.ts | 2 +- .../src/components/ErrorFilter.ts | 4 +- .../src/components/ExceptionFilter.ts | 4 +- .../src/components/MongooseErrorFilter.ts | 4 +- .../src/components/StringErrorFilter.spec.ts | 2 +- .../src/components/StringErrorFilter.ts | 4 +- .../src/decorators/catch.ts | 2 +- .../src/domain/ExceptionFiltersContainer.ts | 2 +- .../platform/platform-exceptions/src/index.ts | 20 +- .../src/services/PlatformExceptions.spec.ts | 2 +- .../src/services/PlatformExceptions.ts | 14 +- .../src/components/PlatformExpress.spec.ts | 2 +- .../src/components/PlatformExpress.ts | 6 +- .../platform/platform-express/src/index.ts | 12 +- .../src/interfaces/interfaces.ts | 2 +- .../src/middlewares/staticsMiddleware.spec.ts | 2 +- .../services/PlatformExpressHandler.spec.ts | 2 +- .../platform-express/test/ajv-errors.spec.ts | 4 +- .../platform-express/test/app/emulate.ts | 4 +- .../platform-express/test/app/index.ts | 4 +- .../platform-express/test/array-body.spec.ts | 4 +- .../test/discriminator.spec.ts | 4 +- .../platform-express/test/enums.spec.ts | 4 +- .../platform-express/test/fullpayload.spec.ts | 4 +- .../platform-express/test/groups.spec.ts | 4 +- .../test/merge-params.spec.ts | 4 +- .../platform-express/test/middleware.spec.ts | 4 +- .../platform-express/test/pageable.spec.ts | 4 +- .../platform-express/test/plain-text.spec.ts | 4 +- .../test/platform-express.spec.ts | 4 +- .../test/query-parser.spec.ts | 4 +- .../test/response-filter.spec.ts | 4 +- .../test/validation-error.spec.ts | 4 +- .../src/components/PlatformKoa.spec.ts | 2 +- .../src/components/PlatformKoa.ts | 10 +- .../platform-koa/src/decorators/ctx.spec.ts | 2 +- .../platform-koa/src/decorators/state.spec.ts | 2 +- packages/platform/platform-koa/src/index.ts | 20 +- .../platform-koa/src/interfaces/interfaces.ts | 4 +- .../src/services/PlatformKoaRequest.spec.ts | 2 +- .../src/services/PlatformKoaResponse.spec.ts | 4 +- .../platform/platform-koa/test/app/index.ts | 2 +- .../platform-koa/test/platform-koa.spec.ts | 2 +- .../platform-log-middleware/src/index.ts | 4 +- .../middlewares/PlatformLogMiddleware.spec.ts | 2 +- .../src/middlewares/PlatformLogMiddleware.ts | 2 +- .../src/decorators/authOptions.spec.ts | 2 +- .../src/decorators/use.spec.ts | 2 +- .../src/decorators/useAfter.spec.ts | 2 +- .../src/decorators/useAuth.spec.ts | 2 +- .../src/decorators/useAuth.ts | 4 +- .../src/decorators/useBefore.spec.ts | 2 +- .../src/decorators/useBeforeEach.spec.ts | 2 +- .../src/decorators/useBeforeEach.ts | 2 +- .../platform-middlewares/src/index.ts | 22 +- .../src/utils/getMiddlewaresForHook.ts | 2 +- .../src/utils/getMiddlewaresForHooks.spec.ts | 2 +- .../src/builder/PlatformParams.spec.ts | 8 +- .../src/builder/PlatformParams.ts | 4 +- .../src/decorators/bodyParams.spec.ts | 4 +- .../src/decorators/bodyParams.ts | 8 +- .../src/decorators/context.spec.ts | 4 +- .../platform-params/src/decorators/context.ts | 6 +- .../src/decorators/cookies.spec.ts | 4 +- .../platform-params/src/decorators/cookies.ts | 8 +- .../src/decorators/headerParams.spec.ts | 4 +- .../src/decorators/headerParams.ts | 8 +- .../src/decorators/locals.spec.ts | 4 +- .../platform-params/src/decorators/locals.ts | 6 +- .../src/decorators/pathParams.spec.ts | 4 +- .../src/decorators/pathParams.ts | 8 +- .../src/decorators/queryParams.spec.ts | 4 +- .../src/decorators/queryParams.ts | 8 +- .../src/decorators/session.spec.ts | 4 +- .../platform-params/src/decorators/session.ts | 8 +- .../src/decorators/useDeserialization.ts | 4 +- .../src/decorators/useParam.spec.ts | 6 +- .../src/decorators/useParam.ts | 12 +- .../src/decorators/useParamExpression.ts | 2 +- .../src/decorators/useParamType.ts | 8 +- .../platform-params/src/decorators/usePipe.ts | 2 +- .../platform-params/src/decorators/useType.ts | 2 +- .../src/decorators/useValidation.ts | 4 +- .../src/errors/ParamValidationError.spec.ts | 2 +- .../src/errors/ParamValidationError.ts | 2 +- .../src/errors/RequiredValidationError.ts | 2 +- .../platform/platform-params/src/index.ts | 56 +-- .../src/pipes/DeserializerPipe.spec.ts | 6 +- .../src/pipes/ParseExpressionPipe.spec.ts | 2 +- .../src/pipes/ParseExpressionPipe.ts | 4 +- .../src/pipes/ValidationPipe.spec.ts | 8 +- .../src/pipes/ValidationPipe.ts | 4 +- .../src/utils/mapParamsOptions.spec.ts | 2 +- .../src/utils/mapParamsOptions.ts | 2 +- .../platform-response-filter/readme.md | 2 +- .../src/decorators/responseFilter.ts | 2 +- .../src/domain/ResponseFiltersContainer.ts | 2 +- .../src/errors/TemplateRenderError.spec.ts | 2 +- .../platform-response-filter/src/index.ts | 14 +- .../services/PlatformResponseFilter.spec.ts | 6 +- .../src/services/PlatformResponseFilter.ts | 8 +- .../src/utils/getContentType.spec.ts | 2 +- .../src/utils/renderView.spec.ts | 2 +- .../src/utils/renderView.ts | 2 +- .../domain/PlatformHandlerMetadata.spec.ts | 6 +- .../src/domain/PlatformHandlerMetadata.ts | 4 +- .../src/domain/PlatformLayer.ts | 6 +- .../src/domain/PlatformRouter.ts | 8 +- .../src/domain/PlatformRouters.ts | 10 +- .../platform/platform-router/src/index.ts | 16 +- .../src/utils/useContextHandler.ts | 2 +- ...lter-endpoint-handlers.integration.spec.ts | 6 +- .../routers-injection.integration.spec.ts | 4 +- .../routers-middlewares.integration.spec.ts | 4 +- .../test/routers-nested.integration.spec.ts | 8 +- .../test/routers.integration.spec.ts | 4 +- .../platform-serverless-http/readme.md | 12 +- .../builder/PlatformServerlessHttp.spec.ts | 2 +- .../platform-serverless-http/src/index.ts | 6 +- .../test/body.integration.spec.ts | 4 +- .../test/integration/aws-basic/src/Server.ts | 2 +- .../test/integration/aws-basic/src/index.ts | 2 +- .../serverlessContext.integration.spec.ts | 4 +- .../src/PlatformServerlessTest.ts | 4 +- .../platform-serverless-testing/src/index.ts | 6 +- .../platform/platform-serverless/readme.md | 12 +- .../src/builder/PlatformServerless.spec.ts | 2 +- .../src/builder/PlatformServerless.ts | 6 +- .../builder/PlatformServerlessHandler.spec.ts | 4 +- .../src/builder/PlatformServerlessHandler.ts | 4 +- .../src/domain/ServerlessContext.spec.ts | 2 +- .../src/domain/ServerlessContext.ts | 4 +- .../src/domain/ServerlessRequest.spec.ts | 2 +- .../src/domain/ServerlessRequest.ts | 2 +- .../src/domain/ServerlessResponse.spec.ts | 2 +- .../src/domain/ServerlessResponse.ts | 2 +- .../platform/platform-serverless/src/index.ts | 16 +- .../src/utils/getRequestId.spec.ts | 2 +- .../src/utils/setResponseHeaders.spec.ts | 4 +- .../src/utils/setResponseHeaders.ts | 4 +- .../test/integration/aws-basic/src/index.ts | 2 +- .../test/query.integration.spec.ts | 2 +- .../test/utils/createServerlessContext.ts | 2 +- .../src/components/PlatformTestSdk.ts | 4 +- .../platform/platform-test-sdk/src/index.ts | 72 ++-- .../platform-test-sdk/src/interfaces/index.ts | 2 +- .../src/modules/feature/FeatureModule.ts | 2 +- .../platform-test-sdk/src/tests/exports.ts | 60 +-- .../src/tests/testAcceptMime.ts | 2 +- .../platform-test-sdk/src/tests/testAuth.ts | 4 +- .../src/tests/testBodyParams.ts | 2 +- .../platform-test-sdk/src/tests/testCache.ts | 2 +- .../src/tests/testChildrenControllers.ts | 2 +- .../src/tests/testCookies.ts | 2 +- .../src/tests/testCustom404.ts | 2 +- .../src/tests/testDeepQueryParams.ts | 2 +- .../platform-test-sdk/src/tests/testErrors.ts | 6 +- .../src/tests/testHandlers.ts | 2 +- .../src/tests/testHeaderParams.ts | 2 +- .../src/tests/testHeaders.ts | 2 +- .../src/tests/testInheritanceController.ts | 2 +- .../platform-test-sdk/src/tests/testLocals.ts | 2 +- .../src/tests/testLocation.ts | 2 +- .../src/tests/testMiddlewares.ts | 2 +- .../platform-test-sdk/src/tests/testModule.ts | 4 +- .../platform-test-sdk/src/tests/testMulter.ts | 2 +- .../src/tests/testPathParams.ts | 2 +- .../src/tests/testQueryParams.ts | 2 +- .../src/tests/testRedirect.ts | 2 +- .../src/tests/testResponse.ts | 2 +- .../src/tests/testResponseFilter.ts | 2 +- .../src/tests/testRouting.ts | 2 +- .../src/tests/testScopeRequest.ts | 2 +- .../src/tests/testSession.ts | 2 +- .../src/tests/testStatics.ts | 2 +- .../platform-test-sdk/src/tests/testStream.ts | 2 +- .../platform-test-sdk/src/tests/testView.ts | 2 +- packages/platform/platform-views/src/index.ts | 6 +- .../src/services/PlatformViews.spec.ts | 2 +- .../src/services/PlatformViews.ts | 2 +- packages/security/jwks/readme.md | 4 +- packages/security/jwks/src/getJwks.spec.ts | 2 +- packages/security/jwks/src/index.ts | 2 +- .../src/OidcWildcardRedirectUriModule.spec.ts | 26 +- .../src/OidcWildcardRedirectUriModule.ts | 7 +- .../src/index.ts | 4 +- .../utils/wildcardRedirectUriAllowed.spec.ts | 10 +- packages/security/oidc-provider/readme.md | 4 +- .../oidc-provider/src/OidcModule.spec.ts | 4 +- .../security/oidc-provider/src/OidcModule.ts | 6 +- .../src/decorators/grantId.spec.ts | 4 +- .../oidc-provider/src/decorators/grantId.ts | 2 +- .../src/decorators/interaction.spec.ts | 6 +- .../src/decorators/interaction.ts | 4 +- .../src/decorators/interactions.ts | 6 +- .../oidc-provider/src/decorators/noCache.ts | 2 +- .../src/decorators/oidcCtx.spec.ts | 4 +- .../oidc-provider/src/decorators/oidcCtx.ts | 4 +- .../src/decorators/oidcSession.spec.ts | 4 +- .../src/decorators/oidcSession.ts | 2 +- .../src/decorators/params.spec.ts | 4 +- .../oidc-provider/src/decorators/params.ts | 2 +- .../src/decorators/prompt.spec.ts | 4 +- .../oidc-provider/src/decorators/prompt.ts | 2 +- .../oidc-provider/src/decorators/uid.spec.ts | 4 +- .../oidc-provider/src/decorators/uid.ts | 2 +- .../src/domain/OidcAccountsMethods.ts | 2 +- .../src/domain/OidcInteractionPromptProps.ts | 2 +- .../oidc-provider/src/domain/OidcSettings.ts | 2 +- packages/security/oidc-provider/src/index.ts | 62 +-- .../OidcInteractionMiddleware.spec.ts | 6 +- .../middlewares/OidcInteractionMiddleware.ts | 2 +- .../middlewares/OidcNoCacheMiddleware.spec.ts | 2 +- .../middlewares/OidcSecureMiddleware.spec.ts | 2 +- .../src/services/OidcAdapters.spec.ts | 2 +- .../services/OidcInteractionContext.spec.ts | 4 +- .../src/services/OidcInteractionContext.ts | 16 +- .../src/services/OidcInteractions.ts | 6 +- .../src/services/OidcPolicy.spec.ts | 8 +- .../oidc-provider/src/services/OidcPolicy.ts | 8 +- .../src/services/OidcProvider.spec.ts | 2 +- .../src/services/OidcProvider.ts | 18 +- .../oidc-provider/src/utils/debug.spec.ts | 2 +- .../security/oidc-provider/test/app/Server.ts | 2 +- .../app/controllers/oidc/InteractionsCtrl.ts | 8 +- .../security/oidc-provider/test/app/index.ts | 8 +- .../test/app/interactions/LoginInteraction.ts | 2 +- .../test/app/services/Accounts.ts | 2 +- .../test/oidc.integration.spec.ts | 8 +- packages/security/passport/readme.md | 2 +- .../passport/src/PassportModule.spec.ts | 2 +- .../security/passport/src/PassportModule.ts | 4 +- .../passport/src/decorators/args.spec.ts | 2 +- .../src/decorators/authenticate.spec.ts | 2 +- .../passport/src/decorators/authenticate.ts | 2 +- .../passport/src/decorators/authorize.spec.ts | 2 +- .../passport/src/decorators/authorize.ts | 2 +- .../passport/src/decorators/protocol.ts | 4 +- packages/security/passport/src/index.ts | 38 +- .../src/interfaces/ProtocolMethods.ts | 6 +- .../passport/src/interfaces/interfaces.ts | 2 +- .../middlewares/PassportMiddleware.spec.ts | 4 +- .../src/middlewares/PassportMiddleware.ts | 4 +- .../PassportSerializerService.spec.ts | 2 +- .../src/services/PassportSerializerService.ts | 2 +- .../src/services/ProtocolsService.spec.ts | 4 +- .../passport/src/services/ProtocolsService.ts | 10 +- .../src/utils/getProtocolsFromRequest.spec.ts | 2 +- packages/security/passport/test/app/Server.ts | 4 +- .../app/controllers/rest/auth/AuthCtrl.ts | 4 +- .../passport/test/app/models/Account.ts | 2 +- .../test/app/protocols/LoginLocalProtocol.ts | 4 +- .../test/app/services/UsersRepository.ts | 2 +- .../test/passport.integration.spec.ts | 2 +- packages/specs/ajv/src/index.ts | 22 +- .../specs/ajv/src/interfaces/interfaces.ts | 2 +- packages/specs/ajv/src/services/Ajv.ts | 4 +- .../specs/ajv/src/services/AjvService.spec.ts | 2 +- packages/specs/ajv/src/services/AjvService.ts | 8 +- .../src/utils/defaultErrorFormatter.spec.ts | 2 +- .../ajv/src/utils/defaultErrorFormatter.ts | 4 +- .../integration/formats.integration.spec.ts | 6 +- .../integration/keywords.integration.spec.ts | 4 +- .../exceptions/src/clientErrors/BadMapping.ts | 2 +- .../exceptions/src/clientErrors/BadRequest.ts | 2 +- .../exceptions/src/clientErrors/Conflict.ts | 2 +- .../src/clientErrors/ExpectationFailed.ts | 2 +- .../exceptions/src/clientErrors/Forbidden.ts | 2 +- .../specs/exceptions/src/clientErrors/Gone.ts | 2 +- .../exceptions/src/clientErrors/ImATeapot.ts | 2 +- .../src/clientErrors/LengthRequired.ts | 2 +- .../src/clientErrors/MethodNotAllowed.ts | 2 +- .../src/clientErrors/MisdirectedRequest.ts | 2 +- .../src/clientErrors/NotAcceptable.ts | 2 +- .../exceptions/src/clientErrors/NotFound.ts | 2 +- .../src/clientErrors/PaymentRequired.ts | 2 +- .../src/clientErrors/PreconditionFailed.ts | 2 +- .../src/clientErrors/PreconditionRequired.ts | 2 +- .../ProxyAuthentificationRequired.ts | 2 +- .../src/clientErrors/RequestEntityTooLarge.ts | 2 +- .../RequestHeaderFieldsTooLarge.ts | 2 +- .../clientErrors/RequestRangeUnsatisfiable.ts | 2 +- .../src/clientErrors/RequestTimeout.ts | 2 +- .../src/clientErrors/RequestURITooLong.ts | 2 +- .../src/clientErrors/TooManyRequests.ts | 2 +- .../src/clientErrors/Unauthorized.ts | 2 +- .../UnavailableForLegalReasons.ts | 2 +- .../src/clientErrors/UnprocessableEntity.ts | 2 +- .../src/clientErrors/UnsupportedMediaType.ts | 2 +- .../src/clientErrors/UpgradeRequired.ts | 2 +- .../exceptions/src/core/ClientException.ts | 4 +- .../exceptions/src/core/Exception.spec.ts | 4 +- .../specs/exceptions/src/core/Exception.ts | 2 +- .../exceptions/src/core/RedirectException.ts | 4 +- .../exceptions/src/core/ServerException.ts | 4 +- packages/specs/exceptions/src/index.ts | 100 ++--- .../src/redirections/MovedPermanently.ts | 2 +- .../src/redirections/MovedTemporarily.ts | 2 +- .../src/redirections/MultipleChoices.ts | 2 +- .../src/redirections/NotModified.ts | 2 +- .../src/redirections/PermanentRedirect.ts | 2 +- .../exceptions/src/redirections/SeeOther.ts | 2 +- .../src/redirections/TemporaryRedirect.ts | 2 +- .../exceptions/src/redirections/UseProxy.ts | 2 +- .../exceptions/src/serverErrors/BadGateway.ts | 2 +- .../serverErrors/BandwidthLimitExceeded.ts | 2 +- .../src/serverErrors/GatewayTimeout.ts | 2 +- .../src/serverErrors/InternalServerError.ts | 2 +- .../NetworkAuthenticationRequired.ts | 2 +- .../src/serverErrors/NotExtended.ts | 2 +- .../src/serverErrors/NotImplemented.ts | 2 +- .../exceptions/src/serverErrors/ProxyError.ts | 2 +- .../src/serverErrors/ServiceUnavailable.ts | 2 +- .../src/serverErrors/VariantAlsoNegotiates.ts | 2 +- .../src/components/DateMapper.spec.ts | 2 +- .../json-mapper/src/components/DateMapper.ts | 4 +- .../src/components/PrimitiveMapper.spec.ts | 2 +- .../src/components/PrimitiveMapper.ts | 4 +- .../src/components/SymbolMapper.spec.ts | 2 +- .../src/components/SymbolMapper.ts | 4 +- .../json-mapper/src/decorators/jsonMapper.ts | 2 +- .../src/domain/JsonDeserializer.spec.ts | 10 +- .../src/domain/JsonDeserializer.ts | 16 +- .../src/domain/JsonDeserializerOptions.ts | 4 +- .../src/domain/JsonMapperSettings.ts | 2 +- .../src/domain/JsonMapperTypesContainer.ts | 2 +- .../src/domain/JsonSerializer.spec.ts | 16 +- .../json-mapper/src/domain/JsonSerializer.ts | 14 +- .../src/domain/JsonSerializerOptions.ts | 4 +- .../json-mapper/src/domain/Writer.spec.ts | 2 +- packages/specs/json-mapper/src/index.ts | 50 +-- .../json-mapper/src/utils/deserialize.spec.ts | 2 +- .../json-mapper/src/utils/deserialize.ts | 4 +- .../json-mapper/src/utils/serialize.spec.ts | 2 +- .../specs/json-mapper/src/utils/serialize.ts | 4 +- .../specs/json-mapper/test/helpers/Post.ts | 2 +- .../specs/json-mapper/test/helpers/User.ts | 2 +- .../additional-properties.integration.spec.ts | 2 +- .../after.deserialize.integration.spec.ts | 6 +- .../allowed-groups.integration.spec.ts | 2 +- .../before.deserialize.integration.spec.ts | 6 +- .../integration/custom.validation.spec.ts | 4 +- .../test/integration/date.integration.spec.ts | 2 +- .../discriminator.integration.spec.ts | 2 +- .../enum.serialiazation.integration.spec.ts | 2 +- .../integration/generics.integration.spec.ts | 4 +- .../integration/groups.integration.spec.ts | 4 +- .../integration/ignore.integration.spec.ts | 2 +- .../models.date.intregration.spec.ts | 6 +- .../integration/models.integration.spec.ts | 2 +- .../integration/moment.integration.spec.ts | 8 +- .../nested-list.integration.spec.ts | 2 +- .../integration/nullable.integration.spec.ts | 2 +- .../integration/pageable.integration.spec.ts | 2 +- .../integration/partial.integration.spec.ts | 2 +- .../integration/readonly.integration.spec.ts | 4 +- .../integration/writeonly.integration.spec.ts | 4 +- .../openspec/src/common/OpenSpecJsonSchema.ts | 6 +- .../openspec/src/common/OpenSpecSecurity.ts | 2 +- .../specs/openspec/src/common/OpenSpecTag.ts | 2 +- packages/specs/openspec/src/index.ts | 72 ++-- .../specs/openspec/src/openspec2/OS2Header.ts | 2 +- .../openspec/src/openspec2/OS2Operation.ts | 12 +- .../openspec/src/openspec2/OS2Parameter.ts | 4 +- .../specs/openspec/src/openspec2/OS2Paths.ts | 8 +- .../openspec/src/openspec2/OS2Response.ts | 6 +- .../specs/openspec/src/openspec2/OS2Schema.ts | 8 +- .../openspec/src/openspec2/OS2Security.ts | 2 +- .../specs/openspec/src/openspec2/OpenSpec2.ts | 20 +- .../openspec/src/openspec3/OS3Callbacks.ts | 6 +- .../openspec/src/openspec3/OS3Components.ts | 20 +- .../openspec/src/openspec3/OS3Encoding.ts | 4 +- .../specs/openspec/src/openspec3/OS3Header.ts | 6 +- .../specs/openspec/src/openspec3/OS3Link.ts | 4 +- .../openspec/src/openspec3/OS3MediaType.ts | 10 +- .../openspec/src/openspec3/OS3Operation.ts | 18 +- .../openspec/src/openspec3/OS3Parameter.ts | 10 +- .../specs/openspec/src/openspec3/OS3Paths.ts | 12 +- .../openspec/src/openspec3/OS3RequestBody.ts | 10 +- .../openspec/src/openspec3/OS3Response.ts | 12 +- .../specs/openspec/src/openspec3/OS3Schema.ts | 8 +- .../openspec/src/openspec3/OS3Security.ts | 2 +- .../specs/openspec/src/openspec3/OS3Server.ts | 2 +- .../specs/openspec/src/openspec3/OpenSpec3.ts | 18 +- .../components/async-api/channelsMapper.ts | 18 +- .../src/components/async-api/generate.ts | 6 +- .../src/components/async-api/messageMapper.ts | 14 +- .../src/components/async-api/payloadMapper.ts | 18 +- .../components/async-api/responseMapper.ts | 12 +- .../src/components/default/anyMapper.spec.ts | 2 +- .../src/components/default/anyMapper.ts | 12 +- .../src/components/default/classMapper.ts | 12 +- .../src/components/default/genericsMapper.ts | 8 +- .../default/inheritedClassMapper.ts | 6 +- .../src/components/default/itemMapper.ts | 4 +- .../src/components/default/lazyRefMapper.ts | 10 +- .../src/components/default/mapMapper.ts | 6 +- .../src/components/default/objectMapper.ts | 10 +- .../schema/src/components/default/ofMapper.ts | 6 +- .../components/default/propertiesMapper.ts | 6 +- .../src/components/default/schemaMapper.ts | 18 +- packages/specs/schema/src/components/index.ts | 52 +-- .../src/components/open-spec/generate.ts | 6 +- .../open-spec/operationInFilesMapper.ts | 4 +- .../open-spec/operationInParameterMapper.ts | 10 +- .../open-spec/operationInParametersMapper.ts | 6 +- .../open-spec/operationInQueryMapper.ts | 8 +- .../components/open-spec/operationMapper.ts | 12 +- .../open-spec/operationMediaMapper.ts | 6 +- .../open-spec/operationRequestBodyMapper.ts | 10 +- .../open-spec/operationResponseMapper.ts | 6 +- .../src/components/open-spec/pathsMapper.ts | 24 +- .../schema/src/decorators/class/children.ts | 2 +- .../decorators/class/discriminatorValue.ts | 2 +- .../collections/collectionContains.ts | 2 +- .../collections/collectionOf.spec.ts | 18 +- .../decorators/collections/collectionOf.ts | 2 +- .../decorators/collections/maxItems.spec.ts | 6 +- .../src/decorators/collections/maxItems.ts | 4 +- .../collections/maxProperties.spec.ts | 12 +- .../decorators/collections/maxProperties.ts | 4 +- .../decorators/collections/minItems.spec.ts | 6 +- .../src/decorators/collections/minItems.ts | 4 +- .../collections/minProperties.spec.ts | 12 +- .../decorators/collections/minProperties.ts | 4 +- .../collections/uniqueItems.spec.ts | 6 +- .../src/decorators/collections/uniqueItems.ts | 6 +- .../common/additionalProperties.spec.ts | 2 +- .../decorators/common/additionalProperties.ts | 4 +- .../src/decorators/common/allOf.spec.ts | 20 +- .../schema/src/decorators/common/allOf.ts | 4 +- .../src/decorators/common/allow.spec.ts | 8 +- .../schema/src/decorators/common/allow.ts | 6 +- .../schema/src/decorators/common/any.spec.ts | 4 +- .../specs/schema/src/decorators/common/any.ts | 2 +- .../src/decorators/common/anyOf.spec.ts | 8 +- .../schema/src/decorators/common/anyOf.ts | 4 +- .../src/decorators/common/const.spec.ts | 14 +- .../schema/src/decorators/common/const.ts | 2 +- .../src/decorators/common/customKey.spec.ts | 4 +- .../schema/src/decorators/common/customKey.ts | 4 +- .../src/decorators/common/default.spec.ts | 4 +- .../schema/src/decorators/common/default.ts | 2 +- .../src/decorators/common/defaultMsg.spec.ts | 4 +- .../src/decorators/common/defaultMsg.ts | 2 +- .../src/decorators/common/description.spec.ts | 8 +- .../src/decorators/common/description.ts | 8 +- .../src/decorators/common/discriminatorKey.ts | 6 +- .../schema/src/decorators/common/enum.spec.ts | 6 +- .../schema/src/decorators/common/enum.ts | 4 +- .../src/decorators/common/errorMsg.spec.ts | 4 +- .../schema/src/decorators/common/errorMsg.ts | 2 +- .../src/decorators/common/example.spec.ts | 6 +- .../schema/src/decorators/common/example.ts | 4 +- .../src/decorators/common/examples.spec.ts | 4 +- .../schema/src/decorators/common/examples.ts | 4 +- .../common/exclusiveMaximum.spec.ts | 4 +- .../src/decorators/common/exclusiveMaximum.ts | 4 +- .../common/exclusiveMinimum.spec.ts | 4 +- .../src/decorators/common/exclusiveMinimum.ts | 4 +- .../src/decorators/common/format.spec.ts | 4 +- .../schema/src/decorators/common/format.ts | 6 +- .../decorators/common/forwardGroups.spec.ts | 6 +- .../src/decorators/common/forwardGroups.ts | 2 +- .../src/decorators/common/groups.spec.ts | 26 +- .../schema/src/decorators/common/groups.ts | 8 +- .../src/decorators/common/hidden.spec.ts | 6 +- .../src/decorators/common/ignore.spec.ts | 6 +- .../schema/src/decorators/common/ignore.ts | 6 +- .../src/decorators/common/integer.spec.ts | 16 +- .../schema/src/decorators/common/integer.ts | 2 +- .../decorators/common/jsonEntityFn.spec.ts | 2 +- .../src/decorators/common/jsonEntityFn.ts | 4 +- .../src/decorators/common/maxLength.spec.ts | 8 +- .../schema/src/decorators/common/maxLength.ts | 4 +- .../src/decorators/common/maximum.spec.ts | 6 +- .../schema/src/decorators/common/maximum.ts | 4 +- .../src/decorators/common/minLength.spec.ts | 10 +- .../schema/src/decorators/common/minLength.ts | 4 +- .../src/decorators/common/minimum.spec.ts | 6 +- .../schema/src/decorators/common/minimum.ts | 4 +- .../src/decorators/common/multipleOf.spec.ts | 4 +- .../src/decorators/common/multipleOf.ts | 4 +- .../schema/src/decorators/common/name.spec.ts | 6 +- .../schema/src/decorators/common/name.ts | 4 +- .../src/decorators/common/nullable.spec.ts | 18 +- .../schema/src/decorators/common/nullable.ts | 4 +- .../src/decorators/common/oneOf.spec.ts | 4 +- .../schema/src/decorators/common/oneOf.ts | 4 +- .../src/decorators/common/optional.spec.ts | 4 +- .../schema/src/decorators/common/optional.ts | 4 +- .../src/decorators/common/pattern.spec.ts | 4 +- .../schema/src/decorators/common/pattern.ts | 6 +- .../schema/src/decorators/common/property.ts | 2 +- .../src/decorators/common/readOnly.spec.ts | 4 +- .../schema/src/decorators/common/readOnly.ts | 4 +- .../src/decorators/common/recordOf.spec.ts | 4 +- .../schema/src/decorators/common/recordOf.ts | 2 +- .../src/decorators/common/required.spec.ts | 10 +- .../schema/src/decorators/common/required.ts | 6 +- .../decorators/common/requiredGroups.spec.ts | 6 +- .../src/decorators/common/requiredGroups.ts | 4 +- .../src/decorators/common/schema.spec.ts | 4 +- .../schema/src/decorators/common/schema.ts | 6 +- .../src/decorators/common/title.spec.ts | 2 +- .../schema/src/decorators/common/title.ts | 2 +- .../src/decorators/common/typeError.spec.ts | 4 +- .../schema/src/decorators/common/typeError.ts | 4 +- .../src/decorators/common/writeOnly.spec.ts | 4 +- .../schema/src/decorators/common/writeOnly.ts | 4 +- .../decorators/config/jsonEntityComponent.ts | 2 +- .../src/decorators/generics/genericOf.spec.ts | 6 +- .../src/decorators/generics/genericOf.ts | 6 +- .../src/decorators/generics/generics.ts | 2 +- .../decorators/operations/acceptMime.spec.ts | 4 +- .../src/decorators/operations/acceptMime.ts | 2 +- .../decorators/operations/consumes.spec.ts | 2 +- .../src/decorators/operations/consumes.ts | 2 +- .../decorators/operations/contentType.spec.ts | 2 +- .../src/decorators/operations/contentType.ts | 2 +- .../decorators/operations/deprecated.spec.ts | 2 +- .../src/decorators/operations/deprecated.ts | 6 +- .../src/decorators/operations/header.spec.ts | 4 +- .../src/decorators/operations/header.ts | 4 +- .../src/decorators/operations/in.spec.ts | 2 +- .../schema/src/decorators/operations/in.ts | 12 +- .../src/decorators/operations/inFile.spec.ts | 4 +- .../src/decorators/operations/inFile.ts | 10 +- .../decorators/operations/location.spec.ts | 2 +- .../src/decorators/operations/location.ts | 4 +- .../src/decorators/operations/operation.ts | 8 +- .../decorators/operations/operationId.spec.ts | 2 +- .../src/decorators/operations/operationId.ts | 2 +- .../operations/operationPath.spec.ts | 2 +- .../decorators/operations/operationPath.ts | 4 +- .../src/decorators/operations/partial.spec.ts | 4 +- .../src/decorators/operations/partial.ts | 2 +- .../src/decorators/operations/path.spec.ts | 2 +- .../schema/src/decorators/operations/path.ts | 2 +- .../decorators/operations/produces.spec.ts | 2 +- .../src/decorators/operations/produces.ts | 2 +- .../src/decorators/operations/publish.spec.ts | 8 +- .../src/decorators/operations/publish.ts | 4 +- .../decorators/operations/redirect.spec.ts | 4 +- .../src/decorators/operations/redirect.ts | 6 +- .../src/decorators/operations/returns.spec.ts | 14 +- .../src/decorators/operations/returns.ts | 24 +- .../src/decorators/operations/route.spec.ts | 4 +- .../schema/src/decorators/operations/route.ts | 4 +- .../decorators/operations/security.spec.ts | 4 +- .../src/decorators/operations/security.ts | 2 +- .../src/decorators/operations/status.spec.ts | 14 +- .../src/decorators/operations/status.ts | 2 +- .../decorators/operations/subscribe.spec.ts | 8 +- .../src/decorators/operations/subscribe.ts | 4 +- .../src/decorators/operations/summary.spec.ts | 4 +- .../src/decorators/operations/summary.ts | 2 +- .../src/decorators/operations/tags.spec.ts | 4 +- .../schema/src/decorators/operations/tags.ts | 2 +- .../src/decorators/operations/view.spec.ts | 2 +- .../schema/src/domain/DecoratorContext.ts | 2 +- .../specs/schema/src/domain/JsonClassStore.ts | 10 +- .../src/domain/JsonDiscriminator.spec.ts | 10 +- .../schema/src/domain/JsonEntityStore.spec.ts | 2 +- .../schema/src/domain/JsonEntityStore.ts | 18 +- .../specs/schema/src/domain/JsonLazyRef.ts | 2 +- .../specs/schema/src/domain/JsonMap.spec.ts | 2 +- packages/specs/schema/src/domain/JsonMap.ts | 4 +- packages/specs/schema/src/domain/JsonMedia.ts | 4 +- .../schema/src/domain/JsonMethodStore.spec.ts | 18 +- .../schema/src/domain/JsonMethodStore.ts | 12 +- .../schema/src/domain/JsonOperation.spec.ts | 2 +- .../specs/schema/src/domain/JsonOperation.ts | 12 +- .../src/domain/JsonOperationPathsMap.ts | 4 +- .../src/domain/JsonOperationRoute.spec.ts | 10 +- .../schema/src/domain/JsonOperationRoute.ts | 6 +- .../specs/schema/src/domain/JsonParameter.ts | 12 +- .../src/domain/JsonParameterStore.spec.ts | 20 +- .../schema/src/domain/JsonParameterStore.ts | 10 +- .../src/domain/JsonParameterTypes.spec.ts | 2 +- .../src/domain/JsonPropertyStore.spec.ts | 4 +- .../schema/src/domain/JsonPropertyStore.ts | 8 +- .../schema/src/domain/JsonRequestBody.ts | 6 +- .../specs/schema/src/domain/JsonResponse.ts | 12 +- .../schema/src/domain/JsonSchema.spec.ts | 2 +- .../specs/schema/src/domain/JsonSchema.ts | 28 +- packages/specs/schema/src/hooks/alterOneOf.ts | 4 +- .../schema/src/hooks/alterRequiredGroups.ts | 4 +- packages/specs/schema/src/index.ts | 352 +++++++++--------- .../schema/src/interfaces/IgnoreCallback.ts | 2 +- .../src/interfaces/JsonSchemaOptions.ts | 2 +- .../registries/JsonSchemaMapperContainer.ts | 2 +- .../schema/src/registries/enumRegistries.ts | 2 +- .../specs/schema/src/utils/concatPath.spec.ts | 2 +- packages/specs/schema/src/utils/from.spec.ts | 6 +- packages/specs/schema/src/utils/from.ts | 12 +- .../schema/src/utils/generateSpec.spec.ts | 28 +- .../specs/schema/src/utils/generateSpec.ts | 12 +- packages/specs/schema/src/utils/generics.ts | 2 +- .../schema/src/utils/getComputedType.spec.ts | 2 +- .../src/utils/getInheritedStores.spec.ts | 4 +- .../schema/src/utils/getInheritedStores.ts | 4 +- .../schema/src/utils/getJsonEntityStore.ts | 10 +- .../src/utils/getJsonPathParameters.spec.ts | 2 +- .../schema/src/utils/getJsonSchema.spec.ts | 4 +- .../specs/schema/src/utils/getJsonSchema.ts | 10 +- .../schema/src/utils/getJsonType.spec.ts | 2 +- .../src/utils/getOperationsRoutes.spec.ts | 12 +- .../schema/src/utils/getOperationsRoutes.ts | 14 +- .../src/utils/getOperationsStore.spec.ts | 2 +- .../schema/src/utils/getOperationsStores.ts | 10 +- .../src/utils/getPropertiesStores.spec.ts | 10 +- .../schema/src/utils/getPropertiesStores.ts | 10 +- .../schema/src/utils/getRequiredProperties.ts | 6 +- .../specs/schema/src/utils/getSpec.spec.ts | 26 +- packages/specs/schema/src/utils/getSpec.ts | 12 +- .../schema/src/utils/getSpecType.spec.ts | 4 +- .../specs/schema/src/utils/getSpecType.ts | 2 +- .../schema/src/utils/inlineEnums.spec.ts | 2 +- .../specs/schema/src/utils/inlineEnums.ts | 4 +- .../schema/src/utils/isSuccessStatus.spec.ts | 2 +- .../specs/schema/src/utils/mapHeaders.spec.ts | 2 +- packages/specs/schema/src/utils/mapHeaders.ts | 2 +- .../specs/schema/src/utils/mapNullableType.ts | 6 +- .../specs/schema/src/utils/mapOpenSpec.ts | 10 +- .../specs/schema/src/utils/mapOpenSpec2.ts | 2 +- .../specs/schema/src/utils/mapOpenSpec3.ts | 2 +- .../schema/src/utils/mapOperationOptions.ts | 2 +- .../schema/src/utils/matchGroups.spec.ts | 2 +- .../specs/schema/src/utils/mergeSpec.spec.ts | 2 +- .../src/utils/operationIdFormatter.spec.ts | 2 +- .../schema/src/utils/operationIdFormatter.ts | 2 +- packages/specs/schema/src/utils/ref.ts | 6 +- .../schema/src/utils/removeHiddenOperation.ts | 2 +- .../src/utils/toJsonMapCollection.spec.ts | 4 +- .../schema/src/utils/toJsonMapCollection.ts | 2 +- .../schema/src/utils/transformToOS2.spec.ts | 54 +-- .../schema/src/utils/withErrorMsg.spec.ts | 2 +- .../specs/schema/src/utils/withErrorMsg.ts | 2 +- packages/specs/schema/test/helpers/Post.ts | 2 +- packages/specs/schema/test/helpers/User.ts | 2 +- .../schema/test/helpers/validateModel.ts | 4 +- .../allowed-groups.integration.spec.ts | 2 +- .../body-params-any.integration.spec.ts | 2 +- .../integrations/body.integration.spec.ts | 4 +- .../deep-object-query-params.spec.ts | 2 +- .../discriminator.integration.spec.ts | 2 +- .../dynamicurl.integration.spec.ts | 4 +- .../integrations/generics.integration.spec.ts | 4 +- .../inheritance.integration.spec.ts | 2 +- .../integrations/lazyref.integration.spec.ts | 2 +- .../multipart.integration.spec.ts | 4 +- .../nested-list.integration.spec.ts | 2 +- .../integrations/nullable.integration.spec.ts | 4 +- .../oneOf.groups.integration.spec.ts | 2 +- .../pageable-with-search.integration.spec.ts | 6 +- .../integrations/pageable.integration.spec.ts | 4 +- .../integrations/partial.integration.spec.ts | 2 +- .../integrations/petstore.integration.spec.ts | 2 +- .../integrations/query-model-examples.spec.ts | 2 +- .../integrations/response.integration.spec.ts | 4 +- .../union-types.integration.spec.ts | 2 +- packages/specs/swagger/readme.md | 2 +- .../specs/swagger/src/SwaggerModule.spec.ts | 2 +- packages/specs/swagger/src/SwaggerModule.ts | 14 +- packages/specs/swagger/src/index.ts | 26 +- .../swagger/src/interfaces/interfaces.ts | 2 +- .../src/middlewares/cssMiddleware.spec.ts | 2 +- .../src/middlewares/indexMiddleware.spec.ts | 2 +- .../src/middlewares/indexMiddleware.ts | 2 +- .../src/middlewares/jsMiddleware.spec.ts | 2 +- .../middlewares/redirectMiddleware.spec.ts | 2 +- .../src/services/SwaggerService.spec.ts | 2 +- .../swagger/src/services/SwaggerService.ts | 4 +- .../swagger/src/utils/includeRoute.spec.ts | 4 +- .../specs/swagger/src/utils/includeRoute.ts | 4 +- .../specs/swagger/src/utils/matchPath.spec.ts | 2 +- packages/specs/swagger/test/app/index.ts | 2 +- .../specs/swagger/test/swagger.anyof.spec.ts | 2 +- .../swagger/test/swagger.bodyparams.spec.ts | 2 +- .../swagger/test/swagger.children.spec.ts | 2 +- .../specs/swagger/test/swagger.errors.spec.ts | 2 +- .../swagger/test/swagger.integration.spec.ts | 4 +- .../test/swagger.nested-controllers.spec.ts | 2 +- .../swagger/test/swagger.operationId.spec.ts | 4 +- .../test/swagger.path-patterns.spec.ts | 4 +- .../specs/swagger/test/swagger.query.spec.ts | 2 +- .../agenda/src/AgendaModule.spec.ts | 8 +- .../third-parties/agenda/src/AgendaModule.ts | 6 +- .../agenda/src/decorators/agenda.spec.ts | 2 +- .../agenda/src/decorators/agenda.ts | 2 +- .../agenda/src/decorators/define.spec.ts | 4 +- .../agenda/src/decorators/define.ts | 2 +- .../agenda/src/decorators/every.spec.ts | 4 +- .../agenda/src/decorators/every.ts | 4 +- packages/third-parties/agenda/src/index.ts | 16 +- ...agenda-define-manually.integration.spec.ts | 4 +- .../test/agenda-define.integration.spec.ts | 4 +- .../test/agenda-every.integration.spec.ts | 4 +- packages/third-parties/bullmq/README.md | 6 +- .../bullmq/src/BullMQModule.spec.ts | 14 +- .../third-parties/bullmq/src/BullMQModule.ts | 20 +- .../bullmq/src/contracts/index.ts | 4 +- .../bullmq/src/decorators/InjectQueue.ts | 2 +- .../bullmq/src/decorators/InjectWorker.ts | 2 +- .../src/decorators/JobController.spec.ts | 2 +- .../bullmq/src/decorators/JobController.ts | 6 +- .../bullmq/src/decorators/index.ts | 6 +- .../src/dispatchers/JobDispatcher.spec.ts | 6 +- .../bullmq/src/dispatchers/JobDispatcher.ts | 10 +- .../bullmq/src/dispatchers/index.ts | 4 +- packages/third-parties/bullmq/src/index.ts | 36 +- .../bullmq/src/utils/createQueueProvider.ts | 4 +- .../bullmq/src/utils/createWorkerProvider.ts | 4 +- .../bullmq/src/utils/mapQueueOptions.ts | 2 +- .../bullmq/src/utils/mapWorkerOptions.ts | 2 +- .../src/__mock__/module1/Module1.ts | 4 +- .../__mock__/module1/controllers/M1Ctrl1.ts | 2 +- .../__mock__/module1/services/M1Service.ts | 2 +- .../__mock__/module1/submodule/SubModule.ts | 2 +- .../src/__mock__/module2/Module2.ts | 2 +- .../src/cleanGlobPatterns.spec.ts | 4 +- .../components-scan/src/cleanGlobPatterns.ts | 2 +- .../components-scan/src/importFiles.spec.ts | 6 +- .../components-scan/src/importFiles.ts | 2 +- .../src/importProviders.spec.ts | 2 +- .../components-scan/src/importProviders.ts | 2 +- .../components-scan/src/index.ts | 8 +- .../event-emitter/src/EventEmitterModule.ts | 4 +- .../src/decorators/onAny.spec.ts | 2 +- .../event-emitter/src/decorators/onAny.ts | 2 +- .../src/decorators/onEvent.spec.ts | 2 +- .../event-emitter/src/decorators/onEvent.ts | 2 +- .../third-parties/event-emitter/src/index.ts | 12 +- .../event-emitter/test/integration.spec.ts | 10 +- .../src/domain/FormioComponent.ts | 2 +- .../formio-types/src/domain/FormioForm.ts | 4 +- .../src/domain/FormioSubmission.ts | 2 +- .../third-parties/formio-types/src/index.ts | 22 +- .../formio/src/FormioModule.spec.ts | 6 +- .../third-parties/formio/src/FormioModule.ts | 26 +- .../formio/src/builder/FormioMapper.spec.ts | 2 +- .../formio/src/builder/FormioMapper.ts | 2 +- .../src/components/AlterActions.spec.ts | 12 +- .../formio/src/components/AlterActions.ts | 10 +- .../formio/src/components/AlterAudit.spec.ts | 2 +- .../formio/src/components/AlterAudit.ts | 4 +- .../formio/src/components/AlterHost.spec.ts | 2 +- .../formio/src/components/AlterHost.ts | 4 +- .../formio/src/components/AlterLog.spec.ts | 2 +- .../formio/src/components/AlterLog.ts | 4 +- .../formio/src/components/AlterSkip.spec.ts | 2 +- .../formio/src/components/AlterSkip.ts | 4 +- .../AlterTemplateExportSteps.spec.ts | 4 +- .../components/AlterTemplateExportSteps.ts | 12 +- .../AlterTemplateImportSteps.spec.ts | 4 +- .../components/AlterTemplateImportSteps.ts | 12 +- .../formio/src/decorators/actionCtx.spec.ts | 2 +- .../formio/src/decorators/actionCtx.ts | 2 +- .../formio/src/decorators/alter.spec.ts | 4 +- .../formio/src/decorators/on.spec.ts | 4 +- .../src/decorators/useFormioAuth.spec.ts | 4 +- .../formio/src/decorators/useFormioAuth.ts | 2 +- .../third-parties/formio/src/domain/Formio.ts | 20 +- .../formio/src/domain/FormioAction.ts | 4 +- .../formio/src/domain/FormioActionsIndex.ts | 2 +- .../formio/src/domain/FormioAuth.ts | 4 +- .../formio/src/domain/FormioConfig.ts | 4 +- .../formio/src/domain/FormioHooks.ts | 16 +- .../formio/src/domain/FormioModels.ts | 4 +- .../formio/src/domain/FormioRouter.ts | 4 +- .../formio/src/domain/FormioTemplate.ts | 2 +- .../formio/src/domain/FormioTemplateUtil.ts | 2 +- .../formio/src/domain/FormioUpdate.ts | 2 +- .../formio/src/domain/FormioUtils.ts | 4 +- packages/third-parties/formio/src/index.ts | 86 ++--- .../middlewares/FormioAuthMiddleware.spec.ts | 4 +- .../src/middlewares/FormioAuthMiddleware.ts | 2 +- .../src/services/FormioAuthService.spec.ts | 6 +- .../formio/src/services/FormioAuthService.ts | 10 +- .../src/services/FormioDatabase.spec.ts | 4 +- .../formio/src/services/FormioDatabase.ts | 6 +- .../src/services/FormioHooksService.spec.ts | 4 +- .../formio/src/services/FormioHooksService.ts | 4 +- .../src/services/FormioInstaller.spec.ts | 4 +- .../formio/src/services/FormioInstaller.ts | 6 +- .../src/services/FormioRepository.spec.ts | 4 +- .../formio/src/services/FormioRepository.ts | 4 +- .../formio/src/services/FormioService.spec.ts | 6 +- .../formio/src/services/FormioService.ts | 14 +- .../third-parties/formio/test/app/Server.ts | 2 +- .../third-parties/formio/test/app/index.ts | 6 +- .../src/components/anyToComponent.ts | 4 +- .../src/components/arrayToComponent.ts | 4 +- .../src/components/booleanToComponent.ts | 2 +- .../src/components/dateToComponent.ts | 2 +- .../src/components/defaultToComponent.ts | 4 +- .../src/components/enumToComponent.ts | 2 +- .../src/components/mapToComponent.ts | 2 +- .../src/components/nestedToComponent.ts | 2 +- .../src/components/numberToComponent.ts | 2 +- .../src/components/objectToEditGrid.ts | 2 +- .../src/components/panelToComponent.ts | 2 +- .../src/components/propertiesToComponents.ts | 2 +- .../src/components/stringToComponent.ts | 2 +- .../src/decorators/conditional.spec.ts | 4 +- .../src/decorators/conditional.ts | 2 +- .../src/decorators/currency.spec.ts | 4 +- .../schema-formio/src/decorators/currency.ts | 2 +- .../src/decorators/customClass.spec.ts | 4 +- .../src/decorators/customClass.ts | 2 +- .../src/decorators/customConditional.spec.ts | 4 +- .../src/decorators/customConditional.ts | 2 +- .../src/decorators/dataSourceJson.spec.ts | 6 +- .../src/decorators/dataSourceJson.ts | 4 +- .../src/decorators/dataSourceUrl.spec.ts | 6 +- .../src/decorators/dataSourceUrl.ts | 4 +- .../src/decorators/errorLabel.spec.ts | 4 +- .../src/decorators/errorLabel.ts | 2 +- .../src/decorators/errorMessage.spec.ts | 4 +- .../src/decorators/errorMessage.ts | 2 +- .../schema-formio/src/decorators/form.ts | 4 +- .../src/decorators/hidden.spec.ts | 4 +- .../schema-formio/src/decorators/hidden.ts | 2 +- .../src/decorators/inputTags.spec.ts | 4 +- .../schema-formio/src/decorators/inputTags.ts | 2 +- .../src/decorators/label.spec.ts | 4 +- .../schema-formio/src/decorators/label.ts | 2 +- .../schema-formio/src/decorators/mask.spec.ts | 4 +- .../schema-formio/src/decorators/mask.ts | 2 +- .../src/decorators/maxWords.spec.ts | 4 +- .../schema-formio/src/decorators/maxWords.ts | 2 +- .../src/decorators/minWords.spec.ts | 4 +- .../schema-formio/src/decorators/minWords.ts | 2 +- .../src/decorators/modalEdit.spec.ts | 4 +- .../schema-formio/src/decorators/modalEdit.ts | 2 +- .../src/decorators/multiple.spec.ts | 4 +- .../schema-formio/src/decorators/multiple.ts | 2 +- .../src/decorators/openWhenEmpty.ts | 2 +- .../src/decorators/password.spec.ts | 4 +- .../schema-formio/src/decorators/password.ts | 2 +- .../src/decorators/placeholder.spec.ts | 4 +- .../src/decorators/placeholder.ts | 2 +- .../src/decorators/prefix.spec.ts | 4 +- .../schema-formio/src/decorators/prefix.ts | 2 +- .../src/decorators/select.spec.ts | 4 +- .../schema-formio/src/decorators/select.ts | 2 +- .../src/decorators/suffix.spec.ts | 4 +- .../schema-formio/src/decorators/suffix.ts | 2 +- .../src/decorators/tableView.spec.ts | 4 +- .../schema-formio/src/decorators/tableView.ts | 2 +- .../src/decorators/textCase.spec.ts | 4 +- .../schema-formio/src/decorators/textCase.ts | 2 +- .../src/decorators/textarea.spec.ts | 4 +- .../schema-formio/src/decorators/textarea.ts | 2 +- .../src/decorators/tooltip.spec.ts | 4 +- .../schema-formio/src/decorators/tooltip.ts | 2 +- .../schema-formio/src/decorators/validate.ts | 2 +- .../third-parties/schema-formio/src/index.ts | 98 ++--- .../src/utils/getFormioSchema.spec.ts | 4 +- .../src/utils/getFormioSchema.ts | 4 +- .../test/basic.integration.spec.ts | 2 +- .../test/datamap.integration.spec.ts | 2 +- .../test/date.integration.spec.ts | 2 +- .../test/deep-nested-form.integration.spec.ts | 2 +- .../test/editgrid.integration.spec.ts | 4 +- .../test/email.integration.spec.ts | 2 +- .../test/enums.integration.spec.ts | 2 +- .../test/nested-form.integration.spec.ts | 2 +- .../test/number.integration.spec.ts | 2 +- .../test/required.integration.spec.ts | 2 +- .../test/string.integration.spec.ts | 2 +- .../test/tabs.integration.spec.ts | 4 +- .../third-parties/socketio-testing/readme.md | 8 +- .../socketio-testing/src/index.ts | 2 +- packages/third-parties/socketio/readme.md | 8 +- .../socketio/src/SocketIOModule.spec.ts | 2 +- .../socketio/src/SocketIOModule.ts | 8 +- .../src/class/SocketHandlersBuilder.spec.ts | 8 +- .../src/class/SocketHandlersBuilder.ts | 16 +- .../src/class/SocketProviderMetadata.ts | 6 +- .../src/class/SocketSessionData.spec.ts | 2 +- .../socketio/src/decorators/args.spec.ts | 2 +- .../socketio/src/decorators/args.ts | 2 +- .../socketio/src/decorators/broadcast.spec.ts | 2 +- .../socketio/src/decorators/broadcast.ts | 4 +- .../src/decorators/broadcastOthers.spec.ts | 2 +- .../src/decorators/broadcastOthers.ts | 4 +- .../socketio/src/decorators/emit.spec.ts | 2 +- .../socketio/src/decorators/emit.ts | 4 +- .../socketio/src/decorators/input.spec.ts | 2 +- .../src/decorators/inputAndBroadcast.spec.ts | 2 +- .../src/decorators/inputAndBroadcast.ts | 4 +- .../inputAndBroadcastOthers.spec.ts | 2 +- .../src/decorators/inputAndBroadcastOthers.ts | 4 +- .../src/decorators/inputAndEmit.spec.ts | 2 +- .../socketio/src/decorators/inputAndEmit.ts | 4 +- .../socketio/src/decorators/io.ts | 2 +- .../socketio/src/decorators/nsp.spec.ts | 2 +- .../socketio/src/decorators/nsp.ts | 4 +- .../socketio/src/decorators/reason.spec.ts | 4 +- .../socketio/src/decorators/reason.ts | 4 +- .../socketio/src/decorators/socket.spec.ts | 2 +- .../socketio/src/decorators/socket.ts | 4 +- .../socketio/src/decorators/socketErr.spec.ts | 2 +- .../socketio/src/decorators/socketErr.ts | 4 +- .../src/decorators/socketEventName.spec.ts | 2 +- .../src/decorators/socketEventName.ts | 4 +- .../socketio/src/decorators/socketFilter.ts | 2 +- .../src/decorators/socketMiddleware.spec.ts | 2 +- .../src/decorators/socketMiddleware.ts | 6 +- .../decorators/socketMiddlewareError.spec.ts | 2 +- .../src/decorators/socketMiddlewareError.ts | 6 +- .../socketio/src/decorators/socketNsp.spec.ts | 2 +- .../socketio/src/decorators/socketNsp.ts | 6 +- .../socketio/src/decorators/socketReturns.ts | 2 +- .../src/decorators/socketService.spec.ts | 2 +- .../socketio/src/decorators/socketService.ts | 4 +- .../src/decorators/socketSession.spec.ts | 2 +- .../socketio/src/decorators/socketSession.ts | 4 +- .../src/decorators/socketUseAfter.spec.ts | 2 +- .../socketio/src/decorators/socketUseAfter.ts | 4 +- .../src/decorators/socketUseBefore.spec.ts | 2 +- .../src/decorators/socketUseBefore.ts | 4 +- packages/third-parties/socketio/src/index.ts | 76 ++-- .../src/interfaces/SocketHandlerMetadata.ts | 4 +- .../src/interfaces/SocketParamMetadata.ts | 2 +- .../src/services/SocketIOServer.spec.ts | 2 +- .../src/services/SocketIOService.spec.ts | 4 +- .../socketio/src/services/SocketIOService.ts | 11 +- .../third-parties/socketio/test/app/Server.ts | 2 +- .../third-parties/socketio/test/app/index.ts | 2 +- .../ConverterUserSocketMiddleware.ts | 2 +- .../app/middlewares/InitSessionMiddleware.ts | 2 +- .../socketio/test/app/services/RoomWS.ts | 8 +- .../socketio/test/socket.integration.spec.ts | 6 +- .../socketio/test/socketio.spec.ts | 2 +- packages/third-parties/stripe/readme.md | 6 +- .../stripe/src/decorators/webhookEvent.ts | 4 +- packages/third-parties/stripe/src/index.ts | 10 +- .../WebhookEventMiddleware.spec.ts | 4 +- .../src/middlewares/WebhookEventMiddleware.ts | 2 +- .../stripe/src/services/StripeFactory.ts | 2 +- .../third-parties/stripe/test/app/index.ts | 8 +- .../stripe/test/stripe.integration.spec.ts | 4 +- packages/third-parties/temporal/readme.md | 11 +- .../temporal/src/TemporalModule.ts | 6 +- .../temporal/src/decorators/activity.spec.ts | 4 +- .../temporal/src/decorators/activity.ts | 2 +- .../temporal/src/decorators/temporal.spec.ts | 2 +- .../temporal/src/decorators/temporal.ts | 2 +- packages/third-parties/temporal/src/index.ts | 16 +- .../temporal/src/utils/worker.ts | 2 +- .../temporal/test/client.integration.spec.ts | 4 +- .../temporal/test/worker.integration.spec.ts | 4 +- .../temporal/test/workflows/index.ts | 2 +- packages/third-parties/terminus/readme.md | 4 +- .../terminus/src/TerminusModule.spec.ts | 4 +- .../terminus/src/TerminusModule.ts | 29 +- packages/third-parties/terminus/src/index.ts | 8 +- .../terminus/src/interfaces/interfaces.ts | 2 +- .../third-parties/terminus/test/app/index.ts | 2 +- .../third-parties/vike/src/ViteModule.spec.ts | 8 +- packages/third-parties/vike/src/ViteModule.ts | 6 +- .../vike/src/decorators/vite.spec.ts | 2 +- packages/third-parties/vike/src/index.ts | 16 +- .../vike/src/interfaces/interfaces.ts | 2 +- .../ViteRendererMiddleware.spec.ts | 4 +- .../src/middlewares/ViteRendererMiddleware.ts | 2 +- .../vike/src/services/ViteServer.spec.ts | 2 +- .../vike/src/services/ViteServer.ts | 2 +- .../vike/src/services/ViteService.spec.ts | 2 +- .../vike/src/services/ViteService.ts | 4 +- packages/utils/normalize-path/src/index.ts | 2 +- .../normalize-path/src/normalizePath.spec.ts | 2 +- readme.md | 6 +- test/helper/buildPlatformParams.ts | 2 +- tools/integration/src/Server.ts | 6 +- tools/integration/src/config/index.ts | 4 +- tools/integration/src/config/logger/index.ts | 2 +- .../src/controllers/pages/index.ts | 2 +- .../integration/src/controllers/rest/index.ts | 2 +- tools/integration/src/index.ts | 2 +- 1577 files changed, 4648 insertions(+), 4591 deletions(-) diff --git a/packages/core/src/decorators/configurable.spec.ts b/packages/core/src/decorators/configurable.spec.ts index 5ee251a89b3..fa85f40277d 100644 --- a/packages/core/src/decorators/configurable.spec.ts +++ b/packages/core/src/decorators/configurable.spec.ts @@ -1,4 +1,4 @@ -import {Configurable, descriptorOf, NotConfigurable} from "../../src"; +import {Configurable, descriptorOf, NotConfigurable} from "../../src/index.js"; class Test { test: string; diff --git a/packages/core/src/decorators/configurable.ts b/packages/core/src/decorators/configurable.ts index 2e78fc5b71f..0f4f5413f12 100644 --- a/packages/core/src/decorators/configurable.ts +++ b/packages/core/src/decorators/configurable.ts @@ -1,4 +1,4 @@ -import {descriptorOf} from "../utils/objects/descriptorOf"; +import {descriptorOf} from "../utils/objects/descriptorOf.js"; export function Configurable(value: boolean = true): Function { return (target: any, propertyKey: string) => { diff --git a/packages/core/src/decorators/deprecated.spec.ts b/packages/core/src/decorators/deprecated.spec.ts index bc0a8914ffd..5c259febc25 100644 --- a/packages/core/src/decorators/deprecated.spec.ts +++ b/packages/core/src/decorators/deprecated.spec.ts @@ -1,4 +1,4 @@ -import {Deprecated} from "./deprecated"; +import {Deprecated} from "./deprecated.js"; describe("Deprecated", () => { beforeEach(() => { diff --git a/packages/core/src/decorators/deprecated.ts b/packages/core/src/decorators/deprecated.ts index 3e0cc9bfef3..975cdbd222a 100644 --- a/packages/core/src/decorators/deprecated.ts +++ b/packages/core/src/decorators/deprecated.ts @@ -1,4 +1,4 @@ -import {Type} from "../domain/Type"; +import {Type} from "../domain/Type.js"; function deprecate(fn: any, msg: string) { if (typeof process !== "undefined" && (process as any).noDeprecation === true) { diff --git a/packages/core/src/decorators/enumerable.spec.ts b/packages/core/src/decorators/enumerable.spec.ts index 3f57bec8a0d..07b5a6805c8 100644 --- a/packages/core/src/decorators/enumerable.spec.ts +++ b/packages/core/src/decorators/enumerable.spec.ts @@ -1,4 +1,4 @@ -import {Enumerable, getEnumerableKeys, NotEnumerable} from "../../src"; +import {Enumerable, getEnumerableKeys, NotEnumerable} from "../../src/index.js"; class Test1 { test: string = "test"; diff --git a/packages/core/src/decorators/enumerable.ts b/packages/core/src/decorators/enumerable.ts index 49df1bad15d..b67d4124fc6 100644 --- a/packages/core/src/decorators/enumerable.ts +++ b/packages/core/src/decorators/enumerable.ts @@ -1,4 +1,4 @@ -import {descriptorOf} from "../utils/objects/descriptorOf"; +import {descriptorOf} from "../utils/objects/descriptorOf.js"; export function Enumerable(value: boolean = true): Function { return (target: any, propertyKey: string) => { diff --git a/packages/core/src/decorators/notConfigurable.ts b/packages/core/src/decorators/notConfigurable.ts index adacd1a45d9..aaa53af1bbd 100644 --- a/packages/core/src/decorators/notConfigurable.ts +++ b/packages/core/src/decorators/notConfigurable.ts @@ -1,4 +1,4 @@ -import {Configurable} from "./configurable"; +import {Configurable} from "./configurable.js"; export function NotConfigurable(): Function { return Configurable(false); diff --git a/packages/core/src/decorators/notEnumerable.ts b/packages/core/src/decorators/notEnumerable.ts index 83a33f51470..24a1e6ec872 100644 --- a/packages/core/src/decorators/notEnumerable.ts +++ b/packages/core/src/decorators/notEnumerable.ts @@ -1,4 +1,4 @@ -import {Enumerable} from "./enumerable"; +import {Enumerable} from "./enumerable.js"; export function NotEnumerable(): Function { return Enumerable(false); diff --git a/packages/core/src/decorators/readOnly.ts b/packages/core/src/decorators/readOnly.ts index 4dbb2fab531..7c562c94a12 100644 --- a/packages/core/src/decorators/readOnly.ts +++ b/packages/core/src/decorators/readOnly.ts @@ -1,4 +1,4 @@ -import {Writable} from "./writable"; +import {Writable} from "./writable.js"; export function Readonly(): Function { return Writable(false); diff --git a/packages/core/src/decorators/storeFn.ts b/packages/core/src/decorators/storeFn.ts index 4beee8b77c5..4f14cec3b76 100644 --- a/packages/core/src/decorators/storeFn.ts +++ b/packages/core/src/decorators/storeFn.ts @@ -1,5 +1,5 @@ -import {Store} from "../domain/Store"; -import {DecoratorParameters} from "../interfaces/DecoratorParameters"; +import {Store} from "../domain/Store.js"; +import {DecoratorParameters} from "../interfaces/DecoratorParameters.js"; /** * Create a store correctly configured from the parameters given by the decorator. diff --git a/packages/core/src/decorators/storeMerge.ts b/packages/core/src/decorators/storeMerge.ts index be35b6268a1..8366dd36a47 100644 --- a/packages/core/src/decorators/storeMerge.ts +++ b/packages/core/src/decorators/storeMerge.ts @@ -1,5 +1,5 @@ -import {Store} from "../domain/Store"; -import {StoreFn} from "./storeFn"; +import {Store} from "../domain/Store.js"; +import {StoreFn} from "./storeFn.js"; export function StoreMerge(key: any, value: any): Function { return StoreFn((store: Store) => { diff --git a/packages/core/src/decorators/storeSet.ts b/packages/core/src/decorators/storeSet.ts index 4d6b511b823..9f548337065 100644 --- a/packages/core/src/decorators/storeSet.ts +++ b/packages/core/src/decorators/storeSet.ts @@ -1,5 +1,5 @@ -import {Store} from "../domain/Store"; -import {StoreFn} from "./storeFn"; +import {Store} from "../domain/Store.js"; +import {StoreFn} from "./storeFn.js"; export function StoreSet(key: any, value: any): Function { return StoreFn((store: Store) => { diff --git a/packages/core/src/decorators/writable.spec.ts b/packages/core/src/decorators/writable.spec.ts index 50a2431dc85..0b6c933a07e 100644 --- a/packages/core/src/decorators/writable.spec.ts +++ b/packages/core/src/decorators/writable.spec.ts @@ -1,4 +1,4 @@ -import {descriptorOf, Readonly, Writable} from "../../src"; +import {descriptorOf, Readonly, Writable} from "../../src/index.js"; class Test {} diff --git a/packages/core/src/decorators/writable.ts b/packages/core/src/decorators/writable.ts index d678d750243..beb9aaee220 100644 --- a/packages/core/src/decorators/writable.ts +++ b/packages/core/src/decorators/writable.ts @@ -1,4 +1,4 @@ -import {descriptorOf} from "../utils/objects/descriptorOf"; +import {descriptorOf} from "../utils/objects/descriptorOf.js"; export function Writable(value: boolean = true): Function { return (target: any, propertyKey: string) => { diff --git a/packages/core/src/domain/AnyToPromise.spec.ts b/packages/core/src/domain/AnyToPromise.spec.ts index e334fdf8615..92c09124615 100644 --- a/packages/core/src/domain/AnyToPromise.spec.ts +++ b/packages/core/src/domain/AnyToPromise.spec.ts @@ -1,9 +1,9 @@ import filedirname from "filedirname"; import {createReadStream} from "fs"; import {of} from "rxjs"; -import {catchAsyncError} from "../utils/catchError"; -import {isStream} from "../utils/objects/isStream"; -import {AnyToPromise, AnyToPromiseStatus} from "./AnyToPromise"; +import {catchAsyncError} from "../utils/catchError.js"; +import {isStream} from "../utils/objects/isStream.js"; +import {AnyToPromise, AnyToPromiseStatus} from "./AnyToPromise.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/core/src/domain/AnyToPromise.ts b/packages/core/src/domain/AnyToPromise.ts index 8b76ddbe79f..105818b9dfb 100644 --- a/packages/core/src/domain/AnyToPromise.ts +++ b/packages/core/src/domain/AnyToPromise.ts @@ -1,7 +1,7 @@ -import {isObject} from "../utils/objects/isObject"; -import {isObservable} from "../utils/objects/isObservable"; -import {isPromise} from "../utils/objects/isPromise"; -import {isStream} from "../utils/objects/isStream"; +import {isObject} from "../utils/objects/isObject.js"; +import {isObservable} from "../utils/objects/isObservable.js"; +import {isPromise} from "../utils/objects/isPromise.js"; +import {isStream} from "../utils/objects/isStream.js"; /** * @ignore diff --git a/packages/core/src/domain/Hooks.spec.ts b/packages/core/src/domain/Hooks.spec.ts index cc17b50843d..48e94cf6a41 100644 --- a/packages/core/src/domain/Hooks.spec.ts +++ b/packages/core/src/domain/Hooks.spec.ts @@ -1,4 +1,4 @@ -import {Hooks} from "./Hooks"; +import {Hooks} from "./Hooks.js"; describe("Hooks", () => { describe("emit", () => { diff --git a/packages/core/src/domain/Metadata.spec.ts b/packages/core/src/domain/Metadata.spec.ts index d1c71e13923..226df3c00e0 100644 --- a/packages/core/src/domain/Metadata.spec.ts +++ b/packages/core/src/domain/Metadata.spec.ts @@ -1,4 +1,4 @@ -import {Metadata} from "./Metadata"; +import {Metadata} from "./Metadata.js"; function logger(target: any, method?: any, descriptor?: any) { return descriptor; diff --git a/packages/core/src/domain/Metadata.ts b/packages/core/src/domain/Metadata.ts index 0ee7edf9aee..ccef19868a2 100644 --- a/packages/core/src/domain/Metadata.ts +++ b/packages/core/src/domain/Metadata.ts @@ -1,5 +1,5 @@ import "reflect-metadata"; -import {classOf} from "../utils/objects/classOf"; +import {classOf} from "../utils/objects/classOf.js"; /** * Metadata key diff --git a/packages/core/src/domain/Store.spec.ts b/packages/core/src/domain/Store.spec.ts index c39bf8af3a1..1bb47b81c1f 100644 --- a/packages/core/src/domain/Store.spec.ts +++ b/packages/core/src/domain/Store.spec.ts @@ -1,5 +1,5 @@ -import {Metadata} from "./Metadata"; -import {CLASS_STORE, METHOD_STORE, PARAM_STORE, PROPERTY_STORE, Store} from "./Store"; +import {Metadata} from "./Metadata.js"; +import {CLASS_STORE, METHOD_STORE, PARAM_STORE, PROPERTY_STORE, Store} from "./Store.js"; class FakeMetadata { attr1: any; diff --git a/packages/core/src/domain/Store.ts b/packages/core/src/domain/Store.ts index 87c75cf0eac..021c0f6131f 100644 --- a/packages/core/src/domain/Store.ts +++ b/packages/core/src/domain/Store.ts @@ -1,12 +1,12 @@ -import {DecoratorTypes} from "../domain/DecoratorTypes"; -import {decoratorTypeOf} from "../utils/decorators/decoratorTypeOf"; -import {deepClone} from "../utils/objects/deepClone"; -import {deepMerge} from "../utils/objects/deepMerge"; -import {descriptorOf} from "../utils/objects/descriptorOf"; -import {isSymbol} from "../utils/objects/isSymbol"; -import {nameOf} from "../utils/objects/nameOf"; -import {Metadata} from "./Metadata"; -import type {Type} from "./Type"; +import {DecoratorTypes} from "../domain/DecoratorTypes.js"; +import {decoratorTypeOf} from "../utils/decorators/decoratorTypeOf.js"; +import {deepClone} from "../utils/objects/deepClone.js"; +import {deepMerge} from "../utils/objects/deepMerge.js"; +import {descriptorOf} from "../utils/objects/descriptorOf.js"; +import {isSymbol} from "../utils/objects/isSymbol.js"; +import {nameOf} from "../utils/objects/nameOf.js"; +import {Metadata} from "./Metadata.js"; +import type {Type} from "./Type.js"; /** * @ignore diff --git a/packages/core/src/errors/UnsupportedDecoratorType.spec.ts b/packages/core/src/errors/UnsupportedDecoratorType.spec.ts index 889491bd1cd..29923be077b 100644 --- a/packages/core/src/errors/UnsupportedDecoratorType.spec.ts +++ b/packages/core/src/errors/UnsupportedDecoratorType.spec.ts @@ -1,4 +1,4 @@ -import {UnsupportedDecoratorType} from "./UnsupportedDecoratorType"; +import {UnsupportedDecoratorType} from "./UnsupportedDecoratorType.js"; class Test {} diff --git a/packages/core/src/errors/UnsupportedDecoratorType.ts b/packages/core/src/errors/UnsupportedDecoratorType.ts index 17694a75384..fe7239b3de8 100644 --- a/packages/core/src/errors/UnsupportedDecoratorType.ts +++ b/packages/core/src/errors/UnsupportedDecoratorType.ts @@ -1,6 +1,6 @@ -import {decoratorTypeOf} from "../utils/decorators/decoratorTypeOf"; -import {classOf} from "../utils/objects/classOf"; -import {nameOf} from "../utils/objects/nameOf"; +import {decoratorTypeOf} from "../utils/decorators/decoratorTypeOf.js"; +import {classOf} from "../utils/objects/classOf.js"; +import {nameOf} from "../utils/objects/nameOf.js"; export class UnsupportedDecoratorType extends Error { name: "UNSUPPORTED_DECORATOR_TYPE"; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 5ee82ff0dd9..5ece4bf1793 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -2,85 +2,85 @@ * @file Automatically generated by barrelsby. */ -export * from "./decorators/configurable"; -export * from "./decorators/deprecated"; -export * from "./decorators/enumerable"; -export * from "./decorators/notConfigurable"; -export * from "./decorators/notEnumerable"; -export * from "./decorators/readOnly"; -export * from "./decorators/storeFn"; -export * from "./decorators/storeMerge"; -export * from "./decorators/storeSet"; -export * from "./decorators/writable"; -export * from "./domain/AnyToPromise"; -export * from "./domain/DecoratorTypes"; -export * from "./domain/Env"; -export * from "./domain/Hooks"; -export * from "./domain/Metadata"; -export * from "./domain/Store"; -export * from "./domain/Type"; -export * from "./errors/UnsupportedDecoratorType"; -export * from "./interfaces/AnyDecorator"; -export * from "./interfaces/DecoratorParameters"; -export * from "./interfaces/MetadataTypes"; -export * from "./interfaces/ValueOf"; -export * from "./utils/catchError"; -export * from "./utils/getRandomId"; -export * from "./utils/proxyDelegation"; -export * from "./utils/uniq"; -export * from "./utils/decorators/decorateMethodsOf"; -export * from "./utils/decorators/decoratorArgs"; -export * from "./utils/decorators/decoratorTypeOf"; -export * from "./utils/decorators/inheritedDescriptorOf"; -export * from "./utils/decorators/useDecorators"; -export * from "./utils/decorators/useMethodDecorators"; -export * from "./utils/http/getHostInfoFromPort"; -export * from "./utils/imports/importPackage"; -export * from "./utils/objects/ancestorOf"; -export * from "./utils/objects/ancestorsOf"; -export * from "./utils/objects/classOf"; -export * from "./utils/objects/cleanObject"; -export * from "./utils/objects/constructorOf"; -export * from "./utils/objects/createInstance"; -export * from "./utils/objects/deepClone"; -export * from "./utils/objects/deepMerge"; -export * from "./utils/objects/descriptorOf"; -export * from "./utils/objects/getClassOrSymbol"; -export * from "./utils/objects/getConstructorArgNames"; -export * from "./utils/objects/getEnumerableKeys"; -export * from "./utils/objects/getValue"; -export * from "./utils/objects/hasJsonMethod"; -export * from "./utils/objects/isArray"; -export * from "./utils/objects/isArrowFn"; -export * from "./utils/objects/isBoolean"; -export * from "./utils/objects/isBuffer"; -export * from "./utils/objects/isClass"; -export * from "./utils/objects/isCollection"; -export * from "./utils/objects/isDate"; -export * from "./utils/objects/isEmpty"; -export * from "./utils/objects/isEnumerable"; -export * from "./utils/objects/isFunction"; -export * from "./utils/objects/isInheritedFrom"; -export * from "./utils/objects/isMomentObject"; -export * from "./utils/objects/isMongooseObject"; -export * from "./utils/objects/isNil"; -export * from "./utils/objects/isNumber"; -export * from "./utils/objects/isObject"; -export * from "./utils/objects/isObservable"; -export * from "./utils/objects/isPlainObject"; -export * from "./utils/objects/isPrimitive"; -export * from "./utils/objects/isPromise"; -export * from "./utils/objects/isProtectedKey"; -export * from "./utils/objects/isRegExp"; -export * from "./utils/objects/isSerializable"; -export * from "./utils/objects/isStream"; -export * from "./utils/objects/isString"; -export * from "./utils/objects/isSymbol"; -export * from "./utils/objects/methodsOf"; -export * from "./utils/objects/nameOf"; -export * from "./utils/objects/objectKeys"; -export * from "./utils/objects/primitiveOf"; -export * from "./utils/objects/prototypeOf"; -export * from "./utils/objects/setValue"; -export * from "./utils/objects/toMap"; -export * from "./utils/objects/toStringConstructor"; +export * from "./decorators/configurable.js"; +export * from "./decorators/deprecated.js"; +export * from "./decorators/enumerable.js"; +export * from "./decorators/notConfigurable.js"; +export * from "./decorators/notEnumerable.js"; +export * from "./decorators/readOnly.js"; +export * from "./decorators/storeFn.js"; +export * from "./decorators/storeMerge.js"; +export * from "./decorators/storeSet.js"; +export * from "./decorators/writable.js"; +export * from "./domain/AnyToPromise.js"; +export * from "./domain/DecoratorTypes.js"; +export * from "./domain/Env.js"; +export * from "./domain/Hooks.js"; +export * from "./domain/Metadata.js"; +export * from "./domain/Store.js"; +export * from "./domain/Type.js"; +export * from "./errors/UnsupportedDecoratorType.js"; +export * from "./interfaces/AnyDecorator.js"; +export * from "./interfaces/DecoratorParameters.js"; +export * from "./interfaces/MetadataTypes.js"; +export * from "./interfaces/ValueOf.js"; +export * from "./utils/catchError.js"; +export * from "./utils/getRandomId.js"; +export * from "./utils/proxyDelegation.js"; +export * from "./utils/uniq.js"; +export * from "./utils/decorators/decorateMethodsOf.js"; +export * from "./utils/decorators/decoratorArgs.js"; +export * from "./utils/decorators/decoratorTypeOf.js"; +export * from "./utils/decorators/inheritedDescriptorOf.js"; +export * from "./utils/decorators/useDecorators.js"; +export * from "./utils/decorators/useMethodDecorators.js"; +export * from "./utils/http/getHostInfoFromPort.js"; +export * from "./utils/imports/importPackage.js"; +export * from "./utils/objects/ancestorOf.js"; +export * from "./utils/objects/ancestorsOf.js"; +export * from "./utils/objects/classOf.js"; +export * from "./utils/objects/cleanObject.js"; +export * from "./utils/objects/constructorOf.js"; +export * from "./utils/objects/createInstance.js"; +export * from "./utils/objects/deepClone.js"; +export * from "./utils/objects/deepMerge.js"; +export * from "./utils/objects/descriptorOf.js"; +export * from "./utils/objects/getClassOrSymbol.js"; +export * from "./utils/objects/getConstructorArgNames.js"; +export * from "./utils/objects/getEnumerableKeys.js"; +export * from "./utils/objects/getValue.js"; +export * from "./utils/objects/hasJsonMethod.js"; +export * from "./utils/objects/isArray.js"; +export * from "./utils/objects/isArrowFn.js"; +export * from "./utils/objects/isBoolean.js"; +export * from "./utils/objects/isBuffer.js"; +export * from "./utils/objects/isClass.js"; +export * from "./utils/objects/isCollection.js"; +export * from "./utils/objects/isDate.js"; +export * from "./utils/objects/isEmpty.js"; +export * from "./utils/objects/isEnumerable.js"; +export * from "./utils/objects/isFunction.js"; +export * from "./utils/objects/isInheritedFrom.js"; +export * from "./utils/objects/isMomentObject.js"; +export * from "./utils/objects/isMongooseObject.js"; +export * from "./utils/objects/isNil.js"; +export * from "./utils/objects/isNumber.js"; +export * from "./utils/objects/isObject.js"; +export * from "./utils/objects/isObservable.js"; +export * from "./utils/objects/isPlainObject.js"; +export * from "./utils/objects/isPrimitive.js"; +export * from "./utils/objects/isPromise.js"; +export * from "./utils/objects/isProtectedKey.js"; +export * from "./utils/objects/isRegExp.js"; +export * from "./utils/objects/isSerializable.js"; +export * from "./utils/objects/isStream.js"; +export * from "./utils/objects/isString.js"; +export * from "./utils/objects/isSymbol.js"; +export * from "./utils/objects/methodsOf.js"; +export * from "./utils/objects/nameOf.js"; +export * from "./utils/objects/objectKeys.js"; +export * from "./utils/objects/primitiveOf.js"; +export * from "./utils/objects/prototypeOf.js"; +export * from "./utils/objects/setValue.js"; +export * from "./utils/objects/toMap.js"; +export * from "./utils/objects/toStringConstructor.js"; diff --git a/packages/core/src/interfaces/MetadataTypes.ts b/packages/core/src/interfaces/MetadataTypes.ts index 73b41346c21..fb2b5d6afdb 100644 --- a/packages/core/src/interfaces/MetadataTypes.ts +++ b/packages/core/src/interfaces/MetadataTypes.ts @@ -1,4 +1,4 @@ -import type {Type} from "../domain/Type"; +import type {Type} from "../domain/Type.js"; export interface MetadataTypes { type?: Type | T; diff --git a/packages/core/src/utils/catchError.spec.ts b/packages/core/src/utils/catchError.spec.ts index db9886c1af1..e5a1e027e69 100644 --- a/packages/core/src/utils/catchError.spec.ts +++ b/packages/core/src/utils/catchError.spec.ts @@ -1,4 +1,4 @@ -import {catchAsyncError, catchError} from "./catchError"; +import {catchAsyncError, catchError} from "./catchError.js"; describe("catchError", () => { it("should catch error", () => { diff --git a/packages/core/src/utils/decorators/decorateMethodsOf.spec.ts b/packages/core/src/utils/decorators/decorateMethodsOf.spec.ts index b10580dd0c8..5a3aa87185e 100644 --- a/packages/core/src/utils/decorators/decorateMethodsOf.spec.ts +++ b/packages/core/src/utils/decorators/decorateMethodsOf.spec.ts @@ -1,8 +1,8 @@ -import {StoreMerge} from "../../decorators/storeMerge"; -import {StoreSet} from "../../decorators/storeSet"; -import {Store} from "../../domain/Store"; -import {descriptorOf} from "../objects/descriptorOf"; -import {decorateMethodsOf} from "./decorateMethodsOf"; +import {StoreMerge} from "../../decorators/storeMerge.js"; +import {StoreSet} from "../../decorators/storeSet.js"; +import {Store} from "../../domain/Store.js"; +import {descriptorOf} from "../objects/descriptorOf.js"; +import {decorateMethodsOf} from "./decorateMethodsOf.js"; describe("decorateMethodsOf", () => { it("should decorate all methods", () => { diff --git a/packages/core/src/utils/decorators/decorateMethodsOf.ts b/packages/core/src/utils/decorators/decorateMethodsOf.ts index 01787b995c2..ec2fa6da258 100644 --- a/packages/core/src/utils/decorators/decorateMethodsOf.ts +++ b/packages/core/src/utils/decorators/decorateMethodsOf.ts @@ -1,8 +1,8 @@ -import {Store} from "../../domain/Store"; -import {classOf} from "../objects/classOf"; -import {descriptorOf} from "../objects/descriptorOf"; -import {methodsOf} from "../objects/methodsOf"; -import {prototypeOf} from "../objects/prototypeOf"; +import {Store} from "../../domain/Store.js"; +import {classOf} from "../objects/classOf.js"; +import {descriptorOf} from "../objects/descriptorOf.js"; +import {methodsOf} from "../objects/methodsOf.js"; +import {prototypeOf} from "../objects/prototypeOf.js"; export function decorateMethodsOf(klass: any, decorator: any) { methodsOf(klass).forEach(({target, propertyKey}) => { diff --git a/packages/core/src/utils/decorators/decoratorArgs.spec.ts b/packages/core/src/utils/decorators/decoratorArgs.spec.ts index 215029dcc4c..ed15c3dbb61 100644 --- a/packages/core/src/utils/decorators/decoratorArgs.spec.ts +++ b/packages/core/src/utils/decorators/decoratorArgs.spec.ts @@ -1,6 +1,6 @@ -import {descriptorOf} from "../objects/descriptorOf"; -import {prototypeOf} from "../objects/prototypeOf"; -import {decoratorArgs} from "./decoratorArgs"; +import {descriptorOf} from "../objects/descriptorOf.js"; +import {prototypeOf} from "../objects/prototypeOf.js"; +import {decoratorArgs} from "./decoratorArgs.js"; describe("decoratorArgs", () => { it("should return decorator arguments", () => { diff --git a/packages/core/src/utils/decorators/decoratorArgs.ts b/packages/core/src/utils/decorators/decoratorArgs.ts index df16f4b7aa8..566bac24605 100644 --- a/packages/core/src/utils/decorators/decoratorArgs.ts +++ b/packages/core/src/utils/decorators/decoratorArgs.ts @@ -1,5 +1,5 @@ -import {DecoratorParameters} from "../../interfaces/DecoratorParameters"; -import {descriptorOf} from "../objects/descriptorOf"; +import {DecoratorParameters} from "../../interfaces/DecoratorParameters.js"; +import {descriptorOf} from "../objects/descriptorOf.js"; export function decoratorArgs(target: any, propertyKey: string): DecoratorParameters { return [target, propertyKey, descriptorOf(target, propertyKey)!]; diff --git a/packages/core/src/utils/decorators/decoratorTypeOf.spec.ts b/packages/core/src/utils/decorators/decoratorTypeOf.spec.ts index 3a5f2ee90c3..63d523e9365 100644 --- a/packages/core/src/utils/decorators/decoratorTypeOf.spec.ts +++ b/packages/core/src/utils/decorators/decoratorTypeOf.spec.ts @@ -1,4 +1,4 @@ -import {decoratorTypeOf} from "./decoratorTypeOf"; +import {decoratorTypeOf} from "./decoratorTypeOf.js"; class Test {} diff --git a/packages/core/src/utils/decorators/decoratorTypeOf.ts b/packages/core/src/utils/decorators/decoratorTypeOf.ts index cb7b1aee9bb..2c6cb854d5d 100644 --- a/packages/core/src/utils/decorators/decoratorTypeOf.ts +++ b/packages/core/src/utils/decorators/decoratorTypeOf.ts @@ -1,5 +1,5 @@ -import {DecoratorTypes} from "../../domain/DecoratorTypes"; -import {classOf} from "../objects/classOf"; +import {DecoratorTypes} from "../../domain/DecoratorTypes.js"; +import {classOf} from "../objects/classOf.js"; export function decoratorTypeOf(args: any[]): DecoratorTypes { const [target, propertyKey, descriptor] = args; diff --git a/packages/core/src/utils/decorators/inheritedDescriptorOf.ts b/packages/core/src/utils/decorators/inheritedDescriptorOf.ts index 9380416ea47..1092a5d3b56 100644 --- a/packages/core/src/utils/decorators/inheritedDescriptorOf.ts +++ b/packages/core/src/utils/decorators/inheritedDescriptorOf.ts @@ -1,4 +1,4 @@ -import {ancestorsOf} from "../objects/ancestorsOf"; +import {ancestorsOf} from "../objects/ancestorsOf.js"; export function inheritedDescriptorOf(target: any, propertyKey: string): PropertyDescriptor | undefined { for (const klass of ancestorsOf(target)) { diff --git a/packages/core/src/utils/decorators/useDecorators.spec.ts b/packages/core/src/utils/decorators/useDecorators.spec.ts index 6c611cb658c..22dd9ac2d6a 100644 --- a/packages/core/src/utils/decorators/useDecorators.spec.ts +++ b/packages/core/src/utils/decorators/useDecorators.spec.ts @@ -1,7 +1,7 @@ -import {StoreFn} from "../../decorators/storeFn"; -import {useDecorators} from "./useDecorators"; -import {AnyDecorator} from "../../interfaces/AnyDecorator"; -import {Store} from "../../domain/Store"; +import {StoreFn} from "../../decorators/storeFn.js"; +import {useDecorators} from "./useDecorators.js"; +import {AnyDecorator} from "../../interfaces/AnyDecorator.js"; +import {Store} from "../../domain/Store.js"; describe("useDecorators", () => { function decorator1(value: any) { diff --git a/packages/core/src/utils/decorators/useDecorators.ts b/packages/core/src/utils/decorators/useDecorators.ts index 2f852b83def..8dec50bcab7 100644 --- a/packages/core/src/utils/decorators/useDecorators.ts +++ b/packages/core/src/utils/decorators/useDecorators.ts @@ -1,5 +1,5 @@ -import {DecoratorParameters} from "../../interfaces/DecoratorParameters"; -import {AnyDecorator} from "../../interfaces/AnyDecorator"; +import {DecoratorParameters} from "../../interfaces/DecoratorParameters.js"; +import {AnyDecorator} from "../../interfaces/AnyDecorator.js"; export function useDecorators(...decorators: AnyDecorator[]): any { return (...args: DecoratorParameters) => { diff --git a/packages/core/src/utils/decorators/useMethodDecorator.spec.ts b/packages/core/src/utils/decorators/useMethodDecorator.spec.ts index 392c61d4038..ee00dd0ceb9 100644 --- a/packages/core/src/utils/decorators/useMethodDecorator.spec.ts +++ b/packages/core/src/utils/decorators/useMethodDecorator.spec.ts @@ -1,7 +1,7 @@ -import {StoreFn} from "../../decorators/storeFn"; -import {Store} from "../../domain/Store"; -import {useDecorators} from "./useDecorators"; -import {useMethodDecorator, useMethodDecorators} from "./useMethodDecorators"; +import {StoreFn} from "../../decorators/storeFn.js"; +import {Store} from "../../domain/Store.js"; +import {useDecorators} from "./useDecorators.js"; +import {useMethodDecorator, useMethodDecorators} from "./useMethodDecorators.js"; describe("useMethodDecorators", () => { it("should apply all decorators", () => { diff --git a/packages/core/src/utils/decorators/useMethodDecorators.ts b/packages/core/src/utils/decorators/useMethodDecorators.ts index fdb4b1e62ae..5178b57df2f 100644 --- a/packages/core/src/utils/decorators/useMethodDecorators.ts +++ b/packages/core/src/utils/decorators/useMethodDecorators.ts @@ -1,5 +1,5 @@ -import {AnyDecorator} from "../../interfaces/AnyDecorator"; -import {descriptorOf} from "../objects/descriptorOf"; +import {AnyDecorator} from "../../interfaces/AnyDecorator.js"; +import {descriptorOf} from "../objects/descriptorOf.js"; export function useMethodDecorator(decorator: AnyDecorator) { return (target: any, propertyKey: string | symbol) => decorator(target, propertyKey, descriptorOf(target, propertyKey)); diff --git a/packages/core/src/utils/getRandomId.spec.ts b/packages/core/src/utils/getRandomId.spec.ts index c9b6bd1985d..a20cfc1367b 100644 --- a/packages/core/src/utils/getRandomId.spec.ts +++ b/packages/core/src/utils/getRandomId.spec.ts @@ -1,4 +1,4 @@ -import {getRandomId} from "./getRandomId"; +import {getRandomId} from "./getRandomId.js"; describe("getRandomId", () => { it("should return random id", () => { diff --git a/packages/core/src/utils/http/getHostInfoFromPort.spec.ts b/packages/core/src/utils/http/getHostInfoFromPort.spec.ts index 04a71833a37..63edb4cd4f9 100644 --- a/packages/core/src/utils/http/getHostInfoFromPort.spec.ts +++ b/packages/core/src/utils/http/getHostInfoFromPort.spec.ts @@ -1,4 +1,4 @@ -import {getHostInfoFromPort} from "./getHostInfoFromPort"; +import {getHostInfoFromPort} from "./getHostInfoFromPort.js"; describe("buildAddressAndPort()", () => { it("should return address and port from a concatened address and port", () => { diff --git a/packages/core/src/utils/imports/importPackage.spec.ts b/packages/core/src/utils/imports/importPackage.spec.ts index 8a269263ba7..a8bf6b612a6 100644 --- a/packages/core/src/utils/imports/importPackage.spec.ts +++ b/packages/core/src/utils/imports/importPackage.spec.ts @@ -1,5 +1,5 @@ -import {catchAsyncError} from "../catchError"; -import {importPackage} from "./importPackage"; +import {catchAsyncError} from "../catchError.js"; +import {importPackage} from "./importPackage.js"; describe("importPackage", () => { it("should load package util", async () => { diff --git a/packages/core/src/utils/objects/ObjectUtils.spec.ts b/packages/core/src/utils/objects/ObjectUtils.spec.ts index e796a75967e..c5728624eb7 100644 --- a/packages/core/src/utils/objects/ObjectUtils.spec.ts +++ b/packages/core/src/utils/objects/ObjectUtils.spec.ts @@ -16,7 +16,7 @@ import { nameOf, nameOfClass, primitiveOf -} from "../../index"; +} from "../../index.js"; class Base { test1() {} diff --git a/packages/core/src/utils/objects/ancestorsOf.ts b/packages/core/src/utils/objects/ancestorsOf.ts index 194ad717774..a8187d8c78a 100644 --- a/packages/core/src/utils/objects/ancestorsOf.ts +++ b/packages/core/src/utils/objects/ancestorsOf.ts @@ -1,6 +1,6 @@ -import {classOf} from "./classOf"; -import {getInheritedClass} from "./ancestorOf"; -import {nameOf} from "./nameOf"; +import {classOf} from "./classOf.js"; +import {getInheritedClass} from "./ancestorOf.js"; +import {nameOf} from "./nameOf.js"; /** * diff --git a/packages/core/src/utils/objects/cleanObject.spec.ts b/packages/core/src/utils/objects/cleanObject.spec.ts index e5859d7e9b2..e457468603f 100644 --- a/packages/core/src/utils/objects/cleanObject.spec.ts +++ b/packages/core/src/utils/objects/cleanObject.spec.ts @@ -1,4 +1,4 @@ -import {cleanObject} from "./cleanObject"; +import {cleanObject} from "./cleanObject.js"; describe("cleanObject", () => { it("should clean undefined value from object", () => { diff --git a/packages/core/src/utils/objects/cleanObject.ts b/packages/core/src/utils/objects/cleanObject.ts index 7b1efddf32d..9eed50f8a5f 100644 --- a/packages/core/src/utils/objects/cleanObject.ts +++ b/packages/core/src/utils/objects/cleanObject.ts @@ -1,4 +1,4 @@ -import {isProtectedKey} from "./isProtectedKey"; +import {isProtectedKey} from "./isProtectedKey.js"; /** * Remove undefined value * @param obj diff --git a/packages/core/src/utils/objects/constructorOf.ts b/packages/core/src/utils/objects/constructorOf.ts index 3e9dcda7646..1fc63214c76 100644 --- a/packages/core/src/utils/objects/constructorOf.ts +++ b/packages/core/src/utils/objects/constructorOf.ts @@ -1,4 +1,4 @@ -import type {Type} from "../../domain/Type"; +import type {Type} from "../../domain/Type.js"; /** * Get the class constructor diff --git a/packages/core/src/utils/objects/createInstance.ts b/packages/core/src/utils/objects/createInstance.ts index 0b8c4375a3b..6ccc3914696 100644 --- a/packages/core/src/utils/objects/createInstance.ts +++ b/packages/core/src/utils/objects/createInstance.ts @@ -1,4 +1,4 @@ -import {classOf} from "./classOf"; +import {classOf} from "./classOf.js"; export function createInstance(obj: any) { return obj ? (classOf(obj) !== Object ? Object.create(obj) : {}) : {}; diff --git a/packages/core/src/utils/objects/deepClone.spec.ts b/packages/core/src/utils/objects/deepClone.spec.ts index efa0d2fca07..3eb071c47d4 100644 --- a/packages/core/src/utils/objects/deepClone.spec.ts +++ b/packages/core/src/utils/objects/deepClone.spec.ts @@ -1,4 +1,4 @@ -import {deepClone} from "./deepClone"; +import {deepClone} from "./deepClone.js"; describe("deepClone", () => { class Base { diff --git a/packages/core/src/utils/objects/deepClone.ts b/packages/core/src/utils/objects/deepClone.ts index 805b6149d2a..0d0bba5007a 100644 --- a/packages/core/src/utils/objects/deepClone.ts +++ b/packages/core/src/utils/objects/deepClone.ts @@ -1,10 +1,10 @@ -import {isDate} from "./isDate"; -import {isFunction} from "./isFunction"; -import {isNil} from "./isNil"; -import {isPrimitive} from "./isPrimitive"; -import {isSymbol} from "./isSymbol"; -import {isRegExp} from "./isRegExp"; -import {classOf} from "./classOf"; +import {isDate} from "./isDate.js"; +import {isFunction} from "./isFunction.js"; +import {isNil} from "./isNil.js"; +import {isPrimitive} from "./isPrimitive.js"; +import {isSymbol} from "./isSymbol.js"; +import {isRegExp} from "./isRegExp.js"; +import {classOf} from "./classOf.js"; const isBasicType = (source: any) => isNil(source) || isPrimitive(source) || isSymbol(source) || isFunction(source); diff --git a/packages/core/src/utils/objects/deepMerge.spec.ts b/packages/core/src/utils/objects/deepMerge.spec.ts index 7973589ae2a..d98dd4d97e9 100644 --- a/packages/core/src/utils/objects/deepMerge.spec.ts +++ b/packages/core/src/utils/objects/deepMerge.spec.ts @@ -1,4 +1,4 @@ -import {deepMerge} from "./deepMerge"; +import {deepMerge} from "./deepMerge.js"; describe("deepMerge", () => { describe("without reducers", () => { diff --git a/packages/core/src/utils/objects/deepMerge.ts b/packages/core/src/utils/objects/deepMerge.ts index 31bd1d91f89..9b270950535 100644 --- a/packages/core/src/utils/objects/deepMerge.ts +++ b/packages/core/src/utils/objects/deepMerge.ts @@ -1,8 +1,8 @@ -import {createInstance} from "./createInstance"; -import {isFunction} from "./isFunction"; -import {isPrimitive} from "./isPrimitive"; -import {isSymbol} from "./isSymbol"; -import {objectKeys} from "./objectKeys"; +import {createInstance} from "./createInstance.js"; +import {isFunction} from "./isFunction.js"; +import {isPrimitive} from "./isPrimitive.js"; +import {isSymbol} from "./isSymbol.js"; +import {objectKeys} from "./objectKeys.js"; export type DeepMergeReducerCB = (collection: any[], value: any, options?: DeepMergeOptions) => any; export type DeepMergeComparatorCB = (item: any, ref: any) => boolean; diff --git a/packages/core/src/utils/objects/descriptorOf.spec.ts b/packages/core/src/utils/objects/descriptorOf.spec.ts index 5a332e1aa57..09a97dc2e13 100644 --- a/packages/core/src/utils/objects/descriptorOf.spec.ts +++ b/packages/core/src/utils/objects/descriptorOf.spec.ts @@ -1,4 +1,4 @@ -import {isMethodDescriptor} from "./descriptorOf"; +import {isMethodDescriptor} from "./descriptorOf.js"; describe("isMethodDescriptor()", () => { it("should return true", () => { diff --git a/packages/core/src/utils/objects/getClassOrSymbol.ts b/packages/core/src/utils/objects/getClassOrSymbol.ts index e69455f6608..643e377eab5 100644 --- a/packages/core/src/utils/objects/getClassOrSymbol.ts +++ b/packages/core/src/utils/objects/getClassOrSymbol.ts @@ -1,5 +1,5 @@ -import {classOf} from "./classOf"; -import {isClass} from "./isClass"; +import {classOf} from "./classOf.js"; +import {isClass} from "./isClass.js"; export function getClassOrSymbol(target: any): any { return isClass(target) ? classOf(target) : target; diff --git a/packages/core/src/utils/objects/getConstructorArgNames.spec.ts b/packages/core/src/utils/objects/getConstructorArgNames.spec.ts index 5c2020891d2..ae71def91a3 100644 --- a/packages/core/src/utils/objects/getConstructorArgNames.spec.ts +++ b/packages/core/src/utils/objects/getConstructorArgNames.spec.ts @@ -1,4 +1,4 @@ -import {getConstructorArgNames} from "./getConstructorArgNames"; +import {getConstructorArgNames} from "./getConstructorArgNames.js"; describe("getConstructorArgNames", () => { it("should return the constructor args names", () => { diff --git a/packages/core/src/utils/objects/getConstructorArgNames.ts b/packages/core/src/utils/objects/getConstructorArgNames.ts index 1f4492b50de..5d51d64fda0 100644 --- a/packages/core/src/utils/objects/getConstructorArgNames.ts +++ b/packages/core/src/utils/objects/getConstructorArgNames.ts @@ -1,4 +1,4 @@ -import {toStringConstructor} from "./toStringConstructor"; +import {toStringConstructor} from "./toStringConstructor.js"; export function getConstructorArgNames(target: any) { return toStringConstructor(target) diff --git a/packages/core/src/utils/objects/getEnumerableKeys.spec.ts b/packages/core/src/utils/objects/getEnumerableKeys.spec.ts index 589f76af20a..b25f7eac5cf 100644 --- a/packages/core/src/utils/objects/getEnumerableKeys.spec.ts +++ b/packages/core/src/utils/objects/getEnumerableKeys.spec.ts @@ -1,5 +1,5 @@ -import {Enumerable} from "../../decorators/enumerable"; -import {getEnumerableKeys} from "./getEnumerableKeys"; +import {Enumerable} from "../../decorators/enumerable.js"; +import {getEnumerableKeys} from "./getEnumerableKeys.js"; describe("getEnumerableKeys", () => { it("should return enumerable keys", () => { diff --git a/packages/core/src/utils/objects/getEnumerableKeys.ts b/packages/core/src/utils/objects/getEnumerableKeys.ts index e0af775b627..87d81d382d6 100644 --- a/packages/core/src/utils/objects/getEnumerableKeys.ts +++ b/packages/core/src/utils/objects/getEnumerableKeys.ts @@ -1,5 +1,5 @@ -import {isEnumerable} from "./isEnumerable"; -import {isProtectedKey} from "./isProtectedKey"; +import {isEnumerable} from "./isEnumerable.js"; +import {isProtectedKey} from "./isProtectedKey.js"; /** * Return all enumerable keys of the given object diff --git a/packages/core/src/utils/objects/getValue.spec.ts b/packages/core/src/utils/objects/getValue.spec.ts index 1c88ef79e87..4854aea4a12 100644 --- a/packages/core/src/utils/objects/getValue.spec.ts +++ b/packages/core/src/utils/objects/getValue.spec.ts @@ -1,4 +1,4 @@ -import {getValue} from "./getValue"; +import {getValue} from "./getValue.js"; describe("getValue()", () => { it("should return given value when expression is undefined", () => { diff --git a/packages/core/src/utils/objects/getValue.ts b/packages/core/src/utils/objects/getValue.ts index 566e11d5386..8ec2514180e 100644 --- a/packages/core/src/utils/objects/getValue.ts +++ b/packages/core/src/utils/objects/getValue.ts @@ -1,6 +1,6 @@ -import {isFunction} from "./isFunction"; -import {isObject} from "./isObject"; -import {isString} from "./isString"; +import {isFunction} from "./isFunction.js"; +import {isObject} from "./isObject.js"; +import {isString} from "./isString.js"; const mapOptions = (args: any[]) => { const [expression, scope, defaultValue, separator = "."] = args; diff --git a/packages/core/src/utils/objects/hasJsonMethod.spec.ts b/packages/core/src/utils/objects/hasJsonMethod.spec.ts index 288cd573a90..1c516e6971a 100644 --- a/packages/core/src/utils/objects/hasJsonMethod.spec.ts +++ b/packages/core/src/utils/objects/hasJsonMethod.spec.ts @@ -1,4 +1,4 @@ -import {hasJsonMethod} from "./hasJsonMethod"; +import {hasJsonMethod} from "./hasJsonMethod.js"; describe("hasJsonMethod", () => { it("should return true if object has toJSON method", () => { diff --git a/packages/core/src/utils/objects/isArrowFn.ts b/packages/core/src/utils/objects/isArrowFn.ts index 6c67f022df9..f5262110b95 100644 --- a/packages/core/src/utils/objects/isArrowFn.ts +++ b/packages/core/src/utils/objects/isArrowFn.ts @@ -1,4 +1,4 @@ -import {isFunction} from "./isFunction"; +import {isFunction} from "./isFunction.js"; export function isArrowFn(target: any): target is Function { return target && isFunction(target) && !target.prototype; diff --git a/packages/core/src/utils/objects/isBuffer.spec.ts b/packages/core/src/utils/objects/isBuffer.spec.ts index 1a87349602d..889469af19c 100644 --- a/packages/core/src/utils/objects/isBuffer.spec.ts +++ b/packages/core/src/utils/objects/isBuffer.spec.ts @@ -1,4 +1,4 @@ -import {isBuffer, isUint8Array} from "./isBuffer"; +import {isBuffer, isUint8Array} from "./isBuffer.js"; describe("isBuffer", () => { it("should return true", () => { diff --git a/packages/core/src/utils/objects/isBuffer.ts b/packages/core/src/utils/objects/isBuffer.ts index 9b26f58c324..7e1c9f8b1c2 100644 --- a/packages/core/src/utils/objects/isBuffer.ts +++ b/packages/core/src/utils/objects/isBuffer.ts @@ -1,4 +1,4 @@ -import {nameOf} from "./nameOf"; +import {nameOf} from "./nameOf.js"; /** * Tests to see if the object is Buffer diff --git a/packages/core/src/utils/objects/isClass.spec.ts b/packages/core/src/utils/objects/isClass.spec.ts index 7b18d9ac107..f39ea932981 100644 --- a/packages/core/src/utils/objects/isClass.spec.ts +++ b/packages/core/src/utils/objects/isClass.spec.ts @@ -1,4 +1,4 @@ -import {isClass} from "./isClass"; +import {isClass} from "./isClass.js"; describe("isClass", () => { it("should test if a value is a class", () => { diff --git a/packages/core/src/utils/objects/isClass.ts b/packages/core/src/utils/objects/isClass.ts index a0a4908aedc..65163d2fe67 100644 --- a/packages/core/src/utils/objects/isClass.ts +++ b/packages/core/src/utils/objects/isClass.ts @@ -1,11 +1,11 @@ -import {isArrayOrArrayClass} from "./isArray"; -import {isArrowFn} from "./isArrowFn"; -import {isBuffer} from "./isBuffer"; -import {isDate} from "./isDate"; -import {isClassObject} from "./isPlainObject"; -import {isPrimitiveOrPrimitiveClass} from "./isPrimitive"; -import {isPromise} from "./isPromise"; -import {isSymbol} from "./isSymbol"; +import {isArrayOrArrayClass} from "./isArray.js"; +import {isArrowFn} from "./isArrowFn.js"; +import {isBuffer} from "./isBuffer.js"; +import {isDate} from "./isDate.js"; +import {isClassObject} from "./isPlainObject.js"; +import {isPrimitiveOrPrimitiveClass} from "./isPrimitive.js"; +import {isPromise} from "./isPromise.js"; +import {isSymbol} from "./isSymbol.js"; export function isClass(target: any) { if (!target) { diff --git a/packages/core/src/utils/objects/isCollection.ts b/packages/core/src/utils/objects/isCollection.ts index 5ec89f19174..67922f32ff0 100644 --- a/packages/core/src/utils/objects/isCollection.ts +++ b/packages/core/src/utils/objects/isCollection.ts @@ -1,4 +1,4 @@ -import {isArrayOrArrayClass} from "./isArray"; +import {isArrayOrArrayClass} from "./isArray.js"; /** * Return true if the target. diff --git a/packages/core/src/utils/objects/isEmpty.spec.ts b/packages/core/src/utils/objects/isEmpty.spec.ts index 1f75b9721c9..78154d78c63 100644 --- a/packages/core/src/utils/objects/isEmpty.spec.ts +++ b/packages/core/src/utils/objects/isEmpty.spec.ts @@ -1,4 +1,4 @@ -import {isEmpty} from "./isEmpty"; +import {isEmpty} from "./isEmpty.js"; describe("isEmpty", () => { it("should return true", () => { diff --git a/packages/core/src/utils/objects/isEmpty.ts b/packages/core/src/utils/objects/isEmpty.ts index b0271f272aa..a4241985ca0 100644 --- a/packages/core/src/utils/objects/isEmpty.ts +++ b/packages/core/src/utils/objects/isEmpty.ts @@ -1,4 +1,4 @@ -import {isNil} from "./isNil"; +import {isNil} from "./isNil.js"; /** * Return true if the value is an empty string, null or undefined. diff --git a/packages/core/src/utils/objects/isEnumerable.ts b/packages/core/src/utils/objects/isEnumerable.ts index 72b5849b182..9d6ecce54ab 100644 --- a/packages/core/src/utils/objects/isEnumerable.ts +++ b/packages/core/src/utils/objects/isEnumerable.ts @@ -1,5 +1,5 @@ -import {inheritedDescriptorOf} from "../decorators/inheritedDescriptorOf"; -import {classOf} from "./classOf"; +import {inheritedDescriptorOf} from "../decorators/inheritedDescriptorOf.js"; +import {classOf} from "./classOf.js"; /** * diff --git a/packages/core/src/utils/objects/isInheritedFrom.ts b/packages/core/src/utils/objects/isInheritedFrom.ts index 5519dfd27d0..a9afad8d8c5 100644 --- a/packages/core/src/utils/objects/isInheritedFrom.ts +++ b/packages/core/src/utils/objects/isInheritedFrom.ts @@ -1,6 +1,6 @@ -import {classOf} from "./classOf"; -import {ancestorOf} from "./ancestorOf"; -import {nameOf} from "./nameOf"; +import {classOf} from "./classOf.js"; +import {ancestorOf} from "./ancestorOf.js"; +import {nameOf} from "./nameOf.js"; export function isInheritedFrom(target: any, from: any, deep = 5): boolean { if (!target || !from) { diff --git a/packages/core/src/utils/objects/isMomentObject.spec.ts b/packages/core/src/utils/objects/isMomentObject.spec.ts index f8517e9e5ec..d6ccec59f92 100644 --- a/packages/core/src/utils/objects/isMomentObject.spec.ts +++ b/packages/core/src/utils/objects/isMomentObject.spec.ts @@ -1,4 +1,4 @@ -import {isMomentObject} from "./isMomentObject"; +import {isMomentObject} from "./isMomentObject.js"; describe("isMomentObject", () => { it("should return true if object is moment object", () => { diff --git a/packages/core/src/utils/objects/isMongooseObject.spec.ts b/packages/core/src/utils/objects/isMongooseObject.spec.ts index 46a842c7959..434b52cd12a 100644 --- a/packages/core/src/utils/objects/isMongooseObject.spec.ts +++ b/packages/core/src/utils/objects/isMongooseObject.spec.ts @@ -1,4 +1,4 @@ -import {isMongooseObject} from "./isMongooseObject"; +import {isMongooseObject} from "./isMongooseObject.js"; describe("isMongooseObject", () => { it("should return true if object is mongoose object", () => { diff --git a/packages/core/src/utils/objects/isMongooseObject.ts b/packages/core/src/utils/objects/isMongooseObject.ts index 2c7293c790f..47879ef93f4 100644 --- a/packages/core/src/utils/objects/isMongooseObject.ts +++ b/packages/core/src/utils/objects/isMongooseObject.ts @@ -1,4 +1,4 @@ -import {hasJsonMethod} from "./hasJsonMethod"; +import {hasJsonMethod} from "./hasJsonMethod.js"; export function isObjectID(obj: any) { return obj && obj._bsontype; diff --git a/packages/core/src/utils/objects/isNil.spec.ts b/packages/core/src/utils/objects/isNil.spec.ts index cd8461ea281..357949f03f0 100644 --- a/packages/core/src/utils/objects/isNil.spec.ts +++ b/packages/core/src/utils/objects/isNil.spec.ts @@ -1,4 +1,4 @@ -import {isNil} from "./isNil"; +import {isNil} from "./isNil.js"; describe("isNil", () => { it("should return true", () => { diff --git a/packages/core/src/utils/objects/isPlainObject.spec.ts b/packages/core/src/utils/objects/isPlainObject.spec.ts index 702282b3c20..3b5ae91b260 100644 --- a/packages/core/src/utils/objects/isPlainObject.spec.ts +++ b/packages/core/src/utils/objects/isPlainObject.spec.ts @@ -1,4 +1,4 @@ -import {isPlainObject} from "./isPlainObject"; +import {isPlainObject} from "./isPlainObject.js"; describe("isPlainObject", () => { it("should test if the value is a plain object", () => { diff --git a/packages/core/src/utils/objects/isPlainObject.ts b/packages/core/src/utils/objects/isPlainObject.ts index 058c1b48d5f..4a7cfd89306 100644 --- a/packages/core/src/utils/objects/isPlainObject.ts +++ b/packages/core/src/utils/objects/isPlainObject.ts @@ -1,4 +1,4 @@ -import {classOf} from "./classOf"; +import {classOf} from "./classOf.js"; /** * diff --git a/packages/core/src/utils/objects/isPrimitive.spec.ts b/packages/core/src/utils/objects/isPrimitive.spec.ts index 27f07e383e4..b5dc4229232 100644 --- a/packages/core/src/utils/objects/isPrimitive.spec.ts +++ b/packages/core/src/utils/objects/isPrimitive.spec.ts @@ -1,4 +1,4 @@ -import {isPrimitive, isPrimitiveClass} from "./isPrimitive"; +import {isPrimitive, isPrimitiveClass} from "./isPrimitive.js"; describe("isPrimitive", () => { it("should test if an variable content is a primitive", () => { diff --git a/packages/core/src/utils/objects/isPrimitive.ts b/packages/core/src/utils/objects/isPrimitive.ts index 132f3728787..98c6d73f86f 100644 --- a/packages/core/src/utils/objects/isPrimitive.ts +++ b/packages/core/src/utils/objects/isPrimitive.ts @@ -1,6 +1,6 @@ -import {isBoolean, isBooleanOrBooleanClass} from "./isBoolean"; -import {isNumber, isNumberOrNumberClass} from "./isNumber"; -import {isString, isStringOrStringClass} from "./isString"; +import {isBoolean, isBooleanOrBooleanClass} from "./isBoolean.js"; +import {isNumber, isNumberOrNumberClass} from "./isNumber.js"; +import {isString, isStringOrStringClass} from "./isString.js"; /** * Return true if the given obj is a primitive. diff --git a/packages/core/src/utils/objects/isProtectedKey.spec.ts b/packages/core/src/utils/objects/isProtectedKey.spec.ts index bc101e7a785..83654369ea0 100644 --- a/packages/core/src/utils/objects/isProtectedKey.spec.ts +++ b/packages/core/src/utils/objects/isProtectedKey.spec.ts @@ -1,4 +1,4 @@ -import {isProtectedKey} from "./isProtectedKey"; +import {isProtectedKey} from "./isProtectedKey.js"; describe("isProtectedKey", () => { it("should return true", () => { diff --git a/packages/core/src/utils/objects/isSerializable.spec.ts b/packages/core/src/utils/objects/isSerializable.spec.ts index a796a547bde..ebdab5ec76a 100644 --- a/packages/core/src/utils/objects/isSerializable.spec.ts +++ b/packages/core/src/utils/objects/isSerializable.spec.ts @@ -1,4 +1,4 @@ -import {isSerializable} from "./isSerializable"; +import {isSerializable} from "./isSerializable.js"; describe("isSerializable()", () => { it("should return the expected value", () => { diff --git a/packages/core/src/utils/objects/isSerializable.ts b/packages/core/src/utils/objects/isSerializable.ts index ed3f5253e06..75217c84494 100644 --- a/packages/core/src/utils/objects/isSerializable.ts +++ b/packages/core/src/utils/objects/isSerializable.ts @@ -1,8 +1,8 @@ -import {isStream} from "./isStream"; -import {isBoolean} from "./isBoolean"; -import {isNumber} from "./isNumber"; -import {isString} from "./isString"; -import {isNil} from "./isNil"; +import {isStream} from "./isStream.js"; +import {isBoolean} from "./isBoolean.js"; +import {isNumber} from "./isNumber.js"; +import {isString} from "./isString.js"; +import {isNil} from "./isNil.js"; export function isSerializable(data: any) { return !(Buffer.isBuffer(data) || isStream(data) || isBoolean(data) || isNumber(data) || isString(data) || isNil(data)); diff --git a/packages/core/src/utils/objects/isSymbol.spec.ts b/packages/core/src/utils/objects/isSymbol.spec.ts index a4283f22224..33c8b4e207a 100644 --- a/packages/core/src/utils/objects/isSymbol.spec.ts +++ b/packages/core/src/utils/objects/isSymbol.spec.ts @@ -1,4 +1,4 @@ -import {isSymbol, isSymbolOrSymbolClass} from "./isSymbol"; +import {isSymbol, isSymbolOrSymbolClass} from "./isSymbol.js"; describe("isSymbol()", () => { it("should validate value", () => { diff --git a/packages/core/src/utils/objects/methodsOf.ts b/packages/core/src/utils/objects/methodsOf.ts index 96bd9ffccfc..351bf5a35c7 100644 --- a/packages/core/src/utils/objects/methodsOf.ts +++ b/packages/core/src/utils/objects/methodsOf.ts @@ -1,7 +1,7 @@ -import {classOf} from "./classOf"; -import {ancestorsOf} from "./ancestorsOf"; -import {prototypeOf} from "./prototypeOf"; -import {Type} from "../../domain/Type"; +import {classOf} from "./classOf.js"; +import {ancestorsOf} from "./ancestorsOf.js"; +import {prototypeOf} from "./prototypeOf.js"; +import {Type} from "../../domain/Type.js"; /** * Return all methods for a given class. diff --git a/packages/core/src/utils/objects/objectKeys.spec.ts b/packages/core/src/utils/objects/objectKeys.spec.ts index 67bf7c33215..e57064a7dcb 100644 --- a/packages/core/src/utils/objects/objectKeys.spec.ts +++ b/packages/core/src/utils/objects/objectKeys.spec.ts @@ -1,4 +1,4 @@ -import {objectKeys} from "./objectKeys"; +import {objectKeys} from "./objectKeys.js"; describe("objectKeys", () => { it("should return only authorized keys", () => { diff --git a/packages/core/src/utils/objects/objectKeys.ts b/packages/core/src/utils/objects/objectKeys.ts index a0472548d3c..70979315dca 100644 --- a/packages/core/src/utils/objects/objectKeys.ts +++ b/packages/core/src/utils/objects/objectKeys.ts @@ -1,4 +1,4 @@ -import {isProtectedKey} from "./isProtectedKey"; +import {isProtectedKey} from "./isProtectedKey.js"; export function objectKeys(obj: any): string[] { return Object.keys(obj).filter((key) => !isProtectedKey(key)); diff --git a/packages/core/src/utils/objects/primitiveOf.ts b/packages/core/src/utils/objects/primitiveOf.ts index e2f9ca5dcce..bffd211eb02 100644 --- a/packages/core/src/utils/objects/primitiveOf.ts +++ b/packages/core/src/utils/objects/primitiveOf.ts @@ -1,6 +1,6 @@ -import {isBoolean, isBooleanOrBooleanClass} from "./isBoolean"; -import {isNumber, isNumberOrNumberClass} from "./isNumber"; -import {isString, isStringOrStringClass} from "./isString"; +import {isBooleanOrBooleanClass} from "./isBoolean.js"; +import {isNumberOrNumberClass} from "./isNumber.js"; +import {isStringOrStringClass} from "./isString.js"; export function primitiveOf(target: any): "string" | "number" | "boolean" | "any" { if (isStringOrStringClass(target)) { diff --git a/packages/core/src/utils/objects/prototypeOf.ts b/packages/core/src/utils/objects/prototypeOf.ts index 4aec19d222a..5b75ed2f329 100644 --- a/packages/core/src/utils/objects/prototypeOf.ts +++ b/packages/core/src/utils/objects/prototypeOf.ts @@ -1,4 +1,4 @@ -import {classOf} from "./classOf"; +import {classOf} from "./classOf.js"; /** * Return the prototype of the given class. diff --git a/packages/core/src/utils/objects/setValue.spec.ts b/packages/core/src/utils/objects/setValue.spec.ts index 1cc8a407de7..1063fec3443 100644 --- a/packages/core/src/utils/objects/setValue.spec.ts +++ b/packages/core/src/utils/objects/setValue.spec.ts @@ -1,4 +1,4 @@ -import {setValue} from "./setValue"; +import {setValue} from "./setValue.js"; describe("setValue()", () => { describe("when map", () => { diff --git a/packages/core/src/utils/objects/setValue.ts b/packages/core/src/utils/objects/setValue.ts index c0fc4063cc7..2413c00c401 100644 --- a/packages/core/src/utils/objects/setValue.ts +++ b/packages/core/src/utils/objects/setValue.ts @@ -1,4 +1,4 @@ -import {isProtectedKey} from "./isProtectedKey"; +import {isProtectedKey} from "./isProtectedKey.js"; export function setValue(scope: any, expression: string, value: any, separator = ".") { const keys: string[] = expression.split(separator); diff --git a/packages/core/src/utils/objects/toMap.spec.ts b/packages/core/src/utils/objects/toMap.spec.ts index b490b1dce6f..31a94380ebd 100644 --- a/packages/core/src/utils/objects/toMap.spec.ts +++ b/packages/core/src/utils/objects/toMap.spec.ts @@ -1,4 +1,4 @@ -import {toMap} from "./toMap"; +import {toMap} from "./toMap.js"; describe("toMap", () => { describe("from Object", () => { diff --git a/packages/core/src/utils/objects/toMap.ts b/packages/core/src/utils/objects/toMap.ts index fc9447dbde6..a114b1578ca 100644 --- a/packages/core/src/utils/objects/toMap.ts +++ b/packages/core/src/utils/objects/toMap.ts @@ -1,5 +1,5 @@ -import {isArray} from "./isArray"; -import {isString} from "./isString"; +import {isArray} from "./isArray.js"; +import {isString} from "./isString.js"; export type ToMapIdentityCB = (item: V, index: string | number) => string | string[]; export type ToMapIdentity = string | ToMapIdentityCB; diff --git a/packages/core/src/utils/objects/toStringConstructor.ts b/packages/core/src/utils/objects/toStringConstructor.ts index a86a310ee7d..5e25c4079df 100644 --- a/packages/core/src/utils/objects/toStringConstructor.ts +++ b/packages/core/src/utils/objects/toStringConstructor.ts @@ -1,4 +1,4 @@ -import {constructorOf} from "./constructorOf"; +import {constructorOf} from "./constructorOf.js"; export function toStringConstructor(target: any): string { const ctr = constructorOf(target); diff --git a/packages/core/src/utils/objects/toStringConstrutor.spec.ts b/packages/core/src/utils/objects/toStringConstrutor.spec.ts index 3391a3f965d..13fcb12496d 100644 --- a/packages/core/src/utils/objects/toStringConstrutor.spec.ts +++ b/packages/core/src/utils/objects/toStringConstrutor.spec.ts @@ -1,4 +1,4 @@ -import {toStringConstructor} from "./toStringConstructor"; +import {toStringConstructor} from "./toStringConstructor.js"; describe("toStringConstructor", () => { it("should return the constructor signature (empty)", () => { diff --git a/packages/core/src/utils/proxyDelegation.spec.ts b/packages/core/src/utils/proxyDelegation.spec.ts index f82604e8905..21a9c6ed643 100644 --- a/packages/core/src/utils/proxyDelegation.spec.ts +++ b/packages/core/src/utils/proxyDelegation.spec.ts @@ -1,4 +1,4 @@ -import {proxyDelegation} from "./proxyDelegation"; +import {proxyDelegation} from "./proxyDelegation.js"; describe("proxyDelegation", () => { it("should create proxy delegation with internal map", () => { diff --git a/packages/core/src/utils/proxyDelegation.ts b/packages/core/src/utils/proxyDelegation.ts index b81db233453..0683509ee3c 100644 --- a/packages/core/src/utils/proxyDelegation.ts +++ b/packages/core/src/utils/proxyDelegation.ts @@ -1,4 +1,4 @@ -import {uniq} from "./uniq"; +import {uniq} from "./uniq.js"; /** * @ignore diff --git a/packages/core/src/utils/uniq.spec.ts b/packages/core/src/utils/uniq.spec.ts index e65d3a7253c..35d8766ffd2 100644 --- a/packages/core/src/utils/uniq.spec.ts +++ b/packages/core/src/utils/uniq.spec.ts @@ -1,4 +1,4 @@ -import {uniq, uniqBy} from "./uniq"; +import {uniq, uniqBy} from "./uniq.js"; describe("uniq", () => { it("should return uniq item", () => { diff --git a/packages/di/readme.md b/packages/di/readme.md index 2909f9cd280..94e9680f015 100644 --- a/packages/di/readme.md +++ b/packages/di/readme.md @@ -69,7 +69,7 @@ Here is a basic usage to declare an injectable service to another one: ```typescript import {Injectable} from "@tsed/di"; -import {Calendar} from "./models/calendar"; +import {Calendar} from "./models/calendar.js"; @Injectable() export class CalendarsService { @@ -92,8 +92,8 @@ Now we have the service class already done, let's use it inside a controller: ```typescript import {Controller, Post, Body, Get} from "@tsed/common"; -import {CalendarsService} from "./CalendarsService"; -import {Calendar} from "./models/Calendar"; +import {CalendarsService} from "./CalendarsService.js"; +import {Calendar} from "./models/Calendar.js"; @Controller("/calendars") export class CalendarCtrl { @@ -119,7 +119,7 @@ Finally, we can load the injector and use: ```typescript import {InjectorService, attachLogger} from "@tsed/di"; import {$log} from "@tsed/logger"; -import {CalendarCtrl} from "./CalendarCtrl"; +import {CalendarCtrl} from "./CalendarCtrl.js"; async function bootstrap() { const injector = new InjectorService(); diff --git a/packages/di/src/common/decorators/__mock__/lazy.import.module.ts b/packages/di/src/common/decorators/__mock__/lazy.import.module.ts index 85c02aef79a..a1385b89874 100644 --- a/packages/di/src/common/decorators/__mock__/lazy.import.module.ts +++ b/packages/di/src/common/decorators/__mock__/lazy.import.module.ts @@ -1,4 +1,4 @@ -import {Injectable} from "../injectable"; +import {Injectable} from "../injectable.js"; @Injectable() export class MyLazyModule { diff --git a/packages/di/src/common/decorators/__mock__/lazy.module.ts b/packages/di/src/common/decorators/__mock__/lazy.module.ts index db9dd69bd05..83716f6f2e3 100644 --- a/packages/di/src/common/decorators/__mock__/lazy.module.ts +++ b/packages/di/src/common/decorators/__mock__/lazy.module.ts @@ -1,4 +1,4 @@ -import {Injectable} from "../injectable"; +import {Injectable} from "../injectable.js"; @Injectable() export class MyLazyModule { diff --git a/packages/di/src/common/decorators/__mock__/lazy.nodefault.module.ts b/packages/di/src/common/decorators/__mock__/lazy.nodefault.module.ts index 90d070ed8d7..cf45e1317c7 100644 --- a/packages/di/src/common/decorators/__mock__/lazy.nodefault.module.ts +++ b/packages/di/src/common/decorators/__mock__/lazy.nodefault.module.ts @@ -1,4 +1,4 @@ -import {Injectable} from "../injectable"; +import {Injectable} from "../injectable.js"; @Injectable() export class MyLazyModule { diff --git a/packages/di/src/common/decorators/configuration.spec.ts b/packages/di/src/common/decorators/configuration.spec.ts index d591fb575b5..618f58b6bfe 100644 --- a/packages/di/src/common/decorators/configuration.spec.ts +++ b/packages/di/src/common/decorators/configuration.spec.ts @@ -1,10 +1,10 @@ import {Store} from "@tsed/core"; -import {Container} from "../domain/Container"; -import {Provider} from "../domain/Provider"; -import {GlobalProviders} from "../registries/GlobalProviders"; -import {InjectorService} from "../services/InjectorService"; -import {Configuration} from "./configuration"; -import {Injectable} from "./injectable"; +import {Container} from "../domain/Container.js"; +import {Provider} from "../domain/Provider.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; +import {InjectorService} from "../services/InjectorService.js"; +import {Configuration} from "./configuration.js"; +import {Injectable} from "./injectable.js"; describe("@Configuration", () => { it("should declare a new provider with custom configuration", () => { diff --git a/packages/di/src/common/decorators/configuration.ts b/packages/di/src/common/decorators/configuration.ts index 2fea2c185bc..18f49fcfd86 100644 --- a/packages/di/src/common/decorators/configuration.ts +++ b/packages/di/src/common/decorators/configuration.ts @@ -1,6 +1,6 @@ import {DecoratorParameters, decoratorTypeOf, DecoratorTypes, StoreSet} from "@tsed/core"; -import {Inject} from "./inject"; -import {DIConfiguration} from "../services/DIConfiguration"; +import {Inject} from "./inject.js"; +import {DIConfiguration} from "../services/DIConfiguration.js"; /** * Get or set Configuration on a class. diff --git a/packages/di/src/common/decorators/constant.spec.ts b/packages/di/src/common/decorators/constant.spec.ts index 236b40a9cff..2caff743424 100644 --- a/packages/di/src/common/decorators/constant.spec.ts +++ b/packages/di/src/common/decorators/constant.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {INJECTABLE_PROP} from "../constants/constants"; -import {Constant} from "./constant"; +import {INJECTABLE_PROP} from "../constants/constants.js"; +import {Constant} from "./constant.js"; class Test {} diff --git a/packages/di/src/common/decorators/constant.ts b/packages/di/src/common/decorators/constant.ts index 49b928ca100..b2b84105853 100644 --- a/packages/di/src/common/decorators/constant.ts +++ b/packages/di/src/common/decorators/constant.ts @@ -1,7 +1,7 @@ import {Store} from "@tsed/core"; -import {INJECTABLE_PROP} from "../constants/constants"; -import type {InjectableProperties} from "../interfaces/InjectableProperties"; -import {InjectablePropertyType} from "../domain/InjectablePropertyType"; +import {INJECTABLE_PROP} from "../constants/constants.js"; +import type {InjectableProperties} from "../interfaces/InjectableProperties.js"; +import {InjectablePropertyType} from "../domain/InjectablePropertyType.js"; /** * Return value from Configuration. diff --git a/packages/di/src/common/decorators/controller.spec.ts b/packages/di/src/common/decorators/controller.spec.ts index d87df36f660..70b559c7daf 100644 --- a/packages/di/src/common/decorators/controller.spec.ts +++ b/packages/di/src/common/decorators/controller.spec.ts @@ -1,7 +1,7 @@ -import {ProviderScope} from "../domain/ProviderScope"; -import {ProviderType} from "../domain/ProviderType"; -import {GlobalProviders} from "../registries/GlobalProviders"; -import {Controller} from "./controller"; +import {ProviderScope} from "../domain/ProviderScope.js"; +import {ProviderType} from "../domain/ProviderType.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; +import {Controller} from "./controller.js"; class Test {} diff --git a/packages/di/src/common/decorators/controller.ts b/packages/di/src/common/decorators/controller.ts index 3e414256e28..4a1745e86ef 100644 --- a/packages/di/src/common/decorators/controller.ts +++ b/packages/di/src/common/decorators/controller.ts @@ -1,7 +1,7 @@ import {isArrayOrArrayClass, Type, useDecorators} from "@tsed/core"; import {Children, Path} from "@tsed/schema"; -import {ProviderOpts} from "../interfaces/ProviderOpts"; -import {registerController} from "../registries/ProviderRegistry"; +import {ProviderOpts} from "../interfaces/ProviderOpts.js"; +import {registerController} from "../registries/ProviderRegistry.js"; export type PathType = string | RegExp | (string | RegExp)[]; diff --git a/packages/di/src/common/decorators/inject.spec.ts b/packages/di/src/common/decorators/inject.spec.ts index 08e2b5892ef..358fa4bba71 100644 --- a/packages/di/src/common/decorators/inject.spec.ts +++ b/packages/di/src/common/decorators/inject.spec.ts @@ -1,8 +1,8 @@ import {descriptorOf} from "@tsed/core"; -import {registerProvider} from "../registries/ProviderRegistry"; -import {InjectorService} from "../services/InjectorService"; -import {Inject} from "./inject"; -import {Injectable} from "./injectable"; +import {registerProvider} from "../registries/ProviderRegistry.js"; +import {InjectorService} from "../services/InjectorService.js"; +import {Inject} from "./inject.js"; +import {Injectable} from "./injectable.js"; describe("@Inject()", () => { describe("used on unsupported decorator type", () => { diff --git a/packages/di/src/common/decorators/inject.ts b/packages/di/src/common/decorators/inject.ts index c40d44bb51a..92b475030dc 100644 --- a/packages/di/src/common/decorators/inject.ts +++ b/packages/di/src/common/decorators/inject.ts @@ -1,9 +1,9 @@ import {decoratorTypeOf, DecoratorTypes, isPromise, Metadata, Store, UnsupportedDecoratorType} from "@tsed/core"; -import {DI_PARAM_OPTIONS, INJECTABLE_PROP} from "../constants/constants"; -import {InvalidPropertyTokenError} from "../errors/InvalidPropertyTokenError"; -import type {InjectablePropertyOptions} from "../interfaces/InjectableProperties"; -import {TokenProvider} from "../interfaces/TokenProvider"; -import {getConstructorDependencies, setConstructorDependencies} from "../utils/getConstructorDependencies"; +import {DI_PARAM_OPTIONS, INJECTABLE_PROP} from "../constants/constants.js"; +import {InvalidPropertyTokenError} from "../errors/InvalidPropertyTokenError.js"; +import type {InjectablePropertyOptions} from "../interfaces/InjectableProperties.js"; +import {TokenProvider} from "../interfaces/TokenProvider.js"; +import {getConstructorDependencies, setConstructorDependencies} from "../utils/getConstructorDependencies.js"; export function injectProperty(target: any, propertyKey: string, options: Partial) { Store.from(target).merge(INJECTABLE_PROP, { diff --git a/packages/di/src/common/decorators/injectable.spec.ts b/packages/di/src/common/decorators/injectable.spec.ts index f3654d0cb04..d8cb0371c0a 100644 --- a/packages/di/src/common/decorators/injectable.spec.ts +++ b/packages/di/src/common/decorators/injectable.spec.ts @@ -1,6 +1,6 @@ -import {Injectable} from "./injectable"; -import {GlobalProviders} from "../registries/GlobalProviders"; -import * as ProviderRegistry from "../registries/ProviderRegistry"; +import {Injectable} from "./injectable.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; +import * as ProviderRegistry from "../registries/ProviderRegistry.js"; describe("@Injectable()", () => { afterEach(() => jest.resetAllMocks()); diff --git a/packages/di/src/common/decorators/injectable.ts b/packages/di/src/common/decorators/injectable.ts index 820595be888..a9a462273e3 100644 --- a/packages/di/src/common/decorators/injectable.ts +++ b/packages/di/src/common/decorators/injectable.ts @@ -1,5 +1,5 @@ -import type {ProviderOpts} from "../interfaces/ProviderOpts"; -import {registerProvider} from "../registries/ProviderRegistry"; +import type {ProviderOpts} from "../interfaces/ProviderOpts.js"; +import {registerProvider} from "../registries/ProviderRegistry.js"; /** * The decorators `@Injectable()` declare a new service can be injected in other service, controller, interceptor, etc.. on there `constructor`. diff --git a/packages/di/src/common/decorators/intercept.spec.ts b/packages/di/src/common/decorators/intercept.spec.ts index 48514879e04..87c44cdce57 100644 --- a/packages/di/src/common/decorators/intercept.spec.ts +++ b/packages/di/src/common/decorators/intercept.spec.ts @@ -1,9 +1,9 @@ import {Store} from "@tsed/core"; -import {INJECTABLE_PROP} from "../constants/constants"; -import {InjectablePropertyType} from "../domain/InjectablePropertyType"; -import {InterceptorContext} from "../interfaces/InterceptorContext"; -import {InterceptorMethods} from "../interfaces/InterceptorMethods"; -import {Intercept} from "./intercept"; +import {INJECTABLE_PROP} from "../constants/constants.js"; +import {InjectablePropertyType} from "../domain/InjectablePropertyType.js"; +import {InterceptorContext} from "../interfaces/InterceptorContext.js"; +import {InterceptorMethods} from "../interfaces/InterceptorMethods.js"; +import {Intercept} from "./intercept.js"; describe("@Intercept", () => { it("should add interceptor on method", () => { diff --git a/packages/di/src/common/decorators/intercept.ts b/packages/di/src/common/decorators/intercept.ts index 894a893c1e6..d40a5e4ccc1 100644 --- a/packages/di/src/common/decorators/intercept.ts +++ b/packages/di/src/common/decorators/intercept.ts @@ -1,8 +1,8 @@ import {decorateMethodsOf, DecoratorParameters, decoratorTypeOf, DecoratorTypes, Store, Type} from "@tsed/core"; -import {INJECTABLE_PROP} from "../constants/constants"; -import {InjectablePropertyType} from "../domain/InjectablePropertyType"; -import type {InterceptorMethods} from "../interfaces/InterceptorMethods"; -import type {InjectableProperties} from "../interfaces/InjectableProperties"; +import {INJECTABLE_PROP} from "../constants/constants.js"; +import {InjectablePropertyType} from "../domain/InjectablePropertyType.js"; +import type {InterceptorMethods} from "../interfaces/InterceptorMethods.js"; +import type {InjectableProperties} from "../interfaces/InjectableProperties.js"; /** * Attaches interceptor to method call and executes the before and after methods diff --git a/packages/di/src/common/decorators/interceptor.ts b/packages/di/src/common/decorators/interceptor.ts index 22587b75b51..9b7fee411e9 100644 --- a/packages/di/src/common/decorators/interceptor.ts +++ b/packages/di/src/common/decorators/interceptor.ts @@ -1,5 +1,5 @@ -import {ProviderType} from "../domain/ProviderType"; -import {Injectable} from "./injectable"; +import {ProviderType} from "../domain/ProviderType.js"; +import {Injectable} from "./injectable.js"; /** * The decorators `@Service()` declare a new service can be injected in other service or controller on there `constructor`. diff --git a/packages/di/src/common/decorators/lazyInject.spec.ts b/packages/di/src/common/decorators/lazyInject.spec.ts index 4a121dd06a1..28c1b04c9be 100644 --- a/packages/di/src/common/decorators/lazyInject.spec.ts +++ b/packages/di/src/common/decorators/lazyInject.spec.ts @@ -1,8 +1,8 @@ import {catchAsyncError, classOf, nameOf} from "@tsed/core"; -import {InjectorService} from "../services/InjectorService"; -import type {MyLazyModule} from "./__mock__/lazy.module"; -import {Injectable} from "./injectable"; -import {LazyInject, OptionalLazyInject} from "./lazyInject"; +import {InjectorService} from "../services/InjectorService.js"; +import type {MyLazyModule} from "./__mock__/lazy.module.js"; +import {Injectable} from "./injectable.js"; +import {LazyInject, OptionalLazyInject} from "./lazyInject.js"; describe("LazyInject", () => { it("should lazy load module (import)", async () => { diff --git a/packages/di/src/common/decorators/lazyInject.ts b/packages/di/src/common/decorators/lazyInject.ts index 0a2d59e6d5c..fe768abad50 100644 --- a/packages/di/src/common/decorators/lazyInject.ts +++ b/packages/di/src/common/decorators/lazyInject.ts @@ -1,5 +1,5 @@ import {importPackage} from "@tsed/core"; -import {injectProperty} from "./inject"; +import {injectProperty} from "./inject.js"; /** * Lazy load a provider from his package and invoke only when the provider is used diff --git a/packages/di/src/common/decorators/module.ts b/packages/di/src/common/decorators/module.ts index 545e63520ac..43ab1ce1d01 100644 --- a/packages/di/src/common/decorators/module.ts +++ b/packages/di/src/common/decorators/module.ts @@ -1,10 +1,10 @@ import {useDecorators} from "@tsed/core"; -import {ProviderScope} from "../domain/ProviderScope"; -import {TokenProvider} from "../interfaces/TokenProvider"; -import {Configuration} from "./configuration"; -import {Injectable} from "./injectable"; -import {ProviderType} from "../domain/ProviderType"; -import {DIResolver} from "../interfaces/DIResolver"; +import {ProviderScope} from "../domain/ProviderScope.js"; +import {TokenProvider} from "../interfaces/TokenProvider.js"; +import {Configuration} from "./configuration.js"; +import {Injectable} from "./injectable.js"; +import {ProviderType} from "../domain/ProviderType.js"; +import {DIResolver} from "../interfaces/DIResolver.js"; export interface ModuleOptions extends Omit { /** diff --git a/packages/di/src/common/decorators/opts.ts b/packages/di/src/common/decorators/opts.ts index 2d7f8f36ff6..994abe3acaa 100644 --- a/packages/di/src/common/decorators/opts.ts +++ b/packages/di/src/common/decorators/opts.ts @@ -1,8 +1,8 @@ import {classOf} from "@tsed/core"; -import {DI_PARAM_OPTIONS} from "../constants/constants"; -import {ProviderScope} from "../domain/ProviderScope"; -import {Inject} from "./inject"; -import {Scope} from "./scope"; +import {DI_PARAM_OPTIONS} from "../constants/constants.js"; +import {ProviderScope} from "../domain/ProviderScope.js"; +import {Inject} from "./inject.js"; +import {Scope} from "./scope.js"; /** * Get instance options. This options depending on his invocation context. diff --git a/packages/di/src/common/decorators/overrideProvider.spec.ts b/packages/di/src/common/decorators/overrideProvider.spec.ts index b40bda31db7..f4e20283d87 100644 --- a/packages/di/src/common/decorators/overrideProvider.spec.ts +++ b/packages/di/src/common/decorators/overrideProvider.spec.ts @@ -1,7 +1,7 @@ import Sinon from "sinon"; -import {OverrideProvider} from "./overrideProvider"; -import {Provider} from "../domain/Provider"; -import {GlobalProviders} from "../registries/GlobalProviders"; +import {OverrideProvider} from "./overrideProvider.js"; +import {Provider} from "../domain/Provider.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; describe("OverrideProvider", () => { class Test {} diff --git a/packages/di/src/common/decorators/overrideProvider.ts b/packages/di/src/common/decorators/overrideProvider.ts index 6a01a81d3d5..620eae20d0b 100644 --- a/packages/di/src/common/decorators/overrideProvider.ts +++ b/packages/di/src/common/decorators/overrideProvider.ts @@ -1,5 +1,5 @@ import {Type} from "@tsed/core"; -import {GlobalProviders} from "../registries/GlobalProviders"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; /** * Override a provider which is already registered in ProviderRegistry. diff --git a/packages/di/src/common/decorators/scope.spec.ts b/packages/di/src/common/decorators/scope.spec.ts index a3cc5e3a0d9..c2b218c6e99 100644 --- a/packages/di/src/common/decorators/scope.spec.ts +++ b/packages/di/src/common/decorators/scope.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {Scope} from "./scope"; +import {Scope} from "./scope.js"; class Test {} diff --git a/packages/di/src/common/decorators/scope.ts b/packages/di/src/common/decorators/scope.ts index 147bb9275d3..ad076874446 100644 --- a/packages/di/src/common/decorators/scope.ts +++ b/packages/di/src/common/decorators/scope.ts @@ -1,5 +1,5 @@ import {StoreSet} from "@tsed/core"; -import {ProviderScope} from "../domain/ProviderScope"; +import {ProviderScope} from "../domain/ProviderScope.js"; /** * diff --git a/packages/di/src/common/decorators/service.ts b/packages/di/src/common/decorators/service.ts index cce01e8cc68..0f70b0b1dc1 100644 --- a/packages/di/src/common/decorators/service.ts +++ b/packages/di/src/common/decorators/service.ts @@ -1,4 +1,4 @@ -import {Injectable} from "./injectable"; +import {Injectable} from "./injectable.js"; /** * The decorators `@Service()` declare a new service can be injected in other service or controller on there `constructor`. diff --git a/packages/di/src/common/decorators/useOpts.spec.ts b/packages/di/src/common/decorators/useOpts.spec.ts index d6a491315be..4e0004f7dac 100644 --- a/packages/di/src/common/decorators/useOpts.spec.ts +++ b/packages/di/src/common/decorators/useOpts.spec.ts @@ -1,11 +1,11 @@ import {descriptorOf} from "@tsed/core"; -import {DITest} from "../../node/index"; -import {ProviderScope} from "../domain/ProviderScope"; -import {Inject} from "./inject"; -import {Injectable} from "./injectable"; -import {Opts} from "./opts"; -import {Scope} from "./scope"; -import {UseOpts} from "./useOpts"; +import {DITest} from "../../node/index.js"; +import {ProviderScope} from "../domain/ProviderScope.js"; +import {Inject} from "./inject.js"; +import {Injectable} from "./injectable.js"; +import {Opts} from "./opts.js"; +import {Scope} from "./scope.js"; +import {UseOpts} from "./useOpts.js"; describe("UseOpts", () => { let testContext: any; diff --git a/packages/di/src/common/decorators/useOpts.ts b/packages/di/src/common/decorators/useOpts.ts index c96bf5642c3..ffd823a7b47 100644 --- a/packages/di/src/common/decorators/useOpts.ts +++ b/packages/di/src/common/decorators/useOpts.ts @@ -1,5 +1,5 @@ import {decoratorTypeOf, DecoratorTypes, Store, UnsupportedDecoratorType} from "@tsed/core"; -import {DI_PARAM_OPTIONS, INJECTABLE_PROP} from "../constants/constants"; +import {DI_PARAM_OPTIONS, INJECTABLE_PROP} from "../constants/constants.js"; /** * Add options to invoke the Service. diff --git a/packages/di/src/common/decorators/value.spec.ts b/packages/di/src/common/decorators/value.spec.ts index 4347bc79f3e..e924d47dc73 100644 --- a/packages/di/src/common/decorators/value.spec.ts +++ b/packages/di/src/common/decorators/value.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {Value} from "./value"; -import {INJECTABLE_PROP} from "../constants/constants"; +import {Value} from "./value.js"; +import {INJECTABLE_PROP} from "../constants/constants.js"; describe("@Value()", () => { it("should store metadata", () => { diff --git a/packages/di/src/common/decorators/value.ts b/packages/di/src/common/decorators/value.ts index 8bf738c475a..183335eac7e 100644 --- a/packages/di/src/common/decorators/value.ts +++ b/packages/di/src/common/decorators/value.ts @@ -1,7 +1,7 @@ import {Store} from "@tsed/core"; -import {INJECTABLE_PROP} from "../constants/constants"; -import type {InjectableProperties} from "../interfaces/InjectableProperties"; -import {InjectablePropertyType} from "../domain/InjectablePropertyType"; +import {INJECTABLE_PROP} from "../constants/constants.js"; +import type {InjectableProperties} from "../interfaces/InjectableProperties.js"; +import {InjectablePropertyType} from "../domain/InjectablePropertyType.js"; /** * Return value from Configuration. diff --git a/packages/di/src/common/domain/Container.spec.ts b/packages/di/src/common/domain/Container.spec.ts index 09c96d26043..e5fdd49d83f 100644 --- a/packages/di/src/common/domain/Container.spec.ts +++ b/packages/di/src/common/domain/Container.spec.ts @@ -1,6 +1,6 @@ -import {Container} from "./Container"; -import {Provider} from "./Provider"; -import {ProviderType} from "./ProviderType"; +import {Container} from "./Container.js"; +import {Provider} from "./Provider.js"; +import {ProviderType} from "./ProviderType.js"; describe("Container", () => { describe("getProvider()", () => { diff --git a/packages/di/src/common/domain/Container.ts b/packages/di/src/common/domain/Container.ts index 29ab51c90b8..7ee6ee3659c 100644 --- a/packages/di/src/common/domain/Container.ts +++ b/packages/di/src/common/domain/Container.ts @@ -1,8 +1,8 @@ -import type {ProviderOpts} from "../interfaces/ProviderOpts"; -import type {ProviderType} from "./ProviderType"; -import type {TokenProvider} from "../interfaces/TokenProvider"; -import {GlobalProviders} from "../registries/GlobalProviders"; -import {Provider} from "./Provider"; +import type {ProviderOpts} from "../interfaces/ProviderOpts.js"; +import type {ProviderType} from "./ProviderType.js"; +import type {TokenProvider} from "../interfaces/TokenProvider.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; +import {Provider} from "./Provider.js"; export class Container extends Map { /** diff --git a/packages/di/src/common/domain/ControllerProvider.spec.ts b/packages/di/src/common/domain/ControllerProvider.spec.ts index ff9df483126..6f7d10ff3e1 100644 --- a/packages/di/src/common/domain/ControllerProvider.spec.ts +++ b/packages/di/src/common/domain/ControllerProvider.spec.ts @@ -1,5 +1,5 @@ -import {ControllerProvider} from "./ControllerProvider"; -import {ProviderScope} from "./ProviderScope"; +import {ControllerProvider} from "./ControllerProvider.js"; +import {ProviderScope} from "./ProviderScope.js"; class Test {} diff --git a/packages/di/src/common/domain/ControllerProvider.ts b/packages/di/src/common/domain/ControllerProvider.ts index a504cebb4e6..f0811545765 100644 --- a/packages/di/src/common/domain/ControllerProvider.ts +++ b/packages/di/src/common/domain/ControllerProvider.ts @@ -1,7 +1,7 @@ -import {ControllerMiddlewares} from "../decorators/controller"; -import {TokenProvider} from "../interfaces/TokenProvider"; -import {Provider} from "./Provider"; -import {ProviderType} from "./ProviderType"; +import {ControllerMiddlewares} from "../decorators/controller.js"; +import {TokenProvider} from "../interfaces/TokenProvider.js"; +import {Provider} from "./Provider.js"; +import {ProviderType} from "./ProviderType.js"; export class ControllerProvider extends Provider { public tokenRouter: string; diff --git a/packages/di/src/common/domain/LocalsContainer.spec.ts b/packages/di/src/common/domain/LocalsContainer.spec.ts index 5d10d5d5258..0197ee62394 100644 --- a/packages/di/src/common/domain/LocalsContainer.spec.ts +++ b/packages/di/src/common/domain/LocalsContainer.spec.ts @@ -1,4 +1,4 @@ -import {LocalsContainer} from "./LocalsContainer"; +import {LocalsContainer} from "./LocalsContainer.js"; describe("LocalsContainer", () => { describe("destroy()", () => { diff --git a/packages/di/src/common/domain/LocalsContainer.ts b/packages/di/src/common/domain/LocalsContainer.ts index 32d2023db78..de440cbe32c 100644 --- a/packages/di/src/common/domain/LocalsContainer.ts +++ b/packages/di/src/common/domain/LocalsContainer.ts @@ -1,5 +1,5 @@ import {Hooks} from "@tsed/core"; -import type {TokenProvider} from "../interfaces/TokenProvider"; +import type {TokenProvider} from "../interfaces/TokenProvider.js"; export class LocalsContainer extends Map { readonly hooks = new Hooks(); diff --git a/packages/di/src/common/domain/Provider.spec.ts b/packages/di/src/common/domain/Provider.spec.ts index 478bd3ad34b..ef06c934a00 100644 --- a/packages/di/src/common/domain/Provider.spec.ts +++ b/packages/di/src/common/domain/Provider.spec.ts @@ -1,5 +1,5 @@ -import {ProviderScope} from "./ProviderScope"; -import {Provider} from "./Provider"; +import {ProviderScope} from "./ProviderScope.js"; +import {Provider} from "./Provider.js"; class T1 {} diff --git a/packages/di/src/common/domain/Provider.ts b/packages/di/src/common/domain/Provider.ts index e46aeed0afb..dafd501bde4 100644 --- a/packages/di/src/common/domain/Provider.ts +++ b/packages/di/src/common/domain/Provider.ts @@ -1,8 +1,8 @@ import {classOf, getClassOrSymbol, isClass, Metadata, methodsOf, nameOf, Store, Type} from "@tsed/core"; -import {ProviderOpts} from "../interfaces/ProviderOpts"; -import {TokenProvider} from "../interfaces/TokenProvider"; -import {ProviderScope} from "./ProviderScope"; -import {ProviderType} from "./ProviderType"; +import {ProviderOpts} from "../interfaces/ProviderOpts.js"; +import {TokenProvider} from "../interfaces/TokenProvider.js"; +import {ProviderScope} from "./ProviderScope.js"; +import {ProviderType} from "./ProviderType.js"; export type ProviderHookCallback = (instance: T, ...args: any[]) => Promise | void; diff --git a/packages/di/src/common/errors/InjectionError.spec.ts b/packages/di/src/common/errors/InjectionError.spec.ts index d89c5bc6276..7b1a07e9aee 100644 --- a/packages/di/src/common/errors/InjectionError.spec.ts +++ b/packages/di/src/common/errors/InjectionError.spec.ts @@ -1,4 +1,4 @@ -import {InjectionError} from "./InjectionError"; +import {InjectionError} from "./InjectionError.js"; describe("InjectionError", () => { it("should create new instance of InjectionError (1)", () => { diff --git a/packages/di/src/common/errors/InjectionError.ts b/packages/di/src/common/errors/InjectionError.ts index 4e88998ab27..c15d5a742fc 100644 --- a/packages/di/src/common/errors/InjectionError.ts +++ b/packages/di/src/common/errors/InjectionError.ts @@ -1,6 +1,6 @@ import {getConstructorArgNames, isClass, isString, nameOf} from "@tsed/core"; -import {TokenProvider} from "../interfaces/TokenProvider"; -import {colors} from "../utils/colors"; +import {TokenProvider} from "../interfaces/TokenProvider.js"; +import {colors} from "../utils/colors.js"; export class InjectionError extends Error { name = "INJECTION_ERROR"; diff --git a/packages/di/src/common/index.ts b/packages/di/src/common/index.ts index 08a31e4d7d7..17784f00e8e 100644 --- a/packages/di/src/common/index.ts +++ b/packages/di/src/common/index.ts @@ -2,54 +2,54 @@ * @file Automatically generated by barrelsby. */ -export * from "./constants/constants"; -export * from "./decorators/configuration"; -export * from "./decorators/constant"; -export * from "./decorators/controller"; -export * from "./decorators/inject"; -export * from "./decorators/injectable"; -export * from "./decorators/intercept"; -export * from "./decorators/interceptor"; -export * from "./decorators/lazyInject"; -export * from "./decorators/module"; -export * from "./decorators/opts"; -export * from "./decorators/overrideProvider"; -export * from "./decorators/scope"; -export * from "./decorators/service"; -export * from "./decorators/useOpts"; -export * from "./decorators/value"; -export * from "./domain/Container"; -export * from "./domain/ControllerProvider"; -export * from "./domain/InjectablePropertyType"; -export * from "./domain/LocalsContainer"; -export * from "./domain/Provider"; -export * from "./domain/ProviderScope"; -export * from "./domain/ProviderType"; -export * from "./errors/InjectionError"; -export * from "./errors/InvalidPropertyTokenError"; -export * from "./errors/UndefinedTokenError"; -export * from "./interfaces/DIConfigurationOptions"; -export * from "./interfaces/DILogger"; -export * from "./interfaces/DILoggerOptions"; -export * from "./interfaces/DIResolver"; -export * from "./interfaces/InjectableProperties"; -export * from "./interfaces/InterceptorContext"; -export * from "./interfaces/InterceptorMethods"; -export * from "./interfaces/InvokeOptions"; -export * from "./interfaces/OnDestroy"; -export * from "./interfaces/OnInit"; -export * from "./interfaces/ProviderOpts"; -export * from "./interfaces/RegistrySettings"; -export * from "./interfaces/ResolvedInvokeOptions"; -export * from "./interfaces/TokenProvider"; -export * from "./interfaces/TokenRoute"; -export * from "./registries/GlobalProviders"; -export * from "./registries/ProviderRegistry"; -export * from "./services/DIConfiguration"; -export * from "./services/DILogger"; -export * from "./services/InjectorService"; -export * from "./utils/colors"; -export * from "./utils/createContainer"; -export * from "./utils/getConfiguration"; -export * from "./utils/getConstructorDependencies"; -export * from "./utils/resolveControllers"; +export * from "./constants/constants.js"; +export * from "./decorators/configuration.js"; +export * from "./decorators/constant.js"; +export * from "./decorators/controller.js"; +export * from "./decorators/inject.js"; +export * from "./decorators/injectable.js"; +export * from "./decorators/intercept.js"; +export * from "./decorators/interceptor.js"; +export * from "./decorators/lazyInject.js"; +export * from "./decorators/module.js"; +export * from "./decorators/opts.js"; +export * from "./decorators/overrideProvider.js"; +export * from "./decorators/scope.js"; +export * from "./decorators/service.js"; +export * from "./decorators/useOpts.js"; +export * from "./decorators/value.js"; +export * from "./domain/Container.js"; +export * from "./domain/ControllerProvider.js"; +export * from "./domain/InjectablePropertyType.js"; +export * from "./domain/LocalsContainer.js"; +export * from "./domain/Provider.js"; +export * from "./domain/ProviderScope.js"; +export * from "./domain/ProviderType.js"; +export * from "./errors/InjectionError.js"; +export * from "./errors/InvalidPropertyTokenError.js"; +export * from "./errors/UndefinedTokenError.js"; +export * from "./interfaces/DIConfigurationOptions.js"; +export * from "./interfaces/DILogger.js"; +export * from "./interfaces/DILoggerOptions.js"; +export * from "./interfaces/DIResolver.js"; +export * from "./interfaces/InjectableProperties.js"; +export * from "./interfaces/InterceptorContext.js"; +export * from "./interfaces/InterceptorMethods.js"; +export * from "./interfaces/InvokeOptions.js"; +export * from "./interfaces/OnDestroy.js"; +export * from "./interfaces/OnInit.js"; +export * from "./interfaces/ProviderOpts.js"; +export * from "./interfaces/RegistrySettings.js"; +export * from "./interfaces/ResolvedInvokeOptions.js"; +export * from "./interfaces/TokenProvider.js"; +export * from "./interfaces/TokenRoute.js"; +export * from "./registries/GlobalProviders.js"; +export * from "./registries/ProviderRegistry.js"; +export * from "./services/DIConfiguration.js"; +export * from "./services/DILogger.js"; +export * from "./services/InjectorService.js"; +export * from "./utils/colors.js"; +export * from "./utils/createContainer.js"; +export * from "./utils/getConfiguration.js"; +export * from "./utils/getConstructorDependencies.js"; +export * from "./utils/resolveControllers.js"; diff --git a/packages/di/src/common/integration/async-factory.spec.ts b/packages/di/src/common/integration/async-factory.spec.ts index 78ea2809415..2dca755ece5 100644 --- a/packages/di/src/common/integration/async-factory.spec.ts +++ b/packages/di/src/common/integration/async-factory.spec.ts @@ -1,10 +1,10 @@ import {isPromise} from "@tsed/core"; -import {Inject} from "../decorators/inject"; -import {Injectable} from "../decorators/injectable"; -import {Container} from "../domain/Container"; -import {GlobalProviders} from "../registries/GlobalProviders"; -import {registerProvider} from "../registries/ProviderRegistry"; -import {InjectorService} from "../services/InjectorService"; +import {Inject} from "../decorators/inject.js"; +import {Injectable} from "../decorators/injectable.js"; +import {Container} from "../domain/Container.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; +import {registerProvider} from "../registries/ProviderRegistry.js"; +import {InjectorService} from "../services/InjectorService.js"; describe("DI", () => { describe("create new injector", () => { diff --git a/packages/di/src/common/integration/di.spec.ts b/packages/di/src/common/integration/di.spec.ts index 87474aacd7f..81ea8e251b4 100644 --- a/packages/di/src/common/integration/di.spec.ts +++ b/packages/di/src/common/integration/di.spec.ts @@ -1,13 +1,13 @@ -import {Inject} from "../decorators/inject"; -import {Injectable} from "../decorators/injectable"; -import {Scope} from "../decorators/scope"; -import {Service} from "../decorators/service"; -import {Container} from "../domain/Container"; -import {LocalsContainer} from "../domain/LocalsContainer"; -import {ProviderScope} from "../domain/ProviderScope"; -import {OnDestroy} from "../interfaces/OnDestroy"; -import {GlobalProviders} from "../registries/GlobalProviders"; -import {InjectorService} from "../services/InjectorService"; +import {Inject} from "../decorators/inject.js"; +import {Injectable} from "../decorators/injectable.js"; +import {Scope} from "../decorators/scope.js"; +import {Service} from "../decorators/service.js"; +import {Container} from "../domain/Container.js"; +import {LocalsContainer} from "../domain/LocalsContainer.js"; +import {ProviderScope} from "../domain/ProviderScope.js"; +import {OnDestroy} from "../interfaces/OnDestroy.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; +import {InjectorService} from "../services/InjectorService.js"; describe("DI", () => { describe("create new injector", () => { @@ -25,7 +25,10 @@ describe("DI", () => { @Service() @Scope(ProviderScope.REQUEST) class ServiceRequest implements OnDestroy { - constructor(public serviceSingleton: ServiceSingleton, public serviceInstance: ServiceInstance) {} + constructor( + public serviceSingleton: ServiceSingleton, + public serviceInstance: ServiceInstance + ) {} $onDestroy(): Promise | void { return undefined; diff --git a/packages/di/src/common/integration/imports.spec.ts b/packages/di/src/common/integration/imports.spec.ts index 53b206298e6..f289b4c5172 100644 --- a/packages/di/src/common/integration/imports.spec.ts +++ b/packages/di/src/common/integration/imports.spec.ts @@ -1,7 +1,7 @@ -import {DITest} from "../../node/index"; -import {Inject} from "../decorators/inject"; -import {Injectable} from "../decorators/injectable"; -import {Module} from "../decorators/module"; +import {DITest} from "../../node/index.js"; +import {Inject} from "../decorators/inject.js"; +import {Injectable} from "../decorators/injectable.js"; +import {Module} from "../decorators/module.js"; @Injectable() class MyService { diff --git a/packages/di/src/common/integration/interceptor.spec.ts b/packages/di/src/common/integration/interceptor.spec.ts index 98f26f818e2..76c3d219aa6 100644 --- a/packages/di/src/common/integration/interceptor.spec.ts +++ b/packages/di/src/common/integration/interceptor.spec.ts @@ -1,11 +1,11 @@ -import {Intercept} from "../decorators/intercept"; -import {Interceptor} from "../decorators/interceptor"; -import {Service} from "../decorators/service"; -import {Container} from "../domain/Container"; -import {InterceptorContext} from "../interfaces/InterceptorContext"; -import {InterceptorMethods} from "../interfaces/InterceptorMethods"; -import {GlobalProviders} from "../registries/GlobalProviders"; -import {InjectorService} from "../services/InjectorService"; +import {Intercept} from "../decorators/intercept.js"; +import {Interceptor} from "../decorators/interceptor.js"; +import {Service} from "../decorators/service.js"; +import {Container} from "../domain/Container.js"; +import {InterceptorContext} from "../interfaces/InterceptorContext.js"; +import {InterceptorMethods} from "../interfaces/InterceptorMethods.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; +import {InjectorService} from "../services/InjectorService.js"; describe("DI Interceptor", () => { @Interceptor() diff --git a/packages/di/src/common/integration/request.spec.ts b/packages/di/src/common/integration/request.spec.ts index bbc624e9dee..8617d3fa771 100644 --- a/packages/di/src/common/integration/request.spec.ts +++ b/packages/di/src/common/integration/request.spec.ts @@ -1,11 +1,11 @@ -import {Scope} from "../decorators/scope"; -import {Service} from "../decorators/service"; -import {Container} from "../domain/Container"; -import {LocalsContainer} from "../domain/LocalsContainer"; -import {ProviderScope} from "../domain/ProviderScope"; -import {OnDestroy} from "../interfaces/OnDestroy"; -import {GlobalProviders} from "../registries/GlobalProviders"; -import {InjectorService} from "../services/InjectorService"; +import {Scope} from "../decorators/scope.js"; +import {Service} from "../decorators/service.js"; +import {Container} from "../domain/Container.js"; +import {LocalsContainer} from "../domain/LocalsContainer.js"; +import {ProviderScope} from "../domain/ProviderScope.js"; +import {OnDestroy} from "../interfaces/OnDestroy.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; +import {InjectorService} from "../services/InjectorService.js"; describe("DI Request", () => { @Service() @@ -22,7 +22,10 @@ describe("DI Request", () => { @Service() @Scope(ProviderScope.REQUEST) class ServiceRequest implements OnDestroy { - constructor(public serviceSingleton: ServiceSingleton, public serviceInstance: ServiceInstance) {} + constructor( + public serviceSingleton: ServiceSingleton, + public serviceInstance: ServiceInstance + ) {} $onDestroy(): Promise | void { return undefined; diff --git a/packages/di/src/common/integration/resolvers.spec.ts b/packages/di/src/common/integration/resolvers.spec.ts index aca483045a6..70dad0eb217 100644 --- a/packages/di/src/common/integration/resolvers.spec.ts +++ b/packages/di/src/common/integration/resolvers.spec.ts @@ -1,5 +1,5 @@ -import {Container} from "../domain/Container"; -import {InjectorService} from "../services/InjectorService"; +import {Container} from "../domain/Container.js"; +import {InjectorService} from "../services/InjectorService.js"; describe("DI Resolvers", () => { describe("create new injector", () => { diff --git a/packages/di/src/common/integration/singleton.spec.ts b/packages/di/src/common/integration/singleton.spec.ts index 5d1042dcc86..01f48e337d9 100644 --- a/packages/di/src/common/integration/singleton.spec.ts +++ b/packages/di/src/common/integration/singleton.spec.ts @@ -1,9 +1,9 @@ -import {Scope} from "../decorators/scope"; -import {Service} from "../decorators/service"; -import {Container} from "../domain/Container"; -import {ProviderScope} from "../domain/ProviderScope"; -import {GlobalProviders} from "../registries/GlobalProviders"; -import {InjectorService} from "../services/InjectorService"; +import {Scope} from "../decorators/scope.js"; +import {Service} from "../decorators/service.js"; +import {Container} from "../domain/Container.js"; +import {ProviderScope} from "../domain/ProviderScope.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; +import {InjectorService} from "../services/InjectorService.js"; describe("DI Singleton", () => { @Service() @@ -25,12 +25,18 @@ describe("DI Singleton", () => { @Service() class ServiceSingletonWithRequestDep { - constructor(public serviceRequest: ServiceRequest, public serviceRequest2: ServiceRequest) {} + constructor( + public serviceRequest: ServiceRequest, + public serviceRequest2: ServiceRequest + ) {} } @Service() class ServiceSingletonWithInstanceDep { - constructor(public serviceInstance: ServiceInstance, public serviceInstance2: ServiceInstance) {} + constructor( + public serviceInstance: ServiceInstance, + public serviceInstance2: ServiceInstance + ) {} } afterAll(() => { diff --git a/packages/di/src/common/interfaces/DIConfigurationOptions.ts b/packages/di/src/common/interfaces/DIConfigurationOptions.ts index 9caa95e1b77..0d51897c3b7 100644 --- a/packages/di/src/common/interfaces/DIConfigurationOptions.ts +++ b/packages/di/src/common/interfaces/DIConfigurationOptions.ts @@ -1,7 +1,7 @@ -import type {ProviderScope} from "../domain/ProviderScope"; -import type {DIResolver} from "./DIResolver"; -import type {TokenProvider} from "./TokenProvider"; -import {TokenProviderOpts} from "./TokenProvider"; +import type {ProviderScope} from "../domain/ProviderScope.js"; +import type {DIResolver} from "./DIResolver.js"; +import type {TokenProvider} from "./TokenProvider.js"; +import {TokenProviderOpts} from "./TokenProvider.js"; declare global { namespace TsED { diff --git a/packages/di/src/common/interfaces/DIResolver.ts b/packages/di/src/common/interfaces/DIResolver.ts index 5b72fc33062..b84740526fb 100644 --- a/packages/di/src/common/interfaces/DIResolver.ts +++ b/packages/di/src/common/interfaces/DIResolver.ts @@ -1,4 +1,4 @@ -import type {TokenProvider} from "./TokenProvider"; +import type {TokenProvider} from "./TokenProvider.js"; export interface DIResolver { deps?: TokenProvider[]; diff --git a/packages/di/src/common/interfaces/InjectableProperties.ts b/packages/di/src/common/interfaces/InjectableProperties.ts index c172a22bd6f..537bc82f941 100644 --- a/packages/di/src/common/interfaces/InjectableProperties.ts +++ b/packages/di/src/common/interfaces/InjectableProperties.ts @@ -1,8 +1,8 @@ -import type {InjectablePropertyType} from "../domain/InjectablePropertyType"; -import type {LocalsContainer} from "../domain/LocalsContainer"; -import type {TokenProvider} from "./TokenProvider"; -import type {InjectorService} from "../services/InjectorService"; -import type {InvokeOptions} from "./InvokeOptions"; +import type {InjectablePropertyType} from "../domain/InjectablePropertyType.js"; +import type {LocalsContainer} from "../domain/LocalsContainer.js"; +import type {TokenProvider} from "./TokenProvider.js"; +import type {InjectorService} from "../services/InjectorService.js"; +import type {InvokeOptions} from "./InvokeOptions.js"; export interface InjectableProperty { propertyKey: string; diff --git a/packages/di/src/common/interfaces/InterceptorMethods.ts b/packages/di/src/common/interfaces/InterceptorMethods.ts index ad3beb46ac2..b1f1065b6f2 100644 --- a/packages/di/src/common/interfaces/InterceptorMethods.ts +++ b/packages/di/src/common/interfaces/InterceptorMethods.ts @@ -1,4 +1,4 @@ -import type {InterceptorContext, InterceptorNext} from "./InterceptorContext"; +import type {InterceptorContext, InterceptorNext} from "./InterceptorContext.js"; export interface InterceptorMethods { intercept(context: InterceptorContext, next?: InterceptorNext): any; diff --git a/packages/di/src/common/interfaces/InvokeOptions.ts b/packages/di/src/common/interfaces/InvokeOptions.ts index e6cd260494c..711d5cb3835 100644 --- a/packages/di/src/common/interfaces/InvokeOptions.ts +++ b/packages/di/src/common/interfaces/InvokeOptions.ts @@ -1,5 +1,5 @@ -import {ProviderScope} from "../domain/ProviderScope"; -import {TokenProvider} from "./TokenProvider"; +import {ProviderScope} from "../domain/ProviderScope.js"; +import {TokenProvider} from "./TokenProvider.js"; export interface InvokeOptions { deps: any[]; diff --git a/packages/di/src/common/interfaces/ProviderOpts.ts b/packages/di/src/common/interfaces/ProviderOpts.ts index aa1709b145d..b4cfb048f0e 100644 --- a/packages/di/src/common/interfaces/ProviderOpts.ts +++ b/packages/di/src/common/interfaces/ProviderOpts.ts @@ -1,8 +1,8 @@ import type {Type} from "@tsed/core"; -import type {ProviderType} from "../domain/ProviderType"; -import type {DIResolver} from "./DIResolver"; -import type {ProviderScope} from "../domain/ProviderScope"; -import type {TokenProvider} from "./TokenProvider"; +import type {ProviderType} from "../domain/ProviderType.js"; +import type {DIResolver} from "./DIResolver.js"; +import type {ProviderScope} from "../domain/ProviderScope.js"; +import type {TokenProvider} from "./TokenProvider.js"; export interface ProviderOpts { /** diff --git a/packages/di/src/common/interfaces/RegistrySettings.ts b/packages/di/src/common/interfaces/RegistrySettings.ts index 2c53eea1508..ed79865caa8 100644 --- a/packages/di/src/common/interfaces/RegistrySettings.ts +++ b/packages/di/src/common/interfaces/RegistrySettings.ts @@ -1,7 +1,7 @@ import {Type} from "@tsed/core"; -import type {Provider} from "../domain/Provider"; -import type {InjectorService} from "../services/InjectorService"; -import type {ResolvedInvokeOptions} from "./ResolvedInvokeOptions"; +import type {Provider} from "../domain/Provider.js"; +import type {InjectorService} from "../services/InjectorService.js"; +import type {ResolvedInvokeOptions} from "./ResolvedInvokeOptions.js"; /** * @ignore diff --git a/packages/di/src/common/interfaces/ResolvedInvokeOptions.ts b/packages/di/src/common/interfaces/ResolvedInvokeOptions.ts index 2d3161ca4d5..1bd069c2aa1 100644 --- a/packages/di/src/common/interfaces/ResolvedInvokeOptions.ts +++ b/packages/di/src/common/interfaces/ResolvedInvokeOptions.ts @@ -1,6 +1,6 @@ -import type {Provider} from "../domain/Provider"; -import type {ProviderScope} from "../domain/ProviderScope"; -import type {TokenProvider} from "./TokenProvider"; +import type {Provider} from "../domain/Provider.js"; +import type {ProviderScope} from "../domain/ProviderScope.js"; +import type {TokenProvider} from "./TokenProvider.js"; export interface ResolvedInvokeOptions { token: TokenProvider; diff --git a/packages/di/src/common/interfaces/TokenRoute.ts b/packages/di/src/common/interfaces/TokenRoute.ts index 73866ad948b..d20d3ced44f 100644 --- a/packages/di/src/common/interfaces/TokenRoute.ts +++ b/packages/di/src/common/interfaces/TokenRoute.ts @@ -1,4 +1,4 @@ -import {TokenProvider} from "./TokenProvider"; +import {TokenProvider} from "./TokenProvider.js"; export interface TokenRoute { token: TokenProvider; diff --git a/packages/di/src/common/registries/GlobalProviders.spec.ts b/packages/di/src/common/registries/GlobalProviders.spec.ts index 93112a460e7..c43dda59e16 100644 --- a/packages/di/src/common/registries/GlobalProviders.spec.ts +++ b/packages/di/src/common/registries/GlobalProviders.spec.ts @@ -1,9 +1,9 @@ -import {LocalsContainer} from "../domain/LocalsContainer"; -import {Provider} from "../domain/Provider"; -import {ProviderType} from "../domain/ProviderType"; -import {InjectorService} from "../services/InjectorService"; -import {GlobalProviderRegistry, GlobalProviders} from "./GlobalProviders"; -import {registerProvider} from "./ProviderRegistry"; +import {LocalsContainer} from "../domain/LocalsContainer.js"; +import {Provider} from "../domain/Provider.js"; +import {ProviderType} from "../domain/ProviderType.js"; +import {InjectorService} from "../services/InjectorService.js"; +import {GlobalProviderRegistry, GlobalProviders} from "./GlobalProviders.js"; +import {registerProvider} from "./ProviderRegistry.js"; describe("GlobalProviderRegistry", () => { describe("createRegistry()", () => { diff --git a/packages/di/src/common/registries/GlobalProviders.ts b/packages/di/src/common/registries/GlobalProviders.ts index 32f19a111e6..6359e0eba28 100644 --- a/packages/di/src/common/registries/GlobalProviders.ts +++ b/packages/di/src/common/registries/GlobalProviders.ts @@ -1,12 +1,12 @@ import {getClassOrSymbol, Type} from "@tsed/core"; -import type {LocalsContainer} from "../domain/LocalsContainer"; -import {Provider} from "../domain/Provider"; -import {ProviderType} from "../domain/ProviderType"; -import {ProviderOpts} from "../interfaces/ProviderOpts"; -import {RegistrySettings} from "../interfaces/RegistrySettings"; -import {ResolvedInvokeOptions} from "../interfaces/ResolvedInvokeOptions"; -import {TokenProvider} from "../interfaces/TokenProvider"; -import type {InjectorService} from "../services/InjectorService"; +import type {LocalsContainer} from "../domain/LocalsContainer.js"; +import {Provider} from "../domain/Provider.js"; +import {ProviderType} from "../domain/ProviderType.js"; +import {ProviderOpts} from "../interfaces/ProviderOpts.js"; +import {RegistrySettings} from "../interfaces/RegistrySettings.js"; +import {ResolvedInvokeOptions} from "../interfaces/ResolvedInvokeOptions.js"; +import {TokenProvider} from "../interfaces/TokenProvider.js"; +import type {InjectorService} from "../services/InjectorService.js"; export class GlobalProviderRegistry extends Map { #settings: Map = new Map(); diff --git a/packages/di/src/common/registries/ProviderRegistry.spec.ts b/packages/di/src/common/registries/ProviderRegistry.spec.ts index 72b144d956b..afa382ea018 100644 --- a/packages/di/src/common/registries/ProviderRegistry.spec.ts +++ b/packages/di/src/common/registries/ProviderRegistry.spec.ts @@ -1,7 +1,7 @@ -import {ProviderScope} from "../domain/ProviderScope"; -import {ProviderType} from "../domain/ProviderType"; -import {GlobalProviders} from "./GlobalProviders"; -import {registerProvider, registerValue} from "./ProviderRegistry"; +import {ProviderScope} from "../domain/ProviderScope.js"; +import {ProviderType} from "../domain/ProviderType.js"; +import {GlobalProviders} from "./GlobalProviders.js"; +import {registerProvider, registerValue} from "./ProviderRegistry.js"; describe("ProviderRegistry", () => { describe("registerProvider()", () => { diff --git a/packages/di/src/common/registries/ProviderRegistry.ts b/packages/di/src/common/registries/ProviderRegistry.ts index 7063b1fe00a..c7ca06c0295 100644 --- a/packages/di/src/common/registries/ProviderRegistry.ts +++ b/packages/di/src/common/registries/ProviderRegistry.ts @@ -1,8 +1,8 @@ -import {Provider} from "../domain/Provider"; -import {ProviderScope} from "../domain/ProviderScope"; -import {ProviderType} from "../domain/ProviderType"; -import type {ProviderOpts} from "../interfaces/ProviderOpts"; -import {GlobalProviders} from "./GlobalProviders"; +import {Provider} from "../domain/Provider.js"; +import {ProviderScope} from "../domain/ProviderScope.js"; +import {ProviderType} from "../domain/ProviderType.js"; +import type {ProviderOpts} from "../interfaces/ProviderOpts.js"; +import {GlobalProviders} from "./GlobalProviders.js"; /** * diff --git a/packages/di/src/common/services/DIConfiguration.spec.ts b/packages/di/src/common/services/DIConfiguration.spec.ts index 96c27ef3626..295bc789b55 100644 --- a/packages/di/src/common/services/DIConfiguration.spec.ts +++ b/packages/di/src/common/services/DIConfiguration.spec.ts @@ -1,5 +1,5 @@ import {Env} from "@tsed/core"; -import {DIConfiguration} from "./DIConfiguration"; +import {DIConfiguration} from "./DIConfiguration.js"; describe("DIConfiguration", () => { describe("version()", () => { diff --git a/packages/di/src/common/services/DIConfiguration.ts b/packages/di/src/common/services/DIConfiguration.ts index 01db425a969..8c725e273a8 100644 --- a/packages/di/src/common/services/DIConfiguration.ts +++ b/packages/di/src/common/services/DIConfiguration.ts @@ -1,9 +1,9 @@ import {Env, getValue, proxyDelegation, setValue} from "@tsed/core"; -import type {ProviderScope} from "../domain/ProviderScope"; -import type {DILoggerOptions} from "../interfaces/DILoggerOptions"; -import type {DIResolver} from "../interfaces/DIResolver"; -import type {TokenProvider, TokenProviderOpts} from "../interfaces/TokenProvider"; -import type {TokenRoute} from "../interfaces/TokenRoute"; +import type {ProviderScope} from "../domain/ProviderScope.js"; +import type {DILoggerOptions} from "../interfaces/DILoggerOptions.js"; +import type {DIResolver} from "../interfaces/DIResolver.js"; +import type {TokenProvider, TokenProviderOpts} from "../interfaces/TokenProvider.js"; +import type {TokenRoute} from "../interfaces/TokenRoute.js"; export class DIConfiguration { readonly default: Map = new Map(); diff --git a/packages/di/src/common/services/DILogger.spec.ts b/packages/di/src/common/services/DILogger.spec.ts index 5cb53a6bfeb..5a9daf1ad6e 100644 --- a/packages/di/src/common/services/DILogger.spec.ts +++ b/packages/di/src/common/services/DILogger.spec.ts @@ -1,4 +1,4 @@ -import {Container, Inject, Injectable, InjectorService, LOGGER} from "../../common/index"; +import {Container, Inject, Injectable, InjectorService, LOGGER} from "../../common/index.js"; describe("DILogger", () => { it("should inject logger in another service", async () => { diff --git a/packages/di/src/common/services/DILogger.ts b/packages/di/src/common/services/DILogger.ts index 2331b747e5e..455ac2a91c0 100644 --- a/packages/di/src/common/services/DILogger.ts +++ b/packages/di/src/common/services/DILogger.ts @@ -1,6 +1,6 @@ -import {DILogger} from "../interfaces/DILogger"; -import {registerProvider} from "../registries/ProviderRegistry"; -import {InjectorService} from "./InjectorService"; +import {DILogger} from "../interfaces/DILogger.js"; +import {registerProvider} from "../registries/ProviderRegistry.js"; +import {InjectorService} from "./InjectorService.js"; export const LOGGER = Symbol.for("LOGGER"); export type LOGGER = DILogger; diff --git a/packages/di/src/common/services/InjectorService.spec.ts b/packages/di/src/common/services/InjectorService.spec.ts index 39fd0e6beba..ad9cdb735ae 100644 --- a/packages/di/src/common/services/InjectorService.spec.ts +++ b/packages/di/src/common/services/InjectorService.spec.ts @@ -1,16 +1,16 @@ import {Store} from "@tsed/core"; -import {INJECTABLE_PROP} from "../constants/constants"; -import {Configuration} from "../decorators/configuration"; -import {Inject} from "../decorators/inject"; -import {Injectable} from "../decorators/injectable"; -import {Container} from "../domain/Container"; -import {LocalsContainer} from "../domain/LocalsContainer"; -import {Provider} from "../domain/Provider"; -import {ProviderScope} from "../domain/ProviderScope"; -import {ProviderType} from "../domain/ProviderType"; -import {GlobalProviders} from "../registries/GlobalProviders"; -import {registerProvider} from "../registries/ProviderRegistry"; -import {InjectorService} from "./InjectorService"; +import {INJECTABLE_PROP} from "../constants/constants.js"; +import {Configuration} from "../decorators/configuration.js"; +import {Inject} from "../decorators/inject.js"; +import {Injectable} from "../decorators/injectable.js"; +import {Container} from "../domain/Container.js"; +import {LocalsContainer} from "../domain/LocalsContainer.js"; +import {Provider} from "../domain/Provider.js"; +import {ProviderScope} from "../domain/ProviderScope.js"; +import {ProviderType} from "../domain/ProviderType.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; +import {registerProvider} from "../registries/ProviderRegistry.js"; +import {InjectorService} from "./InjectorService.js"; class Test { @Inject() diff --git a/packages/di/src/common/services/InjectorService.ts b/packages/di/src/common/services/InjectorService.ts index d4763f6593e..e89c06fd702 100644 --- a/packages/di/src/common/services/InjectorService.ts +++ b/packages/di/src/common/services/InjectorService.ts @@ -14,29 +14,29 @@ import { nameOf, Store } from "@tsed/core"; -import {DI_PARAM_OPTIONS, INJECTABLE_PROP} from "../constants/constants"; -import {Configuration} from "../decorators/configuration"; -import {Injectable} from "../decorators/injectable"; -import {Container} from "../domain/Container"; -import {InjectablePropertyType} from "../domain/InjectablePropertyType"; -import {LocalsContainer} from "../domain/LocalsContainer"; -import {Provider} from "../domain/Provider"; -import {ProviderScope} from "../domain/ProviderScope"; -import {InjectionError} from "../errors/InjectionError"; -import {InvalidPropertyTokenError} from "../errors/InvalidPropertyTokenError"; -import {UndefinedTokenError} from "../errors/UndefinedTokenError"; -import {DILogger} from "../interfaces/DILogger"; -import {InjectableProperties, InjectablePropertyOptions, InjectablePropertyValue} from "../interfaces/InjectableProperties"; -import {InterceptorContext} from "../interfaces/InterceptorContext"; -import {InterceptorMethods} from "../interfaces/InterceptorMethods"; -import {InvokeOptions} from "../interfaces/InvokeOptions"; -import {ResolvedInvokeOptions} from "../interfaces/ResolvedInvokeOptions"; -import {TokenProvider} from "../interfaces/TokenProvider"; -import {GlobalProviders} from "../registries/GlobalProviders"; -import {createContainer} from "../utils/createContainer"; -import {getConstructorDependencies} from "../utils/getConstructorDependencies"; -import {resolveControllers} from "../utils/resolveControllers"; -import {DIConfiguration} from "./DIConfiguration"; +import {DI_PARAM_OPTIONS, INJECTABLE_PROP} from "../constants/constants.js"; +import {Configuration} from "../decorators/configuration.js"; +import {Injectable} from "../decorators/injectable.js"; +import {Container} from "../domain/Container.js"; +import {InjectablePropertyType} from "../domain/InjectablePropertyType.js"; +import {LocalsContainer} from "../domain/LocalsContainer.js"; +import {Provider} from "../domain/Provider.js"; +import {ProviderScope} from "../domain/ProviderScope.js"; +import {InjectionError} from "../errors/InjectionError.js"; +import {InvalidPropertyTokenError} from "../errors/InvalidPropertyTokenError.js"; +import {UndefinedTokenError} from "../errors/UndefinedTokenError.js"; +import {DILogger} from "../interfaces/DILogger.js"; +import {InjectableProperties, InjectablePropertyOptions, InjectablePropertyValue} from "../interfaces/InjectableProperties.js"; +import {InterceptorContext} from "../interfaces/InterceptorContext.js"; +import {InterceptorMethods} from "../interfaces/InterceptorMethods.js"; +import {InvokeOptions} from "../interfaces/InvokeOptions.js"; +import {ResolvedInvokeOptions} from "../interfaces/ResolvedInvokeOptions.js"; +import {TokenProvider} from "../interfaces/TokenProvider.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; +import {createContainer} from "../utils/createContainer.js"; +import {getConstructorDependencies} from "../utils/getConstructorDependencies.js"; +import {resolveControllers} from "../utils/resolveControllers.js"; +import {DIConfiguration} from "./DIConfiguration.js"; /** * This service contain all services collected by `@Service` or services declared manually with `InjectorService.factory()` or `InjectorService.service()`. @@ -47,9 +47,9 @@ import {DIConfiguration} from "./DIConfiguration"; * import {InjectorService} from "@tsed/di"; * * // Import the services (all services are decorated with @Service()"; - * import MyService1 from "./services/service1"; - * import MyService2 from "./services/service2"; - * import MyService3 from "./services/service3"; + * import MyService1 from "./services/service1.js"; + * import MyService2 from "./services/service2.js"; + * import MyService3 from "./services/service3.js"; * * // When all services are imported, you can load InjectorService. * const injector = new InjectorService() @@ -106,7 +106,7 @@ export class InjectorService extends Container { * * ```typescript * import {InjectorService} from "@tsed/di"; - * import MyService from "./services"; + * import MyService from "./services.js"; * * class OtherService { * constructor(injectorService: InjectorService) { @@ -169,7 +169,7 @@ export class InjectorService extends Container { * * ```typescript * import {InjectorService} from "@tsed/di"; - * import MyService from "./services"; + * import MyService from "./services.js"; * * class OtherService { * constructor(injectorService: InjectorService) { diff --git a/packages/di/src/common/utils/__mock__/module1/Module1.ts b/packages/di/src/common/utils/__mock__/module1/Module1.ts index 013500e3a91..48ec976f4dc 100644 --- a/packages/di/src/common/utils/__mock__/module1/Module1.ts +++ b/packages/di/src/common/utils/__mock__/module1/Module1.ts @@ -1,6 +1,6 @@ -import {SubModule} from "./submodule/SubModule"; -import {Module} from "../../../decorators/module"; -import {M1Ctrl1} from "./controllers/M1Ctrl1"; +import {SubModule} from "./submodule/SubModule.js"; +import {Module} from "../../../decorators/module.js"; +import {M1Ctrl1} from "./controllers/M1Ctrl1.js"; @Module({ mount: { diff --git a/packages/di/src/common/utils/__mock__/module1/controllers/M1Ctrl1.ts b/packages/di/src/common/utils/__mock__/module1/controllers/M1Ctrl1.ts index 6f9e798a143..3baf608a273 100644 --- a/packages/di/src/common/utils/__mock__/module1/controllers/M1Ctrl1.ts +++ b/packages/di/src/common/utils/__mock__/module1/controllers/M1Ctrl1.ts @@ -1,5 +1,5 @@ -import {Controller} from "../../../../decorators/controller"; -import {M1Service} from "../services/M1Service"; +import {Controller} from "../../../../decorators/controller.js"; +import {M1Service} from "../services/M1Service.js"; @Controller("/m1") export class M1Ctrl1 { diff --git a/packages/di/src/common/utils/__mock__/module1/services/M1Service.ts b/packages/di/src/common/utils/__mock__/module1/services/M1Service.ts index 8f6e37ed3fb..0afcacd8b5c 100644 --- a/packages/di/src/common/utils/__mock__/module1/services/M1Service.ts +++ b/packages/di/src/common/utils/__mock__/module1/services/M1Service.ts @@ -1,5 +1,5 @@ -import {Injectable} from "../../../../decorators/injectable"; -import {SubService} from "../submodule/SubService"; +import {Injectable} from "../../../../decorators/injectable.js"; +import {SubService} from "../submodule/SubService.js"; @Injectable() export class M1Service { diff --git a/packages/di/src/common/utils/__mock__/module1/submodule/SubModule.ts b/packages/di/src/common/utils/__mock__/module1/submodule/SubModule.ts index ec0d9f93831..699ddfc0bff 100644 --- a/packages/di/src/common/utils/__mock__/module1/submodule/SubModule.ts +++ b/packages/di/src/common/utils/__mock__/module1/submodule/SubModule.ts @@ -1,5 +1,5 @@ -import {Module} from "../../../../decorators/module"; -import {SubService} from "./SubService"; +import {Module} from "../../../../decorators/module.js"; +import {SubService} from "./SubService.js"; @Module({ imports: [SubService] diff --git a/packages/di/src/common/utils/__mock__/module1/submodule/SubService.ts b/packages/di/src/common/utils/__mock__/module1/submodule/SubService.ts index 8425dc9e7f0..c28b6e2a471 100644 --- a/packages/di/src/common/utils/__mock__/module1/submodule/SubService.ts +++ b/packages/di/src/common/utils/__mock__/module1/submodule/SubService.ts @@ -1,4 +1,4 @@ -import {Injectable} from "../../../../decorators/injectable"; +import {Injectable} from "../../../../decorators/injectable.js"; @Injectable() export class SubService {} diff --git a/packages/di/src/common/utils/__mock__/module2/Module2.ts b/packages/di/src/common/utils/__mock__/module2/Module2.ts index 6b215dace44..ddf77400257 100644 --- a/packages/di/src/common/utils/__mock__/module2/Module2.ts +++ b/packages/di/src/common/utils/__mock__/module2/Module2.ts @@ -1,5 +1,5 @@ -import {Module} from "../../../decorators/module"; -import {M2Ctrl} from "./controllers/M2Ctrl"; +import {Module} from "../../../decorators/module.js"; +import {M2Ctrl} from "./controllers/M2Ctrl.js"; @Module({ mount: { diff --git a/packages/di/src/common/utils/__mock__/module2/controllers/M2Ctrl.ts b/packages/di/src/common/utils/__mock__/module2/controllers/M2Ctrl.ts index c1d706ccaf6..27927793905 100644 --- a/packages/di/src/common/utils/__mock__/module2/controllers/M2Ctrl.ts +++ b/packages/di/src/common/utils/__mock__/module2/controllers/M2Ctrl.ts @@ -1,3 +1,3 @@ -import {Controller} from "../../../../decorators/controller"; +import {Controller} from "../../../../decorators/controller.js"; @Controller("/m2") export class M2Ctrl {} diff --git a/packages/di/src/common/utils/colors.spec.ts b/packages/di/src/common/utils/colors.spec.ts index c00afec93c0..b56c734c74e 100644 --- a/packages/di/src/common/utils/colors.spec.ts +++ b/packages/di/src/common/utils/colors.spec.ts @@ -1,4 +1,4 @@ -import {colors} from "./colors"; +import {colors} from "./colors.js"; describe("colors", () => { it("should call colors", () => { diff --git a/packages/di/src/common/utils/createContainer.spec.ts b/packages/di/src/common/utils/createContainer.spec.ts index 5727d3e3478..a0e65f10019 100644 --- a/packages/di/src/common/utils/createContainer.spec.ts +++ b/packages/di/src/common/utils/createContainer.spec.ts @@ -1,6 +1,6 @@ -import {Module} from "../decorators/module"; -import {Container} from "../domain/Container"; -import {createContainer} from "./createContainer"; +import {Module} from "../decorators/module.js"; +import {Container} from "../domain/Container.js"; +import {createContainer} from "./createContainer.js"; describe("createContainer", () => { it("should createContainer", () => { diff --git a/packages/di/src/common/utils/createContainer.ts b/packages/di/src/common/utils/createContainer.ts index 85d285527a8..1a6d809e8a5 100644 --- a/packages/di/src/common/utils/createContainer.ts +++ b/packages/di/src/common/utils/createContainer.ts @@ -1,6 +1,6 @@ import {Type} from "@tsed/core"; -import {Container} from "../domain/Container"; -import {GlobalProviders} from "../registries/GlobalProviders"; +import {Container} from "../domain/Container.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; export function createContainer(rootModule?: Type) { const container = new Container(GlobalProviders.entries()); diff --git a/packages/di/src/common/utils/getConfiguration.spec.ts b/packages/di/src/common/utils/getConfiguration.spec.ts index cf32d04918a..f7499500186 100644 --- a/packages/di/src/common/utils/getConfiguration.spec.ts +++ b/packages/di/src/common/utils/getConfiguration.spec.ts @@ -1,5 +1,5 @@ -import {Configuration} from "../decorators/configuration"; -import {getConfiguration} from "./getConfiguration"; +import {Configuration} from "../decorators/configuration.js"; +import {getConfiguration} from "./getConfiguration.js"; class MyController1 {} diff --git a/packages/di/src/common/utils/resolveControllers.spec.ts b/packages/di/src/common/utils/resolveControllers.spec.ts index 10eba8e4a50..1f58270f225 100644 --- a/packages/di/src/common/utils/resolveControllers.spec.ts +++ b/packages/di/src/common/utils/resolveControllers.spec.ts @@ -1,10 +1,10 @@ import {nameOf} from "@tsed/core"; -import {Controller} from "../decorators/controller"; -import {Module1} from "./__mock__/module1/Module1"; -import {Module2} from "./__mock__/module2/Module2"; -import {M1Ctrl1} from "./__mock__/module1/controllers/M1Ctrl1"; -import {M2Ctrl} from "./__mock__/module2/controllers/M2Ctrl"; -import {resolveControllers} from "./resolveControllers"; +import {Controller} from "../decorators/controller.js"; +import {Module1} from "./__mock__/module1/Module1.js"; +import {Module2} from "./__mock__/module2/Module2.js"; +import {M1Ctrl1} from "./__mock__/module1/controllers/M1Ctrl1.js"; +import {M2Ctrl} from "./__mock__/module2/controllers/M2Ctrl.js"; +import {resolveControllers} from "./resolveControllers.js"; @Controller("/root") class TestCtrl {} diff --git a/packages/di/src/common/utils/resolveControllers.ts b/packages/di/src/common/utils/resolveControllers.ts index a3206bd3186..002e1a99ed0 100644 --- a/packages/di/src/common/utils/resolveControllers.ts +++ b/packages/di/src/common/utils/resolveControllers.ts @@ -1,9 +1,9 @@ import {isArray, isClass} from "@tsed/core"; -import {TokenProvider} from "../interfaces/TokenProvider"; -import {GlobalProviders} from "../registries/GlobalProviders"; -import {ProviderType} from "../domain/ProviderType"; -import {Provider} from "../domain/Provider"; -import {TokenRoute} from "../interfaces/TokenRoute"; +import {TokenProvider} from "../interfaces/TokenProvider.js"; +import {GlobalProviders} from "../registries/GlobalProviders.js"; +import {ProviderType} from "../domain/ProviderType.js"; +import {Provider} from "../domain/Provider.js"; +import {TokenRoute} from "../interfaces/TokenRoute.js"; const lookupProperties = ["mount", "imports"]; diff --git a/packages/di/src/index.ts b/packages/di/src/index.ts index 4e2b5f5549b..e88ae51b8e2 100644 --- a/packages/di/src/index.ts +++ b/packages/di/src/index.ts @@ -1,2 +1,2 @@ -export * from "./common/index"; -export * from "./node/index"; +export * from "./common/index.js"; +export * from "./node/index.js"; diff --git a/packages/di/src/node/decorators/injectContext.ts b/packages/di/src/node/decorators/injectContext.ts index 5118ceed067..9bb7c6849d1 100644 --- a/packages/di/src/node/decorators/injectContext.ts +++ b/packages/di/src/node/decorators/injectContext.ts @@ -1,5 +1,5 @@ -import {injectProperty} from "../../common/index"; -import {getContext} from "../utils/asyncHookContext"; +import {injectProperty} from "../../common/index.js"; +import {getContext} from "../utils/asyncHookContext.js"; /** * Inject a context like PlatformContext or any BaseContext. diff --git a/packages/di/src/node/domain/ContextLogger.spec.ts b/packages/di/src/node/domain/ContextLogger.spec.ts index e3a764f55e1..09a04c64df8 100644 --- a/packages/di/src/node/domain/ContextLogger.spec.ts +++ b/packages/di/src/node/domain/ContextLogger.spec.ts @@ -1,5 +1,5 @@ -import {InjectorService} from "../../common/index"; -import {ContextLogger} from "./ContextLogger"; +import {InjectorService} from "../../common/index.js"; +import {ContextLogger} from "./ContextLogger.js"; function getIgnoreLogFixture(ignore: string[], url: string) { const ignoreReg = ignore.map((pattern: string | RegExp) => (typeof pattern === "string" ? new RegExp(pattern, "gi") : pattern)); diff --git a/packages/di/src/node/domain/ContextLogger.ts b/packages/di/src/node/domain/ContextLogger.ts index 2cadc65fc17..b60925dddad 100644 --- a/packages/di/src/node/domain/ContextLogger.ts +++ b/packages/di/src/node/domain/ContextLogger.ts @@ -1,4 +1,4 @@ -import {DILogger} from "../../common/index"; +import {DILogger} from "../../common/index.js"; import {Hooks} from "@tsed/core"; import {levels, LogLevel} from "@tsed/logger"; diff --git a/packages/di/src/node/domain/DIContext.spec.ts b/packages/di/src/node/domain/DIContext.spec.ts index 489d6de9662..7bb6c2f7615 100644 --- a/packages/di/src/node/domain/DIContext.spec.ts +++ b/packages/di/src/node/domain/DIContext.spec.ts @@ -1,6 +1,6 @@ -import {DITest} from "../services/DITest"; -import {bindContext, getAsyncStore} from "../utils/asyncHookContext"; -import {DIContext} from "./DIContext"; +import {DITest} from "../services/DITest.js"; +import {bindContext, getAsyncStore} from "../utils/asyncHookContext.js"; +import {DIContext} from "./DIContext.js"; describe("DIContext", () => { beforeEach(() => DITest.create()); diff --git a/packages/di/src/node/domain/DIContext.ts b/packages/di/src/node/domain/DIContext.ts index dc326991665..662fd8777b3 100644 --- a/packages/di/src/node/domain/DIContext.ts +++ b/packages/di/src/node/domain/DIContext.ts @@ -1,6 +1,6 @@ -import {InjectorService, LocalsContainer} from "../../common/index"; -import {runInContext} from "../utils/asyncHookContext"; -import {ContextLogger, ContextLoggerOptions} from "./ContextLogger"; +import {InjectorService, LocalsContainer} from "../../common/index.js"; +import {runInContext} from "../utils/asyncHookContext.js"; +import {ContextLogger, ContextLoggerOptions} from "./ContextLogger.js"; export interface DIContextOptions extends Omit { id: string; diff --git a/packages/di/src/node/index.ts b/packages/di/src/node/index.ts index 4f7d753589c..9474162ce5d 100644 --- a/packages/di/src/node/index.ts +++ b/packages/di/src/node/index.ts @@ -2,14 +2,14 @@ * @file Automatically generated by barrelsby. */ -export * from "./decorators/injectContext"; -export * from "./domain/ContextLogger"; -export * from "./domain/DIContext"; -export * from "./interfaces/AlterRunInContext"; -export * from "./services/DILogger"; -export * from "./services/DITest"; -export * from "./utils/asyncHookContext"; -export * from "./utils/attachLogger"; -export * from "./utils/setLoggerConfiguration"; -export * from "./utils/setLoggerFormat"; -export * from "./utils/setLoggerLevel"; +export * from "./decorators/injectContext.js"; +export * from "./domain/ContextLogger.js"; +export * from "./domain/DIContext.js"; +export * from "./interfaces/AlterRunInContext.js"; +export * from "./services/DILogger.js"; +export * from "./services/DITest.js"; +export * from "./utils/asyncHookContext.js"; +export * from "./utils/attachLogger.js"; +export * from "./utils/setLoggerConfiguration.js"; +export * from "./utils/setLoggerFormat.js"; +export * from "./utils/setLoggerLevel.js"; diff --git a/packages/di/src/node/integration/async-factory-invoke.spec.ts b/packages/di/src/node/integration/async-factory-invoke.spec.ts index 4b274b407e3..91f90720b67 100644 --- a/packages/di/src/node/integration/async-factory-invoke.spec.ts +++ b/packages/di/src/node/integration/async-factory-invoke.spec.ts @@ -1,4 +1,4 @@ -import {Inject, Injectable, registerProvider, DITest} from "../../index"; +import {Inject, Injectable, registerProvider, DITest} from "../../index.js"; const PrimaryPostgresDb = Symbol.for("PrimaryPostgresDb"); type PrimaryPostgresDb = {id: string}; diff --git a/packages/di/src/node/integration/inject-context.spec.ts b/packages/di/src/node/integration/inject-context.spec.ts index 3b20e306d35..2088df52db5 100644 --- a/packages/di/src/node/integration/inject-context.spec.ts +++ b/packages/di/src/node/integration/inject-context.spec.ts @@ -1,8 +1,8 @@ -import {Injectable} from "../../common/index"; -import {InjectContext} from "../decorators/injectContext"; -import {DIContext} from "../domain/DIContext"; -import {DITest} from "../services/DITest"; -import {runInContext} from "../utils/asyncHookContext"; +import {Injectable} from "../../common/index.js"; +import {InjectContext} from "../decorators/injectContext.js"; +import {DIContext} from "../domain/DIContext.js"; +import {DITest} from "../services/DITest.js"; +import {runInContext} from "../utils/asyncHookContext.js"; @Injectable() class MyService { diff --git a/packages/di/src/node/integration/invoke-oninit.spec.ts b/packages/di/src/node/integration/invoke-oninit.spec.ts index 4b875d8ca3a..d9686639aa6 100644 --- a/packages/di/src/node/integration/invoke-oninit.spec.ts +++ b/packages/di/src/node/integration/invoke-oninit.spec.ts @@ -1,4 +1,4 @@ -import {Inject, Injectable, registerProvider, DITest} from "../../index"; +import {Inject, Injectable, registerProvider, DITest} from "../../index.js"; @Injectable() export class MyService { diff --git a/packages/di/src/node/services/DILogger.spec.ts b/packages/di/src/node/services/DILogger.spec.ts index 67f91447717..7504fdcecff 100644 --- a/packages/di/src/node/services/DILogger.spec.ts +++ b/packages/di/src/node/services/DILogger.spec.ts @@ -1,5 +1,5 @@ import {Logger} from "@tsed/logger"; -import {Container, Inject, Injectable, InjectorService} from "../../common/index"; +import {Container, Inject, Injectable, InjectorService} from "../../common/index.js"; describe("DILogger", () => { it("should inject logger in another service", async () => { diff --git a/packages/di/src/node/services/DILogger.ts b/packages/di/src/node/services/DILogger.ts index 91140bd7f0b..6eb7e2f6a04 100644 --- a/packages/di/src/node/services/DILogger.ts +++ b/packages/di/src/node/services/DILogger.ts @@ -1,5 +1,5 @@ import {Logger} from "@tsed/logger"; -import {InjectorService, registerProvider} from "../../common/index"; +import {InjectorService, registerProvider} from "../../common/index.js"; registerProvider({ provide: Logger, diff --git a/packages/di/src/node/services/DITest.spec.ts b/packages/di/src/node/services/DITest.spec.ts index 437cf65c1a2..86c8950c2bc 100644 --- a/packages/di/src/node/services/DITest.spec.ts +++ b/packages/di/src/node/services/DITest.spec.ts @@ -1,6 +1,6 @@ import {Logger} from "@tsed/logger"; -import {Inject, Injectable, InjectorService, registerProvider, Service} from "../../index"; -import {DITest} from "../services/DITest"; +import {Inject, Injectable, InjectorService, registerProvider, Service} from "../../index.js"; +import {DITest} from "../services/DITest.js"; class Model {} diff --git a/packages/di/src/node/services/DITest.ts b/packages/di/src/node/services/DITest.ts index b8326edfcbc..a14287a8f25 100644 --- a/packages/di/src/node/services/DITest.ts +++ b/packages/di/src/node/services/DITest.ts @@ -1,8 +1,8 @@ import {Env, getValue, isClass, isPromise, setValue} from "@tsed/core"; import {$log} from "@tsed/logger"; -import {createContainer, InjectorService, LocalsContainer, OnInit, Provider, TokenProvider, TokenProviderOpts} from "../../common/index"; -import {DIContext} from "../domain/DIContext"; -import {setLoggerConfiguration} from "../utils/setLoggerConfiguration"; +import {createContainer, InjectorService, LocalsContainer, OnInit, Provider, TokenProvider, TokenProviderOpts} from "../../common/index.js"; +import {DIContext} from "../domain/DIContext.js"; +import {setLoggerConfiguration} from "../utils/setLoggerConfiguration.js"; /** * Tool to run test with lightweight DI sandbox. diff --git a/packages/di/src/node/utils/__mock__/module1/Module1.ts b/packages/di/src/node/utils/__mock__/module1/Module1.ts index 013500e3a91..48ec976f4dc 100644 --- a/packages/di/src/node/utils/__mock__/module1/Module1.ts +++ b/packages/di/src/node/utils/__mock__/module1/Module1.ts @@ -1,6 +1,6 @@ -import {SubModule} from "./submodule/SubModule"; -import {Module} from "../../../decorators/module"; -import {M1Ctrl1} from "./controllers/M1Ctrl1"; +import {SubModule} from "./submodule/SubModule.js"; +import {Module} from "../../../decorators/module.js"; +import {M1Ctrl1} from "./controllers/M1Ctrl1.js"; @Module({ mount: { diff --git a/packages/di/src/node/utils/__mock__/module1/controllers/M1Ctrl1.ts b/packages/di/src/node/utils/__mock__/module1/controllers/M1Ctrl1.ts index 6f9e798a143..3baf608a273 100644 --- a/packages/di/src/node/utils/__mock__/module1/controllers/M1Ctrl1.ts +++ b/packages/di/src/node/utils/__mock__/module1/controllers/M1Ctrl1.ts @@ -1,5 +1,5 @@ -import {Controller} from "../../../../decorators/controller"; -import {M1Service} from "../services/M1Service"; +import {Controller} from "../../../../decorators/controller.js"; +import {M1Service} from "../services/M1Service.js"; @Controller("/m1") export class M1Ctrl1 { diff --git a/packages/di/src/node/utils/__mock__/module1/services/M1Service.ts b/packages/di/src/node/utils/__mock__/module1/services/M1Service.ts index 8f6e37ed3fb..0afcacd8b5c 100644 --- a/packages/di/src/node/utils/__mock__/module1/services/M1Service.ts +++ b/packages/di/src/node/utils/__mock__/module1/services/M1Service.ts @@ -1,5 +1,5 @@ -import {Injectable} from "../../../../decorators/injectable"; -import {SubService} from "../submodule/SubService"; +import {Injectable} from "../../../../decorators/injectable.js"; +import {SubService} from "../submodule/SubService.js"; @Injectable() export class M1Service { diff --git a/packages/di/src/node/utils/__mock__/module1/submodule/SubModule.ts b/packages/di/src/node/utils/__mock__/module1/submodule/SubModule.ts index ec0d9f93831..699ddfc0bff 100644 --- a/packages/di/src/node/utils/__mock__/module1/submodule/SubModule.ts +++ b/packages/di/src/node/utils/__mock__/module1/submodule/SubModule.ts @@ -1,5 +1,5 @@ -import {Module} from "../../../../decorators/module"; -import {SubService} from "./SubService"; +import {Module} from "../../../../decorators/module.js"; +import {SubService} from "./SubService.js"; @Module({ imports: [SubService] diff --git a/packages/di/src/node/utils/__mock__/module1/submodule/SubService.ts b/packages/di/src/node/utils/__mock__/module1/submodule/SubService.ts index 8425dc9e7f0..c28b6e2a471 100644 --- a/packages/di/src/node/utils/__mock__/module1/submodule/SubService.ts +++ b/packages/di/src/node/utils/__mock__/module1/submodule/SubService.ts @@ -1,4 +1,4 @@ -import {Injectable} from "../../../../decorators/injectable"; +import {Injectable} from "../../../../decorators/injectable.js"; @Injectable() export class SubService {} diff --git a/packages/di/src/node/utils/__mock__/module2/Module2.ts b/packages/di/src/node/utils/__mock__/module2/Module2.ts index 6b215dace44..ddf77400257 100644 --- a/packages/di/src/node/utils/__mock__/module2/Module2.ts +++ b/packages/di/src/node/utils/__mock__/module2/Module2.ts @@ -1,5 +1,5 @@ -import {Module} from "../../../decorators/module"; -import {M2Ctrl} from "./controllers/M2Ctrl"; +import {Module} from "../../../decorators/module.js"; +import {M2Ctrl} from "./controllers/M2Ctrl.js"; @Module({ mount: { diff --git a/packages/di/src/node/utils/__mock__/module2/controllers/M2Ctrl.ts b/packages/di/src/node/utils/__mock__/module2/controllers/M2Ctrl.ts index 5b685d77ec5..c2d047ab0bd 100644 --- a/packages/di/src/node/utils/__mock__/module2/controllers/M2Ctrl.ts +++ b/packages/di/src/node/utils/__mock__/module2/controllers/M2Ctrl.ts @@ -1,4 +1,4 @@ -import {Controller} from "../../../../decorators/controller"; +import {Controller} from "../../../../decorators/controller.js"; @Controller("/m2") export class M2Ctrl {} diff --git a/packages/di/src/node/utils/asyncHookContext.spec.ts b/packages/di/src/node/utils/asyncHookContext.spec.ts index 1444a316c37..660d12680b7 100644 --- a/packages/di/src/node/utils/asyncHookContext.spec.ts +++ b/packages/di/src/node/utils/asyncHookContext.spec.ts @@ -1,5 +1,5 @@ -import {DITest} from "../services/DITest"; -import {runInContext, setContext, getContext} from "./asyncHookContext"; +import {DITest} from "../services/DITest.js"; +import {runInContext, setContext, getContext} from "./asyncHookContext.js"; describe("asyncHookContext", () => { beforeEach(() => DITest.create()); diff --git a/packages/di/src/node/utils/asyncHookContext.ts b/packages/di/src/node/utils/asyncHookContext.ts index b67c37d8c55..5a0a25483c4 100644 --- a/packages/di/src/node/utils/asyncHookContext.ts +++ b/packages/di/src/node/utils/asyncHookContext.ts @@ -1,6 +1,6 @@ import {AsyncLocalStorage, AsyncResource} from "async_hooks"; -import {InjectorService} from "../../common/index"; -import type {DIContext} from "../domain/DIContext"; +import {InjectorService} from "../../common/index.js"; +import type {DIContext} from "../domain/DIContext.js"; const storage: AsyncLocalStorage<{current: DIContext | undefined}> = new AsyncLocalStorage(); diff --git a/packages/di/src/node/utils/attachLogger.spec.ts b/packages/di/src/node/utils/attachLogger.spec.ts index f1c0b50917b..0e608ae11ce 100644 --- a/packages/di/src/node/utils/attachLogger.spec.ts +++ b/packages/di/src/node/utils/attachLogger.spec.ts @@ -1,6 +1,6 @@ import {Logger} from "@tsed/logger"; -import {InjectorService} from "../../common/index"; -import {attachLogger} from "./attachLogger"; +import {InjectorService} from "../../common/index.js"; +import {attachLogger} from "./attachLogger.js"; describe("attachLogger", () => { it("should attach logger", () => { diff --git a/packages/di/src/node/utils/attachLogger.ts b/packages/di/src/node/utils/attachLogger.ts index f374b49d982..4ed6a035fba 100644 --- a/packages/di/src/node/utils/attachLogger.ts +++ b/packages/di/src/node/utils/attachLogger.ts @@ -1,5 +1,5 @@ -import {DILogger, InjectorService} from "../../common/index"; -import {setLoggerConfiguration} from "./setLoggerConfiguration"; +import {DILogger, InjectorService} from "../../common/index.js"; +import {setLoggerConfiguration} from "./setLoggerConfiguration.js"; export function attachLogger(injector: InjectorService, $log: DILogger) { injector.logger = $log; diff --git a/packages/di/src/node/utils/setLoggerConfiguration.spec.ts b/packages/di/src/node/utils/setLoggerConfiguration.spec.ts index 2ca047fd64e..9647ad9f061 100644 --- a/packages/di/src/node/utils/setLoggerConfiguration.spec.ts +++ b/packages/di/src/node/utils/setLoggerConfiguration.spec.ts @@ -1,6 +1,6 @@ import {Logger} from "@tsed/logger"; -import {InjectorService} from "../../common/index"; -import {setLoggerConfiguration} from "./setLoggerConfiguration"; +import {InjectorService} from "../../common/index.js"; +import {setLoggerConfiguration} from "./setLoggerConfiguration.js"; describe("setLoggerConfiguration", () => { it("should change the logger level depending on the configuration", () => { diff --git a/packages/di/src/node/utils/setLoggerConfiguration.ts b/packages/di/src/node/utils/setLoggerConfiguration.ts index 08733d4db76..da96dd7f24b 100644 --- a/packages/di/src/node/utils/setLoggerConfiguration.ts +++ b/packages/di/src/node/utils/setLoggerConfiguration.ts @@ -1,6 +1,6 @@ -import type {InjectorService} from "../../common/index"; -import {setLoggerFormat} from "./setLoggerFormat"; -import {setLoggerLevel} from "./setLoggerLevel"; +import type {InjectorService} from "../../common/index.js"; +import {setLoggerFormat} from "./setLoggerFormat.js"; +import {setLoggerLevel} from "./setLoggerLevel.js"; export function setLoggerConfiguration(injector: InjectorService) { setLoggerLevel(injector); diff --git a/packages/di/src/node/utils/setLoggerFormat.ts b/packages/di/src/node/utils/setLoggerFormat.ts index be434ecfdd2..46e77c0ddd2 100644 --- a/packages/di/src/node/utils/setLoggerFormat.ts +++ b/packages/di/src/node/utils/setLoggerFormat.ts @@ -1,4 +1,4 @@ -import type {InjectorService} from "../../common/index"; +import type {InjectorService} from "../../common/index.js"; /** * @ignore diff --git a/packages/di/src/node/utils/setLoggerLevel.ts b/packages/di/src/node/utils/setLoggerLevel.ts index e197c62b019..5caafaa9708 100644 --- a/packages/di/src/node/utils/setLoggerLevel.ts +++ b/packages/di/src/node/utils/setLoggerLevel.ts @@ -1,4 +1,4 @@ -import type {InjectorService} from "../../common/index"; +import type {InjectorService} from "../../common/index.js"; /** * @ignore diff --git a/packages/engines/readme.md b/packages/engines/readme.md index 07f8d0f91d5..30c37389ac8 100644 --- a/packages/engines/readme.md +++ b/packages/engines/readme.md @@ -164,7 +164,7 @@ console.log("Express server listening on port 3000"); `@tsed/engines` can be used with Koa as following: ```typescript -import {getEngines} from "./getEngines"; +import {getEngines} from "./getEngines.js"; var views = require("koa-views"); diff --git a/packages/engines/src/components/AtplEngine.ts b/packages/engines/src/components/AtplEngine.ts index 2f100c00344..ec0dd3b74dc 100644 --- a/packages/engines/src/components/AtplEngine.ts +++ b/packages/engines/src/components/AtplEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("atpl") export class AtplEngine extends Engine {} diff --git a/packages/engines/src/components/BracketEngine.ts b/packages/engines/src/components/BracketEngine.ts index 691fa7acb21..61858d7c3a6 100644 --- a/packages/engines/src/components/BracketEngine.ts +++ b/packages/engines/src/components/BracketEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("bracket", { requires: "bracket-template" diff --git a/packages/engines/src/components/DotEngine.ts b/packages/engines/src/components/DotEngine.ts index 29a4874e072..f2f5954e778 100644 --- a/packages/engines/src/components/DotEngine.ts +++ b/packages/engines/src/components/DotEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("dot") export class DotEngine extends Engine { diff --git a/packages/engines/src/components/DustEngine.ts b/packages/engines/src/components/DustEngine.ts index 194e7510437..fa53416caa5 100644 --- a/packages/engines/src/components/DustEngine.ts +++ b/packages/engines/src/components/DustEngine.ts @@ -1,7 +1,7 @@ -import {read} from "../utils/cache"; +import {read} from "../utils/cache.js"; import {extname} from "path"; -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; import {promisify} from "util"; @ViewEngine("dust", { diff --git a/packages/engines/src/components/EctEngine.ts b/packages/engines/src/components/EctEngine.ts index 034cc9b55ec..025a5b74a45 100644 --- a/packages/engines/src/components/EctEngine.ts +++ b/packages/engines/src/components/EctEngine.ts @@ -1,6 +1,6 @@ import {promisify} from "util"; -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("ect") export class EctEngine extends Engine { diff --git a/packages/engines/src/components/EjsEngine.ts b/packages/engines/src/components/EjsEngine.ts index 8ada57f21cc..35dd85f9fb8 100644 --- a/packages/engines/src/components/EjsEngine.ts +++ b/packages/engines/src/components/EjsEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("ejs") export class EjsEngine extends Engine {} diff --git a/packages/engines/src/components/Engine.ts b/packages/engines/src/components/Engine.ts index 95b222da580..4cc6e8ee67e 100644 --- a/packages/engines/src/components/Engine.ts +++ b/packages/engines/src/components/Engine.ts @@ -1,4 +1,4 @@ -import {cache, getCachedEngine, importEngine, read, readPartials} from "../utils/cache"; +import {cache, getCachedEngine, importEngine, read, readPartials} from "../utils/cache.js"; export interface ViewEngineOptions { requires?: string | string[]; @@ -13,7 +13,10 @@ export interface EngineOptions { export class Engine { protected driverName: string; - constructor(readonly name: string, readonly options: ViewEngineOptions) {} + constructor( + readonly name: string, + readonly options: ViewEngineOptions + ) {} get engine(): any { return getCachedEngine(this.name); diff --git a/packages/engines/src/components/HamlCoffeeEngine.ts b/packages/engines/src/components/HamlCoffeeEngine.ts index 089baf73fca..8aa032dae24 100644 --- a/packages/engines/src/components/HamlCoffeeEngine.ts +++ b/packages/engines/src/components/HamlCoffeeEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("haml-coffee") export class HamlCoffeeEngine extends Engine {} diff --git a/packages/engines/src/components/HamlEngine.ts b/packages/engines/src/components/HamlEngine.ts index 2aa2da8b25d..42bae84d167 100644 --- a/packages/engines/src/components/HamlEngine.ts +++ b/packages/engines/src/components/HamlEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("haml") export class HamlEngine extends Engine { diff --git a/packages/engines/src/components/HamletEngine.ts b/packages/engines/src/components/HamletEngine.ts index 040cce11967..713f9af5bf7 100644 --- a/packages/engines/src/components/HamletEngine.ts +++ b/packages/engines/src/components/HamletEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("hamlet") export class HamletEngine extends Engine { diff --git a/packages/engines/src/components/HandlebarsEngine.ts b/packages/engines/src/components/HandlebarsEngine.ts index e23ad74032c..034bc9dd7fb 100644 --- a/packages/engines/src/components/HandlebarsEngine.ts +++ b/packages/engines/src/components/HandlebarsEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("handlebars") export class HandlebarsEngine extends Engine { diff --git a/packages/engines/src/components/HoganEngine.spec.ts b/packages/engines/src/components/HoganEngine.spec.ts index 1a59616d81b..fa1f0df8657 100644 --- a/packages/engines/src/components/HoganEngine.spec.ts +++ b/packages/engines/src/components/HoganEngine.spec.ts @@ -1,6 +1,6 @@ import {expect} from "chai"; -import {getEngineFixture} from "../../test/getEngineFixture"; -import {HoganEngine} from "./HoganEngine"; +import {getEngineFixture} from "../../test/getEngineFixture.js"; +import {HoganEngine} from "./HoganEngine.js"; import {join} from "path"; describe("HoganEngine", () => { diff --git a/packages/engines/src/components/HoganEngine.ts b/packages/engines/src/components/HoganEngine.ts index bd1517470f7..1d3c0d2d844 100644 --- a/packages/engines/src/components/HoganEngine.ts +++ b/packages/engines/src/components/HoganEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine, EngineOptions} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine, EngineOptions} from "./Engine.js"; @ViewEngine("hogan", { requires: "hogan.js" diff --git a/packages/engines/src/components/HtmlingEngine.ts b/packages/engines/src/components/HtmlingEngine.ts index dec357a5ce6..a9f965e0f3d 100644 --- a/packages/engines/src/components/HtmlingEngine.ts +++ b/packages/engines/src/components/HtmlingEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("htmling") export class HtmlingEngine extends Engine { diff --git a/packages/engines/src/components/JazzEngine.ts b/packages/engines/src/components/JazzEngine.ts index 8bd9b0347c2..3b34a16367d 100644 --- a/packages/engines/src/components/JazzEngine.ts +++ b/packages/engines/src/components/JazzEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("jazz") export class JazzEngine extends Engine { diff --git a/packages/engines/src/components/JqtplEngine.ts b/packages/engines/src/components/JqtplEngine.ts index db351007830..aad8867d536 100644 --- a/packages/engines/src/components/JqtplEngine.ts +++ b/packages/engines/src/components/JqtplEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("jqtpl") export class JqtplEngine extends Engine { diff --git a/packages/engines/src/components/JustEngine.ts b/packages/engines/src/components/JustEngine.ts index fc29ed4b39a..6fd9193d882 100644 --- a/packages/engines/src/components/JustEngine.ts +++ b/packages/engines/src/components/JustEngine.ts @@ -1,6 +1,6 @@ import {promisify} from "util"; -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("just") export class JustEngine extends Engine { diff --git a/packages/engines/src/components/LiquorEngine.ts b/packages/engines/src/components/LiquorEngine.ts index a136ad91270..a767d1c7dc3 100644 --- a/packages/engines/src/components/LiquorEngine.ts +++ b/packages/engines/src/components/LiquorEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("liquor") export class LiquorEngine extends Engine {} diff --git a/packages/engines/src/components/LodashEngine.ts b/packages/engines/src/components/LodashEngine.ts index 16c70062020..2ca974c3da9 100644 --- a/packages/engines/src/components/LodashEngine.ts +++ b/packages/engines/src/components/LodashEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("lodash") export class LodashEngine extends Engine { diff --git a/packages/engines/src/components/MoteEngine.ts b/packages/engines/src/components/MoteEngine.ts index 8e6b7234362..6e3c2a820e9 100644 --- a/packages/engines/src/components/MoteEngine.ts +++ b/packages/engines/src/components/MoteEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("mote") export class MoteEngine extends Engine {} diff --git a/packages/engines/src/components/MustacheEngine.ts b/packages/engines/src/components/MustacheEngine.ts index de09692dc38..a44572f54c5 100644 --- a/packages/engines/src/components/MustacheEngine.ts +++ b/packages/engines/src/components/MustacheEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("mustache") export class MustacheEngine extends Engine { diff --git a/packages/engines/src/components/NunjucksEngine.ts b/packages/engines/src/components/NunjucksEngine.ts index 6494c0f0de1..834ca7c0b0b 100644 --- a/packages/engines/src/components/NunjucksEngine.ts +++ b/packages/engines/src/components/NunjucksEngine.ts @@ -1,6 +1,6 @@ import {promisify} from "util"; -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("nunjucks") export class NunjucksEngine extends Engine { diff --git a/packages/engines/src/components/PlatesEngine.ts b/packages/engines/src/components/PlatesEngine.ts index 9d0e8a170d0..61ec8072131 100644 --- a/packages/engines/src/components/PlatesEngine.ts +++ b/packages/engines/src/components/PlatesEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("plates") export class PlatesEngine extends Engine { diff --git a/packages/engines/src/components/PugEngine.spec.ts b/packages/engines/src/components/PugEngine.spec.ts index b1cc6f3fb0a..7a815f30baa 100644 --- a/packages/engines/src/components/PugEngine.spec.ts +++ b/packages/engines/src/components/PugEngine.spec.ts @@ -1,6 +1,6 @@ import {expect} from "chai"; -import {getEngineFixture} from "../../test/getEngineFixture"; -import {PugEngine} from "./PugEngine"; +import {getEngineFixture} from "../../test/getEngineFixture.js"; +import {PugEngine} from "./PugEngine.js"; describe("PugEngine", () => { it("should render the given content (by string - no cache)", async () => { diff --git a/packages/engines/src/components/PugEngine.ts b/packages/engines/src/components/PugEngine.ts index f512756313c..345339f839f 100644 --- a/packages/engines/src/components/PugEngine.ts +++ b/packages/engines/src/components/PugEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("pug", { requires: ["pug", "then-pug"] diff --git a/packages/engines/src/components/RactiveEngine.spec.ts b/packages/engines/src/components/RactiveEngine.spec.ts index c031668ff18..224c1a5ed79 100644 --- a/packages/engines/src/components/RactiveEngine.spec.ts +++ b/packages/engines/src/components/RactiveEngine.spec.ts @@ -1,6 +1,6 @@ import {expect} from "chai"; -import {getEngineFixture} from "../../test/getEngineFixture"; -import {RactiveEngine} from "./RactiveEngine"; +import {getEngineFixture} from "../../test/getEngineFixture.js"; +import {RactiveEngine} from "./RactiveEngine.js"; describe("RactiveEngine", () => { it("should render the given content (by string - no cache)", async () => { diff --git a/packages/engines/src/components/RactiveEngine.ts b/packages/engines/src/components/RactiveEngine.ts index d8e778696be..c8106c595ee 100644 --- a/packages/engines/src/components/RactiveEngine.ts +++ b/packages/engines/src/components/RactiveEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine, EngineOptions} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine, EngineOptions} from "./Engine.js"; @ViewEngine("ractive") export class RactiveEngine extends Engine { diff --git a/packages/engines/src/components/ReactEngine.ts b/packages/engines/src/components/ReactEngine.ts index 7ba96c32dcd..ebc220e16c3 100644 --- a/packages/engines/src/components/ReactEngine.ts +++ b/packages/engines/src/components/ReactEngine.ts @@ -1,8 +1,8 @@ import {resolve} from "path"; import {readFileSync} from "fs"; -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine, EngineOptions, ViewEngineOptions} from "./Engine"; -import {getCachedEngine, getFromCache, importEngine, setToCache} from "../utils/cache"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine, EngineOptions, ViewEngineOptions} from "./Engine.js"; +import {getCachedEngine, getFromCache, importEngine, setToCache} from "../utils/cache.js"; @ViewEngine("react", { requires: ["react"] diff --git a/packages/engines/src/components/SlmEngine.ts b/packages/engines/src/components/SlmEngine.ts index 289a9f41cc5..b70e647ac77 100644 --- a/packages/engines/src/components/SlmEngine.ts +++ b/packages/engines/src/components/SlmEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("slm") export class SlmEngine extends Engine {} diff --git a/packages/engines/src/components/SquirrellyEngine.spec.ts b/packages/engines/src/components/SquirrellyEngine.spec.ts index d15914b3f6d..6682d11e19f 100644 --- a/packages/engines/src/components/SquirrellyEngine.spec.ts +++ b/packages/engines/src/components/SquirrellyEngine.spec.ts @@ -1,7 +1,7 @@ import {expect} from "chai"; -import {getEngineFixture} from "../../test/getEngineFixture"; -import {requires} from "../utils/cache"; -import {SquirrellyEngine} from "./SquirrellyEngine"; +import {getEngineFixture} from "../../test/getEngineFixture.js"; +import {requires} from "../utils/cache.js"; +import {SquirrellyEngine} from "./SquirrellyEngine.js"; import {join} from "path"; describe("SquirrellyEngine", () => { diff --git a/packages/engines/src/components/SquirrellyEngine.ts b/packages/engines/src/components/SquirrellyEngine.ts index 99a3faffaa9..7afe5914bc5 100644 --- a/packages/engines/src/components/SquirrellyEngine.ts +++ b/packages/engines/src/components/SquirrellyEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine, EngineOptions} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine, EngineOptions} from "./Engine.js"; @ViewEngine("squirrelly") export class SquirrellyEngine extends Engine { diff --git a/packages/engines/src/components/SwigEngine.ts b/packages/engines/src/components/SwigEngine.ts index 3c8c01c3355..3ab4e890bca 100644 --- a/packages/engines/src/components/SwigEngine.ts +++ b/packages/engines/src/components/SwigEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("swig", { requires: ["swig", "swig-templates"] diff --git a/packages/engines/src/components/TemplayedEngine.ts b/packages/engines/src/components/TemplayedEngine.ts index 4308d355794..25475ea0bf0 100644 --- a/packages/engines/src/components/TemplayedEngine.ts +++ b/packages/engines/src/components/TemplayedEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("templayed") export class TemplayedEngine extends Engine { diff --git a/packages/engines/src/components/TwigEngine.spec.ts b/packages/engines/src/components/TwigEngine.spec.ts index 813868c9bc7..5b57b651778 100644 --- a/packages/engines/src/components/TwigEngine.spec.ts +++ b/packages/engines/src/components/TwigEngine.spec.ts @@ -1,6 +1,6 @@ import {expect} from "chai"; -import {getEngineFixture} from "../../test/getEngineFixture"; -import {TwigEngine} from "./TwigEngine"; +import {getEngineFixture} from "../../test/getEngineFixture.js"; +import {TwigEngine} from "./TwigEngine.js"; describe("TwigEngine", () => { it("should render the given content (by string - no cache)", async () => { diff --git a/packages/engines/src/components/TwigEngine.ts b/packages/engines/src/components/TwigEngine.ts index d711304938d..8e481664fe9 100644 --- a/packages/engines/src/components/TwigEngine.ts +++ b/packages/engines/src/components/TwigEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine, EngineOptions} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine, EngineOptions} from "./Engine.js"; @ViewEngine("twig") export class TwigEngine extends Engine { diff --git a/packages/engines/src/components/TwingEngine.spec.ts b/packages/engines/src/components/TwingEngine.spec.ts index 78b1ae0372a..cdfa5f2253c 100644 --- a/packages/engines/src/components/TwingEngine.spec.ts +++ b/packages/engines/src/components/TwingEngine.spec.ts @@ -1,6 +1,6 @@ import {expect} from "chai"; -import {getEngineFixture} from "../../test/getEngineFixture"; -import {TwingEngine} from "./TwingEngine"; +import {getEngineFixture} from "../../test/getEngineFixture.js"; +import {TwingEngine} from "./TwingEngine.js"; describe("TwingEngine", () => { it("should render the given content (by string - no cache)", async () => { diff --git a/packages/engines/src/components/TwingEngine.ts b/packages/engines/src/components/TwingEngine.ts index 85e7049be0e..71baa43c367 100644 --- a/packages/engines/src/components/TwingEngine.ts +++ b/packages/engines/src/components/TwingEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; import {existsSync} from "fs"; @ViewEngine("twing") diff --git a/packages/engines/src/components/UnderscoreEngine.ts b/packages/engines/src/components/UnderscoreEngine.ts index 57183848dd2..164f7855107 100644 --- a/packages/engines/src/components/UnderscoreEngine.ts +++ b/packages/engines/src/components/UnderscoreEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("underscore") export class UnderscoreEngine extends Engine { diff --git a/packages/engines/src/components/VashEngine.ts b/packages/engines/src/components/VashEngine.ts index 25abeae34ab..eb017e93051 100644 --- a/packages/engines/src/components/VashEngine.ts +++ b/packages/engines/src/components/VashEngine.ts @@ -1,6 +1,6 @@ import {promisify} from "util"; -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("vash") export class VashEngine extends Engine { diff --git a/packages/engines/src/components/VelocityEngine.spec.ts b/packages/engines/src/components/VelocityEngine.spec.ts index 4ddecde62c3..5d4386473c5 100644 --- a/packages/engines/src/components/VelocityEngine.spec.ts +++ b/packages/engines/src/components/VelocityEngine.spec.ts @@ -1,6 +1,6 @@ import {expect} from "chai"; -import {getEngineFixture} from "../../test/getEngineFixture"; -import {VelocityEngine} from "./VelocityEngine"; +import {getEngineFixture} from "../../test/getEngineFixture.js"; +import {VelocityEngine} from "./VelocityEngine.js"; describe("VelocityEngine", () => { it("should render the given content (by string - no cache)", async () => { diff --git a/packages/engines/src/components/VelocityEngine.ts b/packages/engines/src/components/VelocityEngine.ts index b09c528bd8c..f5c6f0c7836 100644 --- a/packages/engines/src/components/VelocityEngine.ts +++ b/packages/engines/src/components/VelocityEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine, EngineOptions} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine, EngineOptions} from "./Engine.js"; @ViewEngine("velocityjs") export class VelocityEngine extends Engine { diff --git a/packages/engines/src/components/WalrusEngine.ts b/packages/engines/src/components/WalrusEngine.ts index b86ce448edc..58226f454b0 100644 --- a/packages/engines/src/components/WalrusEngine.ts +++ b/packages/engines/src/components/WalrusEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngine} from "../decorators/viewEngine"; -import {Engine} from "./Engine"; +import {ViewEngine} from "../decorators/viewEngine.js"; +import {Engine} from "./Engine.js"; @ViewEngine("walrus") export class WalrusEngine extends Engine { diff --git a/packages/engines/src/decorators/viewEngine.ts b/packages/engines/src/decorators/viewEngine.ts index ce21ef9208e..bf6071b87c4 100644 --- a/packages/engines/src/decorators/viewEngine.ts +++ b/packages/engines/src/decorators/viewEngine.ts @@ -1,5 +1,5 @@ -import {ViewEngineOptions} from "../components/Engine"; -import {engines} from "../registries/EnginesContainer"; +import {ViewEngineOptions} from "../components/Engine.js"; +import {engines} from "../registries/EnginesContainer.js"; export function ViewEngine(name: string, options: ViewEngineOptions = {}): ClassDecorator { return (target: any) => { diff --git a/packages/engines/src/index.ts b/packages/engines/src/index.ts index c4aef53dae7..b4eae8cd537 100644 --- a/packages/engines/src/index.ts +++ b/packages/engines/src/index.ts @@ -2,42 +2,42 @@ * @file Automatically generated by barrelsby. */ -export * from "./components/AtplEngine"; -export * from "./components/BracketEngine"; -export * from "./components/DotEngine"; -export * from "./components/DustEngine"; -export * from "./components/EctEngine"; -export * from "./components/EjsEngine"; -export * from "./components/Engine"; -export * from "./components/HamlCoffeeEngine"; -export * from "./components/HamlEngine"; -export * from "./components/HamletEngine"; -export * from "./components/HandlebarsEngine"; -export * from "./components/HoganEngine"; -export * from "./components/HtmlingEngine"; -export * from "./components/JazzEngine"; -export * from "./components/JqtplEngine"; -export * from "./components/JustEngine"; -export * from "./components/LiquorEngine"; -export * from "./components/LodashEngine"; -export * from "./components/MoteEngine"; -export * from "./components/MustacheEngine"; -export * from "./components/NunjucksEngine"; -export * from "./components/PlatesEngine"; -export * from "./components/PugEngine"; -export * from "./components/RactiveEngine"; -export * from "./components/ReactEngine"; -export * from "./components/SlmEngine"; -export * from "./components/SquirrellyEngine"; -export * from "./components/SwigEngine"; -export * from "./components/TemplayedEngine"; -export * from "./components/TwigEngine"; -export * from "./components/TwingEngine"; -export * from "./components/UnderscoreEngine"; -export * from "./components/VashEngine"; -export * from "./components/VelocityEngine"; -export * from "./components/WalrusEngine"; -export * from "./decorators/viewEngine"; -export * from "./registries/EnginesContainer"; -export * from "./utils/cache"; -export * from "./utils/getEngines"; +export * from "./components/AtplEngine.js"; +export * from "./components/BracketEngine.js"; +export * from "./components/DotEngine.js"; +export * from "./components/DustEngine.js"; +export * from "./components/EctEngine.js"; +export * from "./components/EjsEngine.js"; +export * from "./components/Engine.js"; +export * from "./components/HamlCoffeeEngine.js"; +export * from "./components/HamlEngine.js"; +export * from "./components/HamletEngine.js"; +export * from "./components/HandlebarsEngine.js"; +export * from "./components/HoganEngine.js"; +export * from "./components/HtmlingEngine.js"; +export * from "./components/JazzEngine.js"; +export * from "./components/JqtplEngine.js"; +export * from "./components/JustEngine.js"; +export * from "./components/LiquorEngine.js"; +export * from "./components/LodashEngine.js"; +export * from "./components/MoteEngine.js"; +export * from "./components/MustacheEngine.js"; +export * from "./components/NunjucksEngine.js"; +export * from "./components/PlatesEngine.js"; +export * from "./components/PugEngine.js"; +export * from "./components/RactiveEngine.js"; +export * from "./components/ReactEngine.js"; +export * from "./components/SlmEngine.js"; +export * from "./components/SquirrellyEngine.js"; +export * from "./components/SwigEngine.js"; +export * from "./components/TemplayedEngine.js"; +export * from "./components/TwigEngine.js"; +export * from "./components/TwingEngine.js"; +export * from "./components/UnderscoreEngine.js"; +export * from "./components/VashEngine.js"; +export * from "./components/VelocityEngine.js"; +export * from "./components/WalrusEngine.js"; +export * from "./decorators/viewEngine.js"; +export * from "./registries/EnginesContainer.js"; +export * from "./utils/cache.js"; +export * from "./utils/getEngines.js"; diff --git a/packages/engines/src/registries/EnginesContainer.ts b/packages/engines/src/registries/EnginesContainer.ts index 7e2472c2527..784c00aeb34 100644 --- a/packages/engines/src/registries/EnginesContainer.ts +++ b/packages/engines/src/registries/EnginesContainer.ts @@ -1,4 +1,4 @@ -import {Engine, ViewEngineOptions} from "../components/Engine"; +import {Engine, ViewEngineOptions} from "../components/Engine.js"; export interface EngineProvider { name: string; diff --git a/packages/engines/src/utils/cache.spec.ts b/packages/engines/src/utils/cache.spec.ts index 9dea5ea0a8c..e3ca66890eb 100644 --- a/packages/engines/src/utils/cache.spec.ts +++ b/packages/engines/src/utils/cache.spec.ts @@ -1,5 +1,5 @@ import {expect} from "chai"; -import {clearCache, getFromCache, setToCache} from "./cache"; +import {clearCache, getFromCache, setToCache} from "./cache.js"; describe("cache", () => { describe("setToCache()", () => { diff --git a/packages/engines/src/utils/getEngines.spec.ts b/packages/engines/src/utils/getEngines.spec.ts index 876e4153381..60aaea86453 100644 --- a/packages/engines/src/utils/getEngines.spec.ts +++ b/packages/engines/src/utils/getEngines.spec.ts @@ -1,7 +1,7 @@ import {expect} from "chai"; import filedirname from "filedirname"; import {join} from "path"; -import {getEngine, getEngines} from "./getEngines"; +import {getEngine, getEngines} from "./getEngines.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/engines/src/utils/getEngines.ts b/packages/engines/src/utils/getEngines.ts index ed688bbac03..d9be88a51c2 100644 --- a/packages/engines/src/utils/getEngines.ts +++ b/packages/engines/src/utils/getEngines.ts @@ -1,5 +1,5 @@ -import {EngineOptions} from "../components/Engine"; -import {engines} from "../registries/EnginesContainer"; +import {EngineOptions} from "../components/Engine.js"; +import {engines} from "../registries/EnginesContainer.js"; export type RenderCallback = (err: Error | null, str?: string | any) => any; export interface EngineFunction { diff --git a/packages/engines/test/getEngineFixture.ts b/packages/engines/test/getEngineFixture.ts index 6a8dc29715f..83a92fda795 100644 --- a/packages/engines/test/getEngineFixture.ts +++ b/packages/engines/test/getEngineFixture.ts @@ -2,8 +2,8 @@ import filedirname from "filedirname"; import fs from "fs"; import sinon from "sinon"; -import {Engine} from "../src/components/Engine"; -import {engines} from "../src/index"; +import {Engine} from "../src/components/Engine.js"; +import {engines} from "../src/index.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/engines/test/integration.spec.ts b/packages/engines/test/integration.spec.ts index 0622d7ca3f4..b4d81e43e2e 100644 --- a/packages/engines/test/integration.spec.ts +++ b/packages/engines/test/integration.spec.ts @@ -1,9 +1,9 @@ import "../src/index"; -import * as sharedTest from "./shared/index"; -import * as sharedFiltersTest from "./shared/filters"; -import * as sharedIncludesTest from "./shared/includes"; -import * as sharedPartialsTest from "./shared/partials"; -import * as sharedHelpersTest from "./shared/helpers"; +import * as sharedTest from "./shared/index.js"; +import * as sharedFiltersTest from "./shared/filters.js"; +import * as sharedIncludesTest from "./shared/includes.js"; +import * as sharedPartialsTest from "./shared/partials.js"; +import * as sharedHelpersTest from "./shared/helpers.js"; describe("integration", () => { sharedTest.test("pug"); diff --git a/packages/engines/test/shared/dust.ts b/packages/engines/test/shared/dust.ts index 2ebdd687102..6a152251685 100644 --- a/packages/engines/test/shared/dust.ts +++ b/packages/engines/test/shared/dust.ts @@ -1,4 +1,4 @@ -import {engines, requires} from "../../src/index"; +import {engines, requires} from "../../src/index.js"; import {expect} from "chai"; import filedirname from "filedirname"; import fs from "fs"; diff --git a/packages/engines/test/shared/filters.ts b/packages/engines/test/shared/filters.ts index 1d7a44e5f9a..c250171ea06 100644 --- a/packages/engines/test/shared/filters.ts +++ b/packages/engines/test/shared/filters.ts @@ -1,4 +1,4 @@ -import {engines} from "../../src/index"; +import {engines} from "../../src/index.js"; import filedirname from "filedirname"; import fs from "fs"; import {expect} from "chai"; diff --git a/packages/engines/test/shared/helpers.ts b/packages/engines/test/shared/helpers.ts index e3130d85390..59ce7fdae89 100644 --- a/packages/engines/test/shared/helpers.ts +++ b/packages/engines/test/shared/helpers.ts @@ -1,4 +1,4 @@ -import {engines} from "../../src/index"; +import {engines} from "../../src/index.js"; import filedirname from "filedirname"; import handlebars from "handlebars"; import fs from "fs"; diff --git a/packages/engines/test/shared/includes.ts b/packages/engines/test/shared/includes.ts index 6220fa992d1..4f37aae9e58 100644 --- a/packages/engines/test/shared/includes.ts +++ b/packages/engines/test/shared/includes.ts @@ -1,4 +1,4 @@ -import {engines} from "../../src/index"; +import {engines} from "../../src/index.js"; import filedirname from "filedirname"; import fs from "fs"; import {expect} from "chai"; diff --git a/packages/engines/test/shared/index.ts b/packages/engines/test/shared/index.ts index 819aa837abb..649740277be 100644 --- a/packages/engines/test/shared/index.ts +++ b/packages/engines/test/shared/index.ts @@ -1,4 +1,4 @@ -import {engines, requires} from "../../src/index"; +import {engines, requires} from "../../src/index.js"; import {expect} from "chai"; import filedirname from "filedirname"; import fs from "fs"; diff --git a/packages/engines/test/shared/partials.ts b/packages/engines/test/shared/partials.ts index 6d94ae792a9..ee9cf702abe 100644 --- a/packages/engines/test/shared/partials.ts +++ b/packages/engines/test/shared/partials.ts @@ -1,4 +1,4 @@ -import {engines} from "../../src/index"; +import {engines} from "../../src/index.js"; import filedirname from "filedirname"; import {join} from "path"; import fs from "fs"; diff --git a/packages/engines/test/shared/react.ts b/packages/engines/test/shared/react.ts index fe20505e9e3..3fcab753bb0 100644 --- a/packages/engines/test/shared/react.ts +++ b/packages/engines/test/shared/react.ts @@ -1,4 +1,4 @@ -import {engines} from "../../src/index"; +import {engines} from "../../src/index.js"; import {expect} from "chai"; import filedirname from "filedirname"; import fs from "fs"; diff --git a/packages/graphql/apollo/src/ApolloModule.ts b/packages/graphql/apollo/src/ApolloModule.ts index ccfcc46177b..7ddfd68e432 100644 --- a/packages/graphql/apollo/src/ApolloModule.ts +++ b/packages/graphql/apollo/src/ApolloModule.ts @@ -1,7 +1,7 @@ import {AfterListen, Logger, OnRoutesInit} from "@tsed/common"; import {Configuration, Inject, Module} from "@tsed/di"; -import {ApolloSettings} from "./interfaces/ApolloSettings"; -import {ApolloService} from "./services/ApolloService"; +import {ApolloSettings} from "./interfaces/ApolloSettings.js"; +import {ApolloService} from "./services/ApolloService.js"; @Module() export class ApolloModule implements OnRoutesInit, AfterListen { diff --git a/packages/graphql/apollo/src/decorators/dataSource.ts b/packages/graphql/apollo/src/decorators/dataSource.ts index 9780f761deb..55f2f9ea883 100644 --- a/packages/graphql/apollo/src/decorators/dataSource.ts +++ b/packages/graphql/apollo/src/decorators/dataSource.ts @@ -1,6 +1,6 @@ import {StoreSet, useDecorators} from "@tsed/core"; import {Injectable, ProviderScope} from "@tsed/di"; -import {DATASOURCES_PROVIDERS} from "../constants/constants"; +import {DATASOURCES_PROVIDERS} from "../constants/constants.js"; /** * Create a new injectable DataSource. diff --git a/packages/graphql/apollo/src/index.ts b/packages/graphql/apollo/src/index.ts index 4a88ab74276..96d4b62bdf6 100644 --- a/packages/graphql/apollo/src/index.ts +++ b/packages/graphql/apollo/src/index.ts @@ -2,8 +2,8 @@ * @file Automatically generated by barrelsby. */ -export * from "./ApolloModule"; -export * from "./constants/constants"; -export * from "./decorators/dataSource"; -export * from "./interfaces/ApolloSettings"; -export * from "./services/ApolloService"; +export * from "./ApolloModule.js"; +export * from "./constants/constants.js"; +export * from "./decorators/dataSource.js"; +export * from "./interfaces/ApolloSettings.js"; +export * from "./services/ApolloService.js"; diff --git a/packages/graphql/apollo/src/services/ApolloService.spec.ts b/packages/graphql/apollo/src/services/ApolloService.spec.ts index 1db2739d1b2..ea3f24b80bb 100644 --- a/packages/graphql/apollo/src/services/ApolloService.spec.ts +++ b/packages/graphql/apollo/src/services/ApolloService.spec.ts @@ -1,8 +1,8 @@ import {jest} from "@jest/globals"; import {PlatformApplication, PlatformTest} from "@tsed/common"; import {RESTDataSource} from "apollo-datasource-rest"; -import {DataSource} from "../decorators/dataSource"; -import {ApolloService} from "./ApolloService"; +import {DataSource} from "../decorators/dataSource.js"; +import {ApolloService} from "./ApolloService.js"; jest.mock("apollo-server-express", () => { return { diff --git a/packages/graphql/apollo/src/services/ApolloService.ts b/packages/graphql/apollo/src/services/ApolloService.ts index 7c322651bb2..a6b281c68c1 100644 --- a/packages/graphql/apollo/src/services/ApolloService.ts +++ b/packages/graphql/apollo/src/services/ApolloService.ts @@ -13,9 +13,9 @@ import {PluginDefinition} from "apollo-server-core/src/types"; import type {GraphQLSchema} from "graphql"; import Http from "http"; import Https from "https"; -import {DATASOURCES_PROVIDERS} from "../constants/constants"; -import type {ApolloServer, ApolloSettings} from "../interfaces/ApolloSettings"; -import {ApolloCustomServerCB} from "../interfaces/ApolloSettings"; +import {DATASOURCES_PROVIDERS} from "../constants/constants.js"; +import type {ApolloServer, ApolloSettings} from "../interfaces/ApolloSettings.js"; +import {ApolloCustomServerCB} from "../interfaces/ApolloSettings.js"; @Service() export class ApolloService { diff --git a/packages/graphql/graphql-ws/src/GraphQLWSModule.ts b/packages/graphql/graphql-ws/src/GraphQLWSModule.ts index 0f47419b1d2..6ccb821d01c 100644 --- a/packages/graphql/graphql-ws/src/GraphQLWSModule.ts +++ b/packages/graphql/graphql-ws/src/GraphQLWSModule.ts @@ -3,7 +3,7 @@ import {useServer} from "graphql-ws/lib/use/ws"; import Http from "http"; import Https from "https"; import {Server} from "ws"; -import {GraphQLWSOptions} from "./GraphQLWSOptions"; +import {GraphQLWSOptions} from "./GraphQLWSOptions.js"; @Module() export class GraphQLWSModule { diff --git a/packages/graphql/graphql-ws/src/index.ts b/packages/graphql/graphql-ws/src/index.ts index e8b3ce3930c..6485d612f24 100644 --- a/packages/graphql/graphql-ws/src/index.ts +++ b/packages/graphql/graphql-ws/src/index.ts @@ -2,5 +2,5 @@ * @file Automatically generated by barrelsby. */ -export * from "./GraphQLWSModule"; -export * from "./GraphQLWSOptions"; +export * from "./GraphQLWSModule.js"; +export * from "./GraphQLWSOptions.js"; diff --git a/packages/graphql/typegraphql/readme.md b/packages/graphql/typegraphql/readme.md index f37f3ace8dc..7a79840a869 100644 --- a/packages/graphql/typegraphql/readme.md +++ b/packages/graphql/typegraphql/readme.md @@ -147,9 +147,9 @@ After that we want to create typical crud queries and mutation. To do that we cr ```typescript import {Resolver, Query, Arg, Args, Mutation, Authorized, Ctx} from "type-graphql"; import {ResolverController} from "@tsed/typegraphql"; -import {Recipe} from "../types/Recipe"; -import {RecipeService} from "../services/RecipeService"; -import {RecipeNotFoundError} from "../errors/RecipeNotFoundError"; +import {Recipe} from "../types/Recipe.js"; +import {RecipeService} from "../services/RecipeService.js"; +import {RecipeNotFoundError} from "../errors/RecipeNotFoundError.js"; @ResolverController(Recipe) export class RecipeResolver { diff --git a/packages/graphql/typegraphql/src/TypeGraphQLModule.ts b/packages/graphql/typegraphql/src/TypeGraphQLModule.ts index f1115a6e4db..118e670932c 100644 --- a/packages/graphql/typegraphql/src/TypeGraphQLModule.ts +++ b/packages/graphql/typegraphql/src/TypeGraphQLModule.ts @@ -1,6 +1,6 @@ import {Configuration, Inject, InjectorService, Module} from "@tsed/di"; -import {TypeGraphQLSettings} from "./interfaces/interfaces"; -import {TypeGraphQLService} from "./services/TypeGraphQLService"; +import {TypeGraphQLSettings} from "./interfaces/interfaces.js"; +import {TypeGraphQLService} from "./services/TypeGraphQLService.js"; /** * @ignore diff --git a/packages/graphql/typegraphql/src/decorators/resolver.ts b/packages/graphql/typegraphql/src/decorators/resolver.ts index 51a0c856b35..15e70a1be6b 100644 --- a/packages/graphql/typegraphql/src/decorators/resolver.ts +++ b/packages/graphql/typegraphql/src/decorators/resolver.ts @@ -2,7 +2,7 @@ import {StoreSet, useDecorators} from "@tsed/core"; import {Injectable} from "@tsed/di"; import {ClassType, Resolver} from "type-graphql"; import {AbstractClassOptions, ClassTypeResolver} from "type-graphql/dist/decorators/types"; -import {RESOLVERS_PROVIDERS} from "../constants/constants"; +import {RESOLVERS_PROVIDERS} from "../constants/constants.js"; export interface ResolverControllerOptions extends AbstractClassOptions { id?: string; diff --git a/packages/graphql/typegraphql/src/index.ts b/packages/graphql/typegraphql/src/index.ts index ac5ed07932e..c8ebb7ce35f 100644 --- a/packages/graphql/typegraphql/src/index.ts +++ b/packages/graphql/typegraphql/src/index.ts @@ -2,11 +2,11 @@ * @file Automatically generated by barrelsby. */ -export * from "./TypeGraphQLModule"; -export * from "./exports"; -export * from "./constants/constants"; -export * from "./decorators/resolver"; -export * from "./interfaces/TypeGraphQLSettings"; -export * from "./interfaces/interfaces"; -export * from "./middlewares/ContextMiddleware"; -export * from "./services/TypeGraphQLService"; +export * from "./TypeGraphQLModule.js"; +export * from "./exports.js"; +export * from "./constants/constants.js"; +export * from "./decorators/resolver.js"; +export * from "./interfaces/TypeGraphQLSettings.js"; +export * from "./interfaces/interfaces.js"; +export * from "./middlewares/ContextMiddleware.js"; +export * from "./services/TypeGraphQLService.js"; diff --git a/packages/graphql/typegraphql/src/interfaces/interfaces.ts b/packages/graphql/typegraphql/src/interfaces/interfaces.ts index 368451aa20d..c79f764ccfa 100644 --- a/packages/graphql/typegraphql/src/interfaces/interfaces.ts +++ b/packages/graphql/typegraphql/src/interfaces/interfaces.ts @@ -1,4 +1,4 @@ -import {TypeGraphQLSettings} from "./TypeGraphQLSettings"; +import {TypeGraphQLSettings} from "./TypeGraphQLSettings.js"; declare global { namespace TsED { @@ -9,4 +9,4 @@ declare global { } } -export * from "./TypeGraphQLSettings"; +export * from "./TypeGraphQLSettings.js"; diff --git a/packages/graphql/typegraphql/src/services/TypeGraphQLService.spec.ts b/packages/graphql/typegraphql/src/services/TypeGraphQLService.spec.ts index 5fdc551d0fd..7431680aea7 100644 --- a/packages/graphql/typegraphql/src/services/TypeGraphQLService.spec.ts +++ b/packages/graphql/typegraphql/src/services/TypeGraphQLService.spec.ts @@ -1,7 +1,7 @@ import {ApolloService} from "@tsed/apollo"; import {PlatformTest} from "@tsed/common"; -import {AuthResolver, RecipeResolver} from "../../test/app/graphql/index"; -import {TypeGraphQLService} from "./TypeGraphQLService"; +import {AuthResolver, RecipeResolver} from "../../test/app/graphql/index.js"; +import {TypeGraphQLService} from "./TypeGraphQLService.js"; async function createApolloServiceFixture() { const server = { diff --git a/packages/graphql/typegraphql/src/services/TypeGraphQLService.ts b/packages/graphql/typegraphql/src/services/TypeGraphQLService.ts index b87d705ffa2..75d26a3bb71 100644 --- a/packages/graphql/typegraphql/src/services/TypeGraphQLService.ts +++ b/packages/graphql/typegraphql/src/services/TypeGraphQLService.ts @@ -5,9 +5,9 @@ import {Logger} from "@tsed/logger"; import {ApolloServerBase} from "apollo-server-core"; import {GraphQLSchema} from "graphql"; import {buildSchema, BuildSchemaOptions} from "type-graphql"; -import {RESOLVERS_PROVIDERS} from "../constants/constants"; -import {TypeGraphQLSettings} from "../interfaces/interfaces"; -import {ContextMiddleware} from "../middlewares/ContextMiddleware"; +import {RESOLVERS_PROVIDERS} from "../constants/constants.js"; +import {TypeGraphQLSettings} from "../interfaces/interfaces.js"; +import {ContextMiddleware} from "../middlewares/ContextMiddleware.js"; const getKey = (id: string) => `typegraphql-${id}`; diff --git a/packages/graphql/typegraphql/test/app/Server.ts b/packages/graphql/typegraphql/test/app/Server.ts index 680b03fc3c8..44d14525877 100644 --- a/packages/graphql/typegraphql/test/app/Server.ts +++ b/packages/graphql/typegraphql/test/app/Server.ts @@ -7,10 +7,10 @@ import filedirname from "filedirname"; import * as fs from "fs"; import {buildContext} from "graphql-passport"; import {resolve} from "path"; -import {HelloController} from "./controllers/HelloController"; -import {User} from "./graphql/auth/User"; +import {HelloController} from "./controllers/HelloController.js"; +import {User} from "./graphql/auth/User.js"; import "./graphql/index"; -import {AuthResolver} from "./graphql/index"; +import {AuthResolver} from "./graphql/index.js"; import "./protocols/GraphQLProtocol"; import "./services/RecipeService"; import "./services/UsersRepository"; diff --git a/packages/graphql/typegraphql/test/app/graphql/auth/AuthResolver.ts b/packages/graphql/typegraphql/test/app/graphql/auth/AuthResolver.ts index 6b95ffdd007..b17c983bdd6 100644 --- a/packages/graphql/typegraphql/test/app/graphql/auth/AuthResolver.ts +++ b/packages/graphql/typegraphql/test/app/graphql/auth/AuthResolver.ts @@ -1,6 +1,6 @@ import {PassportContext} from "graphql-passport"; import {Arg, Ctx, Mutation, Query, Resolver} from "type-graphql"; -import {User} from "./User"; +import {User} from "./User.js"; export interface GQLContext extends PassportContext {} diff --git a/packages/graphql/typegraphql/test/app/graphql/index.ts b/packages/graphql/typegraphql/test/app/graphql/index.ts index 718b4af4fd0..1a2efbd3e1e 100644 --- a/packages/graphql/typegraphql/test/app/graphql/index.ts +++ b/packages/graphql/typegraphql/test/app/graphql/index.ts @@ -1,6 +1,6 @@ -export * from "./auth/AuthResolver"; -export * from "./auth/User"; -export * from "./datasources/MyDataSource"; -export * from "./recipes/Recipe"; -export * from "./recipes/RecipeResolver"; -export * from "./recipes/RecipeNotFoundError"; +export * from "./auth/AuthResolver.js"; +export * from "./auth/User.js"; +export * from "./datasources/MyDataSource.js"; +export * from "./recipes/Recipe.js"; +export * from "./recipes/RecipeResolver.js"; +export * from "./recipes/RecipeNotFoundError.js"; diff --git a/packages/graphql/typegraphql/test/app/graphql/recipes/RecipeResolver.ts b/packages/graphql/typegraphql/test/app/graphql/recipes/RecipeResolver.ts index 524ba6b6990..8e532034ac1 100644 --- a/packages/graphql/typegraphql/test/app/graphql/recipes/RecipeResolver.ts +++ b/packages/graphql/typegraphql/test/app/graphql/recipes/RecipeResolver.ts @@ -2,9 +2,9 @@ import {InjectContext, PlatformContext} from "@tsed/common"; import {Inject} from "@tsed/di"; import {ResolverService} from "@tsed/typegraphql"; import {Arg, Mutation, Publisher, PubSub, Query, Root, Subscription} from "type-graphql"; -import {RecipeService} from "../../services/RecipeService"; -import {Recipe, RecipeNotification} from "./Recipe"; -import {RecipeNotFoundError} from "./RecipeNotFoundError"; +import {RecipeService} from "../../services/RecipeService.js"; +import {Recipe, RecipeNotification} from "./Recipe.js"; +import {RecipeNotFoundError} from "./RecipeNotFoundError.js"; @ResolverService((_of) => Recipe) export class RecipeResolver { diff --git a/packages/graphql/typegraphql/test/app/index.express.ts b/packages/graphql/typegraphql/test/app/index.express.ts index 829493459a1..b10c5bdd06d 100644 --- a/packages/graphql/typegraphql/test/app/index.express.ts +++ b/packages/graphql/typegraphql/test/app/index.express.ts @@ -1,6 +1,6 @@ import {$log} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; if (process.env.NODE_ENV !== "test") { async function bootstrap() { diff --git a/packages/graphql/typegraphql/test/app/index.koa.ts b/packages/graphql/typegraphql/test/app/index.koa.ts index e73d4a6c520..28c1b0226a3 100644 --- a/packages/graphql/typegraphql/test/app/index.koa.ts +++ b/packages/graphql/typegraphql/test/app/index.koa.ts @@ -1,6 +1,6 @@ import {$log} from "@tsed/common"; import {PlatformKoa} from "@tsed/platform-koa"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; if (process.env.NODE_ENV !== "test") { async function bootstrap() { diff --git a/packages/graphql/typegraphql/test/app/protocols/GraphQLProtocol.ts b/packages/graphql/typegraphql/test/app/protocols/GraphQLProtocol.ts index bb75289e863..0f0a5264d26 100644 --- a/packages/graphql/typegraphql/test/app/protocols/GraphQLProtocol.ts +++ b/packages/graphql/typegraphql/test/app/protocols/GraphQLProtocol.ts @@ -2,7 +2,7 @@ import {Inject, Req} from "@tsed/common"; import {Unauthorized} from "@tsed/exceptions"; import {Arg, OnVerify, Protocol} from "@tsed/passport"; import {GraphQLLocalStrategy} from "graphql-passport"; -import {UsersRepository} from "../services/UsersRepository"; +import {UsersRepository} from "../services/UsersRepository.js"; @Protocol({ name: "graphql-local", diff --git a/packages/graphql/typegraphql/test/app/services/RecipeService.ts b/packages/graphql/typegraphql/test/app/services/RecipeService.ts index 692576e3474..956232b995a 100644 --- a/packages/graphql/typegraphql/test/app/services/RecipeService.ts +++ b/packages/graphql/typegraphql/test/app/services/RecipeService.ts @@ -1,5 +1,5 @@ import {Service} from "@tsed/common"; -import {Recipe} from "../graphql/recipes/Recipe"; +import {Recipe} from "../graphql/recipes/Recipe.js"; @Service() export class RecipeService { diff --git a/packages/graphql/typegraphql/test/app/services/UsersRepository.ts b/packages/graphql/typegraphql/test/app/services/UsersRepository.ts index d9c3c93fcc2..3e8f0ecfbd2 100644 --- a/packages/graphql/typegraphql/test/app/services/UsersRepository.ts +++ b/packages/graphql/typegraphql/test/app/services/UsersRepository.ts @@ -1,7 +1,7 @@ import {Adapter, InjectAdapter} from "@tsed/adapters"; import {Injectable} from "@tsed/di"; import {deserialize} from "@tsed/json-mapper"; -import {User} from "../graphql/auth/User"; +import {User} from "../graphql/auth/User.js"; @Injectable() export class UsersRepository { diff --git a/packages/graphql/typegraphql/test/graphql-passport.spec.ts b/packages/graphql/typegraphql/test/graphql-passport.spec.ts index f4983263dda..a4564c3cf3c 100644 --- a/packages/graphql/typegraphql/test/graphql-passport.spec.ts +++ b/packages/graphql/typegraphql/test/graphql-passport.spec.ts @@ -2,7 +2,7 @@ import {PlatformTest} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; import "@tsed/platform-express"; import SuperTest from "supertest"; -import {Server} from "./app/Server"; +import {Server} from "./app/Server.js"; describe("GraphQL", () => { let request: SuperTest.Agent; diff --git a/packages/graphql/typegraphql/test/graphql.spec.ts b/packages/graphql/typegraphql/test/graphql.spec.ts index 6261b62ffb4..4bbfea4886a 100644 --- a/packages/graphql/typegraphql/test/graphql.spec.ts +++ b/packages/graphql/typegraphql/test/graphql.spec.ts @@ -4,8 +4,8 @@ import {PlatformExpress} from "@tsed/platform-express"; import {ApolloServerTestClient, createTestClient} from "apollo-server-testing"; import gql from "graphql-tag"; import "@tsed/graphql-ws"; -import {TypeGraphQLService} from "../src"; -import {Server} from "./app/Server"; +import {TypeGraphQLService} from "../src/index.js"; +import {Server} from "./app/Server.js"; const GET_RECIPES = gql` query GetRecipes { diff --git a/packages/orm/adapters-redis/src/adapters/OIDCRedisAdapter.spec.ts b/packages/orm/adapters-redis/src/adapters/OIDCRedisAdapter.spec.ts index 31078733a99..661e0821051 100644 --- a/packages/orm/adapters-redis/src/adapters/OIDCRedisAdapter.spec.ts +++ b/packages/orm/adapters-redis/src/adapters/OIDCRedisAdapter.spec.ts @@ -5,7 +5,7 @@ import Redis from "ioredis"; import IORedisMock from "ioredis-mock"; import moment from "moment"; -import {OIDCRedisAdapter} from "./OIDCRedisAdapter"; +import {OIDCRedisAdapter} from "./OIDCRedisAdapter.js"; const REDIS_CONNECTION = Symbol.for("redis_connection"); diff --git a/packages/orm/adapters-redis/src/adapters/OIDCRedisAdapter.ts b/packages/orm/adapters-redis/src/adapters/OIDCRedisAdapter.ts index b64f29fe232..1912a4acea7 100644 --- a/packages/orm/adapters-redis/src/adapters/OIDCRedisAdapter.ts +++ b/packages/orm/adapters-redis/src/adapters/OIDCRedisAdapter.ts @@ -3,7 +3,7 @@ import {Configuration, Inject, Opts} from "@tsed/di"; import {ChainableCommander} from "ioredis"; import {IOREDIS_CONNECTIONS, IORedis} from "@tsed/ioredis"; -import {RedisAdapter, RedisAdapterConstructorOptions} from "./RedisAdapter"; +import {RedisAdapter, RedisAdapterConstructorOptions} from "./RedisAdapter.js"; const GRANTABLE = new Set(["AccessToken", "AuthorizationCode", "RefreshToken", "DeviceCode", "BackchannelAuthenticationRequest"]); const CONSUMABLE = new Set(["AuthorizationCode", "RefreshToken", "DeviceCode", "BackchannelAuthenticationRequest"]); diff --git a/packages/orm/adapters-redis/src/adapters/RedisAdapter.spec.ts b/packages/orm/adapters-redis/src/adapters/RedisAdapter.spec.ts index 3264c6e8e83..e2413fbe914 100644 --- a/packages/orm/adapters-redis/src/adapters/RedisAdapter.spec.ts +++ b/packages/orm/adapters-redis/src/adapters/RedisAdapter.spec.ts @@ -2,7 +2,7 @@ import {AdapterModel, Adapters, Indexed} from "@tsed/adapters"; import {IORedisTest, registerConnectionProvider} from "@tsed/ioredis"; import {deserialize} from "@tsed/json-mapper"; import {Property, Required} from "@tsed/schema"; -import {RedisAdapter} from "./RedisAdapter"; +import {RedisAdapter} from "./RedisAdapter.js"; const REDIS_CONNECTION = Symbol.for("redis_connection"); diff --git a/packages/orm/adapters-redis/src/index.ts b/packages/orm/adapters-redis/src/index.ts index 8330f696adc..7d8107a08ac 100644 --- a/packages/orm/adapters-redis/src/index.ts +++ b/packages/orm/adapters-redis/src/index.ts @@ -2,6 +2,6 @@ * @file Automatically generated by barrelsby. */ -export * from "./adapters/OIDCRedisAdapter"; -export * from "./adapters/RedisAdapter"; -export * from "./domain/RedisAdaptersSettings"; +export * from "./adapters/OIDCRedisAdapter.js"; +export * from "./adapters/RedisAdapter.js"; +export * from "./domain/RedisAdaptersSettings.js"; diff --git a/packages/orm/adapters/src/adapters/FileSyncAdapter.spec.ts b/packages/orm/adapters/src/adapters/FileSyncAdapter.spec.ts index afc4c61e834..de3908468b0 100644 --- a/packages/orm/adapters/src/adapters/FileSyncAdapter.spec.ts +++ b/packages/orm/adapters/src/adapters/FileSyncAdapter.spec.ts @@ -1,9 +1,9 @@ import {PlatformTest} from "@tsed/common"; import {Property} from "@tsed/schema"; import faker from "@faker-js/faker"; -import {Adapter} from "../domain/Adapter"; -import {Adapters} from "../services/Adapters"; -import {FileSyncAdapter} from "./FileSyncAdapter"; +import {Adapter} from "../domain/Adapter.js"; +import {Adapters} from "../services/Adapters.js"; +import {FileSyncAdapter} from "./FileSyncAdapter.js"; class Client { @Property() diff --git a/packages/orm/adapters/src/adapters/FileSyncAdapter.ts b/packages/orm/adapters/src/adapters/FileSyncAdapter.ts index 6daf3f9c276..6e6e6b49fe5 100644 --- a/packages/orm/adapters/src/adapters/FileSyncAdapter.ts +++ b/packages/orm/adapters/src/adapters/FileSyncAdapter.ts @@ -4,8 +4,8 @@ import fs from "fs-extra"; import low from "lowdb"; import FileSync from "lowdb/adapters/FileSync"; import {dirname} from "path"; -import {AdapterConstructorOptions} from "../domain/Adapter"; -import {AdapterModel, LowDbAdapter} from "./LowDbAdapter"; +import {AdapterConstructorOptions} from "../domain/Adapter.js"; +import {AdapterModel, LowDbAdapter} from "./LowDbAdapter.js"; export interface FileSyncAdapterConstructorOptions extends AdapterConstructorOptions { readOnly: true; diff --git a/packages/orm/adapters/src/adapters/LowDbAdapter.ts b/packages/orm/adapters/src/adapters/LowDbAdapter.ts index d9593146e52..df0573dcfec 100644 --- a/packages/orm/adapters/src/adapters/LowDbAdapter.ts +++ b/packages/orm/adapters/src/adapters/LowDbAdapter.ts @@ -2,7 +2,7 @@ import {cleanObject} from "@tsed/core"; import isMatch from "lodash/isMatch"; import low from "lowdb"; import {v4 as uuid} from "uuid"; -import {Adapter} from "../domain/Adapter"; +import {Adapter} from "../domain/Adapter.js"; export interface AdapterModel { _id: string; diff --git a/packages/orm/adapters/src/adapters/MemoryAdapter.spec.ts b/packages/orm/adapters/src/adapters/MemoryAdapter.spec.ts index 06ab94bdb79..9b6f97faff7 100644 --- a/packages/orm/adapters/src/adapters/MemoryAdapter.spec.ts +++ b/packages/orm/adapters/src/adapters/MemoryAdapter.spec.ts @@ -2,9 +2,9 @@ import faker from "@faker-js/faker"; import {PlatformTest} from "@tsed/common"; import {deserialize} from "@tsed/json-mapper"; import {Format, getJsonSchema, Name, Property} from "@tsed/schema"; -import {Adapter} from "../domain/Adapter"; -import {Adapters} from "../services/Adapters"; -import {MemoryAdapter} from "./MemoryAdapter"; +import {Adapter} from "../domain/Adapter.js"; +import {Adapters} from "../services/Adapters.js"; +import {MemoryAdapter} from "./MemoryAdapter.js"; class BaseClient { @Format("date-time") diff --git a/packages/orm/adapters/src/adapters/MemoryAdapter.ts b/packages/orm/adapters/src/adapters/MemoryAdapter.ts index 138c69b989c..1e6c0acb05b 100644 --- a/packages/orm/adapters/src/adapters/MemoryAdapter.ts +++ b/packages/orm/adapters/src/adapters/MemoryAdapter.ts @@ -1,7 +1,7 @@ import {Configuration, Injectable, Opts, ProviderScope, Scope} from "@tsed/di"; import low from "lowdb"; import Memory from "lowdb/adapters/Memory"; -import {AdapterModel, LowDbAdapter} from "./LowDbAdapter"; +import {AdapterModel, LowDbAdapter} from "./LowDbAdapter.js"; @Injectable() @Scope(ProviderScope.INSTANCE) diff --git a/packages/orm/adapters/src/decorators/indexed.spec.ts b/packages/orm/adapters/src/decorators/indexed.spec.ts index c645ef527b2..2cdc8791dab 100644 --- a/packages/orm/adapters/src/decorators/indexed.spec.ts +++ b/packages/orm/adapters/src/decorators/indexed.spec.ts @@ -1,10 +1,10 @@ import {PlatformTest} from "@tsed/common"; import {Injectable} from "@tsed/di"; import {Property} from "@tsed/schema"; -import {MemoryAdapter} from "../adapters/MemoryAdapter"; -import {Adapter} from "../domain/Adapter"; -import {Indexed} from "./indexed"; -import {InjectAdapter} from "./injectAdapter"; +import {MemoryAdapter} from "../adapters/MemoryAdapter.js"; +import {Adapter} from "../domain/Adapter.js"; +import {Indexed} from "./indexed.js"; +import {InjectAdapter} from "./injectAdapter.js"; describe("Indexed", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/orm/adapters/src/decorators/injectAdapter.spec.ts b/packages/orm/adapters/src/decorators/injectAdapter.spec.ts index b9f897ea4f8..5259477f371 100644 --- a/packages/orm/adapters/src/decorators/injectAdapter.spec.ts +++ b/packages/orm/adapters/src/decorators/injectAdapter.spec.ts @@ -1,9 +1,9 @@ import {PlatformTest} from "@tsed/common"; import {Injectable} from "@tsed/di"; import {Name, Property} from "@tsed/schema"; -import {MemoryAdapter} from "../adapters/MemoryAdapter"; -import {Adapter} from "../domain/Adapter"; -import {InjectAdapter} from "./injectAdapter"; +import {MemoryAdapter} from "../adapters/MemoryAdapter.js"; +import {Adapter} from "../domain/Adapter.js"; +import {InjectAdapter} from "./injectAdapter.js"; describe("InjectAdapter", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/orm/adapters/src/decorators/injectAdapter.ts b/packages/orm/adapters/src/decorators/injectAdapter.ts index d32b7fdf6e5..ad97528a963 100644 --- a/packages/orm/adapters/src/decorators/injectAdapter.ts +++ b/packages/orm/adapters/src/decorators/injectAdapter.ts @@ -1,6 +1,6 @@ import {classOf, descriptorOf, isClass, isString, Type} from "@tsed/core"; import {Inject} from "@tsed/di"; -import {AdapterInvokeOptions, Adapters} from "../services/Adapters"; +import {AdapterInvokeOptions, Adapters} from "../services/Adapters.js"; function mapOptions(args: any[]): AdapterInvokeOptions { return args.reduce((options: AdapterInvokeOptions, item, index) => { diff --git a/packages/orm/adapters/src/domain/AdaptersSettings.ts b/packages/orm/adapters/src/domain/AdaptersSettings.ts index fc8fccc8381..87b4786a30e 100644 --- a/packages/orm/adapters/src/domain/AdaptersSettings.ts +++ b/packages/orm/adapters/src/domain/AdaptersSettings.ts @@ -1,5 +1,5 @@ import {Type} from "@tsed/core"; -import {Adapter} from "./Adapter"; +import {Adapter} from "./Adapter.js"; export interface AdaptersSettings { /** diff --git a/packages/orm/adapters/src/index.ts b/packages/orm/adapters/src/index.ts index b2ca611e3fd..5d4b154008c 100644 --- a/packages/orm/adapters/src/index.ts +++ b/packages/orm/adapters/src/index.ts @@ -2,11 +2,11 @@ * @file Automatically generated by barrelsby. */ -export * from "./adapters/FileSyncAdapter"; -export * from "./adapters/LowDbAdapter"; -export * from "./adapters/MemoryAdapter"; -export * from "./decorators/indexed"; -export * from "./decorators/injectAdapter"; -export * from "./domain/Adapter"; -export * from "./domain/AdaptersSettings"; -export * from "./services/Adapters"; +export * from "./adapters/FileSyncAdapter.js"; +export * from "./adapters/LowDbAdapter.js"; +export * from "./adapters/MemoryAdapter.js"; +export * from "./decorators/indexed.js"; +export * from "./decorators/injectAdapter.js"; +export * from "./domain/Adapter.js"; +export * from "./domain/AdaptersSettings.js"; +export * from "./services/Adapters.js"; diff --git a/packages/orm/adapters/src/services/Adapters.ts b/packages/orm/adapters/src/services/Adapters.ts index dc744f29bfe..ed4561a0822 100644 --- a/packages/orm/adapters/src/services/Adapters.ts +++ b/packages/orm/adapters/src/services/Adapters.ts @@ -1,7 +1,7 @@ import {Type} from "@tsed/core"; import {Constant, DI_PARAM_OPTIONS, Inject, Injectable, InjectorService} from "@tsed/di"; -import {MemoryAdapter} from "../adapters/MemoryAdapter"; -import {Adapter, AdapterConstructorOptions} from "../domain/Adapter"; +import {MemoryAdapter} from "../adapters/MemoryAdapter.js"; +import {Adapter, AdapterConstructorOptions} from "../domain/Adapter.js"; export interface AdapterInvokeOptions extends AdapterConstructorOptions { adapter?: Type>; diff --git a/packages/orm/adapters/test/discrinimator.integration.spec.ts b/packages/orm/adapters/test/discrinimator.integration.spec.ts index c88fdd14e92..f1587d5383d 100644 --- a/packages/orm/adapters/test/discrinimator.integration.spec.ts +++ b/packages/orm/adapters/test/discrinimator.integration.spec.ts @@ -1,6 +1,6 @@ import {PlatformTest} from "@tsed/common"; import {DiscriminatorKey, DiscriminatorValue, Property, Required} from "@tsed/schema"; -import {Adapter, Adapters, FileSyncAdapter} from "../src/index"; +import {Adapter, Adapters, FileSyncAdapter} from "../src/index.js"; class Event { @DiscriminatorKey() // declare this property a discriminator key diff --git a/packages/orm/ioredis/readme.md b/packages/orm/ioredis/readme.md index 966711fc15b..3b2aeba81eb 100644 --- a/packages/orm/ioredis/readme.md +++ b/packages/orm/ioredis/readme.md @@ -170,8 +170,8 @@ Here is a class that consume a redis connection: import {v4} from "uuid"; import {Injectable} from "@tsed/di"; import {serialize, deserialize} from "@tsed/json-mapper"; -import {REDIS_CONNECTION} from "./RedisConnection"; -import {ClientModel} from "./ClientModel"; +import {REDIS_CONNECTION} from "./RedisConnection.js"; +import {ClientModel} from "./ClientModel.js"; @Injectable() export class ClientRepository { @@ -215,9 +215,9 @@ export class ClientModel { And his test: ```typescript -import {ClientRepository} from "./ClientRepository"; -import {REDIS_CONNECTION} from "./RedisConnection"; -import {ClientModel} from "./ClientModel"; +import {ClientRepository} from "./ClientRepository.js"; +import {REDIS_CONNECTION} from "./RedisConnection.js"; +import {ClientModel} from "./ClientModel.js"; describe("IORedisTest", () => { beforeEach(() => IORedisTest.create()); // create a new sandbox with ioredis-mock connection diff --git a/packages/orm/ioredis/src/domain/IORedisStore.spec.ts b/packages/orm/ioredis/src/domain/IORedisStore.spec.ts index ef52043528d..b08e1050b7e 100644 --- a/packages/orm/ioredis/src/domain/IORedisStore.spec.ts +++ b/packages/orm/ioredis/src/domain/IORedisStore.spec.ts @@ -2,7 +2,7 @@ import {catchAsyncError, Hooks} from "@tsed/core"; import {Cache, caching} from "cache-manager"; import Redis from "ioredis"; -import {IORedisStore, ioRedisStore} from "./IORedisStore"; +import {IORedisStore, ioRedisStore} from "./IORedisStore.js"; jest.mock("ioredis", () => { return class Redis { diff --git a/packages/orm/ioredis/src/domain/IORedisTest.spec.ts b/packages/orm/ioredis/src/domain/IORedisTest.spec.ts index bb25ad4ba06..f49f43608bd 100644 --- a/packages/orm/ioredis/src/domain/IORedisTest.spec.ts +++ b/packages/orm/ioredis/src/domain/IORedisTest.spec.ts @@ -1,6 +1,6 @@ import {Inject, Injectable} from "@tsed/di"; -import {registerConnectionProvider} from "../utils/registerConnectionProvider"; -import {IORedisTest} from "./IORedisTest"; +import {registerConnectionProvider} from "../utils/registerConnectionProvider.js"; +import {IORedisTest} from "./IORedisTest.js"; import type {Redis} from "ioredis"; import RedisMock from "ioredis-mock"; diff --git a/packages/orm/ioredis/src/domain/IORedisTest.ts b/packages/orm/ioredis/src/domain/IORedisTest.ts index 918b2163717..e6c7ffa7ba2 100644 --- a/packages/orm/ioredis/src/domain/IORedisTest.ts +++ b/packages/orm/ioredis/src/domain/IORedisTest.ts @@ -1,5 +1,5 @@ import {DITest} from "@tsed/di"; -import {mockConnections} from "../utils/mockConnections"; +import {mockConnections} from "../utils/mockConnections.js"; export class IORedisTest extends DITest { static async create(options?: Partial) { diff --git a/packages/orm/ioredis/src/index.ts b/packages/orm/ioredis/src/index.ts index 5ae74ee412b..860e2c4dc5a 100644 --- a/packages/orm/ioredis/src/index.ts +++ b/packages/orm/ioredis/src/index.ts @@ -2,8 +2,8 @@ * @file Automatically generated by barrelsby. */ -export * from "./domain/IORedisConfiguration"; -export * from "./domain/IORedisStore"; -export * from "./domain/IORedisTest"; -export * from "./utils/mockConnections"; -export * from "./utils/registerConnectionProvider"; +export * from "./domain/IORedisConfiguration.js"; +export * from "./domain/IORedisStore.js"; +export * from "./domain/IORedisTest.js"; +export * from "./utils/mockConnections.js"; +export * from "./utils/registerConnectionProvider.js"; diff --git a/packages/orm/ioredis/src/utils/mockConnections.ts b/packages/orm/ioredis/src/utils/mockConnections.ts index 41fe32e7bde..ed93b991385 100644 --- a/packages/orm/ioredis/src/utils/mockConnections.ts +++ b/packages/orm/ioredis/src/utils/mockConnections.ts @@ -1,7 +1,7 @@ import {GlobalProviders, TokenProvider} from "@tsed/di"; import Redis from "ioredis"; -import {IOREDIS_CONNECTIONS} from "./registerConnectionProvider"; +import {IOREDIS_CONNECTIONS} from "./registerConnectionProvider.js"; export async function mockConnection(token: TokenProvider, name: string) { const {default: RealIORedis} = await import("ioredis-mock"); diff --git a/packages/orm/ioredis/src/utils/registerConnectionProvider.spec.ts b/packages/orm/ioredis/src/utils/registerConnectionProvider.spec.ts index be2c1672921..f3a235bd678 100644 --- a/packages/orm/ioredis/src/utils/registerConnectionProvider.spec.ts +++ b/packages/orm/ioredis/src/utils/registerConnectionProvider.spec.ts @@ -1,13 +1,16 @@ import {DITest} from "@tsed/di"; import Redis from "ioredis"; -import {registerConnectionProvider} from "./registerConnectionProvider"; +import {registerConnectionProvider} from "./registerConnectionProvider.js"; jest.mock("ioredis", () => { class MockRedis { static Cluster = class { connector: any = {}; - constructor(public nodes: any, public options: any) { + constructor( + public nodes: any, + public options: any + ) { this.connector.options = options; } diff --git a/packages/orm/ioredis/src/utils/registerConnectionProvider.ts b/packages/orm/ioredis/src/utils/registerConnectionProvider.ts index 1fe60006235..a1aaa388a17 100644 --- a/packages/orm/ioredis/src/utils/registerConnectionProvider.ts +++ b/packages/orm/ioredis/src/utils/registerConnectionProvider.ts @@ -2,8 +2,8 @@ import {setValue} from "@tsed/core"; import {Configuration, registerProvider, TokenProvider} from "@tsed/di"; import {Logger} from "@tsed/logger"; import Redis, {Cluster, RedisOptions} from "ioredis"; -import {IORedisConfiguration} from "../domain/IORedisConfiguration"; -import {ioRedisStore} from "../domain/IORedisStore"; +import {IORedisConfiguration} from "../domain/IORedisConfiguration.js"; +import {ioRedisStore} from "../domain/IORedisStore.js"; export interface CreateConnectionProviderProps { provide: TokenProvider; diff --git a/packages/orm/mikro-orm/src/MikroOrmModule.spec.ts b/packages/orm/mikro-orm/src/MikroOrmModule.spec.ts index 30598cbe377..8bd47e6b0fe 100644 --- a/packages/orm/mikro-orm/src/MikroOrmModule.spec.ts +++ b/packages/orm/mikro-orm/src/MikroOrmModule.spec.ts @@ -1,10 +1,10 @@ import {EntityManager, EventSubscriber, MikroORM, Options} from "@mikro-orm/core"; import {PlatformTest} from "@tsed/common"; import {anyOfClass, anything, deepEqual, instance, mock, reset, verify, when} from "ts-mockito"; -import {MikroOrmModule} from "./MikroOrmModule"; -import {MikroOrmContext} from "./services/MikroOrmContext"; -import {MikroOrmRegistry} from "./services/MikroOrmRegistry"; -import {Subscriber} from "./decorators/subscriber"; +import {MikroOrmModule} from "./MikroOrmModule.js"; +import {MikroOrmContext} from "./services/MikroOrmContext.js"; +import {MikroOrmRegistry} from "./services/MikroOrmRegistry.js"; +import {Subscriber} from "./decorators/subscriber.js"; class Subscriber1 implements EventSubscriber {} diff --git a/packages/orm/mikro-orm/src/MikroOrmModule.ts b/packages/orm/mikro-orm/src/MikroOrmModule.ts index 934749d8078..5ec1aeed109 100644 --- a/packages/orm/mikro-orm/src/MikroOrmModule.ts +++ b/packages/orm/mikro-orm/src/MikroOrmModule.ts @@ -12,12 +12,12 @@ import { registerProvider } from "@tsed/di"; import {EventSubscriber, Options} from "@mikro-orm/core"; -import {MikroOrmRegistry} from "./services/MikroOrmRegistry"; -import {RetryStrategy} from "./interfaces/RetryStrategy"; -import {OptimisticLockErrorFilter} from "./filters/OptimisticLockErrorFilter"; -import {MikroOrmContext} from "./services/MikroOrmContext"; +import {MikroOrmRegistry} from "./services/MikroOrmRegistry.js"; +import {RetryStrategy} from "./interfaces/RetryStrategy.js"; +import {OptimisticLockErrorFilter} from "./filters/OptimisticLockErrorFilter.js"; +import {MikroOrmContext} from "./services/MikroOrmContext.js"; import {classOf, isFunction, Store} from "@tsed/core"; -import {DEFAULT_CONTEXT_NAME, SUBSCRIBER_INJECTION_TYPE} from "./constants"; +import {DEFAULT_CONTEXT_NAME, SUBSCRIBER_INJECTION_TYPE} from "./constants.js"; declare global { // eslint-disable-next-line @typescript-eslint/no-namespace diff --git a/packages/orm/mikro-orm/src/decorators/entityManager.spec.ts b/packages/orm/mikro-orm/src/decorators/entityManager.spec.ts index 344db619bcd..d3d636dcc0e 100644 --- a/packages/orm/mikro-orm/src/decorators/entityManager.spec.ts +++ b/packages/orm/mikro-orm/src/decorators/entityManager.spec.ts @@ -1,7 +1,7 @@ import {DecoratorTypes, Store} from "@tsed/core"; import {Controller, INJECTABLE_PROP} from "@tsed/di"; import {MongoEntityManager} from "@mikro-orm/mongodb"; -import {EntityManager} from "./entityManager"; +import {EntityManager} from "./entityManager.js"; @Controller("/users") export class UsersCtrl { diff --git a/packages/orm/mikro-orm/src/decorators/entityManager.ts b/packages/orm/mikro-orm/src/decorators/entityManager.ts index c18f5bfa758..2899d6d498f 100644 --- a/packages/orm/mikro-orm/src/decorators/entityManager.ts +++ b/packages/orm/mikro-orm/src/decorators/entityManager.ts @@ -1,5 +1,5 @@ import {Inject} from "@tsed/di"; -import {MikroOrmRegistry} from "../services/MikroOrmRegistry"; +import {MikroOrmRegistry} from "../services/MikroOrmRegistry.js"; /** * Get the entity manager for the given context name. diff --git a/packages/orm/mikro-orm/src/decorators/orm.spec.ts b/packages/orm/mikro-orm/src/decorators/orm.spec.ts index 96004ca9c70..e9c0a3b6f89 100644 --- a/packages/orm/mikro-orm/src/decorators/orm.spec.ts +++ b/packages/orm/mikro-orm/src/decorators/orm.spec.ts @@ -1,6 +1,6 @@ import {DecoratorTypes, Store} from "@tsed/core"; import {Controller, INJECTABLE_PROP} from "@tsed/di"; -import {Orm} from "./orm"; +import {Orm} from "./orm.js"; import {MikroORM} from "@mikro-orm/core"; @Controller("/users") diff --git a/packages/orm/mikro-orm/src/decorators/orm.ts b/packages/orm/mikro-orm/src/decorators/orm.ts index 102622eb76e..320829be58f 100644 --- a/packages/orm/mikro-orm/src/decorators/orm.ts +++ b/packages/orm/mikro-orm/src/decorators/orm.ts @@ -1,4 +1,4 @@ -import {MikroOrmRegistry} from "../services/MikroOrmRegistry"; +import {MikroOrmRegistry} from "../services/MikroOrmRegistry.js"; import {Inject} from "@tsed/di"; /** diff --git a/packages/orm/mikro-orm/src/decorators/subscriber.spec.ts b/packages/orm/mikro-orm/src/decorators/subscriber.spec.ts index 11f2f8eb467..495a0eddaf1 100644 --- a/packages/orm/mikro-orm/src/decorators/subscriber.spec.ts +++ b/packages/orm/mikro-orm/src/decorators/subscriber.spec.ts @@ -1,7 +1,7 @@ import {Store} from "@tsed/core"; import {EventSubscriber} from "@mikro-orm/core"; -import {Subscriber} from "./subscriber"; -import {DEFAULT_CONTEXT_NAME, SUBSCRIBER_INJECTION_TYPE} from "../constants"; +import {Subscriber} from "./subscriber.js"; +import {DEFAULT_CONTEXT_NAME, SUBSCRIBER_INJECTION_TYPE} from "../constants.js"; @Subscriber() export class Subscriber1 implements EventSubscriber {} diff --git a/packages/orm/mikro-orm/src/decorators/subscriber.ts b/packages/orm/mikro-orm/src/decorators/subscriber.ts index 593e3b2d9ca..c6536db357f 100644 --- a/packages/orm/mikro-orm/src/decorators/subscriber.ts +++ b/packages/orm/mikro-orm/src/decorators/subscriber.ts @@ -1,6 +1,6 @@ import {StoreSet, useDecorators} from "@tsed/core"; import {Injectable} from "@tsed/di"; -import {DEFAULT_CONTEXT_NAME, SUBSCRIBER_INJECTION_TYPE} from "../constants"; +import {DEFAULT_CONTEXT_NAME, SUBSCRIBER_INJECTION_TYPE} from "../constants.js"; /** * Register a new subscriber for the given context name. diff --git a/packages/orm/mikro-orm/src/decorators/transactional.spec.ts b/packages/orm/mikro-orm/src/decorators/transactional.spec.ts index 0185eec1683..5c5c1061845 100644 --- a/packages/orm/mikro-orm/src/decorators/transactional.spec.ts +++ b/packages/orm/mikro-orm/src/decorators/transactional.spec.ts @@ -1,8 +1,8 @@ import {Post} from "@tsed/common"; import {Store} from "@tsed/core"; import {Controller, INJECTABLE_PROP} from "@tsed/di"; -import {TransactionalInterceptor} from "../interceptors/TransactionalInterceptor"; -import {Transactional} from "./transactional"; +import {TransactionalInterceptor} from "../interceptors/TransactionalInterceptor.js"; +import {Transactional} from "./transactional.js"; @Controller("/users") export class UsersCtrl { diff --git a/packages/orm/mikro-orm/src/decorators/transactional.ts b/packages/orm/mikro-orm/src/decorators/transactional.ts index 87a68b6af8b..3320601bcd8 100644 --- a/packages/orm/mikro-orm/src/decorators/transactional.ts +++ b/packages/orm/mikro-orm/src/decorators/transactional.ts @@ -1,5 +1,5 @@ import {Intercept} from "@tsed/di"; -import {TransactionalInterceptor, TransactionOptions} from "../interceptors/TransactionalInterceptor"; +import {TransactionalInterceptor, TransactionOptions} from "../interceptors/TransactionalInterceptor.js"; /** * Register a new request context for your method and execute it inside the context. diff --git a/packages/orm/mikro-orm/src/filters/OptimisticLockErrorFilter.spec.ts b/packages/orm/mikro-orm/src/filters/OptimisticLockErrorFilter.spec.ts index 7901d7daf54..c5111da5e93 100644 --- a/packages/orm/mikro-orm/src/filters/OptimisticLockErrorFilter.spec.ts +++ b/packages/orm/mikro-orm/src/filters/OptimisticLockErrorFilter.spec.ts @@ -1,5 +1,5 @@ import {instance, mock, objectContaining, reset, spy, verify} from "ts-mockito"; -import {OptimisticLockErrorFilter} from "./OptimisticLockErrorFilter"; +import {OptimisticLockErrorFilter} from "./OptimisticLockErrorFilter.js"; import {OptimisticLockError} from "@mikro-orm/core"; import {Logger, PlatformContext, PlatformTest} from "@tsed/common"; diff --git a/packages/orm/mikro-orm/src/index.ts b/packages/orm/mikro-orm/src/index.ts index 1e10cbcac17..3c9a7342d27 100644 --- a/packages/orm/mikro-orm/src/index.ts +++ b/packages/orm/mikro-orm/src/index.ts @@ -2,17 +2,17 @@ * @file Automatically generated by barrelsby. */ -export * from "./MikroOrmModule"; -export * from "./constants"; -export * from "./decorators/entityManager"; -export * from "./decorators/orm"; -export * from "./decorators/subscriber"; -export * from "./decorators/transactional"; -export * from "./filters/OptimisticLockErrorFilter"; -export * from "./interceptors/TransactionalInterceptor"; -export * from "./interfaces/AfterTransactionCommit"; -export * from "./interfaces/BeforeTransactionCommit"; -export * from "./interfaces/RetryStrategy"; -export * from "./services/MikroOrmContext"; -export * from "./services/MikroOrmFactory"; -export * from "./services/MikroOrmRegistry"; +export * from "./MikroOrmModule.js"; +export * from "./constants.js"; +export * from "./decorators/entityManager.js"; +export * from "./decorators/orm.js"; +export * from "./decorators/subscriber.js"; +export * from "./decorators/transactional.js"; +export * from "./filters/OptimisticLockErrorFilter.js"; +export * from "./interceptors/TransactionalInterceptor.js"; +export * from "./interfaces/AfterTransactionCommit.js"; +export * from "./interfaces/BeforeTransactionCommit.js"; +export * from "./interfaces/RetryStrategy.js"; +export * from "./services/MikroOrmContext.js"; +export * from "./services/MikroOrmFactory.js"; +export * from "./services/MikroOrmRegistry.js"; diff --git a/packages/orm/mikro-orm/src/interceptors/TransactionalInterceptor.spec.ts b/packages/orm/mikro-orm/src/interceptors/TransactionalInterceptor.spec.ts index 5c6957c1503..e65ef4a03b4 100644 --- a/packages/orm/mikro-orm/src/interceptors/TransactionalInterceptor.spec.ts +++ b/packages/orm/mikro-orm/src/interceptors/TransactionalInterceptor.spec.ts @@ -1,11 +1,11 @@ -import {TransactionalInterceptor} from "./TransactionalInterceptor"; +import {TransactionalInterceptor} from "./TransactionalInterceptor.js"; import {anyFunction, anything, deepEqual, instance, mock, objectContaining, reset, verify, when} from "ts-mockito"; import {InjectorService, InterceptorContext} from "@tsed/di"; import {Logger} from "@tsed/logger"; import {EntityManager, IsolationLevel, MikroORM, OptimisticLockError} from "@mikro-orm/core"; -import {MikroOrmRegistry} from "../services/MikroOrmRegistry"; -import {RetryStrategy} from "../interfaces/RetryStrategy"; -import {MikroOrmContext} from "../services/MikroOrmContext"; +import {MikroOrmRegistry} from "../services/MikroOrmRegistry.js"; +import {RetryStrategy} from "../interfaces/RetryStrategy.js"; +import {MikroOrmContext} from "../services/MikroOrmContext.js"; // AHDOC: https://github.com/NagRock/ts-mockito/issues/191 // TODO: avoid using ts-mockito diff --git a/packages/orm/mikro-orm/src/interceptors/TransactionalInterceptor.ts b/packages/orm/mikro-orm/src/interceptors/TransactionalInterceptor.ts index 76c0f74eb5c..8a545491407 100644 --- a/packages/orm/mikro-orm/src/interceptors/TransactionalInterceptor.ts +++ b/packages/orm/mikro-orm/src/interceptors/TransactionalInterceptor.ts @@ -1,10 +1,10 @@ import {Inject, InjectorService, Interceptor, InterceptorContext, InterceptorMethods, InterceptorNext} from "@tsed/di"; import {Logger} from "@tsed/logger"; -import {RetryStrategy} from "../interfaces/RetryStrategy"; -import {MikroOrmContext} from "../services/MikroOrmContext"; -import {MikroOrmRegistry} from "../services/MikroOrmRegistry"; +import {RetryStrategy} from "../interfaces/RetryStrategy.js"; +import {MikroOrmContext} from "../services/MikroOrmContext.js"; +import {MikroOrmRegistry} from "../services/MikroOrmRegistry.js"; import {EntityManager, FlushMode, IsolationLevel} from "@mikro-orm/core"; -import {DEFAULT_CONTEXT_NAME} from "../constants"; +import {DEFAULT_CONTEXT_NAME} from "../constants.js"; export interface TransactionOptions { retry?: boolean; diff --git a/packages/orm/mikro-orm/src/services/MikroOrmContext.spec.ts b/packages/orm/mikro-orm/src/services/MikroOrmContext.spec.ts index 8f8662a1778..0e20fe33bdd 100644 --- a/packages/orm/mikro-orm/src/services/MikroOrmContext.spec.ts +++ b/packages/orm/mikro-orm/src/services/MikroOrmContext.spec.ts @@ -1,6 +1,6 @@ import {EntityManager, RequestContext} from "@mikro-orm/core"; import {deepEqual, instance as originalInstance, mock, reset, spy, verify, when} from "ts-mockito"; -import {MikroOrmContext} from "./MikroOrmContext"; +import {MikroOrmContext} from "./MikroOrmContext.js"; const instance = (m: T): T => new Proxy(originalInstance(m), { diff --git a/packages/orm/mikro-orm/src/services/MikroOrmFactory.ts b/packages/orm/mikro-orm/src/services/MikroOrmFactory.ts index 19254e1720c..974ab23f0e7 100644 --- a/packages/orm/mikro-orm/src/services/MikroOrmFactory.ts +++ b/packages/orm/mikro-orm/src/services/MikroOrmFactory.ts @@ -1,6 +1,6 @@ import {MikroORM, Options} from "@mikro-orm/core"; import {Inject, Injectable} from "@tsed/di"; -import {MikroOrmContext} from "./MikroOrmContext"; +import {MikroOrmContext} from "./MikroOrmContext.js"; @Injectable() export class MikroOrmFactory { diff --git a/packages/orm/mikro-orm/src/services/MikroOrmRegistry.spec.ts b/packages/orm/mikro-orm/src/services/MikroOrmRegistry.spec.ts index 3319dc7228d..0caf34498c5 100644 --- a/packages/orm/mikro-orm/src/services/MikroOrmRegistry.spec.ts +++ b/packages/orm/mikro-orm/src/services/MikroOrmRegistry.spec.ts @@ -1,8 +1,8 @@ import {anything, instance, mock, reset, verify, when} from "ts-mockito"; import {Logger} from "@tsed/logger"; import {MikroORM, Options} from "@mikro-orm/core"; -import {MikroOrmFactory} from "./MikroOrmFactory"; -import {MikroOrmRegistry} from "./MikroOrmRegistry"; +import {MikroOrmFactory} from "./MikroOrmFactory.js"; +import {MikroOrmRegistry} from "./MikroOrmRegistry.js"; const fixtures: {mydb2: Options; none: Options; mydb: Options} = { mydb: { diff --git a/packages/orm/mikro-orm/src/services/MikroOrmRegistry.ts b/packages/orm/mikro-orm/src/services/MikroOrmRegistry.ts index 6b16f268eb6..2d836e438fb 100644 --- a/packages/orm/mikro-orm/src/services/MikroOrmRegistry.ts +++ b/packages/orm/mikro-orm/src/services/MikroOrmRegistry.ts @@ -1,4 +1,4 @@ -import {MikroOrmFactory} from "./MikroOrmFactory"; +import {MikroOrmFactory} from "./MikroOrmFactory.js"; import {Inject, Injectable} from "@tsed/di"; import {IDatabaseDriver as DatabaseDriver, MikroORM, Options} from "@mikro-orm/core"; import {catchAsyncError, getValue} from "@tsed/core"; @@ -9,7 +9,10 @@ export class MikroOrmRegistry { private readonly DEFAULT_CONTEXT_NAME = "default"; private readonly instances = new Map(); - constructor(@Inject() private readonly logger: Logger, @Inject() private readonly mikroOrmFactory: MikroOrmFactory) {} + constructor( + @Inject() private readonly logger: Logger, + @Inject() private readonly mikroOrmFactory: MikroOrmFactory + ) {} public async register(options: Options): Promise { const contextName = getValue(options, "contextName", this.DEFAULT_CONTEXT_NAME); diff --git a/packages/orm/mikro-orm/test/helpers/services/Hooks.ts b/packages/orm/mikro-orm/test/helpers/services/Hooks.ts index 22196108dd1..d03f0e2c523 100644 --- a/packages/orm/mikro-orm/test/helpers/services/Hooks.ts +++ b/packages/orm/mikro-orm/test/helpers/services/Hooks.ts @@ -1,4 +1,4 @@ -import {AfterTransactionCommit, BeforeTransactionCommit} from "../../../src"; +import {AfterTransactionCommit, BeforeTransactionCommit} from "../../../src/index.js"; import {EntityManager} from "@mikro-orm/core"; import {Injectable} from "@tsed/di"; diff --git a/packages/orm/mikro-orm/test/helpers/services/ManagedEventSubscriber.ts b/packages/orm/mikro-orm/test/helpers/services/ManagedEventSubscriber.ts index ff514ae489c..9139a80e538 100644 --- a/packages/orm/mikro-orm/test/helpers/services/ManagedEventSubscriber.ts +++ b/packages/orm/mikro-orm/test/helpers/services/ManagedEventSubscriber.ts @@ -1,7 +1,7 @@ import {EventSubscriber, TransactionEventArgs} from "@mikro-orm/core"; import {Inject} from "@tsed/di"; import {Logger} from "@tsed/logger"; -import {Subscriber} from "../../../src"; +import {Subscriber} from "../../../src/index.js"; @Subscriber() export class ManagedEventSubscriber implements EventSubscriber { diff --git a/packages/orm/mikro-orm/test/helpers/services/UserService.ts b/packages/orm/mikro-orm/test/helpers/services/UserService.ts index 66f2dc98fa3..49ccf81b5d8 100644 --- a/packages/orm/mikro-orm/test/helpers/services/UserService.ts +++ b/packages/orm/mikro-orm/test/helpers/services/UserService.ts @@ -1,7 +1,7 @@ import {EntityManager, MikroORM} from "@mikro-orm/core"; import {Injectable} from "@tsed/di"; -import {Em, Orm, Transactional} from "../../../src"; -import {User} from "../entity/User"; +import {Em, Orm, Transactional} from "../../../src/index.js"; +import {User} from "../entity/User.js"; @Injectable() export class UserService { diff --git a/packages/orm/mikro-orm/test/integration.spec.ts b/packages/orm/mikro-orm/test/integration.spec.ts index 3af6864281d..5328116c475 100644 --- a/packages/orm/mikro-orm/test/integration.spec.ts +++ b/packages/orm/mikro-orm/test/integration.spec.ts @@ -1,15 +1,15 @@ import {PlatformTest} from "@tsed/common"; import {Logger} from "@tsed/logger"; import {TestMongooseContext} from "@tsed/testing-mongoose"; -import {User} from "./helpers/entity/User"; -import {Server} from "./helpers/Server"; -import {UserService} from "./helpers/services/UserService"; +import {User} from "./helpers/entity/User.js"; +import {Server} from "./helpers/Server.js"; +import {UserService} from "./helpers/services/UserService.js"; import {EntityManager, MikroORM} from "@mikro-orm/core"; import {anyOfClass, anything, reset, spy, verify} from "ts-mockito"; -import {UnmanagedEventSubscriber1} from "./helpers/services/UnmanagedEventSubscriber1"; -import {UnmanagedEventSubscriber2} from "./helpers/services/UnmanagedEventSubscriber2"; -import {MikroOrmModule, TransactionalInterceptor} from "../src"; -import {Hooks} from "./helpers/services/Hooks"; +import {UnmanagedEventSubscriber1} from "./helpers/services/UnmanagedEventSubscriber1.js"; +import {UnmanagedEventSubscriber2} from "./helpers/services/UnmanagedEventSubscriber2.js"; +import {MikroOrmModule, TransactionalInterceptor} from "../src/index.js"; +import {Hooks} from "./helpers/services/Hooks.js"; import {defineConfig} from "@mikro-orm/mongodb"; describe("MikroOrm integration", () => { diff --git a/packages/orm/mongoose/readme.md b/packages/orm/mongoose/readme.md index 62c3377d92d..04760d861a3 100644 --- a/packages/orm/mongoose/readme.md +++ b/packages/orm/mongoose/readme.md @@ -172,7 +172,7 @@ export class MyModel { ```typescript import {Service, Inject} from "@tsed/common"; import {MongooseModel} from "@tsed/mongoose"; -import {MyModel} from "./models/MyModel"; +import {MyModel} from "./models/MyModel.js"; @Service() export class MyService { diff --git a/packages/orm/mongoose/src/MongooseModule.ts b/packages/orm/mongoose/src/MongooseModule.ts index 5c1f3eabf46..5694ca5e26e 100644 --- a/packages/orm/mongoose/src/MongooseModule.ts +++ b/packages/orm/mongoose/src/MongooseModule.ts @@ -1,7 +1,7 @@ import {Configuration, OnInit} from "@tsed/di"; import {Module, OnDestroy} from "@tsed/di"; -import {MONGOOSE_CONNECTIONS} from "./services/MongooseConnections"; -import {MongooseService} from "./services/MongooseService"; +import {MONGOOSE_CONNECTIONS} from "./services/MongooseConnections.js"; +import {MongooseService} from "./services/MongooseService.js"; /** * @ignore @@ -10,7 +10,10 @@ import {MongooseService} from "./services/MongooseService"; imports: [MONGOOSE_CONNECTIONS] }) export class MongooseModule implements OnDestroy, OnInit { - constructor(private mongooseService: MongooseService, @Configuration() private settings: Configuration) { + constructor( + private mongooseService: MongooseService, + @Configuration() private settings: Configuration + ) { // auto configure the cache manager when mongoose is used with @tsed/mongoose const cache = this.settings.get("cache"); diff --git a/packages/orm/mongoose/src/decorators/auto.spec.ts b/packages/orm/mongoose/src/decorators/auto.spec.ts index 3c587a6d0dd..c18e555e696 100644 --- a/packages/orm/mongoose/src/decorators/auto.spec.ts +++ b/packages/orm/mongoose/src/decorators/auto.spec.ts @@ -1,6 +1,6 @@ import {descriptorOf, Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {Auto} from "./auto"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {Auto} from "./auto.js"; describe("@Auto()", () => { it("should set metadata (default)", () => { diff --git a/packages/orm/mongoose/src/decorators/auto.ts b/packages/orm/mongoose/src/decorators/auto.ts index a1eb46bc83b..382053ff5b2 100644 --- a/packages/orm/mongoose/src/decorators/auto.ts +++ b/packages/orm/mongoose/src/decorators/auto.ts @@ -1,4 +1,4 @@ -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * If true, uses Mongoose's default _id settings. Only allowed for ObjectIds diff --git a/packages/orm/mongoose/src/decorators/dynamicRef.spec.ts b/packages/orm/mongoose/src/decorators/dynamicRef.spec.ts index ea2b5e69b74..b2f1abc41b7 100644 --- a/packages/orm/mongoose/src/decorators/dynamicRef.spec.ts +++ b/packages/orm/mongoose/src/decorators/dynamicRef.spec.ts @@ -1,8 +1,8 @@ import {descriptorOf, Store} from "@tsed/core"; import {getJsonSchema} from "@tsed/schema"; import {Schema} from "mongoose"; -import {MONGOOSE_MODEL_NAME, MONGOOSE_SCHEMA} from "../constants/constants"; -import {DynamicRef} from "../../src"; +import {MONGOOSE_MODEL_NAME, MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {DynamicRef} from "../../src/index.js"; describe("@DynamicRef()", () => { it("should set metadata", () => { diff --git a/packages/orm/mongoose/src/decorators/dynamicRef.ts b/packages/orm/mongoose/src/decorators/dynamicRef.ts index 08fe5082acd..f76e01bb382 100644 --- a/packages/orm/mongoose/src/decorators/dynamicRef.ts +++ b/packages/orm/mongoose/src/decorators/dynamicRef.ts @@ -1,9 +1,9 @@ import {classOf, isArrowFn, isString, StoreMerge, Type, useDecorators} from "@tsed/core"; import {Description, Example, JsonHookContext, OneOf, Property, string} from "@tsed/schema"; import {Schema as MongooseSchema} from "mongoose"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; import {deserialize, OnDeserialize, OnSerialize, serialize} from "@tsed/json-mapper"; -import {MongooseModels} from "../registries/MongooseModels"; +import {MongooseModels} from "../registries/MongooseModels.js"; function isRef(value: undefined | string | any) { return (value && value._bsontype) || isString(value); diff --git a/packages/orm/mongoose/src/decorators/excludeIndexes.spec.ts b/packages/orm/mongoose/src/decorators/excludeIndexes.spec.ts index 237ca4aa71b..f5c0ed10c71 100644 --- a/packages/orm/mongoose/src/decorators/excludeIndexes.spec.ts +++ b/packages/orm/mongoose/src/decorators/excludeIndexes.spec.ts @@ -1,6 +1,6 @@ import {descriptorOf, Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {ExcludeIndexes} from "./excludeIndexes"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {ExcludeIndexes} from "./excludeIndexes.js"; describe("@ExcludeIndexes()", () => { it("should set metadata (default)", () => { diff --git a/packages/orm/mongoose/src/decorators/excludeIndexes.ts b/packages/orm/mongoose/src/decorators/excludeIndexes.ts index 7aa182e8a85..974457b2e88 100644 --- a/packages/orm/mongoose/src/decorators/excludeIndexes.ts +++ b/packages/orm/mongoose/src/decorators/excludeIndexes.ts @@ -1,4 +1,4 @@ -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * If true, Mongoose will skip gathering indexes on subpaths. Only allowed for subdocuments and subdocument arrays. diff --git a/packages/orm/mongoose/src/decorators/expires.spec.ts b/packages/orm/mongoose/src/decorators/expires.spec.ts index 43a472c776d..37215905cf3 100644 --- a/packages/orm/mongoose/src/decorators/expires.spec.ts +++ b/packages/orm/mongoose/src/decorators/expires.spec.ts @@ -1,6 +1,6 @@ import {descriptorOf, Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {Expires} from "./expires"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {Expires} from "./expires.js"; describe("@Expires()", () => { it("should set metadata", () => { diff --git a/packages/orm/mongoose/src/decorators/expires.ts b/packages/orm/mongoose/src/decorators/expires.ts index 82b6756bafe..beaef4a72b2 100644 --- a/packages/orm/mongoose/src/decorators/expires.ts +++ b/packages/orm/mongoose/src/decorators/expires.ts @@ -1,4 +1,4 @@ -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * Defines a TTL index on this path. Only allowed for dates. diff --git a/packages/orm/mongoose/src/decorators/immutable.spec.ts b/packages/orm/mongoose/src/decorators/immutable.spec.ts index 191baac43b7..89b65293c3f 100644 --- a/packages/orm/mongoose/src/decorators/immutable.spec.ts +++ b/packages/orm/mongoose/src/decorators/immutable.spec.ts @@ -1,6 +1,6 @@ import {descriptorOf, Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {Immutable} from "./immutable"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {Immutable} from "./immutable.js"; describe("@Immutable()", () => { it("should set metadata (default)", () => { diff --git a/packages/orm/mongoose/src/decorators/immutable.ts b/packages/orm/mongoose/src/decorators/immutable.ts index adbf4709d55..7210ed48aa1 100644 --- a/packages/orm/mongoose/src/decorators/immutable.ts +++ b/packages/orm/mongoose/src/decorators/immutable.ts @@ -1,4 +1,4 @@ -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * If [truthy](https://masteringjs.io/tutorials/fundamentals/truthy), Mongoose will diff --git a/packages/orm/mongoose/src/decorators/indexed.spec.ts b/packages/orm/mongoose/src/decorators/indexed.spec.ts index a45b8794f11..c8d59679478 100644 --- a/packages/orm/mongoose/src/decorators/indexed.spec.ts +++ b/packages/orm/mongoose/src/decorators/indexed.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {Indexed} from "./indexed"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {Indexed} from "./indexed.js"; describe("@Indexed()", () => { it("should set metadata", () => { diff --git a/packages/orm/mongoose/src/decorators/indexed.ts b/packages/orm/mongoose/src/decorators/indexed.ts index 251db4292c9..dcc12b6f531 100644 --- a/packages/orm/mongoose/src/decorators/indexed.ts +++ b/packages/orm/mongoose/src/decorators/indexed.ts @@ -1,5 +1,5 @@ import {IndexOptions} from "mongoose"; -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * Tell Mongoose whether to define an index for the property. diff --git a/packages/orm/mongoose/src/decorators/lowercase.spec.ts b/packages/orm/mongoose/src/decorators/lowercase.spec.ts index 2b7afd5dd1a..5345c491c09 100644 --- a/packages/orm/mongoose/src/decorators/lowercase.spec.ts +++ b/packages/orm/mongoose/src/decorators/lowercase.spec.ts @@ -1,6 +1,6 @@ import {descriptorOf, Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {Lowercase} from "./lowercase"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {Lowercase} from "./lowercase.js"; describe("@Lowercase()", () => { it("should set metadata (default)", () => { diff --git a/packages/orm/mongoose/src/decorators/lowercase.ts b/packages/orm/mongoose/src/decorators/lowercase.ts index 34fe893f17e..afb6cb8861b 100644 --- a/packages/orm/mongoose/src/decorators/lowercase.ts +++ b/packages/orm/mongoose/src/decorators/lowercase.ts @@ -1,4 +1,4 @@ -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * If truthy, Mongoose will add a custom setter that lowercases this string using JavaScript's built-in String#toLowerCase(). diff --git a/packages/orm/mongoose/src/decorators/model.ts b/packages/orm/mongoose/src/decorators/model.ts index 004894b6b72..1a43f41beb0 100644 --- a/packages/orm/mongoose/src/decorators/model.ts +++ b/packages/orm/mongoose/src/decorators/model.ts @@ -2,11 +2,11 @@ import {nameOf, useDecorators} from "@tsed/core"; import {registerProvider} from "@tsed/di"; import {DiscriminatorValue} from "@tsed/schema"; import {Schema} from "mongoose"; -import {MongooseModelOptions} from "../interfaces/MongooseModelOptions"; -import {MONGOOSE_CONNECTIONS} from "../services/MongooseConnections"; -import {createModel, getModelToken} from "../utils/createModel"; -import {getSchema} from "../utils/createSchema"; -import {applySchemaOptions, schemaOptions} from "../utils/schemaOptions"; +import {MongooseModelOptions} from "../interfaces/MongooseModelOptions.js"; +import {MONGOOSE_CONNECTIONS} from "../services/MongooseConnections.js"; +import {createModel, getModelToken} from "../utils/createModel.js"; +import {getSchema} from "../utils/createSchema.js"; +import {applySchemaOptions, schemaOptions} from "../utils/schemaOptions.js"; /** * Define a class as a Mongoose Model. The model can be injected to the Service, Controller, Middleware, Converters or Filter with diff --git a/packages/orm/mongoose/src/decorators/mongooseIndex.spec.ts b/packages/orm/mongoose/src/decorators/mongooseIndex.spec.ts index 32561c3f485..ea72c66cf84 100644 --- a/packages/orm/mongoose/src/decorators/mongooseIndex.spec.ts +++ b/packages/orm/mongoose/src/decorators/mongooseIndex.spec.ts @@ -1,5 +1,5 @@ -import {MongooseIndex} from "../../src/decorators/mongooseIndex"; -import {schemaOptions} from "../../src/utils/schemaOptions"; +import {MongooseIndex} from "../../src/decorators/mongooseIndex.js"; +import {schemaOptions} from "../../src/utils/schemaOptions.js"; describe("@MongooseIndex()", () => { class Test {} diff --git a/packages/orm/mongoose/src/decorators/mongooseIndex.ts b/packages/orm/mongoose/src/decorators/mongooseIndex.ts index e81225c2628..c9d6be81caf 100644 --- a/packages/orm/mongoose/src/decorators/mongooseIndex.ts +++ b/packages/orm/mongoose/src/decorators/mongooseIndex.ts @@ -1,4 +1,4 @@ -import {schemaOptions} from "../utils/schemaOptions"; +import {schemaOptions} from "../utils/schemaOptions.js"; /** * Calls schema.index() to define an index (most likely compound) for the schema. diff --git a/packages/orm/mongoose/src/decorators/mongooseIndexes.spec.ts b/packages/orm/mongoose/src/decorators/mongooseIndexes.spec.ts index 76c20383187..a9bed12d26a 100644 --- a/packages/orm/mongoose/src/decorators/mongooseIndexes.spec.ts +++ b/packages/orm/mongoose/src/decorators/mongooseIndexes.spec.ts @@ -1,5 +1,5 @@ -import {MongooseIndexes} from "./mongooseIndexes"; -import {schemaOptions} from "../utils/schemaOptions"; +import {MongooseIndexes} from "./mongooseIndexes.js"; +import {schemaOptions} from "../utils/schemaOptions.js"; describe("@MongooseIndexes()", () => { class Test {} diff --git a/packages/orm/mongoose/src/decorators/mongooseIndexes.ts b/packages/orm/mongoose/src/decorators/mongooseIndexes.ts index 580e7cfc294..a1566c2c0bd 100644 --- a/packages/orm/mongoose/src/decorators/mongooseIndexes.ts +++ b/packages/orm/mongoose/src/decorators/mongooseIndexes.ts @@ -1,4 +1,4 @@ -import {schemaOptions} from "../utils/schemaOptions"; +import {schemaOptions} from "../utils/schemaOptions.js"; /** * Calls schema.index() to define multiple indexes (most likely compound) for the schema. diff --git a/packages/orm/mongoose/src/decorators/mongoosePlugin.spec.ts b/packages/orm/mongoose/src/decorators/mongoosePlugin.spec.ts index d72fe5ea658..2c42fc6a4fe 100644 --- a/packages/orm/mongoose/src/decorators/mongoosePlugin.spec.ts +++ b/packages/orm/mongoose/src/decorators/mongoosePlugin.spec.ts @@ -1,5 +1,5 @@ -import {MongoosePlugin} from "../../src/decorators/mongoosePlugin"; -import {schemaOptions} from "../../src/utils/schemaOptions"; +import {MongoosePlugin} from "../../src/decorators/mongoosePlugin.js"; +import {schemaOptions} from "../../src/utils/schemaOptions.js"; describe("@MongoosePlugin()", () => { it("should store options", () => { diff --git a/packages/orm/mongoose/src/decorators/mongoosePlugin.ts b/packages/orm/mongoose/src/decorators/mongoosePlugin.ts index 945e65675c4..d8b74b903fa 100644 --- a/packages/orm/mongoose/src/decorators/mongoosePlugin.ts +++ b/packages/orm/mongoose/src/decorators/mongoosePlugin.ts @@ -1,5 +1,5 @@ import mongoose from "mongoose"; -import {schemaOptions} from "../utils/schemaOptions"; +import {schemaOptions} from "../utils/schemaOptions.js"; /** * diff --git a/packages/orm/mongoose/src/decorators/numberDecimal.spec.ts b/packages/orm/mongoose/src/decorators/numberDecimal.spec.ts index 2b7a42112a2..223c9b606e6 100644 --- a/packages/orm/mongoose/src/decorators/numberDecimal.spec.ts +++ b/packages/orm/mongoose/src/decorators/numberDecimal.spec.ts @@ -2,8 +2,8 @@ import {Store} from "@tsed/core"; import {deserialize, serialize} from "@tsed/json-mapper"; import {getJsonSchema} from "@tsed/schema"; import {Types, Schema} from "mongoose"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {NumberDecimal, Decimal128, DecimalFormat} from "./numberDecimal"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {NumberDecimal, Decimal128, DecimalFormat} from "./numberDecimal.js"; describe("@NumberDecimal()", () => { it("should declare a Decimal128 field", () => { diff --git a/packages/orm/mongoose/src/decorators/numberDecimal.ts b/packages/orm/mongoose/src/decorators/numberDecimal.ts index 625d37beb8e..a4b049f30a2 100644 --- a/packages/orm/mongoose/src/decorators/numberDecimal.ts +++ b/packages/orm/mongoose/src/decorators/numberDecimal.ts @@ -3,7 +3,7 @@ import {isNumber, isString, StoreMerge, useDecorators} from "@tsed/core"; import {OnDeserialize, OnSerialize} from "@tsed/json-mapper"; import {Example, Format, Property} from "@tsed/schema"; import {Types, Schema as MongooseSchema, SchemaTypeOptions} from "mongoose"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; @Formats("decimal", {type: "number"}) export class DecimalFormat implements FormatsMethods { diff --git a/packages/orm/mongoose/src/decorators/objectID.spec.ts b/packages/orm/mongoose/src/decorators/objectID.spec.ts index 3c1516db342..368782707cb 100644 --- a/packages/orm/mongoose/src/decorators/objectID.spec.ts +++ b/packages/orm/mongoose/src/decorators/objectID.spec.ts @@ -1,5 +1,5 @@ import {getJsonSchema} from "@tsed/schema"; -import {ObjectID} from "./objectID"; +import {ObjectID} from "./objectID.js"; describe("ObjectID", () => { it("should declare an ObjectID field", () => { diff --git a/packages/orm/mongoose/src/decorators/objectID.ts b/packages/orm/mongoose/src/decorators/objectID.ts index a8fa18f875e..1585e3174e3 100644 --- a/packages/orm/mongoose/src/decorators/objectID.ts +++ b/packages/orm/mongoose/src/decorators/objectID.ts @@ -2,8 +2,8 @@ import {useDecorators} from "@tsed/core"; import {OnDeserialize} from "@tsed/json-mapper"; import {Description, Example, Name, Pattern} from "@tsed/schema"; import {Types} from "mongoose"; -import {Auto} from "./auto"; -import {Schema} from "./schema"; +import {Auto} from "./auto.js"; +import {Schema} from "./schema.js"; /** * Tell Mongoose whether to define an ObjectId property. diff --git a/packages/orm/mongoose/src/decorators/postHook.spec.ts b/packages/orm/mongoose/src/decorators/postHook.spec.ts index a3b9e0917f2..0b5797875d7 100644 --- a/packages/orm/mongoose/src/decorators/postHook.spec.ts +++ b/packages/orm/mongoose/src/decorators/postHook.spec.ts @@ -1,5 +1,5 @@ -import {schemaOptions} from "../utils/schemaOptions"; -import {PostHook} from "./postHook"; +import {schemaOptions} from "../utils/schemaOptions.js"; +import {PostHook} from "./postHook.js"; describe("@PostHook()", () => { describe("when decorator is used as class decorator", () => { diff --git a/packages/orm/mongoose/src/decorators/postHook.ts b/packages/orm/mongoose/src/decorators/postHook.ts index 8ed8930a71c..3c9d1d905c2 100644 --- a/packages/orm/mongoose/src/decorators/postHook.ts +++ b/packages/orm/mongoose/src/decorators/postHook.ts @@ -1,6 +1,6 @@ import {decoratorTypeOf, DecoratorTypes, StaticMethodDecorator} from "@tsed/core"; -import {MongooseHookOptions, MongoosePostHookCB} from "../interfaces/MongooseSchemaOptions"; -import {schemaOptions} from "../utils/schemaOptions"; +import {MongooseHookOptions, MongoosePostHookCB} from "../interfaces/MongooseSchemaOptions.js"; +import {schemaOptions} from "../utils/schemaOptions.js"; /** * We can simply attach a `@PostHook` decorator to your model class and diff --git a/packages/orm/mongoose/src/decorators/preHook.spec.ts b/packages/orm/mongoose/src/decorators/preHook.spec.ts index f19b3c95cdb..1b91bb3c23e 100644 --- a/packages/orm/mongoose/src/decorators/preHook.spec.ts +++ b/packages/orm/mongoose/src/decorators/preHook.spec.ts @@ -1,4 +1,4 @@ -import {MongooseNextCB, PreHook, schemaOptions} from "../../src"; +import {MongooseNextCB, PreHook, schemaOptions} from "../../src/index.js"; describe("@PreHook()", () => { describe("when decorator is used as class decorator", () => { diff --git a/packages/orm/mongoose/src/decorators/preHook.ts b/packages/orm/mongoose/src/decorators/preHook.ts index 51fce79df2c..ae3970368d4 100644 --- a/packages/orm/mongoose/src/decorators/preHook.ts +++ b/packages/orm/mongoose/src/decorators/preHook.ts @@ -1,6 +1,6 @@ import {decoratorTypeOf, DecoratorTypes} from "@tsed/core"; -import {MongooseHookOptions, MongoosePreHookCB} from "../interfaces/MongooseSchemaOptions"; -import {schemaOptions} from "../utils/schemaOptions"; +import {MongooseHookOptions, MongoosePreHookCB} from "../interfaces/MongooseSchemaOptions.js"; +import {schemaOptions} from "../utils/schemaOptions.js"; /** * diff --git a/packages/orm/mongoose/src/decorators/ref.spec.ts b/packages/orm/mongoose/src/decorators/ref.spec.ts index 1341a00df3b..3a4014b320d 100644 --- a/packages/orm/mongoose/src/decorators/ref.spec.ts +++ b/packages/orm/mongoose/src/decorators/ref.spec.ts @@ -1,9 +1,9 @@ import {catchError, Store} from "@tsed/core"; import {getJsonSchema, Property} from "@tsed/schema"; import {Schema} from "mongoose"; -import {MONGOOSE_MODEL_NAME, MONGOOSE_SCHEMA} from "../constants/constants"; -import {MongooseModels} from "../registries/MongooseModels"; -import {Ref} from "./ref"; +import {MONGOOSE_MODEL_NAME, MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {MongooseModels} from "../registries/MongooseModels.js"; +import {Ref} from "./ref.js"; describe("@Ref()", () => { describe("type is a class", () => { diff --git a/packages/orm/mongoose/src/decorators/ref.ts b/packages/orm/mongoose/src/decorators/ref.ts index 92d2bc61c4c..a2fe112e9ad 100644 --- a/packages/orm/mongoose/src/decorators/ref.ts +++ b/packages/orm/mongoose/src/decorators/ref.ts @@ -2,9 +2,9 @@ import {isArrowFn, isCollection, isObject, isObjectID, isString, StoreMerge, Typ import {deserialize, OnDeserialize, OnSerialize, serialize} from "@tsed/json-mapper"; import {ForwardGroups, JsonEntityFn, lazyRef, matchGroups, OneOf, Property, string} from "@tsed/schema"; import {Schema as MongooseSchema} from "mongoose"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {MongooseSchemaTypes} from "../interfaces/MongooseSchemaTypes"; -import {MongooseModels} from "../registries/MongooseModels"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {MongooseSchemaTypes} from "../interfaces/MongooseSchemaTypes.js"; +import {MongooseModels} from "../registries/MongooseModels.js"; interface RefOptions { type?: MongooseSchemaTypes; diff --git a/packages/orm/mongoose/src/decorators/schema.ts b/packages/orm/mongoose/src/decorators/schema.ts index d0effb86daa..7a144ecc591 100644 --- a/packages/orm/mongoose/src/decorators/schema.ts +++ b/packages/orm/mongoose/src/decorators/schema.ts @@ -2,9 +2,9 @@ import {decoratorTypeOf, StoreMerge, useDecorators} from "@tsed/core"; import {registerProvider} from "@tsed/di"; import {Property} from "@tsed/schema"; import {SchemaTypeOptions} from "mongoose"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {MongooseSchemaOptions} from "../interfaces/MongooseSchemaOptions"; -import {getSchema, getSchemaToken} from "../utils/createSchema"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {MongooseSchemaOptions} from "../interfaces/MongooseSchemaOptions.js"; +import {getSchema, getSchemaToken} from "../utils/createSchema.js"; /** * Define a class as a Mongoose Schema ready to be used to compose other schemes and models. diff --git a/packages/orm/mongoose/src/decorators/schemaIgnore.spec.ts b/packages/orm/mongoose/src/decorators/schemaIgnore.spec.ts index ca2e9ff00be..283c490293a 100644 --- a/packages/orm/mongoose/src/decorators/schemaIgnore.spec.ts +++ b/packages/orm/mongoose/src/decorators/schemaIgnore.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {SchemaIgnore} from "./schemaIgnore"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {SchemaIgnore} from "./schemaIgnore.js"; describe("@SchemaIgnore()", () => { it("should set metadata", () => { diff --git a/packages/orm/mongoose/src/decorators/schemaIgnore.ts b/packages/orm/mongoose/src/decorators/schemaIgnore.ts index bd26b088e91..f6e5cc7a9a0 100644 --- a/packages/orm/mongoose/src/decorators/schemaIgnore.ts +++ b/packages/orm/mongoose/src/decorators/schemaIgnore.ts @@ -1,4 +1,4 @@ -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * Do not apply this property to schema (create virtual property) diff --git a/packages/orm/mongoose/src/decorators/select.spec.ts b/packages/orm/mongoose/src/decorators/select.spec.ts index 9193c9f1ebd..fb2ba04a8da 100644 --- a/packages/orm/mongoose/src/decorators/select.spec.ts +++ b/packages/orm/mongoose/src/decorators/select.spec.ts @@ -1,6 +1,6 @@ import {descriptorOf, Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {Select} from "../../src"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {Select} from "../../src/index.js"; describe("@Select()", () => { it("should set metadata", () => { diff --git a/packages/orm/mongoose/src/decorators/select.ts b/packages/orm/mongoose/src/decorators/select.ts index 5d9f83fe7da..d76b51bee6a 100644 --- a/packages/orm/mongoose/src/decorators/select.ts +++ b/packages/orm/mongoose/src/decorators/select.ts @@ -1,4 +1,4 @@ -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * Tell Mongoose to set default select() behavior for this path. diff --git a/packages/orm/mongoose/src/decorators/sparse.spec.ts b/packages/orm/mongoose/src/decorators/sparse.spec.ts index 7bb8851798e..0c3ba0c7f35 100644 --- a/packages/orm/mongoose/src/decorators/sparse.spec.ts +++ b/packages/orm/mongoose/src/decorators/sparse.spec.ts @@ -1,6 +1,6 @@ import {descriptorOf, Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {Sparse} from "./sparse"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {Sparse} from "./sparse.js"; describe("@Sparse()", () => { it("should set metadata (default)", () => { diff --git a/packages/orm/mongoose/src/decorators/sparse.ts b/packages/orm/mongoose/src/decorators/sparse.ts index 6ae1149d679..58679d5cdab 100644 --- a/packages/orm/mongoose/src/decorators/sparse.ts +++ b/packages/orm/mongoose/src/decorators/sparse.ts @@ -1,4 +1,4 @@ -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * If [truthy](https://masteringjs.io/tutorials/fundamentals/truthy), Mongoose will diff --git a/packages/orm/mongoose/src/decorators/text.spec.ts b/packages/orm/mongoose/src/decorators/text.spec.ts index d504dface50..5b0334b3492 100644 --- a/packages/orm/mongoose/src/decorators/text.spec.ts +++ b/packages/orm/mongoose/src/decorators/text.spec.ts @@ -1,6 +1,6 @@ import {descriptorOf, Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {Text} from "./text"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {Text} from "./text.js"; describe("@Text()", () => { it("should set metadata (default)", () => { diff --git a/packages/orm/mongoose/src/decorators/text.ts b/packages/orm/mongoose/src/decorators/text.ts index fc374ed6556..430f32df07c 100644 --- a/packages/orm/mongoose/src/decorators/text.ts +++ b/packages/orm/mongoose/src/decorators/text.ts @@ -1,4 +1,4 @@ -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * If [truthy](https://masteringjs.io/tutorials/fundamentals/truthy), Mongoose diff --git a/packages/orm/mongoose/src/decorators/trim.spec.ts b/packages/orm/mongoose/src/decorators/trim.spec.ts index 96f7f167792..d8d39ff5adf 100644 --- a/packages/orm/mongoose/src/decorators/trim.spec.ts +++ b/packages/orm/mongoose/src/decorators/trim.spec.ts @@ -1,6 +1,6 @@ import {descriptorOf, Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {Trim} from "./trim"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {Trim} from "./trim.js"; describe("@Trim()", () => { it("should set metadata", () => { diff --git a/packages/orm/mongoose/src/decorators/trim.ts b/packages/orm/mongoose/src/decorators/trim.ts index 30c34494a93..58e277609aa 100644 --- a/packages/orm/mongoose/src/decorators/trim.ts +++ b/packages/orm/mongoose/src/decorators/trim.ts @@ -1,4 +1,4 @@ -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * Tell Mongoose to make the property trimmable. diff --git a/packages/orm/mongoose/src/decorators/unique.spec.ts b/packages/orm/mongoose/src/decorators/unique.spec.ts index e98962de02a..250bdd9ab84 100644 --- a/packages/orm/mongoose/src/decorators/unique.spec.ts +++ b/packages/orm/mongoose/src/decorators/unique.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {Unique} from "../../src"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {Unique} from "../../src/index.js"; describe("@Unique()", () => { it("should set metadata", () => { diff --git a/packages/orm/mongoose/src/decorators/unique.ts b/packages/orm/mongoose/src/decorators/unique.ts index bb4283e784d..6e5e3437a01 100644 --- a/packages/orm/mongoose/src/decorators/unique.ts +++ b/packages/orm/mongoose/src/decorators/unique.ts @@ -1,4 +1,4 @@ -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * Tell Mongoose to ensure a unique index is created for this path. diff --git a/packages/orm/mongoose/src/decorators/uppercase.spec.ts b/packages/orm/mongoose/src/decorators/uppercase.spec.ts index 98e06eeb027..1e81649822d 100644 --- a/packages/orm/mongoose/src/decorators/uppercase.spec.ts +++ b/packages/orm/mongoose/src/decorators/uppercase.spec.ts @@ -1,6 +1,6 @@ import {descriptorOf, Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {Uppercase} from "./uppercase"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {Uppercase} from "./uppercase.js"; describe("@Uppercase()", () => { it("should set metadata (default)", () => { diff --git a/packages/orm/mongoose/src/decorators/uppercase.ts b/packages/orm/mongoose/src/decorators/uppercase.ts index 48fccd889dd..e6f6ecee305 100644 --- a/packages/orm/mongoose/src/decorators/uppercase.ts +++ b/packages/orm/mongoose/src/decorators/uppercase.ts @@ -1,4 +1,4 @@ -import {MongooseSchema} from "./schema"; +import {MongooseSchema} from "./schema.js"; /** * If truthy, Mongoose will add a custom setter that uppercases this string using JavaScript's built-in String#toUpperCase(). diff --git a/packages/orm/mongoose/src/decorators/versionKey.spec.ts b/packages/orm/mongoose/src/decorators/versionKey.spec.ts index 1a43ac24ebb..00d5090e919 100644 --- a/packages/orm/mongoose/src/decorators/versionKey.spec.ts +++ b/packages/orm/mongoose/src/decorators/versionKey.spec.ts @@ -1,7 +1,7 @@ import {Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA_OPTIONS} from "../constants/constants"; -import {Model} from "./model"; -import {VersionKey} from "./versionKey"; +import {MONGOOSE_SCHEMA_OPTIONS} from "../constants/constants.js"; +import {Model} from "./model.js"; +import {VersionKey} from "./versionKey.js"; describe("@VersionKey()", () => { it("should set metadata", () => { diff --git a/packages/orm/mongoose/src/decorators/versionKey.ts b/packages/orm/mongoose/src/decorators/versionKey.ts index 227e17cfbb9..c6b17002a3c 100644 --- a/packages/orm/mongoose/src/decorators/versionKey.ts +++ b/packages/orm/mongoose/src/decorators/versionKey.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {MONGOOSE_SCHEMA_OPTIONS} from "../constants/constants"; +import {MONGOOSE_SCHEMA_OPTIONS} from "../constants/constants.js"; export function VersionKey(): PropertyDecorator { return (target: any, propertyKey: string) => { diff --git a/packages/orm/mongoose/src/decorators/virtualRef.spec.ts b/packages/orm/mongoose/src/decorators/virtualRef.spec.ts index ceb540da400..8e20073a277 100644 --- a/packages/orm/mongoose/src/decorators/virtualRef.spec.ts +++ b/packages/orm/mongoose/src/decorators/virtualRef.spec.ts @@ -2,9 +2,9 @@ import {Store} from "@tsed/core"; import {Controller} from "@tsed/di"; import {BodyParams} from "@tsed/platform-params"; import {Format, getJsonSchema, getSpec, Post, Property, ReadOnly, Returns, SpecTypes} from "@tsed/schema"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; -import {Model} from "./model"; -import {VirtualRef, VirtualRefs} from "./virtualRef"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {Model} from "./model.js"; +import {VirtualRef, VirtualRefs} from "./virtualRef.js"; describe("@VirtualRef()", () => { describe("when type and foreign value are given", () => { diff --git a/packages/orm/mongoose/src/decorators/virtualRef.ts b/packages/orm/mongoose/src/decorators/virtualRef.ts index 98fc94f4671..924c0527fe2 100644 --- a/packages/orm/mongoose/src/decorators/virtualRef.ts +++ b/packages/orm/mongoose/src/decorators/virtualRef.ts @@ -1,8 +1,8 @@ import {isPlainObject, isString, Store, StoreMerge, useDecorators} from "@tsed/core"; import {CollectionOf, Property} from "@tsed/schema"; -import {MONGOOSE_MODEL_NAME, MONGOOSE_SCHEMA} from "../constants/constants"; -import {MongooseVirtualRefOptions} from "../interfaces/MongooseVirtualRefOptions"; -import {MongooseModels} from "../registries/MongooseModels"; +import {MONGOOSE_MODEL_NAME, MONGOOSE_SCHEMA} from "../constants/constants.js"; +import {MongooseVirtualRefOptions} from "../interfaces/MongooseVirtualRefOptions.js"; +import {MongooseModels} from "../registries/MongooseModels.js"; function getRef(opts: any) { const ref = opts.ref; diff --git a/packages/orm/mongoose/src/index.ts b/packages/orm/mongoose/src/index.ts index 25603a3d2b7..5429ea1f5ff 100644 --- a/packages/orm/mongoose/src/index.ts +++ b/packages/orm/mongoose/src/index.ts @@ -2,47 +2,47 @@ * @file Automatically generated by barrelsby. */ -export * from "./MongooseModule"; -export * from "./constants/constants"; -export * from "./decorators/auto"; -export * from "./decorators/discriminatorKey"; -export * from "./decorators/dynamicRef"; -export * from "./decorators/excludeIndexes"; -export * from "./decorators/expires"; -export * from "./decorators/immutable"; -export * from "./decorators/indexed"; -export * from "./decorators/lowercase"; -export * from "./decorators/model"; -export * from "./decorators/mongooseIndex"; -export * from "./decorators/mongooseIndexes"; -export * from "./decorators/mongoosePlugin"; -export * from "./decorators/numberDecimal"; -export * from "./decorators/objectID"; -export * from "./decorators/postHook"; -export * from "./decorators/preHook"; -export * from "./decorators/ref"; -export * from "./decorators/schema"; -export * from "./decorators/schemaIgnore"; -export * from "./decorators/select"; -export * from "./decorators/sparse"; -export * from "./decorators/text"; -export * from "./decorators/trim"; -export * from "./decorators/unique"; -export * from "./decorators/uppercase"; -export * from "./decorators/versionKey"; -export * from "./decorators/virtualRef"; -export * from "./interfaces/MongooseConnectionOptions"; -export * from "./interfaces/MongooseDocument"; -export * from "./interfaces/MongooseModel"; -export * from "./interfaces/MongooseModelOptions"; -export * from "./interfaces/MongooseSchemaOptions"; -export * from "./interfaces/MongooseSchemaTypes"; -export * from "./interfaces/MongooseVirtualRefOptions"; -export * from "./interfaces/interfaces"; -export * from "./registries/MongooseModels"; -export * from "./services/MongooseConnections"; -export * from "./services/MongooseService"; -export * from "./utils/createModel"; -export * from "./utils/createSchema"; -export * from "./utils/resolveRefType"; -export * from "./utils/schemaOptions"; +export * from "./MongooseModule.js"; +export * from "./constants/constants.js"; +export * from "./decorators/auto.js"; +export * from "./decorators/discriminatorKey.js"; +export * from "./decorators/dynamicRef.js"; +export * from "./decorators/excludeIndexes.js"; +export * from "./decorators/expires.js"; +export * from "./decorators/immutable.js"; +export * from "./decorators/indexed.js"; +export * from "./decorators/lowercase.js"; +export * from "./decorators/model.js"; +export * from "./decorators/mongooseIndex.js"; +export * from "./decorators/mongooseIndexes.js"; +export * from "./decorators/mongoosePlugin.js"; +export * from "./decorators/numberDecimal.js"; +export * from "./decorators/objectID.js"; +export * from "./decorators/postHook.js"; +export * from "./decorators/preHook.js"; +export * from "./decorators/ref.js"; +export * from "./decorators/schema.js"; +export * from "./decorators/schemaIgnore.js"; +export * from "./decorators/select.js"; +export * from "./decorators/sparse.js"; +export * from "./decorators/text.js"; +export * from "./decorators/trim.js"; +export * from "./decorators/unique.js"; +export * from "./decorators/uppercase.js"; +export * from "./decorators/versionKey.js"; +export * from "./decorators/virtualRef.js"; +export * from "./interfaces/MongooseConnectionOptions.js"; +export * from "./interfaces/MongooseDocument.js"; +export * from "./interfaces/MongooseModel.js"; +export * from "./interfaces/MongooseModelOptions.js"; +export * from "./interfaces/MongooseSchemaOptions.js"; +export * from "./interfaces/MongooseSchemaTypes.js"; +export * from "./interfaces/MongooseVirtualRefOptions.js"; +export * from "./interfaces/interfaces.js"; +export * from "./registries/MongooseModels.js"; +export * from "./services/MongooseConnections.js"; +export * from "./services/MongooseService.js"; +export * from "./utils/createModel.js"; +export * from "./utils/createSchema.js"; +export * from "./utils/resolveRefType.js"; +export * from "./utils/schemaOptions.js"; diff --git a/packages/orm/mongoose/src/interfaces/MongooseModelOptions.ts b/packages/orm/mongoose/src/interfaces/MongooseModelOptions.ts index 2fd921cb7d9..6cd209ca300 100644 --- a/packages/orm/mongoose/src/interfaces/MongooseModelOptions.ts +++ b/packages/orm/mongoose/src/interfaces/MongooseModelOptions.ts @@ -1,4 +1,4 @@ -import {MongooseSchemaOptions} from "./MongooseSchemaOptions"; +import {MongooseSchemaOptions} from "./MongooseSchemaOptions.js"; import {CompileModelOptions} from "mongoose"; export interface MongooseModelOptions extends MongooseSchemaOptions { diff --git a/packages/orm/mongoose/src/interfaces/MongooseSchemaOptions.ts b/packages/orm/mongoose/src/interfaces/MongooseSchemaOptions.ts index eec147864db..2ccf5b53257 100644 --- a/packages/orm/mongoose/src/interfaces/MongooseSchemaOptions.ts +++ b/packages/orm/mongoose/src/interfaces/MongooseSchemaOptions.ts @@ -1,5 +1,5 @@ import {type IndexOptions, Schema, SchemaOptions} from "mongoose"; -import {MongooseDocument} from "./MongooseDocument"; +import {MongooseDocument} from "./MongooseDocument.js"; export type MongooseNextCB = (err?: Error) => void; diff --git a/packages/orm/mongoose/src/interfaces/interfaces.ts b/packages/orm/mongoose/src/interfaces/interfaces.ts index a2312a660d5..6bf93b516d0 100644 --- a/packages/orm/mongoose/src/interfaces/interfaces.ts +++ b/packages/orm/mongoose/src/interfaces/interfaces.ts @@ -1,4 +1,4 @@ -import {MongooseConnectionOptions} from "./MongooseConnectionOptions"; +import {MongooseConnectionOptions} from "./MongooseConnectionOptions.js"; declare global { namespace TsED { diff --git a/packages/orm/mongoose/src/services/MongooseConnection.spec.ts b/packages/orm/mongoose/src/services/MongooseConnection.spec.ts index 5342a4449c7..4228b65719a 100644 --- a/packages/orm/mongoose/src/services/MongooseConnection.spec.ts +++ b/packages/orm/mongoose/src/services/MongooseConnection.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest} from "@tsed/common"; import {Configuration} from "@tsed/di"; -import {MongooseService} from "../../src"; -import {MONGOOSE_CONNECTIONS} from "../../src/services/MongooseConnections"; +import {MongooseService} from "../../src/index.js"; +import {MONGOOSE_CONNECTIONS} from "../../src/services/MongooseConnections.js"; describe("MongooseConnections", () => { beforeEach(PlatformTest.create); diff --git a/packages/orm/mongoose/src/services/MongooseConnections.ts b/packages/orm/mongoose/src/services/MongooseConnections.ts index 061a7cc0292..c9befe4804f 100644 --- a/packages/orm/mongoose/src/services/MongooseConnections.ts +++ b/packages/orm/mongoose/src/services/MongooseConnections.ts @@ -1,7 +1,7 @@ import {Configuration, registerProvider} from "@tsed/di"; import {isArray} from "@tsed/core"; -import {MongooseConnectionOptions} from "../interfaces/MongooseConnectionOptions"; -import {MongooseService} from "../services/MongooseService"; +import {MongooseConnectionOptions} from "../interfaces/MongooseConnectionOptions.js"; +import {MongooseService} from "../services/MongooseService.js"; /** * @ignore diff --git a/packages/orm/mongoose/src/services/MongooseService.spec.ts b/packages/orm/mongoose/src/services/MongooseService.spec.ts index a12c32b6f29..6bf918695da 100644 --- a/packages/orm/mongoose/src/services/MongooseService.spec.ts +++ b/packages/orm/mongoose/src/services/MongooseService.spec.ts @@ -1,6 +1,6 @@ import {PlatformTest} from "@tsed/common"; import Mongoose from "mongoose"; -import {MongooseService} from "../../src"; +import {MongooseService} from "../../src/index.js"; describe("Mongoose", () => { describe("MongooseService", () => { diff --git a/packages/orm/mongoose/src/utils/buildMongooseSchema.spec.ts b/packages/orm/mongoose/src/utils/buildMongooseSchema.spec.ts index 0dd5d709908..6b1bca4b537 100644 --- a/packages/orm/mongoose/src/utils/buildMongooseSchema.spec.ts +++ b/packages/orm/mongoose/src/utils/buildMongooseSchema.spec.ts @@ -1,7 +1,7 @@ import {JsonEntityStore, Property} from "@tsed/schema"; import {Types} from "mongoose"; -import {buildMongooseSchema} from "../../src/utils/createSchema"; -import {MONGOOSE_SCHEMA} from "../constants/constants"; +import {buildMongooseSchema} from "../../src/utils/createSchema.js"; +import {MONGOOSE_SCHEMA} from "../constants/constants.js"; describe("buildMongooseSchema", () => { describe("when mongoose schema hasn't ref", () => { diff --git a/packages/orm/mongoose/src/utils/createModel.spec.ts b/packages/orm/mongoose/src/utils/createModel.spec.ts index 91fc11b6be9..ccf3df1647f 100644 --- a/packages/orm/mongoose/src/utils/createModel.spec.ts +++ b/packages/orm/mongoose/src/utils/createModel.spec.ts @@ -1,5 +1,5 @@ import mongoose from "mongoose"; -import {createModel} from "../../src"; +import {createModel} from "../../src/index.js"; describe("createModel()", () => { let schema: any; diff --git a/packages/orm/mongoose/src/utils/createModel.ts b/packages/orm/mongoose/src/utils/createModel.ts index b6521ce38cd..ee812cb6594 100644 --- a/packages/orm/mongoose/src/utils/createModel.ts +++ b/packages/orm/mongoose/src/utils/createModel.ts @@ -1,9 +1,9 @@ import {nameOf, Store, Type} from "@tsed/core"; import {JsonEntityStore} from "@tsed/schema"; import mongoose, {Connection} from "mongoose"; -import {MONGOOSE_MODEL, MONGOOSE_MODEL_NAME} from "../constants/constants"; -import {MongooseModels} from "../registries/MongooseModels"; -import {getSchemaToken} from "./createSchema"; +import {MONGOOSE_MODEL, MONGOOSE_MODEL_NAME} from "../constants/constants.js"; +import {MongooseModels} from "../registries/MongooseModels.js"; +import {getSchemaToken} from "./createSchema.js"; export function getModelToken(target: Type, options: any) { const {collectionName, token} = getSchemaToken(target, options); diff --git a/packages/orm/mongoose/src/utils/createSchema.spec.ts b/packages/orm/mongoose/src/utils/createSchema.spec.ts index 388381415e7..047cbd88eb7 100644 --- a/packages/orm/mongoose/src/utils/createSchema.spec.ts +++ b/packages/orm/mongoose/src/utils/createSchema.spec.ts @@ -13,15 +13,15 @@ import { Required } from "@tsed/schema"; import {Schema as SchemaMongoose, Types} from "mongoose"; -import {Model} from "../decorators/model"; -import {ObjectID} from "../decorators/objectID"; -import {Ref} from "../decorators/ref"; -import {Schema} from "../decorators/schema"; -import {SchemaIgnore} from "../decorators/schemaIgnore"; -import {VersionKey} from "../decorators/versionKey"; -import {VirtualRef, VirtualRefs} from "../decorators/virtualRef"; -import {getSchema} from "./createSchema"; -import {DiscriminatorKey} from "../decorators/discriminatorKey"; +import {Model} from "../decorators/model.js"; +import {ObjectID} from "../decorators/objectID.js"; +import {Ref} from "../decorators/ref.js"; +import {Schema} from "../decorators/schema.js"; +import {SchemaIgnore} from "../decorators/schemaIgnore.js"; +import {VersionKey} from "../decorators/versionKey.js"; +import {VirtualRef, VirtualRefs} from "../decorators/virtualRef.js"; +import {getSchema} from "./createSchema.js"; +import {DiscriminatorKey} from "../decorators/discriminatorKey.js"; describe("createSchema", () => { it("should create schema", () => { diff --git a/packages/orm/mongoose/src/utils/createSchema.ts b/packages/orm/mongoose/src/utils/createSchema.ts index c5a1d025317..869d8c864ab 100644 --- a/packages/orm/mongoose/src/utils/createSchema.ts +++ b/packages/orm/mongoose/src/utils/createSchema.ts @@ -3,11 +3,11 @@ import {deserialize, serialize} from "@tsed/json-mapper"; import {getProperties, JsonEntityStore, JsonSchema} from "@tsed/schema"; import {pascalCase} from "change-case"; import mongoose, {Schema, SchemaDefinition, SchemaOptions, SchemaTypeOptions} from "mongoose"; -import {MONGOOSE_SCHEMA, MONGOOSE_SCHEMA_OPTIONS} from "../constants/constants"; -import {MongooseSchemaOptions} from "../interfaces/MongooseSchemaOptions"; -import {MongooseVirtualRefOptions} from "../interfaces/MongooseVirtualRefOptions"; -import {resolveRefType} from "./resolveRefType"; -import {schemaOptions} from "./schemaOptions"; +import {MONGOOSE_SCHEMA, MONGOOSE_SCHEMA_OPTIONS} from "../constants/constants.js"; +import {MongooseSchemaOptions} from "../interfaces/MongooseSchemaOptions.js"; +import {MongooseVirtualRefOptions} from "../interfaces/MongooseVirtualRefOptions.js"; +import {resolveRefType} from "./resolveRefType.js"; +import {schemaOptions} from "./schemaOptions.js"; export interface MongooseSchemaMetadata { schema: SchemaDefinition; diff --git a/packages/orm/mongoose/src/utils/resolveRefType.spec.ts b/packages/orm/mongoose/src/utils/resolveRefType.spec.ts index 1a6422ee9d3..0d3ea1ae980 100644 --- a/packages/orm/mongoose/src/utils/resolveRefType.spec.ts +++ b/packages/orm/mongoose/src/utils/resolveRefType.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {MONGOOSE_MODEL_NAME} from "../constants/constants"; -import {resolveRefType} from "./resolveRefType"; +import {MONGOOSE_MODEL_NAME} from "../constants/constants.js"; +import {resolveRefType} from "./resolveRefType.js"; describe("resolveRefType", () => { it("should return type as string (from string)", () => { diff --git a/packages/orm/mongoose/src/utils/resolveRefType.ts b/packages/orm/mongoose/src/utils/resolveRefType.ts index 01f8246db03..d71537c74cb 100644 --- a/packages/orm/mongoose/src/utils/resolveRefType.ts +++ b/packages/orm/mongoose/src/utils/resolveRefType.ts @@ -1,5 +1,5 @@ import {isClass, isString, nameOf, Store, Type} from "@tsed/core"; -import {MONGOOSE_MODEL_NAME} from "../constants/constants"; +import {MONGOOSE_MODEL_NAME} from "../constants/constants.js"; /** * @ignore diff --git a/packages/orm/mongoose/src/utils/schemaOptions.spec.ts b/packages/orm/mongoose/src/utils/schemaOptions.spec.ts index 47b00a20962..61ea2c44b39 100644 --- a/packages/orm/mongoose/src/utils/schemaOptions.spec.ts +++ b/packages/orm/mongoose/src/utils/schemaOptions.spec.ts @@ -1,4 +1,4 @@ -import {applySchemaOptions, schemaOptions} from "../../src/utils/schemaOptions"; +import {applySchemaOptions, schemaOptions} from "../../src/utils/schemaOptions.js"; describe("schemaOptions", () => { describe("schemaOptions()", () => { diff --git a/packages/orm/mongoose/src/utils/schemaOptions.ts b/packages/orm/mongoose/src/utils/schemaOptions.ts index 7e7e8478fc2..91f97a508ca 100644 --- a/packages/orm/mongoose/src/utils/schemaOptions.ts +++ b/packages/orm/mongoose/src/utils/schemaOptions.ts @@ -1,6 +1,6 @@ import {deepMerge, Store} from "@tsed/core"; import {Schema} from "mongoose"; -import {MONGOOSE_SCHEMA_OPTIONS} from "../constants/constants"; +import {MONGOOSE_SCHEMA_OPTIONS} from "../constants/constants.js"; import { MongooseHookPromised, MongooseNextCB, @@ -8,7 +8,7 @@ import { MongoosePreHook, MongoosePreHookCB, MongooseSchemaOptions -} from "../interfaces/MongooseSchemaOptions"; +} from "../interfaces/MongooseSchemaOptions.js"; /** * @ignore diff --git a/packages/orm/mongoose/test/array.integration.spec.ts b/packages/orm/mongoose/test/array.integration.spec.ts index b8b60f401f0..db2853dbb75 100644 --- a/packages/orm/mongoose/test/array.integration.spec.ts +++ b/packages/orm/mongoose/test/array.integration.spec.ts @@ -1,7 +1,7 @@ import {serialize} from "@tsed/json-mapper"; import {TestMongooseContext} from "@tsed/testing-mongoose"; -import {MyWorkspace, UserModel, UserWorkspace, Workspace, WorkspaceModel} from "./helpers/models/UserWorkspace"; -import {Server} from "./helpers/Server"; +import {MyWorkspace, UserModel, UserWorkspace, Workspace, WorkspaceModel} from "./helpers/models/UserWorkspace.js"; +import {Server} from "./helpers/Server.js"; describe("Mongoose", () => { describe("Array models", () => { diff --git a/packages/orm/mongoose/test/buffer.integration.spec.ts b/packages/orm/mongoose/test/buffer.integration.spec.ts index cfc2de6afce..e7973a83a0f 100644 --- a/packages/orm/mongoose/test/buffer.integration.spec.ts +++ b/packages/orm/mongoose/test/buffer.integration.spec.ts @@ -1,8 +1,8 @@ import {TestMongooseContext} from "@tsed/testing-mongoose"; import axios from "axios"; import faker from "@faker-js/faker"; -import {MongooseModel} from "../src/interfaces/MongooseModel"; -import {TestAvatar} from "./helpers/models/Avatar"; +import {MongooseModel} from "../src/interfaces/MongooseModel.js"; +import {TestAvatar} from "./helpers/models/Avatar.js"; describe("Mongoose", () => { describe("Models with Buffer", () => { diff --git a/packages/orm/mongoose/test/circularRef.integration.spec.ts b/packages/orm/mongoose/test/circularRef.integration.spec.ts index c2087912b91..74f94f2ace0 100644 --- a/packages/orm/mongoose/test/circularRef.integration.spec.ts +++ b/packages/orm/mongoose/test/circularRef.integration.spec.ts @@ -3,9 +3,9 @@ import {Inject} from "@tsed/di"; import {MongooseModel} from "@tsed/mongoose"; import {getJsonSchema} from "@tsed/schema"; import {TestMongooseContext} from "@tsed/testing-mongoose"; -import {TestContract} from "./helpers/models/Contract"; -import {TestCustomer} from "./helpers/models/Customer"; -import {SelfUser} from "./helpers/models/User"; +import {TestContract} from "./helpers/models/Contract.js"; +import {TestCustomer} from "./helpers/models/Customer.js"; +import {SelfUser} from "./helpers/models/User.js"; @Injectable() class MyService { diff --git a/packages/orm/mongoose/test/discriminators.integration.spec.ts b/packages/orm/mongoose/test/discriminators.integration.spec.ts index 6d2e18b2412..9ff0096d517 100644 --- a/packages/orm/mongoose/test/discriminators.integration.spec.ts +++ b/packages/orm/mongoose/test/discriminators.integration.spec.ts @@ -1,8 +1,8 @@ import {TestMongooseContext} from "@tsed/testing-mongoose"; -import {Server} from "./helpers/Server"; -import {MongooseModel} from "../src/interfaces/MongooseModel"; +import {Server} from "./helpers/Server.js"; +import {MongooseModel} from "../src/interfaces/MongooseModel.js"; import {Required} from "@tsed/schema"; -import {ObjectID, DiscriminatorKey, Model} from "../src/index"; +import {ObjectID, DiscriminatorKey, Model} from "../src/index.js"; describe("Mongoose", () => { describe("Discriminators", () => { diff --git a/packages/orm/mongoose/test/dynamicRef.integration.spec.ts b/packages/orm/mongoose/test/dynamicRef.integration.spec.ts index 25dbb2d80b1..3c09911f31d 100644 --- a/packages/orm/mongoose/test/dynamicRef.integration.spec.ts +++ b/packages/orm/mongoose/test/dynamicRef.integration.spec.ts @@ -1,9 +1,9 @@ import {deserialize, serialize} from "@tsed/json-mapper"; import {Enum, getJsonSchema, Required} from "@tsed/schema"; import {TestMongooseContext} from "@tsed/testing-mongoose"; -import {Model} from "../src/decorators/model"; -import {DynamicRef, MongooseModel, ObjectID} from "../src/index"; -import {Server} from "./helpers/Server"; +import {Model} from "../src/decorators/model.js"; +import {DynamicRef, MongooseModel, ObjectID} from "../src/index.js"; +import {Server} from "./helpers/Server.js"; describe("DynamicRef Integration", () => { @Model() diff --git a/packages/orm/mongoose/test/helpers/models/Avatar.ts b/packages/orm/mongoose/test/helpers/models/Avatar.ts index af4c018be50..6bfbe03fae9 100644 --- a/packages/orm/mongoose/test/helpers/models/Avatar.ts +++ b/packages/orm/mongoose/test/helpers/models/Avatar.ts @@ -1,5 +1,5 @@ import {Property} from "@tsed/schema"; -import {Model, ObjectID} from "../../../src/index"; +import {Model, ObjectID} from "../../../src/index.js"; @Model({schemaOptions: {timestamps: true}}) export class TestAvatar { diff --git a/packages/orm/mongoose/test/helpers/models/Client.ts b/packages/orm/mongoose/test/helpers/models/Client.ts index 1bb18409c52..c0938ab0484 100644 --- a/packages/orm/mongoose/test/helpers/models/Client.ts +++ b/packages/orm/mongoose/test/helpers/models/Client.ts @@ -1,6 +1,6 @@ import {CollectionOf} from "@tsed/schema"; -import {Model, ObjectID, Ref} from "../../../src/index"; -import {SelfUser} from "./User"; +import {Model, ObjectID, Ref} from "../../../src/index.js"; +import {SelfUser} from "./User.js"; @Model({schemaOptions: {timestamps: true}}) export class TestClient { diff --git a/packages/orm/mongoose/test/helpers/models/Contract.ts b/packages/orm/mongoose/test/helpers/models/Contract.ts index 6fd7b6c1f17..c35214a5fc8 100644 --- a/packages/orm/mongoose/test/helpers/models/Contract.ts +++ b/packages/orm/mongoose/test/helpers/models/Contract.ts @@ -1,5 +1,5 @@ -import {Model, ObjectID, Ref} from "../../../src/index"; -import {TestCustomer} from "./Customer"; +import {Model, ObjectID, Ref} from "../../../src/index.js"; +import {TestCustomer} from "./Customer.js"; @Model({name: "testContract", schemaOptions: {timestamps: true}}) export class TestContract { diff --git a/packages/orm/mongoose/test/helpers/models/Customer.ts b/packages/orm/mongoose/test/helpers/models/Customer.ts index 08c58c4cf6c..8cf9f0e66c3 100644 --- a/packages/orm/mongoose/test/helpers/models/Customer.ts +++ b/packages/orm/mongoose/test/helpers/models/Customer.ts @@ -1,7 +1,7 @@ import {Model, ObjectID, Ref} from "@tsed/mongoose"; import {CollectionOf} from "@tsed/schema"; -import {TestClient} from "./Client"; -import {TestContract} from "./Contract"; +import {TestClient} from "./Client.js"; +import {TestContract} from "./Contract.js"; @Model({name: "testCustomer", schemaOptions: {timestamps: true}}) export class TestCustomer { diff --git a/packages/orm/mongoose/test/multipleConnection.integration.spec.ts b/packages/orm/mongoose/test/multipleConnection.integration.spec.ts index 1b91539fb69..fd65245f533 100644 --- a/packages/orm/mongoose/test/multipleConnection.integration.spec.ts +++ b/packages/orm/mongoose/test/multipleConnection.integration.spec.ts @@ -2,7 +2,7 @@ import {PlatformTest} from "@tsed/common"; import {Property} from "@tsed/schema"; import {TestMongooseContext} from "@tsed/testing-mongoose"; import {Model, MongooseModel, MongooseService, ObjectID} from "@tsed/mongoose"; -import {Server} from "./helpers/Server"; +import {Server} from "./helpers/Server.js"; @Model({ connection: "customer", diff --git a/packages/orm/mongoose/test/readonly.integration.spec.ts b/packages/orm/mongoose/test/readonly.integration.spec.ts index 6eff394e0ab..1e8b8faecfc 100644 --- a/packages/orm/mongoose/test/readonly.integration.spec.ts +++ b/packages/orm/mongoose/test/readonly.integration.spec.ts @@ -1,7 +1,7 @@ import {Inject, Injectable, PlatformTest} from "@tsed/common"; import {getJsonSchema, Groups, Name, Property, ReadOnly, Required} from "@tsed/schema"; import {TestMongooseContext} from "@tsed/testing-mongoose"; -import {Immutable, Model, MongooseModel, ObjectID, SchemaIgnore} from "../src/index"; +import {Immutable, Model, MongooseModel, ObjectID, SchemaIgnore} from "../src/index.js"; class BaseModel { @ObjectID("id") diff --git a/packages/orm/mongoose/test/ref-array.integration.spec.ts b/packages/orm/mongoose/test/ref-array.integration.spec.ts index a47e5620786..57ca67589ff 100644 --- a/packages/orm/mongoose/test/ref-array.integration.spec.ts +++ b/packages/orm/mongoose/test/ref-array.integration.spec.ts @@ -5,8 +5,8 @@ import {MongooseModel} from "@tsed/mongoose"; import {PlatformExpress} from "@tsed/platform-express"; import {TestMongooseContext} from "@tsed/testing-mongoose"; import SuperTest from "supertest"; -import {TestProfile2, TestUser} from "./helpers/models/User"; -import {Server} from "./helpers/Server"; +import {TestProfile2, TestUser} from "./helpers/models/User.js"; +import {Server} from "./helpers/Server.js"; @Controller("/profiles") class ProfilesCtrl { diff --git a/packages/orm/mongoose/test/ref.integration.spec.ts b/packages/orm/mongoose/test/ref.integration.spec.ts index f7e7d20149b..51ca4d28e90 100644 --- a/packages/orm/mongoose/test/ref.integration.spec.ts +++ b/packages/orm/mongoose/test/ref.integration.spec.ts @@ -5,8 +5,8 @@ import {MongooseModel} from "@tsed/mongoose"; import {PlatformExpress} from "@tsed/platform-express"; import {TestMongooseContext} from "@tsed/testing-mongoose"; import SuperTest from "supertest"; -import {TestProfile, TestUser} from "./helpers/models/User"; -import {Server} from "./helpers/Server"; +import {TestProfile, TestUser} from "./helpers/models/User.js"; +import {Server} from "./helpers/Server.js"; @Controller("/profiles") class ProfilesCtrl { diff --git a/packages/orm/mongoose/test/resources.integration.spec.ts b/packages/orm/mongoose/test/resources.integration.spec.ts index 57cf53192b6..968133e732f 100644 --- a/packages/orm/mongoose/test/resources.integration.spec.ts +++ b/packages/orm/mongoose/test/resources.integration.spec.ts @@ -7,8 +7,8 @@ import {TestMongooseContext} from "@tsed/testing-mongoose"; import faker from "@faker-js/faker"; import SuperTest from "supertest"; import {isArray} from "@tsed/core"; -import {TestRole, TestUser, TestUserNew} from "./helpers/models/User"; -import {Server} from "./helpers/Server"; +import {TestRole, TestUser, TestUserNew} from "./helpers/models/User.js"; +import {Server} from "./helpers/Server.js"; @Injectable() class ResourcesRepository { diff --git a/packages/orm/mongoose/test/subdocument.integration.spec.ts b/packages/orm/mongoose/test/subdocument.integration.spec.ts index 67e5cd66cc4..500d55bab79 100644 --- a/packages/orm/mongoose/test/subdocument.integration.spec.ts +++ b/packages/orm/mongoose/test/subdocument.integration.spec.ts @@ -1,6 +1,6 @@ import {Property} from "@tsed/schema"; import {TestMongooseContext} from "@tsed/testing-mongoose"; -import {getSchema, Model, MongooseSchema, ObjectID} from "../src/index"; +import {getSchema, Model, MongooseSchema, ObjectID} from "../src/index.js"; @MongooseSchema() export class TestSubDocument { diff --git a/packages/orm/mongoose/test/user.integration.spec.ts b/packages/orm/mongoose/test/user.integration.spec.ts index c2e556be208..68120257229 100644 --- a/packages/orm/mongoose/test/user.integration.spec.ts +++ b/packages/orm/mongoose/test/user.integration.spec.ts @@ -1,8 +1,8 @@ import {TestMongooseContext} from "@tsed/testing-mongoose"; import faker from "@faker-js/faker"; -import {MongooseModel} from "../src/interfaces/MongooseModel"; -import {TestUser} from "./helpers/models/User"; -import {Server} from "./helpers/Server"; +import {MongooseModel} from "../src/interfaces/MongooseModel.js"; +import {TestUser} from "./helpers/models/User.js"; +import {Server} from "./helpers/Server.js"; describe("Mongoose", () => { describe("UserModel (di)", () => { diff --git a/packages/orm/mongoose/test/versioning.integration.spec.ts b/packages/orm/mongoose/test/versioning.integration.spec.ts index 8f592c648f0..fcf79d0c331 100644 --- a/packages/orm/mongoose/test/versioning.integration.spec.ts +++ b/packages/orm/mongoose/test/versioning.integration.spec.ts @@ -1,9 +1,9 @@ import {serialize} from "@tsed/json-mapper"; import {TestMongooseContext} from "@tsed/testing-mongoose"; -import {Server} from "./helpers/Server"; -import {MongooseModel} from "../src/interfaces/MongooseModel"; +import {Server} from "./helpers/Server.js"; +import {MongooseModel} from "../src/interfaces/MongooseModel.js"; import {Integer, Required} from "@tsed/schema"; -import {Model, ObjectID, VersionKey} from "../src/index"; +import {Model, ObjectID, VersionKey} from "../src/index.js"; describe("Mongoose", () => { describe("Versioning", () => { diff --git a/packages/orm/mongoose/test/virtualRef.integration.spec.ts b/packages/orm/mongoose/test/virtualRef.integration.spec.ts index 7873c48457a..3486c254d5e 100644 --- a/packages/orm/mongoose/test/virtualRef.integration.spec.ts +++ b/packages/orm/mongoose/test/virtualRef.integration.spec.ts @@ -6,7 +6,7 @@ import {PlatformExpress} from "@tsed/platform-express"; import {CollectionOf, getJsonSchema, Groups, Integer, Required} from "@tsed/schema"; import {TestMongooseContext} from "@tsed/testing-mongoose"; import SuperTest from "supertest"; -import {Server} from "./helpers/Server"; +import {Server} from "./helpers/Server.js"; @Model() export class GalaxiesModel { diff --git a/packages/orm/objection/src/components/createBooleanColumn.spec.ts b/packages/orm/objection/src/components/createBooleanColumn.spec.ts index 4468923256c..7ba1dd79d5b 100644 --- a/packages/orm/objection/src/components/createBooleanColumn.spec.ts +++ b/packages/orm/objection/src/components/createBooleanColumn.spec.ts @@ -1,7 +1,7 @@ import {Property} from "@tsed/schema"; -import {createTableStub} from "../../test/helpers/knex/table"; -import {Entity} from "../decorators/entity"; -import {createColumns} from "../utils/createColumns"; +import {createTableStub} from "../../test/helpers/knex/table.js"; +import {Entity} from "../decorators/entity.js"; +import {createColumns} from "../utils/createColumns.js"; describe("createBooleanColumn", () => { it("should create table from a given class", () => { diff --git a/packages/orm/objection/src/components/createBooleanColumn.ts b/packages/orm/objection/src/components/createBooleanColumn.ts index 0718d961032..a24ceafb784 100644 --- a/packages/orm/objection/src/components/createBooleanColumn.ts +++ b/packages/orm/objection/src/components/createBooleanColumn.ts @@ -1,6 +1,6 @@ import type {Knex} from "knex"; -import {ColumnTypesContainer} from "../services/ColumnTypesContainer"; -import {ColumnCtx} from "../utils/getColumnCtx"; +import {ColumnTypesContainer} from "../services/ColumnTypesContainer.js"; +import {ColumnCtx} from "../utils/getColumnCtx.js"; /** * @ignore */ diff --git a/packages/orm/objection/src/components/createIdColumn.spec.ts b/packages/orm/objection/src/components/createIdColumn.spec.ts index 66caee72c8e..1c2d62100f0 100644 --- a/packages/orm/objection/src/components/createIdColumn.spec.ts +++ b/packages/orm/objection/src/components/createIdColumn.spec.ts @@ -1,7 +1,7 @@ -import {Entity} from "../decorators/entity"; -import {IdColumn} from "../decorators/idColumn"; -import {createColumns} from "../utils/createColumns"; -import {createTableStub} from "../../test/helpers/knex/table"; +import {Entity} from "../decorators/entity.js"; +import {IdColumn} from "../decorators/idColumn.js"; +import {createColumns} from "../utils/createColumns.js"; +import {createTableStub} from "../../test/helpers/knex/table.js"; describe("createIdColumn", () => { it("should create table from a given class (bigIncrements)", () => { diff --git a/packages/orm/objection/src/components/createIdColumn.ts b/packages/orm/objection/src/components/createIdColumn.ts index 8fca68c2ec0..b6d91f37b4f 100644 --- a/packages/orm/objection/src/components/createIdColumn.ts +++ b/packages/orm/objection/src/components/createIdColumn.ts @@ -1,5 +1,5 @@ -import {ColumnCtx} from "../utils/getColumnCtx"; -import {ColumnTypesContainer} from "../services/ColumnTypesContainer"; +import {ColumnCtx} from "../utils/getColumnCtx.js"; +import {ColumnTypesContainer} from "../services/ColumnTypesContainer.js"; import type {Knex} from "knex"; import {randomUUID} from "crypto"; diff --git a/packages/orm/objection/src/components/createNumberColumn.spec.ts b/packages/orm/objection/src/components/createNumberColumn.spec.ts index eb0083f0bc7..9d555a0b614 100644 --- a/packages/orm/objection/src/components/createNumberColumn.spec.ts +++ b/packages/orm/objection/src/components/createNumberColumn.spec.ts @@ -1,8 +1,8 @@ import {Property} from "@tsed/schema"; -import {createTableStub} from "../../test/helpers/knex/table"; -import {Decimal} from "../decorators/decimal"; -import {Entity} from "../decorators/entity"; -import {createColumns} from "../utils/createColumns"; +import {createTableStub} from "../../test/helpers/knex/table.js"; +import {Decimal} from "../decorators/decimal.js"; +import {Entity} from "../decorators/entity.js"; +import {createColumns} from "../utils/createColumns.js"; describe("createNumberColumn", () => { it("should create table from a given class (default)", async () => { diff --git a/packages/orm/objection/src/components/createNumberColumn.ts b/packages/orm/objection/src/components/createNumberColumn.ts index 15c2c4672d2..2e61294dda0 100644 --- a/packages/orm/objection/src/components/createNumberColumn.ts +++ b/packages/orm/objection/src/components/createNumberColumn.ts @@ -1,6 +1,6 @@ import type {Knex} from "knex"; -import {ColumnTypesContainer} from "../services/ColumnTypesContainer"; -import {ColumnCtx} from "../utils/getColumnCtx"; +import {ColumnTypesContainer} from "../services/ColumnTypesContainer.js"; +import {ColumnCtx} from "../utils/getColumnCtx.js"; /** * @ignore diff --git a/packages/orm/objection/src/components/createStringColumn.spec.ts b/packages/orm/objection/src/components/createStringColumn.spec.ts index 5d22ccfadbe..a3e9d974c7a 100644 --- a/packages/orm/objection/src/components/createStringColumn.spec.ts +++ b/packages/orm/objection/src/components/createStringColumn.spec.ts @@ -1,7 +1,7 @@ import {MaxLength, Property} from "@tsed/schema"; -import {createTableStub} from "../../test/helpers/knex/table"; -import {Entity} from "../decorators/entity"; -import {createColumns} from "../utils/createColumns"; +import {createTableStub} from "../../test/helpers/knex/table.js"; +import {Entity} from "../decorators/entity.js"; +import {createColumns} from "../utils/createColumns.js"; describe("createNumberColumn", () => { it("should create table from a given class (with maxLength)", async () => { diff --git a/packages/orm/objection/src/components/createStringColumn.ts b/packages/orm/objection/src/components/createStringColumn.ts index 342224d2d36..a160b1a8738 100644 --- a/packages/orm/objection/src/components/createStringColumn.ts +++ b/packages/orm/objection/src/components/createStringColumn.ts @@ -1,6 +1,6 @@ import type {Knex} from "knex"; -import {ColumnTypesContainer} from "../services/ColumnTypesContainer"; -import {ColumnCtx} from "../utils/getColumnCtx"; +import {ColumnTypesContainer} from "../services/ColumnTypesContainer.js"; +import {ColumnCtx} from "../utils/getColumnCtx.js"; /** * @ignore diff --git a/packages/orm/objection/src/decorators/belongsToOne.spec.ts b/packages/orm/objection/src/decorators/belongsToOne.spec.ts index 79593f4c1a4..93cf4f47be0 100644 --- a/packages/orm/objection/src/decorators/belongsToOne.spec.ts +++ b/packages/orm/objection/src/decorators/belongsToOne.spec.ts @@ -1,7 +1,7 @@ import {Model} from "objection"; -import {BelongsToOne} from "./belongsToOne"; -import {Entity} from "./entity"; -import {IdColumn} from "./idColumn"; +import {BelongsToOne} from "./belongsToOne.js"; +import {Entity} from "./entity.js"; +import {IdColumn} from "./idColumn.js"; describe("@BelongsToOne", () => { it("should set metadata", () => { diff --git a/packages/orm/objection/src/decorators/belongsToOne.ts b/packages/orm/objection/src/decorators/belongsToOne.ts index 87dd5d8b0f4..c7ebe822aa9 100644 --- a/packages/orm/objection/src/decorators/belongsToOne.ts +++ b/packages/orm/objection/src/decorators/belongsToOne.ts @@ -1,6 +1,6 @@ import {Model} from "objection"; -import {RelatesTo} from "./relatesTo"; -import {RelationshipOptsWithoutThrough} from "../domain/RelationshipOpts"; +import {RelatesTo} from "./relatesTo.js"; +import {RelationshipOptsWithoutThrough} from "../domain/RelationshipOpts.js"; /** * diff --git a/packages/orm/objection/src/decorators/columnOptions.ts b/packages/orm/objection/src/decorators/columnOptions.ts index d60c11bbac6..0f8c67bab2b 100644 --- a/packages/orm/objection/src/decorators/columnOptions.ts +++ b/packages/orm/objection/src/decorators/columnOptions.ts @@ -1,5 +1,5 @@ import {StoreSet} from "@tsed/core"; -import type {ColumnOpts} from "../domain/ColumnOpts"; +import type {ColumnOpts} from "../domain/ColumnOpts.js"; /** * diff --git a/packages/orm/objection/src/decorators/decimal.spec.ts b/packages/orm/objection/src/decorators/decimal.spec.ts index e52e2133d03..5b05828b35c 100644 --- a/packages/orm/objection/src/decorators/decimal.spec.ts +++ b/packages/orm/objection/src/decorators/decimal.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; import {getJsonSchema} from "@tsed/schema"; -import {Decimal} from "./decimal"; +import {Decimal} from "./decimal.js"; describe("@Decimal", () => { it("should set metadata", () => { diff --git a/packages/orm/objection/src/decorators/decimal.ts b/packages/orm/objection/src/decorators/decimal.ts index 685461d9a34..c9c35f29519 100644 --- a/packages/orm/objection/src/decorators/decimal.ts +++ b/packages/orm/objection/src/decorators/decimal.ts @@ -1,6 +1,6 @@ import {StoreSet, useDecorators} from "@tsed/core"; import {Property} from "@tsed/schema"; -import {ColumnOptions} from "./columnOptions"; +import {ColumnOptions} from "./columnOptions.js"; export interface DecimalOptions { precision?: number | null; diff --git a/packages/orm/objection/src/decorators/entity.spec.ts b/packages/orm/objection/src/decorators/entity.spec.ts index 6a035f82bc2..7b9c69bdc2f 100644 --- a/packages/orm/objection/src/decorators/entity.spec.ts +++ b/packages/orm/objection/src/decorators/entity.spec.ts @@ -1,4 +1,4 @@ -import {Entity} from "./entity"; +import {Entity} from "./entity.js"; describe("@Entity", () => { it("should set metadata", () => { diff --git a/packages/orm/objection/src/decorators/entity.ts b/packages/orm/objection/src/decorators/entity.ts index fd745b224fd..de0a0515e51 100644 --- a/packages/orm/objection/src/decorators/entity.ts +++ b/packages/orm/objection/src/decorators/entity.ts @@ -1,6 +1,6 @@ import {Type} from "@tsed/core"; -import {defineStaticGetter} from "../utils/defineStaticGetter"; -import {getJsonEntityRelationships} from "../utils/getJsonEntityRelationships"; +import {defineStaticGetter} from "../utils/defineStaticGetter.js"; +import {getJsonEntityRelationships} from "../utils/getJsonEntityRelationships.js"; import {getJsonSchema} from "@tsed/schema"; /** diff --git a/packages/orm/objection/src/decorators/hasMany.spec.ts b/packages/orm/objection/src/decorators/hasMany.spec.ts index 1e336d6619f..4ef0129cb03 100644 --- a/packages/orm/objection/src/decorators/hasMany.spec.ts +++ b/packages/orm/objection/src/decorators/hasMany.spec.ts @@ -1,7 +1,7 @@ import {Model} from "objection"; -import {Entity} from "./entity"; -import {HasMany} from "./hasMany"; -import {IdColumn} from "./idColumn"; +import {Entity} from "./entity.js"; +import {HasMany} from "./hasMany.js"; +import {IdColumn} from "./idColumn.js"; describe("@HasMany", () => { it("should set metadata", () => { diff --git a/packages/orm/objection/src/decorators/hasMany.ts b/packages/orm/objection/src/decorators/hasMany.ts index 650a00709d1..4f6e6dd1a7e 100644 --- a/packages/orm/objection/src/decorators/hasMany.ts +++ b/packages/orm/objection/src/decorators/hasMany.ts @@ -1,7 +1,7 @@ import {Model, ModelClassSpecifier} from "objection"; -import {RelatesTo} from "./relatesTo"; -import {RelationshipOptsWithThrough} from "../domain/RelationshipOpts"; +import {RelatesTo} from "./relatesTo.js"; +import {RelationshipOptsWithThrough} from "../domain/RelationshipOpts.js"; /** * diff --git a/packages/orm/objection/src/decorators/hasOne.spec.ts b/packages/orm/objection/src/decorators/hasOne.spec.ts index 746c1fa28d1..3200eeb0e3c 100644 --- a/packages/orm/objection/src/decorators/hasOne.spec.ts +++ b/packages/orm/objection/src/decorators/hasOne.spec.ts @@ -1,7 +1,7 @@ import {Model} from "objection"; -import {Entity} from "./entity"; -import {HasOne} from "./hasOne"; -import {IdColumn} from "./idColumn"; +import {Entity} from "./entity.js"; +import {HasOne} from "./hasOne.js"; +import {IdColumn} from "./idColumn.js"; describe("@HasOne", () => { it("should set metadata", () => { diff --git a/packages/orm/objection/src/decorators/hasOne.ts b/packages/orm/objection/src/decorators/hasOne.ts index 4af4e258ee9..0a47c768ef0 100644 --- a/packages/orm/objection/src/decorators/hasOne.ts +++ b/packages/orm/objection/src/decorators/hasOne.ts @@ -1,6 +1,6 @@ import {Model} from "objection"; -import {RelatesTo} from "./relatesTo"; -import {RelationshipOptsWithoutThrough} from "../domain/RelationshipOpts"; +import {RelatesTo} from "./relatesTo.js"; +import {RelationshipOptsWithoutThrough} from "../domain/RelationshipOpts.js"; /** * diff --git a/packages/orm/objection/src/decorators/hasOneThroughRelation.spec.ts b/packages/orm/objection/src/decorators/hasOneThroughRelation.spec.ts index 7c8de1b1904..5d741114a64 100644 --- a/packages/orm/objection/src/decorators/hasOneThroughRelation.spec.ts +++ b/packages/orm/objection/src/decorators/hasOneThroughRelation.spec.ts @@ -1,7 +1,7 @@ import {Model} from "objection"; -import {Entity} from "./entity"; -import {HasOneThroughRelation} from "./hasOneThroughRelation"; -import {IdColumn} from "./idColumn"; +import {Entity} from "./entity.js"; +import {HasOneThroughRelation} from "./hasOneThroughRelation.js"; +import {IdColumn} from "./idColumn.js"; describe("@HasOneThroughRelation", () => { it("should set metadata", () => { diff --git a/packages/orm/objection/src/decorators/hasOneThroughRelation.ts b/packages/orm/objection/src/decorators/hasOneThroughRelation.ts index a681b279917..6f111e9ff26 100644 --- a/packages/orm/objection/src/decorators/hasOneThroughRelation.ts +++ b/packages/orm/objection/src/decorators/hasOneThroughRelation.ts @@ -1,7 +1,7 @@ -import {RelationshipOptsWithThrough, RelationshipOptsWithoutThrough} from "../domain/RelationshipOpts"; +import {RelationshipOptsWithThrough, RelationshipOptsWithoutThrough} from "../domain/RelationshipOpts.js"; import {Model} from "objection"; -import {RelatesTo} from "./relatesTo"; +import {RelatesTo} from "./relatesTo.js"; /** * diff --git a/packages/orm/objection/src/decorators/idColumn.spec.ts b/packages/orm/objection/src/decorators/idColumn.spec.ts index 28aac8e2622..84991a45daf 100644 --- a/packages/orm/objection/src/decorators/idColumn.spec.ts +++ b/packages/orm/objection/src/decorators/idColumn.spec.ts @@ -1,7 +1,7 @@ import {Store} from "@tsed/core"; import {getJsonSchema} from "@tsed/schema"; import {Model} from "objection"; -import {IdColumn} from "./idColumn"; +import {IdColumn} from "./idColumn.js"; describe("@IdColumn", () => { it("should set metadata", () => { diff --git a/packages/orm/objection/src/decorators/idColumn.ts b/packages/orm/objection/src/decorators/idColumn.ts index 1ce6bc52a4e..045dca0ceac 100644 --- a/packages/orm/objection/src/decorators/idColumn.ts +++ b/packages/orm/objection/src/decorators/idColumn.ts @@ -1,6 +1,6 @@ -import {ColumnOptions} from "./columnOptions"; +import {ColumnOptions} from "./columnOptions.js"; import {Property} from "@tsed/schema"; -import {defineStaticGetter} from "../utils/defineStaticGetter"; +import {defineStaticGetter} from "../utils/defineStaticGetter.js"; import {useDecorators} from "@tsed/core"; /** diff --git a/packages/orm/objection/src/decorators/manyToMany.spec.ts b/packages/orm/objection/src/decorators/manyToMany.spec.ts index 9a7bed9982e..3cc6ed4ad6e 100644 --- a/packages/orm/objection/src/decorators/manyToMany.spec.ts +++ b/packages/orm/objection/src/decorators/manyToMany.spec.ts @@ -1,7 +1,7 @@ import {Model} from "objection"; -import {Entity} from "./entity"; -import {IdColumn} from "./idColumn"; -import {ManyToMany} from "./manyToMany"; +import {Entity} from "./entity.js"; +import {IdColumn} from "./idColumn.js"; +import {ManyToMany} from "./manyToMany.js"; describe("@ManyToMany", () => { it("should set metadata", () => { diff --git a/packages/orm/objection/src/decorators/manyToMany.ts b/packages/orm/objection/src/decorators/manyToMany.ts index 641573d79c2..964bffb0432 100644 --- a/packages/orm/objection/src/decorators/manyToMany.ts +++ b/packages/orm/objection/src/decorators/manyToMany.ts @@ -1,7 +1,7 @@ import {Model, ModelClassSpecifier} from "objection"; -import {RelatesTo} from "./relatesTo"; -import {RelationshipOptsWithThrough} from "../domain/RelationshipOpts"; +import {RelatesTo} from "./relatesTo.js"; +import {RelationshipOptsWithThrough} from "../domain/RelationshipOpts.js"; /** * diff --git a/packages/orm/objection/src/decorators/relatesTo.spec.ts b/packages/orm/objection/src/decorators/relatesTo.spec.ts index 767bcc59134..33d65caa6e0 100644 --- a/packages/orm/objection/src/decorators/relatesTo.spec.ts +++ b/packages/orm/objection/src/decorators/relatesTo.spec.ts @@ -1,7 +1,7 @@ import {Model} from "objection"; -import {Entity} from "./entity"; -import {IdColumn} from "./idColumn"; -import {RelatesTo} from "./relatesTo"; +import {Entity} from "./entity.js"; +import {IdColumn} from "./idColumn.js"; +import {RelatesTo} from "./relatesTo.js"; describe("@RelatesTo", () => { it("should set metadata", () => { diff --git a/packages/orm/objection/src/decorators/relatesTo.ts b/packages/orm/objection/src/decorators/relatesTo.ts index 2586b352d5f..20237c0ae23 100644 --- a/packages/orm/objection/src/decorators/relatesTo.ts +++ b/packages/orm/objection/src/decorators/relatesTo.ts @@ -1,10 +1,10 @@ import {CollectionOf, Property} from "@tsed/schema"; -import {RelationshipOpts, isModelClassFactory} from "../domain/RelationshipOpts"; +import {RelationshipOpts, isModelClassFactory} from "../domain/RelationshipOpts.js"; import {StoreFn, useDecorators} from "@tsed/core"; -import {OBJECTION_RELATIONSHIP_KEY} from "../utils/getJsonEntityRelationships"; +import {OBJECTION_RELATIONSHIP_KEY} from "../utils/getJsonEntityRelationships.js"; import {RelationType} from "objection"; -import {createRelationshipMapping} from "../utils/createRelationshipMapping"; +import {createRelationshipMapping} from "../utils/createRelationshipMapping.js"; /** * diff --git a/packages/orm/objection/src/index.ts b/packages/orm/objection/src/index.ts index 145bd6057b5..18a9dd46e1f 100644 --- a/packages/orm/objection/src/index.ts +++ b/packages/orm/objection/src/index.ts @@ -2,29 +2,29 @@ * @file Automatically generated by barrelsby. */ -export * from "./components/createBooleanColumn"; -export * from "./components/createIdColumn"; -export * from "./components/createNumberColumn"; -export * from "./components/createStringColumn"; -export * from "./decorators/belongsToOne"; -export * from "./decorators/columnOptions"; -export * from "./decorators/decimal"; -export * from "./decorators/entity"; -export * from "./decorators/hasMany"; -export * from "./decorators/hasOne"; -export * from "./decorators/hasOneThroughRelation"; -export * from "./decorators/idColumn"; -export * from "./decorators/manyToMany"; -export * from "./decorators/relatesTo"; -export * from "./domain/ColumnOpts"; -export * from "./domain/RelationshipOpts"; -export * from "./domain/interfaces"; -export * from "./services/ColumnTypesContainer"; -export * from "./services/ObjectionConnection"; -export * from "./utils/connect"; -export * from "./utils/createColumns"; -export * from "./utils/createJoinKeys"; -export * from "./utils/createRelationshipMapping"; -export * from "./utils/defineStaticGetter"; -export * from "./utils/getColumnCtx"; -export * from "./utils/getJsonEntityRelationships"; +export * from "./components/createBooleanColumn.js"; +export * from "./components/createIdColumn.js"; +export * from "./components/createNumberColumn.js"; +export * from "./components/createStringColumn.js"; +export * from "./decorators/belongsToOne.js"; +export * from "./decorators/columnOptions.js"; +export * from "./decorators/decimal.js"; +export * from "./decorators/entity.js"; +export * from "./decorators/hasMany.js"; +export * from "./decorators/hasOne.js"; +export * from "./decorators/hasOneThroughRelation.js"; +export * from "./decorators/idColumn.js"; +export * from "./decorators/manyToMany.js"; +export * from "./decorators/relatesTo.js"; +export * from "./domain/ColumnOpts.js"; +export * from "./domain/RelationshipOpts.js"; +export * from "./domain/interfaces.js"; +export * from "./services/ColumnTypesContainer.js"; +export * from "./services/ObjectionConnection.js"; +export * from "./utils/connect.js"; +export * from "./utils/createColumns.js"; +export * from "./utils/createJoinKeys.js"; +export * from "./utils/createRelationshipMapping.js"; +export * from "./utils/defineStaticGetter.js"; +export * from "./utils/getColumnCtx.js"; +export * from "./utils/getJsonEntityRelationships.js"; diff --git a/packages/orm/objection/src/services/ColumnTypesContainer.ts b/packages/orm/objection/src/services/ColumnTypesContainer.ts index 6a48782b9b1..971fe987803 100644 --- a/packages/orm/objection/src/services/ColumnTypesContainer.ts +++ b/packages/orm/objection/src/services/ColumnTypesContainer.ts @@ -1,5 +1,5 @@ import type {Knex} from "knex"; -import {ColumnCtx} from "../utils/getColumnCtx"; +import {ColumnCtx} from "../utils/getColumnCtx.js"; /** * @ignore diff --git a/packages/orm/objection/src/services/ObjectionConnection.ts b/packages/orm/objection/src/services/ObjectionConnection.ts index 0abd5a420d6..1f69b7946b4 100644 --- a/packages/orm/objection/src/services/ObjectionConnection.ts +++ b/packages/orm/objection/src/services/ObjectionConnection.ts @@ -1,6 +1,6 @@ import {Configuration, registerProvider} from "@tsed/di"; import type {Knex} from "knex"; -import {createConnection} from "../utils/connect"; +import {createConnection} from "../utils/connect.js"; export const OBJECTION_CONNECTION = Symbol.for("DEFAULT_CONNECTION"); export type OBJECTION_CONNECTION = Knex; diff --git a/packages/orm/objection/src/utils/createColumns.spec.ts b/packages/orm/objection/src/utils/createColumns.spec.ts index 612d588762e..df2078aef78 100644 --- a/packages/orm/objection/src/utils/createColumns.spec.ts +++ b/packages/orm/objection/src/utils/createColumns.spec.ts @@ -1,10 +1,10 @@ import {catchError} from "@tsed/core"; import {MaxLength, Property} from "@tsed/schema"; -import {createTableStub} from "../../test/helpers/knex/table"; -import {Decimal} from "../decorators/decimal"; -import {Entity} from "../decorators/entity"; -import {IdColumn} from "../decorators/idColumn"; -import {createColumns} from "./createColumns"; +import {createTableStub} from "../../test/helpers/knex/table.js"; +import {Decimal} from "../decorators/decimal.js"; +import {Entity} from "../decorators/entity.js"; +import {IdColumn} from "../decorators/idColumn.js"; +import {createColumns} from "./createColumns.js"; describe("createTable", () => { it("should create table from a given class (columns doesn't exists)", () => { diff --git a/packages/orm/objection/src/utils/createColumns.ts b/packages/orm/objection/src/utils/createColumns.ts index d3cf2f5cb59..5e64be85d09 100644 --- a/packages/orm/objection/src/utils/createColumns.ts +++ b/packages/orm/objection/src/utils/createColumns.ts @@ -4,8 +4,8 @@ import "../components/createBooleanColumn"; import "../components/createIdColumn"; import "../components/createNumberColumn"; import "../components/createStringColumn"; -import {ColumnTypesContainer} from "../services/ColumnTypesContainer"; -import {getColumnCtx} from "./getColumnCtx"; +import {ColumnTypesContainer} from "../services/ColumnTypesContainer.js"; +import {getColumnCtx} from "./getColumnCtx.js"; /** * @ignore diff --git a/packages/orm/objection/src/utils/createJoinKeys.ts b/packages/orm/objection/src/utils/createJoinKeys.ts index c33881b7c53..204c150a5ba 100644 --- a/packages/orm/objection/src/utils/createJoinKeys.ts +++ b/packages/orm/objection/src/utils/createJoinKeys.ts @@ -1,5 +1,5 @@ import {Model, RelationType} from "objection"; -import {RelationshipOpts, isRelationshipOptsWithThrough} from "../domain/RelationshipOpts"; +import {RelationshipOpts, isRelationshipOptsWithThrough} from "../domain/RelationshipOpts.js"; import {Metadata} from "@tsed/core"; diff --git a/packages/orm/objection/src/utils/createRelationshipMapping.ts b/packages/orm/objection/src/utils/createRelationshipMapping.ts index 23f1a0802b8..74fe1c395ee 100644 --- a/packages/orm/objection/src/utils/createRelationshipMapping.ts +++ b/packages/orm/objection/src/utils/createRelationshipMapping.ts @@ -1,8 +1,8 @@ import {DecoratorParameters, Metadata, getClass} from "@tsed/core"; import {RelationType} from "objection"; -import {RelationshipOpts} from "../domain/RelationshipOpts"; -import {createJoinKeys} from "./createJoinKeys"; +import {RelationshipOpts} from "../domain/RelationshipOpts.js"; +import {createJoinKeys} from "./createJoinKeys.js"; /** * @ignore diff --git a/packages/orm/objection/src/utils/getColumnCtx.ts b/packages/orm/objection/src/utils/getColumnCtx.ts index be6934bba99..a3cdadc604c 100644 --- a/packages/orm/objection/src/utils/getColumnCtx.ts +++ b/packages/orm/objection/src/utils/getColumnCtx.ts @@ -1,5 +1,5 @@ import {JsonEntityStore} from "@tsed/schema"; -import {ColumnOpts} from "../domain/ColumnOpts"; +import {ColumnOpts} from "../domain/ColumnOpts.js"; /** * @ignore diff --git a/packages/orm/objection/src/utils/getJsonEntityRelationships.ts b/packages/orm/objection/src/utils/getJsonEntityRelationships.ts index a9efba5f4a7..4635d37bad8 100644 --- a/packages/orm/objection/src/utils/getJsonEntityRelationships.ts +++ b/packages/orm/objection/src/utils/getJsonEntityRelationships.ts @@ -1,4 +1,4 @@ -import {getColumns} from "./createColumns"; +import {getColumns} from "./createColumns.js"; /** * @ignore diff --git a/packages/orm/objection/test/helpers/migrations/01_users.ts b/packages/orm/objection/test/helpers/migrations/01_users.ts index 3f979f60430..5d8e176c050 100644 --- a/packages/orm/objection/test/helpers/migrations/01_users.ts +++ b/packages/orm/objection/test/helpers/migrations/01_users.ts @@ -1,6 +1,6 @@ import {Knex} from "knex"; -import {createColumns} from "../../../src"; -import {User} from "../models/User"; +import {createColumns} from "../../../src/index.js"; +import {User} from "../models/User.js"; export function up(knex: Knex): Promise { return knex.schema.createTable(User.tableName, (table: Knex.TableBuilder) => { diff --git a/packages/orm/objection/test/helpers/models/User.ts b/packages/orm/objection/test/helpers/models/User.ts index 490bd1766bc..496f542c9e1 100644 --- a/packages/orm/objection/test/helpers/models/User.ts +++ b/packages/orm/objection/test/helpers/models/User.ts @@ -1,7 +1,7 @@ import {Entity} from "@tsed/objection"; import {Groups, MaxLength, MinLength, Required} from "@tsed/schema"; import {Model} from "objection"; -import {IdColumn} from "../../../src"; +import {IdColumn} from "../../../src/index.js"; @Entity("users") export class User extends Model { diff --git a/packages/orm/objection/test/integration.spec.ts b/packages/orm/objection/test/integration.spec.ts index 5c516376466..07388aa7cba 100644 --- a/packages/orm/objection/test/integration.spec.ts +++ b/packages/orm/objection/test/integration.spec.ts @@ -3,7 +3,7 @@ import filedirname from "filedirname"; import {Knex} from "knex"; import {serialize} from "@tsed/json-mapper"; import {OBJECTION_CONNECTION} from "@tsed/objection"; -import {User} from "./helpers/models/User"; +import {User} from "./helpers/models/User.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/orm/prisma/scripts/backup-index.d.ts b/packages/orm/prisma/scripts/backup-index.d.ts index d36f277dad6..cd281f3ad6d 100644 --- a/packages/orm/prisma/scripts/backup-index.d.ts +++ b/packages/orm/prisma/scripts/backup-index.d.ts @@ -1 +1 @@ -export * from "../cjs/.schema"; +export * from "../cjs/.schema.js"; diff --git a/packages/orm/prisma/scripts/backup-index.esm.js b/packages/orm/prisma/scripts/backup-index.esm.js index 7dc0c2220e1..dfaafedc454 100644 --- a/packages/orm/prisma/scripts/backup-index.esm.js +++ b/packages/orm/prisma/scripts/backup-index.esm.js @@ -1,5 +1,5 @@ import path from "path"; -export * from "./.schema"; +export * from "./.schema.js"; /** * Annotation for ncc/zeit diff --git a/packages/orm/prisma/src/__mock__/createContextFixture.ts b/packages/orm/prisma/src/__mock__/createContextFixture.ts index c05326d9658..23c3413387c 100644 --- a/packages/orm/prisma/src/__mock__/createContextFixture.ts +++ b/packages/orm/prisma/src/__mock__/createContextFixture.ts @@ -1,4 +1,4 @@ -import {TransformContext} from "../generator/domain/TransformContext"; +import {TransformContext} from "../generator/domain/TransformContext.js"; export function createContextFixture(): TransformContext { return { diff --git a/packages/orm/prisma/src/__mock__/createDmmfFieldFixture.ts b/packages/orm/prisma/src/__mock__/createDmmfFieldFixture.ts index 393d0b00092..12ebf43e644 100644 --- a/packages/orm/prisma/src/__mock__/createDmmfFieldFixture.ts +++ b/packages/orm/prisma/src/__mock__/createDmmfFieldFixture.ts @@ -1,4 +1,4 @@ -import {DmmfField} from "../generator/domain/DmmfField"; +import {DmmfField} from "../generator/domain/DmmfField.js"; export interface FieldFixtureOptions { kind: string; diff --git a/packages/orm/prisma/src/__mock__/createDmmfModelFixture.ts b/packages/orm/prisma/src/__mock__/createDmmfModelFixture.ts index 86e98158a4b..4d4d91f141f 100644 --- a/packages/orm/prisma/src/__mock__/createDmmfModelFixture.ts +++ b/packages/orm/prisma/src/__mock__/createDmmfModelFixture.ts @@ -1,4 +1,4 @@ -import {DmmfModel} from "../generator/domain/DmmfModel"; +import {DmmfModel} from "../generator/domain/DmmfModel.js"; export function createDmmfModelFixture() { return new DmmfModel(require("./dmmfUserModel.json")); diff --git a/packages/orm/prisma/src/cli/generator.ts b/packages/orm/prisma/src/cli/generator.ts index 1163a44cc6f..b312eae0368 100644 --- a/packages/orm/prisma/src/cli/generator.ts +++ b/packages/orm/prisma/src/cli/generator.ts @@ -1,5 +1,5 @@ import {generatorHandler} from "@prisma/generator-helper"; -import {generate, defaultOutput} from "./prismaGenerator"; +import {generate, defaultOutput} from "./prismaGenerator.js"; generatorHandler({ onManifest: () => ({ diff --git a/packages/orm/prisma/src/cli/prismaGenerator.ts b/packages/orm/prisma/src/cli/prismaGenerator.ts index 0616bdc5ba0..59e1a939ecb 100644 --- a/packages/orm/prisma/src/cli/prismaGenerator.ts +++ b/packages/orm/prisma/src/cli/prismaGenerator.ts @@ -1,8 +1,8 @@ import {GeneratorOptions} from "@prisma/generator-helper"; import {parseEnvValue} from "@prisma/internals"; import fs from "fs-extra"; -import {generateCode} from "../generator/generateCode"; -import removeDir from "../generator/utils/removeDir"; +import {generateCode} from "../generator/generateCode.js"; +import removeDir from "../generator/utils/removeDir.js"; import path, {join} from "path"; const rootDir = __dirname; diff --git a/packages/orm/prisma/src/generator/domain/DmmfField.ts b/packages/orm/prisma/src/generator/domain/DmmfField.ts index 80f1755bd05..9f4084ae9e1 100644 --- a/packages/orm/prisma/src/generator/domain/DmmfField.ts +++ b/packages/orm/prisma/src/generator/domain/DmmfField.ts @@ -1,6 +1,6 @@ import {DMMF} from "@prisma/generator-helper"; -import {parseDocumentationAttributes} from "../utils/parseDocumentationAttributes"; -import type {DmmfModel} from "./DmmfModel"; +import {parseDocumentationAttributes} from "../utils/parseDocumentationAttributes.js"; +import type {DmmfModel} from "./DmmfModel.js"; export class DmmfField { readonly model: DmmfModel; diff --git a/packages/orm/prisma/src/generator/domain/DmmfModel.ts b/packages/orm/prisma/src/generator/domain/DmmfModel.ts index 0955136bcb6..d4959ae18a0 100644 --- a/packages/orm/prisma/src/generator/domain/DmmfModel.ts +++ b/packages/orm/prisma/src/generator/domain/DmmfModel.ts @@ -1,7 +1,7 @@ import {DMMF} from "@prisma/generator-helper"; import {toMap} from "@tsed/core"; import {ImportDeclarationStructure, StructureKind} from "ts-morph"; -import {DmmfField} from "./DmmfField"; +import {DmmfField} from "./DmmfField.js"; import {pascalCase} from "change-case"; export class DmmfModel { diff --git a/packages/orm/prisma/src/generator/generateCode.spec.ts b/packages/orm/prisma/src/generator/generateCode.spec.ts index 2068b71727e..526195dc19b 100644 --- a/packages/orm/prisma/src/generator/generateCode.spec.ts +++ b/packages/orm/prisma/src/generator/generateCode.spec.ts @@ -1,6 +1,6 @@ -import {generateCode} from "./generateCode"; -import {createProjectFixture} from "../__mock__/createProjectFixture"; -import {createDmmfFixture} from "../__mock__/createDmmfFixture"; +import {generateCode} from "./generateCode.js"; +import {createProjectFixture} from "../__mock__/createProjectFixture.js"; +import {createDmmfFixture} from "../__mock__/createDmmfFixture.js"; describe("generateCode", () => { it("should generate all codes", async () => { diff --git a/packages/orm/prisma/src/generator/generateCode.ts b/packages/orm/prisma/src/generator/generateCode.ts index 8343a833573..8d901c614d2 100644 --- a/packages/orm/prisma/src/generator/generateCode.ts +++ b/packages/orm/prisma/src/generator/generateCode.ts @@ -1,13 +1,13 @@ import {DMMF} from "@prisma/generator-helper"; import {CompilerOptions, ModuleKind, Project, ScriptTarget} from "ts-morph"; -import {generateEnums} from "./utils/generateEnums"; -import {generateModels} from "./utils/generateModels"; -import {generateClientIndex} from "./utils/generateClientIndex"; -import {generateInterfaces} from "./utils/generateInterfaces"; -import {generateIndex} from "./utils/generateIndex"; -import {generatePrismaService} from "./utils/generatePrismaService"; -import {generateRepositories} from "./utils/generateRepositories"; -import {saveProject} from "./utils/saveProject"; +import {generateEnums} from "./utils/generateEnums.js"; +import {generateModels} from "./utils/generateModels.js"; +import {generateClientIndex} from "./utils/generateClientIndex.js"; +import {generateInterfaces} from "./utils/generateInterfaces.js"; +import {generateIndex} from "./utils/generateIndex.js"; +import {generatePrismaService} from "./utils/generatePrismaService.js"; +import {generateRepositories} from "./utils/generateRepositories.js"; +import {saveProject} from "./utils/saveProject.js"; const baseCompilerOptions: CompilerOptions = { target: ScriptTarget.ES2019, diff --git a/packages/orm/prisma/src/generator/transform/transformEnumsToEnums.spec.ts b/packages/orm/prisma/src/generator/transform/transformEnumsToEnums.spec.ts index 691094a5cac..b012e2cb99b 100644 --- a/packages/orm/prisma/src/generator/transform/transformEnumsToEnums.spec.ts +++ b/packages/orm/prisma/src/generator/transform/transformEnumsToEnums.spec.ts @@ -1,5 +1,5 @@ -import {transformEnumsToEnums} from "./transformEnumsToEnums"; -import {DmmfEnum} from "../domain/DmmfEnum"; +import {transformEnumsToEnums} from "./transformEnumsToEnums.js"; +import {DmmfEnum} from "../domain/DmmfEnum.js"; describe("transformEnumsToEnums()", () => { it("should transform Prisma Enum to a TS Enum", () => { diff --git a/packages/orm/prisma/src/generator/transform/transformEnumsToEnums.ts b/packages/orm/prisma/src/generator/transform/transformEnumsToEnums.ts index da7f3bbad83..e23eae40bb4 100644 --- a/packages/orm/prisma/src/generator/transform/transformEnumsToEnums.ts +++ b/packages/orm/prisma/src/generator/transform/transformEnumsToEnums.ts @@ -1,5 +1,5 @@ import {EnumMemberStructure, OptionalKind, StatementStructures, StructureKind} from "ts-morph"; -import {DmmfEnum} from "../domain/DmmfEnum"; +import {DmmfEnum} from "../domain/DmmfEnum.js"; export function transformEnumsToEnums(enumModel: DmmfEnum): StatementStructures { const members: OptionalKind[] = enumModel.values.map((value) => { diff --git a/packages/orm/prisma/src/generator/transform/transformFieldToDecorators.spec.ts b/packages/orm/prisma/src/generator/transform/transformFieldToDecorators.spec.ts index 1785ad4b9d6..ee59a4ad720 100644 --- a/packages/orm/prisma/src/generator/transform/transformFieldToDecorators.spec.ts +++ b/packages/orm/prisma/src/generator/transform/transformFieldToDecorators.spec.ts @@ -1,7 +1,7 @@ -import {createDmmfFieldFixture} from "../../__mock__/createDmmfFieldFixture"; -import {PrismaScalars} from "../domain/ScalarTsTypes"; -import {createContextFixture} from "../../__mock__/createContextFixture"; -import {transformFieldToDecorators} from "./transformFieldToDecorators"; +import {createDmmfFieldFixture} from "../../__mock__/createDmmfFieldFixture.js"; +import {PrismaScalars} from "../domain/ScalarTsTypes.js"; +import {createContextFixture} from "../../__mock__/createContextFixture.js"; +import {transformFieldToDecorators} from "./transformFieldToDecorators.js"; describe("transformFieldToDecorators()", () => { it("should transform String to decorator", () => { diff --git a/packages/orm/prisma/src/generator/transform/transformFieldToDecorators.ts b/packages/orm/prisma/src/generator/transform/transformFieldToDecorators.ts index c49d811f86c..880aef218de 100644 --- a/packages/orm/prisma/src/generator/transform/transformFieldToDecorators.ts +++ b/packages/orm/prisma/src/generator/transform/transformFieldToDecorators.ts @@ -1,9 +1,9 @@ import {DecoratorStructure, StructureKind} from "ts-morph"; -import {DmmfField} from "../domain/DmmfField"; -import {DmmfModel} from "../domain/DmmfModel"; -import {ScalarDecorators, ScalarJsClasses} from "../domain/ScalarTsTypes"; -import {TransformContext} from "../domain/TransformContext"; -import {isCircularRef} from "../utils/isCircularRef"; +import {DmmfField} from "../domain/DmmfField.js"; +import {DmmfModel} from "../domain/DmmfModel.js"; +import {ScalarDecorators, ScalarJsClasses} from "../domain/ScalarTsTypes.js"; +import {TransformContext} from "../domain/TransformContext.js"; +import {isCircularRef} from "../utils/isCircularRef.js"; function createDecorator(name: string, args: string[]): DecoratorStructure { return { diff --git a/packages/orm/prisma/src/generator/transform/transformFieldToProperty.ts b/packages/orm/prisma/src/generator/transform/transformFieldToProperty.ts index c2c69131782..a268901d9a7 100644 --- a/packages/orm/prisma/src/generator/transform/transformFieldToProperty.ts +++ b/packages/orm/prisma/src/generator/transform/transformFieldToProperty.ts @@ -1,8 +1,8 @@ import {PropertyDeclarationStructure, StructureKind} from "ts-morph"; -import {DmmfField} from "../domain/DmmfField"; -import {TransformContext} from "../domain/TransformContext"; -import {transformFieldToDecorators} from "./transformFieldToDecorators"; -import {transformScalarToType} from "./transformScalarToType"; +import {DmmfField} from "../domain/DmmfField.js"; +import {TransformContext} from "../domain/TransformContext.js"; +import {transformFieldToDecorators} from "./transformFieldToDecorators.js"; +import {transformScalarToType} from "./transformScalarToType.js"; export function transformFieldToProperty(field: DmmfField, ctx: TransformContext): PropertyDeclarationStructure { return { diff --git a/packages/orm/prisma/src/generator/transform/transformModelToClass.spec.ts b/packages/orm/prisma/src/generator/transform/transformModelToClass.spec.ts index 8ca67ce9051..9ea61d3e30e 100644 --- a/packages/orm/prisma/src/generator/transform/transformModelToClass.spec.ts +++ b/packages/orm/prisma/src/generator/transform/transformModelToClass.spec.ts @@ -1,7 +1,7 @@ -import {transformModelToClass} from "./transformModelToClass"; -import {DmmfModel} from "../domain/DmmfModel"; -import {createContextFixture} from "../../__mock__/createContextFixture"; -import {createDmmfModelFixture} from "../../__mock__/createDmmfModelFixture"; +import {transformModelToClass} from "./transformModelToClass.js"; +import {DmmfModel} from "../domain/DmmfModel.js"; +import {createContextFixture} from "../../__mock__/createContextFixture.js"; +import {createDmmfModelFixture} from "../../__mock__/createDmmfModelFixture.js"; describe("transformModelToClass()", () => { it("should transform Prisma model to a TS Model (InputType)", () => { diff --git a/packages/orm/prisma/src/generator/transform/transformModelToClass.ts b/packages/orm/prisma/src/generator/transform/transformModelToClass.ts index 4b2b0a1e345..9910c1aba03 100644 --- a/packages/orm/prisma/src/generator/transform/transformModelToClass.ts +++ b/packages/orm/prisma/src/generator/transform/transformModelToClass.ts @@ -1,7 +1,7 @@ import {StatementStructures, StructureKind} from "ts-morph"; -import {DmmfModel} from "../domain/DmmfModel"; -import {TransformContext} from "../domain/TransformContext"; -import {transformFieldToProperty} from "./transformFieldToProperty"; +import {DmmfModel} from "../domain/DmmfModel.js"; +import {TransformContext} from "../domain/TransformContext.js"; +import {transformFieldToProperty} from "./transformFieldToProperty.js"; export function transformModelToClass(model: DmmfModel, ctx: TransformContext): StatementStructures { model.addImportDeclaration("../client", model.name); diff --git a/packages/orm/prisma/src/generator/transform/transformScalarToType.spec.ts b/packages/orm/prisma/src/generator/transform/transformScalarToType.spec.ts index cc1cd608b58..bbf1ad4d735 100644 --- a/packages/orm/prisma/src/generator/transform/transformScalarToType.spec.ts +++ b/packages/orm/prisma/src/generator/transform/transformScalarToType.spec.ts @@ -1,6 +1,6 @@ -import {transformScalarToType} from "./transformScalarToType"; -import {createDmmfFieldFixture} from "../../__mock__/createDmmfFieldFixture"; -import {PrismaScalars} from "../domain/ScalarTsTypes"; +import {transformScalarToType} from "./transformScalarToType.js"; +import {createDmmfFieldFixture} from "../../__mock__/createDmmfFieldFixture.js"; +import {PrismaScalars} from "../domain/ScalarTsTypes.js"; describe("transformScalarToType()", () => { it("should transform String to string", () => { diff --git a/packages/orm/prisma/src/generator/transform/transformScalarToType.ts b/packages/orm/prisma/src/generator/transform/transformScalarToType.ts index 6b9f6ace5df..8dde8e7610c 100644 --- a/packages/orm/prisma/src/generator/transform/transformScalarToType.ts +++ b/packages/orm/prisma/src/generator/transform/transformScalarToType.ts @@ -1,7 +1,7 @@ -import {DmmfField} from "../domain/DmmfField"; -import {DmmfModel} from "../domain/DmmfModel"; -import {ScalarTsTypes} from "../domain/ScalarTsTypes"; -import {DmmfEnum} from "../domain/DmmfEnum"; +import {DmmfField} from "../domain/DmmfField.js"; +import {DmmfModel} from "../domain/DmmfModel.js"; +import {ScalarTsTypes} from "../domain/ScalarTsTypes.js"; +import {DmmfEnum} from "../domain/DmmfEnum.js"; export function transformScalarToType(field: DmmfField) { const {isRequired, isNullable, type, isList, location, model} = field; diff --git a/packages/orm/prisma/src/generator/utils/generateClientIndex.ts b/packages/orm/prisma/src/generator/utils/generateClientIndex.ts index 7203fc6d704..b61ed41faac 100644 --- a/packages/orm/prisma/src/generator/utils/generateClientIndex.ts +++ b/packages/orm/prisma/src/generator/utils/generateClientIndex.ts @@ -1,6 +1,6 @@ import {Project} from "ts-morph"; import path from "path"; -import {GenerateCodeOptions} from "../generateCode"; +import {GenerateCodeOptions} from "../generateCode.js"; export function generateClientIndex(project: Project, baseDirPath: string, options: GenerateCodeOptions) { const directory = project.createDirectory(path.resolve(baseDirPath, "client")); diff --git a/packages/orm/prisma/src/generator/utils/generateEnums.spec.ts b/packages/orm/prisma/src/generator/utils/generateEnums.spec.ts index 7e27f1dafa8..3445789fa0a 100644 --- a/packages/orm/prisma/src/generator/utils/generateEnums.spec.ts +++ b/packages/orm/prisma/src/generator/utils/generateEnums.spec.ts @@ -1,7 +1,7 @@ -import {createProjectFixture} from "../../__mock__/createProjectFixture"; -import {generateModels} from "./generateModels"; -import {createDmmfFixture} from "../../__mock__/createDmmfFixture"; -import {generateEnums} from "./generateEnums"; +import {createProjectFixture} from "../../__mock__/createProjectFixture.js"; +import {generateModels} from "./generateModels.js"; +import {createDmmfFixture} from "../../__mock__/createDmmfFixture.js"; +import {generateEnums} from "./generateEnums.js"; describe("generateEnums", () => { it("should generate filese", () => { diff --git a/packages/orm/prisma/src/generator/utils/generateEnums.ts b/packages/orm/prisma/src/generator/utils/generateEnums.ts index acfa7dedfc9..85fb70e0790 100644 --- a/packages/orm/prisma/src/generator/utils/generateEnums.ts +++ b/packages/orm/prisma/src/generator/utils/generateEnums.ts @@ -1,11 +1,11 @@ import {DMMF} from "@prisma/generator-helper"; import {Project} from "ts-morph"; import {toMap} from "@tsed/core"; -import {DmmfEnum} from "../domain/DmmfEnum"; +import {DmmfEnum} from "../domain/DmmfEnum.js"; import path from "path"; -import {generateDocuments} from "./generateDocuments"; -import {transformEnumsToEnums} from "../transform/transformEnumsToEnums"; -import {generateOutputsBarrelFile} from "./generateOutputsBarrelFile"; +import {generateDocuments} from "./generateDocuments.js"; +import {transformEnumsToEnums} from "../transform/transformEnumsToEnums.js"; +import {generateOutputsBarrelFile} from "./generateOutputsBarrelFile.js"; export function generateEnums(dmmf: DMMF.Document, project: Project, baseDirPath: string): boolean { const enumsMap = toMap(dmmf.datamodel.enums, "name"); diff --git a/packages/orm/prisma/src/generator/utils/generateModels.spec.ts b/packages/orm/prisma/src/generator/utils/generateModels.spec.ts index 4ffb410e615..eab820d75be 100644 --- a/packages/orm/prisma/src/generator/utils/generateModels.spec.ts +++ b/packages/orm/prisma/src/generator/utils/generateModels.spec.ts @@ -1,6 +1,6 @@ -import {createProjectFixture} from "../../__mock__/createProjectFixture"; -import {generateModels} from "./generateModels"; -import {createDmmfFixture, createDmmfWithTypesFixture} from "../../__mock__/createDmmfFixture"; +import {createProjectFixture} from "../../__mock__/createProjectFixture.js"; +import {generateModels} from "./generateModels.js"; +import {createDmmfFixture, createDmmfWithTypesFixture} from "../../__mock__/createDmmfFixture.js"; describe("generateModels", () => { it("should generate models (post)", () => { diff --git a/packages/orm/prisma/src/generator/utils/generateModels.ts b/packages/orm/prisma/src/generator/utils/generateModels.ts index 632604093f5..6154cb50d2e 100644 --- a/packages/orm/prisma/src/generator/utils/generateModels.ts +++ b/packages/orm/prisma/src/generator/utils/generateModels.ts @@ -2,10 +2,10 @@ import {DMMF} from "@prisma/generator-helper"; import {getValue, toMap} from "@tsed/core"; import path from "path"; import {Project} from "ts-morph"; -import {DmmfModel} from "../domain/DmmfModel"; -import {transformModelToClass} from "../transform/transformModelToClass"; -import {generateDocuments} from "./generateDocuments"; -import {generateOutputsBarrelFile} from "./generateOutputsBarrelFile"; +import {DmmfModel} from "../domain/DmmfModel.js"; +import {transformModelToClass} from "../transform/transformModelToClass.js"; +import {generateDocuments} from "./generateDocuments.js"; +import {generateOutputsBarrelFile} from "./generateOutputsBarrelFile.js"; export function generateModels(dmmf: DMMF.Document, project: Project, baseDirPath: string) { const modelsMap = toMap(getValue(dmmf, "datamodel.models", []), "name"); diff --git a/packages/orm/prisma/src/generator/utils/generatePrismaService.spec.ts b/packages/orm/prisma/src/generator/utils/generatePrismaService.spec.ts index 004a29b0016..f565944a5b9 100644 --- a/packages/orm/prisma/src/generator/utils/generatePrismaService.spec.ts +++ b/packages/orm/prisma/src/generator/utils/generatePrismaService.spec.ts @@ -1,5 +1,5 @@ -import {generatePrismaService} from "./generatePrismaService"; -import {createProjectFixture} from "../../__mock__/createProjectFixture"; +import {generatePrismaService} from "./generatePrismaService.js"; +import {createProjectFixture} from "../../__mock__/createProjectFixture.js"; describe("generatePrismaService", () => { it("should generate prisma service", () => { diff --git a/packages/orm/prisma/src/generator/utils/generateRepositories.ts b/packages/orm/prisma/src/generator/utils/generateRepositories.ts index 0a19fb4a960..3e356985a1a 100644 --- a/packages/orm/prisma/src/generator/utils/generateRepositories.ts +++ b/packages/orm/prisma/src/generator/utils/generateRepositories.ts @@ -4,8 +4,8 @@ import {camelCase, pascalCase} from "change-case"; import path from "path"; import pluralize from "pluralize"; import {ClassDeclaration, Project, Scope} from "ts-morph"; -import {DmmfModel} from "../domain/DmmfModel"; -import {generateOutputsBarrelFile} from "./generateOutputsBarrelFile"; +import {DmmfModel} from "../domain/DmmfModel.js"; +import {generateOutputsBarrelFile} from "./generateOutputsBarrelFile.js"; interface MethodOptions { repository: ClassDeclaration; diff --git a/packages/orm/prisma/src/generator/utils/generateRespositories.spec.ts b/packages/orm/prisma/src/generator/utils/generateRespositories.spec.ts index 2addea51b35..7a8262f35c1 100644 --- a/packages/orm/prisma/src/generator/utils/generateRespositories.spec.ts +++ b/packages/orm/prisma/src/generator/utils/generateRespositories.spec.ts @@ -1,6 +1,6 @@ -import {createProjectFixture} from "../../__mock__/createProjectFixture"; -import {createDmmfFixture} from "../../__mock__/createDmmfFixture"; -import {generateRepositories} from "./generateRepositories"; +import {createProjectFixture} from "../../__mock__/createProjectFixture.js"; +import {createDmmfFixture} from "../../__mock__/createDmmfFixture.js"; +import {generateRepositories} from "./generateRepositories.js"; describe("generateRepositories", () => { it("should generate repositories (user)", () => { diff --git a/packages/orm/prisma/src/generator/utils/isCircularRef.spec.ts b/packages/orm/prisma/src/generator/utils/isCircularRef.spec.ts index d5b2faa7df0..7b3b32136e5 100644 --- a/packages/orm/prisma/src/generator/utils/isCircularRef.spec.ts +++ b/packages/orm/prisma/src/generator/utils/isCircularRef.spec.ts @@ -1,5 +1,5 @@ -import {isCircularRef} from "./isCircularRef"; -import {createContextFixture} from "../../__mock__/createContextFixture"; +import {isCircularRef} from "./isCircularRef.js"; +import {createContextFixture} from "../../__mock__/createContextFixture.js"; const ctx = createContextFixture(); diff --git a/packages/orm/prisma/src/generator/utils/isCircularRef.ts b/packages/orm/prisma/src/generator/utils/isCircularRef.ts index 7fea29b9118..4723fcc4afa 100644 --- a/packages/orm/prisma/src/generator/utils/isCircularRef.ts +++ b/packages/orm/prisma/src/generator/utils/isCircularRef.ts @@ -1,4 +1,4 @@ -import {TransformContext} from "../domain/TransformContext"; +import {TransformContext} from "../domain/TransformContext.js"; import {DMMF} from "@prisma/generator-helper"; export function isCircularRef(modelName: string, fieldType: string, ctx: TransformContext): boolean { diff --git a/packages/orm/prisma/src/generator/utils/parseDocumentationAttributes.spec.ts b/packages/orm/prisma/src/generator/utils/parseDocumentationAttributes.spec.ts index bd044ea3370..70194d854ed 100644 --- a/packages/orm/prisma/src/generator/utils/parseDocumentationAttributes.spec.ts +++ b/packages/orm/prisma/src/generator/utils/parseDocumentationAttributes.spec.ts @@ -1,4 +1,4 @@ -import {parseDocumentationAttributes} from "./parseDocumentationAttributes"; +import {parseDocumentationAttributes} from "./parseDocumentationAttributes.js"; describe("parseDocumentationAttributes", () => { it("should parse @TsED.Email()", () => { diff --git a/packages/orm/prisma/src/index.ts b/packages/orm/prisma/src/index.ts index e84bb53f889..1c19716ebbf 100644 --- a/packages/orm/prisma/src/index.ts +++ b/packages/orm/prisma/src/index.ts @@ -1 +1 @@ -export * from "./generator"; +export * from "./generator.js"; diff --git a/packages/orm/prisma/test/snapshots/generate_code/enums/index.ts b/packages/orm/prisma/test/snapshots/generate_code/enums/index.ts index a6b89e5435d..c0cec6d56ac 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/enums/index.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/enums/index.ts @@ -1 +1 @@ -export { Role } from "./Role"; +export {Role} from "./Role.js"; diff --git a/packages/orm/prisma/test/snapshots/generate_code/index.ts b/packages/orm/prisma/test/snapshots/generate_code/index.ts index d3f117a9af6..256c5eaf465 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/index.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/index.ts @@ -1,5 +1,5 @@ -export * from "./interfaces"; -export * from "./enums"; -export * from "./models"; -export * from "./services/PrismaService"; -export * from "./repositories"; +export * from "./interfaces.js"; +export * from "./enums.js"; +export * from "./models.js"; +export * from "./services/PrismaService.js"; +export * from "./repositories.js"; diff --git a/packages/orm/prisma/test/snapshots/generate_code/interfaces/index.ts b/packages/orm/prisma/test/snapshots/generate_code/interfaces/index.ts index d144776d1e4..660e6735c4c 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/interfaces/index.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/interfaces/index.ts @@ -1,4 +1,4 @@ -import { Prisma } from "../client"; +import {Prisma} from "../client.js"; declare global { namespace TsED { diff --git a/packages/orm/prisma/test/snapshots/generate_code/models/PostModel.ts b/packages/orm/prisma/test/snapshots/generate_code/models/PostModel.ts index 0174b3721a8..2af63bc0ea4 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/models/PostModel.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/models/PostModel.ts @@ -1,6 +1,6 @@ -import { Post } from "../client"; -import { Integer, Required, Property, Allow } from "@tsed/schema"; -import { UserModel } from "./UserModel"; +import {Post} from "../client.js"; +import {Integer, Required, Property, Allow} from "@tsed/schema"; +import {UserModel} from "./UserModel.js"; export class PostModel implements Post { @Property(Number) @@ -17,4 +17,3 @@ export class PostModel implements Post { @Allow(null) userId: number | null; } - diff --git a/packages/orm/prisma/test/snapshots/generate_code/models/UserModel.ts b/packages/orm/prisma/test/snapshots/generate_code/models/UserModel.ts index d83929c2582..29662cfacf8 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/models/UserModel.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/models/UserModel.ts @@ -1,7 +1,7 @@ -import { User } from "../client"; -import { Integer, Required, Property, Groups, Format, Email, Description, Allow, Enum, CollectionOf } from "@tsed/schema"; -import { Role } from "../enums"; -import { PostModel } from "./PostModel"; +import {User} from "../client.js"; +import {Integer, Required, Property, Groups, Format, Email, Description, Allow, Enum, CollectionOf} from "@tsed/schema"; +import {Role} from "../enums.js"; +import {PostModel} from "./PostModel.js"; export class UserModel implements User { @Property(Number) @@ -62,4 +62,3 @@ export class UserModel implements User { @Required() biography: any; } - diff --git a/packages/orm/prisma/test/snapshots/generate_code/models/index.ts b/packages/orm/prisma/test/snapshots/generate_code/models/index.ts index 3090a3fa09f..280b2c1a4ce 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/models/index.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/models/index.ts @@ -1,2 +1,2 @@ -export { PostModel } from "./PostModel"; -export { UserModel } from "./UserModel"; +export {PostModel} from "./PostModel.js"; +export {UserModel} from "./UserModel.js"; diff --git a/packages/orm/prisma/test/snapshots/generate_code/repositories/PostsRepository.ts b/packages/orm/prisma/test/snapshots/generate_code/repositories/PostsRepository.ts index 187c475c4ad..60c37335fef 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/repositories/PostsRepository.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/repositories/PostsRepository.ts @@ -1,9 +1,9 @@ import {isArray} from "@tsed/core"; import {deserialize} from "@tsed/json-mapper"; import {Injectable, Inject} from "@tsed/di"; -import {PrismaService} from "../services/PrismaService"; -import {Prisma, Post} from "../client"; -import {PostModel} from "../models"; +import {PrismaService} from "../services/PrismaService.js"; +import {Prisma, Post} from "../client.js"; +import {PostModel} from "../models.js"; @Injectable() export class PostsRepository { diff --git a/packages/orm/prisma/test/snapshots/generate_code/repositories/UsersRepository.ts b/packages/orm/prisma/test/snapshots/generate_code/repositories/UsersRepository.ts index 1ea9db4a9c3..830b0010ebd 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/repositories/UsersRepository.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/repositories/UsersRepository.ts @@ -1,9 +1,9 @@ import {isArray} from "@tsed/core"; import {deserialize} from "@tsed/json-mapper"; import {Injectable, Inject} from "@tsed/di"; -import {PrismaService} from "../services/PrismaService"; -import {Prisma, User} from "../client"; -import {UserModel} from "../models"; +import {PrismaService} from "../services/PrismaService.js"; +import {Prisma, User} from "../client.js"; +import {UserModel} from "../models.js"; @Injectable() export class UsersRepository { diff --git a/packages/orm/prisma/test/snapshots/generate_code/repositories/index.ts b/packages/orm/prisma/test/snapshots/generate_code/repositories/index.ts index 9a5bbdda0f3..8e89e41e144 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/repositories/index.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/repositories/index.ts @@ -1,2 +1,2 @@ -export { PostsRepository } from "./PostsRepository"; -export { UsersRepository } from "./UsersRepository"; +export {PostsRepository} from "./PostsRepository.js"; +export {UsersRepository} from "./UsersRepository.js"; diff --git a/packages/orm/prisma/test/snapshots/generate_code/services/PrismaService.ts b/packages/orm/prisma/test/snapshots/generate_code/services/PrismaService.ts index 439315012b5..e49cbca60c6 100644 --- a/packages/orm/prisma/test/snapshots/generate_code/services/PrismaService.ts +++ b/packages/orm/prisma/test/snapshots/generate_code/services/PrismaService.ts @@ -1,6 +1,6 @@ -import { Inject, Injectable, Configuration, OnInit, OnDestroy } from "@tsed/di"; -import { Logger } from "@tsed/logger"; -import { PrismaClient } from "../client"; +import {Inject, Injectable, Configuration, OnInit, OnDestroy} from "@tsed/di"; +import {Logger} from "@tsed/logger"; +import {PrismaClient} from "../client.js"; @Injectable() export class PrismaService extends PrismaClient implements OnInit, OnDestroy { @@ -8,7 +8,7 @@ export class PrismaService extends PrismaClient implements OnInit, OnDestroy { protected logger: Logger; constructor(@Configuration() settings: Configuration) { - super(settings.get('prisma')); + super(settings.get("prisma")); } async $onInit(): Promise { diff --git a/packages/orm/testing-mongoose/readme.md b/packages/orm/testing-mongoose/readme.md index 03a6c8347c5..5c069092317 100644 --- a/packages/orm/testing-mongoose/readme.md +++ b/packages/orm/testing-mongoose/readme.md @@ -49,7 +49,7 @@ import {PlatformExpress} from "@tsed/platform-express"; import {TestMongooseContext} from "@tsed/testing-mongoose"; import {expect} from "chai"; import * as SuperTest from "supertest"; -import {Server} from "../Server"; +import {Server} from "../Server.js"; describe("Rest", () => { // bootstrap your Server to load all endpoints before run your test @@ -87,7 +87,7 @@ import {PlatformExpress} from "@tsed/platform-express"; import {TestMongooseContext} from "@tsed/testing-mongoose"; import {expect} from "chai"; import * as SuperTest from "supertest"; -import {Server} from "../Server"; +import {Server} from "../Server.js"; describe("Rest", () => { // bootstrap your Server to load all endpoints before run your test diff --git a/packages/orm/testing-mongoose/src/index.ts b/packages/orm/testing-mongoose/src/index.ts index 6b94eec15bc..afa6af6414a 100644 --- a/packages/orm/testing-mongoose/src/index.ts +++ b/packages/orm/testing-mongoose/src/index.ts @@ -1 +1 @@ -export * from "./TestMongooseContext"; +export * from "./TestMongooseContext.js"; diff --git a/packages/orm/typeorm/src/TypeORMModule.ts b/packages/orm/typeorm/src/TypeORMModule.ts index 0862d0b9de0..9b8815a9339 100644 --- a/packages/orm/typeorm/src/TypeORMModule.ts +++ b/packages/orm/typeorm/src/TypeORMModule.ts @@ -1,14 +1,17 @@ import {ancestorsOf, isClass, Type} from "@tsed/core"; import {Configuration, InjectorService, OnDestroy, registerProvider} from "@tsed/di"; import {AbstractRepository, ConnectionOptions, ContainedType, getCustomRepository, Repository, useContainer} from "typeorm"; -import {TypeORMService} from "./services/TypeORMService"; +import {TypeORMService} from "./services/TypeORMService.js"; const WHITELIST = [Repository, AbstractRepository]; export class TypeORMModule implements OnDestroy { private settings: ConnectionOptions[]; - constructor(configuration: Configuration, private typeORMService: TypeORMService) { + constructor( + configuration: Configuration, + private typeORMService: TypeORMService + ) { this.settings = configuration.get("typeorm", []); } diff --git a/packages/orm/typeorm/src/index.ts b/packages/orm/typeorm/src/index.ts index 1300020e171..9ea2dad2a5f 100644 --- a/packages/orm/typeorm/src/index.ts +++ b/packages/orm/typeorm/src/index.ts @@ -2,8 +2,8 @@ * @file Automatically generated by barrelsby. */ -export * from "./TypeORMModule"; -export * from "./decorators/useConnection"; -export * from "./interfaces/interfaces"; -export * from "./services/TypeORMService"; -export * from "./utils/createConnection"; +export * from "./TypeORMModule.js"; +export * from "./decorators/useConnection.js"; +export * from "./interfaces/interfaces.js"; +export * from "./services/TypeORMService.js"; +export * from "./utils/createConnection.js"; diff --git a/packages/orm/typeorm/src/services/TypeORMService.spec.ts b/packages/orm/typeorm/src/services/TypeORMService.spec.ts index 0434701d8a7..3fdf6d8513d 100644 --- a/packages/orm/typeorm/src/services/TypeORMService.spec.ts +++ b/packages/orm/typeorm/src/services/TypeORMService.spec.ts @@ -1,6 +1,6 @@ import {PlatformTest} from "@tsed/common"; import {getConnectionManager} from "typeorm"; -import {TypeORMService} from "../index"; +import {TypeORMService} from "../index.js"; jest.mock("typeorm"); diff --git a/packages/orm/typeorm/src/services/TypeORMService.ts b/packages/orm/typeorm/src/services/TypeORMService.ts index d8f9b0156b3..b685859201c 100644 --- a/packages/orm/typeorm/src/services/TypeORMService.ts +++ b/packages/orm/typeorm/src/services/TypeORMService.ts @@ -1,6 +1,6 @@ import {Inject, InjectorService, Service} from "@tsed/di"; import {Connection, ConnectionManager, ConnectionOptions, getConnectionManager} from "typeorm"; -import {createConnection} from "../utils/createConnection"; +import {createConnection} from "../utils/createConnection.js"; @Service() export class TypeORMService { diff --git a/packages/orm/typeorm/src/utils/createConnection.spec.ts b/packages/orm/typeorm/src/utils/createConnection.spec.ts index 5a2777c50fa..0156bc0e5f8 100644 --- a/packages/orm/typeorm/src/utils/createConnection.spec.ts +++ b/packages/orm/typeorm/src/utils/createConnection.spec.ts @@ -1,6 +1,6 @@ import {ConnectionManager, getConnectionManager} from "typeorm"; import * as Connection from "typeorm/connection/Connection"; -import {createConnection} from "./createConnection"; +import {createConnection} from "./createConnection.js"; jest.mock("typeorm", () => { return { diff --git a/packages/orm/typeorm/test/helpers/repository/UserRepository.ts b/packages/orm/typeorm/test/helpers/repository/UserRepository.ts index 08fe920f59f..db279904aa7 100644 --- a/packages/orm/typeorm/test/helpers/repository/UserRepository.ts +++ b/packages/orm/typeorm/test/helpers/repository/UserRepository.ts @@ -1,5 +1,5 @@ import {EntityRepository, Repository} from "typeorm"; -import {User} from "../entity/User"; +import {User} from "../entity/User.js"; @EntityRepository(User) export class UserRepository extends Repository {} diff --git a/packages/orm/typeorm/test/helpers/services/UserService.ts b/packages/orm/typeorm/test/helpers/services/UserService.ts index e04da955ef5..ac188bf552e 100644 --- a/packages/orm/typeorm/test/helpers/services/UserService.ts +++ b/packages/orm/typeorm/test/helpers/services/UserService.ts @@ -1,6 +1,6 @@ import {Inject, Injectable} from "@tsed/di"; -import {UseConnection} from "../../../src"; -import {UserRepository} from "../repository/UserRepository"; +import {UseConnection} from "../../../src/index.js"; +import {UserRepository} from "../repository/UserRepository.js"; @Injectable() export class UserService { @@ -11,5 +11,8 @@ export class UserService { @UseConnection("db2") repo3: UserRepository; - constructor(@UseConnection("db2") public repo4: UserRepository, public repo1: UserRepository) {} + constructor( + @UseConnection("db2") public repo4: UserRepository, + public repo1: UserRepository + ) {} } diff --git a/packages/orm/typeorm/test/integration.spec.ts b/packages/orm/typeorm/test/integration.spec.ts index 836f46bfb14..ab8e8e6d502 100644 --- a/packages/orm/typeorm/test/integration.spec.ts +++ b/packages/orm/typeorm/test/integration.spec.ts @@ -1,9 +1,9 @@ import {PlatformTest} from "@tsed/common"; import {TestMongooseContext} from "@tsed/testing-mongoose"; -import {User} from "./helpers/entity/User"; -import {UserRepository} from "./helpers/repository/UserRepository"; -import {Server} from "./helpers/Server"; -import {UserService} from "./helpers/services/UserService"; +import {User} from "./helpers/entity/User.js"; +import {UserRepository} from "./helpers/repository/UserRepository.js"; +import {Server} from "./helpers/Server.js"; +import {UserService} from "./helpers/services/UserService.js"; describe("TypeORM integration", () => { beforeEach(async () => { diff --git a/packages/perf/readme.md b/packages/perf/readme.md index 9080dc551f1..e4c83e3ebd8 100644 --- a/packages/perf/readme.md +++ b/packages/perf/readme.md @@ -38,7 +38,7 @@ npm install --save @tsed/perf ## Usage ```typescript -import {PerfLogger} from "./index"; +import {PerfLogger} from "./index.js"; const {wrap, start, end, bind, log} = PerfLogger.get("mylogger"); diff --git a/packages/perf/src/domain/Perf.ts b/packages/perf/src/domain/Perf.ts index 7564104304d..3d291162ab0 100644 --- a/packages/perf/src/domain/Perf.ts +++ b/packages/perf/src/domain/Perf.ts @@ -1,5 +1,5 @@ import {isPromise} from "@tsed/core"; -import {fromNow, now} from "../utils/utils"; +import {fromNow, now} from "../utils/utils.js"; export type CallbackWrapper = (...args: any[]) => T; diff --git a/packages/perf/src/domain/PerfLogger.ts b/packages/perf/src/domain/PerfLogger.ts index 28ae95a74c2..932ae6bd357 100644 --- a/packages/perf/src/domain/PerfLogger.ts +++ b/packages/perf/src/domain/PerfLogger.ts @@ -1,6 +1,6 @@ import {classOf, descriptorOf, methodsOf, nameOf} from "@tsed/core"; import chalk from "chalk"; -import {CallbackWrapper, Perf} from "./Perf"; +import {CallbackWrapper, Perf} from "./Perf.js"; const loggers = new Map(); @@ -11,7 +11,10 @@ export class PerfLogger { #perf = new Perf(); #enabled: boolean = false; - constructor(readonly label: string = "perf", readonly levels: LEVELS = {10: "green", 50: "yellow", 100: "red"}) { + constructor( + readonly label: string = "perf", + readonly levels: LEVELS = {10: "green", 50: "yellow", 100: "red"} + ) { this.wrap = this.wrap.bind(this); this.log = this.log.bind(this); this.start = this.start.bind(this); diff --git a/packages/perf/src/index.ts b/packages/perf/src/index.ts index 204f1223f44..57961f2fca0 100644 --- a/packages/perf/src/index.ts +++ b/packages/perf/src/index.ts @@ -1,2 +1,2 @@ -export * from "./domain/PerfLogger"; -export * from "./domain/Perf"; +export * from "./domain/PerfLogger.js"; +export * from "./domain/Perf.js"; diff --git a/packages/platform/common/readme.md b/packages/platform/common/readme.md index dd472bd2e10..013481c921a 100644 --- a/packages/platform/common/readme.md +++ b/packages/platform/common/readme.md @@ -95,7 +95,7 @@ platform like Express. ```typescript import {$log} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; async function bootstrap() { try { @@ -136,8 +136,8 @@ import { Put } from "@tsed/common"; import {BadRequest} from "@tsed/exceptions"; -import {UsersService} from "../services/UsersService"; -import {User} from "../models/User"; +import {UsersService} from "../services/UsersService.js"; +import {User} from "../models/User.js"; @Controller("/users") export class UsersCtrl { diff --git a/packages/platform/common/src/builder/PlatformBuilder.spec.ts b/packages/platform/common/src/builder/PlatformBuilder.spec.ts index afc81187934..2db1dae34f9 100644 --- a/packages/platform/common/src/builder/PlatformBuilder.spec.ts +++ b/packages/platform/common/src/builder/PlatformBuilder.spec.ts @@ -1,15 +1,15 @@ import {catchAsyncError, Type} from "@tsed/core"; import {Configuration, Controller, Injectable, InjectorService, Module} from "@tsed/di"; -import {AfterInit} from "../interfaces/AfterInit"; -import {AfterListen} from "../interfaces/AfterListen"; -import {AfterRoutesInit} from "../interfaces/AfterRoutesInit"; -import {BeforeInit} from "../interfaces/BeforeInit"; -import {BeforeListen} from "../interfaces/BeforeListen"; -import {BeforeRoutesInit} from "../interfaces/BeforeRoutesInit"; -import {OnReady} from "../interfaces/OnReady"; -import {FakeAdapter} from "../services/FakeAdapter"; -import {Platform} from "../services/Platform"; -import {PlatformBuilder} from "./PlatformBuilder"; +import {AfterInit} from "../interfaces/AfterInit.js"; +import {AfterListen} from "../interfaces/AfterListen.js"; +import {AfterRoutesInit} from "../interfaces/AfterRoutesInit.js"; +import {BeforeInit} from "../interfaces/BeforeInit.js"; +import {BeforeListen} from "../interfaces/BeforeListen.js"; +import {BeforeRoutesInit} from "../interfaces/BeforeRoutesInit.js"; +import {OnReady} from "../interfaces/OnReady.js"; +import {FakeAdapter} from "../services/FakeAdapter.js"; +import {Platform} from "../services/Platform.js"; +import {PlatformBuilder} from "./PlatformBuilder.js"; @Controller("/") class RestCtrl {} diff --git a/packages/platform/common/src/builder/PlatformBuilder.ts b/packages/platform/common/src/builder/PlatformBuilder.ts index 20b7796eed2..1e917b1f7e1 100644 --- a/packages/platform/common/src/builder/PlatformBuilder.ts +++ b/packages/platform/common/src/builder/PlatformBuilder.ts @@ -6,18 +6,18 @@ import type {IncomingMessage, ServerResponse} from "http"; import Http from "http"; import Http2 from "http2"; import type Https from "https"; -import {PlatformStaticsSettings} from "../config/interfaces/PlatformStaticsSettings"; -import {PlatformRouteDetails} from "../domain/PlatformRouteDetails"; -import {Route} from "../interfaces/Route"; -import {Platform} from "../services/Platform"; -import {PlatformAdapter, PlatformBuilderSettings} from "../services/PlatformAdapter"; -import {PlatformApplication} from "../services/PlatformApplication"; -import {closeServer} from "../utils/closeServer"; -import {createInjector} from "../utils/createInjector"; -import {CreateServerReturn} from "../utils/createServer"; -import {getConfiguration} from "../utils/getConfiguration"; -import {getStaticsOptions} from "../utils/getStaticsOptions"; -import {printRoutes} from "../utils/printRoutes"; +import {PlatformStaticsSettings} from "../config/interfaces/PlatformStaticsSettings.js"; +import {PlatformRouteDetails} from "../domain/PlatformRouteDetails.js"; +import {Route} from "../interfaces/Route.js"; +import {Platform} from "../services/Platform.js"; +import {PlatformAdapter, PlatformBuilderSettings} from "../services/PlatformAdapter.js"; +import {PlatformApplication} from "../services/PlatformApplication.js"; +import {closeServer} from "../utils/closeServer.js"; +import {createInjector} from "../utils/createInjector.js"; +import {CreateServerReturn} from "../utils/createServer.js"; +import {getConfiguration} from "../utils/getConfiguration.js"; +import {getStaticsOptions} from "../utils/getStaticsOptions.js"; +import {printRoutes} from "../utils/printRoutes.js"; /** * @platform diff --git a/packages/platform/common/src/config/services/PlatformConfiguration.spec.ts b/packages/platform/common/src/config/services/PlatformConfiguration.spec.ts index 71bb04b49c7..c2c7d2beccd 100644 --- a/packages/platform/common/src/config/services/PlatformConfiguration.spec.ts +++ b/packages/platform/common/src/config/services/PlatformConfiguration.spec.ts @@ -1,6 +1,6 @@ import {Env} from "@tsed/core"; import {ProviderScope, ProviderType} from "@tsed/di"; -import {PlatformConfiguration} from "./PlatformConfiguration"; +import {PlatformConfiguration} from "./PlatformConfiguration.js"; describe("PlatformConfiguration", () => { let settings: any; diff --git a/packages/platform/common/src/config/services/PlatformConfiguration.ts b/packages/platform/common/src/config/services/PlatformConfiguration.ts index 3fb6ac0e573..da995b917fc 100644 --- a/packages/platform/common/src/config/services/PlatformConfiguration.ts +++ b/packages/platform/common/src/config/services/PlatformConfiguration.ts @@ -2,7 +2,7 @@ import {getHostInfoFromPort, isBoolean} from "@tsed/core"; import {DIConfiguration, Injectable, ProviderScope, TokenProvider} from "@tsed/di"; import {JsonMapperSettings} from "@tsed/json-mapper"; import Https from "https"; -import {PlatformJsonMapperSettings} from "../interfaces/PlatformJsonMapperSettings"; +import {PlatformJsonMapperSettings} from "../interfaces/PlatformJsonMapperSettings.js"; const rootDir = process.cwd(); diff --git a/packages/platform/common/src/decorators/PlatformProvider.ts b/packages/platform/common/src/decorators/PlatformProvider.ts index c539f53ce45..bc7c6d40b85 100644 --- a/packages/platform/common/src/decorators/PlatformProvider.ts +++ b/packages/platform/common/src/decorators/PlatformProvider.ts @@ -1,6 +1,6 @@ import {Type} from "@tsed/core"; -import {PlatformAdapter} from "../services/PlatformAdapter"; -import {registerPlatformAdapter} from "../utils/registerPlatformAdapter"; +import {PlatformAdapter} from "../services/PlatformAdapter.js"; +import {registerPlatformAdapter} from "../utils/registerPlatformAdapter.js"; export function PlatformProvider() { return (klass: Type) => { diff --git a/packages/platform/common/src/decorators/multer/multerFileSize.spec.ts b/packages/platform/common/src/decorators/multer/multerFileSize.spec.ts index 1af88a7eb15..605f7533078 100644 --- a/packages/platform/common/src/decorators/multer/multerFileSize.spec.ts +++ b/packages/platform/common/src/decorators/multer/multerFileSize.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {PlatformMulterMiddleware} from "../../middlewares/PlatformMulterMiddleware"; -import {MulterFileSize} from "./multerFileSize"; +import {PlatformMulterMiddleware} from "../../middlewares/PlatformMulterMiddleware.js"; +import {MulterFileSize} from "./multerFileSize.js"; describe("MulterFileSize", () => { it("should set the file size", () => { diff --git a/packages/platform/common/src/decorators/multer/multerFileSize.ts b/packages/platform/common/src/decorators/multer/multerFileSize.ts index 6971bb3b4a4..f3a720b58a5 100644 --- a/packages/platform/common/src/decorators/multer/multerFileSize.ts +++ b/packages/platform/common/src/decorators/multer/multerFileSize.ts @@ -1,4 +1,4 @@ -import {MulterOptions} from "./multerOptions"; +import {MulterOptions} from "./multerOptions.js"; /** * Define file size limit. diff --git a/packages/platform/common/src/decorators/multer/multerOptions.spec.ts b/packages/platform/common/src/decorators/multer/multerOptions.spec.ts index cc5e7c94a48..736889089fb 100644 --- a/packages/platform/common/src/decorators/multer/multerOptions.spec.ts +++ b/packages/platform/common/src/decorators/multer/multerOptions.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {PlatformMulterMiddleware} from "../../middlewares/PlatformMulterMiddleware"; -import {MulterOptions} from "./multerOptions"; +import {PlatformMulterMiddleware} from "../../middlewares/PlatformMulterMiddleware.js"; +import {MulterOptions} from "./multerOptions.js"; describe("@MulterOptions()", () => { it("should store metadata", () => { diff --git a/packages/platform/common/src/decorators/multer/multerOptions.ts b/packages/platform/common/src/decorators/multer/multerOptions.ts index 3a47f7d3a0e..2f24196e31a 100644 --- a/packages/platform/common/src/decorators/multer/multerOptions.ts +++ b/packages/platform/common/src/decorators/multer/multerOptions.ts @@ -1,6 +1,6 @@ import {StoreMerge} from "@tsed/core"; -import {PlatformMulterSettings} from "../../config/interfaces/PlatformMulterSettings"; -import {PlatformMulterMiddleware} from "../../middlewares/PlatformMulterMiddleware"; +import {PlatformMulterSettings} from "../../config/interfaces/PlatformMulterSettings.js"; +import {PlatformMulterMiddleware} from "../../middlewares/PlatformMulterMiddleware.js"; /** * Define multer option for all MultipartFile diff --git a/packages/platform/common/src/decorators/multer/multipartFile.spec.ts b/packages/platform/common/src/decorators/multer/multipartFile.spec.ts index 3466b29fe01..2f731e45e25 100644 --- a/packages/platform/common/src/decorators/multer/multipartFile.spec.ts +++ b/packages/platform/common/src/decorators/multer/multipartFile.spec.ts @@ -2,8 +2,8 @@ import {descriptorOf, Metadata, Store} from "@tsed/core"; import {ParamTypes} from "@tsed/platform-params"; import {getSpec, JsonParameterStore, Post, SpecTypes} from "@tsed/schema"; import "../../index"; -import {PlatformMulterMiddleware} from "../../middlewares/PlatformMulterMiddleware"; -import {MultipartFile} from "./multipartFile"; +import {PlatformMulterMiddleware} from "../../middlewares/PlatformMulterMiddleware.js"; +import {MultipartFile} from "./multipartFile.js"; class Test { test() {} diff --git a/packages/platform/common/src/decorators/multer/multipartFile.ts b/packages/platform/common/src/decorators/multer/multipartFile.ts index 8e461825139..7721d51bcbc 100644 --- a/packages/platform/common/src/decorators/multer/multipartFile.ts +++ b/packages/platform/common/src/decorators/multer/multipartFile.ts @@ -1,8 +1,8 @@ import {DecoratorParameters, Metadata, StoreMerge, useDecorators, useMethodDecorators} from "@tsed/core"; import {ParamTypes, UseParam} from "@tsed/platform-params"; import {InFile} from "@tsed/schema"; -import {PlatformMulterFile} from "../../config/interfaces/PlatformMulterSettings"; -import {MulterInputOptions, PlatformMulterMiddleware} from "../../middlewares/PlatformMulterMiddleware"; +import {PlatformMulterFile} from "../../config/interfaces/PlatformMulterSettings.js"; +import {MulterInputOptions, PlatformMulterMiddleware} from "../../middlewares/PlatformMulterMiddleware.js"; function mapOptions(name: string, maxCount: number | undefined): MulterInputOptions { return { diff --git a/packages/platform/common/src/decorators/params/error.spec.ts b/packages/platform/common/src/decorators/params/error.spec.ts index fa9f99ba6b8..1d137accee6 100644 --- a/packages/platform/common/src/decorators/params/error.spec.ts +++ b/packages/platform/common/src/decorators/params/error.spec.ts @@ -1,5 +1,5 @@ import {ParamTypes} from "@tsed/platform-params"; -import {Err} from "./error"; +import {Err} from "./error.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@Err", () => { diff --git a/packages/platform/common/src/decorators/params/next.spec.ts b/packages/platform/common/src/decorators/params/next.spec.ts index 0b6ab8c9af0..af659627ef8 100644 --- a/packages/platform/common/src/decorators/params/next.spec.ts +++ b/packages/platform/common/src/decorators/params/next.spec.ts @@ -1,6 +1,6 @@ import {ParamTypes} from "@tsed/platform-params"; import {JsonParameterStore} from "@tsed/schema"; -import {Next} from "./next"; +import {Next} from "./next.js"; describe("@Next", () => { it("should register a new parameter instance with the correct property", () => { diff --git a/packages/platform/common/src/decorators/params/request.spec.ts b/packages/platform/common/src/decorators/params/request.spec.ts index 7d23c3c58df..5fd742c828c 100644 --- a/packages/platform/common/src/decorators/params/request.spec.ts +++ b/packages/platform/common/src/decorators/params/request.spec.ts @@ -1,7 +1,7 @@ import {ParamTypes} from "@tsed/platform-params"; import {IncomingMessage} from "http"; -import {PlatformRequest} from "../../services/PlatformRequest"; -import {Req, Request} from "./request"; +import {PlatformRequest} from "../../services/PlatformRequest.js"; +import {Req, Request} from "./request.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@Req", () => { diff --git a/packages/platform/common/src/decorators/params/response.spec.ts b/packages/platform/common/src/decorators/params/response.spec.ts index 6bf868406e6..ceede257417 100644 --- a/packages/platform/common/src/decorators/params/response.spec.ts +++ b/packages/platform/common/src/decorators/params/response.spec.ts @@ -1,7 +1,7 @@ import {ParamTypes} from "@tsed/platform-params"; import {ServerResponse} from "http"; -import {PlatformResponse} from "../../services/PlatformResponse"; -import {Res, Response} from "./response"; +import {PlatformResponse} from "../../services/PlatformResponse.js"; +import {Res, Response} from "./response.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@Res", () => { diff --git a/packages/platform/common/src/domain/AnyToPromiseWithCtx.spec.ts b/packages/platform/common/src/domain/AnyToPromiseWithCtx.spec.ts index 09466bf5080..7ed7d7c5879 100644 --- a/packages/platform/common/src/domain/AnyToPromiseWithCtx.spec.ts +++ b/packages/platform/common/src/domain/AnyToPromiseWithCtx.spec.ts @@ -1,5 +1,5 @@ -import {PlatformTest} from "../services/PlatformTest"; -import {AnyToPromiseWithCtx} from "./AnyToPromiseWithCtx"; +import {PlatformTest} from "../services/PlatformTest.js"; +import {AnyToPromiseWithCtx} from "./AnyToPromiseWithCtx.js"; describe("AnyToPromiseWithCtx", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/platform/common/src/domain/AnyToPromiseWithCtx.ts b/packages/platform/common/src/domain/AnyToPromiseWithCtx.ts index 145f7634c0a..e4e1e010b66 100644 --- a/packages/platform/common/src/domain/AnyToPromiseWithCtx.ts +++ b/packages/platform/common/src/domain/AnyToPromiseWithCtx.ts @@ -1,5 +1,5 @@ import {AnyPromiseResult, AnyToPromise} from "@tsed/core"; -import {PlatformContext} from "./PlatformContext"; +import {PlatformContext} from "./PlatformContext.js"; export class AnyToPromiseWithCtx extends AnyToPromise { public $ctx: PlatformContext; diff --git a/packages/platform/common/src/domain/PlatformContext.spec.ts b/packages/platform/common/src/domain/PlatformContext.spec.ts index dc3617b1982..20f5ef57f1c 100644 --- a/packages/platform/common/src/domain/PlatformContext.spec.ts +++ b/packages/platform/common/src/domain/PlatformContext.spec.ts @@ -1,7 +1,7 @@ import {nameOf} from "@tsed/core"; -import {PlatformApplication} from "../services/PlatformApplication"; -import {PlatformTest} from "../services/PlatformTest"; -import {PlatformContext} from "./PlatformContext"; +import {PlatformApplication} from "../services/PlatformApplication.js"; +import {PlatformTest} from "../services/PlatformTest.js"; +import {PlatformContext} from "./PlatformContext.js"; describe("PlatformContext", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/platform/common/src/domain/PlatformContext.ts b/packages/platform/common/src/domain/PlatformContext.ts index e141287c6c3..6277b605d68 100644 --- a/packages/platform/common/src/domain/PlatformContext.ts +++ b/packages/platform/common/src/domain/PlatformContext.ts @@ -2,10 +2,10 @@ import {DIContext, DIContextOptions} from "@tsed/di"; import {PlatformHandlerMetadata} from "@tsed/platform-router"; import {EndpointMetadata} from "@tsed/schema"; import {IncomingMessage, ServerResponse} from "http"; -import {IncomingEvent} from "../interfaces/IncomingEvent"; -import {PlatformApplication} from "../services/PlatformApplication"; -import {PlatformRequest} from "../services/PlatformRequest"; -import {PlatformResponse} from "../services/PlatformResponse"; +import {IncomingEvent} from "../interfaces/IncomingEvent.js"; +import {PlatformApplication} from "../services/PlatformApplication.js"; +import {PlatformRequest} from "../services/PlatformRequest.js"; +import {PlatformResponse} from "../services/PlatformResponse.js"; declare global { namespace TsED { diff --git a/packages/platform/common/src/index.ts b/packages/platform/common/src/index.ts index 3f1d211b239..fb15868c02f 100644 --- a/packages/platform/common/src/index.ts +++ b/packages/platform/common/src/index.ts @@ -2,63 +2,63 @@ * @file Automatically generated by barrelsby. */ -export * from "./exports"; -export * from "./builder/PlatformBuilder"; -export * from "./config/interfaces/PlatformJsonMapperSettings"; -export * from "./config/interfaces/PlatformLoggerSettings"; -export * from "./config/interfaces/PlatformMulterSettings"; -export * from "./config/interfaces/PlatformRouterSettings"; -export * from "./config/interfaces/PlatformStaticsSettings"; -export * from "./config/services/PlatformConfiguration"; -export * from "./constants/routerOptions"; -export * from "./decorators/PlatformProvider"; -export * from "./decorators/multer/multerFileSize"; -export * from "./decorators/multer/multerOptions"; -export * from "./decorators/multer/multipartFile"; -export * from "./decorators/params/error"; -export * from "./decorators/params/next"; -export * from "./decorators/params/request"; -export * from "./decorators/params/response"; -export * from "./domain/AnyToPromiseWithCtx"; -export * from "./domain/EndpointMetadata"; -export * from "./domain/PlatformContext"; -export * from "./domain/PlatformRouteDetails"; -export * from "./interfaces/AfterInit"; -export * from "./interfaces/AfterListen"; -export * from "./interfaces/AfterRoutesInit"; -export * from "./interfaces/BeforeInit"; -export * from "./interfaces/BeforeListen"; -export * from "./interfaces/BeforeRoutesInit"; -export * from "./interfaces/HandlerType"; -export * from "./interfaces/IncomingEvent"; -export * from "./interfaces/OnReady"; -export * from "./interfaces/OnRequest"; -export * from "./interfaces/OnResponse"; -export * from "./interfaces/OnRoutesInit"; -export * from "./interfaces/PlatformRouteOptions"; -export * from "./interfaces/ResponseErrorObject"; -export * from "./interfaces/Route"; -export * from "./middlewares/PlatformAcceptMimesMiddleware"; -export * from "./middlewares/PlatformMulterMiddleware"; -export * from "./services/FakeAdapter"; -export * from "./services/Platform"; -export * from "./services/PlatformAdapter"; -export * from "./services/PlatformApplication"; -export * from "./services/PlatformHandler"; -export * from "./services/PlatformMiddlewaresChain"; -export * from "./services/PlatformRequest"; -export * from "./services/PlatformResponse"; -export * from "./services/PlatformTest"; -export * from "./utils/closeServer"; -export * from "./utils/createContext"; -export * from "./utils/createHttpServer"; -export * from "./utils/createHttpsServer"; -export * from "./utils/createInjector"; -export * from "./utils/createServer"; -export * from "./utils/ensureContext"; -export * from "./utils/getStaticsOptions"; -export * from "./utils/listenServer"; -export * from "./utils/mapReturnedResponse"; -export * from "./utils/printRoutes"; -export * from "./utils/registerPlatformAdapter"; -export * from "./utils/setResponseHeaders"; +export * from "./exports.js"; +export * from "./builder/PlatformBuilder.js"; +export * from "./config/interfaces/PlatformJsonMapperSettings.js"; +export * from "./config/interfaces/PlatformLoggerSettings.js"; +export * from "./config/interfaces/PlatformMulterSettings.js"; +export * from "./config/interfaces/PlatformRouterSettings.js"; +export * from "./config/interfaces/PlatformStaticsSettings.js"; +export * from "./config/services/PlatformConfiguration.js"; +export * from "./constants/routerOptions.js"; +export * from "./decorators/PlatformProvider.js"; +export * from "./decorators/multer/multerFileSize.js"; +export * from "./decorators/multer/multerOptions.js"; +export * from "./decorators/multer/multipartFile.js"; +export * from "./decorators/params/error.js"; +export * from "./decorators/params/next.js"; +export * from "./decorators/params/request.js"; +export * from "./decorators/params/response.js"; +export * from "./domain/AnyToPromiseWithCtx.js"; +export * from "./domain/EndpointMetadata.js"; +export * from "./domain/PlatformContext.js"; +export * from "./domain/PlatformRouteDetails.js"; +export * from "./interfaces/AfterInit.js"; +export * from "./interfaces/AfterListen.js"; +export * from "./interfaces/AfterRoutesInit.js"; +export * from "./interfaces/BeforeInit.js"; +export * from "./interfaces/BeforeListen.js"; +export * from "./interfaces/BeforeRoutesInit.js"; +export * from "./interfaces/HandlerType.js"; +export * from "./interfaces/IncomingEvent.js"; +export * from "./interfaces/OnReady.js"; +export * from "./interfaces/OnRequest.js"; +export * from "./interfaces/OnResponse.js"; +export * from "./interfaces/OnRoutesInit.js"; +export * from "./interfaces/PlatformRouteOptions.js"; +export * from "./interfaces/ResponseErrorObject.js"; +export * from "./interfaces/Route.js"; +export * from "./middlewares/PlatformAcceptMimesMiddleware.js"; +export * from "./middlewares/PlatformMulterMiddleware.js"; +export * from "./services/FakeAdapter.js"; +export * from "./services/Platform.js"; +export * from "./services/PlatformAdapter.js"; +export * from "./services/PlatformApplication.js"; +export * from "./services/PlatformHandler.js"; +export * from "./services/PlatformMiddlewaresChain.js"; +export * from "./services/PlatformRequest.js"; +export * from "./services/PlatformResponse.js"; +export * from "./services/PlatformTest.js"; +export * from "./utils/closeServer.js"; +export * from "./utils/createContext.js"; +export * from "./utils/createHttpServer.js"; +export * from "./utils/createHttpsServer.js"; +export * from "./utils/createInjector.js"; +export * from "./utils/createServer.js"; +export * from "./utils/ensureContext.js"; +export * from "./utils/getStaticsOptions.js"; +export * from "./utils/listenServer.js"; +export * from "./utils/mapReturnedResponse.js"; +export * from "./utils/printRoutes.js"; +export * from "./utils/registerPlatformAdapter.js"; +export * from "./utils/setResponseHeaders.js"; diff --git a/packages/platform/common/src/interfaces/OnRequest.ts b/packages/platform/common/src/interfaces/OnRequest.ts index 42257075f14..65fc15633a6 100644 --- a/packages/platform/common/src/interfaces/OnRequest.ts +++ b/packages/platform/common/src/interfaces/OnRequest.ts @@ -1,4 +1,4 @@ -import {PlatformContext} from "../domain/PlatformContext"; +import {PlatformContext} from "../domain/PlatformContext.js"; export interface OnRequest { $onRequest(ctx: PlatformContext): void; diff --git a/packages/platform/common/src/interfaces/OnResponse.ts b/packages/platform/common/src/interfaces/OnResponse.ts index 6ea3ea4d767..f069bedfd20 100644 --- a/packages/platform/common/src/interfaces/OnResponse.ts +++ b/packages/platform/common/src/interfaces/OnResponse.ts @@ -1,4 +1,4 @@ -import {PlatformResponse} from "../services/PlatformResponse"; +import {PlatformResponse} from "../services/PlatformResponse.js"; export interface OnResponse { $onResponse(ctx: PlatformResponse): void; diff --git a/packages/platform/common/src/middlewares/PlatformAcceptMimesMiddleware.spec.ts b/packages/platform/common/src/middlewares/PlatformAcceptMimesMiddleware.spec.ts index c07e3575905..b3c6bfae2fd 100644 --- a/packages/platform/common/src/middlewares/PlatformAcceptMimesMiddleware.spec.ts +++ b/packages/platform/common/src/middlewares/PlatformAcceptMimesMiddleware.spec.ts @@ -1,8 +1,8 @@ import {catchError} from "@tsed/core"; import {EndpointMetadata, Get} from "@tsed/schema"; -import {AcceptMime} from "../exports"; -import {PlatformTest} from "../services/PlatformTest"; -import {PlatformAcceptMimesMiddleware} from "./PlatformAcceptMimesMiddleware"; +import {AcceptMime} from "../exports.js"; +import {PlatformTest} from "../services/PlatformTest.js"; +import {PlatformAcceptMimesMiddleware} from "./PlatformAcceptMimesMiddleware.js"; describe("PlatformMimesMiddleware", () => { describe("when server has configuration", () => { diff --git a/packages/platform/common/src/middlewares/PlatformMulterMiddleware.spec.ts b/packages/platform/common/src/middlewares/PlatformMulterMiddleware.spec.ts index 319d1438535..f5e6167d009 100644 --- a/packages/platform/common/src/middlewares/PlatformMulterMiddleware.spec.ts +++ b/packages/platform/common/src/middlewares/PlatformMulterMiddleware.spec.ts @@ -1,12 +1,12 @@ import {Exception} from "@tsed/exceptions"; import {MulterError} from "multer"; import {catchAsyncError} from "@tsed/core"; -import {MulterOptions} from "../decorators/multer/multerOptions"; -import {MultipartFile} from "../decorators/multer/multipartFile"; -import {EndpointMetadata} from "../domain/EndpointMetadata"; -import {PlatformApplication} from "../services/PlatformApplication"; -import {PlatformTest} from "../services/PlatformTest"; -import {PlatformMulterMiddleware} from "./PlatformMulterMiddleware"; +import {MulterOptions} from "../decorators/multer/multerOptions.js"; +import {MultipartFile} from "../decorators/multer/multipartFile.js"; +import {EndpointMetadata} from "../domain/EndpointMetadata.js"; +import {PlatformApplication} from "../services/PlatformApplication.js"; +import {PlatformTest} from "../services/PlatformTest.js"; +import {PlatformMulterMiddleware} from "./PlatformMulterMiddleware.js"; async function build(options = {}) { class Test { diff --git a/packages/platform/common/src/middlewares/PlatformMulterMiddleware.ts b/packages/platform/common/src/middlewares/PlatformMulterMiddleware.ts index 18d5cc6aad1..338c6dd2971 100644 --- a/packages/platform/common/src/middlewares/PlatformMulterMiddleware.ts +++ b/packages/platform/common/src/middlewares/PlatformMulterMiddleware.ts @@ -3,9 +3,9 @@ import {BadRequest} from "@tsed/exceptions"; import {Middleware, MiddlewareMethods} from "@tsed/platform-middlewares"; import {Context} from "@tsed/platform-params"; import type {MulterError} from "multer"; -import {PlatformMulterField, PlatformMulterSettings} from "../config/interfaces/PlatformMulterSettings"; -import {PlatformContext} from "../domain/PlatformContext"; -import {PlatformApplication} from "../services/PlatformApplication"; +import {PlatformMulterField, PlatformMulterSettings} from "../config/interfaces/PlatformMulterSettings.js"; +import {PlatformContext} from "../domain/PlatformContext.js"; +import {PlatformApplication} from "../services/PlatformApplication.js"; export interface MulterInputOptions { fields: PlatformMulterField[]; diff --git a/packages/platform/common/src/services/FakeAdapter.ts b/packages/platform/common/src/services/FakeAdapter.ts index 2a610d2ecb6..c1129bbccbc 100644 --- a/packages/platform/common/src/services/FakeAdapter.ts +++ b/packages/platform/common/src/services/FakeAdapter.ts @@ -1 +1 @@ -export {FakeAdapter} from "./PlatformAdapter"; +export {FakeAdapter} from "./PlatformAdapter.js"; diff --git a/packages/platform/common/src/services/Platform.spec.ts b/packages/platform/common/src/services/Platform.spec.ts index d1b55b9353b..38a6ac022ea 100644 --- a/packages/platform/common/src/services/Platform.spec.ts +++ b/packages/platform/common/src/services/Platform.spec.ts @@ -1,8 +1,8 @@ import {nameOf} from "@tsed/core"; import {Controller} from "@tsed/di"; import {Get, Post} from "@tsed/schema"; -import {Platform} from "./Platform"; -import {PlatformTest} from "./PlatformTest"; +import {Platform} from "./Platform.js"; +import {PlatformTest} from "./PlatformTest.js"; @Controller("/my-route") class MyCtrl { diff --git a/packages/platform/common/src/services/Platform.ts b/packages/platform/common/src/services/Platform.ts index d0c0afde0a0..ab36e1df417 100644 --- a/packages/platform/common/src/services/Platform.ts +++ b/packages/platform/common/src/services/Platform.ts @@ -1,8 +1,8 @@ import {ControllerProvider, Injectable, InjectorService, ProviderScope, TokenProvider} from "@tsed/di"; import {PlatformLayer, PlatformRouters} from "@tsed/platform-router"; -import {Route, RouteController} from "../interfaces/Route"; -import {PlatformApplication} from "./PlatformApplication"; -import {PlatformHandler} from "./PlatformHandler"; +import {Route, RouteController} from "../interfaces/Route.js"; +import {PlatformApplication} from "./PlatformApplication.js"; +import {PlatformHandler} from "./PlatformHandler.js"; /** * `Platform` is used to provide all routes collected by annotation `@Controller`. diff --git a/packages/platform/common/src/services/PlatformAdapter.ts b/packages/platform/common/src/services/PlatformAdapter.ts index 1379d95f322..6a9333afb4d 100644 --- a/packages/platform/common/src/services/PlatformAdapter.ts +++ b/packages/platform/common/src/services/PlatformAdapter.ts @@ -2,13 +2,13 @@ import {Type} from "@tsed/core"; import {InjectorService, ProviderOpts, registerProvider} from "@tsed/di"; import {PlatformContextHandler, PlatformHandlerMetadata, PlatformLayer} from "@tsed/platform-router"; import {IncomingMessage, ServerResponse} from "http"; -import {PlatformMulter, PlatformMulterSettings} from "../config/interfaces/PlatformMulterSettings"; -import {PlatformStaticsOptions} from "../config/interfaces/PlatformStaticsSettings"; -import {PlatformContext} from "../domain/PlatformContext"; -import {createHttpServer} from "../utils/createHttpServer"; -import {createHttpsServer} from "../utils/createHttpsServer"; -import {CreateServerReturn} from "../utils/createServer"; -import type {PlatformApplication} from "./PlatformApplication"; +import {PlatformMulter, PlatformMulterSettings} from "../config/interfaces/PlatformMulterSettings.js"; +import {PlatformStaticsOptions} from "../config/interfaces/PlatformStaticsSettings.js"; +import {PlatformContext} from "../domain/PlatformContext.js"; +import {createHttpServer} from "../utils/createHttpServer.js"; +import {createHttpsServer} from "../utils/createHttpsServer.js"; +import {CreateServerReturn} from "../utils/createServer.js"; +import type {PlatformApplication} from "./PlatformApplication.js"; export abstract class PlatformAdapter { static readonly NAME: string; diff --git a/packages/platform/common/src/services/PlatformApplication.spec.ts b/packages/platform/common/src/services/PlatformApplication.spec.ts index d83b38b4835..ccc5c699859 100644 --- a/packages/platform/common/src/services/PlatformApplication.spec.ts +++ b/packages/platform/common/src/services/PlatformApplication.spec.ts @@ -1,7 +1,7 @@ -import {createContext} from "../utils/createContext"; -import {PlatformApplication} from "./PlatformApplication"; -import {PlatformHandler} from "./PlatformHandler"; -import {PlatformTest} from "./PlatformTest"; +import {createContext} from "../utils/createContext.js"; +import {PlatformApplication} from "./PlatformApplication.js"; +import {PlatformHandler} from "./PlatformHandler.js"; +import {PlatformTest} from "./PlatformTest.js"; jest.mock("../utils/createContext"); diff --git a/packages/platform/common/src/services/PlatformApplication.ts b/packages/platform/common/src/services/PlatformApplication.ts index 05d845432ce..b5a0f5d3f5c 100644 --- a/packages/platform/common/src/services/PlatformApplication.ts +++ b/packages/platform/common/src/services/PlatformApplication.ts @@ -1,8 +1,8 @@ import {Injectable, InjectorService, ProviderScope} from "@tsed/di"; import {PlatformRouter} from "@tsed/platform-router"; import {IncomingMessage, ServerResponse} from "http"; -import {PlatformMulterSettings} from "../config/interfaces/PlatformMulterSettings"; -import {PlatformAdapter} from "./PlatformAdapter"; +import {PlatformMulterSettings} from "../config/interfaces/PlatformMulterSettings.js"; +import {PlatformAdapter} from "./PlatformAdapter.js"; declare global { namespace TsED { @@ -24,7 +24,10 @@ export class PlatformApplication extends PlatformRouter rawApp: App; rawCallback: () => any; - constructor(public adapter: PlatformAdapter, public injector: InjectorService) { + constructor( + public adapter: PlatformAdapter, + public injector: InjectorService + ) { super(injector); const {app, callback} = adapter.createApp(); diff --git a/packages/platform/common/src/services/PlatformHandler.spec.ts b/packages/platform/common/src/services/PlatformHandler.spec.ts index bcae20a6bac..7b723376a01 100644 --- a/packages/platform/common/src/services/PlatformHandler.spec.ts +++ b/packages/platform/common/src/services/PlatformHandler.spec.ts @@ -1,8 +1,8 @@ import {Injectable} from "@tsed/di"; import {PlatformHandlerMetadata, PlatformHandlerType} from "@tsed/platform-router"; import {EndpointMetadata, Get, View} from "@tsed/schema"; -import {PlatformHandler} from "./PlatformHandler"; -import {PlatformTest} from "./PlatformTest"; +import {PlatformHandler} from "./PlatformHandler.js"; +import {PlatformTest} from "./PlatformTest.js"; function getServiceFixture() { const service = PlatformTest.get(PlatformHandler); diff --git a/packages/platform/common/src/services/PlatformHandler.ts b/packages/platform/common/src/services/PlatformHandler.ts index f56f5063d11..cb1b76223b8 100644 --- a/packages/platform/common/src/services/PlatformHandler.ts +++ b/packages/platform/common/src/services/PlatformHandler.ts @@ -11,11 +11,11 @@ import { useResponseHandler } from "@tsed/platform-router"; import {JsonOperationRoute} from "@tsed/schema"; -import {AnyToPromiseWithCtx} from "../domain/AnyToPromiseWithCtx"; -import {PlatformContext} from "../domain/PlatformContext"; -import {setResponseHeaders} from "../utils/setResponseHeaders"; -import {PlatformApplication} from "./PlatformApplication"; -import {PlatformMiddlewaresChain} from "./PlatformMiddlewaresChain"; +import {AnyToPromiseWithCtx} from "../domain/AnyToPromiseWithCtx.js"; +import {PlatformContext} from "../domain/PlatformContext.js"; +import {setResponseHeaders} from "../utils/setResponseHeaders.js"; +import {PlatformApplication} from "./PlatformApplication.js"; +import {PlatformMiddlewaresChain} from "./PlatformMiddlewaresChain.js"; /** * Platform Handler abstraction layer. Wrap original class method to a pure platform handler (Express, Koa, etc...). diff --git a/packages/platform/common/src/services/PlatformMiddlewaresChain.spec.ts b/packages/platform/common/src/services/PlatformMiddlewaresChain.spec.ts index 94664998cc8..2f2d13d8e1d 100644 --- a/packages/platform/common/src/services/PlatformMiddlewaresChain.spec.ts +++ b/packages/platform/common/src/services/PlatformMiddlewaresChain.spec.ts @@ -1,11 +1,11 @@ import {Controller, ControllerProvider} from "@tsed/di"; import {Middleware, Use, UseAuth} from "@tsed/platform-middlewares"; import {AcceptMime, All, EndpointMetadata, Get, getOperationsRoutes, Post} from "@tsed/schema"; -import {MultipartFile} from "../decorators/multer/multipartFile"; -import {PlatformAcceptMimesMiddleware} from "../middlewares/PlatformAcceptMimesMiddleware"; -import {PlatformMulterMiddleware} from "../middlewares/PlatformMulterMiddleware"; -import {PlatformMiddlewaresChain} from "./PlatformMiddlewaresChain"; -import {PlatformTest} from "./PlatformTest"; +import {MultipartFile} from "../decorators/multer/multipartFile.js"; +import {PlatformAcceptMimesMiddleware} from "../middlewares/PlatformAcceptMimesMiddleware.js"; +import {PlatformMulterMiddleware} from "../middlewares/PlatformMulterMiddleware.js"; +import {PlatformMiddlewaresChain} from "./PlatformMiddlewaresChain.js"; +import {PlatformTest} from "./PlatformTest.js"; @Middleware() class MyAuthMiddleware { diff --git a/packages/platform/common/src/services/PlatformMiddlewaresChain.ts b/packages/platform/common/src/services/PlatformMiddlewaresChain.ts index 100da6ff85e..0300d176a6f 100644 --- a/packages/platform/common/src/services/PlatformMiddlewaresChain.ts +++ b/packages/platform/common/src/services/PlatformMiddlewaresChain.ts @@ -3,9 +3,9 @@ import {Constant, Inject, Injectable, InjectorService, TokenProvider} from "@tse import {ParamTypes} from "@tsed/platform-params"; import {AlterEndpointHandlersArg} from "@tsed/platform-router"; import {JsonEntityStore, JsonOperationRoute} from "@tsed/schema"; -import {PlatformAcceptMimesMiddleware} from "../middlewares/PlatformAcceptMimesMiddleware"; -import {PlatformMulterMiddleware} from "../middlewares/PlatformMulterMiddleware"; -import {PlatformAdapter} from "../services/PlatformAdapter"; +import {PlatformAcceptMimesMiddleware} from "../middlewares/PlatformAcceptMimesMiddleware.js"; +import {PlatformMulterMiddleware} from "../middlewares/PlatformMulterMiddleware.js"; +import {PlatformAdapter} from "../services/PlatformAdapter.js"; @Injectable() export class PlatformMiddlewaresChain { diff --git a/packages/platform/common/src/services/PlatformRequest.spec.ts b/packages/platform/common/src/services/PlatformRequest.spec.ts index 26404109715..c745ae8d266 100644 --- a/packages/platform/common/src/services/PlatformRequest.spec.ts +++ b/packages/platform/common/src/services/PlatformRequest.spec.ts @@ -1,6 +1,6 @@ import {PlatformHandlerMetadata} from "@tsed/platform-router"; -import {PlatformRequest} from "./PlatformRequest"; -import {PlatformTest} from "./PlatformTest"; +import {PlatformRequest} from "./PlatformRequest.js"; +import {PlatformTest} from "./PlatformTest.js"; function createRequest() { const $ctx = PlatformTest.createRequestContext(); diff --git a/packages/platform/common/src/services/PlatformRequest.ts b/packages/platform/common/src/services/PlatformRequest.ts index 27eead451e1..3b770db3417 100644 --- a/packages/platform/common/src/services/PlatformRequest.ts +++ b/packages/platform/common/src/services/PlatformRequest.ts @@ -1,7 +1,7 @@ import {Injectable, ProviderScope, Scope} from "@tsed/di"; import {IncomingHttpHeaders, IncomingMessage} from "http"; -import type {PlatformContext} from "../domain/PlatformContext"; -import type {PlatformResponse} from "./PlatformResponse"; +import type {PlatformContext} from "../domain/PlatformContext.js"; +import type {PlatformResponse} from "./PlatformResponse.js"; declare global { namespace TsED { diff --git a/packages/platform/common/src/services/PlatformResponse.spec.ts b/packages/platform/common/src/services/PlatformResponse.spec.ts index 3346248e387..d30fe33f37f 100644 --- a/packages/platform/common/src/services/PlatformResponse.spec.ts +++ b/packages/platform/common/src/services/PlatformResponse.spec.ts @@ -1,8 +1,8 @@ import {PlatformViews} from "@tsed/platform-views"; import filedirname from "filedirname"; import {createReadStream} from "fs"; -import {PlatformResponse} from "./PlatformResponse"; -import {PlatformTest} from "./PlatformTest"; +import {PlatformResponse} from "./PlatformResponse.js"; +import {PlatformTest} from "./PlatformTest.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/platform/common/src/services/PlatformResponse.ts b/packages/platform/common/src/services/PlatformResponse.ts index 176c353300b..2784a2877c1 100644 --- a/packages/platform/common/src/services/PlatformResponse.ts +++ b/packages/platform/common/src/services/PlatformResponse.ts @@ -3,8 +3,8 @@ import {Injectable, ProviderScope, Scope} from "@tsed/di"; import {getStatusMessage} from "@tsed/schema"; import encodeUrl from "encodeurl"; import {OutgoingHttpHeaders, ServerResponse} from "http"; -import type {PlatformContext} from "../domain/PlatformContext"; -import type {PlatformRequest} from "./PlatformRequest"; +import type {PlatformContext} from "../domain/PlatformContext.js"; +import type {PlatformRequest} from "./PlatformRequest.js"; declare global { namespace TsED { diff --git a/packages/platform/common/src/services/PlatformTest.spec.ts b/packages/platform/common/src/services/PlatformTest.spec.ts index 10bf01b48e6..94f2c87a893 100644 --- a/packages/platform/common/src/services/PlatformTest.spec.ts +++ b/packages/platform/common/src/services/PlatformTest.spec.ts @@ -1,7 +1,7 @@ import {Configuration, Controller, InjectorService} from "@tsed/di"; import {Get} from "@tsed/schema"; -import {PlatformContext} from "../domain/PlatformContext"; -import {PlatformTest} from "./PlatformTest"; +import {PlatformContext} from "../domain/PlatformContext.js"; +import {PlatformTest} from "./PlatformTest.js"; @Configuration({}) class Server {} diff --git a/packages/platform/common/src/services/PlatformTest.ts b/packages/platform/common/src/services/PlatformTest.ts index c47d51d9810..17825f679f7 100644 --- a/packages/platform/common/src/services/PlatformTest.ts +++ b/packages/platform/common/src/services/PlatformTest.ts @@ -2,12 +2,12 @@ import {Type} from "@tsed/core"; import {DITest, InjectorService} from "@tsed/di"; import accepts from "accepts"; import type {IncomingMessage, RequestListener, ServerResponse} from "http"; -import {PlatformBuilder} from "../builder/PlatformBuilder"; -import {PlatformContext, PlatformContextOptions} from "../domain/PlatformContext"; -import {createInjector} from "../utils/createInjector"; -import {getConfiguration} from "../utils/getConfiguration"; -import {PlatformAdapter, PlatformBuilderSettings} from "./PlatformAdapter"; -import {PlatformApplication} from "./PlatformApplication"; +import {PlatformBuilder} from "../builder/PlatformBuilder.js"; +import {PlatformContext, PlatformContextOptions} from "../domain/PlatformContext.js"; +import {createInjector} from "../utils/createInjector.js"; +import {getConfiguration} from "../utils/getConfiguration.js"; +import {PlatformAdapter, PlatformBuilderSettings} from "./PlatformAdapter.js"; +import {PlatformApplication} from "./PlatformApplication.js"; /** * @platform diff --git a/packages/platform/common/src/utils/__mock__/module1/Module1.ts b/packages/platform/common/src/utils/__mock__/module1/Module1.ts index 0dcfb660d2e..b11f274fed0 100644 --- a/packages/platform/common/src/utils/__mock__/module1/Module1.ts +++ b/packages/platform/common/src/utils/__mock__/module1/Module1.ts @@ -1,6 +1,6 @@ -import {SubModule} from "./submodule/SubModule"; +import {SubModule} from "./submodule/SubModule.js"; import {Module} from "@tsed/di"; -import {M1Ctrl1} from "./controllers/M1Ctrl1"; +import {M1Ctrl1} from "./controllers/M1Ctrl1.js"; @Module({ mount: { diff --git a/packages/platform/common/src/utils/__mock__/module1/controllers/M1Ctrl1.ts b/packages/platform/common/src/utils/__mock__/module1/controllers/M1Ctrl1.ts index 032ed5ef8ab..9df9d6d10ee 100644 --- a/packages/platform/common/src/utils/__mock__/module1/controllers/M1Ctrl1.ts +++ b/packages/platform/common/src/utils/__mock__/module1/controllers/M1Ctrl1.ts @@ -1,5 +1,5 @@ import {Controller} from "@tsed/di"; -import {M1Service} from "../services/M1Service"; +import {M1Service} from "../services/M1Service.js"; @Controller("/m1") export class M1Ctrl1 { diff --git a/packages/platform/common/src/utils/__mock__/module1/services/M1Service.ts b/packages/platform/common/src/utils/__mock__/module1/services/M1Service.ts index c1123895b12..492b676997a 100644 --- a/packages/platform/common/src/utils/__mock__/module1/services/M1Service.ts +++ b/packages/platform/common/src/utils/__mock__/module1/services/M1Service.ts @@ -1,5 +1,5 @@ import {Injectable} from "@tsed/di"; -import {SubService} from "../submodule/SubService"; +import {SubService} from "../submodule/SubService.js"; @Injectable() export class M1Service { diff --git a/packages/platform/common/src/utils/__mock__/module1/submodule/SubModule.ts b/packages/platform/common/src/utils/__mock__/module1/submodule/SubModule.ts index f026918f776..ef297540849 100644 --- a/packages/platform/common/src/utils/__mock__/module1/submodule/SubModule.ts +++ b/packages/platform/common/src/utils/__mock__/module1/submodule/SubModule.ts @@ -1,5 +1,5 @@ import {Module} from "@tsed/di"; -import {SubService} from "./SubService"; +import {SubService} from "./SubService.js"; @Module({ imports: [SubService] diff --git a/packages/platform/common/src/utils/__mock__/module2/Module2.ts b/packages/platform/common/src/utils/__mock__/module2/Module2.ts index fe599adf5e5..2b6c78c8253 100644 --- a/packages/platform/common/src/utils/__mock__/module2/Module2.ts +++ b/packages/platform/common/src/utils/__mock__/module2/Module2.ts @@ -1,5 +1,5 @@ import {Module} from "@tsed/di"; -import {M2Ctrl} from "./controllers/M2Ctrl"; +import {M2Ctrl} from "./controllers/M2Ctrl.js"; @Module({ mount: { diff --git a/packages/platform/common/src/utils/closeServer.spec.ts b/packages/platform/common/src/utils/closeServer.spec.ts index 52be0d9f66b..49149d4b122 100644 --- a/packages/platform/common/src/utils/closeServer.spec.ts +++ b/packages/platform/common/src/utils/closeServer.spec.ts @@ -1,4 +1,4 @@ -import {closeServer} from "./closeServer"; +import {closeServer} from "./closeServer.js"; describe("closeServer", () => { it("should close the server", async () => { diff --git a/packages/platform/common/src/utils/createContext.spec.ts b/packages/platform/common/src/utils/createContext.spec.ts index 1007fbb6845..a5b2e084f1a 100644 --- a/packages/platform/common/src/utils/createContext.spec.ts +++ b/packages/platform/common/src/utils/createContext.spec.ts @@ -1,6 +1,6 @@ -import {PlatformResponse} from "../services/PlatformResponse"; -import {PlatformTest} from "../services/PlatformTest"; -import {createContext} from "./createContext"; +import {PlatformResponse} from "../services/PlatformResponse.js"; +import {PlatformTest} from "../services/PlatformTest.js"; +import {createContext} from "./createContext.js"; async function createContextFixture(reqOpts?: any) { const injector = PlatformTest.injector; diff --git a/packages/platform/common/src/utils/createContext.ts b/packages/platform/common/src/utils/createContext.ts index d167e7f882d..35cb9fd212b 100644 --- a/packages/platform/common/src/utils/createContext.ts +++ b/packages/platform/common/src/utils/createContext.ts @@ -1,9 +1,9 @@ import {InjectorService} from "@tsed/di"; import {v4} from "uuid"; -import {PlatformContext} from "../domain/PlatformContext"; -import {IncomingEvent} from "../interfaces/IncomingEvent"; -import {PlatformRequest} from "../services/PlatformRequest"; -import {PlatformResponse} from "../services/PlatformResponse"; +import {PlatformContext} from "../domain/PlatformContext.js"; +import {IncomingEvent} from "../interfaces/IncomingEvent.js"; +import {PlatformRequest} from "../services/PlatformRequest.js"; +import {PlatformResponse} from "../services/PlatformResponse.js"; function defaultReqIdBuilder(req: any) { return req.get("x-request-id") || v4().split("-").join(""); diff --git a/packages/platform/common/src/utils/createHttpServer.spec.ts b/packages/platform/common/src/utils/createHttpServer.spec.ts index d86cfb28916..562b6ed2c66 100644 --- a/packages/platform/common/src/utils/createHttpServer.spec.ts +++ b/packages/platform/common/src/utils/createHttpServer.spec.ts @@ -1,6 +1,6 @@ import {InjectorService} from "@tsed/di"; import Http from "http"; -import {createHttpServer} from "./createHttpServer"; +import {createHttpServer} from "./createHttpServer.js"; describe("createHttpServer", () => { afterEach(() => jest.resetAllMocks()); diff --git a/packages/platform/common/src/utils/createHttpServer.ts b/packages/platform/common/src/utils/createHttpServer.ts index 69f8e3836b1..49597613d46 100644 --- a/packages/platform/common/src/utils/createHttpServer.ts +++ b/packages/platform/common/src/utils/createHttpServer.ts @@ -1,6 +1,6 @@ import {InjectorService} from "@tsed/di"; import Http from "http"; -import {createServer} from "./createServer"; +import {createServer} from "./createServer.js"; export function createHttpServer(injector: InjectorService, requestListener: Http.RequestListener) { const {settings} = injector; diff --git a/packages/platform/common/src/utils/createHttpsServer.spec.ts b/packages/platform/common/src/utils/createHttpsServer.spec.ts index ee4dc44ea72..86eef5aab85 100644 --- a/packages/platform/common/src/utils/createHttpsServer.spec.ts +++ b/packages/platform/common/src/utils/createHttpsServer.spec.ts @@ -1,5 +1,5 @@ import {InjectorService} from "@tsed/di"; -import {createHttpsServer} from "./createHttpsServer"; +import {createHttpsServer} from "./createHttpsServer.js"; import Https from "https"; describe("createHttpsServer", () => { diff --git a/packages/platform/common/src/utils/createHttpsServer.ts b/packages/platform/common/src/utils/createHttpsServer.ts index 721e2a2ba45..73f5c7d193e 100644 --- a/packages/platform/common/src/utils/createHttpsServer.ts +++ b/packages/platform/common/src/utils/createHttpsServer.ts @@ -1,7 +1,7 @@ import {InjectorService} from "@tsed/di"; import Http from "http"; import Https from "https"; -import {createServer} from "./createServer"; +import {createServer} from "./createServer.js"; export function createHttpsServer(injector: InjectorService, requestListener?: Http.RequestListener) { const {settings} = injector; diff --git a/packages/platform/common/src/utils/createInjector.spec.ts b/packages/platform/common/src/utils/createInjector.spec.ts index 284de77f626..0e6b54e3dec 100644 --- a/packages/platform/common/src/utils/createInjector.spec.ts +++ b/packages/platform/common/src/utils/createInjector.spec.ts @@ -1,9 +1,9 @@ import {Env} from "@tsed/core"; import {$log} from "@tsed/logger"; -import {PlatformConfiguration} from "../config/services/PlatformConfiguration"; -import {FakeAdapter} from "../services/FakeAdapter"; -import {PlatformAdapter} from "../services/PlatformAdapter"; -import {createInjector} from "./createInjector"; +import {PlatformConfiguration} from "../config/services/PlatformConfiguration.js"; +import {FakeAdapter} from "../services/FakeAdapter.js"; +import {PlatformAdapter} from "../services/PlatformAdapter.js"; +import {createInjector} from "./createInjector.js"; describe("createInjector", () => { beforeEach(() => { diff --git a/packages/platform/common/src/utils/createInjector.ts b/packages/platform/common/src/utils/createInjector.ts index 32c311a5b6d..1e0de563a6f 100644 --- a/packages/platform/common/src/utils/createInjector.ts +++ b/packages/platform/common/src/utils/createInjector.ts @@ -1,13 +1,13 @@ import {toMap, Type} from "@tsed/core"; import {InjectorService, ProviderOpts, setLoggerConfiguration} from "@tsed/di"; import {$log} from "@tsed/logger"; -import {PlatformConfiguration} from "../config/services/PlatformConfiguration"; -import {Platform} from "../services/Platform"; -import {PlatformAdapter} from "../services/PlatformAdapter"; -import {PlatformApplication} from "../services/PlatformApplication"; -import {PlatformHandler} from "../services/PlatformHandler"; -import {PlatformRequest} from "../services/PlatformRequest"; -import {PlatformResponse} from "../services/PlatformResponse"; +import {PlatformConfiguration} from "../config/services/PlatformConfiguration.js"; +import {Platform} from "../services/Platform.js"; +import {PlatformAdapter} from "../services/PlatformAdapter.js"; +import {PlatformApplication} from "../services/PlatformApplication.js"; +import {PlatformHandler} from "../services/PlatformHandler.js"; +import {PlatformRequest} from "../services/PlatformRequest.js"; +import {PlatformResponse} from "../services/PlatformResponse.js"; $log.name = "TSED"; diff --git a/packages/platform/common/src/utils/createServer.ts b/packages/platform/common/src/utils/createServer.ts index 4349571306f..ac5ad946808 100644 --- a/packages/platform/common/src/utils/createServer.ts +++ b/packages/platform/common/src/utils/createServer.ts @@ -3,7 +3,7 @@ import {InjectorService, ProviderScope, TokenProvider} from "@tsed/di"; import Http from "http"; import Http2 from "http2"; import Https from "https"; -import {listenServer} from "./listenServer"; +import {listenServer} from "./listenServer.js"; export interface CreateServerOptions { token: TokenProvider; diff --git a/packages/platform/common/src/utils/ensureContext.spec.ts b/packages/platform/common/src/utils/ensureContext.spec.ts index db86f28a79a..77dd769a701 100644 --- a/packages/platform/common/src/utils/ensureContext.spec.ts +++ b/packages/platform/common/src/utils/ensureContext.spec.ts @@ -1,5 +1,5 @@ -import {PlatformTest} from "../services/PlatformTest"; -import {ensureContext} from "./ensureContext"; +import {PlatformTest} from "../services/PlatformTest.js"; +import {ensureContext} from "./ensureContext.js"; describe("ensureContext()", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/platform/common/src/utils/ensureContext.ts b/packages/platform/common/src/utils/ensureContext.ts index cacc33a4f14..0cb003af993 100644 --- a/packages/platform/common/src/utils/ensureContext.ts +++ b/packages/platform/common/src/utils/ensureContext.ts @@ -1,5 +1,5 @@ import {getContext} from "@tsed/di"; -import {PlatformContext} from "../domain/PlatformContext"; +import {PlatformContext} from "../domain/PlatformContext.js"; export function ensureContext(request: any, cb: ($ctx: PlatformContext) => any, fallback?: () => void) { const $ctx = getContext(); diff --git a/packages/platform/common/src/utils/getConfiguration.spec.ts b/packages/platform/common/src/utils/getConfiguration.spec.ts index 7dd41331f46..44eae11c0a8 100644 --- a/packages/platform/common/src/utils/getConfiguration.spec.ts +++ b/packages/platform/common/src/utils/getConfiguration.spec.ts @@ -1,5 +1,5 @@ import {Configuration} from "@tsed/di"; -import {getConfiguration} from "./getConfiguration"; +import {getConfiguration} from "./getConfiguration.js"; import {Env} from "@tsed/core"; class MyCtrl {} diff --git a/packages/platform/common/src/utils/getStaticsOptions.spec.ts b/packages/platform/common/src/utils/getStaticsOptions.spec.ts index dea0889d1f6..0ed800c964c 100644 --- a/packages/platform/common/src/utils/getStaticsOptions.spec.ts +++ b/packages/platform/common/src/utils/getStaticsOptions.spec.ts @@ -1,4 +1,4 @@ -import {getStaticsOptions} from "./getStaticsOptions"; +import {getStaticsOptions} from "./getStaticsOptions.js"; describe("getStaticsOptions()", () => { it("should return the statics files options", () => { diff --git a/packages/platform/common/src/utils/getStaticsOptions.ts b/packages/platform/common/src/utils/getStaticsOptions.ts index 439684a268f..b5a12f37e4d 100644 --- a/packages/platform/common/src/utils/getStaticsOptions.ts +++ b/packages/platform/common/src/utils/getStaticsOptions.ts @@ -1,5 +1,5 @@ import {getValue} from "@tsed/core"; -import {PlatformStaticsOptions, PlatformStaticsSettings} from "../config/interfaces/PlatformStaticsSettings"; +import {PlatformStaticsOptions, PlatformStaticsSettings} from "../config/interfaces/PlatformStaticsSettings.js"; function mapOptions(options: any): any { const opts: PlatformStaticsOptions = typeof options === "string" ? {root: options} : options; @@ -10,11 +10,14 @@ function mapOptions(options: any): any { } export function getStaticsOptions(statics?: PlatformStaticsSettings): {path: string; options: PlatformStaticsOptions}[] { - return Object.entries(statics || {}).reduce((statics, [path, items]) => { - [].concat(items as any).forEach((options) => { - statics.push({path, options: mapOptions(options)}); - }); + return Object.entries(statics || {}).reduce( + (statics, [path, items]) => { + [].concat(items as any).forEach((options) => { + statics.push({path, options: mapOptions(options)}); + }); - return statics; - }, [] as {path: string; options: PlatformStaticsOptions}[]); + return statics; + }, + [] as {path: string; options: PlatformStaticsOptions}[] + ); } diff --git a/packages/platform/common/src/utils/mapReturnedResponse.spec.ts b/packages/platform/common/src/utils/mapReturnedResponse.spec.ts index 0c925ec48e7..66ecce67328 100644 --- a/packages/platform/common/src/utils/mapReturnedResponse.spec.ts +++ b/packages/platform/common/src/utils/mapReturnedResponse.spec.ts @@ -1,4 +1,4 @@ -import {mapReturnedResponse} from "../index"; +import {mapReturnedResponse} from "../index.js"; describe("mapReturnedResponse", () => { it("should map the response (1)", () => { diff --git a/packages/platform/common/src/utils/printRoutes.spec.ts b/packages/platform/common/src/utils/printRoutes.spec.ts index 1d3ca81778f..247d2b49b83 100644 --- a/packages/platform/common/src/utils/printRoutes.spec.ts +++ b/packages/platform/common/src/utils/printRoutes.spec.ts @@ -1,4 +1,4 @@ -import {printRoutes} from "./printRoutes"; +import {printRoutes} from "./printRoutes.js"; describe("printRoutes()", () => { it("should return routes", () => { diff --git a/packages/platform/common/src/utils/printRoutes.ts b/packages/platform/common/src/utils/printRoutes.ts index 49b680dcf13..9bb5100457d 100644 --- a/packages/platform/common/src/utils/printRoutes.ts +++ b/packages/platform/common/src/utils/printRoutes.ts @@ -1,5 +1,5 @@ import {$log, colorize} from "@tsed/logger"; -import {PlatformRouteDetails} from "../domain/PlatformRouteDetails"; +import {PlatformRouteDetails} from "../domain/PlatformRouteDetails.js"; export function printRoutes(routes: PlatformRouteDetails[]) { const mapColor: {[key: string]: string} = { diff --git a/packages/platform/common/src/utils/registerPlatformAdapter.ts b/packages/platform/common/src/utils/registerPlatformAdapter.ts index 4035035814d..7dbbfc84950 100644 --- a/packages/platform/common/src/utils/registerPlatformAdapter.ts +++ b/packages/platform/common/src/utils/registerPlatformAdapter.ts @@ -1,7 +1,7 @@ import {Type} from "@tsed/core"; -import {PlatformBuilder} from "../builder/PlatformBuilder"; -import {PlatformAdapter} from "../services/PlatformAdapter"; -import {PlatformTest} from "../services/PlatformTest"; +import {PlatformBuilder} from "../builder/PlatformBuilder.js"; +import {PlatformAdapter} from "../services/PlatformAdapter.js"; +import {PlatformTest} from "../services/PlatformTest.js"; export function registerPlatformAdapter(adapter: Type>) { PlatformTest.adapter = adapter; diff --git a/packages/platform/common/src/utils/setResponseHeaders.spec.ts b/packages/platform/common/src/utils/setResponseHeaders.spec.ts index 530ce8f14b3..7403a885515 100644 --- a/packages/platform/common/src/utils/setResponseHeaders.spec.ts +++ b/packages/platform/common/src/utils/setResponseHeaders.spec.ts @@ -1,6 +1,6 @@ import {EndpointMetadata, Get, Redirect, Returns} from "@tsed/schema"; -import {PlatformTest} from "../services/PlatformTest"; -import {setResponseHeaders} from "./setResponseHeaders"; +import {PlatformTest} from "../services/PlatformTest.js"; +import {setResponseHeaders} from "./setResponseHeaders.js"; describe("setResponseHeaders", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/platform/common/src/utils/setResponseHeaders.ts b/packages/platform/common/src/utils/setResponseHeaders.ts index 130837d2e2c..e45aeec7a98 100644 --- a/packages/platform/common/src/utils/setResponseHeaders.ts +++ b/packages/platform/common/src/utils/setResponseHeaders.ts @@ -1,4 +1,4 @@ -import {PlatformContext} from "../domain/PlatformContext"; +import {PlatformContext} from "../domain/PlatformContext.js"; /** * @ignore diff --git a/packages/platform/common/test/integration/returns.spec.integration.spec.ts b/packages/platform/common/test/integration/returns.spec.integration.spec.ts index 93faf17317a..f7d23f54169 100644 --- a/packages/platform/common/test/integration/returns.spec.integration.spec.ts +++ b/packages/platform/common/test/integration/returns.spec.integration.spec.ts @@ -1,5 +1,5 @@ import {getSpec, Returns, SpecTypes} from "@tsed/schema"; -import {Get} from "../../src"; +import {Get} from "../../src/index.js"; describe("@Returns", () => { it("should declare a return type (text/plain)", () => { diff --git a/packages/platform/platform-cache/src/decorators/useCache.ts b/packages/platform/platform-cache/src/decorators/useCache.ts index a22f1a73ad5..d44d3e3f45b 100644 --- a/packages/platform/platform-cache/src/decorators/useCache.ts +++ b/packages/platform/platform-cache/src/decorators/useCache.ts @@ -1,6 +1,6 @@ import {Intercept} from "@tsed/di"; -import {PlatformCacheInterceptor} from "../interceptors/PlatformCacheInterceptor"; -import {PlatformCacheOptions} from "../interfaces/PlatformCacheOptions"; +import {PlatformCacheInterceptor} from "../interceptors/PlatformCacheInterceptor.js"; +import {PlatformCacheOptions} from "../interfaces/PlatformCacheOptions.js"; export function UseCache(options: PlatformCacheOptions = {}) { return Intercept(PlatformCacheInterceptor, options); diff --git a/packages/platform/platform-cache/src/index.ts b/packages/platform/platform-cache/src/index.ts index 3f9012e1a54..aa3240ef739 100644 --- a/packages/platform/platform-cache/src/index.ts +++ b/packages/platform/platform-cache/src/index.ts @@ -2,12 +2,12 @@ * @file Automatically generated by barrelsby. */ -export * from "./decorators/useCache"; -export * from "./interceptors/PlatformCacheInterceptor"; -export * from "./interfaces/PlatformCacheOptions"; -export * from "./interfaces/PlatformCachedObject"; -export * from "./interfaces/interfaces"; -export * from "./services/PlatformCache"; -export * from "./utils/getInterceptorOptions"; -export * from "./utils/getPrefix"; -export * from "./utils/isEndpoint"; +export * from "./decorators/useCache.js"; +export * from "./interceptors/PlatformCacheInterceptor.js"; +export * from "./interfaces/PlatformCacheOptions.js"; +export * from "./interfaces/PlatformCachedObject.js"; +export * from "./interfaces/interfaces.js"; +export * from "./services/PlatformCache.js"; +export * from "./utils/getInterceptorOptions.js"; +export * from "./utils/getPrefix.js"; +export * from "./utils/isEndpoint.js"; diff --git a/packages/platform/platform-cache/src/interceptors/PlatformCacheInterceptor.spec.ts b/packages/platform/platform-cache/src/interceptors/PlatformCacheInterceptor.spec.ts index 197a96a0b42..767caaa3529 100644 --- a/packages/platform/platform-cache/src/interceptors/PlatformCacheInterceptor.spec.ts +++ b/packages/platform/platform-cache/src/interceptors/PlatformCacheInterceptor.spec.ts @@ -1,10 +1,10 @@ import {PlatformTest} from "@tsed/common"; import {isClass} from "@tsed/core"; import {serialize} from "@tsed/json-mapper"; -import {UseCache} from "../decorators/useCache"; -import {PlatformCache} from "../services/PlatformCache"; -import {isEndpoint} from "../utils/isEndpoint"; -import {PlatformCacheInterceptor} from "./PlatformCacheInterceptor"; +import {UseCache} from "../decorators/useCache.js"; +import {PlatformCache} from "../services/PlatformCache.js"; +import {isEndpoint} from "../utils/isEndpoint.js"; +import {PlatformCacheInterceptor} from "./PlatformCacheInterceptor.js"; const defaultKeyResolver = (args: any[]) => { return args.map((arg: any) => (isClass(arg) ? JSON.stringify(serialize(arg)) : arg)).join(":"); diff --git a/packages/platform/platform-cache/src/interceptors/PlatformCacheInterceptor.ts b/packages/platform/platform-cache/src/interceptors/PlatformCacheInterceptor.ts index 89005dce1b2..7d81ebc8895 100644 --- a/packages/platform/platform-cache/src/interceptors/PlatformCacheInterceptor.ts +++ b/packages/platform/platform-cache/src/interceptors/PlatformCacheInterceptor.ts @@ -3,11 +3,11 @@ import {BaseContext, Constant, DIContext, Inject, Interceptor, InterceptorContex import {deserialize, serialize} from "@tsed/json-mapper"; import {Logger} from "@tsed/logger"; import {IncomingMessage, ServerResponse} from "http"; -import {PlatformCachedObject} from "../interfaces/PlatformCachedObject"; -import {PlatformCacheOptions} from "../interfaces/PlatformCacheOptions"; -import {PlatformCache} from "../services/PlatformCache"; -import {getPrefix} from "../utils/getPrefix"; -import {isEndpoint} from "../utils/isEndpoint"; +import {PlatformCachedObject} from "../interfaces/PlatformCachedObject.js"; +import {PlatformCacheOptions} from "../interfaces/PlatformCacheOptions.js"; +import {PlatformCache} from "../services/PlatformCache.js"; +import {getPrefix} from "../utils/getPrefix.js"; +import {isEndpoint} from "../utils/isEndpoint.js"; const cleanHeaders = (headers: Record, blacklist: string[]) => { return Object.entries(headers) .filter(([key]) => !blacklist.includes(key.toLowerCase())) diff --git a/packages/platform/platform-cache/src/interfaces/PlatformCacheOptions.ts b/packages/platform/platform-cache/src/interfaces/PlatformCacheOptions.ts index ec919eb35dc..e5f560ea4aa 100644 --- a/packages/platform/platform-cache/src/interfaces/PlatformCacheOptions.ts +++ b/packages/platform/platform-cache/src/interfaces/PlatformCacheOptions.ts @@ -1,6 +1,6 @@ import {MetadataTypes} from "@tsed/core"; import {BaseContext} from "@tsed/di"; -import type {Ttl} from "../services/PlatformCache"; +import type {Ttl} from "../services/PlatformCache.js"; export interface PlatformCacheOptions extends MetadataTypes { /** diff --git a/packages/platform/platform-cache/src/interfaces/interfaces.ts b/packages/platform/platform-cache/src/interfaces/interfaces.ts index d4dffec1c24..12e372d0f7b 100644 --- a/packages/platform/platform-cache/src/interfaces/interfaces.ts +++ b/packages/platform/platform-cache/src/interfaces/interfaces.ts @@ -1,7 +1,7 @@ import type {BaseContext} from "@tsed/di"; import type {Cache, CachingConfig, Store} from "cache-manager"; import {FactoryStore} from "cache-manager/dist/caching"; -import type {CacheManager} from "../services/PlatformCache"; +import type {CacheManager} from "../services/PlatformCache.js"; /** * @deprecated Since 2022-11. Use FactoryStore instead. diff --git a/packages/platform/platform-cache/src/services/PlatformCache.spec.ts b/packages/platform/platform-cache/src/services/PlatformCache.spec.ts index 523724421d0..271e98978f3 100644 --- a/packages/platform/platform-cache/src/services/PlatformCache.spec.ts +++ b/packages/platform/platform-cache/src/services/PlatformCache.spec.ts @@ -1,8 +1,8 @@ import {PlatformTest} from "@tsed/common"; import {caching as cacheManager, multiCaching} from "cache-manager"; -import {UseCache} from "../decorators/useCache"; -import {getPrefix} from "../utils/getPrefix"; -import {PlatformCache} from "./PlatformCache"; +import {UseCache} from "../decorators/useCache.js"; +import {getPrefix} from "../utils/getPrefix.js"; +import {PlatformCache} from "./PlatformCache.js"; function createCacheFixture() { const map = new Map(); diff --git a/packages/platform/platform-cache/src/services/PlatformCache.ts b/packages/platform/platform-cache/src/services/PlatformCache.ts index e0166221a26..8351593b710 100644 --- a/packages/platform/platform-cache/src/services/PlatformCache.ts +++ b/packages/platform/platform-cache/src/services/PlatformCache.ts @@ -6,10 +6,10 @@ import {JsonEntityStore} from "@tsed/schema"; import {AsyncLocalStorage} from "async_hooks"; import type {Cache, CachingConfig, MultiCache} from "cache-manager"; import {prefix} from "concurrently/dist/src/defaults"; -import {PlatformCacheSettings} from "../interfaces/interfaces"; -import {PlatformCachedObject} from "../interfaces/PlatformCachedObject"; -import {getInterceptorOptions} from "../utils/getInterceptorOptions"; -import {getPrefix} from "../utils/getPrefix"; +import {PlatformCacheSettings} from "../interfaces/interfaces.js"; +import {PlatformCachedObject} from "../interfaces/PlatformCachedObject.js"; +import {getInterceptorOptions} from "../utils/getInterceptorOptions.js"; +import {getPrefix} from "../utils/getPrefix.js"; const defaultKeyResolver = (args: any[]) => { return args.map((arg: any) => (isClass(arg) ? JSON.stringify(serialize(arg)) : arg)).join(":"); diff --git a/packages/platform/platform-cache/src/utils/getInterceptorOptions.ts b/packages/platform/platform-cache/src/utils/getInterceptorOptions.ts index d41f30636fa..8918dfe670b 100644 --- a/packages/platform/platform-cache/src/utils/getInterceptorOptions.ts +++ b/packages/platform/platform-cache/src/utils/getInterceptorOptions.ts @@ -1,6 +1,6 @@ import {Store, Type} from "@tsed/core"; import {INJECTABLE_PROP} from "@tsed/di"; -import {PlatformCacheOptions} from "../interfaces/PlatformCacheOptions"; +import {PlatformCacheOptions} from "../interfaces/PlatformCacheOptions.js"; export function getInterceptorOptions(target: Type, propertyKey: string | symbol): PlatformCacheOptions { return Store.from(target).get(INJECTABLE_PROP)?.[propertyKey]?.options; diff --git a/packages/platform/platform-cache/src/utils/getPrefix.ts b/packages/platform/platform-cache/src/utils/getPrefix.ts index 48f548656bf..df49f9d8a9c 100644 --- a/packages/platform/platform-cache/src/utils/getPrefix.ts +++ b/packages/platform/platform-cache/src/utils/getPrefix.ts @@ -1,5 +1,5 @@ import {nameOf, Type} from "@tsed/core"; -import {getInterceptorOptions} from "./getInterceptorOptions"; +import {getInterceptorOptions} from "./getInterceptorOptions.js"; export function getPrefix(target: Type, propertyKey: string | symbol) { const {prefix} = getInterceptorOptions(target, propertyKey); diff --git a/packages/platform/platform-cache/test/cache.integration.spec.ts b/packages/platform/platform-cache/test/cache.integration.spec.ts index 33afde492e1..21a73d118c7 100644 --- a/packages/platform/platform-cache/test/cache.integration.spec.ts +++ b/packages/platform/platform-cache/test/cache.integration.spec.ts @@ -1,8 +1,8 @@ import {Controller, Get, Head, Inject, PathParams, PlatformTest, Post, QueryParams} from "@tsed/common"; import {Property} from "@tsed/schema"; import SuperTest from "supertest"; -import {Server} from "../../platform-express/test/app/Server"; -import {PlatformCache, UseCache} from "../src/index"; +import {Server} from "../../platform-express/test/app/Server.js"; +import {PlatformCache, UseCache} from "../src/index.js"; let increment = 0; diff --git a/packages/platform/platform-exceptions/src/components/ErrorFilter.spec.ts b/packages/platform/platform-exceptions/src/components/ErrorFilter.spec.ts index fab12760ff6..ab40f7e2f9e 100644 --- a/packages/platform/platform-exceptions/src/components/ErrorFilter.spec.ts +++ b/packages/platform/platform-exceptions/src/components/ErrorFilter.spec.ts @@ -1,4 +1,4 @@ -import {ErrorFilter} from "./ErrorFilter"; +import {ErrorFilter} from "./ErrorFilter.js"; describe("ErrorFilter", () => { it("should map error if error.errors is an object", () => { diff --git a/packages/platform/platform-exceptions/src/components/ErrorFilter.ts b/packages/platform/platform-exceptions/src/components/ErrorFilter.ts index 013ea225c20..d9ef87881e1 100644 --- a/packages/platform/platform-exceptions/src/components/ErrorFilter.ts +++ b/packages/platform/platform-exceptions/src/components/ErrorFilter.ts @@ -1,7 +1,7 @@ import {Env} from "@tsed/core"; import {BaseContext} from "@tsed/di"; -import {Catch} from "../decorators/catch"; -import type {ExceptionFilterMethods} from "../interfaces/ExceptionFilterMethods"; +import {Catch} from "../decorators/catch.js"; +import type {ExceptionFilterMethods} from "../interfaces/ExceptionFilterMethods.js"; @Catch(Error) export class ErrorFilter implements ExceptionFilterMethods { diff --git a/packages/platform/platform-exceptions/src/components/ExceptionFilter.ts b/packages/platform/platform-exceptions/src/components/ExceptionFilter.ts index 7110c1a9332..55c2bcb80d9 100644 --- a/packages/platform/platform-exceptions/src/components/ExceptionFilter.ts +++ b/packages/platform/platform-exceptions/src/components/ExceptionFilter.ts @@ -1,7 +1,7 @@ import {BaseContext} from "@tsed/di"; import {Exception} from "@tsed/exceptions"; -import {Catch} from "../decorators/catch"; -import {ErrorFilter} from "./ErrorFilter"; +import {Catch} from "../decorators/catch.js"; +import {ErrorFilter} from "./ErrorFilter.js"; @Catch(Exception) export class ExceptionFilter extends ErrorFilter { diff --git a/packages/platform/platform-exceptions/src/components/MongooseErrorFilter.ts b/packages/platform/platform-exceptions/src/components/MongooseErrorFilter.ts index 3fb4a13925c..f8df23a13b1 100644 --- a/packages/platform/platform-exceptions/src/components/MongooseErrorFilter.ts +++ b/packages/platform/platform-exceptions/src/components/MongooseErrorFilter.ts @@ -1,7 +1,7 @@ import {BaseContext} from "@tsed/di"; import {BadRequest} from "@tsed/exceptions"; -import {Catch} from "../decorators/catch"; -import {ErrorFilter} from "./ErrorFilter"; +import {Catch} from "../decorators/catch.js"; +import {ErrorFilter} from "./ErrorFilter.js"; @Catch("MongooseError", "MongoError") export class MongooseErrorFilter extends ErrorFilter { diff --git a/packages/platform/platform-exceptions/src/components/StringErrorFilter.spec.ts b/packages/platform/platform-exceptions/src/components/StringErrorFilter.spec.ts index db8f50db34b..e7ed6be6350 100644 --- a/packages/platform/platform-exceptions/src/components/StringErrorFilter.spec.ts +++ b/packages/platform/platform-exceptions/src/components/StringErrorFilter.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {StringErrorFilter} from "./StringErrorFilter"; +import {StringErrorFilter} from "./StringErrorFilter.js"; describe("StringErrorFilter", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/platform/platform-exceptions/src/components/StringErrorFilter.ts b/packages/platform/platform-exceptions/src/components/StringErrorFilter.ts index 4b8eae03b40..15f9de3628e 100644 --- a/packages/platform/platform-exceptions/src/components/StringErrorFilter.ts +++ b/packages/platform/platform-exceptions/src/components/StringErrorFilter.ts @@ -1,6 +1,6 @@ import {BaseContext} from "@tsed/di"; -import {Catch} from "../decorators/catch"; -import type {ExceptionFilterMethods} from "../interfaces/ExceptionFilterMethods"; +import {Catch} from "../decorators/catch.js"; +import type {ExceptionFilterMethods} from "../interfaces/ExceptionFilterMethods.js"; const toHTML = (message = "") => message.replace(/\n/gi, "
"); diff --git a/packages/platform/platform-exceptions/src/decorators/catch.ts b/packages/platform/platform-exceptions/src/decorators/catch.ts index 5b67996f32b..3e899cbc64b 100644 --- a/packages/platform/platform-exceptions/src/decorators/catch.ts +++ b/packages/platform/platform-exceptions/src/decorators/catch.ts @@ -1,6 +1,6 @@ import {Type} from "@tsed/core"; import {registerProvider} from "@tsed/di"; -import {registerExceptionType} from "../domain/ExceptionFiltersContainer"; +import {registerExceptionType} from "../domain/ExceptionFiltersContainer.js"; /** * Register a new class to handle an specific exception. diff --git a/packages/platform/platform-exceptions/src/domain/ExceptionFiltersContainer.ts b/packages/platform/platform-exceptions/src/domain/ExceptionFiltersContainer.ts index a5e7473afed..511e8041999 100644 --- a/packages/platform/platform-exceptions/src/domain/ExceptionFiltersContainer.ts +++ b/packages/platform/platform-exceptions/src/domain/ExceptionFiltersContainer.ts @@ -1,5 +1,5 @@ import {Type} from "@tsed/core"; -import type {ExceptionFilterMethods} from "../interfaces/ExceptionFilterMethods"; +import type {ExceptionFilterMethods} from "../interfaces/ExceptionFilterMethods.js"; /** * @ignore */ diff --git a/packages/platform/platform-exceptions/src/index.ts b/packages/platform/platform-exceptions/src/index.ts index a7c32e2ef55..ad0d5171b1a 100644 --- a/packages/platform/platform-exceptions/src/index.ts +++ b/packages/platform/platform-exceptions/src/index.ts @@ -2,13 +2,13 @@ * @file Automatically generated by barrelsby. */ -export * from "./components/ErrorFilter"; -export * from "./components/ExceptionFilter"; -export * from "./components/MongooseErrorFilter"; -export * from "./components/StringErrorFilter"; -export * from "./decorators/catch"; -export * from "./domain/ExceptionFiltersContainer"; -export * from "./domain/ExceptionSchema"; -export * from "./errors/ResourceNotFound"; -export * from "./interfaces/ExceptionFilterMethods"; -export * from "./services/PlatformExceptions"; +export * from "./components/ErrorFilter.js"; +export * from "./components/ExceptionFilter.js"; +export * from "./components/MongooseErrorFilter.js"; +export * from "./components/StringErrorFilter.js"; +export * from "./decorators/catch.js"; +export * from "./domain/ExceptionFiltersContainer.js"; +export * from "./domain/ExceptionSchema.js"; +export * from "./errors/ResourceNotFound.js"; +export * from "./interfaces/ExceptionFilterMethods.js"; +export * from "./services/PlatformExceptions.js"; diff --git a/packages/platform/platform-exceptions/src/services/PlatformExceptions.spec.ts b/packages/platform/platform-exceptions/src/services/PlatformExceptions.spec.ts index a89231a58de..9e5539b6cc2 100644 --- a/packages/platform/platform-exceptions/src/services/PlatformExceptions.spec.ts +++ b/packages/platform/platform-exceptions/src/services/PlatformExceptions.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest, ValidationError} from "@tsed/common"; import {Env} from "@tsed/core"; import {BadRequest} from "@tsed/exceptions"; -import {PlatformExceptions} from "./PlatformExceptions"; +import {PlatformExceptions} from "./PlatformExceptions.js"; describe("PlatformExceptions", () => { describe("Env.TEST", () => { diff --git a/packages/platform/platform-exceptions/src/services/PlatformExceptions.ts b/packages/platform/platform-exceptions/src/services/PlatformExceptions.ts index af0cb4768a3..bb129423263 100644 --- a/packages/platform/platform-exceptions/src/services/PlatformExceptions.ts +++ b/packages/platform/platform-exceptions/src/services/PlatformExceptions.ts @@ -1,12 +1,12 @@ import {ancestorsOf, classOf, nameOf} from "@tsed/core"; import {BaseContext, DIContext, Inject, Injectable, InjectorService} from "@tsed/di"; -import {ErrorFilter} from "../components/ErrorFilter"; -import {ExceptionFilter} from "../components/ExceptionFilter"; -import {MongooseErrorFilter} from "../components/MongooseErrorFilter"; -import {StringErrorFilter} from "../components/StringErrorFilter"; -import {ExceptionFilterKey, ExceptionFiltersContainer} from "../domain/ExceptionFiltersContainer"; -import {ResourceNotFound} from "../errors/ResourceNotFound"; -import {ExceptionFilterMethods} from "../interfaces/ExceptionFilterMethods"; +import {ErrorFilter} from "../components/ErrorFilter.js"; +import {ExceptionFilter} from "../components/ExceptionFilter.js"; +import {MongooseErrorFilter} from "../components/MongooseErrorFilter.js"; +import {StringErrorFilter} from "../components/StringErrorFilter.js"; +import {ExceptionFilterKey, ExceptionFiltersContainer} from "../domain/ExceptionFiltersContainer.js"; +import {ResourceNotFound} from "../errors/ResourceNotFound.js"; +import {ExceptionFilterMethods} from "../interfaces/ExceptionFilterMethods.js"; /** * Catch all errors and return the json error with the right status code when it's possible. diff --git a/packages/platform/platform-express/src/components/PlatformExpress.spec.ts b/packages/platform/platform-express/src/components/PlatformExpress.spec.ts index 41696fc577e..0f4fc143402 100644 --- a/packages/platform/platform-express/src/components/PlatformExpress.spec.ts +++ b/packages/platform/platform-express/src/components/PlatformExpress.spec.ts @@ -1,4 +1,4 @@ -import {PlatformExpress} from "./PlatformExpress"; +import {PlatformExpress} from "./PlatformExpress.js"; class Server {} diff --git a/packages/platform/platform-express/src/components/PlatformExpress.ts b/packages/platform/platform-express/src/components/PlatformExpress.ts index 92924f76792..a58db436ac6 100644 --- a/packages/platform/platform-express/src/components/PlatformExpress.ts +++ b/packages/platform/platform-express/src/components/PlatformExpress.ts @@ -21,9 +21,9 @@ import Express from "express"; import {IncomingMessage, ServerResponse} from "http"; import type multer from "multer"; import {promisify} from "util"; -import {PlatformExpressStaticsOptions} from "../interfaces/PlatformExpressStaticsOptions"; -import {staticsMiddleware} from "../middlewares/staticsMiddleware"; -import {PlatformExpressHandler} from "../services/PlatformExpressHandler"; +import {PlatformExpressStaticsOptions} from "../interfaces/PlatformExpressStaticsOptions.js"; +import {staticsMiddleware} from "../middlewares/staticsMiddleware.js"; +import {PlatformExpressHandler} from "../services/PlatformExpressHandler.js"; declare module "express" { export interface Request { diff --git a/packages/platform/platform-express/src/index.ts b/packages/platform/platform-express/src/index.ts index 567d1f0501f..9177526238d 100644 --- a/packages/platform/platform-express/src/index.ts +++ b/packages/platform/platform-express/src/index.ts @@ -2,9 +2,9 @@ * @file Automatically generated by barrelsby. */ -export * from "./components/PlatformExpress"; -export * from "./interfaces/PlatformExpressSettings"; -export * from "./interfaces/PlatformExpressStaticsOptions"; -export * from "./interfaces/interfaces"; -export * from "./middlewares/staticsMiddleware"; -export * from "./services/PlatformExpressHandler"; +export * from "./components/PlatformExpress.js"; +export * from "./interfaces/PlatformExpressSettings.js"; +export * from "./interfaces/PlatformExpressStaticsOptions.js"; +export * from "./interfaces/interfaces.js"; +export * from "./middlewares/staticsMiddleware.js"; +export * from "./services/PlatformExpressHandler.js"; diff --git a/packages/platform/platform-express/src/interfaces/interfaces.ts b/packages/platform/platform-express/src/interfaces/interfaces.ts index 3e1ee24d54a..0cc55f49317 100644 --- a/packages/platform/platform-express/src/interfaces/interfaces.ts +++ b/packages/platform/platform-express/src/interfaces/interfaces.ts @@ -1,5 +1,5 @@ import {NextFunction as ENext, Request as EReq, Response as ERes} from "express"; -import {PlatformExpressSettings} from "./PlatformExpressSettings"; +import {PlatformExpressSettings} from "./PlatformExpressSettings.js"; declare global { namespace TsED { diff --git a/packages/platform/platform-express/src/middlewares/staticsMiddleware.spec.ts b/packages/platform/platform-express/src/middlewares/staticsMiddleware.spec.ts index 090664438cf..12ccb2c3412 100644 --- a/packages/platform/platform-express/src/middlewares/staticsMiddleware.spec.ts +++ b/packages/platform/platform-express/src/middlewares/staticsMiddleware.spec.ts @@ -1,5 +1,5 @@ import Express from "express"; -import {staticsMiddleware} from "./staticsMiddleware"; +import {staticsMiddleware} from "./staticsMiddleware.js"; describe("staticsMiddleware", () => { beforeEach(() => { diff --git a/packages/platform/platform-express/src/services/PlatformExpressHandler.spec.ts b/packages/platform/platform-express/src/services/PlatformExpressHandler.spec.ts index 0e8c475b05d..c8ae59c04ee 100644 --- a/packages/platform/platform-express/src/services/PlatformExpressHandler.spec.ts +++ b/packages/platform/platform-express/src/services/PlatformExpressHandler.spec.ts @@ -1,4 +1,4 @@ -import {PlatformExpressHandler} from "./PlatformExpressHandler"; +import {PlatformExpressHandler} from "./PlatformExpressHandler.js"; jest.mock("@tsed/common"); diff --git a/packages/platform/platform-express/test/ajv-errors.spec.ts b/packages/platform/platform-express/test/ajv-errors.spec.ts index 7a7b5405bc1..b621de04fb6 100644 --- a/packages/platform/platform-express/test/ajv-errors.spec.ts +++ b/packages/platform/platform-express/test/ajv-errors.spec.ts @@ -3,8 +3,8 @@ import {BodyParams, Controller, PlatformTest, Post} from "@tsed/common"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import {DefaultMsg, ErrorMsg, Integer, Property, Required, TypeError} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformExpress} from "../src/index"; -import {rootDir, Server} from "./app/Server"; +import {PlatformExpress} from "../src/index.js"; +import {rootDir, Server} from "./app/Server.js"; const utils = PlatformTestSdk.create({ rootDir, diff --git a/packages/platform/platform-express/test/app/emulate.ts b/packages/platform/platform-express/test/app/emulate.ts index 6723ac6f7b6..faa38468ef1 100644 --- a/packages/platform/platform-express/test/app/emulate.ts +++ b/packages/platform/platform-express/test/app/emulate.ts @@ -1,6 +1,6 @@ import http from "http"; -import {PlatformExpress} from "../../src/index.js"; -import {Server} from "./Server"; +import {PlatformExpress} from "../../src/index.js.js"; +import {Server} from "./Server.js"; import {Controller} from "@tsed/di"; import {Get} from "@tsed/schema"; import {QueryParams} from "@tsed/platform-params"; diff --git a/packages/platform/platform-express/test/app/index.ts b/packages/platform/platform-express/test/app/index.ts index b618af6f59a..7cbd0220fbf 100644 --- a/packages/platform/platform-express/test/app/index.ts +++ b/packages/platform/platform-express/test/app/index.ts @@ -2,8 +2,8 @@ import {$log, BodyParams, Controller, Get, PlatformResponse, Post, QueryParams, import {Returns} from "@tsed/schema"; import {promisify} from "util"; import {agent, SuperAgentStatic} from "superagent"; -import {PlatformExpress} from "../../src/index"; -import {Server} from "./Server"; +import {PlatformExpress} from "../../src/index.js"; +import {Server} from "./Server.js"; if (process.env.NODE_ENV !== "test") { @Controller("/hello") diff --git a/packages/platform/platform-express/test/array-body.spec.ts b/packages/platform/platform-express/test/array-body.spec.ts index ff146585fdf..db7b769f238 100644 --- a/packages/platform/platform-express/test/array-body.spec.ts +++ b/packages/platform/platform-express/test/array-body.spec.ts @@ -3,8 +3,8 @@ import {BodyParams, Controller, PlatformTest, Post} from "@tsed/common"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import {CollectionOf, Property, Any} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformExpress} from "../src/index"; -import {rootDir, Server} from "./app/Server"; +import {PlatformExpress} from "../src/index.js"; +import {rootDir, Server} from "./app/Server.js"; const utils = PlatformTestSdk.create({ rootDir, diff --git a/packages/platform/platform-express/test/discriminator.spec.ts b/packages/platform/platform-express/test/discriminator.spec.ts index 9f47f8ffd21..25c94f517d8 100644 --- a/packages/platform/platform-express/test/discriminator.spec.ts +++ b/packages/platform/platform-express/test/discriminator.spec.ts @@ -4,8 +4,8 @@ import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import {DiscriminatorKey, DiscriminatorValue, OneOf, Partial, Property, Required, Returns} from "@tsed/schema"; import "@tsed/swagger"; import SuperTest from "supertest"; -import {PlatformExpress} from "../src/index"; -import {rootDir, Server} from "./app/Server"; +import {PlatformExpress} from "../src/index.js"; +import {rootDir, Server} from "./app/Server.js"; class Event { @DiscriminatorKey() // declare this property as discriminator key diff --git a/packages/platform/platform-express/test/enums.spec.ts b/packages/platform/platform-express/test/enums.spec.ts index 2e28bbb394b..9e86d37b9d4 100644 --- a/packages/platform/platform-express/test/enums.spec.ts +++ b/packages/platform/platform-express/test/enums.spec.ts @@ -4,8 +4,8 @@ import {Env} from "@tsed/core"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import {Default, Enum, enums, getSpec, SpecTypes} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformExpress} from "../src/index"; -import {rootDir, Server} from "./app/Server"; +import {PlatformExpress} from "../src/index.js"; +import {rootDir, Server} from "./app/Server.js"; enums(Env).label("Env"); diff --git a/packages/platform/platform-express/test/fullpayload.spec.ts b/packages/platform/platform-express/test/fullpayload.spec.ts index 15a25822280..5633f634182 100644 --- a/packages/platform/platform-express/test/fullpayload.spec.ts +++ b/packages/platform/platform-express/test/fullpayload.spec.ts @@ -1,8 +1,8 @@ import {BodyParams, Controller, PlatformTest, Post} from "@tsed/common"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import SuperTest from "supertest"; -import {PlatformExpress} from "../src/index"; -import {rootDir, Server} from "./app/Server"; +import {PlatformExpress} from "../src/index.js"; +import {rootDir, Server} from "./app/Server.js"; const utils = PlatformTestSdk.create({ rootDir, diff --git a/packages/platform/platform-express/test/groups.spec.ts b/packages/platform/platform-express/test/groups.spec.ts index f6834d9d961..6a031d49aa3 100644 --- a/packages/platform/platform-express/test/groups.spec.ts +++ b/packages/platform/platform-express/test/groups.spec.ts @@ -4,8 +4,8 @@ import {deserialize} from "@tsed/json-mapper"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import {getSpec, Groups, Property, Returns, SpecTypes} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformExpress} from "../src/index"; -import {rootDir, Server} from "./app/Server"; +import {PlatformExpress} from "../src/index.js"; +import {rootDir, Server} from "./app/Server.js"; class Product { @Groups("!creation") diff --git a/packages/platform/platform-express/test/merge-params.spec.ts b/packages/platform/platform-express/test/merge-params.spec.ts index fc0eb1c33dc..7e70ea84cfd 100644 --- a/packages/platform/platform-express/test/merge-params.spec.ts +++ b/packages/platform/platform-express/test/merge-params.spec.ts @@ -1,8 +1,8 @@ import {Controller, Get, PathParams, PlatformTest} from "@tsed/common"; -import {PlatformExpress} from "../src/index"; +import {PlatformExpress} from "../src/index.js"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import SuperTest from "supertest"; -import {rootDir, Server} from "./app/Server"; +import {rootDir, Server} from "./app/Server.js"; const utils = PlatformTestSdk.create({ rootDir, diff --git a/packages/platform/platform-express/test/middleware.spec.ts b/packages/platform/platform-express/test/middleware.spec.ts index f0b58c8444a..df2b194abc6 100644 --- a/packages/platform/platform-express/test/middleware.spec.ts +++ b/packages/platform/platform-express/test/middleware.spec.ts @@ -2,8 +2,8 @@ import {Controller, Get, PlatformTest} from "@tsed/common"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import {Returns} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformExpress} from "../src/components/PlatformExpress"; -import {rootDir, Server} from "./app/Server"; +import {PlatformExpress} from "../src/components/PlatformExpress.js"; +import {rootDir, Server} from "./app/Server.js"; @Controller("/middlewares") class TestMiddleware { diff --git a/packages/platform/platform-express/test/pageable.spec.ts b/packages/platform/platform-express/test/pageable.spec.ts index 300119e41c5..a396c2551ce 100644 --- a/packages/platform/platform-express/test/pageable.spec.ts +++ b/packages/platform/platform-express/test/pageable.spec.ts @@ -21,8 +21,8 @@ import { } from "@tsed/schema"; import qs from "querystring"; import SuperTest from "supertest"; -import {PlatformExpress} from "../src/index"; -import {rootDir, Server} from "./app/Server"; +import {PlatformExpress} from "../src/index.js"; +import {rootDir, Server} from "./app/Server.js"; class Pageable { @Integer() diff --git a/packages/platform/platform-express/test/plain-text.spec.ts b/packages/platform/platform-express/test/plain-text.spec.ts index 5fd44fb27fd..aa0ce99f2f5 100644 --- a/packages/platform/platform-express/test/plain-text.spec.ts +++ b/packages/platform/platform-express/test/plain-text.spec.ts @@ -2,8 +2,8 @@ import {Controller, Get, PlatformTest} from "@tsed/common"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import {Returns} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformExpress} from "../src/index"; -import {rootDir, Server} from "./app/Server"; +import {PlatformExpress} from "../src/index.js"; +import {rootDir, Server} from "./app/Server.js"; const utils = PlatformTestSdk.create({ rootDir, diff --git a/packages/platform/platform-express/test/platform-express.spec.ts b/packages/platform/platform-express/test/platform-express.spec.ts index 88305ca7fa9..aa675f24352 100644 --- a/packages/platform/platform-express/test/platform-express.spec.ts +++ b/packages/platform/platform-express/test/platform-express.spec.ts @@ -1,6 +1,6 @@ import {PlatformTestSdk} from "@tsed/platform-test-sdk"; -import {PlatformExpress} from "../src/components/PlatformExpress"; -import {rootDir, Server} from "./app/Server"; +import {PlatformExpress} from "../src/components/PlatformExpress.js"; +import {rootDir, Server} from "./app/Server.js"; const utils = PlatformTestSdk.create({ rootDir, diff --git a/packages/platform/platform-express/test/query-parser.spec.ts b/packages/platform/platform-express/test/query-parser.spec.ts index 524069ccd61..69e4dc73178 100644 --- a/packages/platform/platform-express/test/query-parser.spec.ts +++ b/packages/platform/platform-express/test/query-parser.spec.ts @@ -1,6 +1,6 @@ -import {rootDir} from "./app/Server"; +import {rootDir} from "./app/Server.js"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; -import {PlatformExpress} from "../src/index"; +import {PlatformExpress} from "../src/index.js"; import SuperTest from "supertest"; import {Configuration, Controller, Get, Inject, PlatformApplication, PlatformTest, QueryParams} from "@tsed/common"; import {parse} from "querystring"; diff --git a/packages/platform/platform-express/test/response-filter.spec.ts b/packages/platform/platform-express/test/response-filter.spec.ts index 2175e5ad4cc..c253456c017 100644 --- a/packages/platform/platform-express/test/response-filter.spec.ts +++ b/packages/platform/platform-express/test/response-filter.spec.ts @@ -3,8 +3,8 @@ import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import {Returns} from "@tsed/schema"; import {ServerResponse} from "http"; import SuperTest from "supertest"; -import {PlatformExpress} from "../src/index"; -import {rootDir, Server} from "./app/Server"; +import {PlatformExpress} from "../src/index.js"; +import {rootDir, Server} from "./app/Server.js"; @ResponseFilter("plain/text") class PlainTextFilter { diff --git a/packages/platform/platform-express/test/validation-error.spec.ts b/packages/platform/platform-express/test/validation-error.spec.ts index 753b1acab4c..3586686e488 100644 --- a/packages/platform/platform-express/test/validation-error.spec.ts +++ b/packages/platform/platform-express/test/validation-error.spec.ts @@ -2,8 +2,8 @@ import {BodyParams, Controller, PlatformTest, Post, QueryParams} from "@tsed/com import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import {email, Email, Required} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformExpress} from "../src/index"; -import {rootDir, Server} from "./app/Server"; +import {PlatformExpress} from "../src/index.js"; +import {rootDir, Server} from "./app/Server.js"; class Model { @Required() diff --git a/packages/platform/platform-koa/src/components/PlatformKoa.spec.ts b/packages/platform/platform-koa/src/components/PlatformKoa.spec.ts index af2424c0d44..41bf1a71770 100644 --- a/packages/platform/platform-koa/src/components/PlatformKoa.spec.ts +++ b/packages/platform/platform-koa/src/components/PlatformKoa.spec.ts @@ -1,4 +1,4 @@ -import {PlatformKoa} from "./PlatformKoa"; +import {PlatformKoa} from "./PlatformKoa.js"; class Server {} diff --git a/packages/platform/platform-koa/src/components/PlatformKoa.ts b/packages/platform/platform-koa/src/components/PlatformKoa.ts index 627067e2a7c..e01a2cb9a7f 100644 --- a/packages/platform/platform-koa/src/components/PlatformKoa.ts +++ b/packages/platform/platform-koa/src/components/PlatformKoa.ts @@ -20,11 +20,11 @@ import koaBodyParser, {Options} from "koa-bodyparser"; // @ts-ignore import koaQs from "koa-qs"; import send from "koa-send"; -import {staticsMiddleware} from "../middlewares/staticsMiddleware"; -import {PlatformKoaHandler} from "../services/PlatformKoaHandler"; -import {PlatformKoaRequest} from "../services/PlatformKoaRequest"; -import {PlatformKoaResponse} from "../services/PlatformKoaResponse"; -import {getMulter} from "../utils/multer"; +import {staticsMiddleware} from "../middlewares/staticsMiddleware.js"; +import {PlatformKoaHandler} from "../services/PlatformKoaHandler.js"; +import {PlatformKoaRequest} from "../services/PlatformKoaRequest.js"; +import {PlatformKoaResponse} from "../services/PlatformKoaResponse.js"; +import {getMulter} from "../utils/multer.js"; declare global { namespace TsED { diff --git a/packages/platform/platform-koa/src/decorators/ctx.spec.ts b/packages/platform/platform-koa/src/decorators/ctx.spec.ts index af76b5cb593..3703ae05772 100644 --- a/packages/platform/platform-koa/src/decorators/ctx.spec.ts +++ b/packages/platform/platform-koa/src/decorators/ctx.spec.ts @@ -1,4 +1,4 @@ -import {Ctx} from "./ctx"; +import {Ctx} from "./ctx.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@Ctx", () => { diff --git a/packages/platform/platform-koa/src/decorators/state.spec.ts b/packages/platform/platform-koa/src/decorators/state.spec.ts index 1523827222d..cf12ff388c7 100644 --- a/packages/platform/platform-koa/src/decorators/state.spec.ts +++ b/packages/platform/platform-koa/src/decorators/state.spec.ts @@ -1,5 +1,5 @@ import {ParamTypes} from "@tsed/common"; -import {State} from "./state"; +import {State} from "./state.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@State", () => { diff --git a/packages/platform/platform-koa/src/index.ts b/packages/platform/platform-koa/src/index.ts index 2c07a5f2068..e2276be924a 100644 --- a/packages/platform/platform-koa/src/index.ts +++ b/packages/platform/platform-koa/src/index.ts @@ -2,13 +2,13 @@ * @file Automatically generated by barrelsby. */ -export * from "./components/PlatformKoa"; -export * from "./decorators/ctx"; -export * from "./decorators/state"; -export * from "./interfaces/PlatformKoaSettings"; -export * from "./interfaces/interfaces"; -export * from "./middlewares/staticsMiddleware"; -export * from "./services/PlatformKoaHandler"; -export * from "./services/PlatformKoaRequest"; -export * from "./services/PlatformKoaResponse"; -export * from "./utils/multer"; +export * from "./components/PlatformKoa.js"; +export * from "./decorators/ctx.js"; +export * from "./decorators/state.js"; +export * from "./interfaces/PlatformKoaSettings.js"; +export * from "./interfaces/interfaces.js"; +export * from "./middlewares/staticsMiddleware.js"; +export * from "./services/PlatformKoaHandler.js"; +export * from "./services/PlatformKoaRequest.js"; +export * from "./services/PlatformKoaResponse.js"; +export * from "./utils/multer.js"; diff --git a/packages/platform/platform-koa/src/interfaces/interfaces.ts b/packages/platform/platform-koa/src/interfaces/interfaces.ts index eeffb9189f4..70ef476b62b 100644 --- a/packages/platform/platform-koa/src/interfaces/interfaces.ts +++ b/packages/platform/platform-koa/src/interfaces/interfaces.ts @@ -1,7 +1,7 @@ import Koa from "koa"; -import {PlatformKoaSettings} from "./PlatformKoaSettings"; +import {PlatformKoaSettings} from "./PlatformKoaSettings.js"; -export * from "./PlatformKoaSettings"; +export * from "./PlatformKoaSettings.js"; declare global { namespace TsED { diff --git a/packages/platform/platform-koa/src/services/PlatformKoaRequest.spec.ts b/packages/platform/platform-koa/src/services/PlatformKoaRequest.spec.ts index 6dfdd26486c..fcdea47f557 100644 --- a/packages/platform/platform-koa/src/services/PlatformKoaRequest.spec.ts +++ b/packages/platform/platform-koa/src/services/PlatformKoaRequest.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {PlatformKoaRequest} from "./PlatformKoaRequest"; +import {PlatformKoaRequest} from "./PlatformKoaRequest.js"; function createRequest() { const req = PlatformTest.createRequest(); diff --git a/packages/platform/platform-koa/src/services/PlatformKoaResponse.spec.ts b/packages/platform/platform-koa/src/services/PlatformKoaResponse.spec.ts index e09faccd608..f9fac6a1306 100644 --- a/packages/platform/platform-koa/src/services/PlatformKoaResponse.spec.ts +++ b/packages/platform/platform-koa/src/services/PlatformKoaResponse.spec.ts @@ -1,6 +1,6 @@ import {PlatformTest} from "@tsed/common"; -import {PlatformKoaRequest} from "./PlatformKoaRequest"; -import {PlatformKoaResponse} from "./PlatformKoaResponse"; +import {PlatformKoaRequest} from "./PlatformKoaRequest.js"; +import {PlatformKoaResponse} from "./PlatformKoaResponse.js"; function createResponse() { const res = PlatformTest.createResponse(); diff --git a/packages/platform/platform-koa/test/app/index.ts b/packages/platform/platform-koa/test/app/index.ts index 58285a261d2..e7965a8291e 100644 --- a/packages/platform/platform-koa/test/app/index.ts +++ b/packages/platform/platform-koa/test/app/index.ts @@ -1,6 +1,6 @@ import {$log, Controller, Get} from "@tsed/common"; import {PlatformKoa} from "@tsed/platform-koa"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; if (process.env.NODE_ENV !== "test") { @Controller("/hello") diff --git a/packages/platform/platform-koa/test/platform-koa.spec.ts b/packages/platform/platform-koa/test/platform-koa.spec.ts index 02f189ee416..58d01b792c7 100644 --- a/packages/platform/platform-koa/test/platform-koa.spec.ts +++ b/packages/platform/platform-koa/test/platform-koa.spec.ts @@ -1,6 +1,6 @@ import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import {PlatformKoa} from "@tsed/platform-koa"; -import {rootDir, Server} from "./app/Server"; +import {rootDir, Server} from "./app/Server.js"; const utils = PlatformTestSdk.create({ rootDir, diff --git a/packages/platform/platform-log-middleware/src/index.ts b/packages/platform/platform-log-middleware/src/index.ts index 0fa5d806653..5d7d4f50488 100644 --- a/packages/platform/platform-log-middleware/src/index.ts +++ b/packages/platform/platform-log-middleware/src/index.ts @@ -2,5 +2,5 @@ * @file Automatically generated by barrelsby. */ -export * from "./domain/PlatformLogMiddlewareSettings"; -export * from "./middlewares/PlatformLogMiddleware"; +export * from "./domain/PlatformLogMiddlewareSettings.js"; +export * from "./middlewares/PlatformLogMiddleware.js"; diff --git a/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.spec.ts b/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.spec.ts index 490313be534..6e164f5fb9c 100644 --- a/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.spec.ts +++ b/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.spec.ts @@ -1,5 +1,5 @@ import {PlatformHandlerMetadata, PlatformTest} from "@tsed/common"; -import {PlatformLogMiddleware} from "./PlatformLogMiddleware"; +import {PlatformLogMiddleware} from "./PlatformLogMiddleware.js"; import "../domain/PlatformLogMiddlewareSettings"; async function createMiddlewareFixture({statusCode = 200, error}: {statusCode?: number; error?: any} = {}) { diff --git a/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.ts b/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.ts index d90eea826f8..0370b32e23d 100644 --- a/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.ts +++ b/packages/platform/platform-log-middleware/src/middlewares/PlatformLogMiddleware.ts @@ -2,7 +2,7 @@ import {cleanObject} from "@tsed/core"; import {Constant} from "@tsed/di"; import {Middleware, MiddlewareMethods} from "@tsed/platform-middlewares"; import {Context} from "@tsed/platform-params"; -import type {LoggerRequestFields} from "../domain/PlatformLogMiddlewareSettings"; +import type {LoggerRequestFields} from "../domain/PlatformLogMiddlewareSettings.js"; /** * @middleware diff --git a/packages/platform/platform-middlewares/src/decorators/authOptions.spec.ts b/packages/platform/platform-middlewares/src/decorators/authOptions.spec.ts index 95287cd7b51..cee09ad48ca 100644 --- a/packages/platform/platform-middlewares/src/decorators/authOptions.spec.ts +++ b/packages/platform/platform-middlewares/src/decorators/authOptions.spec.ts @@ -1,5 +1,5 @@ import {decoratorArgs, prototypeOf, Store, UnsupportedDecoratorType} from "@tsed/core"; -import {AuthOptions} from "./authOptions"; +import {AuthOptions} from "./authOptions.js"; class Guard { use() {} diff --git a/packages/platform/platform-middlewares/src/decorators/use.spec.ts b/packages/platform/platform-middlewares/src/decorators/use.spec.ts index 2bacf7d5c0e..0c920a73edf 100644 --- a/packages/platform/platform-middlewares/src/decorators/use.spec.ts +++ b/packages/platform/platform-middlewares/src/decorators/use.spec.ts @@ -1,6 +1,6 @@ import {EndpointMetadata} from "@tsed/common"; import {Store} from "@tsed/core"; -import {Use} from "./use"; +import {Use} from "./use.js"; describe("Use()", () => { describe("when the decorator is use on a method", () => { diff --git a/packages/platform/platform-middlewares/src/decorators/useAfter.spec.ts b/packages/platform/platform-middlewares/src/decorators/useAfter.spec.ts index d62eef252ce..33fae8f78b2 100644 --- a/packages/platform/platform-middlewares/src/decorators/useAfter.spec.ts +++ b/packages/platform/platform-middlewares/src/decorators/useAfter.spec.ts @@ -1,6 +1,6 @@ import {Store, UnsupportedDecoratorType} from "@tsed/core"; import {EndpointMetadata} from "@tsed/common"; -import {UseAfter} from "./useAfter"; +import {UseAfter} from "./useAfter.js"; class CustomMiddleware { use() {} diff --git a/packages/platform/platform-middlewares/src/decorators/useAuth.spec.ts b/packages/platform/platform-middlewares/src/decorators/useAuth.spec.ts index d2a5bf676cf..b34ef562393 100644 --- a/packages/platform/platform-middlewares/src/decorators/useAuth.spec.ts +++ b/packages/platform/platform-middlewares/src/decorators/useAuth.spec.ts @@ -1,6 +1,6 @@ import {EndpointMetadata} from "@tsed/common"; import {decoratorArgs, prototypeOf, Store, UnsupportedDecoratorType} from "@tsed/core"; -import {UseAuth} from "./useAuth"; +import {UseAuth} from "./useAuth.js"; class Guard { use() {} diff --git a/packages/platform/platform-middlewares/src/decorators/useAuth.ts b/packages/platform/platform-middlewares/src/decorators/useAuth.ts index c623bd5d256..79b6171a772 100644 --- a/packages/platform/platform-middlewares/src/decorators/useAuth.ts +++ b/packages/platform/platform-middlewares/src/decorators/useAuth.ts @@ -9,8 +9,8 @@ import { UnsupportedDecoratorType, useDecorators } from "@tsed/core"; -import {AuthOptions} from "./authOptions"; -import {UseBefore} from "./useBefore"; +import {AuthOptions} from "./authOptions.js"; +import {UseBefore} from "./useBefore.js"; /** * Use custom authentication strategy on your endpoint. diff --git a/packages/platform/platform-middlewares/src/decorators/useBefore.spec.ts b/packages/platform/platform-middlewares/src/decorators/useBefore.spec.ts index 24ce8d48818..4429955739a 100644 --- a/packages/platform/platform-middlewares/src/decorators/useBefore.spec.ts +++ b/packages/platform/platform-middlewares/src/decorators/useBefore.spec.ts @@ -1,6 +1,6 @@ import {EndpointMetadata} from "@tsed/common"; import {Store, UnsupportedDecoratorType} from "@tsed/core"; -import {UseBefore} from "./useBefore"; +import {UseBefore} from "./useBefore.js"; class CustomMiddleware { use() {} diff --git a/packages/platform/platform-middlewares/src/decorators/useBeforeEach.spec.ts b/packages/platform/platform-middlewares/src/decorators/useBeforeEach.spec.ts index 6bb20c01a0e..feb683180a9 100644 --- a/packages/platform/platform-middlewares/src/decorators/useBeforeEach.spec.ts +++ b/packages/platform/platform-middlewares/src/decorators/useBeforeEach.spec.ts @@ -1,6 +1,6 @@ import {EndpointMetadata} from "@tsed/common"; import {UnsupportedDecoratorType} from "@tsed/core"; -import {UseBeforeEach} from "./useBeforeEach"; +import {UseBeforeEach} from "./useBeforeEach.js"; class CustomMiddleware { use() {} diff --git a/packages/platform/platform-middlewares/src/decorators/useBeforeEach.ts b/packages/platform/platform-middlewares/src/decorators/useBeforeEach.ts index f5075d321a4..9367e04d087 100644 --- a/packages/platform/platform-middlewares/src/decorators/useBeforeEach.ts +++ b/packages/platform/platform-middlewares/src/decorators/useBeforeEach.ts @@ -1,5 +1,5 @@ import {decorateMethodsOf, DecoratorParameters, decoratorTypeOf, DecoratorTypes, UnsupportedDecoratorType} from "@tsed/core"; -import {UseBefore} from "./useBefore"; +import {UseBefore} from "./useBefore.js"; /** * Mounts the specified middleware function or functions at the specified path: the middleware function is executed when diff --git a/packages/platform/platform-middlewares/src/index.ts b/packages/platform/platform-middlewares/src/index.ts index 82d951f5404..84642474a16 100644 --- a/packages/platform/platform-middlewares/src/index.ts +++ b/packages/platform/platform-middlewares/src/index.ts @@ -2,14 +2,14 @@ * @file Automatically generated by barrelsby. */ -export * from "./constants/constants"; -export * from "./decorators/authOptions"; -export * from "./decorators/middleware"; -export * from "./decorators/use"; -export * from "./decorators/useAfter"; -export * from "./decorators/useAuth"; -export * from "./decorators/useBefore"; -export * from "./decorators/useBeforeEach"; -export * from "./domain/MiddlewareMethods"; -export * from "./domain/PlatformMiddlewareSettings"; -export * from "./utils/getMiddlewaresForHook"; +export * from "./constants/constants.js"; +export * from "./decorators/authOptions.js"; +export * from "./decorators/middleware.js"; +export * from "./decorators/use.js"; +export * from "./decorators/useAfter.js"; +export * from "./decorators/useAuth.js"; +export * from "./decorators/useBefore.js"; +export * from "./decorators/useBeforeEach.js"; +export * from "./domain/MiddlewareMethods.js"; +export * from "./domain/PlatformMiddlewareSettings.js"; +export * from "./utils/getMiddlewaresForHook.js"; diff --git a/packages/platform/platform-middlewares/src/utils/getMiddlewaresForHook.ts b/packages/platform/platform-middlewares/src/utils/getMiddlewaresForHook.ts index 8eff5ba8aa8..354ee5db86f 100644 --- a/packages/platform/platform-middlewares/src/utils/getMiddlewaresForHook.ts +++ b/packages/platform/platform-middlewares/src/utils/getMiddlewaresForHook.ts @@ -1,5 +1,5 @@ import {DIConfiguration} from "@tsed/di"; -import {PlatformMiddlewareLoadingOptions} from "../domain/PlatformMiddlewareSettings"; +import {PlatformMiddlewareLoadingOptions} from "../domain/PlatformMiddlewareSettings.js"; export function getMiddlewaresForHook(hook: string, settings: DIConfiguration, defaultHook = "") { const env = settings.env; diff --git a/packages/platform/platform-middlewares/src/utils/getMiddlewaresForHooks.spec.ts b/packages/platform/platform-middlewares/src/utils/getMiddlewaresForHooks.spec.ts index 4363b042092..fbc7028281c 100644 --- a/packages/platform/platform-middlewares/src/utils/getMiddlewaresForHooks.spec.ts +++ b/packages/platform/platform-middlewares/src/utils/getMiddlewaresForHooks.spec.ts @@ -1,5 +1,5 @@ import {DIConfiguration} from "@tsed/di"; -import {getMiddlewaresForHook} from "./getMiddlewaresForHook"; +import {getMiddlewaresForHook} from "./getMiddlewaresForHook.js"; describe("getMiddlewaresForHooks", () => { it("should return the middlewares for given hook (without default hook)", () => { diff --git a/packages/platform/platform-params/src/builder/PlatformParams.spec.ts b/packages/platform/platform-params/src/builder/PlatformParams.spec.ts index c667d67cfb1..ed4fd7896aa 100644 --- a/packages/platform/platform-params/src/builder/PlatformParams.spec.ts +++ b/packages/platform/platform-params/src/builder/PlatformParams.spec.ts @@ -1,9 +1,9 @@ import {PlatformTest, ProviderScope} from "@tsed/common"; import {Injectable} from "@tsed/di"; -import {buildPlatformParams, invokePlatformParams} from "../../../../../test/helper/buildPlatformParams"; -import {PathParams} from "../decorators/pathParams"; -import {QueryParams} from "../decorators/queryParams"; -import {ParamTypes} from "../domain/ParamTypes"; +import {buildPlatformParams, invokePlatformParams} from "../../../../../test/helper/buildPlatformParams.js"; +import {PathParams} from "../decorators/pathParams.js"; +import {QueryParams} from "../decorators/queryParams.js"; +import {ParamTypes} from "../domain/ParamTypes.js"; describe("PlatformParams", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/platform/platform-params/src/builder/PlatformParams.ts b/packages/platform/platform-params/src/builder/PlatformParams.ts index 9da138c38ac..029e626b232 100644 --- a/packages/platform/platform-params/src/builder/PlatformParams.ts +++ b/packages/platform/platform-params/src/builder/PlatformParams.ts @@ -1,7 +1,7 @@ import {DIContext, Inject, Injectable, InjectorService, ProviderScope, TokenProvider} from "@tsed/di"; import {JsonMethodStore, JsonParameterStore, PipeMethods} from "@tsed/schema"; -import {ParamValidationError} from "../errors/ParamValidationError"; -import {ParseExpressionPipe} from "../pipes/ParseExpressionPipe"; +import {ParamValidationError} from "../errors/ParamValidationError.js"; +import {ParseExpressionPipe} from "../pipes/ParseExpressionPipe.js"; export type PlatformParamsScope = {$ctx: Context} & Record; export type PlatformParamsCallback = (scope: PlatformParamsScope) => Promise; diff --git a/packages/platform/platform-params/src/decorators/bodyParams.spec.ts b/packages/platform/platform-params/src/decorators/bodyParams.spec.ts index 74bb145bfc6..6525f07da72 100644 --- a/packages/platform/platform-params/src/decorators/bodyParams.spec.ts +++ b/packages/platform/platform-params/src/decorators/bodyParams.spec.ts @@ -1,7 +1,7 @@ import {Controller} from "@tsed/di"; import {getSpec, JsonParameterStore, Post, SpecTypes} from "@tsed/schema"; -import {ParamTypes} from "../domain/ParamTypes"; -import {BodyParams, RawBodyParams} from "./bodyParams"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {BodyParams, RawBodyParams} from "./bodyParams.js"; describe("@BodyParams", () => { it("should call useParam method with the correct parameters", () => { diff --git a/packages/platform/platform-params/src/decorators/bodyParams.ts b/packages/platform/platform-params/src/decorators/bodyParams.ts index 5d482315609..46a7b8669d4 100644 --- a/packages/platform/platform-params/src/decorators/bodyParams.ts +++ b/packages/platform/platform-params/src/decorators/bodyParams.ts @@ -1,8 +1,8 @@ import {Type} from "@tsed/core"; -import {ParamOptions} from "../domain/ParamOptions"; -import {ParamTypes} from "../domain/ParamTypes"; -import {UseParam} from "./useParam"; -import {mapParamsOptions} from "../utils/mapParamsOptions"; +import {ParamOptions} from "../domain/ParamOptions.js"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {UseParam} from "./useParam.js"; +import {mapParamsOptions} from "../utils/mapParamsOptions.js"; /** * BodyParams return the value from [request.body](http://expressjs.com/en/4x/api.html#req.body) object. diff --git a/packages/platform/platform-params/src/decorators/context.spec.ts b/packages/platform/platform-params/src/decorators/context.spec.ts index d7a65f3e632..48f5951aaaa 100644 --- a/packages/platform/platform-params/src/decorators/context.spec.ts +++ b/packages/platform/platform-params/src/decorators/context.spec.ts @@ -1,5 +1,5 @@ -import {ParamTypes} from "../domain/ParamTypes"; -import {Context} from "./context"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {Context} from "./context.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@Context ", () => { diff --git a/packages/platform/platform-params/src/decorators/context.ts b/packages/platform/platform-params/src/decorators/context.ts index 8cbdc408a54..9dcab61a6a2 100644 --- a/packages/platform/platform-params/src/decorators/context.ts +++ b/packages/platform/platform-params/src/decorators/context.ts @@ -1,7 +1,7 @@ import {BaseContext} from "@tsed/di"; -import {ParamTypes} from "../domain/ParamTypes"; -import {mapParamsOptions} from "../utils/mapParamsOptions"; -import {UseParam} from "./useParam"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {mapParamsOptions} from "../utils/mapParamsOptions.js"; +import {UseParam} from "./useParam.js"; /** * Context decorator return the @@PlatformContext@@ created by Ts.ED when request is handled by the server. diff --git a/packages/platform/platform-params/src/decorators/cookies.spec.ts b/packages/platform/platform-params/src/decorators/cookies.spec.ts index c183598bce9..0a07fcd1990 100644 --- a/packages/platform/platform-params/src/decorators/cookies.spec.ts +++ b/packages/platform/platform-params/src/decorators/cookies.spec.ts @@ -1,5 +1,5 @@ -import {ParamTypes} from "../domain/ParamTypes"; -import {Cookies} from "./cookies"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {Cookies} from "./cookies.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@Cookies", () => { diff --git a/packages/platform/platform-params/src/decorators/cookies.ts b/packages/platform/platform-params/src/decorators/cookies.ts index 30855019343..cc334148181 100644 --- a/packages/platform/platform-params/src/decorators/cookies.ts +++ b/packages/platform/platform-params/src/decorators/cookies.ts @@ -1,8 +1,8 @@ import {Type} from "@tsed/core"; -import {ParamOptions} from "../domain/ParamOptions"; -import {ParamTypes} from "../domain/ParamTypes"; -import {mapParamsOptions} from "../utils/mapParamsOptions"; -import {UseParam} from "./useParam"; +import {ParamOptions} from "../domain/ParamOptions.js"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {mapParamsOptions} from "../utils/mapParamsOptions.js"; +import {UseParam} from "./useParam.js"; /** * Cookies or CookiesParams return the value from [request.cookies](http://expressjs.com/en/4x/api.html#req.cookies) object. diff --git a/packages/platform/platform-params/src/decorators/headerParams.spec.ts b/packages/platform/platform-params/src/decorators/headerParams.spec.ts index 87cd4dd2e61..e79d2382bf0 100644 --- a/packages/platform/platform-params/src/decorators/headerParams.spec.ts +++ b/packages/platform/platform-params/src/decorators/headerParams.spec.ts @@ -1,5 +1,5 @@ -import {ParamTypes} from "../domain/ParamTypes"; -import {HeaderParams} from "./headerParams"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {HeaderParams} from "./headerParams.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@HeaderParams", () => { diff --git a/packages/platform/platform-params/src/decorators/headerParams.ts b/packages/platform/platform-params/src/decorators/headerParams.ts index ee244c4e845..7cb5c2bda35 100644 --- a/packages/platform/platform-params/src/decorators/headerParams.ts +++ b/packages/platform/platform-params/src/decorators/headerParams.ts @@ -1,8 +1,8 @@ import {Type} from "@tsed/core"; -import {ParamTypes} from "../domain/ParamTypes"; -import {UseParam} from "./useParam"; -import {mapParamsOptions} from "../utils/mapParamsOptions"; -import {ParamOptions} from "../domain/ParamOptions"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {UseParam} from "./useParam.js"; +import {mapParamsOptions} from "../utils/mapParamsOptions.js"; +import {ParamOptions} from "../domain/ParamOptions.js"; /** * HeaderParams return the value from [`request.get()`](http://expressjs.com/en/4x/api.html#req.get) method. diff --git a/packages/platform/platform-params/src/decorators/locals.spec.ts b/packages/platform/platform-params/src/decorators/locals.spec.ts index af4a198671e..26dac9829f5 100644 --- a/packages/platform/platform-params/src/decorators/locals.spec.ts +++ b/packages/platform/platform-params/src/decorators/locals.spec.ts @@ -1,5 +1,5 @@ -import {ParamTypes} from "../domain/ParamTypes"; -import {Locals} from "./locals"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {Locals} from "./locals.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@Locals", () => { diff --git a/packages/platform/platform-params/src/decorators/locals.ts b/packages/platform/platform-params/src/decorators/locals.ts index 6ffa167a5d3..2ec70333f1f 100644 --- a/packages/platform/platform-params/src/decorators/locals.ts +++ b/packages/platform/platform-params/src/decorators/locals.ts @@ -1,6 +1,6 @@ -import {ParamTypes} from "../domain/ParamTypes"; -import {mapParamsOptions} from "../utils/mapParamsOptions"; -import {UseParam} from "./useParam"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {mapParamsOptions} from "../utils/mapParamsOptions.js"; +import {UseParam} from "./useParam.js"; /** * Locals return the value from [response.locals](http://expressjs.com/en/4x/api.html#res.locals) object. diff --git a/packages/platform/platform-params/src/decorators/pathParams.spec.ts b/packages/platform/platform-params/src/decorators/pathParams.spec.ts index 13973882f40..124590dc736 100644 --- a/packages/platform/platform-params/src/decorators/pathParams.spec.ts +++ b/packages/platform/platform-params/src/decorators/pathParams.spec.ts @@ -1,6 +1,6 @@ import {JsonParameterStore} from "@tsed/schema"; -import {ParamTypes} from "../domain/ParamTypes"; -import {PathParams, RawPathParams} from "./pathParams"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {PathParams, RawPathParams} from "./pathParams.js"; describe("@PathParams", () => { it("should declare a path params", () => { diff --git a/packages/platform/platform-params/src/decorators/pathParams.ts b/packages/platform/platform-params/src/decorators/pathParams.ts index 5c754dac7b1..19bf466856a 100644 --- a/packages/platform/platform-params/src/decorators/pathParams.ts +++ b/packages/platform/platform-params/src/decorators/pathParams.ts @@ -1,8 +1,8 @@ import {Type} from "@tsed/core"; -import {ParamOptions} from "../domain/ParamOptions"; -import {ParamTypes} from "../domain/ParamTypes"; -import {mapParamsOptions} from "../utils/mapParamsOptions"; -import {UseParam} from "./useParam"; +import {ParamOptions} from "../domain/ParamOptions.js"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {mapParamsOptions} from "../utils/mapParamsOptions.js"; +import {UseParam} from "./useParam.js"; /** * PathParams return the value from [request.params](http://expressjs.com/en/4x/api.html#req.params) object. diff --git a/packages/platform/platform-params/src/decorators/queryParams.spec.ts b/packages/platform/platform-params/src/decorators/queryParams.spec.ts index 2c1e6a4f16d..654adb9dedc 100644 --- a/packages/platform/platform-params/src/decorators/queryParams.spec.ts +++ b/packages/platform/platform-params/src/decorators/queryParams.spec.ts @@ -1,6 +1,6 @@ import {JsonParameterStore} from "@tsed/schema"; -import {ParamTypes} from "../domain/ParamTypes"; -import {QueryParams, RawQueryParams} from "./queryParams"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {QueryParams, RawQueryParams} from "./queryParams.js"; describe("@QueryParams", () => { it("should declare query params", () => { diff --git a/packages/platform/platform-params/src/decorators/queryParams.ts b/packages/platform/platform-params/src/decorators/queryParams.ts index f2f225f18e3..ef213f3ec9b 100644 --- a/packages/platform/platform-params/src/decorators/queryParams.ts +++ b/packages/platform/platform-params/src/decorators/queryParams.ts @@ -1,8 +1,8 @@ import {Type} from "@tsed/core"; -import {ParamOptions} from "../domain/ParamOptions"; -import {ParamTypes} from "../domain/ParamTypes"; -import {mapParamsOptions} from "../utils/mapParamsOptions"; -import {UseParam} from "./useParam"; +import {ParamOptions} from "../domain/ParamOptions.js"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {mapParamsOptions} from "../utils/mapParamsOptions.js"; +import {UseParam} from "./useParam.js"; /** * QueryParams return the value from [request.query](http://expressjs.com/en/4x/api.html#req.query) object. diff --git a/packages/platform/platform-params/src/decorators/session.spec.ts b/packages/platform/platform-params/src/decorators/session.spec.ts index fbbf8fc54d5..58f0904e91c 100644 --- a/packages/platform/platform-params/src/decorators/session.spec.ts +++ b/packages/platform/platform-params/src/decorators/session.spec.ts @@ -1,5 +1,5 @@ -import {Session} from "./session"; -import {ParamTypes} from "../domain/ParamTypes"; +import {Session} from "./session.js"; +import {ParamTypes} from "../domain/ParamTypes.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@Session", () => { diff --git a/packages/platform/platform-params/src/decorators/session.ts b/packages/platform/platform-params/src/decorators/session.ts index 3a762c8cef8..96c72438ebd 100644 --- a/packages/platform/platform-params/src/decorators/session.ts +++ b/packages/platform/platform-params/src/decorators/session.ts @@ -1,7 +1,7 @@ -import {ParamOptions} from "../domain/ParamOptions"; -import {ParamTypes} from "../domain/ParamTypes"; -import {mapParamsOptions} from "../utils/mapParamsOptions"; -import {UseParam} from "./useParam"; +import {ParamOptions} from "../domain/ParamOptions.js"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {mapParamsOptions} from "../utils/mapParamsOptions.js"; +import {UseParam} from "./useParam.js"; /** * Session return the value from [request.session](http://expressjs.com/en/4x/api.html#req.session) object. diff --git a/packages/platform/platform-params/src/decorators/useDeserialization.ts b/packages/platform/platform-params/src/decorators/useDeserialization.ts index 4d69f5864d3..84dc91a4131 100644 --- a/packages/platform/platform-params/src/decorators/useDeserialization.ts +++ b/packages/platform/platform-params/src/decorators/useDeserialization.ts @@ -1,5 +1,5 @@ -import {DeserializerPipe} from "../pipes/DeserializerPipe"; -import {UsePipe} from "./usePipe"; +import {DeserializerPipe} from "../pipes/DeserializerPipe.js"; +import {UsePipe} from "./usePipe.js"; /** * Use JsonMapper to deserialize the data. diff --git a/packages/platform/platform-params/src/decorators/useParam.spec.ts b/packages/platform/platform-params/src/decorators/useParam.spec.ts index da791c39220..75edf184d01 100644 --- a/packages/platform/platform-params/src/decorators/useParam.spec.ts +++ b/packages/platform/platform-params/src/decorators/useParam.spec.ts @@ -1,8 +1,8 @@ import {Get} from "@tsed/common"; import {Description, Example, getSpec, JsonParameterStore, Property, Required, SpecTypes, Title} from "@tsed/schema"; -import {ParamTypes} from "../domain/ParamTypes"; -import {QueryParams} from "./queryParams"; -import {UseParam} from "./useParam"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {QueryParams} from "./queryParams.js"; +import {UseParam} from "./useParam.js"; export class MyModel { @Title("iD") diff --git a/packages/platform/platform-params/src/decorators/useParam.ts b/packages/platform/platform-params/src/decorators/useParam.ts index 6f4793e7536..817570dc4d3 100644 --- a/packages/platform/platform-params/src/decorators/useParam.ts +++ b/packages/platform/platform-params/src/decorators/useParam.ts @@ -1,10 +1,10 @@ import {useDecorators} from "@tsed/core"; -import {ParamOptions} from "../domain/ParamOptions"; -import {ParamTypes} from "../domain/ParamTypes"; -import {UseDeserialization} from "./useDeserialization"; -import {UseParamType} from "./useParamType"; -import {UseType} from "./useType"; -import {UseValidation} from "./useValidation"; +import {ParamOptions} from "../domain/ParamOptions.js"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {UseDeserialization} from "./useDeserialization.js"; +import {UseParamType} from "./useParamType.js"; +import {UseType} from "./useType.js"; +import {UseValidation} from "./useValidation.js"; /** * @ignore diff --git a/packages/platform/platform-params/src/decorators/useParamExpression.ts b/packages/platform/platform-params/src/decorators/useParamExpression.ts index 51abed57b41..8cf637f142b 100644 --- a/packages/platform/platform-params/src/decorators/useParamExpression.ts +++ b/packages/platform/platform-params/src/decorators/useParamExpression.ts @@ -1,4 +1,4 @@ -import {ParamFn} from "./paramFn"; +import {ParamFn} from "./paramFn.js"; /** * Get data from a path inside the given object diff --git a/packages/platform/platform-params/src/decorators/useParamType.ts b/packages/platform/platform-params/src/decorators/useParamType.ts index f810dbcd4a2..681a2167985 100644 --- a/packages/platform/platform-params/src/decorators/useParamType.ts +++ b/packages/platform/platform-params/src/decorators/useParamType.ts @@ -1,9 +1,9 @@ import {isBuffer, useDecorators} from "@tsed/core"; import {isParameterType, Name} from "@tsed/schema"; -import {ParamFn} from "./paramFn"; -import {ParamOptions} from "../domain/ParamOptions"; -import {UseParamExpression} from "./useParamExpression"; -import {PARAM_TYPES_DATA_PATH, ParamTypes} from "../domain/ParamTypes"; +import {ParamFn} from "./paramFn.js"; +import {ParamOptions} from "../domain/ParamOptions.js"; +import {UseParamExpression} from "./useParamExpression.js"; +import {PARAM_TYPES_DATA_PATH, ParamTypes} from "../domain/ParamTypes.js"; /** * Get the object from request (like body, params, query, etc...). diff --git a/packages/platform/platform-params/src/decorators/usePipe.ts b/packages/platform/platform-params/src/decorators/usePipe.ts index a39d798e77f..ceab0410417 100644 --- a/packages/platform/platform-params/src/decorators/usePipe.ts +++ b/packages/platform/platform-params/src/decorators/usePipe.ts @@ -1,6 +1,6 @@ import {Type} from "@tsed/core"; import {PipeMethods} from "@tsed/schema"; -import {ParamFn} from "./paramFn"; +import {ParamFn} from "./paramFn.js"; /** * Register a Pipe to be used with the current decorated param. diff --git a/packages/platform/platform-params/src/decorators/useType.ts b/packages/platform/platform-params/src/decorators/useType.ts index f2f6a8f73f0..6067ab9dcde 100644 --- a/packages/platform/platform-params/src/decorators/useType.ts +++ b/packages/platform/platform-params/src/decorators/useType.ts @@ -1,6 +1,6 @@ import {Type} from "@tsed/core"; import {Any, CollectionOf} from "@tsed/schema"; -import {ParamFn} from "./paramFn"; +import {ParamFn} from "./paramFn.js"; /** * Set the type of the item collection. diff --git a/packages/platform/platform-params/src/decorators/useValidation.ts b/packages/platform/platform-params/src/decorators/useValidation.ts index f53dffbc2a0..992a105734d 100644 --- a/packages/platform/platform-params/src/decorators/useValidation.ts +++ b/packages/platform/platform-params/src/decorators/useValidation.ts @@ -1,5 +1,5 @@ -import {ValidationPipe} from "../pipes/ValidationPipe"; -import {ParamFn} from "./paramFn"; +import {ValidationPipe} from "../pipes/ValidationPipe.js"; +import {ParamFn} from "./paramFn.js"; /** * Enable validation on the decoratored parameter. diff --git a/packages/platform/platform-params/src/errors/ParamValidationError.spec.ts b/packages/platform/platform-params/src/errors/ParamValidationError.spec.ts index ad2c673d525..41e2a7b1af6 100644 --- a/packages/platform/platform-params/src/errors/ParamValidationError.spec.ts +++ b/packages/platform/platform-params/src/errors/ParamValidationError.spec.ts @@ -1,5 +1,5 @@ import {RequiredValidationError, ValidationError} from "@tsed/common"; -import {ParamValidationError} from "./ParamValidationError"; +import {ParamValidationError} from "./ParamValidationError.js"; describe("ParseExpressionError", () => { it("should return error without transformation", () => { diff --git a/packages/platform/platform-params/src/errors/ParamValidationError.ts b/packages/platform/platform-params/src/errors/ParamValidationError.ts index 63ac39bc92f..2d5efcacde3 100644 --- a/packages/platform/platform-params/src/errors/ParamValidationError.ts +++ b/packages/platform/platform-params/src/errors/ParamValidationError.ts @@ -1,7 +1,7 @@ import {nameOf} from "@tsed/core"; import {BadRequest} from "@tsed/exceptions"; import {JsonParameterStore} from "@tsed/schema"; -import {ValidationError} from "./ValidationError"; +import {ValidationError} from "./ValidationError.js"; export class ParamValidationError extends BadRequest { public name: string = "PARAM_VALIDATION_ERROR"; diff --git a/packages/platform/platform-params/src/errors/RequiredValidationError.ts b/packages/platform/platform-params/src/errors/RequiredValidationError.ts index b70d563573b..723b0b4d5a2 100644 --- a/packages/platform/platform-params/src/errors/RequiredValidationError.ts +++ b/packages/platform/platform-params/src/errors/RequiredValidationError.ts @@ -1,5 +1,5 @@ import {nameOf} from "@tsed/core"; -import {ValidationError} from "./ValidationError"; +import {ValidationError} from "./ValidationError.js"; import {JsonParameterStore} from "@tsed/schema"; export class RequiredValidationError extends ValidationError { diff --git a/packages/platform/platform-params/src/index.ts b/packages/platform/platform-params/src/index.ts index 8e3551c90c0..f2f7e9b4fb1 100644 --- a/packages/platform/platform-params/src/index.ts +++ b/packages/platform/platform-params/src/index.ts @@ -2,31 +2,31 @@ * @file Automatically generated by barrelsby. */ -export * from "./exports"; -export * from "./builder/PlatformParams"; -export * from "./decorators/bodyParams"; -export * from "./decorators/context"; -export * from "./decorators/cookies"; -export * from "./decorators/headerParams"; -export * from "./decorators/locals"; -export * from "./decorators/paramFn"; -export * from "./decorators/pathParams"; -export * from "./decorators/queryParams"; -export * from "./decorators/session"; -export * from "./decorators/useDeserialization"; -export * from "./decorators/useParam"; -export * from "./decorators/useParamExpression"; -export * from "./decorators/useParamType"; -export * from "./decorators/usePipe"; -export * from "./decorators/useType"; -export * from "./decorators/useValidation"; -export * from "./domain/ParamMetadata"; -export * from "./domain/ParamOptions"; -export * from "./domain/ParamTypes"; -export * from "./errors/ParamValidationError"; -export * from "./errors/RequiredValidationError"; -export * from "./errors/ValidationError"; -export * from "./pipes/DeserializerPipe"; -export * from "./pipes/ParseExpressionPipe"; -export * from "./pipes/ValidationPipe"; -export * from "./utils/mapParamsOptions"; +export * from "./exports.js"; +export * from "./builder/PlatformParams.js"; +export * from "./decorators/bodyParams.js"; +export * from "./decorators/context.js"; +export * from "./decorators/cookies.js"; +export * from "./decorators/headerParams.js"; +export * from "./decorators/locals.js"; +export * from "./decorators/paramFn.js"; +export * from "./decorators/pathParams.js"; +export * from "./decorators/queryParams.js"; +export * from "./decorators/session.js"; +export * from "./decorators/useDeserialization.js"; +export * from "./decorators/useParam.js"; +export * from "./decorators/useParamExpression.js"; +export * from "./decorators/useParamType.js"; +export * from "./decorators/usePipe.js"; +export * from "./decorators/useType.js"; +export * from "./decorators/useValidation.js"; +export * from "./domain/ParamMetadata.js"; +export * from "./domain/ParamOptions.js"; +export * from "./domain/ParamTypes.js"; +export * from "./errors/ParamValidationError.js"; +export * from "./errors/RequiredValidationError.js"; +export * from "./errors/ValidationError.js"; +export * from "./pipes/DeserializerPipe.js"; +export * from "./pipes/ParseExpressionPipe.js"; +export * from "./pipes/ValidationPipe.js"; +export * from "./utils/mapParamsOptions.js"; diff --git a/packages/platform/platform-params/src/pipes/DeserializerPipe.spec.ts b/packages/platform/platform-params/src/pipes/DeserializerPipe.spec.ts index 46b2623d75f..e1f146781bf 100644 --- a/packages/platform/platform-params/src/pipes/DeserializerPipe.spec.ts +++ b/packages/platform/platform-params/src/pipes/DeserializerPipe.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest} from "@tsed/common"; -import {BodyParams} from "../decorators/bodyParams"; -import {QueryParams} from "../decorators/queryParams"; -import {DeserializerPipe} from "./DeserializerPipe"; +import {BodyParams} from "../decorators/bodyParams.js"; +import {QueryParams} from "../decorators/queryParams.js"; +import {DeserializerPipe} from "./DeserializerPipe.js"; import {JsonParameterStore} from "@tsed/schema"; describe("DeserializerPipe", () => { diff --git a/packages/platform/platform-params/src/pipes/ParseExpressionPipe.spec.ts b/packages/platform/platform-params/src/pipes/ParseExpressionPipe.spec.ts index ee0d23ef81c..5a10b439d2d 100644 --- a/packages/platform/platform-params/src/pipes/ParseExpressionPipe.spec.ts +++ b/packages/platform/platform-params/src/pipes/ParseExpressionPipe.spec.ts @@ -1,5 +1,5 @@ import {ParamTypes, PlatformTest} from "@tsed/common"; -import {ParseExpressionPipe} from "./ParseExpressionPipe"; +import {ParseExpressionPipe} from "./ParseExpressionPipe.js"; import {JsonParameterStore} from "@tsed/schema"; import {DecoratorTypes} from "@tsed/core"; diff --git a/packages/platform/platform-params/src/pipes/ParseExpressionPipe.ts b/packages/platform/platform-params/src/pipes/ParseExpressionPipe.ts index 2e7a3dd851f..f5d2f60328b 100644 --- a/packages/platform/platform-params/src/pipes/ParseExpressionPipe.ts +++ b/packages/platform/platform-params/src/pipes/ParseExpressionPipe.ts @@ -1,8 +1,8 @@ import {getValue} from "@tsed/core"; import {Injectable} from "@tsed/di"; import {JsonParameterStore, PipeMethods} from "@tsed/schema"; -import {PlatformParamsScope} from "../builder/PlatformParams"; -import {ParamTypes} from "../domain/ParamTypes"; +import {PlatformParamsScope} from "../builder/PlatformParams.js"; +import {ParamTypes} from "../domain/ParamTypes.js"; @Injectable({ priority: -1000 diff --git a/packages/platform/platform-params/src/pipes/ValidationPipe.spec.ts b/packages/platform/platform-params/src/pipes/ValidationPipe.spec.ts index c8d33d46b98..9efb8452e0a 100644 --- a/packages/platform/platform-params/src/pipes/ValidationPipe.spec.ts +++ b/packages/platform/platform-params/src/pipes/ValidationPipe.spec.ts @@ -1,10 +1,10 @@ import {PlatformTest, Post} from "@tsed/common"; import {catchAsyncError} from "@tsed/core"; import {CollectionOf, getSpec, JsonParameterStore, Required, SpecTypes} from "@tsed/schema"; -import {BodyParams} from "../decorators/bodyParams"; -import {PathParams} from "../decorators/pathParams"; -import {QueryParams} from "../decorators/queryParams"; -import {ValidationPipe} from "./ValidationPipe"; +import {BodyParams} from "../decorators/bodyParams.js"; +import {PathParams} from "../decorators/pathParams.js"; +import {QueryParams} from "../decorators/queryParams.js"; +import {ValidationPipe} from "./ValidationPipe.js"; describe("ValidationPipe", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/platform/platform-params/src/pipes/ValidationPipe.ts b/packages/platform/platform-params/src/pipes/ValidationPipe.ts index e0127494225..4f97d21cb5c 100644 --- a/packages/platform/platform-params/src/pipes/ValidationPipe.ts +++ b/packages/platform/platform-params/src/pipes/ValidationPipe.ts @@ -1,8 +1,8 @@ import {Inject, Injectable} from "@tsed/di"; import {deserialize} from "@tsed/json-mapper"; import {getJsonSchema, JsonParameterStore, PipeMethods} from "@tsed/schema"; -import {ParamTypes} from "../domain/ParamTypes"; -import {RequiredValidationError} from "../errors/RequiredValidationError"; +import {ParamTypes} from "../domain/ParamTypes.js"; +import {RequiredValidationError} from "../errors/RequiredValidationError.js"; function cast(value: any, metadata: JsonParameterStore) { try { diff --git a/packages/platform/platform-params/src/utils/mapParamsOptions.spec.ts b/packages/platform/platform-params/src/utils/mapParamsOptions.spec.ts index 93f5df7c9c5..a9a12a9ef37 100644 --- a/packages/platform/platform-params/src/utils/mapParamsOptions.spec.ts +++ b/packages/platform/platform-params/src/utils/mapParamsOptions.spec.ts @@ -1,4 +1,4 @@ -import {mapParamsOptions} from "./mapParamsOptions"; +import {mapParamsOptions} from "./mapParamsOptions.js"; class Test {} diff --git a/packages/platform/platform-params/src/utils/mapParamsOptions.ts b/packages/platform/platform-params/src/utils/mapParamsOptions.ts index 6238144c813..b35c93efbdf 100644 --- a/packages/platform/platform-params/src/utils/mapParamsOptions.ts +++ b/packages/platform/platform-params/src/utils/mapParamsOptions.ts @@ -1,5 +1,5 @@ import {isObject} from "@tsed/core"; -import {ParamOptions} from "../domain/ParamOptions"; +import {ParamOptions} from "../domain/ParamOptions.js"; /** * @ignore diff --git a/packages/platform/platform-response-filter/readme.md b/packages/platform/platform-response-filter/readme.md index 8eca811ca13..b8d05943ed2 100644 --- a/packages/platform/platform-response-filter/readme.md +++ b/packages/platform/platform-response-filter/readme.md @@ -46,7 +46,7 @@ Define a class that return data: ```typescript import {Injectable} from "@tsed/di"; import {Returns} from "@tsed/schema"; -import {MyModel} from "../models/MyModel"; +import {MyModel} from "../models/MyModel.js"; @Injectable() class MyService { diff --git a/packages/platform/platform-response-filter/src/decorators/responseFilter.ts b/packages/platform/platform-response-filter/src/decorators/responseFilter.ts index db76a027ba6..6688cf66cbf 100644 --- a/packages/platform/platform-response-filter/src/decorators/responseFilter.ts +++ b/packages/platform/platform-response-filter/src/decorators/responseFilter.ts @@ -1,6 +1,6 @@ import {Type} from "@tsed/core"; import {registerProvider} from "@tsed/di"; -import {registerResponseFilter, ResponseFilterKey} from "../domain/ResponseFiltersContainer"; +import {registerResponseFilter, ResponseFilterKey} from "../domain/ResponseFiltersContainer.js"; /** * Register a response filter service. diff --git a/packages/platform/platform-response-filter/src/domain/ResponseFiltersContainer.ts b/packages/platform/platform-response-filter/src/domain/ResponseFiltersContainer.ts index dd16b2c1baf..3bfd7cbb6bf 100644 --- a/packages/platform/platform-response-filter/src/domain/ResponseFiltersContainer.ts +++ b/packages/platform/platform-response-filter/src/domain/ResponseFiltersContainer.ts @@ -1,5 +1,5 @@ import {Type} from "@tsed/core"; -import {ResponseFilterMethods} from "../interfaces/ResponseFilterMethods"; +import {ResponseFilterMethods} from "../interfaces/ResponseFilterMethods.js"; /** * @ignore */ diff --git a/packages/platform/platform-response-filter/src/errors/TemplateRenderError.spec.ts b/packages/platform/platform-response-filter/src/errors/TemplateRenderError.spec.ts index 584d3376218..ba3e17ad64b 100644 --- a/packages/platform/platform-response-filter/src/errors/TemplateRenderError.spec.ts +++ b/packages/platform/platform-response-filter/src/errors/TemplateRenderError.spec.ts @@ -1,4 +1,4 @@ -import {TemplateRenderError} from "./TemplateRenderError"; +import {TemplateRenderError} from "./TemplateRenderError.js"; describe("TemplateRenderingError", () => { it("should have a message", () => { diff --git a/packages/platform/platform-response-filter/src/index.ts b/packages/platform/platform-response-filter/src/index.ts index 648fae869f5..c963b53bd7b 100644 --- a/packages/platform/platform-response-filter/src/index.ts +++ b/packages/platform/platform-response-filter/src/index.ts @@ -2,10 +2,10 @@ * @file Automatically generated by barrelsby. */ -export * from "./decorators/responseFilter"; -export * from "./domain/ResponseFiltersContainer"; -export * from "./errors/TemplateRenderError"; -export * from "./interfaces/ResponseFilterMethods"; -export * from "./services/PlatformResponseFilter"; -export * from "./utils/getContentType"; -export * from "./utils/renderView"; +export * from "./decorators/responseFilter.js"; +export * from "./domain/ResponseFiltersContainer.js"; +export * from "./errors/TemplateRenderError.js"; +export * from "./interfaces/ResponseFilterMethods.js"; +export * from "./services/PlatformResponseFilter.js"; +export * from "./utils/getContentType.js"; +export * from "./utils/renderView.js"; diff --git a/packages/platform/platform-response-filter/src/services/PlatformResponseFilter.spec.ts b/packages/platform/platform-response-filter/src/services/PlatformResponseFilter.spec.ts index 30b417c5d8f..6315820f115 100644 --- a/packages/platform/platform-response-filter/src/services/PlatformResponseFilter.spec.ts +++ b/packages/platform/platform-response-filter/src/services/PlatformResponseFilter.spec.ts @@ -1,9 +1,9 @@ import {Context, EndpointMetadata, Get, PlatformContext, PlatformTest, View} from "@tsed/common"; import {catchAsyncError} from "@tsed/core"; import {Returns} from "@tsed/schema"; -import {ResponseFilter} from "../decorators/responseFilter"; -import {ResponseFilterMethods} from "../interfaces/ResponseFilterMethods"; -import {PlatformResponseFilter} from "./PlatformResponseFilter"; +import {ResponseFilter} from "../decorators/responseFilter.js"; +import {ResponseFilterMethods} from "../interfaces/ResponseFilterMethods.js"; +import {PlatformResponseFilter} from "./PlatformResponseFilter.js"; @ResponseFilter("custom/json") class CustomJsonFilter implements ResponseFilterMethods { diff --git a/packages/platform/platform-response-filter/src/services/PlatformResponseFilter.ts b/packages/platform/platform-response-filter/src/services/PlatformResponseFilter.ts index d29e0a6eac9..0d1d2943386 100644 --- a/packages/platform/platform-response-filter/src/services/PlatformResponseFilter.ts +++ b/packages/platform/platform-response-filter/src/services/PlatformResponseFilter.ts @@ -1,10 +1,10 @@ import {isSerializable, Type} from "@tsed/core"; import {BaseContext, Constant, Inject, Injectable, InjectorService} from "@tsed/di"; import {serialize} from "@tsed/json-mapper"; -import {ResponseFilterKey, ResponseFiltersContainer} from "../domain/ResponseFiltersContainer"; -import {ResponseFilterMethods} from "../interfaces/ResponseFilterMethods"; -import {ANY_CONTENT_TYPE, getContentType} from "../utils/getContentType"; -import {renderView} from "../utils/renderView"; +import {ResponseFilterKey, ResponseFiltersContainer} from "../domain/ResponseFiltersContainer.js"; +import {ResponseFilterMethods} from "../interfaces/ResponseFilterMethods.js"; +import {ANY_CONTENT_TYPE, getContentType} from "../utils/getContentType.js"; +import {renderView} from "../utils/renderView.js"; /** * @platform diff --git a/packages/platform/platform-response-filter/src/utils/getContentType.spec.ts b/packages/platform/platform-response-filter/src/utils/getContentType.spec.ts index a55a051425b..8e78adce40f 100644 --- a/packages/platform/platform-response-filter/src/utils/getContentType.spec.ts +++ b/packages/platform/platform-response-filter/src/utils/getContentType.spec.ts @@ -1,6 +1,6 @@ import {PlatformTest, View} from "@tsed/common"; import {EndpointMetadata, Get, Returns} from "@tsed/schema"; -import {getContentType} from "./getContentType"; +import {getContentType} from "./getContentType.js"; describe("getContentType", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/platform/platform-response-filter/src/utils/renderView.spec.ts b/packages/platform/platform-response-filter/src/utils/renderView.spec.ts index 05c33e510ea..35786689ab6 100644 --- a/packages/platform/platform-response-filter/src/utils/renderView.spec.ts +++ b/packages/platform/platform-response-filter/src/utils/renderView.spec.ts @@ -1,7 +1,7 @@ import {EndpointMetadata, Get, PlatformTest} from "@tsed/common"; import {Ignore, Property, Returns} from "@tsed/schema"; import {View} from "@tsed/platform-views"; -import {renderView} from "./renderView"; +import {renderView} from "./renderView.js"; describe("renderView", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/platform/platform-response-filter/src/utils/renderView.ts b/packages/platform/platform-response-filter/src/utils/renderView.ts index 7e493633289..7b6d72b348f 100644 --- a/packages/platform/platform-response-filter/src/utils/renderView.ts +++ b/packages/platform/platform-response-filter/src/utils/renderView.ts @@ -1,5 +1,5 @@ import {BaseContext} from "@tsed/di"; -import {TemplateRenderError} from "../errors/TemplateRenderError"; +import {TemplateRenderError} from "../errors/TemplateRenderError.js"; export async function renderView(data: any, $ctx: BaseContext) { const {response, endpoint} = $ctx; diff --git a/packages/platform/platform-router/src/domain/PlatformHandlerMetadata.spec.ts b/packages/platform/platform-router/src/domain/PlatformHandlerMetadata.spec.ts index 46eefdc0414..b7e625d0b63 100644 --- a/packages/platform/platform-router/src/domain/PlatformHandlerMetadata.spec.ts +++ b/packages/platform/platform-router/src/domain/PlatformHandlerMetadata.spec.ts @@ -2,9 +2,9 @@ import {Err, Next, Req} from "@tsed/common"; import {Controller, InjectorService} from "@tsed/di"; import {Middleware} from "@tsed/platform-middlewares"; import {Get, JsonMethodStore} from "@tsed/schema"; -import {useContextHandler} from "../utils/useContextHandler"; -import {PlatformHandlerMetadata} from "./PlatformHandlerMetadata"; -import {PlatformHandlerType} from "./PlatformHandlerType"; +import {useContextHandler} from "../utils/useContextHandler.js"; +import {PlatformHandlerMetadata} from "./PlatformHandlerMetadata.js"; +import {PlatformHandlerType} from "./PlatformHandlerType.js"; describe("PlatformHandlerMetadata", () => { describe("from()", () => { diff --git a/packages/platform/platform-router/src/domain/PlatformHandlerMetadata.ts b/packages/platform/platform-router/src/domain/PlatformHandlerMetadata.ts index 28990248ebf..f87c1ba27a8 100644 --- a/packages/platform/platform-router/src/domain/PlatformHandlerMetadata.ts +++ b/packages/platform/platform-router/src/domain/PlatformHandlerMetadata.ts @@ -2,8 +2,8 @@ import {nameOf} from "@tsed/core"; import {DIContext, InjectorService, Provider, ProviderScope, TokenProvider} from "@tsed/di"; import {ParamTypes} from "@tsed/platform-params"; import {EndpointMetadata, JsonEntityStore, JsonParameterStore} from "@tsed/schema"; -import {PlatformHandlerType} from "./PlatformHandlerType"; -import {SinglePathType} from "./SinglePathType"; +import {PlatformHandlerType} from "./PlatformHandlerType.js"; +import {SinglePathType} from "./SinglePathType.js"; export interface PlatformHandlerMetadataOpts extends Record { token?: TokenProvider; diff --git a/packages/platform/platform-router/src/domain/PlatformLayer.ts b/packages/platform/platform-router/src/domain/PlatformLayer.ts index f5601048e45..f61d9ac3c40 100644 --- a/packages/platform/platform-router/src/domain/PlatformLayer.ts +++ b/packages/platform/platform-router/src/domain/PlatformLayer.ts @@ -3,9 +3,9 @@ import {Provider} from "@tsed/di"; import type {PlatformParamsCallback} from "@tsed/platform-params"; import {concatPath} from "@tsed/schema"; -import {PlatformHandlerMetadata} from "./PlatformHandlerMetadata"; -import type {PlatformRouter} from "./PlatformRouter"; -import {SinglePathType} from "./SinglePathType"; +import {PlatformHandlerMetadata} from "./PlatformHandlerMetadata.js"; +import type {PlatformRouter} from "./PlatformRouter.js"; +import {SinglePathType} from "./SinglePathType.js"; export interface PlatformLayerOptions extends Record { token?: Type; diff --git a/packages/platform/platform-router/src/domain/PlatformRouter.ts b/packages/platform/platform-router/src/domain/PlatformRouter.ts index e55fb179e5c..31aa4f1b2b7 100644 --- a/packages/platform/platform-router/src/domain/PlatformRouter.ts +++ b/packages/platform/platform-router/src/domain/PlatformRouter.ts @@ -1,10 +1,10 @@ import {isString} from "@tsed/core"; import {Injectable, InjectorService, Provider, ProviderScope, Scope} from "@tsed/di"; import {concatPath} from "@tsed/schema"; -import {formatMethod} from "../utils/formatMethod"; -import {PlatformHandlerMetadata} from "./PlatformHandlerMetadata"; -import {PlatformLayer, PlatformLayerOptions} from "./PlatformLayer"; -import {SinglePathType} from "./SinglePathType"; +import {formatMethod} from "../utils/formatMethod.js"; +import {PlatformHandlerMetadata} from "./PlatformHandlerMetadata.js"; +import {PlatformLayer, PlatformLayerOptions} from "./PlatformLayer.js"; +import {SinglePathType} from "./SinglePathType.js"; function printHandler(handler: any) { return handler.toString().split("{")[0].trim(); diff --git a/packages/platform/platform-router/src/domain/PlatformRouters.ts b/packages/platform/platform-router/src/domain/PlatformRouters.ts index 2347a43bebb..d82475ab810 100644 --- a/packages/platform/platform-router/src/domain/PlatformRouters.ts +++ b/packages/platform/platform-router/src/domain/PlatformRouters.ts @@ -2,10 +2,10 @@ import {getValue, Hooks, Type} from "@tsed/core"; import {ControllerProvider, GlobalProviders, Injectable, InjectorService, Provider, ProviderType, TokenProvider} from "@tsed/di"; import {PlatformParamsCallback} from "@tsed/platform-params"; import {concatPath, getOperationsRoutes, JsonMethodStore, OPERATION_HTTP_VERBS} from "@tsed/schema"; -import {useContextHandler} from "../utils/useContextHandler"; -import {PlatformHandlerMetadata} from "./PlatformHandlerMetadata"; -import {PlatformLayer} from "./PlatformLayer"; -import {PlatformRouter} from "./PlatformRouter"; +import {useContextHandler} from "../utils/useContextHandler.js"; +import {PlatformHandlerMetadata} from "./PlatformHandlerMetadata.js"; +import {PlatformLayer} from "./PlatformLayer.js"; +import {PlatformRouter} from "./PlatformRouter.js"; let AUTO_INC = 0; @@ -79,7 +79,7 @@ export class PlatformRouters { const {children} = provider; // Set default to true in next major version - const appendChildrenRoutesFirst = this.injector.settings.get('router.appendChildrenRoutesFirst', false) + const appendChildrenRoutesFirst = this.injector.settings.get("router.appendChildrenRoutesFirst", false); if (appendChildrenRoutesFirst) { children.forEach((token: Type) => { diff --git a/packages/platform/platform-router/src/index.ts b/packages/platform/platform-router/src/index.ts index 0b17e7614d3..369820fcb5c 100644 --- a/packages/platform/platform-router/src/index.ts +++ b/packages/platform/platform-router/src/index.ts @@ -2,11 +2,11 @@ * @file Automatically generated by barrelsby. */ -export * from "./domain/PlatformHandlerMetadata"; -export * from "./domain/PlatformHandlerType"; -export * from "./domain/PlatformLayer"; -export * from "./domain/PlatformRouter"; -export * from "./domain/PlatformRouters"; -export * from "./domain/SinglePathType"; -export * from "./utils/formatMethod"; -export * from "./utils/useContextHandler"; +export * from "./domain/PlatformHandlerMetadata.js"; +export * from "./domain/PlatformHandlerType.js"; +export * from "./domain/PlatformLayer.js"; +export * from "./domain/PlatformRouter.js"; +export * from "./domain/PlatformRouters.js"; +export * from "./domain/SinglePathType.js"; +export * from "./utils/formatMethod.js"; +export * from "./utils/useContextHandler.js"; diff --git a/packages/platform/platform-router/src/utils/useContextHandler.ts b/packages/platform/platform-router/src/utils/useContextHandler.ts index b820828ef8f..a9e965ba7b7 100644 --- a/packages/platform/platform-router/src/utils/useContextHandler.ts +++ b/packages/platform/platform-router/src/utils/useContextHandler.ts @@ -1,5 +1,5 @@ import {DIContext} from "@tsed/di"; -import {PlatformHandlerType} from "../domain/PlatformHandlerType"; +import {PlatformHandlerType} from "../domain/PlatformHandlerType.js"; export type PlatformContextHandler = ($ctx: Context) => any | Promise; diff --git a/packages/platform/platform-router/test/routers-alter-endpoint-handlers.integration.spec.ts b/packages/platform/platform-router/test/routers-alter-endpoint-handlers.integration.spec.ts index 132dea9838d..c44409d49cd 100644 --- a/packages/platform/platform-router/test/routers-alter-endpoint-handlers.integration.spec.ts +++ b/packages/platform/platform-router/test/routers-alter-endpoint-handlers.integration.spec.ts @@ -3,9 +3,9 @@ import {Controller, DIContext, InjectorService} from "@tsed/di"; import {UseBefore} from "@tsed/platform-middlewares"; import {Context, PlatformParams} from "@tsed/platform-params"; import {EndpointMetadata, Get, JsonOperationRoute} from "@tsed/schema"; -import {PlatformRouter} from "../src/domain/PlatformRouter"; -import {AlterEndpointHandlersArg, PlatformRouters} from "../src/domain/PlatformRouters"; -import {useContextHandler} from "../src/index"; +import {PlatformRouter} from "../src/domain/PlatformRouter.js"; +import {AlterEndpointHandlersArg, PlatformRouters} from "../src/domain/PlatformRouters.js"; +import {useContextHandler} from "../src/index.js"; @Controller("/controller") @UseBefore(function useBefore() {}) diff --git a/packages/platform/platform-router/test/routers-injection.integration.spec.ts b/packages/platform/platform-router/test/routers-injection.integration.spec.ts index 512b205ecf5..825dbc95472 100644 --- a/packages/platform/platform-router/test/routers-injection.integration.spec.ts +++ b/packages/platform/platform-router/test/routers-injection.integration.spec.ts @@ -1,7 +1,7 @@ import {Controller, ControllerProvider, InjectorService} from "@tsed/di"; import {PlatformParams} from "@tsed/platform-params"; -import {PlatformRouter} from "../src/domain/PlatformRouter"; -import {PlatformRouters} from "../src/domain/PlatformRouters"; +import {PlatformRouter} from "../src/domain/PlatformRouter.js"; +import {PlatformRouters} from "../src/domain/PlatformRouters.js"; @Controller("/statics") class CustomStaticsCtrl { diff --git a/packages/platform/platform-router/test/routers-middlewares.integration.spec.ts b/packages/platform/platform-router/test/routers-middlewares.integration.spec.ts index bcd54c06483..8ace0731e70 100644 --- a/packages/platform/platform-router/test/routers-middlewares.integration.spec.ts +++ b/packages/platform/platform-router/test/routers-middlewares.integration.spec.ts @@ -3,8 +3,8 @@ import {Controller, InjectorService} from "@tsed/di"; import {Middleware} from "@tsed/platform-middlewares"; import {Context, PlatformParams} from "@tsed/platform-params"; import {Get} from "@tsed/schema"; -import {PlatformRouter} from "../src/domain/PlatformRouter"; -import {PlatformRouters} from "../src/domain/PlatformRouters"; +import {PlatformRouter} from "../src/domain/PlatformRouter.js"; +import {PlatformRouters} from "../src/domain/PlatformRouters.js"; @Middleware() class MyMiddleware { diff --git a/packages/platform/platform-router/test/routers-nested.integration.spec.ts b/packages/platform/platform-router/test/routers-nested.integration.spec.ts index 91d284d81b9..2eaee566173 100644 --- a/packages/platform/platform-router/test/routers-nested.integration.spec.ts +++ b/packages/platform/platform-router/test/routers-nested.integration.spec.ts @@ -2,8 +2,8 @@ import {PlatformTest} from "@tsed/common"; import {Controller, InjectorService} from "@tsed/di"; import {PlatformParams} from "@tsed/platform-params"; import {Get, Post} from "@tsed/schema"; -import {PlatformRouter} from "../src/domain/PlatformRouter"; -import {PlatformRouters} from "../src/domain/PlatformRouters"; +import {PlatformRouter} from "../src/domain/PlatformRouter.js"; +import {PlatformRouters} from "../src/domain/PlatformRouters.js"; @Controller("/") export class FlaggedCommentController { @@ -101,9 +101,9 @@ describe("routers integration", () => { ]); }); - it('should declare correctly with appendChildrenRoutesFirst', () => { + it("should declare correctly with appendChildrenRoutesFirst", () => { const {injector, platformRouters, appRouter} = createAppRouterFixture(); - injector.settings.set('router.appendChildrenRoutesFirst', true); + injector.settings.set("router.appendChildrenRoutesFirst", true); platformRouters.prebuild(); diff --git a/packages/platform/platform-router/test/routers.integration.spec.ts b/packages/platform/platform-router/test/routers.integration.spec.ts index 7468e5ca3a7..985055c0dd7 100644 --- a/packages/platform/platform-router/test/routers.integration.spec.ts +++ b/packages/platform/platform-router/test/routers.integration.spec.ts @@ -4,8 +4,8 @@ import {Controller, InjectorService} from "@tsed/di"; import {UseBefore} from "@tsed/platform-middlewares"; import {Context, PlatformParams} from "@tsed/platform-params"; import {Delete, Get, Head, Options, Patch, Post, Publish, Put, Subscribe} from "@tsed/schema"; -import {PlatformRouter} from "../src/domain/PlatformRouter"; -import {AlterEndpointHandlersArg, PlatformRouters} from "../src/domain/PlatformRouters"; +import {PlatformRouter} from "../src/domain/PlatformRouter.js"; +import {AlterEndpointHandlersArg, PlatformRouters} from "../src/domain/PlatformRouters.js"; @Controller("/nested") class NestedController { diff --git a/packages/platform/platform-serverless-http/readme.md b/packages/platform/platform-serverless-http/readme.md index 53874305b88..d85dc0d520b 100644 --- a/packages/platform/platform-serverless-http/readme.md +++ b/packages/platform/platform-serverless-http/readme.md @@ -57,8 +57,8 @@ In the `src/lambda` create a new Lambda class: import {Controller, Inject} from "@tsed/di"; import {Get, Returns, Summary} from "@tsed/schema"; import {QueryParams} from "@tsed/platform-params"; -import {TimeslotsService} from "../services/TimeslotsService"; -import {TimeslotModel} from "../models/TimeslotModel"; +import {TimeslotsService} from "../services/TimeslotsService.js"; +import {TimeslotModel} from "../models/TimeslotModel.js"; @Controller("/timeslots") export class TimeslotsController { @@ -88,7 +88,7 @@ import cookieParser from "cookie-parser"; import methodOverride from "method-override"; import "@tsed/ajv"; import "@tsed/swagger"; -import {TimeslotsController} from "./controllers/TimeslotsController"; +import {TimeslotsController} from "./controllers/TimeslotsController.js"; @Configuration({ acceptMimes: ["application/json"], @@ -117,7 +117,7 @@ Create new `handler.ts` to expose your lambda: ```typescript import {PlatformServerless} from "@tsed/platform-serverless-http"; import {PlatformExpress} from "@tsed/platform-express"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; const platform = PlatformServerless.bootstrap(Server, { adapter: PlatformExpress @@ -130,7 +130,7 @@ Create also `index.ts` to expose run Ts.ED on you local machine: ```typescript import {PlatformExpress} from "@tsed/platform-express"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; async function bootstrap() { const platform = await PlatformExpress.bootstrap(Server, { @@ -245,7 +245,7 @@ Here an example to test a Lambda controller: import {PlatformServerless} from "@tsed/platform-serverless-http"; import {PlatformServerlessTest} from "@tsed/platform-serverless-testing"; import {PlatformExpress} from "@tsed/platform-express"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; @Controller("/timeslots") class TimeslotsController { diff --git a/packages/platform/platform-serverless-http/src/builder/PlatformServerlessHttp.spec.ts b/packages/platform/platform-serverless-http/src/builder/PlatformServerlessHttp.spec.ts index 56ea00567ef..8e869e2717c 100644 --- a/packages/platform/platform-serverless-http/src/builder/PlatformServerlessHttp.spec.ts +++ b/packages/platform/platform-serverless-http/src/builder/PlatformServerlessHttp.spec.ts @@ -1,7 +1,7 @@ import {PlatformExpress} from "@tsed/platform-express"; import {PlatformBuilder} from "@tsed/common"; import serverless from "serverless-http"; -import {PlatformServerlessHttp} from "./PlatformServerlessHttp"; +import {PlatformServerlessHttp} from "./PlatformServerlessHttp.js"; jest.mock("serverless-http"); diff --git a/packages/platform/platform-serverless-http/src/index.ts b/packages/platform/platform-serverless-http/src/index.ts index 3157f61d0d4..1dd1fc055e3 100644 --- a/packages/platform/platform-serverless-http/src/index.ts +++ b/packages/platform/platform-serverless-http/src/index.ts @@ -2,6 +2,6 @@ * @file Automatically generated by barrelsby. */ -export * from "./builder/PlatformServerlessHttp"; -export * from "./decorators/serverlessContext"; -export * from "./decorators/serverlessEvent"; +export * from "./builder/PlatformServerlessHttp.js"; +export * from "./decorators/serverlessContext.js"; +export * from "./decorators/serverlessEvent.js"; diff --git a/packages/platform/platform-serverless-http/test/body.integration.spec.ts b/packages/platform/platform-serverless-http/test/body.integration.spec.ts index e78bc661ec0..6eb195adb4f 100644 --- a/packages/platform/platform-serverless-http/test/body.integration.spec.ts +++ b/packages/platform/platform-serverless-http/test/body.integration.spec.ts @@ -4,8 +4,8 @@ import {MinLength, Patch, Post, Property, Put, Returns} from "@tsed/schema"; import {PlatformServerlessTest} from "@tsed/platform-serverless-testing"; import {PlatformExpress} from "@tsed/platform-express"; import {BodyParams} from "@tsed/platform-params"; -import {PlatformServerlessHttp} from "../src"; -import {Server} from "./integration/aws-basic/src/Server"; +import {PlatformServerlessHttp} from "../src/index.js"; +import {Server} from "./integration/aws-basic/src/Server.js"; class Model { @Property() diff --git a/packages/platform/platform-serverless-http/test/integration/aws-basic/src/Server.ts b/packages/platform/platform-serverless-http/test/integration/aws-basic/src/Server.ts index 795a97fb91e..45e6322ffae 100644 --- a/packages/platform/platform-serverless-http/test/integration/aws-basic/src/Server.ts +++ b/packages/platform/platform-serverless-http/test/integration/aws-basic/src/Server.ts @@ -1,5 +1,5 @@ import {Configuration, Inject} from "@tsed/di"; -import {TimeslotsController} from "./TimeslotsController"; +import {TimeslotsController} from "./TimeslotsController.js"; import {PlatformApplication} from "@tsed/common"; import bodyParser from "body-parser"; import cookieParser from "cookie-parser"; diff --git a/packages/platform/platform-serverless-http/test/integration/aws-basic/src/index.ts b/packages/platform/platform-serverless-http/test/integration/aws-basic/src/index.ts index 1041c086171..df9368bdc48 100644 --- a/packages/platform/platform-serverless-http/test/integration/aws-basic/src/index.ts +++ b/packages/platform/platform-serverless-http/test/integration/aws-basic/src/index.ts @@ -1,6 +1,6 @@ import {PlatformServerlessHttp} from "@tsed/platform-serverless-http"; import {PlatformExpress} from "@tsed/platform-express"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; const platform = PlatformServerlessHttp.bootstrap(Server, { adapter: PlatformExpress diff --git a/packages/platform/platform-serverless-http/test/serverlessContext.integration.spec.ts b/packages/platform/platform-serverless-http/test/serverlessContext.integration.spec.ts index c3860ae53dc..020d9eb0b3c 100644 --- a/packages/platform/platform-serverless-http/test/serverlessContext.integration.spec.ts +++ b/packages/platform/platform-serverless-http/test/serverlessContext.integration.spec.ts @@ -3,8 +3,8 @@ import {Controller} from "@tsed/di"; import {Get, Returns} from "@tsed/schema"; import {PlatformServerlessTest} from "@tsed/platform-serverless-testing"; import {PlatformExpress} from "@tsed/platform-express"; -import {PlatformServerlessHttp, ServerlessContext, ServerlessEvent} from "../src"; -import {Server} from "./integration/aws-basic/src/Server"; +import {PlatformServerlessHttp, ServerlessContext, ServerlessEvent} from "../src/index.js"; +import {Server} from "./integration/aws-basic/src/Server.js"; @Controller("/") class BodyLambda { diff --git a/packages/platform/platform-serverless-testing/src/PlatformServerlessTest.ts b/packages/platform/platform-serverless-testing/src/PlatformServerlessTest.ts index 4dedbfe4f66..02b1fe227b5 100644 --- a/packages/platform/platform-serverless-testing/src/PlatformServerlessTest.ts +++ b/packages/platform/platform-serverless-testing/src/PlatformServerlessTest.ts @@ -1,8 +1,8 @@ import {DITest} from "@tsed/di"; import {APIGatewayEventDefaultAuthorizerContext, APIGatewayProxyEventBase, APIGatewayProxyHandler} from "aws-lambda"; import {APIGatewayProxyResult} from "aws-lambda/trigger/api-gateway-proxy"; -import {createFakeEvent} from "./createFakeEvent"; -import {createFakeContext} from "./createFakeContext"; +import {createFakeEvent} from "./createFakeEvent.js"; +import {createFakeContext} from "./createFakeContext.js"; import {nameOf, Type} from "@tsed/core"; import {PlatformBuilder, PlatformBuilderSettings} from "@tsed/common"; diff --git a/packages/platform/platform-serverless-testing/src/index.ts b/packages/platform/platform-serverless-testing/src/index.ts index 002bf5552f5..9a010cbb53d 100644 --- a/packages/platform/platform-serverless-testing/src/index.ts +++ b/packages/platform/platform-serverless-testing/src/index.ts @@ -1,3 +1,3 @@ -export * from "./createFakeEvent"; -export * from "./createFakeContext"; -export * from "./PlatformServerlessTest"; +export * from "./createFakeEvent.js"; +export * from "./createFakeContext.js"; +export * from "./PlatformServerlessTest.js"; diff --git a/packages/platform/platform-serverless/readme.md b/packages/platform/platform-serverless/readme.md index 8a4dd4260a6..777af14268c 100644 --- a/packages/platform/platform-serverless/readme.md +++ b/packages/platform/platform-serverless/readme.md @@ -138,8 +138,8 @@ In the `src/lambda` create a new Lambda class: import {Controller, Inject} from "@tsed/di"; import {Get, Returns, Summary} from "@tsed/schema"; import {QueryParams} from "@tsed/platform-params"; // /!\ don't import decorators from @tsed/common -import {TimeslotsService} from "../services/TimeslotsService"; -import {TimeslotModel} from "../models/TimeslotModel"; +import {TimeslotsService} from "../services/TimeslotsService.js"; +import {TimeslotModel} from "../models/TimeslotModel.js"; @Controller("/timeslots") export class TimeslotsLambda { @@ -162,7 +162,7 @@ Create new `handler.ts` to expose your lambda: ```typescript import {PlatformServerless} from "@tsed/platform-serverless"; -import {TimeslotsLambda} from "./lambda/TimeslotsLambda"; +import {TimeslotsLambda} from "./lambda/TimeslotsLambda.js"; const platform = PlatformServerless.bootstrap({ lambda: [TimeslotsLambda] @@ -274,7 +274,7 @@ Then, edit the `handler.ts` and change the exported functions: ```typescript import {PlatformServerless} from "@tsed/platform-serverless"; -import {TimeslotsLambda} from "./TimeslotsLambda"; +import {TimeslotsLambda} from "./TimeslotsLambda.js"; const platform = PlatformServerless.bootstrap({ lambda: [TimeslotsLambda] @@ -300,8 +300,8 @@ To simplify our workflow, we can add the following npm script command in our `pa ```typescript import {Injectable} from "@tsed/di"; import {QueryParams, ServerlessContext} from "@tsed/platform-serverless"; // /!\ don't import decorators from @tsed/common -import {TimeslotsService} from "../services/TimeslotsService"; -import {ServerlessContext} from "./ServerlessContext"; +import {TimeslotsService} from "../services/TimeslotsService.js"; +import {ServerlessContext} from "./ServerlessContext.js"; @Injectable() export class TimeslotsLambda { diff --git a/packages/platform/platform-serverless/src/builder/PlatformServerless.spec.ts b/packages/platform/platform-serverless/src/builder/PlatformServerless.spec.ts index 6ca4f5d6e1a..7f1c0dabb66 100644 --- a/packages/platform/platform-serverless/src/builder/PlatformServerless.spec.ts +++ b/packages/platform/platform-serverless/src/builder/PlatformServerless.spec.ts @@ -2,7 +2,7 @@ import {Controller, Inject, Injectable} from "@tsed/di"; import {BodyParams, PathParams, QueryParams} from "@tsed/platform-params"; import {PlatformServerlessTest} from "@tsed/platform-serverless-testing"; import {Delete, Get, Patch, Post, Put} from "@tsed/schema"; -import {PlatformServerless} from "./PlatformServerless"; +import {PlatformServerless} from "./PlatformServerless.js"; @Injectable() class TimeslotsService { diff --git a/packages/platform/platform-serverless/src/builder/PlatformServerless.ts b/packages/platform/platform-serverless/src/builder/PlatformServerless.ts index 222399c869f..35988cc45c1 100644 --- a/packages/platform/platform-serverless/src/builder/PlatformServerless.ts +++ b/packages/platform/platform-serverless/src/builder/PlatformServerless.ts @@ -4,9 +4,9 @@ import {$log, Logger} from "@tsed/logger"; import {getOperationsRoutes, JsonEntityStore} from "@tsed/schema"; import type {APIGatewayProxyResult, Handler} from "aws-lambda"; import type {HTTPMethod, Instance} from "find-my-way"; -import {ServerlessContext} from "../domain/ServerlessContext"; -import {getRequestId} from "../utils/getRequestId"; -import {PlatformServerlessHandler} from "./PlatformServerlessHandler"; +import {ServerlessContext} from "../domain/ServerlessContext.js"; +import {getRequestId} from "../utils/getRequestId.js"; +import {PlatformServerlessHandler} from "./PlatformServerlessHandler.js"; export interface PlatformServerlessSettings extends Partial { lambda?: Type[]; diff --git a/packages/platform/platform-serverless/src/builder/PlatformServerlessHandler.spec.ts b/packages/platform/platform-serverless/src/builder/PlatformServerlessHandler.spec.ts index bfa8075a07b..534df047d50 100644 --- a/packages/platform/platform-serverless/src/builder/PlatformServerlessHandler.spec.ts +++ b/packages/platform/platform-serverless/src/builder/PlatformServerlessHandler.spec.ts @@ -1,8 +1,8 @@ import {DITest, Inject, Injectable} from "@tsed/di"; import {QueryParams} from "@tsed/platform-params"; import {JsonEntityStore} from "@tsed/schema"; -import {ServerlessContext} from "../domain/ServerlessContext"; -import {PlatformServerlessHandler} from "./PlatformServerlessHandler"; +import {ServerlessContext} from "../domain/ServerlessContext.js"; +import {PlatformServerlessHandler} from "./PlatformServerlessHandler.js"; async function getPlatformServerlessHandlerFixture() { const service = await DITest.invoke(PlatformServerlessHandler); diff --git a/packages/platform/platform-serverless/src/builder/PlatformServerlessHandler.ts b/packages/platform/platform-serverless/src/builder/PlatformServerlessHandler.ts index 5a136fb5f1f..19ddd02c157 100644 --- a/packages/platform/platform-serverless/src/builder/PlatformServerlessHandler.ts +++ b/packages/platform/platform-serverless/src/builder/PlatformServerlessHandler.ts @@ -3,8 +3,8 @@ import {BaseContext, Inject, Injectable, InjectorService, LazyInject, ProviderSc import {serialize} from "@tsed/json-mapper"; import type {PlatformExceptions} from "@tsed/platform-exceptions"; import {DeserializerPipe, PlatformParams, ValidationPipe} from "@tsed/platform-params"; -import {ServerlessContext} from "../domain/ServerlessContext"; -import {setResponseHeaders} from "../utils/setResponseHeaders"; +import {ServerlessContext} from "../domain/ServerlessContext.js"; +import {setResponseHeaders} from "../utils/setResponseHeaders.js"; @Injectable({ scope: ProviderScope.SINGLETON, diff --git a/packages/platform/platform-serverless/src/domain/ServerlessContext.spec.ts b/packages/platform/platform-serverless/src/domain/ServerlessContext.spec.ts index feff789d0bc..8593e9e8f62 100644 --- a/packages/platform/platform-serverless/src/domain/ServerlessContext.spec.ts +++ b/packages/platform/platform-serverless/src/domain/ServerlessContext.spec.ts @@ -1,5 +1,5 @@ import {PlatformServerlessTest} from "@tsed/platform-serverless-testing"; -import {createServerlessContext} from "../../test/utils/createServerlessContext"; +import {createServerlessContext} from "../../test/utils/createServerlessContext.js"; describe("ServerlessContext", () => { beforeEach(() => PlatformServerlessTest.create()); diff --git a/packages/platform/platform-serverless/src/domain/ServerlessContext.ts b/packages/platform/platform-serverless/src/domain/ServerlessContext.ts index c2c7a5534fb..3490f7bdcc6 100644 --- a/packages/platform/platform-serverless/src/domain/ServerlessContext.ts +++ b/packages/platform/platform-serverless/src/domain/ServerlessContext.ts @@ -1,8 +1,8 @@ import {DIContext, DIContextOptions} from "@tsed/di"; import {JsonEntityStore} from "@tsed/schema"; import {APIGatewayEventDefaultAuthorizerContext, APIGatewayProxyEventBase, Context} from "aws-lambda"; -import {ServerlessRequest} from "./ServerlessRequest"; -import {ServerlessResponse} from "./ServerlessResponse"; +import {ServerlessRequest} from "./ServerlessRequest.js"; +import {ServerlessResponse} from "./ServerlessResponse.js"; export interface ServerlessContextOptions extends DIContextOptions { event: APIGatewayProxyEventBase; diff --git a/packages/platform/platform-serverless/src/domain/ServerlessRequest.spec.ts b/packages/platform/platform-serverless/src/domain/ServerlessRequest.spec.ts index 5cddecfa2fe..89ce0e9a78b 100644 --- a/packages/platform/platform-serverless/src/domain/ServerlessRequest.spec.ts +++ b/packages/platform/platform-serverless/src/domain/ServerlessRequest.spec.ts @@ -1,5 +1,5 @@ import {PlatformServerlessTest} from "@tsed/platform-serverless-testing"; -import {createServerlessContext} from "../../test/utils/createServerlessContext"; +import {createServerlessContext} from "../../test/utils/createServerlessContext.js"; describe("ServerlessRequest", () => { beforeEach(() => PlatformServerlessTest.create()); diff --git a/packages/platform/platform-serverless/src/domain/ServerlessRequest.ts b/packages/platform/platform-serverless/src/domain/ServerlessRequest.ts index 0fdf5994db5..0c9338c3132 100644 --- a/packages/platform/platform-serverless/src/domain/ServerlessRequest.ts +++ b/packages/platform/platform-serverless/src/domain/ServerlessRequest.ts @@ -1,5 +1,5 @@ import {getValue} from "@tsed/core"; -import {ServerlessContext} from "./ServerlessContext"; +import {ServerlessContext} from "./ServerlessContext.js"; /** * @platform diff --git a/packages/platform/platform-serverless/src/domain/ServerlessResponse.spec.ts b/packages/platform/platform-serverless/src/domain/ServerlessResponse.spec.ts index 3c0731bacec..f3b40c95c8d 100644 --- a/packages/platform/platform-serverless/src/domain/ServerlessResponse.spec.ts +++ b/packages/platform/platform-serverless/src/domain/ServerlessResponse.spec.ts @@ -1,5 +1,5 @@ import {PlatformServerlessTest} from "@tsed/platform-serverless-testing"; -import {createServerlessContext} from "../../test/utils/createServerlessContext"; +import {createServerlessContext} from "../../test/utils/createServerlessContext.js"; describe("ServerlessResponse", () => { beforeEach(() => PlatformServerlessTest.create()); diff --git a/packages/platform/platform-serverless/src/domain/ServerlessResponse.ts b/packages/platform/platform-serverless/src/domain/ServerlessResponse.ts index 4ac392b78fc..fc538cc0de4 100644 --- a/packages/platform/platform-serverless/src/domain/ServerlessResponse.ts +++ b/packages/platform/platform-serverless/src/domain/ServerlessResponse.ts @@ -2,7 +2,7 @@ import {getValue} from "@tsed/core"; import {getStatusMessage} from "@tsed/schema"; import encodeUrl from "encodeurl"; import * as mime from "mime"; -import {ServerlessContext} from "./ServerlessContext"; +import {ServerlessContext} from "./ServerlessContext.js"; export type HeaderValue = boolean | number | string; diff --git a/packages/platform/platform-serverless/src/index.ts b/packages/platform/platform-serverless/src/index.ts index bdc5ca0dcac..d138994a450 100644 --- a/packages/platform/platform-serverless/src/index.ts +++ b/packages/platform/platform-serverless/src/index.ts @@ -2,11 +2,11 @@ * @file Automatically generated by barrelsby. */ -export * from "./exports"; -export * from "./builder/PlatformServerless"; -export * from "./builder/PlatformServerlessHandler"; -export * from "./domain/ServerlessContext"; -export * from "./domain/ServerlessRequest"; -export * from "./domain/ServerlessResponse"; -export * from "./utils/getRequestId"; -export * from "./utils/setResponseHeaders"; +export * from "./exports.js"; +export * from "./builder/PlatformServerless.js"; +export * from "./builder/PlatformServerlessHandler.js"; +export * from "./domain/ServerlessContext.js"; +export * from "./domain/ServerlessRequest.js"; +export * from "./domain/ServerlessResponse.js"; +export * from "./utils/getRequestId.js"; +export * from "./utils/setResponseHeaders.js"; diff --git a/packages/platform/platform-serverless/src/utils/getRequestId.spec.ts b/packages/platform/platform-serverless/src/utils/getRequestId.spec.ts index 4986d7d6c0a..0957fc68629 100644 --- a/packages/platform/platform-serverless/src/utils/getRequestId.spec.ts +++ b/packages/platform/platform-serverless/src/utils/getRequestId.spec.ts @@ -1,4 +1,4 @@ -import {getRequestId} from "./getRequestId"; +import {getRequestId} from "./getRequestId.js"; describe("getRequestId", () => { it("should return request id (uuid)", () => { diff --git a/packages/platform/platform-serverless/src/utils/setResponseHeaders.spec.ts b/packages/platform/platform-serverless/src/utils/setResponseHeaders.spec.ts index 1a6f40afe94..0c538b25ed4 100644 --- a/packages/platform/platform-serverless/src/utils/setResponseHeaders.spec.ts +++ b/packages/platform/platform-serverless/src/utils/setResponseHeaders.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest} from "@tsed/common"; import {Get, JsonEntityStore, Redirect, Returns} from "@tsed/schema"; -import {setResponseHeaders} from "./setResponseHeaders"; -import {createServerlessContext} from "../../test/utils/createServerlessContext"; +import {setResponseHeaders} from "./setResponseHeaders.js"; +import {createServerlessContext} from "../../test/utils/createServerlessContext.js"; describe("setResponseHeaders", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/platform/platform-serverless/src/utils/setResponseHeaders.ts b/packages/platform/platform-serverless/src/utils/setResponseHeaders.ts index d536428dc9e..4c4fa024d9d 100644 --- a/packages/platform/platform-serverless/src/utils/setResponseHeaders.ts +++ b/packages/platform/platform-serverless/src/utils/setResponseHeaders.ts @@ -1,6 +1,6 @@ import {JsonHeader} from "@tsed/schema"; -import {ServerlessContext} from "../domain/ServerlessContext"; -import {HeaderValue} from "../domain/ServerlessResponse"; +import {ServerlessContext} from "../domain/ServerlessContext.js"; +import {HeaderValue} from "../domain/ServerlessResponse.js"; function mergeHeaders(specHeaders: Record, headers: Record) { return Object.entries(specHeaders).reduce((headers, [key, item]) => { diff --git a/packages/platform/platform-serverless/test/integration/aws-basic/src/index.ts b/packages/platform/platform-serverless/test/integration/aws-basic/src/index.ts index dfd32d64ce1..0eeac4554bc 100644 --- a/packages/platform/platform-serverless/test/integration/aws-basic/src/index.ts +++ b/packages/platform/platform-serverless/test/integration/aws-basic/src/index.ts @@ -1,5 +1,5 @@ import {PlatformServerless} from "@tsed/platform-serverless"; -import {TimeslotsLambda} from "./TimeslotsLambda"; +import {TimeslotsLambda} from "./TimeslotsLambda.js"; const platform = PlatformServerless.bootstrap({ lambda: [TimeslotsLambda] diff --git a/packages/platform/platform-serverless/test/query.integration.spec.ts b/packages/platform/platform-serverless/test/query.integration.spec.ts index 47d73408934..38f63ebb8cd 100644 --- a/packages/platform/platform-serverless/test/query.integration.spec.ts +++ b/packages/platform/platform-serverless/test/query.integration.spec.ts @@ -1,7 +1,7 @@ import {Injectable} from "@tsed/di"; import {Get} from "@tsed/schema"; import {PlatformServerlessTest} from "@tsed/platform-serverless-testing"; -import {PlatformServerless, QueryParams} from "../src/index"; +import {PlatformServerless, QueryParams} from "../src/index.js"; @Injectable() class QueryLambda { diff --git a/packages/platform/platform-serverless/test/utils/createServerlessContext.ts b/packages/platform/platform-serverless/test/utils/createServerlessContext.ts index 893d92926fa..1879ade6908 100644 --- a/packages/platform/platform-serverless/test/utils/createServerlessContext.ts +++ b/packages/platform/platform-serverless/test/utils/createServerlessContext.ts @@ -1,7 +1,7 @@ import {JsonEntityStore} from "@tsed/schema"; import {createFakeContext, createFakeEvent, PlatformServerlessTest} from "@tsed/platform-serverless-testing"; import {Logger} from "@tsed/logger"; -import {ServerlessContext} from "../../src/domain/ServerlessContext"; +import {ServerlessContext} from "../../src/domain/ServerlessContext.js"; export function createServerlessContext({endpoint}: {endpoint: JsonEntityStore}) { const context: any = createFakeContext(); diff --git a/packages/platform/platform-test-sdk/src/components/PlatformTestSdk.ts b/packages/platform/platform-test-sdk/src/components/PlatformTestSdk.ts index 4b1fd06414d..2c6d6c8ca5a 100644 --- a/packages/platform/platform-test-sdk/src/components/PlatformTestSdk.ts +++ b/packages/platform/platform-test-sdk/src/components/PlatformTestSdk.ts @@ -1,6 +1,6 @@ import {PlatformTest} from "@tsed/common"; -import {PlatformTestingSdkOpts} from "../interfaces/index"; -import {specsContainer} from "../tests/exports"; +import {PlatformTestingSdkOpts} from "../interfaces/index.js"; +import {specsContainer} from "../tests/exports.js"; export class PlatformTestSdk { protected constructor(private options: PlatformTestingSdkOpts) {} diff --git a/packages/platform/platform-test-sdk/src/index.ts b/packages/platform/platform-test-sdk/src/index.ts index 404b654e522..7175f530daa 100644 --- a/packages/platform/platform-test-sdk/src/index.ts +++ b/packages/platform/platform-test-sdk/src/index.ts @@ -2,39 +2,39 @@ * @file Automatically generated by barrelsby. */ -export * from "./components/PlatformTestSdk"; -export * from "./errors/CustomBadRequest"; -export * from "./errors/CustomInternalError"; -export * from "./interfaces/PlatformTestingSdkOpts"; -export * from "./modules/feature/FeatureModule"; -export * from "./modules/feature/controllers/FeatureController"; -export * from "./tests/exports"; -export * from "./tests/testAcceptMime"; -export * from "./tests/testAuth"; -export * from "./tests/testBodyParams"; -export * from "./tests/testCache"; -export * from "./tests/testChildrenControllers"; -export * from "./tests/testCookies"; -export * from "./tests/testCustom404"; -export * from "./tests/testDeepQueryParams"; -export * from "./tests/testErrors"; -export * from "./tests/testHandlers"; -export * from "./tests/testHeaderParams"; -export * from "./tests/testHeaders"; -export * from "./tests/testInheritanceController"; -export * from "./tests/testLocals"; -export * from "./tests/testLocation"; -export * from "./tests/testMiddlewares"; -export * from "./tests/testModule"; -export * from "./tests/testMulter"; -export * from "./tests/testPathParams"; -export * from "./tests/testQueryParams"; -export * from "./tests/testRedirect"; -export * from "./tests/testResponse"; -export * from "./tests/testResponseFilter"; -export * from "./tests/testRouting"; -export * from "./tests/testScopeRequest"; -export * from "./tests/testSession"; -export * from "./tests/testStatics"; -export * from "./tests/testStream"; -export * from "./tests/testView"; +export * from "./components/PlatformTestSdk.js"; +export * from "./errors/CustomBadRequest.js"; +export * from "./errors/CustomInternalError.js"; +export * from "./interfaces/PlatformTestingSdkOpts.js"; +export * from "./modules/feature/FeatureModule.js"; +export * from "./modules/feature/controllers/FeatureController.js"; +export * from "./tests/exports.js"; +export * from "./tests/testAcceptMime.js"; +export * from "./tests/testAuth.js"; +export * from "./tests/testBodyParams.js"; +export * from "./tests/testCache.js"; +export * from "./tests/testChildrenControllers.js"; +export * from "./tests/testCookies.js"; +export * from "./tests/testCustom404.js"; +export * from "./tests/testDeepQueryParams.js"; +export * from "./tests/testErrors.js"; +export * from "./tests/testHandlers.js"; +export * from "./tests/testHeaderParams.js"; +export * from "./tests/testHeaders.js"; +export * from "./tests/testInheritanceController.js"; +export * from "./tests/testLocals.js"; +export * from "./tests/testLocation.js"; +export * from "./tests/testMiddlewares.js"; +export * from "./tests/testModule.js"; +export * from "./tests/testMulter.js"; +export * from "./tests/testPathParams.js"; +export * from "./tests/testQueryParams.js"; +export * from "./tests/testRedirect.js"; +export * from "./tests/testResponse.js"; +export * from "./tests/testResponseFilter.js"; +export * from "./tests/testRouting.js"; +export * from "./tests/testScopeRequest.js"; +export * from "./tests/testSession.js"; +export * from "./tests/testStatics.js"; +export * from "./tests/testStream.js"; +export * from "./tests/testView.js"; diff --git a/packages/platform/platform-test-sdk/src/interfaces/index.ts b/packages/platform/platform-test-sdk/src/interfaces/index.ts index 6ebda48f69a..c3483b35fb0 100644 --- a/packages/platform/platform-test-sdk/src/interfaces/index.ts +++ b/packages/platform/platform-test-sdk/src/interfaces/index.ts @@ -2,4 +2,4 @@ * @file Automatically generated by barrelsby. */ -export * from "./PlatformTestingSdkOpts"; +export * from "./PlatformTestingSdkOpts.js"; diff --git a/packages/platform/platform-test-sdk/src/modules/feature/FeatureModule.ts b/packages/platform/platform-test-sdk/src/modules/feature/FeatureModule.ts index 4f440bdac3b..4f17045e03f 100644 --- a/packages/platform/platform-test-sdk/src/modules/feature/FeatureModule.ts +++ b/packages/platform/platform-test-sdk/src/modules/feature/FeatureModule.ts @@ -1,5 +1,5 @@ import {Module} from "@tsed/di"; -import {FeatureController} from "./controllers/FeatureController"; +import {FeatureController} from "./controllers/FeatureController.js"; @Module({ mount: { diff --git a/packages/platform/platform-test-sdk/src/tests/exports.ts b/packages/platform/platform-test-sdk/src/tests/exports.ts index 985de6fe040..8a90ed7c881 100644 --- a/packages/platform/platform-test-sdk/src/tests/exports.ts +++ b/packages/platform/platform-test-sdk/src/tests/exports.ts @@ -1,33 +1,33 @@ -import {PlatformTestingSdkOpts} from "../interfaces"; -import {testAcceptMime} from "./testAcceptMime"; -import {testAuth} from "./testAuth"; -import {testBodyParams} from "./testBodyParams"; -import {testChildrenControllers} from "./testChildrenControllers"; -import {testCookies} from "./testCookies"; -import {testCustom404} from "./testCustom404"; -import {testDeepQueryParams} from "./testDeepQueryParams"; -import {testErrors} from "./testErrors"; -import {testHandlers} from "./testHandlers"; -import {testHeaderParams} from "./testHeaderParams"; -import {testHeaders} from "./testHeaders"; -import {testInheritanceController} from "./testInheritanceController"; -import {testLocals} from "./testLocals"; -import {testLocation} from "./testLocation"; -import {testMiddlewares} from "./testMiddlewares"; -import {testModule} from "./testModule"; -import {testMulter} from "./testMulter"; -import {testPathParams} from "./testPathParams"; -import {testQueryParams} from "./testQueryParams"; -import {testRedirect} from "./testRedirect"; -import {testResponse} from "./testResponse"; -import {testResponseFilter} from "./testResponseFilter"; -import {testRouting} from "./testRouting"; -import {testScopeRequest} from "./testScopeRequest"; -import {testSession} from "./testSession"; -import {testStatics} from "./testStatics"; -import {testStream} from "./testStream"; -import {testView} from "./testView"; -import {testCache} from "./testCache"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; +import {testAcceptMime} from "./testAcceptMime.js"; +import {testAuth} from "./testAuth.js"; +import {testBodyParams} from "./testBodyParams.js"; +import {testChildrenControllers} from "./testChildrenControllers.js"; +import {testCookies} from "./testCookies.js"; +import {testCustom404} from "./testCustom404.js"; +import {testDeepQueryParams} from "./testDeepQueryParams.js"; +import {testErrors} from "./testErrors.js"; +import {testHandlers} from "./testHandlers.js"; +import {testHeaderParams} from "./testHeaderParams.js"; +import {testHeaders} from "./testHeaders.js"; +import {testInheritanceController} from "./testInheritanceController.js"; +import {testLocals} from "./testLocals.js"; +import {testLocation} from "./testLocation.js"; +import {testMiddlewares} from "./testMiddlewares.js"; +import {testModule} from "./testModule.js"; +import {testMulter} from "./testMulter.js"; +import {testPathParams} from "./testPathParams.js"; +import {testQueryParams} from "./testQueryParams.js"; +import {testRedirect} from "./testRedirect.js"; +import {testResponse} from "./testResponse.js"; +import {testResponseFilter} from "./testResponseFilter.js"; +import {testRouting} from "./testRouting.js"; +import {testScopeRequest} from "./testScopeRequest.js"; +import {testSession} from "./testSession.js"; +import {testStatics} from "./testStatics.js"; +import {testStream} from "./testStream.js"; +import {testView} from "./testView.js"; +import {testCache} from "./testCache.js"; export const specsContainer = new Map void>(); diff --git a/packages/platform/platform-test-sdk/src/tests/testAcceptMime.ts b/packages/platform/platform-test-sdk/src/tests/testAcceptMime.ts index 0479a7596c4..13de2532686 100644 --- a/packages/platform/platform-test-sdk/src/tests/testAcceptMime.ts +++ b/packages/platform/platform-test-sdk/src/tests/testAcceptMime.ts @@ -1,7 +1,7 @@ import {AcceptMime, Controller, Get, HeaderParams, PlatformTest, Post} from "@tsed/common"; import {ContentType} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Controller("/accept-mime") class TestAcceptMimeCtrl { diff --git a/packages/platform/platform-test-sdk/src/tests/testAuth.ts b/packages/platform/platform-test-sdk/src/tests/testAuth.ts index 4d9b2f66bb1..30820be0aca 100644 --- a/packages/platform/platform-test-sdk/src/tests/testAuth.ts +++ b/packages/platform/platform-test-sdk/src/tests/testAuth.ts @@ -3,8 +3,8 @@ import {useDecorators} from "@tsed/core"; import {BadRequest, Forbidden, Unauthorized} from "@tsed/exceptions"; import {In, Returns, Security} from "@tsed/schema"; import SuperTest from "supertest"; -import baseSpec from "../data/swagger.json"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import baseSpec from "../data/swagger.json.js"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Injectable() export class TokenService { diff --git a/packages/platform/platform-test-sdk/src/tests/testBodyParams.ts b/packages/platform/platform-test-sdk/src/tests/testBodyParams.ts index 4b70f4e2213..5b03f294c4a 100644 --- a/packages/platform/platform-test-sdk/src/tests/testBodyParams.ts +++ b/packages/platform/platform-test-sdk/src/tests/testBodyParams.ts @@ -15,7 +15,7 @@ import { Consumes } from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; enum MyEnum { TITLE, diff --git a/packages/platform/platform-test-sdk/src/tests/testCache.ts b/packages/platform/platform-test-sdk/src/tests/testCache.ts index a4d2363ba36..705b6dcf276 100644 --- a/packages/platform/platform-test-sdk/src/tests/testCache.ts +++ b/packages/platform/platform-test-sdk/src/tests/testCache.ts @@ -2,7 +2,7 @@ import {Controller, Get, Head, Inject, PathParams, PlatformTest, Post, QueryPara import {UseCache, PlatformCache} from "@tsed/platform-cache"; import {Property} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; let increment = 0; diff --git a/packages/platform/platform-test-sdk/src/tests/testChildrenControllers.ts b/packages/platform/platform-test-sdk/src/tests/testChildrenControllers.ts index 20be42cfc1d..6cc8c3b6527 100644 --- a/packages/platform/platform-test-sdk/src/tests/testChildrenControllers.ts +++ b/packages/platform/platform-test-sdk/src/tests/testChildrenControllers.ts @@ -1,6 +1,6 @@ import {Controller, Get, PlatformTest} from "@tsed/common"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; export function testChildrenControllers(options: PlatformTestingSdkOpts) { let request: SuperTest.Agent; diff --git a/packages/platform/platform-test-sdk/src/tests/testCookies.ts b/packages/platform/platform-test-sdk/src/tests/testCookies.ts index b34f072f3e1..4bf80f9d985 100644 --- a/packages/platform/platform-test-sdk/src/tests/testCookies.ts +++ b/packages/platform/platform-test-sdk/src/tests/testCookies.ts @@ -1,6 +1,6 @@ import {Controller, CookiesParams, Get, PlatformTest} from "@tsed/common"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Controller("/cookies") export class CookiesCtrl { diff --git a/packages/platform/platform-test-sdk/src/tests/testCustom404.ts b/packages/platform/platform-test-sdk/src/tests/testCustom404.ts index 84e92c5fd79..1edd6c52b68 100644 --- a/packages/platform/platform-test-sdk/src/tests/testCustom404.ts +++ b/packages/platform/platform-test-sdk/src/tests/testCustom404.ts @@ -1,6 +1,6 @@ import {PlatformTest} from "@tsed/common"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; export function testCustom404(options: PlatformTestingSdkOpts) { class CustomServer extends options.server {} diff --git a/packages/platform/platform-test-sdk/src/tests/testDeepQueryParams.ts b/packages/platform/platform-test-sdk/src/tests/testDeepQueryParams.ts index 9b174b7f7cd..2fe13df54c2 100644 --- a/packages/platform/platform-test-sdk/src/tests/testDeepQueryParams.ts +++ b/packages/platform/platform-test-sdk/src/tests/testDeepQueryParams.ts @@ -2,7 +2,7 @@ import "@tsed/ajv"; import {Controller, Get, PlatformTest, QueryParams} from "@tsed/common"; import {Default, GenericOf, Generics, Maximum, Minimum, Property, Required} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; class FindQuery { @Property() diff --git a/packages/platform/platform-test-sdk/src/tests/testErrors.ts b/packages/platform/platform-test-sdk/src/tests/testErrors.ts index a9ec37fe9ae..67885ab6f63 100644 --- a/packages/platform/platform-test-sdk/src/tests/testErrors.ts +++ b/packages/platform/platform-test-sdk/src/tests/testErrors.ts @@ -4,9 +4,9 @@ import {Env} from "@tsed/core"; import {BadRequest, InternalServerError} from "@tsed/exceptions"; import {Description, Name, Required, Returns, Summary} from "@tsed/schema"; import SuperTest from "supertest"; -import {CustomBadRequest} from "../errors/CustomBadRequest"; -import {CustomInternalError} from "../errors/CustomInternalError"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {CustomBadRequest} from "../errors/CustomBadRequest.js"; +import {CustomInternalError} from "../errors/CustomInternalError.js"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; class CustomModel { @Required() name: string; diff --git a/packages/platform/platform-test-sdk/src/tests/testHandlers.ts b/packages/platform/platform-test-sdk/src/tests/testHandlers.ts index 8a7c8d1ebef..090d8a27638 100644 --- a/packages/platform/platform-test-sdk/src/tests/testHandlers.ts +++ b/packages/platform/platform-test-sdk/src/tests/testHandlers.ts @@ -1,7 +1,7 @@ import {Context, Controller, Get, PathParams, PlatformTest} from "@tsed/common"; import {Property, Required, Title} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; export class MyModel { @Title("ID") diff --git a/packages/platform/platform-test-sdk/src/tests/testHeaderParams.ts b/packages/platform/platform-test-sdk/src/tests/testHeaderParams.ts index 025cf20e292..bf5aff6f2b0 100644 --- a/packages/platform/platform-test-sdk/src/tests/testHeaderParams.ts +++ b/packages/platform/platform-test-sdk/src/tests/testHeaderParams.ts @@ -1,7 +1,7 @@ import {Context, Controller, Get, HeaderParams, Locals, Middleware, PlatformTest, Post, Req, Use} from "@tsed/common"; import {Enum, Required} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Middleware() class SetId { diff --git a/packages/platform/platform-test-sdk/src/tests/testHeaders.ts b/packages/platform/platform-test-sdk/src/tests/testHeaders.ts index 67459b32769..b2b9371047d 100644 --- a/packages/platform/platform-test-sdk/src/tests/testHeaders.ts +++ b/packages/platform/platform-test-sdk/src/tests/testHeaders.ts @@ -1,7 +1,7 @@ import {BodyParams, Controller, Get, PlatformResponse, PlatformTest, Res} from "@tsed/common"; import {Returns} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Controller("/headers") export class HeadersCtrl { diff --git a/packages/platform/platform-test-sdk/src/tests/testInheritanceController.ts b/packages/platform/platform-test-sdk/src/tests/testInheritanceController.ts index ed36288490b..be54d8370c3 100644 --- a/packages/platform/platform-test-sdk/src/tests/testInheritanceController.ts +++ b/packages/platform/platform-test-sdk/src/tests/testInheritanceController.ts @@ -2,7 +2,7 @@ import {BodyParams, Controller, Get, Middleware, PathParams, PlatformTest, Post, import {NotFound} from "@tsed/exceptions"; import {Description, MaxLength, MinLength, Property, Returns, Summary} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; export class Resource { @Property() diff --git a/packages/platform/platform-test-sdk/src/tests/testLocals.ts b/packages/platform/platform-test-sdk/src/tests/testLocals.ts index a92d3dddbd0..2b56756111e 100644 --- a/packages/platform/platform-test-sdk/src/tests/testLocals.ts +++ b/packages/platform/platform-test-sdk/src/tests/testLocals.ts @@ -1,6 +1,6 @@ import {Context, Controller, Get, Locals, Middleware, Next, PlatformContext, PlatformTest, Req, Request, Res, Use} from "@tsed/common"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Middleware() class LocalsMiddleware { diff --git a/packages/platform/platform-test-sdk/src/tests/testLocation.ts b/packages/platform/platform-test-sdk/src/tests/testLocation.ts index 2a168d80dc0..ae209958b39 100644 --- a/packages/platform/platform-test-sdk/src/tests/testLocation.ts +++ b/packages/platform/platform-test-sdk/src/tests/testLocation.ts @@ -1,7 +1,7 @@ import {Controller, Get, PlatformTest} from "@tsed/common"; import SuperTest from "supertest"; import {Location} from "@tsed/schema"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Controller("/location") class LocationCtrl { diff --git a/packages/platform/platform-test-sdk/src/tests/testMiddlewares.ts b/packages/platform/platform-test-sdk/src/tests/testMiddlewares.ts index 56c04f6ce98..09f389bb947 100644 --- a/packages/platform/platform-test-sdk/src/tests/testMiddlewares.ts +++ b/packages/platform/platform-test-sdk/src/tests/testMiddlewares.ts @@ -14,7 +14,7 @@ import { } from "@tsed/common"; import {BadRequest, Exception, Unauthorized} from "@tsed/exceptions"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Middleware() class BeforeCustomMiddleware { diff --git a/packages/platform/platform-test-sdk/src/tests/testModule.ts b/packages/platform/platform-test-sdk/src/tests/testModule.ts index bc283c4e8f7..87bd692d0eb 100644 --- a/packages/platform/platform-test-sdk/src/tests/testModule.ts +++ b/packages/platform/platform-test-sdk/src/tests/testModule.ts @@ -1,7 +1,7 @@ import {Controller, Get, PlatformTest} from "@tsed/common"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; -import {FeatureModule} from "../modules/feature/FeatureModule"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; +import {FeatureModule} from "../modules/feature/FeatureModule.js"; @Controller("/root") class TestRootCtrl { diff --git a/packages/platform/platform-test-sdk/src/tests/testMulter.ts b/packages/platform/platform-test-sdk/src/tests/testMulter.ts index beaa98c91b2..c90cad64c7f 100644 --- a/packages/platform/platform-test-sdk/src/tests/testMulter.ts +++ b/packages/platform/platform-test-sdk/src/tests/testMulter.ts @@ -5,7 +5,7 @@ import multer, {FileFilterCallback} from "multer"; import {dirname, join} from "path"; import readPkgUp from "read-pkg-up"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/platform/platform-test-sdk/src/tests/testPathParams.ts b/packages/platform/platform-test-sdk/src/tests/testPathParams.ts index 325fafdbea5..5b5695d986d 100644 --- a/packages/platform/platform-test-sdk/src/tests/testPathParams.ts +++ b/packages/platform/platform-test-sdk/src/tests/testPathParams.ts @@ -1,7 +1,7 @@ import {Context, Controller, Get, PathParams, PlatformTest, Post} from "@tsed/common"; import {Pattern} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Controller("/path-params") class TestPathParamsCtrl { diff --git a/packages/platform/platform-test-sdk/src/tests/testQueryParams.ts b/packages/platform/platform-test-sdk/src/tests/testQueryParams.ts index 023fd4d40b2..bff3f6a754c 100644 --- a/packages/platform/platform-test-sdk/src/tests/testQueryParams.ts +++ b/packages/platform/platform-test-sdk/src/tests/testQueryParams.ts @@ -2,7 +2,7 @@ import "@tsed/ajv"; import {Controller, Get, PlatformTest, QueryParams} from "@tsed/common"; import {Maximum, Minimum, Required} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; export class RandomStringModel { @Maximum(250) diff --git a/packages/platform/platform-test-sdk/src/tests/testRedirect.ts b/packages/platform/platform-test-sdk/src/tests/testRedirect.ts index 2b3045defc3..c6ecb1cb956 100644 --- a/packages/platform/platform-test-sdk/src/tests/testRedirect.ts +++ b/packages/platform/platform-test-sdk/src/tests/testRedirect.ts @@ -1,6 +1,6 @@ import {Context, Controller, Get, Location, PlatformTest, Redirect} from "@tsed/common"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Controller("/redirect") class RedirectCtrl { diff --git a/packages/platform/platform-test-sdk/src/tests/testResponse.ts b/packages/platform/platform-test-sdk/src/tests/testResponse.ts index 24139917115..99286cec5cc 100644 --- a/packages/platform/platform-test-sdk/src/tests/testResponse.ts +++ b/packages/platform/platform-test-sdk/src/tests/testResponse.ts @@ -4,7 +4,7 @@ import axios from "axios"; import {of} from "rxjs"; import {agent, SuperAgentStatic} from "superagent"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; // FIXME remove when esm is ready diff --git a/packages/platform/platform-test-sdk/src/tests/testResponseFilter.ts b/packages/platform/platform-test-sdk/src/tests/testResponseFilter.ts index 958567bca73..35ab7523caf 100644 --- a/packages/platform/platform-test-sdk/src/tests/testResponseFilter.ts +++ b/packages/platform/platform-test-sdk/src/tests/testResponseFilter.ts @@ -1,7 +1,7 @@ import {Controller, Get, PlatformContext, PlatformTest, ResponseFilter, ResponseFilterMethods} from "@tsed/common"; import {Property, Returns} from "@tsed/schema"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; class ResponseFilterModel { @Property() diff --git a/packages/platform/platform-test-sdk/src/tests/testRouting.ts b/packages/platform/platform-test-sdk/src/tests/testRouting.ts index 59f6e07b930..5b926382cd3 100644 --- a/packages/platform/platform-test-sdk/src/tests/testRouting.ts +++ b/packages/platform/platform-test-sdk/src/tests/testRouting.ts @@ -1,6 +1,6 @@ import {Controller, Get, PlatformTest, Put} from "@tsed/common"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; const stub = jest.fn(); diff --git a/packages/platform/platform-test-sdk/src/tests/testScopeRequest.ts b/packages/platform/platform-test-sdk/src/tests/testScopeRequest.ts index e8f8d371ef0..928363a9576 100644 --- a/packages/platform/platform-test-sdk/src/tests/testScopeRequest.ts +++ b/packages/platform/platform-test-sdk/src/tests/testScopeRequest.ts @@ -1,6 +1,6 @@ import {Controller, Get, PathParams, PlatformTest, ProviderScope, Scope, Service} from "@tsed/common"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Service() @Scope(ProviderScope.REQUEST) diff --git a/packages/platform/platform-test-sdk/src/tests/testSession.ts b/packages/platform/platform-test-sdk/src/tests/testSession.ts index f83469b9642..6d09298e60e 100644 --- a/packages/platform/platform-test-sdk/src/tests/testSession.ts +++ b/packages/platform/platform-test-sdk/src/tests/testSession.ts @@ -3,7 +3,7 @@ import {NotFound} from "@tsed/exceptions"; import {Allow, Email, Ignore, MinLength, Property, Required, Returns} from "@tsed/schema"; import SuperTest from "supertest"; import {promisify} from "util"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; export class UserCreation { @Property() diff --git a/packages/platform/platform-test-sdk/src/tests/testStatics.ts b/packages/platform/platform-test-sdk/src/tests/testStatics.ts index 24777f6df99..0f171f4754b 100644 --- a/packages/platform/platform-test-sdk/src/tests/testStatics.ts +++ b/packages/platform/platform-test-sdk/src/tests/testStatics.ts @@ -4,7 +4,7 @@ import {Configuration} from "@tsed/di"; import {PlatformRouter} from "@tsed/platform-router"; import {readFileSync} from "fs"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Controller("/statics") class CustomStaticsCtrl { diff --git a/packages/platform/platform-test-sdk/src/tests/testStream.ts b/packages/platform/platform-test-sdk/src/tests/testStream.ts index 7bec1ac99e7..ab1f10b8270 100644 --- a/packages/platform/platform-test-sdk/src/tests/testStream.ts +++ b/packages/platform/platform-test-sdk/src/tests/testStream.ts @@ -4,7 +4,7 @@ import filedirname from "filedirname"; import {createReadStream} from "fs"; import {join} from "path"; import SuperTest from "supertest"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/platform/platform-test-sdk/src/tests/testView.ts b/packages/platform/platform-test-sdk/src/tests/testView.ts index 1fb0be04b1f..bc68d345807 100644 --- a/packages/platform/platform-test-sdk/src/tests/testView.ts +++ b/packages/platform/platform-test-sdk/src/tests/testView.ts @@ -2,7 +2,7 @@ import {Controller, Get, Locals, Middleware, PlatformTest, UseBefore} from "@tse import {EOL} from "os"; import SuperTest from "supertest"; import {View} from "@tsed/platform-views"; -import {PlatformTestingSdkOpts} from "../interfaces"; +import {PlatformTestingSdkOpts} from "../interfaces.js"; @Middleware() class LocalsMiddleware { diff --git a/packages/platform/platform-views/src/index.ts b/packages/platform/platform-views/src/index.ts index 8e00a986dd4..3acec703005 100644 --- a/packages/platform/platform-views/src/index.ts +++ b/packages/platform/platform-views/src/index.ts @@ -2,6 +2,6 @@ * @file Automatically generated by barrelsby. */ -export * from "./decorators/view"; -export * from "./domain/PlatformViewsSettings"; -export * from "./services/PlatformViews"; +export * from "./decorators/view.js"; +export * from "./domain/PlatformViewsSettings.js"; +export * from "./services/PlatformViews.js"; diff --git a/packages/platform/platform-views/src/services/PlatformViews.spec.ts b/packages/platform/platform-views/src/services/PlatformViews.spec.ts index bea3bc33876..a7109c34b93 100644 --- a/packages/platform/platform-views/src/services/PlatformViews.spec.ts +++ b/packages/platform/platform-views/src/services/PlatformViews.spec.ts @@ -1,6 +1,6 @@ import {Injectable, PlatformTest} from "@tsed/common"; import {requires} from "@tsed/engines"; -import {PlatformViews} from "./PlatformViews"; +import {PlatformViews} from "./PlatformViews.js"; @Injectable() class AlterOptions { diff --git a/packages/platform/platform-views/src/services/PlatformViews.ts b/packages/platform/platform-views/src/services/PlatformViews.ts index 4fdc89a7c44..b4d0fe76f16 100644 --- a/packages/platform/platform-views/src/services/PlatformViews.ts +++ b/packages/platform/platform-views/src/services/PlatformViews.ts @@ -9,7 +9,7 @@ import { PlatformViewsEngineOptions, PlatformViewsExtensionsTypes, PlatformViewWritableStream -} from "../domain/PlatformViewsSettings"; +} from "../domain/PlatformViewsSettings.js"; async function patchEJS(ejs: any) { if (!ejs) { diff --git a/packages/security/jwks/readme.md b/packages/security/jwks/readme.md index b1ebd453877..9d8fc4b0c13 100644 --- a/packages/security/jwks/readme.md +++ b/packages/security/jwks/readme.md @@ -40,7 +40,7 @@ npm install --save @tsed/jwks ### Generate keys ```typescript -import {generateJwks} from "./getJwks"; +import {generateJwks} from "./getJwks.js"; // Generate only jwks const jwks = generateJwks(); @@ -73,7 +73,7 @@ Outputs: ### Generate keys from certificates ```typescript -import {generateJwks} from "./getJwks"; +import {generateJwks} from "./getJwks.js"; // Generate only jwks const jwks = generateJwks({ diff --git a/packages/security/jwks/src/getJwks.spec.ts b/packages/security/jwks/src/getJwks.spec.ts index 745012fe1e9..f040dc1db8b 100644 --- a/packages/security/jwks/src/getJwks.spec.ts +++ b/packages/security/jwks/src/getJwks.spec.ts @@ -1,7 +1,7 @@ import filedirname from "filedirname"; import fs from "fs-extra"; import {join} from "path"; -import {generateJwks, getJwks} from "./getJwks"; +import {generateJwks, getJwks} from "./getJwks.js"; // FIXME remove when esm is ready const [, dir] = filedirname(); diff --git a/packages/security/jwks/src/index.ts b/packages/security/jwks/src/index.ts index 0ea0de277ce..d741668bef9 100644 --- a/packages/security/jwks/src/index.ts +++ b/packages/security/jwks/src/index.ts @@ -1,2 +1,2 @@ export * from "jose2"; -export * from "./getJwks"; +export * from "./getJwks.js"; diff --git a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/OidcWildcardRedirectUriModule.spec.ts b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/OidcWildcardRedirectUriModule.spec.ts index 15f83278bd9..eb5b1c319d7 100644 --- a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/OidcWildcardRedirectUriModule.spec.ts +++ b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/OidcWildcardRedirectUriModule.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest} from "@tsed/common"; import {catchError} from "@tsed/core"; import {errors, KoaContextWithOIDC} from "oidc-provider"; -import {OidcWildcardRedirectUriModule} from "./OidcWildcardRedirectUriModule"; +import {OidcWildcardRedirectUriModule} from "./OidcWildcardRedirectUriModule.js"; import InvalidClientMetadata = errors.InvalidClientMetadata; describe("WildcardRedirectUriAllowed", () => { @@ -50,7 +50,7 @@ describe("WildcardRedirectUriAllowed", () => { }); }); describe("validator()", () => { - describe("for redirect_uris",()=> { + describe("for redirect_uris", () => { it("should do nothing if key is not redirect_uris", () => { const service = PlatformTest.get(OidcWildcardRedirectUriModule); service.validator({} as KoaContextWithOIDC, "key", "value"); @@ -58,7 +58,9 @@ describe("WildcardRedirectUriAllowed", () => { it("should throw an error if one of client redirect_uri contains more than one '*' ", () => { const service = PlatformTest.get(OidcWildcardRedirectUriModule); - const error = catchError(() => service.validator({} as KoaContextWithOIDC, "redirect_uris", ["https://*.test.com/callback/*"])); + const error = catchError(() => + service.validator({} as KoaContextWithOIDC, "redirect_uris", ["https://*.test.com/callback/*"]) + ); expect(error).toBeInstanceOf(InvalidClientMetadata); expect(error.message).toEqual("invalid_redirect_uri"); @@ -84,8 +86,8 @@ describe("WildcardRedirectUriAllowed", () => { expect(error.message).toEqual("invalid_redirect_uri"); expect(error.error_description).toEqual("redirect_uris with a wildcard must not match an eTLD+1 of a known public suffix domain"); }); - }) - describe("for post_logout_redirect_uris",()=> { + }); + describe("for post_logout_redirect_uris", () => { it("should do nothing if key is not redirect_uris", () => { const service = PlatformTest.get(OidcWildcardRedirectUriModule); service.validator({} as KoaContextWithOIDC, "key", "value"); @@ -93,7 +95,9 @@ describe("WildcardRedirectUriAllowed", () => { it("should throw an error if one of client post_logout_redirect_uris contains more than one '*' ", () => { const service = PlatformTest.get(OidcWildcardRedirectUriModule); - const error = catchError(() => service.validator({} as KoaContextWithOIDC, "post_logout_redirect_uris", ["https://*.test.com/callback/*"])); + const error = catchError(() => + service.validator({} as KoaContextWithOIDC, "post_logout_redirect_uris", ["https://*.test.com/callback/*"]) + ); expect(error).toBeInstanceOf(InvalidClientMetadata); expect(error.message).toEqual("invalid_client_metadata"); @@ -113,12 +117,16 @@ describe("WildcardRedirectUriAllowed", () => { it("should throw an error if one of client post_logout_redirect_uris contains one '*' as hostname prefix", () => { const service = PlatformTest.get(OidcWildcardRedirectUriModule); - const error = catchError(() => service.validator({} as KoaContextWithOIDC, "post_logout_redirect_uris", ["https://prefix.*/callback"])); + const error = catchError(() => + service.validator({} as KoaContextWithOIDC, "post_logout_redirect_uris", ["https://prefix.*/callback"]) + ); expect(error).toBeInstanceOf(InvalidClientMetadata); expect(error.message).toEqual("invalid_client_metadata"); - expect(error.error_description).toEqual("post_logout_redirect_uris with a wildcard must not match an eTLD+1 of a known public suffix domain"); + expect(error.error_description).toEqual( + "post_logout_redirect_uris with a wildcard must not match an eTLD+1 of a known public suffix domain" + ); }); - }) + }); }); }); diff --git a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/OidcWildcardRedirectUriModule.ts b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/OidcWildcardRedirectUriModule.ts index 6a001e9b491..2dce0f5f59a 100644 --- a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/OidcWildcardRedirectUriModule.ts +++ b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/OidcWildcardRedirectUriModule.ts @@ -5,7 +5,7 @@ import {OIDC_PROVIDER_NODE_MODULE, OidcSettings} from "@tsed/oidc-provider"; import type {default as Provider, KoaContextWithOIDC} from "oidc-provider"; // @ts-ignore import psl from "psl"; -import {wildcardRedirectUriAllowed} from "./utils/wildcardRedirectUriAllowed"; +import {wildcardRedirectUriAllowed} from "./utils/wildcardRedirectUriAllowed.js"; declare global { namespace TsED { @@ -31,7 +31,10 @@ export class OidcWildcardRedirectUriModule { if (this.enabled) { const {redirectUriAllowed, postLogoutRedirectUriAllowed} = provider.Client.prototype; provider.Client.prototype.redirectUriAllowed = wildcardRedirectUriAllowed(redirectUriAllowed, "redirectUris"); - provider.Client.prototype.postLogoutRedirectUriAllowed = wildcardRedirectUriAllowed(postLogoutRedirectUriAllowed, "postLogoutRedirectUris"); + provider.Client.prototype.postLogoutRedirectUriAllowed = wildcardRedirectUriAllowed( + postLogoutRedirectUriAllowed, + "postLogoutRedirectUris" + ); this.logger.warn("⚠️⚠️⚠️ OIDC Wildcard Uris plugin is ENABLED ⚠️⚠️⚠️"); } diff --git a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/index.ts b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/index.ts index 750378cf9a6..9803eb7f743 100644 --- a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/index.ts +++ b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/index.ts @@ -2,5 +2,5 @@ * @file Automatically generated by barrelsby. */ -export * from "./OidcWildcardRedirectUriModule"; -export * from "./utils/wildcardRedirectUriAllowed"; +export * from "./OidcWildcardRedirectUriModule.js"; +export * from "./utils/wildcardRedirectUriAllowed.js"; diff --git a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/utils/wildcardRedirectUriAllowed.spec.ts b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/utils/wildcardRedirectUriAllowed.spec.ts index 16d9e7a35e7..07db187cd95 100644 --- a/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/utils/wildcardRedirectUriAllowed.spec.ts +++ b/packages/security/oidc-provider-plugin-wildcard-redirect-uri/src/utils/wildcardRedirectUriAllowed.spec.ts @@ -1,9 +1,9 @@ -import {wildcardRedirectUriAllowed} from "./wildcardRedirectUriAllowed"; +import {wildcardRedirectUriAllowed} from "./wildcardRedirectUriAllowed.js"; describe("wildcardRedirectUriAllowed()", () => { it("should call the original function if there is no wildcard in client redirect_uris", () => { const originalRedirectUriAllowed = jest.fn(); - wildcardRedirectUriAllowed(originalRedirectUriAllowed,"redirectUris").call( + wildcardRedirectUriAllowed(originalRedirectUriAllowed, "redirectUris").call( { redirectUris: ["https://redirect.test.com"] }, @@ -14,7 +14,7 @@ describe("wildcardRedirectUriAllowed()", () => { it("should return original function result if client has wildcard uris but not used", () => { const originalRedirectUriAllowed = jest.fn().mockReturnValue(true); - const result = wildcardRedirectUriAllowed(originalRedirectUriAllowed,"redirectUris").call( + const result = wildcardRedirectUriAllowed(originalRedirectUriAllowed, "redirectUris").call( { redirectUris: ["https://test.com/titi", "https://*.test.com/toto"] }, @@ -25,7 +25,7 @@ describe("wildcardRedirectUriAllowed()", () => { }); it("should return true if the redirect_uri match client redirect_uri with wildcard", () => { const originalRedirectUriAllowed = jest.fn(); - const result = wildcardRedirectUriAllowed(originalRedirectUriAllowed,"redirectUris").call( + const result = wildcardRedirectUriAllowed(originalRedirectUriAllowed, "redirectUris").call( { redirectUris: ["https://*.test.com/"] }, @@ -36,7 +36,7 @@ describe("wildcardRedirectUriAllowed()", () => { }); it("should return true if the post_logout_redirect_uri match client redirect_uri with wildcard", () => { const originalRedirectUriAllowed = jest.fn(); - const result = wildcardRedirectUriAllowed(originalRedirectUriAllowed,"postLogoutRedirectUris").call( + const result = wildcardRedirectUriAllowed(originalRedirectUriAllowed, "postLogoutRedirectUris").call( { postLogoutRedirectUris: ["https://*.test.com/"] }, diff --git a/packages/security/oidc-provider/readme.md b/packages/security/oidc-provider/readme.md index e4781ec3428..090ffd69522 100644 --- a/packages/security/oidc-provider/readme.md +++ b/packages/security/oidc-provider/readme.md @@ -61,8 +61,8 @@ Then import `@tsed/oidc-provider` in your Server: ```typescript import {Configuration} from "@tsed/common"; import "@tsed/oidc-provider"; // import typeorm ts.ed module -import {Accounts} from "../services/Accounts"; -import {MemoryAdapter} from "../adapters/MemoryAdapter"; +import {Accounts} from "../services/Accounts.js"; +import {MemoryAdapter} from "../adapters/MemoryAdapter.js"; @Configuration({ oidc: { diff --git a/packages/security/oidc-provider/src/OidcModule.spec.ts b/packages/security/oidc-provider/src/OidcModule.spec.ts index 776d44410d9..8ec15a5ba57 100644 --- a/packages/security/oidc-provider/src/OidcModule.spec.ts +++ b/packages/security/oidc-provider/src/OidcModule.spec.ts @@ -3,8 +3,8 @@ import expressRewrite from "express-urlrewrite"; import koaMount from "koa-mount"; // @ts-ignore import koaRewrite from "koa-rewrite"; -import {OidcModule} from "./OidcModule"; -import {OidcProvider} from "./services/OidcProvider"; +import {OidcModule} from "./OidcModule.js"; +import {OidcProvider} from "./services/OidcProvider.js"; jest.mock("express-urlrewrite", () => { return jest.fn().mockReturnValue(jest.fn()); diff --git a/packages/security/oidc-provider/src/OidcModule.ts b/packages/security/oidc-provider/src/OidcModule.ts index ea4ec2669db..95777fbe6da 100644 --- a/packages/security/oidc-provider/src/OidcModule.ts +++ b/packages/security/oidc-provider/src/OidcModule.ts @@ -1,9 +1,9 @@ import {Inject, InjectorService, PlatformApplication} from "@tsed/common"; import {Constant, Module} from "@tsed/di"; import koaMount from "koa-mount"; -import {OidcAdapters} from "./services/OidcAdapters"; -import {OidcJwks} from "./services/OidcJwks"; -import {OidcProvider} from "./services/OidcProvider"; +import {OidcAdapters} from "./services/OidcAdapters.js"; +import {OidcJwks} from "./services/OidcJwks.js"; +import {OidcProvider} from "./services/OidcProvider.js"; @Module({ imports: [OidcProvider, OidcAdapters, OidcJwks] diff --git a/packages/security/oidc-provider/src/decorators/grantId.spec.ts b/packages/security/oidc-provider/src/decorators/grantId.spec.ts index ad4674be62f..b10fe75b306 100644 --- a/packages/security/oidc-provider/src/decorators/grantId.spec.ts +++ b/packages/security/oidc-provider/src/decorators/grantId.spec.ts @@ -1,6 +1,6 @@ -import {INTERACTION_GRANT_ID} from "../constants/constants"; +import {INTERACTION_GRANT_ID} from "../constants/constants.js"; import {JsonParameterStore} from "@tsed/schema"; -import {GrantId} from "./grantId"; +import {GrantId} from "./grantId.js"; describe("@GrandId", () => { it("should inject grantId", () => { diff --git a/packages/security/oidc-provider/src/decorators/grantId.ts b/packages/security/oidc-provider/src/decorators/grantId.ts index 4a3e2ef27f4..ecbdcab75e8 100644 --- a/packages/security/oidc-provider/src/decorators/grantId.ts +++ b/packages/security/oidc-provider/src/decorators/grantId.ts @@ -1,6 +1,6 @@ import {Context} from "@tsed/common"; import {useDecorators} from "@tsed/core"; -import {INTERACTION_GRANT_ID, INTERACTION_PARAMS} from "../constants/constants"; +import {INTERACTION_GRANT_ID, INTERACTION_PARAMS} from "../constants/constants.js"; export function GrantId(): ParameterDecorator { return useDecorators(Context(INTERACTION_GRANT_ID)); diff --git a/packages/security/oidc-provider/src/decorators/interaction.spec.ts b/packages/security/oidc-provider/src/decorators/interaction.spec.ts index e2fd05dfc9f..39c0800b012 100644 --- a/packages/security/oidc-provider/src/decorators/interaction.spec.ts +++ b/packages/security/oidc-provider/src/decorators/interaction.spec.ts @@ -1,8 +1,8 @@ import {Store} from "@tsed/core"; import {GlobalProviders} from "@tsed/di"; -import {INTERACTION_OPTIONS} from "../constants/constants"; -import {OidcInteractionMethods} from "../domain/OidcInteractionMethods"; -import {Interaction} from "./interaction"; +import {INTERACTION_OPTIONS} from "../constants/constants.js"; +import {OidcInteractionMethods} from "../domain/OidcInteractionMethods.js"; +import {Interaction} from "./interaction.js"; describe("@Interaction", () => { it("should create an interaction", () => { diff --git a/packages/security/oidc-provider/src/decorators/interaction.ts b/packages/security/oidc-provider/src/decorators/interaction.ts index d0ff8713ea0..e467d03dacb 100644 --- a/packages/security/oidc-provider/src/decorators/interaction.ts +++ b/packages/security/oidc-provider/src/decorators/interaction.ts @@ -1,7 +1,7 @@ import {Controller} from "@tsed/common"; import {StoreMerge, useDecorators} from "@tsed/core"; -import {INTERACTION, INTERACTION_OPTIONS} from "../constants/constants"; -import {OidcInteractionOptions} from "../domain/OidcInteractionOptions"; +import {INTERACTION, INTERACTION_OPTIONS} from "../constants/constants.js"; +import {OidcInteractionOptions} from "../domain/OidcInteractionOptions.js"; /** * @Oidc diff --git a/packages/security/oidc-provider/src/decorators/interactions.ts b/packages/security/oidc-provider/src/decorators/interactions.ts index b53b0ed5df8..ca68ca8c0c8 100644 --- a/packages/security/oidc-provider/src/decorators/interactions.ts +++ b/packages/security/oidc-provider/src/decorators/interactions.ts @@ -1,8 +1,8 @@ import {Controller, UseBefore} from "@tsed/common"; import {Type, useDecorators} from "@tsed/core"; -import {INTERACTIONS} from "../constants/constants"; -import {OidcInteractionMiddleware} from "../middlewares/OidcInteractionMiddleware"; -import {NoCache} from "./noCache"; +import {INTERACTIONS} from "../constants/constants.js"; +import {OidcInteractionMiddleware} from "../middlewares/OidcInteractionMiddleware.js"; +import {NoCache} from "./noCache.js"; export interface InteractionsOptions { path: string; diff --git a/packages/security/oidc-provider/src/decorators/noCache.ts b/packages/security/oidc-provider/src/decorators/noCache.ts index b274491f35b..02a216818f4 100644 --- a/packages/security/oidc-provider/src/decorators/noCache.ts +++ b/packages/security/oidc-provider/src/decorators/noCache.ts @@ -1,5 +1,5 @@ import {UseBefore} from "@tsed/common"; -import {OidcNoCacheMiddleware} from "../middlewares/OidcNoCacheMiddleware"; +import {OidcNoCacheMiddleware} from "../middlewares/OidcNoCacheMiddleware.js"; export function NoCache(): ClassDecorator { return UseBefore(OidcNoCacheMiddleware) as ClassDecorator; diff --git a/packages/security/oidc-provider/src/decorators/oidcCtx.spec.ts b/packages/security/oidc-provider/src/decorators/oidcCtx.spec.ts index 8bc2d57631c..ae5bae5ac75 100644 --- a/packages/security/oidc-provider/src/decorators/oidcCtx.spec.ts +++ b/packages/security/oidc-provider/src/decorators/oidcCtx.spec.ts @@ -1,5 +1,5 @@ -import {INTERACTION_CONTEXT} from "../constants/constants"; -import {OidcCtx} from "./oidcCtx"; +import {INTERACTION_CONTEXT} from "../constants/constants.js"; +import {OidcCtx} from "./oidcCtx.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@OidcCtx", () => { diff --git a/packages/security/oidc-provider/src/decorators/oidcCtx.ts b/packages/security/oidc-provider/src/decorators/oidcCtx.ts index 085bf38676c..c635c1d1ca1 100644 --- a/packages/security/oidc-provider/src/decorators/oidcCtx.ts +++ b/packages/security/oidc-provider/src/decorators/oidcCtx.ts @@ -1,7 +1,7 @@ import {Context} from "@tsed/common"; import {useDecorators} from "@tsed/core"; -import {INTERACTION_CONTEXT} from "../constants/constants"; -import {OidcInteractionContext} from "../services/OidcInteractionContext"; +import {INTERACTION_CONTEXT} from "../constants/constants.js"; +import {OidcInteractionContext} from "../services/OidcInteractionContext.js"; export function OidcCtx(): ParameterDecorator { return useDecorators(Context(INTERACTION_CONTEXT)); diff --git a/packages/security/oidc-provider/src/decorators/oidcSession.spec.ts b/packages/security/oidc-provider/src/decorators/oidcSession.spec.ts index 26c90485cc1..fe33988ec58 100644 --- a/packages/security/oidc-provider/src/decorators/oidcSession.spec.ts +++ b/packages/security/oidc-provider/src/decorators/oidcSession.spec.ts @@ -1,5 +1,5 @@ -import {INTERACTION_SESSION} from "../constants/constants"; -import {OidcSession} from "./oidcSession"; +import {INTERACTION_SESSION} from "../constants/constants.js"; +import {OidcSession} from "./oidcSession.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@OidcSession", () => { diff --git a/packages/security/oidc-provider/src/decorators/oidcSession.ts b/packages/security/oidc-provider/src/decorators/oidcSession.ts index f27d9a7028e..f0ce5cf4ff8 100644 --- a/packages/security/oidc-provider/src/decorators/oidcSession.ts +++ b/packages/security/oidc-provider/src/decorators/oidcSession.ts @@ -2,7 +2,7 @@ import {Context} from "@tsed/common"; import {useDecorators} from "@tsed/core"; // @ts-ignore import type {default as Provider} from "oidc-provider"; -import {INTERACTION_SESSION} from "../constants/constants"; +import {INTERACTION_SESSION} from "../constants/constants.js"; /** * @decorator diff --git a/packages/security/oidc-provider/src/decorators/params.spec.ts b/packages/security/oidc-provider/src/decorators/params.spec.ts index 0a12ed7d82a..b035e9e510e 100644 --- a/packages/security/oidc-provider/src/decorators/params.spec.ts +++ b/packages/security/oidc-provider/src/decorators/params.spec.ts @@ -1,5 +1,5 @@ -import {INTERACTION_PARAMS} from "../constants/constants"; -import {Params} from "./params"; +import {INTERACTION_PARAMS} from "../constants/constants.js"; +import {Params} from "./params.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@Params", () => { diff --git a/packages/security/oidc-provider/src/decorators/params.ts b/packages/security/oidc-provider/src/decorators/params.ts index 39520ba0daf..bd4349d6763 100644 --- a/packages/security/oidc-provider/src/decorators/params.ts +++ b/packages/security/oidc-provider/src/decorators/params.ts @@ -1,6 +1,6 @@ import {Context} from "@tsed/common"; import {useDecorators} from "@tsed/core"; -import {INTERACTION_PARAMS} from "../constants/constants"; +import {INTERACTION_PARAMS} from "../constants/constants.js"; export function Params(expression?: string): ParameterDecorator { return useDecorators(Context([INTERACTION_PARAMS, expression].filter(Boolean).join("."))); diff --git a/packages/security/oidc-provider/src/decorators/prompt.spec.ts b/packages/security/oidc-provider/src/decorators/prompt.spec.ts index 562d3a5bd0a..a4fd9be923a 100644 --- a/packages/security/oidc-provider/src/decorators/prompt.spec.ts +++ b/packages/security/oidc-provider/src/decorators/prompt.spec.ts @@ -1,5 +1,5 @@ -import {INTERACTION_PROMPT} from "../constants/constants"; -import {Prompt} from "./prompt"; +import {INTERACTION_PROMPT} from "../constants/constants.js"; +import {Prompt} from "./prompt.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@Prompt", () => { diff --git a/packages/security/oidc-provider/src/decorators/prompt.ts b/packages/security/oidc-provider/src/decorators/prompt.ts index 2bf195081c2..8050e38aedb 100644 --- a/packages/security/oidc-provider/src/decorators/prompt.ts +++ b/packages/security/oidc-provider/src/decorators/prompt.ts @@ -2,7 +2,7 @@ import {Context} from "@tsed/common"; import {useDecorators} from "@tsed/core"; // @ts-ignore import type {PromptDetail as P} from "oidc-provider"; -import {INTERACTION_PROMPT} from "../constants/constants"; +import {INTERACTION_PROMPT} from "../constants/constants.js"; export function Prompt(): ParameterDecorator { return useDecorators(Context(INTERACTION_PROMPT)); diff --git a/packages/security/oidc-provider/src/decorators/uid.spec.ts b/packages/security/oidc-provider/src/decorators/uid.spec.ts index fa1bcd79335..d0ef22a7bef 100644 --- a/packages/security/oidc-provider/src/decorators/uid.spec.ts +++ b/packages/security/oidc-provider/src/decorators/uid.spec.ts @@ -1,5 +1,5 @@ -import {INTERACTION_UID} from "../constants/constants"; -import {Uid} from "./uid"; +import {INTERACTION_UID} from "../constants/constants.js"; +import {Uid} from "./uid.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@Uid", () => { diff --git a/packages/security/oidc-provider/src/decorators/uid.ts b/packages/security/oidc-provider/src/decorators/uid.ts index 968067b07ca..a828cbcf50b 100644 --- a/packages/security/oidc-provider/src/decorators/uid.ts +++ b/packages/security/oidc-provider/src/decorators/uid.ts @@ -1,6 +1,6 @@ import {Context} from "@tsed/common"; import {useDecorators} from "@tsed/core"; -import {INTERACTION_UID} from "../constants/constants"; +import {INTERACTION_UID} from "../constants/constants.js"; export function Uid(): ParameterDecorator { return useDecorators(Context(INTERACTION_UID)); diff --git a/packages/security/oidc-provider/src/domain/OidcAccountsMethods.ts b/packages/security/oidc-provider/src/domain/OidcAccountsMethods.ts index 1b75fcc34a1..88447ec1e0a 100644 --- a/packages/security/oidc-provider/src/domain/OidcAccountsMethods.ts +++ b/packages/security/oidc-provider/src/domain/OidcAccountsMethods.ts @@ -1,6 +1,6 @@ // @ts-ignore import type {default as Provider, Account} from "oidc-provider"; -import {AccessToken, AuthorizationCode, BackchannelAuthenticationRequest, DeviceCode} from "./interfaces"; +import {AccessToken, AuthorizationCode, BackchannelAuthenticationRequest, DeviceCode} from "./interfaces.js"; export interface OidcAccountsMethods { findAccount( diff --git a/packages/security/oidc-provider/src/domain/OidcInteractionPromptProps.ts b/packages/security/oidc-provider/src/domain/OidcInteractionPromptProps.ts index 25cc2e64d40..5830bcdd656 100644 --- a/packages/security/oidc-provider/src/domain/OidcInteractionPromptProps.ts +++ b/packages/security/oidc-provider/src/domain/OidcInteractionPromptProps.ts @@ -1,6 +1,6 @@ // @ts-ignore import type {UnknownObject} from "oidc-provider"; -import {OidcClient} from "./interfaces"; +import {OidcClient} from "./interfaces.js"; export type OidcInteractionPromptProps> = { client: OidcClient; diff --git a/packages/security/oidc-provider/src/domain/OidcSettings.ts b/packages/security/oidc-provider/src/domain/OidcSettings.ts index bf2cf54e49a..88a553809ed 100644 --- a/packages/security/oidc-provider/src/domain/OidcSettings.ts +++ b/packages/security/oidc-provider/src/domain/OidcSettings.ts @@ -3,7 +3,7 @@ import type {JwksKeyParameters} from "@tsed/jwks"; // @ts-ignore import type {Configuration} from "oidc-provider"; import type {Adapter} from "@tsed/adapters"; -import type {OidcAccountsMethods} from "./OidcAccountsMethods"; +import type {OidcAccountsMethods} from "./OidcAccountsMethods.js"; export interface OidcSettings extends Configuration { /** diff --git a/packages/security/oidc-provider/src/index.ts b/packages/security/oidc-provider/src/index.ts index d4e8ba1f65f..17886e7f1d7 100644 --- a/packages/security/oidc-provider/src/index.ts +++ b/packages/security/oidc-provider/src/index.ts @@ -2,34 +2,34 @@ * @file Automatically generated by barrelsby. */ -export * from "./OidcModule"; -export * from "./constants/constants"; -export * from "./decorators/grantId"; -export * from "./decorators/interaction"; -export * from "./decorators/interactions"; -export * from "./decorators/noCache"; -export * from "./decorators/oidcCtx"; -export * from "./decorators/oidcSession"; -export * from "./decorators/params"; -export * from "./decorators/prompt"; -export * from "./decorators/uid"; -export * from "./domain/InteractionMethods"; -export * from "./domain/OidcAccountsMethods"; -export * from "./domain/OidcBadInteractionName"; -export * from "./domain/OidcInteractionMethods"; -export * from "./domain/OidcInteractionOptions"; -export * from "./domain/OidcInteractionPromptProps"; -export * from "./domain/OidcSettings"; -export * from "./domain/interfaces"; -export * from "./middlewares/OidcInteractionMiddleware"; -export * from "./middlewares/OidcNoCacheMiddleware"; -export * from "./middlewares/OidcSecureMiddleware"; -export * from "./services/OidcAdapters"; -export * from "./services/OidcInteractionContext"; -export * from "./services/OidcInteractions"; -export * from "./services/OidcJwks"; -export * from "./services/OidcPolicy"; -export * from "./services/OidcProvider"; -export * from "./services/OidcProviderNodeModule"; -export * from "./utils/debug"; -export * from "./utils/events"; +export * from "./OidcModule.js"; +export * from "./constants/constants.js"; +export * from "./decorators/grantId.js"; +export * from "./decorators/interaction.js"; +export * from "./decorators/interactions.js"; +export * from "./decorators/noCache.js"; +export * from "./decorators/oidcCtx.js"; +export * from "./decorators/oidcSession.js"; +export * from "./decorators/params.js"; +export * from "./decorators/prompt.js"; +export * from "./decorators/uid.js"; +export * from "./domain/InteractionMethods.js"; +export * from "./domain/OidcAccountsMethods.js"; +export * from "./domain/OidcBadInteractionName.js"; +export * from "./domain/OidcInteractionMethods.js"; +export * from "./domain/OidcInteractionOptions.js"; +export * from "./domain/OidcInteractionPromptProps.js"; +export * from "./domain/OidcSettings.js"; +export * from "./domain/interfaces.js"; +export * from "./middlewares/OidcInteractionMiddleware.js"; +export * from "./middlewares/OidcNoCacheMiddleware.js"; +export * from "./middlewares/OidcSecureMiddleware.js"; +export * from "./services/OidcAdapters.js"; +export * from "./services/OidcInteractionContext.js"; +export * from "./services/OidcInteractions.js"; +export * from "./services/OidcJwks.js"; +export * from "./services/OidcPolicy.js"; +export * from "./services/OidcProvider.js"; +export * from "./services/OidcProviderNodeModule.js"; +export * from "./utils/debug.js"; +export * from "./utils/events.js"; diff --git a/packages/security/oidc-provider/src/middlewares/OidcInteractionMiddleware.spec.ts b/packages/security/oidc-provider/src/middlewares/OidcInteractionMiddleware.spec.ts index 2cec8a44a2a..02b4bf499a2 100644 --- a/packages/security/oidc-provider/src/middlewares/OidcInteractionMiddleware.spec.ts +++ b/packages/security/oidc-provider/src/middlewares/OidcInteractionMiddleware.spec.ts @@ -7,9 +7,9 @@ import { INTERACTION_PROMPT, INTERACTION_SESSION, INTERACTION_UID -} from "../constants/constants"; -import {OidcInteractionContext} from "../services/OidcInteractionContext"; -import {OidcInteractionMiddleware} from "./OidcInteractionMiddleware"; +} from "../constants/constants.js"; +import {OidcInteractionContext} from "../services/OidcInteractionContext.js"; +import {OidcInteractionMiddleware} from "./OidcInteractionMiddleware.js"; describe("OidcInteractionMiddleware", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/security/oidc-provider/src/middlewares/OidcInteractionMiddleware.ts b/packages/security/oidc-provider/src/middlewares/OidcInteractionMiddleware.ts index 9276b0e5c9a..6ca2cbbde0e 100644 --- a/packages/security/oidc-provider/src/middlewares/OidcInteractionMiddleware.ts +++ b/packages/security/oidc-provider/src/middlewares/OidcInteractionMiddleware.ts @@ -1,5 +1,5 @@ import {Inject, Middleware} from "@tsed/common"; -import {OidcInteractionContext} from "../services/OidcInteractionContext"; +import {OidcInteractionContext} from "../services/OidcInteractionContext.js"; @Middleware() export class OidcInteractionMiddleware { diff --git a/packages/security/oidc-provider/src/middlewares/OidcNoCacheMiddleware.spec.ts b/packages/security/oidc-provider/src/middlewares/OidcNoCacheMiddleware.spec.ts index 0e416fe46ca..d1d0379475a 100644 --- a/packages/security/oidc-provider/src/middlewares/OidcNoCacheMiddleware.spec.ts +++ b/packages/security/oidc-provider/src/middlewares/OidcNoCacheMiddleware.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {OidcNoCacheMiddleware} from "./OidcNoCacheMiddleware"; +import {OidcNoCacheMiddleware} from "./OidcNoCacheMiddleware.js"; describe("OidcNoCacheMiddleware", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/security/oidc-provider/src/middlewares/OidcSecureMiddleware.spec.ts b/packages/security/oidc-provider/src/middlewares/OidcSecureMiddleware.spec.ts index ede7c7c6b94..6f8235b7e6f 100644 --- a/packages/security/oidc-provider/src/middlewares/OidcSecureMiddleware.spec.ts +++ b/packages/security/oidc-provider/src/middlewares/OidcSecureMiddleware.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {OidcSecureMiddleware} from "./OidcSecureMiddleware"; +import {OidcSecureMiddleware} from "./OidcSecureMiddleware.js"; describe("OidcSecureMiddleware", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/security/oidc-provider/src/services/OidcAdapters.spec.ts b/packages/security/oidc-provider/src/services/OidcAdapters.spec.ts index ce5d3e9af7c..95b04081e08 100644 --- a/packages/security/oidc-provider/src/services/OidcAdapters.spec.ts +++ b/packages/security/oidc-provider/src/services/OidcAdapters.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest} from "@tsed/common"; import faker from "@faker-js/faker"; import type {Adapter} from "oidc-provider"; -import {OidcAdapters} from "./OidcAdapters"; +import {OidcAdapters} from "./OidcAdapters.js"; describe("OidcAdapters", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/security/oidc-provider/src/services/OidcInteractionContext.spec.ts b/packages/security/oidc-provider/src/services/OidcInteractionContext.spec.ts index d27422aaa42..47b5669fb9c 100644 --- a/packages/security/oidc-provider/src/services/OidcInteractionContext.spec.ts +++ b/packages/security/oidc-provider/src/services/OidcInteractionContext.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest} from "@tsed/common"; import {catchAsyncError, catchError} from "@tsed/core"; -import {OidcInteractionContext} from "./OidcInteractionContext"; -import {OidcProvider} from "./OidcProvider"; +import {OidcInteractionContext} from "./OidcInteractionContext.js"; +import {OidcProvider} from "./OidcProvider.js"; async function createOidcInteractionContextFixture(grantId: any = "grantId") { const $ctx = PlatformTest.createRequestContext(); diff --git a/packages/security/oidc-provider/src/services/OidcInteractionContext.ts b/packages/security/oidc-provider/src/services/OidcInteractionContext.ts index e538f874012..c894034a1a4 100644 --- a/packages/security/oidc-provider/src/services/OidcInteractionContext.ts +++ b/packages/security/oidc-provider/src/services/OidcInteractionContext.ts @@ -13,14 +13,14 @@ import { INTERACTION_PROMPT, INTERACTION_SESSION, INTERACTION_UID -} from "../constants/constants"; -import {OidcSession} from "../decorators/oidcSession"; -import {OidcClient, OidcInteraction} from "../domain/interfaces"; -import {OidcBadInteractionName} from "../domain/OidcBadInteractionName"; -import {OidcInteractionPromptProps} from "../domain/OidcInteractionPromptProps"; -import {debug} from "../utils/debug"; -import {OidcInteractions} from "./OidcInteractions"; -import {OidcProvider} from "./OidcProvider"; +} from "../constants/constants.js"; +import {OidcSession} from "../decorators/oidcSession.js"; +import {OidcClient, OidcInteraction} from "../domain/interfaces.js"; +import {OidcBadInteractionName} from "../domain/OidcBadInteractionName.js"; +import {OidcInteractionPromptProps} from "../domain/OidcInteractionPromptProps.js"; +import {debug} from "../utils/debug.js"; +import {OidcInteractions} from "./OidcInteractions.js"; +import {OidcProvider} from "./OidcProvider.js"; import omit from "lodash/omit"; @Injectable() export class OidcInteractionContext { diff --git a/packages/security/oidc-provider/src/services/OidcInteractions.ts b/packages/security/oidc-provider/src/services/OidcInteractions.ts index 17f02e483bf..25500c7cb82 100644 --- a/packages/security/oidc-provider/src/services/OidcInteractions.ts +++ b/packages/security/oidc-provider/src/services/OidcInteractions.ts @@ -1,9 +1,9 @@ import {Constant, EndpointMetadata, PlatformContext, PlatformHandler, Provider, TokenProvider} from "@tsed/common"; import {Env} from "@tsed/core"; import {Inject, Injectable, InjectorService} from "@tsed/di"; -import {INTERACTION, INTERACTION_OPTIONS, INTERACTIONS} from "../constants/constants"; -import {OidcInteractionOptions} from "../domain/OidcInteractionOptions"; -import {OidcSettings} from "../domain/OidcSettings"; +import {INTERACTION, INTERACTION_OPTIONS, INTERACTIONS} from "../constants/constants.js"; +import {OidcInteractionOptions} from "../domain/OidcInteractionOptions.js"; +import {OidcSettings} from "../domain/OidcSettings.js"; @Injectable() export class OidcInteractions { diff --git a/packages/security/oidc-provider/src/services/OidcPolicy.spec.ts b/packages/security/oidc-provider/src/services/OidcPolicy.spec.ts index afb85d24807..2a1a198e80f 100644 --- a/packages/security/oidc-provider/src/services/OidcPolicy.spec.ts +++ b/packages/security/oidc-provider/src/services/OidcPolicy.spec.ts @@ -1,9 +1,9 @@ import {PlatformTest} from "@tsed/common"; import {Env} from "@tsed/core"; -import {ConsentInteraction} from "../../test/app/interactions/ConsentInteraction"; -import {Interaction} from "../decorators/interaction"; -import {OidcInteractions} from "./OidcInteractions"; -import {OidcPolicy} from "./OidcPolicy"; +import {ConsentInteraction} from "../../test/app/interactions/ConsentInteraction.js"; +import {Interaction} from "../decorators/interaction.js"; +import {OidcInteractions} from "./OidcInteractions.js"; +import {OidcPolicy} from "./OidcPolicy.js"; describe("OidcPolicy", () => { beforeEach(() => diff --git a/packages/security/oidc-provider/src/services/OidcPolicy.ts b/packages/security/oidc-provider/src/services/OidcPolicy.ts index ecaaee66a73..fe954bd901b 100644 --- a/packages/security/oidc-provider/src/services/OidcPolicy.ts +++ b/packages/security/oidc-provider/src/services/OidcPolicy.ts @@ -1,10 +1,10 @@ import {Inject, Injectable, InjectorService, Provider} from "@tsed/di"; // @ts-ignore import {interactionPolicy} from "oidc-provider"; -import {InteractionMethods} from "../domain/InteractionMethods"; -import {OidcInteractionOptions} from "../domain/OidcInteractionOptions"; -import {OidcInteractions} from "./OidcInteractions"; -import {OIDC_PROVIDER_NODE_MODULE} from "./OidcProviderNodeModule"; +import {InteractionMethods} from "../domain/InteractionMethods.js"; +import {OidcInteractionOptions} from "../domain/OidcInteractionOptions.js"; +import {OidcInteractions} from "./OidcInteractions.js"; +import {OIDC_PROVIDER_NODE_MODULE} from "./OidcProviderNodeModule.js"; import Prompt = interactionPolicy.Prompt; @Injectable() diff --git a/packages/security/oidc-provider/src/services/OidcProvider.spec.ts b/packages/security/oidc-provider/src/services/OidcProvider.spec.ts index db653ead0ce..3975673e582 100644 --- a/packages/security/oidc-provider/src/services/OidcProvider.spec.ts +++ b/packages/security/oidc-provider/src/services/OidcProvider.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest, runInContext} from "@tsed/common"; import {Env} from "@tsed/core"; import "../../test/app/controllers/oidc/InteractionsCtrl"; -import {OidcProvider} from "./OidcProvider"; +import {OidcProvider} from "./OidcProvider.js"; describe("OidcProvider", () => { describe("Production", () => { diff --git a/packages/security/oidc-provider/src/services/OidcProvider.ts b/packages/security/oidc-provider/src/services/OidcProvider.ts index c02940263ea..378fcb901a2 100644 --- a/packages/security/oidc-provider/src/services/OidcProvider.ts +++ b/packages/security/oidc-provider/src/services/OidcProvider.ts @@ -3,15 +3,15 @@ import {Env, setValue} from "@tsed/core"; import {Constant, Inject, Injectable, InjectorService} from "@tsed/di"; // @ts-ignore import type {Configuration, default as OIDCProvider, KoaContextWithOIDC} from "oidc-provider"; -import {INTERACTIONS} from "../constants/constants"; -import {OidcAccountsMethods} from "../domain/OidcAccountsMethods"; -import {OidcSettings} from "../domain/OidcSettings"; -import {OIDC_ERROR_EVENTS} from "../utils/events"; -import {OidcAdapters} from "./OidcAdapters"; -import {OidcInteractions} from "./OidcInteractions"; -import {OidcJwks} from "./OidcJwks"; -import {OidcPolicy} from "./OidcPolicy"; -import {OIDC_PROVIDER_NODE_MODULE, Provider} from "./OidcProviderNodeModule"; +import {INTERACTIONS} from "../constants/constants.js"; +import {OidcAccountsMethods} from "../domain/OidcAccountsMethods.js"; +import {OidcSettings} from "../domain/OidcSettings.js"; +import {OIDC_ERROR_EVENTS} from "../utils/events.js"; +import {OidcAdapters} from "./OidcAdapters.js"; +import {OidcInteractions} from "./OidcInteractions.js"; +import {OidcJwks} from "./OidcJwks.js"; +import {OidcPolicy} from "./OidcPolicy.js"; +import {OIDC_PROVIDER_NODE_MODULE, Provider} from "./OidcProviderNodeModule.js"; function mapError(error: any) { return Object.getOwnPropertyNames(error).reduce((obj: any, key) => { diff --git a/packages/security/oidc-provider/src/utils/debug.spec.ts b/packages/security/oidc-provider/src/utils/debug.spec.ts index 60d9177c81d..28ecad3d84e 100644 --- a/packages/security/oidc-provider/src/utils/debug.spec.ts +++ b/packages/security/oidc-provider/src/utils/debug.spec.ts @@ -1,4 +1,4 @@ -import {debug} from "./debug"; +import {debug} from "./debug.js"; describe("debug", () => { it("should debug", () => { diff --git a/packages/security/oidc-provider/test/app/Server.ts b/packages/security/oidc-provider/test/app/Server.ts index 3100fa47b12..383640de653 100644 --- a/packages/security/oidc-provider/test/app/Server.ts +++ b/packages/security/oidc-provider/test/app/Server.ts @@ -12,7 +12,7 @@ import session from "express-session"; import filedirname from "filedirname"; import methodOverride from "method-override"; import {join} from "path"; -import {Accounts} from "./services/Accounts"; +import {Accounts} from "./services/Accounts.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/security/oidc-provider/test/app/controllers/oidc/InteractionsCtrl.ts b/packages/security/oidc-provider/test/app/controllers/oidc/InteractionsCtrl.ts index c7b03a742b1..9ddc1322282 100644 --- a/packages/security/oidc-provider/test/app/controllers/oidc/InteractionsCtrl.ts +++ b/packages/security/oidc-provider/test/app/controllers/oidc/InteractionsCtrl.ts @@ -1,10 +1,10 @@ import {Get, PathParams} from "@tsed/common"; import {Interactions, OidcCtx} from "@tsed/oidc-provider"; import {Name} from "@tsed/schema"; -import {AbortInteraction} from "../../interactions/AbortInteraction"; -import {ConsentInteraction} from "../../interactions/ConsentInteraction"; -import {CustomInteraction} from "../../interactions/CustomInteraction"; -import {LoginInteraction} from "../../interactions/LoginInteraction"; +import {AbortInteraction} from "../../interactions/AbortInteraction.js"; +import {ConsentInteraction} from "../../interactions/ConsentInteraction.js"; +import {CustomInteraction} from "../../interactions/CustomInteraction.js"; +import {LoginInteraction} from "../../interactions/LoginInteraction.js"; @Name("Oidc") @Interactions({ diff --git a/packages/security/oidc-provider/test/app/index.ts b/packages/security/oidc-provider/test/app/index.ts index 16fba3d812e..66e13bef429 100644 --- a/packages/security/oidc-provider/test/app/index.ts +++ b/packages/security/oidc-provider/test/app/index.ts @@ -1,9 +1,9 @@ import {$log} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; -import {InteractionsCtrl} from "./controllers/oidc/InteractionsCtrl"; -import {IndexCtrl} from "./controllers/pages/IndexCtrl"; -import {VersionCtrl} from "./controllers/rest/VersionCtrl"; -import {Server} from "./Server"; +import {InteractionsCtrl} from "./controllers/oidc/InteractionsCtrl.js"; +import {IndexCtrl} from "./controllers/pages/IndexCtrl.js"; +import {VersionCtrl} from "./controllers/rest/VersionCtrl.js"; +import {Server} from "./Server.js"; if (process.env.NODE_ENV !== "test") { async function bootstrap() { diff --git a/packages/security/oidc-provider/test/app/interactions/LoginInteraction.ts b/packages/security/oidc-provider/test/app/interactions/LoginInteraction.ts index a41723f13df..9d54dc422db 100644 --- a/packages/security/oidc-provider/test/app/interactions/LoginInteraction.ts +++ b/packages/security/oidc-provider/test/app/interactions/LoginInteraction.ts @@ -4,7 +4,7 @@ import {Constant} from "@tsed/di"; import {Interaction, InteractionMethods, OidcCtx, OidcSession, Params, Prompt, Uid} from "@tsed/oidc-provider"; import {View} from "@tsed/platform-views"; import {Name} from "@tsed/schema"; -import {Accounts} from "../services/Accounts"; +import {Accounts} from "../services/Accounts.js"; @Interaction({ name: "login", diff --git a/packages/security/oidc-provider/test/app/services/Accounts.ts b/packages/security/oidc-provider/test/app/services/Accounts.ts index 66610b2f042..03a58815724 100644 --- a/packages/security/oidc-provider/test/app/services/Accounts.ts +++ b/packages/security/oidc-provider/test/app/services/Accounts.ts @@ -3,7 +3,7 @@ import {PlatformContext} from "@tsed/common"; import {Injectable} from "@tsed/di"; import {deserialize} from "@tsed/json-mapper"; import {AccessToken, AuthorizationCode, DeviceCode, OidcAccountsMethods} from "@tsed/oidc-provider"; -import {Account} from "../models/Account"; +import {Account} from "../models/Account.js"; @Injectable() export class Accounts implements OidcAccountsMethods { diff --git a/packages/security/oidc-provider/test/oidc.integration.spec.ts b/packages/security/oidc-provider/test/oidc.integration.spec.ts index 328ff9c05e8..57ce4a38293 100644 --- a/packages/security/oidc-provider/test/oidc.integration.spec.ts +++ b/packages/security/oidc-provider/test/oidc.integration.spec.ts @@ -4,12 +4,12 @@ import {PlatformExpress} from "@tsed/platform-express"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import filedirname from "filedirname"; import SuperTest from "supertest"; -import {rootDir} from "../../../platform/platform-express/test/app/Server"; -import {InteractionsCtrl} from "./app/controllers/oidc/InteractionsCtrl"; -import {Server} from "./app/Server"; +import {rootDir} from "../../../platform/platform-express/test/app/Server.js"; +import {InteractionsCtrl} from "./app/controllers/oidc/InteractionsCtrl.js"; +import {Server} from "./app/Server.js"; import {join} from "path"; -import {Accounts} from "./app/services/Accounts"; +import {Accounts} from "./app/services/Accounts.js"; // FIXME remove when esm is ready const [, testDir] = filedirname(); diff --git a/packages/security/passport/readme.md b/packages/security/passport/readme.md index de7f47d177b..05138e84c46 100644 --- a/packages/security/passport/readme.md +++ b/packages/security/passport/readme.md @@ -66,7 +66,7 @@ import {Strategy} from "passport-local"; import {Unauthorized} from "@tsed/exceptions"; import {Protocol, OnInstall, OnVerify} from "@tsed/passport"; import {Inject} from "@tsed/di"; -import {UserService} from "../services/UserService"; +import {UserService} from "../services/UserService.js"; export class Credentials { @Required() diff --git a/packages/security/passport/src/PassportModule.spec.ts b/packages/security/passport/src/PassportModule.spec.ts index bac84dcc49f..a3a7b034a96 100644 --- a/packages/security/passport/src/PassportModule.spec.ts +++ b/packages/security/passport/src/PassportModule.spec.ts @@ -1,6 +1,6 @@ import {PlatformApplication, PlatformTest} from "@tsed/common"; import "../src/index"; -import {PassportModule} from "./PassportModule"; +import {PassportModule} from "./PassportModule.js"; import Passport from "passport"; jest.mock("passport"); diff --git a/packages/security/passport/src/PassportModule.ts b/packages/security/passport/src/PassportModule.ts index 38c707cc927..db3343da4a2 100644 --- a/packages/security/passport/src/PassportModule.ts +++ b/packages/security/passport/src/PassportModule.ts @@ -1,7 +1,7 @@ import {BeforeRoutesInit, Constant, Inject, Module, OnInit, PlatformApplication, Provider, ProviderScope, Logger} from "@tsed/common"; import Passport from "passport"; -import {PassportSerializerService} from "./services/PassportSerializerService"; -import {ProtocolsService} from "./services/ProtocolsService"; +import {PassportSerializerService} from "./services/PassportSerializerService.js"; +import {ProtocolsService} from "./services/ProtocolsService.js"; /** * @ignore diff --git a/packages/security/passport/src/decorators/args.spec.ts b/packages/security/passport/src/decorators/args.spec.ts index 28ef6ee60a1..0934e828a74 100644 --- a/packages/security/passport/src/decorators/args.spec.ts +++ b/packages/security/passport/src/decorators/args.spec.ts @@ -1,5 +1,5 @@ import {ParamTypes} from "@tsed/common"; -import {Arg, Args} from "./args"; +import {Arg, Args} from "./args.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@Args", () => { diff --git a/packages/security/passport/src/decorators/authenticate.spec.ts b/packages/security/passport/src/decorators/authenticate.spec.ts index 0f4dbfad7aa..092ff9a8f6f 100644 --- a/packages/security/passport/src/decorators/authenticate.spec.ts +++ b/packages/security/passport/src/decorators/authenticate.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {Authenticate, PassportMiddleware} from "../index"; +import {Authenticate, PassportMiddleware} from "../index.js"; import {Security} from "@tsed/schema"; describe("@Authenticate", () => { diff --git a/packages/security/passport/src/decorators/authenticate.ts b/packages/security/passport/src/decorators/authenticate.ts index 24b6c613269..dc2692260e5 100644 --- a/packages/security/passport/src/decorators/authenticate.ts +++ b/packages/security/passport/src/decorators/authenticate.ts @@ -2,7 +2,7 @@ import {UseAuth} from "@tsed/platform-middlewares"; import {useDecorators} from "@tsed/core"; import {Security} from "@tsed/schema"; import {AuthenticateOptions as PassportAuthenticateOptions} from "passport"; -import {PassportMiddleware} from "../middlewares/PassportMiddleware"; +import {PassportMiddleware} from "../middlewares/PassportMiddleware.js"; export interface AuthenticateOptions extends PassportAuthenticateOptions { security?: Record; diff --git a/packages/security/passport/src/decorators/authorize.spec.ts b/packages/security/passport/src/decorators/authorize.spec.ts index 7685e2dff21..dc7cfda22c6 100644 --- a/packages/security/passport/src/decorators/authorize.spec.ts +++ b/packages/security/passport/src/decorators/authorize.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {Authorize, PassportMiddleware} from "../index"; +import {Authorize, PassportMiddleware} from "../index.js"; describe("@Authorize", () => { it("should store data", () => { diff --git a/packages/security/passport/src/decorators/authorize.ts b/packages/security/passport/src/decorators/authorize.ts index 76d606d3e56..fae4e0b7b69 100644 --- a/packages/security/passport/src/decorators/authorize.ts +++ b/packages/security/passport/src/decorators/authorize.ts @@ -2,7 +2,7 @@ import {UseAuth} from "@tsed/platform-middlewares"; import {useDecorators} from "@tsed/core"; import {Security} from "@tsed/schema"; import {AuthenticateOptions} from "passport"; -import {PassportMiddleware} from "../middlewares/PassportMiddleware"; +import {PassportMiddleware} from "../middlewares/PassportMiddleware.js"; export interface AuthorizeOptions extends AuthenticateOptions { security?: Record; diff --git a/packages/security/passport/src/decorators/protocol.ts b/packages/security/passport/src/decorators/protocol.ts index a6c7dfda162..a5474a2a76b 100644 --- a/packages/security/passport/src/decorators/protocol.ts +++ b/packages/security/passport/src/decorators/protocol.ts @@ -1,7 +1,7 @@ import {StoreSet, useDecorators} from "@tsed/core"; import {Configuration, Injectable} from "@tsed/di"; -import {ProtocolOptions} from "../interfaces/ProtocolOptions"; -import {PROVIDER_TYPE_PROTOCOL} from "../contants/constants"; +import {ProtocolOptions} from "../interfaces/ProtocolOptions.js"; +import {PROVIDER_TYPE_PROTOCOL} from "../contants/constants.js"; /** * Declare a new Protocol base on a Passport Strategy diff --git a/packages/security/passport/src/index.ts b/packages/security/passport/src/index.ts index 29c32b0fafb..c28e8afcb26 100644 --- a/packages/security/passport/src/index.ts +++ b/packages/security/passport/src/index.ts @@ -2,22 +2,22 @@ * @file Automatically generated by barrelsby. */ -export * from "./PassportModule"; -export * from "./contants/constants"; -export * from "./decorators/args"; -export * from "./decorators/authenticate"; -export * from "./decorators/authorize"; -export * from "./decorators/protocol"; -export * from "./domain/UserInfo"; -export * from "./errors/PassportException"; -export * from "./errors/PassportMessage"; -export * from "./interfaces/BeforeInstall"; -export * from "./interfaces/OnInstall"; -export * from "./interfaces/OnVerify"; -export * from "./interfaces/ProtocolMethods"; -export * from "./interfaces/ProtocolOptions"; -export * from "./interfaces/interfaces"; -export * from "./middlewares/PassportMiddleware"; -export * from "./services/PassportSerializerService"; -export * from "./services/ProtocolsService"; -export * from "./utils/getProtocolsFromRequest"; +export * from "./PassportModule.js"; +export * from "./contants/constants.js"; +export * from "./decorators/args.js"; +export * from "./decorators/authenticate.js"; +export * from "./decorators/authorize.js"; +export * from "./decorators/protocol.js"; +export * from "./domain/UserInfo.js"; +export * from "./errors/PassportException.js"; +export * from "./errors/PassportMessage.js"; +export * from "./interfaces/BeforeInstall.js"; +export * from "./interfaces/OnInstall.js"; +export * from "./interfaces/OnVerify.js"; +export * from "./interfaces/ProtocolMethods.js"; +export * from "./interfaces/ProtocolOptions.js"; +export * from "./interfaces/interfaces.js"; +export * from "./middlewares/PassportMiddleware.js"; +export * from "./services/PassportSerializerService.js"; +export * from "./services/ProtocolsService.js"; +export * from "./utils/getProtocolsFromRequest.js"; diff --git a/packages/security/passport/src/interfaces/ProtocolMethods.ts b/packages/security/passport/src/interfaces/ProtocolMethods.ts index ccca9e50e47..ebaef3acc4b 100644 --- a/packages/security/passport/src/interfaces/ProtocolMethods.ts +++ b/packages/security/passport/src/interfaces/ProtocolMethods.ts @@ -1,5 +1,5 @@ -import {OnInstall} from "./OnInstall"; -import {OnVerify} from "./OnVerify"; -import {BeforeInstall} from "./BeforeInstall"; +import {OnInstall} from "./OnInstall.js"; +import {OnVerify} from "./OnVerify.js"; +import {BeforeInstall} from "./BeforeInstall.js"; export interface ProtocolMethods extends OnVerify, OnInstall, BeforeInstall {} diff --git a/packages/security/passport/src/interfaces/interfaces.ts b/packages/security/passport/src/interfaces/interfaces.ts index 63b2b54dc2a..5996913d149 100644 --- a/packages/security/passport/src/interfaces/interfaces.ts +++ b/packages/security/passport/src/interfaces/interfaces.ts @@ -1,6 +1,6 @@ import {Type} from "@tsed/core"; import {PassportStatic} from "passport"; -import {ProtocolOptions} from "./ProtocolOptions"; +import {ProtocolOptions} from "./ProtocolOptions.js"; declare global { namespace TsED { diff --git a/packages/security/passport/src/middlewares/PassportMiddleware.spec.ts b/packages/security/passport/src/middlewares/PassportMiddleware.spec.ts index 0b5705f0181..578b1afe744 100644 --- a/packages/security/passport/src/middlewares/PassportMiddleware.spec.ts +++ b/packages/security/passport/src/middlewares/PassportMiddleware.spec.ts @@ -1,8 +1,8 @@ import {PlatformTest} from "@tsed/common"; import {Unauthorized} from "@tsed/exceptions"; -import {PassportException} from "../errors/PassportException"; +import {PassportException} from "../errors/PassportException.js"; import Passport from "passport"; -import {PassportMiddleware} from "./PassportMiddleware"; +import {PassportMiddleware} from "./PassportMiddleware.js"; function createContextFixture(options = {}) { return PlatformTest.createRequestContext({ diff --git a/packages/security/passport/src/middlewares/PassportMiddleware.ts b/packages/security/passport/src/middlewares/PassportMiddleware.ts index b55bebf2c4f..9515412b4ee 100644 --- a/packages/security/passport/src/middlewares/PassportMiddleware.ts +++ b/packages/security/passport/src/middlewares/PassportMiddleware.ts @@ -1,8 +1,8 @@ import {Inject} from "@tsed/di"; import {Middleware} from "@tsed/platform-middlewares"; import {Context} from "@tsed/common"; -import {ProtocolsService} from "../services/ProtocolsService"; -import {getProtocolsFromRequest} from "../utils/getProtocolsFromRequest"; +import {ProtocolsService} from "../services/ProtocolsService.js"; +import {getProtocolsFromRequest} from "../utils/getProtocolsFromRequest.js"; @Middleware() export class PassportMiddleware { diff --git a/packages/security/passport/src/services/PassportSerializerService.spec.ts b/packages/security/passport/src/services/PassportSerializerService.spec.ts index 410b0c4ef93..29622dd83c3 100644 --- a/packages/security/passport/src/services/PassportSerializerService.spec.ts +++ b/packages/security/passport/src/services/PassportSerializerService.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {PassportSerializerService, UserInfo} from "../index"; +import {PassportSerializerService, UserInfo} from "../index.js"; describe("PassportSerializerService", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/security/passport/src/services/PassportSerializerService.ts b/packages/security/passport/src/services/PassportSerializerService.ts index 0118d3a7a2e..a2f6ea708c4 100644 --- a/packages/security/passport/src/services/PassportSerializerService.ts +++ b/packages/security/passport/src/services/PassportSerializerService.ts @@ -1,7 +1,7 @@ import {Type} from "@tsed/core"; import {Constant, Service} from "@tsed/di"; import {deserialize, serialize} from "@tsed/json-mapper"; -import {UserInfo} from "../domain/UserInfo"; +import {UserInfo} from "../domain/UserInfo.js"; /** * @ignore diff --git a/packages/security/passport/src/services/ProtocolsService.spec.ts b/packages/security/passport/src/services/ProtocolsService.spec.ts index 85694aeac99..8572e60b749 100644 --- a/packages/security/passport/src/services/ProtocolsService.spec.ts +++ b/packages/security/passport/src/services/ProtocolsService.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest, Req} from "@tsed/common"; import Passport from "passport"; -import {PassportMessage} from "../errors/PassportMessage"; -import {Protocol, ProtocolsService} from "../index"; +import {PassportMessage} from "../errors/PassportMessage.js"; +import {Protocol, ProtocolsService} from "../index.js"; // tslint:disable-next-line:variable-name const Strategy = jest.fn(); diff --git a/packages/security/passport/src/services/ProtocolsService.ts b/packages/security/passport/src/services/ProtocolsService.ts index 6e54f89ca8d..3d67f14a606 100644 --- a/packages/security/passport/src/services/ProtocolsService.ts +++ b/packages/security/passport/src/services/ProtocolsService.ts @@ -4,11 +4,11 @@ import {Inject, Injectable, InjectorService, Provider} from "@tsed/di"; import {Unauthorized} from "@tsed/exceptions"; import Passport, {Strategy} from "passport"; import {promisify} from "util"; -import {PROVIDER_TYPE_PROTOCOL} from "../contants/constants"; -import {PassportException} from "../errors/PassportException"; -import {PassportMessage} from "../errors/PassportMessage"; -import type {ProtocolMethods} from "../interfaces/ProtocolMethods"; -import type {ProtocolOptions} from "../interfaces/ProtocolOptions"; +import {PROVIDER_TYPE_PROTOCOL} from "../contants/constants.js"; +import {PassportException} from "../errors/PassportException.js"; +import {PassportMessage} from "../errors/PassportMessage.js"; +import type {ProtocolMethods} from "../interfaces/ProtocolMethods.js"; +import type {ProtocolOptions} from "../interfaces/ProtocolOptions.js"; /** * @ignore diff --git a/packages/security/passport/src/utils/getProtocolsFromRequest.spec.ts b/packages/security/passport/src/utils/getProtocolsFromRequest.spec.ts index ecaa3e6ef3b..585e8d64b07 100644 --- a/packages/security/passport/src/utils/getProtocolsFromRequest.spec.ts +++ b/packages/security/passport/src/utils/getProtocolsFromRequest.spec.ts @@ -1,4 +1,4 @@ -import {getProtocolsFromRequest} from "./getProtocolsFromRequest"; +import {getProtocolsFromRequest} from "./getProtocolsFromRequest.js"; describe("getProtocolsFromRequest", () => { it("should allow all protocol (from default protocols)", () => { diff --git a/packages/security/passport/test/app/Server.ts b/packages/security/passport/test/app/Server.ts index f1d69bd6933..3efaaf3a745 100644 --- a/packages/security/passport/test/app/Server.ts +++ b/packages/security/passport/test/app/Server.ts @@ -9,8 +9,8 @@ import cookieParser from "cookie-parser"; import filedirname from "filedirname"; import methodOverride from "method-override"; import Path from "path"; -import {AuthCtrl} from "./controllers/rest/auth/AuthCtrl"; -import {Account} from "./models/Account"; +import {AuthCtrl} from "./controllers/rest/auth/AuthCtrl.js"; +import {Account} from "./models/Account.js"; import "./protocols/LoginLocalProtocol"; import session from "express-session"; diff --git a/packages/security/passport/test/app/controllers/rest/auth/AuthCtrl.ts b/packages/security/passport/test/app/controllers/rest/auth/AuthCtrl.ts index 3365069c2a4..1f93dcb8a49 100644 --- a/packages/security/passport/test/app/controllers/rest/auth/AuthCtrl.ts +++ b/packages/security/passport/test/app/controllers/rest/auth/AuthCtrl.ts @@ -1,8 +1,8 @@ import {BodyParams, Controller, Post, ProviderScope, Req, Scope} from "@tsed/common"; import {Authenticate} from "@tsed/passport"; import {Returns} from "@tsed/schema"; -import {Account} from "../../../models/Account"; -import {Credentials} from "../../../models/Credentials"; +import {Account} from "../../../models/Account.js"; +import {Credentials} from "../../../models/Credentials.js"; @Controller("/auth") @Scope(ProviderScope.SINGLETON) diff --git a/packages/security/passport/test/app/models/Account.ts b/packages/security/passport/test/app/models/Account.ts index 7c658050f0b..12468ea5e5b 100644 --- a/packages/security/passport/test/app/models/Account.ts +++ b/packages/security/passport/test/app/models/Account.ts @@ -1,5 +1,5 @@ import {Groups, Name} from "@tsed/schema"; -import {Credentials} from "./Credentials"; +import {Credentials} from "./Credentials.js"; export class Account extends Credentials { @Name("id") diff --git a/packages/security/passport/test/app/protocols/LoginLocalProtocol.ts b/packages/security/passport/test/app/protocols/LoginLocalProtocol.ts index 974905acb23..9986edbaca6 100644 --- a/packages/security/passport/test/app/protocols/LoginLocalProtocol.ts +++ b/packages/security/passport/test/app/protocols/LoginLocalProtocol.ts @@ -2,8 +2,8 @@ import {BodyParams, Inject, Req} from "@tsed/common"; import {Unauthorized} from "@tsed/exceptions"; import {OnInstall, OnVerify, Protocol} from "@tsed/passport"; import {IStrategyOptions, Strategy} from "passport-local"; -import {Credentials} from "../models/Credentials"; -import {UsersRepository} from "../services/UsersRepository"; +import {Credentials} from "../models/Credentials.js"; +import {UsersRepository} from "../services/UsersRepository.js"; @Protocol({ name: "login", diff --git a/packages/security/passport/test/app/services/UsersRepository.ts b/packages/security/passport/test/app/services/UsersRepository.ts index 5f405e234ba..483d455314c 100644 --- a/packages/security/passport/test/app/services/UsersRepository.ts +++ b/packages/security/passport/test/app/services/UsersRepository.ts @@ -1,7 +1,7 @@ import {Adapter, InjectAdapter} from "@tsed/adapters"; import {Injectable} from "@tsed/di"; import {deserialize} from "@tsed/json-mapper"; -import {Account} from "../models/Account"; +import {Account} from "../models/Account.js"; @Injectable() export class UsersRepository { diff --git a/packages/security/passport/test/passport.integration.spec.ts b/packages/security/passport/test/passport.integration.spec.ts index 4625c81b6be..c3d60db0d66 100644 --- a/packages/security/passport/test/passport.integration.spec.ts +++ b/packages/security/passport/test/passport.integration.spec.ts @@ -2,7 +2,7 @@ import {PlatformTest} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import SuperTest from "supertest"; -import {rootDir, Server} from "./app/Server"; +import {rootDir, Server} from "./app/Server.js"; const utils = PlatformTestSdk.create({ rootDir, diff --git a/packages/specs/ajv/src/index.ts b/packages/specs/ajv/src/index.ts index 5d23c1b77c7..9d28d6cd9fb 100644 --- a/packages/specs/ajv/src/index.ts +++ b/packages/specs/ajv/src/index.ts @@ -2,14 +2,14 @@ * @file Automatically generated by barrelsby. */ -export * from "./decorators/formats"; -export * from "./decorators/keyword"; -export * from "./errors/AjvValidationError"; -export * from "./interfaces/FormatsMethods"; -export * from "./interfaces/IAjvSettings"; -export * from "./interfaces/KeywordMethods"; -export * from "./interfaces/interfaces"; -export * from "./services/Ajv"; -export * from "./services/AjvService"; -export * from "./utils/defaultErrorFormatter"; -export * from "./utils/getPath"; +export * from "./decorators/formats.js"; +export * from "./decorators/keyword.js"; +export * from "./errors/AjvValidationError.js"; +export * from "./interfaces/FormatsMethods.js"; +export * from "./interfaces/IAjvSettings.js"; +export * from "./interfaces/KeywordMethods.js"; +export * from "./interfaces/interfaces.js"; +export * from "./services/Ajv.js"; +export * from "./services/AjvService.js"; +export * from "./utils/defaultErrorFormatter.js"; +export * from "./utils/getPath.js"; diff --git a/packages/specs/ajv/src/interfaces/interfaces.ts b/packages/specs/ajv/src/interfaces/interfaces.ts index a379c1bc4e0..80f3ee295bf 100644 --- a/packages/specs/ajv/src/interfaces/interfaces.ts +++ b/packages/specs/ajv/src/interfaces/interfaces.ts @@ -1,4 +1,4 @@ -import {IAjvSettings} from "./IAjvSettings"; +import {IAjvSettings} from "./IAjvSettings.js"; declare global { namespace TsED { diff --git a/packages/specs/ajv/src/services/Ajv.ts b/packages/specs/ajv/src/services/Ajv.ts index d1d1816da74..8bff37f1b75 100644 --- a/packages/specs/ajv/src/services/Ajv.ts +++ b/packages/specs/ajv/src/services/Ajv.ts @@ -3,8 +3,8 @@ import {Configuration, InjectorService, ProviderScope, registerProvider} from "@ import Ajv, {Format, KeywordDefinition, Options, Vocabulary} from "ajv"; import AjvErrors from "ajv-errors"; import AjvFormats from "ajv-formats"; -import {FormatsMethods} from "../interfaces/FormatsMethods"; -import {IAjvSettings} from "../interfaces/IAjvSettings"; +import {FormatsMethods} from "../interfaces/FormatsMethods.js"; +import {IAjvSettings} from "../interfaces/IAjvSettings.js"; function getHandler(key: string, service: any) { if (service[key]) { diff --git a/packages/specs/ajv/src/services/AjvService.spec.ts b/packages/specs/ajv/src/services/AjvService.spec.ts index 3c820c2af95..a03d7d261ce 100644 --- a/packages/specs/ajv/src/services/AjvService.spec.ts +++ b/packages/specs/ajv/src/services/AjvService.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest} from "@tsed/common"; import {catchAsyncError} from "@tsed/core"; import {object, string} from "@tsed/schema"; -import {AjvService} from "./AjvService"; +import {AjvService} from "./AjvService.js"; describe("AjvService", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/specs/ajv/src/services/AjvService.ts b/packages/specs/ajv/src/services/AjvService.ts index 939a8e6f24c..7bb334c3a44 100644 --- a/packages/specs/ajv/src/services/AjvService.ts +++ b/packages/specs/ajv/src/services/AjvService.ts @@ -2,10 +2,10 @@ import {deepClone, getValue, nameOf, prototypeOf, setValue, Type} from "@tsed/co import {Constant, Inject, Injectable} from "@tsed/di"; import {getJsonSchema, JsonEntityStore, JsonSchema, JsonSchemaObject} from "@tsed/schema"; import Ajv, {ErrorObject} from "ajv"; -import {AjvValidationError} from "../errors/AjvValidationError"; -import {AjvErrorObject, ErrorFormatter} from "../interfaces/IAjvSettings"; -import {defaultErrorFormatter} from "../utils/defaultErrorFormatter"; -import {getPath} from "../utils/getPath"; +import {AjvValidationError} from "../errors/AjvValidationError.js"; +import {AjvErrorObject, ErrorFormatter} from "../interfaces/IAjvSettings.js"; +import {defaultErrorFormatter} from "../utils/defaultErrorFormatter.js"; +import {getPath} from "../utils/getPath.js"; import "./Ajv"; export interface AjvValidateOptions extends Record { diff --git a/packages/specs/ajv/src/utils/defaultErrorFormatter.spec.ts b/packages/specs/ajv/src/utils/defaultErrorFormatter.spec.ts index f1f225829cc..fe8ae86ee48 100644 --- a/packages/specs/ajv/src/utils/defaultErrorFormatter.spec.ts +++ b/packages/specs/ajv/src/utils/defaultErrorFormatter.spec.ts @@ -1,4 +1,4 @@ -import {defaultErrorFormatter} from "./defaultErrorFormatter"; +import {defaultErrorFormatter} from "./defaultErrorFormatter.js"; describe("defaultErrorFormatter", () => { it("should extract data and format error (data = undefined)", () => { diff --git a/packages/specs/ajv/src/utils/defaultErrorFormatter.ts b/packages/specs/ajv/src/utils/defaultErrorFormatter.ts index bd8d8552677..c9dc76db4ce 100644 --- a/packages/specs/ajv/src/utils/defaultErrorFormatter.ts +++ b/packages/specs/ajv/src/utils/defaultErrorFormatter.ts @@ -1,5 +1,5 @@ -import {AjvErrorObject} from "../interfaces/IAjvSettings"; -import {getInstancePath, getPath} from "./getPath"; +import {AjvErrorObject} from "../interfaces/IAjvSettings.js"; +import {getInstancePath, getPath} from "./getPath.js"; export function defaultErrorFormatter(error: AjvErrorObject & {dataPath: string}) { const value = JSON.stringify(error.data === undefined ? "undefined" : error.data); diff --git a/packages/specs/ajv/test/integration/formats.integration.spec.ts b/packages/specs/ajv/test/integration/formats.integration.spec.ts index 12760161f37..4596c80fb6b 100644 --- a/packages/specs/ajv/test/integration/formats.integration.spec.ts +++ b/packages/specs/ajv/test/integration/formats.integration.spec.ts @@ -1,8 +1,8 @@ import {PlatformTest} from "@tsed/common"; import {Format, getJsonSchema} from "@tsed/schema"; -import {AjvService} from "../../src/services/AjvService"; -import {Formats} from "../../src/decorators/formats"; -import {FormatsMethods} from "../../src/interfaces/FormatsMethods"; +import {AjvService} from "../../src/services/AjvService.js"; +import {Formats} from "../../src/decorators/formats.js"; +import {FormatsMethods} from "../../src/interfaces/FormatsMethods.js"; const NOT_URI_FRAGMENT = /\/|:/; const URI = diff --git a/packages/specs/ajv/test/integration/keywords.integration.spec.ts b/packages/specs/ajv/test/integration/keywords.integration.spec.ts index 31e0cdce42b..74246cc3622 100644 --- a/packages/specs/ajv/test/integration/keywords.integration.spec.ts +++ b/packages/specs/ajv/test/integration/keywords.integration.spec.ts @@ -2,8 +2,8 @@ import "@tsed/ajv"; import {PlatformTest} from "@tsed/common"; import {array, CustomKey, getJsonSchema, number} from "@tsed/schema"; import Ajv, {_, KeywordCxt} from "ajv"; -import {Keyword} from "../../src/decorators/keyword"; -import {KeywordMethods} from "../../src/interfaces/KeywordMethods"; +import {Keyword} from "../../src/decorators/keyword.js"; +import {KeywordMethods} from "../../src/interfaces/KeywordMethods.js"; @Keyword({ keyword: "range", diff --git a/packages/specs/exceptions/src/clientErrors/BadMapping.ts b/packages/specs/exceptions/src/clientErrors/BadMapping.ts index e7eaaf7ddba..40b219dbc57 100644 --- a/packages/specs/exceptions/src/clientErrors/BadMapping.ts +++ b/packages/specs/exceptions/src/clientErrors/BadMapping.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class BadMapping extends ClientException { static readonly STATUS = 421; diff --git a/packages/specs/exceptions/src/clientErrors/BadRequest.ts b/packages/specs/exceptions/src/clientErrors/BadRequest.ts index fe7df88e1bc..b7159a9e985 100644 --- a/packages/specs/exceptions/src/clientErrors/BadRequest.ts +++ b/packages/specs/exceptions/src/clientErrors/BadRequest.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class BadRequest extends ClientException { static readonly STATUS = 400; diff --git a/packages/specs/exceptions/src/clientErrors/Conflict.ts b/packages/specs/exceptions/src/clientErrors/Conflict.ts index 99c2060253c..7f479a3bfd9 100644 --- a/packages/specs/exceptions/src/clientErrors/Conflict.ts +++ b/packages/specs/exceptions/src/clientErrors/Conflict.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class Conflict extends ClientException { static readonly STATUS = 409; diff --git a/packages/specs/exceptions/src/clientErrors/ExpectationFailed.ts b/packages/specs/exceptions/src/clientErrors/ExpectationFailed.ts index a1660d7fe20..0c84f10b788 100644 --- a/packages/specs/exceptions/src/clientErrors/ExpectationFailed.ts +++ b/packages/specs/exceptions/src/clientErrors/ExpectationFailed.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class ExpectationFailed extends ClientException { static readonly STATUS = 417; diff --git a/packages/specs/exceptions/src/clientErrors/Forbidden.ts b/packages/specs/exceptions/src/clientErrors/Forbidden.ts index 5ee94fb66f3..4dbf6ef7cb3 100644 --- a/packages/specs/exceptions/src/clientErrors/Forbidden.ts +++ b/packages/specs/exceptions/src/clientErrors/Forbidden.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class Forbidden extends ClientException { static readonly STATUS = 403; diff --git a/packages/specs/exceptions/src/clientErrors/Gone.ts b/packages/specs/exceptions/src/clientErrors/Gone.ts index 27e86a3dbf4..a54c26d89f1 100644 --- a/packages/specs/exceptions/src/clientErrors/Gone.ts +++ b/packages/specs/exceptions/src/clientErrors/Gone.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class Gone extends ClientException { static readonly STATUS = 410; diff --git a/packages/specs/exceptions/src/clientErrors/ImATeapot.ts b/packages/specs/exceptions/src/clientErrors/ImATeapot.ts index 354386a4d6b..3c711fdbb02 100644 --- a/packages/specs/exceptions/src/clientErrors/ImATeapot.ts +++ b/packages/specs/exceptions/src/clientErrors/ImATeapot.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class ImATeapot extends ClientException { static readonly STATUS = 418; diff --git a/packages/specs/exceptions/src/clientErrors/LengthRequired.ts b/packages/specs/exceptions/src/clientErrors/LengthRequired.ts index 1db874ae5ca..7ce3ed447fb 100644 --- a/packages/specs/exceptions/src/clientErrors/LengthRequired.ts +++ b/packages/specs/exceptions/src/clientErrors/LengthRequired.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class LengthRequired extends ClientException { static readonly STATUS = 411; diff --git a/packages/specs/exceptions/src/clientErrors/MethodNotAllowed.ts b/packages/specs/exceptions/src/clientErrors/MethodNotAllowed.ts index d83013dab46..302b75e2aff 100644 --- a/packages/specs/exceptions/src/clientErrors/MethodNotAllowed.ts +++ b/packages/specs/exceptions/src/clientErrors/MethodNotAllowed.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class MethodNotAllowed extends ClientException { static readonly STATUS = 405; diff --git a/packages/specs/exceptions/src/clientErrors/MisdirectedRequest.ts b/packages/specs/exceptions/src/clientErrors/MisdirectedRequest.ts index 7742c6148e6..fa84c3d981c 100644 --- a/packages/specs/exceptions/src/clientErrors/MisdirectedRequest.ts +++ b/packages/specs/exceptions/src/clientErrors/MisdirectedRequest.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class MisdirectedRequest extends ClientException { static readonly STATUS = 421; diff --git a/packages/specs/exceptions/src/clientErrors/NotAcceptable.ts b/packages/specs/exceptions/src/clientErrors/NotAcceptable.ts index be757b68a93..21f0f460d4e 100644 --- a/packages/specs/exceptions/src/clientErrors/NotAcceptable.ts +++ b/packages/specs/exceptions/src/clientErrors/NotAcceptable.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class NotAcceptable extends ClientException { static readonly STATUS = 406; diff --git a/packages/specs/exceptions/src/clientErrors/NotFound.ts b/packages/specs/exceptions/src/clientErrors/NotFound.ts index 79c9907f9d1..88d27a8ddc2 100644 --- a/packages/specs/exceptions/src/clientErrors/NotFound.ts +++ b/packages/specs/exceptions/src/clientErrors/NotFound.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class NotFound extends ClientException { static readonly STATUS = 404; diff --git a/packages/specs/exceptions/src/clientErrors/PaymentRequired.ts b/packages/specs/exceptions/src/clientErrors/PaymentRequired.ts index f6c60e4e7c8..96a6471c72d 100644 --- a/packages/specs/exceptions/src/clientErrors/PaymentRequired.ts +++ b/packages/specs/exceptions/src/clientErrors/PaymentRequired.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class PaymentRequired extends ClientException { static readonly STATUS = 402; diff --git a/packages/specs/exceptions/src/clientErrors/PreconditionFailed.ts b/packages/specs/exceptions/src/clientErrors/PreconditionFailed.ts index 58d402a3284..78084c46153 100644 --- a/packages/specs/exceptions/src/clientErrors/PreconditionFailed.ts +++ b/packages/specs/exceptions/src/clientErrors/PreconditionFailed.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class PreconditionFailed extends ClientException { static readonly STATUS = 412; diff --git a/packages/specs/exceptions/src/clientErrors/PreconditionRequired.ts b/packages/specs/exceptions/src/clientErrors/PreconditionRequired.ts index d1a99f33ef1..e021cb82fa1 100644 --- a/packages/specs/exceptions/src/clientErrors/PreconditionRequired.ts +++ b/packages/specs/exceptions/src/clientErrors/PreconditionRequired.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class PreconditionRequired extends ClientException { static readonly STATUS = 428; diff --git a/packages/specs/exceptions/src/clientErrors/ProxyAuthentificationRequired.ts b/packages/specs/exceptions/src/clientErrors/ProxyAuthentificationRequired.ts index c046ea6fb33..4b40415d1d4 100644 --- a/packages/specs/exceptions/src/clientErrors/ProxyAuthentificationRequired.ts +++ b/packages/specs/exceptions/src/clientErrors/ProxyAuthentificationRequired.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class ProxyAuthentificationRequired extends ClientException { static readonly STATUS = 407; diff --git a/packages/specs/exceptions/src/clientErrors/RequestEntityTooLarge.ts b/packages/specs/exceptions/src/clientErrors/RequestEntityTooLarge.ts index bab2728e454..37f82ccdae5 100644 --- a/packages/specs/exceptions/src/clientErrors/RequestEntityTooLarge.ts +++ b/packages/specs/exceptions/src/clientErrors/RequestEntityTooLarge.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class RequestEntityTooLarge extends ClientException { static readonly STATUS = 413; diff --git a/packages/specs/exceptions/src/clientErrors/RequestHeaderFieldsTooLarge.ts b/packages/specs/exceptions/src/clientErrors/RequestHeaderFieldsTooLarge.ts index 19f2c152e42..59d79d6158b 100644 --- a/packages/specs/exceptions/src/clientErrors/RequestHeaderFieldsTooLarge.ts +++ b/packages/specs/exceptions/src/clientErrors/RequestHeaderFieldsTooLarge.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class RequestHeaderFieldsTooLarge extends ClientException { static readonly STATUS = 431; diff --git a/packages/specs/exceptions/src/clientErrors/RequestRangeUnsatisfiable.ts b/packages/specs/exceptions/src/clientErrors/RequestRangeUnsatisfiable.ts index 1b73c0bee3a..beca6725249 100644 --- a/packages/specs/exceptions/src/clientErrors/RequestRangeUnsatisfiable.ts +++ b/packages/specs/exceptions/src/clientErrors/RequestRangeUnsatisfiable.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class RequestRangeUnsatisfiable extends ClientException { static readonly STATUS = 416; diff --git a/packages/specs/exceptions/src/clientErrors/RequestTimeout.ts b/packages/specs/exceptions/src/clientErrors/RequestTimeout.ts index 47a29159b0b..f4327527203 100644 --- a/packages/specs/exceptions/src/clientErrors/RequestTimeout.ts +++ b/packages/specs/exceptions/src/clientErrors/RequestTimeout.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class RequestTimeout extends ClientException { static readonly STATUS = 408; diff --git a/packages/specs/exceptions/src/clientErrors/RequestURITooLong.ts b/packages/specs/exceptions/src/clientErrors/RequestURITooLong.ts index db5064d9a86..80a95abddd6 100644 --- a/packages/specs/exceptions/src/clientErrors/RequestURITooLong.ts +++ b/packages/specs/exceptions/src/clientErrors/RequestURITooLong.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class RequestURITooLong extends ClientException { static readonly STATUS = 414; diff --git a/packages/specs/exceptions/src/clientErrors/TooManyRequests.ts b/packages/specs/exceptions/src/clientErrors/TooManyRequests.ts index ef7f65501d0..162c57febfd 100644 --- a/packages/specs/exceptions/src/clientErrors/TooManyRequests.ts +++ b/packages/specs/exceptions/src/clientErrors/TooManyRequests.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class TooManyRequests extends ClientException { static readonly STATUS = 429; diff --git a/packages/specs/exceptions/src/clientErrors/Unauthorized.ts b/packages/specs/exceptions/src/clientErrors/Unauthorized.ts index 86135e36f4f..03a9ad7db79 100644 --- a/packages/specs/exceptions/src/clientErrors/Unauthorized.ts +++ b/packages/specs/exceptions/src/clientErrors/Unauthorized.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class Unauthorized extends ClientException { static readonly STATUS = 401; diff --git a/packages/specs/exceptions/src/clientErrors/UnavailableForLegalReasons.ts b/packages/specs/exceptions/src/clientErrors/UnavailableForLegalReasons.ts index 0f84b883b38..d12195e67ba 100644 --- a/packages/specs/exceptions/src/clientErrors/UnavailableForLegalReasons.ts +++ b/packages/specs/exceptions/src/clientErrors/UnavailableForLegalReasons.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class UnavailableForLegalReasons extends ClientException { static readonly STATUS = 451; diff --git a/packages/specs/exceptions/src/clientErrors/UnprocessableEntity.ts b/packages/specs/exceptions/src/clientErrors/UnprocessableEntity.ts index a42932de3ed..b9f586c6b68 100644 --- a/packages/specs/exceptions/src/clientErrors/UnprocessableEntity.ts +++ b/packages/specs/exceptions/src/clientErrors/UnprocessableEntity.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class UnprocessableEntity extends ClientException { static readonly STATUS = 422; diff --git a/packages/specs/exceptions/src/clientErrors/UnsupportedMediaType.ts b/packages/specs/exceptions/src/clientErrors/UnsupportedMediaType.ts index 011da0338bc..cf4f5337dfc 100644 --- a/packages/specs/exceptions/src/clientErrors/UnsupportedMediaType.ts +++ b/packages/specs/exceptions/src/clientErrors/UnsupportedMediaType.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class UnsupportedMediaType extends ClientException { static readonly STATUS = 415; diff --git a/packages/specs/exceptions/src/clientErrors/UpgradeRequired.ts b/packages/specs/exceptions/src/clientErrors/UpgradeRequired.ts index 59b9ecf2cb8..e3d20ffb46e 100644 --- a/packages/specs/exceptions/src/clientErrors/UpgradeRequired.ts +++ b/packages/specs/exceptions/src/clientErrors/UpgradeRequired.ts @@ -1,4 +1,4 @@ -import {ClientException} from "../core/ClientException"; +import {ClientException} from "../core/ClientException.js"; export class UpgradeRequired extends ClientException { static readonly STATUS = 426; diff --git a/packages/specs/exceptions/src/core/ClientException.ts b/packages/specs/exceptions/src/core/ClientException.ts index a69e496b1d8..c46b0aa780a 100644 --- a/packages/specs/exceptions/src/core/ClientException.ts +++ b/packages/specs/exceptions/src/core/ClientException.ts @@ -1,5 +1,5 @@ -import {Exception} from "./Exception"; -import {StatusFamily} from "./StatusFamily"; +import {Exception} from "./Exception.js"; +import {StatusFamily} from "./StatusFamily.js"; export class ClientException extends Exception { constructor(status: number, message: string, origin?: Error | string | any) { diff --git a/packages/specs/exceptions/src/core/Exception.spec.ts b/packages/specs/exceptions/src/core/Exception.spec.ts index 10dc0e20bd7..1ec3fc572b2 100644 --- a/packages/specs/exceptions/src/core/Exception.spec.ts +++ b/packages/specs/exceptions/src/core/Exception.spec.ts @@ -1,5 +1,5 @@ -import {Exception, HTTPException} from "./Exception"; -import {StatusFamily} from "./StatusFamily"; +import {Exception, HTTPException} from "./Exception.js"; +import {StatusFamily} from "./StatusFamily.js"; describe("Exception", () => { it("should use origin", () => { diff --git a/packages/specs/exceptions/src/core/Exception.ts b/packages/specs/exceptions/src/core/Exception.ts index 6f410e33e3d..c946e02607f 100644 --- a/packages/specs/exceptions/src/core/Exception.ts +++ b/packages/specs/exceptions/src/core/Exception.ts @@ -1,7 +1,7 @@ import {classOf, nameOf} from "@tsed/core"; import {constantCase} from "change-case"; import statuses from "statuses"; -import {StatusFamily} from "./StatusFamily"; +import {StatusFamily} from "./StatusFamily.js"; export class Exception extends Error { /** diff --git a/packages/specs/exceptions/src/core/RedirectException.ts b/packages/specs/exceptions/src/core/RedirectException.ts index 21eb170b93f..d651e8ce1c9 100644 --- a/packages/specs/exceptions/src/core/RedirectException.ts +++ b/packages/specs/exceptions/src/core/RedirectException.ts @@ -1,5 +1,5 @@ -import {Exception} from "./Exception"; -import {StatusFamily} from "./StatusFamily"; +import {Exception} from "./Exception.js"; +import {StatusFamily} from "./StatusFamily.js"; export class RedirectException extends Exception { constructor(status: number, message: string, origin?: Error | string | any) { diff --git a/packages/specs/exceptions/src/core/ServerException.ts b/packages/specs/exceptions/src/core/ServerException.ts index 442d9d3772b..243bf0df45c 100644 --- a/packages/specs/exceptions/src/core/ServerException.ts +++ b/packages/specs/exceptions/src/core/ServerException.ts @@ -1,5 +1,5 @@ -import {Exception} from "./Exception"; -import {StatusFamily} from "./StatusFamily"; +import {Exception} from "./Exception.js"; +import {StatusFamily} from "./StatusFamily.js"; export class ServerException extends Exception { constructor(status: number, message: string, origin?: Error | string | any) { diff --git a/packages/specs/exceptions/src/index.ts b/packages/specs/exceptions/src/index.ts index 54e4c536b12..8f91821e858 100644 --- a/packages/specs/exceptions/src/index.ts +++ b/packages/specs/exceptions/src/index.ts @@ -2,53 +2,53 @@ * @file Automatically generated by barrelsby. */ -export * from "./clientErrors/BadMapping"; -export * from "./clientErrors/BadRequest"; -export * from "./clientErrors/Conflict"; -export * from "./clientErrors/ExpectationFailed"; -export * from "./clientErrors/Forbidden"; -export * from "./clientErrors/Gone"; -export * from "./clientErrors/ImATeapot"; -export * from "./clientErrors/LengthRequired"; -export * from "./clientErrors/MethodNotAllowed"; -export * from "./clientErrors/MisdirectedRequest"; -export * from "./clientErrors/NotAcceptable"; -export * from "./clientErrors/NotFound"; -export * from "./clientErrors/PaymentRequired"; -export * from "./clientErrors/PreconditionFailed"; -export * from "./clientErrors/PreconditionRequired"; -export * from "./clientErrors/ProxyAuthentificationRequired"; -export * from "./clientErrors/RequestEntityTooLarge"; -export * from "./clientErrors/RequestHeaderFieldsTooLarge"; -export * from "./clientErrors/RequestRangeUnsatisfiable"; -export * from "./clientErrors/RequestTimeout"; -export * from "./clientErrors/RequestURITooLong"; -export * from "./clientErrors/TooManyRequests"; -export * from "./clientErrors/Unauthorized"; -export * from "./clientErrors/UnavailableForLegalReasons"; -export * from "./clientErrors/UnprocessableEntity"; -export * from "./clientErrors/UnsupportedMediaType"; -export * from "./clientErrors/UpgradeRequired"; -export * from "./core/ClientException"; -export * from "./core/Exception"; -export * from "./core/RedirectException"; -export * from "./core/ServerException"; -export * from "./core/StatusFamily"; -export * from "./redirections/MovedPermanently"; -export * from "./redirections/MovedTemporarily"; -export * from "./redirections/MultipleChoices"; -export * from "./redirections/NotModified"; -export * from "./redirections/PermanentRedirect"; -export * from "./redirections/SeeOther"; -export * from "./redirections/TemporaryRedirect"; -export * from "./redirections/UseProxy"; -export * from "./serverErrors/BadGateway"; -export * from "./serverErrors/BandwidthLimitExceeded"; -export * from "./serverErrors/GatewayTimeout"; -export * from "./serverErrors/InternalServerError"; -export * from "./serverErrors/NetworkAuthenticationRequired"; -export * from "./serverErrors/NotExtended"; -export * from "./serverErrors/NotImplemented"; -export * from "./serverErrors/ProxyError"; -export * from "./serverErrors/ServiceUnavailable"; -export * from "./serverErrors/VariantAlsoNegotiates"; +export * from "./clientErrors/BadMapping.js"; +export * from "./clientErrors/BadRequest.js"; +export * from "./clientErrors/Conflict.js"; +export * from "./clientErrors/ExpectationFailed.js"; +export * from "./clientErrors/Forbidden.js"; +export * from "./clientErrors/Gone.js"; +export * from "./clientErrors/ImATeapot.js"; +export * from "./clientErrors/LengthRequired.js"; +export * from "./clientErrors/MethodNotAllowed.js"; +export * from "./clientErrors/MisdirectedRequest.js"; +export * from "./clientErrors/NotAcceptable.js"; +export * from "./clientErrors/NotFound.js"; +export * from "./clientErrors/PaymentRequired.js"; +export * from "./clientErrors/PreconditionFailed.js"; +export * from "./clientErrors/PreconditionRequired.js"; +export * from "./clientErrors/ProxyAuthentificationRequired.js"; +export * from "./clientErrors/RequestEntityTooLarge.js"; +export * from "./clientErrors/RequestHeaderFieldsTooLarge.js"; +export * from "./clientErrors/RequestRangeUnsatisfiable.js"; +export * from "./clientErrors/RequestTimeout.js"; +export * from "./clientErrors/RequestURITooLong.js"; +export * from "./clientErrors/TooManyRequests.js"; +export * from "./clientErrors/Unauthorized.js"; +export * from "./clientErrors/UnavailableForLegalReasons.js"; +export * from "./clientErrors/UnprocessableEntity.js"; +export * from "./clientErrors/UnsupportedMediaType.js"; +export * from "./clientErrors/UpgradeRequired.js"; +export * from "./core/ClientException.js"; +export * from "./core/Exception.js"; +export * from "./core/RedirectException.js"; +export * from "./core/ServerException.js"; +export * from "./core/StatusFamily.js"; +export * from "./redirections/MovedPermanently.js"; +export * from "./redirections/MovedTemporarily.js"; +export * from "./redirections/MultipleChoices.js"; +export * from "./redirections/NotModified.js"; +export * from "./redirections/PermanentRedirect.js"; +export * from "./redirections/SeeOther.js"; +export * from "./redirections/TemporaryRedirect.js"; +export * from "./redirections/UseProxy.js"; +export * from "./serverErrors/BadGateway.js"; +export * from "./serverErrors/BandwidthLimitExceeded.js"; +export * from "./serverErrors/GatewayTimeout.js"; +export * from "./serverErrors/InternalServerError.js"; +export * from "./serverErrors/NetworkAuthenticationRequired.js"; +export * from "./serverErrors/NotExtended.js"; +export * from "./serverErrors/NotImplemented.js"; +export * from "./serverErrors/ProxyError.js"; +export * from "./serverErrors/ServiceUnavailable.js"; +export * from "./serverErrors/VariantAlsoNegotiates.js"; diff --git a/packages/specs/exceptions/src/redirections/MovedPermanently.ts b/packages/specs/exceptions/src/redirections/MovedPermanently.ts index 50daff780ed..9ad9cdfc81d 100644 --- a/packages/specs/exceptions/src/redirections/MovedPermanently.ts +++ b/packages/specs/exceptions/src/redirections/MovedPermanently.ts @@ -1,4 +1,4 @@ -import {RedirectException} from "../core/RedirectException"; +import {RedirectException} from "../core/RedirectException.js"; export class MovedPermanently extends RedirectException { static readonly STATUS = 301; diff --git a/packages/specs/exceptions/src/redirections/MovedTemporarily.ts b/packages/specs/exceptions/src/redirections/MovedTemporarily.ts index 9251e636083..808c728dd2c 100644 --- a/packages/specs/exceptions/src/redirections/MovedTemporarily.ts +++ b/packages/specs/exceptions/src/redirections/MovedTemporarily.ts @@ -1,4 +1,4 @@ -import {RedirectException} from "../core/RedirectException"; +import {RedirectException} from "../core/RedirectException.js"; export class MovedTemporarily extends RedirectException { static readonly STATUS = 302; diff --git a/packages/specs/exceptions/src/redirections/MultipleChoices.ts b/packages/specs/exceptions/src/redirections/MultipleChoices.ts index 88c943ef224..dceabd7cd07 100644 --- a/packages/specs/exceptions/src/redirections/MultipleChoices.ts +++ b/packages/specs/exceptions/src/redirections/MultipleChoices.ts @@ -1,4 +1,4 @@ -import {RedirectException} from "../core/RedirectException"; +import {RedirectException} from "../core/RedirectException.js"; export class MultipleChoices extends RedirectException { static readonly STATUS = 300; diff --git a/packages/specs/exceptions/src/redirections/NotModified.ts b/packages/specs/exceptions/src/redirections/NotModified.ts index c29a7b20cff..c2262021fc5 100644 --- a/packages/specs/exceptions/src/redirections/NotModified.ts +++ b/packages/specs/exceptions/src/redirections/NotModified.ts @@ -1,4 +1,4 @@ -import {RedirectException} from "../core/RedirectException"; +import {RedirectException} from "../core/RedirectException.js"; export class NotModified extends RedirectException { static readonly STATUS = 304; diff --git a/packages/specs/exceptions/src/redirections/PermanentRedirect.ts b/packages/specs/exceptions/src/redirections/PermanentRedirect.ts index 99f4a6ee35b..49851ef7626 100644 --- a/packages/specs/exceptions/src/redirections/PermanentRedirect.ts +++ b/packages/specs/exceptions/src/redirections/PermanentRedirect.ts @@ -1,4 +1,4 @@ -import {RedirectException} from "../core/RedirectException"; +import {RedirectException} from "../core/RedirectException.js"; export class PermanentRedirect extends RedirectException { static readonly STATUS = 308; diff --git a/packages/specs/exceptions/src/redirections/SeeOther.ts b/packages/specs/exceptions/src/redirections/SeeOther.ts index 90c53711d01..b583e6ff1ce 100644 --- a/packages/specs/exceptions/src/redirections/SeeOther.ts +++ b/packages/specs/exceptions/src/redirections/SeeOther.ts @@ -1,4 +1,4 @@ -import {RedirectException} from "../core/RedirectException"; +import {RedirectException} from "../core/RedirectException.js"; export class SeeOther extends RedirectException { static readonly STATUS = 303; diff --git a/packages/specs/exceptions/src/redirections/TemporaryRedirect.ts b/packages/specs/exceptions/src/redirections/TemporaryRedirect.ts index c4a824e27b4..c99b7c05ef6 100644 --- a/packages/specs/exceptions/src/redirections/TemporaryRedirect.ts +++ b/packages/specs/exceptions/src/redirections/TemporaryRedirect.ts @@ -1,4 +1,4 @@ -import {RedirectException} from "../core/RedirectException"; +import {RedirectException} from "../core/RedirectException.js"; export class TemporaryRedirect extends RedirectException { static readonly STATUS = 307; diff --git a/packages/specs/exceptions/src/redirections/UseProxy.ts b/packages/specs/exceptions/src/redirections/UseProxy.ts index 6c0eaa7e2a9..f626d2e8250 100644 --- a/packages/specs/exceptions/src/redirections/UseProxy.ts +++ b/packages/specs/exceptions/src/redirections/UseProxy.ts @@ -1,4 +1,4 @@ -import {RedirectException} from "../core/RedirectException"; +import {RedirectException} from "../core/RedirectException.js"; export class UseProxy extends RedirectException { static readonly STATUS = 305; diff --git a/packages/specs/exceptions/src/serverErrors/BadGateway.ts b/packages/specs/exceptions/src/serverErrors/BadGateway.ts index 1758984602e..cd6ac8319e4 100644 --- a/packages/specs/exceptions/src/serverErrors/BadGateway.ts +++ b/packages/specs/exceptions/src/serverErrors/BadGateway.ts @@ -1,4 +1,4 @@ -import {ServerException} from "../core/ServerException"; +import {ServerException} from "../core/ServerException.js"; export class BadGateway extends ServerException { static readonly STATUS = 502; diff --git a/packages/specs/exceptions/src/serverErrors/BandwidthLimitExceeded.ts b/packages/specs/exceptions/src/serverErrors/BandwidthLimitExceeded.ts index 89be4b5c7bd..5cb2071b542 100644 --- a/packages/specs/exceptions/src/serverErrors/BandwidthLimitExceeded.ts +++ b/packages/specs/exceptions/src/serverErrors/BandwidthLimitExceeded.ts @@ -1,4 +1,4 @@ -import {ServerException} from "../core/ServerException"; +import {ServerException} from "../core/ServerException.js"; export class BandwidthLimitExceeded extends ServerException { static readonly STATUS = 509; diff --git a/packages/specs/exceptions/src/serverErrors/GatewayTimeout.ts b/packages/specs/exceptions/src/serverErrors/GatewayTimeout.ts index 1c5cc60a2ed..c184dcd48c6 100644 --- a/packages/specs/exceptions/src/serverErrors/GatewayTimeout.ts +++ b/packages/specs/exceptions/src/serverErrors/GatewayTimeout.ts @@ -1,4 +1,4 @@ -import {ServerException} from "../core/ServerException"; +import {ServerException} from "../core/ServerException.js"; export class GatewayTimeout extends ServerException { static readonly STATUS = 504; diff --git a/packages/specs/exceptions/src/serverErrors/InternalServerError.ts b/packages/specs/exceptions/src/serverErrors/InternalServerError.ts index 940b2ded531..5b8146ef0ba 100644 --- a/packages/specs/exceptions/src/serverErrors/InternalServerError.ts +++ b/packages/specs/exceptions/src/serverErrors/InternalServerError.ts @@ -1,4 +1,4 @@ -import {ServerException} from "../core/ServerException"; +import {ServerException} from "../core/ServerException.js"; export class InternalServerError extends ServerException { static readonly STATUS = 500; diff --git a/packages/specs/exceptions/src/serverErrors/NetworkAuthenticationRequired.ts b/packages/specs/exceptions/src/serverErrors/NetworkAuthenticationRequired.ts index f03fdffb50f..17f8f60ff4a 100644 --- a/packages/specs/exceptions/src/serverErrors/NetworkAuthenticationRequired.ts +++ b/packages/specs/exceptions/src/serverErrors/NetworkAuthenticationRequired.ts @@ -1,4 +1,4 @@ -import {ServerException} from "../core/ServerException"; +import {ServerException} from "../core/ServerException.js"; export class NetworkAuthenticationRequired extends ServerException { static readonly STATUS = 511; diff --git a/packages/specs/exceptions/src/serverErrors/NotExtended.ts b/packages/specs/exceptions/src/serverErrors/NotExtended.ts index 5580f164596..8c9bc0c0535 100644 --- a/packages/specs/exceptions/src/serverErrors/NotExtended.ts +++ b/packages/specs/exceptions/src/serverErrors/NotExtended.ts @@ -1,4 +1,4 @@ -import {ServerException} from "../core/ServerException"; +import {ServerException} from "../core/ServerException.js"; export class NotExtended extends ServerException { static readonly STATUS = 510; diff --git a/packages/specs/exceptions/src/serverErrors/NotImplemented.ts b/packages/specs/exceptions/src/serverErrors/NotImplemented.ts index 7f0ebf76253..9abe90506ad 100644 --- a/packages/specs/exceptions/src/serverErrors/NotImplemented.ts +++ b/packages/specs/exceptions/src/serverErrors/NotImplemented.ts @@ -1,4 +1,4 @@ -import {ServerException} from "../core/ServerException"; +import {ServerException} from "../core/ServerException.js"; export class NotImplemented extends ServerException { static readonly STATUS = 501; diff --git a/packages/specs/exceptions/src/serverErrors/ProxyError.ts b/packages/specs/exceptions/src/serverErrors/ProxyError.ts index 338ebceffe8..73fcf5659cf 100644 --- a/packages/specs/exceptions/src/serverErrors/ProxyError.ts +++ b/packages/specs/exceptions/src/serverErrors/ProxyError.ts @@ -1,4 +1,4 @@ -import {ServerException} from "../core/ServerException"; +import {ServerException} from "../core/ServerException.js"; export class ProxyError extends ServerException { static readonly STATUS = 502; diff --git a/packages/specs/exceptions/src/serverErrors/ServiceUnavailable.ts b/packages/specs/exceptions/src/serverErrors/ServiceUnavailable.ts index ed33451db07..b657fdfea7a 100644 --- a/packages/specs/exceptions/src/serverErrors/ServiceUnavailable.ts +++ b/packages/specs/exceptions/src/serverErrors/ServiceUnavailable.ts @@ -1,4 +1,4 @@ -import {ServerException} from "../core/ServerException"; +import {ServerException} from "../core/ServerException.js"; export class ServiceUnavailable extends ServerException { static readonly STATUS = 503; diff --git a/packages/specs/exceptions/src/serverErrors/VariantAlsoNegotiates.ts b/packages/specs/exceptions/src/serverErrors/VariantAlsoNegotiates.ts index ae038b93f26..e52deb7ac75 100644 --- a/packages/specs/exceptions/src/serverErrors/VariantAlsoNegotiates.ts +++ b/packages/specs/exceptions/src/serverErrors/VariantAlsoNegotiates.ts @@ -1,4 +1,4 @@ -import {ServerException} from "../core/ServerException"; +import {ServerException} from "../core/ServerException.js"; export class VariantAlsoNegotiates extends ServerException { static readonly STATUS = 506; diff --git a/packages/specs/json-mapper/src/components/DateMapper.spec.ts b/packages/specs/json-mapper/src/components/DateMapper.spec.ts index c2b3d548781..1cef4896998 100644 --- a/packages/specs/json-mapper/src/components/DateMapper.spec.ts +++ b/packages/specs/json-mapper/src/components/DateMapper.spec.ts @@ -1,4 +1,4 @@ -import {DateMapper} from "./DateMapper"; +import {DateMapper} from "./DateMapper.js"; describe("DateMapper", () => { describe("deserialize()", () => { diff --git a/packages/specs/json-mapper/src/components/DateMapper.ts b/packages/specs/json-mapper/src/components/DateMapper.ts index c7efcffc138..284d6381976 100644 --- a/packages/specs/json-mapper/src/components/DateMapper.ts +++ b/packages/specs/json-mapper/src/components/DateMapper.ts @@ -1,6 +1,6 @@ import {isBoolean} from "@tsed/core"; -import {JsonMapper} from "../decorators/jsonMapper"; -import {JsonMapperMethods} from "../interfaces/JsonMapperMethods"; +import {JsonMapper} from "../decorators/jsonMapper.js"; +import {JsonMapperMethods} from "../interfaces/JsonMapperMethods.js"; /** * Mapper for `Date` type. diff --git a/packages/specs/json-mapper/src/components/PrimitiveMapper.spec.ts b/packages/specs/json-mapper/src/components/PrimitiveMapper.spec.ts index 0075c22fb05..6c71a5c292b 100644 --- a/packages/specs/json-mapper/src/components/PrimitiveMapper.spec.ts +++ b/packages/specs/json-mapper/src/components/PrimitiveMapper.spec.ts @@ -1,6 +1,6 @@ import {catchError} from "@tsed/core"; import Sinon from "sinon"; -import {PrimitiveMapper} from "./PrimitiveMapper"; +import {PrimitiveMapper} from "./PrimitiveMapper.js"; describe("PrimitiveMapper", () => { describe("deserialize()", () => { diff --git a/packages/specs/json-mapper/src/components/PrimitiveMapper.ts b/packages/specs/json-mapper/src/components/PrimitiveMapper.ts index dcf9043d416..f82b179d02c 100644 --- a/packages/specs/json-mapper/src/components/PrimitiveMapper.ts +++ b/packages/specs/json-mapper/src/components/PrimitiveMapper.ts @@ -1,6 +1,6 @@ import {nameOf} from "@tsed/core"; -import {JsonMapper} from "../decorators/jsonMapper"; -import {JsonMapperCtx, JsonMapperMethods} from "../interfaces/JsonMapperMethods"; +import {JsonMapper} from "../decorators/jsonMapper.js"; +import {JsonMapperCtx, JsonMapperMethods} from "../interfaces/JsonMapperMethods.js"; function isNullish(data: any) { return [null, "null"].includes(data); diff --git a/packages/specs/json-mapper/src/components/SymbolMapper.spec.ts b/packages/specs/json-mapper/src/components/SymbolMapper.spec.ts index a0c1c498eb5..bb3e2db99a7 100644 --- a/packages/specs/json-mapper/src/components/SymbolMapper.spec.ts +++ b/packages/specs/json-mapper/src/components/SymbolMapper.spec.ts @@ -1,4 +1,4 @@ -import {SymbolMapper} from "./SymbolMapper"; +import {SymbolMapper} from "./SymbolMapper.js"; describe("SymbolMapper", () => { describe("deserialize()", () => { diff --git a/packages/specs/json-mapper/src/components/SymbolMapper.ts b/packages/specs/json-mapper/src/components/SymbolMapper.ts index c409dc311bc..a2d39177bb3 100644 --- a/packages/specs/json-mapper/src/components/SymbolMapper.ts +++ b/packages/specs/json-mapper/src/components/SymbolMapper.ts @@ -1,5 +1,5 @@ -import {JsonMapper} from "../decorators/jsonMapper"; -import {JsonMapperMethods} from "../interfaces/JsonMapperMethods"; +import {JsonMapper} from "../decorators/jsonMapper.js"; +import {JsonMapperMethods} from "../interfaces/JsonMapperMethods.js"; /** * Mapper for the `Symbol` type. diff --git a/packages/specs/json-mapper/src/decorators/jsonMapper.ts b/packages/specs/json-mapper/src/decorators/jsonMapper.ts index f2b6f4c5851..4fbca4b3b86 100644 --- a/packages/specs/json-mapper/src/decorators/jsonMapper.ts +++ b/packages/specs/json-mapper/src/decorators/jsonMapper.ts @@ -1,5 +1,5 @@ import {Type} from "@tsed/core"; -import {registerJsonTypeMapper} from "../domain/JsonMapperTypesContainer"; +import {registerJsonTypeMapper} from "../domain/JsonMapperTypesContainer.js"; /** * Register a new JsonMapper Type diff --git a/packages/specs/json-mapper/src/domain/JsonDeserializer.spec.ts b/packages/specs/json-mapper/src/domain/JsonDeserializer.spec.ts index 15e21e237ac..aa94b4b62a1 100644 --- a/packages/specs/json-mapper/src/domain/JsonDeserializer.spec.ts +++ b/packages/specs/json-mapper/src/domain/JsonDeserializer.spec.ts @@ -23,14 +23,14 @@ import { Property, Required } from "@tsed/schema"; -import {Post} from "../../test/helpers/Post"; -import {User} from "../../test/helpers/User"; +import {Post} from "../../test/helpers/Post.js"; +import {User} from "../../test/helpers/User.js"; import "../components/DateMapper"; import "../components/PrimitiveMapper"; import "../components/SymbolMapper"; -import {OnDeserialize} from "../decorators/onDeserialize"; -import {JsonDeserializer} from "./JsonDeserializer"; -import {JsonMapperSettings} from "./JsonMapperSettings"; +import {OnDeserialize} from "../decorators/onDeserialize.js"; +import {JsonDeserializer} from "./JsonDeserializer.js"; +import {JsonMapperSettings} from "./JsonMapperSettings.js"; const deserializer = new JsonDeserializer(); diff --git a/packages/specs/json-mapper/src/domain/JsonDeserializer.ts b/packages/specs/json-mapper/src/domain/JsonDeserializer.ts index e1d19276e89..312948b0253 100644 --- a/packages/specs/json-mapper/src/domain/JsonDeserializer.ts +++ b/packages/specs/json-mapper/src/domain/JsonDeserializer.ts @@ -1,13 +1,13 @@ import {classOf, isArray, isBoolean, isClass, isEmpty, isNil, nameOf, objectKeys, Type} from "@tsed/core"; import {getPropertiesStores, JsonClassStore, JsonEntityStore, JsonParameterStore, JsonPropertyStore} from "@tsed/schema"; -import {alterAfterDeserialize} from "../hooks/alterAfterDeserialize"; -import {alterBeforeDeserialize} from "../hooks/alterBeforeDeserialize"; -import {alterOnDeserialize} from "../hooks/alterOnDeserialize"; -import {JsonDeserializerOptions} from "./JsonDeserializerOptions"; -import {CachedJsonMapper, JsonMapperCompiler} from "./JsonMapperCompiler"; -import {JsonMapperSettings} from "./JsonMapperSettings"; -import {getJsonMapperTypes} from "./JsonMapperTypesContainer"; -import {Writer} from "./Writer"; +import {alterAfterDeserialize} from "../hooks/alterAfterDeserialize.js"; +import {alterBeforeDeserialize} from "../hooks/alterBeforeDeserialize.js"; +import {alterOnDeserialize} from "../hooks/alterOnDeserialize.js"; +import {JsonDeserializerOptions} from "./JsonDeserializerOptions.js"; +import {CachedJsonMapper, JsonMapperCompiler} from "./JsonMapperCompiler.js"; +import {JsonMapperSettings} from "./JsonMapperSettings.js"; +import {getJsonMapperTypes} from "./JsonMapperTypesContainer.js"; +import {Writer} from "./Writer.js"; function isDeserializable(obj: any, options: JsonDeserializerOptions) { if ((!!options.collectionType && isNil(obj)) || obj === undefined) { diff --git a/packages/specs/json-mapper/src/domain/JsonDeserializerOptions.ts b/packages/specs/json-mapper/src/domain/JsonDeserializerOptions.ts index 15b55ca82e7..7acc4d3d418 100644 --- a/packages/specs/json-mapper/src/domain/JsonDeserializerOptions.ts +++ b/packages/specs/json-mapper/src/domain/JsonDeserializerOptions.ts @@ -1,7 +1,7 @@ import {MetadataTypes, Type} from "@tsed/core"; import {JsonEntityStore} from "@tsed/schema"; -import {JsonMapperMethods} from "../interfaces/JsonMapperMethods"; -import {JsonMapperGlobalOptions} from "./JsonMapperGlobalOptions"; +import {JsonMapperMethods} from "../interfaces/JsonMapperMethods.js"; +import {JsonMapperGlobalOptions} from "./JsonMapperGlobalOptions.js"; export interface JsonDeserializerOptions extends MetadataTypes, JsonMapperGlobalOptions { /** diff --git a/packages/specs/json-mapper/src/domain/JsonMapperSettings.ts b/packages/specs/json-mapper/src/domain/JsonMapperSettings.ts index 34fd7ef13af..c168caf7f36 100644 --- a/packages/specs/json-mapper/src/domain/JsonMapperSettings.ts +++ b/packages/specs/json-mapper/src/domain/JsonMapperSettings.ts @@ -1,4 +1,4 @@ -import type {JsonMapperGlobalOptions} from "./JsonMapperGlobalOptions"; +import type {JsonMapperGlobalOptions} from "./JsonMapperGlobalOptions.js"; export const JsonMapperSettings: JsonMapperGlobalOptions = { disableUnsecureConstructor: true, diff --git a/packages/specs/json-mapper/src/domain/JsonMapperTypesContainer.ts b/packages/specs/json-mapper/src/domain/JsonMapperTypesContainer.ts index a285df28db2..938a0932991 100644 --- a/packages/specs/json-mapper/src/domain/JsonMapperTypesContainer.ts +++ b/packages/specs/json-mapper/src/domain/JsonMapperTypesContainer.ts @@ -1,5 +1,5 @@ import {Type} from "@tsed/core"; -import {JsonMapperMethods} from "../interfaces/JsonMapperMethods"; +import {JsonMapperMethods} from "../interfaces/JsonMapperMethods.js"; /** * @ignore */ diff --git a/packages/specs/json-mapper/src/domain/JsonSerializer.spec.ts b/packages/specs/json-mapper/src/domain/JsonSerializer.spec.ts index 4c866e5cd7c..1a9f72612fb 100644 --- a/packages/specs/json-mapper/src/domain/JsonSerializer.spec.ts +++ b/packages/specs/json-mapper/src/domain/JsonSerializer.spec.ts @@ -19,17 +19,17 @@ import { } from "@tsed/schema"; import {snakeCase} from "change-case"; import {parse} from "querystring"; -import {Post} from "../../test/helpers/Post"; -import {User} from "../../test/helpers/User"; +import {Post} from "../../test/helpers/Post.js"; +import {User} from "../../test/helpers/User.js"; import "../components/DateMapper"; import "../components/PrimitiveMapper"; import "../components/SymbolMapper"; -import {OnDeserialize} from "../decorators/onDeserialize"; -import {OnSerialize} from "../decorators/onSerialize"; -import {deserialize} from "../utils/deserialize"; -import {JsonMapperSettings} from "./JsonMapperSettings"; -import {getJsonMapperTypes} from "./JsonMapperTypesContainer"; -import {JsonSerializer} from "./JsonSerializer"; +import {OnDeserialize} from "../decorators/onDeserialize.js"; +import {OnSerialize} from "../decorators/onSerialize.js"; +import {deserialize} from "../utils/deserialize.js"; +import {JsonMapperSettings} from "./JsonMapperSettings.js"; +import {getJsonMapperTypes} from "./JsonMapperTypesContainer.js"; +import {JsonSerializer} from "./JsonSerializer.js"; const serializer = new JsonSerializer(); diff --git a/packages/specs/json-mapper/src/domain/JsonSerializer.ts b/packages/specs/json-mapper/src/domain/JsonSerializer.ts index 82589f32ad1..cb42758f8ec 100644 --- a/packages/specs/json-mapper/src/domain/JsonSerializer.ts +++ b/packages/specs/json-mapper/src/domain/JsonSerializer.ts @@ -15,13 +15,13 @@ import { Type } from "@tsed/core"; import {getPropertiesStores, JsonClassStore, JsonEntityStore, JsonPropertyStore} from "@tsed/schema"; -import {alterOnSerialize} from "../hooks/alterOnSerialize"; -import {getObjectProperties} from "../utils/getObjectProperties"; -import {JsonMapperCompiler} from "./JsonMapperCompiler"; -import {JsonMapperSettings} from "./JsonMapperSettings"; -import {getJsonMapperTypes} from "./JsonMapperTypesContainer"; -import {JsonSerializerOptions} from "./JsonSerializerOptions"; -import {Writer} from "./Writer"; +import {alterOnSerialize} from "../hooks/alterOnSerialize.js"; +import {getObjectProperties} from "../utils/getObjectProperties.js"; +import {JsonMapperCompiler} from "./JsonMapperCompiler.js"; +import {JsonMapperSettings} from "./JsonMapperSettings.js"; +import {getJsonMapperTypes} from "./JsonMapperTypesContainer.js"; +import {JsonSerializerOptions} from "./JsonSerializerOptions.js"; +import {Writer} from "./Writer.js"; const getCollectionType = (input: any) => { return isArray(input) ? "Array" : input instanceof Set ? "Set" : input instanceof Map ? "Map" : undefined; diff --git a/packages/specs/json-mapper/src/domain/JsonSerializerOptions.ts b/packages/specs/json-mapper/src/domain/JsonSerializerOptions.ts index 3b74e6172c1..e6eb60fc8b1 100644 --- a/packages/specs/json-mapper/src/domain/JsonSerializerOptions.ts +++ b/packages/specs/json-mapper/src/domain/JsonSerializerOptions.ts @@ -1,6 +1,6 @@ import {MetadataTypes, Type} from "@tsed/core"; -import {JsonMapperMethods} from "../interfaces/JsonMapperMethods"; -import {JsonMapperGlobalOptions} from "./JsonMapperGlobalOptions"; +import {JsonMapperMethods} from "../interfaces/JsonMapperMethods.js"; +import {JsonMapperGlobalOptions} from "./JsonMapperGlobalOptions.js"; export interface JsonSerializerOptions extends MetadataTypes, Pick { /** diff --git a/packages/specs/json-mapper/src/domain/Writer.spec.ts b/packages/specs/json-mapper/src/domain/Writer.spec.ts index 7872afda959..0e05def4946 100644 --- a/packages/specs/json-mapper/src/domain/Writer.spec.ts +++ b/packages/specs/json-mapper/src/domain/Writer.spec.ts @@ -1,4 +1,4 @@ -import {Writer} from "./Writer"; +import {Writer} from "./Writer.js"; describe("Writer", () => { it("should generate code for if/else condition", () => { diff --git a/packages/specs/json-mapper/src/index.ts b/packages/specs/json-mapper/src/index.ts index a5f6690c393..26e24cc49be 100644 --- a/packages/specs/json-mapper/src/index.ts +++ b/packages/specs/json-mapper/src/index.ts @@ -2,28 +2,28 @@ * @file Automatically generated by barrelsby. */ -export * from "./components/DateMapper"; -export * from "./components/PrimitiveMapper"; -export * from "./components/SymbolMapper"; -export * from "./decorators/afterDeserialize"; -export * from "./decorators/beforeDeserialize"; -export * from "./decorators/jsonMapper"; -export * from "./decorators/onDeserialize"; -export * from "./decorators/onSerialize"; -export * from "./domain/JsonDeserializer"; -export * from "./domain/JsonDeserializerOptions"; -export * from "./domain/JsonMapperCompiler"; -export * from "./domain/JsonMapperGlobalOptions"; -export * from "./domain/JsonMapperSettings"; -export * from "./domain/JsonMapperTypesContainer"; -export * from "./domain/JsonSerializer"; -export * from "./domain/JsonSerializerOptions"; -export * from "./domain/Writer"; -export * from "./hooks/alterAfterDeserialize"; -export * from "./hooks/alterBeforeDeserialize"; -export * from "./hooks/alterOnDeserialize"; -export * from "./hooks/alterOnSerialize"; -export * from "./interfaces/JsonMapperMethods"; -export * from "./utils/deserialize"; -export * from "./utils/getObjectProperties"; -export * from "./utils/serialize"; +export * from "./components/DateMapper.js"; +export * from "./components/PrimitiveMapper.js"; +export * from "./components/SymbolMapper.js"; +export * from "./decorators/afterDeserialize.js"; +export * from "./decorators/beforeDeserialize.js"; +export * from "./decorators/jsonMapper.js"; +export * from "./decorators/onDeserialize.js"; +export * from "./decorators/onSerialize.js"; +export * from "./domain/JsonDeserializer.js"; +export * from "./domain/JsonDeserializerOptions.js"; +export * from "./domain/JsonMapperCompiler.js"; +export * from "./domain/JsonMapperGlobalOptions.js"; +export * from "./domain/JsonMapperSettings.js"; +export * from "./domain/JsonMapperTypesContainer.js"; +export * from "./domain/JsonSerializer.js"; +export * from "./domain/JsonSerializerOptions.js"; +export * from "./domain/Writer.js"; +export * from "./hooks/alterAfterDeserialize.js"; +export * from "./hooks/alterBeforeDeserialize.js"; +export * from "./hooks/alterOnDeserialize.js"; +export * from "./hooks/alterOnSerialize.js"; +export * from "./interfaces/JsonMapperMethods.js"; +export * from "./utils/deserialize.js"; +export * from "./utils/getObjectProperties.js"; +export * from "./utils/serialize.js"; diff --git a/packages/specs/json-mapper/src/utils/deserialize.spec.ts b/packages/specs/json-mapper/src/utils/deserialize.spec.ts index 9ff4cc45424..790cee3eb8a 100644 --- a/packages/specs/json-mapper/src/utils/deserialize.spec.ts +++ b/packages/specs/json-mapper/src/utils/deserialize.spec.ts @@ -1,4 +1,4 @@ -import {deserialize} from "./deserialize"; +import {deserialize} from "./deserialize.js"; describe("deserialize()", () => { describe("Primitive", () => { diff --git a/packages/specs/json-mapper/src/utils/deserialize.ts b/packages/specs/json-mapper/src/utils/deserialize.ts index 4884422039f..bda468c79a1 100644 --- a/packages/specs/json-mapper/src/utils/deserialize.ts +++ b/packages/specs/json-mapper/src/utils/deserialize.ts @@ -2,8 +2,8 @@ import "../components/DateMapper"; import "../components/PrimitiveMapper"; import "../components/SymbolMapper"; -import {JsonDeserializer} from "../domain/JsonDeserializer"; -import {JsonDeserializerOptions} from "../domain/JsonDeserializerOptions"; +import {JsonDeserializer} from "../domain/JsonDeserializer.js"; +import {JsonDeserializerOptions} from "../domain/JsonDeserializerOptions.js"; const deserializer = new JsonDeserializer(); diff --git a/packages/specs/json-mapper/src/utils/serialize.spec.ts b/packages/specs/json-mapper/src/utils/serialize.spec.ts index dfe7299c942..635b92e77a1 100644 --- a/packages/specs/json-mapper/src/utils/serialize.spec.ts +++ b/packages/specs/json-mapper/src/utils/serialize.spec.ts @@ -1,6 +1,6 @@ import "../components/PrimitiveMapper"; import {Property} from "@tsed/schema"; -import {serialize} from "./serialize"; +import {serialize} from "./serialize.js"; describe("serialize()", () => { it("should serialize values", () => { diff --git a/packages/specs/json-mapper/src/utils/serialize.ts b/packages/specs/json-mapper/src/utils/serialize.ts index 39c364968f7..8b476ecc3ef 100644 --- a/packages/specs/json-mapper/src/utils/serialize.ts +++ b/packages/specs/json-mapper/src/utils/serialize.ts @@ -2,8 +2,8 @@ import "../components/DateMapper"; import "../components/PrimitiveMapper"; import "../components/SymbolMapper"; -import {JsonSerializer} from "../domain/JsonSerializer"; -import {JsonSerializerOptions} from "../domain/JsonSerializerOptions"; +import {JsonSerializer} from "../domain/JsonSerializer.js"; +import {JsonSerializerOptions} from "../domain/JsonSerializerOptions.js"; const serializer = new JsonSerializer(); diff --git a/packages/specs/json-mapper/test/helpers/Post.ts b/packages/specs/json-mapper/test/helpers/Post.ts index 118e45496d7..bda2dbdb5a5 100644 --- a/packages/specs/json-mapper/test/helpers/Post.ts +++ b/packages/specs/json-mapper/test/helpers/Post.ts @@ -1,5 +1,5 @@ import {Property} from "@tsed/schema"; -import {User} from "./User"; +import {User} from "./User.js"; export class Post { @Property() id: string; diff --git a/packages/specs/json-mapper/test/helpers/User.ts b/packages/specs/json-mapper/test/helpers/User.ts index 0a250f69046..5f9a03a25eb 100644 --- a/packages/specs/json-mapper/test/helpers/User.ts +++ b/packages/specs/json-mapper/test/helpers/User.ts @@ -1,5 +1,5 @@ import {CollectionOf, Property} from "@tsed/schema"; -import {Post} from "./Post"; +import {Post} from "./Post.js"; export class User { @Property() diff --git a/packages/specs/json-mapper/test/integration/additional-properties.integration.spec.ts b/packages/specs/json-mapper/test/integration/additional-properties.integration.spec.ts index 4560a7c06b4..34799ce1a90 100644 --- a/packages/specs/json-mapper/test/integration/additional-properties.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/additional-properties.integration.spec.ts @@ -1,7 +1,7 @@ import {useDecorators} from "@tsed/core"; import {AdditionalProperties, Groups, Hidden, JsonEntityStore, Name, ReadOnly, Title} from "@tsed/schema"; import {sentenceCase, snakeCase} from "change-case"; -import {deserialize, serialize} from "../../src"; +import {deserialize, serialize} from "../../src/index.js"; describe("AdditionalProperties", () => { describe("deserialize then serialize", () => { diff --git a/packages/specs/json-mapper/test/integration/after.deserialize.integration.spec.ts b/packages/specs/json-mapper/test/integration/after.deserialize.integration.spec.ts index b11565c12a8..bbee6e9eaa8 100644 --- a/packages/specs/json-mapper/test/integration/after.deserialize.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/after.deserialize.integration.spec.ts @@ -1,9 +1,9 @@ import {catchAsyncError} from "@tsed/core"; import {BadRequest} from "@tsed/exceptions"; import {Enum, Property} from "@tsed/schema"; -import {deserialize} from "../../src/utils/deserialize"; -import {AfterDeserialize} from "../../src/decorators/afterDeserialize"; -import {FoodStatus} from "../helpers/FoodStatus"; +import {deserialize} from "../../src/utils/deserialize.js"; +import {AfterDeserialize} from "../../src/decorators/afterDeserialize.js"; +import {FoodStatus} from "../helpers/FoodStatus.js"; @AfterDeserialize((data: Food) => { if (data.status === FoodStatus.EXPIRED || data.status === FoodStatus.MOLDY) { diff --git a/packages/specs/json-mapper/test/integration/allowed-groups.integration.spec.ts b/packages/specs/json-mapper/test/integration/allowed-groups.integration.spec.ts index e222ff3df6a..36d9fa9b5a2 100644 --- a/packages/specs/json-mapper/test/integration/allowed-groups.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/allowed-groups.integration.spec.ts @@ -1,6 +1,6 @@ import {Controller} from "@tsed/di"; import {EndpointMetadata, Get, Groups, Property, Returns} from "@tsed/schema"; -import {serialize} from "../../src/utils/serialize"; +import {serialize} from "../../src/utils/serialize.js"; class MyModel { @Property() diff --git a/packages/specs/json-mapper/test/integration/before.deserialize.integration.spec.ts b/packages/specs/json-mapper/test/integration/before.deserialize.integration.spec.ts index fad6d5d7eea..31c68f4d580 100644 --- a/packages/specs/json-mapper/test/integration/before.deserialize.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/before.deserialize.integration.spec.ts @@ -1,9 +1,9 @@ import {catchAsyncError} from "@tsed/core"; import {BadRequest} from "@tsed/exceptions"; import {Enum, Property} from "@tsed/schema"; -import {deserialize} from "../../src/utils/deserialize"; -import {BeforeDeserialize} from "../../src/decorators/beforeDeserialize"; -import {FoodStatus} from "../helpers/FoodStatus"; +import {deserialize} from "../../src/utils/deserialize.js"; +import {BeforeDeserialize} from "../../src/decorators/beforeDeserialize.js"; +import {FoodStatus} from "../helpers/FoodStatus.js"; @BeforeDeserialize((data: Record) => { if (data.status === FoodStatus.EXPIRED || data.status === FoodStatus.MOLDY) { diff --git a/packages/specs/json-mapper/test/integration/custom.validation.spec.ts b/packages/specs/json-mapper/test/integration/custom.validation.spec.ts index 55a0e44fe4b..aaa524a00d4 100644 --- a/packages/specs/json-mapper/test/integration/custom.validation.spec.ts +++ b/packages/specs/json-mapper/test/integration/custom.validation.spec.ts @@ -1,8 +1,8 @@ import {catchAsyncError} from "@tsed/core"; import {BadRequest} from "@tsed/exceptions"; import {JsonEntityFn, Property} from "@tsed/schema"; -import {deserialize} from "../../src/utils/deserialize"; -import {BeforeDeserialize} from "../../src/decorators/beforeDeserialize"; +import {deserialize} from "../../src/utils/deserialize.js"; +import {BeforeDeserialize} from "../../src/decorators/beforeDeserialize.js"; class Company { @Property() diff --git a/packages/specs/json-mapper/test/integration/date.integration.spec.ts b/packages/specs/json-mapper/test/integration/date.integration.spec.ts index 6d0d4e3a24c..e9f0682581f 100644 --- a/packages/specs/json-mapper/test/integration/date.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/date.integration.spec.ts @@ -1,6 +1,6 @@ import {isBoolean} from "@tsed/core"; import {DateFormat} from "@tsed/schema"; -import {JsonMapper, JsonMapperCtx, JsonMapperMethods, serialize} from "../../src/index"; +import {JsonMapper, JsonMapperCtx, JsonMapperMethods, serialize} from "../../src/index.js"; @JsonMapper(Date) export class DateMapper implements JsonMapperMethods { diff --git a/packages/specs/json-mapper/test/integration/discriminator.integration.spec.ts b/packages/specs/json-mapper/test/integration/discriminator.integration.spec.ts index b8892be1570..fb7abc6babe 100644 --- a/packages/specs/json-mapper/test/integration/discriminator.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/discriminator.integration.spec.ts @@ -1,7 +1,7 @@ import {Controller} from "@tsed/di"; import {BodyParams, PathParams} from "@tsed/platform-params"; import {DiscriminatorKey, DiscriminatorValue, JsonParameterStore, OneOf, Property, Put, Required, Returns} from "@tsed/schema"; -import {deserialize, serialize} from "../../src"; +import {deserialize, serialize} from "../../src/index.js"; class Event { @DiscriminatorKey() // declare this property as discriminator key diff --git a/packages/specs/json-mapper/test/integration/enum.serialiazation.integration.spec.ts b/packages/specs/json-mapper/test/integration/enum.serialiazation.integration.spec.ts index 656ea730d64..8580b2f7fff 100644 --- a/packages/specs/json-mapper/test/integration/enum.serialiazation.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/enum.serialiazation.integration.spec.ts @@ -1,5 +1,5 @@ import {Enum, Property, Required} from "@tsed/schema"; -import {serialize} from "../../src/utils/serialize"; +import {serialize} from "../../src/utils/serialize.js"; export enum EnumValue { One = "one", diff --git a/packages/specs/json-mapper/test/integration/generics.integration.spec.ts b/packages/specs/json-mapper/test/integration/generics.integration.spec.ts index aa922b2d559..80fa94f909b 100644 --- a/packages/specs/json-mapper/test/integration/generics.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/generics.integration.spec.ts @@ -14,8 +14,8 @@ import { Returns, string } from "@tsed/schema"; -import {deserialize} from "../../src/utils/deserialize"; -import {serialize} from "../../src/utils/serialize"; +import {deserialize} from "../../src/utils/deserialize.js"; +import {serialize} from "../../src/utils/serialize.js"; describe("Generics", () => { describe("using Functional api", () => { diff --git a/packages/specs/json-mapper/test/integration/groups.integration.spec.ts b/packages/specs/json-mapper/test/integration/groups.integration.spec.ts index c3fe001c8c8..fcb11820f7e 100644 --- a/packages/specs/json-mapper/test/integration/groups.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/groups.integration.spec.ts @@ -1,6 +1,6 @@ import {CollectionOf, Groups, Property} from "@tsed/schema"; -import {deserialize} from "../../src/utils/deserialize"; -import {serialize} from "../../src/utils/serialize"; +import {deserialize} from "../../src/utils/deserialize.js"; +import {serialize} from "../../src/utils/serialize.js"; class Product { @Groups("!creation") diff --git a/packages/specs/json-mapper/test/integration/ignore.integration.spec.ts b/packages/specs/json-mapper/test/integration/ignore.integration.spec.ts index c7f94213afe..637b9495f88 100644 --- a/packages/specs/json-mapper/test/integration/ignore.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/ignore.integration.spec.ts @@ -1,5 +1,5 @@ import {Ignore, Property} from "@tsed/schema"; -import {serialize} from "../../src/utils/serialize"; +import {serialize} from "../../src/utils/serialize.js"; describe("Mapping @Ignore", () => { it("should serialize model", () => { diff --git a/packages/specs/json-mapper/test/integration/models.date.intregration.spec.ts b/packages/specs/json-mapper/test/integration/models.date.intregration.spec.ts index 75885244319..368ff36fb33 100644 --- a/packages/specs/json-mapper/test/integration/models.date.intregration.spec.ts +++ b/packages/specs/json-mapper/test/integration/models.date.intregration.spec.ts @@ -1,8 +1,8 @@ import {Minimum, Name, Required} from "@tsed/schema"; import moment from "moment"; -import {OnSerialize} from "../../src/decorators/onSerialize"; -import {deserialize} from "../../src/utils/deserialize"; -import {serialize} from "../../src/utils/serialize"; +import {OnSerialize} from "../../src/decorators/onSerialize.js"; +import {deserialize} from "../../src/utils/deserialize.js"; +import {serialize} from "../../src/utils/serialize.js"; function serializeDate(date: Date) { return date && moment(date).format("YYYYMMDD"); diff --git a/packages/specs/json-mapper/test/integration/models.integration.spec.ts b/packages/specs/json-mapper/test/integration/models.integration.spec.ts index 66a7bf73ca8..8c9ec64b976 100644 --- a/packages/specs/json-mapper/test/integration/models.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/models.integration.spec.ts @@ -1,5 +1,5 @@ import {Property, Required} from "@tsed/schema"; -import {serialize} from "../../src/utils/serialize"; +import {serialize} from "../../src/utils/serialize.js"; export class Menu { @Property() diff --git a/packages/specs/json-mapper/test/integration/moment.integration.spec.ts b/packages/specs/json-mapper/test/integration/moment.integration.spec.ts index 123234abbd6..72bd3c20a65 100644 --- a/packages/specs/json-mapper/test/integration/moment.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/moment.integration.spec.ts @@ -1,9 +1,9 @@ import {DateFormat} from "@tsed/schema"; import moment, {Moment} from "moment"; -import {JsonMapper} from "../../src/decorators/jsonMapper"; -import {getJsonMapperTypes} from "../../src/domain/JsonMapperTypesContainer"; -import {JsonSerializer} from "../../src/index"; -import {JsonMapperMethods} from "../../src/interfaces/JsonMapperMethods"; +import {JsonMapper} from "../../src/decorators/jsonMapper.js"; +import {getJsonMapperTypes} from "../../src/domain/JsonMapperTypesContainer.js"; +import {JsonSerializer} from "../../src/index.js"; +import {JsonMapperMethods} from "../../src/interfaces/JsonMapperMethods.js"; class MyModel { @DateFormat() diff --git a/packages/specs/json-mapper/test/integration/nested-list.integration.spec.ts b/packages/specs/json-mapper/test/integration/nested-list.integration.spec.ts index 632b64e2a95..0dcf26f711e 100644 --- a/packages/specs/json-mapper/test/integration/nested-list.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/nested-list.integration.spec.ts @@ -1,5 +1,5 @@ import {CollectionOf, ForwardGroups, Name, Required} from "@tsed/schema"; -import {serialize} from "../../src/utils/serialize"; +import {serialize} from "../../src/utils/serialize.js"; class TeamModel { @Required() diff --git a/packages/specs/json-mapper/test/integration/nullable.integration.spec.ts b/packages/specs/json-mapper/test/integration/nullable.integration.spec.ts index 0299fd24e32..3c3cd52fcdd 100644 --- a/packages/specs/json-mapper/test/integration/nullable.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/nullable.integration.spec.ts @@ -1,4 +1,4 @@ -import {serialize} from "../../src/utils/serialize"; +import {serialize} from "../../src/utils/serialize.js"; import {Name, Nullable, Required} from "@tsed/schema"; export class ExtensionModel { diff --git a/packages/specs/json-mapper/test/integration/pageable.integration.spec.ts b/packages/specs/json-mapper/test/integration/pageable.integration.spec.ts index 0d06c1301d0..d1054608d62 100644 --- a/packages/specs/json-mapper/test/integration/pageable.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/pageable.integration.spec.ts @@ -14,7 +14,7 @@ import { SpecTypes, string } from "@tsed/schema"; -import {OnDeserialize, serialize} from "../../src/index"; +import {OnDeserialize, serialize} from "../../src/index.js"; class Pageable { @Integer() diff --git a/packages/specs/json-mapper/test/integration/partial.integration.spec.ts b/packages/specs/json-mapper/test/integration/partial.integration.spec.ts index 455162f2c04..b87bf892a18 100644 --- a/packages/specs/json-mapper/test/integration/partial.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/partial.integration.spec.ts @@ -1,5 +1,5 @@ import {CollectionOf, Groups, Property} from "@tsed/schema"; -import {deserialize} from "../../src/utils/deserialize"; +import {deserialize} from "../../src/utils/deserialize.js"; class Product { @Groups("!creation") diff --git a/packages/specs/json-mapper/test/integration/readonly.integration.spec.ts b/packages/specs/json-mapper/test/integration/readonly.integration.spec.ts index 0af35d7c5e7..ebf7cac6e07 100644 --- a/packages/specs/json-mapper/test/integration/readonly.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/readonly.integration.spec.ts @@ -1,5 +1,5 @@ -import {serialize} from "../../src/utils/serialize"; -import {deserialize} from "../../src/utils/deserialize"; +import {serialize} from "../../src/utils/serialize.js"; +import {deserialize} from "../../src/utils/deserialize.js"; import {Groups, Property, ReadOnly, Required} from "@tsed/schema"; class DataSourceModel { diff --git a/packages/specs/json-mapper/test/integration/writeonly.integration.spec.ts b/packages/specs/json-mapper/test/integration/writeonly.integration.spec.ts index 8900aaff55d..46ef333e1e8 100644 --- a/packages/specs/json-mapper/test/integration/writeonly.integration.spec.ts +++ b/packages/specs/json-mapper/test/integration/writeonly.integration.spec.ts @@ -1,5 +1,5 @@ -import {serialize} from "../../src/utils/serialize"; -import {deserialize} from "../../src/utils/deserialize"; +import {serialize} from "../../src/utils/serialize.js"; +import {deserialize} from "../../src/utils/deserialize.js"; import {Groups, Property, Required, WriteOnly} from "@tsed/schema"; class DataSourceModel { diff --git a/packages/specs/openspec/src/common/OpenSpecJsonSchema.ts b/packages/specs/openspec/src/common/OpenSpecJsonSchema.ts index a23815c6615..e45deac9a8d 100644 --- a/packages/specs/openspec/src/common/OpenSpecJsonSchema.ts +++ b/packages/specs/openspec/src/common/OpenSpecJsonSchema.ts @@ -1,6 +1,6 @@ -import {OpenSpecHash} from "./OpenSpecHash"; -import {OpenSpecRef} from "./OpenSpecRef"; -import {OpenSpecTypes} from "./OpenSpecTypes"; +import {OpenSpecHash} from "./OpenSpecHash.js"; +import {OpenSpecRef} from "./OpenSpecRef.js"; +import {OpenSpecTypes} from "./OpenSpecTypes.js"; export interface OpenSpecBaseJsonSchema { $ref?: string; diff --git a/packages/specs/openspec/src/common/OpenSpecSecurity.ts b/packages/specs/openspec/src/common/OpenSpecSecurity.ts index eac1a3ccdfe..0f26e2513a0 100644 --- a/packages/specs/openspec/src/common/OpenSpecSecurity.ts +++ b/packages/specs/openspec/src/common/OpenSpecSecurity.ts @@ -1,3 +1,3 @@ -import {OpenSpecHash} from "./OpenSpecHash"; +import {OpenSpecHash} from "./OpenSpecHash.js"; export type OpenSpecSecurity = OpenSpecHash[]; diff --git a/packages/specs/openspec/src/common/OpenSpecTag.ts b/packages/specs/openspec/src/common/OpenSpecTag.ts index f8ede58fe77..b7209b327d9 100644 --- a/packages/specs/openspec/src/common/OpenSpecTag.ts +++ b/packages/specs/openspec/src/common/OpenSpecTag.ts @@ -1,4 +1,4 @@ -import {OpenSpecExternalDocs} from "./OpenSpecExternalDocs"; +import {OpenSpecExternalDocs} from "./OpenSpecExternalDocs.js"; export interface OpenSpecTag { name: string; diff --git a/packages/specs/openspec/src/index.ts b/packages/specs/openspec/src/index.ts index bdd594a4f48..9d7ee8ae7fb 100644 --- a/packages/specs/openspec/src/index.ts +++ b/packages/specs/openspec/src/index.ts @@ -2,39 +2,39 @@ * @file Automatically generated by barrelsby. */ -export * from "./common/OpenSpecExternalDocs"; -export * from "./common/OpenSpecHash"; -export * from "./common/OpenSpecInfo"; -export * from "./common/OpenSpecJsonSchema"; -export * from "./common/OpenSpecPath"; -export * from "./common/OpenSpecRef"; -export * from "./common/OpenSpecSecurity"; -export * from "./common/OpenSpecTag"; -export * from "./common/OpenSpecTypes"; -export * from "./common/OpenSpecVersions"; -export * from "./common/OpenSpecXML"; -export * from "./openspec2/OS2Header"; -export * from "./openspec2/OS2Operation"; -export * from "./openspec2/OS2Parameter"; -export * from "./openspec2/OS2Paths"; -export * from "./openspec2/OS2Response"; -export * from "./openspec2/OS2Schema"; -export * from "./openspec2/OS2Security"; -export * from "./openspec2/OpenSpec2"; -export * from "./openspec3/OS3Callbacks"; -export * from "./openspec3/OS3Components"; -export * from "./openspec3/OS3Encoding"; -export * from "./openspec3/OS3Example"; -export * from "./openspec3/OS3Flows"; -export * from "./openspec3/OS3Header"; -export * from "./openspec3/OS3Link"; -export * from "./openspec3/OS3MediaType"; -export * from "./openspec3/OS3Operation"; -export * from "./openspec3/OS3Parameter"; -export * from "./openspec3/OS3Paths"; -export * from "./openspec3/OS3RequestBody"; -export * from "./openspec3/OS3Response"; -export * from "./openspec3/OS3Schema"; -export * from "./openspec3/OS3Security"; -export * from "./openspec3/OS3Server"; -export * from "./openspec3/OpenSpec3"; +export * from "./common/OpenSpecExternalDocs.js"; +export * from "./common/OpenSpecHash.js"; +export * from "./common/OpenSpecInfo.js"; +export * from "./common/OpenSpecJsonSchema.js"; +export * from "./common/OpenSpecPath.js"; +export * from "./common/OpenSpecRef.js"; +export * from "./common/OpenSpecSecurity.js"; +export * from "./common/OpenSpecTag.js"; +export * from "./common/OpenSpecTypes.js"; +export * from "./common/OpenSpecVersions.js"; +export * from "./common/OpenSpecXML.js"; +export * from "./openspec2/OS2Header.js"; +export * from "./openspec2/OS2Operation.js"; +export * from "./openspec2/OS2Parameter.js"; +export * from "./openspec2/OS2Paths.js"; +export * from "./openspec2/OS2Response.js"; +export * from "./openspec2/OS2Schema.js"; +export * from "./openspec2/OS2Security.js"; +export * from "./openspec2/OpenSpec2.js"; +export * from "./openspec3/OS3Callbacks.js"; +export * from "./openspec3/OS3Components.js"; +export * from "./openspec3/OS3Encoding.js"; +export * from "./openspec3/OS3Example.js"; +export * from "./openspec3/OS3Flows.js"; +export * from "./openspec3/OS3Header.js"; +export * from "./openspec3/OS3Link.js"; +export * from "./openspec3/OS3MediaType.js"; +export * from "./openspec3/OS3Operation.js"; +export * from "./openspec3/OS3Parameter.js"; +export * from "./openspec3/OS3Paths.js"; +export * from "./openspec3/OS3RequestBody.js"; +export * from "./openspec3/OS3Response.js"; +export * from "./openspec3/OS3Schema.js"; +export * from "./openspec3/OS3Security.js"; +export * from "./openspec3/OS3Server.js"; +export * from "./openspec3/OpenSpec3.js"; diff --git a/packages/specs/openspec/src/openspec2/OS2Header.ts b/packages/specs/openspec/src/openspec2/OS2Header.ts index 61642d19672..9c6f0a560f7 100644 --- a/packages/specs/openspec/src/openspec2/OS2Header.ts +++ b/packages/specs/openspec/src/openspec2/OS2Header.ts @@ -1,4 +1,4 @@ -import {OS2BaseSchema} from "./OS2Schema"; +import {OS2BaseSchema} from "./OS2Schema.js"; export interface OS2Header extends OS2BaseSchema { /** diff --git a/packages/specs/openspec/src/openspec2/OS2Operation.ts b/packages/specs/openspec/src/openspec2/OS2Operation.ts index 2ad9a1a9d18..e762ca2854d 100644 --- a/packages/specs/openspec/src/openspec2/OS2Operation.ts +++ b/packages/specs/openspec/src/openspec2/OS2Operation.ts @@ -1,9 +1,9 @@ -import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs"; -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OpenSpecRef} from "../common/OpenSpecRef"; -import {OpenSpecSecurity} from "../common/OpenSpecSecurity"; -import {OS2Parameter} from "./OS2Parameter"; -import {OS2Response} from "./OS2Response"; +import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs.js"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OpenSpecRef} from "../common/OpenSpecRef.js"; +import {OpenSpecSecurity} from "../common/OpenSpecSecurity.js"; +import {OS2Parameter} from "./OS2Parameter.js"; +import {OS2Response} from "./OS2Response.js"; export interface OS2Operation { /** diff --git a/packages/specs/openspec/src/openspec2/OS2Parameter.ts b/packages/specs/openspec/src/openspec2/OS2Parameter.ts index fd80c30ac4c..7ad9c778d7d 100644 --- a/packages/specs/openspec/src/openspec2/OS2Parameter.ts +++ b/packages/specs/openspec/src/openspec2/OS2Parameter.ts @@ -1,5 +1,5 @@ -import {OpenSpecTypes} from "../common/OpenSpecTypes"; -import {OS2BaseSchema, OS2Schema} from "./OS2Schema"; +import {OpenSpecTypes} from "../common/OpenSpecTypes.js"; +import {OS2BaseSchema, OS2Schema} from "./OS2Schema.js"; export type OS2BaseParameter = { name: string; diff --git a/packages/specs/openspec/src/openspec2/OS2Paths.ts b/packages/specs/openspec/src/openspec2/OS2Paths.ts index d5ab807ddab..15630d95acc 100644 --- a/packages/specs/openspec/src/openspec2/OS2Paths.ts +++ b/packages/specs/openspec/src/openspec2/OS2Paths.ts @@ -1,7 +1,7 @@ -import {OpenSpecPath} from "../common/OpenSpecPath"; -import {OpenSpecRef} from "../common/OpenSpecRef"; -import {OS2Operation} from "./OS2Operation"; -import {OS2Parameter} from "./OS2Parameter"; +import {OpenSpecPath} from "../common/OpenSpecPath.js"; +import {OpenSpecRef} from "../common/OpenSpecRef.js"; +import {OS2Operation} from "./OS2Operation.js"; +import {OS2Parameter} from "./OS2Parameter.js"; export interface OS2Paths extends OpenSpecPath { parameters?: (OS2Parameter | OpenSpecRef)[]; diff --git a/packages/specs/openspec/src/openspec2/OS2Response.ts b/packages/specs/openspec/src/openspec2/OS2Response.ts index 33b9764469a..735641981bb 100644 --- a/packages/specs/openspec/src/openspec2/OS2Response.ts +++ b/packages/specs/openspec/src/openspec2/OS2Response.ts @@ -1,6 +1,6 @@ -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OS2Header} from "./OS2Header"; -import {OS2Schema} from "./OS2Schema"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OS2Header} from "./OS2Header.js"; +import {OS2Schema} from "./OS2Schema.js"; export interface OS2Response { /** diff --git a/packages/specs/openspec/src/openspec2/OS2Schema.ts b/packages/specs/openspec/src/openspec2/OS2Schema.ts index 9a984f3dd66..a507b2dd4b5 100644 --- a/packages/specs/openspec/src/openspec2/OS2Schema.ts +++ b/packages/specs/openspec/src/openspec2/OS2Schema.ts @@ -1,7 +1,7 @@ -import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs"; -import {OpenSpecBaseJsonSchema, OpenSpecJsonSchema} from "../common/OpenSpecJsonSchema"; -import {OpenSpecRef} from "../common/OpenSpecRef"; -import {OpenSpecXML} from "../common/OpenSpecXML"; +import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs.js"; +import {OpenSpecBaseJsonSchema, OpenSpecJsonSchema} from "../common/OpenSpecJsonSchema.js"; +import {OpenSpecRef} from "../common/OpenSpecRef.js"; +import {OpenSpecXML} from "../common/OpenSpecXML.js"; export interface OS2XML { name?: string; diff --git a/packages/specs/openspec/src/openspec2/OS2Security.ts b/packages/specs/openspec/src/openspec2/OS2Security.ts index a51f33575d8..9271002b866 100644 --- a/packages/specs/openspec/src/openspec2/OS2Security.ts +++ b/packages/specs/openspec/src/openspec2/OS2Security.ts @@ -1,4 +1,4 @@ -import {OpenSpecHash} from "../common/OpenSpecHash"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; export interface OS2SecurityBase { /** diff --git a/packages/specs/openspec/src/openspec2/OpenSpec2.ts b/packages/specs/openspec/src/openspec2/OpenSpec2.ts index 264970b3520..026153f2551 100644 --- a/packages/specs/openspec/src/openspec2/OpenSpec2.ts +++ b/packages/specs/openspec/src/openspec2/OpenSpec2.ts @@ -1,13 +1,13 @@ -import {OS2Response} from "./OS2Response"; -import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs"; -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OpenSpecInfo} from "../common/OpenSpecInfo"; -import {OpenSpecSecurity} from "../common/OpenSpecSecurity"; -import {OpenSpecTag} from "../common/OpenSpecTag"; -import {OS2BodyParameter, OS2QueryParameter} from "./OS2Parameter"; -import {OS2Paths} from "./OS2Paths"; -import {OS2Schema} from "./OS2Schema"; -import {OS2Security} from "./OS2Security"; +import {OS2Response} from "./OS2Response.js"; +import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs.js"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OpenSpecInfo} from "../common/OpenSpecInfo.js"; +import {OpenSpecSecurity} from "../common/OpenSpecSecurity.js"; +import {OpenSpecTag} from "../common/OpenSpecTag.js"; +import {OS2BodyParameter, OS2QueryParameter} from "./OS2Parameter.js"; +import {OS2Paths} from "./OS2Paths.js"; +import {OS2Schema} from "./OS2Schema.js"; +import {OS2Security} from "./OS2Security.js"; export interface OpenSpec2 { /** diff --git a/packages/specs/openspec/src/openspec3/OS3Callbacks.ts b/packages/specs/openspec/src/openspec3/OS3Callbacks.ts index cd75c9bb219..7e2ccbe2ae2 100644 --- a/packages/specs/openspec/src/openspec3/OS3Callbacks.ts +++ b/packages/specs/openspec/src/openspec3/OS3Callbacks.ts @@ -1,5 +1,5 @@ -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OS3Paths} from "./OS3Paths"; -import {OS3Schema} from "./OS3Schema"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OS3Paths} from "./OS3Paths.js"; +import {OS3Schema} from "./OS3Schema.js"; export type OS3Callbacks = OpenSpecHash>>; diff --git a/packages/specs/openspec/src/openspec3/OS3Components.ts b/packages/specs/openspec/src/openspec3/OS3Components.ts index b1ad92b8f8e..f1f9af0ced1 100644 --- a/packages/specs/openspec/src/openspec3/OS3Components.ts +++ b/packages/specs/openspec/src/openspec3/OS3Components.ts @@ -1,13 +1,13 @@ -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OS3Callbacks} from "./OS3Callbacks"; -import {OS3Example} from "./OS3Example"; -import {OS3Header} from "./OS3Header"; -import {OS3Link} from "./OS3Link"; -import {OS3Parameter} from "./OS3Parameter"; -import {OS3RequestBody} from "./OS3RequestBody"; -import {OS3Response} from "./OS3Response"; -import {OS3Schema} from "./OS3Schema"; -import {OS3Security} from "./OS3Security"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OS3Callbacks} from "./OS3Callbacks.js"; +import {OS3Example} from "./OS3Example.js"; +import {OS3Header} from "./OS3Header.js"; +import {OS3Link} from "./OS3Link.js"; +import {OS3Parameter} from "./OS3Parameter.js"; +import {OS3RequestBody} from "./OS3RequestBody.js"; +import {OS3Response} from "./OS3Response.js"; +import {OS3Schema} from "./OS3Schema.js"; +import {OS3Security} from "./OS3Security.js"; export interface OS3Components { /** diff --git a/packages/specs/openspec/src/openspec3/OS3Encoding.ts b/packages/specs/openspec/src/openspec3/OS3Encoding.ts index 810efca8396..3c4f935629a 100644 --- a/packages/specs/openspec/src/openspec3/OS3Encoding.ts +++ b/packages/specs/openspec/src/openspec3/OS3Encoding.ts @@ -1,5 +1,5 @@ -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OS3Header} from "./OS3Header"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OS3Header} from "./OS3Header.js"; export interface OS3Encoding { /** diff --git a/packages/specs/openspec/src/openspec3/OS3Header.ts b/packages/specs/openspec/src/openspec3/OS3Header.ts index 5b569cfc611..c3aaee194ae 100644 --- a/packages/specs/openspec/src/openspec3/OS3Header.ts +++ b/packages/specs/openspec/src/openspec3/OS3Header.ts @@ -1,6 +1,6 @@ -import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs"; -import {OpenSpecRef} from "../common/OpenSpecRef"; -import {OS3Schema} from "./OS3Schema"; +import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs.js"; +import {OpenSpecRef} from "../common/OpenSpecRef.js"; +import {OS3Schema} from "./OS3Schema.js"; export interface OS3Header { /** diff --git a/packages/specs/openspec/src/openspec3/OS3Link.ts b/packages/specs/openspec/src/openspec3/OS3Link.ts index 9596f80c807..c8c85a84a65 100644 --- a/packages/specs/openspec/src/openspec3/OS3Link.ts +++ b/packages/specs/openspec/src/openspec3/OS3Link.ts @@ -1,5 +1,5 @@ -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OS3Server} from "./OS3Server"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OS3Server} from "./OS3Server.js"; export interface OS3Link { /** diff --git a/packages/specs/openspec/src/openspec3/OS3MediaType.ts b/packages/specs/openspec/src/openspec3/OS3MediaType.ts index 7ae76194876..37993a624e1 100644 --- a/packages/specs/openspec/src/openspec3/OS3MediaType.ts +++ b/packages/specs/openspec/src/openspec3/OS3MediaType.ts @@ -1,8 +1,8 @@ -import {OS3Schema} from "./OS3Schema"; -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OpenSpecRef} from "../common/OpenSpecRef"; -import {OS3Encoding} from "./OS3Encoding"; -import {OS3Example} from "./OS3Example"; +import {OS3Schema} from "./OS3Schema.js"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OpenSpecRef} from "../common/OpenSpecRef.js"; +import {OS3Encoding} from "./OS3Encoding.js"; +import {OS3Example} from "./OS3Example.js"; export interface OS3MediaType { /** diff --git a/packages/specs/openspec/src/openspec3/OS3Operation.ts b/packages/specs/openspec/src/openspec3/OS3Operation.ts index 54c92aa1df3..4608be35564 100644 --- a/packages/specs/openspec/src/openspec3/OS3Operation.ts +++ b/packages/specs/openspec/src/openspec3/OS3Operation.ts @@ -1,12 +1,12 @@ -import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs"; -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OpenSpecSecurity} from "../common/OpenSpecSecurity"; -import {OS3Callbacks} from "./OS3Callbacks"; -import {OS3Parameter} from "./OS3Parameter"; -import {OS3RequestBody} from "./OS3RequestBody"; -import {OS3Response} from "./OS3Response"; -import {OS3Schema} from "./OS3Schema"; -import {OS3Server} from "./OS3Server"; +import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs.js"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OpenSpecSecurity} from "../common/OpenSpecSecurity.js"; +import {OS3Callbacks} from "./OS3Callbacks.js"; +import {OS3Parameter} from "./OS3Parameter.js"; +import {OS3RequestBody} from "./OS3RequestBody.js"; +import {OS3Response} from "./OS3Response.js"; +import {OS3Schema} from "./OS3Schema.js"; +import {OS3Server} from "./OS3Server.js"; export interface OS3Operation, Response = OpenSpecHash>> { /** diff --git a/packages/specs/openspec/src/openspec3/OS3Parameter.ts b/packages/specs/openspec/src/openspec3/OS3Parameter.ts index da5eae9123d..28cc19e382d 100644 --- a/packages/specs/openspec/src/openspec3/OS3Parameter.ts +++ b/packages/specs/openspec/src/openspec3/OS3Parameter.ts @@ -1,8 +1,8 @@ -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OpenSpecRef} from "../common/OpenSpecRef"; -import {OS3Example} from "./OS3Example"; -import {OS3MediaType} from "./OS3MediaType"; -import {OS3Schema} from "./OS3Schema"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OpenSpecRef} from "../common/OpenSpecRef.js"; +import {OS3Example} from "./OS3Example.js"; +import {OS3MediaType} from "./OS3MediaType.js"; +import {OS3Schema} from "./OS3Schema.js"; export type OS3StyleParameter = "matrix" | "label" | "form" | "simple" | "spaceDelimited" | "pipeDelimited" | "deepObject"; diff --git a/packages/specs/openspec/src/openspec3/OS3Paths.ts b/packages/specs/openspec/src/openspec3/OS3Paths.ts index d42eadb3ded..036fc6564d8 100644 --- a/packages/specs/openspec/src/openspec3/OS3Paths.ts +++ b/packages/specs/openspec/src/openspec3/OS3Paths.ts @@ -1,9 +1,9 @@ -import {OpenSpecPath} from "../common/OpenSpecPath"; -import {OpenSpecRef} from "../common/OpenSpecRef"; -import {OS3Operation} from "./OS3Operation"; -import {OS3Parameter} from "./OS3Parameter"; -import {OS3Schema} from "./OS3Schema"; -import {OS3Server} from "./OS3Server"; +import {OpenSpecPath} from "../common/OpenSpecPath.js"; +import {OpenSpecRef} from "../common/OpenSpecRef.js"; +import {OS3Operation} from "./OS3Operation.js"; +import {OS3Parameter} from "./OS3Parameter.js"; +import {OS3Schema} from "./OS3Schema.js"; +import {OS3Server} from "./OS3Server.js"; export interface OS3Paths extends OpenSpecPath> { /** diff --git a/packages/specs/openspec/src/openspec3/OS3RequestBody.ts b/packages/specs/openspec/src/openspec3/OS3RequestBody.ts index 1163276efcd..88562423025 100644 --- a/packages/specs/openspec/src/openspec3/OS3RequestBody.ts +++ b/packages/specs/openspec/src/openspec3/OS3RequestBody.ts @@ -1,8 +1,8 @@ -import {OS3Schema} from "./OS3Schema"; -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OS3MediaType} from "./OS3MediaType"; -import {OS3Example} from "./OS3Example"; -import {OpenSpecRef} from "../common/OpenSpecRef"; +import {OS3Schema} from "./OS3Schema.js"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OS3MediaType} from "./OS3MediaType.js"; +import {OS3Example} from "./OS3Example.js"; +import {OpenSpecRef} from "../common/OpenSpecRef.js"; export interface OS3RequestBody { /** diff --git a/packages/specs/openspec/src/openspec3/OS3Response.ts b/packages/specs/openspec/src/openspec3/OS3Response.ts index aa1fcd85676..ea2207405f1 100644 --- a/packages/specs/openspec/src/openspec3/OS3Response.ts +++ b/packages/specs/openspec/src/openspec3/OS3Response.ts @@ -1,9 +1,9 @@ -import {OS3Schema} from "./OS3Schema"; -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OpenSpecRef} from "../common/OpenSpecRef"; -import {OS3Header} from "./OS3Header"; -import {OS3Link} from "./OS3Link"; -import {OS3MediaType} from "./OS3MediaType"; +import {OS3Schema} from "./OS3Schema.js"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OpenSpecRef} from "../common/OpenSpecRef.js"; +import {OS3Header} from "./OS3Header.js"; +import {OS3Link} from "./OS3Link.js"; +import {OS3MediaType} from "./OS3MediaType.js"; export interface OS3Response> { /** diff --git a/packages/specs/openspec/src/openspec3/OS3Schema.ts b/packages/specs/openspec/src/openspec3/OS3Schema.ts index fabfc0de7af..101f7275e6b 100644 --- a/packages/specs/openspec/src/openspec3/OS3Schema.ts +++ b/packages/specs/openspec/src/openspec3/OS3Schema.ts @@ -1,7 +1,7 @@ -import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs"; -import {OpenSpecBaseJsonSchema, OpenSpecJsonSchema} from "../common/OpenSpecJsonSchema"; -import {OpenSpecRef} from "../common/OpenSpecRef"; -import {OpenSpecXML} from "../common/OpenSpecXML"; +import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs.js"; +import {OpenSpecBaseJsonSchema, OpenSpecJsonSchema} from "../common/OpenSpecJsonSchema.js"; +import {OpenSpecRef} from "../common/OpenSpecRef.js"; +import {OpenSpecXML} from "../common/OpenSpecXML.js"; export interface OS3BaseSchema extends OpenSpecBaseJsonSchema { /** diff --git a/packages/specs/openspec/src/openspec3/OS3Security.ts b/packages/specs/openspec/src/openspec3/OS3Security.ts index 53a8dead822..a5259bd26ef 100644 --- a/packages/specs/openspec/src/openspec3/OS3Security.ts +++ b/packages/specs/openspec/src/openspec3/OS3Security.ts @@ -1,4 +1,4 @@ -import {OS3Flows} from "./OS3Flows"; +import {OS3Flows} from "./OS3Flows.js"; export interface OS3SecurityBase { /** diff --git a/packages/specs/openspec/src/openspec3/OS3Server.ts b/packages/specs/openspec/src/openspec3/OS3Server.ts index 90823868b54..39c2962ade7 100644 --- a/packages/specs/openspec/src/openspec3/OS3Server.ts +++ b/packages/specs/openspec/src/openspec3/OS3Server.ts @@ -1,4 +1,4 @@ -import {OpenSpecHash} from "../common/OpenSpecHash"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; export interface OpenSpecServerVariable { /** diff --git a/packages/specs/openspec/src/openspec3/OpenSpec3.ts b/packages/specs/openspec/src/openspec3/OpenSpec3.ts index 0461970d642..c53841dd52f 100644 --- a/packages/specs/openspec/src/openspec3/OpenSpec3.ts +++ b/packages/specs/openspec/src/openspec3/OpenSpec3.ts @@ -1,12 +1,12 @@ -import {OS3Schema} from "./OS3Schema"; -import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs"; -import {OpenSpecHash} from "../common/OpenSpecHash"; -import {OpenSpecInfo} from "../common/OpenSpecInfo"; -import {OpenSpecSecurity} from "../common/OpenSpecSecurity"; -import {OpenSpecTag} from "../common/OpenSpecTag"; -import {OS3Components} from "./OS3Components"; -import {OS3Paths} from "./OS3Paths"; -import {OS3Server} from "./OS3Server"; +import {OS3Schema} from "./OS3Schema.js"; +import {OpenSpecExternalDocs} from "../common/OpenSpecExternalDocs.js"; +import {OpenSpecHash} from "../common/OpenSpecHash.js"; +import {OpenSpecInfo} from "../common/OpenSpecInfo.js"; +import {OpenSpecSecurity} from "../common/OpenSpecSecurity.js"; +import {OpenSpecTag} from "../common/OpenSpecTag.js"; +import {OS3Components} from "./OS3Components.js"; +import {OS3Paths} from "./OS3Paths.js"; +import {OS3Server} from "./OS3Server.js"; export interface OpenSpec3 { /** diff --git a/packages/specs/schema/src/components/async-api/channelsMapper.ts b/packages/specs/schema/src/components/async-api/channelsMapper.ts index bf4c38a25cd..0f8a630c9f1 100644 --- a/packages/specs/schema/src/components/async-api/channelsMapper.ts +++ b/packages/specs/schema/src/components/async-api/channelsMapper.ts @@ -1,13 +1,13 @@ import {camelCase} from "change-case"; -import {OperationVerbs} from "../../constants/OperationVerbs"; -import {JsonMethodStore} from "../../domain/JsonMethodStore"; -import {JsonMethodPath} from "../../domain/JsonOperation"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {buildPath} from "../../utils/buildPath"; -import {getJsonEntityStore} from "../../utils/getJsonEntityStore"; -import {getOperationsStores} from "../../utils/getOperationsStores"; -import {removeHiddenOperation} from "../../utils/removeHiddenOperation"; +import {OperationVerbs} from "../../constants/OperationVerbs.js"; +import {JsonMethodStore} from "../../domain/JsonMethodStore.js"; +import {JsonMethodPath} from "../../domain/JsonOperation.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {buildPath} from "../../utils/buildPath.js"; +import {getJsonEntityStore} from "../../utils/getJsonEntityStore.js"; +import {getOperationsStores} from "../../utils/getOperationsStores.js"; +import {removeHiddenOperation} from "../../utils/removeHiddenOperation.js"; const ALLOWED_VERBS = [OperationVerbs.PUBLISH, OperationVerbs.SUBSCRIBE]; diff --git a/packages/specs/schema/src/components/async-api/generate.ts b/packages/specs/schema/src/components/async-api/generate.ts index 62057687b1a..2e8892020ca 100644 --- a/packages/specs/schema/src/components/async-api/generate.ts +++ b/packages/specs/schema/src/components/async-api/generate.ts @@ -1,7 +1,7 @@ import {getValue, Type, uniqBy} from "@tsed/core"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {SpecSerializerOptions} from "../../utils/getSpec"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {SpecSerializerOptions} from "../../utils/getSpec.js"; function generate(model: Type, options: SpecSerializerOptions) { const specJson: any = { diff --git a/packages/specs/schema/src/components/async-api/messageMapper.ts b/packages/specs/schema/src/components/async-api/messageMapper.ts index 335c3b24d32..eded276fc7d 100644 --- a/packages/specs/schema/src/components/async-api/messageMapper.ts +++ b/packages/specs/schema/src/components/async-api/messageMapper.ts @@ -1,11 +1,11 @@ import {cleanObject, getValue} from "@tsed/core"; -import {OperationVerbs} from "../../constants/OperationVerbs"; -import {JsonMethodStore} from "../../domain/JsonMethodStore"; -import {JsonMethodPath} from "../../domain/JsonOperation"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {makeOf} from "../../utils/somethingOf"; +import {OperationVerbs} from "../../constants/OperationVerbs.js"; +import {JsonMethodStore} from "../../domain/JsonMethodStore.js"; +import {JsonMethodPath} from "../../domain/JsonOperation.js"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {makeOf} from "../../utils/somethingOf.js"; export function messageMapper( jsonOperationStore: JsonMethodStore, diff --git a/packages/specs/schema/src/components/async-api/payloadMapper.ts b/packages/specs/schema/src/components/async-api/payloadMapper.ts index c1ad9887faf..bff6075cab9 100644 --- a/packages/specs/schema/src/components/async-api/payloadMapper.ts +++ b/packages/specs/schema/src/components/async-api/payloadMapper.ts @@ -1,14 +1,14 @@ import {setValue} from "@tsed/core"; import {pascalCase} from "change-case"; -import {JsonMethodStore} from "../../domain/JsonMethodStore"; -import {JsonMethodPath, JsonOperation} from "../../domain/JsonOperation"; -import {JsonParameter} from "../../domain/JsonParameter"; -import {isParameterType, JsonParameterTypes} from "../../domain/JsonParameterTypes"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {popGenerics} from "../../utils/generics"; -import {makeOf} from "../../utils/somethingOf"; +import {JsonMethodStore} from "../../domain/JsonMethodStore.js"; +import {JsonMethodPath, JsonOperation} from "../../domain/JsonOperation.js"; +import {JsonParameter} from "../../domain/JsonParameter.js"; +import {isParameterType, JsonParameterTypes} from "../../domain/JsonParameterTypes.js"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {popGenerics} from "../../utils/generics.js"; +import {makeOf} from "../../utils/somethingOf.js"; function mapOptions(parameter: JsonParameter, options: JsonSchemaOptions = {}) { return { diff --git a/packages/specs/schema/src/components/async-api/responseMapper.ts b/packages/specs/schema/src/components/async-api/responseMapper.ts index 78b97af0536..f903f639d7f 100644 --- a/packages/specs/schema/src/components/async-api/responseMapper.ts +++ b/packages/specs/schema/src/components/async-api/responseMapper.ts @@ -1,11 +1,11 @@ import {setValue} from "@tsed/core"; import {pascalCase} from "change-case"; -import {JsonMethodStore} from "../../domain/JsonMethodStore"; -import {JsonMethodPath} from "../../domain/JsonOperation"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {makeOf} from "../../utils/somethingOf"; +import {JsonMethodStore} from "../../domain/JsonMethodStore.js"; +import {JsonMethodPath} from "../../domain/JsonOperation.js"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {makeOf} from "../../utils/somethingOf.js"; export function responsePayloadMapper(jsonOperationStore: JsonMethodStore, operationPath: JsonMethodPath, options: JsonSchemaOptions) { const responses = jsonOperationStore.operation.getResponses(); diff --git a/packages/specs/schema/src/components/default/anyMapper.spec.ts b/packages/specs/schema/src/components/default/anyMapper.spec.ts index 09857803dd8..b08ad347f1f 100644 --- a/packages/specs/schema/src/components/default/anyMapper.spec.ts +++ b/packages/specs/schema/src/components/default/anyMapper.spec.ts @@ -1,4 +1,4 @@ -import {anyMapper} from "./anyMapper"; +import {anyMapper} from "./anyMapper.js"; describe("anyMapper()", () => { it("should not generate schema is the value is null", () => { diff --git a/packages/specs/schema/src/components/default/anyMapper.ts b/packages/specs/schema/src/components/default/anyMapper.ts index 9b5fab9a82f..d17591f2df9 100644 --- a/packages/specs/schema/src/components/default/anyMapper.ts +++ b/packages/specs/schema/src/components/default/anyMapper.ts @@ -1,9 +1,9 @@ -import {JsonLazyRef} from "../../domain/JsonLazyRef"; -import {JsonSchema} from "../../domain/JsonSchema"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, oneOfMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {mapGenericsOptions} from "../../utils/generics"; -import {toRef} from "../../utils/ref"; +import {JsonLazyRef} from "../../domain/JsonLazyRef.js"; +import {JsonSchema} from "../../domain/JsonSchema.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, oneOfMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {mapGenericsOptions} from "../../utils/generics.js"; +import {toRef} from "../../utils/ref.js"; export function anyMapper(input: any, options: JsonSchemaOptions = {}): any { if (typeof input !== "object" || input === null) { diff --git a/packages/specs/schema/src/components/default/classMapper.ts b/packages/specs/schema/src/components/default/classMapper.ts index e0adbc0bbf7..4b2ff69ed80 100644 --- a/packages/specs/schema/src/components/default/classMapper.ts +++ b/packages/specs/schema/src/components/default/classMapper.ts @@ -1,10 +1,10 @@ import {getValue, setValue} from "@tsed/core"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {JsonSchema} from "../../domain/JsonSchema"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {mapGenericsOptions, popGenerics} from "../../utils/generics"; -import {createRef, createRefName} from "../../utils/ref"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {JsonSchema} from "../../domain/JsonSchema.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {mapGenericsOptions, popGenerics} from "../../utils/generics.js"; +import {createRef, createRefName} from "../../utils/ref.js"; export function classMapper(value: JsonSchema, options: JsonSchemaOptions) { const store = JsonEntityStore.from(value.class); diff --git a/packages/specs/schema/src/components/default/genericsMapper.ts b/packages/specs/schema/src/components/default/genericsMapper.ts index 212582a3586..8a66877b401 100644 --- a/packages/specs/schema/src/components/default/genericsMapper.ts +++ b/packages/specs/schema/src/components/default/genericsMapper.ts @@ -1,8 +1,8 @@ import {isClass, isPrimitiveClass} from "@tsed/core"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {GenericsContext, popGenerics} from "../../utils/generics"; -import {getJsonType} from "../../utils/getJsonType"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {GenericsContext, popGenerics} from "../../utils/generics.js"; +import {getJsonType} from "../../utils/getJsonType.js"; /** * @ignore diff --git a/packages/specs/schema/src/components/default/inheritedClassMapper.ts b/packages/specs/schema/src/components/default/inheritedClassMapper.ts index a0850c720b4..f0796709995 100644 --- a/packages/specs/schema/src/components/default/inheritedClassMapper.ts +++ b/packages/specs/schema/src/components/default/inheritedClassMapper.ts @@ -1,7 +1,7 @@ import {classOf, deepMerge} from "@tsed/core"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {getInheritedStores} from "../../utils/getInheritedStores"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {getInheritedStores} from "../../utils/getInheritedStores.js"; /** * @ignore diff --git a/packages/specs/schema/src/components/default/itemMapper.ts b/packages/specs/schema/src/components/default/itemMapper.ts index a53133d7ef5..a2bdaba7480 100644 --- a/packages/specs/schema/src/components/default/itemMapper.ts +++ b/packages/specs/schema/src/components/default/itemMapper.ts @@ -1,5 +1,5 @@ -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; export function itemMapper(value: any, options: JsonSchemaOptions) { return value && value.isClass ? execMapper("class", [value], options) : execMapper("any", [value], options); diff --git a/packages/specs/schema/src/components/default/lazyRefMapper.ts b/packages/specs/schema/src/components/default/lazyRefMapper.ts index 19158afe496..ceefd1eea22 100644 --- a/packages/specs/schema/src/components/default/lazyRefMapper.ts +++ b/packages/specs/schema/src/components/default/lazyRefMapper.ts @@ -1,8 +1,8 @@ -import {JsonLazyRef} from "../../domain/JsonLazyRef"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {mapGenericsOptions} from "../../utils/generics"; -import {createRef, toRef} from "../../utils/ref"; +import {JsonLazyRef} from "../../domain/JsonLazyRef.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {mapGenericsOptions} from "../../utils/generics.js"; +import {createRef, toRef} from "../../utils/ref.js"; export function lazyRefMapper(jsonLazyRef: JsonLazyRef, options: JsonSchemaOptions) { const name = jsonLazyRef.name; diff --git a/packages/specs/schema/src/components/default/mapMapper.ts b/packages/specs/schema/src/components/default/mapMapper.ts index 9e45c9c0d06..684cc3f1781 100644 --- a/packages/specs/schema/src/components/default/mapMapper.ts +++ b/packages/specs/schema/src/components/default/mapMapper.ts @@ -1,6 +1,6 @@ -import {mapGenericsOptions} from "../../utils/generics"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; +import {mapGenericsOptions} from "../../utils/generics.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; /** * Serialize class which inherit from Map like JsonMap, JsonOperation, JsonParameter. diff --git a/packages/specs/schema/src/components/default/objectMapper.ts b/packages/specs/schema/src/components/default/objectMapper.ts index 6b4b521517e..8e7dccab0a0 100644 --- a/packages/specs/schema/src/components/default/objectMapper.ts +++ b/packages/specs/schema/src/components/default/objectMapper.ts @@ -1,9 +1,9 @@ import {isArray} from "@tsed/core"; -import {JsonSchema} from "../../domain/JsonSchema"; -import {alterIgnore} from "../../hooks/alterIgnore"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {mapNullableType} from "../../utils/mapNullableType"; +import {JsonSchema} from "../../domain/JsonSchema.js"; +import {alterIgnore} from "../../hooks/alterIgnore.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {mapNullableType} from "../../utils/mapNullableType.js"; /** * Serialize Any object to a json schema diff --git a/packages/specs/schema/src/components/default/ofMapper.ts b/packages/specs/schema/src/components/default/ofMapper.ts index fcbda42b2b1..161b422da94 100644 --- a/packages/specs/schema/src/components/default/ofMapper.ts +++ b/packages/specs/schema/src/components/default/ofMapper.ts @@ -1,6 +1,6 @@ -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import type {JsonSchema} from "../../domain/JsonSchema"; -import type {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import type {JsonSchema} from "../../domain/JsonSchema.js"; +import type {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; export function ofMapper(input: (any | JsonSchema)[], options: JsonSchemaOptions, parent: JsonSchema) { return input.map((value: any | JsonSchema) => { diff --git a/packages/specs/schema/src/components/default/propertiesMapper.ts b/packages/specs/schema/src/components/default/propertiesMapper.ts index a8453c6513e..d55391dc374 100644 --- a/packages/specs/schema/src/components/default/propertiesMapper.ts +++ b/packages/specs/schema/src/components/default/propertiesMapper.ts @@ -1,6 +1,6 @@ -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import type {JsonSchema} from "../../domain/JsonSchema"; -import type {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import type {JsonSchema} from "../../domain/JsonSchema.js"; +import type {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; export function propertiesMapper(input: any | JsonSchema, options: JsonSchemaOptions, parent: JsonSchema) { if (input.isClass) { diff --git a/packages/specs/schema/src/components/default/schemaMapper.ts b/packages/specs/schema/src/components/default/schemaMapper.ts index 4ff46bc7b80..6a5e74fe439 100644 --- a/packages/specs/schema/src/components/default/schemaMapper.ts +++ b/packages/specs/schema/src/components/default/schemaMapper.ts @@ -1,13 +1,13 @@ import {getValue, isObject} from "@tsed/core"; -import {mapAliasedProperties} from "../../domain/JsonAliasMap"; -import {JsonSchema} from "../../domain/JsonSchema"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {alterOneOf} from "../../hooks/alterOneOf"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, hasMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {getRequiredProperties} from "../../utils/getRequiredProperties"; -import {inlineEnums} from "../../utils/inlineEnums"; -import {mapNullableType} from "../../utils/mapNullableType"; +import {mapAliasedProperties} from "../../domain/JsonAliasMap.js"; +import {JsonSchema} from "../../domain/JsonSchema.js"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {alterOneOf} from "../../hooks/alterOneOf.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, hasMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {getRequiredProperties} from "../../utils/getRequiredProperties.js"; +import {inlineEnums} from "../../utils/inlineEnums.js"; +import {mapNullableType} from "../../utils/mapNullableType.js"; /** * @ignore diff --git a/packages/specs/schema/src/components/index.ts b/packages/specs/schema/src/components/index.ts index 249dbf28227..203f053568b 100644 --- a/packages/specs/schema/src/components/index.ts +++ b/packages/specs/schema/src/components/index.ts @@ -2,29 +2,29 @@ * @file Automatically generated by barrelsby. */ -export * from "./async-api/channelsMapper"; -export * from "./async-api/generate"; -export * from "./async-api/messageMapper"; -export * from "./async-api/payloadMapper"; -export * from "./async-api/responseMapper"; -export * from "./default/anyMapper"; -export * from "./default/classMapper"; -export * from "./default/genericsMapper"; -export * from "./default/inheritedClassMapper"; -export * from "./default/itemMapper"; -export * from "./default/lazyRefMapper"; -export * from "./default/mapMapper"; -export * from "./default/objectMapper"; -export * from "./default/ofMapper"; -export * from "./default/propertiesMapper"; -export * from "./default/schemaMapper"; -export * from "./open-spec/generate"; -export * from "./open-spec/operationInFilesMapper"; -export * from "./open-spec/operationInParameterMapper"; -export * from "./open-spec/operationInParametersMapper"; -export * from "./open-spec/operationInQueryMapper"; -export * from "./open-spec/operationMapper"; -export * from "./open-spec/operationMediaMapper"; -export * from "./open-spec/operationRequestBodyMapper"; -export * from "./open-spec/operationResponseMapper"; -export * from "./open-spec/pathsMapper"; +export * from "./async-api/channelsMapper.js"; +export * from "./async-api/generate.js"; +export * from "./async-api/messageMapper.js"; +export * from "./async-api/payloadMapper.js"; +export * from "./async-api/responseMapper.js"; +export * from "./default/anyMapper.js"; +export * from "./default/classMapper.js"; +export * from "./default/genericsMapper.js"; +export * from "./default/inheritedClassMapper.js"; +export * from "./default/itemMapper.js"; +export * from "./default/lazyRefMapper.js"; +export * from "./default/mapMapper.js"; +export * from "./default/objectMapper.js"; +export * from "./default/ofMapper.js"; +export * from "./default/propertiesMapper.js"; +export * from "./default/schemaMapper.js"; +export * from "./open-spec/generate.js"; +export * from "./open-spec/operationInFilesMapper.js"; +export * from "./open-spec/operationInParameterMapper.js"; +export * from "./open-spec/operationInParametersMapper.js"; +export * from "./open-spec/operationInQueryMapper.js"; +export * from "./open-spec/operationMapper.js"; +export * from "./open-spec/operationMediaMapper.js"; +export * from "./open-spec/operationRequestBodyMapper.js"; +export * from "./open-spec/operationResponseMapper.js"; +export * from "./open-spec/pathsMapper.js"; diff --git a/packages/specs/schema/src/components/open-spec/generate.ts b/packages/specs/schema/src/components/open-spec/generate.ts index 2568952face..3edfba378d3 100644 --- a/packages/specs/schema/src/components/open-spec/generate.ts +++ b/packages/specs/schema/src/components/open-spec/generate.ts @@ -1,7 +1,7 @@ import {getValue, Type, uniqBy} from "@tsed/core"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {SpecSerializerOptions} from "../../utils/getSpec"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {SpecSerializerOptions} from "../../utils/getSpec.js"; function generate(model: Type, options: SpecSerializerOptions) { options = { diff --git a/packages/specs/schema/src/components/open-spec/operationInFilesMapper.ts b/packages/specs/schema/src/components/open-spec/operationInFilesMapper.ts index 5403d052267..ae5aa70197a 100644 --- a/packages/specs/schema/src/components/open-spec/operationInFilesMapper.ts +++ b/packages/specs/schema/src/components/open-spec/operationInFilesMapper.ts @@ -1,6 +1,6 @@ import {cleanObject} from "@tsed/core"; -import {registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import type {JsonParameterOptions} from "./operationInParameterMapper"; +import {registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import type {JsonParameterOptions} from "./operationInParameterMapper.js"; export function operationInFilesMapper(parameter: any, {jsonSchema}: JsonParameterOptions) { const schema = { diff --git a/packages/specs/schema/src/components/open-spec/operationInParameterMapper.ts b/packages/specs/schema/src/components/open-spec/operationInParameterMapper.ts index 6359975dbd3..03935705b0e 100644 --- a/packages/specs/schema/src/components/open-spec/operationInParameterMapper.ts +++ b/packages/specs/schema/src/components/open-spec/operationInParameterMapper.ts @@ -1,11 +1,11 @@ import {OS3Schema} from "@tsed/openspec"; import {camelCase} from "change-case"; import type {JSONSchema6} from "json-schema"; -import {JsonParameter} from "../../domain/JsonParameter"; -import {JsonParameterTypes} from "../../domain/JsonParameterTypes"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, hasMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {popGenerics} from "../../utils/generics"; +import {JsonParameter} from "../../domain/JsonParameter.js"; +import {JsonParameterTypes} from "../../domain/JsonParameterTypes.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, hasMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {popGenerics} from "../../utils/generics.js"; export type JsonParameterOptions = JsonSchemaOptions & { jsonParameter: JsonParameter; diff --git a/packages/specs/schema/src/components/open-spec/operationInParametersMapper.ts b/packages/specs/schema/src/components/open-spec/operationInParametersMapper.ts index eabc5280806..7dd70490a67 100644 --- a/packages/specs/schema/src/components/open-spec/operationInParametersMapper.ts +++ b/packages/specs/schema/src/components/open-spec/operationInParametersMapper.ts @@ -1,6 +1,6 @@ -import {JsonParameter} from "../../domain/JsonParameter"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; +import {JsonParameter} from "../../domain/JsonParameter.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; export function operationInParametersMapper(parameters: JsonParameter[], options: JsonSchemaOptions) { return parameters.flatMap((parameter) => execMapper("operationInParameter", [parameter], options)).filter(Boolean); diff --git a/packages/specs/schema/src/components/open-spec/operationInQueryMapper.ts b/packages/specs/schema/src/components/open-spec/operationInQueryMapper.ts index f06065f9e31..3b8293fcee8 100644 --- a/packages/specs/schema/src/components/open-spec/operationInQueryMapper.ts +++ b/packages/specs/schema/src/components/open-spec/operationInQueryMapper.ts @@ -1,9 +1,9 @@ import {cleanObject} from "@tsed/core"; import {OS3Example} from "@tsed/openspec"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {createRefName} from "../../utils/ref"; -import type {JsonParameterOptions} from "./operationInParameterMapper"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {createRefName} from "../../utils/ref.js"; +import type {JsonParameterOptions} from "./operationInParameterMapper.js"; function buildExamples(property: string, examples?: Record) { if (!examples) { diff --git a/packages/specs/schema/src/components/open-spec/operationMapper.ts b/packages/specs/schema/src/components/open-spec/operationMapper.ts index a8f34f6a960..045111b1249 100644 --- a/packages/specs/schema/src/components/open-spec/operationMapper.ts +++ b/packages/specs/schema/src/components/open-spec/operationMapper.ts @@ -1,9 +1,9 @@ -import {getStatusMessage} from "../../constants/httpStatusMessages"; -import {JsonOperation} from "../../domain/JsonOperation"; -import {JsonParameter} from "../../domain/JsonParameter"; -import {isParameterType, JsonParameterTypes} from "../../domain/JsonParameterTypes"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; +import {getStatusMessage} from "../../constants/httpStatusMessages.js"; +import {JsonOperation} from "../../domain/JsonOperation.js"; +import {JsonParameter} from "../../domain/JsonParameter.js"; +import {isParameterType, JsonParameterTypes} from "../../domain/JsonParameterTypes.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; function extractParameters(jsonOperation: JsonOperation, options: JsonSchemaOptions) { return jsonOperation diff --git a/packages/specs/schema/src/components/open-spec/operationMediaMapper.ts b/packages/specs/schema/src/components/open-spec/operationMediaMapper.ts index 720a92a9d86..1305a7e5d5e 100644 --- a/packages/specs/schema/src/components/open-spec/operationMediaMapper.ts +++ b/packages/specs/schema/src/components/open-spec/operationMediaMapper.ts @@ -1,6 +1,6 @@ -import {JsonMedia} from "../../domain/JsonMedia"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; +import {JsonMedia} from "../../domain/JsonMedia.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; export function operationMediaMapper(jsonMedia: JsonMedia, options: JsonSchemaOptions) { let groups = [...(jsonMedia.groups || [])]; diff --git a/packages/specs/schema/src/components/open-spec/operationRequestBodyMapper.ts b/packages/specs/schema/src/components/open-spec/operationRequestBodyMapper.ts index 9b51dfb2a19..bd3a79b80cd 100644 --- a/packages/specs/schema/src/components/open-spec/operationRequestBodyMapper.ts +++ b/packages/specs/schema/src/components/open-spec/operationRequestBodyMapper.ts @@ -1,8 +1,8 @@ -import {JsonParameter} from "../../domain/JsonParameter"; -import {JsonRequestBody} from "../../domain/JsonRequestBody"; -import {JsonSchema} from "../../domain/JsonSchema"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; +import {JsonParameter} from "../../domain/JsonParameter.js"; +import {JsonRequestBody} from "../../domain/JsonRequestBody.js"; +import {JsonSchema} from "../../domain/JsonSchema.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; function buildSchemaFromBodyParameters(parameters: JsonParameter[], options: JsonSchemaOptions) { let schema = new JsonSchema(); diff --git a/packages/specs/schema/src/components/open-spec/operationResponseMapper.ts b/packages/specs/schema/src/components/open-spec/operationResponseMapper.ts index 5b867b2dff6..5850efa8450 100644 --- a/packages/specs/schema/src/components/open-spec/operationResponseMapper.ts +++ b/packages/specs/schema/src/components/open-spec/operationResponseMapper.ts @@ -1,6 +1,6 @@ -import {JsonResponse} from "../../domain/JsonResponse"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; +import {JsonResponse} from "../../domain/JsonResponse.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; export function operationResponseMapper(jsonResponse: JsonResponse, options: JsonSchemaOptions = {}) { const response = execMapper("map", [jsonResponse], options); diff --git a/packages/specs/schema/src/components/open-spec/pathsMapper.ts b/packages/specs/schema/src/components/open-spec/pathsMapper.ts index d0ee14f59c2..083988a3eaf 100644 --- a/packages/specs/schema/src/components/open-spec/pathsMapper.ts +++ b/packages/specs/schema/src/components/open-spec/pathsMapper.ts @@ -1,16 +1,16 @@ import {OS3Operation, OS3Paths} from "@tsed/openspec"; -import {OperationVerbs} from "../../constants/OperationVerbs"; -import {JsonMethodStore} from "../../domain/JsonMethodStore"; -import {JsonMethodPath} from "../../domain/JsonOperation"; -import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions"; -import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer"; -import {buildPath} from "../../utils/buildPath"; -import {concatParameters} from "../../utils/concatParameters"; -import {getJsonEntityStore} from "../../utils/getJsonEntityStore"; -import {getJsonPathParameters} from "../../utils/getJsonPathParameters"; -import {getOperationsStores} from "../../utils/getOperationsStores"; -import {getOperationId} from "../../utils/operationIdFormatter"; -import {removeHiddenOperation} from "../../utils/removeHiddenOperation"; +import {OperationVerbs} from "../../constants/OperationVerbs.js"; +import {JsonMethodStore} from "../../domain/JsonMethodStore.js"; +import {JsonMethodPath} from "../../domain/JsonOperation.js"; +import {JsonSchemaOptions} from "../../interfaces/JsonSchemaOptions.js"; +import {execMapper, registerJsonSchemaMapper} from "../../registries/JsonSchemaMapperContainer.js"; +import {buildPath} from "../../utils/buildPath.js"; +import {concatParameters} from "../../utils/concatParameters.js"; +import {getJsonEntityStore} from "../../utils/getJsonEntityStore.js"; +import {getJsonPathParameters} from "../../utils/getJsonPathParameters.js"; +import {getOperationsStores} from "../../utils/getOperationsStores.js"; +import {getOperationId} from "../../utils/operationIdFormatter.js"; +import {removeHiddenOperation} from "../../utils/removeHiddenOperation.js"; const ALLOWED_VERBS = [ OperationVerbs.ALL, diff --git a/packages/specs/schema/src/decorators/class/children.ts b/packages/specs/schema/src/decorators/class/children.ts index 8ac5cec2ef6..e222e8d1540 100644 --- a/packages/specs/schema/src/decorators/class/children.ts +++ b/packages/specs/schema/src/decorators/class/children.ts @@ -1,5 +1,5 @@ import {Store, Type} from "@tsed/core"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * Add Children class to compose routes diff --git a/packages/specs/schema/src/decorators/class/discriminatorValue.ts b/packages/specs/schema/src/decorators/class/discriminatorValue.ts index e8ad3d13f22..284fd4d5e76 100644 --- a/packages/specs/schema/src/decorators/class/discriminatorValue.ts +++ b/packages/specs/schema/src/decorators/class/discriminatorValue.ts @@ -1,5 +1,5 @@ import {snakeCase} from "change-case"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * Declare a Discriminator value on a child class. diff --git a/packages/specs/schema/src/decorators/collections/collectionContains.ts b/packages/specs/schema/src/decorators/collections/collectionContains.ts index 90dddc2b9fa..2b9ff2158c0 100644 --- a/packages/specs/schema/src/decorators/collections/collectionContains.ts +++ b/packages/specs/schema/src/decorators/collections/collectionContains.ts @@ -1,4 +1,4 @@ -import {CollectionOf} from "./collectionOf"; +import {CollectionOf} from "./collectionOf.js"; /** * Set the type of the item collection. The possible value is String, Boolean, Number, Date, Object, Class, etc... diff --git a/packages/specs/schema/src/decorators/collections/collectionOf.spec.ts b/packages/specs/schema/src/decorators/collections/collectionOf.spec.ts index 53396bf0ed7..955e01b224c 100644 --- a/packages/specs/schema/src/decorators/collections/collectionOf.spec.ts +++ b/packages/specs/schema/src/decorators/collections/collectionOf.spec.ts @@ -1,13 +1,13 @@ import {catchError} from "@tsed/core"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {Property} from "../common/property"; -import {In} from "../operations/in"; -import {OperationPath} from "../operations/operationPath"; -import {CollectionContains} from "./collectionContains"; -import {ArrayOf, CollectionOf, MapOf} from "./collectionOf"; -import {MaxItems} from "./maxItems"; -import {MinItems} from "./minItems"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {Property} from "../common/property.js"; +import {In} from "../operations/in.js"; +import {OperationPath} from "../operations/operationPath.js"; +import {CollectionContains} from "./collectionContains.js"; +import {ArrayOf, CollectionOf, MapOf} from "./collectionOf.js"; +import {MaxItems} from "./maxItems.js"; +import {MinItems} from "./minItems.js"; describe("@CollectionOf", () => { it("should declare a collection (Array of)", () => { diff --git a/packages/specs/schema/src/decorators/collections/collectionOf.ts b/packages/specs/schema/src/decorators/collections/collectionOf.ts index 90ae8e4a2e2..6e80b7ebf1e 100644 --- a/packages/specs/schema/src/decorators/collections/collectionOf.ts +++ b/packages/specs/schema/src/decorators/collections/collectionOf.ts @@ -1,4 +1,4 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; export interface ArrayOfChainedDecorators { (...args: any): any; diff --git a/packages/specs/schema/src/decorators/collections/maxItems.spec.ts b/packages/specs/schema/src/decorators/collections/maxItems.spec.ts index 57e8f53770b..e517b875737 100644 --- a/packages/specs/schema/src/decorators/collections/maxItems.spec.ts +++ b/packages/specs/schema/src/decorators/collections/maxItems.spec.ts @@ -1,6 +1,6 @@ -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {CollectionOf} from "./collectionOf"; -import {MaxItems} from "./maxItems"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {CollectionOf} from "./collectionOf.js"; +import {MaxItems} from "./maxItems.js"; describe("@MaxItems", () => { it("should declare a prop", () => { diff --git a/packages/specs/schema/src/decorators/collections/maxItems.ts b/packages/specs/schema/src/decorators/collections/maxItems.ts index ad677b46028..320932ed545 100644 --- a/packages/specs/schema/src/decorators/collections/maxItems.ts +++ b/packages/specs/schema/src/decorators/collections/maxItems.ts @@ -1,5 +1,5 @@ -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * The value `maxItems` MUST be a non-negative integer. diff --git a/packages/specs/schema/src/decorators/collections/maxProperties.spec.ts b/packages/specs/schema/src/decorators/collections/maxProperties.spec.ts index e5b1ecad6fa..8d6b3e33a40 100644 --- a/packages/specs/schema/src/decorators/collections/maxProperties.spec.ts +++ b/packages/specs/schema/src/decorators/collections/maxProperties.spec.ts @@ -1,9 +1,9 @@ -import {SpecTypes} from "../../domain/SpecTypes"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {getSpec} from "../../utils/getSpec"; -import {In} from "../operations/in"; -import {OperationPath} from "../operations/operationPath"; -import {MaxProperties} from "./maxProperties"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {getSpec} from "../../utils/getSpec.js"; +import {In} from "../operations/in.js"; +import {OperationPath} from "../operations/operationPath.js"; +import {MaxProperties} from "./maxProperties.js"; describe("@MaxProperties", () => { it("should declare max value (any)", () => { diff --git a/packages/specs/schema/src/decorators/collections/maxProperties.ts b/packages/specs/schema/src/decorators/collections/maxProperties.ts index 14523a5dcf9..e54b02a3571 100644 --- a/packages/specs/schema/src/decorators/collections/maxProperties.ts +++ b/packages/specs/schema/src/decorators/collections/maxProperties.ts @@ -1,5 +1,5 @@ -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * An object instance is valid against `maxProperties` if its number of properties is less than, or equal to, the value of this keyword. diff --git a/packages/specs/schema/src/decorators/collections/minItems.spec.ts b/packages/specs/schema/src/decorators/collections/minItems.spec.ts index 2c0b2659fa9..f880d45ddf1 100644 --- a/packages/specs/schema/src/decorators/collections/minItems.spec.ts +++ b/packages/specs/schema/src/decorators/collections/minItems.spec.ts @@ -1,6 +1,6 @@ -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {CollectionOf} from "./collectionOf"; -import {MinItems} from "./minItems"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {CollectionOf} from "./collectionOf.js"; +import {MinItems} from "./minItems.js"; describe("@MinItems", () => { it("should declare a prop", () => { diff --git a/packages/specs/schema/src/decorators/collections/minItems.ts b/packages/specs/schema/src/decorators/collections/minItems.ts index 34a8c411ea8..5d02e03d149 100644 --- a/packages/specs/schema/src/decorators/collections/minItems.ts +++ b/packages/specs/schema/src/decorators/collections/minItems.ts @@ -1,5 +1,5 @@ -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * An array instance is valid against `minItems` if its size is greater than, or equal to, the value of this keyword. diff --git a/packages/specs/schema/src/decorators/collections/minProperties.spec.ts b/packages/specs/schema/src/decorators/collections/minProperties.spec.ts index c1c4db79c04..11264fc4d01 100644 --- a/packages/specs/schema/src/decorators/collections/minProperties.spec.ts +++ b/packages/specs/schema/src/decorators/collections/minProperties.spec.ts @@ -1,9 +1,9 @@ -import {SpecTypes} from "../../domain/SpecTypes"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {getSpec} from "../../utils/getSpec"; -import {In} from "../operations/in"; -import {OperationPath} from "../operations/operationPath"; -import {MinProperties} from "./minProperties"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {getSpec} from "../../utils/getSpec.js"; +import {In} from "../operations/in.js"; +import {OperationPath} from "../operations/operationPath.js"; +import {MinProperties} from "./minProperties.js"; describe("@MinProperties", () => { it("should declare min value (any)", () => { diff --git a/packages/specs/schema/src/decorators/collections/minProperties.ts b/packages/specs/schema/src/decorators/collections/minProperties.ts index f95d6647e1c..c2ddda5eede 100644 --- a/packages/specs/schema/src/decorators/collections/minProperties.ts +++ b/packages/specs/schema/src/decorators/collections/minProperties.ts @@ -1,5 +1,5 @@ -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * An object instance is valid against `minProperties` if its number of properties is less than, or equal to, the value of this keyword. diff --git a/packages/specs/schema/src/decorators/collections/uniqueItems.spec.ts b/packages/specs/schema/src/decorators/collections/uniqueItems.spec.ts index 8365834cfee..ed4017ca78f 100644 --- a/packages/specs/schema/src/decorators/collections/uniqueItems.spec.ts +++ b/packages/specs/schema/src/decorators/collections/uniqueItems.spec.ts @@ -1,6 +1,6 @@ -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {CollectionOf} from "./collectionOf"; -import {UniqueItems} from "./uniqueItems"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {CollectionOf} from "./collectionOf.js"; +import {UniqueItems} from "./uniqueItems.js"; describe("@UniqueItems", () => { it("should declare a prop", () => { diff --git a/packages/specs/schema/src/decorators/collections/uniqueItems.ts b/packages/specs/schema/src/decorators/collections/uniqueItems.ts index 1a1f9dad027..0542674ab45 100644 --- a/packages/specs/schema/src/decorators/collections/uniqueItems.ts +++ b/packages/specs/schema/src/decorators/collections/uniqueItems.ts @@ -1,6 +1,6 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * If this keyword has boolean value false, the instance validates successfully. If it has boolean value true, the instance validates successfully if all of its elements are unique. diff --git a/packages/specs/schema/src/decorators/common/additionalProperties.spec.ts b/packages/specs/schema/src/decorators/common/additionalProperties.spec.ts index be34db422d4..f81171043e7 100644 --- a/packages/specs/schema/src/decorators/common/additionalProperties.spec.ts +++ b/packages/specs/schema/src/decorators/common/additionalProperties.spec.ts @@ -1,4 +1,4 @@ -import {AdditionalProperties, CollectionOf, getJsonSchema, Property, string} from "../../index"; +import {AdditionalProperties, CollectionOf, getJsonSchema, Property, string} from "../../index.js"; describe("AdditionalProperties", () => { it("should declare additional properties", () => { diff --git a/packages/specs/schema/src/decorators/common/additionalProperties.ts b/packages/specs/schema/src/decorators/common/additionalProperties.ts index ecda6803f35..8b579e3560b 100644 --- a/packages/specs/schema/src/decorators/common/additionalProperties.ts +++ b/packages/specs/schema/src/decorators/common/additionalProperties.ts @@ -1,5 +1,5 @@ -import {AnyJsonSchema} from "../../domain/JsonSchema"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {AnyJsonSchema} from "../../domain/JsonSchema.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Accept unknown properties on the deserialized model. diff --git a/packages/specs/schema/src/decorators/common/allOf.spec.ts b/packages/specs/schema/src/decorators/common/allOf.spec.ts index 4639b9bfbf9..7fe65fa41a5 100644 --- a/packages/specs/schema/src/decorators/common/allOf.spec.ts +++ b/packages/specs/schema/src/decorators/common/allOf.spec.ts @@ -1,13 +1,13 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {number, string} from "../../utils/from"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {getSpec} from "../../utils/getSpec"; -import {In} from "../operations/in"; -import {OperationPath} from "../operations/operationPath"; -import {Path} from "../operations/path"; -import {AllOf} from "./allOf"; -import {Property} from "./property"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {number, string} from "../../utils/from.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {getSpec} from "../../utils/getSpec.js"; +import {In} from "../operations/in.js"; +import {OperationPath} from "../operations/operationPath.js"; +import {Path} from "../operations/path.js"; +import {AllOf} from "./allOf.js"; +import {Property} from "./property.js"; describe("@AllOf", () => { it("should declare return schema", () => { diff --git a/packages/specs/schema/src/decorators/common/allOf.ts b/packages/specs/schema/src/decorators/common/allOf.ts index 3cb448dbc1b..1051e12ba59 100644 --- a/packages/specs/schema/src/decorators/common/allOf.ts +++ b/packages/specs/schema/src/decorators/common/allOf.ts @@ -1,5 +1,5 @@ -import {AnyJsonSchema} from "../../domain/JsonSchema"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {AnyJsonSchema} from "../../domain/JsonSchema.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.26 diff --git a/packages/specs/schema/src/decorators/common/allow.spec.ts b/packages/specs/schema/src/decorators/common/allow.spec.ts index ade33159a03..fb0be426a84 100644 --- a/packages/specs/schema/src/decorators/common/allow.spec.ts +++ b/packages/specs/schema/src/decorators/common/allow.spec.ts @@ -1,8 +1,8 @@ -import {getJsonSchema} from "../../index"; +import {getJsonSchema} from "../../index.js"; import Ajv from "ajv"; -import {Allow} from "./allow"; -import {Property} from "./property"; -import {Required} from "./required"; +import {Allow} from "./allow.js"; +import {Property} from "./property.js"; +import {Required} from "./required.js"; describe("@Allow", () => { it("should declare required and allow field (without Allow)", () => { diff --git a/packages/specs/schema/src/decorators/common/allow.ts b/packages/specs/schema/src/decorators/common/allow.ts index 1054fcf6a45..600444eeddb 100644 --- a/packages/specs/schema/src/decorators/common/allow.ts +++ b/packages/specs/schema/src/decorators/common/allow.ts @@ -1,7 +1,7 @@ import {DecoratorTypes, isClass, useDecorators} from "@tsed/core"; -import {JsonEntityFn} from "./jsonEntityFn"; -import {Property} from "./property"; -import type {JsonParameterStore} from "../../domain/JsonParameterStore"; +import {JsonEntityFn} from "./jsonEntityFn.js"; +import {Property} from "./property.js"; +import type {JsonParameterStore} from "../../domain/JsonParameterStore.js"; /** * Add allowed values when the property or parameters is required. diff --git a/packages/specs/schema/src/decorators/common/any.spec.ts b/packages/specs/schema/src/decorators/common/any.spec.ts index d5d0765a274..d2efb87f73d 100644 --- a/packages/specs/schema/src/decorators/common/any.spec.ts +++ b/packages/specs/schema/src/decorators/common/any.spec.ts @@ -1,5 +1,5 @@ -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {Any} from "./any"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {Any} from "./any.js"; describe("@Any", () => { it("should declare any prop", () => { diff --git a/packages/specs/schema/src/decorators/common/any.ts b/packages/specs/schema/src/decorators/common/any.ts index 22b99fe1d73..6360fd2aeaf 100644 --- a/packages/specs/schema/src/decorators/common/any.ts +++ b/packages/specs/schema/src/decorators/common/any.ts @@ -1,6 +1,6 @@ import {Type} from "@tsed/core"; import type {JSONSchema6TypeName} from "json-schema"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Set the type of the array items. diff --git a/packages/specs/schema/src/decorators/common/anyOf.spec.ts b/packages/specs/schema/src/decorators/common/anyOf.spec.ts index 8f7f7c53733..32efc6c9ea5 100644 --- a/packages/specs/schema/src/decorators/common/anyOf.spec.ts +++ b/packages/specs/schema/src/decorators/common/anyOf.spec.ts @@ -1,7 +1,7 @@ -import {AllOf, getJsonSchema, getSpec, In, OneOf, OperationPath, Path, Property, SpecTypes} from "../../index"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {number, string} from "../../utils/from"; -import {AnyOf} from "./anyOf"; +import {AllOf, getJsonSchema, getSpec, In, OneOf, OperationPath, Path, Property, SpecTypes} from "../../index.js"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {number, string} from "../../utils/from.js"; +import {AnyOf} from "./anyOf.js"; describe("@AnyOf", () => { it("should declare return schema", () => { diff --git a/packages/specs/schema/src/decorators/common/anyOf.ts b/packages/specs/schema/src/decorators/common/anyOf.ts index 414693181db..dc459dbd927 100644 --- a/packages/specs/schema/src/decorators/common/anyOf.ts +++ b/packages/specs/schema/src/decorators/common/anyOf.ts @@ -1,5 +1,5 @@ -import {AnyJsonSchema} from "../../domain/JsonSchema"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {AnyJsonSchema} from "../../domain/JsonSchema.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.27 diff --git a/packages/specs/schema/src/decorators/common/const.spec.ts b/packages/specs/schema/src/decorators/common/const.spec.ts index 88d5f98e61f..2611b056445 100644 --- a/packages/specs/schema/src/decorators/common/const.spec.ts +++ b/packages/specs/schema/src/decorators/common/const.spec.ts @@ -1,10 +1,10 @@ -import {SpecTypes} from "../../domain/SpecTypes"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {getSpec} from "../../utils/getSpec"; -import {In} from "../operations/in"; -import {OperationPath} from "../operations/operationPath"; -import {Path} from "../operations/path"; -import {Const} from "./const"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {getSpec} from "../../utils/getSpec.js"; +import {In} from "../operations/in.js"; +import {OperationPath} from "../operations/operationPath.js"; +import {Path} from "../operations/path.js"; +import {Const} from "./const.js"; describe("@Const", () => { it("should declare prop", () => { diff --git a/packages/specs/schema/src/decorators/common/const.ts b/packages/specs/schema/src/decorators/common/const.ts index 405dcdd8577..5a6d8348b3a 100644 --- a/packages/specs/schema/src/decorators/common/const.ts +++ b/packages/specs/schema/src/decorators/common/const.ts @@ -1,5 +1,5 @@ import type {JSONSchema6Type} from "json-schema"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * The const keyword is used to restrict a value to a fixed value. diff --git a/packages/specs/schema/src/decorators/common/customKey.spec.ts b/packages/specs/schema/src/decorators/common/customKey.spec.ts index b72f74776d1..043d24b6ad0 100644 --- a/packages/specs/schema/src/decorators/common/customKey.spec.ts +++ b/packages/specs/schema/src/decorators/common/customKey.spec.ts @@ -1,5 +1,5 @@ -import {CustomKeys, getJsonSchema, getSpec, OperationPath, Path, Returns, SpecTypes} from "../../index"; -import {CustomKey} from "./customKey"; +import {CustomKeys, getJsonSchema, getSpec, OperationPath, Path, Returns, SpecTypes} from "../../index.js"; +import {CustomKey} from "./customKey.js"; describe("@CustomKey", () => { it("should declare customKey field", () => { diff --git a/packages/specs/schema/src/decorators/common/customKey.ts b/packages/specs/schema/src/decorators/common/customKey.ts index 193e352ad04..986ac09d287 100644 --- a/packages/specs/schema/src/decorators/common/customKey.ts +++ b/packages/specs/schema/src/decorators/common/customKey.ts @@ -1,5 +1,5 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Set a custom key on JsonSchema that is not a part of the official spec. diff --git a/packages/specs/schema/src/decorators/common/default.spec.ts b/packages/specs/schema/src/decorators/common/default.spec.ts index 1076535bbd4..eec3501bf7f 100644 --- a/packages/specs/schema/src/decorators/common/default.spec.ts +++ b/packages/specs/schema/src/decorators/common/default.spec.ts @@ -1,5 +1,5 @@ -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {Default} from "./default"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {Default} from "./default.js"; describe("@Default", () => { it("should declare prop", () => { diff --git a/packages/specs/schema/src/decorators/common/default.ts b/packages/specs/schema/src/decorators/common/default.ts index 3b3e9f763a0..700704f00d3 100644 --- a/packages/specs/schema/src/decorators/common/default.ts +++ b/packages/specs/schema/src/decorators/common/default.ts @@ -1,4 +1,4 @@ -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * There are no restrictions placed on the value of this keyword. diff --git a/packages/specs/schema/src/decorators/common/defaultMsg.spec.ts b/packages/specs/schema/src/decorators/common/defaultMsg.spec.ts index e05503426d0..8bb4e480708 100644 --- a/packages/specs/schema/src/decorators/common/defaultMsg.spec.ts +++ b/packages/specs/schema/src/decorators/common/defaultMsg.spec.ts @@ -1,5 +1,5 @@ -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {DefaultMsg} from "./defaultMsg"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {DefaultMsg} from "./defaultMsg.js"; describe("@DefaultMsg", () => { it("should declare default message", () => { diff --git a/packages/specs/schema/src/decorators/common/defaultMsg.ts b/packages/specs/schema/src/decorators/common/defaultMsg.ts index c1dc75ecc12..1bf3549fb3d 100644 --- a/packages/specs/schema/src/decorators/common/defaultMsg.ts +++ b/packages/specs/schema/src/decorators/common/defaultMsg.ts @@ -1,5 +1,5 @@ import {useDecorators} from "@tsed/core"; -import {ErrorMsg} from "./errorMsg"; +import {ErrorMsg} from "./errorMsg.js"; /** * Set default error message. diff --git a/packages/specs/schema/src/decorators/common/description.spec.ts b/packages/specs/schema/src/decorators/common/description.spec.ts index 6f257e90530..bbddc30fa6c 100644 --- a/packages/specs/schema/src/decorators/common/description.spec.ts +++ b/packages/specs/schema/src/decorators/common/description.spec.ts @@ -1,7 +1,7 @@ -import {In, OperationPath, Property, SpecTypes} from "../../index"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {getSpec} from "../../utils/getSpec"; -import {Description} from "./description"; +import {In, OperationPath, Property, SpecTypes} from "../../index.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {getSpec} from "../../utils/getSpec.js"; +import {Description} from "./description.js"; describe("@Description", () => { it("should declare description on class", () => { diff --git a/packages/specs/schema/src/decorators/common/description.ts b/packages/specs/schema/src/decorators/common/description.ts index 095f15f2105..2120cedbce7 100644 --- a/packages/specs/schema/src/decorators/common/description.ts +++ b/packages/specs/schema/src/decorators/common/description.ts @@ -1,8 +1,8 @@ import {DecoratorParameters, decoratorTypeOf, DecoratorTypes} from "@tsed/core"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {JsonEntityFn} from "./jsonEntityFn"; -import type {JsonMethodStore} from "../../domain/JsonMethodStore"; -import type {JsonParameterStore} from "../../domain/JsonParameterStore"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; +import type {JsonMethodStore} from "../../domain/JsonMethodStore.js"; +import type {JsonParameterStore} from "../../domain/JsonParameterStore.js"; /** * Add a description to the class, method or property diff --git a/packages/specs/schema/src/decorators/common/discriminatorKey.ts b/packages/specs/schema/src/decorators/common/discriminatorKey.ts index d1afdcd4252..7ad00bfde33 100644 --- a/packages/specs/schema/src/decorators/common/discriminatorKey.ts +++ b/packages/specs/schema/src/decorators/common/discriminatorKey.ts @@ -1,7 +1,7 @@ import {useDecorators} from "@tsed/core"; -import {JsonPropertyStore} from "../../domain/JsonPropertyStore"; -import {JsonEntityFn} from "./jsonEntityFn"; -import {Property} from "./property"; +import {JsonPropertyStore} from "../../domain/JsonPropertyStore.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; +import {Property} from "./property.js"; export function DiscriminatorKey(): PropertyDecorator { return useDecorators( diff --git a/packages/specs/schema/src/decorators/common/enum.spec.ts b/packages/specs/schema/src/decorators/common/enum.spec.ts index 6c03cb10e4c..85b15fce3fd 100644 --- a/packages/specs/schema/src/decorators/common/enum.spec.ts +++ b/packages/specs/schema/src/decorators/common/enum.spec.ts @@ -1,7 +1,7 @@ import Ajv from "ajv"; -import {enums} from "../../utils/from"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {Enum} from "./enum"; +import {enums} from "../../utils/from.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {Enum} from "./enum.js"; describe("@Enum", () => { describe("when enum is a list of values", () => { diff --git a/packages/specs/schema/src/decorators/common/enum.ts b/packages/specs/schema/src/decorators/common/enum.ts index c37cd71590c..d13a2b9537b 100644 --- a/packages/specs/schema/src/decorators/common/enum.ts +++ b/packages/specs/schema/src/decorators/common/enum.ts @@ -1,6 +1,6 @@ import type {JSONSchema6Type} from "json-schema"; -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; function EnumFn(...enumValues: (JSONSchema6Type | any)[]): Function; function EnumFn(enumValue: JSONSchema6Type | any, ...enumValues: JSONSchema6Type[]) { diff --git a/packages/specs/schema/src/decorators/common/errorMsg.spec.ts b/packages/specs/schema/src/decorators/common/errorMsg.spec.ts index abb8cc9ada7..718f8e47d7f 100644 --- a/packages/specs/schema/src/decorators/common/errorMsg.spec.ts +++ b/packages/specs/schema/src/decorators/common/errorMsg.spec.ts @@ -1,5 +1,5 @@ -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {ErrorMsg} from "./errorMsg"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {ErrorMsg} from "./errorMsg.js"; describe("@ErrorMsg", () => { it("should declare error message", () => { diff --git a/packages/specs/schema/src/decorators/common/errorMsg.ts b/packages/specs/schema/src/decorators/common/errorMsg.ts index 12ebd2b18b6..964787e033e 100644 --- a/packages/specs/schema/src/decorators/common/errorMsg.ts +++ b/packages/specs/schema/src/decorators/common/errorMsg.ts @@ -1,4 +1,4 @@ -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Add an error message to the property. diff --git a/packages/specs/schema/src/decorators/common/example.spec.ts b/packages/specs/schema/src/decorators/common/example.spec.ts index d5cd2cf81e1..1a92f0f377d 100644 --- a/packages/specs/schema/src/decorators/common/example.spec.ts +++ b/packages/specs/schema/src/decorators/common/example.spec.ts @@ -1,7 +1,7 @@ import {descriptorOf, useDecorators} from "@tsed/core"; -import {Description, getSpec, In, Name, OperationPath, Path, Pattern, SpecTypes} from "../../index"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {Example} from "./example"; +import {Description, getSpec, In, Name, OperationPath, Path, Pattern, SpecTypes} from "../../index.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {Example} from "./example.js"; function ObjectID(name?: string) { return useDecorators(name && Name(name), Pattern(/^[0-9a-fA-F]{24}$/), Description("An ObjectID"), Example("5ce7ad3028890bd71749d477")); diff --git a/packages/specs/schema/src/decorators/common/example.ts b/packages/specs/schema/src/decorators/common/example.ts index d41b7f0f6c3..f4d27c377b8 100644 --- a/packages/specs/schema/src/decorators/common/example.ts +++ b/packages/specs/schema/src/decorators/common/example.ts @@ -1,5 +1,5 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Add an example metadata on the decorated element. diff --git a/packages/specs/schema/src/decorators/common/examples.spec.ts b/packages/specs/schema/src/decorators/common/examples.spec.ts index 795bf77d699..4b2bf0c3bbb 100644 --- a/packages/specs/schema/src/decorators/common/examples.spec.ts +++ b/packages/specs/schema/src/decorators/common/examples.spec.ts @@ -1,5 +1,5 @@ -import {getSpec, In, OperationPath, Path, Property, SpecTypes} from "../../index"; -import {Examples} from "./examples"; +import {getSpec, In, OperationPath, Path, Property, SpecTypes} from "../../index.js"; +import {Examples} from "./examples.js"; class MyModel { @Property() diff --git a/packages/specs/schema/src/decorators/common/examples.ts b/packages/specs/schema/src/decorators/common/examples.ts index 7efcb6b67ef..a7d3e181625 100644 --- a/packages/specs/schema/src/decorators/common/examples.ts +++ b/packages/specs/schema/src/decorators/common/examples.ts @@ -1,6 +1,6 @@ import {OpenSpecHash, OpenSpecRef, OS3Example} from "@tsed/openspec"; -import {JsonParameterStore} from "../../domain/JsonParameterStore"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonParameterStore} from "../../domain/JsonParameterStore.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Add a examples metadata on the decorated element. diff --git a/packages/specs/schema/src/decorators/common/exclusiveMaximum.spec.ts b/packages/specs/schema/src/decorators/common/exclusiveMaximum.spec.ts index 75774e7caef..382e50ca168 100644 --- a/packages/specs/schema/src/decorators/common/exclusiveMaximum.spec.ts +++ b/packages/specs/schema/src/decorators/common/exclusiveMaximum.spec.ts @@ -1,5 +1,5 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {ExclusiveMaximum} from "./exclusiveMaximum"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {ExclusiveMaximum} from "./exclusiveMaximum.js"; describe("@ExclusiveMaximum", () => { it("should declare exclusiveMaximum value", () => { diff --git a/packages/specs/schema/src/decorators/common/exclusiveMaximum.ts b/packages/specs/schema/src/decorators/common/exclusiveMaximum.ts index 5cbb893836d..7fff1b93f16 100644 --- a/packages/specs/schema/src/decorators/common/exclusiveMaximum.ts +++ b/packages/specs/schema/src/decorators/common/exclusiveMaximum.ts @@ -1,5 +1,5 @@ -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {Maximum} from "./maximum"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {Maximum} from "./maximum.js"; /** * The value of `exclusiveMaximum` MUST be number, representing an exclusive upper limit for a numeric instance. diff --git a/packages/specs/schema/src/decorators/common/exclusiveMinimum.spec.ts b/packages/specs/schema/src/decorators/common/exclusiveMinimum.spec.ts index 37f6bb7c495..af668d922e6 100644 --- a/packages/specs/schema/src/decorators/common/exclusiveMinimum.spec.ts +++ b/packages/specs/schema/src/decorators/common/exclusiveMinimum.spec.ts @@ -1,5 +1,5 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {ExclusiveMinimum} from "./exclusiveMinimum"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {ExclusiveMinimum} from "./exclusiveMinimum.js"; import "../../index"; describe("@ExclusiveMinimum", () => { diff --git a/packages/specs/schema/src/decorators/common/exclusiveMinimum.ts b/packages/specs/schema/src/decorators/common/exclusiveMinimum.ts index 36cadc70889..bde91a4156b 100644 --- a/packages/specs/schema/src/decorators/common/exclusiveMinimum.ts +++ b/packages/specs/schema/src/decorators/common/exclusiveMinimum.ts @@ -1,5 +1,5 @@ -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {Minimum} from "./minimum"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {Minimum} from "./minimum.js"; /** * The value of `exclusiveMinimum` MUST be number, representing an exclusive upper limit for a numeric instance. diff --git a/packages/specs/schema/src/decorators/common/format.spec.ts b/packages/specs/schema/src/decorators/common/format.spec.ts index ec10e67dd2d..3a9803ff39f 100644 --- a/packages/specs/schema/src/decorators/common/format.spec.ts +++ b/packages/specs/schema/src/decorators/common/format.spec.ts @@ -1,5 +1,5 @@ -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {DateFormat, DateTime, Email, Format, TimeFormat, Uri, Url} from "./format"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {DateFormat, DateTime, Email, Format, TimeFormat, Uri, Url} from "./format.js"; describe("@Format", () => { it("should declare prop", () => { diff --git a/packages/specs/schema/src/decorators/common/format.ts b/packages/specs/schema/src/decorators/common/format.ts index 829387ae544..3e269b054e9 100644 --- a/packages/specs/schema/src/decorators/common/format.ts +++ b/packages/specs/schema/src/decorators/common/format.ts @@ -1,7 +1,7 @@ import {ValueOf} from "@tsed/core"; -import {JsonFormatTypes} from "../../domain/JsonFormatTypes"; -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonFormatTypes} from "../../domain/JsonFormatTypes.js"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * The following formats are supported for string validation with `format` keyword: diff --git a/packages/specs/schema/src/decorators/common/forwardGroups.spec.ts b/packages/specs/schema/src/decorators/common/forwardGroups.spec.ts index 831b2f2685a..25df1aa1aca 100644 --- a/packages/specs/schema/src/decorators/common/forwardGroups.spec.ts +++ b/packages/specs/schema/src/decorators/common/forwardGroups.spec.ts @@ -1,6 +1,6 @@ -import {CollectionOf, getJsonSchema, getSpec, In, Name, OperationPath, Path, Property, Required, Returns, SpecTypes} from "../../index"; -import {ForwardGroups} from "./forwardGroups"; -import {Groups} from "./groups"; +import {CollectionOf, getJsonSchema, getSpec, In, Name, OperationPath, Path, Property, Required, Returns, SpecTypes} from "../../index.js"; +import {ForwardGroups} from "./forwardGroups.js"; +import {Groups} from "./groups.js"; class ChildModel { @Groups("!creation") diff --git a/packages/specs/schema/src/decorators/common/forwardGroups.ts b/packages/specs/schema/src/decorators/common/forwardGroups.ts index ccad6ce088c..544b36c028a 100644 --- a/packages/specs/schema/src/decorators/common/forwardGroups.ts +++ b/packages/specs/schema/src/decorators/common/forwardGroups.ts @@ -1,4 +1,4 @@ -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Allow to forward group on specific property. diff --git a/packages/specs/schema/src/decorators/common/groups.spec.ts b/packages/specs/schema/src/decorators/common/groups.spec.ts index a7f6aad6b22..3e2c43536e0 100644 --- a/packages/specs/schema/src/decorators/common/groups.spec.ts +++ b/packages/specs/schema/src/decorators/common/groups.spec.ts @@ -1,17 +1,17 @@ import {QueryParams} from "@tsed/platform-params"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {getSpec} from "../../utils/getSpec"; -import {CollectionOf} from "../collections/collectionOf"; -import {In} from "../operations/in"; -import {OperationPath} from "../operations/operationPath"; -import {Path} from "../operations/path"; -import {Returns} from "../operations/returns"; -import {Groups} from "./groups"; -import {Name} from "./name"; -import {Property} from "./property"; -import {Required} from "./required"; -import {RequiredGroups} from "./requiredGroups"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {getSpec} from "../../utils/getSpec.js"; +import {CollectionOf} from "../collections/collectionOf.js"; +import {In} from "../operations/in.js"; +import {OperationPath} from "../operations/operationPath.js"; +import {Path} from "../operations/path.js"; +import {Returns} from "../operations/returns.js"; +import {Groups} from "./groups.js"; +import {Name} from "./name.js"; +import {Property} from "./property.js"; +import {Required} from "./required.js"; +import {RequiredGroups} from "./requiredGroups.js"; class ChildModel { @Groups("!creation") diff --git a/packages/specs/schema/src/decorators/common/groups.ts b/packages/specs/schema/src/decorators/common/groups.ts index 6e9d88a5d14..b4a82f9f3f8 100644 --- a/packages/specs/schema/src/decorators/common/groups.ts +++ b/packages/specs/schema/src/decorators/common/groups.ts @@ -1,8 +1,8 @@ import {DecoratorTypes, isArray} from "@tsed/core"; -import type {JsonClassStore} from "../../domain/JsonClassStore"; -import type {JsonParameterStore} from "../../domain/JsonParameterStore"; -import {matchGroups} from "../../utils/matchGroups"; -import {JsonEntityFn} from "./jsonEntityFn"; +import type {JsonClassStore} from "../../domain/JsonClassStore.js"; +import type {JsonParameterStore} from "../../domain/JsonParameterStore.js"; +import {matchGroups} from "../../utils/matchGroups.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * @ignore diff --git a/packages/specs/schema/src/decorators/common/hidden.spec.ts b/packages/specs/schema/src/decorators/common/hidden.spec.ts index 4f1a463d4ee..b145f30703c 100644 --- a/packages/specs/schema/src/decorators/common/hidden.spec.ts +++ b/packages/specs/schema/src/decorators/common/hidden.spec.ts @@ -1,6 +1,6 @@ -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {Hidden} from "./hidden"; -import {Get, getSpec, Path, SpecTypes} from "../../index"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {Hidden} from "./hidden.js"; +import {Get, getSpec, Path, SpecTypes} from "../../index.js"; describe("@Hidden", () => { it("should generate the right json schema", () => { diff --git a/packages/specs/schema/src/decorators/common/ignore.spec.ts b/packages/specs/schema/src/decorators/common/ignore.spec.ts index bdcb37460de..6cd44d7b3d4 100644 --- a/packages/specs/schema/src/decorators/common/ignore.spec.ts +++ b/packages/specs/schema/src/decorators/common/ignore.spec.ts @@ -1,6 +1,6 @@ -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {Ignore} from "./ignore"; -import {Property} from "./property"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {Ignore} from "./ignore.js"; +import {Property} from "./property.js"; describe("@Ignore", () => { it("should declare prop", () => { diff --git a/packages/specs/schema/src/decorators/common/ignore.ts b/packages/specs/schema/src/decorators/common/ignore.ts index 6fe6f96d49c..be996f93245 100644 --- a/packages/specs/schema/src/decorators/common/ignore.ts +++ b/packages/specs/schema/src/decorators/common/ignore.ts @@ -1,5 +1,5 @@ -import {IgnoreCallback} from "../../interfaces/IgnoreCallback"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {IgnoreCallback} from "../../interfaces/IgnoreCallback.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Ignore the property when JsonMapper serialize the class to a Plain Object JavaScript. @@ -27,7 +27,7 @@ import {JsonEntityFn} from "./jsonEntityFn"; * The controller: * ```typescript * import {Post, Controller, BodyParams} from "@tsed/common"; - * import {Person} from "../models/Person"; + * import {Person} from "../models/Person.js"; * * @Controller("/") * export class UsersCtrl { diff --git a/packages/specs/schema/src/decorators/common/integer.spec.ts b/packages/specs/schema/src/decorators/common/integer.spec.ts index 0bfc5a203b0..fe194848ebf 100644 --- a/packages/specs/schema/src/decorators/common/integer.spec.ts +++ b/packages/specs/schema/src/decorators/common/integer.spec.ts @@ -1,12 +1,12 @@ import {BodyParams} from "@tsed/platform-params"; -import {validateSpec} from "../../../test/helpers/validateSpec"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {getSpec} from "../../utils/getSpec"; -import {OperationPath} from "../operations/operationPath"; -import {Path} from "../operations/path"; -import {Returns} from "../operations/returns"; -import {Integer} from "./integer"; +import {validateSpec} from "../../../test/helpers/validateSpec.js"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {getSpec} from "../../utils/getSpec.js"; +import {OperationPath} from "../operations/operationPath.js"; +import {Path} from "../operations/path.js"; +import {Returns} from "../operations/returns.js"; +import {Integer} from "./integer.js"; describe("@Integer", () => { it("should generate the right json schema", () => { diff --git a/packages/specs/schema/src/decorators/common/integer.ts b/packages/specs/schema/src/decorators/common/integer.ts index 4437f02eb60..33536bea1f0 100644 --- a/packages/specs/schema/src/decorators/common/integer.ts +++ b/packages/specs/schema/src/decorators/common/integer.ts @@ -1,4 +1,4 @@ -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Set integer type. diff --git a/packages/specs/schema/src/decorators/common/jsonEntityFn.spec.ts b/packages/specs/schema/src/decorators/common/jsonEntityFn.spec.ts index a58662e9f2c..2791414b989 100644 --- a/packages/specs/schema/src/decorators/common/jsonEntityFn.spec.ts +++ b/packages/specs/schema/src/decorators/common/jsonEntityFn.spec.ts @@ -1,4 +1,4 @@ -import {JsonEntityFn} from "../../index"; +import {JsonEntityFn} from "../../index.js"; import Sinon from "sinon"; describe("JsonSchemaStoreFn", () => { diff --git a/packages/specs/schema/src/decorators/common/jsonEntityFn.ts b/packages/specs/schema/src/decorators/common/jsonEntityFn.ts index 159b6d4a63e..f81c38bacd8 100644 --- a/packages/specs/schema/src/decorators/common/jsonEntityFn.ts +++ b/packages/specs/schema/src/decorators/common/jsonEntityFn.ts @@ -1,6 +1,6 @@ import {DecoratorParameters} from "@tsed/core"; -import type {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {getJsonEntityStore} from "../../utils/getJsonEntityStore"; +import type {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {getJsonEntityStore} from "../../utils/getJsonEntityStore.js"; /** * Decorator util to compose another decorator. See @@Description@@ decorator implementation for more details. diff --git a/packages/specs/schema/src/decorators/common/maxLength.spec.ts b/packages/specs/schema/src/decorators/common/maxLength.spec.ts index 705ff337723..0074dd7a50d 100644 --- a/packages/specs/schema/src/decorators/common/maxLength.spec.ts +++ b/packages/specs/schema/src/decorators/common/maxLength.spec.ts @@ -1,7 +1,7 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {CollectionOf} from "../collections/collectionOf"; -import {MaxLength} from "./maxLength"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {CollectionOf} from "../collections/collectionOf.js"; +import {MaxLength} from "./maxLength.js"; describe("@MaxLength", () => { it("should declare minimum value", () => { diff --git a/packages/specs/schema/src/decorators/common/maxLength.ts b/packages/specs/schema/src/decorators/common/maxLength.ts index 55aae5bf9e0..60d77e95f1a 100644 --- a/packages/specs/schema/src/decorators/common/maxLength.ts +++ b/packages/specs/schema/src/decorators/common/maxLength.ts @@ -1,5 +1,5 @@ -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * A string instance is valid against this keyword if its length is greater than, or equal to, the value of this keyword. diff --git a/packages/specs/schema/src/decorators/common/maximum.spec.ts b/packages/specs/schema/src/decorators/common/maximum.spec.ts index b291d6b255b..451afed734f 100644 --- a/packages/specs/schema/src/decorators/common/maximum.spec.ts +++ b/packages/specs/schema/src/decorators/common/maximum.spec.ts @@ -1,7 +1,7 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {CollectionOf} from "../collections/collectionOf"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {CollectionOf} from "../collections/collectionOf.js"; import "../../index"; -import {Max} from "./maximum"; +import {Max} from "./maximum.js"; describe("@Maximum", () => { it("should declare maximum value", () => { diff --git a/packages/specs/schema/src/decorators/common/maximum.ts b/packages/specs/schema/src/decorators/common/maximum.ts index 5c5dedc269c..8e0dab7a92d 100644 --- a/packages/specs/schema/src/decorators/common/maximum.ts +++ b/packages/specs/schema/src/decorators/common/maximum.ts @@ -1,5 +1,5 @@ -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * The value of `maximum` MUST be a number, representing an inclusive upper limit for a numeric instance. diff --git a/packages/specs/schema/src/decorators/common/minLength.spec.ts b/packages/specs/schema/src/decorators/common/minLength.spec.ts index 8a8ed842373..f7191cbe9e9 100644 --- a/packages/specs/schema/src/decorators/common/minLength.spec.ts +++ b/packages/specs/schema/src/decorators/common/minLength.spec.ts @@ -1,9 +1,9 @@ import "../../index"; -import {validateModel} from "../../../test/helpers/validateModel"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {CollectionOf} from "../collections/collectionOf"; -import {MinLength} from "./minLength"; +import {validateModel} from "../../../test/helpers/validateModel.js"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {CollectionOf} from "../collections/collectionOf.js"; +import {MinLength} from "./minLength.js"; describe("@MinLength", () => { it("should declare minimum value", () => { diff --git a/packages/specs/schema/src/decorators/common/minLength.ts b/packages/specs/schema/src/decorators/common/minLength.ts index a0a35405e6e..c1e406fa294 100644 --- a/packages/specs/schema/src/decorators/common/minLength.ts +++ b/packages/specs/schema/src/decorators/common/minLength.ts @@ -1,5 +1,5 @@ -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * diff --git a/packages/specs/schema/src/decorators/common/minimum.spec.ts b/packages/specs/schema/src/decorators/common/minimum.spec.ts index caf0d78e972..ec2aa9a0940 100644 --- a/packages/specs/schema/src/decorators/common/minimum.spec.ts +++ b/packages/specs/schema/src/decorators/common/minimum.spec.ts @@ -1,6 +1,6 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {CollectionOf} from "../collections/collectionOf"; -import {Min} from "./minimum"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {CollectionOf} from "../collections/collectionOf.js"; +import {Min} from "./minimum.js"; import "../../index"; describe("@Minimum", () => { diff --git a/packages/specs/schema/src/decorators/common/minimum.ts b/packages/specs/schema/src/decorators/common/minimum.ts index 29b52c0f640..c2082a44392 100644 --- a/packages/specs/schema/src/decorators/common/minimum.ts +++ b/packages/specs/schema/src/decorators/common/minimum.ts @@ -1,5 +1,5 @@ -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * The value of `minimum` MUST be a number, representing an inclusive upper limit for a numeric instance. diff --git a/packages/specs/schema/src/decorators/common/multipleOf.spec.ts b/packages/specs/schema/src/decorators/common/multipleOf.spec.ts index 68dfb2c4371..35bd4866b02 100644 --- a/packages/specs/schema/src/decorators/common/multipleOf.spec.ts +++ b/packages/specs/schema/src/decorators/common/multipleOf.spec.ts @@ -1,5 +1,5 @@ -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {MultipleOf} from "./multipleOf"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {MultipleOf} from "./multipleOf.js"; describe("MultipleOf", () => { it("should declare minimum value", () => { diff --git a/packages/specs/schema/src/decorators/common/multipleOf.ts b/packages/specs/schema/src/decorators/common/multipleOf.ts index 0c6c1450583..23cf945b97e 100644 --- a/packages/specs/schema/src/decorators/common/multipleOf.ts +++ b/packages/specs/schema/src/decorators/common/multipleOf.ts @@ -1,5 +1,5 @@ -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * A numeric instance is valid only if division by this keyword's value results in an integer. diff --git a/packages/specs/schema/src/decorators/common/name.spec.ts b/packages/specs/schema/src/decorators/common/name.spec.ts index c258bfed555..ce7db67490d 100644 --- a/packages/specs/schema/src/decorators/common/name.spec.ts +++ b/packages/specs/schema/src/decorators/common/name.spec.ts @@ -1,6 +1,6 @@ -import {Consumes, getSpec, OperationPath, Path} from "../../index"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {Name} from "./name"; +import {Consumes, getSpec, OperationPath, Path} from "../../index.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {Name} from "./name.js"; describe("@Name", () => { it("should declare name as alias (props)", () => { diff --git a/packages/specs/schema/src/decorators/common/name.ts b/packages/specs/schema/src/decorators/common/name.ts index eb58cd775de..0a9d35b9802 100644 --- a/packages/specs/schema/src/decorators/common/name.ts +++ b/packages/specs/schema/src/decorators/common/name.ts @@ -1,6 +1,6 @@ import {DecoratorParameters, decoratorTypeOf, DecoratorTypes} from "@tsed/core"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * Add a name metadata on the decorated element. diff --git a/packages/specs/schema/src/decorators/common/nullable.spec.ts b/packages/specs/schema/src/decorators/common/nullable.spec.ts index 571b56e471a..1e8c4778f72 100644 --- a/packages/specs/schema/src/decorators/common/nullable.spec.ts +++ b/packages/specs/schema/src/decorators/common/nullable.spec.ts @@ -1,14 +1,14 @@ import {BodyParams} from "@tsed/platform-params"; import Ajv from "ajv"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {getSpec} from "../../utils/getSpec"; -import {In} from "../operations/in"; -import {Path} from "../operations/path"; -import {Post} from "../operations/route"; -import {Nullable} from "./nullable"; -import {Property} from "./property"; -import {Required} from "./required"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {getSpec} from "../../utils/getSpec.js"; +import {In} from "../operations/in.js"; +import {Path} from "../operations/path.js"; +import {Post} from "../operations/route.js"; +import {Nullable} from "./nullable.js"; +import {Property} from "./property.js"; +import {Required} from "./required.js"; describe("@Nullable", () => { it("should declare any prop (Required + Nullable)", () => { diff --git a/packages/specs/schema/src/decorators/common/nullable.ts b/packages/specs/schema/src/decorators/common/nullable.ts index a6ff10fd508..8f77fbb9f30 100644 --- a/packages/specs/schema/src/decorators/common/nullable.ts +++ b/packages/specs/schema/src/decorators/common/nullable.ts @@ -1,7 +1,7 @@ import {Type, useDecorators} from "@tsed/core"; import type {JSONSchema6TypeName} from "json-schema"; -import {Any} from "./any"; -import {Property} from "./property"; +import {Any} from "./any.js"; +import {Property} from "./property.js"; /** * Set field as nullable. diff --git a/packages/specs/schema/src/decorators/common/oneOf.spec.ts b/packages/specs/schema/src/decorators/common/oneOf.spec.ts index 7a25e49120f..795874b3d00 100644 --- a/packages/specs/schema/src/decorators/common/oneOf.spec.ts +++ b/packages/specs/schema/src/decorators/common/oneOf.spec.ts @@ -1,5 +1,5 @@ -import {AllOf, getJsonSchema, getSpec, In, OneOf, OperationPath, Path, Property, SpecTypes} from "../../index"; -import {number, string} from "../../utils/from"; +import {AllOf, getJsonSchema, getSpec, In, OneOf, OperationPath, Path, Property, SpecTypes} from "../../index.js"; +import {number, string} from "../../utils/from.js"; describe("@OneOf", () => { it("should declare return schema", () => { diff --git a/packages/specs/schema/src/decorators/common/oneOf.ts b/packages/specs/schema/src/decorators/common/oneOf.ts index 551b5a82893..ad16c37dbb3 100644 --- a/packages/specs/schema/src/decorators/common/oneOf.ts +++ b/packages/specs/schema/src/decorators/common/oneOf.ts @@ -1,5 +1,5 @@ -import {AnyJsonSchema} from "../../domain/JsonSchema"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {AnyJsonSchema} from "../../domain/JsonSchema.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * See https://tools.ietf.org/html/draft-wright-json-schema-validation-01#section-6.28 diff --git a/packages/specs/schema/src/decorators/common/optional.spec.ts b/packages/specs/schema/src/decorators/common/optional.spec.ts index 366710222c4..19207006d96 100644 --- a/packages/specs/schema/src/decorators/common/optional.spec.ts +++ b/packages/specs/schema/src/decorators/common/optional.spec.ts @@ -1,5 +1,5 @@ -import {getSpec, In, Name, OperationPath, Optional, SpecTypes} from "../../index"; -import {Path} from "../operations/path"; +import {getSpec, In, Name, OperationPath, Optional, SpecTypes} from "../../index.js"; +import {Path} from "../operations/path.js"; describe("Optional", () => { it("should set metadata when optional is used on param", () => { diff --git a/packages/specs/schema/src/decorators/common/optional.ts b/packages/specs/schema/src/decorators/common/optional.ts index 6e1e7d615fb..0927c5682ab 100644 --- a/packages/specs/schema/src/decorators/common/optional.ts +++ b/packages/specs/schema/src/decorators/common/optional.ts @@ -1,6 +1,6 @@ import {DecoratorTypes, UnsupportedDecoratorType} from "@tsed/core"; -import {JsonEntityFn} from "./jsonEntityFn"; -import type {JsonParameterStore} from "../../domain/JsonParameterStore"; +import {JsonEntityFn} from "./jsonEntityFn.js"; +import type {JsonParameterStore} from "../../domain/JsonParameterStore.js"; /** * Add optional annotation on Property or Parameter. diff --git a/packages/specs/schema/src/decorators/common/pattern.spec.ts b/packages/specs/schema/src/decorators/common/pattern.spec.ts index 1bf0527bc0d..00bb8f0573a 100644 --- a/packages/specs/schema/src/decorators/common/pattern.spec.ts +++ b/packages/specs/schema/src/decorators/common/pattern.spec.ts @@ -1,5 +1,5 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {Pattern} from "./pattern"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {Pattern} from "./pattern.js"; import "../../index"; describe("@Pattern", () => { diff --git a/packages/specs/schema/src/decorators/common/pattern.ts b/packages/specs/schema/src/decorators/common/pattern.ts index d4abe4f127f..7fbc996270f 100644 --- a/packages/specs/schema/src/decorators/common/pattern.ts +++ b/packages/specs/schema/src/decorators/common/pattern.ts @@ -1,6 +1,6 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * The pattern and Pattern Properties keywords use regular expressions to express constraints. diff --git a/packages/specs/schema/src/decorators/common/property.ts b/packages/specs/schema/src/decorators/common/property.ts index 046165ffa60..bb61c04a446 100644 --- a/packages/specs/schema/src/decorators/common/property.ts +++ b/packages/specs/schema/src/decorators/common/property.ts @@ -1,5 +1,5 @@ import {isArrowFn, isClass} from "@tsed/core"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Declare a new property on a model. diff --git a/packages/specs/schema/src/decorators/common/readOnly.spec.ts b/packages/specs/schema/src/decorators/common/readOnly.spec.ts index 3e3af94c57b..2eedbb07bfa 100644 --- a/packages/specs/schema/src/decorators/common/readOnly.spec.ts +++ b/packages/specs/schema/src/decorators/common/readOnly.spec.ts @@ -1,5 +1,5 @@ -import {Format, getJsonSchema, getSpec, In, Path, Post, Property, Returns, SpecTypes} from "../../index"; -import {ReadOnly} from "./readOnly"; +import {Format, getJsonSchema, getSpec, In, Path, Post, Property, Returns, SpecTypes} from "../../index.js"; +import {ReadOnly} from "./readOnly.js"; describe("@ReadOnly", () => { it("should declare readOnly field", () => { diff --git a/packages/specs/schema/src/decorators/common/readOnly.ts b/packages/specs/schema/src/decorators/common/readOnly.ts index 5f328b40bfe..093e58d1997 100644 --- a/packages/specs/schema/src/decorators/common/readOnly.ts +++ b/packages/specs/schema/src/decorators/common/readOnly.ts @@ -1,5 +1,5 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Set the property as readOnly. * diff --git a/packages/specs/schema/src/decorators/common/recordOf.spec.ts b/packages/specs/schema/src/decorators/common/recordOf.spec.ts index 094d2a32f58..f2fc4b4426b 100644 --- a/packages/specs/schema/src/decorators/common/recordOf.spec.ts +++ b/packages/specs/schema/src/decorators/common/recordOf.spec.ts @@ -1,5 +1,5 @@ -import {getJsonSchema} from "../../index"; -import {RecordOf} from "./recordOf"; +import {getJsonSchema} from "../../index.js"; +import {RecordOf} from "./recordOf.js"; describe("RecordOf()", () => { it("should store data", () => { diff --git a/packages/specs/schema/src/decorators/common/recordOf.ts b/packages/specs/schema/src/decorators/common/recordOf.ts index 02e12905377..6e282bd5e25 100644 --- a/packages/specs/schema/src/decorators/common/recordOf.ts +++ b/packages/specs/schema/src/decorators/common/recordOf.ts @@ -1,4 +1,4 @@ -import {Schema} from "./schema"; +import {Schema} from "./schema.js"; /** * Constructs a json schema object type whose property keys are keys and whose property values are type. diff --git a/packages/specs/schema/src/decorators/common/required.spec.ts b/packages/specs/schema/src/decorators/common/required.spec.ts index 93055eecf48..9f97ec38dea 100644 --- a/packages/specs/schema/src/decorators/common/required.spec.ts +++ b/packages/specs/schema/src/decorators/common/required.spec.ts @@ -1,9 +1,9 @@ -import {validateModel} from "../../../test/helpers/validateModel"; -import {getJsonSchema} from "../../index"; +import {validateModel} from "../../../test/helpers/validateModel.js"; +import {getJsonSchema} from "../../index.js"; import Ajv from "ajv"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {Required} from "./required"; -import {Property} from "../common/property"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {Required} from "./required.js"; +import {Property} from "../common/property.js"; describe("@Required", () => { it("should declare required field", () => { diff --git a/packages/specs/schema/src/decorators/common/required.ts b/packages/specs/schema/src/decorators/common/required.ts index 1581f5194d0..8592dbfa256 100644 --- a/packages/specs/schema/src/decorators/common/required.ts +++ b/packages/specs/schema/src/decorators/common/required.ts @@ -1,6 +1,6 @@ -import {withErrorMsg} from "../../utils/withErrorMsg"; -import {Allow} from "./allow"; -import {Optional} from "./optional"; +import {withErrorMsg} from "../../utils/withErrorMsg.js"; +import {Allow} from "./allow.js"; +import {Optional} from "./optional.js"; /** * Add required annotation on Property or Parameter. diff --git a/packages/specs/schema/src/decorators/common/requiredGroups.spec.ts b/packages/specs/schema/src/decorators/common/requiredGroups.spec.ts index 65b70fd9a76..81af79f5cca 100644 --- a/packages/specs/schema/src/decorators/common/requiredGroups.spec.ts +++ b/packages/specs/schema/src/decorators/common/requiredGroups.spec.ts @@ -1,6 +1,6 @@ -import {getJsonSchema, Required} from "../../index"; -import {Groups} from "./groups"; -import {RequiredGroups} from "./requiredGroups"; +import {getJsonSchema, Required} from "../../index.js"; +import {Groups} from "./groups.js"; +import {RequiredGroups} from "./requiredGroups.js"; class MyModel { @Groups("!creation") diff --git a/packages/specs/schema/src/decorators/common/requiredGroups.ts b/packages/specs/schema/src/decorators/common/requiredGroups.ts index 81a95fa6412..070314a8937 100644 --- a/packages/specs/schema/src/decorators/common/requiredGroups.ts +++ b/packages/specs/schema/src/decorators/common/requiredGroups.ts @@ -1,5 +1,5 @@ -import {matchGroups} from "../../utils/matchGroups"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {matchGroups} from "../../utils/matchGroups.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Apply groups validation strategy for required property. diff --git a/packages/specs/schema/src/decorators/common/schema.spec.ts b/packages/specs/schema/src/decorators/common/schema.spec.ts index c7055106d88..b7bbda1b2a4 100644 --- a/packages/specs/schema/src/decorators/common/schema.spec.ts +++ b/packages/specs/schema/src/decorators/common/schema.spec.ts @@ -1,5 +1,5 @@ -import {getJsonSchema} from "../../index"; -import {Schema} from "./schema"; +import {getJsonSchema} from "../../index.js"; +import {Schema} from "./schema.js"; describe("Schema()", () => { it("should store data", () => { diff --git a/packages/specs/schema/src/decorators/common/schema.ts b/packages/specs/schema/src/decorators/common/schema.ts index b6d933f73dd..1b939853cc5 100644 --- a/packages/specs/schema/src/decorators/common/schema.ts +++ b/packages/specs/schema/src/decorators/common/schema.ts @@ -1,6 +1,6 @@ -import {JsonSchema, JsonSchemaObject} from "../../domain/JsonSchema"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonSchema, JsonSchemaObject} from "../../domain/JsonSchema.js"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Write data formatted to JsonSchema. diff --git a/packages/specs/schema/src/decorators/common/title.spec.ts b/packages/specs/schema/src/decorators/common/title.spec.ts index 4c79107c86a..77be7b0bfe5 100644 --- a/packages/specs/schema/src/decorators/common/title.spec.ts +++ b/packages/specs/schema/src/decorators/common/title.spec.ts @@ -1,4 +1,4 @@ -import {getJsonSchema, Title} from "../../index"; +import {getJsonSchema, Title} from "../../index.js"; describe("Title()", () => { it("should store data", () => { diff --git a/packages/specs/schema/src/decorators/common/title.ts b/packages/specs/schema/src/decorators/common/title.ts index b5f9ae0bcdd..bd6122dab9a 100644 --- a/packages/specs/schema/src/decorators/common/title.ts +++ b/packages/specs/schema/src/decorators/common/title.ts @@ -1,4 +1,4 @@ -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Add title metadata on the decorated element. diff --git a/packages/specs/schema/src/decorators/common/typeError.spec.ts b/packages/specs/schema/src/decorators/common/typeError.spec.ts index 17ffc6ff3b1..62327bf6f80 100644 --- a/packages/specs/schema/src/decorators/common/typeError.spec.ts +++ b/packages/specs/schema/src/decorators/common/typeError.spec.ts @@ -1,5 +1,5 @@ -import {getJsonSchema} from "../../utils/getJsonSchema"; -import {TypeError} from "./typeError"; +import {getJsonSchema} from "../../utils/getJsonSchema.js"; +import {TypeError} from "./typeError.js"; describe("@TypeError", () => { it("should declare type error message", () => { diff --git a/packages/specs/schema/src/decorators/common/typeError.ts b/packages/specs/schema/src/decorators/common/typeError.ts index 7d31c730a62..9754951eaf4 100644 --- a/packages/specs/schema/src/decorators/common/typeError.ts +++ b/packages/specs/schema/src/decorators/common/typeError.ts @@ -1,6 +1,6 @@ import {useDecorators} from "@tsed/core"; -import {ErrorMsg} from "./errorMsg"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {ErrorMsg} from "./errorMsg.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Create a new custom formats validator diff --git a/packages/specs/schema/src/decorators/common/writeOnly.spec.ts b/packages/specs/schema/src/decorators/common/writeOnly.spec.ts index 0ec8836ee16..d55c812f7b7 100644 --- a/packages/specs/schema/src/decorators/common/writeOnly.spec.ts +++ b/packages/specs/schema/src/decorators/common/writeOnly.spec.ts @@ -1,5 +1,5 @@ -import {getJsonSchema, getSpec, OperationPath, Path, Returns, SpecTypes} from "../../index"; -import {WriteOnly} from "./writeOnly"; +import {getJsonSchema, getSpec, OperationPath, Path, Returns, SpecTypes} from "../../index.js"; +import {WriteOnly} from "./writeOnly.js"; describe("@WriteOnly", () => { it("should declare writeOnly field (with boolean)", () => { diff --git a/packages/specs/schema/src/decorators/common/writeOnly.ts b/packages/specs/schema/src/decorators/common/writeOnly.ts index 50809524b9c..5eeeb60a40b 100644 --- a/packages/specs/schema/src/decorators/common/writeOnly.ts +++ b/packages/specs/schema/src/decorators/common/writeOnly.ts @@ -1,5 +1,5 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {JsonEntityFn} from "./jsonEntityFn"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {JsonEntityFn} from "./jsonEntityFn.js"; /** * Set the property as WriteOnly. * diff --git a/packages/specs/schema/src/decorators/config/jsonEntityComponent.ts b/packages/specs/schema/src/decorators/config/jsonEntityComponent.ts index 23d2be3141e..43df06ef231 100644 --- a/packages/specs/schema/src/decorators/config/jsonEntityComponent.ts +++ b/packages/specs/schema/src/decorators/config/jsonEntityComponent.ts @@ -1,5 +1,5 @@ import {DecoratorTypes, Type} from "@tsed/core"; -import {JsonEntityStore, JsonEntitiesContainer} from "../../domain/JsonEntityStore"; +import {JsonEntityStore, JsonEntitiesContainer} from "../../domain/JsonEntityStore.js"; /** * Declare a new JsonEntityStore class for a specific decorator type. diff --git a/packages/specs/schema/src/decorators/generics/genericOf.spec.ts b/packages/specs/schema/src/decorators/generics/genericOf.spec.ts index ff306055e85..013519cfb3a 100644 --- a/packages/specs/schema/src/decorators/generics/genericOf.spec.ts +++ b/packages/specs/schema/src/decorators/generics/genericOf.spec.ts @@ -1,6 +1,6 @@ -import {CollectionOf, getJsonSchema, Property, string} from "../../index"; -import {GenericOf} from "./genericOf"; -import {Generics} from "./generics"; +import {CollectionOf, getJsonSchema, Property, string} from "../../index.js"; +import {GenericOf} from "./genericOf.js"; +import {Generics} from "./generics.js"; describe("@GenericOf", () => { it("should generate Generic pagination with nested model (array)", () => { diff --git a/packages/specs/schema/src/decorators/generics/genericOf.ts b/packages/specs/schema/src/decorators/generics/genericOf.ts index 02635168714..cd149345986 100644 --- a/packages/specs/schema/src/decorators/generics/genericOf.ts +++ b/packages/specs/schema/src/decorators/generics/genericOf.ts @@ -1,7 +1,7 @@ import {isObject, Type} from "@tsed/core"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {string} from "../../utils/from"; -import {GenericValue} from "../../utils/generics"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {string} from "../../utils/from.js"; +import {GenericValue} from "../../utils/generics.js"; /** * @ignore diff --git a/packages/specs/schema/src/decorators/generics/generics.ts b/packages/specs/schema/src/decorators/generics/generics.ts index 0d170904ce3..1aa499018d8 100644 --- a/packages/specs/schema/src/decorators/generics/generics.ts +++ b/packages/specs/schema/src/decorators/generics/generics.ts @@ -1,4 +1,4 @@ -import {JsonEntityStore} from "../../domain/JsonEntityStore"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; /** * Define generics list. This list is used by @@GenericOf@@ and the @@getJsonSchema@@ function to build the correct JsonSchema. diff --git a/packages/specs/schema/src/decorators/operations/acceptMime.spec.ts b/packages/specs/schema/src/decorators/operations/acceptMime.spec.ts index 3630c41847d..d10de73f20f 100644 --- a/packages/specs/schema/src/decorators/operations/acceptMime.spec.ts +++ b/packages/specs/schema/src/decorators/operations/acceptMime.spec.ts @@ -1,5 +1,5 @@ -import {Get, getSpec, JsonMethodStore, SpecTypes} from "../../index"; -import {AcceptMime} from "./acceptMime"; +import {Get, getSpec, JsonMethodStore, SpecTypes} from "../../index.js"; +import {AcceptMime} from "./acceptMime.js"; describe("AcceptMime", () => { it("should set metadata", () => { diff --git a/packages/specs/schema/src/decorators/operations/acceptMime.ts b/packages/specs/schema/src/decorators/operations/acceptMime.ts index 591dc2af613..5e84f270784 100644 --- a/packages/specs/schema/src/decorators/operations/acceptMime.ts +++ b/packages/specs/schema/src/decorators/operations/acceptMime.ts @@ -1,5 +1,5 @@ import {StoreSet, useDecorators} from "@tsed/core"; -import {Produces} from "./produces"; +import {Produces} from "./produces.js"; /** * Set a mime list which are acceptable and checks if the specified content types are acceptable, based on the request’s Accept HTTP header field. diff --git a/packages/specs/schema/src/decorators/operations/consumes.spec.ts b/packages/specs/schema/src/decorators/operations/consumes.spec.ts index 5692dd9ddfc..9030e0a4966 100644 --- a/packages/specs/schema/src/decorators/operations/consumes.spec.ts +++ b/packages/specs/schema/src/decorators/operations/consumes.spec.ts @@ -1,4 +1,4 @@ -import {Consumes, getSpec, OperationPath, SpecTypes} from "../../index"; +import {Consumes, getSpec, OperationPath, SpecTypes} from "../../index.js"; describe("Consumes", () => { it("should store metadata", () => { diff --git a/packages/specs/schema/src/decorators/operations/consumes.ts b/packages/specs/schema/src/decorators/operations/consumes.ts index 749d0c65af4..61353efdfd8 100644 --- a/packages/specs/schema/src/decorators/operations/consumes.ts +++ b/packages/specs/schema/src/decorators/operations/consumes.ts @@ -1,5 +1,5 @@ import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from "@tsed/core"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * Add consumes metadata on the decorated element. diff --git a/packages/specs/schema/src/decorators/operations/contentType.spec.ts b/packages/specs/schema/src/decorators/operations/contentType.spec.ts index 952ab203696..c26c584e74b 100644 --- a/packages/specs/schema/src/decorators/operations/contentType.spec.ts +++ b/packages/specs/schema/src/decorators/operations/contentType.spec.ts @@ -1,4 +1,4 @@ -import {ContentType, getSpec, OperationPath, SpecTypes} from "../../index"; +import {ContentType, getSpec, OperationPath, SpecTypes} from "../../index.js"; describe("ContentType", () => { it("should create middleware", () => { diff --git a/packages/specs/schema/src/decorators/operations/contentType.ts b/packages/specs/schema/src/decorators/operations/contentType.ts index 1e4ed5279af..72d656a4051 100644 --- a/packages/specs/schema/src/decorators/operations/contentType.ts +++ b/packages/specs/schema/src/decorators/operations/contentType.ts @@ -1,4 +1,4 @@ -import {Returns} from "./returns"; +import {Returns} from "./returns.js"; /** * Sets the Content-Type HTTP header to the MIME type as determined by mime.lookup() for the specified type. diff --git a/packages/specs/schema/src/decorators/operations/deprecated.spec.ts b/packages/specs/schema/src/decorators/operations/deprecated.spec.ts index 346ec30dcf1..0ffc07bdef2 100644 --- a/packages/specs/schema/src/decorators/operations/deprecated.spec.ts +++ b/packages/specs/schema/src/decorators/operations/deprecated.spec.ts @@ -1,4 +1,4 @@ -import {Deprecated, getSpec, OperationPath, Returns, SpecTypes} from "../../index"; +import {Deprecated, getSpec, OperationPath, Returns, SpecTypes} from "../../index.js"; import {QueryParams} from "@tsed/platform-params"; import {catchError} from "@tsed/core"; diff --git a/packages/specs/schema/src/decorators/operations/deprecated.ts b/packages/specs/schema/src/decorators/operations/deprecated.ts index c278999d4cf..5a9ce55838c 100644 --- a/packages/specs/schema/src/decorators/operations/deprecated.ts +++ b/packages/specs/schema/src/decorators/operations/deprecated.ts @@ -1,7 +1,7 @@ import {decorateMethodsOf, decoratorTypeOf, DecoratorTypes, UnsupportedDecoratorType} from "@tsed/core"; -import {JsonEntityFn} from "../common/jsonEntityFn"; -import {JsonPropertyStore} from "../../domain/JsonPropertyStore"; -import {JsonParameterStore} from "../../domain/JsonParameterStore"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; +import {JsonPropertyStore} from "../../domain/JsonPropertyStore.js"; +import {JsonParameterStore} from "../../domain/JsonParameterStore.js"; /** * Add deprecated metadata on the decorated element. diff --git a/packages/specs/schema/src/decorators/operations/header.spec.ts b/packages/specs/schema/src/decorators/operations/header.spec.ts index eacf5500669..033a190eb85 100644 --- a/packages/specs/schema/src/decorators/operations/header.spec.ts +++ b/packages/specs/schema/src/decorators/operations/header.spec.ts @@ -1,5 +1,5 @@ -import {getSpec, OperationPath, SpecTypes} from "../../index"; -import {Header} from "./header"; +import {getSpec, OperationPath, SpecTypes} from "../../index.js"; +import {Header} from "./header.js"; describe("Header", () => { describe("when is used as method decorator", () => { diff --git a/packages/specs/schema/src/decorators/operations/header.ts b/packages/specs/schema/src/decorators/operations/header.ts index ac6008bc1c8..1b03f867403 100644 --- a/packages/specs/schema/src/decorators/operations/header.ts +++ b/packages/specs/schema/src/decorators/operations/header.ts @@ -1,6 +1,6 @@ import {isString} from "@tsed/core"; -import {JsonHeader, JsonHeaders} from "../../interfaces/JsonOpenSpec"; -import {Returns} from "./returns"; +import {JsonHeader, JsonHeaders} from "../../interfaces/JsonOpenSpec.js"; +import {Returns} from "./returns.js"; /** * Sets the response’s HTTP header field to value. To set multiple fields at once, pass an object as the parameter. diff --git a/packages/specs/schema/src/decorators/operations/in.spec.ts b/packages/specs/schema/src/decorators/operations/in.spec.ts index 1c4da3327f2..d2a16f2fb9a 100644 --- a/packages/specs/schema/src/decorators/operations/in.spec.ts +++ b/packages/specs/schema/src/decorators/operations/in.spec.ts @@ -1,4 +1,4 @@ -import {execMapper, getSpec, In, JsonEntityStore, Name, number, OperationPath, Path, SpecTypes} from "../../index"; +import {execMapper, getSpec, In, JsonEntityStore, Name, number, OperationPath, Path, SpecTypes} from "../../index.js"; describe("In", () => { it("should declare all schema correctly (param)", () => { diff --git a/packages/specs/schema/src/decorators/operations/in.ts b/packages/specs/schema/src/decorators/operations/in.ts index 2db0af98d08..8784b769dbf 100644 --- a/packages/specs/schema/src/decorators/operations/in.ts +++ b/packages/specs/schema/src/decorators/operations/in.ts @@ -1,10 +1,10 @@ import {decorateMethodsOf, DecoratorTypes, Type, UnsupportedDecoratorType} from "@tsed/core"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {JsonMethodStore} from "../../domain/JsonMethodStore"; -import {JsonParameter} from "../../domain/JsonParameter"; -import {JsonParameterStore} from "../../domain/JsonParameterStore"; -import {JsonParameterTypes} from "../../domain/JsonParameterTypes"; -import {JsonSchema, JsonSchemaObject} from "../../domain/JsonSchema"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {JsonMethodStore} from "../../domain/JsonMethodStore.js"; +import {JsonParameter} from "../../domain/JsonParameter.js"; +import {JsonParameterStore} from "../../domain/JsonParameterStore.js"; +import {JsonParameterTypes} from "../../domain/JsonParameterTypes.js"; +import {JsonSchema, JsonSchemaObject} from "../../domain/JsonSchema.js"; export interface InChainedDecorators { (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor | void; diff --git a/packages/specs/schema/src/decorators/operations/inFile.spec.ts b/packages/specs/schema/src/decorators/operations/inFile.spec.ts index 1a147ce058b..b689ed272fc 100644 --- a/packages/specs/schema/src/decorators/operations/inFile.spec.ts +++ b/packages/specs/schema/src/decorators/operations/inFile.spec.ts @@ -1,5 +1,5 @@ -import {generateSpec, getSpec, OperationPath, Path, SpecTypes} from "../../index"; -import {InFile} from "./inFile"; +import {generateSpec, getSpec, OperationPath, Path, SpecTypes} from "../../index.js"; +import {InFile} from "./inFile.js"; describe("@File()", () => { describe("one file", () => { diff --git a/packages/specs/schema/src/decorators/operations/inFile.ts b/packages/specs/schema/src/decorators/operations/inFile.ts index 5f3b70434a1..035597649ac 100644 --- a/packages/specs/schema/src/decorators/operations/inFile.ts +++ b/packages/specs/schema/src/decorators/operations/inFile.ts @@ -1,9 +1,9 @@ import {DecoratorParameters, Metadata, useDecorators, useMethodDecorators} from "@tsed/core"; -import {In} from "./in"; -import {JsonParameterTypes} from "../../domain/JsonParameterTypes"; -import {Returns} from "./returns"; -import {Name} from "../common/name"; -import {Consumes} from "./consumes"; +import {In} from "./in.js"; +import {JsonParameterTypes} from "../../domain/JsonParameterTypes.js"; +import {Returns} from "./returns.js"; +import {Name} from "../common/name.js"; +import {Consumes} from "./consumes.js"; /** * Add a input file parameter. diff --git a/packages/specs/schema/src/decorators/operations/location.spec.ts b/packages/specs/schema/src/decorators/operations/location.spec.ts index a0c7a5a2f64..29ef07dd585 100644 --- a/packages/specs/schema/src/decorators/operations/location.spec.ts +++ b/packages/specs/schema/src/decorators/operations/location.spec.ts @@ -1,4 +1,4 @@ -import {getSpec, Location, OperationPath, SpecTypes} from "../../index"; +import {getSpec, Location, OperationPath, SpecTypes} from "../../index.js"; describe("Location", () => { it("should set Header", () => { diff --git a/packages/specs/schema/src/decorators/operations/location.ts b/packages/specs/schema/src/decorators/operations/location.ts index e879de898f4..7b09517b4a7 100644 --- a/packages/specs/schema/src/decorators/operations/location.ts +++ b/packages/specs/schema/src/decorators/operations/location.ts @@ -1,5 +1,5 @@ -import {JsonHeader} from "../../interfaces/JsonOpenSpec"; -import {Returns} from "./returns"; +import {JsonHeader} from "../../interfaces/JsonOpenSpec.js"; +import {Returns} from "./returns.js"; /** * Sets the response Location HTTP header to the specified path parameter. diff --git a/packages/specs/schema/src/decorators/operations/operation.ts b/packages/specs/schema/src/decorators/operations/operation.ts index b8174877b67..42d21094277 100644 --- a/packages/specs/schema/src/decorators/operations/operation.ts +++ b/packages/specs/schema/src/decorators/operations/operation.ts @@ -1,7 +1,7 @@ -import {OperationVerbs} from "../../constants/OperationVerbs"; -import {DecoratorContext} from "../../domain/DecoratorContext"; -import {JsonMethodStore} from "../../domain/JsonMethodStore"; -import {mapOperationOptions} from "../../utils/mapOperationOptions"; +import {OperationVerbs} from "../../constants/OperationVerbs.js"; +import {DecoratorContext} from "../../domain/DecoratorContext.js"; +import {JsonMethodStore} from "../../domain/JsonMethodStore.js"; +import {mapOperationOptions} from "../../utils/mapOperationOptions.js"; export interface RouteChainedDecorators { (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor | void; diff --git a/packages/specs/schema/src/decorators/operations/operationId.spec.ts b/packages/specs/schema/src/decorators/operations/operationId.spec.ts index ba251dd9430..c102cbcccab 100644 --- a/packages/specs/schema/src/decorators/operations/operationId.spec.ts +++ b/packages/specs/schema/src/decorators/operations/operationId.spec.ts @@ -1,4 +1,4 @@ -import {getSpec, OperationId, OperationPath} from "../../index"; +import {getSpec, OperationId, OperationPath} from "../../index.js"; describe("OperationId", () => { it("should store metadata", () => { diff --git a/packages/specs/schema/src/decorators/operations/operationId.ts b/packages/specs/schema/src/decorators/operations/operationId.ts index a95739681c2..cb090c35d4e 100644 --- a/packages/specs/schema/src/decorators/operations/operationId.ts +++ b/packages/specs/schema/src/decorators/operations/operationId.ts @@ -1,5 +1,5 @@ import {DecoratorTypes, UnsupportedDecoratorType} from "@tsed/core"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * Set a swagger operationId explicitly. diff --git a/packages/specs/schema/src/decorators/operations/operationPath.spec.ts b/packages/specs/schema/src/decorators/operations/operationPath.spec.ts index 418cb3982a9..0c7c77d357d 100644 --- a/packages/specs/schema/src/decorators/operations/operationPath.spec.ts +++ b/packages/specs/schema/src/decorators/operations/operationPath.spec.ts @@ -1,4 +1,4 @@ -import {getSpec, OperationVerbs, OperationPath} from "../../index"; +import {getSpec, OperationVerbs, OperationPath} from "../../index.js"; describe("OperationPath", () => { it("should store metadata", () => { diff --git a/packages/specs/schema/src/decorators/operations/operationPath.ts b/packages/specs/schema/src/decorators/operations/operationPath.ts index 04a7336cc06..c423ebc59a5 100644 --- a/packages/specs/schema/src/decorators/operations/operationPath.ts +++ b/packages/specs/schema/src/decorators/operations/operationPath.ts @@ -1,6 +1,6 @@ import {DecoratorTypes, UnsupportedDecoratorType} from "@tsed/core"; -import {JsonEntityFn} from "../common/jsonEntityFn"; -import {OperationVerbs} from "../../constants/OperationVerbs"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; +import {OperationVerbs} from "../../constants/OperationVerbs.js"; /** * Declare new Operation with his path and http method. diff --git a/packages/specs/schema/src/decorators/operations/partial.spec.ts b/packages/specs/schema/src/decorators/operations/partial.spec.ts index 934af0cd65c..a71c44e5cd2 100644 --- a/packages/specs/schema/src/decorators/operations/partial.spec.ts +++ b/packages/specs/schema/src/decorators/operations/partial.spec.ts @@ -12,8 +12,8 @@ import { RequiredGroups, Returns, SpecTypes -} from "../../index"; -import {Partial} from "./partial"; +} from "../../index.js"; +import {Partial} from "./partial.js"; class ChildModel { @Groups("!creation") diff --git a/packages/specs/schema/src/decorators/operations/partial.ts b/packages/specs/schema/src/decorators/operations/partial.ts index 0a4944326de..fe1801f6e84 100644 --- a/packages/specs/schema/src/decorators/operations/partial.ts +++ b/packages/specs/schema/src/decorators/operations/partial.ts @@ -1,4 +1,4 @@ -import {Groups} from "../common/groups"; +import {Groups} from "../common/groups.js"; /** * Apply Partial group strategy on the input model diff --git a/packages/specs/schema/src/decorators/operations/path.spec.ts b/packages/specs/schema/src/decorators/operations/path.spec.ts index b462a976aed..c6ea6988bec 100644 --- a/packages/specs/schema/src/decorators/operations/path.spec.ts +++ b/packages/specs/schema/src/decorators/operations/path.spec.ts @@ -1,4 +1,4 @@ -import {getSpec, OperationPath, Path} from "../../index"; +import {getSpec, OperationPath, Path} from "../../index.js"; describe("Path", () => { it("should declare a path", () => { diff --git a/packages/specs/schema/src/decorators/operations/path.ts b/packages/specs/schema/src/decorators/operations/path.ts index 27f45584122..c366cc92ecb 100644 --- a/packages/specs/schema/src/decorators/operations/path.ts +++ b/packages/specs/schema/src/decorators/operations/path.ts @@ -1,5 +1,5 @@ import {DecoratorTypes, UnsupportedDecoratorType} from "@tsed/core"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * Set class path to expose all endpoints diff --git a/packages/specs/schema/src/decorators/operations/produces.spec.ts b/packages/specs/schema/src/decorators/operations/produces.spec.ts index e586c712b57..b56749c2053 100644 --- a/packages/specs/schema/src/decorators/operations/produces.spec.ts +++ b/packages/specs/schema/src/decorators/operations/produces.spec.ts @@ -1,4 +1,4 @@ -import {getSpec, OperationPath, Produces, SpecTypes} from "../../index"; +import {getSpec, OperationPath, Produces, SpecTypes} from "../../index.js"; describe("Produces", () => { it("should store metadata", () => { diff --git a/packages/specs/schema/src/decorators/operations/produces.ts b/packages/specs/schema/src/decorators/operations/produces.ts index 6bd544b92ed..ad6e245ed4a 100644 --- a/packages/specs/schema/src/decorators/operations/produces.ts +++ b/packages/specs/schema/src/decorators/operations/produces.ts @@ -1,5 +1,5 @@ import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from "@tsed/core"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * Add produces metadata on the decorated element. diff --git a/packages/specs/schema/src/decorators/operations/publish.spec.ts b/packages/specs/schema/src/decorators/operations/publish.spec.ts index 4fd74569418..f3aa4e7f4b7 100644 --- a/packages/specs/schema/src/decorators/operations/publish.spec.ts +++ b/packages/specs/schema/src/decorators/operations/publish.spec.ts @@ -1,7 +1,7 @@ -import {OperationVerbs} from "../../constants/OperationVerbs"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {Publish} from "./publish"; -import {Get} from "./route"; +import {OperationVerbs} from "../../constants/OperationVerbs.js"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {Publish} from "./publish.js"; +import {Get} from "./route.js"; describe("Publish", () => { it("should register operation with Publish verb", () => { diff --git a/packages/specs/schema/src/decorators/operations/publish.ts b/packages/specs/schema/src/decorators/operations/publish.ts index f19f21f6255..fec8729af6f 100644 --- a/packages/specs/schema/src/decorators/operations/publish.ts +++ b/packages/specs/schema/src/decorators/operations/publish.ts @@ -1,5 +1,5 @@ -import {OperationVerbs} from "../../constants/OperationVerbs"; -import {Operation} from "./operation"; +import {OperationVerbs} from "../../constants/OperationVerbs.js"; +import {Operation} from "./operation.js"; export function Publish(event: string) { return Operation(OperationVerbs.PUBLISH, event); diff --git a/packages/specs/schema/src/decorators/operations/redirect.spec.ts b/packages/specs/schema/src/decorators/operations/redirect.spec.ts index f05b450960f..106c018b498 100644 --- a/packages/specs/schema/src/decorators/operations/redirect.spec.ts +++ b/packages/specs/schema/src/decorators/operations/redirect.spec.ts @@ -1,5 +1,5 @@ -import {getSpec, OperationPath, SpecTypes} from "../../index"; -import {Redirect} from "./redirect"; +import {getSpec, OperationPath, SpecTypes} from "../../index.js"; +import {Redirect} from "./redirect.js"; describe("Redirect", () => { it("should set header with path only", () => { diff --git a/packages/specs/schema/src/decorators/operations/redirect.ts b/packages/specs/schema/src/decorators/operations/redirect.ts index df1e72c9b29..2b655654eca 100644 --- a/packages/specs/schema/src/decorators/operations/redirect.ts +++ b/packages/specs/schema/src/decorators/operations/redirect.ts @@ -1,7 +1,7 @@ import {isNumber, isString, useDecorators} from "@tsed/core"; -import {JsonHeader} from "../../interfaces/JsonOpenSpec"; -import {JsonEntityFn} from "../common/jsonEntityFn"; -import {Returns} from "./returns"; +import {JsonHeader} from "../../interfaces/JsonOpenSpec.js"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; +import {Returns} from "./returns.js"; /** * Redirects to the URL derived from the specified path, with specified status, a positive integer that corresponds to an HTTP status code . If not specified, status defaults to “302 “Found”. diff --git a/packages/specs/schema/src/decorators/operations/returns.spec.ts b/packages/specs/schema/src/decorators/operations/returns.spec.ts index f6e8fbb8dd5..63bc09515c5 100644 --- a/packages/specs/schema/src/decorators/operations/returns.spec.ts +++ b/packages/specs/schema/src/decorators/operations/returns.spec.ts @@ -1,12 +1,12 @@ import {OpenSpec3} from "@tsed/openspec"; import "@tsed/platform-exceptions"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {getSpec} from "../../utils/getSpec"; -import {CollectionOf} from "../collections/collectionOf"; -import {Property} from "../common/property"; -import {Generics} from "../generics/generics"; -import {OperationPath} from "./operationPath"; -import {Returns} from "./returns"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {getSpec} from "../../utils/getSpec.js"; +import {CollectionOf} from "../collections/collectionOf.js"; +import {Property} from "../common/property.js"; +import {Generics} from "../generics/generics.js"; +import {OperationPath} from "./operationPath.js"; +import {Returns} from "./returns.js"; describe("@Returns", () => { describe("Single contentType", () => { diff --git a/packages/specs/schema/src/decorators/operations/returns.ts b/packages/specs/schema/src/decorators/operations/returns.ts index e1cc44b9f24..6ec4f00be79 100644 --- a/packages/specs/schema/src/decorators/operations/returns.ts +++ b/packages/specs/schema/src/decorators/operations/returns.ts @@ -11,18 +11,18 @@ import { Type } from "@tsed/core"; import {OS3Example} from "@tsed/openspec"; -import {getStatusMessage} from "../../constants/httpStatusMessages"; -import {DecoratorContext} from "../../domain/DecoratorContext"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {JsonParameter} from "../../domain/JsonParameter"; -import {JsonResponse} from "../../domain/JsonResponse"; -import {JsonSchema, JsonSchemaObject} from "../../domain/JsonSchema"; -import {JsonHeader, JsonHeaders} from "../../interfaces/JsonOpenSpec"; -import {getStatusModel} from "../../utils/defineStatusModel"; -import {string} from "../../utils/from"; -import {GenericValue} from "../../utils/generics"; -import {isSuccessStatus} from "../../utils/isSuccessStatus"; -import {mapHeaders} from "../../utils/mapHeaders"; +import {getStatusMessage} from "../../constants/httpStatusMessages.js"; +import {DecoratorContext} from "../../domain/DecoratorContext.js"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {JsonParameter} from "../../domain/JsonParameter.js"; +import {JsonResponse} from "../../domain/JsonResponse.js"; +import {JsonSchema, JsonSchemaObject} from "../../domain/JsonSchema.js"; +import {JsonHeader, JsonHeaders} from "../../interfaces/JsonOpenSpec.js"; +import {getStatusModel} from "../../utils/defineStatusModel.js"; +import {string} from "../../utils/from.js"; +import {GenericValue} from "../../utils/generics.js"; +import {isSuccessStatus} from "../../utils/isSuccessStatus.js"; +import {mapHeaders} from "../../utils/mapHeaders.js"; export interface ReturnsChainedDecorators { (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor): TypedPropertyDescriptor | void; diff --git a/packages/specs/schema/src/decorators/operations/route.spec.ts b/packages/specs/schema/src/decorators/operations/route.spec.ts index c1bb8539a8d..dd923bf3834 100644 --- a/packages/specs/schema/src/decorators/operations/route.spec.ts +++ b/packages/specs/schema/src/decorators/operations/route.spec.ts @@ -1,5 +1,5 @@ -import {JsonEntityStore, OperationVerbs} from "../../index"; -import {All, Delete, Get, Head, Options, Patch, Post, Put} from "./route"; +import {JsonEntityStore, OperationVerbs} from "../../index.js"; +import {All, Delete, Get, Head, Options, Patch, Post, Put} from "./route.js"; import Sinon from "sinon"; const middleware: any = Sinon.stub(); diff --git a/packages/specs/schema/src/decorators/operations/route.ts b/packages/specs/schema/src/decorators/operations/route.ts index 68010fceae1..25e8dcf3c6f 100644 --- a/packages/specs/schema/src/decorators/operations/route.ts +++ b/packages/specs/schema/src/decorators/operations/route.ts @@ -1,5 +1,5 @@ -import {OperationVerbs} from "../../constants/OperationVerbs"; -import {Operation} from "./operation"; +import {OperationVerbs} from "../../constants/OperationVerbs.js"; +import {Operation} from "./operation.js"; /** * @deprecated Use Operation instead of Route diff --git a/packages/specs/schema/src/decorators/operations/security.spec.ts b/packages/specs/schema/src/decorators/operations/security.spec.ts index 84d978dcb21..f8c0f1e8a0f 100644 --- a/packages/specs/schema/src/decorators/operations/security.spec.ts +++ b/packages/specs/schema/src/decorators/operations/security.spec.ts @@ -1,5 +1,5 @@ -import {getSpec, OperationPath, SpecTypes} from "../../index"; -import {Security} from "./security"; +import {getSpec, OperationPath, SpecTypes} from "../../index.js"; +import {Security} from "./security.js"; describe("Security", () => { it("should store metadata (method)", () => { diff --git a/packages/specs/schema/src/decorators/operations/security.ts b/packages/specs/schema/src/decorators/operations/security.ts index d9e25e7217a..0afa6226448 100644 --- a/packages/specs/schema/src/decorators/operations/security.ts +++ b/packages/specs/schema/src/decorators/operations/security.ts @@ -1,5 +1,5 @@ import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from "@tsed/core"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * Add security metadata on the decorated method. diff --git a/packages/specs/schema/src/decorators/operations/status.spec.ts b/packages/specs/schema/src/decorators/operations/status.spec.ts index a2c84ef2ae3..e585148ec7d 100644 --- a/packages/specs/schema/src/decorators/operations/status.spec.ts +++ b/packages/specs/schema/src/decorators/operations/status.spec.ts @@ -1,11 +1,11 @@ import "@tsed/platform-exceptions"; -import {SpecTypes} from "../../domain/SpecTypes"; -import {getSpec} from "../../utils/getSpec"; -import {CollectionOf} from "../collections/collectionOf"; -import {Property} from "../common/property"; -import {Generics} from "../generics/generics"; -import {OperationPath} from "./operationPath"; -import {Status} from "./status"; +import {SpecTypes} from "../../domain/SpecTypes.js"; +import {getSpec} from "../../utils/getSpec.js"; +import {CollectionOf} from "../collections/collectionOf.js"; +import {Property} from "../common/property.js"; +import {Generics} from "../generics/generics.js"; +import {OperationPath} from "./operationPath.js"; +import {Status} from "./status.js"; describe("@Status", () => { it("should declare a return type", () => { diff --git a/packages/specs/schema/src/decorators/operations/status.ts b/packages/specs/schema/src/decorators/operations/status.ts index 72d1dbdd6d3..96fd6ecf117 100644 --- a/packages/specs/schema/src/decorators/operations/status.ts +++ b/packages/specs/schema/src/decorators/operations/status.ts @@ -1,5 +1,5 @@ import {Type} from "@tsed/core"; -import {Returns, ReturnsChainedDecorators} from "./returns"; +import {Returns, ReturnsChainedDecorators} from "./returns.js"; /** * Add responses documentation for a specific status code. diff --git a/packages/specs/schema/src/decorators/operations/subscribe.spec.ts b/packages/specs/schema/src/decorators/operations/subscribe.spec.ts index f8486e5de0a..31cd0f35d2a 100644 --- a/packages/specs/schema/src/decorators/operations/subscribe.spec.ts +++ b/packages/specs/schema/src/decorators/operations/subscribe.spec.ts @@ -1,7 +1,7 @@ -import {OperationVerbs} from "../../constants/OperationVerbs"; -import {JsonEntityStore} from "../../domain/JsonEntityStore"; -import {Publish} from "./publish"; -import {Subscribe} from "./subscribe"; +import {OperationVerbs} from "../../constants/OperationVerbs.js"; +import {JsonEntityStore} from "../../domain/JsonEntityStore.js"; +import {Publish} from "./publish.js"; +import {Subscribe} from "./subscribe.js"; describe("Subscribe", () => { it("should register operation with Subscribe verb", () => { diff --git a/packages/specs/schema/src/decorators/operations/subscribe.ts b/packages/specs/schema/src/decorators/operations/subscribe.ts index c46485771ce..cec02d3ca45 100644 --- a/packages/specs/schema/src/decorators/operations/subscribe.ts +++ b/packages/specs/schema/src/decorators/operations/subscribe.ts @@ -1,5 +1,5 @@ -import {OperationVerbs} from "../../constants/OperationVerbs"; -import {Operation} from "./operation"; +import {OperationVerbs} from "../../constants/OperationVerbs.js"; +import {Operation} from "./operation.js"; export function Subscribe(event: string) { return Operation(OperationVerbs.SUBSCRIBE, event); diff --git a/packages/specs/schema/src/decorators/operations/summary.spec.ts b/packages/specs/schema/src/decorators/operations/summary.spec.ts index 6e2f0ad561b..f603485dc5f 100644 --- a/packages/specs/schema/src/decorators/operations/summary.spec.ts +++ b/packages/specs/schema/src/decorators/operations/summary.spec.ts @@ -1,5 +1,5 @@ -import {getSpec, OperationPath} from "../../index"; -import {Summary} from "./summary"; +import {getSpec, OperationPath} from "../../index.js"; +import {Summary} from "./summary.js"; describe("Summary", () => { it("should store metadata", () => { diff --git a/packages/specs/schema/src/decorators/operations/summary.ts b/packages/specs/schema/src/decorators/operations/summary.ts index 17d675692ff..8d3695efba3 100644 --- a/packages/specs/schema/src/decorators/operations/summary.ts +++ b/packages/specs/schema/src/decorators/operations/summary.ts @@ -1,5 +1,5 @@ import {DecoratorTypes, UnsupportedDecoratorType} from "@tsed/core"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; /** * Add summary metadata on the decorated element. diff --git a/packages/specs/schema/src/decorators/operations/tags.spec.ts b/packages/specs/schema/src/decorators/operations/tags.spec.ts index 109adcabd1f..a074b57a0bb 100644 --- a/packages/specs/schema/src/decorators/operations/tags.spec.ts +++ b/packages/specs/schema/src/decorators/operations/tags.spec.ts @@ -1,5 +1,5 @@ -import {getSpec, OperationPath} from "../../index"; -import {Tags} from "./tags"; +import {getSpec, OperationPath} from "../../index.js"; +import {Tags} from "./tags.js"; describe("Tags", () => { it("should store metadata (method)", () => { diff --git a/packages/specs/schema/src/decorators/operations/tags.ts b/packages/specs/schema/src/decorators/operations/tags.ts index 80a9f00139e..8972d16fb5e 100644 --- a/packages/specs/schema/src/decorators/operations/tags.ts +++ b/packages/specs/schema/src/decorators/operations/tags.ts @@ -1,6 +1,6 @@ import {decorateMethodsOf, DecoratorTypes, UnsupportedDecoratorType} from "@tsed/core"; import {OpenSpecTag} from "@tsed/openspec"; -import {JsonEntityFn} from "../common/jsonEntityFn"; +import {JsonEntityFn} from "../common/jsonEntityFn.js"; function mapTags(tags: (string | OpenSpecTag)[]) { return tags.map((tag) => { diff --git a/packages/specs/schema/src/decorators/operations/view.spec.ts b/packages/specs/schema/src/decorators/operations/view.spec.ts index cc5a1815f5f..6aaf6e4ddbf 100644 --- a/packages/specs/schema/src/decorators/operations/view.spec.ts +++ b/packages/specs/schema/src/decorators/operations/view.spec.ts @@ -1,4 +1,4 @@ -import {JsonMethodStore, View} from "../../index"; +import {JsonMethodStore, View} from "../../index.js"; describe("@View", () => { it("should set metadata", () => { diff --git a/packages/specs/schema/src/domain/DecoratorContext.ts b/packages/specs/schema/src/domain/DecoratorContext.ts index ae55c7c550a..7a7cf19505f 100644 --- a/packages/specs/schema/src/domain/DecoratorContext.ts +++ b/packages/specs/schema/src/domain/DecoratorContext.ts @@ -1,6 +1,6 @@ import {DecoratorParameters, DecoratorTypes} from "@tsed/core"; import {pascalCase} from "change-case"; -import {JsonEntityStore} from "./JsonEntityStore"; +import {JsonEntityStore} from "./JsonEntityStore.js"; /** * @ignore diff --git a/packages/specs/schema/src/domain/JsonClassStore.ts b/packages/specs/schema/src/domain/JsonClassStore.ts index d95f1bf9617..84a3f4fd37f 100644 --- a/packages/specs/schema/src/domain/JsonClassStore.ts +++ b/packages/specs/schema/src/domain/JsonClassStore.ts @@ -1,9 +1,9 @@ import {DecoratorTypes} from "@tsed/core"; -import type {JsonMethodStore} from "./JsonMethodStore"; -import type {JsonPropertyStore} from "./JsonPropertyStore"; -import {JsonEntityStore, JsonEntityStoreOptions} from "./JsonEntityStore"; -import {JsonSchema} from "./JsonSchema"; -import {JsonEntityComponent} from "../decorators/config/jsonEntityComponent"; +import type {JsonMethodStore} from "./JsonMethodStore.js"; +import type {JsonPropertyStore} from "./JsonPropertyStore.js"; +import {JsonEntityStore, JsonEntityStoreOptions} from "./JsonEntityStore.js"; +import {JsonSchema} from "./JsonSchema.js"; +import {JsonEntityComponent} from "../decorators/config/jsonEntityComponent.js"; @JsonEntityComponent(DecoratorTypes.CLASS) export class JsonClassStore extends JsonEntityStore { diff --git a/packages/specs/schema/src/domain/JsonDiscriminator.spec.ts b/packages/specs/schema/src/domain/JsonDiscriminator.spec.ts index 2995e46b0c9..fa38ac5ee1c 100644 --- a/packages/specs/schema/src/domain/JsonDiscriminator.spec.ts +++ b/packages/specs/schema/src/domain/JsonDiscriminator.spec.ts @@ -1,8 +1,8 @@ -import {DiscriminatorValue} from "../decorators/class/discriminatorValue"; -import {DiscriminatorKey} from "../decorators/common/discriminatorKey"; -import {Property} from "../decorators/common/property"; -import {Required} from "../decorators/common/required"; -import {JsonEntityStore} from "./JsonEntityStore"; +import {DiscriminatorValue} from "../decorators/class/discriminatorValue.js"; +import {DiscriminatorKey} from "../decorators/common/discriminatorKey.js"; +import {Property} from "../decorators/common/property.js"; +import {Required} from "../decorators/common/required.js"; +import {JsonEntityStore} from "./JsonEntityStore.js"; class Event { @DiscriminatorKey() // declare this property a discriminator key diff --git a/packages/specs/schema/src/domain/JsonEntityStore.spec.ts b/packages/specs/schema/src/domain/JsonEntityStore.spec.ts index aacbda6991f..62d0f2cf62f 100644 --- a/packages/specs/schema/src/domain/JsonEntityStore.spec.ts +++ b/packages/specs/schema/src/domain/JsonEntityStore.spec.ts @@ -9,7 +9,7 @@ import { Property, Required, Allow -} from "../index"; +} from "../index.js"; describe("JsonEntityStore", () => { it("should create JsonEntityStore", () => { diff --git a/packages/specs/schema/src/domain/JsonEntityStore.ts b/packages/specs/schema/src/domain/JsonEntityStore.ts index 0719c7c7ea0..61ed2453fa9 100644 --- a/packages/specs/schema/src/domain/JsonEntityStore.ts +++ b/packages/specs/schema/src/domain/JsonEntityStore.ts @@ -18,11 +18,11 @@ import { Store, Type } from "@tsed/core"; -import type {JsonClassStore} from "./JsonClassStore"; -import type {JsonMethodStore} from "./JsonMethodStore"; -import type {JsonParameterStore} from "./JsonParameterStore"; -import type {JsonPropertyStore} from "./JsonPropertyStore"; -import type {JsonSchema} from "./JsonSchema"; +import type {JsonClassStore} from "./JsonClassStore.js"; +import type {JsonMethodStore} from "./JsonMethodStore.js"; +import type {JsonParameterStore} from "./JsonParameterStore.js"; +import type {JsonPropertyStore} from "./JsonPropertyStore.js"; +import type {JsonSchema} from "./JsonSchema.js"; /** * @ignore @@ -275,9 +275,9 @@ export abstract class JsonEntityStore implements JsonEntityStoreOptions { return this.itemSchema.hasDiscriminator ? this.itemSchema.discriminator().base : isClassObject(this.type) - ? this.itemSchema.getTarget() - : isArrowFn(this.type) - ? this.type() - : this.type; + ? this.itemSchema.getTarget() + : isArrowFn(this.type) + ? this.type() + : this.type; } } diff --git a/packages/specs/schema/src/domain/JsonLazyRef.ts b/packages/specs/schema/src/domain/JsonLazyRef.ts index 4f4378a5fbd..8f42665d7a8 100644 --- a/packages/specs/schema/src/domain/JsonLazyRef.ts +++ b/packages/specs/schema/src/domain/JsonLazyRef.ts @@ -1,5 +1,5 @@ import {nameOf, Type} from "@tsed/core"; -import {getJsonEntityStore} from "../utils/getJsonEntityStore"; +import {getJsonEntityStore} from "../utils/getJsonEntityStore.js"; export class JsonLazyRef { readonly isLazyRef = true; diff --git a/packages/specs/schema/src/domain/JsonMap.spec.ts b/packages/specs/schema/src/domain/JsonMap.spec.ts index f5d934e6bd8..870225ddcb3 100644 --- a/packages/specs/schema/src/domain/JsonMap.spec.ts +++ b/packages/specs/schema/src/domain/JsonMap.spec.ts @@ -1,4 +1,4 @@ -import {JsonMap} from "./JsonMap"; +import {JsonMap} from "./JsonMap.js"; describe("JsonMap", () => { it("should serialize a JsonMap", () => { diff --git a/packages/specs/schema/src/domain/JsonMap.ts b/packages/specs/schema/src/domain/JsonMap.ts index f0f4478af2d..257f21d3922 100644 --- a/packages/specs/schema/src/domain/JsonMap.ts +++ b/packages/specs/schema/src/domain/JsonMap.ts @@ -1,6 +1,6 @@ import {isFunction} from "@tsed/core"; -import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions"; -import {execMapper} from "../registries/JsonSchemaMapperContainer"; +import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; +import {execMapper} from "../registries/JsonSchemaMapperContainer.js"; export class JsonMap extends Map { [key: string]: any; diff --git a/packages/specs/schema/src/domain/JsonMedia.ts b/packages/specs/schema/src/domain/JsonMedia.ts index 4e3a3b23029..b59967b27e8 100644 --- a/packages/specs/schema/src/domain/JsonMedia.ts +++ b/packages/specs/schema/src/domain/JsonMedia.ts @@ -1,6 +1,6 @@ import {OS3MediaType} from "@tsed/openspec"; -import {JsonMap} from "./JsonMap"; -import {JsonSchema} from "./JsonSchema"; +import {JsonMap} from "./JsonMap.js"; +import {JsonSchema} from "./JsonSchema.js"; export class JsonMedia extends JsonMap> { $kind: string = "operationMedia"; diff --git a/packages/specs/schema/src/domain/JsonMethodStore.spec.ts b/packages/specs/schema/src/domain/JsonMethodStore.spec.ts index 4223816552b..14f8bdfa63e 100644 --- a/packages/specs/schema/src/domain/JsonMethodStore.spec.ts +++ b/packages/specs/schema/src/domain/JsonMethodStore.spec.ts @@ -1,14 +1,14 @@ import {StoreSet} from "@tsed/core"; import {Use, UseAfter, UseBefore} from "@tsed/platform-middlewares"; -import {OperationVerbs} from "../constants/OperationVerbs"; -import {Property} from "../decorators/common/property"; -import {In} from "../decorators/operations/in"; -import {Returns} from "../decorators/operations/returns"; -import {Get} from "../decorators/operations/route"; -import {JsonEntityStore} from "./JsonEntityStore"; -import {EndpointMetadata, JsonMethodStore} from "./JsonMethodStore"; -import {JsonOperation} from "./JsonOperation"; -import {JsonParameter} from "./JsonParameter"; +import {OperationVerbs} from "../constants/OperationVerbs.js"; +import {Property} from "../decorators/common/property.js"; +import {In} from "../decorators/operations/in.js"; +import {Returns} from "../decorators/operations/returns.js"; +import {Get} from "../decorators/operations/route.js"; +import {JsonEntityStore} from "./JsonEntityStore.js"; +import {EndpointMetadata, JsonMethodStore} from "./JsonMethodStore.js"; +import {JsonOperation} from "./JsonOperation.js"; +import {JsonParameter} from "./JsonParameter.js"; describe("JsonMethodStore", () => { describe("endpoint declaration", () => { diff --git a/packages/specs/schema/src/domain/JsonMethodStore.ts b/packages/specs/schema/src/domain/JsonMethodStore.ts index 7d6568c4d24..d6ab2bc0612 100644 --- a/packages/specs/schema/src/domain/JsonMethodStore.ts +++ b/packages/specs/schema/src/domain/JsonMethodStore.ts @@ -1,10 +1,10 @@ import {DecoratorTypes, deepMerge, descriptorOf, isCollection, isFunction, isPromise, Metadata, prototypeOf, Store, Type} from "@tsed/core"; -import {JsonEntityComponent} from "../decorators/config/jsonEntityComponent"; -import type {JsonClassStore} from "./JsonClassStore"; -import {JsonEntityStore, JsonEntityStoreOptions} from "./JsonEntityStore"; -import {JsonOperation} from "./JsonOperation"; -import type {JsonParameterStore} from "./JsonParameterStore"; -import {JsonSchema} from "./JsonSchema"; +import {JsonEntityComponent} from "../decorators/config/jsonEntityComponent.js"; +import type {JsonClassStore} from "./JsonClassStore.js"; +import {JsonEntityStore, JsonEntityStoreOptions} from "./JsonEntityStore.js"; +import {JsonOperation} from "./JsonOperation.js"; +import type {JsonParameterStore} from "./JsonParameterStore.js"; +import {JsonSchema} from "./JsonSchema.js"; export interface JsonViewOptions { path: string; diff --git a/packages/specs/schema/src/domain/JsonOperation.spec.ts b/packages/specs/schema/src/domain/JsonOperation.spec.ts index 74610eaa91f..8fc6ce649c4 100644 --- a/packages/specs/schema/src/domain/JsonOperation.spec.ts +++ b/packages/specs/schema/src/domain/JsonOperation.spec.ts @@ -1,5 +1,5 @@ import {descriptorOf} from "@tsed/core"; -import {execMapper, Get, getSpec, In, JsonEntityStore, OperationPath, Path, Redirect, Returns, SpecTypes} from "../index"; +import {execMapper, Get, getSpec, In, JsonEntityStore, OperationPath, Path, Redirect, Returns, SpecTypes} from "../index.js"; describe("JsonOperation", () => { describe("getStatus()", () => { diff --git a/packages/specs/schema/src/domain/JsonOperation.ts b/packages/specs/schema/src/domain/JsonOperation.ts index 71e4b92c1f7..46a92e1a445 100644 --- a/packages/specs/schema/src/domain/JsonOperation.ts +++ b/packages/specs/schema/src/domain/JsonOperation.ts @@ -1,11 +1,11 @@ import {deepMerge, uniq, uniqBy} from "@tsed/core"; import {OpenSpecSecurity, OpenSpecTag, OS3Operation} from "@tsed/openspec"; -import {JsonHeader} from "../interfaces/JsonOpenSpec"; -import {isRedirectionStatus, isSuccessStatus} from "../utils/isSuccessStatus"; -import {JsonMap} from "./JsonMap"; -import {JsonParameter} from "./JsonParameter"; -import {JsonResponse} from "./JsonResponse"; -import {JsonSchema} from "./JsonSchema"; +import {JsonHeader} from "../interfaces/JsonOpenSpec.js"; +import {isRedirectionStatus, isSuccessStatus} from "../utils/isSuccessStatus.js"; +import {JsonMap} from "./JsonMap.js"; +import {JsonParameter} from "./JsonParameter.js"; +import {JsonResponse} from "./JsonResponse.js"; +import {JsonSchema} from "./JsonSchema.js"; export interface JsonMethodPath { path: string | RegExp; diff --git a/packages/specs/schema/src/domain/JsonOperationPathsMap.ts b/packages/specs/schema/src/domain/JsonOperationPathsMap.ts index f8f409d7623..1609450684f 100644 --- a/packages/specs/schema/src/domain/JsonOperationPathsMap.ts +++ b/packages/specs/schema/src/domain/JsonOperationPathsMap.ts @@ -1,5 +1,5 @@ -import {OperationVerbs} from "../constants/OperationVerbs"; -import {JsonMethodPath} from "./JsonOperation"; +import {OperationVerbs} from "../constants/OperationVerbs.js"; +import {JsonMethodPath} from "./JsonOperation.js"; export class JsonOperationPathsMap extends Map { $kind: string = "operationPaths"; diff --git a/packages/specs/schema/src/domain/JsonOperationRoute.spec.ts b/packages/specs/schema/src/domain/JsonOperationRoute.spec.ts index e8fbfa9a21d..4ed83535b06 100644 --- a/packages/specs/schema/src/domain/JsonOperationRoute.spec.ts +++ b/packages/specs/schema/src/domain/JsonOperationRoute.spec.ts @@ -1,9 +1,9 @@ import {BodyParams} from "@tsed/platform-params"; -import {Name} from "../decorators/common/name"; -import {Get} from "../decorators/operations/route"; -import {JsonEntityStore} from "./JsonEntityStore"; -import {JsonOperation} from "./JsonOperation"; -import {JsonOperationRoute} from "./JsonOperationRoute"; +import {Name} from "../decorators/common/name.js"; +import {Get} from "../decorators/operations/route.js"; +import {JsonEntityStore} from "./JsonEntityStore.js"; +import {JsonOperation} from "./JsonOperation.js"; +import {JsonOperationRoute} from "./JsonOperationRoute.js"; describe("JsonOperationRoute", () => { it("should create JsonOperationRoute instance", () => { diff --git a/packages/specs/schema/src/domain/JsonOperationRoute.ts b/packages/specs/schema/src/domain/JsonOperationRoute.ts index f444d6357cd..134d48662c0 100644 --- a/packages/specs/schema/src/domain/JsonOperationRoute.ts +++ b/packages/specs/schema/src/domain/JsonOperationRoute.ts @@ -1,7 +1,7 @@ import {Type} from "@tsed/core"; -import {JsonMethodStore} from "./JsonMethodStore"; -import {JsonMethodPath, JsonOperation} from "./JsonOperation"; -import {concatPath} from "../utils/concatPath"; +import {JsonMethodStore} from "./JsonMethodStore.js"; +import {JsonMethodPath, JsonOperation} from "./JsonOperation.js"; +import {concatPath} from "../utils/concatPath.js"; export class JsonOperationRoute { readonly token: Type; diff --git a/packages/specs/schema/src/domain/JsonParameter.ts b/packages/specs/schema/src/domain/JsonParameter.ts index 62d342696f4..09103ee0083 100644 --- a/packages/specs/schema/src/domain/JsonParameter.ts +++ b/packages/specs/schema/src/domain/JsonParameter.ts @@ -1,11 +1,11 @@ import {Type} from "@tsed/core"; import {OpenSpecHash, OpenSpecRef, OS3Example, OS3Parameter} from "@tsed/openspec"; -import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions"; -import {execMapper} from "../registries/JsonSchemaMapperContainer"; -import {NestedGenerics} from "../utils/generics"; -import {JsonMap} from "./JsonMap"; -import {formatParameterType} from "./JsonParameterTypes"; -import {JsonSchema} from "./JsonSchema"; +import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; +import {execMapper} from "../registries/JsonSchemaMapperContainer.js"; +import {NestedGenerics} from "../utils/generics.js"; +import {JsonMap} from "./JsonMap.js"; +import {formatParameterType} from "./JsonParameterTypes.js"; +import {JsonSchema} from "./JsonSchema.js"; export class JsonParameter extends JsonMap> implements NestedGenerics { $kind = "operationInParameter"; diff --git a/packages/specs/schema/src/domain/JsonParameterStore.spec.ts b/packages/specs/schema/src/domain/JsonParameterStore.spec.ts index 03d10a98b7f..a95796e5f38 100644 --- a/packages/specs/schema/src/domain/JsonParameterStore.spec.ts +++ b/packages/specs/schema/src/domain/JsonParameterStore.spec.ts @@ -1,14 +1,14 @@ import {prototypeOf, Store} from "@tsed/core"; -import {Allow} from "../decorators/common/allow"; -import {Required} from "../decorators/common/required"; -import {In} from "../decorators/operations/in"; -import {Path} from "../decorators/operations/path"; -import {Get} from "../decorators/operations/route"; -import {getJsonEntityStore} from "../utils/getJsonEntityStore"; -import {JsonClassStore} from "./JsonClassStore"; -import {JsonMethodStore} from "./JsonMethodStore"; -import {JsonParameterStore} from "./JsonParameterStore"; -import {JsonParameterTypes} from "./JsonParameterTypes"; +import {Allow} from "../decorators/common/allow.js"; +import {Required} from "../decorators/common/required.js"; +import {In} from "../decorators/operations/in.js"; +import {Path} from "../decorators/operations/path.js"; +import {Get} from "../decorators/operations/route.js"; +import {getJsonEntityStore} from "../utils/getJsonEntityStore.js"; +import {JsonClassStore} from "./JsonClassStore.js"; +import {JsonMethodStore} from "./JsonMethodStore.js"; +import {JsonParameterStore} from "./JsonParameterStore.js"; +import {JsonParameterTypes} from "./JsonParameterTypes.js"; describe("JsonParameterStore", () => { describe("new JsonParameterStore", () => { diff --git a/packages/specs/schema/src/domain/JsonParameterStore.ts b/packages/specs/schema/src/domain/JsonParameterStore.ts index 795e8257e08..7fa943356ff 100644 --- a/packages/specs/schema/src/domain/JsonParameterStore.ts +++ b/packages/specs/schema/src/domain/JsonParameterStore.ts @@ -1,9 +1,9 @@ import {ancestorsOf, DecoratorTypes, isClass, isCollection, isMethodDescriptor, Metadata, prototypeOf, Type} from "@tsed/core"; -import {JsonEntityStore, JsonEntityStoreOptions} from "./JsonEntityStore"; -import type {JsonMethodStore} from "./JsonMethodStore"; -import {JsonParameter} from "./JsonParameter"; -import {JsonSchema} from "./JsonSchema"; -import {JsonEntityComponent} from "../decorators/config/jsonEntityComponent"; +import {JsonEntityStore, JsonEntityStoreOptions} from "./JsonEntityStore.js"; +import type {JsonMethodStore} from "./JsonMethodStore.js"; +import {JsonParameter} from "./JsonParameter.js"; +import {JsonSchema} from "./JsonSchema.js"; +import {JsonEntityComponent} from "../decorators/config/jsonEntityComponent.js"; export interface JsonParameterStoreOptions extends JsonEntityStoreOptions { dataPath?: string; diff --git a/packages/specs/schema/src/domain/JsonParameterTypes.spec.ts b/packages/specs/schema/src/domain/JsonParameterTypes.spec.ts index ab5b7f81372..5055d178bf3 100644 --- a/packages/specs/schema/src/domain/JsonParameterTypes.spec.ts +++ b/packages/specs/schema/src/domain/JsonParameterTypes.spec.ts @@ -1,4 +1,4 @@ -import {isParameterType} from "../index"; +import {isParameterType} from "../index.js"; describe("JsonParameterType", () => { describe("isParameterType", () => { diff --git a/packages/specs/schema/src/domain/JsonPropertyStore.spec.ts b/packages/specs/schema/src/domain/JsonPropertyStore.spec.ts index ba5d7ef1e2d..17ea7006540 100644 --- a/packages/specs/schema/src/domain/JsonPropertyStore.spec.ts +++ b/packages/specs/schema/src/domain/JsonPropertyStore.spec.ts @@ -1,6 +1,6 @@ import {prototypeOf} from "@tsed/core"; -import {Allow, JsonClassStore, JsonPropertyStore, Required} from "../index"; -import {getJsonEntityStore} from "../utils/getJsonEntityStore"; +import {Allow, JsonClassStore, JsonPropertyStore, Required} from "../index.js"; +import {getJsonEntityStore} from "../utils/getJsonEntityStore.js"; describe("JsonParameterStore", () => { it("should create entity with required value", () => { diff --git a/packages/specs/schema/src/domain/JsonPropertyStore.ts b/packages/specs/schema/src/domain/JsonPropertyStore.ts index b41253d9b0e..25486c19890 100644 --- a/packages/specs/schema/src/domain/JsonPropertyStore.ts +++ b/packages/specs/schema/src/domain/JsonPropertyStore.ts @@ -1,8 +1,8 @@ import {DecoratorTypes, Metadata, prototypeOf, Type} from "@tsed/core"; -import {JsonEntityStore} from "./JsonEntityStore"; -import {JsonSchema} from "./JsonSchema"; -import {JsonEntityComponent} from "../decorators/config/jsonEntityComponent"; -import type {JsonClassStore} from "./JsonClassStore"; +import {JsonEntityStore} from "./JsonEntityStore.js"; +import {JsonSchema} from "./JsonSchema.js"; +import {JsonEntityComponent} from "../decorators/config/jsonEntityComponent.js"; +import type {JsonClassStore} from "./JsonClassStore.js"; @JsonEntityComponent(DecoratorTypes.PROP) export class JsonPropertyStore extends JsonEntityStore { diff --git a/packages/specs/schema/src/domain/JsonRequestBody.ts b/packages/specs/schema/src/domain/JsonRequestBody.ts index 6b5067d9f33..2bdb96d16be 100644 --- a/packages/specs/schema/src/domain/JsonRequestBody.ts +++ b/packages/specs/schema/src/domain/JsonRequestBody.ts @@ -1,7 +1,7 @@ import {OpenSpecHash, OS3MediaType, OS3RequestBody} from "@tsed/openspec"; -import {toJsonMapCollection} from "../utils/toJsonMapCollection"; -import {JsonMap} from "./JsonMap"; -import {JsonSchema} from "./JsonSchema"; +import {toJsonMapCollection} from "../utils/toJsonMapCollection.js"; +import {JsonMap} from "./JsonMap.js"; +import {JsonSchema} from "./JsonSchema.js"; export type JsonRequestBodyOptions = OS3RequestBody; diff --git a/packages/specs/schema/src/domain/JsonResponse.ts b/packages/specs/schema/src/domain/JsonResponse.ts index e459b51ebfb..6afbf1d0582 100644 --- a/packages/specs/schema/src/domain/JsonResponse.ts +++ b/packages/specs/schema/src/domain/JsonResponse.ts @@ -1,10 +1,10 @@ import {OS3MediaType, OS3Response} from "@tsed/openspec"; -import {JsonHeader} from "../interfaces/JsonOpenSpec"; -import {mapHeaders} from "../utils/mapHeaders"; -import {toJsonMapCollection} from "../utils/toJsonMapCollection"; -import {JsonMap} from "./JsonMap"; -import {JsonMedia} from "./JsonMedia"; -import {JsonSchema} from "./JsonSchema"; +import {JsonHeader} from "../interfaces/JsonOpenSpec.js"; +import {mapHeaders} from "../utils/mapHeaders.js"; +import {toJsonMapCollection} from "../utils/toJsonMapCollection.js"; +import {JsonMap} from "./JsonMap.js"; +import {JsonMedia} from "./JsonMedia.js"; +import {JsonSchema} from "./JsonSchema.js"; export type JsonResponseOptions = OS3Response; diff --git a/packages/specs/schema/src/domain/JsonSchema.spec.ts b/packages/specs/schema/src/domain/JsonSchema.spec.ts index c076a5c33f4..f0d17457a74 100644 --- a/packages/specs/schema/src/domain/JsonSchema.spec.ts +++ b/packages/specs/schema/src/domain/JsonSchema.spec.ts @@ -1,5 +1,5 @@ import Ajv from "ajv"; -import {JsonSchema} from "./JsonSchema"; +import {JsonSchema} from "./JsonSchema.js"; describe("JsonSchema", () => { describe("extra Props", () => { diff --git a/packages/specs/schema/src/domain/JsonSchema.ts b/packages/specs/schema/src/domain/JsonSchema.ts index e5a0955cd2c..a10b7decd07 100644 --- a/packages/specs/schema/src/domain/JsonSchema.ts +++ b/packages/specs/schema/src/domain/JsonSchema.ts @@ -13,20 +13,20 @@ import { ValueOf } from "@tsed/core"; import type {JSONSchema6, JSONSchema6Definition, JSONSchema6Type, JSONSchema6TypeName, JSONSchema6Version} from "json-schema"; -import {IgnoreCallback} from "../interfaces/IgnoreCallback"; -import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions"; -import {enumsRegistry} from "../registries/enumRegistries"; -import {execMapper} from "../registries/JsonSchemaMapperContainer"; -import {NestedGenerics} from "../utils/generics"; -import {getComputedType} from "../utils/getComputedType"; -import {getJsonType} from "../utils/getJsonType"; -import {serializeEnumValues} from "../utils/serializeEnumValues"; -import {toJsonRegex} from "../utils/toJsonRegex"; -import {AliasMap, AliasType} from "./JsonAliasMap"; -import {Discriminator} from "./JsonDiscriminator"; -import {JsonEntityStore} from "./JsonEntityStore"; -import {JsonFormatTypes} from "./JsonFormatTypes"; -import {JsonLazyRef} from "./JsonLazyRef"; +import {IgnoreCallback} from "../interfaces/IgnoreCallback.js"; +import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; +import {enumsRegistry} from "../registries/enumRegistries.js"; +import {execMapper} from "../registries/JsonSchemaMapperContainer.js"; +import {NestedGenerics} from "../utils/generics.js"; +import {getComputedType} from "../utils/getComputedType.js"; +import {getJsonType} from "../utils/getJsonType.js"; +import {serializeEnumValues} from "../utils/serializeEnumValues.js"; +import {toJsonRegex} from "../utils/toJsonRegex.js"; +import {AliasMap, AliasType} from "./JsonAliasMap.js"; +import {Discriminator} from "./JsonDiscriminator.js"; +import {JsonEntityStore} from "./JsonEntityStore.js"; +import {JsonFormatTypes} from "./JsonFormatTypes.js"; +import {JsonLazyRef} from "./JsonLazyRef.js"; export interface JsonSchemaObject extends JSONSchema6, Record { type: (any | JSONSchema6TypeName) | (any | JSONSchema6TypeName)[]; diff --git a/packages/specs/schema/src/hooks/alterOneOf.ts b/packages/specs/schema/src/hooks/alterOneOf.ts index 647b3ab0548..f36e6d83886 100644 --- a/packages/specs/schema/src/hooks/alterOneOf.ts +++ b/packages/specs/schema/src/hooks/alterOneOf.ts @@ -1,5 +1,5 @@ -import type {JsonSchema} from "../domain/JsonSchema"; -import type {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions"; +import type {JsonSchema} from "../domain/JsonSchema.js"; +import type {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; export function alterOneOf(obj: any, schema: JsonSchema, options: JsonSchemaOptions) { if (obj.oneOf && options.groups !== false) { diff --git a/packages/specs/schema/src/hooks/alterRequiredGroups.ts b/packages/specs/schema/src/hooks/alterRequiredGroups.ts index 98626992c1f..d0820be835f 100644 --- a/packages/specs/schema/src/hooks/alterRequiredGroups.ts +++ b/packages/specs/schema/src/hooks/alterRequiredGroups.ts @@ -1,5 +1,5 @@ -import type {JsonSchema} from "../domain/JsonSchema"; -import type {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions"; +import type {JsonSchema} from "../domain/JsonSchema.js"; +import type {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; /** * @ignore */ diff --git a/packages/specs/schema/src/index.ts b/packages/specs/schema/src/index.ts index b8b069e168b..0646df5fddf 100644 --- a/packages/specs/schema/src/index.ts +++ b/packages/specs/schema/src/index.ts @@ -2,179 +2,179 @@ * @file Automatically generated by barrelsby. */ -export * from "./components/async-api/channelsMapper"; -export * from "./components/async-api/generate"; -export * from "./components/async-api/messageMapper"; -export * from "./components/async-api/payloadMapper"; -export * from "./components/async-api/responseMapper"; -export * from "./components/default/anyMapper"; -export * from "./components/default/classMapper"; -export * from "./components/default/genericsMapper"; -export * from "./components/default/inheritedClassMapper"; -export * from "./components/default/itemMapper"; -export * from "./components/default/lazyRefMapper"; -export * from "./components/default/mapMapper"; -export * from "./components/default/objectMapper"; -export * from "./components/default/ofMapper"; -export * from "./components/default/propertiesMapper"; -export * from "./components/default/schemaMapper"; -export * from "./components/open-spec/generate"; -export * from "./components/open-spec/operationInFilesMapper"; -export * from "./components/open-spec/operationInParameterMapper"; -export * from "./components/open-spec/operationInParametersMapper"; -export * from "./components/open-spec/operationInQueryMapper"; -export * from "./components/open-spec/operationMapper"; -export * from "./components/open-spec/operationMediaMapper"; -export * from "./components/open-spec/operationRequestBodyMapper"; -export * from "./components/open-spec/operationResponseMapper"; -export * from "./components/open-spec/pathsMapper"; -export * from "./constants/OperationVerbs"; -export * from "./constants/httpStatusMessages"; -export * from "./decorators/class/children"; -export * from "./decorators/class/discriminatorValue"; -export * from "./decorators/collections/collectionContains"; -export * from "./decorators/collections/collectionOf"; -export * from "./decorators/collections/maxItems"; -export * from "./decorators/collections/maxProperties"; -export * from "./decorators/collections/minItems"; -export * from "./decorators/collections/minProperties"; -export * from "./decorators/collections/uniqueItems"; -export * from "./decorators/common/additionalProperties"; -export * from "./decorators/common/allOf"; -export * from "./decorators/common/allow"; -export * from "./decorators/common/any"; -export * from "./decorators/common/anyOf"; -export * from "./decorators/common/const"; -export * from "./decorators/common/customKey"; -export * from "./decorators/common/default"; -export * from "./decorators/common/defaultMsg"; -export * from "./decorators/common/description"; -export * from "./decorators/common/discriminatorKey"; -export * from "./decorators/common/enum"; -export * from "./decorators/common/errorMsg"; -export * from "./decorators/common/example"; -export * from "./decorators/common/examples"; -export * from "./decorators/common/exclusiveMaximum"; -export * from "./decorators/common/exclusiveMinimum"; -export * from "./decorators/common/format"; -export * from "./decorators/common/forwardGroups"; -export * from "./decorators/common/groups"; -export * from "./decorators/common/hidden"; -export * from "./decorators/common/ignore"; -export * from "./decorators/common/integer"; -export * from "./decorators/common/jsonEntityFn"; -export * from "./decorators/common/maxLength"; -export * from "./decorators/common/maximum"; -export * from "./decorators/common/minLength"; -export * from "./decorators/common/minimum"; -export * from "./decorators/common/multipleOf"; -export * from "./decorators/common/name"; -export * from "./decorators/common/nullable"; -export * from "./decorators/common/oneOf"; -export * from "./decorators/common/optional"; -export * from "./decorators/common/pattern"; -export * from "./decorators/common/property"; -export * from "./decorators/common/readOnly"; -export * from "./decorators/common/recordOf"; -export * from "./decorators/common/required"; -export * from "./decorators/common/requiredGroups"; -export * from "./decorators/common/schema"; -export * from "./decorators/common/title"; -export * from "./decorators/common/typeError"; -export * from "./decorators/common/writeOnly"; -export * from "./decorators/config/jsonEntityComponent"; -export * from "./decorators/generics/genericOf"; -export * from "./decorators/generics/generics"; -export * from "./decorators/operations/acceptMime"; -export * from "./decorators/operations/consumes"; -export * from "./decorators/operations/contentType"; -export * from "./decorators/operations/deprecated"; -export * from "./decorators/operations/header"; -export * from "./decorators/operations/in"; -export * from "./decorators/operations/inFile"; -export * from "./decorators/operations/location"; -export * from "./decorators/operations/operation"; -export * from "./decorators/operations/operationId"; -export * from "./decorators/operations/operationPath"; -export * from "./decorators/operations/partial"; -export * from "./decorators/operations/path"; -export * from "./decorators/operations/produces"; -export * from "./decorators/operations/publish"; -export * from "./decorators/operations/redirect"; -export * from "./decorators/operations/returns"; -export * from "./decorators/operations/route"; -export * from "./decorators/operations/security"; -export * from "./decorators/operations/status"; -export * from "./decorators/operations/subscribe"; -export * from "./decorators/operations/summary"; -export * from "./decorators/operations/tags"; -export * from "./decorators/operations/view"; -export * from "./domain/DecoratorContext"; -export * from "./domain/JsonAliasMap"; -export * from "./domain/JsonClassStore"; -export * from "./domain/JsonDiscriminator"; -export * from "./domain/JsonEntityStore"; -export * from "./domain/JsonFormatTypes"; -export * from "./domain/JsonLazyRef"; -export * from "./domain/JsonMap"; -export * from "./domain/JsonMedia"; -export * from "./domain/JsonMethodStore"; -export * from "./domain/JsonOperation"; -export * from "./domain/JsonOperationPathsMap"; -export * from "./domain/JsonOperationRoute"; -export * from "./domain/JsonParameter"; -export * from "./domain/JsonParameterStore"; -export * from "./domain/JsonParameterTypes"; -export * from "./domain/JsonPropertyStore"; -export * from "./domain/JsonRequestBody"; -export * from "./domain/JsonResponse"; -export * from "./domain/JsonSchema"; -export * from "./domain/SpecTypes"; -export * from "./hooks/alterIgnore"; -export * from "./hooks/alterOneOf"; -export * from "./hooks/alterRequiredGroups"; -export * from "./interfaces/IgnoreCallback"; -export * from "./interfaces/JsonHookContext"; -export * from "./interfaces/JsonOpenSpec"; -export * from "./interfaces/JsonSchemaOptions"; -export * from "./registries/JsonSchemaMapperContainer"; -export * from "./registries/enumRegistries"; -export * from "./utils/buildPath"; -export * from "./utils/concatParameters"; -export * from "./utils/concatPath"; -export * from "./utils/defineStatusModel"; -export * from "./utils/from"; -export * from "./utils/generateSpec"; -export * from "./utils/generics"; -export * from "./utils/getComputedType"; -export * from "./utils/getInheritedStores"; -export * from "./utils/getJsonEntityStore"; -export * from "./utils/getJsonPathParameters"; -export * from "./utils/getJsonSchema"; -export * from "./utils/getJsonType"; -export * from "./utils/getOperationsRoutes"; -export * from "./utils/getOperationsStores"; -export * from "./utils/getPropertiesStores"; -export * from "./utils/getRequiredProperties"; -export * from "./utils/getSpec"; -export * from "./utils/getSpecType"; -export * from "./utils/inlineEnums"; -export * from "./utils/isSuccessStatus"; -export * from "./utils/mapHeaders"; -export * from "./utils/mapNullableType"; -export * from "./utils/mapOpenSpec"; -export * from "./utils/mapOpenSpec2"; -export * from "./utils/mapOpenSpec3"; -export * from "./utils/mapOpenSpecInfo"; -export * from "./utils/mapOperationOptions"; -export * from "./utils/matchGroups"; -export * from "./utils/mergeSpec"; -export * from "./utils/operationIdFormatter"; -export * from "./utils/ref"; -export * from "./utils/removeHiddenOperation"; -export * from "./utils/serializeEnumValues"; -export * from "./utils/somethingOf"; -export * from "./utils/toJsonMapCollection"; -export * from "./utils/toJsonRegex"; -export * from "./utils/transformToOS2"; -export * from "./utils/withErrorMsg"; +export * from "./components/async-api/channelsMapper.js"; +export * from "./components/async-api/generate.js"; +export * from "./components/async-api/messageMapper.js"; +export * from "./components/async-api/payloadMapper.js"; +export * from "./components/async-api/responseMapper.js"; +export * from "./components/default/anyMapper.js"; +export * from "./components/default/classMapper.js"; +export * from "./components/default/genericsMapper.js"; +export * from "./components/default/inheritedClassMapper.js"; +export * from "./components/default/itemMapper.js"; +export * from "./components/default/lazyRefMapper.js"; +export * from "./components/default/mapMapper.js"; +export * from "./components/default/objectMapper.js"; +export * from "./components/default/ofMapper.js"; +export * from "./components/default/propertiesMapper.js"; +export * from "./components/default/schemaMapper.js"; +export * from "./components/open-spec/generate.js"; +export * from "./components/open-spec/operationInFilesMapper.js"; +export * from "./components/open-spec/operationInParameterMapper.js"; +export * from "./components/open-spec/operationInParametersMapper.js"; +export * from "./components/open-spec/operationInQueryMapper.js"; +export * from "./components/open-spec/operationMapper.js"; +export * from "./components/open-spec/operationMediaMapper.js"; +export * from "./components/open-spec/operationRequestBodyMapper.js"; +export * from "./components/open-spec/operationResponseMapper.js"; +export * from "./components/open-spec/pathsMapper.js"; +export * from "./constants/OperationVerbs.js"; +export * from "./constants/httpStatusMessages.js"; +export * from "./decorators/class/children.js"; +export * from "./decorators/class/discriminatorValue.js"; +export * from "./decorators/collections/collectionContains.js"; +export * from "./decorators/collections/collectionOf.js"; +export * from "./decorators/collections/maxItems.js"; +export * from "./decorators/collections/maxProperties.js"; +export * from "./decorators/collections/minItems.js"; +export * from "./decorators/collections/minProperties.js"; +export * from "./decorators/collections/uniqueItems.js"; +export * from "./decorators/common/additionalProperties.js"; +export * from "./decorators/common/allOf.js"; +export * from "./decorators/common/allow.js"; +export * from "./decorators/common/any.js"; +export * from "./decorators/common/anyOf.js"; +export * from "./decorators/common/const.js"; +export * from "./decorators/common/customKey.js"; +export * from "./decorators/common/default.js"; +export * from "./decorators/common/defaultMsg.js"; +export * from "./decorators/common/description.js"; +export * from "./decorators/common/discriminatorKey.js"; +export * from "./decorators/common/enum.js"; +export * from "./decorators/common/errorMsg.js"; +export * from "./decorators/common/example.js"; +export * from "./decorators/common/examples.js"; +export * from "./decorators/common/exclusiveMaximum.js"; +export * from "./decorators/common/exclusiveMinimum.js"; +export * from "./decorators/common/format.js"; +export * from "./decorators/common/forwardGroups.js"; +export * from "./decorators/common/groups.js"; +export * from "./decorators/common/hidden.js"; +export * from "./decorators/common/ignore.js"; +export * from "./decorators/common/integer.js"; +export * from "./decorators/common/jsonEntityFn.js"; +export * from "./decorators/common/maxLength.js"; +export * from "./decorators/common/maximum.js"; +export * from "./decorators/common/minLength.js"; +export * from "./decorators/common/minimum.js"; +export * from "./decorators/common/multipleOf.js"; +export * from "./decorators/common/name.js"; +export * from "./decorators/common/nullable.js"; +export * from "./decorators/common/oneOf.js"; +export * from "./decorators/common/optional.js"; +export * from "./decorators/common/pattern.js"; +export * from "./decorators/common/property.js"; +export * from "./decorators/common/readOnly.js"; +export * from "./decorators/common/recordOf.js"; +export * from "./decorators/common/required.js"; +export * from "./decorators/common/requiredGroups.js"; +export * from "./decorators/common/schema.js"; +export * from "./decorators/common/title.js"; +export * from "./decorators/common/typeError.js"; +export * from "./decorators/common/writeOnly.js"; +export * from "./decorators/config/jsonEntityComponent.js"; +export * from "./decorators/generics/genericOf.js"; +export * from "./decorators/generics/generics.js"; +export * from "./decorators/operations/acceptMime.js"; +export * from "./decorators/operations/consumes.js"; +export * from "./decorators/operations/contentType.js"; +export * from "./decorators/operations/deprecated.js"; +export * from "./decorators/operations/header.js"; +export * from "./decorators/operations/in.js"; +export * from "./decorators/operations/inFile.js"; +export * from "./decorators/operations/location.js"; +export * from "./decorators/operations/operation.js"; +export * from "./decorators/operations/operationId.js"; +export * from "./decorators/operations/operationPath.js"; +export * from "./decorators/operations/partial.js"; +export * from "./decorators/operations/path.js"; +export * from "./decorators/operations/produces.js"; +export * from "./decorators/operations/publish.js"; +export * from "./decorators/operations/redirect.js"; +export * from "./decorators/operations/returns.js"; +export * from "./decorators/operations/route.js"; +export * from "./decorators/operations/security.js"; +export * from "./decorators/operations/status.js"; +export * from "./decorators/operations/subscribe.js"; +export * from "./decorators/operations/summary.js"; +export * from "./decorators/operations/tags.js"; +export * from "./decorators/operations/view.js"; +export * from "./domain/DecoratorContext.js"; +export * from "./domain/JsonAliasMap.js"; +export * from "./domain/JsonClassStore.js"; +export * from "./domain/JsonDiscriminator.js"; +export * from "./domain/JsonEntityStore.js"; +export * from "./domain/JsonFormatTypes.js"; +export * from "./domain/JsonLazyRef.js"; +export * from "./domain/JsonMap.js"; +export * from "./domain/JsonMedia.js"; +export * from "./domain/JsonMethodStore.js"; +export * from "./domain/JsonOperation.js"; +export * from "./domain/JsonOperationPathsMap.js"; +export * from "./domain/JsonOperationRoute.js"; +export * from "./domain/JsonParameter.js"; +export * from "./domain/JsonParameterStore.js"; +export * from "./domain/JsonParameterTypes.js"; +export * from "./domain/JsonPropertyStore.js"; +export * from "./domain/JsonRequestBody.js"; +export * from "./domain/JsonResponse.js"; +export * from "./domain/JsonSchema.js"; +export * from "./domain/SpecTypes.js"; +export * from "./hooks/alterIgnore.js"; +export * from "./hooks/alterOneOf.js"; +export * from "./hooks/alterRequiredGroups.js"; +export * from "./interfaces/IgnoreCallback.js"; +export * from "./interfaces/JsonHookContext.js"; +export * from "./interfaces/JsonOpenSpec.js"; +export * from "./interfaces/JsonSchemaOptions.js"; +export * from "./registries/JsonSchemaMapperContainer.js"; +export * from "./registries/enumRegistries.js"; +export * from "./utils/buildPath.js"; +export * from "./utils/concatParameters.js"; +export * from "./utils/concatPath.js"; +export * from "./utils/defineStatusModel.js"; +export * from "./utils/from.js"; +export * from "./utils/generateSpec.js"; +export * from "./utils/generics.js"; +export * from "./utils/getComputedType.js"; +export * from "./utils/getInheritedStores.js"; +export * from "./utils/getJsonEntityStore.js"; +export * from "./utils/getJsonPathParameters.js"; +export * from "./utils/getJsonSchema.js"; +export * from "./utils/getJsonType.js"; +export * from "./utils/getOperationsRoutes.js"; +export * from "./utils/getOperationsStores.js"; +export * from "./utils/getPropertiesStores.js"; +export * from "./utils/getRequiredProperties.js"; +export * from "./utils/getSpec.js"; +export * from "./utils/getSpecType.js"; +export * from "./utils/inlineEnums.js"; +export * from "./utils/isSuccessStatus.js"; +export * from "./utils/mapHeaders.js"; +export * from "./utils/mapNullableType.js"; +export * from "./utils/mapOpenSpec.js"; +export * from "./utils/mapOpenSpec2.js"; +export * from "./utils/mapOpenSpec3.js"; +export * from "./utils/mapOpenSpecInfo.js"; +export * from "./utils/mapOperationOptions.js"; +export * from "./utils/matchGroups.js"; +export * from "./utils/mergeSpec.js"; +export * from "./utils/operationIdFormatter.js"; +export * from "./utils/ref.js"; +export * from "./utils/removeHiddenOperation.js"; +export * from "./utils/serializeEnumValues.js"; +export * from "./utils/somethingOf.js"; +export * from "./utils/toJsonMapCollection.js"; +export * from "./utils/toJsonRegex.js"; +export * from "./utils/transformToOS2.js"; +export * from "./utils/withErrorMsg.js"; diff --git a/packages/specs/schema/src/interfaces/IgnoreCallback.ts b/packages/specs/schema/src/interfaces/IgnoreCallback.ts index c645aca633d..219f76ea8e7 100644 --- a/packages/specs/schema/src/interfaces/IgnoreCallback.ts +++ b/packages/specs/schema/src/interfaces/IgnoreCallback.ts @@ -1,4 +1,4 @@ -import {JsonHookContext} from "./JsonHookContext"; +import {JsonHookContext} from "./JsonHookContext.js"; export interface IgnoreCallback { (value: boolean, ctx: JsonHookContext): boolean; diff --git a/packages/specs/schema/src/interfaces/JsonSchemaOptions.ts b/packages/specs/schema/src/interfaces/JsonSchemaOptions.ts index 8a8b8708605..7b389754e3e 100644 --- a/packages/specs/schema/src/interfaces/JsonSchemaOptions.ts +++ b/packages/specs/schema/src/interfaces/JsonSchemaOptions.ts @@ -1,4 +1,4 @@ -import {SpecTypes} from "../domain/SpecTypes"; +import {SpecTypes} from "../domain/SpecTypes.js"; export interface JsonSchemaOptions { /** diff --git a/packages/specs/schema/src/registries/JsonSchemaMapperContainer.ts b/packages/specs/schema/src/registries/JsonSchemaMapperContainer.ts index a65865d8930..a480620e27e 100644 --- a/packages/specs/schema/src/registries/JsonSchemaMapperContainer.ts +++ b/packages/specs/schema/src/registries/JsonSchemaMapperContainer.ts @@ -1,4 +1,4 @@ -import {SpecTypes} from "../domain/SpecTypes"; +import {SpecTypes} from "../domain/SpecTypes.js"; /** * @ignore diff --git a/packages/specs/schema/src/registries/enumRegistries.ts b/packages/specs/schema/src/registries/enumRegistries.ts index a383bd1159e..f105e125083 100644 --- a/packages/specs/schema/src/registries/enumRegistries.ts +++ b/packages/specs/schema/src/registries/enumRegistries.ts @@ -1,3 +1,3 @@ -import {JsonSchema} from "../domain/JsonSchema"; +import {JsonSchema} from "../domain/JsonSchema.js"; export const enumsRegistry = new Map(); diff --git a/packages/specs/schema/src/utils/concatPath.spec.ts b/packages/specs/schema/src/utils/concatPath.spec.ts index d77a8050205..f908c2a3d3b 100644 --- a/packages/specs/schema/src/utils/concatPath.spec.ts +++ b/packages/specs/schema/src/utils/concatPath.spec.ts @@ -1,4 +1,4 @@ -import {concatPath} from "./concatPath"; +import {concatPath} from "./concatPath.js"; describe("concatPath", () => { it("should return path", () => { diff --git a/packages/specs/schema/src/utils/from.spec.ts b/packages/specs/schema/src/utils/from.spec.ts index c4fe1462238..eef5c6cf6e1 100644 --- a/packages/specs/schema/src/utils/from.spec.ts +++ b/packages/specs/schema/src/utils/from.spec.ts @@ -1,5 +1,5 @@ -import {CollectionOf} from "../decorators/collections/collectionOf"; -import {Property} from "../decorators/common/property"; +import {CollectionOf} from "../decorators/collections/collectionOf.js"; +import {Property} from "../decorators/common/property.js"; import { allOf, any, @@ -20,7 +20,7 @@ import { time, uri, url -} from "./from"; +} from "./from.js"; describe("from", () => { it("should declare a model", () => { diff --git a/packages/specs/schema/src/utils/from.ts b/packages/specs/schema/src/utils/from.ts index 48d440b30d9..3d46697456b 100644 --- a/packages/specs/schema/src/utils/from.ts +++ b/packages/specs/schema/src/utils/from.ts @@ -1,10 +1,10 @@ import {isClass, Type} from "@tsed/core"; -import {JsonEntityStore} from "../domain/JsonEntityStore"; -import {JsonFormatTypes} from "../domain/JsonFormatTypes"; -import {JsonLazyRef} from "../domain/JsonLazyRef"; -import {JsonSchema} from "../domain/JsonSchema"; -import {enumsRegistry} from "../registries/enumRegistries"; -import {getJsonEntityStore} from "./getJsonEntityStore"; +import {JsonEntityStore} from "../domain/JsonEntityStore.js"; +import {JsonFormatTypes} from "../domain/JsonFormatTypes.js"; +import {JsonLazyRef} from "../domain/JsonLazyRef.js"; +import {JsonSchema} from "../domain/JsonSchema.js"; +import {enumsRegistry} from "../registries/enumRegistries.js"; +import {getJsonEntityStore} from "./getJsonEntityStore.js"; /** * Create a new model from the given type. diff --git a/packages/specs/schema/src/utils/generateSpec.spec.ts b/packages/specs/schema/src/utils/generateSpec.spec.ts index cb068e16b8c..8ec54dbbfc8 100644 --- a/packages/specs/schema/src/utils/generateSpec.spec.ts +++ b/packages/specs/schema/src/utils/generateSpec.spec.ts @@ -1,18 +1,18 @@ import {join} from "path"; -import {validateSpec} from "../../test/helpers/validateSpec"; -import {CollectionOf} from "../decorators/collections/collectionOf"; -import {Description} from "../decorators/common/description"; -import {Min} from "../decorators/common/minimum"; -import {Name} from "../decorators/common/name"; -import {Property} from "../decorators/common/property"; -import {Required} from "../decorators/common/required"; -import {Consumes} from "../decorators/operations/consumes"; -import {In} from "../decorators/operations/in"; -import {OperationPath} from "../decorators/operations/operationPath"; -import {Path} from "../decorators/operations/path"; -import {Returns} from "../decorators/operations/returns"; -import {SpecTypes} from "../domain/SpecTypes"; -import {generateSpec} from "./generateSpec"; +import {validateSpec} from "../../test/helpers/validateSpec.js"; +import {CollectionOf} from "../decorators/collections/collectionOf.js"; +import {Description} from "../decorators/common/description.js"; +import {Min} from "../decorators/common/minimum.js"; +import {Name} from "../decorators/common/name.js"; +import {Property} from "../decorators/common/property.js"; +import {Required} from "../decorators/common/required.js"; +import {Consumes} from "../decorators/operations/consumes.js"; +import {In} from "../decorators/operations/in.js"; +import {OperationPath} from "../decorators/operations/operationPath.js"; +import {Path} from "../decorators/operations/path.js"; +import {Returns} from "../decorators/operations/returns.js"; +import {SpecTypes} from "../domain/SpecTypes.js"; +import {generateSpec} from "./generateSpec.js"; import filedirname from "filedirname"; // FIXME remove when esm is ready diff --git a/packages/specs/schema/src/utils/generateSpec.ts b/packages/specs/schema/src/utils/generateSpec.ts index 30d0c0c8e45..48c30e33f9d 100644 --- a/packages/specs/schema/src/utils/generateSpec.ts +++ b/packages/specs/schema/src/utils/generateSpec.ts @@ -1,11 +1,11 @@ import {getValue} from "@tsed/core"; import {OpenSpec2, OpenSpec3} from "@tsed/openspec"; -import {SpecTypes} from "../domain/SpecTypes"; -import {getSpec, JsonTokenOptions, SpecSerializerOptions} from "./getSpec"; -import {getSpecTypeFromSpec} from "./getSpecType"; -import {mapOpenSpec} from "./mapOpenSpec"; -import {mergeSpec} from "./mergeSpec"; -import {transformToOS2} from "./transformToOS2"; +import {SpecTypes} from "../domain/SpecTypes.js"; +import {getSpec, JsonTokenOptions, SpecSerializerOptions} from "./getSpec.js"; +import {getSpecTypeFromSpec} from "./getSpecType.js"; +import {mapOpenSpec} from "./mapOpenSpec.js"; +import {mergeSpec} from "./mergeSpec.js"; +import {transformToOS2} from "./transformToOS2.js"; export interface GenerateSpecOptions extends Omit { tokens: JsonTokenOptions; diff --git a/packages/specs/schema/src/utils/generics.ts b/packages/specs/schema/src/utils/generics.ts index 7d4344059db..4e61939c08f 100644 --- a/packages/specs/schema/src/utils/generics.ts +++ b/packages/specs/schema/src/utils/generics.ts @@ -1,5 +1,5 @@ import {Type} from "@tsed/core"; -import {JsonSchema} from "../domain/JsonSchema"; +import {JsonSchema} from "../domain/JsonSchema.js"; export type GenericValue = Type | JsonSchema | any; diff --git a/packages/specs/schema/src/utils/getComputedType.spec.ts b/packages/specs/schema/src/utils/getComputedType.spec.ts index 4d609a0854f..32966b079c8 100644 --- a/packages/specs/schema/src/utils/getComputedType.spec.ts +++ b/packages/specs/schema/src/utils/getComputedType.spec.ts @@ -1,4 +1,4 @@ -import {getComputedType} from "./getComputedType"; +import {getComputedType} from "./getComputedType.js"; describe("getComputedType", () => { it("should return the right class (String)", () => { diff --git a/packages/specs/schema/src/utils/getInheritedStores.spec.ts b/packages/specs/schema/src/utils/getInheritedStores.spec.ts index e9ab3968ec3..d7c042a95bb 100644 --- a/packages/specs/schema/src/utils/getInheritedStores.spec.ts +++ b/packages/specs/schema/src/utils/getInheritedStores.spec.ts @@ -1,6 +1,6 @@ import {StoreSet} from "@tsed/core"; -import {OperationPath} from "../decorators/operations/operationPath"; -import {getInheritedStores} from "./getInheritedStores"; +import {OperationPath} from "../decorators/operations/operationPath.js"; +import {getInheritedStores} from "./getInheritedStores.js"; describe("getInheritedStores", () => { it("should return inherited store", () => { diff --git a/packages/specs/schema/src/utils/getInheritedStores.ts b/packages/specs/schema/src/utils/getInheritedStores.ts index 911a9c65318..6708ea69922 100644 --- a/packages/specs/schema/src/utils/getInheritedStores.ts +++ b/packages/specs/schema/src/utils/getInheritedStores.ts @@ -1,6 +1,6 @@ import {ancestorsOf, Type} from "@tsed/core"; -import type {JsonClassStore} from "../domain/JsonClassStore"; -import {getJsonEntityStore} from "./getJsonEntityStore"; +import type {JsonClassStore} from "../domain/JsonClassStore.js"; +import {getJsonEntityStore} from "./getJsonEntityStore.js"; /** * Return store and his inherited stores diff --git a/packages/specs/schema/src/utils/getJsonEntityStore.ts b/packages/specs/schema/src/utils/getJsonEntityStore.ts index fdf193022ab..fd4d1c1d332 100644 --- a/packages/specs/schema/src/utils/getJsonEntityStore.ts +++ b/packages/specs/schema/src/utils/getJsonEntityStore.ts @@ -1,9 +1,9 @@ import {DecoratorTypes, Type} from "@tsed/core"; -import {JsonEntitiesContainer, JsonEntityStore} from "../domain/JsonEntityStore"; -import {JsonClassStore} from "../domain/JsonClassStore"; -import {JsonPropertyStore} from "../domain/JsonPropertyStore"; -import {JsonParameterStore} from "../domain/JsonParameterStore"; -import {JsonMethodStore} from "../domain/JsonMethodStore"; +import {JsonEntitiesContainer, JsonEntityStore} from "../domain/JsonEntityStore.js"; +import {JsonClassStore} from "../domain/JsonClassStore.js"; +import {JsonPropertyStore} from "../domain/JsonPropertyStore.js"; +import {JsonParameterStore} from "../domain/JsonParameterStore.js"; +import {JsonMethodStore} from "../domain/JsonMethodStore.js"; JsonEntitiesContainer.set(DecoratorTypes.CLASS, JsonClassStore); JsonEntitiesContainer.set(DecoratorTypes.PROP, JsonPropertyStore); diff --git a/packages/specs/schema/src/utils/getJsonPathParameters.spec.ts b/packages/specs/schema/src/utils/getJsonPathParameters.spec.ts index c1a577e8636..b58357d625e 100644 --- a/packages/specs/schema/src/utils/getJsonPathParameters.spec.ts +++ b/packages/specs/schema/src/utils/getJsonPathParameters.spec.ts @@ -1,4 +1,4 @@ -import {getJsonPathParameters} from "./getJsonPathParameters"; +import {getJsonPathParameters} from "./getJsonPathParameters.js"; describe("getJsonPathParameters", () => { it("should return params and path(1)", () => { diff --git a/packages/specs/schema/src/utils/getJsonSchema.spec.ts b/packages/specs/schema/src/utils/getJsonSchema.spec.ts index de8bc4a89ae..1db0bd8f70b 100644 --- a/packages/specs/schema/src/utils/getJsonSchema.spec.ts +++ b/packages/specs/schema/src/utils/getJsonSchema.spec.ts @@ -1,6 +1,6 @@ import {ancestorsOf, nameOf, Type} from "@tsed/core"; -import {Post} from "../../test/helpers/Post"; -import {CollectionOf, Email, Format, getJsonSchema, JsonEntityStore, MinLength, Name, Property, Required} from "../index"; +import {Post} from "../../test/helpers/Post.js"; +import {CollectionOf, Email, Format, getJsonSchema, JsonEntityStore, MinLength, Name, Property, Required} from "../index.js"; describe("getJsonSchema", () => { it("should declare all schema correctly (basic)", () => { diff --git a/packages/specs/schema/src/utils/getJsonSchema.ts b/packages/specs/schema/src/utils/getJsonSchema.ts index 9509961b36d..f0396aeef95 100644 --- a/packages/specs/schema/src/utils/getJsonSchema.ts +++ b/packages/specs/schema/src/utils/getJsonSchema.ts @@ -1,10 +1,10 @@ import {getValue, Type} from "@tsed/core"; import "../components/index"; -import type {JsonEntityStore} from "../domain/JsonEntityStore"; -import {SpecTypes} from "../domain/SpecTypes"; -import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions"; -import {execMapper} from "../registries/JsonSchemaMapperContainer"; -import {getJsonEntityStore} from "./getJsonEntityStore"; +import type {JsonEntityStore} from "../domain/JsonEntityStore.js"; +import {SpecTypes} from "../domain/SpecTypes.js"; +import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; +import {execMapper} from "../registries/JsonSchemaMapperContainer.js"; +import {getJsonEntityStore} from "./getJsonEntityStore.js"; /** * @ignore diff --git a/packages/specs/schema/src/utils/getJsonType.spec.ts b/packages/specs/schema/src/utils/getJsonType.spec.ts index ecabf31f454..d8747d38bad 100644 --- a/packages/specs/schema/src/utils/getJsonType.spec.ts +++ b/packages/specs/schema/src/utils/getJsonType.spec.ts @@ -1,4 +1,4 @@ -import {getJsonType} from "./getJsonType"; +import {getJsonType} from "./getJsonType.js"; describe("getJsonType", () => { it("should return file", () => { diff --git a/packages/specs/schema/src/utils/getOperationsRoutes.spec.ts b/packages/specs/schema/src/utils/getOperationsRoutes.spec.ts index f9bf5b8d43d..3aa9cd765d0 100644 --- a/packages/specs/schema/src/utils/getOperationsRoutes.spec.ts +++ b/packages/specs/schema/src/utils/getOperationsRoutes.spec.ts @@ -1,10 +1,10 @@ import {StoreSet} from "@tsed/core"; -import {Children} from "../decorators/class/children"; -import {In} from "../decorators/operations/in"; -import {Path} from "../decorators/operations/path"; -import {All, Get} from "../decorators/operations/route"; -import {JsonOperationRoute} from "../domain/JsonOperationRoute"; -import {getOperationsRoutes} from "./getOperationsRoutes"; +import {Children} from "../decorators/class/children.js"; +import {In} from "../decorators/operations/in.js"; +import {Path} from "../decorators/operations/path.js"; +import {All, Get} from "../decorators/operations/route.js"; +import {JsonOperationRoute} from "../domain/JsonOperationRoute.js"; +import {getOperationsRoutes} from "./getOperationsRoutes.js"; function getData(operationRoute: JsonOperationRoute) { return { diff --git a/packages/specs/schema/src/utils/getOperationsRoutes.ts b/packages/specs/schema/src/utils/getOperationsRoutes.ts index 4dfe4c13266..6cfbb187a0b 100644 --- a/packages/specs/schema/src/utils/getOperationsRoutes.ts +++ b/packages/specs/schema/src/utils/getOperationsRoutes.ts @@ -1,11 +1,11 @@ import {Type} from "@tsed/core"; -import {OperationVerbs} from "../constants/OperationVerbs"; -import {JsonEntityStore} from "../domain/JsonEntityStore"; -import {JsonMethodStore} from "../domain/JsonMethodStore"; -import {JsonOperationRoute} from "../domain/JsonOperationRoute"; -import {concatPath} from "./concatPath"; -import {getJsonEntityStore} from "./getJsonEntityStore"; -import {getOperationsStores} from "./getOperationsStores"; +import {OperationVerbs} from "../constants/OperationVerbs.js"; +import {JsonEntityStore} from "../domain/JsonEntityStore.js"; +import {JsonMethodStore} from "../domain/JsonMethodStore.js"; +import {JsonOperationRoute} from "../domain/JsonOperationRoute.js"; +import {concatPath} from "./concatPath.js"; +import {getJsonEntityStore} from "./getJsonEntityStore.js"; +import {getOperationsStores} from "./getOperationsStores.js"; export interface GetOperationsRoutesOptions { withChildren?: boolean; diff --git a/packages/specs/schema/src/utils/getOperationsStore.spec.ts b/packages/specs/schema/src/utils/getOperationsStore.spec.ts index 30a2b0a5d41..ddb92802e73 100644 --- a/packages/specs/schema/src/utils/getOperationsStore.spec.ts +++ b/packages/specs/schema/src/utils/getOperationsStore.spec.ts @@ -1,5 +1,5 @@ import {StoreSet} from "@tsed/core"; -import {getOperationsStores, OperationPath} from "../index"; +import {getOperationsStores, OperationPath} from "../index.js"; describe("getOperationsStore", () => { it("should return operation with right order", () => { diff --git a/packages/specs/schema/src/utils/getOperationsStores.ts b/packages/specs/schema/src/utils/getOperationsStores.ts index 54aaef19af4..ce04652ee5e 100644 --- a/packages/specs/schema/src/utils/getOperationsStores.ts +++ b/packages/specs/schema/src/utils/getOperationsStores.ts @@ -1,9 +1,9 @@ import {Type} from "@tsed/core"; -import {JsonMethodStore} from "../domain/JsonMethodStore"; -import type {JsonClassStore} from "../domain/JsonClassStore"; -import {JsonOperationPathsMap} from "../domain/JsonOperationPathsMap"; -import {getInheritedStores} from "./getInheritedStores"; -import {getJsonEntityStore} from "./getJsonEntityStore"; +import {JsonMethodStore} from "../domain/JsonMethodStore.js"; +import type {JsonClassStore} from "../domain/JsonClassStore.js"; +import {JsonOperationPathsMap} from "../domain/JsonOperationPathsMap.js"; +import {getInheritedStores} from "./getInheritedStores.js"; +import {getJsonEntityStore} from "./getJsonEntityStore.js"; /** * @ignore diff --git a/packages/specs/schema/src/utils/getPropertiesStores.spec.ts b/packages/specs/schema/src/utils/getPropertiesStores.spec.ts index 38dbc244ced..1d781527571 100644 --- a/packages/specs/schema/src/utils/getPropertiesStores.spec.ts +++ b/packages/specs/schema/src/utils/getPropertiesStores.spec.ts @@ -1,8 +1,8 @@ -import {Email} from "../decorators/common/format"; -import {Ignore} from "../decorators/common/ignore"; -import {Property} from "../decorators/common/property"; -import {Required} from "../decorators/common/required"; -import {getProperties, getPropertiesStores} from "./getPropertiesStores"; +import {Email} from "../decorators/common/format.js"; +import {Ignore} from "../decorators/common/ignore.js"; +import {Property} from "../decorators/common/property.js"; +import {Required} from "../decorators/common/required.js"; +import {getProperties, getPropertiesStores} from "./getPropertiesStores.js"; class Base { @Property() diff --git a/packages/specs/schema/src/utils/getPropertiesStores.ts b/packages/specs/schema/src/utils/getPropertiesStores.ts index fe7589787e3..377da5483e5 100644 --- a/packages/specs/schema/src/utils/getPropertiesStores.ts +++ b/packages/specs/schema/src/utils/getPropertiesStores.ts @@ -1,9 +1,9 @@ import {isBoolean, Type} from "@tsed/core"; -import type {JsonClassStore} from "../domain/JsonClassStore"; -import type {JsonPropertyStore} from "../domain/JsonPropertyStore"; -import {alterIgnore} from "../hooks/alterIgnore"; -import {getInheritedStores} from "./getInheritedStores"; -import {getJsonEntityStore} from "./getJsonEntityStore"; +import type {JsonClassStore} from "../domain/JsonClassStore.js"; +import type {JsonPropertyStore} from "../domain/JsonPropertyStore.js"; +import {alterIgnore} from "../hooks/alterIgnore.js"; +import {getInheritedStores} from "./getInheritedStores.js"; +import {getJsonEntityStore} from "./getJsonEntityStore.js"; /** * Return the list of properties including properties from inherited classes diff --git a/packages/specs/schema/src/utils/getRequiredProperties.ts b/packages/specs/schema/src/utils/getRequiredProperties.ts index 966c023d67f..3403a7d80a0 100644 --- a/packages/specs/schema/src/utils/getRequiredProperties.ts +++ b/packages/specs/schema/src/utils/getRequiredProperties.ts @@ -1,7 +1,7 @@ import {uniq} from "@tsed/core"; -import type {JsonSchema} from "../domain/JsonSchema"; -import {alterRequiredGroups} from "../hooks/alterRequiredGroups"; -import type {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions"; +import type {JsonSchema} from "../domain/JsonSchema.js"; +import {alterRequiredGroups} from "../hooks/alterRequiredGroups.js"; +import type {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; function applyStringRule(obj: any, propSchema: JsonSchema) { if (!propSchema?.$allow.includes("")) { diff --git a/packages/specs/schema/src/utils/getSpec.spec.ts b/packages/specs/schema/src/utils/getSpec.spec.ts index 5fb67f5d222..b23fa32e744 100644 --- a/packages/specs/schema/src/utils/getSpec.spec.ts +++ b/packages/specs/schema/src/utils/getSpec.spec.ts @@ -1,16 +1,16 @@ -import {validateSpec} from "../../test/helpers/validateSpec"; -import {CollectionOf} from "../decorators/collections/collectionOf"; -import {Min} from "../decorators/common/minimum"; -import {Name} from "../decorators/common/name"; -import {Property} from "../decorators/common/property"; -import {Required} from "../decorators/common/required"; -import {Consumes} from "../decorators/operations/consumes"; -import {In} from "../decorators/operations/in"; -import {OperationPath} from "../decorators/operations/operationPath"; -import {Returns} from "../decorators/operations/returns"; -import {JsonParameterTypes} from "../domain/JsonParameterTypes"; -import {SpecTypes} from "../domain/SpecTypes"; -import {getSpec} from "./getSpec"; +import {validateSpec} from "../../test/helpers/validateSpec.js"; +import {CollectionOf} from "../decorators/collections/collectionOf.js"; +import {Min} from "../decorators/common/minimum.js"; +import {Name} from "../decorators/common/name.js"; +import {Property} from "../decorators/common/property.js"; +import {Required} from "../decorators/common/required.js"; +import {Consumes} from "../decorators/operations/consumes.js"; +import {In} from "../decorators/operations/in.js"; +import {OperationPath} from "../decorators/operations/operationPath.js"; +import {Returns} from "../decorators/operations/returns.js"; +import {JsonParameterTypes} from "../domain/JsonParameterTypes.js"; +import {SpecTypes} from "../domain/SpecTypes.js"; +import {getSpec} from "./getSpec.js"; describe("getSpec()", () => { describe("with on controller", () => { diff --git a/packages/specs/schema/src/utils/getSpec.ts b/packages/specs/schema/src/utils/getSpec.ts index 0d830606ba7..83dbe90f429 100644 --- a/packages/specs/schema/src/utils/getSpec.ts +++ b/packages/specs/schema/src/utils/getSpec.ts @@ -1,11 +1,11 @@ import {cleanObject, isArray, Type, uniqBy} from "@tsed/core"; import {OpenSpec3} from "@tsed/openspec"; -import {SpecTypes} from "../domain/SpecTypes"; -import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions"; -import {execMapper} from "../registries/JsonSchemaMapperContainer"; -import {getJsonEntityStore} from "./getJsonEntityStore"; -import {mergeSpec} from "./mergeSpec"; -import {operationIdFormatter} from "./operationIdFormatter"; +import {SpecTypes} from "../domain/SpecTypes.js"; +import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; +import {execMapper} from "../registries/JsonSchemaMapperContainer.js"; +import {getJsonEntityStore} from "./getJsonEntityStore.js"; +import {mergeSpec} from "./mergeSpec.js"; +import {operationIdFormatter} from "./operationIdFormatter.js"; export type JsonTokenOptions = ({token: Type} & Partial)[]; diff --git a/packages/specs/schema/src/utils/getSpecType.spec.ts b/packages/specs/schema/src/utils/getSpecType.spec.ts index 13ea27a24ac..5170e70e76a 100644 --- a/packages/specs/schema/src/utils/getSpecType.spec.ts +++ b/packages/specs/schema/src/utils/getSpecType.spec.ts @@ -1,5 +1,5 @@ -import {SpecTypes} from "../domain/SpecTypes"; -import {getSpecType, getSpecTypeFromSpec} from "./getSpecType"; +import {SpecTypes} from "../domain/SpecTypes.js"; +import {getSpecType, getSpecTypeFromSpec} from "./getSpecType.js"; describe("getSpecType", () => { it("should return spect type from version", () => { diff --git a/packages/specs/schema/src/utils/getSpecType.ts b/packages/specs/schema/src/utils/getSpecType.ts index f0802c17850..4e3cd232432 100644 --- a/packages/specs/schema/src/utils/getSpecType.ts +++ b/packages/specs/schema/src/utils/getSpecType.ts @@ -1,5 +1,5 @@ import {OpenSpec2, OpenSpec3} from "@tsed/openspec"; -import {SpecTypes} from "../domain/SpecTypes"; +import {SpecTypes} from "../domain/SpecTypes.js"; /** * @ignore diff --git a/packages/specs/schema/src/utils/inlineEnums.spec.ts b/packages/specs/schema/src/utils/inlineEnums.spec.ts index 3e94bc7ec25..27c6250953c 100644 --- a/packages/specs/schema/src/utils/inlineEnums.spec.ts +++ b/packages/specs/schema/src/utils/inlineEnums.spec.ts @@ -1,4 +1,4 @@ -import {inlineEnums} from "./inlineEnums"; +import {inlineEnums} from "./inlineEnums.js"; describe("inlineEnums()", () => { it("should inline enums", () => { diff --git a/packages/specs/schema/src/utils/inlineEnums.ts b/packages/specs/schema/src/utils/inlineEnums.ts index 8f84d6760eb..3e6d05ac8fc 100644 --- a/packages/specs/schema/src/utils/inlineEnums.ts +++ b/packages/specs/schema/src/utils/inlineEnums.ts @@ -1,5 +1,5 @@ -import {JsonSchema} from "../domain/JsonSchema"; -import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions"; +import {JsonSchema} from "../domain/JsonSchema.js"; +import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; export function inlineEnums(obj: any, schema: JsonSchema, options: JsonSchemaOptions) { if (options.inlineEnums && obj.enum?.$isJsonDocument) { diff --git a/packages/specs/schema/src/utils/isSuccessStatus.spec.ts b/packages/specs/schema/src/utils/isSuccessStatus.spec.ts index 759b3f3653b..ef1066b0e4d 100644 --- a/packages/specs/schema/src/utils/isSuccessStatus.spec.ts +++ b/packages/specs/schema/src/utils/isSuccessStatus.spec.ts @@ -1,4 +1,4 @@ -import {isRedirectionStatus, isSuccessStatus} from "./isSuccessStatus"; +import {isRedirectionStatus, isSuccessStatus} from "./isSuccessStatus.js"; describe("isSuccessStatus", () => { it("should be a valid success status", () => { diff --git a/packages/specs/schema/src/utils/mapHeaders.spec.ts b/packages/specs/schema/src/utils/mapHeaders.spec.ts index a54dd2ecadb..7f7309c8b59 100644 --- a/packages/specs/schema/src/utils/mapHeaders.spec.ts +++ b/packages/specs/schema/src/utils/mapHeaders.spec.ts @@ -1,4 +1,4 @@ -import {mapHeaders} from "./mapHeaders"; +import {mapHeaders} from "./mapHeaders.js"; describe("mapHeaders", () => { it("should map headers", () => { diff --git a/packages/specs/schema/src/utils/mapHeaders.ts b/packages/specs/schema/src/utils/mapHeaders.ts index d12ef2f09ba..e0c7742714f 100644 --- a/packages/specs/schema/src/utils/mapHeaders.ts +++ b/packages/specs/schema/src/utils/mapHeaders.ts @@ -1,5 +1,5 @@ import {cleanObject} from "@tsed/core"; -import {JsonHeader, JsonHeaders} from "../interfaces/JsonOpenSpec"; +import {JsonHeader, JsonHeaders} from "../interfaces/JsonOpenSpec.js"; /** * Map input header to a standard open spec header diff --git a/packages/specs/schema/src/utils/mapNullableType.ts b/packages/specs/schema/src/utils/mapNullableType.ts index 7e56a22771c..86842fa0679 100644 --- a/packages/specs/schema/src/utils/mapNullableType.ts +++ b/packages/specs/schema/src/utils/mapNullableType.ts @@ -1,7 +1,7 @@ import {uniq} from "@tsed/core"; -import type {JsonSchema} from "../domain/JsonSchema"; -import {SpecTypes} from "../domain/SpecTypes"; -import type {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions"; +import type {JsonSchema} from "../domain/JsonSchema.js"; +import {SpecTypes} from "../domain/SpecTypes.js"; +import type {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; function hasNullable(obj: any) { return obj.oneOf.find((o: any) => o.type === "null"); diff --git a/packages/specs/schema/src/utils/mapOpenSpec.ts b/packages/specs/schema/src/utils/mapOpenSpec.ts index eb2ba08ca32..0b392d5ee2e 100644 --- a/packages/specs/schema/src/utils/mapOpenSpec.ts +++ b/packages/specs/schema/src/utils/mapOpenSpec.ts @@ -1,10 +1,10 @@ import {getValue, setValue} from "@tsed/core"; import {OpenSpec2, OpenSpec3, OpenSpecVersions} from "@tsed/openspec"; -import {getSpecType} from "./getSpecType"; -import {mapOpenSpec2} from "./mapOpenSpec2"; -import {SpecTypes} from "../domain/SpecTypes"; -import {mapOpenSpec3} from "./mapOpenSpec3"; -import {mergeSpec} from "./mergeSpec"; +import {getSpecType} from "./getSpecType.js"; +import {mapOpenSpec2} from "./mapOpenSpec2.js"; +import {SpecTypes} from "../domain/SpecTypes.js"; +import {mapOpenSpec3} from "./mapOpenSpec3.js"; +import {mergeSpec} from "./mergeSpec.js"; /** * @ignore diff --git a/packages/specs/schema/src/utils/mapOpenSpec2.ts b/packages/specs/schema/src/utils/mapOpenSpec2.ts index 9ce17116e29..469adaaed70 100644 --- a/packages/specs/schema/src/utils/mapOpenSpec2.ts +++ b/packages/specs/schema/src/utils/mapOpenSpec2.ts @@ -1,6 +1,6 @@ import {getValue, uniq} from "@tsed/core"; import {OpenSpec2} from "@tsed/openspec"; -import {mapOpenSpecInfo} from "./mapOpenSpecInfo"; +import {mapOpenSpecInfo} from "./mapOpenSpecInfo.js"; /** * @ignore diff --git a/packages/specs/schema/src/utils/mapOpenSpec3.ts b/packages/specs/schema/src/utils/mapOpenSpec3.ts index 1fd958bad35..1557bbf0e75 100644 --- a/packages/specs/schema/src/utils/mapOpenSpec3.ts +++ b/packages/specs/schema/src/utils/mapOpenSpec3.ts @@ -1,6 +1,6 @@ import {getValue} from "@tsed/core"; import {OpenSpec3} from "@tsed/openspec"; -import {mapOpenSpecInfo} from "./mapOpenSpecInfo"; +import {mapOpenSpecInfo} from "./mapOpenSpecInfo.js"; /** * @ignore diff --git a/packages/specs/schema/src/utils/mapOperationOptions.ts b/packages/specs/schema/src/utils/mapOperationOptions.ts index c0615e29cb4..1a1ef2cc88f 100644 --- a/packages/specs/schema/src/utils/mapOperationOptions.ts +++ b/packages/specs/schema/src/utils/mapOperationOptions.ts @@ -1,4 +1,4 @@ -import {OperationVerbs} from "../constants/OperationVerbs"; +import {OperationVerbs} from "../constants/OperationVerbs.js"; const ALLOWED_VERBS = new Set([ ...Object.keys(OperationVerbs) diff --git a/packages/specs/schema/src/utils/matchGroups.spec.ts b/packages/specs/schema/src/utils/matchGroups.spec.ts index 49b5efb0640..405526ba9d7 100644 --- a/packages/specs/schema/src/utils/matchGroups.spec.ts +++ b/packages/specs/schema/src/utils/matchGroups.spec.ts @@ -1,4 +1,4 @@ -import {matchGroups} from "./matchGroups"; +import {matchGroups} from "./matchGroups.js"; describe("matchGroups", () => { it.each([ diff --git a/packages/specs/schema/src/utils/mergeSpec.spec.ts b/packages/specs/schema/src/utils/mergeSpec.spec.ts index 9bb59e1bc08..8d1525db225 100644 --- a/packages/specs/schema/src/utils/mergeSpec.spec.ts +++ b/packages/specs/schema/src/utils/mergeSpec.spec.ts @@ -1,5 +1,5 @@ import {OpenSpec2, OpenSpec3} from "@tsed/openspec"; -import {mergeSpec} from "./mergeSpec"; +import {mergeSpec} from "./mergeSpec.js"; describe("mergeSpec", () => { describe("security", () => { diff --git a/packages/specs/schema/src/utils/operationIdFormatter.spec.ts b/packages/specs/schema/src/utils/operationIdFormatter.spec.ts index 0f0250f05c6..a1b826af4f9 100644 --- a/packages/specs/schema/src/utils/operationIdFormatter.spec.ts +++ b/packages/specs/schema/src/utils/operationIdFormatter.spec.ts @@ -1,4 +1,4 @@ -import {operationIdFormatter} from "./operationIdFormatter"; +import {operationIdFormatter} from "./operationIdFormatter.js"; describe("operationIdFormatter", () => { it("should define new OperationId", () => { diff --git a/packages/specs/schema/src/utils/operationIdFormatter.ts b/packages/specs/schema/src/utils/operationIdFormatter.ts index 84ec97e687c..75c9d7a7c6a 100644 --- a/packages/specs/schema/src/utils/operationIdFormatter.ts +++ b/packages/specs/schema/src/utils/operationIdFormatter.ts @@ -1,5 +1,5 @@ import {camelCase} from "change-case"; -import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions"; +import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; const DEFAULT_PATTERN = "%c.%m"; diff --git a/packages/specs/schema/src/utils/ref.ts b/packages/specs/schema/src/utils/ref.ts index 0168fff3b35..cecfd872f70 100644 --- a/packages/specs/schema/src/utils/ref.ts +++ b/packages/specs/schema/src/utils/ref.ts @@ -1,8 +1,8 @@ import {cleanObject, setValue} from "@tsed/core"; import {pascalCase} from "change-case"; -import type {JsonSchema} from "../domain/JsonSchema"; -import {SpecTypes} from "../domain/SpecTypes"; -import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions"; +import type {JsonSchema} from "../domain/JsonSchema.js"; +import {SpecTypes} from "../domain/SpecTypes.js"; +import {JsonSchemaOptions} from "../interfaces/JsonSchemaOptions.js"; /** * ignore diff --git a/packages/specs/schema/src/utils/removeHiddenOperation.ts b/packages/specs/schema/src/utils/removeHiddenOperation.ts index ee71d14c680..7787d742386 100644 --- a/packages/specs/schema/src/utils/removeHiddenOperation.ts +++ b/packages/specs/schema/src/utils/removeHiddenOperation.ts @@ -1,4 +1,4 @@ -import {JsonMethodStore} from "../domain/JsonMethodStore"; +import {JsonMethodStore} from "../domain/JsonMethodStore.js"; export function removeHiddenOperation(operationStore: JsonMethodStore) { return !operationStore.store.get("hidden"); diff --git a/packages/specs/schema/src/utils/toJsonMapCollection.spec.ts b/packages/specs/schema/src/utils/toJsonMapCollection.spec.ts index ad6ef521f5f..24447553e7e 100644 --- a/packages/specs/schema/src/utils/toJsonMapCollection.spec.ts +++ b/packages/specs/schema/src/utils/toJsonMapCollection.spec.ts @@ -1,5 +1,5 @@ -import {JsonMap} from "../domain/JsonMap"; -import {toJsonMapCollection} from "./toJsonMapCollection"; +import {JsonMap} from "../domain/JsonMap.js"; +import {toJsonMapCollection} from "./toJsonMapCollection.js"; describe("toJsonMapCollection", () => { it("should transform object to JsonMapCollection", () => { diff --git a/packages/specs/schema/src/utils/toJsonMapCollection.ts b/packages/specs/schema/src/utils/toJsonMapCollection.ts index 1fcb671eebd..fe7306c15a7 100644 --- a/packages/specs/schema/src/utils/toJsonMapCollection.ts +++ b/packages/specs/schema/src/utils/toJsonMapCollection.ts @@ -1,4 +1,4 @@ -import {JsonMap} from "../domain/JsonMap"; +import {JsonMap} from "../domain/JsonMap.js"; /** * @ignore diff --git a/packages/specs/schema/src/utils/transformToOS2.spec.ts b/packages/specs/schema/src/utils/transformToOS2.spec.ts index 85ee6601345..407f7960855 100644 --- a/packages/specs/schema/src/utils/transformToOS2.spec.ts +++ b/packages/specs/schema/src/utils/transformToOS2.spec.ts @@ -1,30 +1,30 @@ -import {transformSecurity, transformToOS2} from "./transformToOS2"; -import commonParamsOS3 from "./__mock__/common_params/os3.spec.json"; -import commonParamsOS2 from "./__mock__/common_params/os2.spec.json"; -import deprecatedOS3 from "./__mock__/deprecated/os3.spec.json"; -import deprecatedOS2 from "./__mock__/deprecated/os2.spec.json"; -import formParamOS3 from "./__mock__/form_param/os3.spec.json"; -import formParamOS2 from "./__mock__/form_param/os2.spec.json"; -import minimalOS3 from "./__mock__/minimal/os3.spec.json"; -import minimalOS2 from "./__mock__/minimal/os2.spec.json"; -import multipleRefOS3 from "./__mock__/multiple_ref/os3.spec.json"; -import multipleRefOS2 from "./__mock__/multiple_ref/os2.spec.json"; -import nestedOneOfOS3 from "./__mock__/nested_oneof/os3.spec.json"; -import nestedOneOfOS2 from "./__mock__/nested_oneof/os2.spec.json"; -import nullableOS3 from "./__mock__/nullable/os3.spec.json"; -import nullableOS2 from "./__mock__/nullable/os2.spec.json"; -import paramSchemaRefOS3 from "./__mock__/param_schema_ref/os3.spec.json"; -import paramSchemaRefOS2 from "./__mock__/param_schema_ref/os2.spec.json"; -import petstoreOS3 from "./__mock__/petstore/os3.spec.json"; -import petstoreOS2 from "./__mock__/petstore/os2.spec.json"; -import producesOS3 from "./__mock__/produces/os3.spec.json"; -import producesOS2 from "./__mock__/produces/os2.spec.json"; -import requestResponseRefOS3 from "./__mock__/request_response_ref/os3.spec.json"; -import requestResponseRefOS2 from "./__mock__/request_response_ref/os2.spec.json"; -import serversOS3 from "./__mock__/servers/os3.spec.json"; -import serversOS2 from "./__mock__/servers/os2.spec.json"; -import slashRefOS3 from "./__mock__/slash_ref/os3.spec.json"; -import slashRefOS2 from "./__mock__/slash_ref/os2.spec.json"; +import {transformSecurity, transformToOS2} from "./transformToOS2.js"; +import commonParamsOS3 from "./__mock__/common_params/os3.spec.json.js"; +import commonParamsOS2 from "./__mock__/common_params/os2.spec.json.js"; +import deprecatedOS3 from "./__mock__/deprecated/os3.spec.json.js"; +import deprecatedOS2 from "./__mock__/deprecated/os2.spec.json.js"; +import formParamOS3 from "./__mock__/form_param/os3.spec.json.js"; +import formParamOS2 from "./__mock__/form_param/os2.spec.json.js"; +import minimalOS3 from "./__mock__/minimal/os3.spec.json.js"; +import minimalOS2 from "./__mock__/minimal/os2.spec.json.js"; +import multipleRefOS3 from "./__mock__/multiple_ref/os3.spec.json.js"; +import multipleRefOS2 from "./__mock__/multiple_ref/os2.spec.json.js"; +import nestedOneOfOS3 from "./__mock__/nested_oneof/os3.spec.json.js"; +import nestedOneOfOS2 from "./__mock__/nested_oneof/os2.spec.json.js"; +import nullableOS3 from "./__mock__/nullable/os3.spec.json.js"; +import nullableOS2 from "./__mock__/nullable/os2.spec.json.js"; +import paramSchemaRefOS3 from "./__mock__/param_schema_ref/os3.spec.json.js"; +import paramSchemaRefOS2 from "./__mock__/param_schema_ref/os2.spec.json.js"; +import petstoreOS3 from "./__mock__/petstore/os3.spec.json.js"; +import petstoreOS2 from "./__mock__/petstore/os2.spec.json.js"; +import producesOS3 from "./__mock__/produces/os3.spec.json.js"; +import producesOS2 from "./__mock__/produces/os2.spec.json.js"; +import requestResponseRefOS3 from "./__mock__/request_response_ref/os3.spec.json.js"; +import requestResponseRefOS2 from "./__mock__/request_response_ref/os2.spec.json.js"; +import serversOS3 from "./__mock__/servers/os3.spec.json.js"; +import serversOS2 from "./__mock__/servers/os2.spec.json.js"; +import slashRefOS3 from "./__mock__/slash_ref/os3.spec.json.js"; +import slashRefOS2 from "./__mock__/slash_ref/os2.spec.json.js"; describe("transform", () => { describe("transformSecurity()", () => { diff --git a/packages/specs/schema/src/utils/withErrorMsg.spec.ts b/packages/specs/schema/src/utils/withErrorMsg.spec.ts index 6e054c10bf6..abd23ef4445 100644 --- a/packages/specs/schema/src/utils/withErrorMsg.spec.ts +++ b/packages/specs/schema/src/utils/withErrorMsg.spec.ts @@ -1,4 +1,4 @@ -import {withErrorMsg} from "./withErrorMsg"; +import {withErrorMsg} from "./withErrorMsg.js"; // TODO: complete this test describe("withErrorMsg", () => { diff --git a/packages/specs/schema/src/utils/withErrorMsg.ts b/packages/specs/schema/src/utils/withErrorMsg.ts index afc2177ec93..e16aae5b4ba 100644 --- a/packages/specs/schema/src/utils/withErrorMsg.ts +++ b/packages/specs/schema/src/utils/withErrorMsg.ts @@ -1,5 +1,5 @@ import {deepMerge, useDecorators} from "@tsed/core"; -import {JsonEntityFn} from "../decorators/common/jsonEntityFn"; +import {JsonEntityFn} from "../decorators/common/jsonEntityFn.js"; export interface ErrorChainedMethods { (target: Object, propertyKey?: string | symbol | undefined, descriptor?: TypedPropertyDescriptor | number): any; diff --git a/packages/specs/schema/test/helpers/Post.ts b/packages/specs/schema/test/helpers/Post.ts index be694c3c360..fbe98c98537 100644 --- a/packages/specs/schema/test/helpers/Post.ts +++ b/packages/specs/schema/test/helpers/Post.ts @@ -1,5 +1,5 @@ import {Property} from "@tsed/schema"; -import {User} from "./User"; +import {User} from "./User.js"; export class Post { @Property() diff --git a/packages/specs/schema/test/helpers/User.ts b/packages/specs/schema/test/helpers/User.ts index 0a250f69046..5f9a03a25eb 100644 --- a/packages/specs/schema/test/helpers/User.ts +++ b/packages/specs/schema/test/helpers/User.ts @@ -1,5 +1,5 @@ import {CollectionOf, Property} from "@tsed/schema"; -import {Post} from "./Post"; +import {Post} from "./Post.js"; export class User { @Property() diff --git a/packages/specs/schema/test/helpers/validateModel.ts b/packages/specs/schema/test/helpers/validateModel.ts index a46eb589640..02606982087 100644 --- a/packages/specs/schema/test/helpers/validateModel.ts +++ b/packages/specs/schema/test/helpers/validateModel.ts @@ -1,8 +1,8 @@ -import {getJsonSchema} from "../../src"; +import {getJsonSchema} from "../../src/index.js"; import Ajv, {Options} from "ajv"; import AjvFormats from "ajv-formats"; import AjvErrors from "ajv-errors"; -import type {JsonSchemaOptions} from "../../src"; +import type {JsonSchemaOptions} from "../../src/index.js"; export function validateModel(data: any, model: any, options: JsonSchemaOptions & Options = {}) { const {errorFormatter, keywords = [], ...props} = options; diff --git a/packages/specs/schema/test/integrations/allowed-groups.integration.spec.ts b/packages/specs/schema/test/integrations/allowed-groups.integration.spec.ts index 3e5c134747c..c9cf331bdd4 100644 --- a/packages/specs/schema/test/integrations/allowed-groups.integration.spec.ts +++ b/packages/specs/schema/test/integrations/allowed-groups.integration.spec.ts @@ -1,5 +1,5 @@ import {Controller} from "@tsed/di"; -import {Get, getSpec, Groups, Property, Returns} from "../../src/index"; +import {Get, getSpec, Groups, Property, Returns} from "../../src/index.js"; class MyModel { @Property() diff --git a/packages/specs/schema/test/integrations/body-params-any.integration.spec.ts b/packages/specs/schema/test/integrations/body-params-any.integration.spec.ts index 50630040274..d01e519c0d1 100644 --- a/packages/specs/schema/test/integrations/body-params-any.integration.spec.ts +++ b/packages/specs/schema/test/integrations/body-params-any.integration.spec.ts @@ -1,7 +1,7 @@ import {MultipartFile, PlatformMulterFile} from "@tsed/common"; import {Controller} from "@tsed/di"; import {BodyParams} from "@tsed/platform-params"; -import {Any, CollectionOf, getSpec, Integer, Post, Property} from "../../src/index"; +import {Any, CollectionOf, getSpec, Integer, Post, Property} from "../../src/index.js"; class MyModel { @Property() diff --git a/packages/specs/schema/test/integrations/body.integration.spec.ts b/packages/specs/schema/test/integrations/body.integration.spec.ts index c548865b0c7..944963694c7 100644 --- a/packages/specs/schema/test/integrations/body.integration.spec.ts +++ b/packages/specs/schema/test/integrations/body.integration.spec.ts @@ -1,6 +1,6 @@ -import {OperationPath, Path, getSpec, SpecTypes} from "../../src/index"; +import {OperationPath, Path, getSpec, SpecTypes} from "../../src/index.js"; import {BodyParams, RawBodyParams} from "@tsed/platform-params"; -import {validateSpec} from "../helpers/validateSpec"; +import {validateSpec} from "../helpers/validateSpec.js"; @Path("/body") class TestBodyCtrl { diff --git a/packages/specs/schema/test/integrations/deep-object-query-params.spec.ts b/packages/specs/schema/test/integrations/deep-object-query-params.spec.ts index 3547a82860a..680225c4d87 100644 --- a/packages/specs/schema/test/integrations/deep-object-query-params.spec.ts +++ b/packages/specs/schema/test/integrations/deep-object-query-params.spec.ts @@ -1,4 +1,4 @@ -import {Default, GenericOf, Generics, getSpec, In, Maximum, Minimum, OperationPath, Path, Property, SpecTypes} from "../../src/index"; +import {Default, GenericOf, Generics, getSpec, In, Maximum, Minimum, OperationPath, Path, Property, SpecTypes} from "../../src/index.js"; import {QueryParams} from "@tsed/platform-params"; describe("Deep Object QueryParams", () => { diff --git a/packages/specs/schema/test/integrations/discriminator.integration.spec.ts b/packages/specs/schema/test/integrations/discriminator.integration.spec.ts index ddd0c081032..2898d8c1460 100644 --- a/packages/specs/schema/test/integrations/discriminator.integration.spec.ts +++ b/packages/specs/schema/test/integrations/discriminator.integration.spec.ts @@ -18,7 +18,7 @@ import { Put, Required, Returns -} from "../../src/index"; +} from "../../src/index.js"; class Event { @DiscriminatorKey() // declare this property a discriminator key diff --git a/packages/specs/schema/test/integrations/dynamicurl.integration.spec.ts b/packages/specs/schema/test/integrations/dynamicurl.integration.spec.ts index a3679b84e83..cb80210056d 100644 --- a/packages/specs/schema/test/integrations/dynamicurl.integration.spec.ts +++ b/packages/specs/schema/test/integrations/dynamicurl.integration.spec.ts @@ -1,5 +1,5 @@ -import {getSpec, In, OperationPath, Path, SpecTypes} from "../../src/index"; -import {validateSpec} from "../helpers/validateSpec"; +import {getSpec, In, OperationPath, Path, SpecTypes} from "../../src/index.js"; +import {validateSpec} from "../helpers/validateSpec.js"; @Path("/dynamic") class TestDynamicUrlCtrl { diff --git a/packages/specs/schema/test/integrations/generics.integration.spec.ts b/packages/specs/schema/test/integrations/generics.integration.spec.ts index f852001667e..564755545d2 100644 --- a/packages/specs/schema/test/integrations/generics.integration.spec.ts +++ b/packages/specs/schema/test/integrations/generics.integration.spec.ts @@ -18,8 +18,8 @@ import { Returns, SpecTypes, string -} from "../../src/index"; -import {validateSpec} from "../helpers/validateSpec"; +} from "../../src/index.js"; +import {validateSpec} from "../helpers/validateSpec.js"; describe("Generics", () => { describe("JsonSchema", () => { diff --git a/packages/specs/schema/test/integrations/inheritance.integration.spec.ts b/packages/specs/schema/test/integrations/inheritance.integration.spec.ts index 272cd739916..d07be2bc34b 100644 --- a/packages/specs/schema/test/integrations/inheritance.integration.spec.ts +++ b/packages/specs/schema/test/integrations/inheritance.integration.spec.ts @@ -1,4 +1,4 @@ -import {getSpec, In, Name, OperationPath, Path, SpecTypes} from "../../src/index"; +import {getSpec, In, Name, OperationPath, Path, SpecTypes} from "../../src/index.js"; import {decorateMethodsOf, DecoratorParameters, decoratorTypeOf, DecoratorTypes, StoreMerge, UnsupportedDecoratorType} from "@tsed/core"; function UseAuth(): Function { diff --git a/packages/specs/schema/test/integrations/lazyref.integration.spec.ts b/packages/specs/schema/test/integrations/lazyref.integration.spec.ts index ad7ab8bdd16..f2aa53d14fe 100644 --- a/packages/specs/schema/test/integrations/lazyref.integration.spec.ts +++ b/packages/specs/schema/test/integrations/lazyref.integration.spec.ts @@ -1,5 +1,5 @@ import {isArrowFn, Type, useDecorators} from "@tsed/core"; -import {getJsonSchema, JsonEntityFn, lazyRef, Property, string} from "../../src/index"; +import {getJsonSchema, JsonEntityFn, lazyRef, Property, string} from "../../src/index.js"; function Ref(model: string | (() => Type) | any): PropertyDecorator { const getType = () => (isArrowFn(model) ? model() : model); diff --git a/packages/specs/schema/test/integrations/multipart.integration.spec.ts b/packages/specs/schema/test/integrations/multipart.integration.spec.ts index 71e0ee507bd..3c1bc363c43 100644 --- a/packages/specs/schema/test/integrations/multipart.integration.spec.ts +++ b/packages/specs/schema/test/integrations/multipart.integration.spec.ts @@ -2,8 +2,8 @@ import {MultipartFile, PlatformMulterFile} from "@tsed/common"; import {Controller} from "@tsed/di"; import {BodyParams} from "@tsed/platform-params"; import {SpecTypes} from "@tsed/schema"; -import {Description, getSpec, Post} from "../../src/index"; -import {validateSpec} from "../helpers/validateSpec"; +import {Description, getSpec, Post} from "../../src/index.js"; +import {validateSpec} from "../helpers/validateSpec.js"; @Controller("/controllers") class MyController { diff --git a/packages/specs/schema/test/integrations/nested-list.integration.spec.ts b/packages/specs/schema/test/integrations/nested-list.integration.spec.ts index 9a38b999dbe..9f9a861463b 100644 --- a/packages/specs/schema/test/integrations/nested-list.integration.spec.ts +++ b/packages/specs/schema/test/integrations/nested-list.integration.spec.ts @@ -1,4 +1,4 @@ -import {CollectionOf, ForwardGroups, getJsonSchema, Name, Required} from "../../src/index"; +import {CollectionOf, ForwardGroups, getJsonSchema, Name, Required} from "../../src/index.js"; class TeamModel { @Required() diff --git a/packages/specs/schema/test/integrations/nullable.integration.spec.ts b/packages/specs/schema/test/integrations/nullable.integration.spec.ts index fde01184444..92673347a73 100644 --- a/packages/specs/schema/test/integrations/nullable.integration.spec.ts +++ b/packages/specs/schema/test/integrations/nullable.integration.spec.ts @@ -1,5 +1,5 @@ -import {Any, getJsonSchema, getSpec, Nullable, OperationPath, Path, Property, Required, Returns, SpecTypes} from "../../src/index"; -import {validateSpec} from "../helpers/validateSpec"; +import {Any, getJsonSchema, getSpec, Nullable, OperationPath, Path, Property, Required, Returns, SpecTypes} from "../../src/index.js"; +import {validateSpec} from "../helpers/validateSpec.js"; class Nested { @Property() diff --git a/packages/specs/schema/test/integrations/oneOf.groups.integration.spec.ts b/packages/specs/schema/test/integrations/oneOf.groups.integration.spec.ts index 2fc75898e2b..918efcc3637 100644 --- a/packages/specs/schema/test/integrations/oneOf.groups.integration.spec.ts +++ b/packages/specs/schema/test/integrations/oneOf.groups.integration.spec.ts @@ -1,4 +1,4 @@ -import {ForwardGroups, getJsonSchema, Groups, OneOf, Property, string} from "../../src/index"; +import {ForwardGroups, getJsonSchema, Groups, OneOf, Property, string} from "../../src/index.js"; // WHEN class One1 { diff --git a/packages/specs/schema/test/integrations/pageable-with-search.integration.spec.ts b/packages/specs/schema/test/integrations/pageable-with-search.integration.spec.ts index 001c748bd9d..ff5153f98d4 100644 --- a/packages/specs/schema/test/integrations/pageable-with-search.integration.spec.ts +++ b/packages/specs/schema/test/integrations/pageable-with-search.integration.spec.ts @@ -1,6 +1,6 @@ -import {array, getJsonSchema, getSpec, In, OneOf, OperationPath, Path, Property, Required, Returns, SpecTypes} from "../../src/index"; -import {validateSpec} from "../helpers/validateSpec"; -import {Pageable} from "./pageable.integration.spec"; +import {array, getJsonSchema, getSpec, In, OneOf, OperationPath, Path, Property, Required, Returns, SpecTypes} from "../../src/index.js"; +import {validateSpec} from "../helpers/validateSpec.js"; +import {Pageable} from "./pageable.integration.spec.js"; class EqualsSearchableString { @Required() diff --git a/packages/specs/schema/test/integrations/pageable.integration.spec.ts b/packages/specs/schema/test/integrations/pageable.integration.spec.ts index 09e6ac87f5b..4f19f2080d8 100644 --- a/packages/specs/schema/test/integrations/pageable.integration.spec.ts +++ b/packages/specs/schema/test/integrations/pageable.integration.spec.ts @@ -19,8 +19,8 @@ import { Returns, SpecTypes, string -} from "../../src/index"; -import {validateSpec} from "../helpers/validateSpec"; +} from "../../src/index.js"; +import {validateSpec} from "../helpers/validateSpec.js"; export class Pageable { @Integer() diff --git a/packages/specs/schema/test/integrations/partial.integration.spec.ts b/packages/specs/schema/test/integrations/partial.integration.spec.ts index 732d5df25e0..c0a67cb1ca0 100644 --- a/packages/specs/schema/test/integrations/partial.integration.spec.ts +++ b/packages/specs/schema/test/integrations/partial.integration.spec.ts @@ -1,6 +1,6 @@ import {Controller} from "@tsed/di"; import {BodyParams} from "@tsed/platform-params"; -import {CollectionOf, Groups, Partial, Patch, Required, Post, getSpec} from "../../src/index"; +import {CollectionOf, Groups, Partial, Patch, Required, Post, getSpec} from "../../src/index.js"; class Product { @Required() diff --git a/packages/specs/schema/test/integrations/petstore.integration.spec.ts b/packages/specs/schema/test/integrations/petstore.integration.spec.ts index e29a403b86f..65a9068638f 100644 --- a/packages/specs/schema/test/integrations/petstore.integration.spec.ts +++ b/packages/specs/schema/test/integrations/petstore.integration.spec.ts @@ -19,7 +19,7 @@ import { Returns, SpecTypes, Subscribe -} from "../../src/index"; +} from "../../src/index.js"; class PetCategory { @Required() diff --git a/packages/specs/schema/test/integrations/query-model-examples.spec.ts b/packages/specs/schema/test/integrations/query-model-examples.spec.ts index bc07320182d..552a2456b5c 100644 --- a/packages/specs/schema/test/integrations/query-model-examples.spec.ts +++ b/packages/specs/schema/test/integrations/query-model-examples.spec.ts @@ -11,7 +11,7 @@ import { Path, Property, SpecTypes -} from "../../src/index"; +} from "../../src/index.js"; import {QueryParams} from "@tsed/platform-params"; class QueryParamModel { diff --git a/packages/specs/schema/test/integrations/response.integration.spec.ts b/packages/specs/schema/test/integrations/response.integration.spec.ts index d3a6efc88bd..48aeab0edb3 100644 --- a/packages/specs/schema/test/integrations/response.integration.spec.ts +++ b/packages/specs/schema/test/integrations/response.integration.spec.ts @@ -1,6 +1,6 @@ import {QueryParams} from "@tsed/platform-params"; -import {getSpec, OperationPath, Path, Property, Returns, SpecTypes} from "../../src/index"; -import {validateSpec} from "../helpers/validateSpec"; +import {getSpec, OperationPath, Path, Property, Returns, SpecTypes} from "../../src/index.js"; +import {validateSpec} from "../helpers/validateSpec.js"; class Product { @Property() diff --git a/packages/specs/schema/test/integrations/union-types.integration.spec.ts b/packages/specs/schema/test/integrations/union-types.integration.spec.ts index 6a157d3ad74..bae444b9ece 100644 --- a/packages/specs/schema/test/integrations/union-types.integration.spec.ts +++ b/packages/specs/schema/test/integrations/union-types.integration.spec.ts @@ -1,5 +1,5 @@ import Ajv from "ajv"; -import {AdditionalProperties, AnyOf, array, Enum, getJsonSchema, string} from "../../src/index"; +import {AdditionalProperties, AnyOf, array, Enum, getJsonSchema, string} from "../../src/index.js"; describe("Union on model", () => { it("should return the expected schema", () => { diff --git a/packages/specs/swagger/readme.md b/packages/specs/swagger/readme.md index 22798da6c6b..fcab7662ff7 100644 --- a/packages/specs/swagger/readme.md +++ b/packages/specs/swagger/readme.md @@ -152,7 +152,7 @@ export class CalendarModel { ```typescript import {BodyParams, Controller, Get, Post, QueryParams, Returns, ReturnsArray, Description} from "@tsed/common"; import {Summary, Deprecated, Security} from "@tsed/swagger"; -import {CalendarModel} from "../models/CalendarModel"; +import {CalendarModel} from "../models/CalendarModel.js"; @Controller("/calendars") export class Calendar { diff --git a/packages/specs/swagger/src/SwaggerModule.spec.ts b/packages/specs/swagger/src/SwaggerModule.spec.ts index 88dc1e244cb..f14f0659b44 100644 --- a/packages/specs/swagger/src/SwaggerModule.spec.ts +++ b/packages/specs/swagger/src/SwaggerModule.spec.ts @@ -1,6 +1,6 @@ import {PlatformRouter, PlatformTest} from "@tsed/common"; import Fs from "fs"; -import {SwaggerModule} from "./SwaggerModule"; +import {SwaggerModule} from "./SwaggerModule.js"; describe("SwaggerModule", () => { beforeEach(() => diff --git a/packages/specs/swagger/src/SwaggerModule.ts b/packages/specs/swagger/src/SwaggerModule.ts index d234fba2115..816fa36c83d 100644 --- a/packages/specs/swagger/src/SwaggerModule.ts +++ b/packages/specs/swagger/src/SwaggerModule.ts @@ -14,13 +14,13 @@ import {normalizePath} from "@tsed/normalize-path"; import {PlatformRouter, useContextHandler} from "@tsed/platform-router"; import Fs from "fs"; import {join} from "path"; -import {ROOT_DIR, SWAGGER_UI_DIST} from "./constants"; -import {SwaggerSettings} from "./interfaces/SwaggerSettings"; -import {cssMiddleware} from "./middlewares/cssMiddleware"; -import {indexMiddleware} from "./middlewares/indexMiddleware"; -import {jsMiddleware} from "./middlewares/jsMiddleware"; -import {redirectMiddleware} from "./middlewares/redirectMiddleware"; -import {SwaggerService} from "./services/SwaggerService"; +import {ROOT_DIR, SWAGGER_UI_DIST} from "./constants.js"; +import {SwaggerSettings} from "./interfaces/SwaggerSettings.js"; +import {cssMiddleware} from "./middlewares/cssMiddleware.js"; +import {indexMiddleware} from "./middlewares/indexMiddleware.js"; +import {jsMiddleware} from "./middlewares/jsMiddleware.js"; +import {redirectMiddleware} from "./middlewares/redirectMiddleware.js"; +import {SwaggerService} from "./services/SwaggerService.js"; /** * @ignore diff --git a/packages/specs/swagger/src/index.ts b/packages/specs/swagger/src/index.ts index 4e274100da4..094271d51d1 100644 --- a/packages/specs/swagger/src/index.ts +++ b/packages/specs/swagger/src/index.ts @@ -2,16 +2,16 @@ * @file Automatically generated by barrelsby. */ -export * from "./SwaggerModule"; -export * from "./constants"; -export * from "./decorators/docs"; -export * from "./decorators/hidden"; -export * from "./interfaces/SwaggerSettings"; -export * from "./interfaces/interfaces"; -export * from "./middlewares/cssMiddleware"; -export * from "./middlewares/indexMiddleware"; -export * from "./middlewares/jsMiddleware"; -export * from "./middlewares/redirectMiddleware"; -export * from "./services/SwaggerService"; -export * from "./utils/includeRoute"; -export * from "./utils/matchPath"; +export * from "./SwaggerModule.js"; +export * from "./constants.js"; +export * from "./decorators/docs.js"; +export * from "./decorators/hidden.js"; +export * from "./interfaces/SwaggerSettings.js"; +export * from "./interfaces/interfaces.js"; +export * from "./middlewares/cssMiddleware.js"; +export * from "./middlewares/indexMiddleware.js"; +export * from "./middlewares/jsMiddleware.js"; +export * from "./middlewares/redirectMiddleware.js"; +export * from "./services/SwaggerService.js"; +export * from "./utils/includeRoute.js"; +export * from "./utils/matchPath.js"; diff --git a/packages/specs/swagger/src/interfaces/interfaces.ts b/packages/specs/swagger/src/interfaces/interfaces.ts index f80443598aa..8458959bbf2 100644 --- a/packages/specs/swagger/src/interfaces/interfaces.ts +++ b/packages/specs/swagger/src/interfaces/interfaces.ts @@ -1,4 +1,4 @@ -import {SwaggerSettings} from "./SwaggerSettings"; +import {SwaggerSettings} from "./SwaggerSettings.js"; declare global { namespace TsED { diff --git a/packages/specs/swagger/src/middlewares/cssMiddleware.spec.ts b/packages/specs/swagger/src/middlewares/cssMiddleware.spec.ts index fb1f4625caa..d25bc73df87 100644 --- a/packages/specs/swagger/src/middlewares/cssMiddleware.spec.ts +++ b/packages/specs/swagger/src/middlewares/cssMiddleware.spec.ts @@ -1,6 +1,6 @@ import {PlatformTest} from "@tsed/common"; import Fs from "fs"; -import {cssMiddleware} from "./cssMiddleware"; +import {cssMiddleware} from "./cssMiddleware.js"; describe("cssMiddleware", () => { beforeEach(PlatformTest.create); diff --git a/packages/specs/swagger/src/middlewares/indexMiddleware.spec.ts b/packages/specs/swagger/src/middlewares/indexMiddleware.spec.ts index 82a9da35ee0..53de8e76832 100644 --- a/packages/specs/swagger/src/middlewares/indexMiddleware.spec.ts +++ b/packages/specs/swagger/src/middlewares/indexMiddleware.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {indexMiddleware} from "./indexMiddleware"; +import {indexMiddleware} from "./indexMiddleware.js"; describe("indexMiddleware and redirect", () => { beforeEach(PlatformTest.create); diff --git a/packages/specs/swagger/src/middlewares/indexMiddleware.ts b/packages/specs/swagger/src/middlewares/indexMiddleware.ts index 68653151835..c76a457d55e 100644 --- a/packages/specs/swagger/src/middlewares/indexMiddleware.ts +++ b/packages/specs/swagger/src/middlewares/indexMiddleware.ts @@ -1,5 +1,5 @@ import {PlatformContext} from "@tsed/common"; -import {SwaggerSettings} from "../interfaces/SwaggerSettings"; +import {SwaggerSettings} from "../interfaces/SwaggerSettings.js"; /** * @ignore diff --git a/packages/specs/swagger/src/middlewares/jsMiddleware.spec.ts b/packages/specs/swagger/src/middlewares/jsMiddleware.spec.ts index bc64fffad96..b16c75a41d4 100644 --- a/packages/specs/swagger/src/middlewares/jsMiddleware.spec.ts +++ b/packages/specs/swagger/src/middlewares/jsMiddleware.spec.ts @@ -1,6 +1,6 @@ import {PlatformTest} from "@tsed/common"; import Fs from "fs"; -import {jsMiddleware} from "./jsMiddleware"; +import {jsMiddleware} from "./jsMiddleware.js"; describe("jsMiddleware", () => { beforeEach(PlatformTest.create); diff --git a/packages/specs/swagger/src/middlewares/redirectMiddleware.spec.ts b/packages/specs/swagger/src/middlewares/redirectMiddleware.spec.ts index 5a4c6ccbd21..2c62575f037 100644 --- a/packages/specs/swagger/src/middlewares/redirectMiddleware.spec.ts +++ b/packages/specs/swagger/src/middlewares/redirectMiddleware.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {redirectMiddleware} from "./redirectMiddleware"; +import {redirectMiddleware} from "./redirectMiddleware.js"; describe("redirectMiddleware and redirect", () => { beforeEach(PlatformTest.create); diff --git a/packages/specs/swagger/src/services/SwaggerService.spec.ts b/packages/specs/swagger/src/services/SwaggerService.spec.ts index c2f82d2876f..00f79e5e2aa 100644 --- a/packages/specs/swagger/src/services/SwaggerService.spec.ts +++ b/packages/specs/swagger/src/services/SwaggerService.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {SwaggerService} from "../index"; +import {SwaggerService} from "../index.js"; describe("SwaggerService", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/specs/swagger/src/services/SwaggerService.ts b/packages/specs/swagger/src/services/SwaggerService.ts index 636e349f085..1fa53740675 100644 --- a/packages/specs/swagger/src/services/SwaggerService.ts +++ b/packages/specs/swagger/src/services/SwaggerService.ts @@ -1,8 +1,8 @@ import {Configuration, Injectable, InjectorService, Platform} from "@tsed/common"; import {OpenSpec2, OpenSpec3} from "@tsed/openspec"; import {generateSpec} from "@tsed/schema"; -import {SwaggerOS2Settings, SwaggerOS3Settings, SwaggerSettings} from "../interfaces/SwaggerSettings"; -import {includeRoute} from "../utils/includeRoute"; +import {SwaggerOS2Settings, SwaggerOS3Settings, SwaggerSettings} from "../interfaces/SwaggerSettings.js"; +import {includeRoute} from "../utils/includeRoute.js"; @Injectable() export class SwaggerService { diff --git a/packages/specs/swagger/src/utils/includeRoute.spec.ts b/packages/specs/swagger/src/utils/includeRoute.spec.ts index 03aedf60be7..49abd3f4a85 100644 --- a/packages/specs/swagger/src/utils/includeRoute.spec.ts +++ b/packages/specs/swagger/src/utils/includeRoute.spec.ts @@ -1,7 +1,7 @@ import {ControllerProvider} from "@tsed/common"; import {Hidden} from "@tsed/schema"; -import {Docs} from "../decorators/docs"; -import {includeRoute} from "./includeRoute"; +import {Docs} from "../decorators/docs.js"; +import {includeRoute} from "./includeRoute.js"; @Hidden() class HiddenCtrl {} diff --git a/packages/specs/swagger/src/utils/includeRoute.ts b/packages/specs/swagger/src/utils/includeRoute.ts index c390ea00013..028068da236 100644 --- a/packages/specs/swagger/src/utils/includeRoute.ts +++ b/packages/specs/swagger/src/utils/includeRoute.ts @@ -1,6 +1,6 @@ import {Provider} from "@tsed/di"; -import {SwaggerSettings} from "../interfaces/SwaggerSettings"; -import {matchPath} from "./matchPath"; +import {SwaggerSettings} from "../interfaces/SwaggerSettings.js"; +import {matchPath} from "./matchPath.js"; export function includeRoute(route: string, provider: Provider, conf: SwaggerSettings): boolean { const hidden = provider.store.get("hidden"); diff --git a/packages/specs/swagger/src/utils/matchPath.spec.ts b/packages/specs/swagger/src/utils/matchPath.spec.ts index 1dfae30476d..824cdf2f479 100644 --- a/packages/specs/swagger/src/utils/matchPath.spec.ts +++ b/packages/specs/swagger/src/utils/matchPath.spec.ts @@ -1,4 +1,4 @@ -import {matchPath} from "./matchPath"; +import {matchPath} from "./matchPath.js"; describe("matchPath", () => { it("should match route with the glob pattern", () => { diff --git a/packages/specs/swagger/test/app/index.ts b/packages/specs/swagger/test/app/index.ts index 08ebffa578d..502949ccd6d 100644 --- a/packages/specs/swagger/test/app/index.ts +++ b/packages/specs/swagger/test/app/index.ts @@ -2,7 +2,7 @@ import {$log, BodyParams, Controller, Get, PathParams, Post, Put, QueryParams} f import {PlatformExpress} from "@tsed/platform-express"; import {DiscriminatorKey, DiscriminatorValue, OneOf, Property, Required, Returns} from "@tsed/schema"; import {Hidden} from "@tsed/swagger"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; if (process.env.NODE_ENV !== "test") { class QueryModel { diff --git a/packages/specs/swagger/test/swagger.anyof.spec.ts b/packages/specs/swagger/test/swagger.anyof.spec.ts index d0e9bb1f1a7..d3d156823c5 100644 --- a/packages/specs/swagger/test/swagger.anyof.spec.ts +++ b/packages/specs/swagger/test/swagger.anyof.spec.ts @@ -3,7 +3,7 @@ import {ObjectID} from "@tsed/mongoose"; import {PlatformExpress} from "@tsed/platform-express"; import {AnyOf, Required, Returns} from "@tsed/schema"; import SuperTest from "supertest"; -import {Server} from "./app/Server"; +import {Server} from "./app/Server.js"; export class ListAbandonTask { @Required() diff --git a/packages/specs/swagger/test/swagger.bodyparams.spec.ts b/packages/specs/swagger/test/swagger.bodyparams.spec.ts index 1c7e4330215..132bbd6ad55 100644 --- a/packages/specs/swagger/test/swagger.bodyparams.spec.ts +++ b/packages/specs/swagger/test/swagger.bodyparams.spec.ts @@ -2,7 +2,7 @@ import {BodyParams, Controller, PlatformTest, Post} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; import {MaxLength, MinLength} from "@tsed/schema"; import SuperTest from "supertest"; -import {Server} from "./app/Server"; +import {Server} from "./app/Server.js"; @Controller({ path: "/customers" diff --git a/packages/specs/swagger/test/swagger.children.spec.ts b/packages/specs/swagger/test/swagger.children.spec.ts index 801ccce204b..70dd668ec38 100644 --- a/packages/specs/swagger/test/swagger.children.spec.ts +++ b/packages/specs/swagger/test/swagger.children.spec.ts @@ -1,7 +1,7 @@ import {Controller, Get, PlatformTest} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; import SuperTest from "supertest"; -import {Server} from "./app/Server"; +import {Server} from "./app/Server.js"; @Controller("/:campaignID/polls") export class PollCtrl { diff --git a/packages/specs/swagger/test/swagger.errors.spec.ts b/packages/specs/swagger/test/swagger.errors.spec.ts index 2e9b3679958..1db1243af5a 100644 --- a/packages/specs/swagger/test/swagger.errors.spec.ts +++ b/packages/specs/swagger/test/swagger.errors.spec.ts @@ -2,7 +2,7 @@ import {Controller, Get, PlatformTest} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; import {Required, Returns} from "@tsed/schema"; import SuperTest from "supertest"; -import {Server} from "./app/Server"; +import {Server} from "./app/Server.js"; export class TestModel200 { @Required() diff --git a/packages/specs/swagger/test/swagger.integration.spec.ts b/packages/specs/swagger/test/swagger.integration.spec.ts index 775a0fcf179..46e97f94b55 100644 --- a/packages/specs/swagger/test/swagger.integration.spec.ts +++ b/packages/specs/swagger/test/swagger.integration.spec.ts @@ -4,8 +4,8 @@ import {PlatformExpress} from "@tsed/platform-express"; import {Consumes, Description, Returns} from "@tsed/schema"; import {Docs, Hidden} from "@tsed/swagger"; import SuperTest from "supertest"; -import {Calendar} from "./app/models/Calendar"; -import {Server} from "./app/Server"; +import {Calendar} from "./app/models/Calendar.js"; +import {Server} from "./app/Server.js"; @Controller("/admin") @Hidden() diff --git a/packages/specs/swagger/test/swagger.nested-controllers.spec.ts b/packages/specs/swagger/test/swagger.nested-controllers.spec.ts index 0f04e4495c8..5da58e0213b 100644 --- a/packages/specs/swagger/test/swagger.nested-controllers.spec.ts +++ b/packages/specs/swagger/test/swagger.nested-controllers.spec.ts @@ -1,7 +1,7 @@ import {Controller, Get, PlatformTest, Post} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; import SuperTest from "supertest"; -import {Server} from "./app/Server"; +import {Server} from "./app/Server.js"; @Controller("/") export class FlaggedCommentController { diff --git a/packages/specs/swagger/test/swagger.operationId.spec.ts b/packages/specs/swagger/test/swagger.operationId.spec.ts index 9c69031ac4e..c5aec784181 100644 --- a/packages/specs/swagger/test/swagger.operationId.spec.ts +++ b/packages/specs/swagger/test/swagger.operationId.spec.ts @@ -4,8 +4,8 @@ import {PlatformExpress} from "@tsed/platform-express"; import {Consumes, Description, Returns} from "@tsed/schema"; import {Docs, Hidden} from "@tsed/swagger"; import SuperTest from "supertest"; -import {Calendar} from "./app/models/Calendar"; -import {Server} from "./app/Server"; +import {Calendar} from "./app/models/Calendar.js"; +import {Server} from "./app/Server.js"; @Controller("/admin") @Hidden() diff --git a/packages/specs/swagger/test/swagger.path-patterns.spec.ts b/packages/specs/swagger/test/swagger.path-patterns.spec.ts index 41360d17497..087be7b9171 100644 --- a/packages/specs/swagger/test/swagger.path-patterns.spec.ts +++ b/packages/specs/swagger/test/swagger.path-patterns.spec.ts @@ -3,8 +3,8 @@ import {ObjectID} from "@tsed/mongoose"; import {PlatformExpress} from "@tsed/platform-express"; import {Consumes, Returns} from "@tsed/schema"; import SuperTest from "supertest"; -import {Calendar} from "./app/models/Calendar"; -import {Server} from "./app/Server"; +import {Calendar} from "./app/models/Calendar.js"; +import {Server} from "./app/Server.js"; @Controller("/admin") class AdminCtrl { diff --git a/packages/specs/swagger/test/swagger.query.spec.ts b/packages/specs/swagger/test/swagger.query.spec.ts index 73a2671943c..a88d24f8f65 100644 --- a/packages/specs/swagger/test/swagger.query.spec.ts +++ b/packages/specs/swagger/test/swagger.query.spec.ts @@ -2,7 +2,7 @@ import {Controller, Get, PlatformTest, QueryParams} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; import {MinLength, Property, Required} from "@tsed/schema"; import SuperTest from "supertest"; -import {Server} from "./app/Server"; +import {Server} from "./app/Server.js"; class QueryParamModel { @Required() diff --git a/packages/third-parties/agenda/src/AgendaModule.spec.ts b/packages/third-parties/agenda/src/AgendaModule.spec.ts index e9905a5e1fd..3ffbcd44404 100644 --- a/packages/third-parties/agenda/src/AgendaModule.spec.ts +++ b/packages/third-parties/agenda/src/AgendaModule.spec.ts @@ -1,10 +1,10 @@ import {PlatformTest} from "@tsed/common"; import {Inject} from "@tsed/di"; import {Job} from "agenda"; -import {AgendaModule} from "./AgendaModule"; -import {Agenda} from "./decorators/agenda"; -import {Define} from "./decorators/define"; -import {Every} from "./decorators/every"; +import {AgendaModule} from "./AgendaModule.js"; +import {Agenda} from "./decorators/agenda.js"; +import {Define} from "./decorators/define.js"; +import {Every} from "./decorators/every.js"; jest.mock("agenda", () => { return { diff --git a/packages/third-parties/agenda/src/AgendaModule.ts b/packages/third-parties/agenda/src/AgendaModule.ts index 2f83359a03e..039a4a86771 100644 --- a/packages/third-parties/agenda/src/AgendaModule.ts +++ b/packages/third-parties/agenda/src/AgendaModule.ts @@ -2,9 +2,9 @@ import {AfterListen, DIContext, Logger, OnDestroy, runInContext} from "@tsed/com import {Constant, Inject, InjectorService, Module, Provider} from "@tsed/di"; import {Job, Processor} from "agenda"; import {v4 as uuid} from "uuid"; -import {PROVIDER_TYPE_AGENDA} from "./constants/constants"; -import {AgendaStore} from "./interfaces/AgendaStore"; -import {AgendaService} from "./services/AgendaFactory"; +import {PROVIDER_TYPE_AGENDA} from "./constants/constants.js"; +import {AgendaStore} from "./interfaces/AgendaStore.js"; +import {AgendaService} from "./services/AgendaFactory.js"; @Module() export class AgendaModule implements OnDestroy, AfterListen { diff --git a/packages/third-parties/agenda/src/decorators/agenda.spec.ts b/packages/third-parties/agenda/src/decorators/agenda.spec.ts index 6c69698d868..3cd47074358 100644 --- a/packages/third-parties/agenda/src/decorators/agenda.spec.ts +++ b/packages/third-parties/agenda/src/decorators/agenda.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {Agenda} from "./agenda"; +import {Agenda} from "./agenda.js"; describe("@Agenda()", () => { it("should set empty metadata", () => { diff --git a/packages/third-parties/agenda/src/decorators/agenda.ts b/packages/third-parties/agenda/src/decorators/agenda.ts index 1ab5a5db8ba..0a624183862 100644 --- a/packages/third-parties/agenda/src/decorators/agenda.ts +++ b/packages/third-parties/agenda/src/decorators/agenda.ts @@ -1,6 +1,6 @@ import {StoreMerge, useDecorators} from "@tsed/core"; import {Injectable} from "@tsed/di"; -import {PROVIDER_TYPE_AGENDA} from "../constants/constants"; +import {PROVIDER_TYPE_AGENDA} from "../constants/constants.js"; interface AgendaOptions { namespace?: string; diff --git a/packages/third-parties/agenda/src/decorators/define.spec.ts b/packages/third-parties/agenda/src/decorators/define.spec.ts index bbeec771090..516ec82ce6d 100644 --- a/packages/third-parties/agenda/src/decorators/define.spec.ts +++ b/packages/third-parties/agenda/src/decorators/define.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {Agenda} from "./agenda"; -import {Define} from "./define"; +import {Agenda} from "./agenda.js"; +import {Define} from "./define.js"; describe("@Define()", () => { it("should set empty metadata", () => { diff --git a/packages/third-parties/agenda/src/decorators/define.ts b/packages/third-parties/agenda/src/decorators/define.ts index f4430d69121..11fb8b648ff 100644 --- a/packages/third-parties/agenda/src/decorators/define.ts +++ b/packages/third-parties/agenda/src/decorators/define.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {AgendaStore, DefineOptions} from "../interfaces/AgendaStore"; +import {AgendaStore, DefineOptions} from "../interfaces/AgendaStore.js"; export function Define(options: DefineOptions = {}): MethodDecorator { return (target: any, propertyKey: string) => { diff --git a/packages/third-parties/agenda/src/decorators/every.spec.ts b/packages/third-parties/agenda/src/decorators/every.spec.ts index 3628c555c94..b60981b1b9b 100644 --- a/packages/third-parties/agenda/src/decorators/every.spec.ts +++ b/packages/third-parties/agenda/src/decorators/every.spec.ts @@ -1,6 +1,6 @@ import {descriptorOf, Store} from "@tsed/core"; -import {Agenda} from "./agenda"; -import {Every} from "./every"; +import {Agenda} from "./agenda.js"; +import {Every} from "./every.js"; describe("@Every()", () => { it("should set metadata", () => { diff --git a/packages/third-parties/agenda/src/decorators/every.ts b/packages/third-parties/agenda/src/decorators/every.ts index 5cd2fe463cc..644d5c74bb0 100644 --- a/packages/third-parties/agenda/src/decorators/every.ts +++ b/packages/third-parties/agenda/src/decorators/every.ts @@ -1,6 +1,6 @@ import {Store, useDecorators} from "@tsed/core"; -import {Define} from "./define"; -import {AgendaStore, EveryOptions} from "../interfaces/AgendaStore"; +import {Define} from "./define.js"; +import {AgendaStore, EveryOptions} from "../interfaces/AgendaStore.js"; export function Every(interval: string, options: EveryOptions = {}): MethodDecorator { return useDecorators(Define(options), (target: any, propertyKey: string) => { diff --git a/packages/third-parties/agenda/src/index.ts b/packages/third-parties/agenda/src/index.ts index 85fa9561c04..0f82d672c34 100644 --- a/packages/third-parties/agenda/src/index.ts +++ b/packages/third-parties/agenda/src/index.ts @@ -2,11 +2,11 @@ * @file Automatically generated by barrelsby. */ -export * from "./AgendaModule"; -export * from "./constants/constants"; -export * from "./decorators/agenda"; -export * from "./decorators/define"; -export * from "./decorators/every"; -export * from "./interfaces/AgendaStore"; -export * from "./interfaces/interfaces"; -export * from "./services/AgendaFactory"; +export * from "./AgendaModule.js"; +export * from "./constants/constants.js"; +export * from "./decorators/agenda.js"; +export * from "./decorators/define.js"; +export * from "./decorators/every.js"; +export * from "./interfaces/AgendaStore.js"; +export * from "./interfaces/interfaces.js"; +export * from "./services/AgendaFactory.js"; diff --git a/packages/third-parties/agenda/test/agenda-define-manually.integration.spec.ts b/packages/third-parties/agenda/test/agenda-define-manually.integration.spec.ts index 06a891377bf..0e01f597dd9 100644 --- a/packages/third-parties/agenda/test/agenda-define-manually.integration.spec.ts +++ b/packages/third-parties/agenda/test/agenda-define-manually.integration.spec.ts @@ -2,8 +2,8 @@ import {PlatformTest} from "@tsed/common"; import {Inject} from "@tsed/di"; import {TestMongooseContext} from "@tsed/testing-mongoose"; import {Job} from "agenda"; -import {AgendaModule, Agenda, AgendaService, Define} from "../src/index"; -import {Server} from "./helpers/Server"; +import {AgendaModule, Agenda, AgendaService, Define} from "../src/index.js"; +import {Server} from "./helpers/Server.js"; @Agenda({namespace: "test-nsp"}) class Test { diff --git a/packages/third-parties/agenda/test/agenda-define.integration.spec.ts b/packages/third-parties/agenda/test/agenda-define.integration.spec.ts index cd4b86e04a1..67a01ef2a33 100644 --- a/packages/third-parties/agenda/test/agenda-define.integration.spec.ts +++ b/packages/third-parties/agenda/test/agenda-define.integration.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest} from "@tsed/common"; import {TestMongooseContext} from "@tsed/testing-mongoose"; -import {Agenda, AgendaService, Define, Every} from "../src/index"; -import {Server} from "./helpers/Server"; +import {Agenda, AgendaService, Define, Every} from "../src/index.js"; +import {Server} from "./helpers/Server.js"; @Agenda({namespace: "test-nsp"}) class Test { diff --git a/packages/third-parties/agenda/test/agenda-every.integration.spec.ts b/packages/third-parties/agenda/test/agenda-every.integration.spec.ts index d73e85c5447..da6c031bfda 100644 --- a/packages/third-parties/agenda/test/agenda-every.integration.spec.ts +++ b/packages/third-parties/agenda/test/agenda-every.integration.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest} from "@tsed/common"; import {TestMongooseContext} from "@tsed/testing-mongoose"; -import {Agenda, AgendaService, Every} from "../src/index"; -import {Server} from "./helpers/Server"; +import {Agenda, AgendaService, Every} from "../src/index.js"; +import {Server} from "./helpers/Server.js"; @Agenda() class TestTwo { diff --git a/packages/third-parties/bullmq/README.md b/packages/third-parties/bullmq/README.md index 1d308ba45a8..333ab4f37fd 100644 --- a/packages/third-parties/bullmq/README.md +++ b/packages/third-parties/bullmq/README.md @@ -192,7 +192,7 @@ Dispatching jobs is done via the `JobDispatcher` service that takes the job to b ```ts import {Service} from "@tsed/di"; import {JobDispatcher} from "@tsed/bullmq"; -import {ExampleJob} from "./jobs/ExampleJob"; +import {ExampleJob} from "./jobs/ExampleJob.js"; @Service() class MyService { @@ -212,7 +212,7 @@ This allows to for example delay the job from when it has originally been dispat ```ts import {Service} from "@tsed/di"; import {JobDispatcher} from "@tsed/bullmq"; -import {ExampleJob} from "./jobs/ExampleJob"; +import {ExampleJob} from "./jobs/ExampleJob.js"; @Service() class MyService { @@ -239,7 +239,7 @@ In case you want to be more flexible, you can also dispatch a job via a name or ```ts import {Service} from "@tsed/di"; import {JobDispatcher} from "@tsed/bullmq"; -import {ExampleJob} from "./jobs/ExampleJob"; +import {ExampleJob} from "./jobs/ExampleJob.js"; @Service() class MyService { diff --git a/packages/third-parties/bullmq/src/BullMQModule.spec.ts b/packages/third-parties/bullmq/src/BullMQModule.spec.ts index 320b967c970..01aa63a5f22 100644 --- a/packages/third-parties/bullmq/src/BullMQModule.spec.ts +++ b/packages/third-parties/bullmq/src/BullMQModule.spec.ts @@ -4,13 +4,13 @@ import {Queue, Worker} from "bullmq"; import {anything, instance, mock, verify, when} from "ts-mockito"; import "./BullMQModule"; -import {BullMQModule} from "./BullMQModule"; -import {type BullMQConfig} from "./config/config"; -import {JobMethods} from "./contracts"; -import {FallbackJobController, JobController} from "./decorators"; -import {InjectQueue} from "./decorators/InjectQueue"; -import {InjectWorker} from "./decorators/InjectWorker"; -import {JobDispatcher} from "./dispatchers"; +import {BullMQModule} from "./BullMQModule.js"; +import {type BullMQConfig} from "./config/config.js"; +import {JobMethods} from "./contracts.js"; +import {FallbackJobController, JobController} from "./decorators.js"; +import {InjectQueue} from "./decorators/InjectQueue.js"; +import {InjectWorker} from "./decorators/InjectWorker.js"; +import {JobDispatcher} from "./dispatchers.js"; const queueConstructorSpy = jest.fn(); const workerConstructorSpy = jest.fn(); diff --git a/packages/third-parties/bullmq/src/BullMQModule.ts b/packages/third-parties/bullmq/src/BullMQModule.ts index a244249371c..28f31407207 100644 --- a/packages/third-parties/bullmq/src/BullMQModule.ts +++ b/packages/third-parties/bullmq/src/BullMQModule.ts @@ -3,16 +3,16 @@ import {InjectorService, Module} from "@tsed/di"; import {getComputedType} from "@tsed/schema"; import {Job, Queue, Worker} from "bullmq"; import {v4} from "uuid"; -import {BullMQConfig} from "./config/config"; -import {BullMQTypes} from "./constants/BullMQTypes"; -import {BULLMQ} from "./constants/constants"; -import {JobMethods, JobStore} from "./contracts"; -import {JobDispatcher} from "./dispatchers/index"; -import {createQueueProvider} from "./utils/createQueueProvider"; -import {createWorkerProvider} from "./utils/createWorkerProvider"; -import {getFallbackJobToken, getJobToken} from "./utils/getJobToken"; -import {mapQueueOptions} from "./utils/mapQueueOptions"; -import {mapWorkerOptions} from "./utils/mapWorkerOptions"; +import {BullMQConfig} from "./config/config.js"; +import {BullMQTypes} from "./constants/BullMQTypes.js"; +import {BULLMQ} from "./constants/constants.js"; +import {JobMethods, JobStore} from "./contracts.js"; +import {JobDispatcher} from "./dispatchers/index.js"; +import {createQueueProvider} from "./utils/createQueueProvider.js"; +import {createWorkerProvider} from "./utils/createWorkerProvider.js"; +import {getFallbackJobToken, getJobToken} from "./utils/getJobToken.js"; +import {mapQueueOptions} from "./utils/mapQueueOptions.js"; +import {mapWorkerOptions} from "./utils/mapWorkerOptions.js"; @Module() export class BullMQModule implements BeforeInit, OnDestroy { diff --git a/packages/third-parties/bullmq/src/contracts/index.ts b/packages/third-parties/bullmq/src/contracts/index.ts index aec34986fa2..7c1a8ce7539 100644 --- a/packages/third-parties/bullmq/src/contracts/index.ts +++ b/packages/third-parties/bullmq/src/contracts/index.ts @@ -2,5 +2,5 @@ * @file Automatically generated by barrelsby. */ -export * from "./JobMethods"; -export * from "./JobStore"; +export * from "./JobMethods.js"; +export * from "./JobStore.js"; diff --git a/packages/third-parties/bullmq/src/decorators/InjectQueue.ts b/packages/third-parties/bullmq/src/decorators/InjectQueue.ts index 3211343b3c4..e94bf5fd215 100644 --- a/packages/third-parties/bullmq/src/decorators/InjectQueue.ts +++ b/packages/third-parties/bullmq/src/decorators/InjectQueue.ts @@ -1,5 +1,5 @@ import {Inject} from "@tsed/common"; -import {getQueueToken} from "../utils/getQueueToken"; +import {getQueueToken} from "../utils/getQueueToken.js"; export function InjectQueue(name: string) { return Inject(getQueueToken(name)); diff --git a/packages/third-parties/bullmq/src/decorators/InjectWorker.ts b/packages/third-parties/bullmq/src/decorators/InjectWorker.ts index 50126e8f1fa..a528e64eed2 100644 --- a/packages/third-parties/bullmq/src/decorators/InjectWorker.ts +++ b/packages/third-parties/bullmq/src/decorators/InjectWorker.ts @@ -1,5 +1,5 @@ import {Inject} from "@tsed/common"; -import {getWorkerToken} from "../utils/getWorkerToken"; +import {getWorkerToken} from "../utils/getWorkerToken.js"; export function InjectWorker(name: string) { return Inject(getWorkerToken(name)); diff --git a/packages/third-parties/bullmq/src/decorators/JobController.spec.ts b/packages/third-parties/bullmq/src/decorators/JobController.spec.ts index a9ba843ea36..8c67f3ac764 100644 --- a/packages/third-parties/bullmq/src/decorators/JobController.spec.ts +++ b/packages/third-parties/bullmq/src/decorators/JobController.spec.ts @@ -1,4 +1,4 @@ -import {FallbackJobController, JobController} from "./JobController"; +import {FallbackJobController, JobController} from "./JobController.js"; import {Store} from "@tsed/core"; import {GlobalProviders} from "@tsed/di"; diff --git a/packages/third-parties/bullmq/src/decorators/JobController.ts b/packages/third-parties/bullmq/src/decorators/JobController.ts index 1fb99d463d0..b93e2cd7ca6 100644 --- a/packages/third-parties/bullmq/src/decorators/JobController.ts +++ b/packages/third-parties/bullmq/src/decorators/JobController.ts @@ -1,9 +1,9 @@ import {StoreMerge, useDecorators} from "@tsed/core"; import {Injectable} from "@tsed/di"; import {JobsOptions} from "bullmq"; -import {BullMQTypes} from "../constants/BullMQTypes"; -import {BULLMQ} from "../constants/constants"; -import {getFallbackJobToken, getJobToken} from "../utils/getJobToken"; +import {BullMQTypes} from "../constants/BullMQTypes.js"; +import {BULLMQ} from "../constants/constants.js"; +import {getFallbackJobToken, getJobToken} from "../utils/getJobToken.js"; export function JobController(name: string, queue: string = "default", opts: JobsOptions = {}) { return useDecorators( diff --git a/packages/third-parties/bullmq/src/decorators/index.ts b/packages/third-parties/bullmq/src/decorators/index.ts index d5cf34f522b..485d480352b 100644 --- a/packages/third-parties/bullmq/src/decorators/index.ts +++ b/packages/third-parties/bullmq/src/decorators/index.ts @@ -2,6 +2,6 @@ * @file Automatically generated by barrelsby. */ -export * from "./InjectQueue"; -export * from "./InjectWorker"; -export * from "./JobController"; +export * from "./InjectQueue.js"; +export * from "./InjectWorker.js"; +export * from "./JobController.js"; diff --git a/packages/third-parties/bullmq/src/dispatchers/JobDispatcher.spec.ts b/packages/third-parties/bullmq/src/dispatchers/JobDispatcher.spec.ts index d716fa08e88..f78fe11fc3d 100644 --- a/packages/third-parties/bullmq/src/dispatchers/JobDispatcher.spec.ts +++ b/packages/third-parties/bullmq/src/dispatchers/JobDispatcher.spec.ts @@ -1,7 +1,7 @@ import {InjectorService} from "@tsed/di"; -import {JobDispatcher} from "./JobDispatcher"; -import {JobMethods} from "../contracts"; -import {JobController} from "../decorators"; +import {JobDispatcher} from "./JobDispatcher.js"; +import {JobMethods} from "../contracts.js"; +import {JobController} from "../decorators.js"; import {Queue} from "bullmq"; import {instance, mock, verify, when, objectContaining, capture, anything, spy} from "ts-mockito"; diff --git a/packages/third-parties/bullmq/src/dispatchers/JobDispatcher.ts b/packages/third-parties/bullmq/src/dispatchers/JobDispatcher.ts index 53205274d01..84b369700f9 100644 --- a/packages/third-parties/bullmq/src/dispatchers/JobDispatcher.ts +++ b/packages/third-parties/bullmq/src/dispatchers/JobDispatcher.ts @@ -2,11 +2,11 @@ import {Store, Type} from "@tsed/core"; import {Injectable, InjectorService} from "@tsed/di"; import {Job as BullMQJob, JobsOptions, Queue} from "bullmq"; -import {BULLMQ} from "../constants/constants"; -import {JobMethods, type JobStore} from "../contracts"; -import {getJobToken} from "../utils/getJobToken"; -import {getQueueToken} from "../utils/getQueueToken"; -import type {JobDispatcherOptions} from "./JobDispatcherOptions"; +import {BULLMQ} from "../constants/constants.js"; +import {JobMethods, type JobStore} from "../contracts.js"; +import {getJobToken} from "../utils/getJobToken.js"; +import {getQueueToken} from "../utils/getQueueToken.js"; +import type {JobDispatcherOptions} from "./JobDispatcherOptions.js"; @Injectable() export class JobDispatcher { diff --git a/packages/third-parties/bullmq/src/dispatchers/index.ts b/packages/third-parties/bullmq/src/dispatchers/index.ts index b5038366dcd..6fde80c79b2 100644 --- a/packages/third-parties/bullmq/src/dispatchers/index.ts +++ b/packages/third-parties/bullmq/src/dispatchers/index.ts @@ -2,5 +2,5 @@ * @file Automatically generated by barrelsby. */ -export * from "./JobDispatcher"; -export * from "./JobDispatcherOptions"; +export * from "./JobDispatcher.js"; +export * from "./JobDispatcherOptions.js"; diff --git a/packages/third-parties/bullmq/src/index.ts b/packages/third-parties/bullmq/src/index.ts index ffcb42f7232..9fb92beee25 100644 --- a/packages/third-parties/bullmq/src/index.ts +++ b/packages/third-parties/bullmq/src/index.ts @@ -2,21 +2,21 @@ * @file Automatically generated by barrelsby. */ -export * from "./BullMQModule"; -export * from "./config/config"; -export * from "./constants/BullMQTypes"; -export * from "./constants/constants"; -export * from "./contracts/JobMethods"; -export * from "./contracts/JobStore"; -export * from "./decorators/InjectQueue"; -export * from "./decorators/InjectWorker"; -export * from "./decorators/JobController"; -export * from "./dispatchers/JobDispatcher"; -export * from "./dispatchers/JobDispatcherOptions"; -export * from "./utils/createQueueProvider"; -export * from "./utils/createWorkerProvider"; -export * from "./utils/getJobToken"; -export * from "./utils/getQueueToken"; -export * from "./utils/getWorkerToken"; -export * from "./utils/mapQueueOptions"; -export * from "./utils/mapWorkerOptions"; +export * from "./BullMQModule.js"; +export * from "./config/config.js"; +export * from "./constants/BullMQTypes.js"; +export * from "./constants/constants.js"; +export * from "./contracts/JobMethods.js"; +export * from "./contracts/JobStore.js"; +export * from "./decorators/InjectQueue.js"; +export * from "./decorators/InjectWorker.js"; +export * from "./decorators/JobController.js"; +export * from "./dispatchers/JobDispatcher.js"; +export * from "./dispatchers/JobDispatcherOptions.js"; +export * from "./utils/createQueueProvider.js"; +export * from "./utils/createWorkerProvider.js"; +export * from "./utils/getJobToken.js"; +export * from "./utils/getQueueToken.js"; +export * from "./utils/getWorkerToken.js"; +export * from "./utils/mapQueueOptions.js"; +export * from "./utils/mapWorkerOptions.js"; diff --git a/packages/third-parties/bullmq/src/utils/createQueueProvider.ts b/packages/third-parties/bullmq/src/utils/createQueueProvider.ts index 158a5b81c9d..a0e36ad3a93 100644 --- a/packages/third-parties/bullmq/src/utils/createQueueProvider.ts +++ b/packages/third-parties/bullmq/src/utils/createQueueProvider.ts @@ -1,7 +1,7 @@ import {InjectorService} from "@tsed/di"; import {Queue, QueueOptions} from "bullmq"; -import {BullMQTypes} from "../constants/BullMQTypes"; -import {getQueueToken} from "./getQueueToken"; +import {BullMQTypes} from "../constants/BullMQTypes.js"; +import {getQueueToken} from "./getQueueToken.js"; export function createQueueProvider(injector: InjectorService, queue: string, opts: QueueOptions) { const token = getQueueToken(queue); diff --git a/packages/third-parties/bullmq/src/utils/createWorkerProvider.ts b/packages/third-parties/bullmq/src/utils/createWorkerProvider.ts index 158572996d6..bad468ebc5b 100644 --- a/packages/third-parties/bullmq/src/utils/createWorkerProvider.ts +++ b/packages/third-parties/bullmq/src/utils/createWorkerProvider.ts @@ -1,7 +1,7 @@ import {InjectorService} from "@tsed/di"; import {Job, Worker, WorkerOptions} from "bullmq"; -import {BullMQTypes} from "../constants/BullMQTypes"; -import {getWorkerToken} from "./getWorkerToken"; +import {BullMQTypes} from "../constants/BullMQTypes.js"; +import {getWorkerToken} from "./getWorkerToken.js"; export function createWorkerProvider(injector: InjectorService, worker: string, process: (job: Job) => any, opts: WorkerOptions) { const token = getWorkerToken(worker); diff --git a/packages/third-parties/bullmq/src/utils/mapQueueOptions.ts b/packages/third-parties/bullmq/src/utils/mapQueueOptions.ts index caf2eb6e4cf..b671fc7cc14 100644 --- a/packages/third-parties/bullmq/src/utils/mapQueueOptions.ts +++ b/packages/third-parties/bullmq/src/utils/mapQueueOptions.ts @@ -1,6 +1,6 @@ import {deepMerge} from "@tsed/core"; import type {QueueOptions} from "bullmq"; -import {BullMQConfig} from "../config/config"; +import {BullMQConfig} from "../config/config.js"; export function mapQueueOptions(queue: string, bullMQConfig: BullMQConfig): QueueOptions { return deepMerge( diff --git a/packages/third-parties/bullmq/src/utils/mapWorkerOptions.ts b/packages/third-parties/bullmq/src/utils/mapWorkerOptions.ts index f628777d69c..3c5cc82f8be 100644 --- a/packages/third-parties/bullmq/src/utils/mapWorkerOptions.ts +++ b/packages/third-parties/bullmq/src/utils/mapWorkerOptions.ts @@ -1,6 +1,6 @@ import {deepMerge} from "@tsed/core"; import type {WorkerOptions} from "bullmq"; -import {BullMQConfig} from "../config/config"; +import {BullMQConfig} from "../config/config.js"; export function mapWorkerOptions(queue: string, bullMQConfig: BullMQConfig): WorkerOptions { return deepMerge( diff --git a/packages/third-parties/components-scan/src/__mock__/module1/Module1.ts b/packages/third-parties/components-scan/src/__mock__/module1/Module1.ts index 0dcfb660d2e..b11f274fed0 100644 --- a/packages/third-parties/components-scan/src/__mock__/module1/Module1.ts +++ b/packages/third-parties/components-scan/src/__mock__/module1/Module1.ts @@ -1,6 +1,6 @@ -import {SubModule} from "./submodule/SubModule"; +import {SubModule} from "./submodule/SubModule.js"; import {Module} from "@tsed/di"; -import {M1Ctrl1} from "./controllers/M1Ctrl1"; +import {M1Ctrl1} from "./controllers/M1Ctrl1.js"; @Module({ mount: { diff --git a/packages/third-parties/components-scan/src/__mock__/module1/controllers/M1Ctrl1.ts b/packages/third-parties/components-scan/src/__mock__/module1/controllers/M1Ctrl1.ts index 032ed5ef8ab..9df9d6d10ee 100644 --- a/packages/third-parties/components-scan/src/__mock__/module1/controllers/M1Ctrl1.ts +++ b/packages/third-parties/components-scan/src/__mock__/module1/controllers/M1Ctrl1.ts @@ -1,5 +1,5 @@ import {Controller} from "@tsed/di"; -import {M1Service} from "../services/M1Service"; +import {M1Service} from "../services/M1Service.js"; @Controller("/m1") export class M1Ctrl1 { diff --git a/packages/third-parties/components-scan/src/__mock__/module1/services/M1Service.ts b/packages/third-parties/components-scan/src/__mock__/module1/services/M1Service.ts index c1123895b12..492b676997a 100644 --- a/packages/third-parties/components-scan/src/__mock__/module1/services/M1Service.ts +++ b/packages/third-parties/components-scan/src/__mock__/module1/services/M1Service.ts @@ -1,5 +1,5 @@ import {Injectable} from "@tsed/di"; -import {SubService} from "../submodule/SubService"; +import {SubService} from "../submodule/SubService.js"; @Injectable() export class M1Service { diff --git a/packages/third-parties/components-scan/src/__mock__/module1/submodule/SubModule.ts b/packages/third-parties/components-scan/src/__mock__/module1/submodule/SubModule.ts index f026918f776..ef297540849 100644 --- a/packages/third-parties/components-scan/src/__mock__/module1/submodule/SubModule.ts +++ b/packages/third-parties/components-scan/src/__mock__/module1/submodule/SubModule.ts @@ -1,5 +1,5 @@ import {Module} from "@tsed/di"; -import {SubService} from "./SubService"; +import {SubService} from "./SubService.js"; @Module({ imports: [SubService] diff --git a/packages/third-parties/components-scan/src/__mock__/module2/Module2.ts b/packages/third-parties/components-scan/src/__mock__/module2/Module2.ts index fe599adf5e5..2b6c78c8253 100644 --- a/packages/third-parties/components-scan/src/__mock__/module2/Module2.ts +++ b/packages/third-parties/components-scan/src/__mock__/module2/Module2.ts @@ -1,5 +1,5 @@ import {Module} from "@tsed/di"; -import {M2Ctrl} from "./controllers/M2Ctrl"; +import {M2Ctrl} from "./controllers/M2Ctrl.js"; @Module({ mount: { diff --git a/packages/third-parties/components-scan/src/cleanGlobPatterns.spec.ts b/packages/third-parties/components-scan/src/cleanGlobPatterns.spec.ts index 80cf4f1b966..9b77fb59759 100644 --- a/packages/third-parties/components-scan/src/cleanGlobPatterns.spec.ts +++ b/packages/third-parties/components-scan/src/cleanGlobPatterns.spec.ts @@ -1,5 +1,5 @@ -import {cleanGlobPatterns} from "./cleanGlobPatterns"; -import {isTsEnv} from "./isTsEnv"; +import {cleanGlobPatterns} from "./cleanGlobPatterns.js"; +import {isTsEnv} from "./isTsEnv.js"; jest.mock("./isTsEnv"); diff --git a/packages/third-parties/components-scan/src/cleanGlobPatterns.ts b/packages/third-parties/components-scan/src/cleanGlobPatterns.ts index 25d3d3566a8..f0101a9c5d7 100644 --- a/packages/third-parties/components-scan/src/cleanGlobPatterns.ts +++ b/packages/third-parties/components-scan/src/cleanGlobPatterns.ts @@ -1,5 +1,5 @@ import {resolve} from "path"; -import {isTsEnv} from "./isTsEnv"; +import {isTsEnv} from "./isTsEnv.js"; import {normalizePath} from "@tsed/normalize-path"; function mapExcludes(excludes: string[]) { diff --git a/packages/third-parties/components-scan/src/importFiles.spec.ts b/packages/third-parties/components-scan/src/importFiles.spec.ts index 85138097b3e..b5ce8c6fed9 100644 --- a/packages/third-parties/components-scan/src/importFiles.spec.ts +++ b/packages/third-parties/components-scan/src/importFiles.spec.ts @@ -1,8 +1,8 @@ import filedirname from "filedirname"; import {join} from "path"; -import {importFiles} from "./importFiles"; -import {Test1} from "./__mock__/Test1"; -import {Test2} from "./__mock__/Test2"; +import {importFiles} from "./importFiles.js"; +import {Test1} from "./__mock__/Test1.js"; +import {Test2} from "./__mock__/Test2.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/third-parties/components-scan/src/importFiles.ts b/packages/third-parties/components-scan/src/importFiles.ts index 1c85b3561b0..bcd3c0ec0c6 100644 --- a/packages/third-parties/components-scan/src/importFiles.ts +++ b/packages/third-parties/components-scan/src/importFiles.ts @@ -1,5 +1,5 @@ import {importPackage} from "@tsed/core"; -import {cleanGlobPatterns} from "./cleanGlobPatterns"; +import {cleanGlobPatterns} from "./cleanGlobPatterns.js"; export async function importFiles(patterns: string | string[], exclude: string[]): Promise { const {default: globby} = await import("globby"); diff --git a/packages/third-parties/components-scan/src/importProviders.spec.ts b/packages/third-parties/components-scan/src/importProviders.spec.ts index 890064afa07..5f7cbb6ad32 100644 --- a/packages/third-parties/components-scan/src/importProviders.spec.ts +++ b/packages/third-parties/components-scan/src/importProviders.spec.ts @@ -1,7 +1,7 @@ import {nameOf} from "@tsed/core"; import {resolveControllers} from "@tsed/di"; import filedirname from "filedirname"; -import {importProviders} from "./importProviders"; +import {importProviders} from "./importProviders.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/third-parties/components-scan/src/importProviders.ts b/packages/third-parties/components-scan/src/importProviders.ts index 20f63b7a1a2..c9bf626c224 100644 --- a/packages/third-parties/components-scan/src/importProviders.ts +++ b/packages/third-parties/components-scan/src/importProviders.ts @@ -1,6 +1,6 @@ import {GlobalProviders, ProviderType} from "@tsed/di"; import {isArray, isClass, isString} from "@tsed/core"; -import {importFiles} from "./importFiles"; +import {importFiles} from "./importFiles.js"; const lookup = ["imports", "componentsScan", "mount"]; diff --git a/packages/third-parties/components-scan/src/index.ts b/packages/third-parties/components-scan/src/index.ts index 204511c2a55..114273428a8 100644 --- a/packages/third-parties/components-scan/src/index.ts +++ b/packages/third-parties/components-scan/src/index.ts @@ -2,7 +2,7 @@ * @file Automatically generated by barrelsby. */ -export * from "./cleanGlobPatterns"; -export * from "./importFiles"; -export * from "./importProviders"; -export * from "./isTsEnv"; +export * from "./cleanGlobPatterns.js"; +export * from "./importFiles.js"; +export * from "./importProviders.js"; +export * from "./isTsEnv.js"; diff --git a/packages/third-parties/event-emitter/src/EventEmitterModule.ts b/packages/third-parties/event-emitter/src/EventEmitterModule.ts index 9c2e63315b5..e1abc06428a 100644 --- a/packages/third-parties/event-emitter/src/EventEmitterModule.ts +++ b/packages/third-parties/event-emitter/src/EventEmitterModule.ts @@ -1,7 +1,7 @@ import {Constant, Inject, InjectorService, LOGGER, Module, Provider} from "@tsed/di"; import {ListenerFn} from "eventemitter2"; -import {EventEmitterStore} from "./interfaces/EventEmitterStore"; -import {EventEmitterService} from "./services/EventEmitterFactory"; +import {EventEmitterStore} from "./interfaces/EventEmitterStore.js"; +import {EventEmitterService} from "./services/EventEmitterFactory.js"; @Module() export class EventEmitterModule { diff --git a/packages/third-parties/event-emitter/src/decorators/onAny.spec.ts b/packages/third-parties/event-emitter/src/decorators/onAny.spec.ts index f33c2eff697..fefc704aa64 100644 --- a/packages/third-parties/event-emitter/src/decorators/onAny.spec.ts +++ b/packages/third-parties/event-emitter/src/decorators/onAny.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {OnAny} from "./onAny"; +import {OnAny} from "./onAny.js"; describe("@OnAny()", () => { it("should set metadata", () => { diff --git a/packages/third-parties/event-emitter/src/decorators/onAny.ts b/packages/third-parties/event-emitter/src/decorators/onAny.ts index f858a70a290..dceecb7ff53 100644 --- a/packages/third-parties/event-emitter/src/decorators/onAny.ts +++ b/packages/third-parties/event-emitter/src/decorators/onAny.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {EventEmitterStore} from "../interfaces/EventEmitterStore"; +import {EventEmitterStore} from "../interfaces/EventEmitterStore.js"; export function OnAny(): MethodDecorator { return (target: any, propertyKey: string) => { diff --git a/packages/third-parties/event-emitter/src/decorators/onEvent.spec.ts b/packages/third-parties/event-emitter/src/decorators/onEvent.spec.ts index 70d00059329..4a50aedb23a 100644 --- a/packages/third-parties/event-emitter/src/decorators/onEvent.spec.ts +++ b/packages/third-parties/event-emitter/src/decorators/onEvent.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {OnEvent} from "../decorators/onEvent"; +import {OnEvent} from "../decorators/onEvent.js"; describe("@OnEvent()", () => { it("should set metadata", () => { diff --git a/packages/third-parties/event-emitter/src/decorators/onEvent.ts b/packages/third-parties/event-emitter/src/decorators/onEvent.ts index 1da800ac812..2409e71d17d 100644 --- a/packages/third-parties/event-emitter/src/decorators/onEvent.ts +++ b/packages/third-parties/event-emitter/src/decorators/onEvent.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; import {event, eventNS, OnOptions} from "eventemitter2"; -import {EventEmitterStore} from "../interfaces/EventEmitterStore"; +import {EventEmitterStore} from "../interfaces/EventEmitterStore.js"; export function OnEvent(event: event | eventNS, options?: boolean | OnOptions): MethodDecorator { return (target: any, propertyKey: string) => { diff --git a/packages/third-parties/event-emitter/src/index.ts b/packages/third-parties/event-emitter/src/index.ts index f090ebc08cf..8c64de489c8 100644 --- a/packages/third-parties/event-emitter/src/index.ts +++ b/packages/third-parties/event-emitter/src/index.ts @@ -2,9 +2,9 @@ * @file Automatically generated by barrelsby. */ -export * from "./EventEmitterModule"; -export * from "./decorators/onAny"; -export * from "./decorators/onEvent"; -export * from "./interfaces/EventEmitterStore"; -export * from "./interfaces/interfaces"; -export * from "./services/EventEmitterFactory"; +export * from "./EventEmitterModule.js"; +export * from "./decorators/onAny.js"; +export * from "./decorators/onEvent.js"; +export * from "./interfaces/EventEmitterStore.js"; +export * from "./interfaces/interfaces.js"; +export * from "./services/EventEmitterFactory.js"; diff --git a/packages/third-parties/event-emitter/test/integration.spec.ts b/packages/third-parties/event-emitter/test/integration.spec.ts index f9ce0d0efd2..19bc08c7608 100644 --- a/packages/third-parties/event-emitter/test/integration.spec.ts +++ b/packages/third-parties/event-emitter/test/integration.spec.ts @@ -1,10 +1,10 @@ import Sinon from "sinon"; import {Injectable, PlatformTest} from "@tsed/common"; -import {Server} from "./helpers/Server"; -import {OnEvent} from "../src/decorators/onEvent"; -import {EventEmitterService} from "../src/services/EventEmitterFactory"; -import {OnAny} from "../src/decorators/onAny"; -import {EventEmitterModule} from "../src/EventEmitterModule"; +import {Server} from "./helpers/Server.js"; +import {OnEvent} from "../src/decorators/onEvent.js"; +import {EventEmitterService} from "../src/services/EventEmitterFactory.js"; +import {OnAny} from "../src/decorators/onAny.js"; +import {EventEmitterModule} from "../src/EventEmitterModule.js"; @Injectable() class Test { diff --git a/packages/third-parties/formio-types/src/domain/FormioComponent.ts b/packages/third-parties/formio-types/src/domain/FormioComponent.ts index df1d17658d9..678381d599f 100644 --- a/packages/third-parties/formio-types/src/domain/FormioComponent.ts +++ b/packages/third-parties/formio-types/src/domain/FormioComponent.ts @@ -1,4 +1,4 @@ -import {FormioForm} from "./FormioForm"; +import {FormioForm} from "./FormioForm.js"; import type {ExtendedComponentSchema} from "formiojs"; export interface FormioComponent extends ExtendedComponentSchema { diff --git a/packages/third-parties/formio-types/src/domain/FormioForm.ts b/packages/third-parties/formio-types/src/domain/FormioForm.ts index 46e5e634ec6..5e1b02e7a35 100644 --- a/packages/third-parties/formio-types/src/domain/FormioForm.ts +++ b/packages/third-parties/formio-types/src/domain/FormioForm.ts @@ -1,5 +1,5 @@ -import {FormioComponent} from "./FormioComponent"; -import {FormioPermission} from "./FormioPermission"; +import {FormioComponent} from "./FormioComponent.js"; +import {FormioPermission} from "./FormioPermission.js"; export interface FormioForm extends Record { _id: string | undefined; diff --git a/packages/third-parties/formio-types/src/domain/FormioSubmission.ts b/packages/third-parties/formio-types/src/domain/FormioSubmission.ts index 9bacbd551b2..81f70ecbd93 100644 --- a/packages/third-parties/formio-types/src/domain/FormioSubmission.ts +++ b/packages/third-parties/formio-types/src/domain/FormioSubmission.ts @@ -1,4 +1,4 @@ -import {FormioAccess} from "./FormioAccess"; +import {FormioAccess} from "./FormioAccess.js"; export interface FormioSubmission extends Record { _id: string | undefined; diff --git a/packages/third-parties/formio-types/src/index.ts b/packages/third-parties/formio-types/src/index.ts index 0c572079414..ec9cb9b9397 100644 --- a/packages/third-parties/formio-types/src/index.ts +++ b/packages/third-parties/formio-types/src/index.ts @@ -2,14 +2,14 @@ * @file Automatically generated by barrelsby. */ -export * from "./domain/FormioAccess"; -export * from "./domain/FormioAction"; -export * from "./domain/FormioActionInfo"; -export * from "./domain/FormioActionItem"; -export * from "./domain/FormioComponent"; -export * from "./domain/FormioForm"; -export * from "./domain/FormioPermission"; -export * from "./domain/FormioRole"; -export * from "./domain/FormioSchema"; -export * from "./domain/FormioSubmission"; -export * from "./domain/FormioToken"; +export * from "./domain/FormioAccess.js"; +export * from "./domain/FormioAction.js"; +export * from "./domain/FormioActionInfo.js"; +export * from "./domain/FormioActionItem.js"; +export * from "./domain/FormioComponent.js"; +export * from "./domain/FormioForm.js"; +export * from "./domain/FormioPermission.js"; +export * from "./domain/FormioRole.js"; +export * from "./domain/FormioSchema.js"; +export * from "./domain/FormioSubmission.js"; +export * from "./domain/FormioToken.js"; diff --git a/packages/third-parties/formio/src/FormioModule.spec.ts b/packages/third-parties/formio/src/FormioModule.spec.ts index 3af1cc52fed..a45acb5275e 100644 --- a/packages/third-parties/formio/src/FormioModule.spec.ts +++ b/packages/third-parties/formio/src/FormioModule.spec.ts @@ -1,8 +1,8 @@ import faker from "@faker-js/faker"; import {PlatformApplication, PlatformRouteDetails, PlatformTest} from "@tsed/common"; -import {FormioModule} from "./FormioModule"; -import {FormioInstaller} from "./services/FormioInstaller"; -import {FormioService} from "./services/FormioService"; +import {FormioModule} from "./FormioModule.js"; +import {FormioInstaller} from "./services/FormioInstaller.js"; +import {FormioService} from "./services/FormioService.js"; async function createFormioModuleFixture() { const formio = { diff --git a/packages/third-parties/formio/src/FormioModule.ts b/packages/third-parties/formio/src/FormioModule.ts index 73e3608fb47..0b4dc57f7ad 100644 --- a/packages/third-parties/formio/src/FormioModule.ts +++ b/packages/third-parties/formio/src/FormioModule.ts @@ -2,19 +2,19 @@ import {Constant, Inject, InjectorService, OnReady, OnRoutesInit, PlatformApplic import {deepClone} from "@tsed/core"; import {Module} from "@tsed/di"; import {normalizePath} from "@tsed/normalize-path"; -import {AlterActions} from "./components/AlterActions"; -import {AlterAudit} from "./components/AlterAudit"; -import {AlterHost} from "./components/AlterHost"; -import {AlterLog} from "./components/AlterLog"; -import {AlterSkip} from "./components/AlterSkip"; -import {AlterTemplateExportSteps} from "./components/AlterTemplateExportSteps"; -import {AlterTemplateImportSteps} from "./components/AlterTemplateImportSteps"; -import {FormioConfig} from "./domain/FormioConfig"; -import {FormioTemplate} from "./domain/FormioTemplate"; -import {FormioAuthService} from "./services/FormioAuthService"; -import {FormioHooksService} from "./services/FormioHooksService"; -import {FormioInstaller} from "./services/FormioInstaller"; -import {FormioService} from "./services/FormioService"; +import {AlterActions} from "./components/AlterActions.js"; +import {AlterAudit} from "./components/AlterAudit.js"; +import {AlterHost} from "./components/AlterHost.js"; +import {AlterLog} from "./components/AlterLog.js"; +import {AlterSkip} from "./components/AlterSkip.js"; +import {AlterTemplateExportSteps} from "./components/AlterTemplateExportSteps.js"; +import {AlterTemplateImportSteps} from "./components/AlterTemplateImportSteps.js"; +import {FormioConfig} from "./domain/FormioConfig.js"; +import {FormioTemplate} from "./domain/FormioTemplate.js"; +import {FormioAuthService} from "./services/FormioAuthService.js"; +import {FormioHooksService} from "./services/FormioHooksService.js"; +import {FormioInstaller} from "./services/FormioInstaller.js"; +import {FormioService} from "./services/FormioService.js"; @Module({ imports: [ diff --git a/packages/third-parties/formio/src/builder/FormioMapper.spec.ts b/packages/third-parties/formio/src/builder/FormioMapper.spec.ts index 53391bb3d8c..a44553fdf7b 100644 --- a/packages/third-parties/formio/src/builder/FormioMapper.spec.ts +++ b/packages/third-parties/formio/src/builder/FormioMapper.spec.ts @@ -1,6 +1,6 @@ import {toMap as tMap} from "@tsed/core"; import {MongooseDocument} from "@tsed/mongoose"; -import {FormioMapper} from "./FormioMapper"; +import {FormioMapper} from "./FormioMapper.js"; function toMap(list: any[]) { return tMap>(list, (o: any) => [o._id.toString(), `$machineName:${o.machineName}`]); diff --git a/packages/third-parties/formio/src/builder/FormioMapper.ts b/packages/third-parties/formio/src/builder/FormioMapper.ts index 338e75fa4ae..983ab82507f 100644 --- a/packages/third-parties/formio/src/builder/FormioMapper.ts +++ b/packages/third-parties/formio/src/builder/FormioMapper.ts @@ -1,4 +1,4 @@ -import {FormioCtxMapper} from "../domain/FormioCtxMapper"; +import {FormioCtxMapper} from "../domain/FormioCtxMapper.js"; export class FormioMapper { constructor(readonly ctxData: FormioCtxMapper) {} diff --git a/packages/third-parties/formio/src/components/AlterActions.spec.ts b/packages/third-parties/formio/src/components/AlterActions.spec.ts index f2a987bdaa4..8c324c21a04 100644 --- a/packages/third-parties/formio/src/components/AlterActions.spec.ts +++ b/packages/third-parties/formio/src/components/AlterActions.spec.ts @@ -1,12 +1,12 @@ import {Context, PlatformContext, PlatformTest} from "@tsed/common"; import {BadRequest} from "@tsed/exceptions"; import {FormioActionInfo, FormioComponent} from "@tsed/formio-types"; -import {Action} from "../decorators/action"; -import {ActionCtx} from "../decorators/actionCtx"; -import {ActionMethods} from "../domain/FormioAction"; -import {FormioActions} from "../domain/FormioActionsIndex"; -import {FormioService} from "../services/FormioService"; -import {AlterActions} from "./AlterActions"; +import {Action} from "../decorators/action.js"; +import {ActionCtx} from "../decorators/actionCtx.js"; +import {ActionMethods} from "../domain/FormioAction.js"; +import {FormioActions} from "../domain/FormioActionsIndex.js"; +import {FormioService} from "../services/FormioService.js"; +import {AlterActions} from "./AlterActions.js"; async function getActionsFixture(formio: any) { const ctx = PlatformTest.createRequestContext(); diff --git a/packages/third-parties/formio/src/components/AlterActions.ts b/packages/third-parties/formio/src/components/AlterActions.ts index 58d65e02bd0..a7390a81cb6 100644 --- a/packages/third-parties/formio/src/components/AlterActions.ts +++ b/packages/third-parties/formio/src/components/AlterActions.ts @@ -5,11 +5,11 @@ import {FormioActionInfo} from "@tsed/formio-types"; import {PlatformParams} from "@tsed/platform-params"; import {PlatformResponseFilter} from "@tsed/platform-response-filter"; import {EndpointMetadata} from "@tsed/schema"; -import {Alter} from "../decorators/alter"; -import {AlterHook} from "../domain/AlterHook"; -import {SetActionItemMessage} from "../domain/FormioAction"; -import {FormioActions} from "../domain/FormioActionsIndex"; -import {FormioService} from "../services/FormioService"; +import {Alter} from "../decorators/alter.js"; +import {AlterHook} from "../domain/AlterHook.js"; +import {SetActionItemMessage} from "../domain/FormioAction.js"; +import {FormioActions} from "../domain/FormioActionsIndex.js"; +import {FormioService} from "../services/FormioService.js"; @Alter("actions") export class AlterActions implements AlterHook { diff --git a/packages/third-parties/formio/src/components/AlterAudit.spec.ts b/packages/third-parties/formio/src/components/AlterAudit.spec.ts index 2933d8efffd..9b72978a90a 100644 --- a/packages/third-parties/formio/src/components/AlterAudit.spec.ts +++ b/packages/third-parties/formio/src/components/AlterAudit.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {AlterAudit} from "./AlterAudit"; +import {AlterAudit} from "./AlterAudit.js"; describe("AlterAudit", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/third-parties/formio/src/components/AlterAudit.ts b/packages/third-parties/formio/src/components/AlterAudit.ts index 4ab52bb7520..e0fbe260f8c 100644 --- a/packages/third-parties/formio/src/components/AlterAudit.ts +++ b/packages/third-parties/formio/src/components/AlterAudit.ts @@ -1,6 +1,6 @@ import {DIContext} from "@tsed/di"; -import {Alter} from "../decorators/alter"; -import {AlterHook} from "../domain/AlterHook"; +import {Alter} from "../decorators/alter.js"; +import {AlterHook} from "../domain/AlterHook.js"; @Alter("audit") export class AlterAudit implements AlterHook { diff --git a/packages/third-parties/formio/src/components/AlterHost.spec.ts b/packages/third-parties/formio/src/components/AlterHost.spec.ts index c6c56f40639..76722bd6f6d 100644 --- a/packages/third-parties/formio/src/components/AlterHost.spec.ts +++ b/packages/third-parties/formio/src/components/AlterHost.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {AlterHost} from "./AlterHost"; +import {AlterHost} from "./AlterHost.js"; describe("AlterHost", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/third-parties/formio/src/components/AlterHost.ts b/packages/third-parties/formio/src/components/AlterHost.ts index 7a9474bf724..6a811ef7ca4 100644 --- a/packages/third-parties/formio/src/components/AlterHost.ts +++ b/packages/third-parties/formio/src/components/AlterHost.ts @@ -1,6 +1,6 @@ import {PlatformContext} from "@tsed/common"; -import {Alter} from "../decorators/alter"; -import {AlterHook} from "../domain/AlterHook"; +import {Alter} from "../decorators/alter.js"; +import {AlterHook} from "../domain/AlterHook.js"; @Alter("host") export class AlterHost implements AlterHook { diff --git a/packages/third-parties/formio/src/components/AlterLog.spec.ts b/packages/third-parties/formio/src/components/AlterLog.spec.ts index c3b29544c3f..d471ff6aa8e 100644 --- a/packages/third-parties/formio/src/components/AlterLog.spec.ts +++ b/packages/third-parties/formio/src/components/AlterLog.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {AlterLog} from "./AlterLog"; +import {AlterLog} from "./AlterLog.js"; describe("AlterLog", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/third-parties/formio/src/components/AlterLog.ts b/packages/third-parties/formio/src/components/AlterLog.ts index a4efc007002..20f722592ae 100644 --- a/packages/third-parties/formio/src/components/AlterLog.ts +++ b/packages/third-parties/formio/src/components/AlterLog.ts @@ -1,6 +1,6 @@ import {PlatformContext} from "@tsed/common"; -import {Alter} from "../decorators/alter"; -import {AlterHook} from "../domain/AlterHook"; +import {Alter} from "../decorators/alter.js"; +import {AlterHook} from "../domain/AlterHook.js"; @Alter("log") export class AlterLog implements AlterHook { diff --git a/packages/third-parties/formio/src/components/AlterSkip.spec.ts b/packages/third-parties/formio/src/components/AlterSkip.spec.ts index 173fe2cd277..ece2d282e3e 100644 --- a/packages/third-parties/formio/src/components/AlterSkip.spec.ts +++ b/packages/third-parties/formio/src/components/AlterSkip.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {AlterSkip} from "./AlterSkip"; +import {AlterSkip} from "./AlterSkip.js"; describe("AlterSkip", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/third-parties/formio/src/components/AlterSkip.ts b/packages/third-parties/formio/src/components/AlterSkip.ts index 97932ee89db..b09cd9687fe 100644 --- a/packages/third-parties/formio/src/components/AlterSkip.ts +++ b/packages/third-parties/formio/src/components/AlterSkip.ts @@ -1,7 +1,7 @@ import {Constant, PlatformContext} from "@tsed/common"; import {normalizePath} from "@tsed/normalize-path"; -import {Alter} from "../decorators/alter"; -import {AlterHook} from "../domain/AlterHook"; +import {Alter} from "../decorators/alter.js"; +import {AlterHook} from "../domain/AlterHook.js"; @Alter("skip") export class AlterSkip implements AlterHook { diff --git a/packages/third-parties/formio/src/components/AlterTemplateExportSteps.spec.ts b/packages/third-parties/formio/src/components/AlterTemplateExportSteps.spec.ts index e4ba4990562..201255728df 100644 --- a/packages/third-parties/formio/src/components/AlterTemplateExportSteps.spec.ts +++ b/packages/third-parties/formio/src/components/AlterTemplateExportSteps.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest} from "@tsed/common"; import Sinon from "sinon"; -import {FormioDatabase} from "../services/FormioDatabase"; -import {AlterTemplateExportSteps} from "./AlterTemplateExportSteps"; +import {FormioDatabase} from "../services/FormioDatabase.js"; +import {AlterTemplateExportSteps} from "./AlterTemplateExportSteps.js"; async function createServiceFixture() { const mapper = { diff --git a/packages/third-parties/formio/src/components/AlterTemplateExportSteps.ts b/packages/third-parties/formio/src/components/AlterTemplateExportSteps.ts index f949cf6f960..c6be01fc53d 100644 --- a/packages/third-parties/formio/src/components/AlterTemplateExportSteps.ts +++ b/packages/third-parties/formio/src/components/AlterTemplateExportSteps.ts @@ -1,12 +1,12 @@ import {getValue} from "@tsed/core"; import {Inject} from "@tsed/di"; import {MongooseDocument} from "@tsed/mongoose"; -import {FormioMapper} from "../builder/FormioMapper"; -import {Alter} from "../decorators/alter"; -import {AlterHook} from "../domain/AlterHook"; -import {FormioSubmission} from "../domain/FormioModels"; -import {FormioTemplate} from "../domain/FormioTemplate"; -import {FormioDatabase} from "../services/FormioDatabase"; +import {FormioMapper} from "../builder/FormioMapper.js"; +import {Alter} from "../decorators/alter.js"; +import {AlterHook} from "../domain/AlterHook.js"; +import {FormioSubmission} from "../domain/FormioModels.js"; +import {FormioTemplate} from "../domain/FormioTemplate.js"; +import {FormioDatabase} from "../services/FormioDatabase.js"; import async from "async"; @Alter("templateExportSteps") diff --git a/packages/third-parties/formio/src/components/AlterTemplateImportSteps.spec.ts b/packages/third-parties/formio/src/components/AlterTemplateImportSteps.spec.ts index 9a12e021076..ea22de85bbf 100644 --- a/packages/third-parties/formio/src/components/AlterTemplateImportSteps.spec.ts +++ b/packages/third-parties/formio/src/components/AlterTemplateImportSteps.spec.ts @@ -1,6 +1,6 @@ import {PlatformTest} from "@tsed/common"; -import {FormioDatabase} from "../services/FormioDatabase"; -import {AlterTemplateImportSteps} from "./AlterTemplateImportSteps"; +import {FormioDatabase} from "../services/FormioDatabase.js"; +import {AlterTemplateImportSteps} from "./AlterTemplateImportSteps.js"; async function createServiceFixture() { const mapper = { diff --git a/packages/third-parties/formio/src/components/AlterTemplateImportSteps.ts b/packages/third-parties/formio/src/components/AlterTemplateImportSteps.ts index b6ebed74e8a..02074a2dcac 100644 --- a/packages/third-parties/formio/src/components/AlterTemplateImportSteps.ts +++ b/packages/third-parties/formio/src/components/AlterTemplateImportSteps.ts @@ -1,10 +1,10 @@ import {Inject} from "@tsed/di"; -import {FormioMapper} from "../builder/FormioMapper"; -import {Alter} from "../decorators/alter"; -import {AlterHook} from "../domain/AlterHook"; -import {FormioSubmission} from "../domain/FormioModels"; -import {FormioTemplate} from "../domain/FormioTemplate"; -import {FormioDatabase} from "../services/FormioDatabase"; +import {FormioMapper} from "../builder/FormioMapper.js"; +import {Alter} from "../decorators/alter.js"; +import {AlterHook} from "../domain/AlterHook.js"; +import {FormioSubmission} from "../domain/FormioModels.js"; +import {FormioTemplate} from "../domain/FormioTemplate.js"; +import {FormioDatabase} from "../services/FormioDatabase.js"; import async from "async"; @Alter("templateImportSteps") diff --git a/packages/third-parties/formio/src/decorators/actionCtx.spec.ts b/packages/third-parties/formio/src/decorators/actionCtx.spec.ts index 2310fac3cc6..c5e0202939b 100644 --- a/packages/third-parties/formio/src/decorators/actionCtx.spec.ts +++ b/packages/third-parties/formio/src/decorators/actionCtx.spec.ts @@ -1,4 +1,4 @@ -import {ActionCtx} from "./actionCtx"; +import {ActionCtx} from "./actionCtx.js"; import {JsonParameterStore} from "@tsed/schema"; describe("@ActionCtx", () => { diff --git a/packages/third-parties/formio/src/decorators/actionCtx.ts b/packages/third-parties/formio/src/decorators/actionCtx.ts index ae4890d98a4..f30cbbbe62c 100644 --- a/packages/third-parties/formio/src/decorators/actionCtx.ts +++ b/packages/third-parties/formio/src/decorators/actionCtx.ts @@ -1,5 +1,5 @@ import {Context} from "@tsed/common"; -import {SetActionItemMessage} from "../domain/FormioAction"; +import {SetActionItemMessage} from "../domain/FormioAction.js"; import {FormioAction} from "@tsed/formio-types"; /** diff --git a/packages/third-parties/formio/src/decorators/alter.spec.ts b/packages/third-parties/formio/src/decorators/alter.spec.ts index 5fecba04e0b..1939d4d5112 100644 --- a/packages/third-parties/formio/src/decorators/alter.spec.ts +++ b/packages/third-parties/formio/src/decorators/alter.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {AlterHook} from "../domain/AlterHook"; -import {Alter} from "./alter"; +import {AlterHook} from "../domain/AlterHook.js"; +import {Alter} from "./alter.js"; describe("@Alter", () => { it("should register a hook listener", () => { diff --git a/packages/third-parties/formio/src/decorators/on.spec.ts b/packages/third-parties/formio/src/decorators/on.spec.ts index 79c460b5898..36955b1e94f 100644 --- a/packages/third-parties/formio/src/decorators/on.spec.ts +++ b/packages/third-parties/formio/src/decorators/on.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {OnHook} from "../domain/OnHook"; -import {On} from "./on"; +import {OnHook} from "../domain/OnHook.js"; +import {On} from "./on.js"; describe("@On", () => { it("should register a hook listener", () => { diff --git a/packages/third-parties/formio/src/decorators/useFormioAuth.spec.ts b/packages/third-parties/formio/src/decorators/useFormioAuth.spec.ts index 3d31eb25f7b..2a38064e5c4 100644 --- a/packages/third-parties/formio/src/decorators/useFormioAuth.spec.ts +++ b/packages/third-parties/formio/src/decorators/useFormioAuth.spec.ts @@ -1,6 +1,6 @@ import {EndpointMetadata} from "@tsed/common"; -import {FormioAuthMiddleware} from "../middlewares/FormioAuthMiddleware"; -import {UseFormioAuth} from "./useFormioAuth"; +import {FormioAuthMiddleware} from "../middlewares/FormioAuthMiddleware.js"; +import {UseFormioAuth} from "./useFormioAuth.js"; describe("UseFormioAuth", () => { it("should add auth on method", () => { diff --git a/packages/third-parties/formio/src/decorators/useFormioAuth.ts b/packages/third-parties/formio/src/decorators/useFormioAuth.ts index 30b658ab01a..9314fe6377e 100644 --- a/packages/third-parties/formio/src/decorators/useFormioAuth.ts +++ b/packages/third-parties/formio/src/decorators/useFormioAuth.ts @@ -1,5 +1,5 @@ import {UseAuth} from "@tsed/common"; -import {FormioAuthMiddleware} from "../middlewares/FormioAuthMiddleware"; +import {FormioAuthMiddleware} from "../middlewares/FormioAuthMiddleware.js"; /** * Check if a user is connected by using the Formio Auth middleware diff --git a/packages/third-parties/formio/src/domain/Formio.ts b/packages/third-parties/formio/src/domain/Formio.ts index 9200f39c88d..234a5be3535 100644 --- a/packages/third-parties/formio/src/domain/Formio.ts +++ b/packages/third-parties/formio/src/domain/Formio.ts @@ -2,16 +2,16 @@ import {EventEmitter} from "events"; import {NextFunction, Request, Response} from "express"; import {Db} from "mongodb"; import {Mongoose, Schema} from "mongoose"; -import {FormioActionModelCtor} from "./FormioAction"; -import {FormioActionsIndex} from "./FormioActionsIndex"; -import {FormioAuth} from "./FormioAuth"; -import {FormioBaseModel} from "./FormioBaseModel"; -import {FormioConfig} from "./FormioConfig"; -import {FormioHook, FormioHooks} from "./FormioHooks"; -import {FormioModels, FormioSchemas} from "./FormioModels"; -import {FormioTemplateUtil} from "./FormioTemplateUtil"; -import {FormioUpdate} from "./FormioUpdate"; -import {FormioUtil} from "./FormioUtils"; +import {FormioActionModelCtor} from "./FormioAction.js"; +import {FormioActionsIndex} from "./FormioActionsIndex.js"; +import {FormioAuth} from "./FormioAuth.js"; +import {FormioBaseModel} from "./FormioBaseModel.js"; +import {FormioConfig} from "./FormioConfig.js"; +import {FormioHook, FormioHooks} from "./FormioHooks.js"; +import {FormioModels, FormioSchemas} from "./FormioModels.js"; +import {FormioTemplateUtil} from "./FormioTemplateUtil.js"; +import {FormioUpdate} from "./FormioUpdate.js"; +import {FormioUtil} from "./FormioUtils.js"; export interface FormioBase { /** diff --git a/packages/third-parties/formio/src/domain/FormioAction.ts b/packages/third-parties/formio/src/domain/FormioAction.ts index 9c184918c8d..680c701c9c5 100644 --- a/packages/third-parties/formio/src/domain/FormioAction.ts +++ b/packages/third-parties/formio/src/domain/FormioAction.ts @@ -1,6 +1,6 @@ import {Request, Response} from "express"; -import {FormioMongooseSchema} from "./FormioBaseModel"; -import {FormioComponent} from "./FormioModels"; +import {FormioMongooseSchema} from "./FormioBaseModel.js"; +import {FormioComponent} from "./FormioModels.js"; import {FormioAction, FormioActionInfo} from "@tsed/formio-types"; export interface FormioActionModel extends FormioAction { diff --git a/packages/third-parties/formio/src/domain/FormioActionsIndex.ts b/packages/third-parties/formio/src/domain/FormioActionsIndex.ts index 01b9e3f8771..cc1750d4e3a 100644 --- a/packages/third-parties/formio/src/domain/FormioActionsIndex.ts +++ b/packages/third-parties/formio/src/domain/FormioActionsIndex.ts @@ -1,5 +1,5 @@ import {Type} from "@tsed/core"; -import {FormioActionModelCtor} from "./FormioAction"; +import {FormioActionModelCtor} from "./FormioAction.js"; export interface FormioActions { email: FormioActionModelCtor; diff --git a/packages/third-parties/formio/src/domain/FormioAuth.ts b/packages/third-parties/formio/src/domain/FormioAuth.ts index 63eb231e257..1f60ebb5491 100644 --- a/packages/third-parties/formio/src/domain/FormioAuth.ts +++ b/packages/third-parties/formio/src/domain/FormioAuth.ts @@ -1,6 +1,6 @@ import {Next, Req, Res} from "@tsed/common"; -import {FormioDecodedToken, FormioPayloadToken} from "./FormioDecodedToken"; -import {FormioForm} from "./FormioModels"; +import {FormioDecodedToken, FormioPayloadToken} from "./FormioDecodedToken.js"; +import {FormioForm} from "./FormioModels.js"; export interface FormioAuth { /** diff --git a/packages/third-parties/formio/src/domain/FormioConfig.ts b/packages/third-parties/formio/src/domain/FormioConfig.ts index 5c91468d308..bafb65778d3 100644 --- a/packages/third-parties/formio/src/domain/FormioConfig.ts +++ b/packages/third-parties/formio/src/domain/FormioConfig.ts @@ -1,5 +1,5 @@ -import {FormioSettings} from "./FormioSettings"; -import {FormioTemplate} from "./FormioTemplate"; +import {FormioSettings} from "./FormioSettings.js"; +import {FormioTemplate} from "./FormioTemplate.js"; export interface FormioJwtConfig { secret: string; diff --git a/packages/third-parties/formio/src/domain/FormioHooks.ts b/packages/third-parties/formio/src/domain/FormioHooks.ts index aa0244140c9..ac9990b969f 100644 --- a/packages/third-parties/formio/src/domain/FormioHooks.ts +++ b/packages/third-parties/formio/src/domain/FormioHooks.ts @@ -1,14 +1,14 @@ import {MongooseDocument} from "@tsed/mongoose"; import {Request, Response} from "express"; import {FilterQuery, Schema, SchemaDefinition} from "mongoose"; -import {Formio} from "./Formio"; -import {FormioActions} from "./FormioActionsIndex"; -import {FormioConfig} from "./FormioConfig"; -import {FormioDecodedToken} from "./FormioDecodedToken"; -import {FormioJs} from "./FormioJs"; -import {FormioActionItem, FormioForm, FormioModelsModels, FormioSubmission} from "./FormioModels"; -import {FormioSettings} from "./FormioSettings"; -import {ResourceRestOptions} from "./Resource"; +import {Formio} from "./Formio.js"; +import {FormioActions} from "./FormioActionsIndex.js"; +import {FormioConfig} from "./FormioConfig.js"; +import {FormioDecodedToken} from "./FormioDecodedToken.js"; +import {FormioJs} from "./FormioJs.js"; +import {FormioActionItem, FormioForm, FormioModelsModels, FormioSubmission} from "./FormioModels.js"; +import {FormioSettings} from "./FormioSettings.js"; +import {ResourceRestOptions} from "./Resource.js"; export type FormioInitEvent = "alias" | "params" | "token" | "getTempToken" | "logout" | "current" | "access" | "perms"; diff --git a/packages/third-parties/formio/src/domain/FormioModels.ts b/packages/third-parties/formio/src/domain/FormioModels.ts index 064a801c5b3..2d8c5c59a31 100644 --- a/packages/third-parties/formio/src/domain/FormioModels.ts +++ b/packages/third-parties/formio/src/domain/FormioModels.ts @@ -1,7 +1,7 @@ import {MongooseDocument} from "@tsed/mongoose"; import {Schema} from "mongoose"; -import {FormioActionModelCtor, FormioActionMongooseSchema} from "./FormioAction"; -import {FormioBaseModel, FormioModel, FormioMongooseSchema} from "./FormioBaseModel"; +import {FormioActionModelCtor, FormioActionMongooseSchema} from "./FormioAction.js"; +import {FormioBaseModel, FormioModel, FormioMongooseSchema} from "./FormioBaseModel.js"; import {FormioActionItem, FormioForm, FormioRole, FormioSchema, FormioSubmission, FormioToken} from "@tsed/formio-types"; export * from "@tsed/formio-types"; diff --git a/packages/third-parties/formio/src/domain/FormioRouter.ts b/packages/third-parties/formio/src/domain/FormioRouter.ts index 9d1a8bf0b1f..9006276f676 100644 --- a/packages/third-parties/formio/src/domain/FormioRouter.ts +++ b/packages/third-parties/formio/src/domain/FormioRouter.ts @@ -1,6 +1,6 @@ import {Router} from "express"; -import {Formio, FormioBase} from "./Formio"; -import {FormioHooks} from "./FormioHooks"; +import {Formio, FormioBase} from "./Formio.js"; +import {FormioHooks} from "./FormioHooks.js"; export interface FormioRouter extends Router { formio: FormioBase; diff --git a/packages/third-parties/formio/src/domain/FormioTemplate.ts b/packages/third-parties/formio/src/domain/FormioTemplate.ts index 9671377e861..a0362efedf8 100644 --- a/packages/third-parties/formio/src/domain/FormioTemplate.ts +++ b/packages/third-parties/formio/src/domain/FormioTemplate.ts @@ -1,4 +1,4 @@ -import {FormioActionItem, FormioForm, FormioRole, FormioSubmission} from "./FormioModels"; +import {FormioActionItem, FormioForm, FormioRole, FormioSubmission} from "./FormioModels.js"; export interface FormioTemplate { roles?: Record; diff --git a/packages/third-parties/formio/src/domain/FormioTemplateUtil.ts b/packages/third-parties/formio/src/domain/FormioTemplateUtil.ts index 4f85d3d8927..a51b4332303 100644 --- a/packages/third-parties/formio/src/domain/FormioTemplateUtil.ts +++ b/packages/third-parties/formio/src/domain/FormioTemplateUtil.ts @@ -1,4 +1,4 @@ -import {FormioTemplate} from "./FormioTemplate"; +import {FormioTemplate} from "./FormioTemplate.js"; export interface FormioExportOptions { title: string; diff --git a/packages/third-parties/formio/src/domain/FormioUpdate.ts b/packages/third-parties/formio/src/domain/FormioUpdate.ts index b24ff85cd56..d438045133b 100644 --- a/packages/third-parties/formio/src/domain/FormioUpdate.ts +++ b/packages/third-parties/formio/src/domain/FormioUpdate.ts @@ -1,6 +1,6 @@ import {NextFunction, Request, Response} from "express"; import {Db} from "mongodb"; -import {Formio} from "./Formio"; +import {Formio} from "./Formio.js"; export interface FormioUpdate { db: Db; diff --git a/packages/third-parties/formio/src/domain/FormioUtils.ts b/packages/third-parties/formio/src/domain/FormioUtils.ts index 6217c78fcd2..4dccd6ba4c5 100644 --- a/packages/third-parties/formio/src/domain/FormioUtils.ts +++ b/packages/third-parties/formio/src/domain/FormioUtils.ts @@ -1,6 +1,6 @@ import {Request, Response} from "express"; -import {FormioErrors} from "./FormioErrors"; -import {FormioJs} from "./FormioJs"; +import {FormioErrors} from "./FormioErrors.js"; +import {FormioJs} from "./FormioJs.js"; export interface FormioUtil { Formio: FormioJs; diff --git a/packages/third-parties/formio/src/index.ts b/packages/third-parties/formio/src/index.ts index 7bd4c7a4288..93245e29df6 100644 --- a/packages/third-parties/formio/src/index.ts +++ b/packages/third-parties/formio/src/index.ts @@ -2,46 +2,46 @@ * @file Automatically generated by barrelsby. */ -export * from "./FormioModule"; -export * from "./builder/FormioMapper"; -export * from "./components/AlterActions"; -export * from "./components/AlterAudit"; -export * from "./components/AlterHost"; -export * from "./components/AlterLog"; -export * from "./components/AlterSkip"; -export * from "./components/AlterTemplateExportSteps"; -export * from "./components/AlterTemplateImportSteps"; -export * from "./decorators/action"; -export * from "./decorators/actionCtx"; -export * from "./decorators/alter"; -export * from "./decorators/on"; -export * from "./decorators/useFormioAuth"; -export * from "./domain/AlterHook"; -export * from "./domain/Formio"; -export * from "./domain/FormioAction"; -export * from "./domain/FormioActionsIndex"; -export * from "./domain/FormioAuth"; -export * from "./domain/FormioBaseModel"; -export * from "./domain/FormioConfig"; -export * from "./domain/FormioCtxMapper"; -export * from "./domain/FormioDecodedToken"; -export * from "./domain/FormioErrors"; -export * from "./domain/FormioHooks"; -export * from "./domain/FormioJs"; -export * from "./domain/FormioModels"; -export * from "./domain/FormioRouter"; -export * from "./domain/FormioSettings"; -export * from "./domain/FormioTemplate"; -export * from "./domain/FormioTemplateUtil"; -export * from "./domain/FormioUpdate"; -export * from "./domain/FormioUtils"; -export * from "./domain/OnHook"; -export * from "./domain/Resource"; -export * from "./middlewares/FormioAuthMiddleware"; -export * from "./services/FormioAuthService"; -export * from "./services/FormioDatabase"; -export * from "./services/FormioHooksService"; -export * from "./services/FormioInstaller"; -export * from "./services/FormioRepository"; -export * from "./services/FormioService"; -export * from "./utils/isMongoId"; +export * from "./FormioModule.js"; +export * from "./builder/FormioMapper.js"; +export * from "./components/AlterActions.js"; +export * from "./components/AlterAudit.js"; +export * from "./components/AlterHost.js"; +export * from "./components/AlterLog.js"; +export * from "./components/AlterSkip.js"; +export * from "./components/AlterTemplateExportSteps.js"; +export * from "./components/AlterTemplateImportSteps.js"; +export * from "./decorators/action.js"; +export * from "./decorators/actionCtx.js"; +export * from "./decorators/alter.js"; +export * from "./decorators/on.js"; +export * from "./decorators/useFormioAuth.js"; +export * from "./domain/AlterHook.js"; +export * from "./domain/Formio.js"; +export * from "./domain/FormioAction.js"; +export * from "./domain/FormioActionsIndex.js"; +export * from "./domain/FormioAuth.js"; +export * from "./domain/FormioBaseModel.js"; +export * from "./domain/FormioConfig.js"; +export * from "./domain/FormioCtxMapper.js"; +export * from "./domain/FormioDecodedToken.js"; +export * from "./domain/FormioErrors.js"; +export * from "./domain/FormioHooks.js"; +export * from "./domain/FormioJs.js"; +export * from "./domain/FormioModels.js"; +export * from "./domain/FormioRouter.js"; +export * from "./domain/FormioSettings.js"; +export * from "./domain/FormioTemplate.js"; +export * from "./domain/FormioTemplateUtil.js"; +export * from "./domain/FormioUpdate.js"; +export * from "./domain/FormioUtils.js"; +export * from "./domain/OnHook.js"; +export * from "./domain/Resource.js"; +export * from "./middlewares/FormioAuthMiddleware.js"; +export * from "./services/FormioAuthService.js"; +export * from "./services/FormioDatabase.js"; +export * from "./services/FormioHooksService.js"; +export * from "./services/FormioInstaller.js"; +export * from "./services/FormioRepository.js"; +export * from "./services/FormioService.js"; +export * from "./utils/isMongoId.js"; diff --git a/packages/third-parties/formio/src/middlewares/FormioAuthMiddleware.spec.ts b/packages/third-parties/formio/src/middlewares/FormioAuthMiddleware.spec.ts index b4f18e5a913..4f177d518f1 100644 --- a/packages/third-parties/formio/src/middlewares/FormioAuthMiddleware.spec.ts +++ b/packages/third-parties/formio/src/middlewares/FormioAuthMiddleware.spec.ts @@ -1,8 +1,8 @@ import {PlatformTest} from "@tsed/common"; import {catchAsyncError} from "@tsed/core"; import {Unauthorized} from "@tsed/exceptions"; -import {FormioService} from "../services/FormioService"; -import {FormioAuthMiddleware} from "./FormioAuthMiddleware"; +import {FormioService} from "../services/FormioService.js"; +import {FormioAuthMiddleware} from "./FormioAuthMiddleware.js"; describe("FormioAuthMiddleware", () => { beforeEach(() => PlatformTest.create()); diff --git a/packages/third-parties/formio/src/middlewares/FormioAuthMiddleware.ts b/packages/third-parties/formio/src/middlewares/FormioAuthMiddleware.ts index c5a375aef17..4fc3cacd6c7 100644 --- a/packages/third-parties/formio/src/middlewares/FormioAuthMiddleware.ts +++ b/packages/third-parties/formio/src/middlewares/FormioAuthMiddleware.ts @@ -2,7 +2,7 @@ import {Context, Inject, Middleware} from "@tsed/common"; import {getValue} from "@tsed/core"; import {Unauthorized} from "@tsed/exceptions"; import {promisify} from "util"; -import {FormioService} from "../services/FormioService"; +import {FormioService} from "../services/FormioService.js"; /** * @middleware diff --git a/packages/third-parties/formio/src/services/FormioAuthService.spec.ts b/packages/third-parties/formio/src/services/FormioAuthService.spec.ts index 13815e22baf..0610a2a382f 100644 --- a/packages/third-parties/formio/src/services/FormioAuthService.spec.ts +++ b/packages/third-parties/formio/src/services/FormioAuthService.spec.ts @@ -1,9 +1,9 @@ import {PlatformTest} from "@tsed/common"; import {catchAsyncError} from "@tsed/core"; import {BadRequest} from "@tsed/exceptions"; -import {FormioAuthService} from "./FormioAuthService"; -import {FormioHooksService} from "./FormioHooksService"; -import {FormioService} from "./FormioService"; +import {FormioAuthService} from "./FormioAuthService.js"; +import {FormioHooksService} from "./FormioHooksService.js"; +import {FormioService} from "./FormioService.js"; function createSubmissionModelFixture(): any { return class { diff --git a/packages/third-parties/formio/src/services/FormioAuthService.ts b/packages/third-parties/formio/src/services/FormioAuthService.ts index 2c70a2b8d16..866c2f21211 100644 --- a/packages/third-parties/formio/src/services/FormioAuthService.ts +++ b/packages/third-parties/formio/src/services/FormioAuthService.ts @@ -3,11 +3,11 @@ import {isFunction} from "@tsed/core"; import {Inject, Injectable} from "@tsed/di"; import {BadRequest, NotFound, Unauthorized} from "@tsed/exceptions"; import {promisify} from "util"; -import {FormioPayloadToken} from "../domain/FormioDecodedToken"; -import {FormioForm, FormioSubmission, WithID} from "../domain/FormioModels"; -import {FormioDatabase} from "./FormioDatabase"; -import {FormioHooksService} from "./FormioHooksService"; -import {FormioService} from "./FormioService"; +import {FormioPayloadToken} from "../domain/FormioDecodedToken.js"; +import {FormioForm, FormioSubmission, WithID} from "../domain/FormioModels.js"; +import {FormioDatabase} from "./FormioDatabase.js"; +import {FormioHooksService} from "./FormioHooksService.js"; +import {FormioService} from "./FormioService.js"; @Injectable() export class FormioAuthService { diff --git a/packages/third-parties/formio/src/services/FormioDatabase.spec.ts b/packages/third-parties/formio/src/services/FormioDatabase.spec.ts index 7c3b99abdb4..040d142e17e 100644 --- a/packages/third-parties/formio/src/services/FormioDatabase.spec.ts +++ b/packages/third-parties/formio/src/services/FormioDatabase.spec.ts @@ -1,6 +1,6 @@ import {PlatformTest} from "@tsed/common"; -import {FormioDatabase} from "./FormioDatabase"; -import {FormioService} from "./FormioService"; +import {FormioDatabase} from "./FormioDatabase.js"; +import {FormioService} from "./FormioService.js"; async function createServiceFixture() { const formioService = { diff --git a/packages/third-parties/formio/src/services/FormioDatabase.ts b/packages/third-parties/formio/src/services/FormioDatabase.ts index 621fe68216a..4c26d957b20 100644 --- a/packages/third-parties/formio/src/services/FormioDatabase.ts +++ b/packages/third-parties/formio/src/services/FormioDatabase.ts @@ -4,9 +4,9 @@ import {MongooseDocument, MongooseModel} from "@tsed/mongoose"; import type {FilterQuery} from "mongoose"; import omit from "lodash/omit"; import {FormioAction, FormioActionItem, FormioForm, FormioRole, FormioSubmission, FormioToken} from "@tsed/formio-types"; -import {FormioMapper} from "../builder/FormioMapper"; -import {isMongoId} from "../utils/isMongoId"; -import {FormioService} from "./FormioService"; +import {FormioMapper} from "../builder/FormioMapper.js"; +import {isMongoId} from "../utils/isMongoId.js"; +import {FormioService} from "./FormioService.js"; function toMap(list: any[]) { return tMap>(list, (o: any) => [o._id.toString(), `$machineName:${o.name || o.machineName}`]); diff --git a/packages/third-parties/formio/src/services/FormioHooksService.spec.ts b/packages/third-parties/formio/src/services/FormioHooksService.spec.ts index 5551246bca4..abee7187c5c 100644 --- a/packages/third-parties/formio/src/services/FormioHooksService.spec.ts +++ b/packages/third-parties/formio/src/services/FormioHooksService.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest, Provider} from "@tsed/common"; import {Store} from "@tsed/core"; -import {FormioHooksService} from "./FormioHooksService"; -import {FormioService} from "./FormioService"; +import {FormioHooksService} from "./FormioHooksService.js"; +import {FormioService} from "./FormioService.js"; describe("FormioHooksService", () => { beforeEach(PlatformTest.create); diff --git a/packages/third-parties/formio/src/services/FormioHooksService.ts b/packages/third-parties/formio/src/services/FormioHooksService.ts index 7cdb3ca12d5..64e3568d80d 100644 --- a/packages/third-parties/formio/src/services/FormioHooksService.ts +++ b/packages/third-parties/formio/src/services/FormioHooksService.ts @@ -1,7 +1,7 @@ import {Inject, Injectable, InjectorService} from "@tsed/common"; import {promisify} from "util"; -import {FormioHooks} from "../domain/FormioHooks"; -import {FormioService} from "./FormioService"; +import {FormioHooks} from "../domain/FormioHooks.js"; +import {FormioService} from "./FormioService.js"; import {Request} from "express"; @Injectable() diff --git a/packages/third-parties/formio/src/services/FormioInstaller.spec.ts b/packages/third-parties/formio/src/services/FormioInstaller.spec.ts index 8bedab4b7dd..8af6c9b9890 100644 --- a/packages/third-parties/formio/src/services/FormioInstaller.spec.ts +++ b/packages/third-parties/formio/src/services/FormioInstaller.spec.ts @@ -1,7 +1,7 @@ import faker from "@faker-js/faker"; import {PlatformTest} from "@tsed/common"; -import {FormioInstaller} from "./FormioInstaller"; -import {FormioService} from "./FormioService"; +import {FormioInstaller} from "./FormioInstaller.js"; +import {FormioService} from "./FormioService.js"; async function createFormioInstallerFixture(options: any = {}) { const { diff --git a/packages/third-parties/formio/src/services/FormioInstaller.ts b/packages/third-parties/formio/src/services/FormioInstaller.ts index d5bb9c2767e..b12fe86d5e7 100644 --- a/packages/third-parties/formio/src/services/FormioInstaller.ts +++ b/packages/third-parties/formio/src/services/FormioInstaller.ts @@ -1,8 +1,8 @@ import {Inject, Injectable} from "@tsed/di"; import {Logger} from "@tsed/logger"; -import {FormioSubmission} from "../domain/FormioModels"; -import {FormioTemplate} from "../domain/FormioTemplate"; -import {FormioDatabase} from "./FormioDatabase"; +import {FormioSubmission} from "../domain/FormioModels.js"; +import {FormioTemplate} from "../domain/FormioTemplate.js"; +import {FormioDatabase} from "./FormioDatabase.js"; @Injectable() export class FormioInstaller extends FormioDatabase { diff --git a/packages/third-parties/formio/src/services/FormioRepository.spec.ts b/packages/third-parties/formio/src/services/FormioRepository.spec.ts index 3c31fb892d5..d6220ee8368 100644 --- a/packages/third-parties/formio/src/services/FormioRepository.spec.ts +++ b/packages/third-parties/formio/src/services/FormioRepository.spec.ts @@ -1,6 +1,6 @@ import {Injectable, PlatformTest} from "@tsed/common"; -import {FormioDatabase} from "./FormioDatabase"; -import {FormioRepository} from "./FormioRepository"; +import {FormioDatabase} from "./FormioDatabase.js"; +import {FormioRepository} from "./FormioRepository.js"; @Injectable() class PackagesRepository extends FormioRepository { diff --git a/packages/third-parties/formio/src/services/FormioRepository.ts b/packages/third-parties/formio/src/services/FormioRepository.ts index 1dd648a37ee..36b26520f5b 100644 --- a/packages/third-parties/formio/src/services/FormioRepository.ts +++ b/packages/third-parties/formio/src/services/FormioRepository.ts @@ -1,8 +1,8 @@ import type {FilterQuery} from "mongoose"; import {Inject} from "@tsed/di"; import {MongooseDocument, MongooseModel} from "@tsed/mongoose"; -import {FormioSubmission} from "../domain/FormioModels"; -import {FormioDatabase} from "./FormioDatabase"; +import {FormioSubmission} from "../domain/FormioModels.js"; +import {FormioDatabase} from "./FormioDatabase.js"; export abstract class FormioRepository { @Inject() diff --git a/packages/third-parties/formio/src/services/FormioService.spec.ts b/packages/third-parties/formio/src/services/FormioService.spec.ts index 9e67a4558f7..d9a5f6b85ff 100644 --- a/packages/third-parties/formio/src/services/FormioService.spec.ts +++ b/packages/third-parties/formio/src/services/FormioService.spec.ts @@ -1,9 +1,9 @@ import {PlatformTest} from "@tsed/common"; import Sinon from "sinon"; import "../components/AlterAudit"; -import {AlterAudit} from "../components/AlterAudit"; -import {FormioHooksService} from "./FormioHooksService"; -import {FormioService} from "./FormioService"; +import {AlterAudit} from "../components/AlterAudit.js"; +import {FormioHooksService} from "./FormioHooksService.js"; +import {FormioService} from "./FormioService.js"; const sandbox = Sinon.createSandbox(); diff --git a/packages/third-parties/formio/src/services/FormioService.ts b/packages/third-parties/formio/src/services/FormioService.ts index 2500103f4a9..f00e447aeef 100644 --- a/packages/third-parties/formio/src/services/FormioService.ts +++ b/packages/third-parties/formio/src/services/FormioService.ts @@ -3,13 +3,13 @@ import {MongooseConnectionOptions} from "@tsed/mongoose"; import {Db} from "mongodb"; import {Mongoose} from "mongoose"; import {promisify} from "util"; -import {Formio} from "../domain/Formio"; -import {FormioConfig} from "../domain/FormioConfig"; -import {FormioHook, FormioHooks} from "../domain/FormioHooks"; -import {FormioSchemas} from "../domain/FormioModels"; -import {FormioRouter} from "../domain/FormioRouter"; -import {FormioTemplate} from "../domain/FormioTemplate"; -import {FormioExportOptions} from "../domain/FormioTemplateUtil"; +import {Formio} from "../domain/Formio.js"; +import {FormioConfig} from "../domain/FormioConfig.js"; +import {FormioHook, FormioHooks} from "../domain/FormioHooks.js"; +import {FormioSchemas} from "../domain/FormioModels.js"; +import {FormioRouter} from "../domain/FormioRouter.js"; +import {FormioTemplate} from "../domain/FormioTemplate.js"; +import {FormioExportOptions} from "../domain/FormioTemplateUtil.js"; // @ts-ignore import createRouter from "formio"; // @ts-ignore diff --git a/packages/third-parties/formio/test/app/Server.ts b/packages/third-parties/formio/test/app/Server.ts index 8cf62e194bb..b712835ca19 100644 --- a/packages/third-parties/formio/test/app/Server.ts +++ b/packages/third-parties/formio/test/app/Server.ts @@ -11,7 +11,7 @@ import session from "express-session"; import filedirname from "filedirname"; import methodOverride from "method-override"; import "../../src"; -import template from "../template/project.json"; +import template from "../template/project.json.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/third-parties/formio/test/app/index.ts b/packages/third-parties/formio/test/app/index.ts index 523417ee4a1..9b9b475a3b8 100644 --- a/packages/third-parties/formio/test/app/index.ts +++ b/packages/third-parties/formio/test/app/index.ts @@ -1,8 +1,8 @@ import {$log} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; -import {IndexCtrl} from "./controllers/pages/IndexCtrl"; -import {VersionCtrl} from "./controllers/rest/VersionCtrl"; -import {Server} from "./Server"; +import {IndexCtrl} from "./controllers/pages/IndexCtrl.js"; +import {VersionCtrl} from "./controllers/rest/VersionCtrl.js"; +import {Server} from "./Server.js"; if (process.env.NODE_ENV !== "test") { async function bootstrap() { diff --git a/packages/third-parties/schema-formio/src/components/anyToComponent.ts b/packages/third-parties/schema-formio/src/components/anyToComponent.ts index 3278925e308..9902e2e14dc 100644 --- a/packages/third-parties/schema-formio/src/components/anyToComponent.ts +++ b/packages/third-parties/schema-formio/src/components/anyToComponent.ts @@ -1,5 +1,5 @@ -import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer"; -import {getRef} from "../utils/getRef"; +import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js"; +import {getRef} from "../utils/getRef.js"; export function anyToComponent(schema: any, options: any) { schema = getRef(schema, options); diff --git a/packages/third-parties/schema-formio/src/components/arrayToComponent.ts b/packages/third-parties/schema-formio/src/components/arrayToComponent.ts index 6bbd7603f24..c72baca4434 100644 --- a/packages/third-parties/schema-formio/src/components/arrayToComponent.ts +++ b/packages/third-parties/schema-formio/src/components/arrayToComponent.ts @@ -1,6 +1,6 @@ import {cleanObject} from "@tsed/core"; -import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer"; -import {getRef} from "../utils/getRef"; +import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js"; +import {getRef} from "../utils/getRef.js"; export function arrayToComponent(schema: any, options: any) { const itemSchema = schema.items.$ref ? getRef(schema.items, options) : schema.items; diff --git a/packages/third-parties/schema-formio/src/components/booleanToComponent.ts b/packages/third-parties/schema-formio/src/components/booleanToComponent.ts index 1365c2698d1..f86eac58b79 100644 --- a/packages/third-parties/schema-formio/src/components/booleanToComponent.ts +++ b/packages/third-parties/schema-formio/src/components/booleanToComponent.ts @@ -1,5 +1,5 @@ import {cleanObject} from "@tsed/core"; -import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer"; +import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js"; function booleanToComponent(schema: any, options: any) { const component = execMapper("default", schema, options); diff --git a/packages/third-parties/schema-formio/src/components/dateToComponent.ts b/packages/third-parties/schema-formio/src/components/dateToComponent.ts index ebd1c820367..147b39996f8 100644 --- a/packages/third-parties/schema-formio/src/components/dateToComponent.ts +++ b/packages/third-parties/schema-formio/src/components/dateToComponent.ts @@ -1,5 +1,5 @@ import {getValue} from "@tsed/core"; -import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer"; +import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js"; function dateToComponent(schema: any, options: any) { const component = execMapper("default", schema, options); diff --git a/packages/third-parties/schema-formio/src/components/defaultToComponent.ts b/packages/third-parties/schema-formio/src/components/defaultToComponent.ts index 331ab466032..b25890ad493 100644 --- a/packages/third-parties/schema-formio/src/components/defaultToComponent.ts +++ b/packages/third-parties/schema-formio/src/components/defaultToComponent.ts @@ -1,6 +1,6 @@ import {cleanObject} from "@tsed/core"; -import {registerFormioMapper} from "../registries/FormioMappersContainer"; -import {getFormioProps} from "../utils/getFormioProps"; +import {registerFormioMapper} from "../registries/FormioMappersContainer.js"; +import {getFormioProps} from "../utils/getFormioProps.js"; export function defaultToComponent(schema: any, options: any): any { const formioProps = getFormioProps(schema); diff --git a/packages/third-parties/schema-formio/src/components/enumToComponent.ts b/packages/third-parties/schema-formio/src/components/enumToComponent.ts index 34aecfb6135..e9a08e59e62 100644 --- a/packages/third-parties/schema-formio/src/components/enumToComponent.ts +++ b/packages/third-parties/schema-formio/src/components/enumToComponent.ts @@ -1,5 +1,5 @@ import {cleanObject} from "@tsed/core"; -import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer"; +import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js"; export function enumToComponent(schema: any, options: any) { const component = execMapper("default", schema, options); diff --git a/packages/third-parties/schema-formio/src/components/mapToComponent.ts b/packages/third-parties/schema-formio/src/components/mapToComponent.ts index 17f19744e2c..8657f36e8ba 100644 --- a/packages/third-parties/schema-formio/src/components/mapToComponent.ts +++ b/packages/third-parties/schema-formio/src/components/mapToComponent.ts @@ -1,4 +1,4 @@ -import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer"; +import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js"; export function mapToComponent(schema: any, options: any) { return { diff --git a/packages/third-parties/schema-formio/src/components/nestedToComponent.ts b/packages/third-parties/schema-formio/src/components/nestedToComponent.ts index fcb980c60df..c66025fa7aa 100644 --- a/packages/third-parties/schema-formio/src/components/nestedToComponent.ts +++ b/packages/third-parties/schema-formio/src/components/nestedToComponent.ts @@ -1,5 +1,5 @@ import {sentenceCase} from "change-case"; -import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer"; +import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js"; export function nestedToComponent(schema: any, options: any) { return { diff --git a/packages/third-parties/schema-formio/src/components/numberToComponent.ts b/packages/third-parties/schema-formio/src/components/numberToComponent.ts index 74127b4024f..51e4142ade9 100644 --- a/packages/third-parties/schema-formio/src/components/numberToComponent.ts +++ b/packages/third-parties/schema-formio/src/components/numberToComponent.ts @@ -1,5 +1,5 @@ import {cleanObject, getValue} from "@tsed/core"; -import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer"; +import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js"; export function numberToComponent(schema: any, options: any) { const component = execMapper("default", schema, options); diff --git a/packages/third-parties/schema-formio/src/components/objectToEditGrid.ts b/packages/third-parties/schema-formio/src/components/objectToEditGrid.ts index a635ae1b9fc..52aef7cebd1 100644 --- a/packages/third-parties/schema-formio/src/components/objectToEditGrid.ts +++ b/packages/third-parties/schema-formio/src/components/objectToEditGrid.ts @@ -1,4 +1,4 @@ -import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer"; +import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js"; export function objectToEditGrid(schema: any, options: any) { return { diff --git a/packages/third-parties/schema-formio/src/components/panelToComponent.ts b/packages/third-parties/schema-formio/src/components/panelToComponent.ts index 31255ce2331..f4ac6c5dbd1 100644 --- a/packages/third-parties/schema-formio/src/components/panelToComponent.ts +++ b/packages/third-parties/schema-formio/src/components/panelToComponent.ts @@ -1,4 +1,4 @@ -import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer"; +import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js"; export function panelToComponent(schema: any, options: any) { return { diff --git a/packages/third-parties/schema-formio/src/components/propertiesToComponents.ts b/packages/third-parties/schema-formio/src/components/propertiesToComponents.ts index eb96c8c0fe8..3a2e9ba0ea4 100644 --- a/packages/third-parties/schema-formio/src/components/propertiesToComponents.ts +++ b/packages/third-parties/schema-formio/src/components/propertiesToComponents.ts @@ -1,7 +1,7 @@ import {cleanObject, isFunction} from "@tsed/core"; import {FormioComponent, FormioForm} from "@tsed/formio-types"; import {sentenceCase} from "change-case"; -import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer"; +import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js"; function bindResolvers(component: FormioComponent, options: any) { if (component.data) { diff --git a/packages/third-parties/schema-formio/src/components/stringToComponent.ts b/packages/third-parties/schema-formio/src/components/stringToComponent.ts index 0960320359a..dd80947e272 100644 --- a/packages/third-parties/schema-formio/src/components/stringToComponent.ts +++ b/packages/third-parties/schema-formio/src/components/stringToComponent.ts @@ -1,5 +1,5 @@ import {cleanObject} from "@tsed/core"; -import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer"; +import {execMapper, registerFormioMapper} from "../registries/FormioMappersContainer.js"; export function stringToComponent(schema: any, options: any) { if (schema.format) { diff --git a/packages/third-parties/schema-formio/src/decorators/conditional.spec.ts b/packages/third-parties/schema-formio/src/decorators/conditional.spec.ts index 8f98dfe1996..e60c2b5381e 100644 --- a/packages/third-parties/schema-formio/src/decorators/conditional.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/conditional.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {HideWhen, ShowWhen} from "./conditional"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {HideWhen, ShowWhen} from "./conditional.js"; describe("@Conditional", () => { it("should add conditional rule on field (show)", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/conditional.ts b/packages/third-parties/schema-formio/src/decorators/conditional.ts index 7366c80eeeb..468c14d52bd 100644 --- a/packages/third-parties/schema-formio/src/decorators/conditional.ts +++ b/packages/third-parties/schema-formio/src/decorators/conditional.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Adds a conditional display rule on the input form. diff --git a/packages/third-parties/schema-formio/src/decorators/currency.spec.ts b/packages/third-parties/schema-formio/src/decorators/currency.spec.ts index c0d062e26f2..9282618be77 100644 --- a/packages/third-parties/schema-formio/src/decorators/currency.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/currency.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {Currency} from "./currency"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {Currency} from "./currency.js"; describe("Currency", () => { it("should declare currency", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/currency.ts b/packages/third-parties/schema-formio/src/decorators/currency.ts index ab359618009..b8d2d914cff 100644 --- a/packages/third-parties/schema-formio/src/decorators/currency.ts +++ b/packages/third-parties/schema-formio/src/decorators/currency.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Configure the property as Currency component. * @decorator diff --git a/packages/third-parties/schema-formio/src/decorators/customClass.spec.ts b/packages/third-parties/schema-formio/src/decorators/customClass.spec.ts index ceb15874cc6..8036c916538 100644 --- a/packages/third-parties/schema-formio/src/decorators/customClass.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/customClass.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {CustomClass} from "./customClass"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {CustomClass} from "./customClass.js"; describe("@CustomClass", () => { it("should add a custom css class on field", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/customClass.ts b/packages/third-parties/schema-formio/src/decorators/customClass.ts index 8f5d8470def..00c5833be36 100644 --- a/packages/third-parties/schema-formio/src/decorators/customClass.ts +++ b/packages/third-parties/schema-formio/src/decorators/customClass.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Add a custom css class. diff --git a/packages/third-parties/schema-formio/src/decorators/customConditional.spec.ts b/packages/third-parties/schema-formio/src/decorators/customConditional.spec.ts index 9907c1bb3c1..fd3e9103e82 100644 --- a/packages/third-parties/schema-formio/src/decorators/customConditional.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/customConditional.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {CustomConditional} from "./customConditional"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {CustomConditional} from "./customConditional.js"; describe("@CustomConditional", () => { it("should add a custom conditional rule on field (1)", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/customConditional.ts b/packages/third-parties/schema-formio/src/decorators/customConditional.ts index 9758a317b0e..24e43d595bc 100644 --- a/packages/third-parties/schema-formio/src/decorators/customConditional.ts +++ b/packages/third-parties/schema-formio/src/decorators/customConditional.ts @@ -2,7 +2,7 @@ import {FormioComponent, FormioForm, FormioSubmission} from "@tsed/formio-types" import type {Moment} from "moment"; import type {LoDashStatic} from "lodash"; import type {Utils} from "formiojs"; -import {Component} from "./component"; +import {Component} from "./component.js"; import {isArrowFn} from "@tsed/core"; export interface CustomConditionalCtx { diff --git a/packages/third-parties/schema-formio/src/decorators/dataSourceJson.spec.ts b/packages/third-parties/schema-formio/src/decorators/dataSourceJson.spec.ts index 4500a18ab3a..af860be647b 100644 --- a/packages/third-parties/schema-formio/src/decorators/dataSourceJson.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/dataSourceJson.spec.ts @@ -1,6 +1,6 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {DataSourceJson} from "./dataSourceJson"; -import {Select} from "./select"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {DataSourceJson} from "./dataSourceJson.js"; +import {Select} from "./select.js"; describe("DataSourceJson", () => { it("should declare datasource", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/dataSourceJson.ts b/packages/third-parties/schema-formio/src/decorators/dataSourceJson.ts index 32679f0d60d..8b9df25ea95 100644 --- a/packages/third-parties/schema-formio/src/decorators/dataSourceJson.ts +++ b/packages/third-parties/schema-formio/src/decorators/dataSourceJson.ts @@ -1,5 +1,5 @@ -import {Component} from "./component"; -import {FormioDataResolver, FormioDataResolverCtx} from "../domain/FormioDataResolver"; +import {Component} from "./component.js"; +import {FormioDataResolver, FormioDataResolverCtx} from "../domain/FormioDataResolver.js"; import {isFunction} from "@tsed/core"; const wrap = (resolver: FormioDataResolver) => async (opts: FormioDataResolverCtx) => { diff --git a/packages/third-parties/schema-formio/src/decorators/dataSourceUrl.spec.ts b/packages/third-parties/schema-formio/src/decorators/dataSourceUrl.spec.ts index bd00362e0b7..1a22f85ddae 100644 --- a/packages/third-parties/schema-formio/src/decorators/dataSourceUrl.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/dataSourceUrl.spec.ts @@ -1,6 +1,6 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {DataSourceUrl} from "./dataSourceUrl"; -import {Select} from "./select"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {DataSourceUrl} from "./dataSourceUrl.js"; +import {Select} from "./select.js"; describe("@DataSourceUrl", () => { it("should declare datasource url", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/dataSourceUrl.ts b/packages/third-parties/schema-formio/src/decorators/dataSourceUrl.ts index 45cd58d44f5..fc55e105211 100644 --- a/packages/third-parties/schema-formio/src/decorators/dataSourceUrl.ts +++ b/packages/third-parties/schema-formio/src/decorators/dataSourceUrl.ts @@ -1,5 +1,5 @@ -import {Component} from "./component"; -import {FormioDataResolver} from "../domain/FormioDataResolver"; +import {Component} from "./component.js"; +import {FormioDataResolver} from "../domain/FormioDataResolver.js"; /** * Set URL data on the current component. diff --git a/packages/third-parties/schema-formio/src/decorators/errorLabel.spec.ts b/packages/third-parties/schema-formio/src/decorators/errorLabel.spec.ts index ef9b4c61486..401ad03a73a 100644 --- a/packages/third-parties/schema-formio/src/decorators/errorLabel.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/errorLabel.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {ErrorLabel} from "./errorLabel"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {ErrorLabel} from "./errorLabel.js"; describe("@ErrorLabel", () => { it("should set the error label", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/errorLabel.ts b/packages/third-parties/schema-formio/src/decorators/errorLabel.ts index 7f042038e41..1a78bc9ed69 100644 --- a/packages/third-parties/schema-formio/src/decorators/errorLabel.ts +++ b/packages/third-parties/schema-formio/src/decorators/errorLabel.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Set the error label when an error occur. diff --git a/packages/third-parties/schema-formio/src/decorators/errorMessage.spec.ts b/packages/third-parties/schema-formio/src/decorators/errorMessage.spec.ts index ac66c681c5e..6546318ae00 100644 --- a/packages/third-parties/schema-formio/src/decorators/errorMessage.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/errorMessage.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {ErrorMessage} from "./errorMessage"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {ErrorMessage} from "./errorMessage.js"; describe("@ErrorMessage", () => { it("should set a custom error message", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/errorMessage.ts b/packages/third-parties/schema-formio/src/decorators/errorMessage.ts index 709eb48d8a9..879bfeea0ed 100644 --- a/packages/third-parties/schema-formio/src/decorators/errorMessage.ts +++ b/packages/third-parties/schema-formio/src/decorators/errorMessage.ts @@ -1,4 +1,4 @@ -import {Validate} from "./validate"; +import {Validate} from "./validate.js"; /** * Add error message when an error occur. diff --git a/packages/third-parties/schema-formio/src/decorators/form.ts b/packages/third-parties/schema-formio/src/decorators/form.ts index d88a628ba83..c19b2bd95ee 100644 --- a/packages/third-parties/schema-formio/src/decorators/form.ts +++ b/packages/third-parties/schema-formio/src/decorators/form.ts @@ -2,8 +2,8 @@ import {nameOf, StoreSet, useDecorators} from "@tsed/core"; import {FormioForm} from "@tsed/formio-types"; import {Name} from "@tsed/schema"; import {paramCase} from "change-case"; -import {FormsContainer} from "../registries/FormsContainer"; -import {Label} from "./label"; +import {FormsContainer} from "../registries/FormsContainer.js"; +import {Label} from "./label.js"; /** * Expose the model as Formio Form. diff --git a/packages/third-parties/schema-formio/src/decorators/hidden.spec.ts b/packages/third-parties/schema-formio/src/decorators/hidden.spec.ts index 3db13faffce..e5bfddb1ab2 100644 --- a/packages/third-parties/schema-formio/src/decorators/hidden.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/hidden.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {Hidden} from "./hidden"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {Hidden} from "./hidden.js"; describe("Hidden", () => { it("should declare a model with Hidden field", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/hidden.ts b/packages/third-parties/schema-formio/src/decorators/hidden.ts index 495e117a5da..fe22bee59f5 100644 --- a/packages/third-parties/schema-formio/src/decorators/hidden.ts +++ b/packages/third-parties/schema-formio/src/decorators/hidden.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Set hidden field. diff --git a/packages/third-parties/schema-formio/src/decorators/inputTags.spec.ts b/packages/third-parties/schema-formio/src/decorators/inputTags.spec.ts index 5903050794b..1e7e50267d9 100644 --- a/packages/third-parties/schema-formio/src/decorators/inputTags.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/inputTags.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {InputTags} from "./inputTags"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {InputTags} from "./inputTags.js"; describe("InputTags", () => { it("should declare a model with Tags field", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/inputTags.ts b/packages/third-parties/schema-formio/src/decorators/inputTags.ts index b92f033ed34..0f466e05d8d 100644 --- a/packages/third-parties/schema-formio/src/decorators/inputTags.ts +++ b/packages/third-parties/schema-formio/src/decorators/inputTags.ts @@ -1,6 +1,6 @@ import {useDecorators} from "@tsed/core"; import {CollectionOf} from "@tsed/schema"; -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Configure the property as Tags component. * @decorator diff --git a/packages/third-parties/schema-formio/src/decorators/label.spec.ts b/packages/third-parties/schema-formio/src/decorators/label.spec.ts index a6f517f59df..361b1b7682b 100644 --- a/packages/third-parties/schema-formio/src/decorators/label.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/label.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {Label} from "./label"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {Label} from "./label.js"; describe("@Label", () => { it("should add a tooltip on field", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/label.ts b/packages/third-parties/schema-formio/src/decorators/label.ts index 608577fcca6..e5e1a54a6c0 100644 --- a/packages/third-parties/schema-formio/src/decorators/label.ts +++ b/packages/third-parties/schema-formio/src/decorators/label.ts @@ -1,5 +1,5 @@ import {CustomKey, JsonEntityFn} from "@tsed/schema"; -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Change the label field diff --git a/packages/third-parties/schema-formio/src/decorators/mask.spec.ts b/packages/third-parties/schema-formio/src/decorators/mask.spec.ts index c9480f0164b..fb98b9e5814 100644 --- a/packages/third-parties/schema-formio/src/decorators/mask.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/mask.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {Mask, Masks} from "./mask"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {Mask, Masks} from "./mask.js"; describe("@Mask", () => { it("should add a mask on field (1)", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/mask.ts b/packages/third-parties/schema-formio/src/decorators/mask.ts index 6038fa9abf8..75f29597c51 100644 --- a/packages/third-parties/schema-formio/src/decorators/mask.ts +++ b/packages/third-parties/schema-formio/src/decorators/mask.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * An input mask helps the user with input by ensuring a predefined format. diff --git a/packages/third-parties/schema-formio/src/decorators/maxWords.spec.ts b/packages/third-parties/schema-formio/src/decorators/maxWords.spec.ts index 4ecae5bb583..53ce445f38f 100644 --- a/packages/third-parties/schema-formio/src/decorators/maxWords.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/maxWords.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {MaxWords} from "./maxWords"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {MaxWords} from "./maxWords.js"; describe("@MaxWords", () => { it("should set the max words", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/maxWords.ts b/packages/third-parties/schema-formio/src/decorators/maxWords.ts index 70880442ef5..a48332dbf8b 100644 --- a/packages/third-parties/schema-formio/src/decorators/maxWords.ts +++ b/packages/third-parties/schema-formio/src/decorators/maxWords.ts @@ -1,4 +1,4 @@ -import {Validate} from "./validate"; +import {Validate} from "./validate.js"; /** * Add the minimum amount of words that can be added to this field. diff --git a/packages/third-parties/schema-formio/src/decorators/minWords.spec.ts b/packages/third-parties/schema-formio/src/decorators/minWords.spec.ts index 2a369668846..61569a8404d 100644 --- a/packages/third-parties/schema-formio/src/decorators/minWords.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/minWords.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {MinWords} from "./minWords"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {MinWords} from "./minWords.js"; describe("@MinWords", () => { it("should set the min words", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/minWords.ts b/packages/third-parties/schema-formio/src/decorators/minWords.ts index 84bfb01f932..c2892a82a86 100644 --- a/packages/third-parties/schema-formio/src/decorators/minWords.ts +++ b/packages/third-parties/schema-formio/src/decorators/minWords.ts @@ -1,4 +1,4 @@ -import {Validate} from "./validate"; +import {Validate} from "./validate.js"; /** * Add the maximum amount of words that can be added to this field. diff --git a/packages/third-parties/schema-formio/src/decorators/modalEdit.spec.ts b/packages/third-parties/schema-formio/src/decorators/modalEdit.spec.ts index c6bfe2af4e3..91557e8d61e 100644 --- a/packages/third-parties/schema-formio/src/decorators/modalEdit.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/modalEdit.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {ModalEdit} from "./modalEdit"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {ModalEdit} from "./modalEdit.js"; describe("@ModalEdit", () => { it("should transform field to editable modal", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/modalEdit.ts b/packages/third-parties/schema-formio/src/decorators/modalEdit.ts index c4cd8805a71..09014673186 100644 --- a/packages/third-parties/schema-formio/src/decorators/modalEdit.ts +++ b/packages/third-parties/schema-formio/src/decorators/modalEdit.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Opens up a modal to edit the value of this component. diff --git a/packages/third-parties/schema-formio/src/decorators/multiple.spec.ts b/packages/third-parties/schema-formio/src/decorators/multiple.spec.ts index 9d50accf9cf..478c01a99b3 100644 --- a/packages/third-parties/schema-formio/src/decorators/multiple.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/multiple.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {Multiple} from "./multiple"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {Multiple} from "./multiple.js"; describe("Multiple", () => { it("should declare a model with multiple field", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/multiple.ts b/packages/third-parties/schema-formio/src/decorators/multiple.ts index be205347df2..c848251bc9c 100644 --- a/packages/third-parties/schema-formio/src/decorators/multiple.ts +++ b/packages/third-parties/schema-formio/src/decorators/multiple.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Change the multiple value on the decorated property. diff --git a/packages/third-parties/schema-formio/src/decorators/openWhenEmpty.ts b/packages/third-parties/schema-formio/src/decorators/openWhenEmpty.ts index 122acd726a2..ee94a08723f 100644 --- a/packages/third-parties/schema-formio/src/decorators/openWhenEmpty.ts +++ b/packages/third-parties/schema-formio/src/decorators/openWhenEmpty.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Open automatically the editgrid when the list is empty. diff --git a/packages/third-parties/schema-formio/src/decorators/password.spec.ts b/packages/third-parties/schema-formio/src/decorators/password.spec.ts index 1d6779dc8a6..56d74fdc08e 100644 --- a/packages/third-parties/schema-formio/src/decorators/password.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/password.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {Password} from "./password"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {Password} from "./password.js"; describe("Password", () => { it("should declare a model with password field", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/password.ts b/packages/third-parties/schema-formio/src/decorators/password.ts index 7ba2076af13..0141560110d 100644 --- a/packages/third-parties/schema-formio/src/decorators/password.ts +++ b/packages/third-parties/schema-formio/src/decorators/password.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; export interface PasswordOpts extends Record { showCharCount?: boolean; diff --git a/packages/third-parties/schema-formio/src/decorators/placeholder.spec.ts b/packages/third-parties/schema-formio/src/decorators/placeholder.spec.ts index 0908a73dc18..3fb0c718330 100644 --- a/packages/third-parties/schema-formio/src/decorators/placeholder.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/placeholder.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {Placeholder} from "./placeholder"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {Placeholder} from "./placeholder.js"; describe("@Placeholder", () => { it("should add a placeholder on field", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/placeholder.ts b/packages/third-parties/schema-formio/src/decorators/placeholder.ts index f45d40f211c..622502a0c72 100644 --- a/packages/third-parties/schema-formio/src/decorators/placeholder.ts +++ b/packages/third-parties/schema-formio/src/decorators/placeholder.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * The placeholder text that will appear when this field is empty. diff --git a/packages/third-parties/schema-formio/src/decorators/prefix.spec.ts b/packages/third-parties/schema-formio/src/decorators/prefix.spec.ts index b2da8be66d1..b419e78b394 100644 --- a/packages/third-parties/schema-formio/src/decorators/prefix.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/prefix.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {Prefix} from "./prefix"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {Prefix} from "./prefix.js"; describe("@Prefix", () => { it("should add a prefix on field", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/prefix.ts b/packages/third-parties/schema-formio/src/decorators/prefix.ts index 4e4e4a2cf35..7f548450a78 100644 --- a/packages/third-parties/schema-formio/src/decorators/prefix.ts +++ b/packages/third-parties/schema-formio/src/decorators/prefix.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Add prefix word on the decorated field. diff --git a/packages/third-parties/schema-formio/src/decorators/select.spec.ts b/packages/third-parties/schema-formio/src/decorators/select.spec.ts index 191d0f17725..5ad7c26901e 100644 --- a/packages/third-parties/schema-formio/src/decorators/select.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/select.spec.ts @@ -1,6 +1,6 @@ import {Enum} from "@tsed/schema"; -import {getFormioSchema} from "../utils/getFormioSchema"; -import {Select} from "./select"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {Select} from "./select.js"; describe("Select", () => { it("should declare a model with select field", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/select.ts b/packages/third-parties/schema-formio/src/decorators/select.ts index 57aae1d80ed..054a199a689 100644 --- a/packages/third-parties/schema-formio/src/decorators/select.ts +++ b/packages/third-parties/schema-formio/src/decorators/select.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; export interface SelectOpts extends Record { idPath?: string; diff --git a/packages/third-parties/schema-formio/src/decorators/suffix.spec.ts b/packages/third-parties/schema-formio/src/decorators/suffix.spec.ts index fe1ab7c48de..a9cc617e0c2 100644 --- a/packages/third-parties/schema-formio/src/decorators/suffix.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/suffix.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {Suffix} from "./suffix"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {Suffix} from "./suffix.js"; describe("@Suffix", () => { it("should add a suffix on field", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/suffix.ts b/packages/third-parties/schema-formio/src/decorators/suffix.ts index c9ef8dbe2b8..13d9e7441e1 100644 --- a/packages/third-parties/schema-formio/src/decorators/suffix.ts +++ b/packages/third-parties/schema-formio/src/decorators/suffix.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Add suffix word on the decorated field. diff --git a/packages/third-parties/schema-formio/src/decorators/tableView.spec.ts b/packages/third-parties/schema-formio/src/decorators/tableView.spec.ts index a83b0c2697f..406bf470ef3 100644 --- a/packages/third-parties/schema-formio/src/decorators/tableView.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/tableView.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {TableView} from "./tableView"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {TableView} from "./tableView.js"; describe("@TableView", () => { it("should change the table view option", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/tableView.ts b/packages/third-parties/schema-formio/src/decorators/tableView.ts index b6eca527319..249ca83cebe 100644 --- a/packages/third-parties/schema-formio/src/decorators/tableView.ts +++ b/packages/third-parties/schema-formio/src/decorators/tableView.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Change the visibility of the current property on a table. diff --git a/packages/third-parties/schema-formio/src/decorators/textCase.spec.ts b/packages/third-parties/schema-formio/src/decorators/textCase.spec.ts index b53bc0512da..032d11433e9 100644 --- a/packages/third-parties/schema-formio/src/decorators/textCase.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/textCase.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {TextCase} from "./textCase"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {TextCase} from "./textCase.js"; describe("@TextCase", () => { it("should change the case", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/textCase.ts b/packages/third-parties/schema-formio/src/decorators/textCase.ts index 5edc7ea9aea..43cbe07958f 100644 --- a/packages/third-parties/schema-formio/src/decorators/textCase.ts +++ b/packages/third-parties/schema-formio/src/decorators/textCase.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Force the output of this field to be sanitized in a specific format. diff --git a/packages/third-parties/schema-formio/src/decorators/textarea.spec.ts b/packages/third-parties/schema-formio/src/decorators/textarea.spec.ts index 812abd52185..596b6ec9520 100644 --- a/packages/third-parties/schema-formio/src/decorators/textarea.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/textarea.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {Textarea} from "./textarea"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {Textarea} from "./textarea.js"; describe("Textarea", () => { it("should declare a model with Textarea field", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/textarea.ts b/packages/third-parties/schema-formio/src/decorators/textarea.ts index a25a4e78fb3..ee8f87d23ac 100644 --- a/packages/third-parties/schema-formio/src/decorators/textarea.ts +++ b/packages/third-parties/schema-formio/src/decorators/textarea.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; export interface TextareaOpts extends Record { showCharCount?: boolean; diff --git a/packages/third-parties/schema-formio/src/decorators/tooltip.spec.ts b/packages/third-parties/schema-formio/src/decorators/tooltip.spec.ts index 4cb3f563e86..621e9aa1c4f 100644 --- a/packages/third-parties/schema-formio/src/decorators/tooltip.spec.ts +++ b/packages/third-parties/schema-formio/src/decorators/tooltip.spec.ts @@ -1,5 +1,5 @@ -import {getFormioSchema} from "../utils/getFormioSchema"; -import {Tooltip} from "./tooltip"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; +import {Tooltip} from "./tooltip.js"; describe("@Tooltip", () => { it("should add a tooltip on field", async () => { diff --git a/packages/third-parties/schema-formio/src/decorators/tooltip.ts b/packages/third-parties/schema-formio/src/decorators/tooltip.ts index aeff80269cd..51d8baa08ac 100644 --- a/packages/third-parties/schema-formio/src/decorators/tooltip.ts +++ b/packages/third-parties/schema-formio/src/decorators/tooltip.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Adds a tooltip to the side of this field. diff --git a/packages/third-parties/schema-formio/src/decorators/validate.ts b/packages/third-parties/schema-formio/src/decorators/validate.ts index 981aee059a2..27a81f5a2d7 100644 --- a/packages/third-parties/schema-formio/src/decorators/validate.ts +++ b/packages/third-parties/schema-formio/src/decorators/validate.ts @@ -1,4 +1,4 @@ -import {Component} from "./component"; +import {Component} from "./component.js"; /** * Add validation rules. diff --git a/packages/third-parties/schema-formio/src/index.ts b/packages/third-parties/schema-formio/src/index.ts index 3451ee6c66b..5a25163519c 100644 --- a/packages/third-parties/schema-formio/src/index.ts +++ b/packages/third-parties/schema-formio/src/index.ts @@ -2,52 +2,52 @@ * @file Automatically generated by barrelsby. */ -export * from "./components/anyToComponent"; -export * from "./components/arrayToComponent"; -export * from "./components/booleanToComponent"; -export * from "./components/dateToComponent"; -export * from "./components/defaultToComponent"; -export * from "./components/enumToComponent"; -export * from "./components/mapToComponent"; -export * from "./components/nestedToComponent"; -export * from "./components/numberToComponent"; -export * from "./components/objectToEditGrid"; -export * from "./components/panelToComponent"; -export * from "./components/propertiesToComponents"; -export * from "./components/stringToComponent"; -export * from "./decorators/component"; -export * from "./decorators/conditional"; -export * from "./decorators/currency"; -export * from "./decorators/customClass"; -export * from "./decorators/customConditional"; -export * from "./decorators/dataSourceJson"; -export * from "./decorators/dataSourceUrl"; -export * from "./decorators/errorLabel"; -export * from "./decorators/errorMessage"; -export * from "./decorators/form"; -export * from "./decorators/hidden"; -export * from "./decorators/inputTags"; -export * from "./decorators/label"; -export * from "./decorators/mask"; -export * from "./decorators/maxWords"; -export * from "./decorators/minWords"; -export * from "./decorators/modalEdit"; -export * from "./decorators/multiple"; -export * from "./decorators/openWhenEmpty"; -export * from "./decorators/password"; -export * from "./decorators/placeholder"; -export * from "./decorators/prefix"; -export * from "./decorators/select"; -export * from "./decorators/suffix"; -export * from "./decorators/tableView"; -export * from "./decorators/tabs"; -export * from "./decorators/textCase"; -export * from "./decorators/textarea"; -export * from "./decorators/tooltip"; -export * from "./decorators/validate"; -export * from "./domain/FormioDataResolver"; -export * from "./registries/FormioMappersContainer"; -export * from "./registries/FormsContainer"; -export * from "./utils/getFormioProps"; -export * from "./utils/getFormioSchema"; -export * from "./utils/getRef"; +export * from "./components/anyToComponent.js"; +export * from "./components/arrayToComponent.js"; +export * from "./components/booleanToComponent.js"; +export * from "./components/dateToComponent.js"; +export * from "./components/defaultToComponent.js"; +export * from "./components/enumToComponent.js"; +export * from "./components/mapToComponent.js"; +export * from "./components/nestedToComponent.js"; +export * from "./components/numberToComponent.js"; +export * from "./components/objectToEditGrid.js"; +export * from "./components/panelToComponent.js"; +export * from "./components/propertiesToComponents.js"; +export * from "./components/stringToComponent.js"; +export * from "./decorators/component.js"; +export * from "./decorators/conditional.js"; +export * from "./decorators/currency.js"; +export * from "./decorators/customClass.js"; +export * from "./decorators/customConditional.js"; +export * from "./decorators/dataSourceJson.js"; +export * from "./decorators/dataSourceUrl.js"; +export * from "./decorators/errorLabel.js"; +export * from "./decorators/errorMessage.js"; +export * from "./decorators/form.js"; +export * from "./decorators/hidden.js"; +export * from "./decorators/inputTags.js"; +export * from "./decorators/label.js"; +export * from "./decorators/mask.js"; +export * from "./decorators/maxWords.js"; +export * from "./decorators/minWords.js"; +export * from "./decorators/modalEdit.js"; +export * from "./decorators/multiple.js"; +export * from "./decorators/openWhenEmpty.js"; +export * from "./decorators/password.js"; +export * from "./decorators/placeholder.js"; +export * from "./decorators/prefix.js"; +export * from "./decorators/select.js"; +export * from "./decorators/suffix.js"; +export * from "./decorators/tableView.js"; +export * from "./decorators/tabs.js"; +export * from "./decorators/textCase.js"; +export * from "./decorators/textarea.js"; +export * from "./decorators/tooltip.js"; +export * from "./decorators/validate.js"; +export * from "./domain/FormioDataResolver.js"; +export * from "./registries/FormioMappersContainer.js"; +export * from "./registries/FormsContainer.js"; +export * from "./utils/getFormioProps.js"; +export * from "./utils/getFormioSchema.js"; +export * from "./utils/getRef.js"; diff --git a/packages/third-parties/schema-formio/src/utils/getFormioSchema.spec.ts b/packages/third-parties/schema-formio/src/utils/getFormioSchema.spec.ts index 70bcf4ef505..40bbef133a2 100644 --- a/packages/third-parties/schema-formio/src/utils/getFormioSchema.spec.ts +++ b/packages/third-parties/schema-formio/src/utils/getFormioSchema.spec.ts @@ -1,6 +1,6 @@ import {JsonEntityStore, Property} from "@tsed/schema"; -import {Form} from "../decorators/form"; -import {getFormioSchema} from "../utils/getFormioSchema"; +import {Form} from "../decorators/form.js"; +import {getFormioSchema} from "../utils/getFormioSchema.js"; const schema = { access: [], diff --git a/packages/third-parties/schema-formio/src/utils/getFormioSchema.ts b/packages/third-parties/schema-formio/src/utils/getFormioSchema.ts index 820c74063bf..fc1f2bf567d 100644 --- a/packages/third-parties/schema-formio/src/utils/getFormioSchema.ts +++ b/packages/third-parties/schema-formio/src/utils/getFormioSchema.ts @@ -1,8 +1,8 @@ import {isString, Type} from "@tsed/core"; import {getJsonSchema, JsonEntityStore, JsonSchemaOptions} from "@tsed/schema"; import {FormioForm} from "@tsed/formio-types"; -import {execMapper} from "../registries/FormioMappersContainer"; -import {FormsContainer} from "../registries/FormsContainer"; +import {execMapper} from "../registries/FormioMappersContainer.js"; +import {FormsContainer} from "../registries/FormsContainer.js"; import {paramCase} from "change-case"; import "../components/anyToComponent"; import "../components/arrayToComponent"; diff --git a/packages/third-parties/schema-formio/test/basic.integration.spec.ts b/packages/third-parties/schema-formio/test/basic.integration.spec.ts index 2ab4605fc21..0b42660e24f 100644 --- a/packages/third-parties/schema-formio/test/basic.integration.spec.ts +++ b/packages/third-parties/schema-formio/test/basic.integration.spec.ts @@ -12,7 +12,7 @@ import { Title, Uri } from "@tsed/schema"; -import {getFormioSchema, InputTags, TableView} from "../src"; +import {getFormioSchema, InputTags, TableView} from "../src/index.js"; export enum OIDCResponseTypes { CODE = "code", diff --git a/packages/third-parties/schema-formio/test/datamap.integration.spec.ts b/packages/third-parties/schema-formio/test/datamap.integration.spec.ts index dbe0e58cb8f..e5ec5f8fa68 100644 --- a/packages/third-parties/schema-formio/test/datamap.integration.spec.ts +++ b/packages/third-parties/schema-formio/test/datamap.integration.spec.ts @@ -1,5 +1,5 @@ import {CollectionOf} from "@tsed/schema"; -import {getFormioSchema} from "../src"; +import {getFormioSchema} from "../src/index.js"; describe("DataMap integration", () => { it("should generate form (string)", async () => { diff --git a/packages/third-parties/schema-formio/test/date.integration.spec.ts b/packages/third-parties/schema-formio/test/date.integration.spec.ts index cf19aedc02a..5fdf441b362 100644 --- a/packages/third-parties/schema-formio/test/date.integration.spec.ts +++ b/packages/third-parties/schema-formio/test/date.integration.spec.ts @@ -1,5 +1,5 @@ import {DateFormat, DateTime} from "@tsed/schema"; -import {Component, getFormioSchema} from "../src"; +import {Component, getFormioSchema} from "../src/index.js"; describe("Date integration", () => { it("should generate date-time field", async () => { diff --git a/packages/third-parties/schema-formio/test/deep-nested-form.integration.spec.ts b/packages/third-parties/schema-formio/test/deep-nested-form.integration.spec.ts index 9349b2f73a9..88e05cb7664 100644 --- a/packages/third-parties/schema-formio/test/deep-nested-form.integration.spec.ts +++ b/packages/third-parties/schema-formio/test/deep-nested-form.integration.spec.ts @@ -1,5 +1,5 @@ import {Default, Property} from "@tsed/schema"; -import {Form, getFormioSchema, Label} from "../src"; +import {Form, getFormioSchema, Label} from "../src/index.js"; @Form({label: "One hour before this maintenance"}) export class AutomationOneHourBefore { diff --git a/packages/third-parties/schema-formio/test/editgrid.integration.spec.ts b/packages/third-parties/schema-formio/test/editgrid.integration.spec.ts index 1dd502bb754..a740eec34ba 100644 --- a/packages/third-parties/schema-formio/test/editgrid.integration.spec.ts +++ b/packages/third-parties/schema-formio/test/editgrid.integration.spec.ts @@ -1,6 +1,6 @@ import {CollectionOf, MaxItems, MinItems, Property} from "@tsed/schema"; -import {getFormioSchema} from "../src"; -import {OpenWhenEmpty} from "../src/decorators/openWhenEmpty"; +import {getFormioSchema} from "../src/index.js"; +import {OpenWhenEmpty} from "../src/decorators/openWhenEmpty.js"; describe("EditGrid integration", () => { it("should generate form", async () => { diff --git a/packages/third-parties/schema-formio/test/email.integration.spec.ts b/packages/third-parties/schema-formio/test/email.integration.spec.ts index 7897e113cb6..f8bcf6ff3ab 100644 --- a/packages/third-parties/schema-formio/test/email.integration.spec.ts +++ b/packages/third-parties/schema-formio/test/email.integration.spec.ts @@ -1,5 +1,5 @@ import {Email} from "@tsed/schema"; -import {getFormioSchema} from "../src"; +import {getFormioSchema} from "../src/index.js"; describe("Email integration", () => { it("should generate email field", async () => { diff --git a/packages/third-parties/schema-formio/test/enums.integration.spec.ts b/packages/third-parties/schema-formio/test/enums.integration.spec.ts index c0965d55020..470418943e5 100644 --- a/packages/third-parties/schema-formio/test/enums.integration.spec.ts +++ b/packages/third-parties/schema-formio/test/enums.integration.spec.ts @@ -1,5 +1,5 @@ import {Enum} from "@tsed/schema"; -import {DataSourceJson, getFormioSchema, Select} from "../src/index"; +import {DataSourceJson, getFormioSchema, Select} from "../src/index.js"; enum TestEnum { VALUE1 = "VALUE1", diff --git a/packages/third-parties/schema-formio/test/nested-form.integration.spec.ts b/packages/third-parties/schema-formio/test/nested-form.integration.spec.ts index 38f2d8314d8..e2a9138e1f2 100644 --- a/packages/third-parties/schema-formio/test/nested-form.integration.spec.ts +++ b/packages/third-parties/schema-formio/test/nested-form.integration.spec.ts @@ -1,5 +1,5 @@ import {Property, ReadOnly, Required} from "@tsed/schema"; -import {Currency, getFormioSchema, Hidden, TableView, Textarea} from "../src"; +import {Currency, getFormioSchema, Hidden, TableView, Textarea} from "../src/index.js"; describe("Nested form integration", () => { it("should generate form and nested form", async () => { diff --git a/packages/third-parties/schema-formio/test/number.integration.spec.ts b/packages/third-parties/schema-formio/test/number.integration.spec.ts index 7a4cc37ba20..58c3f48f7d6 100644 --- a/packages/third-parties/schema-formio/test/number.integration.spec.ts +++ b/packages/third-parties/schema-formio/test/number.integration.spec.ts @@ -1,5 +1,5 @@ import {Maximum, Minimum, Property} from "@tsed/schema"; -import {getFormioSchema} from "../src"; +import {getFormioSchema} from "../src/index.js"; describe("Number", () => { describe("number declaration", () => { diff --git a/packages/third-parties/schema-formio/test/required.integration.spec.ts b/packages/third-parties/schema-formio/test/required.integration.spec.ts index 452a91d0b9d..c9a6a120f4a 100644 --- a/packages/third-parties/schema-formio/test/required.integration.spec.ts +++ b/packages/third-parties/schema-formio/test/required.integration.spec.ts @@ -1,5 +1,5 @@ import {MinLength, Required} from "@tsed/schema"; -import {getFormioSchema} from "../src"; +import {getFormioSchema} from "../src/index.js"; describe("Required", () => { describe("String", () => { diff --git a/packages/third-parties/schema-formio/test/string.integration.spec.ts b/packages/third-parties/schema-formio/test/string.integration.spec.ts index 4468d4c43b3..3d38657ec68 100644 --- a/packages/third-parties/schema-formio/test/string.integration.spec.ts +++ b/packages/third-parties/schema-formio/test/string.integration.spec.ts @@ -1,5 +1,5 @@ import {MaxLength, MinLength, Pattern, Property} from "@tsed/schema"; -import {getFormioSchema} from "../src"; +import {getFormioSchema} from "../src/index.js"; describe("String", () => { describe("string declaration", () => { diff --git a/packages/third-parties/schema-formio/test/tabs.integration.spec.ts b/packages/third-parties/schema-formio/test/tabs.integration.spec.ts index 4833ae199b5..2132342aa08 100644 --- a/packages/third-parties/schema-formio/test/tabs.integration.spec.ts +++ b/packages/third-parties/schema-formio/test/tabs.integration.spec.ts @@ -13,8 +13,8 @@ import { Title, Uri } from "@tsed/schema"; -import {getFormioSchema, InputTags, TableView} from "../src"; -import {Tabs} from "../src/decorators/tabs"; +import {getFormioSchema, InputTags, TableView} from "../src/index.js"; +import {Tabs} from "../src/decorators/tabs.js"; export enum OIDCResponseTypes { CODE = "code", diff --git a/packages/third-parties/socketio-testing/readme.md b/packages/third-parties/socketio-testing/readme.md index dff8fed8b7a..c5b254a4f4a 100644 --- a/packages/third-parties/socketio-testing/readme.md +++ b/packages/third-parties/socketio-testing/readme.md @@ -112,7 +112,7 @@ Then, you can inject your socket service into another Service, Controller, etc.. ```typescript import {Controller, Get} from "@tsed/common"; -import {MySocketService} from "../services/MySocketService"; +import {MySocketService} from "../services/MySocketService.js"; @Controller("/") export class MyCtrl { @@ -204,7 +204,7 @@ Here an example of a middleware: ```typescript import {deserialize} from "@tsed/json-mapper"; import {SocketMiddleware, Args} from "@tsed/socketio"; -import {User} from "../models/User"; +import {User} from "../models/User.js"; @SocketMiddleware() export class UserConverterSocketMiddleware { @@ -254,8 +254,8 @@ Middlewares chain use the `Promise` to run it. If one of this middlewares/method ```typescript import {SocketService, SocketUseAfter, SocketUseBefore, Emit, Input, Args, SocketSession} from "@tsed/socketio"; -import {UserConverterSocketMiddleware, ErrorHandlerSocketMiddleware} from "../middlewares"; -import {User} from "../models/User"; +import {UserConverterSocketMiddleware, ErrorHandlerSocketMiddleware} from "../middlewares.js"; +import {User} from "../models/User.js"; @SocketService("/my-namespace") @SocketUseBefore(UserConverterSocketMiddleware) // global version diff --git a/packages/third-parties/socketio-testing/src/index.ts b/packages/third-parties/socketio-testing/src/index.ts index bc13b3c6aa5..1652199a714 100644 --- a/packages/third-parties/socketio-testing/src/index.ts +++ b/packages/third-parties/socketio-testing/src/index.ts @@ -1 +1 @@ -export * from "./services/SocketClientService"; +export * from "./services/SocketClientService.js"; diff --git a/packages/third-parties/socketio/readme.md b/packages/third-parties/socketio/readme.md index 63ed378f279..f04668e3bb2 100644 --- a/packages/third-parties/socketio/readme.md +++ b/packages/third-parties/socketio/readme.md @@ -113,7 +113,7 @@ Then, you can inject your socket service into another Service, Controller, etc.. ```typescript import {Controller, Get} from "@tsed/common"; -import {MySocketService} from "../services/MySocketService"; +import {MySocketService} from "../services/MySocketService.js"; @Controller("/") export class MyCtrl { @@ -232,7 +232,7 @@ Here an example of a middleware: ```typescript import {deserialize} from "@tsed/json-mapper"; import {SocketMiddleware, Args} from "@tsed/socketio"; -import {User} from "../models/User"; +import {User} from "../models/User.js"; @SocketMiddleware() export class UserConverterSocketMiddleware { @@ -282,8 +282,8 @@ Middlewares chain use the `Promise` to run it. If one of this middlewares/method ```typescript import {SocketService, SocketUseAfter, SocketUseBefore, Emit, Input, Args, SocketSession} from "@tsed/socketio"; -import {UserConverterSocketMiddleware, ErrorHandlerSocketMiddleware} from "../middlewares"; -import {User} from "../models/User"; +import {UserConverterSocketMiddleware, ErrorHandlerSocketMiddleware} from "../middlewares.js"; +import {User} from "../models/User.js"; import {SocketSessionData} from "@tsed/socketio/lib/cjs"; @SocketService("/my-namespace") diff --git a/packages/third-parties/socketio/src/SocketIOModule.spec.ts b/packages/third-parties/socketio/src/SocketIOModule.spec.ts index ac1734ccb9c..153e87980df 100644 --- a/packages/third-parties/socketio/src/SocketIOModule.spec.ts +++ b/packages/third-parties/socketio/src/SocketIOModule.spec.ts @@ -1,7 +1,7 @@ import {PlatformConfiguration, PlatformTest} from "@tsed/common"; import Http from "http"; import Https from "https"; -import {SocketIOModule, SocketIOServer, SocketIOService} from "./index"; +import {SocketIOModule, SocketIOServer, SocketIOService} from "./index.js"; async function createModuleFixture() { const serverSettingsService = PlatformTest.get(PlatformConfiguration); diff --git a/packages/third-parties/socketio/src/SocketIOModule.ts b/packages/third-parties/socketio/src/SocketIOModule.ts index dca2d544ab3..aba61874179 100644 --- a/packages/third-parties/socketio/src/SocketIOModule.ts +++ b/packages/third-parties/socketio/src/SocketIOModule.ts @@ -1,10 +1,10 @@ import {$log, AfterListen, Constant, InjectorService, Module, OnDestroy, Provider} from "@tsed/common"; import {nameOf} from "@tsed/core"; import {Server, ServerOptions} from "socket.io"; -import {SocketProviderMetadata} from "./class/SocketProviderMetadata"; // tslint:disable-line: no-unused-variable -import {PROVIDER_TYPE_SOCKET_SERVICE} from "./constants/constants"; -import {IO} from "./decorators/io"; -import {SocketIOService} from "./services/SocketIOService"; +import {SocketProviderMetadata} from "./class/SocketProviderMetadata.js"; // tslint:disable-line: no-unused-variable +import {PROVIDER_TYPE_SOCKET_SERVICE} from "./constants/constants.js"; +import {IO} from "./decorators/io.js"; +import {SocketIOService} from "./services/SocketIOService.js"; import Http from "http"; import Https from "https"; import {Inject} from "@tsed/di"; diff --git a/packages/third-parties/socketio/src/class/SocketHandlersBuilder.spec.ts b/packages/third-parties/socketio/src/class/SocketHandlersBuilder.spec.ts index 0e606964693..d2b15dba0b6 100644 --- a/packages/third-parties/socketio/src/class/SocketHandlersBuilder.spec.ts +++ b/packages/third-parties/socketio/src/class/SocketHandlersBuilder.spec.ts @@ -1,10 +1,10 @@ import {DIContext, getContext, PlatformTest} from "@tsed/common"; import {Store} from "@tsed/core"; import {InjectorService, ProviderType} from "@tsed/di"; -import {SocketFilters} from "../interfaces/SocketFilters"; -import {SocketReturnsTypes} from "../interfaces/SocketReturnsTypes"; -import {SocketHandlersBuilder} from "./SocketHandlersBuilder"; -import {SocketProviderMetadata} from "./SocketProviderMetadata"; +import {SocketFilters} from "../interfaces/SocketFilters.js"; +import {SocketReturnsTypes} from "../interfaces/SocketReturnsTypes.js"; +import {SocketHandlersBuilder} from "./SocketHandlersBuilder.js"; +import {SocketProviderMetadata} from "./SocketProviderMetadata.js"; const metadata: any = { handlers: { diff --git a/packages/third-parties/socketio/src/class/SocketHandlersBuilder.ts b/packages/third-parties/socketio/src/class/SocketHandlersBuilder.ts index 3b70008f6c4..ca92186a8ca 100644 --- a/packages/third-parties/socketio/src/class/SocketHandlersBuilder.ts +++ b/packages/third-parties/socketio/src/class/SocketHandlersBuilder.ts @@ -3,14 +3,14 @@ import {DIContext, InjectorService, Provider, runInContext} from "@tsed/di"; import {deserialize} from "@tsed/json-mapper"; import {$log} from "@tsed/logger"; import {Namespace, Socket} from "socket.io"; -import {SocketFilters} from "../interfaces/SocketFilters"; -import {SocketHandlerMetadata} from "../interfaces/SocketHandlerMetadata"; -import {SocketInjectableNsp} from "../interfaces/SocketInjectableNsp"; -import {SocketParamMetadata} from "../interfaces/SocketParamMetadata"; -import {SocketProviderTypes} from "../interfaces/SocketProviderTypes"; -import {SocketReturnsTypes} from "../interfaces/SocketReturnsTypes"; -import {SocketProviderMetadata} from "./SocketProviderMetadata"; -import {SocketSessionData} from "./SocketSessionData"; +import {SocketFilters} from "../interfaces/SocketFilters.js"; +import {SocketHandlerMetadata} from "../interfaces/SocketHandlerMetadata.js"; +import {SocketInjectableNsp} from "../interfaces/SocketInjectableNsp.js"; +import {SocketParamMetadata} from "../interfaces/SocketParamMetadata.js"; +import {SocketProviderTypes} from "../interfaces/SocketProviderTypes.js"; +import {SocketReturnsTypes} from "../interfaces/SocketReturnsTypes.js"; +import {SocketProviderMetadata} from "./SocketProviderMetadata.js"; +import {SocketSessionData} from "./SocketSessionData.js"; import {v4} from "uuid"; /** diff --git a/packages/third-parties/socketio/src/class/SocketProviderMetadata.ts b/packages/third-parties/socketio/src/class/SocketProviderMetadata.ts index b98cc6ffe69..44043559f58 100644 --- a/packages/third-parties/socketio/src/class/SocketProviderMetadata.ts +++ b/packages/third-parties/socketio/src/class/SocketProviderMetadata.ts @@ -1,6 +1,6 @@ -import {SocketHandlerMetadata} from "../interfaces/SocketHandlerMetadata"; -import {SocketInjectableNsp} from "../interfaces/SocketInjectableNsp"; -import {SocketProviderTypes} from "../interfaces/SocketProviderTypes"; +import {SocketHandlerMetadata} from "../interfaces/SocketHandlerMetadata.js"; +import {SocketInjectableNsp} from "../interfaces/SocketInjectableNsp.js"; +import {SocketProviderTypes} from "../interfaces/SocketProviderTypes.js"; export class SocketProviderMetadata { public type: SocketProviderTypes; diff --git a/packages/third-parties/socketio/src/class/SocketSessionData.spec.ts b/packages/third-parties/socketio/src/class/SocketSessionData.spec.ts index 6210a37e21f..76c11099ddb 100644 --- a/packages/third-parties/socketio/src/class/SocketSessionData.spec.ts +++ b/packages/third-parties/socketio/src/class/SocketSessionData.spec.ts @@ -1,4 +1,4 @@ -import {SocketSessionData} from "./SocketSessionData"; +import {SocketSessionData} from "./SocketSessionData.js"; describe("SocketSessionData", () => { let socketSessionData!: SocketSessionData; diff --git a/packages/third-parties/socketio/src/decorators/args.spec.ts b/packages/third-parties/socketio/src/decorators/args.spec.ts index 558a5b9b492..ae153e43472 100644 --- a/packages/third-parties/socketio/src/decorators/args.spec.ts +++ b/packages/third-parties/socketio/src/decorators/args.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {Args} from "../index"; +import {Args} from "../index.js"; describe("Args", () => { describe("without parameters", () => { diff --git a/packages/third-parties/socketio/src/decorators/args.ts b/packages/third-parties/socketio/src/decorators/args.ts index 3b1c32fb34a..b2b2993c087 100644 --- a/packages/third-parties/socketio/src/decorators/args.ts +++ b/packages/third-parties/socketio/src/decorators/args.ts @@ -1,5 +1,5 @@ import {isCollection, Metadata, Store} from "@tsed/core"; -import {SocketFilters} from "../interfaces/SocketFilters"; +import {SocketFilters} from "../interfaces/SocketFilters.js"; /** * Inject the list of arguments in the decorated parameter. diff --git a/packages/third-parties/socketio/src/decorators/broadcast.spec.ts b/packages/third-parties/socketio/src/decorators/broadcast.spec.ts index 55c22a4ba4b..de82f9661fd 100644 --- a/packages/third-parties/socketio/src/decorators/broadcast.spec.ts +++ b/packages/third-parties/socketio/src/decorators/broadcast.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {Broadcast} from "../index"; +import {Broadcast} from "../index.js"; describe("Broadcast", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/broadcast.ts b/packages/third-parties/socketio/src/decorators/broadcast.ts index cbd84f499e9..7a9f3130bf5 100644 --- a/packages/third-parties/socketio/src/decorators/broadcast.ts +++ b/packages/third-parties/socketio/src/decorators/broadcast.ts @@ -1,5 +1,5 @@ -import {SocketReturnsTypes} from "../interfaces/SocketReturnsTypes"; -import {SocketReturns} from "./socketReturns"; +import {SocketReturnsTypes} from "../interfaces/SocketReturnsTypes.js"; +import {SocketReturns} from "./socketReturns.js"; /** * Broadcast the response for all client registered in the same namespace. diff --git a/packages/third-parties/socketio/src/decorators/broadcastOthers.spec.ts b/packages/third-parties/socketio/src/decorators/broadcastOthers.spec.ts index 28293efe848..9fa1839ff31 100644 --- a/packages/third-parties/socketio/src/decorators/broadcastOthers.spec.ts +++ b/packages/third-parties/socketio/src/decorators/broadcastOthers.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {BroadcastOthers} from "../index"; +import {BroadcastOthers} from "../index.js"; describe("BroadcastOthers", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/broadcastOthers.ts b/packages/third-parties/socketio/src/decorators/broadcastOthers.ts index afcf630189f..23ce8d805ed 100644 --- a/packages/third-parties/socketio/src/decorators/broadcastOthers.ts +++ b/packages/third-parties/socketio/src/decorators/broadcastOthers.ts @@ -1,5 +1,5 @@ -import {SocketReturnsTypes} from "../interfaces/SocketReturnsTypes"; -import {SocketReturns} from "./socketReturns"; +import {SocketReturnsTypes} from "../interfaces/SocketReturnsTypes.js"; +import {SocketReturns} from "./socketReturns.js"; /** * Broadcast the response for all client registered in the same namespace except to the current client. diff --git a/packages/third-parties/socketio/src/decorators/emit.spec.ts b/packages/third-parties/socketio/src/decorators/emit.spec.ts index 48fa8f9c192..a088531344b 100644 --- a/packages/third-parties/socketio/src/decorators/emit.spec.ts +++ b/packages/third-parties/socketio/src/decorators/emit.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {Emit} from "../index"; +import {Emit} from "../index.js"; describe("Emit", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/emit.ts b/packages/third-parties/socketio/src/decorators/emit.ts index 1722ef506e4..6611629268d 100644 --- a/packages/third-parties/socketio/src/decorators/emit.ts +++ b/packages/third-parties/socketio/src/decorators/emit.ts @@ -1,5 +1,5 @@ -import {SocketReturnsTypes} from "../interfaces/SocketReturnsTypes"; -import {SocketReturns} from "./socketReturns"; +import {SocketReturnsTypes} from "../interfaces/SocketReturnsTypes.js"; +import {SocketReturns} from "./socketReturns.js"; /** * Emit the response to the client. diff --git a/packages/third-parties/socketio/src/decorators/input.spec.ts b/packages/third-parties/socketio/src/decorators/input.spec.ts index 6347c19382b..74d24524187 100644 --- a/packages/third-parties/socketio/src/decorators/input.spec.ts +++ b/packages/third-parties/socketio/src/decorators/input.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {Input} from "../index"; +import {Input} from "../index.js"; describe("Input", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/inputAndBroadcast.spec.ts b/packages/third-parties/socketio/src/decorators/inputAndBroadcast.spec.ts index d4de49a848f..c417103a226 100644 --- a/packages/third-parties/socketio/src/decorators/inputAndBroadcast.spec.ts +++ b/packages/third-parties/socketio/src/decorators/inputAndBroadcast.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {InputAndBroadcast} from "../index"; +import {InputAndBroadcast} from "../index.js"; describe("InputAndBroadcast", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/inputAndBroadcast.ts b/packages/third-parties/socketio/src/decorators/inputAndBroadcast.ts index c33cec253b5..d01495976bb 100644 --- a/packages/third-parties/socketio/src/decorators/inputAndBroadcast.ts +++ b/packages/third-parties/socketio/src/decorators/inputAndBroadcast.ts @@ -1,5 +1,5 @@ -import {Broadcast} from "./broadcast"; -import {Input} from "./input"; +import {Broadcast} from "./broadcast.js"; +import {Input} from "./input.js"; /** * Attach the decorated method to the socket event and broadcast the response to all clients. diff --git a/packages/third-parties/socketio/src/decorators/inputAndBroadcastOthers.spec.ts b/packages/third-parties/socketio/src/decorators/inputAndBroadcastOthers.spec.ts index 622d6cef54a..ca63f92f95b 100644 --- a/packages/third-parties/socketio/src/decorators/inputAndBroadcastOthers.spec.ts +++ b/packages/third-parties/socketio/src/decorators/inputAndBroadcastOthers.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {InputAndBroadcastOthers} from "../index"; +import {InputAndBroadcastOthers} from "../index.js"; describe("InputAndBroadcastOthers", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/inputAndBroadcastOthers.ts b/packages/third-parties/socketio/src/decorators/inputAndBroadcastOthers.ts index cbf25f99119..9d8d93611b4 100644 --- a/packages/third-parties/socketio/src/decorators/inputAndBroadcastOthers.ts +++ b/packages/third-parties/socketio/src/decorators/inputAndBroadcastOthers.ts @@ -1,5 +1,5 @@ -import {BroadcastOthers} from "./broadcastOthers"; -import {Input} from "./input"; +import {BroadcastOthers} from "./broadcastOthers.js"; +import {Input} from "./input.js"; /** * Attach the decorated method to the socket event and broadcast the response to all clients with the exception of the connected customer. diff --git a/packages/third-parties/socketio/src/decorators/inputAndEmit.spec.ts b/packages/third-parties/socketio/src/decorators/inputAndEmit.spec.ts index ffbc084a152..03ce5faf09e 100644 --- a/packages/third-parties/socketio/src/decorators/inputAndEmit.spec.ts +++ b/packages/third-parties/socketio/src/decorators/inputAndEmit.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {InputAndEmit} from "../index"; +import {InputAndEmit} from "../index.js"; describe("InputAndEmit", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/inputAndEmit.ts b/packages/third-parties/socketio/src/decorators/inputAndEmit.ts index 8c67df61c10..06e70ac191d 100644 --- a/packages/third-parties/socketio/src/decorators/inputAndEmit.ts +++ b/packages/third-parties/socketio/src/decorators/inputAndEmit.ts @@ -1,5 +1,5 @@ -import {Emit} from "./emit"; -import {Input} from "./input"; +import {Emit} from "./emit.js"; +import {Input} from "./input.js"; /** * Attach the decorated method to the socket event and emit the response to the client. diff --git a/packages/third-parties/socketio/src/decorators/io.ts b/packages/third-parties/socketio/src/decorators/io.ts index d2d92f713ca..cc5ca73b649 100644 --- a/packages/third-parties/socketio/src/decorators/io.ts +++ b/packages/third-parties/socketio/src/decorators/io.ts @@ -1,6 +1,6 @@ import {Inject} from "@tsed/di"; import {Type} from "@tsed/core"; -import {Server} from "../services/SocketIOServer"; +import {Server} from "../services/SocketIOServer.js"; /** * Inject the [SocketIO.Server](https://socket.io/docs/server-api/) instance in the decorated parameter. diff --git a/packages/third-parties/socketio/src/decorators/nsp.spec.ts b/packages/third-parties/socketio/src/decorators/nsp.spec.ts index 3cb4f320758..535279d3daa 100644 --- a/packages/third-parties/socketio/src/decorators/nsp.spec.ts +++ b/packages/third-parties/socketio/src/decorators/nsp.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {Nsp} from "../index"; +import {Nsp} from "../index.js"; describe("Nsp", () => { describe("when it used as param decorator", () => { diff --git a/packages/third-parties/socketio/src/decorators/nsp.ts b/packages/third-parties/socketio/src/decorators/nsp.ts index 57b54b3e1b6..3be79c5d1bb 100644 --- a/packages/third-parties/socketio/src/decorators/nsp.ts +++ b/packages/third-parties/socketio/src/decorators/nsp.ts @@ -1,7 +1,7 @@ import {decoratorTypeOf, DecoratorTypes, Store, isRegExp} from "@tsed/core"; import {Namespace as NamespaceType} from "socket.io"; -import {SocketFilters} from "../interfaces/SocketFilters"; -import {SocketFilter} from "./socketFilter"; +import {SocketFilters} from "../interfaces/SocketFilters.js"; +import {SocketFilter} from "./socketFilter.js"; export type Namespace = NamespaceType; export type Nsp = NamespaceType; diff --git a/packages/third-parties/socketio/src/decorators/reason.spec.ts b/packages/third-parties/socketio/src/decorators/reason.spec.ts index b2efdd21c3c..7794cc7307b 100644 --- a/packages/third-parties/socketio/src/decorators/reason.spec.ts +++ b/packages/third-parties/socketio/src/decorators/reason.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {Nsp, SocketErr} from "../index"; -import {Reason} from "./reason"; +import {Nsp, SocketErr} from "../index.js"; +import {Reason} from "./reason.js"; describe("Reason", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/reason.ts b/packages/third-parties/socketio/src/decorators/reason.ts index f864e6edc4e..ef79148e2af 100644 --- a/packages/third-parties/socketio/src/decorators/reason.ts +++ b/packages/third-parties/socketio/src/decorators/reason.ts @@ -1,5 +1,5 @@ -import {SocketFilter} from "./socketFilter"; -import {SocketFilters} from "../interfaces/SocketFilters"; +import {SocketFilter} from "./socketFilter.js"; +import {SocketFilters} from "../interfaces/SocketFilters.js"; /** * Inject the disconnection reason into the decorated parameter. diff --git a/packages/third-parties/socketio/src/decorators/socket.spec.ts b/packages/third-parties/socketio/src/decorators/socket.spec.ts index bcb10c71c5c..2a8079f4d00 100644 --- a/packages/third-parties/socketio/src/decorators/socket.spec.ts +++ b/packages/third-parties/socketio/src/decorators/socket.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {Socket} from "../index"; +import {Socket} from "../index.js"; describe("Socket", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/socket.ts b/packages/third-parties/socketio/src/decorators/socket.ts index 10caf2d75a3..35677c1727a 100644 --- a/packages/third-parties/socketio/src/decorators/socket.ts +++ b/packages/third-parties/socketio/src/decorators/socket.ts @@ -1,6 +1,6 @@ import {Socket as SocketType} from "socket.io"; -import {SocketFilters} from "../interfaces/SocketFilters"; -import {SocketFilter} from "./socketFilter"; +import {SocketFilters} from "../interfaces/SocketFilters.js"; +import {SocketFilter} from "./socketFilter.js"; export type Socket = SocketType; diff --git a/packages/third-parties/socketio/src/decorators/socketErr.spec.ts b/packages/third-parties/socketio/src/decorators/socketErr.spec.ts index d6a04e1b46c..6119d66470c 100644 --- a/packages/third-parties/socketio/src/decorators/socketErr.spec.ts +++ b/packages/third-parties/socketio/src/decorators/socketErr.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {SocketErr} from "../index"; +import {SocketErr} from "../index.js"; describe("@SocketErr", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/socketErr.ts b/packages/third-parties/socketio/src/decorators/socketErr.ts index 4afbfe6d012..eb6413a27f9 100644 --- a/packages/third-parties/socketio/src/decorators/socketErr.ts +++ b/packages/third-parties/socketio/src/decorators/socketErr.ts @@ -1,5 +1,5 @@ -import {SocketFilters} from "../interfaces/SocketFilters"; -import {SocketFilter} from "./socketFilter"; +import {SocketFilters} from "../interfaces/SocketFilters.js"; +import {SocketFilter} from "./socketFilter.js"; /** * Inject the error in the parameters diff --git a/packages/third-parties/socketio/src/decorators/socketEventName.spec.ts b/packages/third-parties/socketio/src/decorators/socketEventName.spec.ts index d25389d6604..69cf1d9b7e3 100644 --- a/packages/third-parties/socketio/src/decorators/socketEventName.spec.ts +++ b/packages/third-parties/socketio/src/decorators/socketEventName.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {SocketEventName} from "../index"; +import {SocketEventName} from "../index.js"; describe("@SocketEventName", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/socketEventName.ts b/packages/third-parties/socketio/src/decorators/socketEventName.ts index 3077edfdb5f..0050923963c 100644 --- a/packages/third-parties/socketio/src/decorators/socketEventName.ts +++ b/packages/third-parties/socketio/src/decorators/socketEventName.ts @@ -1,5 +1,5 @@ -import {SocketFilters} from "../interfaces/SocketFilters"; -import {SocketFilter} from "./socketFilter"; +import {SocketFilters} from "../interfaces/SocketFilters.js"; +import {SocketFilter} from "./socketFilter.js"; /** * Inject the Socket instance in the decorated parameter. diff --git a/packages/third-parties/socketio/src/decorators/socketFilter.ts b/packages/third-parties/socketio/src/decorators/socketFilter.ts index b22ec6c4c4b..a670959619d 100644 --- a/packages/third-parties/socketio/src/decorators/socketFilter.ts +++ b/packages/third-parties/socketio/src/decorators/socketFilter.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {SocketFilters} from "../interfaces/SocketFilters"; +import {SocketFilters} from "../interfaces/SocketFilters.js"; /** * diff --git a/packages/third-parties/socketio/src/decorators/socketMiddleware.spec.ts b/packages/third-parties/socketio/src/decorators/socketMiddleware.spec.ts index 3602d7c16f3..5d07bc465af 100644 --- a/packages/third-parties/socketio/src/decorators/socketMiddleware.spec.ts +++ b/packages/third-parties/socketio/src/decorators/socketMiddleware.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {SocketMiddleware, SocketProviderTypes} from "../index"; +import {SocketMiddleware, SocketProviderTypes} from "../index.js"; describe("@SocketMiddleware", () => { it("should register the middleware", () => { diff --git a/packages/third-parties/socketio/src/decorators/socketMiddleware.ts b/packages/third-parties/socketio/src/decorators/socketMiddleware.ts index 55b6eb14d33..627b3bde0fa 100644 --- a/packages/third-parties/socketio/src/decorators/socketMiddleware.ts +++ b/packages/third-parties/socketio/src/decorators/socketMiddleware.ts @@ -1,6 +1,6 @@ import {Middleware} from "@tsed/platform-middlewares"; import {Store, Type} from "@tsed/core"; -import {SocketProviderTypes} from "../interfaces/SocketProviderTypes"; +import {SocketProviderTypes} from "../interfaces/SocketProviderTypes.js"; /** * Declare a new SocketMiddleware. @@ -32,8 +32,8 @@ import {SocketProviderTypes} from "../interfaces/SocketProviderTypes"; * * ```typescript * import {SocketService, SocketUseAfter, SocketUseBefore, Emit, Input, Args} from "@tsed/socketio"; - * import {UserConverterSocketMiddleware} from "../middlewares"; - * import {User} from "../models/User"; + * import {UserConverterSocketMiddleware} from "../middlewares.js"; + * import {User} from "../models/User.js"; * * @SocketService("/my-namespace") * @SocketUseBefore(UserConverterSocketMiddleware) // global version diff --git a/packages/third-parties/socketio/src/decorators/socketMiddlewareError.spec.ts b/packages/third-parties/socketio/src/decorators/socketMiddlewareError.spec.ts index c990a0bffad..ca37db89a6a 100644 --- a/packages/third-parties/socketio/src/decorators/socketMiddlewareError.spec.ts +++ b/packages/third-parties/socketio/src/decorators/socketMiddlewareError.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {SocketMiddlewareError, SocketProviderTypes} from "../index"; +import {SocketMiddlewareError, SocketProviderTypes} from "../index.js"; describe("@SocketMiddlewareError", () => { it("should register the metadata and middleware", () => { diff --git a/packages/third-parties/socketio/src/decorators/socketMiddlewareError.ts b/packages/third-parties/socketio/src/decorators/socketMiddlewareError.ts index 73eb9b65f61..518dd48983b 100644 --- a/packages/third-parties/socketio/src/decorators/socketMiddlewareError.ts +++ b/packages/third-parties/socketio/src/decorators/socketMiddlewareError.ts @@ -1,6 +1,6 @@ import {Middleware} from "@tsed/platform-middlewares"; import {Store, Type} from "@tsed/core"; -import {SocketProviderTypes} from "../interfaces/SocketProviderTypes"; +import {SocketProviderTypes} from "../interfaces/SocketProviderTypes.js"; /** * Declare a new SocketMiddlewareError. @@ -27,8 +27,8 @@ import {SocketProviderTypes} from "../interfaces/SocketProviderTypes"; * * ```typescript * import {SocketService, SocketUseAfter, SocketUseBefore, Emit, Input, Args} from "@tsed/socketio"; - * import {ErrorHandlerSocketMiddleware} from "../middlewares"; - * import {User} from "../models/User"; + * import {ErrorHandlerSocketMiddleware} from "../middlewares.js"; + * import {User} from "../models/User.js"; * * @SocketService("/my-namespace") * @SocketUseAfter(ErrorHandlerSocketMiddleware) // global version diff --git a/packages/third-parties/socketio/src/decorators/socketNsp.spec.ts b/packages/third-parties/socketio/src/decorators/socketNsp.spec.ts index a6c1ec16aee..279c290b236 100644 --- a/packages/third-parties/socketio/src/decorators/socketNsp.spec.ts +++ b/packages/third-parties/socketio/src/decorators/socketNsp.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {SocketNsp} from "../index"; +import {SocketNsp} from "../index.js"; describe("SocketNsp", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/socketNsp.ts b/packages/third-parties/socketio/src/decorators/socketNsp.ts index 9bcbe0872e9..d86aa666dd2 100644 --- a/packages/third-parties/socketio/src/decorators/socketNsp.ts +++ b/packages/third-parties/socketio/src/decorators/socketNsp.ts @@ -1,6 +1,6 @@ -import {Namespace} from "./nsp"; -import {SocketFilters} from "../interfaces/SocketFilters"; -import {SocketFilter} from "./socketFilter"; +import {Namespace} from "./nsp.js"; +import {SocketFilters} from "../interfaces/SocketFilters.js"; +import {SocketFilter} from "./socketFilter.js"; export type SocketNsp = Namespace; diff --git a/packages/third-parties/socketio/src/decorators/socketReturns.ts b/packages/third-parties/socketio/src/decorators/socketReturns.ts index ffccd05d028..73efa839f0d 100644 --- a/packages/third-parties/socketio/src/decorators/socketReturns.ts +++ b/packages/third-parties/socketio/src/decorators/socketReturns.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {SocketReturnsTypes} from "../interfaces/SocketReturnsTypes"; +import {SocketReturnsTypes} from "../interfaces/SocketReturnsTypes.js"; /** * diff --git a/packages/third-parties/socketio/src/decorators/socketService.spec.ts b/packages/third-parties/socketio/src/decorators/socketService.spec.ts index 88cfb1e713e..af179c1b709 100644 --- a/packages/third-parties/socketio/src/decorators/socketService.spec.ts +++ b/packages/third-parties/socketio/src/decorators/socketService.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {SocketService} from "./socketService"; +import {SocketService} from "./socketService.js"; describe("SocketService", () => { describe("case 1", () => { diff --git a/packages/third-parties/socketio/src/decorators/socketService.ts b/packages/third-parties/socketio/src/decorators/socketService.ts index a6f850441fb..94d8408d048 100644 --- a/packages/third-parties/socketio/src/decorators/socketService.ts +++ b/packages/third-parties/socketio/src/decorators/socketService.ts @@ -1,7 +1,7 @@ import {StoreMerge, useDecorators} from "@tsed/core"; import {Injectable} from "@tsed/di"; -import {SocketProviderTypes} from "../interfaces/SocketProviderTypes"; -import {PROVIDER_TYPE_SOCKET_SERVICE} from "../constants/constants"; +import {SocketProviderTypes} from "../interfaces/SocketProviderTypes.js"; +import {PROVIDER_TYPE_SOCKET_SERVICE} from "../constants/constants.js"; /** * The decorators `@SocketService()` declare a new socket service (and service) can be injected in other service or controller on there `constructor`. diff --git a/packages/third-parties/socketio/src/decorators/socketSession.spec.ts b/packages/third-parties/socketio/src/decorators/socketSession.spec.ts index 456e06043b6..68008063e64 100644 --- a/packages/third-parties/socketio/src/decorators/socketSession.spec.ts +++ b/packages/third-parties/socketio/src/decorators/socketSession.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {RawSocketSession, SocketFilters, SocketSession} from "../index"; +import {RawSocketSession, SocketFilters, SocketSession} from "../index.js"; describe("SocketSession", () => { it("should set metadata", () => { diff --git a/packages/third-parties/socketio/src/decorators/socketSession.ts b/packages/third-parties/socketio/src/decorators/socketSession.ts index 9f767d97c71..27d31c3228a 100644 --- a/packages/third-parties/socketio/src/decorators/socketSession.ts +++ b/packages/third-parties/socketio/src/decorators/socketSession.ts @@ -1,5 +1,5 @@ -import {SocketFilters} from "../interfaces/SocketFilters"; -import {SocketFilter} from "./socketFilter"; +import {SocketFilters} from "../interfaces/SocketFilters.js"; +import {SocketFilter} from "./socketFilter.js"; export type SocketSession = Map; diff --git a/packages/third-parties/socketio/src/decorators/socketUseAfter.spec.ts b/packages/third-parties/socketio/src/decorators/socketUseAfter.spec.ts index 29eb6d8763a..480079c33c5 100644 --- a/packages/third-parties/socketio/src/decorators/socketUseAfter.spec.ts +++ b/packages/third-parties/socketio/src/decorators/socketUseAfter.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {SocketUseAfter} from "../index"; +import {SocketUseAfter} from "../index.js"; describe("@SocketUseAfter", () => { describe("when the decorator is used on a class", () => { diff --git a/packages/third-parties/socketio/src/decorators/socketUseAfter.ts b/packages/third-parties/socketio/src/decorators/socketUseAfter.ts index 8193a52bd35..1d1b7fd1a5f 100644 --- a/packages/third-parties/socketio/src/decorators/socketUseAfter.ts +++ b/packages/third-parties/socketio/src/decorators/socketUseAfter.ts @@ -25,8 +25,8 @@ import {Store, Type} from "@tsed/core"; * * ```typescript * import {SocketService, SocketUseAfter, SocketUseBefore, Emit, Input, Args} from "@tsed/socketio"; - * import {ErrorHandlerSocketMiddleware} from "../middlewares"; - * import {User} from "../models/User"; + * import {ErrorHandlerSocketMiddleware} from "../middlewares.js"; + * import {User} from "../models/User.js"; * * @SocketService("/my-namespace") * @SocketUseAfter(ErrorHandlerSocketMiddleware) // global version diff --git a/packages/third-parties/socketio/src/decorators/socketUseBefore.spec.ts b/packages/third-parties/socketio/src/decorators/socketUseBefore.spec.ts index 17a2363e8b2..015b51d0eea 100644 --- a/packages/third-parties/socketio/src/decorators/socketUseBefore.spec.ts +++ b/packages/third-parties/socketio/src/decorators/socketUseBefore.spec.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {SocketUseBefore} from "../index"; +import {SocketUseBefore} from "../index.js"; describe("@SocketUseBefore", () => { describe("when the decorator is used on a class", () => { diff --git a/packages/third-parties/socketio/src/decorators/socketUseBefore.ts b/packages/third-parties/socketio/src/decorators/socketUseBefore.ts index a34fdbb3810..996edfd460d 100644 --- a/packages/third-parties/socketio/src/decorators/socketUseBefore.ts +++ b/packages/third-parties/socketio/src/decorators/socketUseBefore.ts @@ -30,8 +30,8 @@ import {Store, Type} from "@tsed/core"; * * ```typescript * import {SocketService, SocketUseAfter, SocketUseBefore, Emit, Input, Args} from "@tsed/socketio"; - * import {UserConverterSocketMiddleware} from "../middlewares"; - * import {User} from "../models/User"; + * import {UserConverterSocketMiddleware} from "../middlewares.js"; + * import {User} from "../models/User.js"; * * @SocketService("/my-namespace") * @SocketUseBefore(UserConverterSocketMiddleware) // global version diff --git a/packages/third-parties/socketio/src/index.ts b/packages/third-parties/socketio/src/index.ts index 9d56a21b1da..996b2115cc6 100644 --- a/packages/third-parties/socketio/src/index.ts +++ b/packages/third-parties/socketio/src/index.ts @@ -2,41 +2,41 @@ * @file Automatically generated by barrelsby. */ -export * from "./SocketIOModule"; -export * from "./class/SocketHandlersBuilder"; -export * from "./class/SocketProviderMetadata"; -export * from "./class/SocketSessionData"; -export * from "./constants/constants"; -export * from "./decorators/args"; -export * from "./decorators/broadcast"; -export * from "./decorators/broadcastOthers"; -export * from "./decorators/emit"; -export * from "./decorators/input"; -export * from "./decorators/inputAndBroadcast"; -export * from "./decorators/inputAndBroadcastOthers"; -export * from "./decorators/inputAndEmit"; -export * from "./decorators/io"; -export * from "./decorators/nsp"; -export * from "./decorators/reason"; -export * from "./decorators/socket"; -export * from "./decorators/socketErr"; -export * from "./decorators/socketEventName"; -export * from "./decorators/socketFilter"; -export * from "./decorators/socketMiddleware"; -export * from "./decorators/socketMiddlewareError"; -export * from "./decorators/socketNsp"; -export * from "./decorators/socketReturns"; -export * from "./decorators/socketService"; -export * from "./decorators/socketSession"; -export * from "./decorators/socketUseAfter"; -export * from "./decorators/socketUseBefore"; -export * from "./interfaces/OnNamespaceInit"; -export * from "./interfaces/SocketFilters"; -export * from "./interfaces/SocketHandlerMetadata"; -export * from "./interfaces/SocketInjectableNsp"; -export * from "./interfaces/SocketParamMetadata"; -export * from "./interfaces/SocketProviderTypes"; -export * from "./interfaces/SocketReturnsTypes"; -export * from "./interfaces/interfaces"; -export * from "./services/SocketIOServer"; -export * from "./services/SocketIOService"; +export * from "./SocketIOModule.js"; +export * from "./class/SocketHandlersBuilder.js"; +export * from "./class/SocketProviderMetadata.js"; +export * from "./class/SocketSessionData.js"; +export * from "./constants/constants.js"; +export * from "./decorators/args.js"; +export * from "./decorators/broadcast.js"; +export * from "./decorators/broadcastOthers.js"; +export * from "./decorators/emit.js"; +export * from "./decorators/input.js"; +export * from "./decorators/inputAndBroadcast.js"; +export * from "./decorators/inputAndBroadcastOthers.js"; +export * from "./decorators/inputAndEmit.js"; +export * from "./decorators/io.js"; +export * from "./decorators/nsp.js"; +export * from "./decorators/reason.js"; +export * from "./decorators/socket.js"; +export * from "./decorators/socketErr.js"; +export * from "./decorators/socketEventName.js"; +export * from "./decorators/socketFilter.js"; +export * from "./decorators/socketMiddleware.js"; +export * from "./decorators/socketMiddlewareError.js"; +export * from "./decorators/socketNsp.js"; +export * from "./decorators/socketReturns.js"; +export * from "./decorators/socketService.js"; +export * from "./decorators/socketSession.js"; +export * from "./decorators/socketUseAfter.js"; +export * from "./decorators/socketUseBefore.js"; +export * from "./interfaces/OnNamespaceInit.js"; +export * from "./interfaces/SocketFilters.js"; +export * from "./interfaces/SocketHandlerMetadata.js"; +export * from "./interfaces/SocketInjectableNsp.js"; +export * from "./interfaces/SocketParamMetadata.js"; +export * from "./interfaces/SocketProviderTypes.js"; +export * from "./interfaces/SocketReturnsTypes.js"; +export * from "./interfaces/interfaces.js"; +export * from "./services/SocketIOServer.js"; +export * from "./services/SocketIOService.js"; diff --git a/packages/third-parties/socketio/src/interfaces/SocketHandlerMetadata.ts b/packages/third-parties/socketio/src/interfaces/SocketHandlerMetadata.ts index 6cc5ded6255..8e295773b7b 100644 --- a/packages/third-parties/socketio/src/interfaces/SocketHandlerMetadata.ts +++ b/packages/third-parties/socketio/src/interfaces/SocketHandlerMetadata.ts @@ -1,5 +1,5 @@ -import {SocketParamMetadata} from "./SocketParamMetadata"; -import {SocketReturnsTypes} from "./SocketReturnsTypes"; +import {SocketParamMetadata} from "./SocketParamMetadata.js"; +import {SocketReturnsTypes} from "./SocketReturnsTypes.js"; /** * diff --git a/packages/third-parties/socketio/src/interfaces/SocketParamMetadata.ts b/packages/third-parties/socketio/src/interfaces/SocketParamMetadata.ts index 872ddd3e4ca..b02c00aaaaf 100644 --- a/packages/third-parties/socketio/src/interfaces/SocketParamMetadata.ts +++ b/packages/third-parties/socketio/src/interfaces/SocketParamMetadata.ts @@ -1,5 +1,5 @@ import {MetadataTypes} from "@tsed/core"; -import {SocketFilters} from "./SocketFilters"; +import {SocketFilters} from "./SocketFilters.js"; export interface SocketParamMetadata extends Partial { filter: SocketFilters; diff --git a/packages/third-parties/socketio/src/services/SocketIOServer.spec.ts b/packages/third-parties/socketio/src/services/SocketIOServer.spec.ts index 24610fd013b..a102d16163a 100644 --- a/packages/third-parties/socketio/src/services/SocketIOServer.spec.ts +++ b/packages/third-parties/socketio/src/services/SocketIOServer.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {SocketIOServer, Server} from "./SocketIOServer"; +import {SocketIOServer, Server} from "./SocketIOServer.js"; describe("SocketIOServer", () => { describe("when there is configuration", () => { diff --git a/packages/third-parties/socketio/src/services/SocketIOService.spec.ts b/packages/third-parties/socketio/src/services/SocketIOService.spec.ts index a810ac04e3b..860e9a8fbc4 100644 --- a/packages/third-parties/socketio/src/services/SocketIOService.spec.ts +++ b/packages/third-parties/socketio/src/services/SocketIOService.spec.ts @@ -1,6 +1,6 @@ import {PlatformTest} from "@tsed/common"; -import {SocketIOService} from "../index"; -import {Server} from "./SocketIOServer"; +import {SocketIOService} from "../index.js"; +import {Server} from "./SocketIOServer.js"; async function createServiceFixture() { const namespace = { diff --git a/packages/third-parties/socketio/src/services/SocketIOService.ts b/packages/third-parties/socketio/src/services/SocketIOService.ts index afefb81925a..4c6c87ce29b 100644 --- a/packages/third-parties/socketio/src/services/SocketIOService.ts +++ b/packages/third-parties/socketio/src/services/SocketIOService.ts @@ -1,8 +1,8 @@ import {InjectorService, Provider, Service} from "@tsed/common"; import * as SocketIO from "socket.io"; // tslint:disable-line: no-unused-variable -import {SocketHandlersBuilder} from "../class/SocketHandlersBuilder"; -import {SocketProviderMetadata} from "../class/SocketProviderMetadata"; -import {IO} from "../decorators/io"; +import {SocketHandlersBuilder} from "../class/SocketHandlersBuilder.js"; +import {SocketProviderMetadata} from "../class/SocketProviderMetadata.js"; +import {IO} from "../decorators/io.js"; /** * @@ -15,7 +15,10 @@ export class SocketIOService { */ private namespaces: Map = new Map(); - constructor(private injector: InjectorService, @IO private io: SocketIO.Server) {} + constructor( + private injector: InjectorService, + @IO private io: SocketIO.Server + ) {} /** * diff --git a/packages/third-parties/socketio/test/app/Server.ts b/packages/third-parties/socketio/test/app/Server.ts index 653556c5c5d..792bcfa4164 100644 --- a/packages/third-parties/socketio/test/app/Server.ts +++ b/packages/third-parties/socketio/test/app/Server.ts @@ -7,7 +7,7 @@ import compress from "compression"; import cookieParser from "cookie-parser"; import filedirname from "filedirname"; import methodOverride from "method-override"; -import {SocketPageCtrl} from "./controllers/pages/SocketPageCtrl"; +import {SocketPageCtrl} from "./controllers/pages/SocketPageCtrl.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/third-parties/socketio/test/app/index.ts b/packages/third-parties/socketio/test/app/index.ts index 829493459a1..b10c5bdd06d 100644 --- a/packages/third-parties/socketio/test/app/index.ts +++ b/packages/third-parties/socketio/test/app/index.ts @@ -1,6 +1,6 @@ import {$log} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; if (process.env.NODE_ENV !== "test") { async function bootstrap() { diff --git a/packages/third-parties/socketio/test/app/middlewares/ConverterUserSocketMiddleware.ts b/packages/third-parties/socketio/test/app/middlewares/ConverterUserSocketMiddleware.ts index 35867a35b88..fcf1bc0c0bf 100644 --- a/packages/third-parties/socketio/test/app/middlewares/ConverterUserSocketMiddleware.ts +++ b/packages/third-parties/socketio/test/app/middlewares/ConverterUserSocketMiddleware.ts @@ -1,5 +1,5 @@ import {Args, SocketMiddleware, SocketSession} from "@tsed/socketio"; -import {User} from "../models/User"; +import {User} from "../models/User.js"; import {deserialize} from "@tsed/json-mapper"; @SocketMiddleware() diff --git a/packages/third-parties/socketio/test/app/middlewares/InitSessionMiddleware.ts b/packages/third-parties/socketio/test/app/middlewares/InitSessionMiddleware.ts index 94ea92b36de..59f39f3b6f4 100644 --- a/packages/third-parties/socketio/test/app/middlewares/InitSessionMiddleware.ts +++ b/packages/third-parties/socketio/test/app/middlewares/InitSessionMiddleware.ts @@ -1,5 +1,5 @@ import {Middleware, Request} from "@tsed/common"; -import {IUser} from "../models/User"; +import {IUser} from "../models/User.js"; declare global { namespace Express { diff --git a/packages/third-parties/socketio/test/app/services/RoomWS.ts b/packages/third-parties/socketio/test/app/services/RoomWS.ts index 920ef65e8f4..d5f7eda3341 100644 --- a/packages/third-parties/socketio/test/app/services/RoomWS.ts +++ b/packages/third-parties/socketio/test/app/services/RoomWS.ts @@ -1,10 +1,10 @@ import {getClass, nameOf} from "@tsed/core"; import {Args, Emit, Input, IO, Nsp, Socket, SocketService, SocketSession, SocketUseAfter, SocketUseBefore} from "@tsed/socketio"; import {Namespace, Server, Socket as IOSocket} from "socket.io"; -import {AuthSocketMiddleware} from "../middlewares/AuthSocketMiddleware"; -import {ConverterUserSocketMiddleware} from "../middlewares/ConverterUserSocketMiddleware"; -import {ErrorHandlerSocketMiddleware} from "../middlewares/ErrorHandlerSocketMiddleware"; -import {User} from "../models/User"; +import {AuthSocketMiddleware} from "../middlewares/AuthSocketMiddleware.js"; +import {ConverterUserSocketMiddleware} from "../middlewares/ConverterUserSocketMiddleware.js"; +import {ErrorHandlerSocketMiddleware} from "../middlewares/ErrorHandlerSocketMiddleware.js"; +import {User} from "../models/User.js"; @SocketService("/room") @SocketUseBefore(AuthSocketMiddleware) diff --git a/packages/third-parties/socketio/test/socket.integration.spec.ts b/packages/third-parties/socketio/test/socket.integration.spec.ts index e2a90142c77..08590495501 100644 --- a/packages/third-parties/socketio/test/socket.integration.spec.ts +++ b/packages/third-parties/socketio/test/socket.integration.spec.ts @@ -1,10 +1,10 @@ import {Inject, PlatformTest} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; -import {Emit, Input, Nsp, SocketNsp, SocketIOServer, SocketService, SocketSession, SocketUseBefore} from "../src"; +import {Emit, Input, Nsp, SocketNsp, SocketIOServer, SocketService, SocketSession, SocketUseBefore} from "../src/index.js"; import {SocketClientService} from "@tsed/socketio-testing"; import {Namespace, Socket as IOSocket} from "socket.io"; -import {ConverterUserSocketMiddleware} from "./app/middlewares/ConverterUserSocketMiddleware"; -import {Server} from "./app/Server"; +import {ConverterUserSocketMiddleware} from "./app/middlewares/ConverterUserSocketMiddleware.js"; +import {Server} from "./app/Server.js"; @SocketService("/test") export class TestWS { diff --git a/packages/third-parties/socketio/test/socketio.spec.ts b/packages/third-parties/socketio/test/socketio.spec.ts index 32d6410baa4..44fd2be6562 100644 --- a/packages/third-parties/socketio/test/socketio.spec.ts +++ b/packages/third-parties/socketio/test/socketio.spec.ts @@ -2,7 +2,7 @@ import {Controller, Get, PlatformTest} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; import {Nsp, SocketService} from "@tsed/socketio"; import SuperTest from "supertest"; -import {Server} from "./app/Server"; +import {Server} from "./app/Server.js"; @SocketService("/my-namespace") export class HelloSocketService { diff --git a/packages/third-parties/stripe/readme.md b/packages/third-parties/stripe/readme.md index c6d15051fd3..d4ad074201f 100644 --- a/packages/third-parties/stripe/readme.md +++ b/packages/third-parties/stripe/readme.md @@ -153,7 +153,7 @@ You can use stripe.webhooks.generateTestHeaderString to mock webhook events that ```typescript import {Stripe} from "stripe"; import {PlatformTest} from "@tsed/common"; -import {StripWebhookCtrl} from "./StripWebhookCtrl"; +import {StripWebhookCtrl} from "./StripWebhookCtrl.js"; describe("StripWebhookCtrl", () => { beforeEach(() => @@ -203,8 +203,8 @@ import {PlatformTestUtils} from "@tsed/platform-test-utils"; import {expect} from "chai"; import {Stripe} from "stripe"; import SuperTest from "supertest"; -import {StripeWebhooksCtrl} from "./StripWebhookCtrl"; -import {Server} from "../Server"; +import {StripeWebhooksCtrl} from "./StripWebhookCtrl.js"; +import {Server} from "../Server.js"; const utils = PlatformTestUtils.create({ platform: PlatformExpress, diff --git a/packages/third-parties/stripe/src/decorators/webhookEvent.ts b/packages/third-parties/stripe/src/decorators/webhookEvent.ts index c1c71302306..f597b7a3026 100644 --- a/packages/third-parties/stripe/src/decorators/webhookEvent.ts +++ b/packages/third-parties/stripe/src/decorators/webhookEvent.ts @@ -2,8 +2,8 @@ import {UseBefore} from "@tsed/platform-middlewares"; import {Context} from "@tsed/platform-params"; import {StoreSet, useDecorators, useMethodDecorators} from "@tsed/core"; import {In} from "@tsed/schema"; -import {STRIPE_WEBHOOK_EVENT} from "../constants/constants"; -import {WebhookEventMiddleware, WebhookEventOptions} from "../middlewares/WebhookEventMiddleware"; +import {STRIPE_WEBHOOK_EVENT} from "../constants/constants.js"; +import {WebhookEventMiddleware, WebhookEventOptions} from "../middlewares/WebhookEventMiddleware.js"; /** * Get the stripe webhook event. diff --git a/packages/third-parties/stripe/src/index.ts b/packages/third-parties/stripe/src/index.ts index cb1c68bf6de..1c306db44f7 100644 --- a/packages/third-parties/stripe/src/index.ts +++ b/packages/third-parties/stripe/src/index.ts @@ -2,8 +2,8 @@ * @file Automatically generated by barrelsby. */ -export * from "./constants/constants"; -export * from "./decorators/webhookEvent"; -export * from "./domain/StripeSettings"; -export * from "./middlewares/WebhookEventMiddleware"; -export * from "./services/StripeFactory"; +export * from "./constants/constants.js"; +export * from "./decorators/webhookEvent.js"; +export * from "./domain/StripeSettings.js"; +export * from "./middlewares/WebhookEventMiddleware.js"; +export * from "./services/StripeFactory.js"; diff --git a/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.spec.ts b/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.spec.ts index 6d3a94c6a96..ce1c8588721 100644 --- a/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.spec.ts +++ b/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.spec.ts @@ -2,8 +2,8 @@ import {EndpointMetadata, PlatformTest} from "@tsed/common"; import {catchError} from "@tsed/core"; import "../index"; import {Stripe} from "stripe"; -import {STRIPE_WEBHOOK_EVENT, STRIPE_WEBHOOK_SIGNATURE} from "../constants/constants"; -import {WebhookEventMiddleware} from "./WebhookEventMiddleware"; +import {STRIPE_WEBHOOK_EVENT, STRIPE_WEBHOOK_SIGNATURE} from "../constants/constants.js"; +import {WebhookEventMiddleware} from "./WebhookEventMiddleware.js"; class Ctrl { get() {} diff --git a/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.ts b/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.ts index 4ec5fd7e781..d8a9c52b73b 100644 --- a/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.ts +++ b/packages/third-parties/stripe/src/middlewares/WebhookEventMiddleware.ts @@ -3,7 +3,7 @@ import {Middleware, MiddlewareMethods} from "@tsed/platform-middlewares"; import {Constant, Inject} from "@tsed/di"; import {BadRequest, InternalServerError} from "@tsed/exceptions"; import {Stripe} from "stripe"; -import {STRIPE_WEBHOOK_EVENT, STRIPE_WEBHOOK_SIGNATURE} from "../constants/constants"; +import {STRIPE_WEBHOOK_EVENT, STRIPE_WEBHOOK_SIGNATURE} from "../constants/constants.js"; import "../services/StripeFactory"; export interface WebhookEventOptions { diff --git a/packages/third-parties/stripe/src/services/StripeFactory.ts b/packages/third-parties/stripe/src/services/StripeFactory.ts index 231fe8d3d08..203a10ca34b 100644 --- a/packages/third-parties/stripe/src/services/StripeFactory.ts +++ b/packages/third-parties/stripe/src/services/StripeFactory.ts @@ -1,6 +1,6 @@ import {Configuration, registerProvider} from "@tsed/di"; import {Stripe} from "stripe"; -import {StripeSettings} from "../domain/StripeSettings"; +import {StripeSettings} from "../domain/StripeSettings.js"; export const StripeFactory = Stripe; diff --git a/packages/third-parties/stripe/test/app/index.ts b/packages/third-parties/stripe/test/app/index.ts index 16fba3d812e..66e13bef429 100644 --- a/packages/third-parties/stripe/test/app/index.ts +++ b/packages/third-parties/stripe/test/app/index.ts @@ -1,9 +1,9 @@ import {$log} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; -import {InteractionsCtrl} from "./controllers/oidc/InteractionsCtrl"; -import {IndexCtrl} from "./controllers/pages/IndexCtrl"; -import {VersionCtrl} from "./controllers/rest/VersionCtrl"; -import {Server} from "./Server"; +import {InteractionsCtrl} from "./controllers/oidc/InteractionsCtrl.js"; +import {IndexCtrl} from "./controllers/pages/IndexCtrl.js"; +import {VersionCtrl} from "./controllers/rest/VersionCtrl.js"; +import {Server} from "./Server.js"; if (process.env.NODE_ENV !== "test") { async function bootstrap() { diff --git a/packages/third-parties/stripe/test/stripe.integration.spec.ts b/packages/third-parties/stripe/test/stripe.integration.spec.ts index 8af1d7bd76f..5968b232603 100644 --- a/packages/third-parties/stripe/test/stripe.integration.spec.ts +++ b/packages/third-parties/stripe/test/stripe.integration.spec.ts @@ -3,8 +3,8 @@ import {PlatformExpress} from "@tsed/platform-express"; import {PlatformTestSdk} from "@tsed/platform-test-sdk"; import {Stripe} from "stripe"; import SuperTest from "supertest"; -import {StripeWebhooksCtrl} from "./app/controllers/rest/StripeWebhooksCtrl"; -import {rootDir, Server} from "./app/Server"; +import {StripeWebhooksCtrl} from "./app/controllers/rest/StripeWebhooksCtrl.js"; +import {rootDir, Server} from "./app/Server.js"; const utils = PlatformTestSdk.create({ rootDir, diff --git a/packages/third-parties/temporal/readme.md b/packages/third-parties/temporal/readme.md index a36c9c4bf7d..72c525a1df5 100644 --- a/packages/third-parties/temporal/readme.md +++ b/packages/third-parties/temporal/readme.md @@ -83,7 +83,10 @@ import {Temporal, Activity} from "@tsed/temporal"; @Temporal() export class UserOnboardingActivities { - constructor(private userService: UserService, private emailService: EmailService) {} + constructor( + private userService: UserService, + private emailService: EmailService + ) {} @Activity() async sendVerificationEmail(email: string) { @@ -136,7 +139,7 @@ Do not import any non temporal packages here. The workflows are bundled internal ```ts import {proxyActivities, defineSignal, setHandler, condition, sleep} from "@temporalio/workflow"; -import {Activities} from "../activities"; +import {Activities} from "../activities.js"; export const isVerifiedSignal = defineSignal("verificationSignal"); @@ -177,7 +180,7 @@ Inject the TemporalClient instance to interact with it directly, e.g. to start a ```typescript import {Service, AfterRoutesInit} from "@tsed/common"; import {TemporalClient} from "@tsed/temporal"; -import {onboardUser} from "../workflows"; +import {onboardUser} from "../workflows.js"; @Service() export class UsersService implements AfterRoutesInit { @@ -205,7 +208,7 @@ Read more about it [here](https://docs.temporal.io/typescript/troubleshooting/#w ```ts import {bootstrapWorker} from "@tsed/temporal"; -import {Server} from "./app/Server"; +import {Server} from "./app/Server.js"; const worker = await bootstrapWorker(Server, { worker: { diff --git a/packages/third-parties/temporal/src/TemporalModule.ts b/packages/third-parties/temporal/src/TemporalModule.ts index 45889ac6178..b95f423ff0d 100644 --- a/packages/third-parties/temporal/src/TemporalModule.ts +++ b/packages/third-parties/temporal/src/TemporalModule.ts @@ -1,9 +1,9 @@ import {classOf} from "@tsed/core"; import {Logger} from "@tsed/common"; import {Inject, InjectorService, Module, Provider} from "@tsed/di"; -import {PROVIDER_TYPE_TEMPORAL} from "./constants"; -import {TemporalStore, TEMPORAL_STORE_KEY} from "./interfaces/TemporalStore"; -import {TemporalClient} from "./services/TemporalFactory"; +import {PROVIDER_TYPE_TEMPORAL} from "./constants.js"; +import {TemporalStore, TEMPORAL_STORE_KEY} from "./interfaces/TemporalStore.js"; +import {TemporalClient} from "./services/TemporalFactory.js"; @Module() export class TemporalModule { diff --git a/packages/third-parties/temporal/src/decorators/activity.spec.ts b/packages/third-parties/temporal/src/decorators/activity.spec.ts index 7cc0820937a..1f01d768c32 100644 --- a/packages/third-parties/temporal/src/decorators/activity.spec.ts +++ b/packages/third-parties/temporal/src/decorators/activity.spec.ts @@ -1,6 +1,6 @@ import {Store} from "@tsed/core"; -import {Activity} from "./activity"; -import {Temporal} from "./temporal"; +import {Activity} from "./activity.js"; +import {Temporal} from "./temporal.js"; describe("@Activity()", () => { it("should set metadata", () => { diff --git a/packages/third-parties/temporal/src/decorators/activity.ts b/packages/third-parties/temporal/src/decorators/activity.ts index bfeb63c2f74..1873e7abb1e 100644 --- a/packages/third-parties/temporal/src/decorators/activity.ts +++ b/packages/third-parties/temporal/src/decorators/activity.ts @@ -1,5 +1,5 @@ import {Store} from "@tsed/core"; -import {TemporalStore, ActivityOptions, TEMPORAL_STORE_KEY} from "../interfaces/TemporalStore"; +import {TemporalStore, ActivityOptions, TEMPORAL_STORE_KEY} from "../interfaces/TemporalStore.js"; export function Activity(options: ActivityOptions = {}): MethodDecorator { return (target: any, propertyKey: string | symbol) => { diff --git a/packages/third-parties/temporal/src/decorators/temporal.spec.ts b/packages/third-parties/temporal/src/decorators/temporal.spec.ts index 1dcfabddc32..e3e1b6a49c4 100644 --- a/packages/third-parties/temporal/src/decorators/temporal.spec.ts +++ b/packages/third-parties/temporal/src/decorators/temporal.spec.ts @@ -1,5 +1,5 @@ import {GlobalProviders} from "@tsed/di"; -import {Temporal} from "./temporal"; +import {Temporal} from "./temporal.js"; describe("@Activity()", () => { it("should set metadata", () => { diff --git a/packages/third-parties/temporal/src/decorators/temporal.ts b/packages/third-parties/temporal/src/decorators/temporal.ts index 5c0c012cff3..204b85ab262 100644 --- a/packages/third-parties/temporal/src/decorators/temporal.ts +++ b/packages/third-parties/temporal/src/decorators/temporal.ts @@ -1,6 +1,6 @@ import {useDecorators} from "@tsed/core"; import {Injectable} from "@tsed/di"; -import {PROVIDER_TYPE_TEMPORAL} from "../constants"; +import {PROVIDER_TYPE_TEMPORAL} from "../constants.js"; export function Temporal(): ClassDecorator { return useDecorators( diff --git a/packages/third-parties/temporal/src/index.ts b/packages/third-parties/temporal/src/index.ts index b029812c046..f39b1c6f1fe 100644 --- a/packages/third-parties/temporal/src/index.ts +++ b/packages/third-parties/temporal/src/index.ts @@ -2,11 +2,11 @@ * @file Automatically generated by barrelsby. */ -export * from "./TemporalModule"; -export * from "./constants"; -export * from "./decorators/activity"; -export * from "./decorators/temporal"; -export * from "./interfaces/TemporalStore"; -export * from "./interfaces/interfaces"; -export * from "./services/TemporalFactory"; -export * from "./utils/worker"; +export * from "./TemporalModule.js"; +export * from "./constants.js"; +export * from "./decorators/activity.js"; +export * from "./decorators/temporal.js"; +export * from "./interfaces/TemporalStore.js"; +export * from "./interfaces/interfaces.js"; +export * from "./services/TemporalFactory.js"; +export * from "./utils/worker.js"; diff --git a/packages/third-parties/temporal/src/utils/worker.ts b/packages/third-parties/temporal/src/utils/worker.ts index c6f15e4d7a3..0771dd1884f 100644 --- a/packages/third-parties/temporal/src/utils/worker.ts +++ b/packages/third-parties/temporal/src/utils/worker.ts @@ -2,7 +2,7 @@ import {PlatformBuilderSettings, PlatformTest} from "@tsed/common"; import {$log} from "@tsed/logger"; import {NativeConnection, NativeConnectionOptions, Worker, WorkerOptions} from "@temporalio/worker"; -import {TemporalModule} from "../TemporalModule"; +import {TemporalModule} from "../TemporalModule.js"; type BootstrapWorkerOptions = { platform?: PlatformBuilderSettings; diff --git a/packages/third-parties/temporal/test/client.integration.spec.ts b/packages/third-parties/temporal/test/client.integration.spec.ts index b5ac3c712c8..9bf0d186323 100644 --- a/packages/third-parties/temporal/test/client.integration.spec.ts +++ b/packages/third-parties/temporal/test/client.integration.spec.ts @@ -1,8 +1,8 @@ import {getEphemeralServerTarget} from "@temporalio/core-bridge"; import {Runtime} from "@temporalio/worker"; import {PlatformTest} from "@tsed/common"; -import {TemporalClient} from "../src"; -import {Server} from "./helpers/Server"; +import {TemporalClient} from "../src/index.js"; +import {Server} from "./helpers/Server.js"; describe("Temporal Client", () => { let server: any; diff --git a/packages/third-parties/temporal/test/worker.integration.spec.ts b/packages/third-parties/temporal/test/worker.integration.spec.ts index 7bad15dc1d3..7740515218a 100644 --- a/packages/third-parties/temporal/test/worker.integration.spec.ts +++ b/packages/third-parties/temporal/test/worker.integration.spec.ts @@ -1,6 +1,6 @@ import {TestWorkflowEnvironment} from "@temporalio/testing"; -import {Temporal, Activity, bootstrapWorker} from "../src"; -import {Server} from "./helpers/Server"; +import {Temporal, Activity, bootstrapWorker} from "../src/index.js"; +import {Server} from "./helpers/Server.js"; describe("Temporal Worker", () => { @Temporal() diff --git a/packages/third-parties/temporal/test/workflows/index.ts b/packages/third-parties/temporal/test/workflows/index.ts index bd1b8f470e4..214ac1007b5 100644 --- a/packages/third-parties/temporal/test/workflows/index.ts +++ b/packages/third-parties/temporal/test/workflows/index.ts @@ -1 +1 @@ -export * from "./testWorkflow"; +export * from "./testWorkflow.js"; diff --git a/packages/third-parties/terminus/readme.md b/packages/third-parties/terminus/readme.md index eb175378cf4..0c80f2ea989 100644 --- a/packages/third-parties/terminus/readme.md +++ b/packages/third-parties/terminus/readme.md @@ -81,7 +81,7 @@ To create a readiness / liveliness checks use the `@Health` decorator. import {Health} from "@tsed/terminus"; import {Injectable, Inject} from "@tsed/di"; import {HealthCheckError} from "@godaddy/terminus"; -import {REDIS_CONNECTION} from "./RedisConnection"; +import {REDIS_CONNECTION} from "./RedisConnection.js"; @Injectable() class RedisClient { @@ -108,7 +108,7 @@ You can also create an `HealthCheckError` when an error appear during your check import {Health} from "@tsed/terminus"; import {Injectable, Inject} from "@tsed/di"; import {HealthCheckError} from "@godaddy/terminus"; -import {REDIS_CONNECTION} from "./RedisConnection"; +import {REDIS_CONNECTION} from "./RedisConnection.js"; @Injectable() class RedisClient { diff --git a/packages/third-parties/terminus/src/TerminusModule.spec.ts b/packages/third-parties/terminus/src/TerminusModule.spec.ts index bce91f0f0c9..a7ac7075ac0 100644 --- a/packages/third-parties/terminus/src/TerminusModule.spec.ts +++ b/packages/third-parties/terminus/src/TerminusModule.spec.ts @@ -1,6 +1,6 @@ import {Injectable, PlatformTest} from "@tsed/common"; -import {Health} from "./decorators/health"; -import {TerminusModule} from "./TerminusModule"; +import {Health} from "./decorators/health.js"; +import {TerminusModule} from "./TerminusModule.js"; @Injectable() class MyService { diff --git a/packages/third-parties/terminus/src/TerminusModule.ts b/packages/third-parties/terminus/src/TerminusModule.ts index a1a68b5dbf0..d76496c7063 100644 --- a/packages/third-parties/terminus/src/TerminusModule.ts +++ b/packages/third-parties/terminus/src/TerminusModule.ts @@ -4,7 +4,7 @@ import {Constant, Inject, InjectorService, Module, OnInit, Provider} from "@tsed import {concatPath} from "@tsed/schema"; import Http from "http"; import Https from "https"; -import {TerminusSettings} from "./interfaces/TerminusSettings"; +import {TerminusSettings} from "./interfaces/TerminusSettings.js"; @Module() export class TerminusModule implements OnInit { @@ -101,21 +101,24 @@ export class TerminusModule implements OnInit { } private getHealths() { - const subHealths = this.getAll<{name: string}>("health").reduce((healths, {provider, propertyKey, options: {name}}) => { - const instance = this.injector.get(provider.token)!; - const callback = async (...args: any[]) => { - const result = await instance[propertyKey](...args); + const subHealths = this.getAll<{name: string}>("health").reduce( + (healths, {provider, propertyKey, options: {name}}) => { + const instance = this.injector.get(provider.token)!; + const callback = async (...args: any[]) => { + const result = await instance[propertyKey](...args); - return {[name]: result}; - }; + return {[name]: result}; + }; - let path = this.getPath(provider, name); + let path = this.getPath(provider, name); - return { - ...healths, - [path]: callback - }; - }, {} as Record Promise>); + return { + ...healths, + [path]: callback + }; + }, + {} as Record Promise> + ); const healths: Record = { ...subHealths, diff --git a/packages/third-parties/terminus/src/index.ts b/packages/third-parties/terminus/src/index.ts index 54f055b6aec..bdb7e6d7079 100644 --- a/packages/third-parties/terminus/src/index.ts +++ b/packages/third-parties/terminus/src/index.ts @@ -2,7 +2,7 @@ * @file Automatically generated by barrelsby. */ -export * from "./TerminusModule"; -export * from "./decorators/health"; -export * from "./interfaces/TerminusSettings"; -export * from "./interfaces/interfaces"; +export * from "./TerminusModule.js"; +export * from "./decorators/health.js"; +export * from "./interfaces/TerminusSettings.js"; +export * from "./interfaces/interfaces.js"; diff --git a/packages/third-parties/terminus/src/interfaces/interfaces.ts b/packages/third-parties/terminus/src/interfaces/interfaces.ts index bbc2e64e67e..655ad4cbc68 100644 --- a/packages/third-parties/terminus/src/interfaces/interfaces.ts +++ b/packages/third-parties/terminus/src/interfaces/interfaces.ts @@ -1,4 +1,4 @@ -import {TerminusSettings} from "./TerminusSettings"; +import {TerminusSettings} from "./TerminusSettings.js"; declare global { namespace TsED { diff --git a/packages/third-parties/terminus/test/app/index.ts b/packages/third-parties/terminus/test/app/index.ts index f4a14cbf9d1..db0368e02b0 100644 --- a/packages/third-parties/terminus/test/app/index.ts +++ b/packages/third-parties/terminus/test/app/index.ts @@ -1,6 +1,6 @@ import {$log} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; if (process.env.NODE_ENV !== "test") { async function bootstrap() { diff --git a/packages/third-parties/vike/src/ViteModule.spec.ts b/packages/third-parties/vike/src/ViteModule.spec.ts index c1a379ad8da..e74d3029d4a 100644 --- a/packages/third-parties/vike/src/ViteModule.spec.ts +++ b/packages/third-parties/vike/src/ViteModule.spec.ts @@ -1,10 +1,10 @@ import {PlatformApplication, PlatformTest} from "@tsed/common"; import {PlatformViews} from "@tsed/platform-views"; -import {ViteRendererMiddleware} from "./middlewares/ViteRendererMiddleware"; -import {VITE_SERVER} from "./services/ViteServer"; -import {ViteService} from "./services/ViteService"; -import {ViteModule} from "./ViteModule"; +import {ViteRendererMiddleware} from "./middlewares/ViteRendererMiddleware.js"; +import {VITE_SERVER} from "./services/ViteServer.js"; +import {ViteService} from "./services/ViteService.js"; +import {ViteModule} from "./ViteModule.js"; async function getModuleFixture() { const platformViews = { diff --git a/packages/third-parties/vike/src/ViteModule.ts b/packages/third-parties/vike/src/ViteModule.ts index 748463c37af..a43bb9a7b61 100644 --- a/packages/third-parties/vike/src/ViteModule.ts +++ b/packages/third-parties/vike/src/ViteModule.ts @@ -3,9 +3,9 @@ import {Inject, Module} from "@tsed/di"; import {PlatformRenderOptions, PlatformViews} from "@tsed/platform-views"; import compress from "compression"; -import {ViteRendererMiddleware} from "./middlewares/ViteRendererMiddleware"; -import {VITE_SERVER} from "./services/ViteServer"; -import {ViteService} from "./services/ViteService"; +import {ViteRendererMiddleware} from "./middlewares/ViteRendererMiddleware.js"; +import {VITE_SERVER} from "./services/ViteServer.js"; +import {ViteService} from "./services/ViteService.js"; @Module({ imports: [] diff --git a/packages/third-parties/vike/src/decorators/vite.spec.ts b/packages/third-parties/vike/src/decorators/vite.spec.ts index 8b3ba9849e5..d7a46f14054 100644 --- a/packages/third-parties/vike/src/decorators/vite.spec.ts +++ b/packages/third-parties/vike/src/decorators/vite.spec.ts @@ -1,7 +1,7 @@ import {Controller} from "@tsed/common"; import {Store} from "@tsed/core"; -import {Vite} from "./vite"; +import {Vite} from "./vite.js"; @Controller("/") class ControllerTest { diff --git a/packages/third-parties/vike/src/index.ts b/packages/third-parties/vike/src/index.ts index 6ac00323bda..0285a74ef9a 100644 --- a/packages/third-parties/vike/src/index.ts +++ b/packages/third-parties/vike/src/index.ts @@ -2,11 +2,11 @@ * @file Automatically generated by barrelsby. */ -export * from "./ViteModule"; -export * from "./decorators/vite"; -export * from "./interfaces/ViteConfig"; -export * from "./interfaces/ViteRenderContext"; -export * from "./interfaces/interfaces"; -export * from "./middlewares/ViteRendererMiddleware"; -export * from "./services/ViteServer"; -export * from "./services/ViteService"; +export * from "./ViteModule.js"; +export * from "./decorators/vite.js"; +export * from "./interfaces/ViteConfig.js"; +export * from "./interfaces/ViteRenderContext.js"; +export * from "./interfaces/interfaces.js"; +export * from "./middlewares/ViteRendererMiddleware.js"; +export * from "./services/ViteServer.js"; +export * from "./services/ViteService.js"; diff --git a/packages/third-parties/vike/src/interfaces/interfaces.ts b/packages/third-parties/vike/src/interfaces/interfaces.ts index b0f7eb0dd9a..effb48aa42d 100644 --- a/packages/third-parties/vike/src/interfaces/interfaces.ts +++ b/packages/third-parties/vike/src/interfaces/interfaces.ts @@ -1,4 +1,4 @@ -import {ViteConfig} from "./ViteConfig"; +import {ViteConfig} from "./ViteConfig.js"; declare global { namespace TsED { diff --git a/packages/third-parties/vike/src/middlewares/ViteRendererMiddleware.spec.ts b/packages/third-parties/vike/src/middlewares/ViteRendererMiddleware.spec.ts index 47ceb140ef8..fb2699621da 100644 --- a/packages/third-parties/vike/src/middlewares/ViteRendererMiddleware.spec.ts +++ b/packages/third-parties/vike/src/middlewares/ViteRendererMiddleware.spec.ts @@ -1,8 +1,8 @@ import {PlatformTest} from "@tsed/common"; import filedirname from "filedirname"; -import {ViteService} from "../services/ViteService"; -import {ViteRendererMiddleware} from "./ViteRendererMiddleware"; +import {ViteService} from "../services/ViteService.js"; +import {ViteRendererMiddleware} from "./ViteRendererMiddleware.js"; // FIXME remove when esm is ready const [, rootDir] = filedirname(); diff --git a/packages/third-parties/vike/src/middlewares/ViteRendererMiddleware.ts b/packages/third-parties/vike/src/middlewares/ViteRendererMiddleware.ts index ae22add3431..0d4f66ab2de 100644 --- a/packages/third-parties/vike/src/middlewares/ViteRendererMiddleware.ts +++ b/packages/third-parties/vike/src/middlewares/ViteRendererMiddleware.ts @@ -1,7 +1,7 @@ import {Context, Middleware} from "@tsed/common"; import {Inject} from "@tsed/di"; -import {ViteService} from "../services/ViteService"; +import {ViteService} from "../services/ViteService.js"; @Middleware() export class ViteRendererMiddleware { diff --git a/packages/third-parties/vike/src/services/ViteServer.spec.ts b/packages/third-parties/vike/src/services/ViteServer.spec.ts index 2b872a168d2..d2e5aca0319 100644 --- a/packages/third-parties/vike/src/services/ViteServer.spec.ts +++ b/packages/third-parties/vike/src/services/ViteServer.spec.ts @@ -1,7 +1,7 @@ import {PlatformTest} from "@tsed/common"; import {Env} from "@tsed/core"; import sirv from "sirv"; -import {VITE_SERVER} from "./ViteServer"; +import {VITE_SERVER} from "./ViteServer.js"; jest.mock("sirv", () => { return jest.fn().mockReturnValue("sirv"); diff --git a/packages/third-parties/vike/src/services/ViteServer.ts b/packages/third-parties/vike/src/services/ViteServer.ts index 046762eac70..41e4e149451 100644 --- a/packages/third-parties/vike/src/services/ViteServer.ts +++ b/packages/third-parties/vike/src/services/ViteServer.ts @@ -4,7 +4,7 @@ import {Configuration, registerProvider} from "@tsed/di"; // @ts-ignore import type {InlineConfig, ViteDevServer} from "vite"; -import {ViteConfig} from "../interfaces/ViteConfig"; +import {ViteConfig} from "../interfaces/ViteConfig.js"; export const VITE_SERVER = Symbol.for("VITE_DEV_SERVER"); export type VITE_SERVER = ViteDevServer; diff --git a/packages/third-parties/vike/src/services/ViteService.spec.ts b/packages/third-parties/vike/src/services/ViteService.spec.ts index a1593d89678..34caced1936 100644 --- a/packages/third-parties/vike/src/services/ViteService.spec.ts +++ b/packages/third-parties/vike/src/services/ViteService.spec.ts @@ -1,5 +1,5 @@ import {PlatformTest} from "@tsed/common"; -import {ViteService} from "./ViteService"; +import {ViteService} from "./ViteService.js"; jest.mock("vike/server", () => { return { diff --git a/packages/third-parties/vike/src/services/ViteService.ts b/packages/third-parties/vike/src/services/ViteService.ts index d5f07e71940..09b062e78fc 100644 --- a/packages/third-parties/vike/src/services/ViteService.ts +++ b/packages/third-parties/vike/src/services/ViteService.ts @@ -1,8 +1,8 @@ import {Constant, PlatformContext} from "@tsed/common"; import {Injectable} from "@tsed/di"; import {Writable} from "stream"; -import {ViteConfig} from "../interfaces/ViteConfig"; -import {ViteRenderContext} from "../interfaces/ViteRenderContext"; +import {ViteConfig} from "../interfaces/ViteConfig.js"; +import {ViteRenderContext} from "../interfaces/ViteRenderContext.js"; @Injectable() export class ViteService { diff --git a/packages/utils/normalize-path/src/index.ts b/packages/utils/normalize-path/src/index.ts index f26a883d98c..25ccfdfbc60 100644 --- a/packages/utils/normalize-path/src/index.ts +++ b/packages/utils/normalize-path/src/index.ts @@ -2,4 +2,4 @@ * @file Automatically generated by barrelsby. */ -export * from "./normalizePath"; +export * from "./normalizePath.js"; diff --git a/packages/utils/normalize-path/src/normalizePath.spec.ts b/packages/utils/normalize-path/src/normalizePath.spec.ts index 0aafb82a730..630f0dc09b0 100644 --- a/packages/utils/normalize-path/src/normalizePath.spec.ts +++ b/packages/utils/normalize-path/src/normalizePath.spec.ts @@ -1,4 +1,4 @@ -import {normalizePath} from "./normalizePath"; +import {normalizePath} from "./normalizePath.js"; describe("normalizePath", () => { it("should normalize path (string)", () => { diff --git a/readme.md b/readme.md index 31a0b3030d6..e617980e5fd 100644 --- a/readme.md +++ b/readme.md @@ -95,7 +95,7 @@ platform like Express. ```typescript import {$log} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; async function bootstrap() { try { @@ -136,8 +136,8 @@ import { ReturnsArray } from "@tsed/common"; import {BadRequest} from "@tsed/exceptions"; -import {UsersService} from "../services/UsersService"; -import {User} from "../models/User"; +import {UsersService} from "../services/UsersService.js"; +import {User} from "../models/User.js"; @Controller("/users") export class UsersCtrl { diff --git a/test/helper/buildPlatformParams.ts b/test/helper/buildPlatformParams.ts index a2e5cf48429..9a33bbdea18 100644 --- a/test/helper/buildPlatformParams.ts +++ b/test/helper/buildPlatformParams.ts @@ -1,6 +1,6 @@ import {ParamOptions, PlatformParams, PlatformTest} from "@tsed/common"; import {JsonParameterStore} from "@tsed/schema"; -import {createFakeHandlerContext} from "./createFakeHandlerContext"; +import {createFakeHandlerContext} from "./createFakeHandlerContext.js"; import {DecoratorTypes} from "@tsed/core"; export interface TestPlatformParamsOptions extends ParamOptions { diff --git a/tools/integration/src/Server.ts b/tools/integration/src/Server.ts index e45b237fa0b..23acff6149f 100644 --- a/tools/integration/src/Server.ts +++ b/tools/integration/src/Server.ts @@ -9,9 +9,9 @@ import methodOverride from "method-override"; import cors from "cors"; import "@tsed/ajv"; import "@tsed/swagger"; -import {config} from "./config"; -import * as rest from "./controllers/rest"; -import * as pages from "./controllers/pages"; +import {config} from "./config/index.js"; +import * as rest from "./controllers/rest/index.js"; +import * as pages from "./controllers/pages/index.js"; @Configuration({ ...config, diff --git a/tools/integration/src/config/index.ts b/tools/integration/src/config/index.ts index eb0331f89e5..e476423d75d 100644 --- a/tools/integration/src/config/index.ts +++ b/tools/integration/src/config/index.ts @@ -1,5 +1,5 @@ -import {envs} from "./envs"; -import loggerConfig from "./logger"; +import {envs} from "./envs/index.js"; +import loggerConfig from "./logger/index.js"; export const config: Partial = { envs, diff --git a/tools/integration/src/config/logger/index.ts b/tools/integration/src/config/logger/index.ts index bd2e42733a5..ec76acfe478 100644 --- a/tools/integration/src/config/logger/index.ts +++ b/tools/integration/src/config/logger/index.ts @@ -1,5 +1,5 @@ import {$log, PlatformLoggerSettings} from "@tsed/common"; -import {isProduction} from "../envs"; +import {isProduction} from "../envs/index.js"; if (isProduction) { $log.appenders.set("stdout", { diff --git a/tools/integration/src/controllers/pages/index.ts b/tools/integration/src/controllers/pages/index.ts index ba26d4c08f2..02f8abe471b 100644 --- a/tools/integration/src/controllers/pages/index.ts +++ b/tools/integration/src/controllers/pages/index.ts @@ -2,4 +2,4 @@ * @file Automatically generated by barrelsby. */ -export * from "./IndexController"; +export * from "./IndexController.js"; diff --git a/tools/integration/src/controllers/rest/index.ts b/tools/integration/src/controllers/rest/index.ts index d02e8f63a4c..fba61e76548 100644 --- a/tools/integration/src/controllers/rest/index.ts +++ b/tools/integration/src/controllers/rest/index.ts @@ -2,4 +2,4 @@ * @file Automatically generated by barrelsby. */ -export * from "./HelloWorldController"; +export * from "./HelloWorldController.js"; diff --git a/tools/integration/src/index.ts b/tools/integration/src/index.ts index 59778a16698..e145ec24a61 100644 --- a/tools/integration/src/index.ts +++ b/tools/integration/src/index.ts @@ -1,6 +1,6 @@ import {$log} from "@tsed/common"; import {PlatformExpress} from "@tsed/platform-express"; -import {Server} from "./Server"; +import {Server} from "./Server.js"; async function bootstrap() { for (let i = 0; i < 10000; i++) {