Skip to content

Commit 46cc0b3

Browse files
michelu89pavel-s-epamgeorgemoscu
authored
Fix/set right esmf sdk version (#291)
* Update sdkVersion to 2.10.3 in config Bumped the sdkVersion from 2.7.0 to 2.10.3 in the shared config. This ensures the application uses the latest SDK features and fixes. * Fix file path handling and update Electron dependencies Updated file-handling.service.ts to use webkitRelativePath for file path and name extraction, ensuring correct handling of files from directory uploads. Upgraded Electron and related build dependencies in package.json and package-lock.json to improve compatibility and support for newer Electron versions. * Remove import package validation from namespace importer Eliminated the import package validation flow and related components from the namespace importer. The router now directly loads the import component, and service logic for validating packages and handling workspace files has been removed. This simplifies the import process and cleans up unused code. * Update aspect-models path in package.json Changed asset source paths from 'org.eclipse.examples' to 'com.examples' in multiple copy operations to reflect updated directory structure. * Remove log file from core directory Deleted the core/log.log file, likely to clean up generated or unnecessary log output from version control. * Refactor model file deletion and header building Simplifies the model file deletion API by removing the need for absolute model name and namespace parameters. Updates usages across services and components to use only aspectModelUrn. Removes unused methods from HttpHeaderBuilder and cleans up related code for better maintainability. * Remove namespace importer/exporter components and refactor services Deleted all namespace importer/exporter components, routers, and related shared models from namespace-manager. Refactored NamespacesManagerService to remove dialog-based flows and injection tokens, simplifying import/export logic. Updated API and editor services to support aspect model filtering. Adjusted UI and error handling for namespace selection and workspace import. Updated i18n text for export dialog. * Refactor ModelApiService and update related usages Renamed and refactored methods in ModelApiService for clarity and consistency, such as replacing getAspectMetaModel with fetchAspectMetaModel, formatModel with fetchFormatedAspectModel, and saveModel with saveAspectModel. Updated all usages across the codebase to use the new method names. Removed unused and redundant code, including PREDEFINED_MODELS and removeCommentsFromTTL. Improved error handling and documentation generation logic in GenerateDocumentationComponent. Adjusted workspace refresh logic in ElectronTunnelService and windows-manager.js for consistency. * Remove vocabulary library and refactor RDF helpers Deleted the vocabulary library and its references from the project. Refactored RDF helper functions by moving getPredicateByKey from constants to RdfListHelper, removed unused code from RDF services and utils, and updated imports and exports accordingly. Also removed CdkScrollable from migrator components and added license headers to sidebar styles. * Remove duplicate constants file and update TODO comments Deleted the redundant 'rdf-list.contants.ts' file and updated various TODO comments across the codebase for consistency. Minor documentation and formatting improvements were made in markdown and code files, and an unused import was removed from 'select-namespaces.component.ts'. * Update SDK version to 2.11.1 in config Bumps the sdkVersion field in the shared config from 2.10.3 to 2.11.1 to reflect the latest SDK release. * Refactor API to use FormData and file URI headers Updated ModelApiService methods to send RDF content as FormData with a file URI header instead of raw string and content-type header. Added createAspectModelFormData helper and withFileUri method to HttpHeaderBuilder to support this change, improving file handling and request consistency. * Refactor migrator components and update migration flow Removed legacy migrator components (migration-status, migration-success, samm-migration, version-migration) and replaced them with a unified migration-result component. Updated routing, service logic, and i18n keys to support the new migration result dialog. Refactored API and model handling to improve version tracking and error reporting during migration. Also updated related services and models to align with the new migration flow. * Refactor migration result handling and UI Removed unused migration status dialog and related translations. Updated migration result component to display warnings and errors with improved UI. Introduced MigrationStatus model and refactored API service to use it. Adjusted type definitions and data passing for migration results. * Remove migrator library and integrate migration dialog into sidebar The standalone migrator library and its components, services, and routes have been deleted. Migration-related helpers and UI have been moved and refactored under the sidebar library, specifically within the workspace-migrate feature. All references to the old migrator module have been removed or updated, and imports have been adjusted to use the new sidebar locations. This streamlines the migration workflow and consolidates related functionality under the sidebar module. * Add loading state and refactor rename model dialog Introduced a loading spinner to the rename model dialog while fetching namespace files, moved styles to a dedicated SCSS file, and refactored the component to use Angular signals and injectors. The file name validation logic was updated to use the latest API and ensure uniqueness, improving user feedback and maintainability. * Update error message check for import handling Modified the error message substring check from 'packages-to-import' to 'import' in the file import error handler. This broadens the match for import-related errors until file blockage is fixed. * Add error for already defined filename in rename dialog Introduces a new error message and validation for cases where a filename already exists in the user's namespace during model renaming. Updates i18n, template, TypeScript logic, and language interface to support this new error. * Refactor to standalone components and update configs Migrates Angular modules to standalone components, updates Jest configs to TypeScript, and adjusts ESLint and Prettier settings. Removes obsolete module files, updates project and test setup references, and improves dependency ignore rules. This refactor modernizes the codebase for Angular 15+ and Nx workspace best practices. * Update dependencies and Node engine requirements Upgraded several dependencies in package.json, including n3, ngx-toastr, jest, ngx-build-plus, and @types packages. Updated Node engine requirement to >=20.0.0 and synchronized optionalDependencies versions for @nx/nx-* packages. These changes improve compatibility and ensure the project uses the latest supported versions. * Refactor sidebar state to use Angular signals Replaces BehaviorSubjects and RxJS observables with Angular signals and computed properties for sidebar state management. Updates all sidebar and workspace components to use the new signal-based API, removing AsyncPipe and observable subscriptions where possible. This improves performance, simplifies state handling, and aligns with modern Angular best practices. * Add CSP meta tag and improve icon accessibility Introduces a Content-Security-Policy meta tag to index.html for enhanced security. Also sets aria-hidden="false" on the notifications icon in sidebar-menu.component.html to improve accessibility. * Handle aspect model URN changes and null checks Adds originalAspectModelUrn to NamespaceFile and updates logic to handle aspect model URN changes when renaming. Improves robustness by adding null checks in element-related methods. Updates Content Security Policy to allow data URLs for images. * Remove debugger statement from model-saver.service.ts Eliminated an unnecessary debugger statement from the conditional block in ModelSaverService to clean up the code. * Refactor file services and improve aspect handling Renamed LoadedFilesService variable for clarity in RenameModelComponent and updated references. Added null check for aspectModelUrn in aspectFactory. Removed unnecessary aspect check in ModelSaverService when handling name changes. Inserted debugger and TODO in constraint factory for future external reference handling. * Remove debugger statement from constraint index Eliminated an unnecessary debugger statement from the constraint instantiator index file to clean up the code. * Fix: Element creation (#64) Restores model loading mechanism on app init * Fix: model renaming & namespace change errors (#65) Signed-off-by: Pavel Shalamkov <[email protected]> * Fix: shared elements rendering issue (#66) Signed-off-by: Pavel Shalamkov <[email protected]> * Fix: incorrect "new model" name and title (#67) Changed to "new-model.ttl" Additionally changes the model's namespace to the one used for other example models Signed-off-by: Pavel Shalamkov <[email protected]> * Fix: element edit (#68) Fix: inability to open element edit menu Signed-off-by: Pavel Shalamkov <[email protected]> * Fix: e2e tests config (#69) Fix: e2e tests configuration errors Signed-off-by: Pavel Shalamkov <[email protected]> * Update Cypress setup and type definitions Adds explicit Cypress installation step to the GitHub Actions workflow and includes 'cypress' in the E2E tsconfig types. Also updates Cypress dependency to use a version range in package.json and package-lock.json for improved compatibility. * Refactor Cypress config and update dependencies Updated Cypress type references from 'Cypress' to 'cypress' across all e2e test files for consistency. Removed the obsolete plugins/index.js and migrated to Cypress 10+ configuration style. Added a new tsconfig.json for the e2e app, refactored tsconfig.cypress.json to extend from it, and cleaned up includes. Updated GitHub Actions workflows to use the latest actions/checkout and actions/setup-node versions. Refactored theme.scss to use a palette function for Material theme colors, improving maintainability. * Update Angular Material imports in data-type-input-field Replaces deprecated Angular Material imports with their corresponding module imports in data-type-input-field.component.ts. This change improves compatibility with newer Angular Material versions and aligns with best practices. * Refactor Material imports in input field components Replaces deprecated or individual Material imports with module imports (e.g., MatFormFieldModule, MatChipsModule, MatIconModule) in input field components. This improves compatibility with Angular Material's current best practices and prepares the codebase for future updates. * Fix form submission and add FormsModule import Changed form event binding from (submit) to (ngSubmit) in the template for proper Angular form handling. Added FormsModule to the component imports to ensure form directives work as expected. * Fix: workspace big loading time (#70) Reduced the loading times for workspace Co-authored-by: Michele Santoro <[email protected]> * Refactor to use MatFormFieldModule in field components Replaces usage of MatFormField with MatFormFieldModule across multiple editor dialog field components for improved Angular Material compatibility. Also removes an unused MatIconModule import in see-input-field.component.ts. No functional changes to component logic. * Refactor to use MatFormFieldModule instead of MatFormField Replaces deprecated MatFormField imports with MatFormFieldModule across all relevant components. This update aligns with Angular Material best practices and ensures compatibility with newer versions of the library. --------- Signed-off-by: Pavel Shalamkov <[email protected]> Co-authored-by: pavel-s-epam <[email protected]> Co-authored-by: georgemoscu <[email protected]>
1 parent b6ca9d1 commit 46cc0b3

File tree

567 files changed

+22019
-21478
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

567 files changed

+22019
-21478
lines changed

.github/workflows/codeql-scanning.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,19 @@ jobs:
2626
language: [ 'javascript' ]
2727

2828
steps:
29-
- name: Checkout repository
30-
uses: actions/checkout@v3
29+
- name: Checkout repository
30+
uses: actions/checkout@v5
3131

32-
# Initializes the CodeQL tools for scanning.
33-
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@v2
35-
with:
36-
languages: ${{ matrix.language }}
32+
# Initializes the CodeQL tools for scanning.
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v4
35+
with:
36+
languages: ${{ matrix.language }}
3737

38-
- name: Autobuild
39-
uses: github/codeql-action/autobuild@v2
38+
- name: Autobuild
39+
uses: github/codeql-action/autobuild@v4
4040

41-
- name: Perform CodeQL Analysis
42-
uses: github/codeql-action/analyze@v2
43-
with:
44-
category: "/language:${{matrix.language}}"
41+
- name: Perform CodeQL Analysis
42+
uses: github/codeql-action/analyze@v4
43+
with:
44+
category: "/language:${{matrix.language}}"

.github/workflows/push_request_check.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout project
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v5
2020

2121
- name: Cache node modules
2222
uses: actions/cache@v3
@@ -36,7 +36,7 @@ jobs:
3636
chrome-version: stable
3737

3838
- name: Setup NodeJs
39-
uses: actions/setup-node@v3
39+
uses: actions/setup-node@v4
4040
with:
4141
node-version: '22'
4242
cache: 'npm'
@@ -49,6 +49,7 @@ jobs:
4949
run: |
5050
npm ci --include=optional
5151
npm rebuild nx --update-binary
52+
npx cypress install
5253
working-directory: core
5354

5455
- name: Identifying and reporting lint patterns

CONTRIBUTING.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ the [Git branching guidance](https://docs.microsoft.com/en-us/azure/devops/repos
2929

3030
More specifically the repository has the following branches:
3131

32-
name of branch | description
33-
-----------------------------------|------------------------------------------------------------------
34-
`main` | Contains the latest state of the repository
35-
`v{version_number}-RC{rc_number}` | A "release candidate": A version that freezes major features and
32+
| name of branch | description |
33+
|-----------------------------------|------------------------------------------------------------------|
34+
| `main` | Contains the latest state of the repository |
35+
| `v{version_number}-RC{rc_number}` | A "release candidate": A version that freezes major features and |
3636

3737
can be considered a pre-release of the next full release.
3838
`v{version_number}` | A full release of the respective version.
@@ -50,10 +50,10 @@ We use the `Issues` feature of GitHub for tracking all types of work in the repo
5050

5151
We distinguish between the following types of issues;
5252

53-
Issue Types | Description
54-
--------------|-----------------------------------------------------------------------------------------
55-
`Bug Report` | This `Issue` is dedicated to reporting a problem.
56-
`Task` | This `Issue` is used for describing and proposing a new work item (e.g., a new feature)
53+
| Issue Types | Description |
54+
|--------------|-----------------------------------------------------------------------------------------|
55+
| `Bug Report` | This `Issue` is dedicated to reporting a problem. |
56+
| `Task` | This `Issue` is used for describing and proposing a new work item (e.g., a new feature) |
5757

5858
If there are issues that link to the same topic, the creator of the issue shall mention those other tasks in the
5959
description. To group tasks that can belong together, one could further create an issue mentioning and describing

NOTICE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Antora
22
This repository contains software developed by the [Antora Project](https://antora.org/).
33

4-
Your use of Antora is subject to the terms and conditions of the Mozilla Public License 2.0. A copy of the license is contained in the file [LICENSE.txt](/LICENSE.txt) and is also available at https://mozilla.org/MPL/2.0/.
4+
Your use of Antora is subject to the terms and conditions of the Mozilla Public License 2.0. A copy of the license is contained in the file [LICENSE.txt](/LICENSE) and is also available at https://mozilla.org/MPL/2.0/.
55

66
The source code is available from [GitLab](https://gitlab.com/antora).

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
- [Introduction](#introduction)
66
- [Getting help](#getting-help)
7-
- [Getting started](#getting-started)
7+
- [Getting started](#getting-started-for-developers)
88
- [Setup](#setup)
99
- [Install & Run](#install--run)
1010
- [Run As Electron](#run-as-electron)
@@ -29,7 +29,7 @@ Are you having trouble with Aspect Model Editor? We want to help!
2929

3030
### Getting started (for developers)
3131

32-
#### Artifacts to use
32+
#### Artifacts to use
3333

3434
You can clone the repositories to run the aspect model editor. Feel free to contribute.
3535
If you want to run the aspect model editor from repositories, please ensure to clone and start the [backend](https://github.com/eclipse-esmf/esmf-aspect-model-editor-backend) first.

core/.eslintrc.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
"Function": false
3737
}
3838
}
39-
]
39+
],
40+
"@typescript-eslint/no-extra-semi": "error",
41+
"no-extra-semi": "off"
4042
}
4143
},
4244
{
@@ -45,7 +47,9 @@
4547
"rules": {
4648
"no-var": "error",
4749
"no-unused-vars": "error",
48-
"no-undef": "error"
50+
"no-undef": "error",
51+
"@typescript-eslint/no-extra-semi": "error",
52+
"no-extra-semi": "off"
4953
}
5054
}
5155
]

core/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
.nx
22
.angular
3+
.cursor/rules/nx-rules.mdc
4+
.github/instructions/nx.instructions.md
5+
logs

core/.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88

99
/.nx/cache
1010
.angular
11+
12+
/.nx/workspace-data

core/apps/ame-e2e/project.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
"executor": "@nx/cypress:cypress",
99
"options": {
1010
"cypressConfig": "cypress.config.js",
11-
"devServerTarget": "ame:serve:development",
12-
"tsConfig": "apps/ame-e2e/tsconfig.cypress.json"
11+
"devServerTarget": "ame:serve:development"
1312
},
1413
"configurations": {
1514
"production": {

core/apps/ame-e2e/src/integration/drag-and-drop/different-namespace/external-characteristic-reference.cy.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
* SPDX-License-Identifier: MPL-2.0
1212
*/
1313

14-
/// <reference types="Cypress" />
14+
/// <reference types="cypress" />
1515

16+
import {NAMESPACES_URL, SAMM_VERSION_ACTUAL} from '../../../support/api-mocks';
1617
import {
1718
SELECTOR_ecCharacteristic,
1819
SELECTOR_openNamespacesButton,
@@ -27,7 +28,7 @@ describe('Test drag and drop ext characteristic', () => {
2728
const fileName = 'external-characteristic-reference.ttl';
2829

2930
cy.intercept('POST', 'http://localhost:9090/ame/api/models/validate', {fixture: 'model-validation-response.json'});
30-
cy.intercept('GET', 'http://localhost:9090/ame/api/models/namespaces', {
31+
cy.intercept('GET', NAMESPACES_URL, {
3132
statusCode: 200,
3233
body: {
3334
'org.eclipse.different': [
@@ -37,6 +38,7 @@ describe('Test drag and drop ext characteristic', () => {
3738
{
3839
model: fileName,
3940
aspectModelUrn: 'urn:samm:org.eclipse.different:1.0.0#ExternalCharacteristic',
41+
version: SAMM_VERSION_ACTUAL,
4042
existing: true,
4143
},
4244
],

0 commit comments

Comments
 (0)