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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

2
package-lock.json generated
View File

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

View File

@@ -2,7 +2,7 @@
"name": "alfresco-ng2-components", "name": "alfresco-ng2-components",
"commit": "b644b39d17396330d2a67509f58c5b9e890b9b13", "commit": "b644b39d17396330d2a67509f58c5b9e890b9b13",
"description": "Alfresco Angular components", "description": "Alfresco Angular components",
"version": "4.8.0", "version": "4.8.1",
"author": "Alfresco Software, Ltd.", "author": "Alfresco Software, Ltd.",
"main": "./index.js", "main": "./index.js",
"scripts": { "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]"* )]]; if [[ $TRAVIS_EVENT_TYPE == "push" || $TRAVIS_EVENT_TYPE == "cron" || ( $TRAVIS_EVENT_TYPE == "pull_request" && $COMMIT_MESSAGE == *"[create docker image]"* )]];
then then
if [[ $TRAVIS_BRANCH == "develop" || $TRAVIS_BRANCH == "master" ]]; if [[ $TRAVIS_BRANCH == "develop" || $TRAVIS_BRANCH =~ ^master(-patch.*)?$ ]];
then then
cd $DIR/../../../ 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') TAGS=$(grep -m1 version package.json | awk '{ print $2 }' | sed 's/[", ]//g')
else else
if [[ "${TRAVIS_PULL_REQUEST_BRANCH}" != "" ]]; if [[ "${TRAVIS_PULL_REQUEST_BRANCH}" != "" ]];