diff --git a/Dockerfile b/Dockerfile index b734769078..2dbeba3d79 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ COPY apps/backend/package.json apps/backend/tsconfig.* ./apps/backend/ COPY apps/frontend/package.json apps/frontend/tsconfig.* ./apps/frontend/ COPY libs/hdf-converters/package.json libs/hdf-converters/tsconfig.* ./libs/hdf-converters/ COPY libs/inspecjs/package.json libs/inspecjs/tsconfig.* ./libs/inspecjs/ -COPY libs/interfaces/package.json libs/interfaces/tsconfig.json ./libs/interfaces/ +COPY libs/common/package.json libs/common/tsconfig.json ./libs/common/ COPY libs/password-complexity/package.json ./libs/password-complexity/ RUN sed -i s^https://registry.yarnpkg.com^$YARNREPO^g yarn.lock diff --git a/Dockerfile.lite b/Dockerfile.lite index 3dbe0b1f89..51c152e014 100644 --- a/Dockerfile.lite +++ b/Dockerfile.lite @@ -19,7 +19,7 @@ COPY package.json yarn.lock lerna.json tsconfig.json postcss.config.js ./ COPY apps/frontend/package.json apps/frontend/tsconfig.json ./apps/frontend/ COPY libs/hdf-converters/package.json libs/hdf-converters/tsconfig.* ./libs/hdf-converters/ COPY libs/inspecjs/package.json libs/inspecjs/tsconfig.* ./libs/inspecjs/ -COPY libs/interfaces/package.json libs/interfaces/tsconfig.json ./libs/interfaces/ +COPY libs/common/package.json libs/common/tsconfig.* ./libs/common/ COPY libs/password-complexity/package.json ./libs/password-complexity/ RUN sed -i s^https://registry.yarnpkg.com^$YARNREPO^g yarn.lock diff --git a/apps/backend/package.json b/apps/backend/package.json index e6ad4e222b..12062858a0 100644 --- a/apps/backend/package.json +++ b/apps/backend/package.json @@ -45,7 +45,7 @@ }, "dependencies": { "@casl/ability": "^6.0.0", - "@heimdall/interfaces": "^2.10.16", + "@heimdall/common": "^2.11.1", "@heimdall/password-complexity": "^2.6.6", "@nestjs/cli": "^10.1.14", "@nestjs/common": "^10.2.1", diff --git a/apps/backend/src/apikeys/dto/apikey.dto.ts b/apps/backend/src/apikeys/dto/apikey.dto.ts index e84ad32960..7ea89280ed 100644 --- a/apps/backend/src/apikeys/dto/apikey.dto.ts +++ b/apps/backend/src/apikeys/dto/apikey.dto.ts @@ -1,4 +1,4 @@ -import {IApiKey} from '@heimdall/interfaces'; +import {IApiKey} from '@heimdall/common/interfaces'; import {ApiKey} from '../apikey.model'; export class APIKeyDto implements IApiKey { diff --git a/apps/backend/src/apikeys/dto/create-apikey.dto.ts b/apps/backend/src/apikeys/dto/create-apikey.dto.ts index c293f14471..2aa4ebce5c 100644 --- a/apps/backend/src/apikeys/dto/create-apikey.dto.ts +++ b/apps/backend/src/apikeys/dto/create-apikey.dto.ts @@ -1,4 +1,4 @@ -import {ICreateApiKey} from '@heimdall/interfaces'; +import {ICreateApiKey} from '@heimdall/common/interfaces'; import {IsOptional, IsString} from 'class-validator'; export class CreateApiKeyDto implements ICreateApiKey { diff --git a/apps/backend/src/apikeys/dto/delete-apikey.dto.ts b/apps/backend/src/apikeys/dto/delete-apikey.dto.ts index 878d177be9..fed9bfa7dc 100644 --- a/apps/backend/src/apikeys/dto/delete-apikey.dto.ts +++ b/apps/backend/src/apikeys/dto/delete-apikey.dto.ts @@ -1,4 +1,4 @@ -import {IDeleteApiKey} from '@heimdall/interfaces'; +import {IDeleteApiKey} from '@heimdall/common/interfaces'; import {IsOptional, IsString} from 'class-validator'; export class DeleteAPIKeyDto implements IDeleteApiKey { diff --git a/apps/backend/src/apikeys/dto/update-apikey.dto.ts b/apps/backend/src/apikeys/dto/update-apikey.dto.ts index 429dfbffa9..dc8f56632d 100644 --- a/apps/backend/src/apikeys/dto/update-apikey.dto.ts +++ b/apps/backend/src/apikeys/dto/update-apikey.dto.ts @@ -1,4 +1,4 @@ -import {IUpdateAPIKey} from '@heimdall/interfaces'; +import {IUpdateAPIKey} from '@heimdall/common/interfaces'; import {IsOptional, IsString} from 'class-validator'; export class UpdateAPIKeyDto implements IUpdateAPIKey { diff --git a/apps/backend/src/authn/jwt.strategy.ts b/apps/backend/src/authn/jwt.strategy.ts index 85c82e95b8..d59a268beb 100644 --- a/apps/backend/src/authn/jwt.strategy.ts +++ b/apps/backend/src/authn/jwt.strategy.ts @@ -1,4 +1,4 @@ -import {IUser} from '@heimdall/interfaces'; +import {IUser} from '@heimdall/common/interfaces'; import {HttpException, Injectable, UnauthorizedException} from '@nestjs/common'; import {PassportStrategy} from '@nestjs/passport'; import jwt from 'jsonwebtoken'; diff --git a/apps/backend/src/config/dto/startup-settings.dto.ts b/apps/backend/src/config/dto/startup-settings.dto.ts index 6329e3c9ba..bf5280a339 100644 --- a/apps/backend/src/config/dto/startup-settings.dto.ts +++ b/apps/backend/src/config/dto/startup-settings.dto.ts @@ -1,4 +1,4 @@ -import {IStartupSettings} from '@heimdall/interfaces'; +import {IStartupSettings} from '@heimdall/common/interfaces'; export class StartupSettingsDto implements IStartupSettings { readonly apiKeysEnabled: boolean; diff --git a/apps/backend/src/evaluation-tags/dto/create-evaluation-tag.dto.ts b/apps/backend/src/evaluation-tags/dto/create-evaluation-tag.dto.ts index 6d754ac144..e1a7cadaf3 100644 --- a/apps/backend/src/evaluation-tags/dto/create-evaluation-tag.dto.ts +++ b/apps/backend/src/evaluation-tags/dto/create-evaluation-tag.dto.ts @@ -1,4 +1,4 @@ -import {ICreateEvaluationTag} from '@heimdall/interfaces'; +import {ICreateEvaluationTag} from '@heimdall/common/interfaces'; import {IsNotEmpty, IsString} from 'class-validator'; export class CreateEvaluationTagDto implements ICreateEvaluationTag { diff --git a/apps/backend/src/evaluation-tags/dto/delete-evaluation-tag.dto.ts b/apps/backend/src/evaluation-tags/dto/delete-evaluation-tag.dto.ts index 41eb3fab59..98c9e1c234 100644 --- a/apps/backend/src/evaluation-tags/dto/delete-evaluation-tag.dto.ts +++ b/apps/backend/src/evaluation-tags/dto/delete-evaluation-tag.dto.ts @@ -1,4 +1,4 @@ -import {IDeleteEvaluationTag} from '@heimdall/interfaces'; +import {IDeleteEvaluationTag} from '@heimdall/common/interfaces'; import {IsNotEmpty, IsNumberString, IsString, Min} from 'class-validator'; export class DeleteEvaluationTagDto implements IDeleteEvaluationTag { diff --git a/apps/backend/src/evaluation-tags/dto/evaluation-tag.dto.ts b/apps/backend/src/evaluation-tags/dto/evaluation-tag.dto.ts index f45fd4e8fd..b10bf9a39c 100644 --- a/apps/backend/src/evaluation-tags/dto/evaluation-tag.dto.ts +++ b/apps/backend/src/evaluation-tags/dto/evaluation-tag.dto.ts @@ -1,4 +1,4 @@ -import {IEvaluationTag} from '@heimdall/interfaces'; +import {IEvaluationTag} from '@heimdall/common/interfaces'; import {EvaluationTag} from '../evaluation-tag.model'; export class EvaluationTagDto implements IEvaluationTag { diff --git a/apps/backend/src/evaluations/dto/create-evaluation.dto.ts b/apps/backend/src/evaluations/dto/create-evaluation.dto.ts index 6f8f5b501d..74ae80909c 100644 --- a/apps/backend/src/evaluations/dto/create-evaluation.dto.ts +++ b/apps/backend/src/evaluations/dto/create-evaluation.dto.ts @@ -1,4 +1,4 @@ -import {ICreateEvaluation} from '@heimdall/interfaces'; +import {ICreateEvaluation} from '@heimdall/common/interfaces'; import { IsArray, IsBoolean, diff --git a/apps/backend/src/evaluations/dto/evaluation.dto.ts b/apps/backend/src/evaluations/dto/evaluation.dto.ts index b4b2ca9e0f..43933354f7 100644 --- a/apps/backend/src/evaluations/dto/evaluation.dto.ts +++ b/apps/backend/src/evaluations/dto/evaluation.dto.ts @@ -1,4 +1,4 @@ -import {IEvaluation} from '@heimdall/interfaces'; +import {IEvaluation} from '@heimdall/common/interfaces'; import {EvaluationTagDto} from '../../evaluation-tags/dto/evaluation-tag.dto'; import {GroupDto} from '../../groups/dto/group.dto'; import {Group} from '../../groups/group.model'; diff --git a/apps/backend/src/evaluations/dto/update-evaluation.dto.ts b/apps/backend/src/evaluations/dto/update-evaluation.dto.ts index c50dc5169c..19d691e711 100644 --- a/apps/backend/src/evaluations/dto/update-evaluation.dto.ts +++ b/apps/backend/src/evaluations/dto/update-evaluation.dto.ts @@ -1,4 +1,4 @@ -import {IUpdateEvaluation} from '@heimdall/interfaces'; +import {IUpdateEvaluation} from '@heimdall/common/interfaces'; import {IsBoolean, IsObject, IsOptional, IsString} from 'class-validator'; export class UpdateEvaluationDto implements IUpdateEvaluation { diff --git a/apps/backend/src/groups/dto/add-user-to-group.dto.ts b/apps/backend/src/groups/dto/add-user-to-group.dto.ts index 62fbb99f1a..faed37c9e1 100644 --- a/apps/backend/src/groups/dto/add-user-to-group.dto.ts +++ b/apps/backend/src/groups/dto/add-user-to-group.dto.ts @@ -1,4 +1,4 @@ -import {IAddUserToGroup} from '@heimdall/interfaces'; +import {IAddUserToGroup} from '@heimdall/common/interfaces'; import {IsNotEmpty, IsString} from 'class-validator'; export class AddUserToGroupDto implements IAddUserToGroup { diff --git a/apps/backend/src/groups/dto/create-group.dto.ts b/apps/backend/src/groups/dto/create-group.dto.ts index c8991502b3..849913c2ad 100644 --- a/apps/backend/src/groups/dto/create-group.dto.ts +++ b/apps/backend/src/groups/dto/create-group.dto.ts @@ -1,4 +1,4 @@ -import {ICreateGroup} from '@heimdall/interfaces'; +import {ICreateGroup} from '@heimdall/common/interfaces'; import {IsBoolean, IsNotEmpty, IsOptional, IsString} from 'class-validator'; export class CreateGroupDto implements ICreateGroup { diff --git a/apps/backend/src/groups/dto/evaluation-group.dto.ts b/apps/backend/src/groups/dto/evaluation-group.dto.ts index 777fe91de0..7e8eda23cd 100644 --- a/apps/backend/src/groups/dto/evaluation-group.dto.ts +++ b/apps/backend/src/groups/dto/evaluation-group.dto.ts @@ -1,4 +1,4 @@ -import {IEvaluationGroup} from '@heimdall/interfaces'; +import {IEvaluationGroup} from '@heimdall/common/interfaces'; import {IsNotEmpty, IsString} from 'class-validator'; export class EvaluationGroupDto implements IEvaluationGroup { diff --git a/apps/backend/src/groups/dto/group.dto.ts b/apps/backend/src/groups/dto/group.dto.ts index 9b659cb68e..cec4662bca 100644 --- a/apps/backend/src/groups/dto/group.dto.ts +++ b/apps/backend/src/groups/dto/group.dto.ts @@ -1,4 +1,4 @@ -import {IGroup} from '@heimdall/interfaces'; +import {IGroup} from '@heimdall/common/interfaces'; import {GroupUser} from '../../group-users/group-user.model'; import {SlimUserDto} from '../../users/dto/slim-user.dto'; import {Group} from '../group.model'; diff --git a/apps/backend/src/groups/dto/remove-user-from-group.dto.ts b/apps/backend/src/groups/dto/remove-user-from-group.dto.ts index 567a3ddf05..3894399cf3 100644 --- a/apps/backend/src/groups/dto/remove-user-from-group.dto.ts +++ b/apps/backend/src/groups/dto/remove-user-from-group.dto.ts @@ -1,4 +1,4 @@ -import {IRemoveUserFromGroup} from '@heimdall/interfaces'; +import {IRemoveUserFromGroup} from '@heimdall/common/interfaces'; import {IsNotEmpty, IsString} from 'class-validator'; export class RemoveUserFromGroupDto implements IRemoveUserFromGroup { diff --git a/apps/backend/src/groups/dto/update-group-user.dto.ts b/apps/backend/src/groups/dto/update-group-user.dto.ts index e5cd457d54..666cc58de9 100644 --- a/apps/backend/src/groups/dto/update-group-user.dto.ts +++ b/apps/backend/src/groups/dto/update-group-user.dto.ts @@ -1,4 +1,4 @@ -import {IUpdateGroupUser} from '@heimdall/interfaces'; +import {IUpdateGroupUser} from '@heimdall/common/interfaces'; import {IsNotEmpty, IsString} from 'class-validator'; export class UpdateGroupUserRoleDto implements IUpdateGroupUser { diff --git a/apps/backend/src/interceptors/create-evaluation-interceptor.ts b/apps/backend/src/interceptors/create-evaluation-interceptor.ts index 0f9d782dc2..9e638bf5ab 100644 --- a/apps/backend/src/interceptors/create-evaluation-interceptor.ts +++ b/apps/backend/src/interceptors/create-evaluation-interceptor.ts @@ -1,4 +1,4 @@ -import {ICreateEvaluation} from '@heimdall/interfaces'; +import {ICreateEvaluation} from '@heimdall/common/interfaces'; import { CallHandler, ExecutionContext, diff --git a/apps/backend/src/statistics/dto/statistics.dto.ts b/apps/backend/src/statistics/dto/statistics.dto.ts index 0ce30d9d8c..ea602fbfe7 100644 --- a/apps/backend/src/statistics/dto/statistics.dto.ts +++ b/apps/backend/src/statistics/dto/statistics.dto.ts @@ -1,4 +1,4 @@ -import {IStatistics} from '@heimdall/interfaces'; +import {IStatistics} from '@heimdall/common/interfaces'; export class StatisticsDTO implements IStatistics { readonly apiKeyCount: number; diff --git a/apps/backend/src/users/dto/create-user.dto.ts b/apps/backend/src/users/dto/create-user.dto.ts index de39252d96..9a75a0d463 100644 --- a/apps/backend/src/users/dto/create-user.dto.ts +++ b/apps/backend/src/users/dto/create-user.dto.ts @@ -1,4 +1,4 @@ -import {ICreateUser} from '@heimdall/interfaces'; +import {ICreateUser} from '@heimdall/common/interfaces'; import {IsEmail, IsIn, IsNotEmpty, IsOptional, IsString} from 'class-validator'; export class CreateUserDto implements ICreateUser { diff --git a/apps/backend/src/users/dto/delete-user.dto.ts b/apps/backend/src/users/dto/delete-user.dto.ts index e23f3dde23..dfb5055008 100644 --- a/apps/backend/src/users/dto/delete-user.dto.ts +++ b/apps/backend/src/users/dto/delete-user.dto.ts @@ -1,4 +1,4 @@ -import {IDeleteUser} from '@heimdall/interfaces'; +import {IDeleteUser} from '@heimdall/common/interfaces'; import {IsOptional, IsString, MinLength} from 'class-validator'; export class DeleteUserDto implements IDeleteUser { diff --git a/apps/backend/src/users/dto/slim-user.dto.ts b/apps/backend/src/users/dto/slim-user.dto.ts index fd12b558e6..136d7b85c3 100644 --- a/apps/backend/src/users/dto/slim-user.dto.ts +++ b/apps/backend/src/users/dto/slim-user.dto.ts @@ -1,4 +1,4 @@ -import {ISlimUser} from '@heimdall/interfaces'; +import {ISlimUser} from '@heimdall/common/interfaces'; import {IsOptional, IsString} from 'class-validator'; import {User} from '../user.model'; diff --git a/apps/backend/src/users/dto/update-user.dto.ts b/apps/backend/src/users/dto/update-user.dto.ts index 2251b9759e..00cbd5aad4 100644 --- a/apps/backend/src/users/dto/update-user.dto.ts +++ b/apps/backend/src/users/dto/update-user.dto.ts @@ -1,4 +1,4 @@ -import {IUpdateUser} from '@heimdall/interfaces'; +import {IUpdateUser} from '@heimdall/common/interfaces'; import {IsBoolean, IsEmail, IsIn, IsOptional, IsString} from 'class-validator'; export class UpdateUserDto implements IUpdateUser { diff --git a/apps/backend/src/users/dto/user.dto.ts b/apps/backend/src/users/dto/user.dto.ts index 5f4a8b4725..cb9247f7f3 100644 --- a/apps/backend/src/users/dto/user.dto.ts +++ b/apps/backend/src/users/dto/user.dto.ts @@ -1,4 +1,4 @@ -import {IUser} from '@heimdall/interfaces'; +import {IUser} from '@heimdall/common/interfaces'; import {User} from '../user.model'; export class UserDto implements IUser { diff --git a/apps/frontend/package.json b/apps/frontend/package.json index 45c600adf1..96ad67f0a7 100644 --- a/apps/frontend/package.json +++ b/apps/frontend/package.json @@ -32,7 +32,7 @@ "@aws-sdk/client-s3": "^3.425.0", "@aws-sdk/client-sts": "^3.427.0", "@e965/xlsx": "^0.20.0", - "@heimdall/interfaces": "^2.10.16", + "@heimdall/common": "^2.11.1", "@mdi/font": "^7.0.96", "@mdi/js": "^7.0.96", "@types/chroma-js": "^2.1.0", diff --git a/apps/frontend/src/components/cards/EvaluationInfo.vue b/apps/frontend/src/components/cards/EvaluationInfo.vue index 2996ced499..24cbb34a01 100644 --- a/apps/frontend/src/components/cards/EvaluationInfo.vue +++ b/apps/frontend/src/components/cards/EvaluationInfo.vue @@ -57,7 +57,7 @@ import { SourcedContextualizedEvaluation, SourcedContextualizedProfile } from '@/store/report_intake'; -import {IEvaluation} from '@heimdall/interfaces'; +import {IEvaluation} from '@heimdall/common/interfaces'; import {ContextualizedEvaluation} from 'inspecjs'; import * as _ from 'lodash'; import Vue from 'vue'; diff --git a/apps/frontend/src/components/global/TopbarDropdown.vue b/apps/frontend/src/components/global/TopbarDropdown.vue index a753700d3f..99ed58b911 100644 --- a/apps/frontend/src/components/global/TopbarDropdown.vue +++ b/apps/frontend/src/components/global/TopbarDropdown.vue @@ -99,7 +99,7 @@ import IconLinkItem from '@/components/global/sidebaritems/IconLinkItem.vue'; import UserModal from '@/components/global/UserModal.vue'; import ServerMixin from '@/mixins/ServerMixin'; import {ServerModule} from '@/store/server'; -import {IUser} from '@heimdall/interfaces'; +import {IUser} from '@heimdall/common/interfaces'; import Component, {mixins} from 'vue-class-component'; @Component({ diff --git a/apps/frontend/src/components/global/UserModal.vue b/apps/frontend/src/components/global/UserModal.vue index 165658638f..09f74a1f2e 100644 --- a/apps/frontend/src/components/global/UserModal.vue +++ b/apps/frontend/src/components/global/UserModal.vue @@ -247,7 +247,7 @@ import InputDialog from '@/components/generic/InputDialog.vue'; import UserValidatorMixin from '@/mixins/UserValidatorMixin'; import {ServerModule} from '@/store/server'; import {SnackbarModule} from '@/store/snackbar'; -import {IApiKey, IUpdateUser, IUser} from '@heimdall/interfaces'; +import {IApiKey, IUpdateUser, IUser} from '@heimdall/common/interfaces'; import axios from 'axios'; import Vue from 'vue'; import Component from 'vue-class-component'; diff --git a/apps/frontend/src/components/global/admin/Statistics.vue b/apps/frontend/src/components/global/admin/Statistics.vue index 739488d38a..5456b58fbe 100644 --- a/apps/frontend/src/components/global/admin/Statistics.vue +++ b/apps/frontend/src/components/global/admin/Statistics.vue @@ -20,7 +20,7 @@