mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-26 17:24:56 +00:00
[MIGRATION] - Improving the testing build to avoid having to bundle also the js-api
This commit is contained in:
parent
92823bd8ab
commit
cf175c67b8
1
.github/workflows/pull-request.yml
vendored
1
.github/workflows/pull-request.yml
vendored
@ -205,7 +205,6 @@ jobs:
|
|||||||
- name: install
|
- name: install
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
npx nx run js-api:bundle
|
|
||||||
npx nx run cli:bundle
|
npx nx run cli:bundle
|
||||||
npx nx run testing:bundle
|
npx nx run testing:bundle
|
||||||
- run: npx nx print-affected $NX_CALCULATION_FLAGS
|
- run: npx nx print-affected $NX_CALCULATION_FLAGS
|
||||||
|
1
.github/workflows/release-branch.yml
vendored
1
.github/workflows/release-branch.yml
vendored
@ -97,7 +97,6 @@ jobs:
|
|||||||
- name: install
|
- name: install
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
npx nx run js-api:bundle
|
|
||||||
npx nx run cli:bundle
|
npx nx run cli:bundle
|
||||||
npx nx run testing:bundle
|
npx nx run testing:bundle
|
||||||
- uses: ./.github/actions/upload-node-modules-and-artifacts
|
- uses: ./.github/actions/upload-node-modules-and-artifacts
|
||||||
|
1
.github/workflows/release.yml
vendored
1
.github/workflows/release.yml
vendored
@ -102,7 +102,6 @@ jobs:
|
|||||||
- name: install
|
- name: install
|
||||||
run: |
|
run: |
|
||||||
npm ci
|
npm ci
|
||||||
npx nx run js-api:bundle
|
|
||||||
npx nx run cli:bundle
|
npx nx run cli:bundle
|
||||||
npx nx run testing:bundle
|
npx nx run testing:bundle
|
||||||
- uses: ./.github/actions/upload-node-modules-and-artifacts
|
- uses: ./.github/actions/upload-node-modules-and-artifacts
|
||||||
|
@ -5,27 +5,17 @@
|
|||||||
"projectType": "library",
|
"projectType": "library",
|
||||||
"prefix": "adf",
|
"prefix": "adf",
|
||||||
"targets": {
|
"targets": {
|
||||||
|
|
||||||
"build": {
|
"build": {
|
||||||
"executor": "@nx/webpack:webpack",
|
"executor": "@angular-devkit/build-angular:ng-packagr",
|
||||||
"options": {
|
"options": {
|
||||||
"projectRoot": "lib/testing",
|
"tsConfig": "lib/testing/tsconfig.lib.json",
|
||||||
"outputPath": "dist/libs/testing",
|
"project": "lib/testing/ng-package.json"
|
||||||
"main": "lib/testing/index.ts",
|
|
||||||
"generatePackageJson": true,
|
|
||||||
"tsConfig": "lib/testing/tsconfig.lib.prod.json",
|
|
||||||
"stylePreprocessorOptions": {
|
|
||||||
"includePaths": ["lib", "lib/core/src/lib"]
|
|
||||||
},
|
|
||||||
"target": "node",
|
|
||||||
"compiler": "tsc"
|
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"projectRoot": "lib/testing",
|
"project": "lib/testing/ng-package.json",
|
||||||
"outputPath": "dist/libs/testing",
|
"tsConfig": "lib/testing/tsconfig.prod.json"
|
||||||
"main": "lib/testing/index.ts",
|
|
||||||
"generatePackageJson": true,
|
|
||||||
"tsConfig": "lib/testing/tsconfig.lib.prod.json"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "production"
|
"defaultConfiguration": "production"
|
||||||
|
@ -18,9 +18,6 @@
|
|||||||
import { Column } from './column';
|
import { Column } from './column';
|
||||||
|
|
||||||
export class DateColumn extends Column {
|
export class DateColumn extends Column {
|
||||||
columnType: string;
|
|
||||||
columnName: string;
|
|
||||||
|
|
||||||
constructor(columnName: string) {
|
constructor(columnName: string) {
|
||||||
super(columnName, 'date');
|
super(columnName, 'date');
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,6 @@
|
|||||||
import { Column } from './column';
|
import { Column } from './column';
|
||||||
|
|
||||||
export class TextColumn extends Column {
|
export class TextColumn extends Column {
|
||||||
columnType: string;
|
|
||||||
columnName: string;
|
|
||||||
|
|
||||||
constructor(columnName: string) {
|
constructor(columnName: string) {
|
||||||
super(columnName, 'text');
|
super(columnName, 'text');
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@ import { ApiService } from '../../../shared/api/api.service';
|
|||||||
import { ApiUtil } from '../../../shared/api/api.util';
|
import { ApiUtil } from '../../../shared/api/api.util';
|
||||||
|
|
||||||
export class Application {
|
export class Application {
|
||||||
|
|
||||||
requestApiHelper: E2eRequestApiHelper;
|
requestApiHelper: E2eRequestApiHelper;
|
||||||
endPoint = `/deployment-service/v1/applications/`;
|
endPoint = `/deployment-service/v1/applications/`;
|
||||||
|
|
||||||
@ -57,6 +56,7 @@ export class Application {
|
|||||||
return this.requestApiHelper.delete(`${this.endPoint}${applicationName}`);
|
return this.requestApiHelper.delete(`${this.endPoint}${applicationName}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Logger.error(`[Application] Undeploy application ${applicationName} failed with error: ${error.message}`);
|
Logger.error(`[Application] Undeploy application ${applicationName} failed with error: ${error.message}`);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return ApiUtil.waitForApi(apiCall, isApplicationUndeployed, 10, 3000);
|
return ApiUtil.waitForApi(apiCall, isApplicationUndeployed, 10, 3000);
|
||||||
|
@ -23,7 +23,6 @@ import { ApiUtil } from '../../../shared/api/api.util';
|
|||||||
import { ApiService } from '../../../shared/api/api.service';
|
import { ApiService } from '../../../shared/api/api.service';
|
||||||
|
|
||||||
export class Descriptor {
|
export class Descriptor {
|
||||||
|
|
||||||
requestApiHelper: E2eRequestApiHelper;
|
requestApiHelper: E2eRequestApiHelper;
|
||||||
endPoint = `deployment-service/v1/descriptors/`;
|
endPoint = `deployment-service/v1/descriptors/`;
|
||||||
|
|
||||||
@ -61,6 +60,7 @@ export class Descriptor {
|
|||||||
return this.requestApiHelper.delete(`${this.endPoint}${name}`);
|
return this.requestApiHelper.delete(`${this.endPoint}${name}`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
Logger.error(`[Descriptor] Delete descriptor ${name} failed with error: ${error.message}`);
|
Logger.error(`[Descriptor] Delete descriptor ${name} failed with error: ${error.message}`);
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return ApiUtil.waitForApi(apiCall, isDescriptorDeleted, 10, 15000);
|
return ApiUtil.waitForApi(apiCall, isDescriptorDeleted, 10, 15000);
|
||||||
|
@ -33,7 +33,7 @@ export class LogLevelsEnum extends Number {
|
|||||||
static SILENT: number = 0;
|
static SILENT: number = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const logLevels: { level: LogLevelsEnum; name: LOG_LEVEL }[] = [
|
export const logLevels: { level: number; name: LOG_LEVEL }[] = [
|
||||||
{ level: LogLevelsEnum.TRACE, name: 'TRACE' },
|
{ level: LogLevelsEnum.TRACE, name: 'TRACE' },
|
||||||
{ level: LogLevelsEnum.DEBUG, name: 'DEBUG' },
|
{ level: LogLevelsEnum.DEBUG, name: 'DEBUG' },
|
||||||
{ level: LogLevelsEnum.INFO, name: 'INFO' },
|
{ level: LogLevelsEnum.INFO, name: 'INFO' },
|
||||||
@ -51,11 +51,10 @@ export interface LoggerLike {
|
|||||||
|
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
export class GenericLogger implements LoggerLike {
|
export class GenericLogger implements LoggerLike {
|
||||||
|
private level: number;
|
||||||
private level: LogLevelsEnum;
|
|
||||||
|
|
||||||
constructor(logLevel: string) {
|
constructor(logLevel: string) {
|
||||||
this.level = logLevels.find(({name}) => name === logLevel)?.level || LogLevelsEnum.ERROR;
|
this.level = logLevels.find(({ name }) => name === logLevel)?.level || LogLevelsEnum.ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
info(...messages: string[]): void {
|
info(...messages: string[]): void {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"path": "./tsconfig.lib.json"
|
"path": "./tsconfig.lib.json"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./tsconfig.lib.prod.json"
|
"path": "./tsconfig.prod.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
"declarationMap": true,
|
"declarationMap": true,
|
||||||
"resolveJsonModule": true,
|
"resolveJsonModule": true,
|
||||||
"paths": {
|
"paths": {
|
||||||
"@alfresco/js-api": ["../../dist/libs/js-api"],
|
"@alfresco/js-api": ["../../../dist/libs/js-api"],
|
||||||
"@alfresco/js-api/*": ["../../dist/libs/js-api/*"]
|
"@alfresco/js-api/*": ["../../../dist/libs/js-api/*"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user