Compare commits

..
Author SHA1 Message Date
VitoAlbano 4bdb7f86c1 [ci:force] 2025-01-24 13:05:27 +00:00
VitoAlbano b59c25ba26 [ 2025-01-24 13:05:01 +00:00
VitoAlbano 46ff46c7f4 [AAE-26767] - Fixed lint 2025-01-24 13:05:01 +00:00
VitoAlbano 665cc9e201 [AAE-26767] - Fixed lint 2025-01-24 13:05:01 +00:00
DominikIwanek fa017e24d7 Change dialog label padding 2025-01-24 13:05:01 +00:00
swapnil-verma-gl 87ba1a4476 [ACS-9084] Fixed incorrect color for notification bell icon (#10513) 2025-01-24 13:05:01 +00:00
DominikIwanek 5a91b6b3c9 Fix ACA pipeline 2025-01-24 13:05:01 +00:00
DominikIwanek f89d56acbf Update package.json 2025-01-24 13:05:01 +00:00
AleksanderSklorz 926710a82c [ACS-9075] Fixed incorrect buttons labels color (#10489) 2025-01-24 13:05:01 +00:00
VitoAlbano f48017b45d Fixed wrong rule 2025-01-24 13:05:01 +00:00
VitoAlbano af7a6db8bc Readded rule for peer deps 2025-01-24 13:05:01 +00:00
VitoAlbano d4ac26d73e [MIGRATION] - Changing the building executor for eslint-rules 2025-01-24 13:05:01 +00:00
VitoAlbano 1af7843d69 [MIGRATION] - Checking if now eslint is releasable 2025-01-24 13:05:01 +00:00
VitoAlbano dc86a14016 [MIGRATION] - fixed storybook builds 2025-01-24 13:05:01 +00:00
AleksanderSklorzandVitoAlbano 77cca45b7e [ACS-9052] manage versions close button is too low (#10466)
* [ci:force] - Fixed lint

* [ACS-9052] Fixed close button in version manager position

* [ACS-9052] Reverted unwanted changes

---------

Co-authored-by: VitoAlbano <vito.albano.123@gmail.com>
2025-01-24 13:05:01 +00:00
VitoAlbano 4e00a74ec5 [MIGRATION] - updated lock 2025-01-24 13:05:01 +00:00
VitoAlbano 56fca182d7 [MIGRATION] - Checking deps 2025-01-24 13:05:01 +00:00
VitoAlbano 68f6c2446c [MIGRATION] - Readded removed action 2025-01-24 13:05:01 +00:00
VitoAlbano fde24116a2 [MIGRATION] - Rebased 2025-01-24 13:05:01 +00:00
VitoAlbano 0f9956cbf3 [MIGRATION] - Fixed type 2025-01-24 13:05:01 +00:00
VitoAlbano 3e07ed22a7 [MIGRATION] - Fixed lint 2025-01-24 13:05:01 +00:00
VitoAlbano 1765f62cf8 Removing temporarily eslint rule from publishing 2025-01-24 13:05:01 +00:00
VitoAlbano 6a3be59662 Fixed sonarqube errors 2025-01-24 13:05:01 +00:00
VitoAlbano a789ed82eb Reduced tserrors on building storybook 2025-01-24 13:05:01 +00:00
VitoAlbano c5f3b5639d Removed unused project parts 2025-01-24 13:05:01 +00:00
VitoAlbano 041838838a Removed unused project parts 2025-01-24 13:05:01 +00:00
Ehsan Rezaei 1a9e53d813 Fixed two excluded unit tests 2025-01-24 13:05:01 +00:00
Ehsan Rezaei 445b7803c3 Removing testing lib to sync with develop 2025-01-24 13:05:01 +00:00
Ehsan Rezaei 2aa4b5951e Trying to fix js-api unit tests 2025-01-24 13:05:01 +00:00
VitoAlbano 3039d1612f [MIGRATION] - Migrating to Jest - working but some tests fails 2025-01-24 13:05:01 +00:00
VitoAlbano 7c6e9ab831 [MIGRATION] - Fixing failing migrated tests 2025-01-24 13:05:01 +00:00
VitoAlbano 76fecf705a [MIGRATION] - Moving mocha to jest 2025-01-24 13:05:01 +00:00
VitoAlbano 3cb250eeea [MIGRATION] - Added injectionContext to avoid error NG0203 for unit tests 2025-01-24 13:05:01 +00:00
VitoAlbano f14f38a059 [MIGRATION] - fixed build and lint 2025-01-24 13:05:01 +00:00
VitoAlbano 4d1108e77e Cherry picked commit from oidc and run fix lint 2025-01-24 13:05:01 +00:00
Amedeo Lepore e162ebbfef AAE-26163 Fix infinite loop when authentication error event occured (#10272)
* AAE-26163 Logout user after 3 login attempts failed, avoiding infinite loop when an authentication error occured, like when a user machine clock is significantly out of sync

* AAE-26163 Wait to discovery document to be loaded and user not authenticated to perform a ssoLogin, logout user if login fails after 3 attempts

* AAE-26163 Fix missed id_token_hint invoking logout when a login error occured due to a clock significantly out of sync

* AAE-26163 Add fake observable to unit test

* AAE-26163 Show oauth event logs if showDebugInformation is enabled, remove auth items if access token is not valid

* AAE-26163 Improve tryLogin error message

* AAE-26163 Check if token has expired to fix case when user access the application after the token is expired and with a clock significantly out of sync

* AAE-26163 Test logout when clock is out of sync

* AAE-26163 Create a service to check if local machine time is out of sync

* AAE-26163 Update oauthErrorEvent$ and combinedOAuthErrorsStream$ to return errors

* AAE-26163 Output error within combined oauth error event subscription

* AAE-26163 Fix lint problems

* AAE-26163 Logout user when token refresh error happens for the second time, if the token is not refreshed properly after first refresh error

* AAE-26163 Logout user once an oauth error event occur due to clock out of sync

* AAE-26163 Fix retry login error message if the OAuthErrorEvent doesn t return reason

* AAE-26163 Fix the issue where the logout API call is canceled by the authorize call when login fails due to clock synchronization problems, causing an infinite loop.

* remove console.log

* AAE-26163 Fix retry login error message if the OAuthErrorEvent reason is an empty object
2025-01-24 13:05:01 +00:00
VitoAlbano 7bdec42329 [ci:force] - Fixed lint 2025-01-24 13:05:01 +00:00
VitoAlbano c1a42596dd [ci:force] - fixing lint 2025-01-24 13:05:01 +00:00
VitoAlbano 62baa655ed Fixed build for all the packages 2025-01-24 13:05:01 +00:00
VitoAlbano 1def5dcc0a [ci:force] - fixed build for testing 1 2025-01-24 13:05:01 +00:00
VitoAlbano 579f3fa801 [ci:force] - fixed deps 2025-01-24 13:05:01 +00:00
VitoAlbano d11afcd0d6 Migrate to NG17 2025-01-24 13:05:01 +00:00
4027 changed files with 101445 additions and 115932 deletions
+21
View File
@@ -0,0 +1,21 @@
.git
.github
.vscode
assets
coverage
docs
e2e
e2e-output
node_modules
scripts
src
lib
tools
/angular.json
/desktop.ini
/cspell.json
/CODE_OF_CONDUCT.md
/.stylelintignore
/ALFRESCOCORS.md
/CONTRIBUTING.md
/BROWSER-SUPPORT.md
+13
View File
@@ -0,0 +1,13 @@
.angular
nxcache
node_modules
dist
coverage
.github
.vscode
scripts
/angular.json
docs/**/*.md
lib/js-api/docs/**/*.md
.storybook
webpack.config.js
+215
View File
@@ -0,0 +1,215 @@
module.exports = {
root: true,
ignorePatterns: [
'projects/**/*',
'**/node_modules/**/*',
'lib/cli/node_modules/**/*',
'**/node_modules',
'**/docker',
'**/assets',
'**/scripts',
'**/docs'
],
plugins: ['@nx'],
overrides: [
{
files: ['*.ts'],
parserOptions: {
project: ['tsconfig.json'],
createDefaultProgram: true
},
extends: [
'plugin:@nx/typescript',
'plugin:@nx/angular',
'plugin:@cspell/recommended',
'plugin:@angular-eslint/recommended',
'plugin:@angular-eslint/template/process-inline-templates',
'plugin:jsdoc/recommended-typescript-error'
],
plugins: [
'eslint-plugin-unicorn',
'eslint-plugin-rxjs',
'prettier',
'ban',
'license-header',
'@cspell',
'eslint-plugin-import',
'@angular-eslint/eslint-plugin',
'@typescript-eslint',
'jsdoc'
],
rules: {
// Uncomment this to enable prettier checks as part of the ESLint
// 'prettier/prettier': 'error',
'ban/ban': [
'error',
{ name: 'eval', message: 'Calls to eval is not allowed.' },
{ name: 'fdescribe', message: 'Calls to fdescribe is not allowed' },
{ name: 'fit', message: 'Calls to fit is not allowed' },
{ name: 'xit', message: 'Calls to xit is not allowed' },
{ name: 'xdescribe', message: 'Calls to xdescribe is not allowed' },
{ name: ['test', 'only'], message: 'Calls to test.only is not allowed' },
{ name: ['describe', 'only'], message: 'Calls to describe.only is not allowed' }
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: ['adf', 'app'],
style: 'kebab-case'
}
],
'@angular-eslint/directive-selector': [
'error',
{
type: ['element', 'attribute'],
prefix: ['adf', 'app'],
style: 'kebab-case'
}
],
'@angular-eslint/no-host-metadata-property': 'off',
'@angular-eslint/no-input-prefix': 'error',
'@typescript-eslint/consistent-type-definitions': 'error',
'@typescript-eslint/dot-notation': 'off',
'@typescript-eslint/explicit-member-accessibility': [
'off',
{
accessibility: 'explicit'
}
],
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/prefer-optional-chain': 'warn',
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: [
'classProperty',
'objectLiteralProperty',
'typeProperty',
'classMethod',
'objectLiteralMethod',
'typeMethod',
'accessor',
'enumMember'
],
format: null,
modifiers: ['requiresQuotes']
}
],
'@typescript-eslint/member-ordering': 'off',
'@typescript-eslint/no-empty-function': 'off',
'prefer-arrow/prefer-arrow-functions': 'off',
'prefer-promise-reject-errors': 'error',
'brace-style': 'off',
'@typescript-eslint/brace-style': 'error',
'comma-dangle': 'error',
'default-case': 'error',
'import/order': 'off',
'max-len': [
'error',
{
code: 240
}
],
'no-bitwise': 'off',
'no-console': [
'error',
{
allow: [
'warn',
'dir',
'timeLog',
'assert',
'clear',
'count',
'countReset',
'group',
'groupEnd',
'table',
'dirxml',
'error',
'groupCollapsed',
'Console',
'profile',
'profileEnd',
'timeStamp',
'context'
]
}
],
'no-duplicate-imports': 'error',
'no-multiple-empty-lines': 'error',
'no-redeclare': 'error',
'no-return-await': 'error',
'rxjs/no-create': 'error',
'rxjs/no-subject-unsubscribe': 'error',
'rxjs/no-subject-value': 'error',
'rxjs/no-unsafe-takeuntil': 'error',
'unicorn/filename-case': 'error',
'@typescript-eslint/no-unused-expressions': [
'error',
{
allowShortCircuit: true,
allowTernary: true
}
],
'license-header/header': [
'error',
[
'/*!',
' * @license',
' * Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.',
' *',
' * Licensed under the Apache License, Version 2.0 (the "License");',
' * you may not use this file except in compliance with the License.',
' * You may obtain a copy of the License at',
' *',
' * http://www.apache.org/licenses/LICENSE-2.0',
' *',
' * Unless required by applicable law or agreed to in writing, software',
' * distributed under the License is distributed on an "AS IS" BASIS,',
' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.',
' * See the License for the specific language governing permissions and',
' * limitations under the License.',
' */'
]
]
}
},
{
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended', 'plugin:@angular-eslint/template/accessibility'],
parser: '@angular-eslint/template-parser',
rules: {
'@angular-eslint/template/prefer-self-closing-tags': 'error'
}
},
{
files: ['*.spec.ts'],
plugins: ['@alfresco/eslint-angular'],
rules: {
'@alfresco/eslint-angular/no-angular-material-selectors': 'error'
}
},
{
files: ['*.ts'],
extends: ['plugin:@angular-eslint/template/process-inline-templates'],
excludedFiles: ['*.spec.ts']
},
{
files: ['*.json'],
parser: 'jsonc-eslint-parser',
rules: {
'comma-dangle': ['error', 'never']
}
}
],
extends: ['plugin:storybook/recommended']
};
+3
View File
@@ -0,0 +1,3 @@
{
"extends": ["./.eslintrc.js"]
}
-1
View File
@@ -1 +0,0 @@
.github/workflows/*.lock.yml linguist-generated=true merge=ours
+3 -3
View File
@@ -4,15 +4,15 @@
# the repo. Unless a later match takes precedence,
# these users will be requested for
# review when someone opens a pull request.
* @eromano
* @eromano @popovicsandras @DenysVuika
# Order is important; the last matching pattern takes the most
# precedence. When someone opens a pull request that only
# modifies JS files, only @js-owner and not the global
# owner(s) will be requested for a review.
/e2e/ @eromano
/e2e/ @eromano @cristinaj
# The `docs/*` pattern will match files like
# `docs/getting-started.md` but not further nested files like
# `docs/build-app/troubleshooting.md`.
/docs/ @eromano
/docs/ @m-hulbert @eromano
+13 -26
View File
@@ -9,17 +9,18 @@ inputs:
runs:
using: "composite"
steps:
- name: Before install
if: ${{ ! env.ACT }}
shell: bash
run: |
pip install --user --quiet awscli
- name: base vars
shell: bash
run: |
if [ -n "${GITHUB_BASE_REF:-}" ]; then
BASE_HASH=$(git merge-base "origin/${GITHUB_BASE_REF}" HEAD 2>/dev/null || git rev-parse HEAD)
else
BASE_HASH=$(git rev-parse HEAD)
fi
{
echo "GIT_HASH=$(git rev-parse HEAD)";
echo "BASE_HASH=${BASE_HASH}";
echo "BASE_HASH=$(git merge-base origin/${GITHUB_BASE_REF} HEAD)";
echo "HEAD_HASH=HEAD";
echo "HEAD_COMMIT_HASH=${GH_COMMIT}";
echo "NX_CALCULATION_FLAGS=--all";
@@ -30,22 +31,10 @@ runs:
- name: affected:* flag parser
shell: bash
env:
EVENT_NAME: ${{ github.event_name }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
if: ${{ contains(github.event.head_commit.message , '[affected:*]') }}
run: |
# Get commit message safely from git to avoid script injection
# For PRs, use the PR head SHA; for other events use HEAD
if [ "$EVENT_NAME" == "pull_request" ] && [ -n "$PR_HEAD_SHA" ]; then
COMMIT_MSG=$(git log -1 --format=%B "$PR_HEAD_SHA" 2>/dev/null || echo "")
else
COMMIT_MSG=$(git log -1 --format=%B 2>/dev/null || echo "")
fi
if echo "$COMMIT_MSG" | grep -qF "[affected:*]"; then
echo "Setting up CI to run with commit flag [affected:*] flag."
echo "BREAK_ACTION=true" >> $GITHUB_ENV
fi
echo "Setting up CI to run with commit flag [affected:*] flag."
echo "BREAK_ACTION=true" >> $GITHUB_ENV
- name: PULL_REQUEST event
if: ${{ env.BREAK_ACTION == false && github.event_name == 'pull_request' && !github.event.pull_request.merged }}
@@ -60,15 +49,13 @@ runs:
} >> $GITHUB_ENV
- name: RELEASE on master/develop patch branch
if: ${{ env.BREAK_ACTION == false && (github.event.pull_request.merged || github.event_name == 'push') }}
if: ${{ env.BREAK_ACTION == false && github.event.pull_request.merged }}
shell: bash
env:
REF_NAME: ${{ github.ref_name }}
run: |
if [[ "$REF_NAME" =~ ^master(-patch.*)?$ ]]; then
if [[ "${{ github.ref_name }}" =~ ^master(-patch.*)?$ ]]; then
# into master(-patch*)
echo "Setting up CI flags for Push on master patch"
elif [[ "$REF_NAME" =~ ^develop-patch.*$ ]]; then
elif [[ "${{ github.ref_name }}" =~ ^develop-patch.*$ ]]; then
# into develop-patch*
echo "Setting up CI flags for Push develop patch"
else
-23
View File
@@ -1,23 +0,0 @@
name: Git tag creation
description: 'Creates a git tag in the specified repository for a given commit.'
inputs:
tagName:
description: 'The github tag to be created'
required: true
releaseNote:
description: 'The github release note to be created'
required: false
runs:
using: 'composite'
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
name: Create git tag
env:
TAG_NAME: ${{ inputs.tagName }}
RELEASE_NOTE: ${{ inputs.releaseNote }}
with:
script: |
const createGitTag = require('./.github/actions/create-git-tag/create-git-tag.js');
await createGitTag({ core, github, context, tagName: process.env.TAG_NAME });
@@ -1,42 +0,0 @@
/*!
* @license
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
module.exports = async ({ github, context, core, tagName }) => {
const tagSHA = context.payload?.after ?? context.sha;
core.notice(`Creating tag with title: ${tagName}, and SHA: ${tagSHA}`);
const createdTag = await github.rest.git.createTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: tagName,
message: 'Release note',
object: tagSHA,
type: 'commit'
});
const createdRef = await github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/' + tagName,
sha: createdTag.data.sha
});
if (createdRef.status === 201) {
core.notice(`Tag ${tagName} was created successfully`);
}
};
@@ -3,33 +3,17 @@ description: "Download build artifacts"
runs:
using: "composite"
steps:
- name: Restore dist from cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: dist
key: dist-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
dist-${{ github.run_id }}-
fail-on-cache-miss: true
- name: Restore nxcache from cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: nxcache
key: nxcache-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
nxcache-${{ github.run_id }}-
fail-on-cache-miss: true
- name: Restore node_modules from cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: node_modules
key: node-modules-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
node-modules-${{ github.run_id }}-
fail-on-cache-miss: true
- name: download and extract artifacts from s3
shell: bash
env:
REMOTE_PATH: "alfresco-ng2-components/build-cache/${{ github.run_id }}"
run: |
packages=( dist nxcache node_modules )
for i in "${packages[@]}"; do
time aws s3 cp --no-progress s3://${S3_BUILD_BUCKET_SHORT_NAME}/${REMOTE_PATH}/$i.tar.gz $i.tar.gz
du -h $i.tar.gz
time tar xzf $i.tar.gz
done
- name: show files
shell: bash
run: |
@@ -40,4 +24,4 @@ runs:
echo "====NXCACHE===="
find nxcache -maxdepth 1 -type d
echo "====ADF===="
find node_modules/@alfresco/ -maxdepth 1 -type d
find node_modules/@alfresco/ -maxdepth 1 -type d
+2 -4
View File
@@ -20,11 +20,9 @@ runs:
- name: set dryrun flag to TRUE
shell: bash
id: dryrun
env:
DRY_RUN_FLAG: ${{ inputs.dry-run-flag }}
run: |
if [[ "$DRY_RUN_FLAG" == 'true' ]]; then
echo "dryrun=--dry-run" >> $GITHUB_OUTPUT;
if [[ '${{ inputs.dry-run-flag }}' == 'true' ]]; then
echo "dryrun=--dryrun" >> $GITHUB_OUTPUT;
echo "enabling dryrun"
else
echo "dryrun=" >> $GITHUB_OUTPUT;
+2 -25
View File
@@ -5,45 +5,22 @@ inputs:
branch_name:
description: "override GITHUB_REF_NAME"
required: false
default: ${{ github.ref_name }}
default: $GITHUB_REF_NAME
runs:
using: "composite"
steps:
- name: load "NPM TAG"
id: set-npm-tag
uses: ./.github/actions/set-npm-tag
with:
branch_name: ${{ inputs.branch_name }}
- name: check npm bundle
shell: bash
id: sha_out
env:
TAG_NPM: ${{ steps.set-npm-tag.outputs.npm-tag }}
run: |
if [[ -z $TAG_NPM ]]; then
echo "TAG_NPM not set, aborting"
exit 1
fi
# Retry to absorb npm registry propagation delay right after publish.
NPM_VIEW_RETRIES=24
NPM_VIEW_RETRY_DELAY=20
for attempt in $(seq 1 "$NPM_VIEW_RETRIES"); do
ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version 2>/dev/null) || true
if [[ -n $ADF_VERSION ]]; then
break
fi
if [[ $attempt -lt $NPM_VIEW_RETRIES ]]; then
sleep "$NPM_VIEW_RETRY_DELAY"
fi
done
if [[ -z $ADF_VERSION ]]; then
echo "Could not resolve @alfresco/adf-core@${TAG_NPM} version, aborting" >&2
exit 1
fi
echo "check bundle on TAG_NPM='${TAG_NPM}' and ADF_VERSION='${ADF_VERSION}'"
./scripts/github/build/npm-check-bundles.sh -v ${ADF_VERSION}
./scripts/github/build/npm-check-bundles.sh
@@ -0,0 +1,21 @@
name: "print affected libs"
description: "Retrive the affected libs based on the based and head input"
inputs:
base:
description: 'the base sha'
required: true
type: string
default: main
head:
description: 'the head sha'
required: true
type: string
default: HEAD
output:
affected:
description: 'the affected libs of the repo'
affected_is_empty:
description: 'true or false accondingly'
runs:
using: "node16"
main: 'dist/index.js'
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+476
View File
@@ -0,0 +1,476 @@
{
"name": "print-affected-libs",
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "print-affected-libs",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1"
},
"devDependencies": {
"@vercel/ncc": "^0.36.1"
}
},
"node_modules/@actions/core": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
"dependencies": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
}
},
"node_modules/@actions/exec": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
"integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
"dependencies": {
"@actions/io": "^1.0.1"
}
},
"node_modules/@actions/github": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz",
"integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==",
"dependencies": {
"@actions/http-client": "^2.0.1",
"@octokit/core": "^3.6.0",
"@octokit/plugin-paginate-rest": "^2.17.0",
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
}
},
"node_modules/@actions/http-client": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz",
"integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==",
"dependencies": {
"tunnel": "^0.0.6"
}
},
"node_modules/@actions/io": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q=="
},
"node_modules/@octokit/auth-token": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
"dependencies": {
"@octokit/types": "^6.0.3"
}
},
"node_modules/@octokit/core": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
"integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
"dependencies": {
"@octokit/auth-token": "^2.4.4",
"@octokit/graphql": "^4.5.8",
"@octokit/request": "^5.6.3",
"@octokit/request-error": "^2.0.5",
"@octokit/types": "^6.0.3",
"before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0"
}
},
"node_modules/@octokit/endpoint": {
"version": "6.0.12",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
"dependencies": {
"@octokit/types": "^6.0.3",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
}
},
"node_modules/@octokit/graphql": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
"dependencies": {
"@octokit/request": "^5.6.0",
"@octokit/types": "^6.0.3",
"universal-user-agent": "^6.0.0"
}
},
"node_modules/@octokit/openapi-types": {
"version": "12.11.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
"integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
},
"node_modules/@octokit/plugin-paginate-rest": {
"version": "2.21.3",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
"integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
"dependencies": {
"@octokit/types": "^6.40.0"
},
"peerDependencies": {
"@octokit/core": ">=2"
}
},
"node_modules/@octokit/plugin-rest-endpoint-methods": {
"version": "5.16.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
"integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
"dependencies": {
"@octokit/types": "^6.39.0",
"deprecation": "^2.3.1"
},
"peerDependencies": {
"@octokit/core": ">=3"
}
},
"node_modules/@octokit/request": {
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
"integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
"dependencies": {
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.1.0",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.7",
"universal-user-agent": "^6.0.0"
}
},
"node_modules/@octokit/request-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
"dependencies": {
"@octokit/types": "^6.0.3",
"deprecation": "^2.0.0",
"once": "^1.4.0"
}
},
"node_modules/@octokit/types": {
"version": "6.41.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
"integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
"dependencies": {
"@octokit/openapi-types": "^12.11.0"
}
},
"node_modules/@vercel/ncc": {
"version": "0.36.1",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.1.tgz",
"integrity": "sha512-S4cL7Taa9yb5qbv+6wLgiKVZ03Qfkc4jGRuiUQMQ8HGBD5pcNRnHeYM33zBvJE4/zJGjJJ8GScB+WmTsn9mORw==",
"dev": true,
"bin": {
"ncc": "dist/ncc/cli.js"
}
},
"node_modules/before-after-hook": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
},
"node_modules/deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
"node_modules/is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/node-fetch": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"dependencies": {
"wrappy": "1"
}
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"node_modules/tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
"engines": {
"node": ">=0.6.11 <=0.7.0 || >=0.7.3"
}
},
"node_modules/universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
},
"node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
}
},
"dependencies": {
"@actions/core": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.10.0.tgz",
"integrity": "sha512-2aZDDa3zrrZbP5ZYg159sNoLRb61nQ7awl5pSvIq5Qpj81vwDzdMRKzkWJGJuwVvWpvZKx7vspJALyvaaIQyug==",
"requires": {
"@actions/http-client": "^2.0.1",
"uuid": "^8.3.2"
}
},
"@actions/exec": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.1.1.tgz",
"integrity": "sha512-+sCcHHbVdk93a0XT19ECtO/gIXoxvdsgQLzb2fE2/5sIZmWQuluYyjPQtrtTHdU1YzTZ7bAPN4sITq2xi1679w==",
"requires": {
"@actions/io": "^1.0.1"
}
},
"@actions/github": {
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-5.1.1.tgz",
"integrity": "sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==",
"requires": {
"@actions/http-client": "^2.0.1",
"@octokit/core": "^3.6.0",
"@octokit/plugin-paginate-rest": "^2.17.0",
"@octokit/plugin-rest-endpoint-methods": "^5.13.0"
}
},
"@actions/http-client": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-2.1.0.tgz",
"integrity": "sha512-BonhODnXr3amchh4qkmjPMUO8mFi/zLaaCeCAJZqch8iQqyDnVIkySjB38VHAC8IJ+bnlgfOqlhpyCUZHlQsqw==",
"requires": {
"tunnel": "^0.0.6"
}
},
"@actions/io": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@actions/io/-/io-1.1.3.tgz",
"integrity": "sha512-wi9JjgKLYS7U/z8PPbco+PvTb/nRWjeoFlJ1Qer83k/3C5PHQi28hiVdeE2kHXmIL99mQFawx8qt/JPjZilJ8Q=="
},
"@octokit/auth-token": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.5.0.tgz",
"integrity": "sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==",
"requires": {
"@octokit/types": "^6.0.3"
}
},
"@octokit/core": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.6.0.tgz",
"integrity": "sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==",
"requires": {
"@octokit/auth-token": "^2.4.4",
"@octokit/graphql": "^4.5.8",
"@octokit/request": "^5.6.3",
"@octokit/request-error": "^2.0.5",
"@octokit/types": "^6.0.3",
"before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/endpoint": {
"version": "6.0.12",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
"requires": {
"@octokit/types": "^6.0.3",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/graphql": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
"requires": {
"@octokit/request": "^5.6.0",
"@octokit/types": "^6.0.3",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/openapi-types": {
"version": "12.11.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-12.11.0.tgz",
"integrity": "sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ=="
},
"@octokit/plugin-paginate-rest": {
"version": "2.21.3",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz",
"integrity": "sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==",
"requires": {
"@octokit/types": "^6.40.0"
}
},
"@octokit/plugin-rest-endpoint-methods": {
"version": "5.16.2",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz",
"integrity": "sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==",
"requires": {
"@octokit/types": "^6.39.0",
"deprecation": "^2.3.1"
}
},
"@octokit/request": {
"version": "5.6.3",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.3.tgz",
"integrity": "sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==",
"requires": {
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.1.0",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.7",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/request-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
"requires": {
"@octokit/types": "^6.0.3",
"deprecation": "^2.0.0",
"once": "^1.4.0"
}
},
"@octokit/types": {
"version": "6.41.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.41.0.tgz",
"integrity": "sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==",
"requires": {
"@octokit/openapi-types": "^12.11.0"
}
},
"@vercel/ncc": {
"version": "0.36.1",
"resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.36.1.tgz",
"integrity": "sha512-S4cL7Taa9yb5qbv+6wLgiKVZ03Qfkc4jGRuiUQMQ8HGBD5pcNRnHeYM33zBvJE4/zJGjJJ8GScB+WmTsn9mORw==",
"dev": true
},
"before-after-hook": {
"version": "2.2.3",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
},
"deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
"is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
},
"node-fetch": {
"version": "2.6.11",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.11.tgz",
"integrity": "sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
"requires": {
"wrappy": "1"
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
},
"tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
},
"universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
},
"uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
}
}
}
@@ -0,0 +1,20 @@
{
"name": "print-affected-libs",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"scripts": {
"build": "ncc build src/index.js -o dist --source-map"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@actions/core": "^1.10.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^5.1.1"
},
"devDependencies": {
"@vercel/ncc": "^0.36.1"
}
}
@@ -0,0 +1,32 @@
const core = require('@actions/core');
const exec = require('@actions/exec');
async function run() {
const base = core.getInput('base', {required: false }) || '5288597580';
core.setOutput('affected_is_empty', 'true');
let affected = '';
let myError = '';
const options = {};
options.listeners = {
stdout: (data) => {
affected += data.toString()
},
stderr: (data) => {
myError += data.toString();
}
};
await exec.exec(`npx nx print-affected --target=build --select=tasks.target.project --base=${base} --head=${head}`, [], options)
const affectedTrimmed = affected.trim();
if (affectedTrimmed !== '') {
core.setOutput('affected_is_empty', 'false');
}
core.notice(`Retriving affected libs: ${affectedTrimmed}`);
core.setOutput('affected', affectedTrimmed);
}
run();
-17
View File
@@ -1,17 +0,0 @@
name: 'Save Nx Cache'
description: 'Save Nx cache and dist outputs only when the job succeeds'
inputs:
cache-suffix:
description: 'Must match the cache-suffix used in the setup action'
required: true
runs:
using: "composite"
steps:
- name: Save nx cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: |
nxcache
.nx
dist
key: ${{ runner.os }}-nxcache-${{ inputs.cache-suffix }}-${{ hashFiles('nx.json') }}-${{ github.sha }}
+21 -29
View File
@@ -2,44 +2,36 @@ name: "set npm tag"
description: "se NPM tag"
inputs:
event_name:
description: "override github.event_name"
required: false
default: ${{ github.event_name }}
branch_name:
description: "override GITHUB_REF_NAME"
required: false
default: ${{ github.ref_name }}
outputs:
npm-tag:
description: "NPM tag"
value: ${{ steps.set-npm-tag.outputs.npm-tag }}
default: $GITHUB_REF_NAME
runs:
using: "composite"
steps:
- name: set TAG_NPM
id: set-npm-tag
shell: bash
env:
BRANCH_NAME: ${{ inputs.branch_name }}
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
TAG_NPM="branch"
else
TAG_NPM="alpha"
VERSION_IN_PACKAGE_JSON=$(node -p "require('./package.json')".version)
echo "version in package.json=${VERSION_IN_PACKAGE_JSON}"
if [[ $BRANCH_NAME =~ ^master(-patch.*)?$ ]]; then
# Pre-release versions
if [[ $VERSION_IN_PACKAGE_JSON =~ ^[0-9]*\.[0-9]*\.[0-9]*-A\.[0-9]*$ ]]; then
TAG_NPM=next
# Stable major versions
else
TAG_NPM=latest
fi
fi
if [[ $BRANCH_NAME =~ ^develop(-patch.*)?$ ]]; then
TAG_NPM=alpha
fi
TAG_NPM="alpha"
VERSION_IN_PACKAGE_JSON=$(node -p "require('./package.json')".version)
echo "version in package.json=${VERSION_IN_PACKAGE_JSON}"
if [[ ${{ inputs.branch_name }} =~ ^master(-patch.*)?$ ]]; then
# Pre-release versions
if [[ $VERSION_IN_PACKAGE_JSON =~ ^[0-9]*\.[0-9]*\.[0-9]*-A\.[0-9]*$ ]];
then
TAG_NPM=next
# Stable major versions
else
TAG_NPM=latest
fi
fi
echo "npm-tag=$TAG_NPM" >> $GITHUB_OUTPUT
echo "Computed tag: $TAG_NPM"
if [[ ${{ inputs.branch_name }} =~ ^develop(-patch.*)?$ ]]; then
TAG_NPM=alpha
fi
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
+32 -38
View File
@@ -1,12 +1,13 @@
name: 'Setup'
description: 'Initialize cache, env var load'
inputs:
cache-suffix:
description: 'Suffix to make Nx cache key unique per job (e.g. matrix project name)'
enable-cache:
description: 'enable caching'
required: false
default: 'default'
full-setup:
description: 'Run git-latest-tag, npm-tag, and before-install (requires fetch-depth: 0). Set to false for matrix jobs that only need node/cache.'
type: boolean
default: 'true'
enable-node-modules-cache:
description: 'enable caching for node modules'
required: false
type: boolean
default: 'true'
@@ -15,50 +16,43 @@ inputs:
required: false
type: boolean
default: 'false'
outputs:
npm-tag:
description: 'NPM tag'
value: ${{ steps.set-npm-tag.outputs.npm-tag }}
runs:
using: "composite"
steps:
- name: Set consistent machine ID for Nx cache
shell: bash
run: echo "nx-github-actions" | sudo tee /etc/machine-id > /dev/null
- name: Setup pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413 # v6.1.0
- name: Setup Node
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
- name: install NPM
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
cache-dependency-path: package-lock.json
- name: get latest tag sha
if: ${{ inputs.full-setup == 'true' }}
id: tag-sha
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@a297ff6c5bf20c667047db658dd23f60241b270a # v18.28.0
- name: load "NPM TAG"
if: ${{ inputs.full-setup == 'true' }}
id: set-npm-tag
uses: ./.github/actions/set-npm-tag
- name: Install dependencies
shell: bash
run: pnpm install --frozen-lockfile
- name: Security audit
shell: bash
run: pnpm audit --audit-level=critical
- name: Restore nx cache
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@16272633584df58ea603112c4aac4564c8673cd6 # v8.9.0
# CACHE
- name: Node Modules cache
id: node-modules-cache
if: ${{ inputs.enable-node-modules-cache == 'true' }}
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
env:
cache-name: node-modules-cache
with:
path: |
nxcache
.nx
dist
key: ${{ runner.os }}-nxcache-${{ inputs.cache-suffix }}-${{ hashFiles('nx.json') }}-${{ github.sha }}
node_modules
key: .npm-${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-nxcache-${{ inputs.cache-suffix }}-${{ hashFiles('nx.json') }}-
${{ runner.os }}-nxcache-${{ inputs.cache-suffix }}-
node_modules-${{ runner.os }}-build-${{ env.cache-name }}-
node_modules-${{ runner.os }}-build-
node_modules-${{ runner.os }}-
- name: pip cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
if: ${{ inputs.enable-cache == 'true' }}
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-
restore-keys: |
${{ runner.os }}
- name: load "NPM TAG"
uses: ./.github/actions/set-npm-tag
- name: before install script
if: ${{ inputs.full-setup == 'true' }}
uses: ./.github/actions/before-install
with:
act: ${{ inputs.act }}
@@ -0,0 +1,49 @@
name: Identify the slack group
description: 'Identify the slack group area based on the affected'
inputs:
affected:
description: 'The name of the affected lib'
required: true
type: string
outputs:
groups:
description: "the slack groups"
value: ${{ steps.group.outputs.result }}
runs:
using: "composite"
steps:
- name: Append group
id: group
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
env:
affectedLib: ${{ inputs.affected }}
with:
script: |
const affectedLib = process.env.affectedLib;
core.info(`Input ${affectedLib}`);
const slackGroups = new Set();
const AlfrescoQAGroup = '@alfresco-testing-qa';
const HxpQAGroup = '@hxp-studio-qa-group';
const libs = affectedLib.split(' ')
if (libs.includes('content-services') || libs.includes('process-services')) {
slackGroups.add(AlfrescoQAGroup);
}
if (libs.includes('process-services-cloud')) {
slackGroups.add(HxpQAGroup);
}
if (libs.includes('core')) {
slackGroups.add(AlfrescoQAGroup);
slackGroups.add(HxpQAGroup);
}
const result = Array.from(slackGroups.values()).join(' ');
core.info(`Result ${result}`);
return result;
@@ -4,22 +4,16 @@ description: "Upload build artifacts"
runs:
using: "composite"
steps:
- name: Save dist to cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: dist
key: dist-${{ github.run_id }}-${{ github.run_attempt }}
- name: Save nxcache to cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: nxcache
key: nxcache-${{ github.run_id }}-${{ github.run_attempt }}
- name: Save node_modules to cache
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: node_modules
key: node-modules-${{ github.run_id }}-${{ github.run_attempt }}
- name: tar and upload artifacts
shell: bash
env:
REMOTE_PATH: "alfresco-ng2-components/build-cache/${{ github.run_id }}"
run: |
packages=( dist nxcache node_modules )
for i in "${packages[@]}"; do
time tar czf $i.tar.gz $i
du -h $i.tar.gz
time aws s3 cp --no-progress $i.tar.gz "s3://${S3_BUILD_BUCKET_SHORT_NAME}/${REMOTE_PATH}/$i.tar.gz"
done
-56
View File
@@ -1,56 +0,0 @@
{
"entries": {
"github/gh-aw-actions/setup@v0.88.7": {
"repo": "github/gh-aw-actions/setup",
"version": "v0.88.7",
"sha": "5e508589e03a7757a7e05b26e834292f5445bfb6"
}
},
"containers": {
"ghcr.io/github/gh-aw-firewall/agent:0.27.44": {
"image": "ghcr.io/github/gh-aw-firewall/agent:0.27.44",
"digest": "sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4",
"pinned_image": "ghcr.io/github/gh-aw-firewall/agent:0.27.44@sha256:0d727725c737b58c7bdf51f640cffb928385ec46517e0917c7f1a02f1bada8b4"
},
"ghcr.io/github/gh-aw-firewall/agent:0.28.14": {
"image": "ghcr.io/github/gh-aw-firewall/agent:0.28.14",
"digest": "sha256:f7df036c86575527b61f3f7df91c4412349a12b2a74988d929eafa2999230c98",
"pinned_image": "ghcr.io/github/gh-aw-firewall/agent:0.28.14@sha256:f7df036c86575527b61f3f7df91c4412349a12b2a74988d929eafa2999230c98"
},
"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44": {
"image": "ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44",
"digest": "sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7",
"pinned_image": "ghcr.io/github/gh-aw-firewall/api-proxy:0.27.44@sha256:b50fbadba138f6e9aba94aca09711335c489bb3b15861220cb66f6092e042dc7"
},
"ghcr.io/github/gh-aw-firewall/api-proxy:0.28.14": {
"image": "ghcr.io/github/gh-aw-firewall/api-proxy:0.28.14",
"digest": "sha256:6f95e2234dd9bd6333a8ff28ccea7ecf0204acd4a09108723844dbd2bf6268c5",
"pinned_image": "ghcr.io/github/gh-aw-firewall/api-proxy:0.28.14@sha256:6f95e2234dd9bd6333a8ff28ccea7ecf0204acd4a09108723844dbd2bf6268c5"
},
"ghcr.io/github/gh-aw-firewall/squid:0.27.44": {
"image": "ghcr.io/github/gh-aw-firewall/squid:0.27.44",
"digest": "sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627",
"pinned_image": "ghcr.io/github/gh-aw-firewall/squid:0.27.44@sha256:83e48bbe12c634be8c228a576832fe45f66c529ac3659db92bddbcf2eeb6d627"
},
"ghcr.io/github/gh-aw-firewall/squid:0.28.14": {
"image": "ghcr.io/github/gh-aw-firewall/squid:0.28.14",
"digest": "sha256:2ce8df3abf3e9b76e9c0cf5863da41f1ab3f89b20ad14b988806ab89e7bf2cd5",
"pinned_image": "ghcr.io/github/gh-aw-firewall/squid:0.28.14@sha256:2ce8df3abf3e9b76e9c0cf5863da41f1ab3f89b20ad14b988806ab89e7bf2cd5"
},
"ghcr.io/github/gh-aw-mcpg:v0.4.18": {
"image": "ghcr.io/github/gh-aw-mcpg:v0.4.18",
"digest": "sha256:85b940556a8faa4e1fdbef124bfd75f2c4ebd855a10b88a1c3b6f3e97f6f1a53",
"pinned_image": "ghcr.io/github/gh-aw-mcpg:v0.4.18@sha256:85b940556a8faa4e1fdbef124bfd75f2c4ebd855a10b88a1c3b6f3e97f6f1a53"
},
"ghcr.io/github/gh-aw-node": {
"image": "ghcr.io/github/gh-aw-node",
"digest": "sha256:87366cb93b06d7a4e3db08a705875efc027b6c394da336119e7a067abacbb39b",
"pinned_image": "ghcr.io/github/gh-aw-node@sha256:87366cb93b06d7a4e3db08a705875efc027b6c394da336119e7a067abacbb39b"
},
"ghcr.io/github/github-mcp-server:v1.11.0": {
"image": "ghcr.io/github/github-mcp-server:v1.11.0",
"digest": "sha256:fbec75de11c255213fa08d80fb166abe73d851fff631c51c0079872967720699",
"pinned_image": "ghcr.io/github/github-mcp-server:v1.11.0@sha256:fbec75de11c255213fa08d80fb166abe73d851fff631c51c0079872967720699"
}
}
}
-78
View File
@@ -1,78 +0,0 @@
# General Code Review Instructions
## Review Priorities
When performing a code review, prioritize issues in the following order:
🔴 CRITICAL (Block merge)
* Security: Vulnerabilities, exposed secrets, authentication/authorization issues, injection, XSS
* Memory/resource leaks
* Crashes or undefined behavior
* Correctness: Logic errors, data corruption risks, race conditions, missing error handling
* Data Loss: Risk of data loss or corruption
🟡 IMPORTANT (Requires discussion)
* Code Quality: Severe violations of SOLID principles, excessive duplication
* Test Coverage: Missing tests for critical paths or new functionality
* Performance: Obvious performance bottlenecks (N+1 queries, memory leaks)
* Architecture: Significant deviations from established patterns
🟢 SUGGESTION (Non-blocking improvements)
* Readability: Poor naming, complex logic that could be simplified
* Optimization: Performance improvements without functional impact
* Best Practices: Minor deviations from conventions
* Documentation: Missing or incomplete comments/documentation
## General Review Principles
When performing a code review, follow these principles:
* Be specific: Reference exact lines, files, and provide concrete examples
* Be pragmatic: Not every suggestion needs immediate implementation
* Provide context: Explain WHY something is an issue and the potential impact
* Suggest solutions: Show corrected code when applicable, not just what's wrong
* Be constructive: Focus on improving the code, not criticizing the author
* Recognize good practices: Acknowledge well-written code and smart solutions
* Group related comments: Avoid multiple comments about the same topic
* Ask clarifying questions when code intent is unclear
## Code Quality Standards
When performing a code review, check for:
### Clean Code
* Descriptive and meaningful names for variables, functions, and classes
* Single Responsibility Principle: each function/class does one thing well
* DRY (Don't Repeat Yourself): no code duplication
* Functions should be small and focused (ideally < 20-30 lines)
* Avoid deeply nested code (max 3-4 levels), unit tests should be an exception from this rule
* Avoid magic numbers and strings (use constants)
* Code should be self-documenting; comments only when necessary
* Code follows consistent style and conventions
* No commented-out code or TODO without tickets
## Error Handling
* Proper error handling at appropriate levels
* Meaningful error messages
* No silent failures or ignored exceptions
* Fail fast: validate inputs early
* Use appropriate error types/exceptions
## Testing Standards
When performing a code review, verify test quality:
* Coverage: Critical paths and new functionality must have tests
* Test Names: Descriptive names that explain what is being tested
* Independence: Tests should not depend on each other or external state
* Assertions: Use specific assertions, avoid generics
* Edge Cases: Test boundary conditions, null values, empty inputs
* Mock Appropriately: Mock external dependencies, not domain logic
* New code has appropriate test coverage
* No tests that always pass or are commented out
## Architecture and Design
When performing a code review, verify architectural principles:
* Separation of Concerns: Clear boundaries between layers/modules
* Dependency Direction: High-level modules don't depend on low-level details
* Interface Segregation: Prefer small, focused interfaces
* Loose Coupling: Components should be independently testable
* High Cohesion: Related functionality grouped together
* Consistent Patterns: Follow established patterns in the codebase
+41 -29
View File
@@ -6,8 +6,6 @@ updates:
interval: "weekly"
day: "sunday"
time: "07:00"
cooldown:
default-days: 3
open-pull-requests-limit: 5
target-branch: develop
groups:
@@ -23,38 +21,52 @@ updates:
nrwl:
patterns:
- "@nrwl/*"
typescript-eslint:
patterns:
- "@typescript-eslint/*"
ignore:
- dependency-name: "pdfjs-dist"
- dependency-name: "@types/*"
- dependency-name: "typescript"
- package-ecosystem: "github-actions"
directories:
- "/"
- "/.github/actions/before-install"
- "/.github/actions/create-git-tag"
- "/.github/actions/download-node-modules-and-artifacts"
- "/.github/actions/enable-dryrun"
- "/.github/actions/get-latest-tag-sha"
- "/.github/actions/npm-check-bundle"
- "/.github/actions/save-nx-cache"
- "/.github/actions/set-npm-tag"
- "/.github/actions/setup"
- "/.github/actions/upload-node-modules-and-artifacts"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/before-install"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/download-node-modules-and-artifacts"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/enable-dryrun"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/get-latest-tag-sha"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/npm-check-bundle"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/print-affected-libs"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/set-npm-tag"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/setup"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/slack-group-area"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/upload-node-modules-and-artifacts"
schedule:
interval: "weekly"
cooldown:
default-days: 3
groups:
github-actions:
patterns:
- "*"
update-types:
- "minor"
- "patch"
ignore:
# Managed by gh aw add. Version-locked to the gh-aw compiler; do not bump.
- dependency-name: "github/gh-aw-actions"
-23
View File
@@ -1,23 +0,0 @@
---
applyTo: "**/*.html"
---
# HTML Development Standards
* Simple Templates: Keep templates as simple as possible, avoiding complex logic directly in the template. Delegate complex logic to the component's TypeScript code.
* Native Control Flow: Use the new built-in control flow syntax (`@if`, `@for`, `@switch`) instead of the older structural directives (`*ngIf`, `*ngFor`, `*ngSwitch`).
* NgOptimizedImage: Use `NgOptimizedImage` for all static images to automatically optimize image loading and performance.
* Async Pipe: Use the `async` pipe to handle observables in templates. This automatically subscribes and unsubscribes, preventing memory leaks.
* Prefer pipes over functions in templates for performance reasons, as pipes are only re-evaluated when their inputs change.
## Accessibility Standards
* Add `alt` text to all images
* Label form inputs with `<mat-label>` or `aria-label`
* Ensure interactive elements have accessible names
* Add `role`, `aria-labelledby`, and `aria-describedby` when semantic HTML isn't sufficient
* All interactive elements must be keyboard accessible
* Ensure 4.5:1 contrast ratio for normal text, 3:1 for large text
* Use `aria-live="polite"` for status updates
* Watch out for misused/non-semantic elements (e.g., <div> instead of <section>)
* Avoid broken heading hierarchy (e.g., h1 → h3 without h2)
-19
View File
@@ -1,19 +0,0 @@
---
applyTo: "**/*.scss"
---
# SCSS Development Standards
* Avoid using `!important` to override styles unless absolutely necessary; instead, increase specificity or refactor the code structure.
* Avoid using Angular Material internal class; prefer using Angular Material Design 3 theming and tokens.
* Use variables for colors, fonts, and other design tokens to maintain consistency across the project.
* Use mixins for reusable styles and to avoid code duplication.
* Ensure that styles are responsive and work well across different screen sizes and devices.
* Use CSS Grid and Flexbox for layout to create flexible and responsive designs.
* Avoid using overly specific selectors (e.g., #header .nav ul li a)
* Be DRY (avoid repeated styles for similar elements)
* Check for inconsistent naming (e.g., mixing BEM and arbitrary classes)
* Make sure selected colors have right contrast (satisfy WCAG AA)
* All interactive elements should have focus state
* Avoid disabled outline without alternative focus indicators
-96
View File
@@ -1,96 +0,0 @@
---
applyTo: "**/*.ts"
---
# TypeScript Development Standards
## Type Safety
* Strict Type Checking: Always enable and adhere to strict type checking. This helps catch errors early and improves code quality.
* Prefer Type Inference: Allow TypeScript to infer types when they are obvious from the context. This reduces verbosity while maintaining type safety.
* Avoid `any`: Do not use the `any` type unless absolutely necessary as it bypasses type checking. Prefer `unknown` when a type is uncertain and you need to handle it safely.
* Use strict null checks (no `null` or `undefined` without explicit handling)
* Use type guards and union types for robust type checking
* Check for missing return types in function signatures
* Avoid implicit `any` (untyped function parameters)
## Naming Conventions
* Use PascalCase for types, interfaces, and classes
* Use camelCase for variables, functions, and methods
* Use UPPER_CASE for constants
## Modern TypeScript Patterns
* Use optional chaining (`?.`) and nullish coalescing (`??`)
* Prefer `const` over `let`; never use `var`
* Use arrow functions for callbacks and short functions
* Avoid enums - they generate additional code at compile time, which increases the size of the final file. This can have a negative impact on the loading speed and performance of the app. Prefer union types or literal types instead.
* Avoid unhandled promise rejections (missing .catch() or try/catch)
* Use proper async/await pattern
* Avoid inefficient array operations (e.g., nested .map())
* Use destructuring for object/array access
* Prefer arrow functions
## Angular Best Practices
* Standalone Components: Always use standalone components, directives, and pipes. Avoid using `NgModules` for new features or refactoring existing ones.
* Implicit Standalone: When creating standalone components, you do not need to explicitly set `standalone: true` inside the `@Component`, `@Directive` and `@Pipe` decorators, as it is implied by default.
* Lazy Loading: Implement lazy loading for feature routes to improve initial load times of your application.
* Use Angular Material or other modern UI libraries for consistent styling and UI components.
* Implement proper error handling with RxJS operators (e.g., catchError)
* Verify if newly added functionalities can utilize Angular Signals for fine-grained reactivity, reducing change detection overhead.
* Utilize AOT (Ahead-of-Time) compilation and tree-shaking for efficient, smaller bundle sizes.
* Prefer class binding over `ngClass` and `ngStyle` for better performance.
* Use protected on class members that are only used by a component's template, as it allows for better encapsulation while still being accessible to the template.
* Use readonly for properties that shouldn't change.
* Use `takeUntilDestroyed` & `destroyRef`: The `takeUntilDestroyed` and `destroyRef` have been introduced with Angular 16 and help to reduce boilerplate code related to unsubscribing on the `OnDestroy` hook.
* Organize the order of properties and methods in Angular components for readability and maintainability. Recommended order is:
1. **Injected services** Whether they are public or private, it's clear they are dependencies of the class.
2. **Inputs**: Properties that receive data from outside.
3. **Outputs**: Events that the component can trigger.
4. **ViewChild/ContentChild**: References to HTML elements.
5. **Public static properties**: Constants and static members that are accessible to everyone.
6. **Readonly properties**: Immutable public properties.
7. **Public properties**: Data and functions available to everyone.
8. **Private static properties**: Constants and static members that are only accessible within the class.
9. **Private readonly properties**: Immutable private properties.
10. **Private properties**: Data and functions used only inside the component.
11. **Setters and Getters**: Methods for accessing and modifying properties.
12. **Constructor**: Used to initialize the component.
13. **Lifecycle Hooks**: Methods that run at specific times in the components lifecycle.
14. **Public methods**: Functions available to everyone.
15. **Private methods**: Functions used only inside the component.
## Components
* Single Responsibility: Keep components small, focused, and responsible for a single piece of functionality.
* Reactive Forms: Prefer Reactive forms over Template-driven forms for complex forms, validation, and dynamic controls due to their explicit, immutable, and synchronous nature.
* Use Typed Forms: Typed Forms in Angular are a new feature introduced in Angular 14 that provide stronger type checking for reactive forms. They allow developers to define the structure and types of form controls, making it easier to catch errors at compile-time rather than runtime.
## Services
* Single Responsibility: Design services around a single, well-defined responsibility.
* `providedIn: 'root'`: Use the `providedIn: 'root'` option when declaring injectable services to ensure they are singletons and tree-shakable.
* `inject()` Function: Prefer the `inject()` function over constructor injection when injecting dependencies, especially within `provide` functions, `computed` properties, or outside of constructor context.
## Unit testing
* Write unit tests for components, services, and pipes using Jasmine and Karma.
* Test cases should be reasonably groupped based on tested functionality/behaviour using describe blocks.
* Use plain English test names based on the should <expectedBehavior> when <stateUnderTest> pattern as a guideline.
* Use Angular's TestBed for component testing with mocked dependencies
* Avoid Direct Calls to Component Lifecycle Hooks: Instead of directly invoking lifecycle hooks like `ngOnInit()`, use Angular's testing utilities to trigger them naturally. For example, use `fixture.detectChanges()` to trigger change detection, which will automatically call `ngOnInit()` and other lifecycle hooks in the correct order.
* Use fixture.componentRef.setInput() Instead of Direct Input Assignment: When testing components with inputs, use `fixture.componentRef.setInput()` to set input values. This method ensures that Angular's change detection is properly triggered, allowing the component to react to input changes as it would in a real application.
* Use the Provide Mock Store for testing components that rely on NgRx state management. This allows you to mock the store and control the state during tests without needing to set up a full NgRx environment.
* Mock HTTP requests using provideHttpClientTesting
* Import only the minimal required modules
* Avoid NO_ERRORS_SCHEMA and CUSTOM_ELEMENTS_SCHEMA in tests to ensure proper error detection
* Do not verify mocked methods
* Avoid mocking component methods unless necessary; prefer testing actual behavior
* Avoid testing private methods directly; test them through public methods instead
* Avoid testing methods or behaviours of children components; use shallow testing or mock child components instead
* Use the overrideProviders API to replace components, directives, pipes, or services declared deep within the module hierarchy
* Avoid async/await in synchronous unit tests
* Prefer data-automation-id over CSS class when possible
* Do not use toBeDefined() to check if an element is visible.
-39
View File
@@ -1,39 +0,0 @@
name: "Build Lib Workflow"
on:
workflow_call:
inputs:
base_ref:
description: 'Base branch for affected calculation'
required: false
type: string
default: 'develop'
env:
NODE_OPTIONS: "--max-old-space-size=5120"
jobs:
build:
name: "Build affected libs"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Setup environment
id: setup-env
uses: ./.github/actions/setup
with:
cache-suffix: build
full-setup: 'false'
- name: Build affected libs
env:
BASE_REF: ${{ inputs.base_ref }}
run: pnpm nx affected --target=build --base=origin/$BASE_REF --head=HEAD --configuration=production --exclude=stories
- name: Save nx cache
if: ${{ success() }}
uses: ./.github/actions/save-nx-cache
with:
cache-suffix: build
+4 -4
View File
@@ -22,7 +22,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
@@ -30,7 +30,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v3.29.5
uses: github/codeql-action/init@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
# Override language selection by uncommenting this and choosing your languages
with:
languages: javascript
@@ -39,7 +39,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v3.29.5
uses: github/codeql-action/autobuild@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -53,4 +53,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@b96794f015dfd88f77b49b1c93e0fa7110f94c63 # v3.29.5
uses: github/codeql-action/analyze@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # v3.28.1
+75
View File
@@ -0,0 +1,75 @@
name: "git-tag"
on:
workflow_call:
inputs:
dry-run-flag:
description: 'enable dry-run on artifact push'
required: false
type: boolean
default: true
push:
branches:
- master
- master-patch-*
env:
BASE_REF: ${{ github.base_ref }}
HEAD_REF: ${{ github.head_ref }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_BRANCH: ${{ github.ref_name }}
GH_BUILD_DIR: ${{ github.workspace }}
GH_COMMIT: ${{ github.sha }}
BUILD_ID: ${{ github.run_id }}
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
LOG_LEVEL: "ERROR"
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
NPM_REGISTRY_ADDRESS: ${{ secrets.NPM_REGISTRY_ADDRESS }}
NPM_REGISTRY_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
REDIRECT_URI: /
jobs:
release:
uses: ./.github/workflows/release.yml
secrets: inherit
with:
dry-run-flag: false
setup:
needs: release
timeout-minutes: 20
name: "Release tag"
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: $BOT_GITHUB_TOKEN
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: set-dryrun
uses: ./.github/actions/enable-dryrun
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- name: install NPM
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version-file: '.nvmrc'
- name: "Release tag"
run: |
git fetch --all --quiet
BRANCH=${GITHUB_REF##*/} ./scripts/github/release/git-tag.sh ${{ steps.set-dryrun.outputs.dryrun }}
@@ -1,67 +0,0 @@
name: "Sends notification when A/N BDU label is attached to PR"
on:
pull_request:
types: [labeled]
branches: [develop]
permissions:
pull-requests: read
issues: read
jobs:
notify-bdu:
name: Notify Teams when A/N BDU label is added
runs-on: ubuntu-latest
timeout-minutes: 5
if: >-
github.event.action == 'labeled' &&
github.event.label.name == 'A/N BDU' &&
github.event.pull_request.state == 'open'
steps:
- name: Check if label was added after PR creation (with time threshold)
id: check_label_timing
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const prCreatedAt = new Date('${{ github.event.pull_request.created_at }}');
const timeline = await github.rest.issues.listEvents({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
const labelEvent = timeline.data.reverse().find(event =>
event.event === 'labeled' &&
event.label.name === 'A/N BDU'
);
if (!labelEvent) {
core.setOutput('should_notify', 'false');
return;
}
const labelAddedAt = new Date(labelEvent.created_at);
const timeDiffSeconds = (labelAddedAt - prCreatedAt) / 1000;
if (timeDiffSeconds > 15) {
core.setOutput('should_notify', 'true');
} else {
core.setOutput('should_notify', 'false');
}
- name: Send Teams notification
if: steps.check_label_timing.outputs.should_notify == 'true'
uses: Alfresco/alfresco-build-tools/.github/actions/send-teams-notification@a297ff6c5bf20c667047db658dd23f60241b270a # v18.28.0
with:
webhook-url: ${{ secrets.TEAMS_NOTIFICATION_ADF_BDU_WEBHOOK }}
skip_checkout: true
status: success
title: "A/N BDU PR: ${{ github.event.pull_request.title }}"
message: |
A pull request has been marked with the **A/N BDU** label.
- **Repository:** ${{ github.repository }}
- **PR:** [#${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})
- **Author:** ${{ github.event.pull_request.user.login }}
+4 -16
View File
@@ -8,27 +8,15 @@ jobs:
runs-on: ubuntu-latest
if: github.event.registry_package.package_type == 'npm' && github.event.registry_package.name == 'adf-core'
steps:
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ vars.GH_APP_ENGINEERING_CONTRIB_CLIENT_ID }}
private-key: ${{ secrets.GH_APP_ENGINEERING_CONTRIB_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: alfresco-apps
permission-contents: write
- name: Dispatch event to monorepo
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
env:
PACKAGE_NAME: ${{ github.event.registry_package.name }}
PACKAGE_VERSION: ${{ github.event.registry_package.package_version.name }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ steps.app-token.outputs.token }}
github-token: ${{ secrets.PAT_WRITE_PKG }}
retries: 3
script: |
const payload = {
package_name: process.env.PACKAGE_NAME,
package_version: process.env.PACKAGE_VERSION
package_name: "${{ github.event.registry_package.name }}",
package_version: "${{ github.event.registry_package.package_version.name }}"
};
await github.rest.repos.createDispatchEvent({
+4 -27
View File
@@ -1,46 +1,23 @@
name: Pull Translations from Crowdin
on:
schedule:
- cron: "0 7-17 * * 1-5"
- cron: "0 0 * * *"
workflow_dispatch:
workflow_call:
secrets:
GH_APP_ENGINEERING_CONTRIB_PRIVATE_KEY:
required: true
CROWDIN_TRANSLATIONS_TOKEN:
required: true
HXPS_GIT_COMMIT_SIGNING_PRIVATE_KEY:
required: true
jobs:
pull-from-crowdin:
runs-on: ubuntu-latest
steps:
- name: Generate app token
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ vars.GH_APP_ENGINEERING_CONTRIB_CLIENT_ID }}
private-key: ${{ secrets.GH_APP_ENGINEERING_CONTRIB_PRIVATE_KEY }}
permission-contents: write
permission-pull-requests: write
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: develop
token: ${{ steps.app-token.outputs.token }}
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Pull translations from Crowdin
uses: crowdin/github-action@0d5670f539973aea2f01abce61a8989934df0025 # v3.0.2
uses: crowdin/github-action@d1632879d4d4da358f2d040f79fa094571c9a649 # v2.5.1
with:
skip_ref_checkout: true
upload_sources: false
download_translations: true
create_pull_request: true
localization_branch_name: automated-translations-update
pull_request_title: "GH auto: Automated Update of Translations from Crowdin"
pull_request_base_branch_name: develop
github_user_name: ${{ vars.HXPS_GIT_USERNAME }}
github_user_email: ${{ vars.HXPS_GIT_EMAIL }}
gpg_private_key: ${{ secrets.HXPS_GIT_COMMIT_SIGNING_PRIVATE_KEY }}
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TRANSLATIONS_TOKEN }}
+194 -242
View File
@@ -4,17 +4,17 @@ on:
workflow_call:
inputs:
dry-run-flag:
description: "enable dry-run on artifact push"
description: 'enable dry-run on artifact push'
required: false
type: boolean
default: true
devel:
description: "devel"
description: 'devel'
required: false
type: boolean
default: false
cron-run:
description: "disables jobs which should not run when cron runs e2es"
description: 'disables jobs which should not run when cron runs e2es'
required: false
type: boolean
default: false
@@ -31,314 +31,266 @@ concurrency:
cancel-in-progress: true
env:
BASE_REF: ${{ github.base_ref }}
HEAD_REF: ${{ github.head_ref }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_BRANCH: ${{ github.ref_name }}
GH_BUILD_DIR: ${{ github.workspace }}
GH_COMMIT: ${{ github.sha }}
BUILD_ID: ${{ github.run_id }}
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
LOG_LEVEL: "ERROR"
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
REDIRECT_URI: /
jobs:
pre-checks:
runs-on: ubuntu-latest
outputs:
code-changed: ${{ steps.path-filter.outputs.code-changed }}
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Ensure SHA pinned actions
uses: hyland/github-actions-ensure-sha-pinned-actions@7957efb76aba0eec7580a9c0392d3e5bec381359 # v2.0.1
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@c3a2b64f69b7a1542a68f44d9edbd9ec3fc1455e # v3.0.20
- name: Check pnpm-lock.yaml version
- name: Check package-lock.json version
run: |
if [[ -f "pnpm-lock.yaml" ]]; then
LOCKFILE_VERSION=$(grep "^lockfileVersion:" pnpm-lock.yaml | cut -d"'" -f2)
if [[ "$LOCKFILE_VERSION" == "9.0" ]]; then
echo "pnpm-lock.yaml has correct version: $LOCKFILE_VERSION"
else
echo "pnpm-lock.yaml must be version 9.0, found: $LOCKFILE_VERSION"
exit 1
fi
if [[ $(jq '.lockfileVersion == 3' package-lock.json) == "true" ]] ; then
echo "package-lock.json has a correct version"
else
echo "pnpm-lock.yaml is missing"
echo "package-lock must be version 3"
exit 1
fi
- name: Detect code changes
id: path-filter
env:
GH_TOKEN: ${{ github.token }}
run: |
if [ "${{ github.event_name }}" != "pull_request" ]; then
echo "Not a PR event — assuming code changed"
echo "code-changed=true" >> $GITHUB_OUTPUT
exit 0
fi
FILES=$(gh api /repos/$GITHUB_REPOSITORY/pulls/${{ github.event.pull_request.number }}/files --paginate --jq '.[].filename')
CODE_CHANGED="false"
while IFS= read -r file; do
case "$file" in
*.md|docs/*|.github/*.md|.github/CODEOWNERS|.github/dependabot.yml|LICENSE*|NOTICE*|.editorconfig|.gitattributes)
;;
*)
CODE_CHANGED="true"
break
;;
esac
done <<< "$FILES"
echo "code-changed=$CODE_CHANGED" >> $GITHUB_OUTPUT
echo "Code changed: $CODE_CHANGED"
check-if-pr-is-approved:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 1
fetch-depth: 0
- name: Check if PR approval can be skipped
id: skip-check
env:
EVENT_NAME: ${{ github.event_name }}
ACTOR: ${{ github.actor }}
DEVEL_FLAG: ${{ inputs.devel }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
- name: Get branch name
uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@16272633584df58ea603112c4aac4564c8673cd6 # v8.9.0
- name: Save commit message
uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@16272633584df58ea603112c4aac4564c8673cd6 # v8.9.0
- name: ci:force flag parser
shell: bash
run: |
skip="false"
# Get commit message safely from git to avoid script injection
if [ "$EVENT_NAME" == "pull_request" ] && [ -n "$PR_HEAD_SHA" ]; then
COMMIT_MESSAGE=$(git log -1 --format=%B "$PR_HEAD_SHA" 2>/dev/null || echo "")
else
COMMIT_MESSAGE=$(git log -1 --format=%B 2>/dev/null || echo "")
if [ "${{ github.event_name }}" == "schedule" ] || [ "${{ github.actor }}" == "dependabot[bot]" ]; then
echo -e "\033[32mci:force check can be skipped\033[0m"
skip_check="true"
elif [[ "$COMMIT_MESSAGE" == *"[ci:force]"* ]]; then
echo -e "\033[32m[ci:force] flag detected. No need for approval.\033[0m"
skip_check="true"
fi
if [ "$EVENT_NAME" == "schedule" ] || [ "$EVENT_NAME" == "workflow_dispatch" ]; then
echo -e "\033[32mSchedule/dispatch event — skipping approval check\033[0m"
skip="true"
elif [ "$ACTOR" == "dependabot[bot]" ] || [ "$ACTOR" == "alfresco-build" ]; then
echo -e "\033[32mCommit by $ACTOR — skipping approval check\033[0m"
skip="true"
elif echo "$PR_TITLE" | grep -qF "[ci:force]"; then
echo -e "\033[32m[ci:force] flag detected in PR title — skipping approval check\033[0m"
skip="true"
elif echo "$COMMIT_MESSAGE" | grep -qF "[ci:force]"; then
echo -e "\033[32m[ci:force] flag detected in commit message — skipping approval check\033[0m"
skip="true"
elif [[ "$DEVEL_FLAG" == "true" ]]; then
echo -e "\033[32mDevel flag — skipping approval check\033[0m"
skip="true"
fi
echo "skip=$skip" >> $GITHUB_OUTPUT
- name: Get PR number
if: ${{ steps.skip-check.outputs.skip != 'true' }}
id: pr-number
env:
GH_TOKEN: ${{ github.token }}
run: |
PR_NUMBER="${{ github.event.pull_request.number }}"
if [ -z "$PR_NUMBER" ]; then
PR_NUMBER=$(gh pr view --json number --jq '.number' 2>/dev/null || echo "")
fi
echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
echo "PR: $PR_NUMBER"
if: ${{ github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' }}
uses: kamatama41/get-pr-number-action@0bcaab5752c0b699149e74667c8ce2f764cbb7fa # v0.9.1
id: action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Check if PR is approved
if: ${{ steps.skip-check.outputs.skip != 'true' && steps.pr-number.outputs.pr_number != '' }}
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ steps.pr-number.outputs.pr_number }}
- name: show pr number
shell: bash
run: |
echo "Checking approval for PR: $PR_NUMBER"
checkApproval=$(gh api /repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/reviews | jq '.[] | select(.state == "APPROVED") | .user.login')
if [[ $checkApproval ]]; then
echo -e "\033[32mPR approved\033[0m"
else
echo -e "\033[31mPR NOT approved\033[0m"
exit 1
echo "PR: ${{ steps.action.outputs.number }}"
- name: check if pr is approved
env:
DEVEL_FLAG: ${{ inputs.devel }}
GH_TOKEN: ${{ github.token }}
skip_check: "false"
run: |
if [ "${{ github.event_name }}" == "schedule" ] || [ "${{ github.actor }}" == "dependabot[bot]" ]; then
echo -e "\033[32mci:force check can be skipped\033[0m"
skip_check="true"
elif [[ "$COMMIT_MESSAGE" == *"[ci:force]"* ]]; then
echo -e "\033[32m[ci:force] flag detected. No need for approval.\033[0m"
skip_check="true"
fi
if [ "${{ github.actor }}" == "dependabot[bot]" ] || [ "${{ github.actor }}" == "alfresco-build" ]; then
echo -e "\033[32mCommit by ${{ github.actor }}. No need for approval.\033[0m"
skip_check="true"
fi
if [ "${{ github.event_name }}" == "schedule" ] || [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo -e "\033[32mSchedule event\033[0m"
skip_check="true"
fi
if [[ "$DEVEL_FLAG" == "true" ]]; then
echo -e "\033[32mDevel flag\033[0m"
skip_check="true"
fi
if [ "$skip_check" == "false" ]; then
echo "Checking PR approval"
prNumber=${{ steps.action.outputs.number }}
echo "PR: $prNumber"
checkApproval=$(gh api /repos/$GITHUB_REPOSITORY/pulls/$prNumber/reviews | jq '.[] | select(.state == "APPROVED") | .user.login')
if [[ $checkApproval ]]; then
echo -e "\033[32mPR approved\033[0m"
else
echo -e "\033[31mPR NOT approved\033[0m"
exit 1
fi
fi
setup:
# long timeout required when cache has to be recreated
timeout-minutes: 30
name: "Setup"
runs-on: ubuntu-latest
needs: [check-if-pr-is-approved, pre-checks]
if: ${{ needs.pre-checks.outputs.code-changed == 'true' }}
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Setup environment
id: setup-env
uses: ./.github/actions/setup
with:
cache-suffix: setup
- name: Bundle
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
- name: install
run: |
pnpm bundle:js-api
pnpm bundle:cli
- name: Save nx cache
if: ${{ success() }}
uses: ./.github/actions/save-nx-cache
npm ci
npx nx run js-api:bundle
npx nx run cli:bundle
- uses: ./.github/actions/upload-node-modules-and-artifacts
unit-tests:
timeout-minutes: 30
name: "Unit tests: ${{ matrix.unit-tests.name }}"
runs-on: ubuntu-latest
needs: [setup]
strategy:
fail-fast: false
# max-parallel: 4
matrix:
unit-tests:
- name: js-api
exclude: "core,insights,content-services,process-services,process-services-cloud,eslint-plugin-eslint-angular"
- name: content-services
exclude: "insights,core,extensions,process-services,process-services-cloud,eslint-plugin-eslint-angular,js-api"
- name: core
exclude: "insights,content-services,process-services,process-services-cloud,eslint-plugin-eslint-angular,js-api"
- name: insights
exclude: "core,extensions,content-services,process-services-cloud,process-services,eslint-plugin-eslint-angular,js-api"
- name: process-services
exclude: "core,extensions,content-services,process-services-cloud,insights,eslint-plugin-eslint-angular,js-api"
- name: process-cloud
exclude: "insights,core,extensions,content-services,process-services,eslint-plugin-eslint-angular,js-api"
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
cache-suffix: setup
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: Run unit tests
run: |
/usr/bin/xvfb-run --auto-servernum npx nx affected:test $NX_CALCULATION_FLAGS --exclude=${{ matrix.unit-tests.exclude }}
lint:
# long timeout required when cache has to be recreated
timeout-minutes: 30
name: "Lint"
runs-on: ubuntu-latest
needs: [setup]
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Setup environment
id: setup-env
uses: ./.github/actions/setup
with:
cache-suffix: lint
full-setup: 'false'
- name: Run lint
env:
BASE_REF: ${{ github.base_ref || 'develop' }}
run: pnpm nx affected --target=lint --base=origin/$BASE_REF --head=HEAD
- name: Save nx cache
if: ${{ success() }}
uses: ./.github/actions/save-nx-cache
with:
cache-suffix: lint
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
- uses: ./.github/actions/download-node-modules-and-artifacts
- run: npx nx affected --target=lint $NX_CALCULATION_FLAGS
trigger-build:
name: "Build Libs"
needs: [setup]
uses: ./.github/workflows/build-lib-workflow.yml
with:
base_ref: ${{ github.base_ref || 'develop' }}
build-storybook:
build-libs:
# long timeout required when cache has to be recreated
timeout-minutes: 30
name: "Build Storybook"
needs: [setup]
name: "Build libs"
runs-on: ubuntu-latest
needs: [setup]
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Setup environment
id: setup-env
uses: ./.github/actions/setup
with:
cache-suffix: storybook
full-setup: 'false'
- name: Build Storybook
env:
BASE_REF: ${{ github.base_ref || 'develop' }}
run: |
pnpm nx affected --target=build-storybook --base=origin/$BASE_REF --head=HEAD --configuration=ci
- name: Save nx cache
if: ${{ success() }}
uses: ./.github/actions/save-nx-cache
with:
cache-suffix: storybook
trigger-unit-tests:
name: "Unit Tests"
needs: [setup]
uses: ./.github/workflows/unit-test-workflow.yml
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
base_ref: ${{ github.base_ref || 'develop' }}
PR-size-check:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: Check PR size
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
script: |
const { data: pr } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
});
const additions = pr.additions;
const deletions = pr.deletions;
const totalChanges = additions + deletions;
const changedFiles = pr.changed_files;
let size = 'S';
if (totalChanges > 1000 || changedFiles > 30) size = 'XL';
else if (totalChanges > 500 || changedFiles > 20) size = 'L';
else if (totalChanges > 200 || changedFiles > 10) size = 'M';
core.summary
.addHeading('PR Size: ' + size, 3)
.addTable([
[{data: 'Metric', header: true}, {data: 'Count', header: true}],
['Files changed', String(changedFiles)],
['Additions', '+' + String(additions)],
['Deletions', '-' + String(deletions)],
['Total changes', String(totalChanges)],
]);
if (size === 'XL') {
core.summary.addRaw('⚠️ This PR is very large. Consider splitting it into smaller PRs for easier review.');
}
await core.summary.write();
if (size === 'XL') {
core.warning('This PR has ' + totalChanges + ' changes across ' + changedFiles + ' files. Consider splitting it for easier review.');
}
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
- uses: ./.github/actions/download-node-modules-and-artifacts
- run: NX_REJECT_UNKNOWN_LOCAL_CACHE=0 npx nx affected:build $NX_CALCULATION_FLAGS --prod
- run: NX_REJECT_UNKNOWN_LOCAL_CACHE=0 npx nx affected --target=build-storybook $NX_CALCULATION_FLAGS --configuration=ci
- uses: ./.github/actions/upload-node-modules-and-artifacts
PR-forbidden-labels:
if: ${{ inputs.cron-run == '' || inputs.cron-run == 'false' }}
runs-on: ubuntu-latest
steps:
- name: Check for forbidden labels
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
- id: checkoutRepo
name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- name: PR contains forbidden labels
id: pr-forbidden
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const { data: issue } = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
});
const labels = issue.labels?.map(item => item.name) || [];
const forbidden = ['next version ➡️', 'do not merge🙅🏻‍♂️'];
const issueHasLabels = require('./scripts/github/update/check-issue-has-label.js');
const checkLabels = ['next version ➡️', 'do not merge🙅🏻‍♂️'];
if (forbidden.some(l => labels.includes(l))) {
const hasLabel = await issueHasLabels({github, context, checkLabels})
if(hasLabel) {
core.setFailed('The PR contains a forbidden label! You are not allowed to merge until the label is there.');
}
- name: Check value after
run: |
echo "result ${{ toJson(steps.pr-forbidden.*.result) }}" && echo "result ${{ steps.pr-forbidden.*.result }}"
echo "result ${{ contains(toJson(steps.pr-forbidden.*.result), 'failure') }}"
finalize:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs:
[
check-if-pr-is-approved,
pre-checks,
setup,
trigger-unit-tests,
lint,
trigger-build,
build-storybook,
PR-forbidden-labels,
]
needs: [check-if-pr-is-approved, pre-checks, setup, unit-tests, lint, build-libs]
steps:
- name: Check job execution status
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: identify-slack-group
id: groups
if: ${{ github.event_name == 'schedule' }}
uses: ./.github/actions/slack-group-area
with:
affected: ${{ steps.e2e-result.outputs.result }}
- uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
name: Nofify QA failure
if: ${{ github.event_name == 'schedule' && contains(needs.*.result, 'failure') }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: 'C016SMNNL8L' #guild-channel
slack-message: "🔴 Warning: The daily ADF cronjob failed\nWorkflow run : <https://github.com/Alfresco/alfresco-ng2-components/actions/runs/${{ github.run_id }}| here>\nDetails: ${{ steps.e2e-result.outputs.result }}\nArea: ${{ steps.groups.outputs.groups}}"
- name: workflow failure
run: exit 1
if: ${{ contains(needs.*.result, 'failure') }}
- name: workflow canceled
run: exit 1
if: ${{ contains(needs.*.result, 'cancelled') }}
- name: workflow success
run: exit 0
if: ${{ contains(needs.*.result, 'success') }}
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Automatic Rebase
+129
View File
@@ -0,0 +1,129 @@
name: Release lib on branch
run-name: Release lib on branch ${{ github.ref_name }}
on:
workflow_dispatch:
inputs:
dry-run-flag:
description: 'enable dry-run on artifact push'
required: false
type: boolean
default: true
env:
BASE_REF: ${{ github.base_ref }}
HEAD_REF: ${{ github.head_ref }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_BRANCH: ${{ github.ref_name }}
GH_BUILD_DIR: ${{ github.workspace }}
GH_COMMIT: ${{ github.sha }}
BUILD_ID: ${{ github.run_id }}
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
LOG_LEVEL: "ERROR"
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
REDIRECT_URI: /
jobs:
setup:
timeout-minutes: 20
name: "Setup"
runs-on: ubuntu-latest
steps:
- name: set TAG_NPM BRANCH
shell: bash
run: |
TAG_NPM="branch"
echo "Set TAG with name: ${TAG_NPM}"
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: ./.github/actions/setup
with:
enable-cache: false
enable-node-modules-cache: false
- name: install
run: |
npm ci
npx nx run js-api:bundle
npx nx run cli:bundle
- uses: ./.github/actions/upload-node-modules-and-artifacts
release-npm:
needs: [setup]
timeout-minutes: 30
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: ./.github/actions/setup
with:
enable-cache: false
enable-node-modules-cache: false
- id: set-dryrun
uses: ./.github/actions/enable-dryrun
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: Set libraries versions
run: |
set -u;
./scripts/update-version.sh -gnu || exit 1;
- name: Set migrations
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const setMigrations = require('./scripts/github/release/set-migrations.js');
setMigrations();
- name: Build libraries
run: |
npx nx run-many --target=build --prod --exclude="demoshell" --skip-nx-cache
npx nx run-many --target=pretheme
npx nx run-many --target=build-schematics
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
name: release libraries GH registry
with:
node-version-file: '.nvmrc'
registry-url: 'https://npm.pkg.github.com'
scope: '@alfresco'
- run: npx nx run-many --target=npm-publish --tag=branch|| exit 1
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_WRITE_PKG }}
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
name: release libraries Npm registry
with:
node-version-file: '.nvmrc'
registry-url: 'https://${{ vars.NPM_REGISTRY_ADDRESS }}'
scope: '@alfresco'
- run: npx nx run-many --target=npm-publish --tag=branch || exit 1
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
npm-check-bundle:
needs: [release-npm]
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/npm-check-bundle
+115 -71
View File
@@ -1,141 +1,192 @@
name: "release"
on:
workflow_dispatch:
workflow_call:
inputs:
dry-run-flag:
description: 'enable dry-run on artifact push'
required: false
type: boolean
default: true
push:
pull_request:
types: [closed]
branches:
- develop
- develop-patch*
- master
- master-patch-*
permissions:
id-token: write # Required for OIDC
contents: read
- develop-patch*
- master-patch*
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
env:
BASE_REF: ${{ github.base_ref }}
HEAD_REF: ${{ github.head_ref }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_BRANCH: ${{ github.ref_name }}
GH_BUILD_DIR: ${{ github.workspace }}
GH_COMMIT: ${{ github.sha }}
BUILD_ID: ${{ github.run_id }}
GH_RUN_NUMBER: ${{ github.run_attempt }}
GH_BUILD_NUMBER: ${{ github.run_id }}
JOB_ID: ${{ github.run_id }}
E2E_ADMIN_EMAIL_IDENTITY: ${{ secrets.E2E_ADMIN_EMAIL_IDENTITY }}
E2E_ADMIN_PASSWORD_IDENTITY: ${{ secrets.E2E_ADMIN_PASSWORD_IDENTITY }}
LOG_LEVEL: "ERROR"
S3_BUILD_BUCKET_SHORT_NAME: ${{ secrets.S3_BUILD_BUCKET_SHORT_NAME }}
NODE_OPTIONS: "--max-old-space-size=5120"
DOCKER_REPOSITORY_DOMAIN: ${{ secrets.DOCKER_REPOSITORY_DOMAIN }}
DOCKER_REPOSITORY_USER: ${{ secrets.DOCKER_REPOSITORY_USER }}
DOCKER_REPOSITORY_PASSWORD: ${{ secrets.DOCKER_REPOSITORY_PASSWORD }}
DOCKER_REPOSITORY_STORYBOOK: "${{ secrets.DOCKER_REPOSITORY_DOMAIN }}/alfresco/storybook"
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
REPO_OWNER: "Alfresco"
REPO_NAME: "alfresco-ng2-components"
STORYBOOK_DIR: "./dist/storybook/stories"
BUILT_LIBS_DIR: "./dist/libs"
NODE_MODULES_DIR: "./node_modules"
REDIRECT_URI: /
jobs:
setup:
timeout-minutes: 20
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
if: github.event.pull_request.merged == true || github.ref_name == 'master' || github.ref_name == 'master-patch-*'
name: "Setup"
runs-on: ubuntu-latest
permissions:
contents: read
actions: write
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: ./.github/actions/setup
with:
enable-cache: false
enable-node-modules-cache: false
- name: install
run: |
pnpm install --frozen-lockfile
pnpm bundle:js-api
pnpm bundle:cli
npm ci
npx nx run js-api:bundle
npx nx run cli:bundle
- uses: ./.github/actions/upload-node-modules-and-artifacts
release-storybook:
needs: [setup]
timeout-minutes: 15
if: github.event.pull_request.merged == true || github.ref_name == 'master' || github.ref_name == 'master-patch-*'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 1
- run: git fetch --all
- id: set-dryrun
uses: ./.github/actions/enable-dryrun
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- uses: ./.github/actions/setup
with:
enable-cache: false
enable-node-modules-cache: false
act: ${{ inputs.dry-run-flag }}
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: release Storybook docker
run: |
npx nx run stories:build-storybook --configuration ci
. ./scripts/github/release/docker-tag.sh
./scripts/github/release/release-storybook-docker.sh ${{ steps.set-dryrun.outputs.dryrun }}
release-npm:
needs: [setup]
outputs:
release_version: ${{ steps.set-version.outputs.release_version }}
timeout-minutes: 30
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
if: github.event.pull_request.merged == true || github.ref_name == 'master' || github.ref_name == 'master-patch-*'
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC
contents: read
packages: write
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- id: setup
uses: ./.github/actions/setup
- uses: ./.github/actions/setup
with:
enable-cache: false
enable-node-modules-cache: false
- id: set-dryrun
uses: ./.github/actions/enable-dryrun
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- uses: ./.github/actions/download-node-modules-and-artifacts
- name: Set libraries versions
id: set-version
run: |
set -u;
./scripts/github/build/bumpversion.sh
- name: Set migrations
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const setMigrations = require('./scripts/github/release/set-migrations.js');
setMigrations();
- name: build libraries
run: |
pnpm build:libs
pnpm build:schematics
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
npx nx run-many -t build --prod --skip-nx-cache
npx nx run-many -t pretheme
npx nx run-many -t build-schematics
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
name: release libraries GH registry
with:
node-version-file: '.nvmrc'
registry-url: 'https://npm.pkg.github.com'
scope: '@alfresco'
- run: pnpm run publish --tag ${{ steps.setup.outputs.npm-tag }} --provenance=false ${{ steps.set-dryrun.outputs.dryrun }}
- run: npx nx run-many -t npm-publish --tag=$TAG_NPM || exit 1
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
NODE_AUTH_TOKEN: ${{ secrets.PAT_WRITE_PKG }}
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
name: release libraries Npm registry
with:
node-version-file: '.nvmrc'
registry-url: 'https://${{ vars.NPM_REGISTRY_ADDRESS }}'
scope: '@alfresco'
- run: pnpm run publish --tag ${{ steps.setup.outputs.npm-tag }} ${{ steps.set-dryrun.outputs.dryrun }}
- run: npx nx run-many -t npm-publish --tag=$TAG_NPM || exit 1
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_REGISTRY_TOKEN }}
create-git-tag:
propagate:
needs: [release-npm]
if: ${{ contains(toJson(github.event.pull_request.labels.*.name), 'hxp-upstream') }}
runs-on: ubuntu-latest
needs: [setup, release-npm]
if: github.event_name != 'workflow_dispatch'
name: Create github tag
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: HxP upstream invoke
uses: the-actions-org/workflow-dispatch@3133c5d135c7dbe4be4f9793872b6ef331b53bc7 # v4.0.0
with:
fetch-depth: 1
- uses: './.github/actions/create-git-tag'
with:
tagName: ${{ needs.release-npm.outputs.release_version }}
repo: Alfresco/hxp-frontend-apps
ref: develop
workflow: upstream-adf.yml
token: ${{ secrets.ALFRESCO_BUILD_GH_TOKEN }}
wait-for-completion: false
inputs: >
{
"tag_version": "alpha"
}
npm-check-bundle:
needs: [release-npm]
timeout-minutes: 25
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
timeout-minutes: 15
if: github.event.pull_request.merged == true || github.ref_name == 'master' || github.ref_name == 'master-patch-*'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/npm-check-bundle
push-translation-keys-to-crowdin:
name: Push translations keys to Crowdin
if: github.ref_name == 'develop' && github.event_name != 'workflow_dispatch'
if: ${{ github.ref == 'refs/heads/develop' }}
runs-on: ubuntu-latest
needs: [setup]
permissions:
@@ -144,35 +195,28 @@ jobs:
actions: read
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Push Source Files to Crowdin
uses: crowdin/github-action@0d5670f539973aea2f01abce61a8989934df0025 # v3.0.2
uses: crowdin/github-action@d1632879d4d4da358f2d040f79fa094571c9a649 # v2.5.1
with:
upload_sources: true
upload_sources_args: --delete-obsolete
env:
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TRANSLATIONS_TOKEN }}
pull-translation-keys-from-crowdin:
needs: push-translation-keys-to-crowdin
name: Run Crowdin pull pipeline for up-to-date sync
uses: ./.github/workflows/pull-from-crowdin.yml
secrets:
GH_APP_ENGINEERING_CONTRIB_PRIVATE_KEY: ${{ secrets.GH_APP_ENGINEERING_CONTRIB_PRIVATE_KEY }}
CROWDIN_TRANSLATIONS_TOKEN: ${{ secrets.CROWDIN_TRANSLATIONS_TOKEN }}
HXPS_GIT_COMMIT_SIGNING_PRIVATE_KEY: ${{ secrets.HXPS_GIT_COMMIT_SIGNING_PRIVATE_KEY }}
finalize:
if: always()
runs-on: ubuntu-latest
name: Final Results
needs: [release-npm, npm-check-bundle]
steps:
- name: Check job execution status
if: >-
${{
contains(needs.*.result, 'failure')
|| contains(needs.*.result, 'cancelled')
}}
run: exit 1
if: always()
runs-on: ubuntu-latest
name: Final Results
needs: [release-storybook, release-npm, npm-check-bundle]
steps:
- uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
name: Nofify FE eng-guild-front-end workflow failed
if: ${{ contains(toJson(needs.*.result), 'failure') }}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
channel-id: 'C016SMNNL8L' #eng-guild-front-end
slack-message: "🔴 Warning: The release workflow of alfresco-ng2-components pipe failed\n Author username: ${{ github.event.pull_request.user.login }}\n Workflow run <https://github.com/Alfresco/alfresco-ng2-components/actions/runs/${{ github.run_id }}| here>\n>"
-22
View File
@@ -1,22 +0,0 @@
name: "SonarCloud Full Scan (develop)"
on:
schedule:
- cron: '0 5 * * *'
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
jobs:
full-unit-tests-and-sonar-scan:
name: "Full Unit Tests + SonarCloud Scan"
uses: ./.github/workflows/unit-test-workflow.yml
secrets: inherit
with:
full: true
-14
View File
@@ -1,14 +0,0 @@
name: Stale PR Cleanup
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
permissions:
pull-requests: write
issues: write
jobs:
stale-pr-cleanup:
uses: Alfresco/alfresco-build-tools/.github/workflows/stale-pr-cleanup.yml@a297ff6c5bf20c667047db658dd23f60241b270a # v18.28.0
@@ -1,31 +0,0 @@
name: Supply Chain Review - PR Instructions
on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- "package.json"
- "pnpm-lock.yaml"
- "**/package.json"
- "pom.xml"
- "**/pom.xml"
jobs:
instructions:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: Alfresco/alfresco-build-tools/.github/actions/github-upsert-comment@a297ff6c5bf20c667047db658dd23f60241b270a # v18.28.0
with:
comment-identifier: supply-chain-review-instructions
comment-body: |
## 🔒 Supply Chain Security
This PR modifies dependencies. To run a security analysis, comment:
```
/supply-chain-review
```
The analysis will check for vulnerabilities, typosquatting, maintainer takeovers, and other supply chain risks.
File diff suppressed because one or more lines are too long
-391
View File
@@ -1,391 +0,0 @@
---
on:
slash_command:
name: supply-chain-review
reaction: rocket
permissions:
contents: read
pull-requests: read
model: gpt-5-mini
engine:
id: copilot
tools:
github:
toolsets: [context, pull_requests, repos]
network:
allowed:
- defaults
- node
- java
- api.osv.dev
- api.scorecard.dev
- search.maven.org
- api.github.com
- github.com
safe-outputs:
add-comment:
hide-older-comments: true
add-labels:
allowed: [security:low, security:medium, security:high]
issue-intent: false
remove-labels:
allowed: [security:low, security:medium, security:high]
submit-pull-request-review:
allowed-events: [COMMENT, REQUEST_CHANGES]
supersede-older-reviews: true
dismiss-pull-request-review:
source: Alfresco/alfresco-build-tools/.github/workflows/supply-chain-review.md@599eebd2a1b84e76d540e41036520df3a64c7cbd
---
# Supply Chain Review
You are a supply chain security analyst reviewing a pull request for dependency changes.
Your goal is to identify any dependency additions or upgrades and produce a thorough risk assessment for each change, covering known vulnerabilities, typosquatting, maintainer takeover, install script abuse, version anomalies, source code changes, and project health.
You are the primary and only analysis engine. There is no secondary check. Be thorough but calibrated: false positives erode trust, but missed threats have severe consequences.
## Step 1 — Identify Dependency Changes
Read the **full** pull request diff — every commit in the PR, not just the latest one — and find all modified dependency files (`package.json`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`/`pnpm-lock.yml`, `pnpm-workspace.yaml`/`pnpm-workspace.yml`, `npm-shrinkwrap.json`, `pom.xml`, `build.gradle`, etc.).
**CRITICAL**: always use the GitHub MCP Server `pull_requests` toolset (e.g. `get_diff` / `get_files`) to fetch the diff — this always reflects every commit in the PR, regardless of local git history, against the correct base branch. Do NOT rely on local git commands or assumptions about the PR's commit history.
For each changed dependency extract:
- Package name (including scope/groupId if applicable)
- Ecosystem (`npm` or `maven`)
- Old version (or mark as `NEW DEPENDENCY` if newly added)
- New version
If no dependency files were changed, post a brief PR comment stating that no dependency changes were detected, then go directly to Step 6 — treating this as LOW risk — to remove any stale `security:*` labels and submit the required pull request review, then stop.
## Step 1b — Filter Internal Dependencies
Before collecting external data, identify and exclude internal/private dependencies that cannot be resolved by public APIs.
**Internal dependency namespaces (skip these):**
- **Maven**: Any dependency with a `groupId` starting with `com.hyland.`, `org.alfresco.`, or `org.activiti.`
- **npm**: Any package under the `@hyland/`, `@hylandsoftware/`, or `@alfresco/` scopes
For each internal dependency found:
1. Remove it from the analysis pipeline — do NOT query OSV.dev, OpenSSF Scorecard, or registry APIs for these packages (they will fail or return irrelevant data).
2. Record the package name (with `@` replaced by `(at)` for GitHub comment compatibility), ecosystem, old version, and new version in a separate "Internal Dependencies (Skipped)" list.
3. Continue with Step 2 only for the remaining external/public dependencies.
If ALL changed dependencies are internal, skip Steps 2-4 and proceed directly to Step 5 — treating this as LOW risk for Step 6 — posting a report that lists the internal dependencies and notes that no external supply chain analysis was performed.
## Step 2 — Collect Data for Each Dependency
For every changed dependency, gather the following data. Fetch all data sources in parallel where possible. If any request fails or returns no data, note it and continue — missing data alone is not proof of malice, but factor it into your confidence level.
### 2a. Known Vulnerabilities (OSV.dev)
Query the OSV.dev API for vulnerabilities affecting the **new** version:
- **npm**: `POST https://api.osv.dev/v1/query` with body `{"package":{"name":"<package-name>","ecosystem":"npm"},"version":"<new-version>"}`
- **Maven**: `POST https://api.osv.dev/v1/query` with body `{"package":{"name":"<groupId>:<artifactId>","ecosystem":"Maven"},"version":"<new-version>"}`
Record all returned vulnerability IDs, severity ratings, and summaries. CRITICAL and HIGH severity CVEs in the new version are the most urgent signal.
### 2b. OpenSSF Scorecard
Fetch the project health score. First determine the source repository from the package metadata (see 2c), then query:
`GET https://api.scorecard.dev/projects/github.com/{owner}/{repo}`
Record the overall score (0-10) and individual check results. Pay special attention to: Maintained, Code-Review, Vulnerabilities, Branch-Protection, Signed-Releases. A score below 3 is very concerning; below 5 warrants caution. If the package has no linked source repository, the scorecard will be unavailable — this is itself a risk signal.
### 2c. Package Metadata (Registry)
**For npm packages**, fetch:
`GET https://registry.npmjs.org/<package-name>`
From the full registry document, extract for BOTH the old and new versions:
- `versions[<version>]._npmUser` — the publisher
- `versions[<version>].maintainers` — the maintainer list
- `versions[<version>].scripts` — lifecycle scripts (`preinstall`, `install`, `postinstall`)
- `versions[<version>].dependencies` — runtime dependencies
- `time[<version>]` — publish timestamp
- `repository` — source repository URL
Also extract the `time` object to build a version history (last 10 versions with publish dates).
**For Maven packages**, fetch:
`GET https://central.sonatype.com/api/v1/search?q=g:<groupId>+AND+a:<artifactId>&sort=published&limit=10`
For POM details (build plugins, dependencies): `GET https://repo1.maven.org/maven2/<groupId-as-path>/<artifactId>/<version>/<artifactId>-<version>.pom`
### 2d. Source Code Diff and Release Notes
Use the PR diff itself to review the actual file changes for dependency manifest files. Additionally, if a source repository is identified (from 2c), fetch release notes and compare tags:
- Release notes: `GET https://api.github.com/repos/{owner}/{repo}/releases/tags/v<new-version>` (try with and without the `v` prefix)
- For a code-level diff between old and new versions: `GET https://api.github.com/repos/{owner}/{repo}/compare/v<old-version>...v<new-version>` (try with and without the `v` prefix)
## Step 3 — Analyze Against Threat Taxonomy
Evaluate each dependency against ALL of the following threat categories. Not every category applies to every package — use judgment.
### 3a. Known Vulnerabilities
Assess the severity and exploitability of any CVEs or advisories returned from OSV.dev. CRITICAL and HIGH severity vulnerabilities in the new version are the most urgent signal. Also check whether the upgrade itself fixes known vulnerabilities in the old version (a positive signal).
### 3b. Typosquatting / Name Confusion
Determine if the package name could be a typosquatting attempt targeting a well-known package. Consider:
- Levenshtein distance to popular packages (e.g., `lodas` vs `lodash`)
- Dash/underscore/separator swaps (e.g., `my_package` vs `my-package`)
- Suffix variants (e.g., `express-js`, `express.js`)
- Scope squatting for npm (e.g., `@attacker/lodash` vs `lodash`)
- GroupId squatting for Maven (e.g., `org.apach.commons` vs `org.apache.commons`)
Use your knowledge of the ecosystem to identify plausible targets. Reason from your training data about popular packages.
### 3c. Maintainer Takeover
Compare the publisher and maintainer metadata between the old and new versions. Red flags:
- Publisher changed between versions (different `_npmUser`)
- Old maintainers removed and replaced
- New publisher has no prior history with the package
- Classic pattern: publisher change + maintainer removal (like the event-stream incident)
### 3d. Install Script Abuse
**For npm**: Analyze lifecycle scripts (`preinstall`, `install`, `postinstall`) from the registry metadata. Red flags:
- Scripts that download and execute remote code (`curl`, `wget`, `http://`)
- `eval()`, `Function()`, `child_process` usage
- Environment variable access (`process.env`) for credential theft
- Base64/hex decoding of payloads
- Access to sensitive paths (`~/.ssh`, `~/.aws`, `~/.npmrc`, `/etc/passwd`)
- Network calls (`dns.lookup`, `net.connect`) for exfiltration
- Scripts that are NEW in this version (not present in the old version) are especially suspicious
**For Maven**: Look for dangerous build plugins in POM changes:
- `exec-maven-plugin`, `maven-antrun-plugin` with `<exec>`
- `<extensions>true</extensions>` on untrusted plugins
- Download plugins, Groovy/script plugins
### 3e. Version Anomalies
Analyze the version change pattern and history from the registry metadata:
- Major version jumps (skipping 1+ major versions)
- Version downgrade (new version < old version)
- Stable to prerelease transition
- Very recent publish (less than 48 hours old) — could indicate a rush to distribute malicious code
- Rapid successive publishes (many versions in a short window)
- Long dormancy then sudden publish (more than 1 year gap) — may indicate account takeover
### 3f. Source Code Changes
If source diffs are available (from the GitHub compare API or the PR diff itself), analyze for:
- Obfuscated code (minified without source maps, hex/unicode escapes, string concatenation to hide function names)
- Data exfiltration (network calls sending `process.env`, API keys, tokens to external endpoints)
- Filesystem access outside the package directory
- Dynamic code execution (`eval()`, `Function()`, `vm.runInNewContext`, `WebAssembly.instantiate`)
- Encoded payloads (Base64/hex decoded and executed at runtime)
- Inconsistency between release notes and actual changes (changelog says "bug fix" but diff adds network calls)
- Cryptocurrency mining patterns
- Suspicious new transitive dependencies
### 3g. Project Health
Interpret the OpenSSF Scorecard data:
- Overall score below 3/10 is very concerning
- Score below 5/10 warrants caution
- Pay attention to specific failing checks: Maintained, Code-Review, Vulnerabilities, Branch-Protection, Signed-Releases
- Missing scorecard data (no source repo linked) is itself a risk signal
### 3h. Missing Source Repository
A package with no linked source repository prevents code audit and is a risk signal, especially combined with other concerns.
### 3i. Tag Poisoning / Build Provenance
Evaluate whether the published artifact can be traced back to a verified source commit. This category covers attacks where a legitimate-looking version tag is manipulated to distribute malicious code.
#### Tag-to-Registry Provenance Mismatch
Check whether the git tag for the new version corresponds to the published artifact:
- Compare the tag commit date with the registry publish timestamp. A discrepancy of more than a few hours (allowing for CI/CD pipeline time) is suspicious.
- If the source diff between the tag and the previous tag includes changes not documented in release notes, flag as suspicious.
#### Mutable/Moved Tags
Check if the tag appears to have been recreated:
- Use `GET https://api.github.com/repos/{owner}/{repo}/git/refs/tags/{tag}` to get the tag reference.
- For annotated tags, use `GET https://api.github.com/repos/{owner}/{repo}/git/tags/{sha}` to check the tag object and its `tagger.date`.
- If the tag creation date is significantly newer than the commit it points to (e.g., more than 7 days), this may indicate the tag was deleted and recreated pointing to a different commit.
#### Unsigned Tags
Determine tag type and signing status:
- **Annotated + signed tags** (GPG or SSH signature present) — strongest integrity signal.
- **Annotated but unsigned tags** — moderate integrity; the tag is immutable but unverified.
- **Lightweight tags** — weakest integrity; easily moved without trace. Flag as a risk signal for high-profile or security-critical packages.
For the tag object, check the `verification` field in the GitHub API response for signature status.
#### Build Provenance / Attestation
Check for SLSA provenance attestations or Sigstore signatures:
**For npm packages**: Query `GET https://registry.npmjs.org/-/npm/v1/attestations/<package-name>@<new-version>`. If attestations are present, verify:
- The `predicateType` matches a known SLSA provenance type
- The `subject` digest matches the published package tarball
- The build was performed by a trusted CI system (e.g., GitHub Actions)
**For Maven packages**: Check if Sigstore `.sigstore` bundle files exist alongside the artifact at:
`GET https://repo1.maven.org/maven2/<groupId-as-path>/<artifactId>/<version>/<artifactId>-<version>.jar.sigstore`
The absence of provenance attestations on a high-profile package (>1000 weekly downloads for npm, or widely used in the ecosystem) is a moderate risk signal. Packages that previously published with provenance but stopped doing so are especially suspicious.
#### Tag Mimicry on Forks
Verify that the source repository URL in registry metadata points to the canonical repository:
- Cross-reference the `repository` field from package metadata (Step 2c) with the GitHub API response.
- If the repository URL points to a fork rather than the original project, flag as HIGH risk — this may indicate a hijacked tag on a lookalike fork.
- Check that the repository owner matches known maintainers of the package.
## Step 4 — Score and Classify Risk
Assign a risk score (0-100) to each dependency using these guidelines:
| Priority | Signal | Typical Impact |
|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
| Highest | Known CRITICAL/HIGH CVEs in new version, confirmed typosquatting, malicious code in diff, build provenance mismatch (tag points to different code than published artifact), tag mimicry on fork | 60+ points |
| High | Maintainer takeover pattern (publisher changed + old maintainers removed), dangerous install scripts, known compromised package, moved/recreated tag with different commit, provenance attestations removed from package that previously had them | 20-40 points |
| Medium | Low OpenSSF Scorecard (< 3), publisher changed (without full takeover), new install scripts, very recent publish (< 48h), obfuscated code in diff, unsigned lightweight tags on security-critical packages, absence of provenance on high-profile packages | 10-20 points |
| Lower | Scorecard 3-5, version anomalies, missing source repository, long dormancy, rapid publishes, tag date slightly newer than commit (within 7 days), annotated but unsigned tags | 5-10 points |
These are guidelines, not rigid formulas. Use judgment to combine signals — multiple medium signals can compound into a high-risk assessment.
**Risk level thresholds**: 0-20 = LOW, 21-50 = MEDIUM, 51-80 = HIGH, 81-100 = CRITICAL.
If no suspicious patterns are found, assign a score of 0-10 and risk level LOW. Most legitimate upgrades should score LOW.
## Step 5 — Post Findings as PR Comment
Post a structured report in the following format.
**CRITICAL: Sanitize all `@` symbols before posting**
GitHub enforces a maximum of 10 mentions per comment. Package names containing `@` (like `@hyland/core`, `@alfresco/js-api`) are interpreted as user/team mentions and trigger this limit, causing comment post failures.
**Before generating the comment text**:
1. Replace **every** `@` symbol in package names with `(at)` — e.g., `@hyland/core``(at)hyland/core`
2. Apply this transformation to ALL occurrences: table cells, headings, inline code blocks, findings sections, reason columns
3. This applies to both external and internal dependencies
4. Do NOT skip this step — even if only a few packages are affected, GitHub counts all `@` symbols
```txt
## Supply Chain Security Review
| Package | Ecosystem | Old Version | New Version | Risk Score | Risk Level |
|---------|-----------|-------------|-------------|------------|------------|
| example | npm | 1.0.0 | 2.0.0 | 5 | LOW |
### Internal Dependencies (Skipped)
| Package | Ecosystem | Old Version | New Version | Reason |
|-----------------|-----------|-------------|-------------|-------------------------------|
| (at)hyland/core | npm | 3.1.0 | 3.2.0 | Internal ((at)hyland/* scope) |
_These dependencies are internal packages not available on public registries. External API checks were skipped._
### Findings
#### `<package-name-sanitized>` (<old-version> -> <new-version>) — <RISK_LEVEL>
**Risk Score**: <score>/100
<If findings exist, list each one:>
**<Category>** (<severity>) — <title>
<detailed explanation with specific evidence>
<If no findings:>
No suspicious patterns detected. Routine upgrade.
---
### Data Collection Notes
<List any APIs that were unavailable or returned errors, so reviewers know what was and wasn't checked.>
---
### Overall Risk: <highest risk level across all dependencies>
**Recommendation**: <approve|review|block>
- **approve**: LOW risk, routine upgrade, no concerns found
- **review**: MEDIUM risk, a human should examine specific findings before merging
- **block**: HIGH/CRITICAL risk, should not be merged without security team review
```
## Step 6 — Apply Label and Review Status
### 6a. Labels — order-independent update
Determine the single target label for the highest risk level found: `security:low`, `security:medium`, or `security:high`.
- Remove only the OTHER `security:*` labels (the ones that do NOT match the target) if present on the PR — this clears stale risk labels left by a previous review (e.g., after a new commit changed the risk level).
- Add the target label if it is not already present.
- **Never remove the target label itself.** Because the remove and add operations act on disjoint labels, the final state is correct regardless of which of the two safe-output calls (`add_labels` / `remove_labels`) happens to be processed first — do NOT rely on emitting them in a particular order, since that ordering is not guaranteed. (Do not, for example, remove all three `security:*` labels and then add the target back — if the removal is processed after the add, the target label would be stripped again, leaving the PR with no risk label at all.)
### 6b. Dismiss stale reviews from this workflow
Every review this workflow posts (see 6c) MUST start its body with the exact literal marker line `**Supply Chain Review**` as the first line, so future runs can recognize their own prior reviews.
Before posting the new review:
1. Fetch the PR's existing reviews (GitHub MCP `pull_requests` toolset).
2. Identify any review that is authored by this workflow's actor AND whose body starts with the `**Supply Chain Review**` marker AND is still in the `CHANGES_REQUESTED` state — that is a stale review from an earlier run of this same workflow (e.g., posted before the flagged dependency was fixed, downgraded, or removed).
3. For each such review, call `dismiss_pull_request_review` with its explicit numeric `review_id` (do NOT use `'auto'` — this repository may run other agentic workflows that also post as the same actor, and `'auto'` would dismiss their reviews too) and a justification of at least 20 characters (e.g., "Superseded by a newer Supply Chain Review run.").
Do this even though `submit-pull-request-review` is also configured with `supersede-older-reviews: true` — that setting is best-effort and may not always recognize the prior review, so the explicit dismissal above is the reliable mechanism and must always be attempted.
### 6c. Submit the review
**Always submit a pull request review — in every invocation, with no exceptions.** This is not conditional on risk level. Submit a review even when there are no dependency changes, when all dependencies are internal, or when risk is LOW — skipping it would mean a stale `REQUEST_CHANGES` review from an earlier run is never replaced or dismissed.
The review body must start with the `**Supply Chain Review**` marker line (see 6b), followed by the assessment:
- If the highest risk level is HIGH or CRITICAL, submit the review as **request changes**, with a summary of the critical findings.
- If the risk is MEDIUM, submit the review as a **comment**, noting that human review is recommended.
- If the risk is LOW (including when there are no dependency changes, or all changed dependencies are internal), submit the review as a **comment**, summarizing that no concerns were found and the PR comment has the full detail.
- **Never submit the review as an approval, under any circumstance** — this workflow only ever comments or requests changes; a human always makes the merge decision.
## Important Guidelines
- **Never approve or merge the PR** — all actions are advisory or blocking only. A human always makes the merge decision. Every review this workflow submits must use the comment or request-changes event — never the approve event.
- **Always submit exactly one pull request review per invocation, regardless of outcome**, and always prefix its body with the `**Supply Chain Review**` marker — this is required so that a later run of this same workflow can find and dismiss it via `dismiss_pull_request_review` once it becomes stale (see Step 6b). Do not rely on `supersede-older-reviews` alone; it is best-effort.
- **Never remove the `security:*` label matching the current risk level** when clearing stale labels — only remove the other ones, so the final label state is correct no matter which safe-output call is processed first (see Step 6a).
- Be specific in findings — cite exact data (vulnerability ID, maintainer name, script content, file path, API response) rather than vague warnings.
- For Maven packages, adapt npm-specific checks appropriately (e.g., install scripts become build plugin analysis, maintainer metadata may be limited).
- When a package is a NEW dependency (no old version), pay extra attention to project health, name legitimacy, and install scripts since there is no historical baseline to compare against.
- If data collection fails for all external APIs, still analyze the PR diff directly and provide the best assessment you can with available information, noting the limitations clearly.
- For tag poisoning checks, not all packages will have provenance attestations — this is still an emerging practice. Weight the absence of attestations proportionally to the package's profile and criticality. Do not flag low-download utility packages for missing provenance.
- When checking tag dates, allow for reasonable CI/CD pipeline delays (up to a few hours between tag push and publish). Only flag significant discrepancies (days or weeks).
-144
View File
@@ -1,144 +0,0 @@
name: "Unit Tests Workflow"
on:
workflow_call:
secrets:
SONAR_TOKEN:
description: 'Token for SonarCloud analysis'
required: false
inputs:
base_ref:
description: 'Base branch for affected calculation'
required: false
type: string
default: 'develop'
full:
description: 'Run the full (non-affected) test suite for every project instead of only affected ones'
required: false
type: boolean
default: false
jobs:
generate-affected-matrix:
name: "Generate affected matrix"
runs-on: ubuntu-latest
outputs:
unitMatrix: ${{ steps.set-matrix.outputs.unitMatrix }}
hasProjects: ${{ steps.set-matrix.outputs.hasProjects }}
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Setup environment
id: setup-env
uses: ./.github/actions/setup
with:
cache-suffix: test-matrix
- name: Generate affected projects matrix
id: set-matrix
env:
BASE_REF: ${{ inputs.base_ref }}
FULL_RUN: ${{ inputs.full }}
run: |
if [ "$FULL_RUN" == "true" ]; then
echo "Running full (non-affected) test suite"
AFFECTED_UNIT=$(pnpm nx show projects --target=test --select=projects --plain --exclude=cli,stories,eslint-angular)
else
echo "Base ref is $BASE_REF"
AFFECTED_UNIT=$(pnpm nx show projects --affected --target=test --base=origin/$BASE_REF --head=HEAD --select=projects --plain --exclude=cli,stories,eslint-angular)
fi
echo "Affected projects for UNIT: $AFFECTED_UNIT"
if [ -z "$AFFECTED_UNIT" ]; then
echo "No affected projects found"
echo "hasProjects=false" >> $GITHUB_OUTPUT
echo "unitMatrix=[]" >> $GITHUB_OUTPUT
else
UNIT_MATRIX_JSON=$(echo "$AFFECTED_UNIT" | xargs -n1 | jq -R -s -c 'split("\n") | map(select(length > 0)) | map({ "project": . })')
echo "Matrix UNIT: $UNIT_MATRIX_JSON"
echo "hasProjects=true" >> $GITHUB_OUTPUT
echo "unitMatrix=$UNIT_MATRIX_JSON" >> $GITHUB_OUTPUT
fi
- name: Save nx cache
if: ${{ success() }}
uses: ./.github/actions/save-nx-cache
with:
cache-suffix: test-matrix
unit-tests:
timeout-minutes: 30
runs-on: ubuntu-latest
needs: generate-affected-matrix
if: ${{ needs.generate-affected-matrix.outputs.hasProjects == 'true' }}
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.generate-affected-matrix.outputs.unitMatrix) }}
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup environment
id: setup-env
uses: ./.github/actions/setup
with:
cache-suffix: test-${{ matrix.project }}
full-setup: 'false'
- name: Run unit tests for ${{ matrix.project }}
env:
NODE_OPTIONS: "--max-old-space-size=5120"
run: |
xvfb-run --auto-servernum pnpm nx run ${{ matrix.project }}:test
- name: Upload coverage report
if: ${{ always() }}
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-${{ matrix.project }}
path: coverage/${{ matrix.project }}/lcov.info
if-no-files-found: ignore
retention-days: 1
- name: Save nx cache
if: ${{ success() }}
uses: ./.github/actions/save-nx-cache
with:
cache-suffix: test-${{ matrix.project }}
sonarcloud:
name: "SonarCloud Scan"
runs-on: ubuntu-latest
needs: [generate-affected-matrix, unit-tests]
if: ${{ needs.generate-affected-matrix.outputs.hasProjects == 'true' && always() && needs.unit-tests.result != 'cancelled' }}
permissions:
contents: read
pull-requests: read
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Download all coverage artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: coverage-*
path: coverage-reports
- name: Merge coverage reports
run: |
mkdir -p coverage
echo "Artifact structure:"
find coverage-reports -type f -name 'lcov.info' 2>/dev/null || true
for dir in coverage-reports/coverage-*/; do
project_name=$(basename "$dir" | sed 's/^coverage-//')
lcov_file=$(find "$dir" -name 'lcov.info' -type f | head -1)
if [ -n "$lcov_file" ]; then
mkdir -p "coverage/${project_name}"
cp "$lcov_file" "coverage/${project_name}/lcov.info"
echo "Copied coverage for ${project_name}"
fi
done
echo "Coverage files found:"
find coverage -name 'lcov.info' -type f
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@22918119ff8e1ca75a623e15c8296b6ea4fbe28f # v8.2.1
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: https://sonarcloud.io
+13 -6
View File
@@ -1,26 +1,33 @@
/.angular/cache
*.log
node_modules
bundles
workspace.xml
.idea/
*.iml
.env.*
.env
dist
!./.github/actions/**/dist
e2e/.env.cloud
tmp
temp
/nxcache
*.npmrc
.history
/ng2-components/ng2-alfresco-core/prebuilt-themes/
.ng_pkg_build/
/lib/export-new.json
/lib/config/exportCheck.js
/docs/sourceinfo
/docs/docs.json
coverage/
/desktop.ini
out-tsc
/reports/
e2e-result-*
licenses.txt
.DS_Store
desktop.ini
.angular
NX
.nx
nxcache
.husky
.cursor/rules/nx-rules.mdc
.github/instructions/nx.instructions.md
lib/eslint-angular/dist/
+2 -2
View File
@@ -1,5 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
export NODE_OPTIONS=--max_old_space_size=8192
lint-staged
npx lint-staged
-5
View File
@@ -1,5 +0,0 @@
# Fail on high severity vulnerabilities during audit
audit-level=high
# Use exact versions to prevent unexpected updates
save-exact=true
+1 -1
View File
@@ -1 +1 @@
24.14.0
20.18.1
+9
View File
@@ -0,0 +1,9 @@
import { create } from '@storybook/theming';
import alfrescoLogo from '../lib/core/src/lib/assets/images/alfresco-logo.svg';
export default create({
base: 'light',
brandTitle: 'Hyland | Alfresco Storybook App',
brandUrl: 'https://www.alfresco.com/',
brandImage: alfrescoLogo,
});
+10
View File
@@ -0,0 +1,10 @@
module.exports = {
framework: {
name: '@storybook/angular',
options: {}
},
staticDirs: [],
docs: {},
stories: [],
addons: ['@chromatic-com/storybook']
};
-24
View File
@@ -1,24 +0,0 @@
import { fileURLToPath } from 'node:url';
import { dirname } from 'node:path';
import type { StorybookConfig } from '@storybook/angular';
const config: StorybookConfig = {
framework: {
name: getAbsolutePath('@storybook/angular'),
options: {}
},
staticDirs: [],
stories: ['lib/**/*.stories.ts'],
features: {
backgrounds: false
},
core: {
disableTelemetry: true
}
};
export default config;
function getAbsolutePath(value: string): any {
return dirname(fileURLToPath(import.meta.resolve(`${value}/package.json`)));
}
+5
View File
@@ -0,0 +1,5 @@
export const parameters = {
docs: { inlineStories: true },
controls: { expanded: true }
};
export const tags = ['autodocs', 'autodocs', 'autodocs', 'autodocs', 'autodocs'];
-11
View File
@@ -1,11 +0,0 @@
import type { Preview } from '@storybook/angular';
const preview: Preview = {
parameters: {
docs: { inlineStories: true },
controls: { expanded: true }
},
tags: ['autodocs']
};
export default preview;
-6
View File
@@ -1,12 +1,6 @@
{
"extends": ["stylelint-config-standard-scss"],
"rules": {
"custom-property-pattern": [
"^(mat-sys|mdc)",
{
"message": "Use only Angular Material system variables (--mat-sys-*, --mdc-*)"
}
],
"color-function-notation": "legacy",
"alpha-value-notation": "number",
"color-no-invalid-hex": true,
+17
View File
@@ -0,0 +1,17 @@
specFile=$1;
configFile=$2;
findconfig() {
if [ -f "$1" ]; then
printf '%s\n' "${PWD%/}/$1"
elif [ "$PWD" = / ]; then
false
else
(cd .. && findconfig $1)
fi
}
DIR=$(dirname "$specFile")
cd $DIR
configFile=`findconfig "$configFile"`;
echo "$configFile";
+1 -1
View File
@@ -1,5 +1,5 @@
{
"recommendations": [
"meterian.meterian-heidi"
"lucono.karma-test-explorer"
]
}
+27
View File
@@ -0,0 +1,27 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "e2e",
"program": "${workspaceFolder}/node_modules/protractor/bin/protractor",
"args": [
"./e2e/protractor.conf.js",
"--specs=${file}"
],
"envFile": "${workspaceFolder}/.env",
"console": "integratedTerminal",
"sourceMaps": true,
"smartStep": true,
"skipFiles": [
"${workspaceFolder}/node_modules/**/*.js",
"<node_internals>/**/*.js"
],
"internalConsoleOptions": "neverOpen"
}
]
}
+5 -2
View File
@@ -5,6 +5,7 @@
"**/.svn": true,
"**/.hg": true,
"**/.DS_Store": true,
"**/coverage": true,
"**/.happypack": true
},
"markdownlint.config": {
@@ -20,8 +21,10 @@
"stylelint.enable": true,
"css.validate": false,
"scss.validate": false,
"stylelint.configFile": "${workspaceFolder}/.stylelintrc.json",
"stylelint.configBasedir": "${workspaceFolder}",
"stylelint.config": {
"extends": "./.stylelintrc.json"
},
"stylelint.configFile": ".stylelintrc.json",
"stylelint.validate": [
"css",
"less",
View File
+3 -1
View File
@@ -103,6 +103,8 @@ Create a file next to the project's `package.json`, call it `proxy.conf.json` an
Note that if you are running the App, Content Service or Process Service on different ports, you should change the ports accordingly in your local configuration.
For further details about how to configure a webpack proxy please refer to the [official documentation](https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/proxy.md).
## Configure nginx proxy
@@ -149,7 +151,7 @@ See the [Alfresco community page](https://community.alfresco.com/community/appli
If you want to completely enable CORS calls in your Content Services and Process Services,
please refer to the following Alfresco documents:
* [Enable Cross Origin Resource Sharing (CORS) in Alfresco Process Services](https://support.hyland.com/r/Alfresco/Alfresco-Process-Services/24.4/Alfresco-Process-Services/Configure/Overview/CORS)
* [Enable Cross Origin Resource Sharing (CORS) in Alfresco Process Services](http://docs.alfresco.com/process-services1.6/topics/enabling-cors.html)
* Enable Cross Origin Resource Sharing (CORS) in Alfresco Content Services
+27
View File
@@ -0,0 +1,27 @@
# 1. Generate licenses
FROM node:18.16-alpine3.17 AS builder
WORKDIR /usr/src/alfresco
COPY package.json package.json
# 2. Generate image
FROM nginxinc/nginx-unprivileged:1.21-alpine
USER root
RUN apk update && apk upgrade
USER 101
ARG PROJECT_NAME
COPY docker/default.conf.template /etc/nginx/templates/
COPY dist/$PROJECT_NAME /usr/share/nginx/html/
COPY dist/$PROJECT_NAME/app.config.json /etc/nginx/templates/app.config.json.template
USER root
RUN chmod a+w -R /etc/nginx/conf.d
USER 101
ENV BASE_PATH=/
ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx/conf.d
+1 -24
View File
@@ -13,7 +13,7 @@ Node: 18.x
NPM: 9.x
```
Also, check out the tutorial: [Creating your first ADF Application](docs/tutorials/creating-your-first-adf-application.md)
Also, check out the tutorial [Creating your first ADF Application](docs/tutorials/creating-your-first-adf-application.md)
for full details on what you may need to install before using ADF.
### See also
@@ -21,29 +21,6 @@ for full details on what you may need to install before using ADF.
- [Node Version Manager](docs/tutorials/nvm.md)
- [CORS guide](ALFRESCOCORS.md)
## Installation
This project uses **pnpm** for package management with built-in supply chain attack protection.
```bash
pnpm install # install all packages
pnpm run add <package> # add a new package (with security check)
```
### Supply Chain Security
**Layer 1: pnpm script blocking**
- All lifecycle scripts (postinstall, etc.) are blocked by default
- Only trusted packages in `pnpm-workspace.yaml` can run scripts
- Protects during `pnpm install` and `pnpm add`
**Layer 2: Security database check**
- `pnpm run add` checks packages against OSV and GitHub Advisory databases BEFORE installing
- Pre-commit hook blocks commits containing known malicious packages
**Layer 3: npm blocked**
- Running `npm install` will fail - enforces pnpm usage
## Components
You can find the sources for all ADF components in the [`lib`](/lib) folder.
+1 -1
View File
@@ -8,6 +8,6 @@
"source": "/**/**/i18n/en.json",
"translation": "/%original_path%/%two_letters_code%.%file_extension%",
"export_only_approved": "true",
"update_option": "update_without_changes"
"update_option": "update_as_unapproved"
}
]
+6 -8
View File
@@ -14,11 +14,9 @@
"backend",
"baseitem",
"BASESHAREURL",
"berseria",
"booleanvisibility",
"booleanvisibilityprocess",
"boolitem",
"BPMECM",
"BPMHOST",
"cardview",
"checkboxes",
@@ -49,7 +47,6 @@
"dryrun",
"ECMBPM",
"ECMHOST",
"edjs",
"Examinate",
"exif",
"filedata",
@@ -89,6 +86,7 @@
"mouseenter",
"multiselect",
"mysites",
"nginx",
"numbervisibilityprocess",
"OAUTHCONFIG",
"oidc",
@@ -123,7 +121,6 @@
"Theming",
"transcluded",
"transclusion",
"triggerable",
"truthy",
"typeahead",
"typeahed",
@@ -137,7 +134,6 @@
"uploader",
"uploadfileform",
"userinfo",
"validatable",
"validators",
"waypoint",
"waypoints",
@@ -145,8 +141,11 @@
"Whitespaces",
"xdescribe",
"xsrf",
"BPMECM",
"berseria",
"zestiria",
"webscript"
"validatable",
"edjs"
],
"dictionaries": [
"html",
@@ -157,8 +156,7 @@
],
"ignorePaths": [
"lib/{content-services,core,extensions,insights,process-services}/**/*.spec.ts",
"lib/{content-services,core,extensions,insights,process-services}/**/*.mock.ts",
"**/*.stories.ts"
"lib/{content-services,core,extensions,insights,process-services}/**/*.mock.ts"
],
"ignoreRegExpList": [
"(\"|'|`)((?:\\\\1|(?:(?!\\1).))*)\\1"
+57
View File
@@ -0,0 +1,57 @@
server {
listen 8080;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
root /usr/share/nginx/html;
rewrite ^([^.]*[^/])$ $1/ permanent;
absolute_redirect off;
location ${BASE_PATH} {
set $EVAL_BASE_PATH "${BASE_PATH}";
if ($EVAL_BASE_PATH = "/") {
root /usr/share/nginx/html;
}
index index.html index.htm;
alias /usr/share/nginx/html;
}
location ~ /app.config.json {
alias ${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
-2
View File
@@ -1,2 +0,0 @@
sourceinfo
docs.json
+24 -10
View File
@@ -61,6 +61,7 @@ A few other pages of information are also available:
- [Localization in ADF](user-guide/localization.md)
- [Theming](user-guide/theming.md)
- [Transclusion](user-guide/transclusion.md)
- [Typography](user-guide/typography.md)
- [Walkthrough - adding indicators to highlight information about a node](user-guide/metadata-indicators.md)
<!--guide end-->
@@ -83,6 +84,8 @@ A collection of Angular components for generic use.
| Name | Description |
|---------------------------------------------------|-------------------------------------------------|
| [Avatar](core/components/avatar.component.md) | Displays user avatars. |
| [Button](core/components/button.component.md) | A standard button component. |
| [Progress](core/components/progress.component.md) | A progress bar component. |
| [Header](core/components/adf-header.component.md) | A simple reusable application header component. |
### Components
@@ -111,6 +114,7 @@ A collection of Angular components for generic use.
| [Json Cell component](core/components/json-cell.component.md) | Shows a JSON-formatted value inside a datatable component. | [Source](../lib/core/src/lib/datatable/components/json-cell/json-cell.component.ts) |
| [Language Menu component](core/components/language-menu.component.md) | Displays all the languages that are present in "app.config.json" and the default (EN). | [Source](../lib/core/src/lib/language-menu/language-menu.component.ts) |
| [Login Dialog Panel component](core/components/login-dialog-panel.component.md) | Shows and manages a login dialog. | [Source](../lib/core/src/lib/login/components/login-dialog-panel.component.ts) |
| [Login Dialog component](core/components/login-dialog.component.md) | Allows a user to perform a login via a dialog. | [Source](../lib/core/src/lib/login/components/login-dialog.component.ts) |
| [Login component](core/components/login.component.md) | Authenticates to Alfresco Content Services and Alfresco Process Services. | [Source](../lib/core/src/lib/login/components/login.component.ts) |
| [Notification History component](core/components/notification-history.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | This component is in the current status just an experimental component. The main purpose of the Notification history component is list all the notification received in the current session. They will disappear from the list after the refresh. | [Source](../lib/core/src/lib/notifications/components/notification-history.component.ts) | |
| [Pagination Component](core/components/pagination.component.md) | Adds pagination to the component it is used with. | [Source](../lib/core/src/lib/pagination/pagination.component.ts) |
@@ -118,6 +122,7 @@ A collection of Angular components for generic use.
| [Sidebar action menu component](core/components/sidebar-action-menu.component.md) | Displays a sidebar-action menu information panel. | [Source](../lib/core/src/lib/layout/components/sidebar-action/sidebar-action-menu.component.ts) |
| [Sidenav Layout component](core/components/sidenav-layout.component.md) | Displays the standard three-region ADF application layout. | [Source](../lib/core/src/lib/layout/components/sidenav-layout/sidenav-layout.component.ts) |
| [Snackbar Content Component](core/components/snackbar-content.component.md) | Custom content for Snackbar which allows use icon as action. | [Source](../lib/core/src/lib/snackbar-content/snackbar-content.component.ts) |
| [Sorting Picker Component](core/components/sorting-picker.component.md) | Selects from a set of predefined sorting definitions and directions. | [Source](../lib/core/src/lib/sorting-picker/sorting-picker.component.ts) |
| [Start Form component](core/components/start-form.component.md) | Displays the Start Form for a process. | [Source](../lib/process-services/src/lib/form/start-form/start-form.component.ts) |
| [Text Mask directive](core/components/text-mask.component.md) | Implements text field input masks. | [Source](../lib/core/src/lib/form/components/widgets/text/text-mask.component.ts) |
| [Toolbar Divider Component](core/components/toolbar-divider.component.md) | Divides groups of elements in a Toolbar with a visual separator. | [Source](../lib/core/src/lib/toolbar/toolbar-divider.component.ts) |
@@ -137,7 +142,7 @@ A collection of Angular components for generic use.
| [Logout directive](core/directives/logout.directive.md) | Logs the user out when the decorated element is clicked. | [Source](../lib/core/src/lib/directives/logout.directive.ts) |
| [Node Download directive](core/directives/node-download.directive.md) | Allows folders and/or files to be downloaded, with multiple nodes packed as a '.ZIP' archive. | [Source](../lib/content-services/src/lib/directives/node-download.directive.ts) |
| [Upload Directive](core/directives/upload.directive.md) | Uploads content in response to file drag and drop. | [Source](../lib/core/src/lib/directives/upload.directive.ts) |
| [CardViewPropertyValidator Directive](core/directives/card-view-property-validator.directive.md) | Checks validators defined on property.| [Source](../lib/core/src/lib/card-view/directives/card-view-property-validator.directive.ts) |
### Dialogs
| Name | Description | Source link |
@@ -176,6 +181,8 @@ A collection of Angular components for generic use.
| [Format Space pipe](core/pipes/format-space.pipe.md) | Replaces all the white space in a string with a supplied character. | [Source](../lib/core/src/lib/pipes/format-space.pipe.ts) |
| [Full name pipe](core/pipes/full-name.pipe.md) | Joins the first and last name properties from a `UserLike` object into a single string. | [Source](../lib/core/src/lib/pipes/full-name.pipe.ts) |
| [Localized Date pipe](core/pipes/localized-date.pipe.md) | Converts a date to a given format and locale. | [Source](../lib/core/src/lib/pipes/localized-date.pipe.ts) |
| [Multi Value Pipe](core/pipes/multi-value.pipe.md) | Takes an array of strings and turns it into one string where items are separated by a separator. The default separator applied to the list is the comma , however, you can set your own separator in the params of the pipe. | [Source](../lib/core/src/lib/pipes/multi-value.pipe.ts) |
| [Node Name Tooltip pipe](core/pipes/node-name-tooltip.pipe.md) | Formats the tooltip for a Node. | [Source](../lib/content-services/src/lib/pipes/node-name-tooltip.pipe.ts) |
| [Text Highlight pipe](core/pipes/text-highlight.pipe.md) | Adds highlighting to words or sections of text that match a search string. | [Source](../lib/core/src/lib/pipes/text-highlight.pipe.ts) |
| [Time Ago pipe](core/pipes/time-ago.pipe.md) | Converts a recent past date into a number of days ago. | [Source](../lib/core/src/lib/pipes/time-ago.pipe.ts) |
| [User Initial pipe](core/pipes/user-initial.pipe.md) | Takes the name fields of a `UserLike` object and extracts and formats the initials. | [Source](../lib/core/src/lib/pipes/user-initial.pipe.ts) |
@@ -216,6 +223,7 @@ A collection of Angular components for generic use.
| [Identity user service](core/services/identity-user.service.md) | Gets OAuth2 personal details and roles for users and performs CRUD operations on identity users. | [Source](../lib/process-services-cloud/src/lib/people/services/identity-user.service.ts) |
| [JWT helper service](core/services/jwt-helper.service.md) | Decodes a JSON Web Token (JWT) to a JavaScript object. | [Source](../lib/core/src/lib/auth/services/jwt-helper.service.ts) |
| [Log Service](core/services/log.service.md) | Provides log functionality. | [Source](../lib/core/src/lib/common/services/log.service.ts) |
| [Login Dialog service](core/services/login-dialog.service.md) | Manages login dialogs. | [Source](../lib/core/src/lib/services/login-dialog.service.ts) |
| [Nodes Api service](core/services/nodes-api.service.md) | Accesses and manipulates ACS document nodes using their node IDs. | [Source](../lib/content-services/src/lib/common/services/nodes-api.service.ts) |
| [Notification Service](core/services/notification.service.md) | Shows a notification message with optional feedback. | [Source](../lib/core/src/lib/notifications/services/notification.service.ts) |
| [Page Title service](core/services/page-title.service.md) | Sets the page title. | [Source](../lib/core/src/lib/common/services/page-title.service.ts) |
@@ -292,6 +300,7 @@ for more information about installing and using the source code.
| [Search number range component](content-services/components/search-number-range.component.md) | Implements a number range widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-number-range/search-number-range.component.ts) |
| [Search radio component](content-services/components/search-radio.component.md) | Implements a radio button list widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-radio/search-radio.component.ts) |
| [Search slider component](content-services/components/search-slider.component.md) | Implements a numeric slider widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-slider/search-slider.component.ts) |
| [Search Sorting Picker Component](content-services/components/search-sorting-picker.component.md) | Provides an ability to select one of the predefined sorting definitions for search results: | [Source](../lib/content-services/src/lib/search/components/search-sorting-picker/search-sorting-picker.component.ts) |
| [Search text component](content-services/components/search-text.component.md) | Implements a text input widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-text/search-text.component.ts) |
| [Search component](content-services/components/search.component.md) | Searches items for supplied search terms. | [Source](../lib/content-services/src/lib/search/components/search.component.ts) |
| [Sites Dropdown component](content-services/components/sites-dropdown.component.md) | Displays a dropdown menu to show and interact with the sites of the current user. | [Source](../lib/content-services/src/lib/content-node-selector/site-dropdown/sites-dropdown.component.ts) |
@@ -315,6 +324,7 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Auto Focus directive](content-services/directives/auto-focus.directive.md) | Automatically focuses HTML element after content is initialized. | [Source](../lib/content-services/src/lib/directives/auto-focus.directive.ts) |
| [Check Allowable Operation directive](content-services/directives/check-allowable-operation.directive.md) | Selectively disables an HTML element or Angular component. | [Source](../lib/content-services/src/lib/directives/check-allowable-operation.directive.ts) |
| [Node Public File Share Directive](content-services/directives/content-node-share.directive.md) | Creates and manages public shared links for files. | [Source](../lib/content-services/src/lib/content-node-share/content-node-share.directive.ts) |
| [File Draggable directive](content-services/directives/file-draggable.directive.md) | Provides drag-and-drop features for an element such as a div. | [Source](../lib/content-services/src/lib/upload/directives/file-draggable.directive.ts) |
| [Inherit Permission directive](content-services/directives/inherited-button.directive.md) | Update the current node by adding/removing the inherited permissions. | [Source](../lib/content-services/src/lib/permission-manager/components/inherited-button.directive.ts) |
@@ -323,6 +333,7 @@ for more information about installing and using the source code.
| [Node Favorite directive](content-services/directives/node-favorite.directive.md) | Selectively toggles nodes as favorites. | [Source](../lib/content-services/src/lib/directives/node-favorite.directive.ts) |
| [Node Lock directive](content-services/directives/node-lock.directive.md) | Locks or unlocks a node. | [Source](../lib/content-services/src/lib/directives/node-lock.directive.ts) |
| [Node Restore directive](content-services/directives/node-restore.directive.md) | Restores deleted nodes to their original location. | [Source](../lib/content-services/src/lib/directives/node-restore.directive.ts) |
| [Toggle Icon directive](content-services/directives/toggle-icon.directive.md) | Toggle icon on mouse or keyboard event for a selectable element. | [Source](../lib/content-services/src/lib/upload/directives/toggle-icon.directive.ts) |
| [Version Compatibility Directive](content-services/directives/version-compatibility.directive.md) | Enables/disables components based on ACS version in use. | [Source](../lib/content-services/src/lib/version-compatibility/version-compatibility.directive.ts) |
### Dialogs
@@ -336,6 +347,7 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Base Card View Content Update interface](content-services/interfaces/base-card-view-content-update.interface.md) | Specifies required properties and methods for Card View Content Update service. Extends from BaseCardViewUpdate. | [Source](../lib/content-services/src/lib/interfaces/base-card-view-content-update.interface.ts) | |
| [Search widget interface](content-services/interfaces/search-widget.interface.md) | Specifies required properties for Search filter component widgets. | [Source](../lib/content-services/src/lib/search/models/search-widget.interface.ts) |
| [Content Metadata Custom Panel interface](content-services/interfaces/content-metadata-custom-panel.interface.md) | Specifies required properties for metadata custom panel. | [Source](../lib/content-services/src/lib/content-metadata/interfaces/content-metadata-custom-panel.interface.ts) |
@@ -347,10 +359,17 @@ for more information about installing and using the source code.
| [Permission Style model](content-services/models/permissions-style.model.md) | Sets custom CSS styles for rows of a Document List according to the item's permissions. | [Source](../lib/content-services/src/lib/document-list/models/permissions-style.model.ts) |
| [Row Filter Model](content-services/models/row-filter.model.md) | Defines the Row Filter function used by the Document List Component. | [Source](../lib/content-services/document-list/data/row-filter.model.ts) |
### Pipes
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [File upload error pipe](content-services/pipes/file-upload-error.pipe.md) | Converts an upload error code to an error message. | [Source](../lib/content-services/src/lib/upload/pipes/file-upload-error.pipe.ts) |
### Services
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Agent Service](content-services/services/agent.service.md) | Manages agents in Content Services. | [Source](../lib/content-services/src/lib/agent/services/agent.service.ts) |
| [Audit Service](content-services/services/audit.service.md) | Manages Audit apps and entries. | [Source](../lib/content-services/src/lib/audit/audit.service.ts) |
| [Card View Content Update Service](content-services/services/card-view-content-update.service.md) | Manages Card View properties in the content services environment. Implements BaseCardViewContentUpdate. | [Source](../lib/content-services/src/lib/common/services/card-view-content-update.service.ts) | |
| [Category tree datasource service](content-services/services/category-tree-datasource.service.md) | Datasource service for category tree. | [Source](../lib/content-services/src/lib/category/services/category-tree-datasource.service.ts) |
@@ -366,6 +385,7 @@ for more information about installing and using the source code.
| [Node Comments Service](content-services/services/node-comments.service.md) | Adds and retrieves comments for nodes in Content Services. | [Source](../lib/content-services/src/lib/node-comments/services/node-comments.service.ts) |
| [Node permission dialog service](content-services/services/node-permission-dialog.service.md) | Displays dialogs to let the user set node permissions. | [Source](../lib/content-services/src/lib/permission-manager/services/node-permission-dialog.service.ts) |
| [Node Permission service](content-services/services/node-permission.service.md) | Manages role permissions for content nodes. | [Source](../lib/content-services/src/lib/permission-manager/services/node-permission.service.ts) |
| [Search Ai Service](content-services/services/search-ai.service.md) | Manages search AI in Content Services. | [Source](../lib/content-services/src/lib/search-ai/services/search-ai.service.ts) |
| [Search filter service](content-services/services/search-filter.service.md) | Registers widgets for use with the Search Filter component. | [Source](../lib/content-services/src/lib/search/services/search-filter.service.ts) |
| [Search Query Builder service](content-services/services/search-query-builder.service.md) | Stores information from all the custom search and faceted search widgets, compiles and runs the final search query. | [Source](../lib/content-services/src/lib/search/services/search-query-builder.service.ts) |
| [Security Controls service](content-services/services/security-controls.service.md) | Manages security groups & marks in Content Services. | [Source](../lib/content-services/src/lib/security/services/security-controls-groups-marks-security.service.ts) |
@@ -424,6 +444,7 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Claim Task Directive](process-services/directives/claim-task.directive.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Claims a task | [Source](../lib/process-services/src/lib/task-list/components/task-form/claim-task.directive.ts) |
| [Process Audit Directive](process-services/directives/process-audit.directive.md) | Fetches the Process Audit information in PDF or JSON format. | [Source](../lib/process-services/src/lib/process-list/components/process-audit/process-audit.directive.ts) |
| [Unclaim Task Directive](process-services/directives/unclaim-task.directive.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Unclaims a task | [Source](../lib/process-services/src/lib/task-list/components/task-form/unclaim-task.directive.ts) |
### Services
@@ -452,10 +473,12 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [App List Cloud Component](process-services-cloud/components/app-list-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows all deployed cloud application instances. | [Source](../lib/process-services-cloud/src/lib/app/components/app-list-cloud.component.ts) |
| [Edit Process Filter Cloud component](process-services-cloud/components/edit-process-filter-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows/edits process filter details. | [Source](../lib/process-services-cloud/src/lib/process/process-filters/components/edit-process-filter/edit-process-filter-cloud.component.ts) |
| [Edit Task Filter Cloud component](process-services-cloud/components/edit-task-filter-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Edits task filter details. | [Source](../lib/process-services-cloud/src/lib/task/task-filters/components/edit-task-filters/edit-task-filter-cloud.component.ts) |
| [Form cloud custom outcomes component](process-services-cloud/components/form-cloud-custom-outcome.component.md) | Supplies custom outcome buttons to be included in Form cloud component. | [Source](../lib/process-services-cloud/src/lib/form/components/form-cloud-custom-outcomes.component.ts) |
| [Form cloud component](process-services-cloud/components/form-cloud.component.md) | Shows a form from Process Services. | [Source](../lib/process-services-cloud/src/lib/form/components/form-cloud.component.ts) |
| [Form Definition Selector Cloud](process-services-cloud/components/form-definition-selector-cloud.component.md) | Allows one form to be selected from a dropdown list. For forms to be displayed in this component they will need to be compatible with standAlone tasks. | [Source](../lib/process-services-cloud/src/lib/form/components/form-definition-selector-cloud.component.ts) |
| [Group Cloud component](process-services-cloud/components/group-cloud.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Searches Groups. | [Source](../lib/process-services-cloud/src/lib/group/components/group-cloud.component.ts) |
| [](process-services-cloud/components/people-cloud.component.md) | Title: People Cloud Component | |
@@ -565,12 +588,3 @@ Contains all custom rules used by ESLint.
<!--eslint-angular end-->
[(Back to Contents)](#contents)
## Notes
### Knowledge Discovery removal (v9.0.0)
The Knowledge Discovery components, services, and APIs have been removed as of version 9.0.0.
The integrated Knowledge Discovery features have been replaced with a section in the side navigation panel containing a link to the standalone Knowledge Discovery UI application in higher level apps such as ACA and ADW.
If you were using those features, please consider cleaning Local Storage in your browser as *aiReferences* entry may remain.
-109
View File
@@ -1,109 +0,0 @@
# Migrating from Angular 15 to Angular 16
This guide for migrating ADF from Angular version 15 to version 16. Follow these steps to ensure a smooth transition.
## 1. Update Nx
First, update the Nx development dependencies. Use the `nx migrate` command for this purpose.
```bash
npx nx migrate 16.10.0
```
Updated Nx dependencies:
```json
{
"nx": "16.10.0",
"@nx/angular": "16.10.0",
"@nx/eslint-plugin": "16.10.0",
"@nx/js": "16.10.0",
"@nx/node": "16.10.0",
"@nx/storybook": "19.6.2",
"@nx/workspace": "16.10.0"
}
```
**As of Nx 16 package scope has changed from `@nrwl/*` to `@nx/*`.**
Nx's migration scripts will replace all `@nrwl` references in the project with `@nx`. This includes any imports, configuration files, and scripts.
## 2. Run Nx migrations
After the initial update a `migrations.json` file will be created containing all the additional changes that need to be made. You can run the migration script to apply these changes.
```bash
npx nx migrate --run-migrations
```
Those migrations should update required packages to the Angular 16 compatible version including Angular itself, Storybook, and others.
```json
{
"@angular/animations": "16.2.9",
"@angular/cdk": "16.2.9",
"@angular/common": "16.2.9",
"@angular/compiler": "16.2.9",
"@angular/core": "16.2.9",
"@angular/forms": "16.2.9",
"@angular/material": "16.2.9",
"@angular/material-date-fns-adapter": "16.2.9",
"@angular/platform-browser": "16.2.9",
"@angular/platform-browser-dynamic": "16.2.9",
"@angular/router": "16.2.9",
"@schematics/angular": "16.2.9",
"ng-packagr": "16.2.3"
}
```
Reference `storybook-migration-summary.md` file for more details on Storybook migration.
## 3. Manually update other dependencies
There are a few dependencies that require manual update, here is the list:
```json
{
"dependencies": {
"angular-oauth2-oidc": "16.0.0",
"@apollo/client": "3.11.4",
"chart.js": "4.4.4",
"@mat-datetimepicker/core": "12.0.1"
},
"devDependencies": {
"@editorjs/editorjs": "2.30.5"
}
}
```
```bash
npm install --save angular-oauth2-oidc@16.0.0 @apollo/client@3.11.4 chart.js@4.4.4 @mat-datetimepicker/core@12.0.1
npm install --save-dev @editorjs/editorjs@2.30.5
```
## 4. Fixing CI/CD issues
### General migration issues
After running the migration script, you may need to manually fix some issues. Run common build targets to identify any problems.
```bash
npx nx run-many --target=build --skip-nx-cache
```
Work through all the problems topic by topic. If blocked by linting issues, disable the linting rules in the affected files. You can re-enable them in the next step.
### Lint jobs
After getting the build to work, run the lint jobs. Re-enable previously disabled linting rules and fix any issues that arise.
```bash
npx nx run-many --target=lint --skip-nx-cache
```
### Unit tests
Despite Angular 16 not introducing major breaking changes, you may still encounter issues with unit tests. Run the unit tests and fix any problems that arise.
```bash
npx nx run-many --target=test --skip-nx-cache
```
-144
View File
@@ -1,144 +0,0 @@
# Migrating from Angular 16 to Angular 17
This guide for migrating ADF from Angular version 16 to version 17. Follow these steps to ensure a smooth transition.
## 1. Run Nx migrate
Use the `nx migrate` command to automatically update Nx and Angular dependencies.
```bash
npx nx migrate 17.3.1
```
Updated Nx dependencies:
```json
{
"nx": "^20.0.0",
"@nx/angular": "17.3.1",
"@nx/eslint-plugin": "17.3.1",
"@nx/js": "17.3.1",
"@nx/node": "17.3.1",
"@nx/storybook": "17.3.1",
"@nx/workspace": "17.3.1"
}
```
Updated Angular dependencies
```json
{
"@angular/animations": "17.1.3",
"@angular/cdk": "17.1.2",
"@angular/common": "17.1.3",
"@angular/compiler": "17.1.3",
"@angular/core": "17.1.3",
"@angular/forms": "17.1.3",
"@angular/material": "17.1.2",
"@angular/material-date-fns-adapter": "17.1.2",
"@angular/platform-browser": "17.1.3",
"@angular/platform-browser-dynamic": "17.1.3",
"@angular/router": "17.1.3",
"zone.js": "0.14.8",
"ng-packagr": "17.1.2",
"@schematics/angular": "17.1.4"
}
```
## 2. Manually update other dependencies
There are a few dependencies that require manual update, here is the list:
```json
{
"dependencies": {
"apollo-angular": "6.0.0",
"@mat-datetimepicker/core": "13.0.2"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"@typescript-eslint/typescript-estree": "7.1.1",
"eslint-config-prettier": "9.1.0"
}
}
```
```bash
npm install --save apollo-angular@6.0.0 @mat-datetimepicker/core@13.0.2
npm install --save-dev @typescript-eslint/eslint-plugin@6.21.0 @typescript-eslint/parser@6.21.0 @typescript-eslint/typescript-estree@7.1.1 eslint-config-prettier@9.1.0
```
## 3. Migrating js-api from mocha to jest
In order to simplify the migration process, we are migrating the test runner from mocha to jest.
### Installing dependencies
```json
{
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-preset-angular": "14.4.2",
"@types/jest": "^29.5.14"
}
```
```bash
npm install --save-dev jest jest-environment-jsdom jest-preset-angular@14 @types/jest
```
### Performing the migration
It's recommended to use both test runners in parallel during the migration process. Nx project test jobs configuration:
```json
{
"test-old-mocha": {
"executor": "nx:run-commands",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"codeCoverage": true
}
},
"test": {
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "lib/js-api/jest.config.ts",
"passWithNoTests": true
}
}
}
```
- delete `.mocharc.json`
- delete `test-old-mocha` job from the project configuration
## 4. Fixing CI/CD issues
### General migration issues
After running the migration script, you may need to manually fix some issues. Run common build targets to identify any problems.
```bash
npx nx run-many --target=build --skip-nx-cache
```
Work through all the problems topic by topic. If blocked by linting issues, disable the linting rules in the affected files. You can re-enable them in the next step.
### Lint jobs
After getting the build to work, run the lint jobs. Re-enable previously disabled linting rules and fix any issues that arise.
```bash
npx nx run-many --target=lint --skip-nx-cache
```
### Unit tests
Despite Angular 16 not introducing major breaking changes, you may still encounter issues with unit tests. Run the unit tests and fix any problems that arise.
```bash
npx nx run-many --target=test --skip-nx-cache
```
-102
View File
@@ -1,102 +0,0 @@
# Migrating from Angular 17 to Angular 18
This guide describes how to migrate ADF from Angular version 17 to version 18. Follow these steps to ensure a smooth transition.
## 1. Update changed dependencies
Update the following packages in your `package.json`:
### dependencies
```json
{
"@angular/animations": "18.2.13",
"@angular/cdk": "18.2.14",
"@angular/common": "18.2.13",
"@angular/compiler": "18.2.13",
"@angular/core": "18.2.13",
"@angular/forms": "18.2.13",
"@angular/material": "18.2.14",
"@angular/material-date-fns-adapter": "18.2.14",
"@angular/platform-browser": "18.2.13",
"@angular/platform-browser-dynamic": "18.2.13",
"@angular/router": "18.2.13",
"@apollo/client": "3.13.1",
"@mat-datetimepicker/core": "14.0.0",
"apollo-angular": "10.0.3",
"minimatch-browser": "1.0.0",
"node-fetch": "^3.3.2",
"zone.js": "0.14.10"
}
```
### devDependencies
```json
{
"@angular-devkit/architect": "0.1802.13",
"@angular-devkit/build-angular": "18.2.14",
"@angular-devkit/core": "18.2.13",
"@angular-devkit/schematics": "18.2.13",
"@angular/compiler-cli": "18.2.13",
"@nx/angular": "19.2.0",
"@nx/js": "18.3.5",
"@nx/workspace": "18.3.5",
"@storybook/angular": "8.4.7",
"ng-packagr": "18.2.1",
"npm-run-all": "^4.1.5",
"postcss": "8.4.41",
"postcss-sass": "^0.5.0",
"tsconfig-paths": "^4.1.1",
"typescript": "5.5.4",
"webpack-cli": "^5.1.4"
}
```
## 2. Material mixins update
Angular Material 18 introduced Material 3 mixins as new default. As we are still using Material 2, we need to ensure that we are still using the Material 2 version.
In order to use Material 2 mixins, you need to add a `m2-` prefix to the mixins in your stylesheets. For example:
```scss
mat.define-typography-config()
mat.get-color-from-palette()
```
should be changed to:
```scss
mat.m2-define-typography-config()
mat.m2-get-color-from-palette()
```
## 3. Fixing CI/CD issues
After running the migration script, you may need to manually fix some issues. Run common build targets to identify any problems.
```bash
npx nx run-many --target=build --skip-nx-cache
```
If blocked by linting issues, disable the linting rules in the affected files. You can re-enable them in the next step.
### Lint jobs
After getting the build to work, run the lint jobs. Re-enable previously disabled linting rules and fix any issues that arise.
```bash
npx nx run-many --target=lint --skip-nx-cache
```
### Unit tests
Run the unit tests and fix any problems that arise.
```bash
npx nx run-many --target=test --skip-nx-cache
```
## 4. Review Angular 18 breaking changes
Angular 18 is a minor update with no major breaking changes for most projects. However, always review the [Angular 18 changelog](https://github.com/angular/angular/blob/main/CHANGELOG.md) and [official update guide](https://angular.dev/update-guide?v=17.0-18.0).
-62
View File
@@ -1,62 +0,0 @@
# CI Commands and Labels
Reference for flags and labels that control CI behavior on pull requests.
## PR Title Flags
Include these flags anywhere in the **PR title** to modify CI behavior.
| Flag | Effect |
|------|--------|
| `[ci:force]` | Skips the PR approval check, allowing the full pipeline to run without an approved review. Useful for testing CI changes on draft PRs. |
Example: `[AAE-12345] Fix pagination component [ci:force]`
## Commit Message Flags
Include these flags in a **commit message** to modify CI behavior.
| Flag | Effect |
|------|--------|
| `[ci:force]` | Skips the PR approval check (same as PR title flag). |
| `[affected:*]` | Forces all Nx targets to run against all projects, ignoring the affected calculation. Equivalent to `--all`. |
## PR Labels
Labels applied to the PR that affect CI behavior.
| Label | Effect |
|-------|--------|
| `do not merge` | Blocks the PR from passing the finalize check. CI will fail until the label is removed. |
| `next version` | Same as above - blocks the PR from merging. Used to hold PRs for the next release cycle. |
## Automatic Skip Conditions
The approval check is automatically skipped for:
- **Scheduled runs** (`schedule` event)
- **Workflow dispatch** (`workflow_dispatch` event)
- **Dependabot PRs** (actor is `dependabot[bot]`)
- **Build bot PRs** (actor is `alfresco-build`)
- **Devel flag** (when `devel: true` is passed via `workflow_call`)
## Path-Based Filtering
PRs that only modify non-code files skip the build, test, and lint jobs entirely. Files considered non-code:
- Markdown files (`*.md`)
- Documentation (`docs/`)
- `LICENSE`, `NOTICE`
- `.editorconfig`, `.gitattributes`
- `.github/CODEOWNERS`, `.github/dependabot.yml`
## PR Size Check
Every PR gets an automatic size classification displayed in the job summary:
| Size | Criteria |
|------|----------|
| **S** | < 200 total changes and < 10 files |
| **M** | 200-500 total changes or 10-20 files |
| **L** | 500-1000 total changes or 20-30 files |
| **XL** | > 1000 total changes or > 30 files (warning annotation added) |
@@ -92,8 +92,8 @@ See the [Custom layout](#custom-layout) section for full details of all availabl
| showRightSidebar | `boolean` | false | Toggles right sidebar visibility. Requires `allowRightSidebar` to be set to `true`. |
| showToolbar | `boolean` | true | Hide or show the toolbar |
| showViewer | `boolean` | true | Hide or show the viewer |
| sidebarLeftTemplate | `TemplateRef<unknown>` | null | The template for the left sidebar. The template context contains the loaded node data. |
| sidebarRightTemplate | `TemplateRef<unknown>` | null | The template for the right sidebar. The template context contains the loaded node data. |
| sidebarLeftTemplate | `TemplateRef<any>` | null | The template for the left sidebar. The template context contains the loaded node data. |
| sidebarRightTemplate | `TemplateRef<any>` | null | The template for the right sidebar. The template context contains the loaded node data. |
| versionId | `string` | null | Version Id of the file to load. |
### Events
@@ -107,14 +107,12 @@ See the [Custom layout](#custom-layout) section for full details of all availabl
## Keyboard shortcuts
| Name | Description |
|-------------------|---------------------------------------------------------------|
| Esc | Close the viewer (overlay mode only). |
| Left | Invoke 'Navigate before' action. Disabled in image edit mode. |
| Right | Invoke 'Navigate next' action. Disabled in image edit mode. |
| Shift + Arrow Key | Increase image crop area. Active only in image edit mode. |
| Alt + Arrow Key | Decrease image crop area. Active only in image edit mode. |
| Ctrl+F | Activate full-screen mode. |
| Name | Description |
|--------|---------------------------------------|
| Esc | Close the viewer (overlay mode only). |
| Left | Invoke 'Navigate before' action. |
| Right | Invoke 'Navigate next' action. |
| Ctrl+F | Activate full-screen mode. |
## Details
@@ -202,7 +200,7 @@ The viewer component consists of separate Views that handle particular file type
For those extensions and mime types that cannot be natively displayed in the browser, the Viewer will try to fetch the corresponding rendition using the [renditions service api](../services/renditions.service.md).
For the full list of supported types please refer to: [File types that support preview and thumbnail generation](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.3/Alfresco-Content-Services/Administer/Transformation/File-types-that-support-preview-and-thumbnail-generation).
For the full list of supported types please refer to: [File types that support preview and thumbnail generation](http://docs.alfresco.com/5.2/references/valid-transformations-preview.html).
### Configuring PDF.js library
@@ -247,17 +245,16 @@ The Viewer supports dynamically-loaded viewer preview extensions, to know more a
You can define your own custom handler to override supported file formats or handle other file formats that are not yet supported by
the component. Below is an example that shows how to use the `adf-viewer-extension`
to handle 3D data files. `contentLoaded` should be an `EventEmitter` that will emit as soon as the component responsible for rendering finishes.
to handle 3D data files:
```html
<adf-alfresco-viewer [nodeId]="nodeId">
<ng-template #viewerExtensions>
<adf-viewer-extension [supportedExtensions]="['obj','3ds']" #extension>
<ng-template let-urlFileContent="urlFileContent" let-extension="extension" let-markAsLoaded="markAsLoaded">
<ng-template let-urlFileContent="urlFileContent" let-extension="extension">
<threed-viewer
[urlFile]="urlFileContent"
[extension]="extension"
(contentLoaded)="markAsLoaded()">
[extension]="extension">
</threed-viewer>
</ng-template>
</adf-viewer-extension>
@@ -273,19 +270,17 @@ You need to keep all instances of `adf-viewer-extension` inside `viewerExtension
<adf-alfresco-viewer [nodeId]="nodeId">
<ng-template #viewerExtensions>
<adf-viewer-extension [supportedExtensions]="['xls','xlsx']" #extension>
<ng-template let-urlFileContent="urlFileContent" let-markAsLoaded="markAsLoaded">
<ng-template let-urlFileContent="urlFileContent">
<my-custom-xls-component
urlFileContent="urlFileContent"
(contentLoaded)="markAsLoaded()">
urlFileContent="urlFileContent">
</my-custom-xls-component>
</ng-template>
</adf-viewer-extension>
<adf-viewer-extension [supportedExtensions]="['txt']" #extension>
<ng-template let-urlFileContent="urlFileContent" let-markAsLoaded="markAsLoaded">
<ng-template let-urlFileContent="urlFileContent" >
<my-custom-txt-component
urlFileContent="urlFileContent"
(contentLoaded)="markAsLoaded()">
urlFileContent="urlFileContent">
</my-custom-txt-component>
</ng-template>
</adf-viewer-extension>
@@ -378,7 +378,7 @@ displayed. The aspects to be displayed are calculated as an intersection of the
## Multi value card properties
Multi value properties are displayed one after another separated by a comma.
Multi value properties are displayed one after another separated by a comma. This card makes use of the [Multi Value Pipe](../../core/pipes/multi-value.pipe.ts).
To customize the separator used by this card you can set it in your `app.config.json` inside your content-metadata configuration:
@@ -417,8 +417,7 @@ Once you have enabled this feature you will be able to double click on your meta
"exif:exif": [ "exif:pixelXDimension", "exif:pixelYDimension"]
}
},
"copy-to-clipboard-action": true,
"display-copy-to-clipboard-icon": true
"copy-to-clipboard-action": true
}
```
@@ -67,9 +67,7 @@ Displays the documents from a repository.
| contextMenuActions | `boolean` | false | Toggles context menus for each row |
| currentFolderId | `string` | null | The ID of the folder node to display or a reserved string alias for special sources |
| displayCheckboxesOnHover | `boolean` | false | Enables checkboxes in datatable rows being displayed on hover only. |
| displayDragAndDropHint | `boolean` | true | Display drag and drop hint. |
| emptyFolderImageUrl | `string` | | Custom image for empty folder. Default value: './assets/images/empty_doc_lib.svg' |
| filters | `string[]` | | Specifies additional filters to apply (joined with **AND**). Applied for recent files only |
| filterValue | `any` | | Initial value for filter. |
| headerFilters | `boolean` | false | Toggles the header filters mode. |
| imageResolver | `any \| null` | null | Custom function to choose image file paths to show. See the [Image Resolver Model](image-resolver.model.md) page for more information. |
@@ -40,3 +40,4 @@ This component should be used in combination with the
- [Upload button component](upload-button.component.md)
- [Upload drag area component](upload-drag-area.component.md)
- [File upload error pipe](../pipes/file-upload-error.pipe.md)
@@ -15,8 +15,7 @@ Displays comments from users involved in a specified content and allows an invol
```html
<adf-node-comments
[nodeId]="YOUR_NODE_ID"
[readOnly]="YOUR_READ_ONLY_FLAG"
(commentAdded)="onCommentAdded($event)">
[readOnly]="YOUR_READ_ONLY_FLAG">
</adf-node-comments>
```
@@ -24,13 +23,7 @@ Displays comments from users involved in a specified content and allows an invol
### Properties
| Name | Type | Default value | Description |
| -------- | --------- | ------------- | ----------------------------------------------------------------------------------- |
| nodeId | `string` | | nodeId of the document that has comments |
| readOnly | `boolean` | | make the [comments component](../../core/components/comments.component.md) readOnly |
### Events
| Name | Type | Description |
| ------------ | ------------------------------------------------------------------------ | ------------------------------------------------- |
| commentAdded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)<CommentModel> | Emitted when a new comment is successfully added. |
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| nodeId | `string` | | nodeId of the document that has comments |
| readOnly | `boolean` | | make the [comments component](../../core/components/comments.component.md) readOnly |
@@ -2,7 +2,7 @@
Title: Search Chip Autocomplete Input component
Added: v6.1.0
Status: Active
Last reviewed: 2026-09-09
Last reviewed: 2023-06-13
---
# [Search Chip Autocomplete Input component](../../../lib/content-services/src/lib/search/components/search-chip-autocomplete-input/search-chip-autocomplete-input.component.ts "Defined in search-chip-autocomplete-input.component.ts")
@@ -31,7 +31,6 @@ Represents an input with autocomplete options.
| preselectedOptions | `AutocompleteOption[]` | [] | Options which are selected from start |
| onReset$ | [`Observable`](https://rxjs.dev/guide/observable)`<void>` | | Observable that will listen to any reset event causing component to clear the chips and input |
| allowOnlyPredefinedValues | boolean | true | A flag that indicates whether it is possible to add a value not from the predefined ones |
| loading | [`Observable`](https://rxjs.dev/guide/observable)`<boolean>` | `of(false)` | Stream driving a loading spinner shown inside the autocomplete panel while a new batch of options is being fetched. While it emits `true`, the options list is replaced by the spinner. |
| placeholder | string | 'SEARCH.FILTER.ACTIONS.ADD_OPTION' | Placeholder which should be displayed in input. |
| compareOption | (option1: AutocompleteOption, option2: AutocompleteOption) => boolean | | Function which is used to selected options with all options so it allows to detect which options are already selected. |
| formatChipValue | (option: string) => string | | Function which is used to format custom typed options. |
@@ -25,13 +25,12 @@ before that release, please ensure that your component configuration is updated
### Properties
| Name | Type | Description |
|--------------|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| field | string | Field to apply the query to. Required value |
| maxDate | string | A fixed date (default format: dd-MMM-yy) or the string `"today"` that will set the maximum searchable date. Default is today. |
| dateFormat | string | Date format. Dates used by the datepicker are Javascript Date objects, using [date-fns](https://date-fns.org/v2.30.0/docs/format) for formatting, so you can use any date format supported by the library. Default is 'dd-MMM-yy (sample date - 07-Jun-23) |
| initialValue | SearchDateRange | Initial value for the component |
| onReset$ | [`Observable`](http://reactivex.io/documentation/observable.html)`<void>` | Reset event observable |
| Name | Type | Description |
|--------------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| field | string | Field to apply the query to. Required value |
| maxDate | string | A fixed date (default format: dd-MMM-yy) or the string `"today"` that will set the maximum searchable date. Default is today. |
| dateFormat | string | Date format. Dates used by the datepicker are Javascript Date objects, using [date-fns](https://date-fns.org/v2.30.0/docs/format) for formatting, so you can use any date format supported by the library. Default is 'dd-MMM-yy (sample date - 07-Jun-23) |
| initialValue | SearchDateRange | Initial value for the component |
### Events
@@ -2,7 +2,7 @@
Title: Search Filter Autocomplete Chips component
Added: v6.1.0
Status: Active
Last reviewed: 2026-09-09
Last reviewed: 2023-06-13
---
# [Search Filter Autocomplete Chips component](../../../lib/content-services/src/lib/search/components/search-filter-autocomplete-chips/search-filter-autocomplete-chips.component.ts "Defined in search-filter-autocomplete-chips.component.ts")
@@ -39,61 +39,18 @@ Implements a [search widget](../../../lib/content-services/src/lib/search/models
### Settings
| Name | Type | Description |
| ------------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| field | `string` | Field to apply the query to. Required value. See [Supported fields](#supported-fields) for the values that enable dynamically fetched options |
| label | `string` | Label displayed for the autocomplete input |
| autocompleteOptions | `AutocompleteOption[]` | Predefined options for autocomplete |
| allowOnlyPredefinedValues | `boolean` | Specifies whether the input values should only be from predefined |
| allowUpdateOnChange | `boolean` | Enable/Disable the update fire event when text has been changed. By default is true |
| hideDefaultAction | `boolean` | Show/hide the widget actions. By default is false |
### Supported fields
Besides using static `autocompleteOptions`, the `field` value can be set to one of the following to fetch options dynamically from the repository as the user types:
| `field` value | Source of options |
| --------------- | ----------------------------------------------------------- |
| `TAG` | Existing tags |
| `cm:categories` | Existing categories |
| `SITE` | Available sites (plus any predefined `autocompleteOptions`) |
| `ANCESTOR` | Folders matching the typed name (parent folder search) |
While a batch of options is being fetched for any of these fields, a loading spinner is shown inside the autocomplete panel until the results arrive. Only the results of the latest request are applied, so quickly changing the input does not display stale options.
| Name | Type | Description |
| ---- |----------|--------------------------------------------------------------------------------------------------------------------|
| field | `string` | Field to apply the query to. Required value |
| autocompleteOptions | `AutocompleteOption[]` | Predefined options for autocomplete |
| allowOnlyPredefinedValues | `boolean` | Specifies whether the input values should only be from predefined |
| allowUpdateOnChange | `boolean` | Enable/Disable the update fire event when text has been changed. By default is true |
| hideDefaultAction | `boolean` | Show/hide the widget actions. By default is false |
## Details
This component allows the user to choose filter options for the search query.
See the [Search Chip Autocomplete Input component](search-chip-autocomplete-input.component.md) for more details.
### Parent folder search
Set `field` to `ANCESTOR` to let the user search for and select a parent folder to scope the search to. The following example also uses `label` to set the input label:
```json
{
"search": {
"categories": [
{
"id": "parentFolder",
"name": "Parent folder",
"enabled": true,
"component": {
"selector": "autocomplete-chips",
"settings": {
"allowUpdateOnChange": false,
"hideDefaultAction": true,
"allowOnlyPredefinedValues": false,
"field": "ANCESTOR",
"label": "Parent folder"
}
}
}
]
}
}
```
## See also
- [Search Configuration Guide](../../user-guide/search-configuration-guide.md)
@@ -33,6 +33,7 @@ to build and execute the query.
- [Search Query Builder service](../services/search-query-builder.service.md)
- [Search filter chips component](./search-filter-chips.component.md)
- [Search Chip List Component](search-chip-list.component.md)
- [Search Sorting Picker Component](search-sorting-picker.component.md)
- [Search Widget Interface](../interfaces/search-widget.interface.md)
- [Search check list component](search-check-list.component.md)
- [Search date range tabbed component](search-date-range-tabbed.component.md)
@@ -39,7 +39,7 @@ Implements a [search widget](../../../lib/content-services/src/lib/search/models
| Name | Type | Description |
| ---- | ---- | ----------- |
| field | string | Field to to use |
| format | string | Value format. Uses string substitution to allow all sorts of [range queries](https://support.hyland.com/r/Alfresco/Alfresco-Search-Services/2.0/Alfresco-Search-Services/Using/Full-text-search-reference/Search-for-ranges). |
| format | string | Value format. Uses string substitution to allow all sorts of [range queries](https://docs.alfresco.com/5.2/concepts/rm-searchsyntax-ranges.html). |
| hideDefaultAction | boolean | Show/hide the widget actions. By default is false. |
## Details
@@ -50,7 +50,7 @@ in a search query.
#### Range query format
See the [Search for ranges](https://support.hyland.com/r/Alfresco/Alfresco-Governance-Services/23.4/Alfresco-Governance-Services/Using/Searching-records/Advanced-search-options) page in the ACS docs for more information about the date range format.
See the [Search for ranges](https://docs.alfresco.com/5.2/concepts/rm-searchsyntax-ranges.html) page in the ACS docs for more information about the date range format.
The `format` setting specifies how the date is displayed textually. Most of the format is
displayed as-is but you can use `{FROM}` and `{TO}` markers to interpolate the range limits
@@ -0,0 +1,19 @@
---
Title: Search Sorting Picker Component
Added: v2.3.0
Status: Active
---
# [Search Sorting Picker Component](../../../lib/content-services/src/lib/search/components/search-sorting-picker/search-sorting-picker.component.ts "Defined in search-sorting-picker.component.ts")
Provides an ability to select one of the predefined sorting definitions for search results:
```html
<adf-search-sorting-picker></adf-search-sorting-picker>
<adf-search-filter></adf-search-filter>
```
## See also
- [Search Configuration Guide](../../user-guide/search-configuration-guide.md)
- [Search filter chips component](search-filter-chips.component.md)
@@ -46,9 +46,9 @@ Implements a [search widget](../../../lib/content-services/src/lib/search/models
| field | string | Field to apply the query fragment to. Required value |
| pattern | string | Regular expression pattern to restrict the format of the input text |
| placeholder | string | Text displayed in the widget when the input string is empty |
| searchSuffix | string | Text to append in the search of a string. Only applied when wildcard matching is enabled (the `search-wildcards-enabled` app config flag, default `true`). |
| searchPrefix | string | Text to prepend in the search of a string. Only applied when wildcard matching is enabled (the `search-wildcards-enabled` app config flag, default `true`). |
| allowUpdateOnChange | `boolean` | Enable/Disable firing the search update when the text changes. Defaults to `false`; when disabled the search runs only when the user submits the value. |
| searchSuffix | string | Text to append always in the search of a string |
| searchPrefix | string | Text to prepend always in the search of a string |
| allowUpdateOnChange | `boolean` | Enable/Disable the update fire event when text has been changed. By default is true. |
| hideDefaultAction | boolean | Show/hide the widget actions. By default is false. |
## Details
@@ -18,6 +18,7 @@ Shows the nodes in tree structure, each node containing children is collapsible/
[displayName]="'Tree display name'"
[loadMoreSuffix]="'subnodes'"
[emptyContentTemplate]="emptyContentTemplate"
[nodeActionsMenuTemplate]="nodeActionsMenuTemplate"
(paginationChanged)="onPaginationChanged($event)">
</adf-tree>
```
@@ -33,6 +34,7 @@ Shows the nodes in tree structure, each node containing children is collapsible/
| emptyContentTemplate | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | | [TemplateRef](https://angular.io/api/core/TemplateRef) to provide empty template when no nodes are loaded |
| expandIcon | `string` | "chevron_right" | Icon shown when node has children and is collapsed. By default set to chevron_right |
| loadMoreSuffix | `string` | | Load more suffix for load more button |
| nodeActionsMenuTemplate | [`TemplateRef`](https://angular.io/api/core/TemplateRef)`<any>` | | [TemplateRef](https://angular.io/api/core/TemplateRef) to provide context menu items for context menu displayed on each row |
| selectableNodes | `boolean` | false | Variable defining if tree nodes should be selectable. By default set to false |
| stickyHeader | `boolean` | false | Variable defining if tree header should be sticky. By default set to false |
| contextMenuOptions | `any[]` | | Array of context menu options which should be displayed for each row. |
@@ -86,6 +88,7 @@ First step is to provide necessary input value.
[loadMoreSuffix]="'subnodes'"
[selectableNodes]="true"
[emptyContentTemplate]="emptyContentTemplate"
[nodeActionsMenuTemplate]="nodeActionsMenuTemplate"
(paginationChanged)="onPaginationChanged($event)">
</adf-tree>
```
@@ -86,3 +86,4 @@ export class MyComponent {
## See also
- [Upload Version Button component](upload-version-button.component.md)
- [File upload error pipe](../pipes/file-upload-error.pipe.md)
@@ -141,3 +141,4 @@ This could be either a selection of 2 or more files, or a folder with multiple e
- [File uploading dialog component](file-uploading-dialog.component.md)
- [Upload button component](upload-button.component.md)
- [File upload error pipe](../pipes/file-upload-error.pipe.md)
@@ -34,7 +34,7 @@ Creates a new Content Services document library/site.
This component lets the user create a new document library/site with the usual
name, ID, description and access restrictions. See the
[Sites](https://support.hyland.com/r/Alfresco/Alfresco-Content-Services/23.3/Alfresco-Content-Services/Using/Sites)
[Sites](https://docs.alfresco.com/6.0/concepts/sites-intro.html)
section of the Content Services documentation for more information.
## See also
@@ -0,0 +1,139 @@
---
Title: Check Allowable Operation directive
Added: v2.0.0
Status: Active
Last reviewed: 2019-02-13
---
# [Check Allowable Operation directive](../../../lib/content-services/src/lib/directives/check-allowable-operation.directive.ts "Defined in check-allowable-operation.directive.ts")
Selectively disables an HTML element or Angular component.
## Contents
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Details](#details)
- [HTML element example](#html-element-example)
- [Angular component example](#angular-component-example)
- [Implementing the NodeAllowableOperationSubject interface](#implementing-the-nodeallowableoperationsubject-interface)
- [Defining your component as an EXTENDIBLE_COMPONENT parent component](#defining-your-component-as-an-extendible_component-parent-component)
## Basic Usage
```html
<adf-toolbar title="toolbar example">
<button mat-icon-button
adf-check-allowable-operation="delete"
[adf-nodes]="documentList.selection">
<mat-icon>delete</mat-icon>
</button>
</adf-toolbar>
<adf-document-list #documentList ...>
...
</adf-document-list>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| nodes | [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`[]` | \[] | Nodes to check permission for. |
| permission | `string` | null | Node permission to check (create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions). |
## Details
The [Check Allowable Operation Directive](../../../lib/content-services/src/lib/directives/check-allowable-operation.directive.ts) lets you disable an HTML element or Angular component
by taking a collection of [`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md) instances and checking their permissions.
The decorated element will be disabled if:
- there are no nodes in the collection
- at least one of the nodes does not have the required permission
### HTML element example
A typical use case is to bind a [Document List](../components/document-list.component.md)
selection property to a toolbar button. In the following example, the "Delete" button should
be disabled if no selection is present or if user does not have permission to delete at least one node in the selection:
```html
<adf-toolbar title="toolbar example">
<button mat-icon-button
adf-check-allowable-operation="delete"
[adf-nodes]="documentList.selection">
<mat-icon>delete</mat-icon>
</button>
</adf-toolbar>
<adf-document-list #documentList ...>
...
</adf-document-list>
```
The button will be disabled by default and will change state when the user selects or deselects
one or more documents that they have permission to delete.
### Angular component example
You can add the directive to any Angular component that implements the [`NodeAllowableOperationSubject`](../../../lib/content-services/src/lib/interfaces/node-allowable-operation-subject.interface.ts)
interface (the [Upload Drag Area component](../components/upload-drag-area.component.md),
for example). You can also use it in much the same way as you would with an HTML element:
```html
<alfresco-upload-drag-area
[rootFolderId]="..."
[versioning]="..."
[adf-check-allowable-operation]="'create'"
[adf-nodes]="getCurrentDocumentListNode()">
...
</alfresco-upload-drag-area>
```
To enable your own component to work with this directive, you need to implement the
[`NodeAllowableOperationSubject`](../../../lib/content-services/src/lib/interfaces/node-allowable-operation-subject.interface.ts) interface and also define it as an
[`EXTENDIBLE_COMPONENT`](../../../lib/core/src/lib/interface/injection.tokens.ts)
parent component,
as described in the following sections.
### Implementing the NodeAllowableOperationSubject interface
The component must implement the [`NodeAllowableOperationSubject`](../../../lib/content-services/src/lib/interfaces/node-allowable-operation-subject.interface.ts) interface which means it must have a
boolean `disabled` property. This is the property that will be set by the directive:
```js
import { NodePermissionSubject } from '@alfresco/adf-core';
@Component({...})
export class UploadDragAreaComponent implements NodeAllowableOperationSubject {
public disabled: boolean = false;
}
```
### Defining your component as an EXTENDIBLE_COMPONENT parent component
The directive will look up the component in the dependency injection tree,
up to the `@Host()` component. The host component is typically the component that requests
the dependency. However, when this component is projected into a parent component, the
parent becomes the host. This means you must provide your component with forward referencing
as the
[`EXTENDIBLE_COMPONENT`](../../../lib/core/src/lib/interface/injection.tokens.ts)
and also provide your component as a `viewProvider`:
```js
import { EXTENDIBLE_COMPONENT } from '@alfresco/adf-core';
@Component({
...
viewProviders: [
{ provide: EXTENDIBLE_COMPONENT, useExisting: forwardRef(() => UploadDragAreaComponent)}
]
})
export class UploadDragAreaComponent implements NodeAllowableOperationSubject { ... }
```
**Note:** the usage of **viewProviders** (instead of **providers**) is very important, especially if you want to use this directive on a transcluded component.
@@ -13,6 +13,7 @@ Update the current node by adding/removing the inherited permissions.
```html
<button mat-raised-button
color="primary"
adf-inherit-permission [nodeId]="nodeId"
(updated)="onUpdatedPermissions($node)">PERMISSION</button>
```
@@ -0,0 +1,27 @@
---
Title: Toggle Icon directive
Added: v2.0.0
Status: Active
Last reviewed: 2019-04-09
---
# [Toggle Icon directive](../../../lib/content-services/src/lib/upload/directives/toggle-icon.directive.ts "Defined in toggle-icon.directive.ts")
Toggle icon on mouse or keyboard event for a selectable element.
## Example Usage
```html
<button mat-icon-button adf-toggle-icon #toggle="toggleIcon">
<mat-icon *ngIf="!toggle.isToggled">
check_circle
</mat-icon>
<mat-icon *ngIf="toggle.isToggled">
remove_circle
</mat-icon>
<button></button>
</button>
```
## Class members
@@ -0,0 +1,52 @@
---
Title: Base Card View Content Update interface
Added: v6.0.0
Status: Active
Last reviewed: 2022-11-25
---
# [Base Card View Content Update interface](../../../lib/content-services/src/lib/interfaces/base-card-view-content-update.interface.ts "Defined in base-card-view-content-update.interface.ts")
Specifies required properties and methods for [Card View Content Update service](lib/content-services/src/lib/common/services/card-view-content-update.service.ts).
Extends from [`BaseCardViewUpdate`](../../../lib/core/src/lib/card-view/interfaces/base-card-view-update.interface.ts).
## Basic usage
```ts
export interface BaseCardViewContentUpdate {
itemUpdated$: Subject<UpdateNotification>;
updatedAspect$: Subject<Node>;
update(property: CardViewBaseItemModel, newValue: any);
updateElement(notification: CardViewBaseItemModel);
updateNodeAspect(node: Node);
}
```
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| itemUpdated$ | [`Subject`](http://reactivex.io/documentation/subject.html)`<`[`UpdateNotification`](../../../lib/core/src/lib/card-view/interfaces/update-notification.interface.ts)`>` | | The current updated item. |
| updatedAspect$ | [`Subject`](http://reactivex.io/documentation/subject.html)`<`[`MinimalNode`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md)`>`(@alfresco/js-api) | | [`Subject`](http://reactivex.io/documentation/subject.html) holding the current node |
### Methods
- **update**(property: [`CardViewBaseItemModel`](../../../lib/core/src/lib/card-view/models/card-view-baseitem.model.ts), newValue: `any`)<br/>
Update itemUpdated$ property.
- property:\_ [`CardViewBaseItemModel`](../../../lib/core/src/lib/card-view/models/card-view-baseitem.model.ts) - The property.
- newValue:\_ `any` - new value.
- **updateElement**(notification: [`CardViewBaseItemModel`](../../../lib/core/src/lib/card-view/models/card-view-baseitem.model.ts))<br/>
Update updateItem$ observable.
- notification:\_ [`CardViewBaseItemModel`](../../../lib/core/src/lib/card-view/models/card-view-baseitem.model.ts) - The notification.
- **updateNodeAspect**(node: [`MinimalNode`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md))<br/>
Update node aspect observable.
- node:\_ [`MinimalNode`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) - The node.
## See also
- [CardViewContentUpdate service](../services/card-view-content-update.service.md)
@@ -115,8 +115,8 @@ that will be used when performing the actual query.
Every query fragment is stored and retrieved using its widget `id`.
It is your responsibility to format the query correctly.
Once your change to the query is finished, update the context and call the `execute` method
to rebuild and run the query so the results reflect your change:
Once your change to the query is finished, update the context and call the `update` method
to inform other components about the change:
```ts
@Component({...})
@@ -126,15 +126,12 @@ export class MyComponent implements SearchWidget, OnInit {
onUIChanged() {
this.context.queryFragments[this.id] = `some query`;
void this.context.execute();
this.context.update();
}
}
```
> **Note:** Earlier versions called `this.context.update()` here. The `update()` method and the
> `updated` stream have been removed; call `this.context.execute()` directly instead.
When executed, your fragment will be injected into the resulting query based on the category order in the application configuration file.
```text
@@ -0,0 +1,34 @@
---
Title: File upload error pipe
Added: v3.0.0
Status: Active
Last reviewed: 2019-01-17
---
# [File upload error pipe](../../../lib/content-services/src/lib/upload/pipes/file-upload-error.pipe.ts "Defined in file-upload-error.pipe.ts")
Converts an upload error code to an error message.
## Basic Usage
<!-- {% raw %} -->
```HTML
<div>
Upload failed: {{ errorCode | adfFileUploadError }}
</div>
```
<!-- {% endraw %} -->
## Details
The pipe takes an upload error code (eg, from the `error` event of one of the
upload components) and converts it to a human-readable message. The message is
automatically translated to the user's chosen language.
## See also
- [File uploading dialog component](../components/file-uploading-dialog.component.md)
- [Upload drag area component](../components/upload-drag-area.component.md)
- [Upload button component](../components/upload-button.component.md)
@@ -0,0 +1,27 @@
---
Title: Agent service
Added: v7.0.0-alpha.3
Status: Active
Last reviewed: 2024-07-12
---
# [Agent service](../../../lib/content-services/src/lib/agent/services/agent.service.ts "Defined in agent.service.ts")
Manages agents in Content Services.<br/>
<b>In order to use this service, you need to have the HX Insights Connector (additional ACS module) installed.</b>
## Class members
### Methods
- **getAgents**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AgentPaging`](../../../lib/js-api/src/api/content-rest-api/docs/AgentsApi.md#agentpaging)`>`<br/>
Gets all agents.
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AgentPaging`](../../../lib/js-api/src/api/content-rest-api/docs/AgentsApi.md#agentpaging)`>` - AgentPaging object containing the agents.
## Details
See the
[Agents API](../../../lib/js-api/src/api/content-rest-api/docs/AgentsApi.md) for more information about the types returned by [Agent
service](agent.service.md) methods and for the implementation of the REST API the service is
based on.
@@ -8,6 +8,7 @@ Last reviewed: 2022-11-25
# [Card View Content Update Service](../../../lib/content-services/src/lib/common/services/card-view-content-update.service.ts "Defined in card-view-content-update.service.ts")
Manages Card View properties in the content services environment.
Implements [`BaseCardViewContentUpdate`](../../../lib/content-services/src/lib/interfaces/base-card-view-content-update.interface.ts).
## Class members
@@ -23,12 +23,11 @@ Manages Document List information that is specific to a user.
- _node:_ `any` - Node object
- _nodeId:_ `string` - ID of the node object
- **Returns** `string` - ID value
- **getRecentFiles**(personId: `string`, pagination: [`PaginationModel`](../../../lib/core/src/lib/models/pagination.model.ts), filters?: `string[]`, includeFields: `string[]` = `[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)`>`<br/>
- **getRecentFiles**(personId: `string`, pagination: [`PaginationModel`](../../../lib/core/src/lib/models/pagination.model.ts), filters?: `string[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)`>`<br/>
Gets files recently accessed by a user.
- _personId:_ `string` - ID of the user
- _pagination:_ [`PaginationModel`](../../../lib/core/src/lib/models/pagination.model.ts) - Specifies how to paginate the results
- _filters:_ `string[]` - (Optional) Specifies additional filters to apply (joined with **AND**)
- _includeFields:_ `string[]` - List of data field names to include in the results
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)`>` - List of nodes for the recently used files
- **hasCorrespondingNodeIds**(nodeId: `string`): `boolean`<br/>
Does the well-known alias have a corresponding node ID?
@@ -48,13 +47,12 @@ Manages Document List information that is specific to a user.
- _includeFields:_ `string[]` - List of data field names to include in the results
- _where:_ `string` - (Optional) A string to restrict the returned objects by using a predicate
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/NodePaging.md)`>` - List of favorite files
- **loadFolderByNodeId**(nodeId: `string`, pagination: [`PaginationModel`](../../../lib/core/src/lib/models/pagination.model.ts), includeFields: `string[]` = `[]`, where?: `string`, filters?: `string[]`): `any`<br/>
- **loadFolderByNodeId**(nodeId: `string`, pagination: [`PaginationModel`](../../../lib/core/src/lib/models/pagination.model.ts), includeFields: `string[]` = `[]`, where?: `string`): `any`<br/>
Gets a folder's contents.
- _nodeId:_ `string` - ID of the target folder node
- _pagination:_ [`PaginationModel`](../../../lib/core/src/lib/models/pagination.model.ts) - Specifies how to paginate the results
- _includeFields:_ `string[]` - List of data field names to include in the results
- _where:_ `string` - (Optional) Filters the Node list using the _where_ condition of the REST API (for example, isFolder=true). See the REST API documentation for more information.
- _filters:_ `string[]` - Specifies additional filters to apply (joined with **AND**). Applied for '-recent-' only.
- **Returns** `any` - List of items contained in the folder
- **loadMemberSites**(pagination: [`PaginationModel`](../../../lib/core/src/lib/models/pagination.model.ts), where?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteMemberPaging`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/SiteMemberPaging.md)`>`<br/>
Gets sites that the current user is a member of.
@@ -2,7 +2,7 @@
Title: Document List service
Added: v2.0.0
Status: Active
Last reviewed: 2026-06-16
Last reviewed: 2019-01-16
---
# Document List Service
@@ -21,11 +21,10 @@ import { DocumentListService } from '@alfresco/adf-core';
### Events
| Name | Description |
|-------------------|----------------------------------------------------------------------------------------------|
| `reload$` | Emits when the document list should be reloaded. |
| `resetSelection$` | Emits when the selection should be reset. |
| `reloadSilently$` | Emits when the document list should be reloaded **without** resetting the current selection. |
| Name | Description |
|-------------------|-------------------------------------------------|
| `reload$` | Emits when the document list should be reloaded |
| `resetSelection$` | Emits when the selection should be reset |
### Methods
@@ -33,8 +32,6 @@ import { DocumentListService } from '@alfresco/adf-core';
Reloads the document list.
- **resetSelection**(): `void`<br/>
Resets the selection.
- **reloadSilently**(): `void`<br/>
Reloads the document list **without** resetting the current selection.
- **copyNode**(nodeId: `string`, targetParentId: `string`): `Observable<NodeEntry>`<br/>
Copy a node to destination node
- _nodeId:_ `string` - The id of the node to be copied
@@ -65,14 +62,13 @@ import { DocumentListService } from '@alfresco/adf-core';
- _nodeId:_ `any` -
- **Returns** `boolean` -
- **loadFolderByNodeId**(nodeId: `string`, pagination: `PaginationModel`, includeFields: `string[]`, where?: `string`, orderBy?: `string[]`, filters?: `string[]`): `Observable<DocumentLoaderNode>`<br/>
- **loadFolderByNodeId**(nodeId: `string`, pagination: `PaginationModel`, includeFields: `string[]`, where?: `string`, orderBy?: `string[]`): `Observable<DocumentLoaderNode>`<br/>
Load a folder by Node Id.
- _nodeId:_ `string` - ID of the folder node
- _pagination:_ `PaginationModel` - pagination model
- _includeFields:_ `string[]` - List of data field names to include in the results
- _where:_ `string` - (Optional) Optionally filter the list
- _orderBy:_ `string[]` - (Optional) order by node property
- _filters:_ `string[]` - (Optional) Specifies additional filters to apply (joined with **AND**). Applied for recent files only
- **Returns** `Observable<DocumentLoaderNode>` - Details of the folder
- **moveNode**(nodeId: `string`, targetParentId: `string`): `Observable<NodeEntry>`<br/>
Moves a node to destination node.
@@ -20,7 +20,7 @@ Adds and retrieves comments for nodes in Content Services.
Gets all comments that have been added to a task.
- _id:_ `string` - ID of the target task
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../../lib/core/src/lib/models/comment.model.ts)`[]>` - Details for each comment
- **getUserImage**(userId: `string`): `string`<br/>
Returns the avatar URL for the specified user.
- _userId:_ `string` - ID of the user
- **Returns** `string` - URL of the user's avatar image
- **getUserImage**(avatarId: `string`): `string`<br/>
Gets the URL for the user's profile image.
- _avatarId:_ `string` - ID of the user
- **Returns** `string` - URL for the user's profile image

Some files were not shown because too many files have changed in this diff Show More