Skip to content

Conversation

harnyk
Copy link
Contributor

@harnyk harnyk commented Sep 24, 2024

No description provided.

This middleware is used to enable strongly typed
filters in the request. Additionally, the filters
object is guaranteed to be valid, otherwise 400 is
returned.
Also, add domainId filter parameter to /api/v1/app
route.
@harnyk harnyk marked this pull request as draft September 24, 2024 11:31
Also, add domainId filter parameter to /api/v1/template
route.
ListBulkActions,
ListActionsToolbar,
} from '../components';
import { Datagrid, List, SimpleList, TextField, EditButton, FunctionField } from 'react-admin'; // eslint-disable-line import/no-unresolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please avoid import/no-unresolved looks scary.

Copy link
Contributor Author

@harnyk harnyk Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, done. ✅
BTW, i don't see any eslint-related checks in the repo 🤔

@@ -23,6 +39,24 @@ const getApps = async (req: Request, res: Response): Promise<void> => {
if (filters.q) {
query.where('name', 'like', `%${filters.q}%`);
}
if (filters.domainId) {
if (filters.domainId === 'null') {
query.whereNotExists(function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please move the code to the service because it is hard to read it.

@@ -23,6 +39,24 @@ const getApps = async (req: Request, res: Response): Promise<void> => {
if (filters.q) {
query.where('name', 'like', `%${filters.q}%`);
}
if (filters.domainId) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a test involving these queries (if it's not exits yet).

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done ✅

`${Tables.Templates}.*`,
]);

if (req.filters?.domainId) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a test involving these queries (if it's not exits yet).

This comment was marked as outdated.

This comment was marked as outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done ✅

const query = db
.selectVersionedRows(Tables.SharedLibs, 'name', EntityTypes.shared_libs, [`${Tables.SharedLibs}.*`])
.from(Tables.SharedLibs);

if (req.filters?.name) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add a test involving these queries (if it's not exits yet).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try {
// create apps
for (const app of example.appsList) {
await req.post(example.url).send(app).expect(200);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tbh I'm not a big fan of having manual creation explicitly in tests where its required, in this way we reduce test quality by

  1. testing things that are not the part of the case - creation, deletion, instead of filtering
  2. reducing tests speed which is a metric by itself.

I'm ok with approach for now cause there where no tests at all for this part of functionality, but I'd prefer fixtures preloading for filters instead.

empty={<Empty />}
>
{isSmall ? (
<SimpleList
primaryText={record => `@sharedLibrary/${record.name}`}
secondaryText={record => record.spaBundle}
primaryText={(record) => `@sharedLibrary/${record.name}`}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest isolating this part into some function, its used multiple times

/@sharedLibrary/${record.name}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I am new to this project, I don't know the purpose of this prefixing, so I have no better idea than calling it getPrefixedSharedLibName(name: string): string or smth like this.


useEffect(() => {
dataProvider
.getList('router_domains', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(minor) introduce new method inside dataProvider in order to simplify call with these parameters? getFullList or smth

pagination: false,
sort: false,
filter: false,

const query = db
.selectVersionedRows(Tables.SharedLibs, 'name', EntityTypes.shared_libs, [`${Tables.SharedLibs}.*`])
.from(Tables.SharedLibs);

if (req.filters?.name) {
query.whereILike('name', `%${req.filters.name}%`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just double-checking, does it correctly partially matches with the beginning of the string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From MySQL docs:

SQL pattern matching enables you to use _ to match any single character and % to match an arbitrary number of characters (including zero characters).

PostgreSQL and SQLite docs describe the same behavior.

Covered with tests too.

if (req.filters?.id || req.filters?.name) {
const name = req.filters?.name ?? req.filters?.id;
ok(name);
const normalizedNames = Array.isArray(name) ? name : [name];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) slightly simpler

const normalizedNames = [].concat(name);

Copy link
Contributor Author

@harnyk harnyk Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In TS it becomes:

const normalizedName = ([] as string[]).concat(name)

But I still prefer the more literal way over the shorter one for its readability.

query.whereIn('name', normalizedNames);
}

if (req.filters?.domainId) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

matching for template500 seems to happen multiple times, utilize some constant for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a field name, just like "name" or "domainId". If we put it into constant, we will need to do the same for the rest of the fields, just like we do for tables.

Also:
 - fix(registry/client): unhardcode `@sharedLibrary/` prefix
harnyk and others added 5 commits September 26, 2024 13:01
…ository

Also:
 - refactor: convert the templatesRepository to a class
 - refactor: pre-initialize all my repositories in the bootstrap phase
 - feat: introduce normalizeArray utility function
res.status(200).send(itemsWithId);
const getTemplates = async (req: RequestWithFilters<TemplatesGetListFilters>, res: Response): Promise<void> => {
const { data, pagination } = await templatesRepository.getList(req.filters ?? {});
res.setHeader('Content-Range', pagination.total); //Stub for future pagination capabilities
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would not add that until it is required to be present

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it from the implementation made by previous developer. The client-side code relies on it

});

res.setHeader('Content-Range', sharedLibs.pagination.total);
res.status(200).send(preProcessResponse(itemsWithId));
res.setHeader('Content-Range', pagination.total);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

@harnyk harnyk marked this pull request as ready for review September 27, 2024 10:22
Copy link

Coverage Report

Ilc/server

Commit SHA:ae871d79ec415ac4de89a9479b1d642da7bb04d1

Test coverage results 🧪

Code coverage diff between base branch:master and head branch: feat/registry-ui-filters 
File details
Status File % Stmts % Branch % Funcs % Lines
total 90.24 84.29 88.36 90.14
/codebase/client.js 0 100 100 0
/codebase/client.plugins.manifest.js 0 100 100 0
/codebase/server.plugins.manifest.js 100 100 100 100
/codebase/common/CacheWrapper.js 100 95.45 100 100
/codebase/common/Environment.js 100 100 100 100
/codebase/common/SdkOptions.js 100 100 100 100
/codebase/common/UrlProcessor.js 100 100 100 100
/codebase/common/constants.js 0 100 100 0
/codebase/common/i18nCookie.js 100 100 100 100
/codebase/common/localStorage.js 92.59 100 100 92.59
/codebase/common/utils.js 75 38.46 78.57 71.87
/codebase/common/Slot/Slot.js 87.5 100 75 87.5
/codebase/common/Slot/SlotCollection.js 88.88 0 100 88.88
/codebase/common/Slot/SpaSlot.js 0 100 0 0
/codebase/common/Slot/SpaSlotCollection.js 0 0 0 0
/codebase/common/Slot/test/fixture.js 100 100 100 100
/codebase/common/guard/actionTypes.js 100 100 100 100
/codebase/common/guard/errors.js 100 100 100 100
/codebase/common/router/Router.js 98.3 91.66 100 98.27
/codebase/common/router/errors.js 100 100 100 100
/codebase/server/GuardManager.js 100 100 100 100
/codebase/server/app.js 96.77 90 100 96.61
/codebase/server/http.d.ts 0 0 0 0
/codebase/server/i18n.js 94 85.71 100 93.02
/codebase/server/index.js 0 100 100 0
/codebase/server/objectToBase64.js 100 100 100 100
/codebase/server/ping.js 66.66 100 33.33 75
/codebase/server/serveStatic.js 40 100 100 40
/codebase/server/server.js 0 0 0 0
/codebase/server/application/application.js 90 50 100 90
/codebase/server/context/context.js 100 100 100 100
/codebase/server/errorHandler/ErrorHandler.js 96.96 69.23 100 96.92
/codebase/server/errorHandler/factory.js 100 100 100 100
/codebase/server/logger/accessLogger.js 89.47 50 100 89.47
/codebase/server/logger/enhanceLogger.js 94.73 83.33 100 94.73
/codebase/server/plugins/PluginsLoader.js 76.92 50 50 76.92
/codebase/server/plugins/pluginManager.js 100 100 100 100
/codebase/server/plugins/reportingPlugin.js 100 75 100 100
/codebase/server/registry/Registry.js 96.94 85.93 100 96.77
/codebase/server/registry/TemplateParser.js 100 100 100 100
/codebase/server/registry/errors.ts 100 100 100 100
/codebase/server/registry/factory.js 100 100 100 100
/codebase/server/registry/isTemplateValid.js 100 100 100 100
/codebase/server/routes/renderTemplateHandlerFactory.ts 31.25 0 33.33 33.33
/codebase/server/routes/wildcardRequestHandlerFactory.ts 91.07 64.28 100 91.07
/codebase/server/services/CanonicalTagService.js 100 50 100 100
/codebase/server/services/CspBuilderService.js 100 90 100 100
/codebase/server/services/HrefLangService.js 92.85 68.75 100 92.85
/codebase/server/tailor/configs-injector.js 99.06 86.56 100 99.02
/codebase/server/tailor/error-handler.js 86.95 80 100 86.95
/codebase/server/tailor/errors.js 100 100 100 100
/codebase/server/tailor/factory.js 94.44 0 66.66 94.44
/codebase/server/tailor/fetch-template.js 100 100 100 100
/codebase/server/tailor/filter-headers.js 100 83.33 100 100
/codebase/server/tailor/fragment-hooks.js 94.11 95 100 94.11
/codebase/server/tailor/merge-configs.js 100 100 100 100
/codebase/server/tailor/parse-override-config.js 100 100 100 100
/codebase/server/tailor/process-fragment-response.js 100 93.75 100 100
/codebase/server/tailor/request-fragment.js 91.86 76.19 90 91.86
/codebase/server/tailor/server-router.js 98.59 96.15 100 98.57
/codebase/server/utils/helpers.ts 100 100 100 100
/codebase/server/utils/utils.js 100 100 100 100
/codebase/tests/helpers.js 75 100 78.57 75

Ilc/client

Commit SHA:ae871d79ec415ac4de89a9479b1d642da7bb04d1

Test coverage results 🧪

Code coverage diff between base branch:master and head branch: feat/registry-ui-filters 
File details
Status File % Stmts % Branch % Funcs % Lines
total 91.73 82.88 88.17 91.91
/codebase/client/AsyncBootUp.js 100 75 100 100
/codebase/client/BundleLoader.js 92.45 97.05 80 92.3
/codebase/client/ClientRouter.js 95.23 90.52 95.65 95.03
/codebase/client/CssTrackedApp.js 95 85 92.3 96.42
/codebase/client/GuardManager.js 96.15 77.77 100 96.15
/codebase/client/ParcelApi.js 97.05 87.5 100 96.96
/codebase/client/WrapApp.js 97.18 76.47 93.75 98.52
/codebase/client/composeAppSlotPairsToRegister.js 100 100 100 100
/codebase/client/dispatchSynchronizedEvent.js 96.96 100 100 96.55
/codebase/client/i18n.js 90.9 80 90.9 90.47
/codebase/client/utils.js 88 71.42 90 91.66
/codebase/client/ErrorHandlerManager/ErrorHandlerManager.js 100 90 100 100
/codebase/client/TransitionManager/TransitionBlocker.js 93.93 87.5 100 93.93
/codebase/client/TransitionManager/TransitionBlockerList.js 84.21 50 84.61 80
/codebase/client/TransitionManager/TransitionManager.js 87.94 75.92 85.71 87.85
/codebase/client/TransitionManager/GlobalSpinner/GlobalSpinner.js 100 100 100 100
/codebase/client/TransitionManager/ScrollController/ScrollController.js 95.83 100 100 95.83
/codebase/client/TransitionManager/SlotRenderObserver/SlotRenderObserver.js 85.18 79.16 100 84.61
/codebase/client/TransitionManager/errors/CriticalSlotTransitionError.js 100 100 100 100
/codebase/client/TransitionManager/errors/SlotTransitionTimeoutError.js 100 100 100 100
/codebase/client/configuration/IlcConfigRoot.js 84.61 50 92.3 84.61
/codebase/client/configuration/SystemJSImportMap.js 86.66 75 100 86.66
/codebase/client/configuration/getIlcConfigRoot.js 100 100 100 100
/codebase/client/constants/ilcEvents.js 100 100 100 100
/codebase/client/constants/singleSpaEvents.js 100 100 100 100
/codebase/client/errors/BaseError.js 100 80 100 100
/codebase/client/errors/CorsError.js 100 100 100 100
/codebase/client/errors/CriticalFragmentError.js 100 100 100 100
/codebase/client/errors/CriticalInternalError.js 100 100 100 100
/codebase/client/errors/CriticalRuntimeError.js 100 100 100 100
/codebase/client/errors/FetchTemplateError.js 100 100 100 100
/codebase/client/errors/FragmentError.js 100 100 100 100
/codebase/client/errors/InternalError.js 100 100 100 100
/codebase/client/errors/NavigationError.js 100 100 100 100
/codebase/client/errors/RuntimeError.js 100 100 100 100
/codebase/client/errors/UnhandledError.js 100 100 100 100
/codebase/client/errors/index.js 100 100 100 100
/codebase/client/navigationEvents/index.js 100 100 100 100
/codebase/client/navigationEvents/setupEvents.js 87.8 83.33 94.11 87.5
/codebase/common/CacheWrapper.js 96.72 95.83 100 96.55
/codebase/common/Environment.js 100 100 100 100
/codebase/common/SdkOptions.js 100 100 100 100
/codebase/common/UrlProcessor.js 100 100 100 100
/codebase/common/constants.js 100 100 100 100
/codebase/common/i18nCookie.js 100 100 100 100
/codebase/common/localStorage.js 48.14 0 11.11 48.14
/codebase/common/utils.js 48.57 20 46.15 48.38
/codebase/common/Slot/Slot.js 83.33 100 75 83.33
/codebase/common/Slot/SlotCollection.js 87.5 50 100 87.5
/codebase/common/Slot/SpaSlot.js 92.3 100 83.33 92.3
/codebase/common/Slot/SpaSlotCollection.js 88.88 100 66.66 94.11
/codebase/common/Slot/test/fixture.js 100 100 100 100
/codebase/common/guard/actionTypes.js 100 100 100 100
/codebase/common/guard/errors.js 100 100 100 100
/codebase/common/router/Router.js 98.27 93.54 100 98.27
/codebase/common/router/errors.js 100 100 100 100

Registry

Commit SHA:ae871d79ec415ac4de89a9479b1d642da7bb04d1

Test coverage results 🧪

Code coverage diff between base branch:master and head branch: feat/registry-ui-filters 
File details
Status File % Stmts % Branch % Funcs % Lines
🟢 total 82.65 (0.23) 59.4 (0.62) 72 (0.48) 82.92 (0.25)
/codebase/newrelic.js 100 50 100 100
/codebase/server.plugins.manifest.ts 100 100 100 100
/codebase/client/babel.config.js 0 100 100 0
/codebase/client/webpack.config.js 0 0 100 0
/codebase/client/src/authProvider.js 0 0 0 0
/codebase/client/src/constants.js 0 100 100 0
/codebase/client/src/dataProvider.js 0 0 0 0
/codebase/client/src/httpClient.js 0 0 0 0
/codebase/client/src/validators.js 0 0 0 0
/codebase/client/src/Localization/en.js 0 0 0 0
/codebase/client/src/Localization/index.js 0 0 0 0
/codebase/client/src/appRoutes/dataTransform.js 0 0 0 0
/codebase/client/src/appRoutes/index.js 0 0 0 0
/codebase/client/src/apps/dataTransform.js 0 0 0 0
/codebase/client/src/apps/index.js 0 0 0 0
/codebase/client/src/authEntities/dataTransform.js 0 0 0 0
/codebase/client/src/authEntities/index.js 0 0 0 0
/codebase/client/src/components/index.js 0 0 0 0
/codebase/client/src/routerDomains/dataTransform.js 0 0 0 0
/codebase/client/src/routerDomains/index.js 0 0 0 0
/codebase/client/src/settings/dataTransform.js 0 0 0 0
/codebase/client/src/settings/index.js 0 0 0 0
/codebase/client/src/settings/hooks/useQueryParams.js 0 0 0 0
/codebase/client/src/settings/hooks/useSettingsEditController.js 0 0 0 0
/codebase/client/src/sharedLibs/dataTransform.js 0 0 0 0
✨ 🆕 /codebase/client/src/sharedLibs/getPrefixedSharedLibName.js 0 100 0 0
/codebase/client/src/sharedLibs/index.js 0 0 0 0
/codebase/client/src/sharedProps/dataTransform.js 0 0 0 0
/codebase/client/src/sharedProps/index.js 0 0 0 0
/codebase/client/src/templates/dataTransform.js 0 100 0 0
/codebase/client/src/templates/index.js 0 0 0 0
/codebase/client/src/utils/json.js 0 0 0 0
/codebase/client/src/versioning/dataTransform.js 0 0 0 0
/codebase/client/src/versioning/index.js 0 0 0 0
/codebase/lde/oauth-server.ts 0 100 0 0
/codebase/server/app.ts 100 50 100 100
/codebase/server/index.ts 0 100 0 0
/codebase/server/runnerAssetsDiscovery.ts 0 0 0 0
/codebase/server/server.ts 0 0 0 0
/codebase/server/appRoutes/interfaces/index.ts 96.42 83.33 100 96.42
/codebase/server/appRoutes/routes/createAppRoute.ts 97.22 100 100 97.22
/codebase/server/appRoutes/routes/deleteAppRoute.ts 100 100 100 100
/codebase/server/appRoutes/routes/getAppRoute.ts 100 100 100 100
/codebase/server/appRoutes/routes/getAppRoutes.ts 91.66 62.5 100 91.66
/codebase/server/appRoutes/routes/index.ts 100 100 100 100
/codebase/server/appRoutes/routes/routesRepository.ts 100 100 100 100
/codebase/server/appRoutes/routes/updateAppRoute.ts 100 100 100 100
/codebase/server/appRoutes/services/prepareAppRoute.ts 100 66.66 100 100
/codebase/server/appRoutes/services/transformSpecialRoutes.ts 100 100 100 100
/codebase/server/apps/interfaces/index.ts 87.5 75 66.66 87.5
✨ 🆕 /codebase/server/apps/repositories/AppsRepository.ts 86.84 35 87.5 86.84
/codebase/server/apps/routes/createApp.ts 100 100 100 100
/codebase/server/apps/routes/deleteApp.ts 100 100 100 100
/codebase/server/apps/routes/getApp.ts 100 100 100 100
🟢 /codebase/server/apps/routes/getApps.ts 100 (18.19) 75 (38.64) 100 (0) 100 (18.19)
/codebase/server/apps/routes/index.ts 100 100 100 100
/codebase/server/apps/routes/updateApp.ts 96.29 85.71 100 96.29
/codebase/server/auth/index.ts 97.5 0 100 97.5
/codebase/server/auth/handlers/availableMethodsHandler.ts 33.33 0 50 33.33
/codebase/server/auth/handlers/localLoginHandler.ts 100 100 100 100
/codebase/server/auth/handlers/logoutHandler.ts 75 25 100 81.81
/codebase/server/auth/handlers/openIdAuthCallbackHandler.ts 88.88 33.33 100 88.88
/codebase/server/auth/middleware/bearerAuthenticationMiddleware.ts 100 100 100 100
/codebase/server/auth/middleware/initializeOpenIdMiddleware.ts 92.85 66.66 100 92.85
/codebase/server/auth/middleware/openIdAuthMiddleware.ts 0 0 0 0
/codebase/server/auth/middleware/rolesMiddleware.ts 100 85.71 100 100
/codebase/server/auth/middleware/validateSessionMiddleware.ts 100 100 100 100
/codebase/server/auth/services/AuthService.ts 100 100 100 100
/codebase/server/auth/services/OpenIdService.ts 100 100 100 100
/codebase/server/auth/strategies/bearer.ts 86.66 75 100 86.66
/codebase/server/auth/strategies/local.ts 80 0 100 80
/codebase/server/auth/strategies/oidc.ts 96.07 84.61 100 95.91
/codebase/server/authEntities/interfaces.ts 100 100 100 100
/codebase/server/authEntities/routes/create.ts 100 100 100 100
/codebase/server/authEntities/routes/deleteRoute.ts 100 100 100 100
/codebase/server/authEntities/routes/get.ts 100 100 100 100
/codebase/server/authEntities/routes/getAll.ts 100 100 100 100
/codebase/server/authEntities/routes/index.ts 100 100 100 100
/codebase/server/authEntities/routes/update.ts 100 100 100 100
/codebase/server/common/services/json.ts 81.81 84 91.66 80
/codebase/server/common/services/preProcessResponse.ts 85.71 100 0 85.71
/codebase/server/common/services/validateRequest.ts 92 75 100 91.66
/codebase/server/common/services/assets/AssetsDiscovery.ts 90.9 53.84 93.33 90.9
/codebase/server/common/services/assets/AssetsDiscoveryProcessor.ts 70.58 33.33 75 70.58
/codebase/server/common/services/assets/AssetsDiscoveryWhiteLists.ts 100 100 100 100
/codebase/server/common/services/assets/AssetsManifestReader.ts 100 100 100 100
/codebase/server/common/services/assets/AssetsValidator.ts 100 100 100 100
/codebase/server/common/services/assets/assetsManifestProcessor.ts 100 100 100 100
/codebase/server/common/services/assets/errors/AssetsManifestError.ts 100 100 100 100
/codebase/server/common/services/entries/ApplicationEntry.ts 93.47 75 100 93.47
/codebase/server/common/services/entries/Entry.ts 0 0 0 0
/codebase/server/common/services/entries/EntryFactory.ts 95 80 100 95
/codebase/server/common/services/entries/SharedLibEntry.ts 97.14 75 100 97.14
/codebase/server/common/services/entries/error/EntryError.ts 100 100 100 100
/codebase/server/common/services/entries/error/IncorrectEntryError.ts 100 100 100 100
/codebase/server/common/services/entries/error/NotFoundApplicationError.ts 100 100 100 100
/codebase/server/common/services/entries/error/NotFoundFqrnError.ts 100 100 100 100
/codebase/server/common/services/entries/error/NotFoundSharedLibraryError.ts 100 100 100 100
/codebase/server/common/services/entries/error/ValidationFqrnError.ts 100 100 100 100
/codebase/server/db/cascadeTruncate.ts 71.42 50 100 71.42
/codebase/server/db/index.ts 100 80 100 100
/codebase/server/db/logger.ts 63.63 100 50 60
/codebase/server/db/range.ts 100 100 100 100
/codebase/server/db/structure.ts 100 100 100 100
/codebase/server/db/syncSequence.ts 100 100 100 100
/codebase/server/db/versioning.ts 93.33 0 100 93.33
/codebase/server/entries/entries.ts 87.09 85.71 100 87.09
/codebase/server/errorHandler/httpErrors.ts 100 100 100 100
/codebase/server/errorHandler/index.ts 100 100 100 100
/codebase/server/errorHandler/noticeError.ts 100 0 100 100
/codebase/server/middleware/context.ts 100 75 100 100
✨ 🆕 /codebase/server/middleware/filters.ts 77.77 66.66 100 77.77
/codebase/server/middleware/userContext.ts 100 100 100 100
/codebase/server/migrations/20191016185102_apps.ts 100 100 66.66 100
/codebase/server/migrations/20191017131220_templates.ts 100 100 66.66 100
/codebase/server/migrations/20191017131749_routes.ts 100 100 66.66 100
/codebase/server/migrations/20191017144455_route_slots.ts 100 100 66.66 100
/codebase/server/migrations/20200113141956_apps.ts 66.66 100 50 66.66
/codebase/server/migrations/20200113142437_route_slots.ts 66.66 100 50 66.66
/codebase/server/migrations/20200120162838_apps_config_selector.ts 66.66 100 50 66.66
/codebase/server/migrations/20200121110723_shared_props.ts 83.33 100 66.66 83.33
/codebase/server/migrations/20200409184919_auth_entitites.ts 100 100 66.66 100
/codebase/server/migrations/20200409190157_auth_entitites_default.ts 100 100 50 100
/codebase/server/migrations/20200410180130_sessions.ts 88.88 50 66.66 88.88
/codebase/server/migrations/20200518134531_apps_initProps_removal.ts 66.66 100 50 66.66
/codebase/server/migrations/20200729141256_settings.ts 100 100 66.66 100
/codebase/server/migrations/20201012152003_settings_meta.ts 58.33 100 50 58.33
/codebase/server/migrations/20201013140633_settings_default.ts 90.9 50 75 90.9
/codebase/server/migrations/20201027180112_settings_globalSpinner.ts 80 100 50 80
/codebase/server/migrations/20201028142200_settings_i18n.ts 80 100 50 80
/codebase/server/migrations/20201029122727_settings_AuthOpenIdUniqueIdentifierClaimName.ts 80 100 50 80
/codebase/server/migrations/20201105155522_versioning.ts 90.9 100 66.66 90.9
/codebase/server/migrations/20201130141801_i18n_enabled_by_default.ts 80 100 50 80
/codebase/server/migrations/20201228201314_route_meta.ts 66.66 100 50 66.66
/codebase/server/migrations/20210125185210_app_wrapper_kind.ts 66.66 25 75 66.66
/codebase/server/migrations/20210125185211_apps_wrappedWith.ts 66.66 100 50 66.66
/codebase/server/migrations/20210219174348_settings_overrideConfigTrustedOrigins.ts 80 100 50 80
/codebase/server/migrations/20210226191151_apps_ssrProps.ts 66.66 100 50 66.66
/codebase/server/migrations/20210226191205_shared_props_ssrProps.ts 66.66 100 50 66.66
/codebase/server/migrations/20210405164831_router_domains.ts 85.71 100 66.66 85.71
/codebase/server/migrations/20210405182655_routes_domainId.ts 63.46 37.5 59.09 63.46
/codebase/server/migrations/20210426163602_routes_orderPosIsNullable.ts 66 37.5 54.16 66
/codebase/server/migrations/20210430154258_routes_uniqfromSpecialRoleToRoute.ts 62.5 100 50 62.5
/codebase/server/migrations/20210430154639_routes_moveSpecialRolesToRoute.ts 35.29 0 37.5 35.29
/codebase/server/migrations/20210430155514_routes_removeColumnSpecialRole.ts 66.66 100 50 66.66
/codebase/server/migrations/20210505151225_routes_domainIdIdxble.ts 46.15 40 33.33 46.15
/codebase/server/migrations/20210505181754_routes_orderPos_unique_per_domain.ts 62.5 100 50 62.5
/codebase/server/migrations/20210505182004_routes_route_unique_per_domain.ts 62.5 100 50 62.5
/codebase/server/migrations/20210505182425_old_tbls_cleanup.ts 80 50 50 80
/codebase/server/migrations/20210521125202_routes_drop_unique_route.ts 66.66 100 50 66.66
/codebase/server/migrations/20210607160910_apps_discoveryMetadata.ts 66.66 100 50 66.66
/codebase/server/migrations/20210607161242_apps_adminNotes.ts 66.66 100 50 66.66
/codebase/server/migrations/20210625150840_roles_userToReadonly.ts 50 50 50 50
/codebase/server/migrations/20210701183133_auth_entity_readonly.ts 80 100 50 80
/codebase/server/migrations/20210826144904_shared_libs.ts 88.88 100 66.66 88.88
/codebase/server/migrations/20220121115756_settings_onPropsUpdate.ts 80 100 50 80
/codebase/server/migrations/20220315155008_increase-template-size.ts 66.66 100 50 66.66
/codebase/server/migrations/20220316133143_versioning-text-update.ts 62.5 100 50 62.5
/codebase/server/migrations/20220323123155_add-locale-to-template.ts 88.88 100 66.66 88.88
/codebase/server/migrations/20220520083801_apps_enforceDomain.ts 66.66 100 50 66.66
/codebase/server/migrations/20220815164948_l20nManifest.ts 66.66 100 50 66.66
/codebase/server/migrations/20220819204836_rename-use-l10n.ts 66.66 100 50 66.66
/codebase/server/migrations/20220928161155_shared-lib-add-localization.ts 66.66 100 50 66.66
/codebase/server/migrations/20221118164122_add_csp_settings.ts 80 100 50 80
/codebase/server/migrations/20221123163817_csp-available-host-for-local.ts 80 100 50 80
/codebase/server/migrations/20221201191407_csp_enable_scrict_mode.ts 100 100 50 100
/codebase/server/migrations/20230303174003_settings-add-primary-key.ts 66.66 100 50 66.66
/codebase/server/migrations/20230303175443_settings-domain-value-table.ts 90 100 66.66 90
/codebase/server/migrations/20230703130802_remove-spa-bundle-constraint.ts 66.66 100 50 66.66
/codebase/server/migrations/20231003103643_routes_meta.ts 44.44 0 25 44.44
/codebase/server/migrations/20240315141721_pg_versioning_idx.ts 57.14 0 50 57.14
/codebase/server/public/interfaces.ts 0 0 0 0
/codebase/server/public/routes/appDiscovery.ts 100 100 100 100
/codebase/server/public/routes/index.ts 100 100 100 100
/codebase/server/routerDomains/interfaces/index.ts 90.9 100 100 90.9
/codebase/server/routerDomains/routes/createRouterDomains.ts 100 100 100 100
/codebase/server/routerDomains/routes/deleteRouterDomains.ts 94.11 100 100 94.11
/codebase/server/routerDomains/routes/getAllRouterDomains.ts 100 100 100 100
/codebase/server/routerDomains/routes/getRouterDomains.ts 100 100 100 100
/codebase/server/routerDomains/routes/index.ts 100 100 100 100
/codebase/server/routerDomains/routes/updateRouterDomains.ts 100 100 100 100
/codebase/server/routes/config.ts 98.48 63.63 92.3 98.36
/codebase/server/routes/routes.ts 100 100 100 100
/codebase/server/seeds/00_cleanup.ts 81.81 0 100 81.81
/codebase/server/seeds/01_apps.ts 100 100 100 100
/codebase/server/seeds/02_templates.ts 100 100 100 100
/codebase/server/seeds/03_routerDomains.ts 100 100 100 100
/codebase/server/seeds/04_routes.ts 100 100 100 100
/codebase/server/seeds/05_route_slots.ts 100 100 100 100
/codebase/server/seeds/06_settings.ts 90.9 50 100 90.9
/codebase/server/seeds/07_rootPwd.ts 83.33 0 100 83.33
/codebase/server/settings/interfaces/cspSchema.ts 100 100 100 100
/codebase/server/settings/interfaces/index.ts 100 100 100 100
/codebase/server/settings/routes/createSetting.ts 100 100 100 100
/codebase/server/settings/routes/deleteDomainSetting.ts 100 100 100 100
/codebase/server/settings/routes/getSetting.ts 80 33.33 100 80
/codebase/server/settings/routes/getSettings.ts 100 76.47 100 100
/codebase/server/settings/routes/index.ts 100 100 100 100
/codebase/server/settings/routes/updateSetting.ts 83.33 50 100 83.33
/codebase/server/settings/services/SettingsService.ts 79.24 69.81 84.61 86.31
/codebase/server/settings/services/preProcessResponse.ts 92.85 100 50 92.85
/codebase/server/sharedLibs/interfaces/index.ts 100 100 100 100
✨ 🆕 /codebase/server/sharedLibs/repositories/SharedLibsRepository.ts 100 80 100 100
/codebase/server/sharedLibs/routes/createSharedLib.ts 95 100 100 95
/codebase/server/sharedLibs/routes/deleteSharedLib.ts 100 100 100 100
/codebase/server/sharedLibs/routes/getSharedLib.ts 100 100 100 100
🔴 /codebase/server/sharedLibs/routes/getSharedLibs.ts 100 (0) 75 (-25) 100 (0) 100 (0)
/codebase/server/sharedLibs/routes/index.ts 100 100 100 100
/codebase/server/sharedLibs/routes/updateSharedLib.ts 92.59 85.71 100 92.59
/codebase/server/sharedProps/interfaces/index.ts 100 100 100 100
/codebase/server/sharedProps/routes/createSharedProps.ts 100 100 100 100
/codebase/server/sharedProps/routes/deleteSharedProps.ts 100 100 100 100
/codebase/server/sharedProps/routes/getAllSharedProps.ts 100 100 100 100
/codebase/server/sharedProps/routes/getSharedProps.ts 100 100 100 100
/codebase/server/sharedProps/routes/index.ts 100 100 100 100
/codebase/server/sharedProps/routes/updateSharedProps.ts 100 100 100 100
/codebase/server/templates/errors.ts 100 100 100 100
/codebase/server/templates/interfaces/index.ts 0 0 0 0
/codebase/server/templates/routes/createTemplate.ts 96 100 100 96
/codebase/server/templates/routes/deleteTemplate.ts 100 100 100 100
/codebase/server/templates/routes/getRenderedTemplate.ts 95.83 91.66 100 95.83
/codebase/server/templates/routes/getTemplate.ts 100 100 100 100
🔴 /codebase/server/templates/routes/getTemplates.ts 100 (0) 75 (-25) 100 (0) 100 (0)
/codebase/server/templates/routes/index.ts 100 100 100 100
/codebase/server/templates/routes/updateTemplate.ts 95.65 75 100 95.65
/codebase/server/templates/routes/validation.ts 100 100 100 100
/codebase/server/templates/services/parseLinkHeader.ts 100 100 100 100
/codebase/server/templates/services/renderTemplate.ts 97.33 90 100 97.1
🔴 /codebase/server/templates/services/templatesRepository.ts 100 (0) 86.66 (-13.34) 100 (0) 100 (0)
/codebase/server/templates/services/resources/Attributes.ts 100 100 100 100
/codebase/server/templates/services/resources/Resource.ts 100 100 100 100
/codebase/server/templates/services/resources/ResourceLinkParser.ts 100 100 100 100
/codebase/server/templates/services/resources/ResourcePreload.ts 100 100 100 100
/codebase/server/templates/services/resources/ResourceScript.ts 100 100 100 100
/codebase/server/templates/services/resources/ResourceStylesheet.ts 100 100 100 100
/codebase/server/templates/services/resources/buildAttributes.ts 100 100 100 100
/codebase/server/templates/services/resources/filterObject.ts 100 100 100 100
/codebase/server/util/TemplateParser.ts 100 100 100 100
/codebase/server/util/TypedMap.ts 100 100 100 100
/codebase/server/util/axiosErrorTransformer.ts 100 11.76 100 100
/codebase/server/util/axiosExponentialRetry.ts 100 100 100 100
/codebase/server/util/db.ts 100 80 100 100
/codebase/server/util/express-promise.ts 80 71.42 100 80
/codebase/server/util/helpers.ts 93.75 87.5 100 92.85
/codebase/server/util/hmac.ts 100 100 100 100
/codebase/server/util/isTemplateValid.ts 87.5 66.66 100 87.5
/codebase/server/util/logger.ts 73.68 89.47 40 72.97
✨ 🆕 /codebase/server/util/normalizeArray.ts 83.33 75 100 83.33
/codebase/server/util/ping.ts 50 100 0 50
/codebase/server/util/pluginManager.ts 88.88 50 100 88.88
/codebase/server/versioning/config.ts 100 100 100 100
/codebase/server/versioning/errors.ts 100 100 100 100
/codebase/server/versioning/interfaces.ts 100 100 100 100
/codebase/server/versioning/routes/getVersions.ts 86.66 57.14 100 85.71
/codebase/server/versioning/routes/index.ts 100 100 100 100
/codebase/server/versioning/routes/revertVersion.ts 53.33 0 100 53.33
/codebase/server/versioning/services/Versioning.ts 76.47 70.27 84.61 78.04
/codebase/tests/common.ts 91.66 25 100 88.88
/codebase/tests/data/auth/keys.ts 100 100 100 100
/codebase/tests/data/auth/rsa.ts 100 100 100 100
/codebase/tests/data/auth/token-response.ts 100 100 100 100
/codebase/tests/utils/console.ts 100 100 100 100
✨ 🆕 /codebase/tests/utils/makeFilterQuery.ts 100 100 100 100
/codebase/tests/utils/wait.ts 100 100 100 100
/codebase/tests/utils/withSetting.ts 100 100 100 100
/codebase/typings/PaginatedResult.ts 0 0 0 0
/codebase/typings/User.ts 0 0 0 0
/codebase/typings/index.d.ts 0 0 0 0
/codebase/typings/knex/index.d.ts 0 0 0 0

@harnyk harnyk merged commit 854e727 into master Sep 27, 2024
15 checks passed
@harnyk harnyk deleted the feat/registry-ui-filters branch September 27, 2024 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants