Compare commits

...
84 Commits
Author SHA1 Message Date
Wojciech Duda 0191860950 [AAE-15295] added design tokens to PeopleCloudComponent (#9162) 2023-12-18 14:47:15 +01:00
dependabot[bot] 269dcf1cf1 build(deps-dev): bump lint-staged from 13.2.2 to 15.2.0 (#9156)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 13.2.2 to 15.2.0.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md)
- [Commits](https://github.com/okonet/lint-staged/compare/v13.2.2...v15.2.0)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-17 14:46:23 -05:00
dependabot[bot] 210d6d1388 build(deps-dev): bump eslint-plugin-unicorn from 46.0.0 to 49.0.0 (#9083)
Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 46.0.0 to 49.0.0.
- [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases)
- [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v46.0.0...v49.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-unicorn
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-16 10:52:15 -05:00
Michał Fidor 7c924e0e28 [AAE-19026] Fix app permissions (#9171) 2023-12-15 10:30:04 +01:00
Amedeo Lepore 0932a3ed10 [AAE-18459] Fix invalidateSession is called when auth is not initilized by js-api (#9152)
* [AAE-18459] Replace all placeholders if the configuration key is an object

* [AAE-18459] don't invalidate session if authentication is not handled by js-api
2023-12-14 18:51:10 +00:00
Michał Fidor 1f5af31ad0 [AAE-19026] Fix app permissions (#9169) 2023-12-14 13:43:33 +01:00
Amedeo Lepore 2ca1c75b76 [AAE-19005] Pin 18.18.2 node version (#9167) 2023-12-13 20:27:15 +01:00
Amedeo Lepore 6e848d129b Revert "Revert "build(deps): bump actions/setup-node in /.github/actions/setup (#9125)" (#9165)" (#9166)
This reverts commit ce93a7cc04.
2023-12-13 19:51:46 +01:00
Amedeo Lepore 7121e72f83 Revert "Check js api unit test issue (#9163)" (#9164)
This reverts commit 25418c22cd.
2023-12-13 18:32:37 +00:00
Amedeo Lepore ce93a7cc04 Revert "build(deps): bump actions/setup-node in /.github/actions/setup (#9125)" (#9165)
This reverts commit a87290e11a.
2023-12-13 18:46:04 +01:00
Amedeo Lepore 25418c22cd Check js api unit test issue (#9163)
* Revert "build(deps): bump actions/checkout in /.github/actions/artifact-extract (#9131)"

This reverts commit 3837d19b58.

* Revert "build(deps): bump actions/github-script from 6.4.1 to 7.0.1 (#9127)"

This reverts commit e47b1100d1.

* Revert "build(deps): bump actions/checkout from 3.6.0 to 4.1.1 (#9128)"

This reverts commit da018aadb9.

* Revert "build(deps): bump Alfresco/alfresco-build-tools (#9139)"

This reverts commit f2764d0638.

* Revert "build(deps): bump Alfresco/alfresco-build-tools from 1.36.0 to 5.4.0 (#9138)"

This reverts commit 76eca49985.

* Revert "build(deps): bump actions/setup-node from 3.8.2 to 4.0.0 (#9149)"

This reverts commit 167a5be810.
2023-12-13 17:07:04 +00:00
Michał Fidor 6d4197412f [AAE-18893] Update application by process sequentialusertask (#9160) 2023-12-13 16:06:01 +01:00
Denys Vuika bed9e4b1f8 [MNT-24098] fixes for pdf with HTTP (#9155)
* fixes for pdf with https

* [ci:force] cleanup code

* [ci:force] add missing types

* reduce duplicated code
2023-12-12 15:45:46 +00:00
Tomasz Gnyp 468c32691d [AAE-17666] Remove date cell e2es covered by unit tests (#9153) 2023-12-12 14:41:51 +01:00
dependabot[bot] f5282834bc build(deps): bump Alfresco/alfresco-build-tools (#9151)
Bumps [Alfresco/alfresco-build-tools](https://github.com/alfresco/alfresco-build-tools) from 5.4.0 to 5.6.0.
- [Release notes](https://github.com/alfresco/alfresco-build-tools/releases)
- [Commits](https://github.com/alfresco/alfresco-build-tools/compare/042fc28b3e308e1d1159dfee61bc46c5940ed7b6...b88340ccab0e8f2351eb1e056235f5671cfc5aab)

---
updated-dependencies:
- dependency-name: Alfresco/alfresco-build-tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 12:28:14 +00:00
dependabot[bot] 660837f443 build(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions (#9147)
Bumps [zgosalvez/github-actions-ensure-sha-pinned-actions](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/releases)
- [Commits](https://github.com/zgosalvez/github-actions-ensure-sha-pinned-actions/compare/b35f285b9bb7e80de0967367cee66d3b6d50ceca...b1b635d24259e8a047a6ce7d6501ea432aa7a830)

---
updated-dependencies:
- dependency-name: zgosalvez/github-actions-ensure-sha-pinned-actions
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 10:56:29 +01:00
dependabot[bot] 09cf71bc0b build(deps): bump Alfresco/alfresco-build-tools from 5.4.0 to 5.6.0 (#9148)
Bumps [Alfresco/alfresco-build-tools](https://github.com/alfresco/alfresco-build-tools) from 5.4.0 to 5.6.0.
- [Release notes](https://github.com/alfresco/alfresco-build-tools/releases)
- [Commits](https://github.com/alfresco/alfresco-build-tools/compare/042fc28b3e308e1d1159dfee61bc46c5940ed7b6...b88340ccab0e8f2351eb1e056235f5671cfc5aab)

---
updated-dependencies:
- dependency-name: Alfresco/alfresco-build-tools
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 10:56:13 +01:00
dependabot[bot] 232a09dfd5 build(deps): bump github/codeql-action from 2.22.8 to 2.22.9 (#9150)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.22.8 to 2.22.9.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/407ffafae6a767df3e0230c3df91b6443ae8df75...c0d1daa7f7e14667747d73a7dbbe8c074bc8bfe2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 10:55:59 +01:00
dependabot[bot] 167a5be810 build(deps): bump actions/setup-node from 3.8.2 to 4.0.0 (#9149)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.8.2 to 4.0.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/1a4442cacd436585916779262731d5b162bc6ec7...8f152de45cc393bb48ce5d89d36b731f54556e65)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-11 10:55:44 +01:00
AleksanderSklorz cd33bb6c92 [ACS-6323] dynamic content list changing columns order with drag drop (#9146)
* ACS-6323 Added draggable field to DocumentListPresetRef

* ACS-6323 Allow to dragging column over columns in index range

* ACS-6323 Allow to dragging column over only enabled columns

* ACS-6323 Fixed styles for drag and drop icon for first column

* ACS-6323 Unit tests and function renaming

* ACS-6323 Corrected unit test
2023-12-08 22:54:25 +01:00
MichalKinas 064c1fd216 [MNT-23166] Make tasks and processes lists resizeable (#9145) 2023-12-08 08:47:51 +01:00
swapnil-verma-gl f47fb2a7e9 [ACS-6107] Replaced SearchDateRange component with SearchDateRangeAdvanced Component (#9023)
* [ACS-6107] Removed date range component from ADF content-services

* [ACS-6107] Removed references of date range component in code

* [ACS-6107] Updated documentation to replace occurrences of date range component with date-range-advanced-tabbed component

* [ACS-6107] Renamed DateRangeAdvanced to DateRange. Renamed DateRangeAdvancedTabbed to DateRangeTabbed

* [ACS-6107] Fixed missing export of SearchDateRangeTabbedComponent

* [ACS-6107] Replaced occurrences of date-range-advanced with date-range in HTML and Unit Tests automation ids

* [ACS-6107] Documentation corrections

* [ACS-6107] Reverted unneeded documentation formatting

* [ACS-6107] Reverted unneeded documentation formatting

* [ACS-6107] Reverted unneeded documentation formatting

* [ACS-6107] Migrated unneeded E2E test case to unit test

* [ACS-6107] Removed search-date-range E2E

* [ACS-6107] Resolved PR comments. Removed date-range-filter.page.ts. Removed unused translation keys. Updated documentation to refer proper comment name

* [ACS-6107] Updated documentation for SearchDateRange component to mention the change from original configuration to the newer configuration

* [ACS-6107] Corrected wrong version in documentation

* [ci:force]

* [ACS-6107] Removed unneeded file

* [ACS-6107] Updated unit tests and mock data after rebase

* [ci:force]

* [ACS-6107] Revert unneeded change. Remove unneeded file

* [ci:force]

* [ACS-6107] Updated E2E search config

* [ci:force]

* [ACS-6107] Updated E2E expects after component changes

* [ci:force]
2023-12-06 17:03:43 +05:30
Wojciech Duda 88ab336d05 [AAE-18450] fixed form value not updating instantly on radio change (#9141)
* [AAE-18450] fixed form value not updating instantly on radio change

* [AAE-18450] added tests, removed material references

* [AAE-18450] test enhancements

* [AAE-18450] added label to filter
2023-12-05 18:20:26 +01:00
pkunduGL 8fa37a54a7 [ACS-6031] Minimum width and tooltip added for column header (#9093)
* Minimum width and tooltip added for column header

* updated min width

* Reverted the changes as per review comments
2023-12-05 12:25:44 +05:30
Yasa-Nataliya a3fa0f316b [ADF-5570][ADF-5571]Removed important property from 'toolbar.component.scss' and 'pagination.component.scss' in ADF (#9134)
* [ADF-5570][ADF-5571]Removed the important

* [ci:force]
2023-12-05 09:25:43 +05:30
dependabot[bot] 185ae4e6ba build(deps): bump kamatama41/get-pr-number-action from 0.7.0 to 0.9.1 (#9126)
Bumps [kamatama41/get-pr-number-action](https://github.com/kamatama41/get-pr-number-action) from 0.7.0 to 0.9.1.
- [Release notes](https://github.com/kamatama41/get-pr-number-action/releases)
- [Commits](https://github.com/kamatama41/get-pr-number-action/compare/5c77b38a1b4974ebf8a9521a689f38a5898eadd6...0bcaab5752c0b699149e74667c8ce2f764cbb7fa)

---
updated-dependencies:
- dependency-name: kamatama41/get-pr-number-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 20:24:32 +01:00
dependabot[bot] 4e4aa8f2d4 build(deps): bump actions/checkout (#9122)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/f43a0e5ff2bd294095638e18286ca9a3d1956744...b4ffde65f46336ab88eb53be808477a3936bae11)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 20:24:16 +01:00
dependabot[bot] 3837d19b58 build(deps): bump actions/checkout in /.github/actions/artifact-extract (#9131)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/f43a0e5ff2bd294095638e18286ca9a3d1956744...b4ffde65f46336ab88eb53be808477a3936bae11)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 20:24:01 +01:00
dependabot[bot] e47b1100d1 build(deps): bump actions/github-script from 6.4.1 to 7.0.1 (#9127)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.4.1 to 7.0.1.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/d7906e4ad0b1822421a7e6a35d5ca353c962f410...60a0d83039c74a4aee543508d2ffcb1c3799cdea)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 20:23:45 +01:00
dependabot[bot] a87290e11a build(deps): bump actions/setup-node in /.github/actions/setup (#9125)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3.8.2 to 4.0.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/1a4442cacd436585916779262731d5b162bc6ec7...8f152de45cc393bb48ce5d89d36b731f54556e65)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 20:23:30 +01:00
dependabot[bot] 53ba5d6d04 build(deps): bump actions/github-script (#9121)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.4.1 to 7.0.1.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/d7906e4ad0b1822421a7e6a35d5ca353c962f410...60a0d83039c74a4aee543508d2ffcb1c3799cdea)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 20:07:11 +01:00
dependabot[bot] 91289520de build(deps): bump actions/github-script (#9123)
Bumps [actions/github-script](https://github.com/actions/github-script) from 6.4.1 to 7.0.1.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/d7906e4ad0b1822421a7e6a35d5ca353c962f410...60a0d83039c74a4aee543508d2ffcb1c3799cdea)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 20:06:48 +01:00
dependabot[bot] 7ff8156015 build(deps): bump slackapi/slack-github-action from 1.23.0 to 1.24.0 (#9129)
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 1.23.0 to 1.24.0.
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Commits](https://github.com/slackapi/slack-github-action/compare/007b2c3c751a190b6f0f040e47ed024deaa72844...e28cf165c92ffef168d23c5c9000cffc8a25e117)

---
updated-dependencies:
- dependency-name: slackapi/slack-github-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 20:06:35 +01:00
dependabot[bot] 76eca49985 build(deps): bump Alfresco/alfresco-build-tools from 1.36.0 to 5.4.0 (#9138)
Bumps [Alfresco/alfresco-build-tools](https://github.com/alfresco/alfresco-build-tools) from 1.36.0 to 5.4.0.
- [Release notes](https://github.com/alfresco/alfresco-build-tools/releases)
- [Commits](https://github.com/alfresco/alfresco-build-tools/compare/7b0536b4e403e95365d83695c9ab3119b885ce36...042fc28b3e308e1d1159dfee61bc46c5940ed7b6)

---
updated-dependencies:
- dependency-name: Alfresco/alfresco-build-tools
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 20:06:20 +01:00
dependabot[bot] da018aadb9 build(deps): bump actions/checkout from 3.6.0 to 4.1.1 (#9128)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.1.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.6.0...b4ffde65f46336ab88eb53be808477a3936bae11)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 20:04:59 +01:00
dependabot[bot] f2764d0638 build(deps): bump Alfresco/alfresco-build-tools (#9139)
Bumps [Alfresco/alfresco-build-tools](https://github.com/alfresco/alfresco-build-tools) from 1.29.0 to 5.4.0.
- [Release notes](https://github.com/alfresco/alfresco-build-tools/releases)
- [Commits](https://github.com/alfresco/alfresco-build-tools/compare/d3b4d2e2e08dc33a5d1d60138e9e5989a3dd264c...042fc28b3e308e1d1159dfee61bc46c5940ed7b6)

---
updated-dependencies:
- dependency-name: Alfresco/alfresco-build-tools
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-04 20:04:41 +01:00
Michał Fidor e78bc460de [AAE-17481] Fix mapping for process leave-request (#9140) 2023-12-04 11:22:25 +01:00
Michał Fidor db9c3d4cb4 [AAE-17481] Fix processes for the new tests (#9137) 2023-12-01 16:35:03 +01:00
Michał Fidor e0260d821f [AAE-17475] Fix processes for Call Activities tests (#9136) 2023-12-01 07:44:44 +01:00
DominikIwanek c1ad165ef9 [AAE-18541] - OAuth - redirect does not work (#9135) 2023-11-30 12:20:16 +01:00
Yasa-Nataliya 065829ef01 [ACS-5600] AlfrescoViewerComponent shows the original mimetype (#9095)
* [ACS-5600]Changes for bug

* [ACS-5600]Changes for bug fixes

* [5600]fixed the space

* [ACS-5600] modified the variable name

* [ACS-5600]Implemented the review comments

* [ACS-5600]modified the test cases

* [ACS-5600] modified the test cases

* [ACS-5600]modified the changes

* [ci:force]
2023-11-30 14:36:34 +05:30
Wiktor Danielewski 8a184efc6c [AAE-8556] Convert attach file manual test case to unit test (#9108)
* [AAE-8556] Update attach file dialog service

* [AAE-8556] Update attach file dialog

* [AAE-8556] Align with remarks

* [AAE-8556] Switch to https
2023-11-29 17:40:50 +01:00
DominikIwanek 500c5581f6 [AAE-18541] - OAuth - redirect does not work (#9133) 2023-11-28 17:19:30 +01:00
AleksanderSklorz 7793aba89e [ACS-6252] support disabling the tags and categories feature in the applications (#9106)
* ACS-6252 Added rules field to SearchCategory interface

* ACS-6252 Hide aspects related with tags and categories if tags and categories features  are disabled

* ACS-6252 Return from services information if tags and categories are disabled

* ACS-6252 Unit tests for changes in AspectListDialogComponent

* ACS-6252 Unit tests for changes for AspectListComponent

* ACS-6252 Unit tests for DialogAspectListService

* ACS-6252 Unit tests for changes for TagService and CategoryService

* ACS-6252 Updated documentation for changes

* ACS-6252 Fixed imports formatting

* ACS-6252 Fix after rebasing

* ACS-6252 Addressed PR comments

* ACS-6252 Excluded e2es
2023-11-28 11:41:32 +01:00
Denys Vuika 979bf3ac59 [ACS-6396] cleanup unused CLI code (#9132)
* cleanup unused CLI code

* [ci:force] update CLI readme
2023-11-28 05:20:17 -05:00
Giovanni Fertuso 7300f74add Fix dependabot.yml (#9120)
* Fix Dependabot groups
2023-11-27 15:54:12 +00:00
Maurizio Vitale 38a7dc6cb7 ADF release - Notify correct channel (#9116)
* Notify correct channel

* Use pinned
2023-11-27 12:48:22 +01:00
Denys Vuika 4313869127 [ACS-6370] fix js-api version bump (#9119) 2023-11-27 11:04:38 +00:00
Giovanni Fertuso 3daecb1b1c [AAE-18117] Use SHA for GitHub actions (#9113)
* AAE-18117 - Add pre-checks job

* AAE-18117 - Use pinned SHA

* AAE-18117 - Update dependabot.yml
2023-11-27 10:58:24 +00:00
Denys Vuika 3cf2ffa7bd [AAE-18464] fix bundle check for js-api (#9117) 2023-11-27 10:47:12 +00:00
Denys Vuika 2824b7be50 bump js-api version to 7.4.0 (#9115) 2023-11-27 10:33:48 +00:00
Denys Vuika 3677bfb78e [ACS-6370] switch js-api builds to original node.js (#9114)
* switch js-api builds to original node.js

* [ci:force] cleanup ts configs

* [ci:force] remove temp hotfix for js-api

* remove dead code
2023-11-27 04:54:24 -05:00
Denys Vuika dbe3a7c7db [ACS-6370] temporary pin ADF cli to js-api 7.2.0 (#9112) 2023-11-23 13:29:28 +00:00
Maurizio Vitale 869f0296d0 Trigger a new release (#9111) 2023-11-23 12:05:52 +00:00
Denys Vuika 2a7fd89af0 [PRODENG-211] fix js-api version bump (#9110) 2023-11-23 10:39:34 +00:00
Michał Fidor 6759e2e9bb [AAE-16041] Removing unneeded tests (#9109) 2023-11-23 10:07:03 +01:00
Denys Vuika 3309ea63f6 [PRODENG-211] improved ADF CLI compilation (#9105)
* reduce npm log noise to errors

* remove unused ts config

* improve CLI build config

* use monorepo libs when building CLI

* [ci:force] minor polishing
2023-11-22 13:51:20 +00:00
Denys Vuika e97333aabd [PRODENG-211] reworked version updating (#9104)
* update js-api package metadata

* cleanup

* improve script loop

* cleanup dead code

* Revert "cleanup dead code"

This reverts commit f0de08acf8.

* cleanup dead code

* cleanup

* cleanup dead code

* reduce scripts

* cleanup script

* better naming

* cleanup

* minor fixes

* code improvements and fixes

* minor improvements

* fix js-api upgrades

* reusable version generator

* fix variable overwrite

* reduce code duplication

* fix version generation for build number

* cleanup
2023-11-22 11:33:05 +00:00
Bartosz Sekula aa05fc28b5 [AAE-18175] Unable to Import Descriptor in HXP Environment (#9097) 2023-11-22 10:22:23 +01:00
Denys Vuika 4b3e101586 [PRODENG-211] update npm bundle check (#9103)
* update js-api bundle check

* rework bundle checks
2023-11-21 13:56:00 +00:00
Denys Vuika 8687e86cf6 [PRODENG-211] update js-api deps (#9102)
* update js-api deps

* switch cli to prev version for now

* update lock file for cli
2023-11-21 06:47:43 -05:00
Denys Vuika 8839c9563a bump local js-api to 7.3.0 2023-11-21 10:39:10 +00:00
Denys Vuika ea2c0ce229 [PRODENG-211] integrate JS-API with monorepo (part 1) (#9081)
* integrate JS-API with monorepo

* [ci:force] fix token issue

[ci:force] migrate docs folder

[ci:force] clean personal tokens

* [ci:force] gha workflow support

* [ci:force] npm publish target

* fix js-api test linting

* [ci:force] fix test linting, mocks, https scheme

* [ci:force] fix https scheme

* [ci:force] typescript mappings

* [ci:force] update scripts

* lint fixes

* linting fixes

* fix linting

* [ci:force] linting fixes

* linting fixes

* [ci:force] remove js-api upstream and corresponding scripts

* [ci:force] jsdoc fixes

* fix jsdoc linting

* [ci:force] jsdoc fixes

* [ci:force] jsdoc fixes

* jsdoc fixes

* jsdoc fixes

* jsdoc fixes

* [ci:force] fix jsdoc

* [ci:force] reduce code duplication

* replace 'chai' expect with node.js assert

* replace 'chai' expect with node.js assert

* [ci:force] remove chai and chai-spies for js-api testing

* [ci:force] cleanup and fix imports

* [ci:force] fix linting

* [ci:force] fix unit test

* [ci:force] fix sonar linting findings

* [ci:force] switch activiti api models to interfaces (-2.5% reduction of bundle)

* [ci:force] switch activiti api models to interfaces

* [ci:force] switch AGS api models to interfaces

* [ci:force] switch AGS api models to interfaces

* [ci:force] switch search api models to interfaces

* [ci:force] switch content api models to interfaces where applicable
2023-11-21 05:27:51 -05:00
Michał Fidor 804fa2ffd4 [AAE-17480] update application (#9100) 2023-11-20 16:07:46 +01:00
DominikIwanek d14c116747 [MNT-22836] - support PKCE code flow in SSO (#8884)
* [MNT-22836] - support PKCE code flow in SSO
2023-11-17 15:17:26 +01:00
Denys Vuika eb8aaecef6 [ACS-6328] fix oauth config loading (#9098)
* fix oauth config loading

* remove coma

* fix json schema path

* use auth config constructor

* update json schema

* update json schema

* fix tests
2023-11-17 09:02:19 -05:00
Tomasz Gnyp 001d6ee83d [AAE-17859] Convert manual C309872 to unit test (#9077)
* [AAE-17859] Convert manual C309872 to unit test

* remove second optional message from toBe call
2023-11-17 13:47:52 +01:00
Wiktor Danielewski 606abdb4fd [AAE-17103] Handle icon type (#9012)
* [AAE-17103] Add typeof pipe

* [AAE-17103] Create IconCellComponent

* [AAE-17103] Update tests for IconCellComponent

* [AAE-17103] Small fix for boolean cell tests

* [AAE-17103] Update formatting

* [AAE-17103] Update icon cell

* [AAE-17103] Update tests

* [AAE-17103] Improve boolean cell

* [AAE-17103] Improve icon cell

* [AAE-17103] Update tests

* [AAE-17103] Udate doc about icon type

* [AAE-17103] Switch to inject feature of Angular

* [AAE-17103] Update IconCellComponent

* [AAE-17103] Remove typeof pipe

* [AAE-17103] Add ChangeDetectorRef

* [AAE-17103] Refactor AmoundCell

* [AAE-17103] Small improvement

* [AAE-17103] Update tests structure

* [AAE-17103] Small update
2023-11-17 12:49:00 +01:00
Raviraj Bahirsheth 4af945123b Revert "[ACS-5311] Notification History Bug Fix (#9011)" (#9096)
This reverts commit 94fb61541c.
2023-11-17 06:26:51 -05:00
Amedeo Lepore cf62196fc4 Release 6.5.2 (#9094) 2023-11-16 13:25:14 +01:00
Amedeo Lepore 22d3179a55 Revert "[AAE-18105] Fix release workflow: release-npm step doesn't publish al…" (#9092)
* Revert "[AAE-18105] Fix release workflow: release-npm step doesn't publish all the  packages (#9091)"

This reverts commit 17323b0abb.

* Fix release workflow: publish always all the libs until we don't handle partial release
2023-11-15 16:46:25 +00:00
Amedeo Lepore 17323b0abb [AAE-18105] Fix release workflow: release-npm step doesn't publish all the packages (#9091) 2023-11-15 16:56:14 +01:00
MichalKinas 81787d5202 [MNT-23166] Add resize flag to document list with option to disable blur (#9090)
* [MNT-23166] Add resize flag to document list with option to disable blur

* [MNT-23166] Missing docs and CR fixes

* [MNT-23166] Lint fixes

* [MNT-23166] Lint fixes

* [MNT-23166] Lint fixes
2023-11-15 14:51:38 +01:00
Amedeo Lepore e5ca7d2069 [AAE-18057] Fix token is not refreshed after silent-refresh is called. Get another token from the auth server. (#9089) 2023-11-15 11:28:05 +00:00
AleksanderSklorz 6787ef4582 [ACS-6225] Removed extra gray area around share link dialog (#9086) 2023-11-14 12:45:13 +01:00
AleksanderSklorz 6988c1f458 [ACS-6067] viewer thumbnails not refresh on file change (#9075)
* ACS-6067 Update thumbnails when file is changed

* ACS-6067 Added unit tests

* ACS-6067 Removed redundant line
2023-11-14 12:44:48 +01:00
MichalKinas 15fdbc7e29 [ACS-4794] ES query migration changes (#8773)
* [ACS-4794] ES query migration changes

* [ACS-4974] Remove * from path as it causes exception

* [ACS-4974] Apply PATH workarounds for PNAME and ANAME

* [ACS-4974] Add custom query to autocomplete options filter

* [ACS-4974] Correct username
2023-11-14 08:23:55 +01:00
Amedeo Lepore e2c116c25a Release 6.5.1 (#9082) 2023-11-13 10:19:15 +01:00
Amedeo Lepore f2df3c4143 [AAE-17909][AAE-17964] fix silent-refresh url is not set with the value - fix background image set to undefined (#9080)
* [AAE-17909] fix silent-refresh url is not set with the value from the app.config.json

* [AAE-17964] fix backgroundImage is undefined, set a default value
2023-11-10 14:19:59 +00:00
Wiktor Danielewski 168bb0b6ca [AAE-17258] Update storybook for datatable and datacolumn (#9052)
* [AAE-17258] Datatable storybook - add boolean type

* [AAE-17258] Datatable storybook - Repair location column

* [AAE-17258] Update location column - storybook

* [AAE-17258] Add boolean column and update data mapping - storybook

* [AAE-17258] Add some comments

* [AAE-17258] Storybook - add image column

* [AAE-17258] Add missing props for DataColumn

* [AAE-17258] Update storybook over the amount column type

* [AAE-17258] Add number column to the Storybook

* [AAE-17258] Storybook simplify json column

* [AAE-17258] Stroybook DataColum refactor

* [AAE-17258] Storybook DataColumn refactor

* [AAE-17258] Update DataColumn with date type

* [AAE-17258] Update Datatable over timeAgo column - Storybook

* [AAE-17258] Small changes

* [AAE-17258] Storybook - simplify DataColumn stories and allow for row updates
2023-11-09 14:17:08 +01:00
Tomasz Gnyp c0194029c7 [AAE-17865] Remove few already covered e2es from ADF (#9078) 2023-11-09 04:44:43 -05:00
Maurizio Vitale 625cf2b85a [ADF-5561] Remove unused dep (#9064) 2023-11-09 04:32:41 -05:00
dependabot[bot] 622cf8bdee build(deps): bump apollo-angular from 4.2.1 to 5.0.2 (#9041)
Bumps [apollo-angular](https://github.com/kamilkisiela/apollo-angular/tree/HEAD/packages/apollo-angular) from 4.2.1 to 5.0.2.
- [Release notes](https://github.com/kamilkisiela/apollo-angular/releases)
- [Changelog](https://github.com/kamilkisiela/apollo-angular/blob/master/packages/apollo-angular/CHANGELOG.md)
- [Commits](https://github.com/kamilkisiela/apollo-angular/commits/apollo-angular@5.0.2/packages/apollo-angular)

---
updated-dependencies:
- dependency-name: apollo-angular
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-11-09 04:25:30 -05:00
Denys Vuika f0a11fdab0 [ACS-6140] migrate tests to harness (#9071)
* migrate aspect list tests to harness

* [ci:force] categories management

* [ci:force] fix keyboard handling

* [ci:force] fix memory leak

* migrate document list

* migrate new version uploader dialog

* migrate folder dialog

* bug fixes for keyboard, remove fake unit tests

* [ci:force] migrate and cleanup notification tests

* migrate app details cloud

* migrate app list cloud

* migrate group cloud component

* [ci:force] cleanup code based on reviews

* [ci:force] migrate people cloud

* [ci:force] migrate process list cloud

* [ci:force] migrate start process cloud

* [ci:force] task form cloud

* [ci:force] service task list cloud

* [ci:force] task list cloud

* [ci:force] process attachment list and apps list

* [ci:force] code review changes

* [ci:force] app list bug fixes and code cleanup

* [ci:force] fix incorrect/missing typings, fix tests

* [ci:force] code cleanup
2023-11-09 04:24:56 -05:00
1590 changed files with 89415 additions and 7223 deletions
+11
View File
@@ -0,0 +1,11 @@
.angular
nxcache
node_modules
dist
coverage
.github
.vscode
scripts
/angular.json
docs/**/*.md
lib/js-api/docs/**/*.md
-188
View File
@@ -1,188 +0,0 @@
module.exports = {
root: true,
ignorePatterns: [
'projects/**/*',
'**/node_modules/**/*',
'lib/cli/node_modules/**/*',
'**/node_modules',
'**/docker',
'**/assets',
'**/scripts',
'**/docs'
],
plugins: ['@nrwl/nx'],
overrides: [
{
files: ['*.ts'],
parserOptions: {
project: ['tsconfig.json', 'e2e/tsconfig.e2e.json'],
createDefaultProgram: true
},
extends: [
'plugin:@nrwl/nx/typescript',
'plugin:@nrwl/nx/angular',
'plugin:@cspell/recommended',
'plugin:@angular-eslint/ng-cli-compat',
'plugin:@angular-eslint/ng-cli-compat--formatting-add-on',
'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',
'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-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.',
' */'
]
]
}
},
{
files: ['*.html'],
extends: ['plugin:@angular-eslint/template/recommended'],
rules: {}
}
]
};
+3 -3
View File
@@ -22,13 +22,13 @@ runs:
- run: echo "Artifact Append"
shell: bash
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: ${{ inputs.artifact-name }}
- run: ls
shell: bash
- name: Append content
uses: actions/github-script@v6
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
env:
contentFile: ${{ inputs.content }}
fileName: ${{ inputs.file-name }}
@@ -83,7 +83,7 @@ runs:
}
}
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: ${{ inputs.artifact-name }}
path: ${{ inputs.file-name }}
+2 -2
View File
@@ -24,11 +24,11 @@ runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: echo "Artifact Extract"
shell: bash
- name: Download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
with:
name: ${{ inputs.artifact-name }}
- id: extract
@@ -19,14 +19,14 @@ runs:
using: "composite"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Create empty artifact
shell: bash
run:
echo "${{inputs.content}}" > ${{ inputs.file-name }}
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: ${{ inputs.artifact-name }}
path: ${{ inputs.file-name }}
+3 -2
View File
@@ -60,8 +60,9 @@ runs:
echo "Setting up CI flags for Push develop patch"
else
echo "Setting up CI flags for Push on develop branch"
base=$(git describe --tags $(git rev-list --tags --max-count=1))
echo "NX_CALCULATION_FLAGS=--base=$base --head=$HEAD_HASH" >> $GITHUB_ENV
# base=$(git describe --tags $(git rev-list --tags --max-count=1))
# we publish always all the libs until we don't handle partial release
echo "NX_CALCULATION_FLAGS=--all" >> $GITHUB_ENV
fi
echo "BREAK_ACTION=true" >> $GITHUB_ENV
+1 -1
View File
@@ -184,7 +184,7 @@ runs:
- name: upload artifacts on gh
id: upload_gh
if: ${{ steps.determine-affected.outputs.isAffected == 'true' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: e2e-artifact-output
path: /home/runner/work/alfresco-ng2-components/alfresco-ng2-components/e2e-output-*
+3 -5
View File
@@ -20,9 +20,7 @@ runs:
id: sha_out
run: |
if [[ -z $TAG_NPM ]]; then
echo "TAG_NPM not set, aborting"
exit 1
echo "TAG_NPM not set, aborting"
exit 1
fi
ADF_VERSION=$(npm view @alfresco/adf-core@${TAG_NPM} version)
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
+4 -4
View File
@@ -20,18 +20,18 @@ runs:
using: "composite"
steps:
- name: install NPM
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version-file: '.nvmrc'
cache-dependency-path: package-lock.json
- name: get latest tag sha
id: tag-sha
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@v1.29.0
uses: Alfresco/alfresco-build-tools/.github/actions/git-latest-tag@b88340ccab0e8f2351eb1e056235f5671cfc5aab # v5.6.0
# CACHE
- name: Node Modules cache
id: node-modules-cache
if: ${{ inputs.enable-node-modules-cache == 'true' }}
uses: actions/cache@v3
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
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@v3
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
if: ${{ inputs.enable-cache == 'true' }}
with:
path: ~/.cache/pip
+1 -1
View File
@@ -18,7 +18,7 @@ runs:
steps:
- name: Append group
id: group
uses: actions/github-script@v6
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
env:
affectedLib: ${{ inputs.affected }}
with:
+86 -25
View File
@@ -1,31 +1,92 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
time: "07:00"
open-pull-requests-limit: 5
target-branch: develop
groups:
- label: "Angular Updates"
packages:
- package-ecosystem: npm
directory: "/"
schedule:
interval: "weekly"
day: "sunday"
time: "07:00"
open-pull-requests-limit: 5
target-branch: develop
groups:
angular:
patterns:
- "@angular/*"
version: "widen"
- label: "Angular-devkit Updates"
packages:
angular-devkit:
patterns:
- "@angular-devkit/*"
version: "widen"
- label: "ngrx Updates"
packages:
ngrx:
patterns:
- "@ngrx/*"
version: "widen"
- label: "nrwl Updates"
packages:
nrwl:
patterns:
- "@nrwl/*"
version: "widen"
ignore:
- dependency-name: "pdfjs-dist"
- dependency-name: "@types/*"
- dependency-name: "typescript"
ignore:
- dependency-name: "pdfjs-dist"
- dependency-name: "@types/*"
- dependency-name: "typescript"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/artifact-append"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/artifact-extract"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/.github/actions/artifact-initialize"
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/e2e"
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/setup-chrome"
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"
+4 -4
View File
@@ -22,7 +22,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
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@v2
uses: github/codeql-action/init@c0d1daa7f7e14667747d73a7dbbe8c074bc8bfe2 # v2.22.9
# 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@v2
uses: github/codeql-action/autobuild@c0d1daa7f7e14667747d73a7dbbe8c074bc8bfe2 # v2.22.9
# ️ 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@v2
uses: github/codeql-action/analyze@c0d1daa7f7e14667747d73a7dbbe8c074bc8bfe2 # v2.22.9
+1 -1
View File
@@ -73,7 +73,7 @@ jobs:
runs-on: ubuntu-latest
name: Initialize artifacts
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- 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@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: set-dryrun
uses: ./.github/actions/enable-dryrun
with:
dry-run-flag: ${{ inputs.dry-run-flag }}
- name: install NPM
uses: actions/setup-node@v3
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version-file: '.nvmrc'
- name: "Release tag"
+1 -1
View File
@@ -9,7 +9,7 @@ jobs:
if: github.event.registry_package.package_type == 'npm' && github.event.registry_package.name == 'adf-core'
steps:
- name: Dispatch event to monorepo
uses: actions/github-script@v6
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.PAT_WRITE_PKG }}
retries: 3
+28 -23
View File
@@ -94,11 +94,14 @@ env:
PROXY_HOST_ECM: ${{ secrets.E2E_HOST }}
jobs:
check-package-lock:
pre-checks:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Ensure SHA pinned actions
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@b1b635d24259e8a047a6ce7d6501ea432aa7a830 # v3.0.2
- name: Check package-lock.json version
run: |
@@ -113,15 +116,15 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Get branch name
uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.36.0
uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@b88340ccab0e8f2351eb1e056235f5671cfc5aab # v5.6.0
- name: Save commit message
uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@v1.36.0
uses: Alfresco/alfresco-build-tools/.github/actions/get-commit-message@b88340ccab0e8f2351eb1e056235f5671cfc5aab # v5.6.0
- name: ci:force flag parser
shell: bash
@@ -136,7 +139,7 @@ jobs:
- name: Get PR number
if: ${{ github.event_name != 'schedule' }}
uses: kamatama41/get-pr-number-action@5c77b38a1b4974ebf8a9521a689f38a5898eadd6
uses: kamatama41/get-pr-number-action@0bcaab5752c0b699149e74667c8ce2f764cbb7fa # v0.9.1
id: action
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -193,10 +196,10 @@ jobs:
timeout-minutes: 30
name: "Setup"
runs-on: ubuntu-22.04
needs: [check-if-pr-is-approved, check-package-lock]
needs: [check-if-pr-is-approved, pre-checks]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
@@ -218,19 +221,21 @@ jobs:
# 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"
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"
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"
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"
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"
exclude: "insights,core,extensions,content-services,process-services,eslint-plugin-eslint-angular,js-api"
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
@@ -247,7 +252,7 @@ jobs:
needs: [setup]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
@@ -262,7 +267,7 @@ jobs:
needs: [setup]
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0 # Fetch all history for all tags and branches
- uses: ./.github/actions/setup
@@ -279,7 +284,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0 # Fetch all history for all
- uses: ./.github/actions/setup
@@ -422,7 +427,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0 # Fetch all history for all
- uses: ./.github/actions/setup
@@ -452,12 +457,12 @@ jobs:
steps:
- id: checkoutRepo
name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 1
- name: PR contains forbidden labels
id: pr-forbidden
uses: actions/github-script@v6
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const issueHasLabels = require('./scripts/github/update/check-issue-has-label.js');
@@ -477,9 +482,9 @@ jobs:
if: ${{ always() }}
runs-on: ubuntu-latest
name: Final Results
needs: [check-if-pr-is-approved, check-package-lock, setup, unit-tests, lint, build-libs, e2e, e2e-storybook]
needs: [check-if-pr-is-approved, pre-checks, setup, unit-tests, lint, build-libs, e2e, e2e-storybook]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Log e2e result
id: e2e-result
if: ${{ github.event_name == 'schedule' }}
@@ -493,7 +498,7 @@ jobs:
uses: ./.github/actions/slack-group-area
with:
affected: ${{ steps.e2e-result.outputs.result }}
- uses: slackapi/slack-github-action@v1.23.0
- uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.0
name: Nofify QA failure
if: ${{ github.event_name == 'schedule' && contains(needs.*.result, 'failure') }}
env:
+2 -2
View File
@@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the latest code
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/rebase@1.8
uses: cirrus-actions/rebase@b87d48154a87a85666003575337e27b8cd65f691 # 1.8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+6 -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@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -110,7 +110,7 @@ jobs:
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -125,10 +125,10 @@ jobs:
- name: build libraries
run: |
set -u;
./scripts/update-version.sh -gnu -nextalpha|| exit 1;
./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@v3
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
name: release libraries GH registry
with:
node-version-file: '.nvmrc'
@@ -137,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@v3
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
name: release libraries Npm registry
with:
node-version-file: '.nvmrc'
@@ -153,5 +153,5 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/npm-check-bundle
+11 -11
View File
@@ -88,7 +88,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -109,7 +109,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 1
- run: git fetch --all
@@ -135,7 +135,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 1
- run: git fetch --all
@@ -165,7 +165,7 @@ jobs:
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- uses: ./.github/actions/setup
@@ -183,7 +183,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@v3
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
name: release libraries GH registry
with:
node-version-file: '.nvmrc'
@@ -192,7 +192,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@v3
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
name: release libraries Npm registry
with:
node-version-file: '.nvmrc'
@@ -209,7 +209,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/npm-check-bundle
finalize:
@@ -219,11 +219,11 @@ jobs:
needs: [release-demoshell, release-storybook, release-npm, npm-check-bundle]
steps:
- uses: slackapi/slack-github-action@v1.23.0
name: Nofify FE hxp-front-end-apps workflow failed
- uses: slackapi/slack-github-action@e28cf165c92ffef168d23c5c9000cffc8a25e117 # v1.24.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: 'C04N93XU491' #hxp-front-end-apps
slack-message: "🔴 Warning: The release workflow of alfresco-ng2-components pipe failed\n Author: name:${{ github.event.pusher.name }}\n Workflow run : <https://github.com/Alfresco/alfresco-ng2-components/actions/runs/${{ github.run_id }}| here>\n>"
channel-id: 'C016SMNNL8L' #eng-guild-front-end
slack-message: "🔴 Warning: The release workflow of alfresco-ng2-components pipe failed\n Author: name:${{ github.event.pusher.name }} username:${{ github.event.pusher.username }}\n Workflow run : <https://github.com/Alfresco/alfresco-ng2-components/actions/runs/${{ github.run_id }}| here>\n>"
-214
View File
@@ -1,214 +0,0 @@
name: Upstream js
on:
schedule:
- cron: '0 */3 * * *' # “At minute 0 past every 3rd hour.”
workflow_dispatch:
inputs:
tag_version:
description: image tag
type: choice
required: true
options:
- alpha
- latest
default: alpha
jobs:
upstream:
runs-on: ubuntu-latest
outputs:
hasAtLeastOneNewVersion: ${{ steps.fetchLatestPkg.outputs.hasAtLeastOneNewVersion }}
hasNewVersionAvailableJS: ${{ steps.fetchLatestPkg.outputs.hasVersionNewJS }}
latestVersionAvailableJS: ${{ steps.fetchLatestPkg.outputs.latestVersionJS }}
hasAtLeastOneNewVersionWithoutPR: ${{ steps.checkPrAlreadyExist.outputs.hasAtLeastOneNewVersionWithoutPR }}
steps:
- id: checkoutRepo
name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- id: fetchLatestPkg
name: Fetch the latest package version
uses: actions/github-script@v6
env:
TAG_VERSION: ${{ inputs.tag_version }}
with:
github-token: ${{ secrets.PAT_WRITE_PKG }}
script: |
const tagVersion = process.env.TAG_VERSION;
console.log('tagVersion:',tagVersion);
const getLatestVersionOf = require('./scripts/github/update/latest-version-of.js');
const { hasVersionNew: hasVersionNewJS, latestVersion: latestVersionJS } = await getLatestVersionOf({github, context, dependencyName: 'js-api', tagVersion});
console.log('hasVersionNewJS', hasVersionNewJS)
console.log('latestVersionJS', latestVersionJS)
if (hasVersionNewJS === 'true' ) {
core.setOutput('hasAtLeastOneNewVersion', 'true');
core.setOutput('hasVersionNewJS', 'true');
core.setOutput('latestVersionJS', latestVersionJS);
} else {
core.setOutput('hasAtLeastOneNewVersion', 'false');
console.log('No new version available, skipping upstream!')
}
- name: Check value after
run: |
echo "The value hasAtLeastOneNewVersion is: ${{ steps.fetchLatestPkg.outputs.hasAtLeastOneNewVersion }}"
echo "The value hasVersionNewJS is: ${{ steps.fetchLatestPkg.outputs.hasVersionNewJS }}"
echo "The value latestVersionJS is: ${{ steps.fetchLatestPkg.outputs.latestVersionJS }}"
- id: checkPrAlreadyExist
name: Check PR with latest already exist
if: ${{ steps.fetchLatestPkg.outputs.hasAtLeastOneNewVersion == 'true' }}
uses: actions/github-script@v6
env:
HAS_NEW_JS_VERSION: ${{ steps.fetchLatestPkg.outputs.hasVersionNewJS }}
LATEST_JS_VERSION: ${{ steps.fetchLatestPkg.outputs.latestVersionJS }}
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
script: |
const hasVersionNewJS = process.env.HAS_NEW_JS_VERSION;
const latestVersionJS = process.env.LATEST_JS_VERSION;
const checkPRAlreadyExist = require('./scripts/github/update/check-pr-already-exist.js');
let isPRWithLatestJSAlreadyAvailable = false;
if (hasVersionNewJS === 'true') {
isPRWithLatestJSAlreadyAvailable = await checkPRAlreadyExist({github, context, version: latestVersionJS});
console.log('isPRWithLatestJSAlreadyAvailable', isPRWithLatestJSAlreadyAvailable);
}
if (isPRWithLatestJSAlreadyAvailable) {
console.log('Warning: Upstream PR already exist, stop the migration execution!');
core.setOutput('hasAtLeastOneNewVersionWithoutPR', 'false');
} else {
core.setOutput('hasAtLeastOneNewVersionWithoutPR', 'true');
}
migrate:
if: ${{ needs.upstream.outputs.hasAtLeastOneNewVersionWithoutPR == 'true' }}
runs-on: ubuntu-latest
needs: upstream
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
fetch-depth: 1
- name: setup NPM
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache-dependency-path: package-lock.json
- name: "General :: dbpci-install"
run: |
npm ci --ignore-scripts
- name: Migration
shell: bash
env:
IS_JS_AFFECTED: ${{ needs.upstream.outputs.hasNewVersionAvailableJS }}
PACKAGE_VERSION_JS: ${{ needs.upstream.outputs.latestVersionAvailableJS }}
BRANCH_TO_CREATE: "upstream-dependencies"
run: |
migrateDependenciesJS() {
echo "Update JS dependencies to: ${PACKAGE_VERSION_JS}"
echo "Calling migration JS"
npx nx migrate @alfresco/js-api@${PACKAGE_VERSION_JS}
echo "Migration JS done"
}
migrateLibDependenciesJS() {
eval projects=( "cli"
"core"
"content-services"
"process-services"
"process-services-cloud"
"insights"
"testing"
"extensions" )
projectslength=${#projects[@]}
for (( i=0; i<${projectslength}; i++ ));
do
echo "Update JS dependencies in adf-${projects[$i]} to: ${PACKAGE_VERSION_JS}"
DESTDIR="lib/${projects[$i]}"
sed -i "${sedi[@]}" "s/\"@alfresco\/js-api\": \".*\"/\"@alfresco\/js-api\": \">=${PACKAGE_VERSION_JS}\"/g" ${DESTDIR}/package.json
done
}
regeneratePackageLock() {
echo "Regenerate lock"
npm i --package-lock-only
echo "Package-lock done."
}
if git checkout ${BRANCH_TO_CREATE} 2>/dev/null ; then
git reset --hard origin/develop
echo "Reset branch"
fi
if [[ "$IS_JS_AFFECTED" == "true" ]]; then
migrateDependenciesJS
migrateLibDependenciesJS
fi
regeneratePackageLock
- name: Commit Code
if: ${{ needs.upstream.outputs.hasAtLeastOneNewVersion == 'true' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[ci:force][auto-commit] Update dependencies JS:${{ needs.upstream.outputs.latestVersionAvailableJS }}"
branch: upstream-dependencies
push_options: '--force'
create_branch: true
- name: Create a Pull request
uses: actions/github-script@v6
env:
PACKAGE_VERSION_JS: ${{ needs.upstream.outputs.latestVersionAvailableJS }}
with:
github-token: ${{ secrets.BOT_GITHUB_TOKEN }}
script: |
const { PACKAGE_VERSION_JS } = process.env
const BRANCH_TO_CREATE = 'upstream-dependencies';
const { data: prs } = await github.rest.pulls.list({
owner: context.repo.owner,
repo: context.repo.repo,
state: 'open',
head: `${context.repo.owner}:${BRANCH_TO_CREATE}`,
base: 'develop'
});
if (prs.length < 1) {
const payloadPullRequest = {
owner: context.repo.owner,
repo: context.repo.repo,
title: `GH Auto: Upstream dependencies JS-API:${PACKAGE_VERSION_JS}`,
head: `${context.repo.owner}:${BRANCH_TO_CREATE}`,
base: 'develop',
body: `Automatic PR`
};
console.log('Payload: ',payloadPullRequest);
const { data: pr } = await github.rest.pulls.create(payloadPullRequest);
return pr.number;
} else {
const upstreamPrOpen = prs[0];
// override the title to contains the latest js dep number
const payloadUpdatePullRequest = {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: upstreamPrOpen.number,
title: `GH Auto: Upstream dependencies JS-API:${PACKAGE_VERSION_JS}`,
};
await github.rest.pulls.update(payloadUpdatePullRequest);
return upstreamPrOpen.number;
}
console.log(`Trigger a dispatch event for the monorepo`);
+1 -1
View File
@@ -1 +1 @@
18
18.18.2
+49 -3
View File
@@ -238,6 +238,52 @@
}
}
},
"js-api": {
"projectType": "library",
"root": "lib/js-api/src",
"sourceRoot": "lib/js-api/src",
"architect": {
"build": {
"builder": "nx:run-commands",
"options": {
"command": "npm run js_api_build"
},
"configurations": {
"production": {}
},
"defaultConfiguration": "production"
},
"test": {
"executor": "nx:run-commands",
"options": {
"commands": ["TS_NODE_PROJECT=lib/js-api/test/tsconfig.json mocha --full-trace --config lib/js-api/.mocharc.json"]
}
},
"lint": {
"builder": "@nrwl/linter:eslint",
"options": {
"lintFilePatterns": [
"lib/js-api/**/*.ts"
]
}
},
"npm-publish": {
"executor": "nx:run-commands",
"dependsOn": [
"build"
],
"options": {
"cwd": "dist/libs/js-api",
"commands": [
{
"command": "npm publish --tag {args.tag}",
"forwardAllArgs": true
}
]
}
}
}
},
"core": {
"projectType": "library",
"root": "lib/core",
@@ -1021,11 +1067,11 @@
"build": {
"builder": "nx:run-commands",
"options": {
"command":
"cd lib/cli && npm i && npm run dist",
"command": "cd lib/cli && npm run dist",
"stylePreprocessorOptions": {
"includePaths": [
"lib", "lib/core/src/lib"
"lib",
"lib/core/src/lib"
]
}
},
+1 -1
View File
@@ -1,5 +1,5 @@
{
"version": "0.1",
"version": "0.2",
"language": "en",
"words": [
"activiti",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "Alfresco-ADF-Angular-Demo",
"description": "Demo shell for Alfresco Angular components",
"version": "6.5.0",
"version": "6.5.2",
"author": "Hyland Software, Inc. and its affiliates",
"repository": {
"type": "git",
+9 -19
View File
@@ -1,5 +1,5 @@
{
"$schema": "../../lib/core/src/lib/app-config/schema.json",
"$schema": "../../lib/core/src/lib/app-config/app.config.schema.json",
"ecmHost": "{protocol}//{hostname}{:port}",
"bpmHost": "{protocol}//{hostname}{:port}",
"identityHost": "{protocol}//{hostname}{:port}/auth/admin/realms/alfresco",
@@ -20,7 +20,8 @@
"clientId": "alfresco",
"scope": "openid profile email",
"secret": "",
"implicitFlow": true,
"implicitFlow": false,
"codeFlow": true,
"silentLogin": true,
"redirectSilentIframeUri": "{protocol}//{hostname}{:port}/assets/silent-refresh.html",
"redirectUri": "/",
@@ -309,25 +310,12 @@
}
}
},
{
"id": "createdDateRange",
"name": "Created Date (range)",
"enabled": true,
"component": {
"selector": "date-range",
"settings": {
"field": "cm:created",
"dateFormat": "DD-MMM-YY",
"maxDate": "today"
}
}
},
{
"id": "createdModifiedDateRange",
"name": "Date",
"enabled": true,
"component": {
"selector": "date-range-advanced",
"selector": "date-range",
"settings": {
"dateFormat": "dd-MMM-yy",
"maxDate": "today",
@@ -745,15 +733,17 @@
{
"id": "createdDateRange",
"name": "SEARCH.SEARCH_HEADER.FILTERS.DATE.TITLE",
"columnKey": "createdAt",
"enabled": true,
"component": {
"selector": "date-range",
"settings": {
"allowUpdateOnChange": false,
"dateFormat": "dd-MMM-yy",
"maxDate": "today",
"field": "cm:created",
"dateFormat": "DD-MMM-YY",
"maxDate": "today"
"displayedLabelsByField": {
"cm:created": "Created Date"
}
}
}
}
@@ -183,7 +183,7 @@
key="createdAt"
sortingKey="createdAt"
type="date"
[format]="enableMediumTimeFormat ? 'medium' : 'timeAgo'"
[format]="'timeAgo'"
class="adf-ellipsis-cell">
</data-column>
@@ -330,12 +330,6 @@
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle [(ngModel)]="enableMediumTimeFormat" id="enableMediumTimeFormat">
Enable medium time format for document list
</mat-slide-toggle>
</section>
<section>
<mat-slide-toggle [(ngModel)]="displayEmptyMetadata" id="displayEmptyMetadata">
Display Empty Metadata
@@ -185,7 +185,6 @@ export class FilesComponent implements OnInit, OnChanges, OnDestroy {
permissionsStyle: PermissionStyleModel[] = [];
stickyHeader: boolean;
enableMediumTimeFormat = false;
displayEmptyMetadata = false;
constructor(
@@ -33,6 +33,11 @@ if [ -n "${APP_CONFIG_OAUTH2_IMPLICIT_FLOW}" ]; then
-i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
fi
if [ -n "${APP_CONFIG_OAUTH2_CODE_FLOW}" ]; then
sed -e "s/\"codeFlow\": [^,]*/\"codeFlow\": ${APP_CONFIG_OAUTH2_CODE_FLOW}/g" \
-i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
fi
if [ -n "${APP_CONFIG_OAUTH2_SILENT_LOGIN}" ]; then
sed -e "s/\"silentLogin\": [^,]*/\"silentLogin\": ${APP_CONFIG_OAUTH2_SILENT_LOGIN}/g" \
-i "${NGINX_ENVSUBST_OUTPUT_DIR}/app.config.json"
+1
View File
@@ -14,6 +14,7 @@ docker run --rm -it \
--env APP_CONFIG_OAUTH2_HOST=$APP_CONFIG_OAUTH2_HOST \
--env APP_CONFIG_OAUTH2_CLIENTID=$APP_CONFIG_OAUTH2_CLIENTID \
--env APP_CONFIG_OAUTH2_IMPLICIT_FLOW=$APP_CONFIG_OAUTH2_IMPLICIT_FLOW \
--env APP_CONFIG_OAUTH2_IMPLICIT_FLOW=$APP_CONFIG_OAUTH2_CODE_FLOW \
--env APP_CONFIG_OAUTH2_SILENT_LOGIN=$APP_CONFIG_OAUTH2_SILENT_LOGIN \
--env APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI=$APP_CONFIG_OAUTH2_REDIRECT_SILENT_IFRAME_URI \
--env APP_CONFIG_BPM_HOST=$APP_CONFIG_BPM_HOST \
+2 -3
View File
@@ -290,10 +290,9 @@ for more information about installing and using the source code.
| [Search Chip Input Component](content-services/components/search-chip-input.component.md) | Displays input for providing phrases display as "chips". | [Source](../lib/content-services/src/lib/search/components/search-chip-input/search-chip-input.component.ts) |
| [Search Chip Autocomplete Input component](content-services/components/search-chip-autocomplete-input.component.md) | Displays an input with autocomplete options. | [Source](../lib/content-services/src/lib/search/components/search-chip-autocomplete-input/search-chip-autocomplete-input.component.ts) |
| [Search Chip List Component](content-services/components/search-chip-list.component.md) | Displays search criteria as a set of "chips". | [Source](../lib/content-services/src/lib/search/components/search-chip-list/search-chip-list.component.ts) |
| [Search Date Range Advanced Component](content-services/components/search-date-range-advanced.component.md) | Displays a UI to configure different kinds of search criteria around date. Options are 'Anyytime', 'In the last' and 'Between' | [Source](../lib/content-services/src/lib/search/components/search-date-range-advanced-tabbed/search-date-range-advanced/search-date-range-advanced.component.ts) |
| [Search control component](content-services/components/search-control.component.md) | Displays a input text that shows find-as-you-type suggestions. | [Source](../lib/content-services/src/lib/search/components/search-control.component.ts) |
| [Search date range component](content-services/components/search-date-range.component.md) | Implements a search widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-date-range/search-date-range.component.ts) |
| [Search date range advanced tabbed component](content-services/components/search-date-range-advanced-tabbed.component.md) | Implements a tabbed advanced search widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-date-range-advanced-tabbed/search-date-range-advanced-tabbed.component.ts) |
| [Search Date Range Component](content-services/components/search-date-range.component.md) | Displays a UI to configure different kinds of search criteria around date. Options are 'Anytime', 'In the last' and 'Between' | [Source](../lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range/search-date-range.component.ts) |
| [Search Date Range Tabbed component](content-services/components/search-date-range-tabbed.component.md) | Implements a tabbed advanced search widget for the Search Date Range component. | [Source](../lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range-tabbed.component.ts) |
| [Search datetime range component](content-services/components/search-datetime-range.component.md) | Implements a search widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-datetime-range/search-datetime-range.component.ts) |
| [Search Filter Autocomplete Chips component](content-services/components/search-filter-autocomplete-chips.component.md) | Implements a search widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-filter-autocomplete-chips/search-filter-autocomplete-chips.component.ts) |
| [Search Filter Chips component](content-services/components/search-filter-chips.component.md) | Represents a chip based container component for custom search and faceted search settings. | [Source](../lib/content-services/src/lib/search/components/search-filter-chips/search-filter-chips.component.ts) |
@@ -29,6 +29,7 @@ export interface AspectListDialogComponentData {
overTableMessage: string;
select: Subject<string[]>;
nodeId?: string;
excludedAspects?: string[];
}
```
@@ -41,6 +42,7 @@ The properties are described in the table below:
| overTableMessage | `string` | "" | Text that will be showed on the top of the aspect list table |
| select | [`Subject<Node>`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/Node.md) | | Event emitted with the current node selection when the dialog closes |
| nodeId | `string` | "" | Identifier of a node to apply aspects to. |
| excludedAspects | `string[]` | undefined | List of aspects' ids which should not be displayed. |
If you don't want to manage the dialog yourself then it is easier to use the
[Aspect List component](aspect-list.component.md), or the
@@ -30,6 +30,7 @@ The aspect are filtered via the app.config.json in this way :
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| nodeId | `string` | "" | Node Id of the node that we want to update |
| excludedAspects | `string[]` | undefined | List of aspects' ids which should not be displayed. |
### Events
@@ -60,6 +60,7 @@ Displays the documents from a repository.
| ---- | ---- | ------------- | ----------- |
| additionalSorting | [`DataSorting`](../../../lib/core/src/lib/datatable/data/data-sorting.model.ts) | | Defines default sorting. The format is an array of strings `[key direction, otherKey otherDirection]` i.e. `['name desc', 'nodeType asc']` or `['name asc']`. Set this value if you want a base rule to be added to the sorting apart from the one driven by the header. |
| allowDropFiles | `boolean` | false | When true, this enables you to drop files directly into subfolders shown as items in the list or into another file to trigger updating it's version. When false, the dropped file will be added to the current folder (ie, the one containing all the items shown in the list). See the [Upload directive](../../core/directives/upload.directive.md) for further details about how the file drop is handled. |
| blurOnResize | `boolean` | true | Toggles blur when columns of the list are being resized. |
| columnsPresetKey | `string` | | Key of columns preset set in extension.json|
| contentActions | `boolean` | false | Toggles content actions for each row |
| contentActionsPosition | `string` | "right" | Position of the content actions dropdown menu. Can be set to "left" or "right". |
@@ -71,6 +72,7 @@ Displays the documents from a repository.
| 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. |
| includeFields | `string[]` | | Include additional information about the node in the server request. For example: association, isLink, isLocked and others. |
| isResizingEnabled | `boolean` | false | Toggles column resizing for document list. |
| loading | `boolean` | false | Toggles the loading state and animated spinners for the component. Used in combination with `navigate=false` to perform custom navigation and loading state indication. |
| locationFormat | `string` | "/" | The default route for all the location-based columns (if declared). |
| maxColumnsVisible | `number` | | Limit of possible visible columns, including "$thumbnail" column if provided |
@@ -76,7 +76,7 @@ items in the list.
- [Search Configuration Guide](../../user-guide/search-configuration-guide.md)
- [Search filter chips component](search-filter-chips.component.md)
- [Search filter component](search-filter.component.md)
- [Search date range component](search-date-range.component.md)
- [Search date range tabbed component](search-date-range-tabbed.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search slider component](search-slider.component.md)
@@ -50,7 +50,7 @@ Represents an input with autocomplete options.
- [Search Filter Autocomplete Chips component](search-filter-autocomplete-chips.component.md)
- [Search Logical Filter component](search-logical-filter.component.md)
- [Search check list component](search-check-list.component.md)
- [Search date range component](search-date-range.component.md)
- [Search date range tabbed component](search-date-range-tabbed.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search slider component](search-slider.component.md)
@@ -1,47 +0,0 @@
---
Title: Search date range advanced component
Added: v6.2.0
Status: Active
Last reviewed: 2023-07-10
---
# [Search date range advanced component](../../../lib/content-services/src/lib/search/components/search-date-range-advanced-tabbed/search-date-range-advanced/search-date-range-advanced.component.ts "Defined in search-date-range-advanced.component.ts")
Represents an advanced date range component for
the [SearchAdvancedDateRangeTabbedComponent](search-date-range-advanced-tabbed.component.md).
![Date Range Advanced Widget](../../docassets/images/search-date-range-advanced.png)
## Basic usage
```html
<adf-search-date-range-advanced></adf-search-date-range-advanced>
```
## Class Members
### 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 | SearchDateRangeAdvanced | Initial value for the component |
### Events
| Name | Type | Description |
|---------------------|------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|
| changed | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Partial<SearchDateRangeAdvanced>>` | Emitted whenever a change is made in the component values. Emits the changes being made in the component. |
| valid | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | Emitted whenever a change is made in the component values. Emits a flag indicating whether the current state of the component is valid or not. |
## Details
This component lets the user choose a variety of options to perform date related operations.
- Anytime - No date related data will be returned. This option is selected by default
- In the last - Allows user to perform date related operations over a period of time. The user can select the length of the period from current time,
as well as its unit. Currently, 3 units are supported - Days, Weeks, and Months.
- Between - Allows the user to select a range of dates to perform operations on.
@@ -1,16 +1,15 @@
---
Title: Search date range advanced tabbed component
Title: Search date range tabbed component
Added: v6.2.0
Status: Active
Last reviewed: 2023-07-10
---
# [Search date range advanced tabbed component](../../../lib/content-services/src/lib/search/components/search-date-range-advanced-tabbed/search-date-range-advanced-tabbed.component.ts "Defined in search-date-range-advanced-tabbed.component.ts")
# [Search date range tabbed component](../../../lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range-tabbed.component.ts "Defined in search-date-range-tabbed.component.ts")
Represents a tabbed advanced date range [search widget](../../../lib/content-services/src/lib/search/models/search-widget.interface.ts) for
the [Search Filter component](search-filter.component.md).
Represents a tabbed date range [search widget](../../../lib/content-services/src/lib/search/models/search-widget.interface.ts) for the [Search Filter component](search-filter.component.md).
![Date Range Advanced Widget](../../docassets/images/search-date-range-advanced-tabbed.png)
![Date Range Tabbed Widget](../../docassets/images/search-date-range-tabbed.png)
## Basic usage
@@ -23,7 +22,7 @@ the [Search Filter component](search-filter.component.md).
"name": "Date",
"enabled": true,
"component": {
"selector": "date-range-advanced",
"selector": "date-range",
"settings": {
"dateFormat": "dd-MMM-yy",
"maxDate": "today",
@@ -51,7 +50,7 @@ the [Search Filter component](search-filter.component.md).
## Details
This component creates a tabbed layout where each tab consists of the [SearchDateRangeAdvanced](./search-date-range-advanced-tabbed.component.md) component, which allows user to create a query containing multiple date related queries in one go.
This component creates a tabbed layout where each tab consists of the [SearchDateRange](./search-date-range.component.md) component, which allows user to create a query containing multiple date related queries in one go.
See the [Search filter component](search-filter.component.md) for full details of how to use widgets in a search query.
@@ -70,7 +69,7 @@ in the `dateFormat` and in the `maxDate` setting:
"name": "Date",
"enabled": true,
"component": {
"selector": "date-range-advanced",
"selector": "date-range",
"settings": {
"dateFormat": "dd-MMM-yy",
"maxDate": "02-May-23",
@@ -87,7 +86,7 @@ in the `dateFormat` and in the `maxDate` setting:
}
```
The [SearchDateRangeAdvanced](./search-date-range-advanced-tabbed.component.md) component allows 3 different kinds of date related operations to be performed.
The [SearchDateRange](./search-date-range.component.md) component allows 3 different kinds of date related operations to be performed.
Based on what information is provided to that component, this component will create different kinds of queries -
- Anytime - No date filters are applied on the `field`. This option is selected by default
@@ -105,7 +104,6 @@ The queries generated by this filter when using the 'In the last' or 'Between' o
- [Search Query Builder service](../services/search-query-builder.service.md)
- [Search Widget Interface](../interfaces/search-widget.interface.md)
- [Search check list component](search-check-list.component.md)
- [Search date range component](search-date-range.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search slider component](search-slider.component.md)
@@ -1,88 +1,49 @@
---
Title: Search date range component
Added: v2.4.0
Added: v6.2.0
Status: Active
Last reviewed: 2018-06-11
Last reviewed: 2023-07-10
---
# [Search date range component](../../../lib/content-services/src/lib/search/components/search-date-range/search-date-range.component.ts "Defined in search-date-range.component.ts")
# [Search date range component](../../../lib/content-services/src/lib/search/components/search-date-range-tabbed/search-date-range/search-date-range.component.ts "Defined in search-date-range.component.ts")
Implements a [search widget](../../../lib/content-services/src/lib/search/search-widget.interface.ts) for the [Search Filter component](search-filter.component.md).
Represents a date range component for the [SearchDateRangeTabbedComponent](search-date-range-tabbed.component.md).
![Date Range Widget](../../docassets/images/search-date-range.png)
NOTE: As of v6.5.0, the settings configuration for the original SearchDateRangeComponent have changed. If you have been using this component since
before that release, please ensure that your component configuration is updated according to the new settings listed below.
## Basic usage
```json
{
"search": {
"categories": [
{
"id": "createdDateRange",
"name": "Created Date (range)",
"enabled": true,
"component": {
"selector": "date-range",
"settings": {
"field": "cm:created"
}
}
}
]
}
}
```html
<adf-search-date-range></adf-search-date-range>
```
### Settings
## Class Members
| Name | Type | Description |
| ---- | ---- | ----------- |
| field | string | Field to apply the query to. Required value |
| dateFormat | string | Date format. Dates used by the datepicker are [Moment.js](https://momentjs.com/docs/#/parsing/string-format/) instances, so you can use any date format supported by Moment. Default is 'DD/MM/YYYY'. |
| maxDate | string | A fixed date or the string `"today"` that will set the maximum searchable date. Default is no maximum. |
| hideDefaultAction | boolean | Show/hide the [widget](../../../lib/testing/src/lib/core/pages/form/widgets/widget.ts) actions. By default is false. |
### 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 |
### Events
| Name | Type | Description |
|---------------------|----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|
| changed | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Partial<SearchDateRange>>` | Emitted whenever a change is made in the component values. Emits the changes being made in the component. |
| valid | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | Emitted whenever a change is made in the component values. Emits a flag indicating whether the current state of the component is valid or not. |
## Details
This component lets the user select a range between two dates based on the particular `field`.
See the [Search filter component](search-filter.component.md) for full details of how to use widgets
in a search query.
This component lets the user choose a variety of options to perform date related operations.
### Custom date format
You can set the date range picker to work with any date format your app requires. You can use
any date format supported by [Moment.js](https://momentjs.com/docs/#/parsing/string-format/)
in the `dateFormat` and in the `maxDate` setting:
```json
{
"search": {
"categories": [
{
"id": "createdDateRange",
"name": "Created Date (range)",
"enabled": true,
"component": {
"selector": "date-range",
"settings": {
"field": "cm:created",
"dateFormat": "DD-MMM-YY",
"maxDate": "02-Mar-20"
}
}
}
]
}
}
```
## See also
- [Search Configuration Guide](../../user-guide/search-configuration-guide.md)
- [Search filter chips component](search-filter-chips.component.md)
- [Search filter component](search-filter.component.md)
- [Search check list component](search-check-list.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search slider component](search-slider.component.md)
- [Search text component](search-text.component.md)
- Anytime - No date related data will be returned. This option is selected by default
- In the last - Allows user to perform date related operations over a period of time. The user can select the length of the period from current time,
as well as its unit. Currently, 3 units are supported - Days, Weeks, and Months.
- Between - Allows the user to select a range of dates to perform operations on.
@@ -59,7 +59,7 @@ See the [Search Chip Autocomplete Input component](search-chip-autocomplete-inpu
- [Search Chip Autocomplete Input component](search-chip-autocomplete-input.component.md)
- [Search Chip Input component](search-chip-input.component.md)
- [Search check list component](search-check-list.component.md)
- [Search date range component](search-date-range.component.md)
- [Search date range tabbed component](search-date-range-tabbed.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search slider component](search-slider.component.md)
@@ -70,7 +70,7 @@ here is the [example configuration](https://github.com/Alfresco/alfresco-ng2-com
- [Search Query Builder service](../services/search-query-builder.service.md)
- [Search Widget Interface](../interfaces/search-widget.interface.md)
- [Search check list component](search-check-list.component.md)
- [Search date range component](search-date-range.component.md)
- [Search date range tabbed component](search-date-range-tabbed.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search slider component](search-slider.component.md)
@@ -34,7 +34,7 @@ with the name input property being assigned the value of whatever name should be
- [Search Widget Interface](../interfaces/search-widget.interface.md)
- [Search check list component](search-check-list.component.md)
- [Search date range component](search-date-range.component.md)
- [Search date range advanced component](search-date-range-advanced.component.md)
- [Search date range component](search-date-range.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search slider component](search-slider.component.md)
@@ -36,8 +36,8 @@ to build and execute the query.
- [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)
- [Search date range component](search-date-range.component.md)
- [Search date range advanced component](search-date-range-advanced.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search slider component](search-slider.component.md)
@@ -52,7 +52,7 @@ This component lets the user provide logical conditions to apply to each `field`
- [Search Query Builder service](../services/search-query-builder.service.md)
- [Search Widget Interface](../interfaces/search-widget.interface.md)
- [Search check list component](search-check-list.component.md)
- [Search date range component](search-date-range.component.md)
- [Search date range tabbed component](search-date-range-tabbed.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search slider component](search-slider.component.md)
@@ -75,7 +75,7 @@ cm:content.size:[0 TO 100]
- [Search filter chips component](search-filter-chips.component.md)
- [Search filter component](search-filter.component.md)
- [Search check list component](search-check-list.component.md)
- [Search date range component](search-date-range.component.md)
- [Search date range tabbed component](search-date-range-tabbed.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search slider component](search-slider.component.md)
@@ -54,7 +54,7 @@ Allows to search by file size and type.
- [Search Query Builder service](../services/search-query-builder.service.md)
- [Search Widget Interface](../interfaces/search-widget.interface.md)
- [Search check list component](search-check-list.component.md)
- [Search date range component](search-date-range.component.md)
- [Search date range tabbed component](search-date-range-tabbed.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search slider component](search-slider.component.md)
@@ -66,7 +66,7 @@ buttons as appropriate.
- [Search filter chips component](search-filter-chips.component.md)
- [Search filter component](search-filter.component.md)
- [Search check list component](search-check-list.component.md)
- [Search date range component](search-date-range.component.md)
- [Search date range tabbed component](search-date-range-tabbed.component.md)
- [Search number range component](search-number-range.component.md)
- [Search slider component](search-slider.component.md)
- [Search text component](search-text.component.md)
@@ -73,7 +73,7 @@ or zero and the corresponsing query fragment is removed from the query.
- [Search filter chips component](search-filter-chips.component.md)
- [Search filter component](search-filter.component.md)
- [Search check list component](search-check-list.component.md)
- [Search date range component](search-date-range.component.md)
- [Search date range tabbed component](search-date-range-tabbed.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search text component](search-text.component.md)
@@ -63,7 +63,7 @@ details of how to use widgets in a search query.
- [Search filter chips component](search-filter-chips.component.md)
- [Search filter component](search-filter.component.md)
- [Search check list component](search-check-list.component.md)
- [Search date range component](search-date-range.component.md)
- [Search date range tabbed component](search-date-range-tabbed.component.md)
- [Search number range component](search-number-range.component.md)
- [Search radio component](search-radio.component.md)
- [Search slider component](search-slider.component.md)
@@ -186,7 +186,7 @@ and pass custom attributes, if your component supports them:
- [Search filter component](../components/search-filter.component.md)
- [Search check list component](../components/search-check-list.component.md)
- [Search date range component](../components/search-date-range.component.md)
- [Search date range tabbed component](../components/search-date-range-tabbed.component.md)
- [Search number range component](../components/search-number-range.component.md)
- [Search radio component](../components/search-radio.component.md)
- [Search slider component](../components/search-slider.component.md)
@@ -65,6 +65,9 @@ Manages categories in Content Services.
- _nodeId:_ `string` - The identifier of a node.
- _categoryLinkBodyCreate:_ [`CategoryLinkBody[]`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryLinkBody.md) - Categories that node will be linked to.
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CategoryPaging`]((https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryPaging.md))` | `[`CategoryEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/api/content-rest-api/docs/CategoryEntry.md)`>` - Categories that node has been linked to.
- **areCategoriesEnabled**():`boolean`<br/>
Checks if categories plugin is enabled.
- **Returns** `boolean` - true if categories plugin is enabled, false otherwise.
## Details
@@ -139,7 +139,7 @@ constructor(queryBuilder: SearchQueryBuilderService) {
- [Search Form Component](../components/search-form.component.md)
- [Search Widget interface](../interfaces/search-widget.interface.md)
- [Search check list component](../components/search-check-list.component.md)
- [Search date range component](../components/search-date-range.component.md)
- [Search date range tabbed component](../components/search-date-range-tabbed.component.md)
- [Search number range component](../components/search-number-range.component.md)
- [Search radio component](../components/search-radio.component.md)
- [Search slider component](../components/search-slider.component.md)
@@ -62,6 +62,9 @@ Manages tags in Content Services.
- _tagId:_ `string` - The identifier of a tag.
- _tagBody:_ `TagBody` - The updated tag.
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TagEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/TagEntry.md)`>` - Updated tag.
- **areTagsEnabled**():`boolean`<br/>
Checks if tags plugin is enabled.
- **Returns** `boolean` - true if tags plugin is enabled, false otherwise.
## Details
@@ -77,6 +77,7 @@ The `type` input allows us to specify the type of hosted values for a given colu
- `amount` - This column is responsible for displaying currencies. It expects numerals represented by a string or a number. This type comes with [`currencyConfig`](#default-currency-config),
- `number` - This column is responsible for displaying numbers (integers and decimals). It expects numerals represented by a string or a number. This type comes with [`decimalConfig`](#default-decimal-config)
- `location` - This column displays a clickable location link pointing to the parent path of the node. **Note:** This type is strongly related to the document list component ([document-list.component.md](../../content-services/components/document-list.component.md)).
- `icon` - Allows us to display Material Icons supported by Google. Example values: **group**, **favorite**, **thumb_up** and many more. The complete list of the icons - [Google Icons](https://fonts.google.com/icons).
### `currencyConfig` Input
@@ -423,6 +423,7 @@ Learm more about styling your datatable: [Customizing the component's styles](#c
| actionsPosition | `string` | "right" | Position of the actions dropdown menu. Can be "left" or "right". |
| actionsVisibleOnHover | `boolean` | false | Toggles whether the actions dropdown should only be visible if the row is hovered over or the dropdown menu is open. |
| allowFiltering | `boolean` | false | Flag that indicate if the datatable allow the use [facet widget](../../../lib/content-services/src/lib/search/models/facet-widget.interface.ts) search for filtering. |
| blurOnResize | `boolean` | true | Toggles blur when columns of the datatable are being resized. |
| columns | `any[]` | \[] | The columns that the datatable will show. |
| contextMenu | `boolean` | false | Toggles custom context menu for the component. |
| data | [`DataTableAdapter`](../../../lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source for the table |
+2
View File
@@ -70,6 +70,7 @@ See the [Custom layout](#custom-layout) section for full details of all availabl
| canNavigateNext | `boolean` | true | Toggles the next (">") button. Requires `allowNavigate` to be enabled. |
| fileName | `string` | | Override Content filename. |
| mimeType | `string` | | Overload mimeType |
| originalMimeType | `string` | | Overload originalMimeType |
| overlayMode | `boolean` | false | If `true` then show the Viewer as a full page over the current content. Otherwise fit inside the parent div. |
| readOnly | `boolean` | true | Enable when where is possible the editing functionalities |
| showLeftSidebar | `boolean` | false | Toggles left sidebar visibility. Requires `allowLeftSidebar` to be set to `true`. |
@@ -113,6 +114,7 @@ You can provide custom file parameters, for example a value for the `mimeType` o
[fileName]="fileName"
[allowGoBack]="false"
[mimeType]="mimeType"
[originalMimeType]="originalMimeType"
[urlFile]="fileUrl">
</adf-viewer>
```
Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

+2
View File
@@ -42,3 +42,5 @@ The pages linked below contain the licenses for all third party dependencies of
- [ADF 6.3.0](license-info-6.3.0.md)
- [ADF 6.4.0](license-info-6.4.0.md)
- [ADF 6.5.0](license-info-6.5.0.md)
- [ADF 6.5.1](license-info-6.5.1.md)
- [ADF 6.5.2](license-info-6.5.2.md)
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -52,7 +52,9 @@ when the process list is empty:
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| appId | `number` | | The id of the app. |
| blurOnResize | `boolean` | true | Toggles blur when columns of the list are being resized. |
| data | [`DataTableAdapter`](../../../lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source to define the datatable. |
| isResizingEnabled | `boolean` | false | Toggles column resizing for processes list. |
| multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row |
| page | `number` | 0 | The page number of the processes to fetch. |
| presetColumn | `string` | | Custom preset column schema in JSON format. |
@@ -55,9 +55,11 @@ when the task list is empty:
| ---- | ---- | ------------- | ----------- |
| appId | `number` | | The id of the app. |
| assignment | `string` | | The assignment of the process. Possible values are: "assignee" (the current user is the assignee), "candidate" (the current user is a task candidate, "group_x" (the task is assigned to a group where the current user is a member, no value (the current user is involved). |
| blurOnResize | `boolean` | true | Toggles blur when columns of the list are being resized. |
| data | [`DataTableAdapter`](../../../lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source object that represents the number and the type of the columns that you want to show. |
| dueAfter | `string` | | Filter the tasks. Display only tasks with `created_date` after `dueAfter`. |
| dueBefore | `string` | | Filter the tasks. Display only tasks with `created_date` before `dueBefore`. |
| isResizingEnabled | `boolean` | false | Toggles column resizing for task list. |
| includeProcessInstance | `boolean` | | Toggles inclusion of Process Instances |
| landingTaskId | `string` | | Define which task id should be selected after reloading. If the task id doesn't exist or nothing is passed then the first task will be selected. |
| multiselect | `boolean` | false | Toggles multiple row selection, renders checkboxes at the beginning of each row |
+2
View File
@@ -9,6 +9,8 @@ The first **General Availability** release was v2.0.0.
## General Availability
- [6.5.2](RelNote-6.5.2.md)
- [6.5.1](RelNote-6.5.1.md)
- [6.5.0](RelNote-6.5.0.md)
- [6.4.0](RelNote-6.4.0.md)
- [6.3.0](RelNote-6.3.0.md)
+27
View File
@@ -0,0 +1,27 @@
---
Title: Release notes v6.5.1
---
# Alfresco Application Development Framework (ADF) version 6.5.1 Release Note
This document provides information on the Alfresco Application Development Framework **v6.5.1**.
You can find release artifacts on [GitHub](https://github.com/Alfresco/alfresco-ng2-components/releases/tag/6.5.1).
## Contents
- [Changelog](#changelog)
- [See Also](#see-also)
## Changelog
- [f2df3c414](git@github.com:Alfresco/alfresco-ng2-components/commit/f2df3c414) [AAE-17909][AAE-17964] fix silent-refresh url is not set with the value - fix background image set to undefined (#9080)
- [168bb0b6c](git@github.com:Alfresco/alfresco-ng2-components/commit/168bb0b6c) [AAE-17258] Update storybook for datatable and datacolumn (#9052)
- [c0194029c](git@github.com:Alfresco/alfresco-ng2-components/commit/c0194029c) [AAE-17865] Remove few already covered e2es from ADF (#9078)
- [625cf2b85](git@github.com:Alfresco/alfresco-ng2-components/commit/625cf2b85) [ADF-5561] Remove unused dep (#9064)
- [f0a11fdab](git@github.com:Alfresco/alfresco-ng2-components/commit/f0a11fdab) [ACS-6140] migrate tests to harness (#9071)
## See Also
- [Issue Tracker](https://github.com/Alfresco/alfresco-ng2-components/issues/new)
- [Discussion forum](http://gitter.im/Alfresco/alfresco-ng2-components)
+29
View File
@@ -0,0 +1,29 @@
---
Title: Release notes v6.5.2
---
# Alfresco Application Development Framework (ADF) version 6.5.2 Release Note
This document provides information on the Alfresco Application Development Framework **v6.5.2**.
You can find release artifacts on [GitHub](https://github.com/Alfresco/alfresco-ng2-components/releases/tag/6.5.2).
## Contents
- [Changelog](#changelog)
- [See Also](#see-also)
## Changelog
- [22d3179a5](git@github.com:Alfresco/alfresco-ng2-components/commit/22d3179a5) Revert &#34;[AAE-18105] Fix release workflow: release-npm step doesn&#39;t publish al…&#34; (#9092)
- [17323b0ab](git@github.com:Alfresco/alfresco-ng2-components/commit/17323b0ab) [AAE-18105] Fix release workflow: release-npm step doesn&#39;t publish all the packages (#9091)
- [81787d520](git@github.com:Alfresco/alfresco-ng2-components/commit/81787d520) [MNT-23166] Add resize flag to document list with option to disable blur (#9090)
- [e5ca7d206](git@github.com:Alfresco/alfresco-ng2-components/commit/e5ca7d206) [AAE-18057] Fix token is not refreshed after silent-refresh is called. Get another token from the auth server. (#9089)
- [6787ef458](git@github.com:Alfresco/alfresco-ng2-components/commit/6787ef458) [ACS-6225] Removed extra gray area around share link dialog (#9086)
- [6988c1f45](git@github.com:Alfresco/alfresco-ng2-components/commit/6988c1f45) [ACS-6067] viewer thumbnails not refresh on file change (#9075)
- [15fdbc7e2](git@github.com:Alfresco/alfresco-ng2-components/commit/15fdbc7e2) [ACS-4794] ES query migration changes (#8773)
## See Also
- [Issue Tracker](https://github.com/Alfresco/alfresco-ng2-components/issues/new)
- [Discussion forum](http://gitter.im/Alfresco/alfresco-ng2-components)
@@ -277,6 +277,9 @@ export interface SearchCategory {
selector: string;
settings: SearchWidgetSettings;
};
rules?: {
visible: string;
};
}
```
@@ -291,10 +294,10 @@ The Search Filter supports a number of widgets out of the box, each implemented
by an ADF component. The `selector` property specifies which [widget](../../lib/content-services/src/lib/search/models/search-widget.interface.ts) is used for
a category:
| [`Widget`](../../lib/content-services/src/lib/search/models/search-widget.interface.ts) name | Selector | Description |
| ------------------------------------------------------------------------------- | -------- | ----------- |
| [`Widget`](../../lib/content-services/src/lib/search/models/search-widget.interface.ts) name | Selector | Description |
|----------------------------------------------------------------------------------------------| -------- |------------------------------------------------------------------------------|
| [Check List](../content-services/components/search-check-list.component.md) | `check-list` | Toggles individual query fragments for the search |
| [Date Range](../content-services/components/search-date-range.component.md) | `date-range` | Specifies a range f dates that a field may contain |
| [Date Range](../content-services/components/search-date-range.component.md) | `date-range` | Specifies a varities of options for selecting dates that a field may contain |
| [Number Range](../content-services/components/search-number-range.component.md) | `number-range` | Specifies a range of numeric values that a field may contain |
| [Radio List](../content-services/components/search-radio.component.md) | `radio` | Selects one query fragment from a list of options |
| [Slider](../content-services/components/search-slider.component.md) | `slider` | Selects a single numeric value in a given range that a field may contain |
@@ -586,7 +589,7 @@ then be added in each node entry response. An example partial response is shown
- [Search Form Component](../content-services/components/search-form.component.md)
- [Search Widget interface](../interfaces/search-widget.interface.md)
- [Search check list component](../content-services/components/search-check-list.component.md)
- [Search date range component](../content-services/components/search-date-range.component.md)
- [Search date range tabbed component](../content-services/components/search-date-range-tabbed.component.md)
- [Search number range component](../content-services/components/search-number-range.component.md)
- [Search radio component](../content-services/components/search-radio.component.md)
- [Search slider component](../content-services/components/search-slider.component.md)
+2 -2
View File
@@ -57,8 +57,8 @@ backend services have been tested with each released version of ADF.
<!--v620 start-->
- [Search Properties component](content-services/components/search-properties.component.md)
- [Search Date Range Advanced Component](content-services/components/search-date-range-advanced.component.md)
- [Search Date Range Advanced Tabbed Component](content-services/components/search-date-range-advanced-tabbed.component.md)
- [Search Date Range Component](content-services/components/search-date-range.component.md)
- [Search Date Range Tabbed Component](content-services/components/search-date-range-tabbed.component.md)
- [Search Filter Tabbed Component](content-services/components/search-filter-tabbed.component.md)
- [Search Facet Chip Tabbed Component](content-services/components/search-facet-chip-tabbed.md)
- [Date Time Pipe](core/pipes/date-time.pipe.md)
+2
View File
@@ -39,3 +39,5 @@ The pages linked below contain the audit for all third party dependencies of ADF
- [ADF 6.3.0](audit-info-6.3.0.md)
- [ADF 6.4.0](audit-info-6.4.0.md)
- [ADF 6.5.0](audit-info-6.5.0.md)
- [ADF 6.5.1](audit-info-6.5.1.md)
- [ADF 6.5.2](audit-info-6.5.2.md)
+52
View File
@@ -0,0 +1,52 @@
---
Title: Audit info, alfresco-ng2-components 6.5.1
---
# Audit information for alfresco-ng2-components 6.5.1
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 17
- Moderate risk: 12
- Low risk: 0
Dependencies analyzed:
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |
|high | @mdx-js/mdx | &#34;&lt;=1.6.22&#34; |
|moderate | @storybook/builder-webpack4 | &#34;*&#34; |
|high | @storybook/core-server | &#34;&lt;=7.0.0-rc.11&#34; |
|high | @storybook/csf-tools | &#34;6.5.0-alpha.1 - 6.5.17-alpha.0&#34; |
|moderate | @storybook/manager-webpack4 | &#34;*&#34; |
|high | @storybook/mdx1-csf | &#34;*&#34; |
|moderate | autoprefixer | &#34;1.0.20131222 - 9.8.8&#34; |
|high | chokidar | &#34;1.0.0-rc1 - 2.1.8&#34; |
|high | cpy | &#34;7.0.0 - 8.1.2&#34; |
|moderate | css-loader | &#34;0.15.0 - 4.3.0&#34; |
|high | fast-glob | &#34;&lt;=2.2.7&#34; |
|high | glob-parent | &#34;&lt;5.1.2&#34; |
|high | globby | &#34;8.0.0 - 9.2.0&#34; |
|moderate | icss-utils | &#34;&lt;=4.1.1&#34; |
|high | meow | &#34;3.4.0 - 5.0.0&#34; |
|moderate | postcss | &#34;&lt;8.4.31&#34; |
|moderate | postcss-flexbugs-fixes | &#34;&lt;=4.2.1&#34; |
|moderate | postcss-modules-extract-imports | &#34;&lt;=2.0.0&#34; |
|moderate | postcss-modules-local-by-default | &#34;&lt;=4.0.0-rc.4&#34; |
|moderate | postcss-modules-scope | &#34;&lt;=2.2.0&#34; |
|moderate | postcss-modules-values | &#34;&lt;=4.0.0-rc.5&#34; |
|high | remark-mdx | &#34;&lt;=1.6.22&#34; |
|high | remark-parse | &#34;&lt;=8.0.3&#34; |
|moderate | semver | &#34;7.0.0 - 7.5.1&#34; |
|high | trim | &#34;&lt;0.0.3&#34; |
|high | trim-newlines | &#34;&lt;3.0.1&#34; |
|high | watchpack | &#34;1.7.2 - 1.7.5&#34; |
|high | watchpack-chokidar2 | &#34;*&#34; |
|high | webpack | &#34;4.44.0 - 4.47.0&#34; |
+52
View File
@@ -0,0 +1,52 @@
---
Title: Audit info, alfresco-ng2-components 6.5.2
---
# Audit information for alfresco-ng2-components 6.5.2
This page lists the security audit of the dependencies this project depends on.
## Risks
- Critical risk: 0
- High risk: 17
- Moderate risk: 12
- Low risk: 0
Dependencies analyzed:
## Libraries
| Severity | Module | Vulnerable versions |
| --- | --- | --- |
|high | @mdx-js/mdx | &#34;&lt;=1.6.22&#34; |
|moderate | @storybook/builder-webpack4 | &#34;*&#34; |
|high | @storybook/core-server | &#34;&lt;=7.0.0-rc.11&#34; |
|high | @storybook/csf-tools | &#34;6.5.0-alpha.1 - 6.5.17-alpha.0&#34; |
|moderate | @storybook/manager-webpack4 | &#34;*&#34; |
|high | @storybook/mdx1-csf | &#34;*&#34; |
|moderate | autoprefixer | &#34;1.0.20131222 - 9.8.8&#34; |
|high | chokidar | &#34;1.0.0-rc1 - 2.1.8&#34; |
|high | cpy | &#34;7.0.0 - 8.1.2&#34; |
|moderate | css-loader | &#34;0.15.0 - 4.3.0&#34; |
|high | fast-glob | &#34;&lt;=2.2.7&#34; |
|high | glob-parent | &#34;&lt;5.1.2&#34; |
|high | globby | &#34;8.0.0 - 9.2.0&#34; |
|moderate | icss-utils | &#34;&lt;=4.1.1&#34; |
|high | meow | &#34;3.4.0 - 5.0.0&#34; |
|moderate | postcss | &#34;&lt;8.4.31&#34; |
|moderate | postcss-flexbugs-fixes | &#34;&lt;=4.2.1&#34; |
|moderate | postcss-modules-extract-imports | &#34;&lt;=2.0.0&#34; |
|moderate | postcss-modules-local-by-default | &#34;&lt;=4.0.0-rc.4&#34; |
|moderate | postcss-modules-scope | &#34;&lt;=2.2.0&#34; |
|moderate | postcss-modules-values | &#34;&lt;=4.0.0-rc.5&#34; |
|high | remark-mdx | &#34;&lt;=1.6.22&#34; |
|high | remark-parse | &#34;&lt;=8.0.3&#34; |
|moderate | semver | &#34;7.0.0 - 7.5.1&#34; |
|high | trim | &#34;&lt;0.0.3&#34; |
|high | trim-newlines | &#34;&lt;3.0.1&#34; |
|high | watchpack | &#34;1.7.2 - 1.7.5&#34; |
|high | watchpack-chokidar2 | &#34;*&#34; |
|high | webpack | &#34;4.44.0 - 4.47.0&#34; |
@@ -21,7 +21,6 @@ import { createApiService, LoginPage, StringUtil, UploadActions, UserModel, User
import { FileModel } from '../../models/ACS/file.model';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { NodeEntry } from '@alfresco/js-api';
import { format } from 'date-fns';
describe('Document List Component', () => {
let uploadedFolder: NodeEntry;
@@ -70,14 +69,6 @@ describe('Document List Component', () => {
name: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_name,
location: browser.params.resources.Files.ADF_DOCUMENTS.DOCX.file_path
});
const timeAgoFileModel = new FileModel({
name: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_name,
location: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_path
});
const mediumFileModel = new FileModel({
name: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_name,
location: browser.params.resources.Files.ADF_DOCUMENTS.PDF_B.file_path
});
let pdfUploadedNode: NodeEntry;
let docxUploadedNode: NodeEntry;
@@ -138,24 +129,6 @@ describe('Document List Component', () => {
await contentServicesPage.checkColumnCreatedByHeader();
await contentServicesPage.checkColumnCreatedHeader();
});
it('[C279928] Should be able to display date with timeAgo', async () => {
await apiService.login(acsUser.username, acsUser.password);
timeAgoUploadedNode = await uploadActions.uploadFile(timeAgoFileModel.location, timeAgoFileModel.name, '-my-');
await contentServicesPage.goToDocumentList();
const dateValue = await contentServicesPage.getColumnValueForRow(timeAgoFileModel.name, 'Created');
await expect(dateValue).toMatch(/(ago|few)/);
});
it('[C279929] Should be able to display the date with date type', async () => {
await apiService.login(acsUser.username, acsUser.password);
mediumDateUploadedNode = await uploadActions.uploadFile(mediumFileModel.location, mediumFileModel.name, '-my-');
const createdDate = format(new Date(mediumDateUploadedNode.entry.createdAt), 'PP');
await contentServicesPage.goToDocumentList();
await contentServicesPage.enableMediumTimeFormat();
const dateValue = await contentServicesPage.getColumnValueForRow(mediumFileModel.name, 'Created');
await expect(dateValue).toContain(createdDate);
});
});
describe('Column Sorting', () => {
-5
View File
@@ -235,11 +235,6 @@ export class ContentServicesPage {
await BrowserVisibility.waitUntilElementIsClickable(this.uploadFileButton);
}
async enableMediumTimeFormat(): Promise<void> {
const mediumTimeFormat = $('#enableMediumTimeFormat');
await BrowserActions.click(mediumTimeFormat);
}
async checkPaginationIsNotDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.emptyPagination);
}
@@ -151,18 +151,6 @@ describe('Process list cloud', () => {
await processList.getDataTable().waitTillContentLoaded();
}
it('[C290069] Should display processes ordered by name when Name is selected from sort dropdown', async () => {
await setFilter({ status: PROCESS_STATUS.RUNNING });
await setFilter({ sort: 'Name' });
await setFilter({ order: SORT_DIRECTION.ASC });
await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.ASC, 'Process Name')).toBe(true);
await setFilter({ order: SORT_DIRECTION.DESC});
await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.DESC, 'Process Name')).toBe(true);
});
it('[C291783] Should display processes ordered by id when Id is selected from sort dropdown', async () => {
await setFilter({ status: PROCESS_STATUS.RUNNING });
await setFilter({ sort: 'Id'});
@@ -185,39 +173,6 @@ describe('Process list cloud', () => {
await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.DESC, 'Status')).toBe(true);
});
it('[C305054] Should display processes ordered by started by when Started By is selected from sort dropdown', async () => {
await setFilter({ status: PROCESS_STATUS.ALL });
await setFilter({ sort: 'Started by' });
await setFilter({ order: SORT_DIRECTION.ASC });
await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.ASC, 'Started by')).toBe(true);
await setFilter({ order: SORT_DIRECTION.DESC});
await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.DESC, 'Started by')).toBe(true);
});
it('[C305054] Should display processes ordered by processdefinitionid date when ProcessDefinitionId is selected from sort dropdown', async () => {
await setFilter({ status: PROCESS_STATUS.ALL });
await setFilter({ sort: 'ProcessDefinitionId' });
await setFilter({ order: SORT_DIRECTION.ASC });
await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.ASC, 'Process Definition Id')).toBe(true);
await setFilter({ order: SORT_DIRECTION.DESC});
await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.DESC, 'Process Definition Id')).toBe(true);
});
it('[C305054] Should display processes ordered by processdefinitionkey date when ProcessDefinitionKey is selected from sort dropdown', async () => {
await setFilter({ status: PROCESS_STATUS.ALL });
await setFilter({ sort: 'ProcessDefinitionKey' });
await setFilter({ order: SORT_DIRECTION.ASC });
await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.ASC, 'Process Definition Key')).toBe(true);
await setFilter({ order: SORT_DIRECTION.DESC});
await expect(await processList.getDataTable().checkListIsSorted(SORT_DIRECTION.DESC, 'Process Definition Key')).toBe(true);
});
it('[C305054] Should display processes ordered by last modified date when Last Modified is selected from sort dropdown', async () => {
await setFilter({ status: PROCESS_STATUS.ALL });
await setFilter({ sort: 'Last Modified' });
@@ -1,178 +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.
*/
import { browser } from 'protractor';
import { createApiService,
AppListCloudPage,
ContentNodeSelectorDialogPage,
GroupIdentityService,
IdentityService,
LoginPage,
QueryService,
ProcessCloudWidgetPage,
ProcessDefinitionsService,
ProcessInstancesService,
StringUtil,
TaskFormCloudComponent,
TasksService,
UploadActions,
ViewerPage
} from '@alfresco/adf-testing';
import { ProcessCloudDemoPage } from './../pages/process-cloud-demo.page';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { TasksCloudDemoPage } from './../pages/tasks-cloud-demo.page';
import CONSTANTS = require('../../util/constants');
describe('Process Task - Attach content file', () => {
const loginSSOPage = new LoginPage();
const navigationBarPage = new NavigationBarPage();
const appListCloudComponent = new AppListCloudPage();
const processCloudDemoPage = new ProcessCloudDemoPage();
const editProcessFilter = processCloudDemoPage.editProcessFilterCloudComponent();
const processList = processCloudDemoPage.processListCloudComponent();
const tasksCloudDemoPage = new TasksCloudDemoPage();
const taskFilter = tasksCloudDemoPage.taskFilterCloudComponent;
const taskList = tasksCloudDemoPage.taskListCloudComponent();
const taskFormCloudComponent = new TaskFormCloudComponent();
const processCloudWidget = new ProcessCloudWidgetPage();
const contentNodeSelectorDialog = new ContentNodeSelectorDialogPage();
const apiService = createApiService();
const uploadActions = new UploadActions(apiService);
const processDefinitionService = new ProcessDefinitionsService(apiService);
const processInstancesService = new ProcessInstancesService(apiService);
const identityService = new IdentityService(apiService);
const groupIdentityService = new GroupIdentityService(apiService);
const queryService = new QueryService(apiService);
const tasksService = new TasksService(apiService);
const viewerPage = new ViewerPage();
const simpleApp = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.name;
const processDefinitionName = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.processes.uploadSingleMultipleFiles;
const uploadWidgetId = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.forms.uploadSingleMultiple.widgets.contentMultipleAttachFileId;
const taskName = browser.params.resources.ACTIVITI_CLOUD_APPS.SIMPLE_APP.tasks.uploadSingleMultipleFiles;
const folderName = StringUtil.generateRandomString(5);
let uploadedFolder: any;
let processInstance: any;
let testUser: any;
let groupInfo: any;
const pdfFileOne = {
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
};
const pdfFileTwo = {
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_name,
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG_B.file_path
};
beforeAll(async () => {
await apiService.loginWithProfile('identityAdmin');
testUser = await identityService.createIdentityUserWithRole([identityService.ROLES.ACTIVITI_USER]);
groupInfo = await groupIdentityService.getGroupInfoByGroupName('hr');
await identityService.addUserToGroup(testUser.idIdentityService, groupInfo.id);
await apiService.login(testUser.username, testUser.password);
const processDefinition = await processDefinitionService.getProcessDefinitionByName(processDefinitionName, simpleApp);
processInstance = await processInstancesService.createProcessInstance(processDefinition.entry.key, simpleApp, { name: 'upload process' });
const task = await queryService.getProcessInstanceTasks(processInstance.entry.id, simpleApp);
await tasksService.claimTask(task.list.entries[0].entry.id, simpleApp);
await apiService.login(testUser.username, testUser.password);
uploadedFolder = await uploadActions.createFolder(folderName, '-my-');
await uploadActions.uploadFile(pdfFileOne.location, pdfFileOne.name, uploadedFolder.entry.id);
await uploadActions.uploadFile(pdfFileTwo.location, pdfFileTwo.name, uploadedFolder.entry.id);
await loginSSOPage.login(testUser.username, testUser.password);
await navigationBarPage.navigateToProcessServicesCloudPage();
await appListCloudComponent.checkApsContainer();
});
afterAll(async () => {
await uploadActions.deleteFileOrFolder(uploadedFolder.entry.id);
await apiService.loginWithProfile('identityAdmin');
await identityService.deleteIdentityUser(testUser.idIdentityService);
});
it('[C311290] Should be able to attach multiple files when widget allows multiple files to be attached from content', async () => {
await appListCloudComponent.checkAppIsDisplayed(simpleApp);
await appListCloudComponent.goToApp(simpleApp);
await processCloudDemoPage.processFilterCloudComponent.clickOnProcessFilters();
await processCloudDemoPage.processFilterCloudComponent.clickRunningProcessesFilter();
await editProcessFilter.openFilter();
await editProcessFilter.setProcessName('upload process');
await editProcessFilter.closeFilter();
await expect(await processCloudDemoPage.processFilterCloudComponent.getActiveFilterName()).toBe(CONSTANTS.PROCESS_FILTERS.RUNNING);
await processList.checkContentIsDisplayedById(processInstance.entry.id);
await processList.selectRowById(processInstance.entry.id);
await taskList.checkTaskListIsLoaded();
await taskList.selectRow(taskName);
await taskFormCloudComponent.formFields().checkFormIsDisplayed();
await taskFormCloudComponent.formFields().checkWidgetIsVisible(uploadWidgetId);
const contentUploadFileWidget = processCloudWidget.attachFileWidgetCloud(uploadWidgetId);
await contentUploadFileWidget.clickAttachContentFile(uploadWidgetId);
await contentNodeSelectorDialog.attachFileFromContentNode(folderName, pdfFileOne.name);
await viewAttachedFile(contentUploadFileWidget, pdfFileOne.name);
await taskFormCloudComponent.formFields().checkWidgetIsVisible(uploadWidgetId);
await contentUploadFileWidget.clickAttachContentFile(uploadWidgetId);
await contentNodeSelectorDialog.attachFileFromContentNode(folderName, pdfFileTwo.name);
await viewAttachedFile(contentUploadFileWidget, pdfFileTwo.name);
await taskFormCloudComponent.clickCompleteButton();
await expect(await taskFilter.getActiveFilterName()).toBe('My Tasks');
await taskList.checkContentIsNotDisplayedByName(taskName);
await taskFilter.clickTaskFilter('completed-tasks');
await taskList.getDataTable().waitTillContentLoaded();
await taskList.checkContentIsDisplayedByName(taskName);
await processCloudDemoPage.processFilterCloudComponent.clickOnProcessFilters();
await processCloudDemoPage.processFilterCloudComponent.clickCompletedProcessesFilter();
await editProcessFilter.openFilter();
await editProcessFilter.setProcessName('upload process');
await editProcessFilter.closeFilter();
await expect(await processCloudDemoPage.processFilterCloudComponent.getActiveFilterName()).toBe(CONSTANTS.PROCESS_FILTERS.COMPLETED);
await processList.checkContentIsDisplayedById(processInstance.entry.id);
});
async function viewAttachedFile(contentUploadWidget: any, fileName: string): Promise<void> {
await contentUploadWidget.checkFileIsAttached(fileName);
await contentUploadWidget.viewFile(fileName);
await viewerPage.checkToolbarIsDisplayed();
await viewerPage.checkInfoButtonIsDisplayed();
await viewerPage.checkDownloadButtonIsDisplayed();
await viewerPage.checkFileThumbnailIsDisplayed();
await viewerPage.checkFileNameIsDisplayed(fileName);
await viewerPage.clickCloseButton();
}
});
@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { browser, protractor } from 'protractor';
import { browser } from 'protractor';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { TasksCloudDemoPage } from './../pages/tasks-cloud-demo.page';
import {
@@ -28,9 +28,7 @@ import {
GroupIdentityService,
TaskFormCloudComponent,
LocalStorageUtil,
StartProcessCloudPage,
TaskHeaderCloudPage,
ProcessHeaderCloudPage,
TasksService,
UploadActions,
ContentNodeSelectorDialogPage,
@@ -43,7 +41,6 @@ import { StartProcessCloudConfiguration } from './../config/start-process-cloud.
import { ProcessCloudDemoPage } from './../pages/process-cloud-demo.page';
import { ProcessDetailsCloudDemoPage } from './../pages/process-details-cloud-demo.page';
import { FileModel } from '../../models/ACS/file.model';
import CONSTANTS = require('../../util/constants');
describe('Start Task Form', () => {
@@ -61,7 +58,6 @@ describe('Start Task Form', () => {
const breadCrumbDropdownPage = new BreadcrumbDropdownPage();
const processDetailsCloudDemoPage = new ProcessDetailsCloudDemoPage();
const widget = new ProcessCloudWidgetPage();
const startProcessPage = new StartProcessCloudPage();
const processCloudDemoPage = new ProcessCloudDemoPage();
const editProcessFilter = processCloudDemoPage.editProcessFilterCloudComponent();
@@ -69,7 +65,6 @@ describe('Start Task Form', () => {
const processFilter = processCloudDemoPage.processFilterCloudComponent;
const taskHeaderCloudPage = new TaskHeaderCloudPage();
const processHeaderCloud = new ProcessHeaderCloudPage();
const apiService = createApiService();
const uploadActions = new UploadActions(apiService);
@@ -82,7 +77,6 @@ describe('Start Task Form', () => {
const startProcessCloudConfig = startProcessCloudConfiguration.getConfiguration();
const standaloneTaskName = StringUtil.generateRandomString(5);
const startEventFormProcess = StringUtil.generateRandomString(5);
let testUser; let groupInfo;
let processDefinitionService: ProcessDefinitionsService;
let processInstancesService: ProcessInstancesService;
@@ -219,79 +213,6 @@ describe('Start Task Form', () => {
});
});
describe('Start a process with a start event form', async () => {
beforeEach(async () => {
await navigationBarPage.navigateToProcessServicesCloudPage();
await appListCloudComponent.checkApsContainer();
await appListCloudComponent.checkAppIsDisplayed(candidateBaseApp);
await appListCloudComponent.goToApp(candidateBaseApp);
await processCloudDemoPage.openNewProcessForm();
await startProcessPage.clearField(startProcessPage.processNameInput);
await startProcessPage.selectFromProcessDropdown(browser.params.resources.ACTIVITI_CLOUD_APPS.CANDIDATE_BASE_APP.processes.processwithstarteventform);
await startProcessPage.enterProcessName(startEventFormProcess);
await startProcessPage.formFields().checkFormIsDisplayed();
});
it('[C311277] Should be able to start a process with a start event form - default values', async () => {
await expect(await widget.textWidget().getFieldValue('FirstName')).toBe('sample name');
await expect(await widget.numberWidget().getFieldValue('Number07vyx9')).toBe('17');
});
it('[C311277] Should be able to start a process with a start event form - form validation', async () => {
await expect(await widget.textWidget().getErrorMessage('FirstName')).toContain('Enter no more than 10 characters');
await expect(await startProcessPage.isStartProcessButtonDisabled()).toEqual(true);
await widget.textWidget().setValue('FirstName', 'Sam');
await expect(await widget.textWidget().getErrorMessage('FirstName')).toContain('Enter at least 5 characters');
await expect(await startProcessPage.isStartProcessButtonDisabled()).toEqual(true);
await widget.numberWidget().setFieldValue('Number07vyx9', 9);
await expect(await widget.numberWidget().getErrorMessage('Number07vyx9')).toContain('Can\'t be less than 10');
await expect(await startProcessPage.isStartProcessButtonDisabled()).toEqual(true);
await widget.numberWidget().setFieldValue('Number07vyx9', 99999);
await expect(await widget.numberWidget().getErrorMessage('Number07vyx9')).toContain('Can\'t be greater than 1,000');
await expect(await startProcessPage.isStartProcessButtonDisabled()).toEqual(true);
});
it('[C311277] Should be able to start a process with a start event form - claim and complete the process', async () => {
await widget.textWidget().setValue('FirstName', 'Sample');
await widget.numberWidget().setFieldValue('Number07vyx9', 100);
await expect(await startProcessPage.isStartProcessButtonEnabled()).toEqual(true);
await startProcessPage.clickStartProcessButton();
await processFilter.clickRunningProcessesFilter();
await expect(await processFilter.getActiveFilterName()).toBe(CONSTANTS.PROCESS_FILTERS.RUNNING);
await editProcessFilter.openFilter();
await editProcessFilter.setProcessName(startEventFormProcess);
await processList.getDataTable().waitTillContentLoaded();
await processList.checkContentIsDisplayedByName(startEventFormProcess);
await processList.getDataTable().selectRow('Process Name', startEventFormProcess);
await browser.actions().sendKeys(protractor.Key.ENTER).perform();
await processDetailsCloudDemoPage.checkTaskIsDisplayed('StartEventFormTask');
const processId = await processHeaderCloud.getId();
await processDetailsCloudDemoPage.selectProcessTaskByName('StartEventFormTask');
await taskFormCloudComponent.clickClaimButton();
const taskId = await taskHeaderCloudPage.getId();
await taskFormCloudComponent.checkCompleteButtonIsDisplayed();
await taskFormCloudComponent.clickCompleteButton();
await expect(await taskFilter.getActiveFilterName()).toBe('My Tasks');
await taskList.checkContentIsNotDisplayedById(taskId);
await taskFilter.clickTaskFilter('completed-tasks');
await taskList.getDataTable().waitTillContentLoaded();
await taskList.checkContentIsDisplayedById(taskId);
await processFilter.clickOnProcessFilters();
await processFilter.clickCompletedProcessesFilter();
await editProcessFilter.openFilter();
await editProcessFilter.setProcessName(startEventFormProcess);
await processList.checkContentIsDisplayedById(processId);
});
});
describe('Attach content to process-cloud task form using upload widget', async () => {
beforeEach(async () => {
await navigationBarPage.navigateToProcessServicesCloudPage();
@@ -22,7 +22,6 @@ import { TasksPage } from '../pages/tasks.page';
import { TasksListPage } from '../pages/tasks-list.page';
import { TaskDetailsPage } from '../pages/task-details.page';
import { TaskFiltersDemoPage } from '../pages/task-filters-demo.page';
import { UserProcessInstanceFilterRepresentation } from '@alfresco/js-api';
import { browser } from 'protractor';
describe('Task Filters Sorting', () => {
@@ -87,12 +86,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277254] Should display tasks under new filter from newest to oldest when they are completed', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Newest first',
icon: 'glyphicon-filter',
filter: { sort: 'created-desc', state: 'completed' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@@ -104,12 +103,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277255] Should display tasks under new filter from oldest to newest when they are completed', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Newest last',
icon: 'glyphicon-filter',
filter: { sort: 'created-asc', state: 'completed' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@@ -121,12 +120,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277256] Should display tasks under new filter from closest due date to farthest when they are completed', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Due first',
icon: 'glyphicon-filter',
filter: { sort: 'due-desc', state: 'completed' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@@ -138,12 +137,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277257] Should display tasks under new filter from farthest due date to closest when they are completed', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Due last',
icon: 'glyphicon-filter',
filter: { sort: 'due-asc', state: 'completed' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@@ -155,12 +154,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277258] Should display tasks under new filter from newest to oldest when they are open ', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Newest first Open',
icon: 'glyphicon-filter',
filter: { sort: 'created-desc', state: 'open' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@@ -172,12 +171,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277259] Should display tasks under new filter from oldest to newest when they are open', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Newest last Open',
icon: 'glyphicon-filter',
filter: { sort: 'created-asc', state: 'open' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@@ -189,12 +188,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277260] Should display tasks under new filter from closest due date to farthest when they are open', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Due first Open',
icon: 'glyphicon-filter',
filter: { sort: 'due-desc', state: 'open' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
@@ -206,12 +205,12 @@ describe('Task Filters Sorting', () => {
});
it('[C277261] Should display tasks under new filter from farthest due date to closest when they are open', async () => {
const newFilter = new UserProcessInstanceFilterRepresentation({
const newFilter = {
appId,
name: 'Due last Open',
icon: 'glyphicon-filter',
filter: { sort: 'due-asc', state: 'open' }
});
};
await userFiltersUtil.createUserTaskFilter(newFilter);
await browser.refresh();
+6 -1
View File
@@ -19,5 +19,10 @@
"C279971": "https://alfresco.atlassian.net/browse/ACS-6233",
"C279972": "https://alfresco.atlassian.net/browse/ACS-6233",
"C260181": "https://alfresco.atlassian.net/browse/ACS-6233",
"C297692": "https://alfresco.atlassian.net/browse/ACS-6244"
"C297692": "https://alfresco.atlassian.net/browse/ACS-6244",
"C260418": "https://alfresco.atlassian.net/browse/ACS-6425",
"C268070": "https://alfresco.atlassian.net/browse/ACS-6425",
"C272812": "https://alfresco.atlassian.net/browse/ACS-6425",
"C274704": "https://alfresco.atlassian.net/browse/ACS-6425",
"C311425": "https://alfresco.atlassian.net/browse/ACS-6425"
}
Binary file not shown.
@@ -1,107 +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.
*/
import { BrowserActions, DataTableComponentPage, LoginPage } from '@alfresco/adf-testing';
import { browser, ElementFinder } from 'protractor';
import { SearchBarPage } from '../pages/search-bar.page';
import { SearchFiltersPage } from '../pages/search-filters.page';
import { SearchResultsPage } from '../pages/search-results.page';
import { format, parse, addDays } from 'date-fns';
describe('Search Date Range Filter', () => {
const loginPage = new LoginPage();
const searchBarPage = new SearchBarPage();
const searchFilters = new SearchFiltersPage();
const dateRangeFilter = searchFilters.createdDateRangeFilterPage();
const searchResults = new SearchResultsPage();
const dataTable = new DataTableComponentPage();
beforeAll(async () => {
await loginPage.loginWithProfile('admin');
await searchBarPage.checkSearchIconIsVisible();
await searchBarPage.clickOnSearchIcon();
await searchBarPage.enterTextAndPressEnter('*');
await searchResults.dataTable.waitTillContentLoaded();
});
beforeEach(async () => {
await searchFilters.checkCreatedRangeFilterIsDisplayed();
await searchFilters.clickCreatedRangeFilterHeader();
await searchFilters.checkCreatedRangeFilterIsExpanded();
});
afterEach(async () => {
await browser.refresh();
});
it('[C277119] FROM and TO dates should depend on each other', async () => {
await dateRangeFilter.checkFromDateToggleIsDisplayed();
const fromDatePicker = await dateRangeFilter.openFromDatePicker();
await fromDatePicker.checkDatesAfterDateAreDisabled(new Date());
await fromDatePicker.closeDatePicker();
await dateRangeFilter.checkToDateToggleIsDisplayed();
let datePickerTo = await dateRangeFilter.openToDatePicker();
await datePickerTo.checkDatesAfterDateAreDisabled(new Date());
await datePickerTo.closeDatePicker();
await dateRangeFilter.checkFromDateToggleIsDisplayed();
const datePickerFrom = await dateRangeFilter.openFromDatePicker();
await datePickerFrom.selectTodayDate();
await datePickerFrom.checkDatePickerIsNotDisplayed();
await dateRangeFilter.checkToDateToggleIsDisplayed();
datePickerTo = await dateRangeFilter.openToDatePicker();
await datePickerTo.checkDatesBeforeDateAreDisabled(new Date());
await datePickerTo.checkDatesAfterDateAreDisabled(new Date());
});
it('[C277107] Should be able to apply a date range', async () => {
await dateRangeFilter.checkFromDateToggleIsDisplayed();
const datePickerToday = await dateRangeFilter.openFromDatePicker();
await datePickerToday.selectTodayDate();
await datePickerToday.checkDatePickerIsNotDisplayed();
let fromDate = await dateRangeFilter.getFromDate();
fromDate = format(parse(fromDate, 'd-MMM-yy', new Date()), 'dd-MM-yy');
await dateRangeFilter.checkApplyButtonIsDisabled();
await dateRangeFilter.checkToDateToggleIsDisplayed();
const toDatePicker = await dateRangeFilter.openToDatePicker();
await toDatePicker.selectTodayDate();
await toDatePicker.checkDatePickerIsNotDisplayed();
let toDate = await dateRangeFilter.getToDate();
toDate = format(addDays(parse(toDate, 'dd-MMM-yy', new Date()), 1), 'dd-MM-yy');
await dateRangeFilter.checkApplyButtonIsEnabled();
await dateRangeFilter.clickApplyButton();
await searchResults.sortByCreated('ASC');
const results = (await dataTable.geCellElementDetail('Created')) as ElementFinder[];
for (const currentResult of results) {
const currentDate = await BrowserActions.getAttribute(currentResult, 'title');
const currentDateFormatted = parse(currentDate, 'MMM dd, yyyy, h:mm:ss a', new Date());
await expect(currentDateFormatted <= parse(toDate, 'dd-MM-yy', new Date())).toBe(true);
await expect(currentDateFormatted >= parse(fromDate, 'dd-MM-yy', new Date())).toBe(true);
}
});
});
+9 -9
View File
@@ -155,7 +155,7 @@ describe('Search Radio Component', () => {
await searchFiltersPage.clickTypeFilterHeader();
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(13);
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(16);
await navigationBarPage.navigateToContentServices();
@@ -170,7 +170,7 @@ describe('Search Radio Component', () => {
await searchFiltersPage.clickTypeFilterHeader();
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(13);
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(16);
await navigationBarPage.navigateToContentServices();
jsonFile.categories[5].component.settings.pageSize = 9;
@@ -184,7 +184,7 @@ describe('Search Radio Component', () => {
await searchFiltersPage.clickTypeFilterHeader();
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(12);
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(15);
await searchFiltersPage.typeFiltersPage().checkShowMoreButtonIsDisplayed();
await searchFiltersPage.typeFiltersPage().checkShowLessButtonIsNotDisplayed();
@@ -213,21 +213,21 @@ describe('Search Radio Component', () => {
await searchFiltersPage.clickTypeFilterHeader();
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(8);
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(11);
await searchFiltersPage.typeFiltersPage().checkShowMoreButtonIsDisplayed();
await searchFiltersPage.typeFiltersPage().checkShowLessButtonIsNotDisplayed();
await searchFiltersPage.typeFiltersPage().clickShowMoreButton();
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(13);
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(16);
await searchFiltersPage.typeFiltersPage().checkShowMoreButtonIsNotDisplayed();
await searchFiltersPage.typeFiltersPage().checkShowLessButtonIsDisplayed();
await searchFiltersPage.typeFiltersPage().clickShowLessButton();
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(8);
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(11);
await searchFiltersPage.typeFiltersPage().checkShowMoreButtonIsDisplayed();
await searchFiltersPage.typeFiltersPage().checkShowLessButtonIsNotDisplayed();
@@ -244,21 +244,21 @@ describe('Search Radio Component', () => {
await searchFiltersPage.clickTypeFilterHeader();
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(8);
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(11);
await searchFiltersPage.typeFiltersPage().checkShowMoreButtonIsDisplayed();
await searchFiltersPage.typeFiltersPage().checkShowLessButtonIsNotDisplayed();
await searchFiltersPage.typeFiltersPage().clickShowMoreButton();
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(13);
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(16);
await searchFiltersPage.typeFiltersPage().checkShowMoreButtonIsNotDisplayed();
await searchFiltersPage.typeFiltersPage().checkShowLessButtonIsDisplayed();
await searchFiltersPage.typeFiltersPage().clickShowLessButton();
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(8);
await expect(await searchFiltersPage.typeFiltersPage().getRadioButtonsNumberOnPage()).toBe(11);
await searchFiltersPage.typeFiltersPage().checkShowMoreButtonIsDisplayed();
await searchFiltersPage.typeFiltersPage().checkShowLessButtonIsNotDisplayed();
-18
View File
@@ -17,7 +17,6 @@
import {
BrowserVisibility,
DateRangeFilterPage,
NumberRangeFilterPage,
SearchCategoriesPage,
SearchCheckListPage,
@@ -36,7 +35,6 @@ export class SearchFiltersPage {
fileSizeFilter = $('[data-automation-id="expansion-panel-SEARCH.FACET_FIELDS.SIZE"]');
nameFilter = $('[data-automation-id="expansion-panel-Name"]');
checkListFilter = $('[data-automation-id="expansion-panel-Check List"]');
createdDateRangeFilter = $('[data-automation-id="expansion-panel-Created Date (range)"]');
typeFilter = $('[data-automation-id="expansion-panel-Type"]');
sizeRangeFilter = $('[data-automation-id="expansion-panel-Content Size (range)"]');
sizeSliderFilter = $('[data-automation-id="expansion-panel-Content Size"]');
@@ -56,10 +54,6 @@ export class SearchFiltersPage {
return SearchCategoriesPage.numberRangeFilter(this.sizeRangeFilter);
}
createdDateRangeFilterPage(): DateRangeFilterPage {
return SearchCategoriesPage.dateRangeFilter(this.createdDateRangeFilter);
}
textFiltersPage(): SearchTextPage {
return SearchCategoriesPage.textFiltersPage(this.nameFilter);
}
@@ -156,18 +150,6 @@ export class SearchFiltersPage {
await this.searchCategoriesPage.checkFilterIsExpanded(this.checkListFilter);
}
async checkCreatedRangeFilterIsDisplayed(): Promise<void> {
await this.searchCategoriesPage.checkFilterIsDisplayed(this.createdDateRangeFilter);
}
async clickCreatedRangeFilterHeader(): Promise<void> {
await this.searchCategoriesPage.clickFilterHeader(this.createdDateRangeFilter);
}
async checkCreatedRangeFilterIsExpanded(): Promise<void> {
await this.searchCategoriesPage.checkFilterIsExpanded(this.createdDateRangeFilter);
}
async checkTypeFilterIsDisplayed(): Promise<void> {
await this.searchCategoriesPage.checkFilterIsDisplayed(this.typeFilter);
}
+5 -2
View File
@@ -155,7 +155,10 @@ export class SearchConfiguration {
selector: 'date-range',
settings: {
field: 'cm:created',
dateFormat: 'DD-MMM-YY'
dateFormat: 'DD-MMM-YY',
displayedLabelsByField: {
'cm:created': 'Created Date'
}
}
}
},
@@ -182,7 +185,7 @@ export class SearchConfiguration {
name: 'Date',
enabled: true,
component: {
selector: 'date-range-advanced',
selector: 'date-range',
settings: {
dateFormat: 'dd-MMM-yy',
maxDate: 'today',
+10 -97
View File
@@ -4,7 +4,7 @@ The ADF CLI provides a set of utilities to manage your ADF projects.
## Installation
To get started follow these instructions:
To get started, follow these instructions:
```bash
npm install @alfresco/adf-cli -g
@@ -41,24 +41,15 @@ In develop mode, the CLI takes the prebuilt scripts from the dist folder.
## Commands
| **Commands** |**Description** |
|--- |--- |
| --- | --- |
| changelog | Generate changelog report for two branches of git repository |
|check-cs-env |Check cs env is up |
|check-ps-env |Check ps env is up |
|check-plugin-env |Check plugin status |
|artifact-from-s3 |Get artifact from S3 |
|artifact-to-s3 |Get artifact to S3 |
|docker |Build and publish a docker image or create additional tag link |
|init-aae-env |Init env|
|init-aps-env |Init aps|
|kubectl-delete |delete kubectl |
|kubectl-image |This command allows you to update a specific service on the rancher env with a specific tag |
|npm-publish | publish on npm |
| update-commit-sha | his command allows you to update the commit sha as part of the `package.json`. Your `package.json` must to have an existing property called "commit" |
|update-version |This command allows you to update the adf dependencies and js-api with different versions Update adf libs and js-api with latest alpha|
|licenses |Create a 3th party license file |
|audit |Check the security risk dependency in your package.json |
|scan-env |Scan the environment to show its status |
| check-cs-env | Check cs env is up |
| check-plugin-env | Check plugin status |
| docker | Build and publish a docker image or create additional tag link |
| init-aae-env | Init env |
| init-aps-env | Init aps |
| licenses | Create a 3th party license file |
| audit | Check the security risk dependency in your package.json |
## Examples
@@ -138,6 +129,7 @@ adf-cli audit
```
### Docker
The command provides 2 targets 'Publish' (default value) and 'Link'
Publish target
@@ -159,77 +151,6 @@ In case you don't need to publish a new image but you would like to create a lin
adf-cli docker --target "link" --dockerRepo "${docker_repository}" --dockerTags "${TAGS}" --sourceTag "develop"
```
### Kubectl update pod image
This command allows you to update a specific service on the rancher env with a specific tag
```bash
adf-cli kubectl-image --clusterEnv ${clusterEnv} --clusterUrl ${clusterUrl} --username ${username} --token ${token} --deployName ${deployName} --dockerRepo ${dockerRepo} --tag ${tag}
```
You can use the option --installCheck to install kubectl as part of the command
### update version
This command allows you to update the adf dependencies and js-api with different versions
Update adf libs and js-api with latest alpha
```bash
adf-cli update-version --alpha --pathPackage "$(pwd)"
```
Update adf libs and js-api with latest beta
```bash
adf-cli update-version --beta --pathPackage "$(pwd)"
```
Update adf libs and js-api with latest
```bash
adf-cli update-version --latest --pathPackage "$(pwd)"
```
Update only adf libs with a specific version
```bash
adf-cli update-version --version "3.2.0-fa5916ff413131513c3e382d7f27dd9b4cfa0e7e" --pathPackage "$(pwd)"
```
Update only js-api with a specific version
```bash
adf-cli update-version --vjs "3.2.0-fa5916ff413131513c3e382d7f27dd9b4cfa0e7e" --pathPackage "$(pwd)"
```
Update adf libs and js-api with latest alpha locally
```bash
adf-cli update-version --alpha --pathPackage "$(pwd)" --skipGnu
```
### Update commit sha
This command allows you to update the commit sha as part of the `package.json`.
Your `package.json` must to have an existing property called "commit"
```bash
adf-cli update-commit-sha --pathProject "$(pwd)"
```
You can use the option --pointer to chose a different pointer from the default HEAD.
```bash
adf-cli update-commit-sha --pointer "HEAD~1" --pathProject "$(pwd)"
```
Run command locally
```bash
adf-cli update-commit-sha --pathProject "$(pwd)" --skipGnu
```
### Initialize activiti cloud env
The following command is in charge of Initializing the activiti cloud env with the default apps:
@@ -264,11 +185,3 @@ The following command is in charge of checking plugin status by given plugin nam
adf-cli check-plugin-env --host "gateway_env" --pluginName "Name of the plugin" --clientId "clientId" --appName "appName" -u "username" -p "password"
--ui "uiName"
```
### Scan the environment
The following command will scan the environment to show various information on its current status:
```bash
adf-cli scan-env --host "https://example.com" --clientId "clientId" -u "admin" -p "password"
```
+6 -365
View File
@@ -1,15 +1,15 @@
{
"name": "@alfresco/adf-cli",
"version": "6.5.0",
"version": "6.5.2",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@alfresco/adf-cli",
"version": "6.5.0",
"version": "6.5.2",
"license": "Apache-2.0",
"dependencies": {
"@alfresco/js-api": ">=7.1.0-1372",
"@alfresco/js-api": ">=7.2.0",
"commander": "^6.2.1",
"ejs": "^3.1.9",
"license-checker": "^25.0.1",
@@ -30,24 +30,15 @@
}
},
"node_modules/@alfresco/js-api": {
"version": "7.1.0-1409",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-7.1.0-1409.tgz",
"integrity": "sha512-HbA1FBkSgaibEjgeoo7o1umNksc+TiDRlG6VCZWNt5twn2MT1oJZ70TuPpl1oDdU3c34B5SHZb5gKz4vHUToWw==",
"version": "7.2.0",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-7.2.0.tgz",
"integrity": "sha512-/Tr88IO1s1cV8RC6X9EZ2jixPJ5IQQZWR6heN406l0/eqHxroXUGShRfNZxNLZBkMn0b3uiqnAxjNo2HmB+xug==",
"dependencies": {
"event-emitter": "^0.3.5",
"jsdom": "^22.1.0",
"superagent": "^8.0.9",
"tslib": "^2.6.1"
}
},
"node_modules/@tootallnate/once": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz",
"integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==",
"engines": {
"node": ">= 10"
}
},
"node_modules/@types/ejs": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/@types/ejs/-/ejs-3.1.2.tgz",
@@ -86,27 +77,11 @@
"@types/node": "*"
}
},
"node_modules/abab": {
"version": "2.0.6",
"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz",
"integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA=="
},
"node_modules/abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"node_modules/agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
"dependencies": {
"debug": "4"
},
"engines": {
"node": ">= 6.0.0"
}
},
"node_modules/ansi-styles": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
@@ -227,17 +202,6 @@
"resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.4.tgz",
"integrity": "sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw=="
},
"node_modules/cssstyle": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-3.0.0.tgz",
"integrity": "sha512-N4u2ABATi3Qplzf0hWbVCdjenim8F3ojEXpBDF5hBpjzW182MjNGLqfmQ0SkSPeQ+V86ZXgeH8aXj6kayd4jgg==",
"dependencies": {
"rrweb-cssom": "^0.6.0"
},
"engines": {
"node": ">=14"
}
},
"node_modules/d": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
@@ -247,19 +211,6 @@
"type": "^1.0.1"
}
},
"node_modules/data-urls": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz",
"integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==",
"dependencies": {
"abab": "^2.0.6",
"whatwg-mimetype": "^3.0.0",
"whatwg-url": "^12.0.0"
},
"engines": {
"node": ">=14"
}
},
"node_modules/debug": {
"version": "4.3.4",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -284,11 +235,6 @@
"node": "*"
}
},
"node_modules/decimal.js": {
"version": "10.4.3",
"resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.4.3.tgz",
"integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA=="
},
"node_modules/delayed-stream": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
@@ -306,17 +252,6 @@
"wrappy": "1"
}
},
"node_modules/domexception": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz",
"integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==",
"dependencies": {
"webidl-conversions": "^7.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/ejs": {
"version": "3.1.9",
"resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz",
@@ -331,17 +266,6 @@
"node": ">=0.10.0"
}
},
"node_modules/entities": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz",
"integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==",
"engines": {
"node": ">=0.12"
},
"funding": {
"url": "https://github.com/fb55/entities?sponsor=1"
}
},
"node_modules/es5-ext": {
"version": "0.10.62",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz",
@@ -566,53 +490,6 @@
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw=="
},
"node_modules/html-encoding-sniffer": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz",
"integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==",
"dependencies": {
"whatwg-encoding": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/http-proxy-agent": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz",
"integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==",
"dependencies": {
"@tootallnate/once": "2",
"agent-base": "6",
"debug": "4"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/https-proxy-agent": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
"dependencies": {
"agent-base": "6",
"debug": "4"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/iconv-lite": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
"integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -646,11 +523,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-potential-custom-element-name": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
"integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="
},
"node_modules/jake": {
"version": "10.8.6",
"resolved": "https://registry.npmjs.org/jake/-/jake-10.8.6.tgz",
@@ -732,61 +604,6 @@
"node": ">=8"
}
},
"node_modules/jsdom": {
"version": "22.1.0",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz",
"integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==",
"dependencies": {
"abab": "^2.0.6",
"cssstyle": "^3.0.0",
"data-urls": "^4.0.0",
"decimal.js": "^10.4.3",
"domexception": "^4.0.0",
"form-data": "^4.0.0",
"html-encoding-sniffer": "^3.0.0",
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.1",
"is-potential-custom-element-name": "^1.0.1",
"nwsapi": "^2.2.4",
"parse5": "^7.1.2",
"rrweb-cssom": "^0.6.0",
"saxes": "^6.0.0",
"symbol-tree": "^3.2.4",
"tough-cookie": "^4.1.2",
"w3c-xmlserializer": "^4.0.0",
"webidl-conversions": "^7.0.0",
"whatwg-encoding": "^2.0.0",
"whatwg-mimetype": "^3.0.0",
"whatwg-url": "^12.0.1",
"ws": "^8.13.0",
"xml-name-validator": "^4.0.0"
},
"engines": {
"node": ">=16"
},
"peerDependencies": {
"canvas": "^2.5.0"
},
"peerDependenciesMeta": {
"canvas": {
"optional": true
}
}
},
"node_modules/jsdom/node_modules/tough-cookie": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.1.3.tgz",
"integrity": "sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==",
"dependencies": {
"psl": "^1.1.33",
"punycode": "^2.1.1",
"universalify": "^0.2.0",
"url-parse": "^1.5.3"
},
"engines": {
"node": ">=6"
}
},
"node_modules/json-parse-even-better-errors": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
@@ -988,11 +805,6 @@
"resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
"integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA=="
},
"node_modules/nwsapi": {
"version": "2.2.7",
"resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.7.tgz",
"integrity": "sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ=="
},
"node_modules/object-inspect": {
"version": "1.12.3",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.3.tgz",
@@ -1034,17 +846,6 @@
"os-tmpdir": "^1.0.0"
}
},
"node_modules/parse5": {
"version": "7.1.2",
"resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz",
"integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==",
"dependencies": {
"entities": "^4.4.0"
},
"funding": {
"url": "https://github.com/inikulin/parse5?sponsor=1"
}
},
"node_modules/path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
@@ -1058,19 +859,6 @@
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
},
"node_modules/psl": {
"version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
"integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
},
"node_modules/punycode": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz",
"integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==",
"engines": {
"node": ">=6"
}
},
"node_modules/qs": {
"version": "6.11.2",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.11.2.tgz",
@@ -1085,11 +873,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/querystringify": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz",
"integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ=="
},
"node_modules/read-installed": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz",
@@ -1148,11 +931,6 @@
"node": ">= 0.10"
}
},
"node_modules/requires-port": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
"integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ=="
},
"node_modules/resolve": {
"version": "1.19.0",
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz",
@@ -1165,11 +943,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/rrweb-cssom": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz",
"integrity": "sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw=="
},
"node_modules/rxjs": {
"version": "6.6.7",
"resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz",
@@ -1186,22 +959,6 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
"node_modules/safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"node_modules/saxes": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz",
"integrity": "sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==",
"dependencies": {
"xmlchars": "^2.2.0"
},
"engines": {
"node": ">=v12.22.7"
}
},
"node_modules/semver": {
"version": "7.5.4",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
@@ -1345,22 +1102,6 @@
"node": ">=4"
}
},
"node_modules/symbol-tree": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
"integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
},
"node_modules/tr46": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz",
"integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==",
"dependencies": {
"punycode": "^2.3.0"
},
"engines": {
"node": ">=14"
}
},
"node_modules/treeify": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz",
@@ -1392,23 +1133,6 @@
"node": ">=4.2.0"
}
},
"node_modules/universalify": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.2.0.tgz",
"integrity": "sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==",
"engines": {
"node": ">= 4.0.0"
}
},
"node_modules/url-parse": {
"version": "1.5.10",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz",
"integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==",
"dependencies": {
"querystringify": "^2.1.1",
"requires-port": "^1.0.0"
}
},
"node_modules/util-extend": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz",
@@ -1423,94 +1147,11 @@
"spdx-expression-parse": "^3.0.0"
}
},
"node_modules/w3c-xmlserializer": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz",
"integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==",
"dependencies": {
"xml-name-validator": "^4.0.0"
},
"engines": {
"node": ">=14"
}
},
"node_modules/webidl-conversions": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz",
"integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==",
"engines": {
"node": ">=12"
}
},
"node_modules/whatwg-encoding": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz",
"integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==",
"dependencies": {
"iconv-lite": "0.6.3"
},
"engines": {
"node": ">=12"
}
},
"node_modules/whatwg-mimetype": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz",
"integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==",
"engines": {
"node": ">=12"
}
},
"node_modules/whatwg-url": {
"version": "12.0.1",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz",
"integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==",
"dependencies": {
"tr46": "^4.1.1",
"webidl-conversions": "^7.0.0"
},
"engines": {
"node": ">=14"
}
},
"node_modules/wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"node_modules/ws": {
"version": "8.14.2",
"resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz",
"integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==",
"engines": {
"node": ">=10.0.0"
},
"peerDependencies": {
"bufferutil": "^4.0.1",
"utf-8-validate": ">=5.0.2"
},
"peerDependenciesMeta": {
"bufferutil": {
"optional": true
},
"utf-8-validate": {
"optional": true
}
}
},
"node_modules/xml-name-validator": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz",
"integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==",
"engines": {
"node": ">=12"
}
},
"node_modules/xmlchars": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
"integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
},
"node_modules/yallist": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@alfresco/adf-cli",
"description": "Alfresco ADF cli and utils",
"version": "6.5.0",
"version": "6.5.2",
"author": "Hyland Software, Inc. and its affiliates",
"bin": {
"adf-cli": "./bin/adf-cli",
-82
View File
@@ -1,82 +0,0 @@
#!/usr/bin/env node
/*!
* @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.
*/
import { argv, exit } from 'node:process';
import { exec } from './exec';
import { logger } from './logger';
import program from 'commander';
/**
* Perform a test
*
* @param output output path
*/
function test(output: string) {
const response = exec('test !', [`-d ${output} && mkdir ${output}`], {});
logger.info(response);
}
/**
* Copy AWS S3
*
* @param artifact artifact name
*/
function awsCp(artifact: string) {
logger.info(`aws s3 cp ${artifact}`);
const response = exec(`aws s3 cp ${artifact}`, [`./s3-artifact.tmp ${artifact}`], {});
logger.info(response);
}
/**
* Zip artifact
*
* @param output output name
*/
function zipArtifact(output: string) {
logger.info(`Perform zip artifact ${output}`);
const response = exec('tar', ['-xvf', `./s3-artifact.tmp`, '-C ' + program.output], {});
logger.info(response);
}
/**
* Artifact from S3 command
*/
export default function main() {
program
.version('0.1.0')
.requiredOption('-a, --artifact [type]', ' path to the s3 artifact (tar.bz2) to download and extract')
.requiredOption('-o, --output [type]', 'directory to extract the archive to')
.parse(argv);
if (argv.includes('-h') || argv.includes('--help')) {
program.outputHelp();
return;
}
if (!program.artifact || program.artifact === '' || !program.output || program.output === '') {
exit(1);
} else if (program.artifact !== '' || program.output !== '') {
zipArtifact(program.artifact);
awsCp(program.output);
}
test(program.output);
awsCp(program.artifact);
zipArtifact(program.output);
}
-70
View File
@@ -1,70 +0,0 @@
#!/usr/bin/env node
/*!
* @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.
*/
import { argv, exit } from 'node:process';
import { exec } from './exec';
import { logger } from './logger';
import program from 'commander';
/**
* Zip artifact
*
* @param artifact artifact name
*/
function zipArtifact(artifact: string) {
logger.info(`Perform zip artifact ${artifact}`);
const response = exec(`tar cvfj ./s3-artifact.tmp -C ${program.artifact} ls ${program.artifact}`, [], {});
logger.info(response);
}
/**
* Copy to AWS S3
*
* @param output output path
*/
function awsCp(output: string) {
logger.info(`aws s3 cp ${output}`);
const response = exec('aws s3 cp', [`./s3-artifact.tmp ${output}`], {});
logger.info(response);
}
/**
* Artifact to S3 command
*/
export default function main() {
program
.version('0.1.0')
.option('-a, --artifact [type]', ' path to the artifact to archieve (tar.bz2) and upload (like ./dist)')
.option('-o, --output [type]', ' the S3 object to copy it to, like: s3://bucket-name/folder/whatever.tar.bz2')
.parse(argv);
if (argv.includes('-h') || argv.includes('--help')) {
program.outputHelp();
return;
}
if (!program.artifact || program.artifact === '' || !program.output || program.output === '') {
exit(1);
} else if (program.artifact !== '' || program.output !== '') {
zipArtifact(program.artifact);
awsCp(program.output);
}
}
+1 -1
View File
@@ -41,7 +41,7 @@ export default function main(_args: string[], workingDir: string) {
if (argv.includes('-h') || argv.includes('--help')) {
program.outputHelp();
return;
exit(0);
}
let packagePath = path.resolve(workingDir, 'package.json');
+1 -1
View File
@@ -155,7 +155,7 @@ export default function main(_args: string[], workingDir: string) {
if (argv.includes('-h') || argv.includes('--help')) {
program.outputHelp();
return;
exit(0);
}
const dir = path.resolve(program.dir || workingDir);
-80
View File
@@ -1,80 +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.
*/
import { AlfrescoApi } from '@alfresco/js-api';
import { exit, argv } from 'node:process';
const program = require('commander');
import { logger } from './logger';
const MAX_RETRY = 10;
const TIMEOUT = 60000;
let counter = 0;
/**
* Check PS environment command
*/
export default async function main() {
program
.version('0.1.0')
.description('Check Process service is up ')
.usage('check-ps-env [options]')
.option('--host [type]', 'Remote environment host adf.lab.com ')
.option('-p, --password [type]', 'password ')
.option('-u, --username [type]', 'username ')
.parse(argv);
await checkEnv();
}
/**
* Check environment
*/
async function checkEnv() {
try {
const alfrescoJsApi = new AlfrescoApi({
provider: 'BPM',
hostBpm: program.host,
contextRoot: 'alfresco'
});
await alfrescoJsApi.login(program.username, program.password);
} catch (e) {
if (e.error.code === 'ETIMEDOUT') {
logger.error('The env is not reachable. Terminating');
exit(1);
}
logger.error('Login error environment down or inaccessible');
counter++;
if (MAX_RETRY === counter) {
logger.error('Give up');
exit(1);
} else {
logger.error(`Retry in 1 minute attempt N ${counter}`);
sleep(TIMEOUT);
await checkEnv();
}
}
}
/**
* Perform a delay
*
* @param delay timeout in milliseconds
*/
function sleep(delay: number) {
const start = new Date().getTime();
while (new Date().getTime() < start + delay) {}
}
+7
View File
@@ -124,6 +124,7 @@ async function getApplications(): Promise<{ list: { entries: any[] } }> {
} catch (error) {
logger.error(`Get application by status ${error.status} `);
isValid = false;
return null;
}
}
@@ -158,6 +159,7 @@ function getDescriptors() {
} catch (error) {
logger.error(`Get Descriptors ${error.status} `);
isValid = false;
return null;
}
}
@@ -192,6 +194,7 @@ function getProjects() {
} catch (error) {
logger.error('Get Projects' + error.status);
isValid = false;
return null;
}
}
@@ -227,6 +230,7 @@ function getProjectRelease(projectId: string) {
} catch (error) {
logger.error('Get Projects Release' + error.status);
isValid = false;
return null;
}
}
@@ -297,6 +301,7 @@ function deleteProject(projectId: string) {
} catch (error) {
logger.error('Delete project error' + error.status);
isValid = false;
return null;
}
}
@@ -373,6 +378,7 @@ function deleteDescriptor(name: string) {
} catch (error) {
logger.error('Delete descriptor' + error.status);
isValid = false;
return null;
}
}
@@ -408,6 +414,7 @@ function deploy(model: any) {
} catch (error) {
logger.error('Deploy post' + error.status);
isValid = false;
return null;
}
}
+1
View File
@@ -148,6 +148,7 @@ async function lockFile(nodeId: string): Promise<NodeEntry> {
return result;
} catch (error) {
logger.error('Failed to lock file with error: ', error.stack);
return null;
}
}
+7
View File
@@ -190,6 +190,7 @@ async function hasDefaultTenant(tenantId: number, tenantName: string): Promise<b
} else {
logger.info(`Wrong configuration. Another tenant has been created with id ${tenant.id} and name ${tenant.name}`);
throwError(`Wrong configuration. Another tenant has been created with id ${tenant.id} and name ${tenant.name}`);
return false;
}
}
@@ -212,6 +213,7 @@ async function createDefaultTenant(tenantName: string) {
return tenant.id;
} catch (error) {
logger.info(`APS: not able to create the default tenant: ${JSON.parse(error.message)}` );
return null;
}
}
@@ -285,6 +287,7 @@ async function isDefaultAppDeployed(appName: string): Promise<boolean> {
return defaultApp && defaultApp.length > 0;
} catch (error) {
logger.error(`Aps app failed to import/Publish!`);
return false;
}
}
@@ -306,6 +309,7 @@ async function importPublishApp(appName: string): Promise<AppDefinitionUpdateRes
return result;
} catch (error) {
logger.error(`Aps app failed to import/Publish!`, error.message);
return null;
}
}
@@ -353,6 +357,7 @@ async function hasLicense(): Promise<boolean> {
return false;
} catch (error) {
logger.error(`Aps not able to check the license` );
return false;
}
}
@@ -378,6 +383,7 @@ async function getDefaultApsUsersFromRealm() {
return apsDefaultUsers;
} catch (error) {
logger.error(`APS: not able to fetch user: ${error.message}` );
return null;
}
}
@@ -403,6 +409,7 @@ async function isContentRepoPresent(tenantId: number, contentName: string): Prom
return !!contentRepos.data.find(repo => repo.name === contentName);
} catch (error) {
logger.error(`APS: not able to create content: ${error.message}` );
return null;
}
}
-83
View File
@@ -1,83 +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.
*/
import { logger } from './logger';
import { exec } from './exec';
export interface KubeArgs {
tag?: string;
installCheck?: boolean;
username?: string;
token?: string;
clusterEnv?: string;
clusterUrl?: string;
dockerRepo?: string;
label?: string;
namespaces?: string;
}
export const setCluster = (clusterEnv: string, clusterUrl: string) => {
logger.info('Perform set-cluster...');
const response = exec('kubectl', [`config`, `set-cluster`, `${clusterEnv}`, `--server=${clusterUrl}`], {});
logger.info(response);
};
export const setCredentials = (username: string, token: string) => {
logger.info('Perform set-credentials...');
const response = exec('kubectl', [`config`, `set-credentials`, `${username}`, `--token=${token}`], {});
logger.info(response);
};
export const setContext = (clusterEnv: string, username: string) => {
logger.info('Perform set-context...');
const response = exec('kubectl', [`config`, `set-context`, `${clusterEnv}`, `--cluster=${clusterEnv}`, `--user=${username}`], {});
logger.info(response);
};
export const useContext = (clusterEnv: string) => {
logger.info('Perform use-context...');
const response = exec('kubectl', [`config`, `use-context`, `${clusterEnv}`], {});
logger.info(response);
};
export const deletePod = (args: KubeArgs) => {
logger.info('Perform delete pods...');
const response = exec('kubectl', [`delete`, `pods`, `--all-namespaces`, `-l`, `app=${args.label}`], {});
logger.info(response);
};
export const getNamespaces = (): string[] => {
logger.info('Perform get namespaces name...');
const result = exec('kubectl', [`get`, `namespaces`, `-l`, `type=application`, `-o`, `name`], {});
// eslint-disable-next-line no-useless-escape
const namespaces = result.replace(/namespace[\/]+/g, '').split(/\r?\n/);
logger.info(`namespaces found: ${namespaces}`);
return namespaces;
};
export const getDeploymentName = (args: KubeArgs, namespace: string): string => {
logger.info('Perform get deployment name...');
const result = exec('kubectl', [`get`, `deployments`, `--namespace=${namespace}`, `-l`, `app=${args.label}`, `-o`, `name`], {});
logger.info(`deployment name: ${result}`);
return result;
};
export const setImage = (args: KubeArgs, deploymentName: string, serviceName: string, namespace: string) => {
logger.info('Perform set image...');
const response = exec('kubectl', [`set`, `image`, `--namespace=${namespace}`, `${deploymentName}`, `${serviceName}=${args.dockerRepo}:${args.tag}`], {});
logger.info(response);
};
-377
View File
@@ -1,377 +0,0 @@
#!/usr/bin/env node
/*!
* @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.
*/
import { argv, exit } from 'node:process';
import program from 'commander';
import moment from 'moment';
import { AlfrescoApi, AlfrescoApiConfig } from '@alfresco/js-api';
import { logger } from './logger';
import * as kube from './kube-utils';
export interface ConfigArgs {
rancherUsername?: string;
rancherToken?: string;
clusterEnv?: string;
clusterUrl?: string;
apps?: string;
devopsUsername: string;
devopsPassword: string;
modelerUsername: string;
modelerPassword: string;
clientId: string;
host: string;
oauth: string;
identityHost: boolean;
enableLike: boolean;
intervalTime: string;
}
/**
* Get Alfresco Api instance
*
* @param args command parameters
* @returns Alfresco Api instance
*/
function getAlfrescoJsApiInstance(args: ConfigArgs): AlfrescoApi {
const config: AlfrescoApiConfig = {
provider: 'BPM',
hostBpm: `${args.host}`,
authType: 'OAUTH',
contextRoot: 'alfresco',
oauth2: {
host: `${args.oauth}/auth/realms/alfresco`,
clientId: `${args.clientId}`,
scope: 'openid',
secret: '',
implicitFlow: false,
silentLogin: false,
redirectUri: '/'
}
};
return new AlfrescoApi(config);
}
/**
* Perform login
*
* @param username username
* @param password password
* @param alfrescoJsApi api client
*/
async function login(username: string, password: string, alfrescoJsApi: AlfrescoApi) {
logger.info(`Perform login...`);
try {
await alfrescoJsApi.login(username, password);
} catch (error) {
logger.error(`Not able to login. Credentials ${username}:${password} are not valid`);
exit(1);
}
logger.info(`Perform done...`);
}
/**
* Deletes deployment descriptor
*
* @param args command arguments
* @param apiService api client
* @param name descriptor name
*/
async function deleteDescriptor(args: ConfigArgs, apiService: AlfrescoApi, name: string) {
logger.warn(`Delete the descriptor ${name}`);
const url = `${args.host}/deployment-service/v1/descriptors/${name}`;
const pathParams = {};
const bodyParam = {};
const headerParams = {};
const formParams = {};
const queryParams = {};
const contentTypes = ['application/json'];
const accepts = ['application/json'];
try {
return await apiService.oauth2Auth.callCustomApi(
url,
'DELETE',
pathParams,
queryParams,
headerParams,
formParams,
bodyParam,
contentTypes,
accepts
);
} catch (error) {
logger.error(
`Not possible to delete the descriptor ${name} status: ${JSON.stringify(error.status)} ${JSON.stringify(error?.response?.text)}`
);
}
}
/**
* Deletes modeling project
*
* @param args arguments
* @param apiService api client
* @param projectId project id
*/
async function deleteProject(args: ConfigArgs, apiService: AlfrescoApi, projectId: string) {
logger.warn(`Delete the project ${projectId}`);
const url = `${args.host}/modeling-service/v1/projects/${projectId}`;
const pathParams = {};
const bodyParam = {};
const headerParams = {};
const formParams = {};
const queryParams = {};
const contentTypes = ['application/json'];
const accepts = ['application/json'];
try {
return await apiService.oauth2Auth.callCustomApi(
url,
'DELETE',
pathParams,
queryParams,
headerParams,
formParams,
bodyParam,
contentTypes,
accepts
);
} catch (error) {
logger.error(
`Not possible to delete the project ${projectId} status : ${JSON.stringify(error.status)} ${JSON.stringify(error?.response?.text)}`
);
}
}
/**
* Deletes modeling project by name
*
* @param args arguments
* @param apiService api client
* @param name project name
*/
async function deleteProjectByName(args: ConfigArgs, apiService: AlfrescoApi, name: string) {
logger.warn(`Get the project by name ${name}`);
const url = `${args.host}/modeling-service/v1/projects?name=${name}`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const contentTypes = ['application/json'];
const accepts = ['application/json'];
try {
const data = await apiService.oauth2Auth.callCustomApi(
url,
'GET',
pathParams,
queryParams,
headerParams,
formParams,
bodyParam,
contentTypes,
accepts
);
for (let i = 0; i < data.list.entries.length; i++) {
if (data.list.entries[i].entry.name === name) {
await deleteProject(args, apiService, data.list.entries[i].entry.id);
}
}
} catch (error) {
logger.error(`Not possible to get the project with name ${name} ` + JSON.stringify(error));
exit(1);
}
}
/**
* Get applications by name
*
* @param args command arguments
* @param apiService api client
* @param name application name
*/
async function getApplicationsByName(args: ConfigArgs, apiService: AlfrescoApi, name: string) {
logger.warn(`Get the applications by name ${name}`);
const url = `${args.host}/deployment-service/v1/applications?name=${name}`;
const pathParams = {};
const queryParams = {};
const headerParams = {};
const formParams = {};
const bodyParam = {};
const contentTypes = ['application/json'];
const accepts = ['application/json'];
try {
const apps = await apiService.oauth2Auth.callCustomApi(
url,
'GET',
pathParams,
queryParams,
headerParams,
formParams,
bodyParam,
contentTypes,
accepts
);
return apps ? apps.list.entries : [];
} catch (error) {
logger.error(`Not possible to get the applications with name ${name} ` + JSON.stringify(error));
exit(1);
}
}
/**
* Undeploy applications by name
*
* @param args command arguments
* @param apiService api client
* @param name application name
*/
async function undeployApplication(args: ConfigArgs, apiService: AlfrescoApi, name: string) {
logger.warn(`Undeploy the application ${name}`);
const url = `${args.host}/deployment-service/v1/applications/${name}`;
const pathParams = {};
const bodyParam = {};
const headerParams = {};
const formParams = {};
const queryParams = {};
const contentTypes = ['application/json'];
const accepts = ['application/json'];
try {
return await apiService.oauth2Auth.callCustomApi(
url,
'DELETE',
pathParams,
queryParams,
headerParams,
formParams,
bodyParam,
contentTypes,
accepts
);
} catch (error) {
logger.error(
`Not possible to undeploy the applications ${name} status: ${JSON.stringify(error.status)} ${JSON.stringify(error?.response?.text)}`
);
}
}
const main = async (args: ConfigArgs) => {
program
.version('0.1.0')
.description(
'The following command is in charge of cleaning the releases/application/descriptor related to an app passed as input' +
'adf-cli kubectl-clean-app --host "gateway_env" --modelerUsername "modelerusername" --modelerPassword "modelerpassword" --oauth "identity_env" --username "username" --password "password"'
)
.option('-h, --host [type]', 'Host gateway')
.option('-o, --oauth [type]', 'Host sso server')
.option('--clusterEnv [type]', 'cluster Envirorment')
.option('--clusterUrl [type]', 'cluster URL')
.option('--clientId [type]', 'sso client')
.option('--devopsUsername [type]', 'username of user with ACTIVITI_DEVOPS role')
.option('--devopsPassword [type]', 'password of user with ACTIVITI_DEVOPS role')
.option('--modelerUsername [type]', 'username of a user with role ACTIVIT_MODELER')
.option('--modelerPassword [type]', 'modeler password')
.option('--rancherUsername [type]', 'rancher username')
.option('--rancherToken [type]', 'rancher token')
.option('--apps [type]', 'Application prefix')
.option('--enableLike [boolean]', 'Enable the like for app name')
.option('--intervalTime [string]', 'In case of enableLike it specify the time related to the createDate')
.parse(argv);
if (argv.includes('-h') || argv.includes('--help')) {
program.outputHelp();
return;
}
const alfrescoJsApiModeler = getAlfrescoJsApiInstance(args);
await login(args.modelerUsername, args.modelerPassword, alfrescoJsApiModeler).then(
() => {
logger.info('login SSO ok');
},
(error) => {
logger.info(`login SSO error ${JSON.stringify(error)}`);
exit(1);
}
);
const alfrescoJsApiDevops = getAlfrescoJsApiInstance(args);
await login(args.devopsUsername, args.devopsPassword, alfrescoJsApiDevops).then(
() => {
logger.info('login SSO ok');
},
(error) => {
logger.info(`login SSO error ${JSON.stringify(error)}`);
exit(1);
}
);
if (args.apps !== undefined) {
kube.setCluster(args.clusterEnv, args.clusterUrl);
kube.setCredentials(args.rancherUsername, args.rancherToken);
kube.setContext(args.clusterEnv, args.rancherUsername);
kube.useContext(args.clusterEnv);
const applications = args.apps.includes(',') ? args.apps.split(',') : [args.apps];
const interval = args.intervalTime ? args.intervalTime : '30 min';
const extractTimeRange = parseInt(interval.split(' ')[0], 10);
logger.info(`Extract time ${extractTimeRange} from interval: ${interval}`);
for (let i = 0; i < applications.length; i++) {
logger.info(`Perform action on app: ${applications[i]}`);
if (args.enableLike) {
const applicationsByName = await getApplicationsByName(args, alfrescoJsApiDevops, applications[i]);
logger.info(`Found ${applicationsByName.length} apps`);
for (let y = 0; y < applicationsByName.length; y++) {
const application = applicationsByName[y].entry;
logger.info(`Analyze app: ${application.name} `);
const diffAsMinutes = moment.duration(moment().diff(moment(application.createdAt))).asMinutes();
if (diffAsMinutes > extractTimeRange) {
logger.info(`The app: ${application} is older than ${interval}. Can delete it`);
await undeployApplication(args, alfrescoJsApiDevops, application.name);
await deleteDescriptor(args, alfrescoJsApiDevops, application.name);
await deleteProjectByName(args, alfrescoJsApiModeler, application.name);
} else {
logger.info(`The app: ${application} is recent than ${interval}. Skip delete`);
}
}
} else {
await undeployApplication(args, alfrescoJsApiDevops, applications[i]);
await deleteDescriptor(args, alfrescoJsApiDevops, applications[i]);
await deleteProjectByName(args, alfrescoJsApiModeler, applications[i]);
}
}
}
};
export default main;
-49
View File
@@ -1,49 +0,0 @@
#!/usr/bin/env node
/*!
* @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.
*/
import { argv } from 'node:process';
import program from 'commander';
import * as kube from './kube-utils';
const main = (args: kube.KubeArgs) => {
program
.version('0.1.0')
.option('--username [type]', 'username')
.option('--password [type]', 'password')
.option('--token [type]', 'access token')
.option('--clusterEnv [type]', 'cluster Env')
.option('--clusterUrl [type]', 'cluster Url')
.option('--label [type]', 'label cluster')
.parse(argv);
if (argv.includes('-h') || argv.includes('--help')) {
program.outputHelp();
return;
}
if (args.label !== undefined) {
kube.setCluster(args.clusterEnv, args.clusterUrl);
kube.setCredentials(args.username, args.token);
kube.setContext(args.clusterEnv, args.username);
kube.useContext(args.clusterEnv);
kube.deletePod(args);
}
};
export default main;
-87
View File
@@ -1,87 +0,0 @@
#!/usr/bin/env node
/*!
* @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.
*/
import { argv } from 'node:process';
import { exec } from './exec';
import program from 'commander';
import { logger } from './logger';
import * as kube from './kube-utils';
const installPerform = () => {
logger.info('Perform install...');
const responseK8sStable = exec('curl', [`-s`, `https://storage.googleapis.com/kubernetes-release/release/stable.txt`], {}).trim();
const k8sRelease = `https://storage.googleapis.com/kubernetes-release/release/${responseK8sStable}/bin/linux/amd64/kubectl`;
exec('curl', [`LO`, `${k8sRelease}`], {});
};
const main = (args: kube.KubeArgs) => {
program
.version('0.1.0')
.description(
'This command allows you to update a specific service on the rancher env with a specific tag \n\n' +
'adf-cli kubectl-image --clusterEnv ${clusterEnv} --clusterUrl ${clusterUrl} --username ${username} --token ${token} --label ${label} --namespaces ${namespaces} --dockerRepo ${dockerRepo} --tag ${tag}'
)
.option('--tag [type]', 'tag')
.option('--installCheck [type]', 'install kube ctl')
.option('--username [type]', 'username')
.option('--clusterEnv [type]', 'cluster Env')
.option('--clusterUrl [type]', 'cluster Url')
.option('--dockerRepo [type]', 'docker Repo')
.option('--label [type]', 'pod label')
.option('--namespaces [type]', 'list of namespaces')
.parse(argv);
if (argv.includes('-h') || argv.includes('--help')) {
program.outputHelp();
return;
}
if (args.installCheck === true) {
installPerform();
}
if (args.tag !== undefined) {
kube.setCluster(args.clusterEnv, args.clusterUrl);
kube.setCredentials(args.username, args.token);
kube.setContext(args.clusterEnv, args.username);
kube.useContext(args.clusterEnv);
let namespaces: string[];
if (args.namespaces === null || args.namespaces === 'default') {
logger.info(`No namespaces provided. Fetch all of them`);
namespaces = kube.getNamespaces();
} else {
namespaces = args.namespaces.split(',');
}
namespaces.forEach((namespace) => {
logger.info(`Find deployment name based on label ${args.label} and namespace ${namespace}`);
const deploymentName = kube.getDeploymentName(args, namespace);
if (deploymentName) {
logger.info(`Found ${deploymentName}`);
kube.setImage(args, deploymentName.trim(), '*', namespace);
} else {
logger.info(`No container with the label app=${args.label} found`);
}
});
}
};
export default main;
+1 -1
View File
@@ -107,7 +107,7 @@ export default function main(_args: string[], workingDir: string) {
if (argv.includes('-h') || argv.includes('--help')) {
program.outputHelp();
return;
exit(0);
}
let packagePath = path.resolve(workingDir, 'package.json');
-173
View File
@@ -1,173 +0,0 @@
#!/usr/bin/env node
/*!
* @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.
*/
import { argv } from 'node:process';
import * as path from 'path';
import fs = require('fs');
import { exec } from './exec';
import program from 'commander';
import { logger } from './logger';
export interface PublishArgs {
tag?: string;
npmRegistry?: string;
tokenRegistry?: string;
pathProject: string;
dryrun?: boolean;
}
const projects = ['cli', 'core', 'insights', 'testing', 'content-services', 'process-services', 'process-services-cloud', 'extensions'];
/**
* Publish to NPM command
*
* @param args command arguments
* @param project project name
*/
async function npmPublish(args: PublishArgs, project: string) {
if (args.dryrun) {
logger.info(`Dry run mode, no publish will be done`);
}
if (args.npmRegistry) {
changeRegistry(args, project);
}
const version = require(`${args.pathProject}/dist/libs/${project}/package.json`).version;
const exist = npmCheckExist(project, version);
if (!exist) {
logger.info(`Publishing lib ${project} to registry ${args.npmRegistry}`);
const options = ['publish'];
if (args.tag) {
options.push('-tag');
options.push(`${args.tag}`);
}
if (args.dryrun) {
logger.info(`Dry-run npm publish. cwd: ${args.pathProject}/dist/libs/${project}`);
} else {
const response = exec('npm', options, { cwd: path.resolve(`${args.pathProject}/dist/libs/${project}`) });
logger.info(response);
if (args.npmRegistry) {
removeNpmConfig(args, project);
}
}
await sleep(30000);
} else {
logger.info(`@alfresco/adf-${project}@${version} already exist`);
}
}
/**
* Checks the library exists on npm already
*
* @param project project name
* @param version project version
* @returns `true` if given project exists on NPM, otherwise `false`
*/
function npmCheckExist(project: string, version: string): boolean {
logger.info(`Check if lib ${project} is already in npm with version ${version}`);
let exist = '';
try {
exist = exec(`npm`, [`view`, `@alfresco/adf-${project}@${version} version`]);
} catch (e) {
logger.info(`Error: '@alfresco/adf-${project}@${version} version' is not available `);
}
return exist !== '';
}
/**
* Change NPM registry
*
* @param args command parameters
* @param project project name
*/
function changeRegistry(args: PublishArgs, project: string) {
logger.info(`Change registry... to ${args.npmRegistry} `);
const folder = `${args.pathProject}/dist/libs/${project}`;
const content = `strict-ssl=true
always-auth=true
@alfresco:registry=https://${args.npmRegistry}
//${args.npmRegistry}/:_authToken="${args.tokenRegistry}"`;
try {
fs.mkdirSync(folder, { recursive: true });
fs.writeFileSync(`${folder}/.npmrc`, content);
} catch (e) {
logger.error('Cannot write file', e);
}
}
/**
* Removes custom `.npmrc` configuration file
*
* @param args command arguments
* @param project project name
*/
function removeNpmConfig(args: PublishArgs, project: string) {
logger.info(`Removing file from ${project}`);
try {
const response = exec('rm', ['.npmrc'], { cwd: path.resolve(`${args.pathProject}/dist/libs/${project}`) });
logger.info(response);
} catch (e) {
logger.error('Error removing file', e);
}
}
/**
* Publish to NPM command
*
* @param args command arguments
*/
export default async function main(args: PublishArgs) {
program
.version('0.1.0')
.description(
'Move in the folder where you have your Dockerfile and run the command \n\n adf-cli docker-publish --dockerRepo "${docker_repository}" --dockerTags "${TAGS}" --pathProject "$(pwd)'
)
.option('--tag [type]', 'tag')
.option('--npmRegistry [type]', 'npm Registry')
.option('--tokenRegistry [type]', 'token Registry')
.option('--pathProject [type]', 'pathProject')
.option('--dryrun [type]', 'dryrun')
.parse(argv);
if (argv.includes('-h') || argv.includes('--help')) {
program.outputHelp();
return;
}
for (const project of projects) {
logger.info(`======== Publishing project: ${project} ========`);
await npmPublish(args, project);
}
}
/**
* Perform a timeout
*
* @param ms timeout in milliseconds
*/
async function sleep(ms: number) {
logger.info(`Waiting for ${ms} milliseconds...`);
return new Promise((resolve) => setTimeout(resolve, ms));
}

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