Compare commits

...
Author SHA1 Message Date
MichalKinas 8d98b95365 Don't bump the lib versions when releasing from branch 2025-06-30 11:01:15 +02:00
MichalKinas 6c930394ae Use proper cache version 2025-06-30 10:51:40 +02:00
MichalKinas bd028c6c5d Use proper actions and checkout versions 2025-06-30 10:49:27 +02:00
MichalKinas 090a99dd77 Release 6.9.1 2025-06-30 10:42:58 +02:00
Tiago Salvado e1df4d8471 [MNT-24628] Handle difference between config object ticket and browser storage ticket (#10270)
* [MNT-24628] Handle difference between config object ticket and browser storage ticket

* [MNT-24628] Add unit tests

* [MNT-24628] Added null/undefined checks
2025-06-30 10:05:40 +02:00
Tiago Salvado a6d6cbb0a0 [MNT-24449] Validate ticket on config initialization (#9882)
* [MNT-24449] Validate ticket on config initialization

* [MNT-24449] Added unit test
2025-06-30 09:59:00 +02:00
36 changed files with 339 additions and 72 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ runs:
using: "composite"
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@v4
- run: echo "Artifact Extract"
shell: bash
- name: Download artifact
+3 -3
View File
@@ -20,7 +20,7 @@ runs:
using: "composite"
steps:
- name: install NPM
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache-dependency-path: package-lock.json
@@ -31,7 +31,7 @@ runs:
- name: Node Modules cache
id: node-modules-cache
if: ${{ inputs.enable-node-modules-cache == 'true' }}
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@v4
env:
cache-name: node-modules-cache
with:
@@ -43,7 +43,7 @@ runs:
node_modules-${{ runner.os }}-build-
node_modules-${{ runner.os }}-
- name: pip cache
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
uses: actions/cache@v4
if: ${{ inputs.enable-cache == 'true' }}
with:
path: ~/.cache/pip
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
+1 -1
View File
@@ -73,7 +73,7 @@ jobs:
runs-on: ubuntu-latest
name: Initialize artifacts
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@v4
- uses: ./.github/actions/artifact-initialize
with:
artifact-name: global-e2e-result
+2 -2
View File
@@ -96,13 +96,13 @@ jobs:
GITHUB_TOKEN: $BOT_GITHUB_TOKEN
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
- id: set-dryrun
uses: ./.github/actions/enable-dryrun
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- name: install NPM
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: "Release tag"
+10 -10
View File
@@ -98,7 +98,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
- name: Ensure SHA pinned actions
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@40e45e738b3cad2729f599d8afc6ed02184e1dbd # v3.0.5
@@ -116,7 +116,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 0
@@ -199,7 +199,7 @@ jobs:
needs: [check-if-pr-is-approved, pre-checks]
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
@@ -236,7 +236,7 @@ jobs:
exclude: "insights,core,extensions,content-services,process-services,eslint-plugin-eslint-angular,js-api"
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
@@ -253,7 +253,7 @@ jobs:
needs: [setup]
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
@@ -268,7 +268,7 @@ jobs:
needs: [setup]
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
@@ -285,7 +285,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all
- uses: ./.github/actions/setup
@@ -443,7 +443,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all
- uses: ./.github/actions/setup
@@ -474,7 +474,7 @@ jobs:
steps:
- id: checkoutRepo
name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: PR contains forbidden labels
@@ -501,7 +501,7 @@ jobs:
name: Final Results
needs: [check-if-pr-is-approved, pre-checks, setup, unit-tests, lint, build-libs, e2e, e2e-storybook]
steps:
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
- uses: actions/checkout@v4
- name: identify-slack-group
id: groups
if: ${{ github.event_name == 'schedule' }}
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Automatic Rebase
+5 -6
View File
@@ -87,7 +87,7 @@ jobs:
echo "Set TAG with name: ${TAG_NPM}"
echo "TAG_NPM=${TAG_NPM}" >> $GITHUB_ENV
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -111,7 +111,7 @@ jobs:
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -126,10 +126,9 @@ jobs:
- name: build libraries
run: |
set -u;
./scripts/update-version.sh -gnu || exit 1;
npx nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" --skip-nx-cache
npx nx affected $NX_CALCULATION_FLAGS --target=pretheme
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
- uses: actions/setup-node@v4
name: release libraries GH registry
with:
node-version-file: '.nvmrc'
@@ -138,7 +137,7 @@ jobs:
- run: npx nx affected --target=npm-publish $NX_CALCULATION_FLAGS --tag=branch|| exit 1
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_WRITE_PKG }}
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
- uses: actions/setup-node@v4
name: release libraries Npm registry
with:
node-version-file: '.nvmrc'
@@ -154,5 +153,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
- uses: ./.github/actions/npm-check-bundle
+7 -7
View File
@@ -92,7 +92,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -114,7 +114,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 1
- run: git fetch --all
@@ -140,7 +140,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 1
- run: git fetch --all
@@ -170,7 +170,7 @@ jobs:
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -188,7 +188,7 @@ jobs:
./scripts/github/build/bumpversion.sh
npx nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell" --skip-nx-cache
npx nx affected $NX_CALCULATION_FLAGS --target=pretheme
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
- uses: actions/setup-node@v4
name: release libraries GH registry
with:
node-version-file: '.nvmrc'
@@ -197,7 +197,7 @@ jobs:
- run: npx nx affected --target=npm-publish $NX_CALCULATION_FLAGS --tag=$TAG_NPM || exit 1
env:
NODE_AUTH_TOKEN: ${{ secrets.PAT_WRITE_PKG }}
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
- uses: actions/setup-node@v4
name: release libraries Npm registry
with:
node-version-file: '.nvmrc'
@@ -214,7 +214,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
uses: actions/checkout@v4
- uses: ./.github/actions/npm-check-bundle
finalize:
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "Alfresco-ADF-Angular-Demo",
"description": "Demo shell for Alfresco Angular components",
"version": "6.9.0",
"version": "6.9.1",
"author": "Hyland Software, Inc. and its affiliates",
"repository": {
"type": "git",
+1
View File
@@ -49,3 +49,4 @@ The pages linked below contain the licenses for all third party dependencies of
- [ADF 6.7.1](license-info-6.7.1.md)
- [ADF 6.8.0](license-info-6.8.0.md)
- [ADF 6.9.0](license-info-6.9.0.md)
- [ADF 6.9.1](license-info-6.9.1.md)
+51
View File
@@ -0,0 +1,51 @@
---
Title: License info, alfresco-ng2-components 6.9.1
---
# License information for alfresco-ng2-components 6.9.1
This page lists all third party libraries the project depends on.
## Libraries
| Name | Version | License |
| --- | --- | --- |
| [@angular/animations](https://github.com/angular/angular) | 14.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@angular/cdk](https://github.com/angular/components) | 14.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@angular/common](https://github.com/angular/angular) | 14.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@angular/compiler](https://github.com/angular/angular) | 14.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@angular/core](https://github.com/angular/angular) | 14.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@angular/forms](https://github.com/angular/angular) | 14.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@angular/material-date-fns-adapter](https://github.com/angular/components) | 14.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@angular/material](https://github.com/angular/components) | 14.1.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@angular/platform-browser-dynamic](https://github.com/angular/angular) | 14.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@angular/platform-browser](https://github.com/angular/angular) | 14.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@angular/router](https://github.com/angular/angular) | 14.1.3 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@apollo/client](https://github.com/apollographql/apollo-client) | 3.10.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@cspell/eslint-plugin](https://github.com/streetsidesoftware/cspell) | 7.3.6 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@mat-datetimepicker/core](https://github.com/kuhnroyal/mat-datetimepicker) | 10.1.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@ngx-translate/core](https://github.com/ngx-translate/core) | 14.0.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [@storybook/core-server](https://github.com/storybookjs/storybook) | 7.6.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [angular-oauth2-oidc-jwks](https://github.com/manfredsteyer/angular-oauth2-oidc) | 17.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [angular-oauth2-oidc](https://github.com/manfredsteyer/angular-oauth2-oidc) | 13.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [apollo-angular](https://github.com/kamilkisiela/apollo-angular) | 5.0.2 | [MIT](http://www.opensource.org/licenses/MIT) |
| [chart.js](https://github.com/chartjs/Chart.js) | 4.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [cropperjs](https://github.com/fengyuanchen/cropperjs) | 1.5.13 | [MIT](http://www.opensource.org/licenses/MIT) |
| [date-fns](https://github.com/date-fns/date-fns) | 2.30.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [dotenv-expand](https://github.com/motdotla/dotenv-expand) | 10.0.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) |
| dotenv-expand | 5.1.0 | [BSD-2-Clause](http://www.opensource.org/licenses/BSD-2-Clause) |
| [event-emitter](https://github.com/medikoo/event-emitter) | 0.3.5 | [MIT](http://www.opensource.org/licenses/MIT) |
| [material-icons](https://github.com/marella/material-icons) | 1.13.12 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [minimatch-browser](https://github.com/isaacs/minimatch) | 1.0.0 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [monaco-editor](https://github.com/microsoft/monaco-editor) | 0.33.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [ng2-charts](https://github.com/valor-software/ng2-charts) | 4.1.1 | [ISC](https://www.isc.org/downloads/software-support-policy/isc-license/) |
| [ngx-monaco-editor-v2](https://github.com/miki995/ngx-monaco-editor-v2) | 14.0.4 | [MIT](http://www.opensource.org/licenses/MIT) |
| [pdfjs-dist](https://github.com/mozilla/pdfjs-dist) | 3.3.122 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [raphael](https://github.com/DmitryBaranovskiy/raphael) | 2.3.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [rxjs](https://github.com/reactivex/rxjs) | 6.6.6 | [Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0) |
| [subscriptions-transport-ws](https://github.com/apollostack/subscriptions-transport-ws) | 0.11.0 | [MIT](http://www.opensource.org/licenses/MIT) |
| [superagent](https://github.com/ladjs/superagent) | 9.0.1 | [MIT](http://www.opensource.org/licenses/MIT) |
| [tslib](https://github.com/Microsoft/tslib) | 1.14.1 | [0BSD](http://landley.net/toybox/license.html) |
| [tslib](https://github.com/Microsoft/tslib) | 2.6.2 | [0BSD](http://landley.net/toybox/license.html) |
| [zone.js](https://github.com/angular/angular) | 0.11.8 | [MIT](http://www.opensource.org/licenses/MIT) |
+1
View File
@@ -9,6 +9,7 @@ The first **General Availability** release was v2.0.0.
## General Availability
- [6.9.1](RelNote-6.9.1.md)
- [6.9.0](RelNote-6.9.0.md)
- [6.8.0](RelNote-6.8.0.md)
- [6.7.1](RelNote-6.7.1.md)
+8
View File
@@ -0,0 +1,8 @@
---
Title: Changelog for alfresco-ng2-components v6.9.1
---
# Changelog
- [5dda03b](https://github.com/Alfresco/alfresco-ng2-components/commit/5dda03b6022deb3e02e6dfb074286f3b9a4ac403) [MNT-24628] Handle difference between config object ticket and browser storage ticket (#10270)
- [3573df0](https://github.com/Alfresco/alfresco-ng2-components/commit/3573df01ce582db85526c5be15053a3011c1da72) [MNT-24449] Validate ticket on config initialization (#9882)
+1
View File
@@ -46,3 +46,4 @@ The pages linked below contain the audit for all third party dependencies of ADF
- [ADF 6.7.1](audit-info-6.7.1.md)
- [ADF 6.8.0](audit-info-6.8.0.md)
- [ADF 6.9.0](audit-info-6.9.0.md)
- [ADF 6.9.1](audit-info-6.9.1.md)
+44
View File
@@ -0,0 +1,44 @@
---
Title: Audit info, alfresco-ng2-components 6.9.1
---
# Audit information for alfresco-ng2-components 6.9.1
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 10
- Moderate risk: 6
- Low risk: 5
Dependencies analyzed:
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |
|moderate | @babel/runtime | "<7.26.10" |
|moderate | @storybook/builder-manager | "<=8.2.0-beta.3" |
|moderate | @storybook/core-common | "<=0.0.0-pr-28385-sha-9aab3bd7 || 6.5.17-alpha.0 - 8.2.0-beta.3" |
|high | @storybook/core-server | "<=8.2.0-beta.3" |
|moderate | @storybook/telemetry | "<=0.0.0-pr-28385-sha-9aab3bd7 || 6.5.17-alpha.0 - 8.2.0-beta.3" |
|high | body-parser | "<1.20.3" |
|low | brace-expansion | "1.0.0 - 1.1.11 || 2.0.0 - 2.0.1" |
|high | braces | "<3.0.3" |
|low | cookie | "<0.7.0" |
|high | cross-spawn | "7.0.0 - 7.0.4" |
|moderate | esbuild | "<=0.24.2" |
|high | express | "<=4.21.0 || 5.0.0-alpha.1 - 5.0.0" |
|low | formidable | "3.1.1-canary.20211030 - 3.5.2" |
|high | ip | "*" |
|moderate | micromatch | "<4.0.8" |
|high | path-to-regexp | "<=0.1.11" |
|high | pdfjs-dist | "<=4.1.392" |
|high | semver | "7.0.0 - 7.5.1" |
|low | send | "<0.19.0" |
|low | serve-static | "<=1.16.0" |
|high | ws | "7.0.0 - 7.5.9 || 8.0.0 - 8.17.0" |
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@alfresco/adf-cli",
"version": "6.9.0",
"version": "6.9.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@alfresco/adf-cli",
"version": "6.9.0",
"version": "6.9.1",
"license": "Apache-2.0",
"dependencies": {
"@alfresco/js-api": ">=7.7.0",
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-cli",
"description": "Alfresco ADF cli and utils",
"version": "6.9.0",
"version": "6.9.1",
"author": "Hyland Software, Inc. and its affiliates",
"bin": {
"adf-cli": "./bin/adf-cli",
@@ -20,7 +20,7 @@
"dist": "rm -rf ../../dist/libs/cli && npm run build && cp -R ./bin ../../dist/libs/cli && cp -R ./resources ../../dist/libs/cli && cp -R ./templates ../../dist/libs/cli && cp ./package.json ../../dist/libs/cli"
},
"dependencies": {
"@alfresco/js-api": ">=7.8.0",
"@alfresco/js-api": ">=7.8.1",
"commander": "^6.2.1",
"ejs": "^3.1.9",
"license-checker": "^25.0.1",
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-content-services",
"description": "Alfresco ADF content services",
"version": "6.9.0",
"version": "6.9.1",
"author": "Hyland Software, Inc. and its affiliates",
"repository": {
"type": "git",
@@ -21,9 +21,9 @@
"@angular/platform-browser": ">=14.1.3",
"@angular/platform-browser-dynamic": ">=14.1.3",
"@angular/router": ">=14.1.3",
"@alfresco/js-api": ">=7.8.0",
"@alfresco/js-api": ">=7.8.1",
"@ngx-translate/core": ">=14.0.0",
"@alfresco/adf-core": ">=6.9.0"
"@alfresco/adf-core": ">=6.9.1"
},
"keywords": [
"content-services",
+3 -3
View File
@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-core",
"description": "Alfresco ADF core",
"version": "6.9.0",
"version": "6.9.1",
"author": "Hyland Software, Inc. and its affiliates",
"repository": {
"type": "git",
@@ -33,8 +33,8 @@
"@angular/material": ">=14.1.2",
"@angular/router": ">=14.1.3",
"@mat-datetimepicker/core": "^10.1.1",
"@alfresco/js-api": ">=7.8.0",
"@alfresco/adf-extensions": ">=6.9.0",
"@alfresco/js-api": ">=7.8.1",
"@alfresco/adf-extensions": ">=6.9.1",
"@ngx-translate/core": ">=14.0.0",
"minimatch-browser": ">=1.0.0",
"pdfjs-dist": ">=3.3.122"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@alfresco/eslint-plugin-eslint-angular",
"version": "6.9.0",
"version": "6.9.1",
"description": "Alfresco ADF eslint angular custom rules",
"main": "main.js",
"author": "Hyland Software, Inc. and its affiliates",
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-extensions",
"description": "Provides extensibility support for ADF applications.",
"version": "6.9.0",
"version": "6.9.1",
"license": "Apache-2.0",
"author": "Hyland Software, Inc. and its affiliates",
"repository": {
@@ -14,7 +14,7 @@
"peerDependencies": {
"@angular/common": ">=14.1.3",
"@angular/core": ">=14.1.3",
"@alfresco/js-api": ">=7.8.0"
"@alfresco/js-api": ">=7.8.1"
},
"keywords": [
"extensions",
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-insights",
"description": "Alfresco ADF insights",
"version": "6.9.0",
"version": "6.9.1",
"author": "Hyland Software, Inc. and its affiliates",
"repository": {
"type": "git",
@@ -16,7 +16,7 @@
"@angular/core": ">=14.1.3",
"@angular/forms": ">=14.1.3",
"@angular/material": ">=14.1.2",
"@alfresco/adf-core": ">=6.9.0",
"@alfresco/adf-core": ">=6.9.1",
"@ngx-translate/core": ">=14.0.0",
"chart.js": "^4.3.0",
"ng2-charts": "^4.1.1",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@alfresco/js-api",
"version": "7.8.0",
"version": "7.8.1",
"license": "Apache-2.0",
"description": "JavaScript client library for the Alfresco REST API",
"author": "Hyland Software, Inc. and its affiliates",
+55 -1
View File
@@ -68,11 +68,17 @@ export class AlfrescoApi implements Emitter, AlfrescoApiType {
this.storage = Storage.getInstance();
this.storage.setDomainPrefix(config.domainPrefix);
this.initConfig(config);
this.validateTicket(config);
}
private initConfig(config: AlfrescoApiConfig) {
this.config = new AlfrescoApiConfig(config);
this.clientsFactory();
this.errorListeners();
this.ticketMismatchListeners();
if (this.config.oauthInit) {
this.initAuth(config);
@@ -80,8 +86,26 @@ export class AlfrescoApi implements Emitter, AlfrescoApiType {
this.emitBuffer('logged-in');
}
}
}
return config;
private validateTicket(config: AlfrescoApiConfig) {
if (config.ticketEcm && !this.isOauthConfiguration()) {
if (!this.contentAuth) {
this.contentAuth = new ContentAuth(this.config, this, this.httpClient);
}
this.contentAuth
.validateTicket()
.then((ticket) => {
config.ticketEcm = ticket;
})
.catch((error) => {
if (error.status === 401) {
config.ticketEcm = null;
this.initConfig(config);
this.emitBuffer('ticket_invalidated');
}
});
}
}
private initAuth(config: AlfrescoApiConfig): void {
@@ -108,6 +132,10 @@ export class AlfrescoApi implements Emitter, AlfrescoApiType {
this.emitBuffer('logged-in');
});
this.processAuth?.on('ticket_mismatch', (error: any) => {
this.ticketMismatchHandler(error);
});
if (!this.contentAuth) {
this.contentAuth = new ContentAuth(this.config, this, this.httpClient);
} else {
@@ -118,6 +146,10 @@ export class AlfrescoApi implements Emitter, AlfrescoApiType {
this.emitBuffer('logged-in');
});
this.contentAuth?.on('ticket_mismatch', (error: any) => {
this.ticketMismatchHandler(error);
});
this.setAuthenticationClientECMBPM(this.contentAuth.getAuthentication(), this.processAuth.getAuthentication());
}
}
@@ -205,6 +237,19 @@ export class AlfrescoApi implements Emitter, AlfrescoApiType {
});
}
ticketMismatchListeners() {
this.contentClient?.off('ticket_mismatch', () => {});
this.processClient?.off('ticket_mismatch', () => {});
this.contentClient?.on('ticket_mismatch', (error: any) => {
this.ticketMismatchHandler(error);
});
this.processClient?.on('ticket_mismatch', (error: any) => {
this.ticketMismatchHandler(error);
});
}
/**@private? */
errorHandler(error: { status?: number }) {
if (this.config.oauthInit && error.status === 401) {
@@ -214,6 +259,15 @@ export class AlfrescoApi implements Emitter, AlfrescoApiType {
this.emitBuffer('error', error);
}
ticketMismatchHandler(error: { newTicket?: string }) {
if (error.newTicket) {
this.config.ticketEcm = error.newTicket;
this.initConfig(this.config);
}
this.emitBuffer('ticket_mismatch', error);
}
changeWithCredentialsConfig(withCredentials: boolean) {
this.config.withCredentials = withCredentials;
}
+12 -4
View File
@@ -243,10 +243,18 @@ export class AlfrescoApiClient implements ee.Emitter, LegacyHttpClient {
if (ticket) {
return ticketParam + ticket;
} else if (this.config.ticketEcm) {
return ticketParam + this.config.ticketEcm;
} else if (this.storage.getItem('ticket-ECM')) {
return ticketParam + this.storage.getItem('ticket-ECM');
} else {
const ticketConfig = this.config.ticketEcm;
const ticketStorage = this.storage.getItem('ticket-ECM');
if (ticketConfig && ticketStorage && ticketConfig !== ticketStorage) {
this.emit('ticket_mismatch', { newTicket: ticketStorage });
return ticketParam + ticketStorage;
} else if (ticketConfig) {
return ticketParam + ticketConfig;
} else if (ticketStorage) {
return ticketParam + ticketStorage;
}
}
return '';
+53
View File
@@ -40,6 +40,59 @@ describe('Basic configuration test', () => {
'https://testServer.com:1616/strangeContextRoot/api/-default-/public/alfresco/versions/1'
);
});
it('should detect invalid ticket and unset it', (done) => {
const hostEcm = 'https://127.0.0.1:8080';
const authEcmMock = new EcmAuthMock(hostEcm);
const config = {
hostEcm,
authType: 'BASIC',
ticketEcm: 'wrong-ticket'
};
authEcmMock.get401InvalidTicket();
const alfrescoApi = new AlfrescoApi(config);
alfrescoApi.on('ticket_invalidated', () => {
assert.equal(alfrescoApi.config.ticketEcm, null);
done();
});
});
});
describe('ticket mismatch', () => {
it('should update config ticketEcm on ticket_mismatch event', (done) => {
// Tickets
const mockStorageTicket = 'storage-ticket';
const mockConfigTicket = 'config-ticket';
// Create a mock storage
const storageContent = { 'ticket-ECM': mockStorageTicket };
const mockStorage = { getItem: (key: string) => storageContent[key] };
// Initialize AlfrescoApi instance (without ticketEcm to prevent validateTicket from being called at this point)
const alfrescoApi = new AlfrescoApi({ authType: 'BASIC' });
// Initializes configuration and storage
alfrescoApi.config.ticketEcm = mockConfigTicket;
alfrescoApi.contentClient.config.ticketEcm = mockConfigTicket;
alfrescoApi.contentClient.storage = mockStorage as any;
// Ensure alfrescoApi and contentClient have the config ticket
assert.equal(alfrescoApi.config.ticketEcm, mockConfigTicket);
assert.equal(alfrescoApi.contentClient.config.ticketEcm, mockConfigTicket);
alfrescoApi.on('ticket_mismatch', () => {
// As the ticket mismatch event is triggered, the ticketEcm should now be the one from storage
assert.equal(alfrescoApi.config.ticketEcm, mockStorageTicket);
assert.equal(alfrescoApi.contentClient.config.ticketEcm, mockStorageTicket);
done();
});
alfrescoApi.contentClient.getAlfTicket(undefined);
});
});
describe('setconfig parameter ', () => {
+34 -1
View File
@@ -16,7 +16,7 @@
*/
import assert from 'assert';
import { AlfrescoApi, DateAlfresco } from '../src';
import { AlfrescoApi, AlfrescoApiClient, DateAlfresco } from '../src';
import { EcmAuthMock } from './mockObjects';
describe('Alfresco Core API Client', () => {
@@ -76,4 +76,37 @@ describe('Alfresco Core API Client', () => {
assert.equal(equalTime(DateAlfresco.parseDate('2015-11-17T03:33:17+02'), new Date(Date.UTC(2015, 10, 17, 1, 33, 17))), true);
});
});
describe('Alfresco Api Client getAlfTicket', () => {
// Tickets
const alfTicketParam = '&alf_ticket=';
const mockArgTicket = 'arg-ticket';
const mockStorageTicket = 'storage-ticket';
const mockConfigTicket = 'config-ticket';
// Create a mock storage
const storageContent = { 'ticket-ECM': mockStorageTicket };
const mockStorage = { getItem: (key: string) => storageContent[key] };
let alfrescoApiClient: AlfrescoApiClient;
beforeEach(() => {
// Create an instance of AlfrescoApiClient with storage and config
alfrescoApiClient = new AlfrescoApiClient();
alfrescoApiClient.storage = mockStorage as any;
alfrescoApiClient.config = { ticketEcm: mockConfigTicket };
});
it('should return the supplied ticket', () => {
const ticket = alfrescoApiClient.getAlfTicket(mockArgTicket);
const expectedResult = alfTicketParam + mockArgTicket;
assert.equal(ticket, expectedResult);
});
it('should return the ticket from storage', () => {
const ticket = alfrescoApiClient.getAlfTicket(undefined);
const expectedResult = alfTicketParam + mockStorageTicket;
assert.equal(ticket, expectedResult);
});
});
});
@@ -47,6 +47,20 @@ export class EcmAuthMock extends BaseMock {
.reply(200, { entry: { id: returnMockTicket } });
}
get401InvalidTicket(): void {
nock(this.host, { encodedQueryParams: true })
.get('/alfresco/api/-default-/public/authentication/versions/1/tickets/-me-')
.reply(401, {
error: {
errorKey: 'framework.exception.ApiDefault',
statusCode: 401,
briefSummary: '05210059 Authentication failed for Web Script org/alfresco/api/ResourceWebScript.get',
stackTrace: 'For security reasons the stack trace is no longer displayed, but the property is kept for previous versions.',
descriptionURL: 'https://api-explorer.alfresco.com'
}
});
}
get403Response(): void {
nock(this.host, { encodedQueryParams: true })
.post('/alfresco/api/-default-/public/authentication/versions/1/tickets', {
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@alfresco/adf-process-services-cloud",
"version": "6.9.0",
"version": "6.9.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@alfresco/adf-process-services-cloud",
"version": "6.9.0",
"version": "6.9.1",
"license": "Apache-2.0",
"dependencies": {
"@editorjs/code": "2.9.0",
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-process-services-cloud",
"description": "Alfresco ADF process services cloud",
"version": "6.9.0",
"version": "6.9.1",
"author": "Hyland Software, Inc. and its affiliates",
"repository": {
"type": "git",
@@ -34,9 +34,9 @@
"@angular/platform-browser": ">=14.1.3",
"@angular/platform-browser-dynamic": ">=14.1.3",
"@angular/router": ">=14.1.3",
"@alfresco/js-api": ">=7.8.0",
"@alfresco/adf-core": ">=6.9.0",
"@alfresco/adf-content-services": ">=6.9.0",
"@alfresco/js-api": ">=7.8.1",
"@alfresco/adf-core": ">=6.9.1",
"@alfresco/adf-content-services": ">=6.9.1",
"@apollo/client": "^3.7.2",
"@ngx-translate/core": ">=14.0.0",
"apollo-angular": "^4.0.1",
+4 -4
View File
@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-process-services",
"description": "Alfresco ADF process services",
"version": "6.9.0",
"version": "6.9.1",
"author": "Hyland Software, Inc. and its affiliates",
"repository": {
"type": "git",
@@ -21,9 +21,9 @@
"@angular/platform-browser": ">=14.1.3",
"@angular/platform-browser-dynamic": ">=14.1.3",
"@angular/router": ">=14.1.3",
"@alfresco/js-api": ">=7.8.0",
"@alfresco/adf-core": ">=6.9.0",
"@alfresco/adf-content-services": ">=6.9.0",
"@alfresco/js-api": ">=7.8.1",
"@alfresco/adf-core": ">=6.9.1",
"@alfresco/adf-content-services": ">=6.9.1",
"@ngx-translate/core": ">=14.0.0"
},
"keywords": [
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "@alfresco/adf-testing",
"version": "6.9.0",
"version": "6.9.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@alfresco/adf-testing",
"version": "6.9.0",
"version": "6.9.1",
"license": "Apache-2.0",
"peerDependencies": {
"@alfresco/js-api": ">=7.5.0"
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-testing",
"description": "Alfresco ADF testing page and utils",
"version": "6.9.0",
"version": "6.9.1",
"author": "Hyland Software, Inc. and its affiliates",
"repository": {
"type": "git",
@@ -11,7 +11,7 @@
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
},
"peerDependencies": {
"@alfresco/js-api": ">=7.8.0"
"@alfresco/js-api": ">=7.8.1"
},
"keywords": [
"testing",
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "alfresco-ng2-components",
"version": "6.9.0",
"version": "6.9.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "alfresco-ng2-components",
"version": "6.9.0",
"version": "6.9.1",
"license": "Apache-2.0",
"dependencies": {
"@angular/animations": "14.1.3",
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "alfresco-ng2-components",
"commit": "b644b39d17396330d2a67509f58c5b9e890b9b13",
"description": "Alfresco Angular components",
"version": "6.9.0",
"version": "6.9.1",
"author": "Hyland Software, Inc. and its affiliates",
"scripts": {
"prepare": "husky install",