From c52c82589511524d6d2a7e86ac00369910ccac9b Mon Sep 17 00:00:00 2001 From: William Calderipe Date: Fri, 12 Jan 2024 11:31:15 +0100 Subject: [PATCH] Remove non-existent import from @app/authz Replace short command options with long versions in `opa build` to enhance readability. --- apps/authz/Makefile | 8 +++++++- apps/authz/src/app/app.controller.ts | 7 ++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/apps/authz/Makefile b/apps/authz/Makefile index 6d7800eed..bcc6b2a36 100644 --- a/apps/authz/Makefile +++ b/apps/authz/Makefile @@ -29,7 +29,13 @@ authz/test/integration: authz/test/e2e: npx nx test:e2e ${AUTHZ_PROJECT_NAME} +# === Open Policy Agent & Rego === + authz/rego/compile: mkdir -p ./rego-build - opa build -t wasm -e main/evaluate -o ./rego-build/policies.gz ${AUTHZ_PROJECT_DIR}/src/app/opa/rego/main.rego + opa build \ + --target wasm \ + --entrypoint main/evaluate \ + --output ./rego-build/policies.gz \ + ${AUTHZ_PROJECT_DIR}/src/app/opa/rego/main.rego tar -xzf ./rego-build/policies.gz -C ./rego-build/ diff --git a/apps/authz/src/app/app.controller.ts b/apps/authz/src/app/app.controller.ts index 827e6cb1c..e8e4607c4 100644 --- a/apps/authz/src/app/app.controller.ts +++ b/apps/authz/src/app/app.controller.ts @@ -1,7 +1,5 @@ -import { transactionRequestIntent } from '@narval/transaction-request-intent' -import { Controller, Get, Logger, Post } from '@nestjs/common' - import { generateInboundRequest } from '@app/authz/shared/module/persistence/mock_data' +import { Controller, Get, Logger, Post } from '@nestjs/common' import { AppService } from './app.service' @Controller() @@ -18,8 +16,7 @@ export class AppController { @Get('/ping') ping() { this.logger.log({ - message: 'Received ping', - test: transactionRequestIntent() + message: 'Received ping' }) return 'pong'