Skip to content

Commit

Permalink
Merge branch 'aas-core' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfaron committed Jul 3, 2024
2 parents 2c21236 + 5025ddf commit 321b386
Show file tree
Hide file tree
Showing 213 changed files with 224 additions and 218 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
"run-script",
"test",
"-w",
"common"
"aas-core"
]
},
{
Expand All @@ -118,7 +118,7 @@
"run-script",
"test",
"-w",
"common",
"aas-core",
"--testPathPattern",
"${fileBasename}"
]
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"jest.debugMode": true,
"jest.virtualFolders": [
{
"name": "common",
"rootPath": "./projects/common",
"name": "aas-core",
"rootPath": "./projects/aas-core",
"runMode": "on-demand",
"jestCommandLine": "node --experimental-vm-modules --no-warnings ../../node_modules/jest/bin/jest.js"
},
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ COPY package.json package.json
COPY projects/aas-server/package.json projects/aas-server/package.json
COPY --from=build /usr/src/app/projects/aas-server/dist/ /usr/src/app/
COPY --from=build /usr/src/app/projects/aas-server/app-info.json /usr/src/app/app-info.json
COPY --from=build /usr/src/app/projects/common/dist/ /usr/src/app/node_modules/common/dist/
COPY --from=build /usr/src/app/projects/common/package.json /usr/src/app/node_modules/common/package.json
COPY --from=build /usr/src/app/projects/aas-core/dist/ /usr/src/app/node_modules/common/dist/
COPY --from=build /usr/src/app/projects/aas-core/package.json /usr/src/app/node_modules/common/package.json
COPY --from=build /usr/src/app/projects/aas-portal/dist/browser/ /usr/src/app/wwwroot/
RUN npm install -w=aas-server --omit=dev
COPY projects/aas-server/src/assets assets/
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.aas-server
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ COPY package.json package.json
COPY projects/aas-server/package.json projects/aas-server/package.json
COPY --from=build /usr/src/app/projects/aas-server/dist/ /usr/src/app/
COPY --from=build /usr/src/app/projects/aas-server/app-info.json /usr/src/app/app-info.json
COPY --from=build /usr/src/app/projects/common/dist/ /usr/src/app/node_modules/common/dist/
COPY --from=build /usr/src/app/projects/common/package.json /usr/src/app/node_modules/common/package.json
COPY --from=build /usr/src/app/projects/aas-core/dist/ /usr/src/app/node_modules/common/dist/
COPY --from=build /usr/src/app/projects/aas-core/package.json /usr/src/app/node_modules/common/package.json
RUN npm install -w=aas-server --omit=dev
COPY projects/aas-server/src/assets assets/
ENV NODE_LOG=./log/debug.log
Expand Down
2 changes: 1 addition & 1 deletion copyright-header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ checkFilesAsync([
'./projects/aas-portal/src',
'./projects/aas-server/src',
'./projects/aas-lib/src',
'./projects/common/src',
'./projects/aas-core/src',
]);

async function checkFilesAsync(dirs: string[]): Promise<void> {
Expand Down
18 changes: 9 additions & 9 deletions coverage-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,55 +11,55 @@ import { readFileSync } from 'fs';
main();

function main() {
const commonSummary = read('./reports/common/coverage-summary.json');
const aasCoreSummary = read('./reports/aas-core/coverage-summary.json');
const aasServerSummary = read('./reports/aas-server/coverage-summary.json');
const aasLibSummary = read('./reports/aas-lib/coverage-summary.json');
const aasPortalSummary = read('./reports/aas-portal/coverage-summary.json');

const statementsTotal =
commonSummary.total.statements.total +
aasCoreSummary.total.statements.total +
aasServerSummary.total.statements.total +
aasLibSummary.total.statements.total +
aasPortalSummary.total.statements.total;

const statementsCovered =
commonSummary.total.statements.covered +
aasCoreSummary.total.statements.covered +
aasServerSummary.total.statements.covered +
aasLibSummary.total.statements.covered +
aasPortalSummary.total.statements.covered;

const branchesTotal =
commonSummary.total.branches.total +
aasCoreSummary.total.branches.total +
aasServerSummary.total.branches.total +
aasLibSummary.total.branches.total +
aasPortalSummary.total.branches.total;

const branchesCovered =
commonSummary.total.branches.covered +
aasCoreSummary.total.branches.covered +
aasServerSummary.total.branches.covered +
aasLibSummary.total.branches.covered +
aasPortalSummary.total.branches.covered;

const functionsTotal =
commonSummary.total.functions.total +
aasCoreSummary.total.functions.total +
aasServerSummary.total.functions.total +
aasLibSummary.total.functions.total +
aasPortalSummary.total.functions.total;

const functionsCovered =
commonSummary.total.functions.covered +
aasCoreSummary.total.functions.covered +
aasServerSummary.total.functions.covered +
aasLibSummary.total.functions.covered +
aasPortalSummary.total.functions.covered;

const total =
commonSummary.total.lines.total +
aasCoreSummary.total.lines.total +
aasServerSummary.total.lines.total +
aasLibSummary.total.lines.total +
aasPortalSummary.total.lines.total;

const covered =
commonSummary.total.lines.covered +
aasCoreSummary.total.lines.covered +
aasServerSummary.total.lines.covered +
aasLibSummary.total.lines.covered +
aasPortalSummary.total.lines.covered;
Expand Down
22 changes: 15 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"tsc": "npm run tsc -ws",
"build": "npm run build -ws",
"build:debug": "npm run build:debug -ws",
"lib:build": "npm run build -w common -w aas-lib",
"lib:build:debug": "npm run build:debug -w common -w aas-lib",
"aas-portal:build": "npm run build -w common -w aas-lib -w aas-portal",
"aas-portal:build:debug": "npm run build:build -w common -w aas-lib -w aas-portal",
"aas-server:build": "npm run build -w common -w aas-server",
"aas-server:build:debug": "npm run build:debug -w common -w aas-server",
"lib:build": "npm run build -w aas-core -w aas-lib",
"lib:build:debug": "npm run build:debug -w aas-core -w aas-lib",
"aas-portal:build": "npm run build -w aas-core -w aas-lib -w aas-portal",
"aas-portal:build:debug": "npm run build:build -w aas-core -w aas-lib -w aas-portal",
"aas-server:build": "npm run build -w aas-core -w aas-server",
"aas-server:build:debug": "npm run build:debug -w aas-core -w aas-server",
"serve": "npm run build && node --env-file projects/aas-server/.env projects/aas-server/dist/aas-server.js"
},
"repository": {
Expand All @@ -32,7 +32,7 @@
"license": "Apache-2.0",
"workspaces": [
"projects/fhg-jest",
"projects/common",
"projects/aas-core",
"projects/aas-server",
"projects/aas-lib",
"projects/aas-portal"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import * as esbuild from 'esbuild';

await esbuild.build({
entryPoints: ['./src/lib/index.ts'],
outfile: './dist/common.js',
outfile: './dist/aas-core.js',
bundle: true,
platform: 'neutral',
format: 'esm',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import * as esbuild from 'esbuild';

await esbuild.build({
entryPoints: ['./src/lib/index.ts'],
outfile: './dist/common.js',
outfile: './dist/aas-core.js',
bundle: true,
platform: 'neutral',
format: 'esm',
target: 'es2022',
tsconfig: 'tsconfig.lib.json',
minify: true,
external: ['lodash-es']
});
external: ['lodash-es'],
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const config: Config = {
clearMocks: true,
collectCoverage: true,
collectCoverageFrom: ['<rootDir>/src/lib/**/*.ts'],
coverageDirectory: '<rootDir>/../../reports/common',
coverageDirectory: '<rootDir>/../../reports/aas-core',
coverageReporters: ['html', 'json-summary', 'cobertura'],
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "common",
"name": "aas-core",
"version": "3.0.0",
"description": "Common types and utilities for the Web-AAS project",
"module": "./dist/lib/index.js",
"main": "./dist/common.js",
"main": "./dist/aas-core.js",
"types": "./dist/types/index.d.ts",
"author": "Fraunhofer IOSB-INA",
"license": "Apache-2.0",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/aas-table/aas-table-row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
*****************************************************************************/

import { AASDocument } from 'common';
import { AASDocument } from 'aas-core';
import { Tree, TreeNode } from '../tree';

export class AASTableRow extends TreeNode<AASDocument> {
Expand Down
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/aas-table/aas-table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
import { Router } from '@angular/router';
import { NgbTooltip } from '@ng-bootstrap/ng-bootstrap';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { AASDocument } from 'common';
import { AASDocument } from 'aas-core';

import { AASTableRow } from './aas-table-row';
import { ClipboardService } from '../clipboard.service';
Expand Down
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/aas-table/aas-table.filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
parseDate,
toBoolean,
flat,
} from 'common';
} from 'aas-core';

export type ElementValueType = 'string' | 'boolean' | 'number' | 'Date' | 'bigint';

Expand Down
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/aas-table/aas-table.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { Injectable, signal, untracked } from '@angular/core';
import findLastIndex from 'lodash-es/findLastIndex';
import { AASDocument } from 'common';
import { AASDocument } from 'aas-core';
import { ViewMode } from '../types/view-mode';
import { AASTableRow, AASTableTree } from './aas-table-row';

Expand Down
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/aas-tree/aas-tree-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { aas, AASDocument, AuthResult } from 'common';
import { aas, AASDocument, AuthResult } from 'aas-core';
import { encodeBase64Url } from '../convert';

/** The client side AAS provider service. */
Expand Down
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/aas-tree/aas-tree-row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
selectReferable,
toBoolean,
toLocale,
} from 'common';
} from 'aas-core';

import { resolveSemanticId, supportedSubmodelTemplates } from '../submodel-template/submodel-template';
import { Tree, TreeNode } from '../tree';
Expand Down
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/aas-tree/aas-tree-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
getModelTypeFromAbbreviation,
parseDate,
parseNumber,
} from 'common';
} from 'aas-core';

import { normalize } from '../convert';
import { AASTreeRow } from './aas-tree-row';
Expand Down
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/aas-tree/aas-tree.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
mimeTypeToExtension,
selectReferable,
stringFormat,
} from 'common';
} from 'aas-core';

import { AASTreeRow } from './aas-tree-row';
import { OnlineState } from '../types/online-state';
Expand Down
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/aas-tree/aas-tree.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import { Injectable, computed, signal } from '@angular/core';
import { AASTree, AASTreeRow } from './aas-tree-row';
import { AASDocument, aas } from 'common';
import { AASDocument, aas } from 'aas-core';
import { TranslateService } from '@ngx-translate/core';
import { NotifyService } from '../notify/notify.service';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
toInvariant,
convertToString,
toBoolean,
} from 'common';
} from 'aas-core';

export interface VariableItem {
submodelElement: aas.SubmodelElement;
Expand Down
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/auth/auth-api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { Credentials, UserProfile, Cookie, AuthResult } from 'common';
import { Credentials, UserProfile, Cookie, AuthResult } from 'aas-core';
import { encodeBase64Url } from '../convert';

@Injectable({
Expand Down
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
UserRole,
JWTPayload,
toBoolean,
} from 'common';
} from 'aas-core';

import { NotifyService } from '../notify/notify.service';
import { ERRORS } from '../types/errors';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NgbActiveModal, NgbToast } from '@ng-bootstrap/ng-bootstrap';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { Credentials, isValidEMail, isValidPassword, stringFormat } from 'common';
import { Credentials, isValidEMail, isValidPassword, stringFormat } from 'aas-core';
import isEmpty from 'lodash-es/isEmpty';

import { messageToString } from '../../convert';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NgbActiveModal, NgbCollapse, NgbToast } from '@ng-bootstrap/ng-bootstrap';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { getUserNameFromEMail, isValidEMail, isValidPassword, stringFormat, UserProfile } from 'common';
import { getUserNameFromEMail, isValidEMail, isValidPassword, stringFormat, UserProfile } from 'aas-core';
import { messageToString } from '../../convert';
import { ERRORS } from '../../types/errors';
import { AuthApiService } from '../auth-api.service';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import isEmpty from 'lodash-es/isEmpty';
import { ChangeDetectionStrategy, Component, signal } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NgbActiveModal, NgbToast } from '@ng-bootstrap/ng-bootstrap';
import { isValidEMail, isValidPassword, stringFormat, UserProfile, getUserNameFromEMail } from 'common';
import { isValidEMail, isValidPassword, stringFormat, UserProfile, getUserNameFromEMail } from 'aas-core';
import { TranslateModule, TranslateService } from '@ngx-translate/core';

import { AuthApiService } from '../auth-api.service';
Expand Down
Loading

0 comments on commit 321b386

Please sign in to comment.