patch 4.8.1 (#7517)

* patch mec

* fix cloud vcariables 4.8.1 (#7511)

Signed-off-by: eromano <eugenioromano16@gmail.com>
This commit is contained in:
Eugenio Romano
2022-02-22 12:07:54 +00:00
committed by GitHub
parent e8871e7867
commit f8d3ccefa4
16 changed files with 67 additions and 53 deletions

View File

@@ -40,10 +40,8 @@ env:
branches:
only:
- master
- develop
- /.*old-env.*/
- /.*next-release.*/
- /^master(-patch.*)?$/
- /^develop(-patch.*)?$/
- /.*beta.*/
stages:
@@ -62,9 +60,9 @@ stages:
- name: "e2e Test"
if: type = pull_request || (type = cron || type = api)
- name: "Release tag"
if: branch = master
if: type = push AND branch =~ /^master(-patch.*)?$/
- name: "Deprecate develop builds"
if: branch = master
if: type = push AND branch =~ /^master(-patch.*)?$/
addons:
chrome: stable

View File

@@ -1,7 +1,7 @@
{
"name": "Alfresco-ADF-Angular-Demo",
"description": "Demo shell for Alfresco Angular components",
"version": "4.8.0",
"version": "4.8.1",
"author": "Alfresco Software, Ltd.",
"repository": {
"type": "git",

View File

@@ -1,6 +1,6 @@
{
"name": "@alfresco/adf-cli",
"version": "4.8.0",
"version": "4.8.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-cli",
"description": "Alfresco ADF cli and utils",
"version": "4.8.0",
"version": "4.8.1",
"author": "Alfresco Software, Ltd.",
"bin": {
"adf-cli": "./bin/adf-cli",

View File

@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-content-services",
"description": "Alfresco ADF content services",
"version": "4.8.0",
"version": "4.8.1",
"author": "Alfresco Software, Ltd.",
"main": "bundles/adf-content-services.js",
"repository": {
@@ -21,7 +21,7 @@
"@angular/material": ">=10.0.1",
"@angular/router": ">=10.0.2",
"@alfresco/js-api": "4.8.0",
"@alfresco/adf-core": "4.8.0",
"@alfresco/adf-core": "4.8.1",
"@ngx-translate/core": ">=13.0.0",
"moment": ">=2.22.2"
},

View File

@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-core",
"description": "Alfresco ADF core",
"version": "4.8.0",
"version": "4.8.1",
"author": "Alfresco Software, Ltd.",
"main": "bundles/adf-core.js",
"repository": {
@@ -27,7 +27,7 @@
"@mat-datetimepicker/core": ">=4.1.0",
"@mat-datetimepicker/moment": ">=4.1.0",
"@alfresco/js-api": "4.8.0",
"@alfresco/adf-extensions": "4.8.0",
"@alfresco/adf-extensions": "4.8.1",
"@ngx-translate/core": ">=13.0.0",
"minimatch-browser": ">=1.0.0",
"moment": ">=2.22.2",

View File

@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-extensions",
"description": "Provides extensibility support for ADF applications.",
"version": "4.8.0",
"version": "4.8.1",
"license": "Apache-2.0",
"author": "Alfresco Software, Ltd.",
"main": "bundles/adf-extensions.js",

View File

@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-insights",
"description": "Alfresco ADF insights",
"version": "4.8.0",
"version": "4.8.1",
"author": "Alfresco Software, Ltd.",
"main": "bundles/adf-insights.js",
"repository": {
@@ -17,7 +17,7 @@
"@angular/flex-layout": ">=10.0.0-beta.32",
"@angular/forms": ">=10.0.2",
"@angular/material": ">=10.0.1",
"@alfresco/adf-core": "4.8.0",
"@alfresco/adf-core": "4.8.1",
"@ngx-translate/core": ">=13.0.0",
"chart.js": ">=2.9.3",
"moment": ">=2.22.2",

View File

@@ -1,5 +1,5 @@
{
"name": "@alfresco/adf-process-services-cloud",
"version": "4.8.0",
"version": "4.8.1",
"lockfileVersion": 1
}

View File

@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-process-services-cloud",
"description": "Alfresco ADF process services cloud",
"version": "4.8.0",
"version": "4.8.1",
"author": "Alfresco Software, Ltd.",
"main": "bundles/adf-process-services-cloud.js",
"repository": {
@@ -19,8 +19,8 @@
"@angular/forms": ">=10.0.2",
"@angular/material": ">=10.0.1",
"@alfresco/js-api": "4.8.0",
"@alfresco/adf-core": "4.8.0",
"@alfresco/adf-content-services": "4.8.0",
"@alfresco/adf-core": "4.8.1",
"@alfresco/adf-content-services": "4.8.1",
"@apollo/client": "^3.3.7",
"@ngx-translate/core": ">=13.0.0",
"apollo-angular": "^2.2.0",

View File

@@ -24,8 +24,8 @@ import {
FormModel,
FormFieldOption
} from '@alfresco/adf-core';
import { Observable, from } from 'rxjs';
import { map, switchMap } from 'rxjs/operators';
import { Observable, from, EMPTY } from 'rxjs';
import { expand, map, reduce, switchMap } from 'rxjs/operators';
import { TaskDetailsCloudModel } from '../../task/start-task/models/task-details-cloud.model';
import { CompleteFormRepresentation, UploadApi } from '@alfresco/js-api';
import { TaskVariableCloud } from '../models/task-variable-cloud.model';
@@ -53,6 +53,7 @@ export class FormCloudService extends BaseCloudService implements FormCloudServi
/**
* Gets the form definition of a task.
*
* @param appName Name of the app
* @param taskId ID of the target task
* @param version Version of the form
@@ -60,27 +61,26 @@ export class FormCloudService extends BaseCloudService implements FormCloudServi
*/
getTaskForm(appName: string, taskId: string, version?: number): Observable<any> {
return this.getTask(appName, taskId).pipe(
switchMap(task => {
return this.getForm(appName, task.formKey, version).pipe(
map((form: FormContent) => {
const flattenForm = {
...form.formRepresentation,
...form.formRepresentation.formDefinition,
taskId: task.id,
taskName: task.name,
processDefinitionId: task.processDefinitionId,
processInstanceId: task.processInstanceId
};
delete flattenForm.formDefinition;
return flattenForm;
})
);
})
switchMap(task => this.getForm(appName, task.formKey, version).pipe(
map((form: FormContent) => {
const flattenForm = {
...form.formRepresentation,
...form.formRepresentation.formDefinition,
taskId: task.id,
taskName: task.name,
processDefinitionId: task.processDefinitionId,
processInstanceId: task.processInstanceId
};
delete flattenForm.formDefinition;
return flattenForm;
})
))
);
}
/**
* Saves a task form.
*
* @param appName Name of the app
* @param taskId ID of the target task
* @param processInstanceId ID of processInstance
@@ -120,6 +120,7 @@ export class FormCloudService extends BaseCloudService implements FormCloudServi
/**
* Completes a task form.
*
* @param appName Name of the app
* @param taskId ID of the target task
* @param processInstanceId ID of processInstance
@@ -131,11 +132,12 @@ export class FormCloudService extends BaseCloudService implements FormCloudServi
*/
completeTaskForm(appName: string, taskId: string, processInstanceId: string, formId: string, formValues: FormValues, outcome: string, version: number): Observable<TaskDetailsCloudModel> {
const apiUrl = `${this.getBasePath(appName)}/form/v1/forms/${formId}/submit/versions/${version}`;
const completeFormRepresentation = <CompleteFormRepresentation> {
const completeFormRepresentation = {
values: formValues,
taskId: taskId,
processInstanceId: processInstanceId
};
taskId,
processInstanceId
} as CompleteFormRepresentation;
if (outcome) {
completeFormRepresentation.outcome = outcome;
}
@@ -147,6 +149,7 @@ export class FormCloudService extends BaseCloudService implements FormCloudServi
/**
* Gets details of a task
*
* @param appName Name of the app
* @param taskId ID of the target task
* @returns Details of the task
@@ -161,22 +164,34 @@ export class FormCloudService extends BaseCloudService implements FormCloudServi
/**
* Gets the variables of a task.
*
* @param appName Name of the app
* @param taskId ID of the target task
* @returns Task variables
*/
getTaskVariables(appName: string, taskId: string): Observable<TaskVariableCloud[]> {
const apiUrl = `${this.getBasePath(appName)}/query/v1/tasks/${taskId}/variables`;
let skipCount = 0;
const maxItems = 1000;
return this.get(apiUrl).pipe(
return this.get(apiUrl, { maxItems, skipCount }).pipe(
expand((res: any) => {
skipCount += maxItems;
return res.list.pagination.hasMoreItems ? this.get(apiUrl, {
maxItems,
skipCount
}) : EMPTY;
}),
map((res: any) => {
return res.list.entries.map((variable) => new TaskVariableCloud(variable.entry));
})
}),
reduce((acc, res) => acc.concat(res), [])
);
}
/**
* Gets a form definition.
*
* @param appName Name of the app
* @param formKey key of the target task
* @param version Version of the form
@@ -200,6 +215,7 @@ export class FormCloudService extends BaseCloudService implements FormCloudServi
/**
* Parses JSON data to create a corresponding form.
*
* @param json JSON data to create the form
* @param data Values for the form's fields
* @param readOnly Toggles whether or not the form should be read-only
@@ -221,7 +237,7 @@ export class FormCloudService extends BaseCloudService implements FormCloudServi
const form = new FormModel(flattenForm, formValues, readOnly);
if (!json.fields) {
form.outcomes = [
new FormOutcomeModel(<any> form, {
new FormOutcomeModel(form, {
id: '$save',
name: FormOutcomeModel.SAVE_ACTION,
isSystem: true

View File

@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-process-services",
"description": "Alfresco ADF process services",
"version": "4.8.0",
"version": "4.8.1",
"author": "Alfresco Software, Ltd.",
"main": "bundles/adf-process-services.js",
"repository": {
@@ -20,8 +20,8 @@
"@angular/material": ">=10.0.1",
"@angular/router": ">=10.0.2",
"@alfresco/js-api": "4.8.0",
"@alfresco/adf-core": "4.8.0",
"@alfresco/adf-content-services": "4.8.0",
"@alfresco/adf-core": "4.8.1",
"@alfresco/adf-content-services": "4.8.1",
"@ngx-translate/core": ">=13.0.0",
"moment": ">=2.22.2"
},

View File

@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-testing",
"description": "Alfresco ADF testing page and utils",
"version": "4.8.0",
"version": "4.8.1",
"author": "Alfresco Software, Ltd.",
"repository": {
"type": "git",

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "alfresco-ng2-components",
"version": "4.8.0",
"version": "4.8.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -2,7 +2,7 @@
"name": "alfresco-ng2-components",
"commit": "b644b39d17396330d2a67509f58c5b9e890b9b13",
"description": "Alfresco Angular components",
"version": "4.8.0",
"version": "4.8.1",
"author": "Alfresco Software, Ltd.",
"main": "./index.js",
"scripts": {

View File

@@ -14,12 +14,12 @@ echo " Check Docker Image release for $COMMIT_MESSAGE type $TRAVIS_EVENT_T
if [[ $TRAVIS_EVENT_TYPE == "push" || $TRAVIS_EVENT_TYPE == "cron" || ( $TRAVIS_EVENT_TYPE == "pull_request" && $COMMIT_MESSAGE == *"[create docker image]"* )]];
then
if [[ $TRAVIS_BRANCH == "develop" || $TRAVIS_BRANCH == "master" ]];
if [[ $TRAVIS_BRANCH == "develop" || $TRAVIS_BRANCH =~ ^master(-patch.*)?$ ]];
then
cd $DIR/../../../
if [[ $TRAVIS_BRANCH == "master" ]]; then
if [[ $TRAVIS_BRANCH =~ ^master(-patch.*)?$ ]]; then
TAGS=$(grep -m1 version package.json | awk '{ print $2 }' | sed 's/[", ]//g')
else
if [[ "${TRAVIS_PULL_REQUEST_BRANCH}" != "" ]];