Skip to content

Commit

Permalink
fix(workspace): fix build, lint test
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherPHolder committed Sep 15, 2024
1 parent 2aa9275 commit 0b0bc72
Show file tree
Hide file tree
Showing 63 changed files with 246 additions and 256 deletions.
20 changes: 0 additions & 20 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,6 @@
"options": {
"targetName": "lint"
}
},
{
"plugin": "@nx/vite/plugin",
"options": {
"testTargetName": "test"
},
"include": [
"packages/runner-app/**/*",
"packages/audit-queue/**/*",
"packages/audit-store/**/*",
"packages/cli-middleware/**/*",
"packages/user-flow-replay/**/*"
]
},
{
"plugin": "@nx/vite/plugin",
"options": {
"testTargetName": "e2e"
},
"include": ["packages/esbuild-meta/**/*", "packages/runner-e2e/**/*"]
}
]
}
3 changes: 2 additions & 1 deletion packages/aws-deploy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"@nx/devkit": "19.5.7",
"@aws-sdk/client-lambda": "^3.609.0",
"dotenv": "16.4.5",
"archiver": "^7.0.1"
"archiver": "^7.0.1",
"@app-speed/shared/data-access": "0.0.1"
},
"type": "commonjs",
"main": "./src/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-deploy/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "aws-deploy",
"name": "aws-deploy-nx-plugin",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/aws-deploy/src",
"projectType": "library",
Expand Down
11 changes: 0 additions & 11 deletions packages/conductor/is-online-ser/README.md

This file was deleted.

14 changes: 7 additions & 7 deletions packages/conductor/is-online-ser/project.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "conductor-is-online-ser",
"name": "conductor-is-online-service",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/userflow-conductor/is-online-ser/src",
"sourceRoot": "packages/conductor/is-online-ser/src",
"projectType": "application",
"tags": ["lambda"],
"targets": {
"build": {
"executor": "@nx/esbuild:esbuild",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/userflow-conductor/is-online-ser",
"main": "packages/userflow-conductor/is-online-ser/src/index.ts",
"tsConfig": "packages/userflow-conductor/is-online-ser/tsconfig.lib.json",
"outputPath": "dist/{projectRoot}",
"main": "{projectRoot}/src/index.ts",
"tsConfig": "{projectRoot}/tsconfig.lib.json",
"declaration": false,
"bundle": true,
"minify": true,
Expand All @@ -25,7 +25,7 @@
"deploy": {
"executor": "@app-speed/aws-deploy:lambda-deploy",
"options": {
"dist": "dist/packages/userflow-conductor/is-online-ser",
"dist": "dist/{projectRoot}",
"functionName": "AppSpeed_IsOnline"
},
"dependsOn": ["build"]
Expand All @@ -34,7 +34,7 @@
"executor": "@nx/vite:test",
"outputs": ["{options.reportsDirectory}"],
"options": {
"reportsDirectory": "../../../coverage/packages/userflow-conductor/is-online-ser"
"reportsDirectory": "../../../coverage/{projectRoot}"
}
}
}
Expand Down
11 changes: 0 additions & 11 deletions packages/conductor/schedule-audit/README.md

This file was deleted.

5 changes: 3 additions & 2 deletions packages/conductor/schedule-audit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
"name": "conductor-schedule-audit",
"version": "0.0.1",
"dependencies": {
"@app-speed/constructor/shared-util-lib": "0.0.1",
"@aws-sdk/client-sqs": "^3.186.0",
"@aws-sdk/client-ec2": "^3.226.0",
"@aws-sdk/client-ssm": "^3.226.0"
"@aws-sdk/client-ssm": "^3.226.0",
"@app-speed/shared/websocket-util-lib": "0.0.1",
"@app-speed/shared/data-access": "0.0.1"
},
"type": "module",
"private": true
Expand Down
14 changes: 7 additions & 7 deletions packages/conductor/schedule-audit/project.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "schedule-audit",
"name": "conductor-schedule-audit-service",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/userflow-conductor/schedule-audit/src",
"projectType": "library",
"sourceRoot": "packages/conductor/schedule-audit/src",
"projectType": "application",
"tags": ["lambda"],
"targets": {
"build": {
"executor": "@nx/esbuild:esbuild",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/userflow-conductor/schedule-audit",
"main": "packages/userflow-conductor/schedule-audit/src/index.ts",
"tsConfig": "packages/userflow-conductor/schedule-audit/tsconfig.lib.json",
"outputPath": "dist/{projectRoot}",
"main": "{projectRoot}/src/index.ts",
"tsConfig": "{projectRoot}/tsconfig.lib.json",
"declaration": false,
"bundle": true,
"minify": false,
Expand All @@ -25,7 +25,7 @@
"deploy": {
"executor": "@app-speed/aws-deploy:lambda-deploy",
"options": {
"dist": "dist/packages/userflow-conductor-svc",
"dist": "dist/{projectRoot}",
"functionName": "AppSpeed_Userflow_Conductor"
},
"dependsOn": ["build"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
waitUntilInstanceRunning,
} from '@aws-sdk/client-ec2';
import { SendCommandCommand, SendCommandCommandOutput, SSMClient } from '@aws-sdk/client-ssm';
import { CONDUCTOR_STAGE, StageChangeMessage } from '@app-speed/shared/websocket-message-util-lib';
import { CONDUCTOR_STAGE, StageChangeMessage } from '@app-speed/shared/websocket-util-lib';
import { DEFAULT_AWS_REGION } from '@app-speed/shared/data-access';

const INSTANCE_IDS = ['i-0781d8307e3c9e9f7'];
Expand Down
11 changes: 0 additions & 11 deletions packages/conductor/shared-util-lib/README.md

This file was deleted.

15 changes: 7 additions & 8 deletions packages/conductor/shared-util-lib/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "shared-util-lib",
"name": "conductor-shared-util-lib",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/conductor/shared-util-lib/src",
"projectType": "library",
Expand All @@ -9,19 +9,18 @@
"executor": "@nx/esbuild:esbuild",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/userflow-conductor/shared-util-lib",
"main": "packages/userflow-conductor/shared-util-lib/src/index.ts",
"tsConfig": "packages/userflow-conductor/shared-util-lib/tsconfig.lib.json",
"assets": ["packages/userflow-conductor/shared-util-lib/*.md"],
"generatePackageJson": true,
"format": ["cjs"]
"outputPath": "dist/{projectRoot}",
"main": "{projectRoot}/src/index.ts",
"tsConfig": "{projectRoot}/tsconfig.lib.json",
"assets": [],
"format": ["esm"]
}
},
"test": {
"executor": "@nx/vite:test",
"outputs": ["{options.reportsDirectory}"],
"options": {
"reportsDirectory": "../../../coverage/packages/userflow-conductor/shared-util-lib"
"reportsDirectory": "../../../coverage/{projectRoot}"
}
}
}
Expand Down
11 changes: 0 additions & 11 deletions packages/conductor/socket-io-ser/README.md

This file was deleted.

12 changes: 6 additions & 6 deletions packages/conductor/socket-io-ser/project.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "conductor-socket-io-ser",
"name": "conductor-socket-io-service",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/conductor/socket-io-ser/src",
"projectType": "application",
Expand All @@ -9,9 +9,9 @@
"executor": "@nx/esbuild:esbuild",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/conductor/socket-io-ser",
"main": "packages/conductor/socket-io-ser/src/index.ts",
"tsConfig": "packages/conductor/socket-io-ser/tsconfig.lib.json",
"outputPath": "dist/{projectRoot}",
"main": "{projectRoot}/src/index.ts",
"tsConfig": "{projectRoot}/tsconfig.lib.json",
"declaration": false,
"bundle": true,
"minify": false,
Expand All @@ -25,7 +25,7 @@
"deploy": {
"executor": "@app-speed/aws-deploy:lambda-deploy",
"options": {
"dist": "dist/packages/conductor/socket-io-ser",
"dist": "dist/{projectRoot}",
"functionName": "AppSpeed_Socket-IO"
},
"dependsOn": ["build"]
Expand All @@ -34,7 +34,7 @@
"executor": "@nx/vite:test",
"outputs": ["{options.reportsDirectory}"],
"options": {
"reportsDirectory": "../../../coverage/packages/conductor/socket-io-ser"
"reportsDirectory": "../../../coverage/{projectRoot}"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/portal/app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"index": "{projectRoot}/src/index.html",
"main": "{projectRoot}/src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "packages/portal/app/tsconfig.app.json",
"tsConfig": "{projectRoot}/tsconfig.app.json",
"assets": ["{projectRoot}/src/favicon.ico", "{projectRoot}/src/assets"],
"styles": ["{projectRoot}/src/styles.scss"]
},
Expand Down
4 changes: 2 additions & 2 deletions packages/portal/app/src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export const appRoutes: Route[] = [
children: [
{
path: '',
loadComponent: () => import('@portal/feature/user-flow'),
loadComponent: () => import('@app-speed/portal-feature/user-flow'),
},
{
path: 'viewer',
loadComponent: () => import('@portal/feature/viewer'),
loadComponent: () => import('@app-speed/portal-feature/viewer'),
},
],
},
Expand Down
8 changes: 6 additions & 2 deletions packages/portal/data-access/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"name": "@portal/data-access",
"name": "@app-speed/portal-data-access",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^18.1.0",
"@angular/core": "^18.1.0"
"@angular/core": "^18.1.0",
"rxjs": "~7.5.0",
"@rx-angular/state": "18.0.0",
"@app-speed/shared/websocket-util-lib": "0.0.1",
"jest-preset-angular": "14.1.0"
},
"sideEffects": false
}
10 changes: 5 additions & 5 deletions packages/portal/data-access/project.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "portal-data-access",
"name": "portal-data-access-lib",
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
"projectType": "library",
"sourceRoot": "packages/portal/data-access/src",
"prefix": "lib",
"projectType": "library",
"tags": [],
"targets": {
"build": {
"executor": "@nx/angular:ng-packagr-lite",
"outputs": ["{workspaceRoot}/dist/{projectRoot}"],
"options": {
"project": "packages/portal/data-access/ng-package.json"
"project": "{projectRoot}/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "packages/portal/data-access/tsconfig.lib.prod.json"
"tsConfig": "{projectRoot}/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "packages/portal/data-access/tsconfig.lib.json"
"tsConfig": "{projectRoot}/tsconfig.lib.json"
}
},
"defaultConfiguration": "production"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { Injectable } from '@angular/core';
import { webSocket } from 'rxjs/webSocket';
import { BehaviorSubject, filter, map, merge } from 'rxjs';
import {
CONDUCTOR_STAGE,
isDoneStageChangeMessage,
isStageChangeMessage,
} from '@app-speed/shared/websocket-message-util-lib';
import { CONDUCTOR_STAGE, isDoneStageChangeMessage, isStageChangeMessage } from '@app-speed/shared/websocket-util-lib';

const STAGE = {
BUILDING: 'building',
Expand Down
2 changes: 1 addition & 1 deletion packages/portal/data-access/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"target": "es2022",
"forceConsistentCasingInFileNames": true,
Expand All @@ -18,7 +19,6 @@
"path": "./tsconfig.spec.json"
}
],
"extends": "../../../tsconfig.base.json",
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { DEFAULT_AUDIT_DETAILS } from '../schema/audit.constants';
import { AuditDetails } from '../schema/types';
import { rxEffects } from '@rx-angular/state/effects';
import { MatProgressSpinner } from '@angular/material/progress-spinner';
import { SchedulerService } from '@portal/data-access';
import { SchedulerService } from '@app-speed/portal-data-access';

@Component({
selector: 'builder-form',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { toObservable, toSignal } from '@angular/core/rxjs-interop';
import { filter, map, switchMap } from 'rxjs';
import { HttpClient } from '@angular/common/http';
import { JsonPipe } from '@angular/common';
import { S3_RESULTS_BUCKET_URL } from '@portal/data-access';
import { S3_RESULTS_BUCKET_URL } from '@app-speed/portal-data-access';

@Component({
selector: 'viewer-container',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
MatTable,
} from '@angular/material/table';
import { JsonPipe, NgFor } from '@angular/common';
import { ScrollContainerComponent } from '@portal/ui/scroll-container';
import { ScrollContainerComponent } from '@app-speed/portal-ui/scroll-container';
import { RoundPipe } from '../utils/round.pipe';
import { KibibytesPipe } from '../utils/kibibytes.pipe';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import {
} from '@angular/material/table';
import { MatIcon } from '@angular/material/icon';
import { MatCard, MatCardContent, MatCardHeader, MatCardTitle } from '@angular/material/card';
import { ScrollContainerComponent } from '@portal/ui/scroll-container';
import { RadialChartComponent } from '@portal/ui/radial-chart';
import { ScrollContainerComponent } from '@app-speed/portal-ui/scroll-container';
import { RadialChartComponent } from '@app-speed/portal-ui/radial-chart';
import { ViewerScoreComponent } from './viewer-score.component';

export type StepSummary = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Result as AuditResult } from 'lighthouse/types/lhr/audit-result';
import { STATUS, StatusOptions } from '@portal/ui/status-badge';
import { STATUS, StatusOptions } from '@app-speed/portal-ui/status-badge';
import { FlowResult, Result } from 'lighthouse';
import { MetricSummary } from './viewer-step-metric-summary.component';

Expand Down
Loading

0 comments on commit 0b0bc72

Please sign in to comment.