From add571569b4deccb35c0b08651eaa685f46b3273 Mon Sep 17 00:00:00 2001 From: Henrique Oliveira Date: Mon, 19 Aug 2024 17:31:00 -0300 Subject: [PATCH 1/8] feat: add permissions --- packages/backend/src/index.ts | 4 +- .../backend/src/permissionPolicyModule.ts | 54 ++++++++ plugins/infrawallet-backend/README.md | 131 ++++++++++++++++-- plugins/infrawallet-backend/package.json | 3 + plugins/infrawallet-backend/src/plugin.ts | 8 +- .../infrawallet-backend/src/service/router.ts | 75 +++++++++- plugins/infrawallet-common/.eslintrc.js | 1 + plugins/infrawallet-common/README.md | 3 + plugins/infrawallet-common/package.json | 56 ++++++++ plugins/infrawallet-common/src/index.ts | 1 + plugins/infrawallet-common/src/permissions.ts | 54 ++++++++ plugins/infrawallet-common/src/setupTests.ts | 1 + plugins/infrawallet/package.json | 2 + .../UnauthorizedErrorPage.tsx | 73 ++++++++++ 14 files changed, 452 insertions(+), 14 deletions(-) create mode 100644 packages/backend/src/permissionPolicyModule.ts create mode 100644 plugins/infrawallet-common/.eslintrc.js create mode 100644 plugins/infrawallet-common/README.md create mode 100644 plugins/infrawallet-common/package.json create mode 100644 plugins/infrawallet-common/src/index.ts create mode 100644 plugins/infrawallet-common/src/permissions.ts create mode 100644 plugins/infrawallet-common/src/setupTests.ts create mode 100644 plugins/infrawallet/src/components/ErrorsAlertComponent/UnauthorizedErrorPage.tsx diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index fb2e0ad..860fa63 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -7,6 +7,7 @@ */ import { createBackend } from '@backstage/backend-defaults'; +import { legacyPlugin } from '@backstage/backend-common'; const backend = createBackend(); @@ -27,7 +28,8 @@ backend.add(import('@backstage/plugin-catalog-backend-module-scaffolder-entity-m // permission plugin backend.add(import('@backstage/plugin-permission-backend/alpha')); -backend.add(import('@backstage/plugin-permission-backend-module-allow-all-policy')); +//backend.add(import('@backstage/plugin-permission-backend-module-allow-all-policy')); +backend.add(import('./permissionPolicyModule')); // search plugin backend.add(import('@backstage/plugin-search-backend/alpha')); diff --git a/packages/backend/src/permissionPolicyModule.ts b/packages/backend/src/permissionPolicyModule.ts new file mode 100644 index 0000000..d28fa33 --- /dev/null +++ b/packages/backend/src/permissionPolicyModule.ts @@ -0,0 +1,54 @@ +import { createBackendModule } from '@backstage/backend-plugin-api'; +import { BackstageIdentityResponse } from '@backstage/plugin-auth-node'; +import { + AuthorizeResult, + isPermission, + PolicyDecision, +} from '@backstage/plugin-permission-common'; +import { + PermissionPolicy, + PolicyQuery, +} from '@backstage/plugin-permission-node'; +import { policyExtensionPoint } from '@backstage/plugin-permission-node/alpha'; +import { + infraWalletReportRead, + infraWalletMetricSettingsDelete +} from '@electrolux-oss/plugin-infrawallet-common'; + +class DefaultPermissionPolicy implements PermissionPolicy { + + async handle( + request: PolicyQuery, + _user?: BackstageIdentityResponse, + ): Promise { + + // if you do not configure any infrawallet permissions, the default behavior is allow. + + // Example deny read report + if (isPermission(request.permission, infraWalletReportRead)) { + return { result: AuthorizeResult.DENY }; + } + + // Example deny delete metric settings + if (isPermission(request.permission, infraWalletMetricSettingsDelete)) { + return { result: AuthorizeResult.DENY }; + } + + return { result: AuthorizeResult.ALLOW }; + } +} + +export default createBackendModule({ + pluginId: 'permission', + moduleId: 'defaultPolicy', + register(env) { + env.registerInit({ + deps: { + policy: policyExtensionPoint, + }, + async init({ policy }) { + policy.setPolicy(new DefaultPermissionPolicy()); + }, + }); + }, +}); \ No newline at end of file diff --git a/plugins/infrawallet-backend/README.md b/plugins/infrawallet-backend/README.md index 3330c21..4463904 100644 --- a/plugins/infrawallet-backend/README.md +++ b/plugins/infrawallet-backend/README.md @@ -1,14 +1,129 @@ -# infrawallet +# InfraWallet Backend Welcome to the infrawallet backend plugin! -_This plugin was created through the Backstage CLI_ +## Installation -## Getting started +### Install the package -Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn -start` in the root directory, and then navigating to [/infraWalletPlugin/health](http://localhost:7007/api/infraWalletPlugin/health). +``` +# From your Backstage root directory +yarn --cwd packages/backend add @electrolux-oss/plugin-infrawallet-backend +``` -You can also serve the plugin in isolation by running `yarn start` in the plugin directory. -This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads. -It is only meant for local development, and the setup for it can be found inside the [/dev](/dev) directory. +### Adding the plugin to your `packages/backend` + +Modify `packages/backend/src/index.ts` and add the following code before `backend.start()`; + +```typescript +... +// InfraWallet backend +backend.add(import('@electrolux-oss/plugin-infrawallet-backend')); +... +backend.start(); +``` + +### If the legacy Backstage backend system is used + +You'll need to add the plugin to the router in your backend package. You can do this by creating a file called `infrawallet.ts` in folder `packages/backend/src/plugins/` with the following content: + +```ts +import { createRouter } from '@electrolux-oss/plugin-infrawallet-backend'; +import { Router } from 'express'; +import { PluginEnvironment } from './types'; + +export default async function createPlugin(env: PluginEnvironment): Promise { + return await createRouter({ + logger: env.logger, + config: env.config, + cache: env.cache.getClient(), + database: env.database, + discovery: env.discovery, + permissions: env.permissions + }); +} +``` + +Then modify `packages/backend/src/index.ts` + +```ts +... +import infraWallet from './plugins/infrawallet'; +... +async function main() { + ... + const infraWalletEnv = useHotMemoize(module, () => createEnv('infrawallet')); + ... + apiRouter.use('/infrawallet', authMiddleware, await infraWallet(infraWalletEnv)); + ... +} +``` + +### Backend Configuration + +#### Cloud Accounts + +Add cloud account credentials to `app-config.yaml`. +Here is an example of the configuration for AWS and Azure accounts: + +```yaml +backend: + infraWallet: + integrations: + azure: + - name: + subscriptionId: ... + tenantId: ... + clientId: ... + clientSecret: ... + - name: + subscriptionId: ... + tenantId: ... + clientId: ... + clientSecret: ... + aws: + - name: + accountId: '<12-digit_account_ID_as_string>' + assumedRoleName: ... + accessKeyId: ... + accessKeySecret: ... + - name: + accountId: '<12-digit_account_ID_as_string>' + assumedRoleName: ... + accessKeyId: ... + accessKeySecret: ... +``` + +#### Setting up plugin permissions + +You configure permissions for specific infrawallet actions by importing the supported set of permissions from the [infrawallet-common](../infrawallet-common/README.md) package along with the custom rules/conditions provided here to incorporate into your [permission policy](https://backstage.io/docs/permissions/writing-a-policy). + +This package also exports a DefaultInfraWalletPermissionPolicy which contains a recommended default permissions policy you can apply as a "sub-policy" in your app: + +```diff +# packages/backend/src/plugins/permission.ts + ++import { DefaultInfraWalletPermissionPolicy, isInfraWalletPermission } from '@electrolux-oss/plugin-infrawallet-backend'; +... +class BackstagePermissionPolicy implements PermissionPolicy { ++ private playlistPermissionPolicy = new DefaultInfraWalletPermissionPolicy(); + + async handle( + request: PolicyQuery, + user?: BackstageIdentityResponse, + ): Promise { ++ if (isInfraWalletPermission(request.permission)) { ++ return this.playlistPermissionPolicy.handle(request, user); ++ } + ... + } +} + +export default async function createPlugin(env: PluginEnvironment): Promise { + return await createRouter({ + config: env.config, + logger: env.logger, + discovery: env.discovery, + policy: new BackstagePermissionPolicy(), + ... +``` \ No newline at end of file diff --git a/plugins/infrawallet-backend/package.json b/plugins/infrawallet-backend/package.json index fe9690c..fc9e6aa 100644 --- a/plugins/infrawallet-backend/package.json +++ b/plugins/infrawallet-backend/package.json @@ -43,8 +43,11 @@ "@backstage/backend-defaults": "^0.2.18", "@backstage/backend-plugin-api": "^0.6.18", "@backstage/config": "^1.2.0", + "@backstage/plugin-permission-common": "^0.8.0", + "@backstage/plugin-permission-node": "^0.8.0", "@backstage/types": "^1.1.1", "@datadog/datadog-api-client": "^1.26.0", + "@electrolux-oss/plugin-infrawallet-common": "workspace:^", "@google-cloud/bigquery": "7.7.1", "@types/express": "*", "express": "^4.17.1", diff --git a/plugins/infrawallet-backend/src/plugin.ts b/plugins/infrawallet-backend/src/plugin.ts index e8a3351..e2fd7f0 100644 --- a/plugins/infrawallet-backend/src/plugin.ts +++ b/plugins/infrawallet-backend/src/plugin.ts @@ -16,14 +16,20 @@ export const infraWalletPlugin = createBackendPlugin({ config: coreServices.rootConfig, cache: coreServices.cache, database: coreServices.database, + permissions: coreServices.permissions, + discovery: coreServices.discovery, + httpAuth: coreServices.httpAuth, }, - async init({ httpRouter, logger, config, cache, database }) { + async init({ httpRouter, logger, config, cache, database, permissions, discovery, httpAuth }) { httpRouter.use( await createRouter({ logger, config, cache, database, + permissions, + discovery, + httpAuth, }), ); httpRouter.addAuthPolicy({ diff --git a/plugins/infrawallet-backend/src/service/router.ts b/plugins/infrawallet-backend/src/service/router.ts index cf69ff8..19b682e 100644 --- a/plugins/infrawallet-backend/src/service/router.ts +++ b/plugins/infrawallet-backend/src/service/router.ts @@ -1,5 +1,9 @@ -import { errorHandler } from '@backstage/backend-common'; -import { CacheService, DatabaseService, LoggerService, resolvePackagePath } from '@backstage/backend-plugin-api'; +import { + createLegacyAuthAdapters, + errorHandler, +} from '@backstage/backend-common'; +import { NotAllowedError } from '@backstage/errors'; +import { AuthService, CacheService, DatabaseService, DiscoveryService, HttpAuthService, LoggerService, PermissionsService, resolvePackagePath } from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import express from 'express'; import Router from 'express-promise-router'; @@ -13,12 +17,24 @@ import { InfraWalletClient } from './InfraWalletClient'; import { MetricProvider } from './MetricProvider'; import { COST_CLIENT_MAPPINGS, METRIC_PROVIDER_MAPPINGS } from './consts'; import { CloudProviderError, Metric, MetricSetting, Report } from './types'; +import { + AuthorizePermissionRequest, + AuthorizeResult, + QueryPermissionRequest, +} from '@backstage/plugin-permission-common'; +import { permissions } from '@electrolux-oss/plugin-infrawallet-common'; +import { createPermissionIntegrationRouter } from '@backstage/plugin-permission-node'; + export interface RouterOptions { logger: LoggerService; config: Config; cache: CacheService; database: DatabaseService; + permissions: PermissionsService; + discovery: DiscoveryService; + auth?: AuthService; + httpAuth?: HttpAuthService; } async function setUpDatabase(database: DatabaseService) { @@ -37,12 +53,43 @@ async function setUpDatabase(database: DatabaseService) { } export async function createRouter(options: RouterOptions): Promise { - const { logger, config, cache, database } = options; + const { logger, config, cache, database, permissions: permissionEvaluator, } = options; + const { httpAuth } = createLegacyAuthAdapters(options); + + const evaluateRequestPermission = async ( + request: express.Request, + permission: AuthorizePermissionRequest | QueryPermissionRequest, + ) => { + const credentials = await httpAuth.credentials(request, { + allow: ['user'], + }); + + const decision = permissions + ? ( + await permissionEvaluator.authorize( + [permission as AuthorizePermissionRequest], + { credentials }, + ) + )[0] + : undefined; + + if (decision && decision.result === AuthorizeResult.DENY) { + throw new NotAllowedError('Unauthorized'); + } + + return { decision, user: credentials.principal }; + }; + // do database migrations here to support the legacy backend system await setUpDatabase(database); const router = Router(); router.use(express.json()); + router.use( + createPermissionIntegrationRouter({ + permissions: Object.values(permissions), + }), + ); router.get('/health', (_, response) => { logger.info('PONG!'); @@ -50,6 +97,10 @@ export async function createRouter(options: RouterOptions): Promise { + await evaluateRequestPermission(request, { + permission: permissions.infraWalletReportRead, + }); + const filters = request.query.filters as string; const groups = request.query.groups as string; const granularity = request.query.granularity as string; @@ -161,12 +212,20 @@ export async function createRouter(options: RouterOptions): Promise { + await evaluateRequestPermission(request, { + permission: permissions.infraWalletMetricSettingsRead, + }); + const walletName = request.params.walletName; const metricSettings = await getWalletMetricSettings(database, walletName); response.json({ data: metricSettings, status: 200 }); }); - router.get('/metric/metric_configs', async (_request, response) => { + router.get('/metric/metric_configs', async (request, response) => { + await evaluateRequestPermission(request, { + permission: permissions.infraWalletMetricSettingsRead, + }); + const conf = config.getConfig('backend.infraWallet.metricProviders'); const configNames: { metric_provider: string; config_name: string }[] = []; conf.keys().forEach((provider: string) => { @@ -182,6 +241,10 @@ export async function createRouter(options: RouterOptions): Promise { + await evaluateRequestPermission(request, { + permission: permissions.infraWalletMetricSettingsCreate, + }); + const readOnly = config.getOptionalBoolean('infraWallet.settings.readOnly') ?? false; if (readOnly) { @@ -194,6 +257,10 @@ export async function createRouter(options: RouterOptions): Promise { + await evaluateRequestPermission(request, { + permission: permissions.infraWalletMetricSettingsDelete, + }); + const readOnly = config.getOptionalBoolean('infraWallet.settings.readOnly') ?? false; if (readOnly) { diff --git a/plugins/infrawallet-common/.eslintrc.js b/plugins/infrawallet-common/.eslintrc.js new file mode 100644 index 0000000..e2a53a6 --- /dev/null +++ b/plugins/infrawallet-common/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/plugins/infrawallet-common/README.md b/plugins/infrawallet-common/README.md new file mode 100644 index 0000000..1b533bf --- /dev/null +++ b/plugins/infrawallet-common/README.md @@ -0,0 +1,3 @@ +# InfraWallet Common + +Common functionalities, types, and permissions for the infrawallet plugin. diff --git a/plugins/infrawallet-common/package.json b/plugins/infrawallet-common/package.json new file mode 100644 index 0000000..9c34a46 --- /dev/null +++ b/plugins/infrawallet-common/package.json @@ -0,0 +1,56 @@ +{ + "name": "@electrolux-oss/plugin-infrawallet-common", + "version": "0.1.0", + "main": "src/index.ts", + "types": "src/index.ts", + "license": "Apache-2.0", + "publishConfig": { + "access": "public", + "main": "dist/index.esm.js", + "types": "dist/index.d.ts" + }, + "homepage": "https://opensource.electrolux.one", + "repository": { + "type": "git", + "url": "https://github.com/electrolux-oss/infrawallet", + "directory": "plugins/infrawallet-common" + }, + "backstage": { + "role": "common-library" + }, + "sideEffects": false, + "scripts": { + "start": "backstage-cli package start", + "build": "backstage-cli package build", + "lint": "backstage-cli package lint", + "test": "backstage-cli package test", + "clean": "backstage-cli package clean", + "prepack": "backstage-cli package prepack", + "postpack": "backstage-cli package postpack" + }, + "dependencies": { + "@backstage/core-components": "^0.14.7", + "@backstage/core-plugin-api": "^1.9.2", + "@backstage/theme": "^0.5.4", + "@material-ui/core": "^4.9.13", + "@material-ui/icons": "^4.9.1", + "@material-ui/lab": "^4.0.0-alpha.61", + "react-use": "^17.2.4" + }, + "peerDependencies": { + "react": "^16.13.1 || ^17.0.0 || ^18.0.0" + }, + "devDependencies": { + "@backstage/cli": "^0.26.5", + "@backstage/core-app-api": "^1.12.5", + "@backstage/dev-utils": "^1.0.32", + "@backstage/test-utils": "^1.5.5", + "@testing-library/jest-dom": "^6.0.0", + "@testing-library/react": "^14.0.0", + "@testing-library/user-event": "^14.0.0", + "msw": "^1.0.0" + }, + "files": [ + "dist" + ] +} diff --git a/plugins/infrawallet-common/src/index.ts b/plugins/infrawallet-common/src/index.ts new file mode 100644 index 0000000..4248f6b --- /dev/null +++ b/plugins/infrawallet-common/src/index.ts @@ -0,0 +1 @@ +export * from './permissions'; \ No newline at end of file diff --git a/plugins/infrawallet-common/src/permissions.ts b/plugins/infrawallet-common/src/permissions.ts new file mode 100644 index 0000000..72200c8 --- /dev/null +++ b/plugins/infrawallet-common/src/permissions.ts @@ -0,0 +1,54 @@ +import { createPermission } from '@backstage/plugin-permission-common'; + +/** + * @public + */ +export const infraWalletReportRead = createPermission({ + name: 'infrawallet.report.read', + attributes: { action: 'read' }, +}); + +/** + * @public + */ +export const infraWalletMetricSettingsRead = createPermission({ + name: 'infrawallet.metric.settings.read', + attributes: { action: 'read' }, +}); + +/** + * @public + */ +export const infraWalletMetricSettingsCreate = createPermission({ + name: 'infrawallet.metric.settings.create', + attributes: { action: 'create' }, +}); + +/** + * @public + */ +export const infraWalletMetricSettingsUpdate = createPermission({ + name: 'infrawallet.metric.settings.update', + attributes: { action: 'update' }, +}); + +/** + * @public + */ +export const infraWalletMetricSettingsDelete = createPermission({ + name: 'infrawallet.metric.settings.delete', + attributes: { action: 'delete' }, +}); + +/** + * List of all permissions + * + * @public + */ +export const permissions = { + infraWalletReportRead, + infraWalletMetricSettingsRead, + infraWalletMetricSettingsCreate, + infraWalletMetricSettingsUpdate, + infraWalletMetricSettingsDelete +}; \ No newline at end of file diff --git a/plugins/infrawallet-common/src/setupTests.ts b/plugins/infrawallet-common/src/setupTests.ts new file mode 100644 index 0000000..cb0ff5c --- /dev/null +++ b/plugins/infrawallet-common/src/setupTests.ts @@ -0,0 +1 @@ +export {}; diff --git a/plugins/infrawallet/package.json b/plugins/infrawallet/package.json index 8651990..bc70597 100644 --- a/plugins/infrawallet/package.json +++ b/plugins/infrawallet/package.json @@ -36,7 +36,9 @@ "@backstage/config": "^1.2.0", "@backstage/core-components": "^0.14.7", "@backstage/core-plugin-api": "^1.9.2", + "@backstage/plugin-permission-react": "^0.4.24", "@backstage/theme": "^0.5.4", + "@electrolux-oss/plugin-infrawallet-common": "workspace:^", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "^4.0.0-alpha.61", diff --git a/plugins/infrawallet/src/components/ErrorsAlertComponent/UnauthorizedErrorPage.tsx b/plugins/infrawallet/src/components/ErrorsAlertComponent/UnauthorizedErrorPage.tsx new file mode 100644 index 0000000..123d2b7 --- /dev/null +++ b/plugins/infrawallet/src/components/ErrorsAlertComponent/UnauthorizedErrorPage.tsx @@ -0,0 +1,73 @@ +import Grid from '@material-ui/core/Grid'; +import { makeStyles } from '@material-ui/core/styles'; +import Typography from '@material-ui/core/Typography'; +import React from 'react'; +import { useNavigate } from 'react-router-dom'; +import { Link, useSupportConfig } from '@backstage/core-components'; + +interface IErrorPageProps { + supportUrl?: string; +} + +/** @public */ +export type ErrorPageClassKey = 'container' | 'title' | 'subtitle'; + +const useStyles = makeStyles( + theme => ({ + container: { + padding: theme.spacing(8), + [theme.breakpoints.down('xs')]: { + padding: theme.spacing(2), + }, + }, + title: { + paddingBottom: theme.spacing(5), + [theme.breakpoints.down('xs')]: { + paddingBottom: theme.spacing(4), + fontSize: theme.typography.h3.fontSize, + }, + }, + subtitle: { + color: theme.palette.textSubtle, + }, + }), + { name: 'BackstageErrorPage' }, +); + +/** + * Error page with status and description + * + * @public + * + */ +export function UnauthorizedErrorPage(props: IErrorPageProps) { + const { + supportUrl, + } = props; + const classes = useStyles(); + const navigate = useNavigate(); + const support = useSupportConfig(); + + return ( + + + + Ops! Parece que você não tem autorização neste momento. + +
+ + navigate(-1)}> + Volte + + ... ou por favor{' '} + contate o suporte se você + acredita que isso seja um problema. + +
+
+ ); +} \ No newline at end of file From d6b07e6af2155f18fde11f80db46c1a3f1868d07 Mon Sep 17 00:00:00 2001 From: Henrique Oliveira Date: Tue, 20 Aug 2024 08:23:28 -0300 Subject: [PATCH 2/8] refactor: remove not used --- plugins/infrawallet-backend/README.md | 131 +------- .../UnauthorizedErrorPage.tsx | 73 ----- yarn.lock | 301 +++++++++++++++++- 3 files changed, 307 insertions(+), 198 deletions(-) delete mode 100644 plugins/infrawallet/src/components/ErrorsAlertComponent/UnauthorizedErrorPage.tsx diff --git a/plugins/infrawallet-backend/README.md b/plugins/infrawallet-backend/README.md index 4463904..009c6f2 100644 --- a/plugins/infrawallet-backend/README.md +++ b/plugins/infrawallet-backend/README.md @@ -1,129 +1,14 @@ -# InfraWallet Backend +# infrawallet Welcome to the infrawallet backend plugin! -## Installation +_This plugin was created through the Backstage CLI_ -### Install the package +## Getting started -``` -# From your Backstage root directory -yarn --cwd packages/backend add @electrolux-oss/plugin-infrawallet-backend -``` +Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn +start` in the root directory, and then navigating to [/infraWalletPlugin/health](http://localhost:7007/api/infraWalletPlugin/health). -### Adding the plugin to your `packages/backend` - -Modify `packages/backend/src/index.ts` and add the following code before `backend.start()`; - -```typescript -... -// InfraWallet backend -backend.add(import('@electrolux-oss/plugin-infrawallet-backend')); -... -backend.start(); -``` - -### If the legacy Backstage backend system is used - -You'll need to add the plugin to the router in your backend package. You can do this by creating a file called `infrawallet.ts` in folder `packages/backend/src/plugins/` with the following content: - -```ts -import { createRouter } from '@electrolux-oss/plugin-infrawallet-backend'; -import { Router } from 'express'; -import { PluginEnvironment } from './types'; - -export default async function createPlugin(env: PluginEnvironment): Promise { - return await createRouter({ - logger: env.logger, - config: env.config, - cache: env.cache.getClient(), - database: env.database, - discovery: env.discovery, - permissions: env.permissions - }); -} -``` - -Then modify `packages/backend/src/index.ts` - -```ts -... -import infraWallet from './plugins/infrawallet'; -... -async function main() { - ... - const infraWalletEnv = useHotMemoize(module, () => createEnv('infrawallet')); - ... - apiRouter.use('/infrawallet', authMiddleware, await infraWallet(infraWalletEnv)); - ... -} -``` - -### Backend Configuration - -#### Cloud Accounts - -Add cloud account credentials to `app-config.yaml`. -Here is an example of the configuration for AWS and Azure accounts: - -```yaml -backend: - infraWallet: - integrations: - azure: - - name: - subscriptionId: ... - tenantId: ... - clientId: ... - clientSecret: ... - - name: - subscriptionId: ... - tenantId: ... - clientId: ... - clientSecret: ... - aws: - - name: - accountId: '<12-digit_account_ID_as_string>' - assumedRoleName: ... - accessKeyId: ... - accessKeySecret: ... - - name: - accountId: '<12-digit_account_ID_as_string>' - assumedRoleName: ... - accessKeyId: ... - accessKeySecret: ... -``` - -#### Setting up plugin permissions - -You configure permissions for specific infrawallet actions by importing the supported set of permissions from the [infrawallet-common](../infrawallet-common/README.md) package along with the custom rules/conditions provided here to incorporate into your [permission policy](https://backstage.io/docs/permissions/writing-a-policy). - -This package also exports a DefaultInfraWalletPermissionPolicy which contains a recommended default permissions policy you can apply as a "sub-policy" in your app: - -```diff -# packages/backend/src/plugins/permission.ts - -+import { DefaultInfraWalletPermissionPolicy, isInfraWalletPermission } from '@electrolux-oss/plugin-infrawallet-backend'; -... -class BackstagePermissionPolicy implements PermissionPolicy { -+ private playlistPermissionPolicy = new DefaultInfraWalletPermissionPolicy(); - - async handle( - request: PolicyQuery, - user?: BackstageIdentityResponse, - ): Promise { -+ if (isInfraWalletPermission(request.permission)) { -+ return this.playlistPermissionPolicy.handle(request, user); -+ } - ... - } -} - -export default async function createPlugin(env: PluginEnvironment): Promise { - return await createRouter({ - config: env.config, - logger: env.logger, - discovery: env.discovery, - policy: new BackstagePermissionPolicy(), - ... -``` \ No newline at end of file +You can also serve the plugin in isolation by running `yarn start` in the plugin directory. +This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads. +It is only meant for local development, and the setup for it can be found inside the [/dev](/dev) directory. \ No newline at end of file diff --git a/plugins/infrawallet/src/components/ErrorsAlertComponent/UnauthorizedErrorPage.tsx b/plugins/infrawallet/src/components/ErrorsAlertComponent/UnauthorizedErrorPage.tsx deleted file mode 100644 index 123d2b7..0000000 --- a/plugins/infrawallet/src/components/ErrorsAlertComponent/UnauthorizedErrorPage.tsx +++ /dev/null @@ -1,73 +0,0 @@ -import Grid from '@material-ui/core/Grid'; -import { makeStyles } from '@material-ui/core/styles'; -import Typography from '@material-ui/core/Typography'; -import React from 'react'; -import { useNavigate } from 'react-router-dom'; -import { Link, useSupportConfig } from '@backstage/core-components'; - -interface IErrorPageProps { - supportUrl?: string; -} - -/** @public */ -export type ErrorPageClassKey = 'container' | 'title' | 'subtitle'; - -const useStyles = makeStyles( - theme => ({ - container: { - padding: theme.spacing(8), - [theme.breakpoints.down('xs')]: { - padding: theme.spacing(2), - }, - }, - title: { - paddingBottom: theme.spacing(5), - [theme.breakpoints.down('xs')]: { - paddingBottom: theme.spacing(4), - fontSize: theme.typography.h3.fontSize, - }, - }, - subtitle: { - color: theme.palette.textSubtle, - }, - }), - { name: 'BackstageErrorPage' }, -); - -/** - * Error page with status and description - * - * @public - * - */ -export function UnauthorizedErrorPage(props: IErrorPageProps) { - const { - supportUrl, - } = props; - const classes = useStyles(); - const navigate = useNavigate(); - const support = useSupportConfig(); - - return ( - - - - Ops! Parece que você não tem autorização neste momento. - -
- - navigate(-1)}> - Volte - - ... ou por favor{' '} - contate o suporte se você - acredita que isso seja um problema. - -
-
- ); -} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 0583f1f..073f2d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2960,6 +2960,82 @@ __metadata: languageName: node linkType: hard +"@backstage/backend-common@npm:^0.24.0": + version: 0.24.0 + resolution: "@backstage/backend-common@npm:0.24.0" + dependencies: + "@aws-sdk/abort-controller": ^3.347.0 + "@aws-sdk/client-codecommit": ^3.350.0 + "@aws-sdk/client-s3": ^3.350.0 + "@aws-sdk/credential-providers": ^3.350.0 + "@aws-sdk/types": ^3.347.0 + "@backstage/backend-dev-utils": ^0.1.5 + "@backstage/backend-plugin-api": ^0.8.0 + "@backstage/cli-common": ^0.1.14 + "@backstage/config": ^1.2.0 + "@backstage/config-loader": ^1.9.0 + "@backstage/errors": ^1.2.4 + "@backstage/integration": ^1.14.0 + "@backstage/integration-aws-node": ^0.1.12 + "@backstage/plugin-auth-node": ^0.5.0 + "@backstage/types": ^1.1.1 + "@google-cloud/storage": ^7.0.0 + "@keyv/memcache": ^1.3.5 + "@keyv/redis": ^2.5.3 + "@kubernetes/client-node": 0.20.0 + "@manypkg/get-packages": ^1.1.3 + "@octokit/rest": ^19.0.3 + "@types/cors": ^2.8.6 + "@types/dockerode": ^3.3.0 + "@types/express": ^4.17.6 + "@types/luxon": ^3.0.0 + "@types/webpack-env": ^1.15.2 + archiver: ^6.0.0 + base64-stream: ^1.0.0 + compression: ^1.7.4 + concat-stream: ^2.0.0 + cors: ^2.8.5 + dockerode: ^4.0.0 + express: ^4.17.1 + express-promise-router: ^4.1.0 + fs-extra: ^11.2.0 + git-url-parse: ^14.0.0 + helmet: ^6.0.0 + isomorphic-git: ^1.23.0 + jose: ^5.0.0 + keyv: ^4.5.2 + knex: ^3.0.0 + lodash: ^4.17.21 + logform: ^2.3.2 + luxon: ^3.0.0 + minimatch: ^9.0.0 + minimist: ^1.2.5 + morgan: ^1.10.0 + mysql2: ^3.0.0 + node-fetch: ^2.7.0 + node-forge: ^1.3.1 + p-limit: ^3.1.0 + path-to-regexp: ^6.2.1 + pg: ^8.11.3 + raw-body: ^2.4.1 + selfsigned: ^2.0.0 + stoppable: ^1.1.0 + tar: ^6.1.12 + triple-beam: ^1.4.1 + uuid: ^9.0.0 + winston: ^3.2.1 + winston-transport: ^4.5.0 + yauzl: ^3.0.0 + yn: ^4.0.0 + peerDependencies: + pg-connection-string: ^2.3.0 + peerDependenciesMeta: + pg-connection-string: + optional: true + checksum: a9008cff4aa07b3a9f5343b4c91da8cabe00c5067635445e92f60bf549af07f5fcef8a267fe8639e41928044ef4de516020856ed2531a75e0bfdb36d9337e486 + languageName: node + linkType: hard + "@backstage/backend-defaults@npm:^0.2.18": version: 0.2.18 resolution: "@backstage/backend-defaults@npm:0.2.18" @@ -2978,6 +3054,13 @@ __metadata: languageName: node linkType: hard +"@backstage/backend-dev-utils@npm:^0.1.5": + version: 0.1.5 + resolution: "@backstage/backend-dev-utils@npm:0.1.5" + checksum: 7c7eced8cc6fe88b6b54d7b9f04953dbfd07846772368a0b269d4e75da30133b61e4fe29782c0dc0aa547234d75ff60a985f378f92911680a9172fa8f2820e5b + languageName: node + linkType: hard + "@backstage/backend-openapi-utils@npm:^0.1.11": version: 0.1.11 resolution: "@backstage/backend-openapi-utils@npm:0.1.11" @@ -3015,6 +3098,25 @@ __metadata: languageName: node linkType: hard +"@backstage/backend-plugin-api@npm:^0.8.0": + version: 0.8.0 + resolution: "@backstage/backend-plugin-api@npm:0.8.0" + dependencies: + "@backstage/cli-common": ^0.1.14 + "@backstage/config": ^1.2.0 + "@backstage/errors": ^1.2.4 + "@backstage/plugin-auth-node": ^0.5.0 + "@backstage/plugin-permission-common": ^0.8.1 + "@backstage/types": ^1.1.1 + "@types/express": ^4.17.6 + "@types/luxon": ^3.0.0 + express: ^4.17.1 + knex: ^3.0.0 + luxon: ^3.0.0 + checksum: d61c0eccf172b804c216af337f67739bcc7b2e3bd7ec2b844665c41345f6c8390f699e15f4a263a81eb2ad7abbcda58f402c977ffda7063e8f333b8d7ce0f593 + languageName: node + linkType: hard + "@backstage/backend-tasks@npm:^0.5.23": version: 0.5.23 resolution: "@backstage/backend-tasks@npm:0.5.23" @@ -3048,6 +3150,18 @@ __metadata: languageName: node linkType: hard +"@backstage/catalog-client@npm:^1.6.6": + version: 1.6.6 + resolution: "@backstage/catalog-client@npm:1.6.6" + dependencies: + "@backstage/catalog-model": ^1.6.0 + "@backstage/errors": ^1.2.4 + cross-fetch: ^4.0.0 + uri-template: ^2.0.0 + checksum: 10a859979a6ec3d9bcca519ace01ca371517e56bd54a90e0d667b4ef90bee54b09495238974b4040d7dc75f8cacf0d212900b40fe6738d484ff57a739e3eec4b + languageName: node + linkType: hard + "@backstage/catalog-model@npm:^1.5.0": version: 1.5.0 resolution: "@backstage/catalog-model@npm:1.5.0" @@ -3060,6 +3174,18 @@ __metadata: languageName: node linkType: hard +"@backstage/catalog-model@npm:^1.6.0": + version: 1.6.0 + resolution: "@backstage/catalog-model@npm:1.6.0" + dependencies: + "@backstage/errors": ^1.2.4 + "@backstage/types": ^1.1.1 + ajv: ^8.10.0 + lodash: ^4.17.21 + checksum: b3bac3578a43b4d3f9e2fcd90396b5043f8c1e46f5308c5204b7973c79e76e465b3804edc985355cb4b3f669d065e1522b25bc6ee38567b5c74341b2d115ecf0 + languageName: node + linkType: hard + "@backstage/cli-common@npm:^0.1.13": version: 0.1.13 resolution: "@backstage/cli-common@npm:0.1.13" @@ -3067,6 +3193,13 @@ __metadata: languageName: node linkType: hard +"@backstage/cli-common@npm:^0.1.14": + version: 0.1.14 + resolution: "@backstage/cli-common@npm:0.1.14" + checksum: 6c5031ae31f08b405e5e59105d98e43dc6d865f960e5d016067267ecabccd5a892ab65d59d5b9e31850dccddb9eb29e06bf360ab6be8f7949991561ddb163fcb + languageName: node + linkType: hard + "@backstage/cli-node@npm:^0.2.5": version: 0.2.5 resolution: "@backstage/cli-node@npm:0.2.5" @@ -3242,6 +3375,30 @@ __metadata: languageName: node linkType: hard +"@backstage/config-loader@npm:^1.9.0": + version: 1.9.0 + resolution: "@backstage/config-loader@npm:1.9.0" + dependencies: + "@backstage/cli-common": ^0.1.14 + "@backstage/config": ^1.2.0 + "@backstage/errors": ^1.2.4 + "@backstage/types": ^1.1.1 + "@types/json-schema": ^7.0.6 + ajv: ^8.10.0 + chokidar: ^3.5.2 + fs-extra: ^11.2.0 + json-schema: ^0.4.0 + json-schema-merge-allof: ^0.8.1 + json-schema-traverse: ^1.0.0 + lodash: ^4.17.21 + minimist: ^1.2.5 + node-fetch: ^2.7.0 + typescript-json-schema: ^0.63.0 + yaml: ^2.0.0 + checksum: a7881957eed96b2fd707415914800fc72de8e0a067259d0e25ae9d89008abc405c8c9bece528a07e1c33ac18efd919f4bf10d7624b0a454c8a491785a539bc7f + languageName: node + linkType: hard + "@backstage/config@npm:^1.2.0": version: 1.2.0 resolution: "@backstage/config@npm:1.2.0" @@ -3359,6 +3516,24 @@ __metadata: languageName: node linkType: hard +"@backstage/core-plugin-api@npm:^1.9.3": + version: 1.9.3 + resolution: "@backstage/core-plugin-api@npm:1.9.3" + dependencies: + "@backstage/config": ^1.2.0 + "@backstage/errors": ^1.2.4 + "@backstage/types": ^1.1.1 + "@backstage/version-bridge": ^1.0.8 + "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 + history: ^5.0.0 + peerDependencies: + react: ^16.13.1 || ^17.0.0 || ^18.0.0 + react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 + react-router-dom: 6.0.0-beta.0 || ^6.3.0 + checksum: 490295c126eff7f7f3107565097bc3dbdda5b72e52301a6c47fab91429961aff5757ba91208cbe12c37f90d429703919ab6067a30c394249ec792d900308d309 + languageName: node + linkType: hard + "@backstage/dev-utils@npm:^1.0.32": version: 1.0.32 resolution: "@backstage/dev-utils@npm:1.0.32" @@ -3488,6 +3663,23 @@ __metadata: languageName: node linkType: hard +"@backstage/integration@npm:^1.14.0": + version: 1.14.0 + resolution: "@backstage/integration@npm:1.14.0" + dependencies: + "@azure/identity": ^4.0.0 + "@backstage/config": ^1.2.0 + "@backstage/errors": ^1.2.4 + "@octokit/auth-app": ^4.0.0 + "@octokit/rest": ^19.0.3 + cross-fetch: ^4.0.0 + git-url-parse: ^14.0.0 + lodash: ^4.17.21 + luxon: ^3.0.0 + checksum: 3dc2272eda0205e880469aa2a68f390ba9f7a36b5ca41bc2bcb693c46fa7f99e057748c9aab1f88637dda3d8e2dec6b82ffab2aea6d3f12781c563502f0ed4d1 + languageName: node + linkType: hard + "@backstage/plugin-api-docs@npm:^0.11.5": version: 0.11.5 resolution: "@backstage/plugin-api-docs@npm:0.11.5" @@ -3852,6 +4044,31 @@ __metadata: languageName: node linkType: hard +"@backstage/plugin-auth-node@npm:^0.5.0": + version: 0.5.0 + resolution: "@backstage/plugin-auth-node@npm:0.5.0" + dependencies: + "@backstage/backend-common": ^0.24.0 + "@backstage/backend-plugin-api": ^0.8.0 + "@backstage/catalog-client": ^1.6.6 + "@backstage/catalog-model": ^1.6.0 + "@backstage/config": ^1.2.0 + "@backstage/errors": ^1.2.4 + "@backstage/types": ^1.1.1 + "@types/express": "*" + "@types/passport": ^1.0.3 + express: ^4.17.1 + jose: ^5.0.0 + lodash: ^4.17.21 + node-fetch: ^2.7.0 + passport: ^0.7.0 + winston: ^3.2.1 + zod: ^3.22.4 + zod-to-json-schema: ^3.21.4 + checksum: efb2b07d4d778853438b7521c675c5152747aac07dcbd927b20b8335701c85e22b487a1fcd18e0e987ce42b0550b9712d09bf6c22b1d5c9f6b80e2a867903ec7 + languageName: node + linkType: hard + "@backstage/plugin-auth-react@npm:^0.1.2": version: 0.1.2 resolution: "@backstage/plugin-auth-react@npm:0.1.2" @@ -4177,6 +4394,21 @@ __metadata: languageName: node linkType: hard +"@backstage/plugin-permission-common@npm:^0.8.0, @backstage/plugin-permission-common@npm:^0.8.1": + version: 0.8.1 + resolution: "@backstage/plugin-permission-common@npm:0.8.1" + dependencies: + "@backstage/config": ^1.2.0 + "@backstage/errors": ^1.2.4 + "@backstage/types": ^1.1.1 + cross-fetch: ^4.0.0 + uuid: ^9.0.0 + zod: ^3.22.4 + zod-to-json-schema: ^3.20.4 + checksum: 00f71b998aecefcf413b335ef67897be2210f9cecb1f58bb28e466f68acd04276e3105f2e99ad242792dfd2902e4ae7ea023efb8cda92447aef92a10b83d87e5 + languageName: node + linkType: hard + "@backstage/plugin-permission-node@npm:^0.7.29": version: 0.7.29 resolution: "@backstage/plugin-permission-node@npm:0.7.29" @@ -4196,6 +4428,25 @@ __metadata: languageName: node linkType: hard +"@backstage/plugin-permission-node@npm:^0.8.0": + version: 0.8.1 + resolution: "@backstage/plugin-permission-node@npm:0.8.1" + dependencies: + "@backstage/backend-common": ^0.24.0 + "@backstage/backend-plugin-api": ^0.8.0 + "@backstage/config": ^1.2.0 + "@backstage/errors": ^1.2.4 + "@backstage/plugin-auth-node": ^0.5.0 + "@backstage/plugin-permission-common": ^0.8.1 + "@types/express": ^4.17.6 + express: ^4.17.1 + express-promise-router: ^4.1.0 + zod: ^3.22.4 + zod-to-json-schema: ^3.20.4 + checksum: 57e9edf46fb4ea64d8597ea88dfbde452caf6d7f6120583ac316d4daa860b34c4b4e29f48f2948aa4c0e4d32779b2f0daf64fbe945ac78c4dd113721bf340a76 + languageName: node + linkType: hard + "@backstage/plugin-permission-react@npm:^0.4.22": version: 0.4.22 resolution: "@backstage/plugin-permission-react@npm:0.4.22" @@ -4213,6 +4464,23 @@ __metadata: languageName: node linkType: hard +"@backstage/plugin-permission-react@npm:^0.4.24": + version: 0.4.25 + resolution: "@backstage/plugin-permission-react@npm:0.4.25" + dependencies: + "@backstage/config": ^1.2.0 + "@backstage/core-plugin-api": ^1.9.3 + "@backstage/plugin-permission-common": ^0.8.1 + "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 + swr: ^2.0.0 + peerDependencies: + react: ^16.13.1 || ^17.0.0 || ^18.0.0 + react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 + react-router-dom: 6.0.0-beta.0 || ^6.3.0 + checksum: 162e2d12ec6dfe2e54097972944ca4f13c121d5f077f80feeab1279dbf7d741b531ce8b2000628923f599c2fa2b08610fa6ebadd99741e1d4bfe70b3511a9d89 + languageName: node + linkType: hard + "@backstage/plugin-proxy-backend@npm:^0.4.16": version: 0.4.16 resolution: "@backstage/plugin-proxy-backend@npm:0.4.16" @@ -5235,8 +5503,11 @@ __metadata: "@backstage/config": ^1.2.0 "@backstage/plugin-auth-backend": ^0.22.5 "@backstage/plugin-auth-backend-module-guest-provider": ^0.1.4 + "@backstage/plugin-permission-common": ^0.8.0 + "@backstage/plugin-permission-node": ^0.8.0 "@backstage/types": ^1.1.1 "@datadog/datadog-api-client": ^1.26.0 + "@electrolux-oss/plugin-infrawallet-common": "workspace:^" "@google-cloud/bigquery": 7.7.1 "@types/express": "*" "@types/supertest": ^2.0.8 @@ -5252,6 +5523,30 @@ __metadata: languageName: unknown linkType: soft +"@electrolux-oss/plugin-infrawallet-common@workspace:^, @electrolux-oss/plugin-infrawallet-common@workspace:plugins/infrawallet-common": + version: 0.0.0-use.local + resolution: "@electrolux-oss/plugin-infrawallet-common@workspace:plugins/infrawallet-common" + dependencies: + "@backstage/cli": ^0.26.5 + "@backstage/core-app-api": ^1.12.5 + "@backstage/core-components": ^0.14.7 + "@backstage/core-plugin-api": ^1.9.2 + "@backstage/dev-utils": ^1.0.32 + "@backstage/test-utils": ^1.5.5 + "@backstage/theme": ^0.5.4 + "@material-ui/core": ^4.9.13 + "@material-ui/icons": ^4.9.1 + "@material-ui/lab": ^4.0.0-alpha.61 + "@testing-library/jest-dom": ^6.0.0 + "@testing-library/react": ^14.0.0 + "@testing-library/user-event": ^14.0.0 + msw: ^1.0.0 + react-use: ^17.2.4 + peerDependencies: + react: ^16.13.1 || ^17.0.0 || ^18.0.0 + languageName: unknown + linkType: soft + "@electrolux-oss/plugin-infrawallet@workspace:^, @electrolux-oss/plugin-infrawallet@workspace:plugins/infrawallet": version: 0.0.0-use.local resolution: "@electrolux-oss/plugin-infrawallet@workspace:plugins/infrawallet" @@ -5262,8 +5557,10 @@ __metadata: "@backstage/core-components": ^0.14.7 "@backstage/core-plugin-api": ^1.9.2 "@backstage/dev-utils": ^1.0.32 + "@backstage/plugin-permission-react": ^0.4.24 "@backstage/test-utils": ^1.5.5 "@backstage/theme": ^0.5.4 + "@electrolux-oss/plugin-infrawallet-common": "workspace:^" "@material-ui/core": ^4.9.13 "@material-ui/icons": ^4.9.1 "@material-ui/lab": ^4.0.0-alpha.61 @@ -25341,7 +25638,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.6.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.12, node-fetch@npm:^2.6.7, node-fetch@npm:^2.6.9": +"node-fetch@npm:^2.6.0, node-fetch@npm:^2.6.1, node-fetch@npm:^2.6.12, node-fetch@npm:^2.6.7, node-fetch@npm:^2.6.9, node-fetch@npm:^2.7.0": version: 2.7.0 resolution: "node-fetch@npm:2.7.0" dependencies: @@ -31877,7 +32174,7 @@ __metadata: languageName: node linkType: hard -"triple-beam@npm:^1.3.0": +"triple-beam@npm:^1.3.0, triple-beam@npm:^1.4.1": version: 1.4.1 resolution: "triple-beam@npm:1.4.1" checksum: 2e881a3e8e076b6f2b85b9ec9dd4a900d3f5016e6d21183ed98e78f9abcc0149e7d54d79a3f432b23afde46b0885bdcdcbff789f39bc75de796316961ec07f61 From bae5e8b978b83dec03117533807db7228c01561e Mon Sep 17 00:00:00 2001 From: Henrique Oliveira Date: Tue, 20 Aug 2024 08:31:54 -0300 Subject: [PATCH 3/8] refactor: code formatting --- .../backend/src/permissionPolicyModule.ts | 29 +++++-------------- plugins/infrawallet-backend/README.md | 2 +- .../infrawallet-backend/src/service/router.ts | 28 +++++++++--------- plugins/infrawallet-common/src/index.ts | 2 +- plugins/infrawallet-common/src/permissions.ts | 4 +-- 5 files changed, 25 insertions(+), 40 deletions(-) diff --git a/packages/backend/src/permissionPolicyModule.ts b/packages/backend/src/permissionPolicyModule.ts index d28fa33..15735fc 100644 --- a/packages/backend/src/permissionPolicyModule.ts +++ b/packages/backend/src/permissionPolicyModule.ts @@ -1,37 +1,22 @@ import { createBackendModule } from '@backstage/backend-plugin-api'; import { BackstageIdentityResponse } from '@backstage/plugin-auth-node'; -import { - AuthorizeResult, - isPermission, - PolicyDecision, -} from '@backstage/plugin-permission-common'; -import { - PermissionPolicy, - PolicyQuery, -} from '@backstage/plugin-permission-node'; +import { AuthorizeResult, isPermission, PolicyDecision } from '@backstage/plugin-permission-common'; +import { PermissionPolicy, PolicyQuery } from '@backstage/plugin-permission-node'; import { policyExtensionPoint } from '@backstage/plugin-permission-node/alpha'; -import { - infraWalletReportRead, - infraWalletMetricSettingsDelete -} from '@electrolux-oss/plugin-infrawallet-common'; +import { infraWalletReportRead, infraWalletMetricSettingsDelete } from '@electrolux-oss/plugin-infrawallet-common'; class DefaultPermissionPolicy implements PermissionPolicy { - - async handle( - request: PolicyQuery, - _user?: BackstageIdentityResponse, - ): Promise { - + async handle(request: PolicyQuery, _user?: BackstageIdentityResponse): Promise { // if you do not configure any infrawallet permissions, the default behavior is allow. // Example deny read report if (isPermission(request.permission, infraWalletReportRead)) { - return { result: AuthorizeResult.DENY }; + return { result: AuthorizeResult.DENY }; } // Example deny delete metric settings if (isPermission(request.permission, infraWalletMetricSettingsDelete)) { - return { result: AuthorizeResult.DENY }; + return { result: AuthorizeResult.DENY }; } return { result: AuthorizeResult.ALLOW }; @@ -51,4 +36,4 @@ export default createBackendModule({ }, }); }, -}); \ No newline at end of file +}); diff --git a/plugins/infrawallet-backend/README.md b/plugins/infrawallet-backend/README.md index 009c6f2..3330c21 100644 --- a/plugins/infrawallet-backend/README.md +++ b/plugins/infrawallet-backend/README.md @@ -11,4 +11,4 @@ start` in the root directory, and then navigating to [/infraWalletPlugin/health] You can also serve the plugin in isolation by running `yarn start` in the plugin directory. This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads. -It is only meant for local development, and the setup for it can be found inside the [/dev](/dev) directory. \ No newline at end of file +It is only meant for local development, and the setup for it can be found inside the [/dev](/dev) directory. diff --git a/plugins/infrawallet-backend/src/service/router.ts b/plugins/infrawallet-backend/src/service/router.ts index 19b682e..d2c6c54 100644 --- a/plugins/infrawallet-backend/src/service/router.ts +++ b/plugins/infrawallet-backend/src/service/router.ts @@ -1,9 +1,15 @@ -import { - createLegacyAuthAdapters, - errorHandler, -} from '@backstage/backend-common'; +import { createLegacyAuthAdapters, errorHandler } from '@backstage/backend-common'; import { NotAllowedError } from '@backstage/errors'; -import { AuthService, CacheService, DatabaseService, DiscoveryService, HttpAuthService, LoggerService, PermissionsService, resolvePackagePath } from '@backstage/backend-plugin-api'; +import { + AuthService, + CacheService, + DatabaseService, + DiscoveryService, + HttpAuthService, + LoggerService, + PermissionsService, + resolvePackagePath, +} from '@backstage/backend-plugin-api'; import { Config } from '@backstage/config'; import express from 'express'; import Router from 'express-promise-router'; @@ -25,7 +31,6 @@ import { import { permissions } from '@electrolux-oss/plugin-infrawallet-common'; import { createPermissionIntegrationRouter } from '@backstage/plugin-permission-node'; - export interface RouterOptions { logger: LoggerService; config: Config; @@ -53,7 +58,7 @@ async function setUpDatabase(database: DatabaseService) { } export async function createRouter(options: RouterOptions): Promise { - const { logger, config, cache, database, permissions: permissionEvaluator, } = options; + const { logger, config, cache, database, permissions: permissionEvaluator } = options; const { httpAuth } = createLegacyAuthAdapters(options); const evaluateRequestPermission = async ( @@ -65,13 +70,8 @@ export async function createRouter(options: RouterOptions): Promise Date: Tue, 20 Aug 2024 10:21:01 -0300 Subject: [PATCH 4/8] fix: yarn lock --- yarn.lock | 130 ++++-------------------------------------------------- 1 file changed, 8 insertions(+), 122 deletions(-) diff --git a/yarn.lock b/yarn.lock index 073f2d0..f11b8c1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3047,14 +3047,7 @@ __metadata: languageName: node linkType: hard -"@backstage/backend-dev-utils@npm:^0.1.4": - version: 0.1.4 - resolution: "@backstage/backend-dev-utils@npm:0.1.4" - checksum: 9252b5350abd38a0f99b3bbd4ca3932d14d3c5bab01b89b53198214e003826e2ca65c5b075871d908a3714715b75163ce1d6ea5f1ab8e4e960dd5774701c743f - languageName: node - linkType: hard - -"@backstage/backend-dev-utils@npm:^0.1.5": +"@backstage/backend-dev-utils@npm:^0.1.4, @backstage/backend-dev-utils@npm:^0.1.5": version: 0.1.5 resolution: "@backstage/backend-dev-utils@npm:0.1.5" checksum: 7c7eced8cc6fe88b6b54d7b9f04953dbfd07846772368a0b269d4e75da30133b61e4fe29782c0dc0aa547234d75ff60a985f378f92911680a9172fa8f2820e5b @@ -3138,19 +3131,7 @@ __metadata: languageName: node linkType: hard -"@backstage/catalog-client@npm:^1.6.5": - version: 1.6.5 - resolution: "@backstage/catalog-client@npm:1.6.5" - dependencies: - "@backstage/catalog-model": ^1.5.0 - "@backstage/errors": ^1.2.4 - cross-fetch: ^4.0.0 - uri-template: ^2.0.0 - checksum: afb84382c7a8e9124090d56ec4a3a1e8ab7dfda33d337851412b9ee4fca0e85fb7263729d6eb4efa8c3198343ed03843ef468492f74401951542908534febfad - languageName: node - linkType: hard - -"@backstage/catalog-client@npm:^1.6.6": +"@backstage/catalog-client@npm:^1.6.5, @backstage/catalog-client@npm:^1.6.6": version: 1.6.6 resolution: "@backstage/catalog-client@npm:1.6.6" dependencies: @@ -3162,19 +3143,7 @@ __metadata: languageName: node linkType: hard -"@backstage/catalog-model@npm:^1.5.0": - version: 1.5.0 - resolution: "@backstage/catalog-model@npm:1.5.0" - dependencies: - "@backstage/errors": ^1.2.4 - "@backstage/types": ^1.1.1 - ajv: ^8.10.0 - lodash: ^4.17.21 - checksum: 545873625afbb25a2142af9f8c701547b448fe8b822c9ed699c86a9c385571014115a2c3105a3dca2bc2ac63b837b093dba39a973c2f9e23521d427a0328ba12 - languageName: node - linkType: hard - -"@backstage/catalog-model@npm:^1.6.0": +"@backstage/catalog-model@npm:^1.5.0, @backstage/catalog-model@npm:^1.6.0": version: 1.6.0 resolution: "@backstage/catalog-model@npm:1.6.0" dependencies: @@ -3186,14 +3155,7 @@ __metadata: languageName: node linkType: hard -"@backstage/cli-common@npm:^0.1.13": - version: 0.1.13 - resolution: "@backstage/cli-common@npm:0.1.13" - checksum: 0c7dd2e888012f2d419f0a07c637ccad9d622b6e69c6454bc16a0e6621fac8bac9672cfd49636e31c6abb3ef7c084e428223c45bd8a02751e79776b33a375881 - languageName: node - linkType: hard - -"@backstage/cli-common@npm:^0.1.14": +"@backstage/cli-common@npm:^0.1.13, @backstage/cli-common@npm:^0.1.14": version: 0.1.14 resolution: "@backstage/cli-common@npm:0.1.14" checksum: 6c5031ae31f08b405e5e59105d98e43dc6d865f960e5d016067267ecabccd5a892ab65d59d5b9e31850dccddb9eb29e06bf360ab6be8f7949991561ddb163fcb @@ -3351,31 +3313,7 @@ __metadata: languageName: node linkType: hard -"@backstage/config-loader@npm:^1.8.0": - version: 1.8.0 - resolution: "@backstage/config-loader@npm:1.8.0" - dependencies: - "@backstage/cli-common": ^0.1.13 - "@backstage/config": ^1.2.0 - "@backstage/errors": ^1.2.4 - "@backstage/types": ^1.1.1 - "@types/json-schema": ^7.0.6 - ajv: ^8.10.0 - chokidar: ^3.5.2 - fs-extra: ^11.2.0 - json-schema: ^0.4.0 - json-schema-merge-allof: ^0.8.1 - json-schema-traverse: ^1.0.0 - lodash: ^4.17.21 - minimist: ^1.2.5 - node-fetch: ^2.6.7 - typescript-json-schema: ^0.63.0 - yaml: ^2.0.0 - checksum: 7d90491c53320cb0545d02112368d3029552acc40788d8bc420fe16a80cd13c0928794e50a0cd49399446891b8a66c3d77164f5aea8f1a2cabfeb181c2b1bd98 - languageName: node - linkType: hard - -"@backstage/config-loader@npm:^1.9.0": +"@backstage/config-loader@npm:^1.8.0, @backstage/config-loader@npm:^1.9.0": version: 1.9.0 resolution: "@backstage/config-loader@npm:1.9.0" dependencies: @@ -3498,25 +3436,7 @@ __metadata: languageName: node linkType: hard -"@backstage/core-plugin-api@npm:^1.9.2": - version: 1.9.2 - resolution: "@backstage/core-plugin-api@npm:1.9.2" - dependencies: - "@backstage/config": ^1.2.0 - "@backstage/errors": ^1.2.4 - "@backstage/types": ^1.1.1 - "@backstage/version-bridge": ^1.0.8 - "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 - history: ^5.0.0 - peerDependencies: - react: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-router-dom: 6.0.0-beta.0 || ^6.3.0 - checksum: 2df505c14853b3b35b8644d66f3e58d235bc6ee7f7b81785ec163aa9f089fc03a6c03e3b191d001b247f19d97063e02e585d67661720a8b6a13ab67a2403c218 - languageName: node - linkType: hard - -"@backstage/core-plugin-api@npm:^1.9.3": +"@backstage/core-plugin-api@npm:^1.9.2, @backstage/core-plugin-api@npm:^1.9.3": version: 1.9.3 resolution: "@backstage/core-plugin-api@npm:1.9.3" dependencies: @@ -3646,24 +3566,7 @@ __metadata: languageName: node linkType: hard -"@backstage/integration@npm:^1.11.0": - version: 1.11.0 - resolution: "@backstage/integration@npm:1.11.0" - dependencies: - "@azure/identity": ^4.0.0 - "@backstage/config": ^1.2.0 - "@backstage/errors": ^1.2.4 - "@octokit/auth-app": ^4.0.0 - "@octokit/rest": ^19.0.3 - cross-fetch: ^4.0.0 - git-url-parse: ^14.0.0 - lodash: ^4.17.21 - luxon: ^3.0.0 - checksum: 57ea46e57da004cdab41e82f558105f78f84f65d58163e93363dc775d42ab29401d3a38390ace012bf388eec57350d432a415d8fed27e57419e21522044fcc33 - languageName: node - linkType: hard - -"@backstage/integration@npm:^1.14.0": +"@backstage/integration@npm:^1.11.0, @backstage/integration@npm:^1.14.0": version: 1.14.0 resolution: "@backstage/integration@npm:1.14.0" dependencies: @@ -4447,24 +4350,7 @@ __metadata: languageName: node linkType: hard -"@backstage/plugin-permission-react@npm:^0.4.22": - version: 0.4.22 - resolution: "@backstage/plugin-permission-react@npm:0.4.22" - dependencies: - "@backstage/config": ^1.2.0 - "@backstage/core-plugin-api": ^1.9.2 - "@backstage/plugin-permission-common": ^0.7.13 - "@types/react": ^16.13.1 || ^17.0.0 || ^18.0.0 - swr: ^2.0.0 - peerDependencies: - react: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-dom: ^16.13.1 || ^17.0.0 || ^18.0.0 - react-router-dom: 6.0.0-beta.0 || ^6.3.0 - checksum: c91ad5a336358ae3a2e6030e7ea7a8584735544a14aa6ada061ca0c01ee32b2e16bd2fe24c9327cbdb959eec185bac045b1211b0a03a5c9d45b350f0a6c031ca - languageName: node - linkType: hard - -"@backstage/plugin-permission-react@npm:^0.4.24": +"@backstage/plugin-permission-react@npm:^0.4.22, @backstage/plugin-permission-react@npm:^0.4.24": version: 0.4.25 resolution: "@backstage/plugin-permission-react@npm:0.4.25" dependencies: From aa86c559e79a26e2479888a5863103d613339025 Mon Sep 17 00:00:00 2001 From: Henrique Oliveira Date: Tue, 20 Aug 2024 11:35:21 -0300 Subject: [PATCH 5/8] fix: deps --- packages/backend/src/index.ts | 1 - plugins/infrawallet-backend/package.json | 2 + plugins/infrawallet-common/package.json | 20 +- yarn.lock | 908 ++++++++++++++++++++--- 4 files changed, 820 insertions(+), 111 deletions(-) diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index 860fa63..9a85017 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -7,7 +7,6 @@ */ import { createBackend } from '@backstage/backend-defaults'; -import { legacyPlugin } from '@backstage/backend-common'; const backend = createBackend(); diff --git a/plugins/infrawallet-backend/package.json b/plugins/infrawallet-backend/package.json index fc9e6aa..3a928e4 100644 --- a/plugins/infrawallet-backend/package.json +++ b/plugins/infrawallet-backend/package.json @@ -50,11 +50,13 @@ "@electrolux-oss/plugin-infrawallet-common": "workspace:^", "@google-cloud/bigquery": "7.7.1", "@types/express": "*", + "@types/pg-format": "^1.0.5", "express": "^4.17.1", "express-promise-router": "^4.1.0", "lodash": "^4.17.21", "moment": "2.29.4", "node-fetch": "^2.6.7", + "pg-format": "^1.0.4", "winston": "^3.2.1", "yn": "^4.0.0" }, diff --git a/plugins/infrawallet-common/package.json b/plugins/infrawallet-common/package.json index 9c34a46..0c88067 100644 --- a/plugins/infrawallet-common/package.json +++ b/plugins/infrawallet-common/package.json @@ -29,26 +29,10 @@ "postpack": "backstage-cli package postpack" }, "dependencies": { - "@backstage/core-components": "^0.14.7", - "@backstage/core-plugin-api": "^1.9.2", - "@backstage/theme": "^0.5.4", - "@material-ui/core": "^4.9.13", - "@material-ui/icons": "^4.9.1", - "@material-ui/lab": "^4.0.0-alpha.61", - "react-use": "^17.2.4" - }, - "peerDependencies": { - "react": "^16.13.1 || ^17.0.0 || ^18.0.0" + "@backstage/plugin-permission-common": "^0.8.0" }, "devDependencies": { - "@backstage/cli": "^0.26.5", - "@backstage/core-app-api": "^1.12.5", - "@backstage/dev-utils": "^1.0.32", - "@backstage/test-utils": "^1.5.5", - "@testing-library/jest-dom": "^6.0.0", - "@testing-library/react": "^14.0.0", - "@testing-library/user-event": "^14.0.0", - "msw": "^1.0.0" + "@backstage/cli": "^0.26.11" }, "files": [ "dist" diff --git a/yarn.lock b/yarn.lock index f11b8c1..e38d3c5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3162,37 +3162,38 @@ __metadata: languageName: node linkType: hard -"@backstage/cli-node@npm:^0.2.5": - version: 0.2.5 - resolution: "@backstage/cli-node@npm:0.2.5" +"@backstage/cli-node@npm:^0.2.5, @backstage/cli-node@npm:^0.2.7": + version: 0.2.7 + resolution: "@backstage/cli-node@npm:0.2.7" dependencies: - "@backstage/cli-common": ^0.1.13 + "@backstage/cli-common": ^0.1.14 "@backstage/errors": ^1.2.4 "@backstage/types": ^1.1.1 "@manypkg/get-packages": ^1.1.3 - "@yarnpkg/parsers": ^3.0.0-rc.4 + "@yarnpkg/parsers": ^3.0.0 fs-extra: ^11.2.0 semver: ^7.5.3 zod: ^3.22.4 - checksum: 4007377a0c9f9258b3ba1aa8006aa6a6810e794a30ff1bf83a06b6a374fd4d27e1d3632de3a41b9f65eb268517147e792d25a21b8a01dbbbfcfd78fc005f86c4 + checksum: 7f605c885c6073074f179df6cd47041cdb7b736557b11c2298165a55ab8b4d2028a0c85335f5cd655ab5d6570a695c2bcea83e4c79ca636eedc309fcc24f1d84 languageName: node linkType: hard -"@backstage/cli@npm:^0.26.5": - version: 0.26.5 - resolution: "@backstage/cli@npm:0.26.5" +"@backstage/cli@npm:^0.26.11, @backstage/cli@npm:^0.26.5": + version: 0.26.11 + resolution: "@backstage/cli@npm:0.26.11" dependencies: "@backstage/catalog-model": ^1.5.0 - "@backstage/cli-common": ^0.1.13 - "@backstage/cli-node": ^0.2.5 + "@backstage/cli-common": ^0.1.14 + "@backstage/cli-node": ^0.2.7 "@backstage/config": ^1.2.0 - "@backstage/config-loader": ^1.8.0 + "@backstage/config-loader": ^1.8.1 "@backstage/errors": ^1.2.4 "@backstage/eslint-plugin": ^0.1.8 - "@backstage/integration": ^1.11.0 + "@backstage/integration": ^1.13.0 "@backstage/release-manifests": ^0.0.11 "@backstage/types": ^1.1.1 "@manypkg/get-packages": ^1.1.3 + "@module-federation/enhanced": ^0.1.19 "@octokit/graphql": ^5.0.0 "@octokit/graphql-schema": ^13.7.0 "@octokit/oauth-app": ^4.2.0 @@ -3219,7 +3220,7 @@ __metadata: "@typescript-eslint/eslint-plugin": ^6.12.0 "@typescript-eslint/parser": ^6.7.2 "@yarnpkg/lockfile": ^1.1.0 - "@yarnpkg/parsers": ^3.0.0-rc.4 + "@yarnpkg/parsers": ^3.0.0 bfj: ^8.0.0 buffer: ^6.0.3 chalk: ^4.0.0 @@ -3230,7 +3231,7 @@ __metadata: css-loader: ^6.5.1 ctrlc-windows: ^2.1.0 diff: ^5.0.0 - esbuild: ^0.20.0 + esbuild: ^0.21.0 esbuild-loader: ^4.0.0 eslint: ^8.6.0 eslint-config-prettier: ^9.0.0 @@ -3297,7 +3298,7 @@ __metadata: "@vitejs/plugin-react": ^4.0.4 vite: ^4.4.9 vite-plugin-html: ^3.2.0 - vite-plugin-node-polyfills: ^0.21.0 + vite-plugin-node-polyfills: ^0.22.0 peerDependenciesMeta: "@vitejs/plugin-react": optional: true @@ -3309,11 +3310,11 @@ __metadata: optional: true bin: backstage-cli: bin/backstage-cli - checksum: 9cf4ff219347becd11ed3060083fa42b6c11b98dcb05c6db5ae6527624cfa30304344968e245ccce855979c7926908ecf921a1e137fb68173b2aab025433f5ab + checksum: 328525101cfa824722e7bdace20dbdb8f7ef55a1eb3b7084f03394177db5f13fe3e49a4746d07ae5d7fbb9ee45f01f239bb19cf4f59f28bf5c8093c395caea0f languageName: node linkType: hard -"@backstage/config-loader@npm:^1.8.0, @backstage/config-loader@npm:^1.9.0": +"@backstage/config-loader@npm:^1.8.0, @backstage/config-loader@npm:^1.8.1, @backstage/config-loader@npm:^1.9.0": version: 1.9.0 resolution: "@backstage/config-loader@npm:1.9.0" dependencies: @@ -3566,7 +3567,7 @@ __metadata: languageName: node linkType: hard -"@backstage/integration@npm:^1.11.0, @backstage/integration@npm:^1.14.0": +"@backstage/integration@npm:^1.11.0, @backstage/integration@npm:^1.13.0, @backstage/integration@npm:^1.14.0": version: 1.14.0 resolution: "@backstage/integration@npm:1.14.0" dependencies: @@ -5396,6 +5397,7 @@ __metadata: "@electrolux-oss/plugin-infrawallet-common": "workspace:^" "@google-cloud/bigquery": 7.7.1 "@types/express": "*" + "@types/pg-format": ^1.0.5 "@types/supertest": ^2.0.8 express: ^4.17.1 express-promise-router: ^4.1.0 @@ -5403,6 +5405,7 @@ __metadata: moment: 2.29.4 msw: ^1.0.0 node-fetch: ^2.6.7 + pg-format: ^1.0.4 supertest: ^6.2.4 winston: ^3.2.1 yn: ^4.0.0 @@ -5413,23 +5416,8 @@ __metadata: version: 0.0.0-use.local resolution: "@electrolux-oss/plugin-infrawallet-common@workspace:plugins/infrawallet-common" dependencies: - "@backstage/cli": ^0.26.5 - "@backstage/core-app-api": ^1.12.5 - "@backstage/core-components": ^0.14.7 - "@backstage/core-plugin-api": ^1.9.2 - "@backstage/dev-utils": ^1.0.32 - "@backstage/test-utils": ^1.5.5 - "@backstage/theme": ^0.5.4 - "@material-ui/core": ^4.9.13 - "@material-ui/icons": ^4.9.1 - "@material-ui/lab": ^4.0.0-alpha.61 - "@testing-library/jest-dom": ^6.0.0 - "@testing-library/react": ^14.0.0 - "@testing-library/user-event": ^14.0.0 - msw: ^1.0.0 - react-use: ^17.2.4 - peerDependencies: - react: ^16.13.1 || ^17.0.0 || ^18.0.0 + "@backstage/cli": ^0.26.11 + "@backstage/plugin-permission-common": ^0.8.0 languageName: unknown linkType: soft @@ -5659,6 +5647,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/aix-ppc64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/aix-ppc64@npm:0.21.5" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/android-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/android-arm64@npm:0.20.2" @@ -5666,6 +5661,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-arm64@npm:0.21.5" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/android-arm@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/android-arm@npm:0.20.2" @@ -5673,6 +5675,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-arm@npm:0.21.5" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + "@esbuild/android-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/android-x64@npm:0.20.2" @@ -5680,6 +5689,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/android-x64@npm:0.21.5" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + "@esbuild/darwin-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/darwin-arm64@npm:0.20.2" @@ -5687,6 +5703,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/darwin-arm64@npm:0.21.5" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/darwin-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/darwin-x64@npm:0.20.2" @@ -5694,6 +5717,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/darwin-x64@npm:0.21.5" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@esbuild/freebsd-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/freebsd-arm64@npm:0.20.2" @@ -5701,6 +5731,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/freebsd-arm64@npm:0.21.5" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/freebsd-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/freebsd-x64@npm:0.20.2" @@ -5708,6 +5745,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/freebsd-x64@npm:0.21.5" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/linux-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-arm64@npm:0.20.2" @@ -5715,6 +5759,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-arm64@npm:0.21.5" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/linux-arm@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-arm@npm:0.20.2" @@ -5722,6 +5773,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-arm@npm:0.21.5" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + "@esbuild/linux-ia32@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-ia32@npm:0.20.2" @@ -5729,6 +5787,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ia32@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-ia32@npm:0.21.5" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/linux-loong64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-loong64@npm:0.20.2" @@ -5736,6 +5801,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-loong64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-loong64@npm:0.21.5" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + "@esbuild/linux-mips64el@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-mips64el@npm:0.20.2" @@ -5743,6 +5815,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-mips64el@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-mips64el@npm:0.21.5" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + "@esbuild/linux-ppc64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-ppc64@npm:0.20.2" @@ -5750,6 +5829,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ppc64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-ppc64@npm:0.21.5" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/linux-riscv64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-riscv64@npm:0.20.2" @@ -5757,6 +5843,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-riscv64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-riscv64@npm:0.21.5" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + "@esbuild/linux-s390x@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-s390x@npm:0.20.2" @@ -5764,6 +5857,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-s390x@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-s390x@npm:0.21.5" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + "@esbuild/linux-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/linux-x64@npm:0.20.2" @@ -5771,6 +5871,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/linux-x64@npm:0.21.5" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + "@esbuild/netbsd-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/netbsd-x64@npm:0.20.2" @@ -5778,6 +5885,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/netbsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/netbsd-x64@npm:0.21.5" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/openbsd-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/openbsd-x64@npm:0.20.2" @@ -5785,6 +5899,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/openbsd-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/openbsd-x64@npm:0.21.5" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/sunos-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/sunos-x64@npm:0.20.2" @@ -5792,6 +5913,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/sunos-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/sunos-x64@npm:0.21.5" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + "@esbuild/win32-arm64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/win32-arm64@npm:0.20.2" @@ -5799,6 +5927,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-arm64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-arm64@npm:0.21.5" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/win32-ia32@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/win32-ia32@npm:0.20.2" @@ -5806,6 +5941,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-ia32@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-ia32@npm:0.21.5" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/win32-x64@npm:0.20.2": version: 0.20.2 resolution: "@esbuild/win32-x64@npm:0.20.2" @@ -5813,6 +5955,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-x64@npm:0.21.5": + version: 0.21.5 + resolution: "@esbuild/win32-x64@npm:0.21.5" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@eslint-community/eslint-utils@npm:^4.2.0, @eslint-community/eslint-utils@npm:^4.4.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" @@ -7312,6 +7461,145 @@ __metadata: languageName: node linkType: hard +"@module-federation/dts-plugin@npm:0.1.21": + version: 0.1.21 + resolution: "@module-federation/dts-plugin@npm:0.1.21" + dependencies: + "@module-federation/managers": 0.1.21 + "@module-federation/sdk": 0.1.21 + "@module-federation/third-party-dts-extractor": 0.1.21 + adm-zip: ^0.5.10 + ansi-colors: ^4.1.3 + axios: ^1.6.7 + chalk: 3.0.0 + fs-extra: 9.1.0 + isomorphic-ws: 5.0.0 + koa: 2.11.0 + lodash.clonedeepwith: 4.5.0 + log4js: 6.9.1 + node-schedule: 2.1.1 + rambda: ^9.1.0 + ws: 8.17.0 + peerDependencies: + typescript: ^4.9.0 || ^5.0.0 + vue-tsc: ^1.0.24 + peerDependenciesMeta: + vue-tsc: + optional: true + checksum: ec4cd030a25617698754cbac2da5463f8942cdd0a64bdc95f6ff5fd29fff6b88cf3db90e53e6b260cd3593893fe6ee2d6e149d0a46698eb7f9cc19a9df26193d + languageName: node + linkType: hard + +"@module-federation/enhanced@npm:^0.1.19": + version: 0.1.21 + resolution: "@module-federation/enhanced@npm:0.1.21" + dependencies: + "@module-federation/dts-plugin": 0.1.21 + "@module-federation/managers": 0.1.21 + "@module-federation/manifest": 0.1.21 + "@module-federation/rspack": 0.1.21 + "@module-federation/runtime-tools": 0.1.21 + "@module-federation/sdk": 0.1.21 + upath: 2.0.1 + peerDependencies: + typescript: ^4.9.0 || ^5.0.0 + vue-tsc: ^1.0.24 + webpack: ^5.0.0 + peerDependenciesMeta: + typescript: + optional: true + vue-tsc: + optional: true + webpack: + optional: true + checksum: bc0ff541db1066b290b3ad9ab868437dc3d0754b9d06ab263f8fb7f54e08238eae9232a482a681dd6152e4a175578d65df9f27fe181fc8fb602d7cc1ae34807d + languageName: node + linkType: hard + +"@module-federation/managers@npm:0.1.21": + version: 0.1.21 + resolution: "@module-federation/managers@npm:0.1.21" + dependencies: + "@module-federation/sdk": 0.1.21 + find-pkg: 2.0.0 + fs-extra: 9.1.0 + checksum: 5f230d5795d86dfd68c404ee2b7a1264950c283a4b1c6f4ee9cc9579fabb413718dfbc1ff726b9c213f9d3223d944dd38dd9d04b700962e6398c3c3728d6323e + languageName: node + linkType: hard + +"@module-federation/manifest@npm:0.1.21": + version: 0.1.21 + resolution: "@module-federation/manifest@npm:0.1.21" + dependencies: + "@module-federation/dts-plugin": 0.1.21 + "@module-federation/managers": 0.1.21 + "@module-federation/sdk": 0.1.21 + chalk: 3.0.0 + find-pkg: 2.0.0 + checksum: cef2011875f14e853a355626ae1dbc8ae3b0714d31140e329b5dd71525782b08c2e1d6ca45276a563bb3c3b7f7c4e64a31f0698ef12606f05aa6da46e759f345 + languageName: node + linkType: hard + +"@module-federation/rspack@npm:0.1.21": + version: 0.1.21 + resolution: "@module-federation/rspack@npm:0.1.21" + dependencies: + "@module-federation/dts-plugin": 0.1.21 + "@module-federation/managers": 0.1.21 + "@module-federation/manifest": 0.1.21 + "@module-federation/runtime-tools": 0.1.21 + "@module-federation/sdk": 0.1.21 + checksum: 55516285e23f4ca7127afafb14af667defbe46dc3224f85d7e07edbc8937d7fac909dfebc2f9dd73120b99bbe5135372cf0fbbe282990d80e6953a60dfa4c93e + languageName: node + linkType: hard + +"@module-federation/runtime-tools@npm:0.1.21": + version: 0.1.21 + resolution: "@module-federation/runtime-tools@npm:0.1.21" + dependencies: + "@module-federation/runtime": 0.1.21 + "@module-federation/webpack-bundler-runtime": 0.1.21 + checksum: 628c0c4834093520f9c71481d587c9e18163f82e481b05b1900f04e2d5da4abb69af6d814ac5cd1951057b28d73f3adeb1cee7cd83628305b10cc7988405fbc5 + languageName: node + linkType: hard + +"@module-federation/runtime@npm:0.1.21": + version: 0.1.21 + resolution: "@module-federation/runtime@npm:0.1.21" + dependencies: + "@module-federation/sdk": 0.1.21 + checksum: ce4de8515b54f1cd07a3c7c4cbd35fea163294b9fb24be10827872f3ebb62cd5c289f3602efe4149d963282739f79b51947afa039ee6f36be7f66dea83d590fc + languageName: node + linkType: hard + +"@module-federation/sdk@npm:0.1.21": + version: 0.1.21 + resolution: "@module-federation/sdk@npm:0.1.21" + checksum: 6856dcfe2ef5ae939890b82010aaad911fa6c4330a05f290ae054c316c9b532d3691456a1f9e176fe05f1df2d6f2d8c7e0c842ca5648a0fd7abf270e44ed9ecb + languageName: node + linkType: hard + +"@module-federation/third-party-dts-extractor@npm:0.1.21": + version: 0.1.21 + resolution: "@module-federation/third-party-dts-extractor@npm:0.1.21" + dependencies: + find-pkg: 2.0.0 + fs-extra: 9.1.0 + resolve: 1.22.8 + checksum: e394fd7c2e6dbdf8df6937628680e7356ac897ee6f1309d7fbc38c00bcf4be9c0363f8bc1a75c29f7987a5a2f11f7855481813889b18e8b444ee9006aeb4a299 + languageName: node + linkType: hard + +"@module-federation/webpack-bundler-runtime@npm:0.1.21": + version: 0.1.21 + resolution: "@module-federation/webpack-bundler-runtime@npm:0.1.21" + dependencies: + "@module-federation/runtime": 0.1.21 + "@module-federation/sdk": 0.1.21 + checksum: 7d96002066e63bdb503964fd5fb2798be25f4135a599d87721f4d26ebe1de1affbf447c56b082f7ee850ae7798d0ac637f6a486f58591269065e114051b466e5 + languageName: node + linkType: hard + "@motionone/animation@npm:^10.12.0": version: 10.17.0 resolution: "@motionone/animation@npm:10.17.0" @@ -12444,6 +12732,13 @@ __metadata: languageName: node linkType: hard +"@types/pg-format@npm:^1.0.5": + version: 1.0.5 + resolution: "@types/pg-format@npm:1.0.5" + checksum: e7907b1e478b54aec581d14bc4df349d40d6e30e1f03605e9d162f515f35064e9deaeeb563cb812adfac271522c7ed68b13ebb6e2036d557c5533cf6357419bd + languageName: node + linkType: hard + "@types/prop-types@npm:*, @types/prop-types@npm:^15.0.0, @types/prop-types@npm:^15.7.12, @types/prop-types@npm:^15.7.3": version: 15.7.12 resolution: "@types/prop-types@npm:15.7.12" @@ -13322,7 +13617,7 @@ __metadata: languageName: node linkType: hard -"@yarnpkg/parsers@npm:^3.0.0-rc.4": +"@yarnpkg/parsers@npm:^3.0.0": version: 3.0.2 resolution: "@yarnpkg/parsers@npm:3.0.2" dependencies: @@ -13406,7 +13701,7 @@ __metadata: languageName: node linkType: hard -"accepts@npm:~1.3.4, accepts@npm:~1.3.5, accepts@npm:~1.3.8": +"accepts@npm:^1.3.5, accepts@npm:~1.3.4, accepts@npm:~1.3.5, accepts@npm:~1.3.8": version: 1.3.8 resolution: "accepts@npm:1.3.8" dependencies: @@ -13500,6 +13795,13 @@ __metadata: languageName: node linkType: hard +"adm-zip@npm:^0.5.10": + version: 0.5.15 + resolution: "adm-zip@npm:0.5.15" + checksum: 23fc108ba0ead637cf8f89431bd152017d3d2eccbbac5e77bcfa3d0209029a53921d9735c5110c06b51cf223184f4cf2fdade975f20266a64183e94717a535f4 + languageName: node + linkType: hard + "agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" @@ -13616,7 +13918,7 @@ __metadata: languageName: node linkType: hard -"ansi-colors@npm:^4.1.1": +"ansi-colors@npm:^4.1.1, ansi-colors@npm:^4.1.3": version: 4.1.3 resolution: "ansi-colors@npm:4.1.3" checksum: a9c2ec842038a1fabc7db9ece7d3177e2fe1c5dc6f0c51ecfbf5f39911427b89c00b5dc6b8bd95f82a26e9b16aaae2e83d45f060e98070ce4d1333038edceb0e @@ -13703,7 +14005,7 @@ __metadata: languageName: node linkType: hard -"any-promise@npm:^1.0.0": +"any-promise@npm:^1.0.0, any-promise@npm:^1.1.0": version: 1.3.0 resolution: "any-promise@npm:1.3.0" checksum: 0ee8a9bdbe882c90464d75d1f55cf027f5458650c4bd1f0467e65aec38ccccda07ca5844969ee77ed46d04e7dded3eaceb027e8d32f385688523fe305fa7e1de @@ -14252,7 +14554,7 @@ __metadata: languageName: node linkType: hard -"axios@npm:1.6.8, axios@npm:^1.0.0, axios@npm:^1.4.0, axios@npm:^1.6.0": +"axios@npm:1.6.8": version: 1.6.8 resolution: "axios@npm:1.6.8" dependencies: @@ -14263,6 +14565,17 @@ __metadata: languageName: node linkType: hard +"axios@npm:^1.0.0, axios@npm:^1.4.0, axios@npm:^1.6.0, axios@npm:^1.6.7": + version: 1.7.4 + resolution: "axios@npm:1.7.4" + dependencies: + follow-redirects: ^1.15.6 + form-data: ^4.0.0 + proxy-from-env: ^1.1.0 + checksum: 0c17039a9acfe6a566fca8431ba5c1b455c83d30ea6157fec68a6722878fcd30f3bd32d172f6bee0c51fe75ca98e6414ddcd968a87b5606b573731629440bfaf + languageName: node + linkType: hard + "axobject-query@npm:^3.2.1": version: 3.2.1 resolution: "axobject-query@npm:3.2.1" @@ -15081,6 +15394,16 @@ __metadata: languageName: node linkType: hard +"cache-content-type@npm:^1.0.0": + version: 1.0.1 + resolution: "cache-content-type@npm:1.0.1" + dependencies: + mime-types: ^2.1.18 + ylru: ^1.2.0 + checksum: 18db4d59452669ccbfd7146a1510a37eb28e9eccf18ca7a4eb603dff2edc5cccdca7498fc3042a2978f76f11151fba486eb9eb69d9afa3fb124957870aef4fd3 + languageName: node + linkType: hard + "cacheable-lookup@npm:^5.0.3": version: 5.0.4 resolution: "cacheable-lookup@npm:5.0.4" @@ -15216,6 +15539,16 @@ __metadata: languageName: node linkType: hard +"chalk@npm:3.0.0, chalk@npm:^3.0.0": + version: 3.0.0 + resolution: "chalk@npm:3.0.0" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: 8e3ddf3981c4da405ddbd7d9c8d91944ddf6e33d6837756979f7840a29272a69a5189ecae0ff84006750d6d1e92368d413335eab4db5476db6e6703a1d1e0505 + languageName: node + linkType: hard + "chalk@npm:4.1.0": version: 4.1.0 resolution: "chalk@npm:4.1.0" @@ -15243,16 +15576,6 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^3.0.0": - version: 3.0.0 - resolution: "chalk@npm:3.0.0" - dependencies: - ansi-styles: ^4.1.0 - supports-color: ^7.1.0 - checksum: 8e3ddf3981c4da405ddbd7d9c8d91944ddf6e33d6837756979f7840a29272a69a5189ecae0ff84006750d6d1e92368d413335eab4db5476db6e6703a1d1e0505 - languageName: node - linkType: hard - "char-regex@npm:^1.0.2": version: 1.0.2 resolution: "char-regex@npm:1.0.2" @@ -16015,7 +16338,7 @@ __metadata: languageName: node linkType: hard -"content-disposition@npm:0.5.4": +"content-disposition@npm:0.5.4, content-disposition@npm:~0.5.2": version: 0.5.4 resolution: "content-disposition@npm:0.5.4" dependencies: @@ -16024,7 +16347,7 @@ __metadata: languageName: node linkType: hard -"content-type@npm:^1.0.5, content-type@npm:~1.0.4, content-type@npm:~1.0.5": +"content-type@npm:^1.0.4, content-type@npm:^1.0.5, content-type@npm:~1.0.4, content-type@npm:~1.0.5": version: 1.0.5 resolution: "content-type@npm:1.0.5" checksum: 566271e0a251642254cde0f845f9dd4f9856e52d988f4eb0d0dcffbb7a1f8ec98de7a5215fc628f3bce30fe2fb6fd2bc064b562d721658c59b544e2d34ea2766 @@ -16190,6 +16513,16 @@ __metadata: languageName: node linkType: hard +"cookies@npm:~0.8.0": + version: 0.8.0 + resolution: "cookies@npm:0.8.0" + dependencies: + depd: ~2.0.0 + keygrip: ~1.1.0 + checksum: 806055a44f128705265b1bc6a853058da18bf80dea3654ad99be20985b1fa1b14f86c1eef73644aab8071241f8a78acd57202b54c4c5c70769fc694fbb9c4edc + languageName: node + linkType: hard + "copy-to-clipboard@npm:^3.2.0, copy-to-clipboard@npm:^3.3.1": version: 3.3.3 resolution: "copy-to-clipboard@npm:3.3.3" @@ -16394,6 +16727,15 @@ __metadata: languageName: node linkType: hard +"cron-parser@npm:^4.2.0": + version: 4.9.0 + resolution: "cron-parser@npm:4.9.0" + dependencies: + luxon: ^3.2.1 + checksum: 3cf248fc5cae6c19ec7124962b1cd84b76f02b9bc4f58976b3bd07624db3ef10aaf1548efcc2d2dcdab0dad4f12029d640a55ecce05ea5e1596af9db585502cf + languageName: node + linkType: hard + "cron@npm:^3.0.0": version: 3.1.7 resolution: "cron@npm:3.1.7" @@ -16903,6 +17245,13 @@ __metadata: languageName: node linkType: hard +"date-format@npm:^4.0.14": + version: 4.0.14 + resolution: "date-format@npm:4.0.14" + checksum: dfe5139df6af5759b9dd3c007b899b3f60d45a9240ffeee6314ab74e6ab52e9b519a44ccf285888bdd6b626c66ee9b4c8a523075fa1140617b5beb1cbb9b18d1 + languageName: node + linkType: hard + "dateformat@npm:^3.0.3": version: 3.0.3 resolution: "dateformat@npm:3.0.3" @@ -16947,6 +17296,15 @@ __metadata: languageName: node linkType: hard +"debug@npm:~3.1.0": + version: 3.1.0 + resolution: "debug@npm:3.1.0" + dependencies: + ms: 2.0.0 + checksum: 0b52718ab957254a5b3ca07fc34543bc778f358620c206a08452251eb7fc193c3ea3505072acbf4350219c14e2d71ceb7bdaa0d3370aa630b50da790458d08b3 + languageName: node + linkType: hard + "decamelize-keys@npm:^1.1.0": version: 1.1.1 resolution: "decamelize-keys@npm:1.1.1" @@ -17041,6 +17399,13 @@ __metadata: languageName: node linkType: hard +"deep-equal@npm:~1.0.1": + version: 1.0.1 + resolution: "deep-equal@npm:1.0.1" + checksum: 5af8cbfcebf190491878a498caccc7dc9592f8ebd1685b976eacc3825619d222b5e929923163b92c4f414494e2b884f7ebf00c022e8198e8292deb70dd9785f4 + languageName: node + linkType: hard + "deep-extend@npm:0.6.0, deep-extend@npm:^0.6.0": version: 0.6.0 resolution: "deep-extend@npm:0.6.0" @@ -17175,7 +17540,7 @@ __metadata: languageName: node linkType: hard -"depd@npm:~1.1.2": +"depd@npm:^1.1.2, depd@npm:~1.1.2": version: 1.1.2 resolution: "depd@npm:1.1.2" checksum: 6b406620d269619852885ce15965272b829df6f409724415e0002c8632ab6a8c0a08ec1f0bd2add05dc7bd7507606f7e2cc034fa24224ab829580040b835ecd9 @@ -17213,7 +17578,7 @@ __metadata: languageName: node linkType: hard -"destroy@npm:1.2.0": +"destroy@npm:1.2.0, destroy@npm:^1.0.4": version: 1.2.0 resolution: "destroy@npm:1.2.0" checksum: 0acb300b7478a08b92d810ab229d5afe0d2f4399272045ab22affa0d99dbaf12637659411530a6fcd597a9bdac718fc94373a61a95b4651bbc7b83684a565e38 @@ -17711,7 +18076,7 @@ __metadata: languageName: node linkType: hard -"encodeurl@npm:~1.0.2": +"encodeurl@npm:^1.0.2, encodeurl@npm:~1.0.2": version: 1.0.2 resolution: "encodeurl@npm:1.0.2" checksum: e50e3d508cdd9c4565ba72d2012e65038e5d71bdc9198cb125beb6237b5b1ade6c0d343998da9e170fb2eae52c1bed37d4d6d98a46ea423a0cddbed5ac3f780c @@ -17808,6 +18173,13 @@ __metadata: languageName: node linkType: hard +"error-inject@npm:^1.0.0": + version: 1.0.0 + resolution: "error-inject@npm:1.0.0" + checksum: 258cb26c7c7e04d9b730d074926ff5e18755b6945781540fdd124cafc5015610d97e4b971eb3226469f407fd34fa899a60fbcf9ade8923ab42fa2a3c61e246cf + languageName: node + linkType: hard + "error-stack-parser@npm:^2.0.6": version: 2.1.4 resolution: "error-stack-parser@npm:2.1.4" @@ -18097,6 +18469,86 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:^0.21.0": + version: 0.21.5 + resolution: "esbuild@npm:0.21.5" + dependencies: + "@esbuild/aix-ppc64": 0.21.5 + "@esbuild/android-arm": 0.21.5 + "@esbuild/android-arm64": 0.21.5 + "@esbuild/android-x64": 0.21.5 + "@esbuild/darwin-arm64": 0.21.5 + "@esbuild/darwin-x64": 0.21.5 + "@esbuild/freebsd-arm64": 0.21.5 + "@esbuild/freebsd-x64": 0.21.5 + "@esbuild/linux-arm": 0.21.5 + "@esbuild/linux-arm64": 0.21.5 + "@esbuild/linux-ia32": 0.21.5 + "@esbuild/linux-loong64": 0.21.5 + "@esbuild/linux-mips64el": 0.21.5 + "@esbuild/linux-ppc64": 0.21.5 + "@esbuild/linux-riscv64": 0.21.5 + "@esbuild/linux-s390x": 0.21.5 + "@esbuild/linux-x64": 0.21.5 + "@esbuild/netbsd-x64": 0.21.5 + "@esbuild/openbsd-x64": 0.21.5 + "@esbuild/sunos-x64": 0.21.5 + "@esbuild/win32-arm64": 0.21.5 + "@esbuild/win32-ia32": 0.21.5 + "@esbuild/win32-x64": 0.21.5 + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 2911c7b50b23a9df59a7d6d4cdd3a4f85855787f374dce751148dbb13305e0ce7e880dde1608c2ab7a927fc6cec3587b80995f7fc87a64b455f8b70b55fd8ec1 + languageName: node + linkType: hard + "escalade@npm:^3.1.1, escalade@npm:^3.1.2": version: 3.1.2 resolution: "escalade@npm:3.1.2" @@ -18685,6 +19137,15 @@ __metadata: languageName: node linkType: hard +"expand-tilde@npm:^2.0.0, expand-tilde@npm:^2.0.2": + version: 2.0.2 + resolution: "expand-tilde@npm:2.0.2" + dependencies: + homedir-polyfill: ^1.0.1 + checksum: 2efe6ed407d229981b1b6ceb552438fbc9e5c7d6a6751ad6ced3e0aa5cf12f0b299da695e90d6c2ac79191b5c53c613e508f7149e4573abfbb540698ddb7301a + languageName: node + linkType: hard + "expect@npm:^29.0.0, expect@npm:^29.7.0": version: 29.7.0 resolution: "expect@npm:29.7.0" @@ -19114,6 +19575,24 @@ __metadata: languageName: node linkType: hard +"find-file-up@npm:^2.0.1": + version: 2.0.1 + resolution: "find-file-up@npm:2.0.1" + dependencies: + resolve-dir: ^1.0.1 + checksum: dfe820bfb80e75bed5dd5080057858c0ad2393e1438c48a3bb682663e9ecdcfbe3224ed4768bfedd00776800b4ae76bc8953d250d15ae3feabf381d2c6d04268 + languageName: node + linkType: hard + +"find-pkg@npm:2.0.0": + version: 2.0.0 + resolution: "find-pkg@npm:2.0.0" + dependencies: + find-file-up: ^2.0.1 + checksum: 44785204c8bbbdfeaece6b834ba81a35163421c30e20f531281d26e6b5890663d7ac884b82a9aebf6ce23e479336cd6f70ea5597da35495c16abdeba2fd4f845 + languageName: node + linkType: hard + "find-root@npm:^1.1.0": version: 1.1.0 resolution: "find-root@npm:1.1.0" @@ -19186,7 +19665,7 @@ __metadata: languageName: node linkType: hard -"flatted@npm:3.3.1, flatted@npm:^3.2.9": +"flatted@npm:3.3.1, flatted@npm:^3.2.7, flatted@npm:^3.2.9": version: 3.3.1 resolution: "flatted@npm:3.3.1" checksum: 85ae7181650bb728c221e7644cbc9f4bf28bc556f2fc89bb21266962bdf0ce1029cc7acc44bb646cd469d9baac7c317f64e841c4c4c00516afa97320cdac7f94 @@ -19397,7 +19876,7 @@ __metadata: languageName: node linkType: hard -"fresh@npm:0.5.2": +"fresh@npm:0.5.2, fresh@npm:~0.5.2": version: 0.5.2 resolution: "fresh@npm:0.5.2" checksum: 13ea8b08f91e669a64e3ba3a20eb79d7ca5379a81f1ff7f4310d54e2320645503cc0c78daedc93dfb6191287295f6479544a649c64d8e41a1c0fb0c221552346 @@ -19429,6 +19908,18 @@ __metadata: languageName: node linkType: hard +"fs-extra@npm:9.1.0, fs-extra@npm:^9.0.0": + version: 9.1.0 + resolution: "fs-extra@npm:9.1.0" + dependencies: + at-least-node: ^1.0.0 + graceful-fs: ^4.2.0 + jsonfile: ^6.0.1 + universalify: ^2.0.0 + checksum: ba71ba32e0faa74ab931b7a0031d1523c66a73e225de7426e275e238e312d07313d2da2d33e34a52aa406c8763ade5712eb3ec9ba4d9edce652bcacdc29e6b20 + languageName: node + linkType: hard + "fs-extra@npm:^11.0.0, fs-extra@npm:^11.1.0, fs-extra@npm:^11.1.1, fs-extra@npm:^11.2.0": version: 11.2.0 resolution: "fs-extra@npm:11.2.0" @@ -19451,18 +19942,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^9.0.0": - version: 9.1.0 - resolution: "fs-extra@npm:9.1.0" - dependencies: - at-least-node: ^1.0.0 - graceful-fs: ^4.2.0 - jsonfile: ^6.0.1 - universalify: ^2.0.0 - checksum: ba71ba32e0faa74ab931b7a0031d1523c66a73e225de7426e275e238e312d07313d2da2d33e34a52aa406c8763ade5712eb3ec9ba4d9edce652bcacdc29e6b20 - languageName: node - linkType: hard - "fs-extra@npm:~7.0.1": version: 7.0.1 resolution: "fs-extra@npm:7.0.1" @@ -19941,6 +20420,17 @@ __metadata: languageName: node linkType: hard +"global-modules@npm:^1.0.0": + version: 1.0.0 + resolution: "global-modules@npm:1.0.0" + dependencies: + global-prefix: ^1.0.1 + is-windows: ^1.0.1 + resolve-dir: ^1.0.0 + checksum: 10be68796c1e1abc1e2ba87ec4ea507f5629873b119ab0cd29c07284ef2b930f1402d10df01beccb7391dedd9cd479611dd6a24311c71be58937beaf18edf85e + languageName: node + linkType: hard + "global-modules@npm:^2.0.0": version: 2.0.0 resolution: "global-modules@npm:2.0.0" @@ -19950,6 +20440,19 @@ __metadata: languageName: node linkType: hard +"global-prefix@npm:^1.0.1": + version: 1.0.2 + resolution: "global-prefix@npm:1.0.2" + dependencies: + expand-tilde: ^2.0.2 + homedir-polyfill: ^1.0.1 + ini: ^1.3.4 + is-windows: ^1.0.1 + which: ^1.2.14 + checksum: 061b43470fe498271bcd514e7746e8a8535032b17ab9570517014ae27d700ff0dca749f76bbde13ba384d185be4310d8ba5712cb0e74f7d54d59390db63dd9a0 + languageName: node + linkType: hard + "global-prefix@npm:^3.0.0": version: 3.0.0 resolution: "global-prefix@npm:3.0.0" @@ -20443,6 +20946,15 @@ __metadata: languageName: node linkType: hard +"homedir-polyfill@npm:^1.0.1": + version: 1.0.3 + resolution: "homedir-polyfill@npm:1.0.3" + dependencies: + parse-passwd: ^1.0.0 + checksum: 18dd4db87052c6a2179d1813adea0c4bfcfa4f9996f0e226fefb29eb3d548e564350fa28ec46b0bf1fbc0a1d2d6922ceceb80093115ea45ff8842a4990139250 + languageName: node + linkType: hard + "hoopy@npm:^0.1.4": version: 0.1.4 resolution: "hoopy@npm:0.1.4" @@ -20585,6 +21097,16 @@ __metadata: languageName: node linkType: hard +"http-assert@npm:^1.3.0": + version: 1.5.0 + resolution: "http-assert@npm:1.5.0" + dependencies: + deep-equal: ~1.0.1 + http-errors: ~1.8.0 + checksum: 69c9b3c14cf8b2822916360a365089ce936c883c49068f91c365eccba5c141a9964d19fdda589150a480013bf503bf37d8936c732e9635819339e730ab0e7527 + languageName: node + linkType: hard + "http-cache-semantics@npm:^4.0.0, http-cache-semantics@npm:^4.1.0, http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" @@ -20612,6 +21134,19 @@ __metadata: languageName: node linkType: hard +"http-errors@npm:^1.6.3, http-errors@npm:~1.8.0": + version: 1.8.1 + resolution: "http-errors@npm:1.8.1" + dependencies: + depd: ~1.1.2 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: ">= 1.5.0 < 2" + toidentifier: 1.0.1 + checksum: d3c7e7e776fd51c0a812baff570bdf06fe49a5dc448b700ab6171b1250e4cf7db8b8f4c0b133e4bfe2451022a5790c1ca6c2cae4094dedd6ac8304a1267f91d2 + languageName: node + linkType: hard + "http-errors@npm:~1.6.2": version: 1.6.3 resolution: "http-errors@npm:1.6.3" @@ -20997,7 +21532,7 @@ __metadata: languageName: node linkType: hard -"ini@npm:^1.3.2, ini@npm:^1.3.5, ini@npm:^1.3.8, ini@npm:~1.3.0": +"ini@npm:^1.3.2, ini@npm:^1.3.4, ini@npm:^1.3.5, ini@npm:^1.3.8, ini@npm:~1.3.0": version: 1.3.8 resolution: "ini@npm:1.3.8" checksum: dfd98b0ca3a4fc1e323e38a6c8eb8936e31a97a918d3b377649ea15bdb15d481207a0dda1021efbd86b464cae29a0d33c1d7dcaf6c5672bee17fa849bc50a1b3 @@ -21680,6 +22215,13 @@ __metadata: languageName: node linkType: hard +"is-windows@npm:^1.0.1": + version: 1.0.2 + resolution: "is-windows@npm:1.0.2" + checksum: 438b7e52656fe3b9b293b180defb4e448088e7023a523ec21a91a80b9ff8cdb3377ddb5b6e60f7c7de4fa8b63ab56e121b6705fe081b3cf1b828b0a380009ad7 + languageName: node + linkType: hard + "is-wsl@npm:^2.2.0": version: 2.2.0 resolution: "is-wsl@npm:2.2.0" @@ -21798,7 +22340,7 @@ __metadata: languageName: node linkType: hard -"isomorphic-ws@npm:^5.0.0": +"isomorphic-ws@npm:5.0.0, isomorphic-ws@npm:^5.0.0": version: 5.0.0 resolution: "isomorphic-ws@npm:5.0.0" peerDependencies: @@ -23077,6 +23619,15 @@ __metadata: languageName: node linkType: hard +"keygrip@npm:~1.1.0": + version: 1.1.0 + resolution: "keygrip@npm:1.1.0" + dependencies: + tsscmp: 1.0.6 + checksum: 078cd16a463d187121f0a27c1c9c95c52ad392b620f823431689f345a0501132cee60f6e96914b07d570105af470b96960402accd6c48a0b1f3cd8fac4fa2cae + languageName: node + linkType: hard + "keyv@npm:^4.0.0, keyv@npm:^4.5.2, keyv@npm:^4.5.3": version: 4.5.4 resolution: "keyv@npm:4.5.4" @@ -23146,6 +23697,64 @@ __metadata: languageName: node linkType: hard +"koa-compose@npm:^3.0.0": + version: 3.2.1 + resolution: "koa-compose@npm:3.2.1" + dependencies: + any-promise: ^1.1.0 + checksum: ff8e5fc0348455acf751179c6c613eb030a5fac6406d3b49ae9e00460b7ee8770db3ef62633fd3db0306cd4a6d2a0b5152399ebd5bb5e684418f9eeeb251c2de + languageName: node + linkType: hard + +"koa-compose@npm:^4.1.0": + version: 4.1.0 + resolution: "koa-compose@npm:4.1.0" + checksum: 46cb16792d96425e977c2ae4e5cb04930280740e907242ec9c25e3fb8b4a1d7b54451d7432bc24f40ec62255edea71894d2ceeb8238501842b4e48014f2e83db + languageName: node + linkType: hard + +"koa-convert@npm:^1.2.0": + version: 1.2.0 + resolution: "koa-convert@npm:1.2.0" + dependencies: + co: ^4.6.0 + koa-compose: ^3.0.0 + checksum: a33944dbda4ed87565985f5b37ba1122a012db872724b216b6fd8f9176d4bba42c4a9bf3c129330e45f6474d28f50ca0ed28d41b9bccd2ab5d36d6436cf0d676 + languageName: node + linkType: hard + +"koa@npm:2.11.0": + version: 2.11.0 + resolution: "koa@npm:2.11.0" + dependencies: + accepts: ^1.3.5 + cache-content-type: ^1.0.0 + content-disposition: ~0.5.2 + content-type: ^1.0.4 + cookies: ~0.8.0 + debug: ~3.1.0 + delegates: ^1.0.0 + depd: ^1.1.2 + destroy: ^1.0.4 + encodeurl: ^1.0.2 + error-inject: ^1.0.0 + escape-html: ^1.0.3 + fresh: ~0.5.2 + http-assert: ^1.3.0 + http-errors: ^1.6.3 + is-generator-function: ^1.0.7 + koa-compose: ^4.1.0 + koa-convert: ^1.2.0 + on-finished: ^2.3.0 + only: ~0.0.2 + parseurl: ^1.3.2 + statuses: ^1.5.0 + type-is: ^1.6.16 + vary: ^1.1.2 + checksum: b08e1aea03e70fe4ff6e35dee9f9e979e8608461ee1002f6e8dd72f45fc49404873888ea9a3aab2904e24bf43522df7c601033522f4151189e4055e87f94a979 + languageName: node + linkType: hard + "kuler@npm:^2.0.0": version: 2.0.0 resolution: "kuler@npm:2.0.0" @@ -23570,6 +24179,13 @@ __metadata: languageName: node linkType: hard +"lodash.clonedeepwith@npm:4.5.0": + version: 4.5.0 + resolution: "lodash.clonedeepwith@npm:4.5.0" + checksum: 9fbf4ebfa04b381df226a2298eba680327bea3d0d5d19c5118de7ae218fd219186e30e9fd0d33b13729f34ffbc83c1cf09cb27aff265ba94cb602b8a2b1e71c9 + languageName: node + linkType: hard + "lodash.debounce@npm:^4, lodash.debounce@npm:^4.0.8": version: 4.0.8 resolution: "lodash.debounce@npm:4.0.8" @@ -23740,6 +24356,19 @@ __metadata: languageName: node linkType: hard +"log4js@npm:6.9.1": + version: 6.9.1 + resolution: "log4js@npm:6.9.1" + dependencies: + date-format: ^4.0.14 + debug: ^4.3.4 + flatted: ^3.2.7 + rfdc: ^1.3.0 + streamroller: ^3.1.5 + checksum: 59d98c37d4163138dab5d9b06ae26965d1353106fece143973d57b1003b3a482791aa21374fd2cca81a953b8837b2f9756ac225404e60cbfa4dd3ab59f082e2e + languageName: node + linkType: hard + "logform@npm:^2.3.2, logform@npm:^2.4.0": version: 2.6.0 resolution: "logform@npm:2.6.0" @@ -23761,6 +24390,13 @@ __metadata: languageName: node linkType: hard +"long-timeout@npm:0.1.1": + version: 0.1.1 + resolution: "long-timeout@npm:0.1.1" + checksum: 48668e5362cb74c4b77a6b833d59f149b9bb9e99c5a5097609807e2597cd0920613b2a42b89bd0870848298be3691064d95599a04ae010023d07dba39932afa7 + languageName: node + linkType: hard + "long@npm:^5.0.0, long@npm:^5.2.1": version: 5.2.3 resolution: "long@npm:5.2.3" @@ -23865,7 +24501,14 @@ __metadata: languageName: node linkType: hard -"luxon@npm:^3.0.0, luxon@npm:~3.4.0": +"luxon@npm:^3.0.0, luxon@npm:^3.2.1": + version: 3.5.0 + resolution: "luxon@npm:3.5.0" + checksum: f290fe5788c8e51e748744f05092160d4be12150dca70f9fadc0d233e53d60ce86acd82e7d909a114730a136a77e56f0d3ebac6141bbb82fd310969a4704825b + languageName: node + linkType: hard + +"luxon@npm:~3.4.0": version: 3.4.4 resolution: "luxon@npm:3.4.4" checksum: 36c1f99c4796ee4bfddf7dc94fa87815add43ebc44c8934c924946260a58512f0fd2743a629302885df7f35ccbd2d13f178c15df046d0e3b6eb71db178f1c60c @@ -24753,7 +25396,7 @@ __metadata: languageName: node linkType: hard -"mime-types@npm:^2.1.12, mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:~2.1.17, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": +"mime-types@npm:^2.1.12, mime-types@npm:^2.1.18, mime-types@npm:^2.1.27, mime-types@npm:^2.1.31, mime-types@npm:~2.1.17, mime-types@npm:~2.1.19, mime-types@npm:~2.1.24, mime-types@npm:~2.1.34": version: 2.1.35 resolution: "mime-types@npm:2.1.35" dependencies: @@ -25659,6 +26302,17 @@ __metadata: languageName: node linkType: hard +"node-schedule@npm:2.1.1": + version: 2.1.1 + resolution: "node-schedule@npm:2.1.1" + dependencies: + cron-parser: ^4.2.0 + long-timeout: 0.1.1 + sorted-array-functions: ^1.3.0 + checksum: 6a8822b16fb024277c42efe710bdb35b6f1f6ab3a2f826283640511247d693f34ebd5ddf2863cd91609e7f323574e36c81cd2084dc204fa521f931380f0f963f + languageName: node + linkType: hard + "nopt@npm:^6.0.0": version: 6.0.0 resolution: "nopt@npm:6.0.0" @@ -26215,7 +26869,7 @@ __metadata: languageName: node linkType: hard -"on-finished@npm:2.4.1, on-finished@npm:^2.4.1": +"on-finished@npm:2.4.1, on-finished@npm:^2.3.0, on-finished@npm:^2.4.1": version: 2.4.1 resolution: "on-finished@npm:2.4.1" dependencies: @@ -26276,6 +26930,13 @@ __metadata: languageName: node linkType: hard +"only@npm:~0.0.2": + version: 0.0.2 + resolution: "only@npm:0.0.2" + checksum: d399710db867a1ef436dd3ce74499c87ece794aa81ab0370b5d153968766ee4aed2f98d3f92fc87c963e45b7a74d400d6f463ef651a5e7cfb861b15e88e9efe6 + languageName: node + linkType: hard + "ono@npm:^7.1.3": version: 7.1.3 resolution: "ono@npm:7.1.3" @@ -26719,6 +27380,13 @@ __metadata: languageName: node linkType: hard +"parse-passwd@npm:^1.0.0": + version: 1.0.0 + resolution: "parse-passwd@npm:1.0.0" + checksum: 4e55e0231d58f828a41d0f1da2bf2ff7bcef8f4cb6146e69d16ce499190de58b06199e6bd9b17fbf0d4d8aef9052099cdf8c4f13a6294b1a522e8e958073066e + languageName: node + linkType: hard + "parse-path@npm:^7.0.0": version: 7.0.0 resolution: "parse-path@npm:7.0.0" @@ -26753,7 +27421,7 @@ __metadata: languageName: node linkType: hard -"parseurl@npm:~1.3.2, parseurl@npm:~1.3.3": +"parseurl@npm:^1.3.2, parseurl@npm:~1.3.2, parseurl@npm:~1.3.3": version: 1.3.3 resolution: "parseurl@npm:1.3.3" checksum: 407cee8e0a3a4c5cd472559bca8b6a45b82c124e9a4703302326e9ab60fc1081442ada4e02628efef1eb16197ddc7f8822f5a91fd7d7c86b51f530aedb17dfa2 @@ -27082,6 +27750,13 @@ __metadata: languageName: node linkType: hard +"pg-format@npm:^1.0.4": + version: 1.0.4 + resolution: "pg-format@npm:1.0.4" + checksum: 159b43ad57d2f963f1072def86080dd2a6dd42c1a86046e388d47b491e00afe795139520eb01c8dffc43ac0243c77b3c4c5882d0ec5f488bb3281f17458b1b3d + languageName: node + linkType: hard + "pg-int8@npm:1.0.1": version: 1.0.1 resolution: "pg-int8@npm:1.0.1" @@ -28244,6 +28919,13 @@ __metadata: languageName: node linkType: hard +"rambda@npm:^9.1.0": + version: 9.2.1 + resolution: "rambda@npm:9.2.1" + checksum: d877b61f2c1e8a1878ca1e40a181702b360f6c3978bf0e55e62315a1aa215863b7ecb8f00077e2bc0f1ca0d455387fafd7a84b5c8dd004eb3cf071b15827cff7 + languageName: node + linkType: hard + "ramda-adjunct@npm:^5.0.0": version: 5.0.0 resolution: "ramda-adjunct@npm:5.0.0" @@ -29393,6 +30075,16 @@ __metadata: languageName: node linkType: hard +"resolve-dir@npm:^1.0.0, resolve-dir@npm:^1.0.1": + version: 1.0.1 + resolution: "resolve-dir@npm:1.0.1" + dependencies: + expand-tilde: ^2.0.0 + global-modules: ^1.0.0 + checksum: ef736b8ed60d6645c3b573da17d329bfb50ec4e1d6c5ffd6df49e3497acef9226f9810ea6823b8ece1560e01dcb13f77a9f6180d4f242d00cc9a8f4de909c65c + languageName: node + linkType: hard + "resolve-from@npm:5.0.0, resolve-from@npm:^5.0.0": version: 5.0.0 resolution: "resolve-from@npm:5.0.0" @@ -29421,7 +30113,7 @@ __metadata: languageName: node linkType: hard -"resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4, resolve@npm:~1.22.1": +"resolve@npm:1.22.8, resolve@npm:^1.10.0, resolve@npm:^1.14.2, resolve@npm:^1.19.0, resolve@npm:^1.20.0, resolve@npm:^1.22.1, resolve@npm:^1.22.4, resolve@npm:~1.22.1": version: 1.22.8 resolution: "resolve@npm:1.22.8" dependencies: @@ -29457,7 +30149,7 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.22.4#~builtin, resolve@patch:resolve@~1.22.1#~builtin": +"resolve@patch:resolve@1.22.8#~builtin, resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.19.0#~builtin, resolve@patch:resolve@^1.20.0#~builtin, resolve@patch:resolve@^1.22.1#~builtin, resolve@patch:resolve@^1.22.4#~builtin, resolve@patch:resolve@~1.22.1#~builtin": version: 1.22.8 resolution: "resolve@patch:resolve@npm%3A1.22.8#~builtin::version=1.22.8&hash=07638b" dependencies: @@ -30492,6 +31184,13 @@ __metadata: languageName: node linkType: hard +"sorted-array-functions@npm:^1.3.0": + version: 1.3.0 + resolution: "sorted-array-functions@npm:1.3.0" + checksum: 673fd39ca3b6c92644d4483eac1700bb7d7555713a536822a7522a35af559bef3e72f10d89356b75042dc394cd7c2e2ab6f40024385218ec3c85bb7335032857 + languageName: node + linkType: hard + "source-list-map@npm:^2.0.0": version: 2.0.1 resolution: "source-list-map@npm:2.0.1" @@ -30855,7 +31554,7 @@ __metadata: languageName: node linkType: hard -"statuses@npm:>= 1.4.0 < 2": +"statuses@npm:>= 1.4.0 < 2, statuses@npm:>= 1.5.0 < 2, statuses@npm:^1.5.0": version: 1.5.0 resolution: "statuses@npm:1.5.0" checksum: c469b9519de16a4bb19600205cffb39ee471a5f17b82589757ca7bd40a8d92ebb6ed9f98b5a540c5d302ccbc78f15dc03cc0280dd6e00df1335568a5d5758a5c @@ -30934,6 +31633,17 @@ __metadata: languageName: node linkType: hard +"streamroller@npm:^3.1.5": + version: 3.1.5 + resolution: "streamroller@npm:3.1.5" + dependencies: + date-format: ^4.0.14 + debug: ^4.3.4 + fs-extra: ^8.1.0 + checksum: c1df5612b785ffa4b6bbf16460590b62994c57265bc55a5166eebeeb0daf648e84bc52dc6d57e0cd4e5c7609bda93076753c63ff54589febd1e0b95590f0e443 + languageName: node + linkType: hard + "streamsearch@npm:^1.1.0": version: 1.1.0 resolution: "streamsearch@npm:1.1.0" @@ -32216,6 +32926,13 @@ __metadata: languageName: node linkType: hard +"tsscmp@npm:1.0.6": + version: 1.0.6 + resolution: "tsscmp@npm:1.0.6" + checksum: 1512384def36bccc9125cabbd4c3b0e68608d7ee08127ceaa0b84a71797263f1a01c7f82fa69be8a3bd3c1396e2965d2f7b52d581d3a5eeaf3967fbc52e3b3bf + languageName: node + linkType: hard + "tsutils@npm:^3.21.0": version: 3.21.0 resolution: "tsutils@npm:3.21.0" @@ -32356,7 +33073,7 @@ __metadata: languageName: node linkType: hard -"type-is@npm:^1.6.4, type-is@npm:~1.6.18": +"type-is@npm:^1.6.16, type-is@npm:^1.6.4, type-is@npm:~1.6.18": version: 1.6.18 resolution: "type-is@npm:1.6.18" dependencies: @@ -33210,7 +33927,7 @@ __metadata: languageName: node linkType: hard -"vary@npm:^1, vary@npm:~1.1.2": +"vary@npm:^1, vary@npm:^1.1.2, vary@npm:~1.1.2": version: 1.1.2 resolution: "vary@npm:1.1.2" checksum: ae0123222c6df65b437669d63dfa8c36cee20a504101b2fcd97b8bf76f91259c17f9f2b4d70a1e3c6bbcee7f51b28392833adb6b2770b23b01abec84e369660b @@ -33656,7 +34373,7 @@ __metadata: languageName: node linkType: hard -"which@npm:^1.3.1": +"which@npm:^1.2.14, which@npm:^1.3.1": version: 1.3.1 resolution: "which@npm:1.3.1" dependencies: @@ -33856,33 +34573,33 @@ __metadata: languageName: node linkType: hard -"ws@npm:^7.4.6": - version: 7.5.9 - resolution: "ws@npm:7.5.9" +"ws@npm:8.17.0, ws@npm:^8.11.0, ws@npm:^8.12.0, ws@npm:^8.13.0, ws@npm:^8.15.0, ws@npm:^8.16.0": + version: 8.17.0 + resolution: "ws@npm:8.17.0" peerDependencies: bufferutil: ^4.0.1 - utf-8-validate: ^5.0.2 + utf-8-validate: ">=5.0.2" peerDependenciesMeta: bufferutil: optional: true utf-8-validate: optional: true - checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 + checksum: 147ef9eab0251364e1d2c55338ad0efb15e6913923ccbfdf20f7a8a6cb8f88432bcd7f4d8f66977135bfad35575644f9983201c1a361019594a4e53977bf6d4e languageName: node linkType: hard -"ws@npm:^8.11.0, ws@npm:^8.12.0, ws@npm:^8.13.0, ws@npm:^8.15.0, ws@npm:^8.16.0": - version: 8.17.0 - resolution: "ws@npm:8.17.0" +"ws@npm:^7.4.6": + version: 7.5.9 + resolution: "ws@npm:7.5.9" peerDependencies: bufferutil: ^4.0.1 - utf-8-validate: ">=5.0.2" + utf-8-validate: ^5.0.2 peerDependenciesMeta: bufferutil: optional: true utf-8-validate: optional: true - checksum: 147ef9eab0251364e1d2c55338ad0efb15e6913923ccbfdf20f7a8a6cb8f88432bcd7f4d8f66977135bfad35575644f9983201c1a361019594a4e53977bf6d4e + checksum: c3c100a181b731f40b7f2fddf004aa023f79d64f489706a28bc23ff88e87f6a64b3c6651fbec3a84a53960b75159574d7a7385709847a62ddb7ad6af76f49138 languageName: node linkType: hard @@ -34130,6 +34847,13 @@ __metadata: languageName: node linkType: hard +"ylru@npm:^1.2.0": + version: 1.4.0 + resolution: "ylru@npm:1.4.0" + checksum: e0bf797476487e3d57a6e8790cbb749cff2089e2afc87e46bc84ce7605c329d578ff422c8e8c2ddf167681ddd218af0f58e099733ae1044cba9e9472ebedc01d + languageName: node + linkType: hard + "yml-loader@npm:^2.1.0": version: 2.1.0 resolution: "yml-loader@npm:2.1.0" From 5b10825d3124d05bc37f528fc951b8e73e1d187c Mon Sep 17 00:00:00 2001 From: Henrique Oliveira Date: Tue, 20 Aug 2024 12:28:44 -0300 Subject: [PATCH 6/8] fix: deps --- packages/backend/package.json | 2 ++ plugins/infrawallet-backend/package.json | 1 + yarn.lock | 3 +++ 3 files changed, 6 insertions(+) diff --git a/packages/backend/package.json b/packages/backend/package.json index 2bb2ab8..5b8fc7f 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -18,6 +18,7 @@ "dependencies": { "@backstage/backend-common": "^0.22.0", "@backstage/backend-defaults": "^0.2.18", + "@backstage/backend-plugin-api": "^0.8.0", "@backstage/backend-tasks": "^0.5.23", "@backstage/config": "^1.2.0", "@backstage/plugin-app-backend": "^0.3.66", @@ -39,6 +40,7 @@ "@backstage/plugin-search-backend-node": "^1.2.22", "@backstage/plugin-techdocs-backend": "^1.10.5", "@electrolux-oss/plugin-infrawallet-backend": "workspace:^", + "@electrolux-oss/plugin-infrawallet-common": "workspace:^", "app": "link:../app", "better-sqlite3": "^9.0.0", "dockerode": "^3.3.1", diff --git a/plugins/infrawallet-backend/package.json b/plugins/infrawallet-backend/package.json index 3a928e4..8c7dfbb 100644 --- a/plugins/infrawallet-backend/package.json +++ b/plugins/infrawallet-backend/package.json @@ -43,6 +43,7 @@ "@backstage/backend-defaults": "^0.2.18", "@backstage/backend-plugin-api": "^0.6.18", "@backstage/config": "^1.2.0", + "@backstage/errors": "^1.2.4", "@backstage/plugin-permission-common": "^0.8.0", "@backstage/plugin-permission-node": "^0.8.0", "@backstage/types": "^1.1.1", diff --git a/yarn.lock b/yarn.lock index e38d3c5..5f8aece 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5388,6 +5388,7 @@ __metadata: "@backstage/backend-plugin-api": ^0.6.18 "@backstage/cli": ^0.26.5 "@backstage/config": ^1.2.0 + "@backstage/errors": ^1.2.4 "@backstage/plugin-auth-backend": ^0.22.5 "@backstage/plugin-auth-backend-module-guest-provider": ^0.1.4 "@backstage/plugin-permission-common": ^0.8.0 @@ -14752,6 +14753,7 @@ __metadata: dependencies: "@backstage/backend-common": ^0.22.0 "@backstage/backend-defaults": ^0.2.18 + "@backstage/backend-plugin-api": ^0.8.0 "@backstage/backend-tasks": ^0.5.23 "@backstage/cli": ^0.26.5 "@backstage/config": ^1.2.0 @@ -14774,6 +14776,7 @@ __metadata: "@backstage/plugin-search-backend-node": ^1.2.22 "@backstage/plugin-techdocs-backend": ^1.10.5 "@electrolux-oss/plugin-infrawallet-backend": "workspace:^" + "@electrolux-oss/plugin-infrawallet-common": "workspace:^" "@types/dockerode": ^3.3.0 "@types/express": ^4.17.6 "@types/express-serve-static-core": ^4.17.5 From 2f84533da6d247339d4f5a0a053d301e10fd1e4b Mon Sep 17 00:00:00 2001 From: Henrique Oliveira Date: Tue, 20 Aug 2024 12:29:03 -0300 Subject: [PATCH 7/8] fix: lint --- packages/backend/src/index.ts | 1 - packages/backend/src/permissionPolicyModule.ts | 11 ++--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index 9a85017..a122a7f 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -27,7 +27,6 @@ backend.add(import('@backstage/plugin-catalog-backend-module-scaffolder-entity-m // permission plugin backend.add(import('@backstage/plugin-permission-backend/alpha')); -//backend.add(import('@backstage/plugin-permission-backend-module-allow-all-policy')); backend.add(import('./permissionPolicyModule')); // search plugin diff --git a/packages/backend/src/permissionPolicyModule.ts b/packages/backend/src/permissionPolicyModule.ts index 15735fc..5f5f03c 100644 --- a/packages/backend/src/permissionPolicyModule.ts +++ b/packages/backend/src/permissionPolicyModule.ts @@ -3,20 +3,13 @@ import { BackstageIdentityResponse } from '@backstage/plugin-auth-node'; import { AuthorizeResult, isPermission, PolicyDecision } from '@backstage/plugin-permission-common'; import { PermissionPolicy, PolicyQuery } from '@backstage/plugin-permission-node'; import { policyExtensionPoint } from '@backstage/plugin-permission-node/alpha'; -import { infraWalletReportRead, infraWalletMetricSettingsDelete } from '@electrolux-oss/plugin-infrawallet-common'; +import { infraWalletReportRead } from '@electrolux-oss/plugin-infrawallet-common'; class DefaultPermissionPolicy implements PermissionPolicy { async handle(request: PolicyQuery, _user?: BackstageIdentityResponse): Promise { - // if you do not configure any infrawallet permissions, the default behavior is allow. - // Example deny read report if (isPermission(request.permission, infraWalletReportRead)) { - return { result: AuthorizeResult.DENY }; - } - - // Example deny delete metric settings - if (isPermission(request.permission, infraWalletMetricSettingsDelete)) { - return { result: AuthorizeResult.DENY }; + return { result: AuthorizeResult.ALLOW }; } return { result: AuthorizeResult.ALLOW }; From a2106bc758fded823062c72666f317ac71734a81 Mon Sep 17 00:00:00 2001 From: Henrique Oliveira Date: Tue, 20 Aug 2024 12:39:05 -0300 Subject: [PATCH 8/8] fix: deps --- plugins/infrawallet-backend/package.json | 1 - yarn.lock | 8 -------- 2 files changed, 9 deletions(-) diff --git a/plugins/infrawallet-backend/package.json b/plugins/infrawallet-backend/package.json index 8c7dfbb..e561f02 100644 --- a/plugins/infrawallet-backend/package.json +++ b/plugins/infrawallet-backend/package.json @@ -51,7 +51,6 @@ "@electrolux-oss/plugin-infrawallet-common": "workspace:^", "@google-cloud/bigquery": "7.7.1", "@types/express": "*", - "@types/pg-format": "^1.0.5", "express": "^4.17.1", "express-promise-router": "^4.1.0", "lodash": "^4.17.21", diff --git a/yarn.lock b/yarn.lock index 5f8aece..caea4f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5398,7 +5398,6 @@ __metadata: "@electrolux-oss/plugin-infrawallet-common": "workspace:^" "@google-cloud/bigquery": 7.7.1 "@types/express": "*" - "@types/pg-format": ^1.0.5 "@types/supertest": ^2.0.8 express: ^4.17.1 express-promise-router: ^4.1.0 @@ -12733,13 +12732,6 @@ __metadata: languageName: node linkType: hard -"@types/pg-format@npm:^1.0.5": - version: 1.0.5 - resolution: "@types/pg-format@npm:1.0.5" - checksum: e7907b1e478b54aec581d14bc4df349d40d6e30e1f03605e9d162f515f35064e9deaeeb563cb812adfac271522c7ed68b13ebb6e2036d557c5533cf6357419bd - languageName: node - linkType: hard - "@types/prop-types@npm:*, @types/prop-types@npm:^15.0.0, @types/prop-types@npm:^15.7.12, @types/prop-types@npm:^15.7.3": version: 15.7.12 resolution: "@types/prop-types@npm:15.7.12"