diff --git a/.github/ISSUE_TEMPLATE/1-O3R-ISSUE-FORM.yaml b/.github/ISSUE_TEMPLATE/1-O3R-ISSUE-FORM.yaml index fb2210e22a..f56524ed10 100644 --- a/.github/ISSUE_TEMPLATE/1-O3R-ISSUE-FORM.yaml +++ b/.github/ISSUE_TEMPLATE/1-O3R-ISSUE-FORM.yaml @@ -26,7 +26,6 @@ body: core, create, design, - dev-tools, dynamic-content, eslint-config-otter, eslint-plugin, @@ -42,7 +41,6 @@ body: schematics, showcase, store-sync, - storybook, stylelint-plugin, styling, telemetry, diff --git a/.yarnrc.yml b/.yarnrc.yml index 15e49cea49..dfe35149ff 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -11,10 +11,6 @@ packageExtensions: "@actions/github@^6.0.0": dependencies: undici: ^5.25.4 - "@storybook/manager-api@*": - dependencies: - react: ^18.0.0 - react-dom: ^18.0.0 "@swc-node/register@^1.9.0": dependencies: "@swc/types": "*" diff --git a/apps/chrome-devtools/src/app-components/app.component.ts b/apps/chrome-devtools/src/app-components/app.component.ts index 26ac6a3116..4330c839f8 100644 --- a/apps/chrome-devtools/src/app-components/app.component.ts +++ b/apps/chrome-devtools/src/app-components/app.component.ts @@ -139,8 +139,7 @@ export class AppComponent { ]).pipe( map(([info, executions]) => executions.filter((execution) => - (execution.rulesetInformation?.linkedComponent?.name === info.componentName) - || (execution.rulesetInformation?.linkedComponents?.or.some((linkedComp) => linkedComp.name === info.componentName)) + execution.rulesetInformation?.linkedComponents?.or.some((linkedComp) => linkedComp.name === info.componentName) ) ) ); diff --git a/apps/chrome-devtools/src/app-devtools/component-panel/component-panel-pres.component.ts b/apps/chrome-devtools/src/app-devtools/component-panel/component-panel-pres.component.ts index 3519aae114..d7ebf36dd5 100644 --- a/apps/chrome-devtools/src/app-devtools/component-panel/component-panel-pres.component.ts +++ b/apps/chrome-devtools/src/app-devtools/component-panel/component-panel-pres.component.ts @@ -117,8 +117,7 @@ export class ComponentPanelPresComponent { ]).pipe( map(([info, executions]) => executions.filter((execution) => - (execution.rulesetInformation?.linkedComponent?.name === info.componentName) - || (execution.rulesetInformation?.linkedComponents?.or.some((linkedComp) => linkedComp.name === info.componentName)) + execution.rulesetInformation?.linkedComponents?.or.some((linkedComp) => linkedComp.name === info.componentName) ) ) ); diff --git a/apps/chrome-devtools/src/components/otter-component/otter-component.component.ts b/apps/chrome-devtools/src/components/otter-component/otter-component.component.ts index 35948eed59..c4f16a578b 100644 --- a/apps/chrome-devtools/src/components/otter-component/otter-component.component.ts +++ b/apps/chrome-devtools/src/components/otter-component/otter-component.component.ts @@ -105,11 +105,9 @@ export class OtterComponentComponent implements OnChanges { if (changes.rulesetExecutions) { this.librariesLinkedToRulesetExecutions = [...( new Set((this.rulesetExecutions || []) - .flatMap((execution) => { - const linkedComponent = execution.rulesetInformation?.linkedComponent; - const linkedComponents = execution.rulesetInformation?.linkedComponents?.or; - return (linkedComponents?.map((lc) => lc.library) || [linkedComponent?.library]).filter((lib): lib is string => !!lib); - }) + .flatMap((execution) => (execution.rulesetInformation?.linkedComponents?.or || []) + .map((lc) => lc.library).filter((lib): lib is string => !!lib) + ) ) )]; } diff --git a/docs/README.md b/docs/README.md index f54bfa34ed..206e1914e1 100644 --- a/docs/README.md +++ b/docs/README.md @@ -7,26 +7,24 @@ The documentation is sorted by topic but in the table below, you shall find the | Package / Tool | Description | O3r Dependencies | related documentation | | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| @o3r/analytics | Framework to capture / store and use multiple events (ui, performance etc.) in your application | @o3r/core
@o3r/dev-tools | [ANALYTICS](./analytics/ANALYTICS.md)
[TRACK_EVENTS](./analytics/TRACK_EVENTS.md) | -| @o3r/apis-manager | Service to help you communicate with your APIs | @o3r/dev-tools | [APIS_MANAGER](https://github.com/AmadeusITGroup/otter/blob/main/packages/%40o3r/apis-manager/README.md) | -| @o3r/application | Provides development tools for your Otter application | @o3r/core
@o3r/dev-tools | | +| @o3r/analytics | Framework to capture / store and use multiple events (ui, performance etc.) in your application | @o3r/core | [ANALYTICS](./analytics/ANALYTICS.md)
[TRACK_EVENTS](./analytics/TRACK_EVENTS.md) | +| @o3r/apis-manager | Service to help you communicate with your APIs | | [APIS_MANAGER](https://github.com/AmadeusITGroup/otter/blob/main/packages/%40o3r/apis-manager/README.md) | +| @o3r/application | Provides development tools for your Otter application | @o3r/core | | | @o3r/chrome-devtools | Chrome plugin to debug your Otter application | N/A | [chrome-devtools](./dev-tools/chrome-devtools.md) | -| @o3r/components | Component related features (Component replacement, CMS compatibility, helpers, pipes, debugging developer tools...)
Comes with an integrated ng builder | @o3r/analytics
@o3r/build-helpers
@o3r/configuration
@o3r/core
@o3r/dev-tools
@o3r/extractors
@o3r/localization
@o3r/logger
@o3r/schematics
@o3r/testing | [COMPONENT INTRODUCTION](./components/INTRODUCTION.md)
[COMPONENT_STYLE_OVERRIDE](./components/COMPONENT_STYLE_OVERRIDE.md)
[CONTAINER_PRESENTER](./components/CONTAINER_PRESENTER.md)
[FIXTURES](./components/FIXTURES.md)
[COMPONENT_REPLACEMENT](./components/COMPONENT_REPLACEMENT.md)
[CMS_ADAPTERS](./cms-adapters/CMS_ADAPTERS.md) | -| @o3r/configuration | Configuration related features (CMS compatibility, Configuration override, store and debugging) | @o3r/core
@o3r/dev-tools
@o3r/logger
@o3r/testing | [OVERVIEW](./configuration/OVERVIEW.md)
[CONFIGURATION_SUPPORTED_EXTRACTOR](./configuration/CONFIGURATION_SUPPORTED_EXTRACTOR.md)
[CMS_ADAPTERS](./cms-adapters/CMS_ADAPTERS.md) | +| @o3r/components | Component related features (Component replacement, CMS compatibility, helpers, pipes, debugging developer tools...)
Comes with an integrated ng builder | @o3r/analytics
@o3r/build-helpers
@o3r/configuration
@o3r/core
@o3r/extractors
@o3r/localization
@o3r/logger
@o3r/schematics
@o3r/testing | [COMPONENT INTRODUCTION](./components/INTRODUCTION.md)
[COMPONENT_STYLE_OVERRIDE](./components/COMPONENT_STYLE_OVERRIDE.md)
[CONTAINER_PRESENTER](./components/CONTAINER_PRESENTER.md)
[FIXTURES](./components/FIXTURES.md)
[COMPONENT_REPLACEMENT](./components/COMPONENT_REPLACEMENT.md)
[CMS_ADAPTERS](./cms-adapters/CMS_ADAPTERS.md) | +| @o3r/configuration | Configuration related features (CMS compatibility, Configuration override, store and debugging) | @o3r/core
@o3r/logger
@o3r/testing | [OVERVIEW](./configuration/OVERVIEW.md)
[CONFIGURATION_SUPPORTED_EXTRACTOR](./configuration/CONFIGURATION_SUPPORTED_EXTRACTOR.md)
[CMS_ADAPTERS](./cms-adapters/CMS_ADAPTERS.md) | | @o3r/core | Foundation for all the packages (interfaces, core helpers) and schematics to generate your components/services etc. | N/A | [START_NEW_APPLICATION](./core/START_NEW_APPLICATION.md)
[DEVELOPER](./core/DEVELOPER.md)
[OTTER_ANGULAR_TOOLS](./core/OTTER_ANGULAR_TOOLS.md) | | @o3r/design | Tools to generate theme from design materials | N/A | [TECHNICAL_DOCUMENTATION](./design/TECHNICAL_DOCUMENTATION.md) | -| @o3r/dev-tools | Various CLI scripts to help your CI/CD and your dependency management | N/A | [DEV_TOOLS](./dev-tools/DEV_TOOLS.md) | -| @o3r/dynamic-content | Mechanism to retrieve media and data depending on the host or a server specific url | @o3r/core
@o3r/dev-tools | [DYNAMIC_CONTENT](./dynamic-content/DYNAMIC_CONTENT.md)
[LOCALHOST_MIDDLEWARE](./dynamic-content/LOCALHOST_MIDDLEWARE.md) | +| @o3r/dynamic-content | Mechanism to retrieve media and data depending on the host or a server specific url | @o3r/core | [DYNAMIC_CONTENT](./dynamic-content/DYNAMIC_CONTENT.md)
[LOCALHOST_MIDDLEWARE](./dynamic-content/LOCALHOST_MIDDLEWARE.md) | | @o3r/eslint-plugin | In-house eslint plugins to use in your own eslint configuration | N/A | [eslint-plugin](./linter/eslint-plugin.md) | -| @o3r/extractors | Utilities to extract your application metadata to interact with your CMS | @o3r/core
@o3r/dev-tools | | -| @o3r/forms | Utilities to enhance Angular form (asynchronous decorator, additional validator, error store...) | @o3r/core
@o3r/dev-tools | [README](./forms/README.md)
[FORM_ERRORS](./forms/FORM_ERRORS.md)
[FORM_STRUCTURE](./forms/FORM_STRUCTURE.md)
[FORM_SUBMIT_AND_INTERCOMMUNICATION](./forms/FORM_SUBMIT_AND_INTERCOMMUNICATION.md)
[FORM_VALIDATION](./forms/FORM_VALIDATION.md) | -| @o3r/localization | Provide a fallback language/translation support and debug tools | @o3r/core
@o3r/dev-tools | [LOCALIZATION](./localization/LOCALIZATION.md)
[CMS_ADAPTERS](./cms-adapters/CMS_ADAPTERS.md) | +| @o3r/extractors | Utilities to extract your application metadata to interact with your CMS | @o3r/core | | +| @o3r/forms | Utilities to enhance Angular form (asynchronous decorator, additional validator, error store...) | @o3r/core | [README](./forms/README.md)
[FORM_ERRORS](./forms/FORM_ERRORS.md)
[FORM_STRUCTURE](./forms/FORM_STRUCTURE.md)
[FORM_SUBMIT_AND_INTERCOMMUNICATION](./forms/FORM_SUBMIT_AND_INTERCOMMUNICATION.md)
[FORM_VALIDATION](./forms/FORM_VALIDATION.md) | +| @o3r/localization | Provide a fallback language/translation support and debug tools | @o3r/core | [LOCALIZATION](./localization/LOCALIZATION.md)
[CMS_ADAPTERS](./cms-adapters/CMS_ADAPTERS.md) | | @o3r/logger | Bridge to target different logger (logrocket, fullstory, smartlook) with a common interface | N/A | [LOGS](./logger/LOGS.md) | | @o3r/mobile | Helpers and store to integrate Capacitor into your Otter application.
Integration with the pCloudy API for e2e testing on real devices. | @o3r/core
@o3r/logger | | -| @o3r/routing | Module to configure an Otter application's routing (POST parameter management, preloading strategy, guard recommendation) | @o3r/core
@o3r/dev-tools | [REQUEST_PARAMETERS_SERVICE](./routing/REQUEST_PARAMETERS_SERVICE.md)
[ROUTING](./routing/ROUTING.md)
[APP_SERVER_ROUTING](./routing/APP_SERVER_ROUTING.md) | -| @o3r/rules-engine | Rule engine executed on your Otter application to customize your application translations, placeholders and configs based on a json file generated by your CMS | @o3r/components
@o3r/configuration
@o3r/core
@o3r/dev-tools
@o3r/dynamic-content
@o3r/extractors
@o3r/localization
@o3r/logger
@o3r/styling | [Rules Engine documentation](./rules-engine/README.md)
[CMS_ADAPTERS](./cms-adapters/CMS_ADAPTERS.md) | -| @o3r/schematics | Basic utilities and generic rules (install, lint) reused in other package schematics | @o3r/dev-tools | -| @o3r/storybook | Utilities to integrate the Storybook framework to your Otter project | @o3r/components
@o3r/configuration
@o3r/core
@o3r/dev-tools
@o3r/localization
@o3r/styling | | +| @o3r/routing | Module to configure an Otter application's routing (POST parameter management, preloading strategy, guard recommendation) | @o3r/core | [REQUEST_PARAMETERS_SERVICE](./routing/REQUEST_PARAMETERS_SERVICE.md)
[ROUTING](./routing/ROUTING.md)
[APP_SERVER_ROUTING](./routing/APP_SERVER_ROUTING.md) | +| @o3r/rules-engine | Rule engine executed on your Otter application to customize your application translations, placeholders and configs based on a json file generated by your CMS | @o3r/components
@o3r/configuration
@o3r/core
@o3r/dynamic-content
@o3r/extractors
@o3r/localization
@o3r/logger
@o3r/styling | [Rules Engine documentation](./rules-engine/README.md)
[CMS_ADAPTERS](./cms-adapters/CMS_ADAPTERS.md) | +| @o3r/schematics | Basic utilities and generic rules (install, lint) reused in other package schematics | | | @o3r/stylelint-plugin | In-house stylint plugins to use in your own eslint configuration | N/A | [stylelint-plugin](./linter/stylelint-plugin.md) | | @o3r/styling | Styling framework to apply a theme on an Otter application at build time and runtime to support CMS customization | @o3r/core
@o3r/dynamic-content
@o3r/extractors
@o3r/schematics | [THEME](./styling/THEME.md)
[TYPOGRAPHY](./styling/TYPOGRAPHY.md)
[CMS_ADAPTERS](./cms-adapters/CMS_ADAPTERS.md) | | @o3r/telemetry | A set of helpers to retrieve tool usage metrics. | N/A | [PRIVACY NOTICE](./telemetry/PRIVACY_NOTICE.md) | diff --git a/docs/ab-testing/AB_TESTING.md b/docs/ab-testing/AB_TESTING.md index 3af64db125..0280aea6b1 100644 --- a/docs/ab-testing/AB_TESTING.md +++ b/docs/ab-testing/AB_TESTING.md @@ -261,5 +261,3 @@ You can now create A/B testing-driven rulesets . } ``` -> Note: In v10 and previously, we used `linkedComponent` property to activate a ruleset on demand. This becomes deprecated and will be removed in v12. Use `linkedComponents` instead; - diff --git a/docs/components/COMPONENT_REPLACEMENT.md b/docs/components/COMPONENT_REPLACEMENT.md index 40408e728f..b87528628d 100644 --- a/docs/components/COMPONENT_REPLACEMENT.md +++ b/docs/components/COMPONENT_REPLACEMENT.md @@ -163,7 +163,8 @@ That information is expected to be a property of the **component's configuration Since configurations **have** to have a default value, in this specific instance it must always be the **empty string**. The default presenter will be declared in the component's class. ````typescript -import { computeConfigurationName, Configuration } from '@o3r/configuration'; +import { Configuration } from '@o3r/configuration'; +import { computeItemIdentifier } from '@o3r/core'; export interface DummyContConfig extends Configuration { /** Key used to identify a custom component, if provided */ @@ -174,7 +175,7 @@ export const DUMMY_CONT_DEFAULT_CONFIG: DummyContConfig = { customDummyKey: '' } -export const DUMMY_CONT_CONFIG_ID = computeConfigurationName('DummyContConfig', '@scope/o3r-components'); +export const DUMMY_CONT_CONFIG_ID = computeItemIdentifier('DummyContConfig', '@scope/o3r-components'); ```` For more information on configuration, you can check this [documentation](../configuration/OVERVIEW.md). diff --git a/docs/components/PLACEHOLDERS.md b/docs/components/PLACEHOLDERS.md index 0febab0502..6bfce931cb 100644 --- a/docs/components/PLACEHOLDERS.md +++ b/docs/components/PLACEHOLDERS.md @@ -296,107 +296,6 @@ Thanks to the parameters map you can use fact variables with JSONPath in localiz } ``` -#### Variable support for localization variables (DEPRECATED) - -Before, localization variables could reference facts via variables instead of parameters. This feature is currently deprecated and will be removed from Otter v12 as it is replaced by the parameters explained above. - -``en-GB.json`` - -```json -{ - "o3r-increment-key": "{increment, plural, =1 {1 second has} other {{{increment}} seconds have}} elapsed since you opened the page" -} -``` - -``template.json`` - -```json -{ - "vars": { - "incrementKey": { - "type": "localisation", - "value": "o3r-increment-key", - "vars": [ - "incrementVar" - ] - }, - "incrementVar": { - "type": "fact", - "value": "increment" - } - }, - "template": "
<%= incrementKey %>
" -} -``` - -The 1-to-1 mapping between the fact name and the reference in the translation brings many inconveniences as explained below. - -> [!CAUTION] -> **Limitations** -> Today you can only make a reference to a fact with the same name. You also cannot use JSON path to resolve your fact. - -This means the following is not possible: - -``ruleset.json`` - -```json -{ - "vars": { - "incrementKey": { - "type": "localisation", - "value": "o3r-increment-key", - "vars": [ - "incrementVar" - ] - }, - "incrementVar": { - "type": "fact", - "value": "incrementFact", - "path": "$.this.is.a.json.path" - } - }, - "template": "
<%= incrementKey %>
" -} -``` - -> [!TIPS] -> **General notice** - -Keep in mind that this feature deeply binds functional facts exposed in your application to your translations. -You will need to carefully plan the way you bind your localization key to your facts to avoid messy references. - -For example, let's imagine you want a generic counter until specific events. -You will probably want to reuse your placeholder in different pages for different events: - -```json -{ - "vars": { - "titleKey": { - "type": "localisation", - "value": "o3r-event-title-key" - }, - "contentWithCounterKey": { - "type": "localisation", - "value": "o3r-event-counter-key", - "vars": [ - "increment" - ] - }, - "increment": { - "type": "fact", - "value": "increment" - } - }, - "template": "
<%= titleKey %>
<%= contentWithCounterKey %>
" -} -``` - -You might be tempted to use this generic template for all your events but the value of your counter parameter will -depend on the event itself (Easter or next Summer Holidays for example). -This means that ``increment`` might have a different value depending on the context of the page which might be tricky to -maintain and to debug. -Try to keep it as simple as possible. - ### Multiple templates in same placeholder You can use placeholder actions to target the same placeholderId with different template URLs. diff --git a/docs/core/MODULE.md b/docs/core/MODULE.md index 37997884c4..1af554cc93 100644 --- a/docs/core/MODULE.md +++ b/docs/core/MODULE.md @@ -19,7 +19,6 @@ To help developers to create their own Otter compatible module, the Otter framew - [@o3r/schematics](https://www.npmjs.com/package/@o3r/schematics): exposes helper functions to develop the module schematic features - [@o3r/extractors](https://www.npmjs.com/package/@o3r/extractors): exposes helper functions to create code metadata extractor to help in CMS communication -- [@o3r/dev-tools](https://www.npmjs.com/package/@o3r/dev-tools): provides a collection of Command Line Interfaces which can be used in CI and build workflows ## List of Otter official modules diff --git a/docs/linter/eslint-plugin/rules/matching-configuration-name.md b/docs/linter/eslint-plugin/rules/matching-configuration-name.md index 0cd0f18240..bd791308ce 100644 --- a/docs/linter/eslint-plugin/rules/matching-configuration-name.md +++ b/docs/linter/eslint-plugin/rules/matching-configuration-name.md @@ -1,6 +1,6 @@ # @o3r/matching-configuration-name -Ensures that the configuration interface name matches the first parameter of `computeConfigurationName` used beside the configuration interface to expose its ID (as generated by the configuration module). +Ensures that the configuration interface name matches the first parameter of `computeItemIdentifier` used beside the configuration interface to expose its ID (as generated by the configuration module). ## How to use diff --git a/docs/rules-engine/how-to-use/dedicated-component-ruleset.md b/docs/rules-engine/how-to-use/dedicated-component-ruleset.md index b3081fd672..91be13aa3b 100644 --- a/docs/rules-engine/how-to-use/dedicated-component-ruleset.md +++ b/docs/rules-engine/how-to-use/dedicated-component-ruleset.md @@ -89,9 +89,6 @@ prevent the execution of the Ruleset until your component is available in the pa ] } ``` -> [!INFO] -> In v10 and the previous version, the Otter framework exposed the `linkedComponent` property to activate a ruleset on demand. -> This is now deprecated and will be removed in v12. Use `linkedComponents` instead. ## How it works diff --git a/eslint.shared.config.mjs b/eslint.shared.config.mjs index 72625e610f..e78be10f42 100644 --- a/eslint.shared.config.mjs +++ b/eslint.shared.config.mjs @@ -168,10 +168,7 @@ export default [ { allowAfterThis: true, allow: [ - '_OTTER_DEVTOOLS_', - '__OTTER_STORYBOOK_STYLE_METADATA__', - '__OTTER_STORYBOOK_LOCALIZATION_METADATA__', - '__OTTER_STORYBOOK_CONFIGURATION_METADATA__' + '_OTTER_DEVTOOLS_' ] } ] diff --git a/package.json b/package.json index 0a9226c45f..d62f53822d 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "test-int": "yarn nx run-many --target=test-int", "postinstall": "husky && yarn build:lint && yarn harmonize:version && yarn update-yarn-sdks", "update-yarn-sdks": "node -e \"'pnp' !== '$(yarn config get nodeLinker)' || process.exit(1)\" || yarn dlx @yarnpkg/sdks", - "build:storybook": "yarn doc:generate:json && yarn ng run storybook:extract-style && build-storybook", "clear": "rimraf -g './{packages,tools,apps}/{@*/,}{amaterasu/,}*/{dist,build,dist-*}/'", "set:version": "yarn o3r-set-version --placeholder 0.0.0-placeholder --include '{apps,packages}/**/dist/{package,manifest}.json'", "harmonize:version": "eslint '**/package.json*' '.yarnrc.yml' --quiet --fix", @@ -38,7 +37,6 @@ "doc:generate": "rimraf ./generated-doc && yarn doc:root && yarn doc:packages && yarn doc-links --docs ./docs --generated-doc ./generated-doc", "doc:generate:json": "yarn update-doc-summary ./docs && yarn compodoc -e json -d .", "start:modules": "yarn run build:dev:modules && yarn run watch:modules", - "storybook": "yarn doc:generate:json && yarn ng run storybook:extract-style && start-storybook -p 6006", "verdaccio:start": "docker run -d -it --rm --name verdaccio -p 4873:4873 -v \"$(yarn get:current-dir)/.verdaccio/conf\":/verdaccio/conf verdaccio/verdaccio", "verdaccio:start-local": "npx --yes verdaccio --config \"$(yarn get:current-dir)/.verdaccio/conf/config-without-docker.yaml\" --listen http://127.0.0.1:4873", "verdaccio:start-persistent": "docker run -d -it --rm --name verdaccio -p 4873:4873 -v \"$(yarn get:current-dir)/.verdaccio/conf\":/verdaccio/conf -v \"$(yarn get:current-dir)/.verdaccio/storage\":/verdaccio/storage:z verdaccio/verdaccio", @@ -253,8 +251,6 @@ "postcss-scss": "~4.0.9", "prism-themes": "^1.9.0", "prismjs": "^1.28.0", - "react": "^18.0.0", - "react-dom": "^18.0.0", "replace-in-files-cli": "^2.2.0", "rimraf": "^6.0.1", "sass": "~1.81.0", diff --git a/packages/@ama-sdk/client-angular/src/api-angular-client.ts b/packages/@ama-sdk/client-angular/src/api-angular-client.ts index f3589f6152..7f85d93f1e 100644 --- a/packages/@ama-sdk/client-angular/src/api-angular-client.ts +++ b/packages/@ama-sdk/client-angular/src/api-angular-client.ts @@ -169,8 +169,7 @@ export class ApiAngularClient implements ApiClient { exception = new EmptyResponseError(e.message || 'Fail to Fetch', undefined, { apiName, operationId, url, origin }); } - // eslint-disable-next-line no-console -- `console.error` is supposed to be the default value if the `options` argument is not provided, can be removed in Otter v12. - const reviver = getResponseReviver(revivers, response, operationId, { disableFallback: this.options.disableFallback, log: console.error }); + const reviver = getResponseReviver(revivers, response, operationId, { disableFallback: this.options.disableFallback }); const replyPlugins = this.options.replyPlugins ? this.options.replyPlugins.map((plugin) => plugin.load({ dictionaries: root && root.dictionaries, diff --git a/packages/@ama-sdk/core/src/clients/api-angular-client.ts b/packages/@ama-sdk/core/src/clients/api-angular-client.ts index a0d6f0eb11..390ce71bf3 100644 --- a/packages/@ama-sdk/core/src/clients/api-angular-client.ts +++ b/packages/@ama-sdk/core/src/clients/api-angular-client.ts @@ -193,8 +193,7 @@ export class ApiAngularClient implements ApiClient { exception = new EmptyResponseError(e.message || 'Fail to Fetch', undefined, { apiName, operationId, url, origin }); } - // eslint-disable-next-line no-console -- `console.error` is supposed to be the default value if the `options` argument is not provided, can be removed in Otter v12. - const reviver = getResponseReviver(revivers, response, operationId, { disableFallback: this.options.disableFallback, log: console.error }); + const reviver = getResponseReviver(revivers, response, operationId, { disableFallback: this.options.disableFallback }); const replyPlugins = this.options.replyPlugins ? this.options.replyPlugins.map((plugin) => plugin.load({ dictionaries: root && root.dictionaries, diff --git a/packages/@ama-sdk/core/src/fwk/api.helpers.ts b/packages/@ama-sdk/core/src/fwk/api.helpers.ts index 2765e5a480..0271449538 100644 --- a/packages/@ama-sdk/core/src/fwk/api.helpers.ts +++ b/packages/@ama-sdk/core/src/fwk/api.helpers.ts @@ -115,7 +115,7 @@ export function tokenizeRequestOptions(tokenizedUrl: string, queryParameters: { * @param endpoint * @param options `{ disableFallback: false, log: console.error }` by default * @param options.disableFallback `false` by default - * @param options.log `() => {}` by default -- warning: default value will change to `console.error` in Otter v12. + * @param options.log `console.error` by default */ export function getResponseReviver( revivers: { [statusCode: number]: ReviverType | undefined } | undefined | ReviverType, @@ -124,7 +124,7 @@ export function getResponseReviver( options?: { disableFallback?: boolean; log?: (...args: any[]) => void } ): ReviverType | undefined { // eslint-disable-next-line no-console -- set as default value - const { disableFallback = false, log: logMsg = options ? () => {} : console.error } = options ?? {}; + const { disableFallback = false, log: logMsg = console.error } = options ?? {}; const logPrefix = `API status code error for ${endpoint || 'unknown'} endpoint`; if (!response || !response.ok) { return undefined; diff --git a/packages/@ama-sdk/schematics/README.md b/packages/@ama-sdk/schematics/README.md index 6ad2c945a1..e785549051 100644 --- a/packages/@ama-sdk/schematics/README.md +++ b/packages/@ama-sdk/schematics/README.md @@ -4,11 +4,7 @@ [![Bundle Size](https://img.shields.io/bundlephobia/min/@ama-sdk/schematics?color=green&style=for-the-badge)](https://www.npmjs.com/package/@ama-sdk/schematics) This package provides `schematics` generators to create an SDK based on an OpenAPI specifications. -There are two SDK generators in the Otter Framework: Typescript and Java. The Java generator is currently in maintenance -mode and only the Typescript generator is actively supported and will see future evolutions. - -- [Typescript SDK](#typescript-sdk) -- [Java SDK](#java-client-core-sdk) +The Otter framework provides a Typescript SDK generator. ## Typescript SDK @@ -287,21 +283,6 @@ For more information on the generated SDK and how the framework supports differe - [Generated SDK hierarchy and extension](https://github.com/AmadeusITGroup/otter/blob/main/docs/api-sdk/SDK_MODELS_HIERARCHY.md) - [Composition and Inheritance support](https://github.com/AmadeusITGroup/otter/blob/main/docs/api-sdk/COMPOSITION_INHERITANCE.md) -## Java Client Core SDK - -> [!WARNING] -> This feature is on maintenance mode and will see no future evolution - -Generate a Java Client Core SDK: - -Make sure to have a `./swagger-spec.yaml` file at the root of your project and run: - -```shell -yarn schematics @ama-sdk/schematics:java-client-core --spec-path ./swagger-spec.yaml --swagger-config-path ./swagger-codegen-config.json -``` - -[Default swagger config](schematics/java/client-core/swagger-codegen-java-client/config/swagger-codegen-config.json) will be used if `--swagger-config-path` is not provided. - ## Command Line Interface This package also comes with CLI scripts that can facilitate the upgrade and publication of an SDK. diff --git a/packages/@ama-sdk/schematics/collection.json b/packages/@ama-sdk/schematics/collection.json index a82ba3ccd7..6c68625a9c 100644 --- a/packages/@ama-sdk/schematics/collection.json +++ b/packages/@ama-sdk/schematics/collection.json @@ -31,11 +31,6 @@ "description": "Generate a typescript SDK repository shell", "factory": "./schematics/typescript/shell/index#ngGenerateTypescriptSDK", "schema": "./schematics/typescript/shell/schema.json" - }, - "java-client-core": { - "description": "[Deprecated - Removed in v12] Generate a Java SDK source code based on swagger specification", - "factory": "./schematics/java/client-core/index#ngGenerateJavaClientCore", - "schema": "./schematics/java/client-core/schema.json" } } } diff --git a/packages/@ama-sdk/schematics/package.json b/packages/@ama-sdk/schematics/package.json index 2a08e45e71..0c7608c896 100644 --- a/packages/@ama-sdk/schematics/package.json +++ b/packages/@ama-sdk/schematics/package.json @@ -17,9 +17,8 @@ "postbuild": "patch-package-json-main", "build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest", "install-swagger-cli": "mvn install:install-file -DgroupId=io.swagger -DartifactId=swagger-codegen-cli -Dversion=2.4.0-AMADEUS -Dpackaging=jar -Dfile=./schematics/resources/swagger-codegen-cli.jar", - "build:swagger": "yarn install-swagger-cli && run-p 'build:swagger-*' 'build:openapi-*'", + "build:swagger": "yarn install-swagger-cli && run-p 'build:openapi-*'", "build:openapi-typescript-gen": "mvn clean package -f ./schematics/typescript/core/openapi-codegen-typescript/pom.xml", - "build:swagger-java-client-gen": "mvn clean package -f ./schematics/java/client-core/swagger-codegen-java-client/pom.xml", "build:cli": "tsc -b tsconfig.cli.json --pretty && yarn generate-cjs-manifest", "prepare:publish": "prepare-publish ./dist" }, diff --git a/packages/@ama-sdk/schematics/schematics/code-generator/swagger-java-generator/swagger-java.generator.ts b/packages/@ama-sdk/schematics/schematics/code-generator/swagger-java-generator/swagger-java.generator.ts deleted file mode 100644 index 2fbb38a08e..0000000000 --- a/packages/@ama-sdk/schematics/schematics/code-generator/swagger-java-generator/swagger-java.generator.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { - spawn, - SpawnOptions, -} from 'node:child_process'; -import * as path from 'node:path'; -import { - CodeGenerator, -} from '../code-generator'; -import { - defaultOptions, - JavaGeneratorTaskOptions, -} from './swagger-java.options'; - -/** - * Manage the schematic to generate a sdk using the Swagger 2 Generator - * Note: a working java setup compatible with Swagger 2 Generator is required to use this class - * @deprecated to be removed in v12 - */ -export class SwaggerJavaGenerator extends CodeGenerator { - /** @inheritDoc */ - protected generatorName = 'java-generator'; - - /** @inheritDoc */ - protected getDefaultOptions = () => defaultOptions; - /** @inheritDoc */ - protected runCodeGeneratorFactory(factoryOptions: { rootDirectory?: string } = {}) { - const rootDirectory = factoryOptions.rootDirectory || process.cwd(); - return async (generatorOptions?: JavaGeneratorTaskOptions) => { - if (!generatorOptions) { - return Promise.reject(new Error('Missing options')); - } - const spawnOptions = { - stdio: 'inherit', - shell: true, - cwd: rootDirectory - } as const satisfies SpawnOptions; - const codegenPath = path.join(generatorOptions.targetFolder, `${generatorOptions.codegenLanguage}-${generatorOptions.codegenFileName}`); - const cliPath = path.resolve(__dirname, '..', '..', 'resources', generatorOptions.cliFilename); - - const args = [ - '-cp', - codegenPath + path.delimiter + cliPath, - 'io.swagger.codegen.SwaggerCodegen', - 'generate', - '-l', - generatorOptions.codegenLanguage, - '-i', - generatorOptions.specPath, - '-o', - generatorOptions.outputPath - ]; - - if (!generatorOptions.apiTests) { - args.push('-DapiTests=false'); - } - - if (generatorOptions.specConfigPath) { - args.push(`-c=${generatorOptions.specConfigPath}`); - } - - return new Promise((resolve, reject) => { - spawn('java', args, spawnOptions) - .on('close', (code: number) => { - if (code === 0) { - resolve(); - } else { - reject(new Error(`Java generator failed with status ${code}`)); - } - }); - }); - }; - } -} diff --git a/packages/@ama-sdk/schematics/schematics/code-generator/swagger-java-generator/swagger-java.options.ts b/packages/@ama-sdk/schematics/schematics/code-generator/swagger-java-generator/swagger-java.options.ts deleted file mode 100644 index 56af474245..0000000000 --- a/packages/@ama-sdk/schematics/schematics/code-generator/swagger-java-generator/swagger-java.options.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - CodegenTaskOptions, -} from '../code-generator'; - -/** - * Options for the generator-java task. - */ -export type JavaGeneratorTaskOptions = CodegenTaskOptions & { - targetFolder: string; - /** - * Enable API testing in Swagger Codegen - * @default true - */ - apiTests: boolean; - /** - * Path to the Swagger CLI - * @default 'swagger-codegen-cli.jar' - */ - cliFilename: string; - /** - * Path to the Swagger Codegen - * @default 'swagger-codegen.jar' - */ - codegenFileName: string; - /** - * Template language use for the codegen - * @default 'default' - */ - codegenLanguage: string; -}; - -/** - * Default options to generate a JAVA sdk using the Swagger 2 Generator - */ -export const defaultOptions: Readonly = { - apiTests: true, - targetFolder: './', - cliFilename: 'swagger-codegen-cli.jar', - codegenFileName: 'swagger-codegen.jar', - codegenLanguage: 'default', - specPath: 'swagger-spec.yaml', - outputPath: '.', - specConfigPath: '' -} as const; diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/index.spec.ts b/packages/@ama-sdk/schematics/schematics/java/client-core/index.spec.ts deleted file mode 100644 index 78988c116c..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/index.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import * as path from 'node:path'; -import { - Tree, -} from '@angular-devkit/schematics'; -import { - SchematicTestRunner, -} from '@angular-devkit/schematics/testing'; - -const collectionPath = path.join(__dirname, '..', '..', '..', 'collection.json'); - -describe('Java Core Generator', () => { - it('should work correctly', async () => { - const runner = new SchematicTestRunner('@ama-sdk/schematics', collectionPath); - const tree = await runner.runSchematic('java-client-core', { - specPath: path.join(__dirname, '..', '..', '..', 'testing', 'MOCK_swagger.yaml') - }, Tree.empty()); - - expect(tree.files.length).toBeGreaterThan(0); - }); -}); diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/index.ts b/packages/@ama-sdk/schematics/schematics/java/client-core/index.ts deleted file mode 100644 index db8ad6ee4e..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/index.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { - promises as fs, -} from 'node:fs'; -import * as path from 'node:path'; -import { - chain, - Rule, - SchematicContext, - Tree, -} from '@angular-devkit/schematics'; -import { - SwaggerJavaGenerator, -} from '../../code-generator/swagger-java-generator/swagger-java.generator'; -import { - treeGlob, -} from '../../helpers/tree-glob'; -import { - NgGenerateJavaClientCoreSchematicsSchema, -} from './schema'; - -/** Base path where to find codegen jars */ -const jarBasePath = path.resolve(__dirname, 'swagger-codegen-java-client', 'target'); - -/** - * Generate a Java client SDK source code base on swagger specification - * @param options - */ -function ngGenerateJavaClientCoreFn(options: NgGenerateJavaClientCoreSchematicsSchema): Rule { - const specPath = path.resolve(process.cwd(), options.specPath); - /** - * rule to clear previous SDK generation - * @param tree - * @param context - */ - const clearGeneratedCode = async (tree: Tree, context: SchematicContext) => { - const swaggerConfig = options.specConfigPath ? JSON.parse(await fs.readFile(options.specConfigPath, { encoding: 'utf8' })) as Record : undefined; - if (swaggerConfig?.additionalProperties) { - const modelPackage = swaggerConfig.additionalProperties?.basePackage; - if (modelPackage) { - context.logger.info('Remove previously generated base models'); - treeGlob(tree, path.join('src', 'main', 'java', ...modelPackage.split('.'), '**', '*.java')).forEach((file) => tree.delete(file)); - } - - const apiInterfacesPackage = swaggerConfig.additionalProperties.endpointsPackage; - if (apiInterfacesPackage) { - context.logger.info('Remove previously generated API interfaces'); - treeGlob(tree, path.join('src', 'main', 'java', ...apiInterfacesPackage.split('.'), '**', '*.java')).forEach((file) => tree.delete(file)); - } - - const apiImplPackage = swaggerConfig.additionalProperties.endpointsImplPackage; - if (apiImplPackage) { - context.logger.info('Remove previously generated API implementations'); - treeGlob(tree, path.join('src', 'main', 'java', ...apiImplPackage.split('.'), '**', '*.java')).forEach((file) => tree.delete(file)); - } - } - - context.logger.info('Remove previously generated doc'); - treeGlob(tree, path.join('docs', '**')).forEach((file) => tree.delete(file)); - if (tree.exists('/README.md')) { - context.logger.info('Remove previously generated readme'); - tree.delete('/README.md'); - } - return () => tree; - }; - - /** - * rule to update readme and generate mandatory code source - * @param tree - */ - const generateSource = async (tree: Tree) => { - const specContent = await fs.readFile(path.resolve(process.cwd(), options.specPath), { encoding: 'utf8' }); - if (tree.exists('/swagger-spec.yaml')) { - tree.overwrite('/swagger-spec.yaml', specContent); - } else { - tree.create('/swagger-spec.yaml', specContent); - } - - return () => tree; - }; - - return chain([ - clearGeneratedCode, - generateSource, - (new SwaggerJavaGenerator()).getGeneratorRunSchematic({ - targetFolder: jarBasePath, - specPath, - codegenLanguage: 'javaClient', - apiTests: false, - specConfigPath: options.specConfigPath || undefined - }) - ]); -} - -/** - * Generate a Java client SDK source code base on swagger specification - * @deprecated Remove in otter v12 - * @param options - */ -export const ngGenerateJavaClientCore = (options: NgGenerateJavaClientCoreSchematicsSchema) => async () => { - const { createSchematicWithMetricsIfInstalled } = await import('@o3r/schematics'); - return createSchematicWithMetricsIfInstalled(ngGenerateJavaClientCoreFn)(options); -}; diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/schema.json b/packages/@ama-sdk/schematics/schematics/java/client-core/schema.json deleted file mode 100644 index 6cdd28ce65..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/schema.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "NgGenerateJavaClientCoreSchematicsSchema", - "title": "Generate Java Client", - "description": "ng generate java-client-core", - "properties": { - "specPath": { - "type": "string", - "description": "Path to the swagger specification used to generate the SDK", - "x-prompt": "Swagger Spec file to generate the SDK", - "$default": { - "$source": "argv", - "index": 0 - } - }, - "specConfigPath": { - "type": "string", - "description": "Swagger config file\nMore info: https://openapi-generator.tech/docs/generators/java/#config-options" - } - }, - "additionalProperties": true, - "required": [ - "specPath" - ] -} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/schema.ts b/packages/@ama-sdk/schematics/schematics/java/client-core/schema.ts deleted file mode 100644 index 04c2935877..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/schema.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { - SchematicOptionObject, -} from '@o3r/schematics'; - -export interface NgGenerateJavaClientCoreSchematicsSchema extends SchematicOptionObject { - /** Path to the swagger specification used to generate the SDK */ - specPath: string; - - /** Swagger config file */ - specConfigPath?: string | undefined; -} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/.gitignore b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/.gitignore deleted file mode 100644 index 16c20927ab..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/.gitignore +++ /dev/null @@ -1,11 +0,0 @@ -# Output directory -/test-sdk -/~ - -# IDE -*.iml - -.classpath -.project -.factorypath -.settings diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/README.md b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/README.md deleted file mode 100644 index 7324a4b77a..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/README.md +++ /dev/null @@ -1,105 +0,0 @@ -# Swagger Codegen for the javaClient library [Deprecated] - -> [!WARN] -> This project is no longer maintained and is now fully deprecated. We intend to delete it from Otter v12 -> It is based on old version of the SwaggerCodegen tool which is not even compatible with today's standard. - -## Overview -This is a boilerplate project to generate your own client library with Swagger. Its goal is -to get you started with the basic plumbing so you can put in your own logic. It won't work without -your changes applied. - -## What's Swagger? -The goal of Swaggerâ„¢ is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. When properly defined via Swagger, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interfaces have done for lower-level programming, Swagger removes the guesswork in calling the service. - - -Check out [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) for additional information about the Swagger project, including additional libraries with support for other languages and more. - -## How do I use this? -At this point, you've likely generated a client setup. It will include something along these lines: - -``` -. -|- README.md // this file -|- pom.xml // build script -|-- src -|--- main -|---- java -|----- com.amadeus.swagger.codegen.javaclient.CustomJavaClientCodegen.java // generator file -|---- resources -|----- javaClient // template files -|----- config -|------- swagger-codegen-config.json // language generation config file -|----- META-INF -|------ services -|------- io.swagger.codegen.CodegenConfig -``` - -You _will_ need to make changes in at least the following: - -`CustomJavaClientCodegen.java` - -Templates in this folder: - -`src/main/resources/javaClient` - -Once modified, you can run this: - -``` -mvn package -``` - -In your generator project. A single jar file will be produced in `target`. You can now use that with codegen: - -``` -java -cp /path/to/swagger-codegen-distribution:/path/to/your/jar io.swagger.codegen.Codegen -l javaClient -c "path/to/language/config/file/swagger-codegen-config.json" -o ./test-sdk -``` - -Now your templates are available to the client generator and you can write output values - -## But how do I modify this? -The `CustomJavaClientCodegen.java` has comments in it--lots of comments. There is no good substitute -for reading the code more, though. See how the `CustomJavaClientCodegen` implements `CodegenConfig`. -That class has the signature of all values that can be overridden. - -For the templates themselves, you have a number of values available to you for generation. -You can execute the `java` command from above while passing different debug flags to show -the object you have available during client generation: - -``` -# The following additional debug options are available for all codegen targets: -# -DdebugSwagger prints the OpenAPI Specification as interpreted by the codegen -# -DdebugModels prints models passed to the template engine -# -DdebugOperations prints operations passed to the template engine -# -DdebugSupportingFiles prints additional data passed to the template engine - -java -DdebugOperations -cp /path/to/swagger-codegen-distribution:/path/to/your/jar io.swagger.codegen.Codegen -l javaClient -c "path/to/language/config/file/swagger-codegen-config.json" -o ./test-sdk -``` - -Will, for example, output the debug info for operations. You can use this info -in the `api.mustache` file. - -### swagger-codegen-config.json - -Example of swagger-codegen-config.json -``` json -{ - "modelPackage" : "com.company.api", - "apiPackage" : "com.company.api", - "invokerPackage" : "com.company.api", - "generateApiTests": "false", - "groupId" : "com.company.api", - "artifactId" : "dapi-client-sdk", - "dateLibrary" : "java8", - "java8": true, - "hideGenerationTimestamp": true, - "additionalProperties": { - "endpointsImplPackage": "com.company.api.api.impl", - "endpointsPackage": "com.company.api.api.interfaces", - "basePackage": "com.company.api.model.base", - "corePackage": "com.company.api.model.core", - "sdkCorePackage": "com.company.sdk.core", - "sdkUtilsPackage": "com.company.sdk.utils" - } -} -``` diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/config/swagger-codegen-config.json b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/config/swagger-codegen-config.json deleted file mode 100644 index a301856963..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/config/swagger-codegen-config.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "modelPackage" : "com.amadeus.dapi", - "apiPackage" : "com.amadeus.dapi", - "invokerPackage" : "com.amadeus.dapi", - "generateApiTests": "false", - "groupId" : "com.amadeus.dapi", - "artifactId" : "dapi-client-sdk", - "dateLibrary" : "java8", - "java8": true, - "hideGenerationTimestamp": true, - "additionalProperties": { - "endpointsImplPackage": "com.amadeus.dapi.api.impl", - "endpointsPackage": "com.amadeus.dapi.api.interfaces", - "basePackage": "com.amadeus.dapi.model.base", - "corePackage": "com.amadeus.dapi.model.core", - "sdkCorePackage": "com.amadeus.des.sdk.core", - "sdkUtilsPackage": "com.amadeus.des.sdk.utils" - } -} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/pom.xml b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/pom.xml deleted file mode 100644 index 600c19dbc0..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/pom.xml +++ /dev/null @@ -1,154 +0,0 @@ - - 4.0.0 - io.swagger - javaClient-swagger-codegen - jar - javaClient-swagger-codegen - ${project.version} - - 2.2.0 - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - unpack-templates - process-classes - - unpack - - - - - io.swagger - swagger-codegen-cli - 2.4.0-AMADEUS - jar - false - ${project.build.directory}/default-templates - Java/**/*.mustache - - - - - - - - org.apache.maven.plugins - maven-resources-plugin - - - copy-templates - process-classes - - copy-resources - - - ${project.build.directory}/classes/javaClient - false - - - ${project.build.directory}/default-templates/Java - - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.2 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - pertest - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.6 - - - - jar - test-jar - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.13.0 - - 1.8 - 1.8 - - - - - - - io.swagger - swagger-codegen-cli - ${swagger-codegen-version} - provided - - - - 2.4.0-AMADEUS - 1.0.0 - 4.8.1 - 1.0.0 - 0.0.0 - ${project.name} - - diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/java/com/amadeus/swagger/codegen/javaclient/CustomJavaClientCodegen.java b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/java/com/amadeus/swagger/codegen/javaclient/CustomJavaClientCodegen.java deleted file mode 100644 index 5d6f10b110..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/java/com/amadeus/swagger/codegen/javaclient/CustomJavaClientCodegen.java +++ /dev/null @@ -1,553 +0,0 @@ -package com.amadeus.swagger.codegen.javaclient; - -import java.io.IOException; -import java.nio.file.*; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.stream.*; - -import com.google.common.base.CaseFormat; - -import io.swagger.codegen.CodegenModel; -import io.swagger.codegen.CodegenProperty; -import org.apache.commons.lang3.StringUtils; - -import io.swagger.codegen.CodegenConfig; -import io.swagger.codegen.CodegenOperation; -import io.swagger.codegen.CodegenParameter; -import io.swagger.codegen.SupportingFile; -import io.swagger.codegen.languages.JavaClientCodegen; -import io.swagger.models.HttpMethod; -import io.swagger.models.Model; -import io.swagger.models.ModelImpl; -import io.swagger.models.Operation; -import io.swagger.models.Path; -import io.swagger.models.Swagger; -import io.swagger.models.parameters.Parameter; -import io.swagger.models.properties.Property; - -public class CustomJavaClientCodegen extends JavaClientCodegen implements CodegenConfig { - - /** - * Extension of standard Java swagger code generator, to adhere to SOLID - * principles (https://en.wikipedia.org/wiki/SOLID_(object-oriented_design) - * - *

- * S: extract URL manipulations to a separate utility class URLUtils - *

- * I/D: create interfaces for APIs, to depend on abstractions. The APiClient - * implementation is renamed to DefaultApiClient. - */ - - public static final String FILE_SEPARATOR = java.nio.file.FileSystems.getDefault().getSeparator(); - - private LambdaHelper lambdaHelper = new LambdaHelper(); - - /** - * Operation vendor extension: wrapper model class simple name (ex: - * MyOperationRequest) - */ - private static final String X_REQUEST_WRAPPER_MODEL_TYPE = "x-request-wrapper-model-type"; - - /** - * Parameters vendor extension: value of parameter via calling getter on wrapper - * object (ex: request.getParam1()) - */ - private static final String X_REQUEST_UNWRAPPED_PARAM_VALUE = "x-request-unwrapped-param-value"; - - /** - * Parameters vendor extension: value of parameter in camel case - * ("parameterName" to "ParameterName") - */ - private static final String X_PARAM_NAME_IN_CAMEL_CASE = "x-param-name-in-camel-case"; - - public static final String SETTER_SUFFIX_FOR_ENUM_LISTS = "FromStrings"; - - public static final String ENDPOINTS_IMPL_PACKAGE = "endpointsImplPackage"; - protected String endpointsImplPackage = "com.amadeus.dapi.api.impl"; - - public static final String ENDPOINTS_PACKAGE = "endpointsPackage"; - protected String endpointsPackage = "com.amadeus.dapi.api.interfaces"; - - public static final String CORE_PACKAGE = "corePackage"; - protected String corePackage = "com.amadeus.dapi.model.core"; - - public static final String BASE_PACKAGE = "basePackage"; - protected String basePackage = "com.amadeus.dapi.model.base"; - - public static final String EXCLUDE_WRAPPED_INTERFACES = "excludeWrappedInterfaces"; - protected boolean shouldExcludeWrappedInterfaces = false; - - public static final String EXCLUDE_IMPL = "excludeImpl"; - protected boolean shouldExcludeImpl = false; - - private List postProcessConfigs; - - public CustomJavaClientCodegen() { - super(); - // Override the output folder and template location - setLibrary(null); - setOutputDir("generated-code/javaClient"); - setTemplateDir("javaClient"); - - embeddedTemplateDir = "javaClient"; - postProcessConfigs = new ArrayList<>(); - } - - /** - * {@inheritDoc} - */ - @Override - public String getName() { - return "javaClient"; - } - - /** - * {@inheritDoc} - */ - @Override - public String getHelp() { - return "Generates a Java client library."; - } - - /** - * Ignore the gradle-related files, and add new supporting files. - */ - @Override - public void processOpts() { - super.processOpts(); - - additionalProperties.put("uppercaseFirst", new LambdaHelper.UppercaseFirstLambda()); - additionalProperties.put("removeDuplicateLines", new LambdaHelper.RemoveDuplicateLinesLambda()); - additionalProperties.put("removeEmptyLines", new LambdaHelper.RemoveEmptyLines()); - additionalProperties.put("jackson", "true"); - additionalProperties.remove("gson"); - - if (additionalProperties.containsKey(ENDPOINTS_IMPL_PACKAGE)) { - this.setEndpointsImplPackage((String) additionalProperties.get(ENDPOINTS_IMPL_PACKAGE)); - } else { - // not set, use to be passed to template - additionalProperties.put(ENDPOINTS_IMPL_PACKAGE, endpointsImplPackage); - } - - if (additionalProperties.containsKey(ENDPOINTS_PACKAGE)) { - this.setEndpointsPackage((String) additionalProperties.get(ENDPOINTS_PACKAGE)); - } else { - // not set, use to be passed to template - additionalProperties.put(ENDPOINTS_PACKAGE, endpointsPackage); - } - - if (additionalProperties.containsKey(CORE_PACKAGE)) { - this.setCorePackage((String) additionalProperties.get(CORE_PACKAGE)); - } else { - // not set, use to be passed to template - additionalProperties.put(CORE_PACKAGE, corePackage); - } - - if (additionalProperties.containsKey(BASE_PACKAGE)) { - this.setBasePackage((String) additionalProperties.get(BASE_PACKAGE)); - } else { - // not set, use to be passed to template - additionalProperties.put(BASE_PACKAGE, basePackage); - } - - if (additionalProperties.containsKey(EXCLUDE_WRAPPED_INTERFACES)) { - setShouldExcludeWrappedInterfaces((Boolean)additionalProperties.get(EXCLUDE_WRAPPED_INTERFACES)); - } else { - additionalProperties.put(EXCLUDE_WRAPPED_INTERFACES, shouldExcludeWrappedInterfaces); - } - - if (additionalProperties.containsKey(EXCLUDE_IMPL)) { - setShouldExcludeImpl((Boolean)additionalProperties.get(EXCLUDE_IMPL)); - } else { - additionalProperties.put(EXCLUDE_IMPL, shouldExcludeImpl); - } - - supportingFiles.clear(); - modelTemplateFiles.clear(); - apiTemplateFiles.clear(); - apiTestTemplateFiles.clear(); - - modelTemplateFiles.put("model.mustache", "Private.java"); - modelTemplateFiles.put("coreModel.mustache", ".java"); - - // API: interface and implementation - apiTemplateFiles.put("api.mustache", "Api.java"); - - if (!shouldExcludeWrappedInterfaces) { - apiTemplateFiles.put("wrapped_api.mustache", "WrappedApi.java"); - } - - if (!shouldExcludeImpl) { - apiTemplateFiles.put("wrapped_api_impl.mustache", "WrappedApiImpl.java"); - } - - String patchFolder = sourceFolder + FILE_SEPARATOR + endpointsPackage.replace(".", FILE_SEPARATOR); - supportingFiles.add(new SupportingFile("PATCH.mustache", patchFolder, "PATCH.java")); - supportingFiles.add(new SupportingFile("settings.mustache", "settings.xml")); - supportingFiles.add(new SupportingFile("README.mustache", "README.md")); - - String baseModelPathString = packageToSrcFolder(basePackage); - String coreModelPathString = packageToSrcFolder(corePackage); - - // Manually manage the structure of the code generated by swagger codegen (models, api interfaces, api impl and api test) - postProcessConfigs.add(new FilePostProcessConfig(".*ApiTest[.]java$", packageToTestFolder(endpointsImplPackage), true)); - postProcessConfigs.add(new FilePostProcessConfig(".*ApiImpl[.]java$", packageToSrcFolder(endpointsImplPackage), true)); - postProcessConfigs.add(new FilePostProcessConfig(".*Api[.]java$", packageToSrcFolder(endpointsPackage), true)); - postProcessConfigs.add(new FilePostProcessConfig(".*Private[.]java$", baseModelPathString, true)); - postProcessConfigs.add(new FilePostProcessConfig(".*java$", coreModelPathString, false)); - - } - - @Override - public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { - super.postProcessModelProperty(model, property); - - if( property != null ) { - if (property.datatype.contains("BigDecimal") || property.datatype.contains("OffsetDateTime") || property.datatype.contains("LocalDate")) { - property.isPrimitiveType = true; - } - if (property.isContainer && (property.items.datatype.contains("BigDecimal") || property.items.datatype.contains("OffsetDateTime") || property.datatype.contains("LocalDate"))) { - property.items.isPrimitiveType = true; - } - - // Check that we have vendor extensions for dictionary - if (property.vendorExtensions.containsKey("x-dictionary-name")) { - // Add some imports needed when reviving object from dictionaries - model.imports.add("java.util.Map"); - model.imports.add("java.lang.reflect.InvocationTargetException"); - model.imports.add("com.fasterxml.jackson.annotation.JsonIgnore"); - - String type = (String)property.vendorExtensions.get("x-field-type"); - if (typeMapping.containsKey(type) || languageSpecificPrimitives.contains(type)) { - if (typeMapping.containsKey(type)) { - property.vendorExtensions.put("x-field-type", typeMapping.get(type)); - } - } else { - model.imports.add(type); - } - } - - if (property.vendorExtensions.containsKey("x-map-name") && !property.isListContainer) { - throw new IllegalArgumentException("error in " + property.baseName + ", x-map-name should only apply to a " + "list container."); - } - } - } - - /** - * Process models to identify API Root reply object and among them which ones declare dictionaries. - * These helpers are used to revive data model with dictionaries. - */ - @Override - public Map postProcessModels(Map objs) { - for (Map.Entry entry : objs.entrySet()) { - if( "models".equals(entry.getKey()) ) { - - for( HashMap _map : (List)entry.getValue() ) { - CodegenModel model = (CodegenModel) _map.get("model"); - boolean hasDictionaries = false; - for (CodegenProperty property : model.vars) { - hasDictionaries |= "dictionaries".equalsIgnoreCase(property.name); - } - if (model.classname.endsWith("Reply")) { - model.vendorExtensions.put("isReply", Boolean.TRUE); - if (hasDictionaries) { - model.vendorExtensions.put("isReplyWithDictionaries", Boolean.TRUE); - } - } - } - } - } - return super.postProcessModels(objs); - } - - /** - * Suffix all files with API - */ - @Override - public String apiFilename(String templateName, String tag) { - String suffix = apiTemplateFiles().get(templateName); - return apiFileFolder() + FILE_SEPARATOR + toApiFilename(tag) + suffix; - } - - public void setEndpointsImplPackage(String endpointsImplPackage) { - this.endpointsImplPackage = endpointsImplPackage; - } - - public void setEndpointsPackage(String endpointsPackage) { - this.endpointsPackage = endpointsPackage; - } - - public void setBasePackage(String basePackage) { - this.basePackage = basePackage; - } - - public void setCorePackage(String corePackage) { - this.corePackage = corePackage; - } - - private void setShouldExcludeWrappedInterfaces(boolean shouldExcludeWrappedInterfaces) { - this.shouldExcludeWrappedInterfaces = shouldExcludeWrappedInterfaces; - } - - private void setShouldExcludeImpl(boolean shouldExcludeImpl) { - this.shouldExcludeImpl = shouldExcludeImpl; - } - - /** - * Enum values are converted from camelCase to UPPER_SNAKE_CASE - */ - @Override - public String toEnumVarName(String value, String datatype) { - String upperSnakeCaseValue = value; - if (!StringUtils.isAllUpperCase(value)) { - upperSnakeCaseValue = CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, value); - } - return super.toEnumVarName(upperSnakeCaseValue, datatype); - } - - /** - * Hook for altering the CodegenOperation data after it has been built from the - * swagger specification. - * - * New variables are passed to template via vendor extensions. - */ - @Override - public Map postProcessOperations(Map objs) { - Map newObjs = super.postProcessOperations(objs); - - List> imports = (List>) objs.get("imports"); - List operations = ((Map>) objs.get("operations")).get("operation"); - - for (CodegenOperation operation : operations) { - importRequestWrapper(operation, imports); - rewriteParamNames(operation); - } - - return newObjs; - } - - /** - * All the imports for the models will come from the 'core' package. Giving - * this, apply the "core" subpath to the model import - */ - @Override - public String toModelImport(String name) { - if ("".equals(modelPackage) || name.startsWith("java.") || name.startsWith("com.")) { - return name; - } else { - return corePackage + "." + name; - } - } - - /** - * Hook for altering the whole Swagger specification after it has been parsed. - */ - @Override - public void preprocessSwagger(Swagger swagger) { - super.preprocessSwagger(swagger); - - createRequestWrapperModel(swagger); - } - - /** - * Add Java imports for the new wrapper model type All the imports are done from - * the 'core' package - */ - private void importRequestWrapper(CodegenOperation operation, List> imports) { - String className = (String) operation.vendorExtensions.get(X_REQUEST_WRAPPER_MODEL_TYPE); - Map newImport = new HashMap(); - newImport.put("import", corePackage + "." + className); - imports.add(newImport); - } - - /** - * Compute the unwrapping for "paramName" into "request.getParamName()" or - * "request.isParamName()" if param is a boolean - * - * This is easier done here than in the template, due to camelization logic. - */ - private void rewriteParamNames(CodegenOperation operation) { - List params = new ArrayList(); - params.addAll(operation.allParams); - params.addAll(operation.queryParams); - params.addAll(operation.headerParams); - params.addAll(operation.formParams); - params.addAll(operation.pathParams); - for (CodegenParameter param : params) { - if (param.isEnum && param.isListContainer) { - param.vendorExtensions.put(X_PARAM_NAME_IN_CAMEL_CASE, - camelize(param.paramName) + SETTER_SUFFIX_FOR_ENUM_LISTS); - } else { - param.vendorExtensions.put(X_PARAM_NAME_IN_CAMEL_CASE, camelize(param.paramName)); - } - param.vendorExtensions.put(X_REQUEST_UNWRAPPED_PARAM_VALUE, - (param.isBoolean ? "request.is" : "request.get") + camelize(param.paramName) + "()"); - } - } - - /** - * Wraps parameters of each operation into a new wrapper model type - * Request - * - * To minimize the amount of code/template to override about parameter handling - * from the default Java behavior, it seems easier to not modify the signature - * of the operation in the specification, but rather do it in the template. - * - * However the new class definitions are added to the specification, so that - * they get generated in a standard way. - */ - private void createRequestWrapperModel(Swagger swagger) { - for (Path path : swagger.getPaths().values()) { - for (Operation operation : path.getOperations()) { - Model model = new ModelImpl(); - Map properties = new LinkedHashMap(); - for (Parameter parameter : operation.getParameters()) { - Property property = lambdaHelper.convertParameterToProperty(parameter); - if (property != null && property.getType() != null) { - properties.put(parameter.getName(), property); - } - } - - model.setProperties(properties); - String operationId = operation.getOperationId(); - if (StringUtils.isBlank(operationId)) { - String urlPath = getKey(path, swagger.getPaths()); - HttpMethod method = getKey(operation, path.getOperationMap()); - operationId = getOrGenerateOperationId(operation, urlPath, method.name()); - } - model.setDescription("Wrapper object for parameters of " + operationId + " operation"); - // Use 'Wrapped' Suffix to ensure that the new definition is not overriding an existing one - String className = camelize(operationId) + "WrappedRequest"; - - swagger.getDefinitions().put(className, model); - - // Link the wrapper into the operation metadata - operation.getVendorExtensions().put(X_REQUEST_WRAPPER_MODEL_TYPE, className); - } - } - } - - /** - * Get the key of a given value from a map - * - * @param value - * @param map - * @param - * @param - * @return - */ - private static K getKey(V value, Map map) { - K key = null; - if (map != null) { - for (Entry entry : map.entrySet()) { - if (value == entry.getValue()) { - key = entry.getKey(); - break; - } - } - } - return key; - } - - /** - * Output the API (class) name (capitalized). This overrides the - * {@link io.swagger.codegen.DefaultCodegen#toApiName(String)}, then removing - * the "Api" suffix. Return DefaultApi if name is empty - * - * @param name the name of the Api - * @return capitalized Api name - */ - @Override - public String toApiName(String name) { - if (name.length() == 0) { - return "Default"; - } - return initialCaps(name); - } - - /** - * Output the API as variable name, as camel case with first letter in lower - * case (e.g., AirCalendar -> airCalendar) - */ - @Override - public String toApiVarName(String name) { - if (name.length() == 0) { - return "default"; - } - return camelize(name, true); - } - - /** - * Override postProcessSupportingFileData - * This method will generate public and private models - * By default the models (public or private) will be generated inside modelPackage folder. - * This method will move the files as follows: - * The private models will be moved in 'modelPackage'/base. These models will be always generated (overwritten) - * The public models will be moved in 'modelPackage'/core. If a model is already existing in 'core' folder, this model will not be overwritten. - * If a core model already exists, the generated file in 'modelPackage' will be deleted - */ - @SuppressWarnings("static-method") - @Override - public Map postProcessSupportingFileData(Map objs) { - - for (FilePostProcessConfig config : postProcessConfigs) { - createOutFolder(config.getTargetFolder()); - } - - java.nio.file.Path pathToModels = java.nio.file.Paths.get(modelFileFolder()); - - try (Stream walk = Files.list(pathToModels)) { - walk.filter(Files::isRegularFile).forEach(filePath -> { - for (FilePostProcessConfig config : postProcessConfigs) { - String fileName = filePath.getFileName().toString(); - if (fileName.matches(config.getFilePattern())) { - try { - java.nio.file.Path destPath = java.nio.file.Paths.get(config.getTargetFolder()); - if (config.isForceReplace()) { - Files.move(filePath, destPath.resolve(filePath.getFileName()), StandardCopyOption.REPLACE_EXISTING); - } else { - try { - Files.move(filePath, destPath.resolve(filePath.getFileName())); - } catch (FileAlreadyExistsException e) { - Files.delete(filePath); - } - } - } catch (final IOException e) { - e.printStackTrace(); - } - break; - } - } - }); - } catch (IOException e) { - e.printStackTrace(); - } - return super.postProcessSupportingFileData(objs); - } - - private void createOutFolder(String pathString) { - java.nio.file.Path path = java.nio.file.Paths.get(pathString); - try { - if (!Files.exists(path)) { - Files.createDirectories(path); - } - } catch (IOException e) { - LambdaHelper.LOGGER.error("Unable to create base or core directory " + e); - } - } - - private String packageToSrcFolder(String packagePath) { - return this.outputFolder + FILE_SEPARATOR + this.sourceFolder + FILE_SEPARATOR + packagePath.replace(".", FILE_SEPARATOR); - } - - private String packageToTestFolder(String packagePath) { - return this.outputFolder + FILE_SEPARATOR + this.testFolder + FILE_SEPARATOR + packagePath.replace(".", FILE_SEPARATOR); - } -} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/java/com/amadeus/swagger/codegen/javaclient/FilePostProcessConfig.java b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/java/com/amadeus/swagger/codegen/javaclient/FilePostProcessConfig.java deleted file mode 100644 index d2b78c9017..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/java/com/amadeus/swagger/codegen/javaclient/FilePostProcessConfig.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.amadeus.swagger.codegen.javaclient; - -public class FilePostProcessConfig { - - private String filePattern; - - private String targetFolder; - - private boolean forceReplace; - - public FilePostProcessConfig(String filePattern, String targetFolder, boolean forceReplace) { - this.filePattern = filePattern; - this.targetFolder = targetFolder; - this.forceReplace = forceReplace; - } - - public String getFilePattern() { - return filePattern; - } - - public String getTargetFolder() { - return targetFolder; - } - - public boolean isForceReplace() { - return forceReplace; - } - -} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/java/com/amadeus/swagger/codegen/javaclient/LambdaHelper.java b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/java/com/amadeus/swagger/codegen/javaclient/LambdaHelper.java deleted file mode 100644 index 42f4a05966..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/java/com/amadeus/swagger/codegen/javaclient/LambdaHelper.java +++ /dev/null @@ -1,129 +0,0 @@ -package com.amadeus.swagger.codegen.javaclient; - -import com.samskivert.mustache.Mustache; -import com.samskivert.mustache.Template; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import io.swagger.models.ArrayModel; -import io.swagger.models.Model; -import io.swagger.models.ModelImpl; -import io.swagger.models.parameters.BodyParameter; -import io.swagger.models.parameters.Parameter; -import io.swagger.models.parameters.SerializableParameter; -import io.swagger.models.properties.ArrayProperty; -import io.swagger.models.properties.Property; -import io.swagger.models.properties.PropertyBuilder; -import io.swagger.models.properties.RefProperty; - -import java.io.IOException; -import java.io.StringWriter; -import java.io.Writer; -import java.util.Arrays; -import java.util.HashSet; -import java.util.Set; -import java.util.regex.Pattern; - -/** - * Helper around {@link io.swagger.models.Swagger} meta-model classes - */ -public class LambdaHelper { - - public static abstract class CustomLambda implements Mustache.Lambda { - - @Override - public void execute(Template.Fragment frag, Writer out) throws IOException { - final StringWriter tempWriter = new StringWriter(); - frag.execute(tempWriter); - out.write(formatFragment(tempWriter.toString())); - } - - public abstract String formatFragment(String fragment); - } - - public static class UppercaseFirstLambda extends CustomLambda { - - public UppercaseFirstLambda() {} - - @Override - public String formatFragment(String fragment) { - return fragment.substring(0, 1).toUpperCase() + fragment.substring(1); - } - } - - public static class RemoveDuplicateLinesLambda extends CustomLambda { - - public RemoveDuplicateLinesLambda() {} - - @Override - public String formatFragment(String fragment) { - Set uniqueLines = new HashSet<>(); - uniqueLines.addAll(Arrays.asList(fragment.split("\n"))); - return StringUtils.join(uniqueLines.toArray(), "\n"); - } - } - - /** - * Remove empty lines for the fragment - */ - public static class RemoveEmptyLines extends CustomLambda { - - public RemoveEmptyLines() { - } - - @Override public String formatFragment(String fragment) { - return Pattern.compile("^(?:[\\t ]*(?:\\r?\\n|\\r))+", Pattern.MULTILINE).matcher(fragment).replaceAll(""); - } - } - - public static final Logger LOGGER = LoggerFactory.getLogger(LambdaHelper.class); - - /** - * Converts a swagger operation parameter into a swagger model property - */ - public Property convertParameterToProperty(Parameter parameter) { - LOGGER.debug("Converting parameter " + parameter.getName()); - Property property = null; - - if (parameter instanceof SerializableParameter) { - property = convertParameterToProperty((SerializableParameter)parameter); - } - else if (parameter instanceof BodyParameter) { - property = convertParameterToProperty((BodyParameter)parameter); - } - else { - LOGGER.error("Unexpected class to convert " + parameter + " to a property"); - } - return property; - } - - private Property convertParameterToProperty(SerializableParameter parameter) { - Property property = PropertyBuilder.build(parameter.getType(), parameter.getFormat(), null); - if (property instanceof ArrayProperty) { - ((ArrayProperty)property).setItems(parameter.getItems()); - } - property.setName(parameter.getName()); - property.setDescription(parameter.getDescription()); - return property; - } - - private Property convertParameterToProperty(BodyParameter parameter) { - Property property = null; - Model schema = parameter.getSchema(); - if (schema instanceof ArrayModel) { - // ArrayModel#getReference() returns null, need to workaround - property = PropertyBuilder.build("array", null, null); - ((ArrayProperty)property).setItems(((ArrayModel)schema).getItems()); - } else if (schema instanceof ModelImpl) { - ModelImpl schemaImpl = (ModelImpl) schema; - property = PropertyBuilder.build(schemaImpl.getType(), schemaImpl.getFormat(), null); - } else { - property = new RefProperty(schema.getReference()); - } - property.setExample(parameter.getExamples()); - property.setName(parameter.getName()); - property.setDescription(parameter.getDescription()); - return property; - } -} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/META-INF/services/io.swagger.codegen.CodegenConfig b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/META-INF/services/io.swagger.codegen.CodegenConfig deleted file mode 100644 index 595a7bf3cf..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/META-INF/services/io.swagger.codegen.CodegenConfig +++ /dev/null @@ -1 +0,0 @@ -com.amadeus.swagger.codegen.javaclient.CustomJavaClientCodegen diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/PATCH.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/PATCH.mustache deleted file mode 100644 index 5107bae288..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/PATCH.mustache +++ /dev/null @@ -1,16 +0,0 @@ - -package {{endpointsPackage}}; - -import javax.ws.rs.HttpMethod; -import java.lang.annotation.Documented; -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -@Target({ElementType.METHOD}) -@Retention(RetentionPolicy.RUNTIME) -@HttpMethod("PATCH") -@Documented -public @interface PATCH { -} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/README.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/README.mustache deleted file mode 100644 index e33ca37698..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/README.mustache +++ /dev/null @@ -1,202 +0,0 @@ -# {{artifactId}} - -{{appName}} -- API version: {{appVersion}} -{{^hideGenerationTimestamp}} - - Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} - -{{#appDescription}} -``` -{{{appDescription}}} -``` -{{/appDescription}} - -{{#infoUrl}} - For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} - -*Automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen)* -We don't support sdk generations with openapi 3 specs in input. If you want to generate an sdk based on an openapi 3 spec, you can use one of the [default generators](https://github.com/OpenAPITools/openapi-generator/tree/master/docs/generators). - -## Requirements - -Building the API client library requires: -1. Java 1.8+ -2. Maven - -## Installation - -To install the API client library to your local Maven repository, simply execute: - -```shell -mvn clean install -``` - -To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: - -```shell -mvn clean deploy -``` - -Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. - -### Maven users - -Add this dependency to your project's POM: - -```xml - - {{{groupId}}}{{#implementationLibraryName}}.{{implementationLibraryName}}{{/implementationLibraryName}} - {{{artifactId}}} - ARTIFACT_VERSION - -``` -Modify your settings.xml: - -```xml - - .... - - ... - - https://pkgs.dev.azure.com/AmadeusDigitalAirline/DES-SDKs/_packaging/des-sdks/maven/v1 - public-artifactory - External Repository of artifacts - public-artifactory - - - - ... - - public-artifactory - YOUR_USER - YOUR_PASSWORD - - - - - ... - - artifact-repository - - - public-artifactory - public-artifactory - https://pkgs.dev.azure.com/AmadeusDigitalAirline/DES-SDKs/_packaging/des-sdks/maven/v1 - - - - - - -``` - - -### Others - -At first generate the JAR by executing: - -```shell -mvn clean package -``` - -Then manually install the following JARs: - -* `target/{{{artifactId}}}-ARTIFACT_VERSION.jar` -* `target/lib/*.jar` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following Java code: - -```java -{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} -import {{{invokerPackage}}}.*; -import {{{invokerPackage}}}.auth.*; -import {{{modelPackage}}}.*; -import {{{package}}}.{{{classname}}}; - -import java.io.File; -import java.util.*; - -public class {{{classname}}}Example { - - public static void main(String[] args) { - {{#hasAuthMethods}}ApiClient defaultClient = Configuration.getDefaultApiClient(); - {{#authMethods}}{{#isBasic}} - // Configure HTTP basic authorization: {{{name}}} - HttpBasicAuth {{{name}}} = (HttpBasicAuth) defaultClient.getAuthentication("{{{name}}}"); - {{{name}}}.setUsername("YOUR USERNAME"); - {{{name}}}.setPassword("YOUR PASSWORD");{{/isBasic}}{{#isApiKey}} - // Configure API key authorization: {{{name}}} - ApiKeyAuth {{{name}}} = (ApiKeyAuth) defaultClient.getAuthentication("{{{name}}}"); - {{{name}}}.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //{{{name}}}.setApiKeyPrefix("Token");{{/isApiKey}}{{#isOAuth}} - // Configure OAuth2 access token for authorization: {{{name}}} - OAuth {{{name}}} = (OAuth) defaultClient.getAuthentication("{{{name}}}"); - {{{name}}}.setAccessToken("YOUR ACCESS TOKEN");{{/isOAuth}} - {{/authMethods}} - {{/hasAuthMethods}} - - {{{classname}}} apiInstance = new {{{classname}}}(); - {{#allParams}} - {{{dataType}}} {{{paramName}}} = {{{example}}}; // {{{dataType}}} | {{{description}}} - {{/allParams}} - try { - {{#returnType}}{{{returnType}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}} - System.out.println(result);{{/returnType}} - } catch (ApiException e) { - System.err.println("Exception when calling {{{classname}}}#{{{operationId}}}"); - e.printStackTrace(); - } - } -} -{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} -``` - -## Documentation for API Endpoints - -All URIs are relative to *{{basePath}}* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}} -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} - -## Documentation for Models - -{{#models}}{{#model}} - [{{classname}}]({{modelDocPath}}{{classname}}.md) -{{/model}}{{/models}} - -## Documentation for Authorization - -{{^authMethods}}All endpoints do not require authorization. -{{/authMethods}}Authentication schemes defined for the API: -{{#authMethods}}### {{name}} - -{{#isApiKey}}- **Type**: API key -- **API key parameter name**: {{keyParamName}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} -{{/isApiKey}} -{{#isBasic}}- **Type**: HTTP basic authentication -{{/isBasic}} -{{#isOAuth}}- **Type**: OAuth -- **Flow**: {{flow}} -- **Authorization URL**: {{authorizationUrl}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - {{scope}}: {{description}} -{{/scopes}} -{{/isOAuth}} - -{{/authMethods}} - -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. - -## Author - -{{#apiInfo}}{{#apis}}{{^hasMore}}{{infoEmail}} -{{/hasMore}}{{/apis}}{{/apiInfo}} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/allowableValues.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/allowableValues.mustache deleted file mode 100644 index a48256d027..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/allowableValues.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#allowableValues}}allowableValues="{{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}{{^values}}range=[{{#min}}{{.}}{{/min}}{{^min}}-infinity{{/min}}, {{#max}}{{.}}{{/max}}{{^max}}infinity{{/max}}]{{/values}}"{{/allowableValues}} \ No newline at end of file diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/api.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/api.mustache deleted file mode 100644 index 28efceab31..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/api.mustache +++ /dev/null @@ -1,54 +0,0 @@ -package {{package}}.api.interfaces; - -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiParam; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiResponses; -import io.swagger.annotations.ApiResponse; - -import javax.ws.rs.*; -import javax.ws.rs.core.Response; - -{{#imports}}import {{import}}; -{{/imports}} - -{{^fullJavaUtil}} -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} - -{{>generatedAnnotation}} -@Path("{{^useAnnotatedBasePath}}/{{/useAnnotatedBasePath}}{{#useAnnotatedBasePath}}{{contextPath}}{{/useAnnotatedBasePath}}") -@Api(value = "/", description = "{{description}}") -{{#addConsumesProducesJson}} - @Consumes(MediaType.APPLICATION_JSON) - @Produces(MediaType.APPLICATION_JSON) -{{/addConsumesProducesJson}} -{{#operations}} -public interface {{classname}}Api { - {{#operation}} - {{#summary}} - /** - * {{summary}} - * - {{#notes}} - * {{notes}} - * - {{/notes}} - */ - {{/summary}} - @{{httpMethod}}{{#path}} - @Path("{{{path}}}"){{/path}} - {{#hasConsumes}} - @Consumes({ {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} }) - {{/hasConsumes}} - {{#hasProduces}} - @Produces({ {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} }) - {{/hasProduces}} - @ApiOperation(value = "{{{summary}}}", tags={ {{#vendorExtensions.x-tags}}"{{tag}}"{{#hasMore}}, {{/hasMore}}{{/vendorExtensions.x-tags}} }) - @ApiResponses(value = { {{#responses}} - @ApiResponse(code = {{{code}}}, message = "{{{message}}}"{{^vendorExtensions.x-java-is-response-void}}, response = {{#baseType}}{{{baseType}}}.class{{/baseType}}{{^baseType}}Void.class{{/baseType}}{{#containerType}}, responseContainer = "{{{containerType}}}"{{/containerType}}{{/vendorExtensions.x-java-is-response-void}}){{#hasMore}},{{/hasMore}}{{/responses}} }) - Response {{nickname}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}}, {{/hasMore}}{{/allParams}}); - {{/operation}} -} -{{/operations}} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/api_test.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/api_test.mustache deleted file mode 100644 index 20abef2560..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/api_test.mustache +++ /dev/null @@ -1,49 +0,0 @@ -{{>licenseInfo}} - -package {{invokerPackage}}.api; - -import {{invokerPackage}}.ApiException; -import {{invokerPackage}}.api.{{classname}}WrappedApiImpl; - -import {{modelPackage}}.endpoints.{{classname}}WrappedApi; - -{{#imports}}import {{import}}; -{{/imports}} -import org.junit.Test; -import org.junit.Ignore; - -{{^fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} - -/** - * API tests for {{classname}} - */ -@Ignore -public class {{classname}}WrappedApiTest { - - private final {{classname}}WrappedApi api = new {{classname}}WrappedApiImpl(); - - {{#operations}}{{#operation}} - /** - * {{summary}} - * - * {{notes}} - * - * @throws ApiException - * if the Api call fails - */ - @Test - public void {{operationId}}Test() throws ApiException { - {{#vendorExtensions.x-request-wrapper-model-type}} - {{vendorExtensions.x-request-wrapper-model-type}} request = new {{vendorExtensions.x-request-wrapper-model-type}}(); - {{#returnType}}{{{returnType}}} response = {{/returnType}}api.{{operationId}}(request); - {{/vendorExtensions.x-request-wrapper-model-type}} - - // TODO: test validations - } - {{/operation}}{{/operations}} -} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/bodyParams.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/bodyParams.mustache deleted file mode 100644 index bb950caf52..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/bodyParams.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isBodyParam}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) {{{dataType}}} {{paramName}}{{/isBodyParam}} \ No newline at end of file diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/coreModel.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/coreModel.mustache deleted file mode 100644 index 5793e2d603..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/coreModel.mustache +++ /dev/null @@ -1,8 +0,0 @@ -{{#models}}{{#model}} -package {{package}}.model.core; - -import {{package}}.model.base.{{classname}}Private; - -public class {{classname}} extends {{classname}}Private<{{classname}}> { -} -{{/model}}{{/models}} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/formParams.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/formParams.mustache deleted file mode 100644 index c446b444fb..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/formParams.mustache +++ /dev/null @@ -1,3 +0,0 @@ -{{#isFormParam}}{{#notFile}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{#vendorExtensions.x-multipart}}@FormDataParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{^vendorExtensions.x-multipart}} {{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} @FormParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/vendorExtensions.x-multipart}}{{/notFile}}{{#isFile}} - @FormDataParam("{{baseName}}") InputStream {{paramName}}InputStream, - @FormDataParam("{{baseName}}") FormDataContentDisposition {{paramName}}Detail{{/isFile}}{{/isFormParam}} \ No newline at end of file diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/headerParams.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/headerParams.mustache deleted file mode 100644 index f7445bbf48..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/headerParams.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isHeaderParam}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @HeaderParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isHeaderParam}} \ No newline at end of file diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/licenseInfo.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/licenseInfo.mustache deleted file mode 100644 index 4bb3a0d7d7..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/licenseInfo.mustache +++ /dev/null @@ -1,10 +0,0 @@ -/* - * {{{appName}}} - * {{{appDescription}}} - * - * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}} - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/model.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/model.mustache deleted file mode 100644 index 674ae3e59f..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/model.mustache +++ /dev/null @@ -1,48 +0,0 @@ -{{>licenseInfo}} - -{{#models}}{{#model}} -package {{package}}.model.base; -{{/model}}{{/models}} - -{{^supportJava6}} -import java.util.Objects; -import java.util.Arrays; -{{/supportJava6}} -{{#supportJava6}} -import org.apache.commons.lang3.ObjectUtils; -{{/supportJava6}} -{{#imports}} -import {{import}}; -{{/imports}} -{{#serializableModel}} -import java.io.Serializable; -{{/serializableModel}} -{{#jackson}} -{{#withXml}} -import com.fasterxml.jackson.dataformat.xml.annotation.*; -{{/withXml}} -{{/jackson}} -{{#withXml}} -import javax.xml.bind.annotation.*; -{{/withXml}} -{{#parcelableModel}} -import android.os.Parcelable; -import android.os.Parcel; -{{/parcelableModel}} -{{#useBeanValidation}} -import javax.validation.constraints.*; -import javax.validation.Valid; -{{/useBeanValidation}} -{{#models}} -{{#model}} -{{#discriminator}} -{{#children}} -import {{package}}.model.core.{{classname}}; -{{/children}} -{{/discriminator}} - -{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>pojo}}{{/isEnum}} -{{/model}} -{{/models}} - - diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/pathParams.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/pathParams.mustache deleted file mode 100644 index 07b59c682a..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/pathParams.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isPathParam}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}) @PathParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isPathParam}} \ No newline at end of file diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/pojo.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/pojo.mustache deleted file mode 100644 index 6b849f6a7e..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/pojo.mustache +++ /dev/null @@ -1,305 +0,0 @@ -/** - * {{#description}}{{.}}{{/description}}{{^description}}{{classname}}Private{{/description}} - */{{#description}} -@ApiModel(description = "{{{description}}}"){{/description}} -{{>generatedAnnotation}}{{#discriminator}}{{>typeInfoAnnotation}}{{/discriminator}}{{>xmlAnnotation}} -public abstract class {{classname}}Private {{#parent}}extends {{{parent}}} {{/parent}}{{#parcelableModel}}implements Parcelable {{#serializableModel}}, Serializable {{/serializableModel}}{{/parcelableModel}}{{^parcelableModel}}{{#serializableModel}}implements Serializable {{/serializableModel}}{{/parcelableModel}}{ -{{#serializableModel}} - private static final long serialVersionUID = 1L; - -{{/serializableModel}} - {{#vars}} - {{#isEnum}} - {{^isContainer}} -{{>modelInnerEnum}} - {{/isContainer}} - {{/isEnum}} - {{#items.isEnum}} - {{#items}} - {{^isContainer}} -{{>modelInnerEnum}} - {{/isContainer}} - {{/items}} - {{/items.isEnum}} - {{#jackson}} - @JsonProperty("{{baseName}}") - {{#withXml}} - {{^isContainer}} - @JacksonXmlProperty({{#isXmlAttribute}}isAttribute = true, {{/isXmlAttribute}}{{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/isContainer}} - {{#isContainer}} - {{#isXmlWrapped}} - // items.xmlName={{items.xmlName}} - @JacksonXmlElementWrapper(useWrapping = {{isXmlWrapped}}, {{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}localName = "{{#items.xmlName}}{{items.xmlName}}{{/items.xmlName}}{{^items.xmlName}}{{items.baseName}}{{/items.xmlName}}") - {{/isXmlWrapped}} - {{/isContainer}} - {{/withXml}} - {{/jackson}} - {{#withXml}} - {{#isXmlAttribute}} - @XmlAttribute(name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/isXmlAttribute}} - {{^isXmlAttribute}} - {{^isContainer}} - @XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/isContainer}} - {{#isContainer}} - // Is a container wrapped={{isXmlWrapped}} - {{#items}} - // items.name={{name}} items.baseName={{baseName}} items.xmlName={{xmlName}} items.xmlNamespace={{xmlNamespace}} - // items.example={{example}} items.type={{datatype}} - @XmlElement({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/items}} - {{#isXmlWrapped}} - @XmlElementWrapper({{#xmlNamespace}}namespace="{{xmlNamespace}}", {{/xmlNamespace}}name = "{{#xmlName}}{{xmlName}}{{/xmlName}}{{^xmlName}}{{baseName}}{{/xmlName}}") - {{/isXmlWrapped}} - {{/isContainer}} - {{/isXmlAttribute}} - {{/withXml}} - {{#gson}} - @SerializedName("{{baseName}}") - {{/gson}} - {{#isContainer}} - private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}}; - {{/isContainer}} - {{^isContainer}} - private {{{datatypeWithEnum}}} {{name}} = {{{defaultValue}}}; - {{/isContainer}} - {{#vendorExtensions}}{{#x-field-name}} - private {{x-field-type}} {{x-field-name}} = null; - {{/x-field-name}}{{/vendorExtensions}} - {{/vars}} - {{#gson}} - {{#discriminator}} - public T() { - this.{{discriminator}} = this.getClass().getSimpleName(); - } - {{/discriminator}} - {{/gson}} - {{#vars}} - {{^isReadOnly}} - public T {{name}}({{{datatypeWithEnum}}} {{name}}) { - this.{{name}} = {{name}}; - return (T)this; - } - {{#isListContainer}} - - public T add{{nameInCamelCase}}Item({{{items.datatypeWithEnum}}} {{name}}Item) { - {{^required}} - if (this.{{name}} == null) { - this.{{name}} = {{{defaultValue}}}; - } - {{/required}} - this.{{name}}.add({{name}}Item); - return (T)this; - } - {{/isListContainer}} - {{#isMapContainer}} - - public T put{{nameInCamelCase}}Item(String key, {{{items.datatypeWithEnum}}} {{name}}Item) { - {{^required}} - if (this.{{name}} == null) { - this.{{name}} = {{{defaultValue}}}; - } - {{/required}} - this.{{name}}.put(key, {{name}}Item); - return (T)this; - } - {{/isMapContainer}} - - {{/isReadOnly}} - /** - {{#description}} - * {{description}} - {{/description}} - {{^description}} - * Get {{name}} - {{/description}} - {{#minimum}} - * minimum: {{minimum}} - {{/minimum}} - {{#maximum}} - * maximum: {{maximum}} - {{/maximum}} - * @return {{name}} - **/ -{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} @ApiModelProperty({{#example}}example = "{{{example}}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") -{{#vendorExtensions.extraAnnotation}} - {{{vendorExtensions.extraAnnotation}}} -{{/vendorExtensions.extraAnnotation}} - public {{{datatypeWithEnum}}} {{#isBoolean}}is{{/isBoolean}}{{getter}}() { - return {{name}}; - } - {{^isReadOnly}} - - public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { - this.{{name}} = {{name}}; - } - {{/isReadOnly}} - {{#vendorExtensions}}{{#x-field-name}} - @JsonIgnore - public {{x-field-type}} get{{#uppercaseFirst}}{{x-field-name}}{{/uppercaseFirst}}() { - return this.{{x-field-name}}; - } - - public void set{{#uppercaseFirst}}{{x-field-name}}{{/uppercaseFirst}}({{x-field-type}} value) { - this.{{x-field-name}} = value; - } - {{/x-field-name}}{{/vendorExtensions}} - {{/vars}} -{{#vendorExtensions}}{{#isReply}}{{#removeEmptyLines}} - public void revive() { -{{#isReplyWithDictionaries}} -{{#vars}}{{#isNotContainer}}{{^isPrimitiveType}} - if ({{name}} != null) { - {{name}}.revive(this.dictionaries); - } -{{/isPrimitiveType}}{{/isNotContainer}}{{/vars}} -{{#vars}}{{#isListContainer}}{{^items.isPrimitiveType}} - if ({{name}} != null) { - for ({{{items.datatypeWithEnum}}} {{name}}Item : {{name}}) { - {{name}}Item.revive(this.dictionaries); - } - } -{{/items.isPrimitiveType}}{{/isListContainer}}{{/vars}}{{/isReplyWithDictionaries}} - } -{{/removeEmptyLines}}{{/isReply}}{{/vendorExtensions}} -{{#vendorExtensions}}{{^isReply}}{{^isDictionary}}{{#removeEmptyLines}} - public void revive(Object dictionaries) { -{{#vars}}{{#vendorExtensions}}{{#x-field-name}} - try { - this.{{x-field-name}} = ((Map)dictionaries.getClass().getMethod("get{{#uppercaseFirst}}{{x-dictionary-name}}{{/uppercaseFirst}}").invoke(dictionaries)).get(this.{{name}}); - } catch (IllegalAccessException e) { - // - } catch (InvocationTargetException e) { - // - } catch (NoSuchMethodException e) { - // - } catch (NullPointerException e) { - // Fail silently in case a dictionary is missing (unfortunately it happens) - } -{{/x-field-name}}{{/vendorExtensions}} -{{#isListContainer}}{{^items.isPrimitiveType}} - if (this.{{name}} != null) { - for ({{{items.datatypeWithEnum}}} {{name}}Item : this.{{name}}) { - {{name}}Item.revive(dictionaries); - } - } -{{/items.isPrimitiveType}}{{/isListContainer}} -{{#isMapContainer}}{{^items.isPrimitiveType}} - if (this.{{name}} != null) { - for ({{{items.datatypeWithEnum}}} {{name}}Item : this.{{name}}.values()) { - {{name}}Item.revive(dictionaries); - } - } -{{/items.isPrimitiveType}}{{/isMapContainer}} -{{#isNotContainer}}{{^isPrimitiveType}} - if (this.{{name}} != null) { - this.{{name}}.revive(dictionaries); - } -{{/isPrimitiveType}}{{/isNotContainer}}{{/vars}} - } -{{/removeEmptyLines}}{{/isDictionary}}{{/isReply}}{{/vendorExtensions}} -{{^supportJava6}} - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - }{{#hasVars}} - T {{classVarName}} = (T) o; - return {{#vars}}{{#isByteArray}}Arrays{{/isByteArray}}{{#isBinary}}Arrays{{/isBinary}}{{^isByteArray}}{{^isBinary}}Objects{{/isBinary}}{{/isByteArray}}.equals(this.{{name}}, {{classVarName}}.{{#isBoolean}}is{{/isBoolean}}{{getter}}()){{#hasMore}} && - {{/hasMore}}{{/vars}}{{#parent}} && - super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} - return {{#parent}}super.equals(o){{/parent}}{{^parent}}true{{/parent}};{{/hasVars}} - } - - @Override - public int hashCode() { - return Objects.hash({{#vars}}{{^isByteArray}}{{^isBinary}}{{name}}{{/isBinary}}{{/isByteArray}}{{#isByteArray}}Arrays.hashCode({{name}}){{/isByteArray}}{{#isBinary}}Arrays.hashCode({{name}}){{/isBinary}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); - } - -{{/supportJava6}} -{{#supportJava6}} - @Override - public boolean equals(java.lang.Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - }{{#hasVars}} - T {{classVarName}} = (T) o; - return {{#vars}}ObjectUtils.equals(this.{{name}}, {{classVarName}}.{{#isBoolean}}is{{/isBoolean}}{{getter}}()){{#hasMore}} && - {{/hasMore}}{{/vars}}{{#parent}} && - super.equals(o){{/parent}};{{/hasVars}}{{^hasVars}} - return true;{{/hasVars}} - } - - @Override - public int hashCode() { - return ObjectUtils.hashCodeMulti({{#vars}}{{name}}{{#hasMore}}, {{/hasMore}}{{/vars}}{{#parent}}{{#hasVars}}, {{/hasVars}}super.hashCode(){{/parent}}); - } - -{{/supportJava6}} - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class {{classname}} {\n"); - {{#parent}}sb.append(" ").append(toIndentedString(super.toString())).append("\n");{{/parent}} - {{#vars}}sb.append(" {{name}}: ").append(toIndentedString({{name}})).append("\n"); - {{/vars}}sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(java.lang.Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - {{#parcelableModel}} - public void writeToParcel(Parcel out, int flags) { - {{#parent}} super.writeToParcel(out, flags); {{/parent}} {{#vars}} - out.writeValue({{name}}); - {{/vars}} - } - - public T() { - super(); - } - - T(Parcel in) { - {{#parent}} super(in); {{/parent}} - {{#vars}} - {{#isPrimitiveType}} - {{name}} = ({{{datatypeWithEnum}}})in.readValue(null); - {{/isPrimitiveType}} - {{^isPrimitiveType}} - {{name}} = ({{{datatypeWithEnum}}})in.readValue({{complexType}}.class.getClassLoader()); - {{/isPrimitiveType}} - {{/vars}} - } - - public int describeContents() { - return 0; - } - - public static final Parcelable.Creator CREATOR = new Parcelable.Creator() { - public T createFromParcel(Parcel in) { - return new T(in); - } - public T[] newArray(int size) { - return new T[size]; - } - }; - {{/parcelableModel}} -} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/pom.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/pom.mustache deleted file mode 100644 index cc3cb2d2fa..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/pom.mustache +++ /dev/null @@ -1,315 +0,0 @@ - - 4.0.0 - {{groupId}}{{#implementationLibraryName}}.{{implementationLibraryName}}{{/implementationLibraryName}} - {{artifactId}} - jar - {{artifactId}} - {{artifactVersion}} - - scm:git:git@github.com:swagger-api/swagger-mustache.git - scm:git:git@github.com:swagger-api/swagger-codegen.git - https://github.com/swagger-api/swagger-codegen - - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.0.0-M1 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.12 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - pertest - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 2.6 - - - - jar - test-jar - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.10 - - - add_sources - generate-sources - - add-source - - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.6.2 - - {{#java8}} - 1.8 - 1.8 - {{/java8}} - {{^java8}} - 1.7 - 1.7 - {{/java8}} - - - - - - - - public-artifactory - https://pkgs.dev.azure.com/AmadeusDigitalAirline/DES-SDKs/_packaging/des-sdks/maven/v1 - - true - - - true - - - - - - public-artifactory - https://pkgs.dev.azure.com/AmadeusDigitalAirline/DES-SDKs/_packaging/des-sdks/maven/v1 - - - - - - com.amadeus.des - java-client-sdk-core - 1.0.3 - - - - org.projectlombok - lombok - ${lombok-version} - - - - io.swagger - swagger-annotations - ${swagger-core-version} - - - - - com.fasterxml.jackson.core - jackson-core - ${jackson-version} - - - com.fasterxml.jackson.core - jackson-annotations - ${jackson-version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson-version} - - {{#withXml}} - - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - ${jackson-version} - - - {{/withXml}} - {{#java8}} - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - ${jackson-version} - - {{/java8}} - {{^java8}} - - com.fasterxml.jackson.datatype - jackson-datatype-joda - ${jackson-version} - - - joda-time - joda-time - ${jodatime-version} - - - - - com.brsanthu - migbase64 - 2.2 - - {{/java8}} - - {{#supportJava6}} - - org.apache.commons - commons-lang3 - ${commons_lang3_version} - - - - commons-io - commons-io - ${commons_io_version} - - {{/supportJava6}} - - com.github.joschi.jackson - jackson-datatype-threetenbp - ${jackson-version} - - - - junit - junit - ${junit-version} - test - - - - org.mockito - mockito-core - 3.4.6 - test - - - - UTF-8 - 1.5.18 - 3.1.3.Final - 2.6.4 - {{^java8}} - 2.9.9 - {{/java8}} - {{#supportJava6}} - 2.5 - 3.6 - {{/supportJava6}} - 1.0.0 - 4.12 - 1.18.12 - - - - - release - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.2.0 - - -Xdoclint:none - - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.0 - - - attach-sources - - jar-no-fork - - - - - - - - - diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/queryParams.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/queryParams.mustache deleted file mode 100644 index bec45d8e6f..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/queryParams.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#isQueryParam}}@ApiParam(value = "{{{description}}}"{{#required}}, required=true{{/required}}{{#allowableValues}}, {{> allowableValues }}{{/allowableValues}}{{#defaultValue}}, defaultValue="{{{defaultValue}}}"{{/defaultValue}}){{#defaultValue}} @DefaultValue("{{{defaultValue}}}"){{/defaultValue}} @QueryParam("{{baseName}}") {{{dataType}}} {{paramName}}{{/isQueryParam}} \ No newline at end of file diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/returnTypes.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/returnTypes.mustache deleted file mode 100644 index c8f7a56938..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/returnTypes.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#returnContainer}}{{#isMapContainer}}Map{{/isMapContainer}}{{#isListContainer}}List<{{{returnType}}}>{{/isListContainer}}{{/returnContainer}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}} \ No newline at end of file diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/settings.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/settings.mustache deleted file mode 100644 index 862ea9e2ee..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/settings.mustache +++ /dev/null @@ -1,19 +0,0 @@ - - - - - des-sdks - https://pkgs.dev.azure.com/AmadeusDigitalAirline/DES-SDKs/_packaging/des-sdks/maven/v1 - External Azure Artifact repository - des-sdks - - - - - des-sdks - AmadeusDigitalAirline - ${env.AZ_AR_PASSWORD} - - - diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/wrapped_api.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/wrapped_api.mustache deleted file mode 100644 index 4b2cd2db53..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/wrapped_api.mustache +++ /dev/null @@ -1,42 +0,0 @@ -package {{package}}.api.interfaces; - -import {{sdkCorePackage}}.ApiException; -import {{sdkCorePackage}}.ApiResponse; -import {{sdkCorePackage}}.Pair; -import {{sdkCorePackage}}.interfaces.ApiClient; - -{{#imports}}import {{import}}; -{{/imports}} - -{{^fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} - -{{>generatedAnnotation}} -{{#operations}} -public interface {{classname}}WrappedApi { - {{#operation}} - /** - * {{summary}} - * {{notes}} - * @param request Wrapper of the parameters expected by this operation{{#returnType}} - * @return ApiResponse<{{{returnType}}}>{{/returnType}} - * @throws ApiException if fails to make API call - {{#isDeprecated}} - * @deprecated - {{/isDeprecated}} - {{#externalDocs}} - * {{description}} - * @see {{summary}} Documentation - {{/externalDocs}} - */ - {{#isDeprecated}} - @Deprecated - {{/isDeprecated}} - ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}({{vendorExtensions.x-request-wrapper-model-type}} request) throws ApiException; - {{/operation}} -} -{{/operations}} diff --git a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/wrapped_api_impl.mustache b/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/wrapped_api_impl.mustache deleted file mode 100644 index db528f97ae..0000000000 --- a/packages/@ama-sdk/schematics/schematics/java/client-core/swagger-codegen-java-client/src/main/resources/javaClient/wrapped_api_impl.mustache +++ /dev/null @@ -1,99 +0,0 @@ -package {{package}}.api.impl; - -import lombok.Getter; - -import {{sdkCorePackage}}.ApiException; -import {{sdkCorePackage}}.ApiResponse; -import {{sdkCorePackage}}.Pair; -import {{sdkCorePackage}}.interfaces.ApiClient; -import {{sdkCorePackage}}.interfaces.ApiClientProvider; - -import {{sdkUtilsPackage}}.SdkUtils; - -import {{endpointsPackage}}.{{classname}}WrappedApi; - -{{#imports}}import {{import}}; -{{/imports}} - -{{^fullJavaUtil}} -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -{{/fullJavaUtil}} - -{{>generatedAnnotation}} -{{#operations}} -public class {{classname}}WrappedApiImpl implements {{classname}}WrappedApi { - @Getter - private final ApiClient {{localVariablePrefix}}apiClient; - - public {{classname}}WrappedApiImpl(ApiClientProvider apiClientProvider) { - this.{{localVariablePrefix}}apiClient = apiClientProvider.getApiClient(); - } - - {{#operation}} - /** - * {{summary}} - * {{notes}} - * @param request Wrapper of the parameters expected by this operation{{#returnType}} - * @return ApiResponse<{{{returnType}}}>{{/returnType}} - * @throws ApiException if fails to make API call - {{#isDeprecated}} - * @deprecated - {{/isDeprecated}} - {{#externalDocs}} - * {{description}} - * @see {{summary}} Documentation - {{/externalDocs}} - */ - {{#isDeprecated}} - @Deprecated - {{/isDeprecated}} - public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}({{vendorExtensions.x-request-wrapper-model-type}} request) throws ApiException { - Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{vendorExtensions.x-request-unwrapped-param-value}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}; - {{#allParams}}{{#required}} - // verify the required parameter '{{paramName}}' is set - if ({{vendorExtensions.x-request-unwrapped-param-value}} == null) { - throw new ApiException(400, "Missing the required parameter '{{paramName}}' when calling {{operationId}}"); - } - {{/required}}{{/allParams}} - // create path and map variables - String {{localVariablePrefix}}localVarPath = "{{{path}}}".replaceAll("\\{format\\}","json"){{#pathParams}} - .replaceAll("\\{" + "{{baseName}}" + "\\}", SdkUtils.escapeStringForURL({{{vendorExtensions.x-request-unwrapped-param-value}}}.toString())){{/pathParams}}; - - // query params - {{javaUtilPrefix}}List {{localVariablePrefix}}localVarQueryParams = new {{javaUtilPrefix}}ArrayList(); - {{javaUtilPrefix}}Map {{localVariablePrefix}}localVarHeaderParams = new {{javaUtilPrefix}}HashMap(); - {{javaUtilPrefix}}Map {{localVariablePrefix}}localVarFormParams = new {{javaUtilPrefix}}HashMap(); - - {{#queryParams}} - {{localVariablePrefix}}localVarQueryParams.addAll(SdkUtils.parameterToPairs("{{#collectionFormat}}{{{collectionFormat}}}{{/collectionFormat}}", "{{baseName}}", {{vendorExtensions.x-request-unwrapped-param-value}}, {{localVariablePrefix}}apiClient.getDateFormat())); - {{/queryParams}} - - {{#headerParams}}if ({{vendorExtensions.x-request-unwrapped-param-value}} != null) - {{localVariablePrefix}}localVarHeaderParams.put("{{baseName}}", SdkUtils.parameterToString({{vendorExtensions.x-request-unwrapped-param-value}}, {{localVariablePrefix}}apiClient.getDateFormat())); - {{/headerParams}} - - {{#formParams}}if ({{vendorExtensions.x-request-unwrapped-param-value}} != null) - {{localVariablePrefix}}localVarFormParams.put("{{baseName}}", {{vendorExtensions.x-request-unwrapped-param-value}}); - {{/formParams}} - - final String[] {{localVariablePrefix}}localVarAccepts = { - {{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}} - }; - final String {{localVariablePrefix}}localVarAccept = SdkUtils.selectHeaderAccept({{localVariablePrefix}}localVarAccepts); - - final String[] {{localVariablePrefix}}localVarContentTypes = { - {{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}} - }; - final String {{localVariablePrefix}}localVarContentType = SdkUtils.selectHeaderContentType({{localVariablePrefix}}localVarContentTypes); - - String[] {{localVariablePrefix}}localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} }; - - Class<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{localVariablePrefix}}localVarReturnType = {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}.class; - return {{localVariablePrefix}}apiClient.invokeAPI({{localVariablePrefix}}localVarPath, "{{httpMethod}}", {{localVariablePrefix}}localVarQueryParams, {{localVariablePrefix}}localVarPostBody, {{localVariablePrefix}}localVarHeaderParams, {{localVariablePrefix}}localVarFormParams, {{localVariablePrefix}}localVarAccept, {{localVariablePrefix}}localVarContentType, {{localVariablePrefix}}localVarAuthNames, {{localVariablePrefix}}localVarReturnType); - } - {{/operation}} -} -{{/operations}} diff --git a/packages/@ama-sdk/schematics/schematics/ng-add/index.ts b/packages/@ama-sdk/schematics/schematics/ng-add/index.ts index 85cbf207b7..1e6b0492d4 100644 --- a/packages/@ama-sdk/schematics/schematics/ng-add/index.ts +++ b/packages/@ama-sdk/schematics/schematics/ng-add/index.ts @@ -55,12 +55,6 @@ export const updatePackageJsonScripts: Rule = (tree, context) => { (acc, [scriptName, cmd]) => { if (typeof cmd === 'string') { acc[scriptName] = cmd - .replace( - // Remove swagger config path if it is the default value - // eslint-disable-next-line @stylistic/max-len -- regexp cannot be splitted - / --(swagger-config-path|swaggerConfigPath)[ =]?(\.\/)?node_modules\/@ama-sdk\/generator-sdk\/src\/generators\/java-client-core\/templates\/swagger-codegen-java-client\/config\/swagger-codegen-config.json/, - '' - ) .replace(/\byo\b/g, 'schematics') // Migrate from yeoman to schematics .replace( // Change generator path to schematics collection:name @@ -71,10 +65,6 @@ export const updatePackageJsonScripts: Rule = (tree, context) => { /@ama-sdk\/generator-sdk\/(src\/)?generators/g, '@ama-sdk/schematics/schematics' ) // Change relative path for swaggerConfigPath - .replace( - /(@ama-sdk\/schematics\/schematics\/)java-client-core/g, - '$1java/client-core' - ) // Change java client core path .replace( /@ama-sdk\/(schematics|generator-sdk):(core|shell|create|mock)/g, '@ama-sdk/schematics:typescript-$2' diff --git a/packages/@ama-sdk/schematics/testing/EXPECTED_package.json b/packages/@ama-sdk/schematics/testing/EXPECTED_package.json index 56420ab26e..93e1d037b9 100644 --- a/packages/@ama-sdk/schematics/testing/EXPECTED_package.json +++ b/packages/@ama-sdk/schematics/testing/EXPECTED_package.json @@ -1,11 +1,9 @@ { "name": "fake-package", "scripts": { - "swagger:regen": "schematics @ama-sdk/schematics:java-client-core --spec-path ./swagger-spec.yaml --force", - "swagger:generate": "yarn schematics @ama-sdk/schematics:java-client-core --spec-path node_modules/@api-spec/core-private/dist/API_Private.yaml --force", "swagger:upgrade": "schematics @ama-sdk/schematics:typescript-core && yarn clear-index", - "swagger:regen2": "schematics @ama-sdk/schematics:typescript-core --spec-path ./swagger-spec.yaml --force && yarn clear-index", - "swagger:generate2": "schematics @ama-sdk/schematics:typescript-core --spec-path $(yarn resolve @api-spec/core-public/dist/API_Public.yaml) --force && yarn clear-index", + "swagger:regen": "schematics @ama-sdk/schematics:typescript-core --spec-path ./swagger-spec.yaml --force && yarn clear-index", + "swagger:generate": "schematics @ama-sdk/schematics:typescript-core --spec-path $(yarn resolve @api-spec/core-public/dist/API_Public.yaml) --force && yarn clear-index", "mock": "yarn ng g @ama-sdk/schematics:typescript-mock" } } diff --git a/packages/@ama-sdk/schematics/testing/MOCK_package.json b/packages/@ama-sdk/schematics/testing/MOCK_package.json index 7c6c7ba90a..d82f2d54ea 100644 --- a/packages/@ama-sdk/schematics/testing/MOCK_package.json +++ b/packages/@ama-sdk/schematics/testing/MOCK_package.json @@ -1,11 +1,9 @@ { "name": "fake-package", "scripts": { - "swagger:regen": "yo ./node_modules/@ama-sdk/generator-sdk/src/generators/java-client-core --swaggerSpecPath ./swagger-spec.yaml --swaggerConfigPath node_modules/@ama-sdk/generator-sdk/src/generators/java-client-core/templates/swagger-codegen-java-client/config/swagger-codegen-config.json --force", - "swagger:generate": "yarn yo ./node_modules/@ama-sdk/generator-sdk/src/generators/java-client-core --swaggerSpecPath node_modules/@api-spec/core-private/dist/API_Private.yaml --swaggerConfigPath ./node_modules/@ama-sdk/generator-sdk/src/generators/java-client-core/templates/swagger-codegen-java-client/config/swagger-codegen-config.json --force", "swagger:upgrade": "yo $(yarn resolve @ama-sdk/generator-sdk/src/generators/core) && yarn clear-index", - "swagger:regen2": "yo $(yarn resolve @ama-sdk/generator-sdk/src/generators/core) --swaggerSpecPath ./swagger-spec.yaml --force && yarn clear-index", - "swagger:generate2": "yo $(yarn resolve @ama-sdk/generator-sdk/generators/core) --swaggerSpecPath $(yarn resolve @api-spec/core-public/dist/API_Public.yaml) --force && yarn clear-index", + "swagger:regen": "yo $(yarn resolve @ama-sdk/generator-sdk/src/generators/core) --swaggerSpecPath ./swagger-spec.yaml --force && yarn clear-index", + "swagger:generate": "yo $(yarn resolve @ama-sdk/generator-sdk/generators/core) --swaggerSpecPath $(yarn resolve @api-spec/core-public/dist/API_Public.yaml) --force && yarn clear-index", "mock": "yarn ng g @ama-sdk/generator-sdk:mock" } } diff --git a/packages/@o3r-training/showcase-sdk/src/spec/api-mock.ts b/packages/@o3r-training/showcase-sdk/src/spec/api-mock.ts index 79ab1fe3bb..e2b33e84d8 100644 --- a/packages/@o3r-training/showcase-sdk/src/spec/api-mock.ts +++ b/packages/@o3r-training/showcase-sdk/src/spec/api-mock.ts @@ -1,6 +1,5 @@ import { ApiFetchClient, - BaseApiFetchClientConstructor, } from '@ama-sdk/client-fetch'; import { ApiClient, @@ -20,22 +19,6 @@ export interface Api { userApi: api.UserApi; } -/** - * Mock APIs - * @deprecated use `getMockedApi` with {@link ApiClient} instead, will be removed in v12. - */ -export const myApi: Api = { - petApi: new api.PetApi(MOCK_SERVER), - storeApi: new api.StoreApi(MOCK_SERVER), - userApi: new api.UserApi(MOCK_SERVER) -}; - -/** - * Retrieve mocked SDK Apis - * @param config configuration of the Api Client - * @deprecated use `getMockedApi` with {@link ApiClient} instead, will be removed in v12. - */ -export function getMockedApi(config?: string | BaseApiFetchClientConstructor): Api; /** * Retrieve mocked SDK Apis * @param apiClient Api Client instance @@ -46,23 +29,10 @@ export function getMockedApi(config?: string | BaseApiFetchClientConstructor): A * const mocks = getMockedApi(new ApiFetchClient({ basePath: MOCK_SERVER_BASE_PATH })); * ``` */ -export function getMockedApi(apiClient: ApiClient): Api; -/** - * Retrieve mocked SDK Apis - * @param config configuration of the Api Client - */ -export function getMockedApi(config?: string | BaseApiFetchClientConstructor | ApiClient): Api { - let apiConfigObj: ApiClient = MOCK_SERVER; - if (typeof config === 'string') { - apiConfigObj = new ApiFetchClient({ basePath: config }); - } else if (isApiClient(config)) { - apiConfigObj = config; - } else if (config) { - apiConfigObj = new ApiFetchClient(config); - } +export function getMockedApi(apiClient: ApiClient): Api { return { - petApi: new api.PetApi(apiConfigObj), - storeApi: new api.StoreApi(apiConfigObj), - userApi: new api.UserApi(apiConfigObj) + petApi: new api.PetApi(apiClient), + storeApi: new api.StoreApi(apiClient), + userApi: new api.UserApi(apiClient) }; } diff --git a/packages/@o3r/components/src/tools/pipes/capitalize/capitalize.module.ts b/packages/@o3r/components/src/tools/pipes/capitalize/capitalize.module.ts deleted file mode 100644 index d3ece0ac95..0000000000 --- a/packages/@o3r/components/src/tools/pipes/capitalize/capitalize.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { - NgModule, -} from '@angular/core'; -import { - CapitalizePipe, -} from './capitalize.pipe'; - -/** - * @deprecated please use O3rCapitalizePipe, will be removed in v12. - */ -@NgModule({ - declarations: [CapitalizePipe], - exports: [CapitalizePipe] -}) -export class CapitalizePipeModule {} diff --git a/packages/@o3r/components/src/tools/pipes/capitalize/capitalize.pipe.spec.ts b/packages/@o3r/components/src/tools/pipes/capitalize/capitalize.pipe.spec.ts index 4b1ef318ba..a9611c1a7d 100644 --- a/packages/@o3r/components/src/tools/pipes/capitalize/capitalize.pipe.spec.ts +++ b/packages/@o3r/components/src/tools/pipes/capitalize/capitalize.pipe.spec.ts @@ -1,31 +1,24 @@ import { - CapitalizePipe, O3rCapitalizePipe, } from './capitalize.pipe'; describe('CapitalizePipe', () => { const pipe = new O3rCapitalizePipe(); - const deprecatedPipe = new CapitalizePipe(); it('transforms "abc" to "Abc"', () => { expect(pipe.transform('abc')).toBe('Abc'); - expect(deprecatedPipe.transform('abc')).toBe('Abc'); }); it('transforms "abc def" to "Abc def"', () => { expect(pipe.transform('abc def')).toBe('Abc def'); - expect(deprecatedPipe.transform('abc def')).toBe('Abc def'); }); it('ignores whitespace', () => { expect(pipe.transform(' ')).toBe(' '); - expect(deprecatedPipe.transform(' ')).toBe(' '); }); it('does not break on empty values', () => { expect(pipe.transform()).toBe(undefined); - expect(deprecatedPipe.transform()).toBe(undefined); expect(pipe.transform(null)).toBe(null); - expect(deprecatedPipe.transform(null)).toBe(null); }); }); diff --git a/packages/@o3r/components/src/tools/pipes/capitalize/capitalize.pipe.ts b/packages/@o3r/components/src/tools/pipes/capitalize/capitalize.pipe.ts index 0fa7ee7d35..850394ae93 100644 --- a/packages/@o3r/components/src/tools/pipes/capitalize/capitalize.pipe.ts +++ b/packages/@o3r/components/src/tools/pipes/capitalize/capitalize.pipe.ts @@ -11,9 +11,3 @@ export class O3rCapitalizePipe implements PipeTransform { return firstLetter ? firstLetter.toUpperCase() + val!.slice(1) : value; } } - -/** - * @deprecated please use O3rCapitalizePipe, will be removed in v12. - */ -@Pipe({ name: 'capitalize' }) -export class CapitalizePipe extends O3rCapitalizePipe implements PipeTransform {} diff --git a/packages/@o3r/components/src/tools/pipes/capitalize/index.ts b/packages/@o3r/components/src/tools/pipes/capitalize/index.ts index 8ae359851e..b8725aa2a7 100644 --- a/packages/@o3r/components/src/tools/pipes/capitalize/index.ts +++ b/packages/@o3r/components/src/tools/pipes/capitalize/index.ts @@ -1,2 +1 @@ -export * from './capitalize.module'; export * from './capitalize.pipe'; diff --git a/packages/@o3r/components/src/tools/pipes/duration/duration.module.ts b/packages/@o3r/components/src/tools/pipes/duration/duration.module.ts deleted file mode 100644 index 4e55c092c5..0000000000 --- a/packages/@o3r/components/src/tools/pipes/duration/duration.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { - NgModule, -} from '@angular/core'; -import { - DurationPipe, -} from './duration.pipe'; - -/** - * @deprecated please use O3rDurationPipe, will be removed in v12. - */ -@NgModule({ - declarations: [DurationPipe], - exports: [DurationPipe] -}) -export class DurationPipeModule {} diff --git a/packages/@o3r/components/src/tools/pipes/duration/duration.pipe.spec.ts b/packages/@o3r/components/src/tools/pipes/duration/duration.pipe.spec.ts index f4c2fe15ae..67bf0a77d5 100644 --- a/packages/@o3r/components/src/tools/pipes/duration/duration.pipe.spec.ts +++ b/packages/@o3r/components/src/tools/pipes/duration/duration.pipe.spec.ts @@ -1,70 +1,56 @@ import { - DurationPipe, O3rDurationPipe, } from './duration.pipe'; describe('DurationPipe', () => { const pipe = new O3rDurationPipe(); - const deprecatedPipe = new DurationPipe(); it('transforms 120s to 0:02', () => { expect(pipe.transform(120)).toBe('0:02'); - expect(deprecatedPipe.transform(120)).toBe('0:02'); }); it('transforms 100s to 0:01', () => { expect(pipe.transform(100)).toBe('0:01'); - expect(deprecatedPipe.transform(100)).toBe('0:01'); }); it('transforms 3660 seconds to "1:01"', () => { expect(pipe.transform(3660)).toBe('1:01'); - expect(deprecatedPipe.transform(3660)).toBe('1:01'); }); it('transforms 90000s to "25:00" (duration exceeds 24 hours)', () => { expect(pipe.transform(90_000)).toBe('25:00'); - expect(deprecatedPipe.transform(90_000)).toBe('25:00'); }); it('transforms 360000s to "100:00" (hours are 3 digits long)', () => { expect(pipe.transform(360_000)).toBe('100:00'); - expect(deprecatedPipe.transform(360_000)).toBe('100:00'); }); it('transforms 120s to 0h02m', () => { expect(pipe.transform(120, '{h}h{mm}m')).toBe('0h02m'); - expect(deprecatedPipe.transform(120, '{h}h{mm}m')).toBe('0h02m'); }); it('transforms 120s to 00H02M', () => { expect(pipe.transform(120, '{hh}H{mm}M')).toBe('00H02M'); - expect(deprecatedPipe.transform(120, '{hh}H{mm}M')).toBe('00H02M'); }); it('transforms 3660s to 1h01', () => { expect(pipe.transform(3660, '{h}h{mm}')).toBe('1h01'); - expect(deprecatedPipe.transform(3660, '{h}h{mm}')).toBe('1h01'); }); it('transforms 86399s to 0d23h59m', () => { expect(pipe.transform(86_399, '{d}d{h}h{mm}m')).toBe('0d23h59m'); - expect(deprecatedPipe.transform(86_399, '{d}d{h}h{mm}m')).toBe('0d23h59m'); }); it('transforms 86399s to 0d86399s', () => { expect(pipe.transform(86_399, '{d}d{s}s')).toBe('0d86399s'); - expect(deprecatedPipe.transform(86_399, '{d}d{s}s')).toBe('0d86399s'); }); it('transforms 93675s to an object "{"d": 1, "h": 2, "m": 1, "s": 15}"', () => { expect(pipe.transform(93_675, '{"d": {d}, "h": {h}, "m": {m}, "s": {s}}')).toBe('{"d": 1, "h": 2, "m": 1, "s": 15}'); - expect(deprecatedPipe.transform(93_675, '{"d": {d}, "h": {h}, "m": {m}, "s": {s}}')).toBe('{"d": 1, "h": 2, "m": 1, "s": 15}'); }); it('returns pattern when regex not respected', () => { expect(pipe.transform(1234, 'hh:mm')).toBe('hh:mm'); - expect(deprecatedPipe.transform(1234, 'hh:mm')).toBe('hh:mm'); }); it('should work for custom unit times', () => { @@ -77,15 +63,6 @@ describe('DurationPipe', () => { divider: 25 } ])).toBe('57:1'); - expect(deprecatedPipe.transform(5725, '{t}:{k}', [ - { - formatCharacter: 't', - divider: 100 - }, { - formatCharacter: 'k', - divider: 25 - } - ])).toBe('57:1'); }); it('should work for unit times that are not present in the pattern', () => { @@ -102,18 +79,5 @@ describe('DurationPipe', () => { modulo: 25 } ])).toBe('57:0'); - expect(deprecatedPipe.transform(5725, '{t}:{k}', [ - { - formatCharacter: 't', - divider: 100 - }, { - formatCharacter: 'o', - divider: 25 - }, { - formatCharacter: 'k', - divider: 1, - modulo: 25 - } - ])).toBe('57:0'); }); }); diff --git a/packages/@o3r/components/src/tools/pipes/duration/duration.pipe.ts b/packages/@o3r/components/src/tools/pipes/duration/duration.pipe.ts index 2b73516987..e46df5d6f1 100644 --- a/packages/@o3r/components/src/tools/pipes/duration/duration.pipe.ts +++ b/packages/@o3r/components/src/tools/pipes/duration/duration.pipe.ts @@ -70,10 +70,3 @@ export class O3rDurationPipe implements PipeTransform { }, pattern); } } - -/** - * Converts a duration in seconds into the HH:mm format - * @deprecated please use O3rDurationPipe, will be removed in v12. - */ -@Pipe({ name: 'duration' }) -export class DurationPipe extends O3rDurationPipe implements PipeTransform {} diff --git a/packages/@o3r/components/src/tools/pipes/duration/index.ts b/packages/@o3r/components/src/tools/pipes/duration/index.ts index 968555b52a..026186e655 100644 --- a/packages/@o3r/components/src/tools/pipes/duration/index.ts +++ b/packages/@o3r/components/src/tools/pipes/duration/index.ts @@ -1,2 +1 @@ -export * from './duration.module'; export * from './duration.pipe'; diff --git a/packages/@o3r/components/src/tools/pipes/keep-white-space/index.ts b/packages/@o3r/components/src/tools/pipes/keep-white-space/index.ts index 2a51c3878f..f64a23c9e5 100644 --- a/packages/@o3r/components/src/tools/pipes/keep-white-space/index.ts +++ b/packages/@o3r/components/src/tools/pipes/keep-white-space/index.ts @@ -1,2 +1 @@ -export * from './keep-white-space.module'; export * from './keep-white-space.pipe'; diff --git a/packages/@o3r/components/src/tools/pipes/keep-white-space/keep-white-space.module.ts b/packages/@o3r/components/src/tools/pipes/keep-white-space/keep-white-space.module.ts deleted file mode 100644 index a2b370f43f..0000000000 --- a/packages/@o3r/components/src/tools/pipes/keep-white-space/keep-white-space.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { - NgModule, -} from '@angular/core'; -import { - KeepWhiteSpacePipe, -} from './keep-white-space.pipe'; - -/** - * @deprecated please use O3rKeepWhiteSpacePipe, will be removed in v12. - */ -@NgModule({ - declarations: [KeepWhiteSpacePipe], - exports: [KeepWhiteSpacePipe] -}) -export class KeepWhiteSpacePipeModule {} diff --git a/packages/@o3r/components/src/tools/pipes/keep-white-space/keep-white-space.pipe.spec.ts b/packages/@o3r/components/src/tools/pipes/keep-white-space/keep-white-space.pipe.spec.ts index 7138b582dd..e6d7209a43 100644 --- a/packages/@o3r/components/src/tools/pipes/keep-white-space/keep-white-space.pipe.spec.ts +++ b/packages/@o3r/components/src/tools/pipes/keep-white-space/keep-white-space.pipe.spec.ts @@ -1,29 +1,23 @@ import { - KeepWhiteSpacePipe, O3rKeepWhiteSpacePipe, } from './keep-white-space.pipe'; describe('Keep white space pipe', () => { let pipe: O3rKeepWhiteSpacePipe; - let deprecatedPipe: KeepWhiteSpacePipe; beforeEach(() => { pipe = new O3rKeepWhiteSpacePipe(); - deprecatedPipe = new KeepWhiteSpacePipe(); }); it('does nothing when no white spaces', () => { expect(pipe.transform('Guatemala')).toEqual('Guatemala'); - expect(deprecatedPipe.transform('Guatemala')).toEqual('Guatemala'); }); it('should work with space inside the word', () => { expect(pipe.transform('French Guiana')).toEqual('French Guiana'); - expect(deprecatedPipe.transform('French Guiana')).toEqual('French Guiana'); }); it('should do nothing when empty string', () => { expect(pipe.transform('')).toEqual(''); - expect(deprecatedPipe.transform('')).toEqual(''); }); }); diff --git a/packages/@o3r/components/src/tools/pipes/keep-white-space/keep-white-space.pipe.ts b/packages/@o3r/components/src/tools/pipes/keep-white-space/keep-white-space.pipe.ts index 6de7d556f3..34b3aa0e1a 100644 --- a/packages/@o3r/components/src/tools/pipes/keep-white-space/keep-white-space.pipe.ts +++ b/packages/@o3r/components/src/tools/pipes/keep-white-space/keep-white-space.pipe.ts @@ -11,11 +11,3 @@ export class O3rKeepWhiteSpacePipe implements PipeTransform { return value.replace(/\s/g, ' '); } } - -/** - * @deprecated please use O3rKeepWhiteSpacePipe, will be removed in v12. - */ -@Pipe({ - name: 'keepWhiteSpace' -}) -export class KeepWhiteSpacePipe extends O3rKeepWhiteSpacePipe implements PipeTransform {} diff --git a/packages/@o3r/components/src/tools/pipes/replace-with-bold/index.ts b/packages/@o3r/components/src/tools/pipes/replace-with-bold/index.ts index bead6ad185..80f7b7cd91 100644 --- a/packages/@o3r/components/src/tools/pipes/replace-with-bold/index.ts +++ b/packages/@o3r/components/src/tools/pipes/replace-with-bold/index.ts @@ -1,2 +1 @@ -export * from './replace-with-bold.module'; export * from './replace-with-bold.pipe'; diff --git a/packages/@o3r/components/src/tools/pipes/replace-with-bold/replace-with-bold.module.ts b/packages/@o3r/components/src/tools/pipes/replace-with-bold/replace-with-bold.module.ts deleted file mode 100644 index 3b56fc8cd9..0000000000 --- a/packages/@o3r/components/src/tools/pipes/replace-with-bold/replace-with-bold.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { - NgModule, -} from '@angular/core'; -import { - ReplaceWithBoldPipe, -} from './replace-with-bold.pipe'; - -/** - * @deprecated please use O3rReplaceWithBoldPipe, will be removed in v12. - */ -@NgModule({ - declarations: [ReplaceWithBoldPipe], - exports: [ReplaceWithBoldPipe] -}) -export class ReplaceWithBoldPipeModule {} diff --git a/packages/@o3r/components/src/tools/pipes/replace-with-bold/replace-with-bold.pipe.spec.ts b/packages/@o3r/components/src/tools/pipes/replace-with-bold/replace-with-bold.pipe.spec.ts index e1df14b1d2..b19d37f26e 100644 --- a/packages/@o3r/components/src/tools/pipes/replace-with-bold/replace-with-bold.pipe.spec.ts +++ b/packages/@o3r/components/src/tools/pipes/replace-with-bold/replace-with-bold.pipe.spec.ts @@ -1,49 +1,39 @@ import { O3rReplaceWithBoldPipe, - ReplaceWithBoldPipe, } from './replace-with-bold.pipe'; describe('Replace with bold pipe', () => { let pipe: O3rReplaceWithBoldPipe; - let deprecatedPipe: ReplaceWithBoldPipe; beforeEach(() => { pipe = new O3rReplaceWithBoldPipe(); - deprecatedPipe = new ReplaceWithBoldPipe(); }); it('search if the input match the label and change it to bold', () => { expect(pipe.transform('Guatemala', 'te')).toEqual('Guatemala'); - expect(deprecatedPipe.transform('Guatemala', 'te')).toEqual('Guatemala'); }); it('does nothing when no match', () => { expect(pipe.transform('Guatemala', 'sp')).toEqual('Guatemala'); - expect(deprecatedPipe.transform('Guatemala', 'sp')).toEqual('Guatemala'); }); it('should work with space inside the word', () => { expect(pipe.transform('French Guiana', 'g')).toEqual('French Guiana'); - expect(deprecatedPipe.transform('French Guiana', 'g')).toEqual('French Guiana'); }); it('search input match - special character test', () => { expect(pipe.transform('Finland (HEL)', '(H')).toEqual('Finland (HEL)'); - expect(deprecatedPipe.transform('Finland (HEL)', '(H')).toEqual('Finland (HEL)'); }); it('should ignore white spaces at the beginning', () => { expect(pipe.transform('Finland (HEL)', ' (H')).toEqual('Finland (HEL)'); - expect(deprecatedPipe.transform('Finland (HEL)', ' (H')).toEqual('Finland (HEL)'); }); it('should ignore white spaces', () => { expect(pipe.transform('Finland (HEL)', ' (H ')).toEqual('Finland (HEL)'); - expect(deprecatedPipe.transform('Finland (HEL)', ' (H ')).toEqual('Finland (HEL)'); }); it('should not ignore white spaces in the middle (no matches)', () => { expect(pipe.transform('Finland (HEL)', ' (H E')).toEqual('Finland (HEL)'); - expect(deprecatedPipe.transform('Finland (HEL)', ' (H E')).toEqual('Finland (HEL)'); }); }); diff --git a/packages/@o3r/components/src/tools/pipes/replace-with-bold/replace-with-bold.pipe.ts b/packages/@o3r/components/src/tools/pipes/replace-with-bold/replace-with-bold.pipe.ts index a7d7596628..3e26119e04 100644 --- a/packages/@o3r/components/src/tools/pipes/replace-with-bold/replace-with-bold.pipe.ts +++ b/packages/@o3r/components/src/tools/pipes/replace-with-bold/replace-with-bold.pipe.ts @@ -19,15 +19,3 @@ export class O3rReplaceWithBoldPipe implements PipeTransform { } } } - -/** - * @deprecated please use O3rReplaceWithBoldPipe, will be removed in v12. - */ -@Pipe({ - name: 'replaceWithBold' -}) -export class ReplaceWithBoldPipe extends O3rReplaceWithBoldPipe implements PipeTransform { - public escapeRegExp(str: string) { - return escapeRegExp(str); - } -} diff --git a/packages/@o3r/configuration/migration.json b/packages/@o3r/configuration/migration.json index 069566a2d0..0857f9e1d0 100644 --- a/packages/@o3r/configuration/migration.json +++ b/packages/@o3r/configuration/migration.json @@ -10,6 +10,11 @@ "version": "11.6.0-prerelease.0", "description": "Updates of @o3r/configuration to v11.6.*", "factory": "./schematics/ng-update/v11-6/index#updateV116" + }, + "migration-v12_0": { + "version": "12.0.0-next.0", + "description": "Updates of @o3r/configuration to v12.0.*", + "factory": "./schematics/ng-update/v12-0/index#updateV12_0" } } } diff --git a/packages/@o3r/configuration/schematics/ng-update/v12-0/index.spec.ts b/packages/@o3r/configuration/schematics/ng-update/v12-0/index.spec.ts new file mode 100644 index 0000000000..f8e0d4ddc8 --- /dev/null +++ b/packages/@o3r/configuration/schematics/ng-update/v12-0/index.spec.ts @@ -0,0 +1,55 @@ +import * as fs from 'node:fs'; +import * as path from 'node:path'; +import { + Tree, +} from '@angular-devkit/schematics'; +import { + SchematicTestRunner, + type UnitTestTree, +} from '@angular-devkit/schematics/testing'; + +const migrationPath = path.join(__dirname, '..', '..', '..', 'migration.json'); + +const notMigrated = `import { + computeConfigurationName, +} from '@o3r/configuration'; +export const CONFIGURATION_PRES_CONFIG_ID = computeConfigurationName('ConfigurationPresConfig', 'showcase'); +`; + +const migrated = `import {computeItemIdentifier} from '@o3r/core'; +export const CONFIGURATION_PRES_CONFIG_ID = computeItemIdentifier('ConfigurationPresConfig', 'showcase'); +`; + +describe('Update', () => { + let initialTree: Tree; + let runner: SchematicTestRunner; + beforeEach(() => { + initialTree = Tree.empty(); + initialTree.create('angular.json', fs.readFileSync(path.resolve(__dirname, '..', '..', '..', 'testing', 'mocks', 'angular.mocks.json'))); + initialTree.create('package.json', fs.readFileSync(path.resolve(__dirname, '..', '..', '..', 'testing', 'mocks', 'package.mocks.json'))); + initialTree.create('.eslintrc.json', fs.readFileSync(path.resolve(__dirname, '..', '..', '..', 'testing', 'mocks', '__dot__eslintrc.mocks.json'))); + runner = new SchematicTestRunner('schematics', migrationPath); + }); + + describe('Update v12.0', () => { + let tree: UnitTestTree; + const notMigratedPath = 'src/components/not-migrated.config.ts'; + const migratedPath = 'src/components/migrated.config.ts'; + + beforeEach(async () => { + initialTree.create(notMigratedPath, notMigrated); + initialTree.create(migratedPath, migrated); + tree = await runner.runSchematic('migration-v12_0', {}, initialTree); + }); + + it('should migrate the not migrated file', () => { + const newText = tree.readText(notMigratedPath); + expect(newText).not.toEqual(notMigrated); + expect(newText).toEqual(migrated); + }); + + it('should not change the file already migrated', () => { + expect(tree.readText(migratedPath)).toEqual(migrated); + }); + }); +}); diff --git a/packages/@o3r/configuration/schematics/ng-update/v12-0/index.ts b/packages/@o3r/configuration/schematics/ng-update/v12-0/index.ts new file mode 100644 index 0000000000..94c33e3943 --- /dev/null +++ b/packages/@o3r/configuration/schematics/ng-update/v12-0/index.ts @@ -0,0 +1,41 @@ +import { + chain, + type Rule, + type SchematicContext, + type Tree, +} from '@angular-devkit/schematics'; +import { + createSchematicWithMetricsIfInstalled, + type ImportsMapping, + updateImports, +} from '@o3r/schematics'; + +/** Map containing the import and value changes for computeConfigurationName updated to computeItemIdentifier in @o3r/core */ +const mapImportsConfigurationName: ImportsMapping = { + '@o3r/configuration': { + computeConfigurationName: { + newPackage: '@o3r/core', + newValue: 'computeItemIdentifier' + } + } +}; + +/** + * Update of Otter library V12.0 + */ +// eslint-disable-next-line @typescript-eslint/naming-convention -- version is in the function name +function updateV12_0Fn(): Rule { + return (tree: Tree, context: SchematicContext) => { + const updateRules: Rule[] = [ + updateImports(mapImportsConfigurationName) + ]; + + return chain(updateRules)(tree, context); + }; +} + +/** + * Update of Otter configuration V12.0 + */ +// eslint-disable-next-line @typescript-eslint/naming-convention -- version in the function name +export const updateV12_0 = createSchematicWithMetricsIfInstalled(updateV12_0Fn); diff --git a/packages/@o3r/configuration/schematics/use-config-signal/index.spec.ts b/packages/@o3r/configuration/schematics/use-config-signal/index.spec.ts index 51b65f6d96..0ee60228a5 100644 --- a/packages/@o3r/configuration/schematics/use-config-signal/index.spec.ts +++ b/packages/@o3r/configuration/schematics/use-config-signal/index.spec.ts @@ -33,7 +33,7 @@ describe('Migrate to config signal-based', () => { /** Configuration stream based on the input and the stored configuration*/ public config$: Observable; - @ConfigObserver() + @O3rConfig() private readonly dynamicConfig$: ConfigurationObserver; /** Input configuration to override the default configuration of the component */ diff --git a/packages/@o3r/configuration/src/core/configuration.ts b/packages/@o3r/configuration/src/core/configuration.ts index d0bc0a94c7..3c6fc5fe5c 100644 --- a/packages/@o3r/configuration/src/core/configuration.ts +++ b/packages/@o3r/configuration/src/core/configuration.ts @@ -1,5 +1,4 @@ import { - computeItemIdentifier, deepFill, } from '@o3r/core'; import { @@ -31,16 +30,6 @@ export interface Identifiable { id: string; } -/** - * Get the configuration name - * @deprecated use {@link computeItemIdentifier} from @o3r/core. Will be removed in v12 - * @param componentName Name of the component to get the configuration - * @param libraryName Name of the library the component is coming from - */ -export function computeConfigurationName(componentName: string, libraryName?: string) { - return computeItemIdentifier(componentName, libraryName); -} - /** * Get the component and library's names based on the configuration name * @param configurationName Name of the component as found in the store diff --git a/packages/@o3r/configuration/src/devkit/configuration-devtools.console.service.ts b/packages/@o3r/configuration/src/devkit/configuration-devtools.console.service.ts index 03d097aea9..39db01b459 100644 --- a/packages/@o3r/configuration/src/devkit/configuration-devtools.console.service.ts +++ b/packages/@o3r/configuration/src/devkit/configuration-devtools.console.service.ts @@ -142,15 +142,6 @@ export class ConfigurationDevtoolsConsoleService implements DevtoolsServiceInter this.copyElementToClipboard(JSON.stringify(configs)); } - /** - * Load a json configuration - * @param configurations configurations to load - * @deprecated please use `updateConfigurations` instead, will be removed in Otter v12. - */ - public loadConfiguration(configurations: string | CustomConfig[]): void { - this.configurationDevtools.loadConfiguration(configurations); - } - /** * Replace N configurations in one shot * @param configurations array of configurations to update diff --git a/packages/@o3r/configuration/src/devkit/configuration-devtools.service.ts b/packages/@o3r/configuration/src/devkit/configuration-devtools.service.ts index 6b0c770bef..67e31877b1 100644 --- a/packages/@o3r/configuration/src/devkit/configuration-devtools.service.ts +++ b/packages/@o3r/configuration/src/devkit/configuration-devtools.service.ts @@ -9,6 +9,7 @@ import { Store, } from '@ngrx/store'; import { + computeItemIdentifier, Configuration, CustomConfig, } from '@o3r/core'; @@ -22,7 +23,6 @@ import { shareReplay, } from 'rxjs/operators'; import { - computeConfigurationName, parseConfigurationName, } from '../core'; import { @@ -78,12 +78,12 @@ export class OtterConfigurationDevtools { */ public getComponentConfigName(selector: string | { library?: string; componentName: string }, isFallbackName = false) { if (!isFallbackName) { - return typeof selector === 'string' ? selector : computeConfigurationName(selector.componentName, selector.library || this.options.defaultLibraryName); + return typeof selector === 'string' ? selector : computeItemIdentifier(selector.componentName, selector.library || this.options.defaultLibraryName); } return typeof selector === 'string' - ? computeConfigurationName(selector, this.options.defaultLibraryName || 'global') - : computeConfigurationName(selector.componentName, this.options.defaultLibraryName || 'global'); + ? computeItemIdentifier(selector, this.options.defaultLibraryName || 'global') + : computeItemIdentifier(selector.componentName, this.options.defaultLibraryName || 'global'); } /** diff --git a/packages/@o3r/configuration/src/tools/configuration.decorators.ts b/packages/@o3r/configuration/src/tools/configuration.decorators.ts index 4389a7d4bc..deb176f8fd 100644 --- a/packages/@o3r/configuration/src/tools/configuration.decorators.ts +++ b/packages/@o3r/configuration/src/tools/configuration.decorators.ts @@ -29,15 +29,6 @@ const decorator = (target: any, key: string) => { } }; -/** - * Decorator to identify the configuration observer - * @deprecated please use O3rConfig, will be removed in v12 - */ -// eslint-disable-next-line @typescript-eslint/naming-convention -- decorator should be PascalCase -export function ConfigObserver() { - return decorator; -} - /** * Decorator to identify the component's configuration */ diff --git a/packages/@o3r/configuration/src/tools/configuration.signal.ts b/packages/@o3r/configuration/src/tools/configuration.signal.ts index 8e4e3bd086..75a3531757 100644 --- a/packages/@o3r/configuration/src/tools/configuration.signal.ts +++ b/packages/@o3r/configuration/src/tools/configuration.signal.ts @@ -33,30 +33,8 @@ export function configSignal( configInput: InputSignal | undefined>, configId: string, defaultConfig: T -): ConfigurationSignal; -/** - * Get a configuration signal - * @param configInput - * @param configId - * @param defaultConfig - * @param configurationService - * @deprecated please do not provide `configurationService`, will be removed in v12 - */ -export function configSignal( - configInput: InputSignal | undefined>, - configId: string, - defaultConfig: T, - // eslint-disable-next-line @typescript-eslint/unified-signatures -- deprecated will be removed in v12 - configurationService?: ConfigurationBaseService | null -): ConfigurationSignal; -// eslint-disable-next-line jsdoc/require-jsdoc -- overload signature will be removed in v12 -export function configSignal( - configInput: InputSignal | undefined>, - configId: string, - defaultConfig: T, - configurationService?: ConfigurationBaseService | null ): ConfigurationSignal { - configurationService = configurationService ?? inject(ConfigurationBaseService, { optional: true }); + const configurationService = inject(ConfigurationBaseService, { optional: true }); if (configurationService) { configurationService.extendConfiguration(defaultConfig, configId); } diff --git a/packages/@o3r/core/package.json b/packages/@o3r/core/package.json index 3e550d3c73..fd75790846 100644 --- a/packages/@o3r/core/package.json +++ b/packages/@o3r/core/package.json @@ -209,7 +209,6 @@ "@o3r/components", "@o3r/configuration", "@o3r/design", - "@o3r/dev-tools", "@o3r/dynamic-content", "@o3r/eslint-config-otter", "@o3r/eslint-plugin", @@ -222,7 +221,6 @@ "@o3r/rules-engine", "@o3r/schematics", "@o3r/store-sync", - "@o3r/storybook", "@o3r/stylelint-plugin", "@o3r/styling", "@o3r/telemetry", diff --git a/packages/@o3r/core/schematics/rule-factories/otter-environment/index.ts b/packages/@o3r/core/schematics/rule-factories/otter-environment/index.ts index be1baaada6..627a8c6b80 100644 --- a/packages/@o3r/core/schematics/rule-factories/otter-environment/index.ts +++ b/packages/@o3r/core/schematics/rule-factories/otter-environment/index.ts @@ -35,7 +35,6 @@ const editTsConfigJson = (tree: Tree) => { * Update Otter environment variable for schematics * @param options @see RuleFactory.options * @param options.projectName - * @param options.enableStorybook * @param options.enableStyling * @param options.enableAnalytics * @param options.workingDirectory @@ -44,7 +43,6 @@ const editTsConfigJson = (tree: Tree) => { export function updateOtterEnvironmentAdapter( options: { projectName?: string | null | undefined; - enableStorybook?: boolean; enableStyling?: boolean; enableAnalytics?: boolean; workingDirectory?: string | null; diff --git a/packages/@o3r/dev-tools/.compodocrc.json b/packages/@o3r/dev-tools/.compodocrc.json deleted file mode 100644 index 013963f6d7..0000000000 --- a/packages/@o3r/dev-tools/.compodocrc.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/compodoc/compodoc/develop/src/config/schema.json", - "name": "Dev tools", - "output": "../../../generated-doc/dev-tools", - "tsconfig": "./tsconfig.doc.json", - "assetsFolder": "../../../.attachments", - "disableSourceCode": true, - "disableDomTree": true, - "disableTemplateTab": true, - "disableStyleTab": true, - "disableGraph": true, - "disableCoverage": true, - "disablePrivate": true, - "disableProtected": true, - "disableInternal": true, - "disableLifeCycleHooks": true, - "disableRoutesGraph": true, - "disableSearch": false, - "hideGenerator": true, - "customFavicon": "../../../assets/logo/flavors/otter-128x128.png", - "templates": "../../../compodoc-templates/package" -} diff --git a/packages/@o3r/dev-tools/.gitignore b/packages/@o3r/dev-tools/.gitignore deleted file mode 100644 index 005382f3fe..0000000000 --- a/packages/@o3r/dev-tools/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -/core -/cli -/index.* -/utils -/helpers -scripts diff --git a/packages/@o3r/dev-tools/.npmignore b/packages/@o3r/dev-tools/.npmignore deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/@o3r/dev-tools/README.md b/packages/@o3r/dev-tools/README.md deleted file mode 100644 index 56b4a91293..0000000000 --- a/packages/@o3r/dev-tools/README.md +++ /dev/null @@ -1,239 +0,0 @@ -

Otter dev tools

-

- Super cute Otter! -

- -## Description - -[![Status](https://img.shields.io/badge/status-deprecated-red?style=for-the-badge)](https://www.npmjs.com/package/@o3r/dev-tools) -[![Stable Version](https://img.shields.io/npm/v/@o3r/dev-tools?style=for-the-badge)](https://www.npmjs.com/package/@o3r/dev-tools) -[![Bundle Size](https://img.shields.io/bundlephobia/min/@o3r/dev-tools?color=green&style=for-the-badge)](https://www.npmjs.com/package/@o3r/dev-tools) - -Various CLI scripts to help your CI/CD and your dependency management - -> [!CAUTION] -> **Deprecated package** -> `@o3r/dev-tools` package is deprecated and will no longer be updated as of Otter v12. -> The following CLI scripts have been moved to other otter packages: -> -> * `artifact-cleaner`: please use `o3r-artifact-cleaner` from the package `@o3r/artifactory-tools` -> * `pr-artifact-cleaner`: please use `o3r-pr-artifact-cleaner` from the package `@o3r/artifactory-tools` -> * `comment-pr`: please use `o3r-comment-pr` from the package `@o3r/azure-tools` -> * `version-harmonize`: replaced by the JSON ESLint rule [@o3r/json-dependency-versions-harmonize](https://github.com/AmadeusITGroup/otter/tree/main/docs/linter/eslint-plugin/rules/json-dependency-versions-harmonize.md) - -## How to install - -This package can be used via `npx` command to executed on of the listed command line interfaces. - -```shell -npx -p @o3r/dev-tools ... -``` - -## Artifact Retriever - -> :warning: **Deprecate**: This script is deprecated and will be removed in Otter v12. - -Gets an artifact from the ArtiFactory - -### Usage - -```shell -Usage: artifact-retriever [options] - -Get an artifact from Artifactory, artifact-group, artifact-name and artifact-version are mandatory - -Options: - - --registry Registry URL. It is ignored for Azure Artifacts. - --repository-manager Artifact repository manager. Supported managers are JFrog, Azure Artifacts (default: JFrog) - --organization Azure Artifacts organization - --project Azure Artifacts project - --feed Azure Artifacts feed - -a, --artifact-name Artifact name - -v, --artifact-version Artifact version - -g, --artifact-group Artifact group name - -r, --artifact-repos Artifact repositories (default: ) - -u, --username Artifactory username (default from ARTIFACTORY_USERNAME) - -p, --password Artifactory user password (default from ARTIFACTORY_PASSWORD) - -o, --out Output file name (default: ./built/${name}.jar) - --use-package-version Use the package version as artifact version - -h, --help output usage information -``` - -> [!TIP] -> *password* and *username* options can be provided via Environment variables. - -### JFrog Example - -```shell -artifact-retriever.js --registry "https://jfrog.io/repoName" -u -p -v "1.0.0" -g "io.swagger" -a "typescriptFetch-swagger-codegen" --out /path/to/typescriptFetch-swagger-codegen.jar -``` - -### Azure Artifacts Example - -```shell -artifact-retriever.js --repository-manager "Azure Artifacts" --organization "AmadeusDigitalAirline" --project "Otter" --feed "otter" -u -p -v "1.0.0" -g "io.swagger" -a "typescriptFetch-swagger-codegen" --out /path/to/typescriptFetch-swagger-codegen.jar -``` - -## Set Version - -> :warning: **Deprecate**: This script is deprecated and will be removed in Otter v12. - -Replaces the value of the `version` field of the `package.json` matched by the pattern provided to the `--include` options. - -### Usage - -```shell -Usage: set-version [options] - -Replace the packages version in a monorepos - -Options: - - -p, --placeholder Pattern of the version placeholder (default: 0.0.0) - --include Add files pattern to apply the verison replacement (default: */lerna.json,**/package.json,!**/node_modules/**/{package,lerna}.json) - -h, --help output usage information -``` - -## Artifact cleaner - -> :warning: **Deprecate**: This script is deprecated, please use `o3r-artifact-cleaner` from the package `@o3r/artifactory-tools` - -Cleans old artifacts from artifactory repositories - -### Usage - -```shell -Usage: artifact-cleaner -b [options] - -Clean old artifacts from artifactory repositories, base 64 encoding of username:password is mandatory - -Options: - - --artifactory-url Artifact URL (Required) - -a, --duration-kept All the artifact which have been created since more time than this value(ms) will be deleted (Default to 10080000ms (i.e. 7 days)) - -r, --repositories Artifact repositories to clean up (coma separated) ex : npm-otter-pr,npm-o3r-pr (Default to npm-otter-pr) - -t, --type-filter List of artifact type that should be deleted coma separated (ex: jar,tgz) (Default : tgz) - --dry-run List all files that should be deleted without actually deleting them. (Default to false) - -h, --help Output usage information - -Example : yarn artifact-cleaner -b thisismybase64tokenwithuserandencryptedpassword -``` - -## PR Artifact cleaner - -> :warning: **Deprecate**: This is deprecated, please use `o3r-pr-artifact-cleaner` from the package `@o3r/artifactory-tools` - -Cleans old PR artifacts by identifying using the the build version that is present in the path. If build version is not present in the path this tool cannot yet be used. - -### Usage - -```shell -Usage: pr-artifact-cleaner -b [options] - -Clean old artifacts from artifactory repositories, base 64 encoding of username:password is mandatory - -Options: - - -u, --artifactory-url Artifact URL - -d, --duration-kept Only artifacts which are older than this value (in days) will be deleted. (Default to 1 day) - -r, --repository Artifact repository to clean up. (Default to dga-maven-built-adt-nce) - -pr, --pr-versions Number of pr versions that will be kept. (Default to 2 last versions) - --dry-run List all files that should be deleted without actually deleting them. (Default to false) - -p, --path Artifact paths to cleanup use matcher from AQL language. Be careful that the path do not include release artifacts (Default to com/amadeus/retailing/*-PR-*) - -h, --help Output usage information - -Example : yarn pr-artifact-cleaner -b thisismybase64tokenwithuserandencryptedpassword -``` - -## Peer dependencies updater - -> :warning: **Deprecate**: This script is deprecated and will be removed in Otter v12. - -Updates a package.json with the given dependencies' versions and their respective peer dependencies. -Relies on `npm info` to retrieve package information. - -### Usage - -```shell -Usage: peer-dependencies-updater [other packages] - -Update the given packages version and their peer dependencies range in the provided package.json file (defaulted to local ./package.json) - -Options: - - -p, --package-json Path to the package.json file to update. Default: ./package.json - --verbose Display debug log message - --silent Do not exit with error in case of metadata fetch error - -Example : peer-dependencies-updater "@random/package@~2.21.0" "@o3r/core" -``` - -## Version Harmonize - -> :warning: **Deprecate**: This script is deprecated and will be removed in Otter v12, it is replaced by the JSON ESLint rule [@o3r/json-dependency-versions-harmonize](https://github.com/AmadeusITGroup/otter/tree/main/docs/linter/eslint-plugin/rules/json-dependency-versions-harmonize.md). - -Replaces the dependencies' version in a monorepos. -This align the dependencies' range of each package of a yarn monorepo to the latest range detected in the monorepo. - -### Usage - -```shell -Usage: version-harmonize [options] - -Replace the dependencies version in a monorepos - -Options: - -m, --monorepo Path to the private package.json of the monorepo (default: "") - -t, --dependencyTypes <...types> List of dependency types to update, comma separated (default: ["optionalDependencies","dependencies","devDependencies","peerDependencies","generatorDependencies"]) - -v, --verbose Display debug logs - -a, --alignPeerDependencies Enforce to align the version of the dependencies with the latest range - -h, --help display help for command -``` - -### Otter options - -The `version-harmonize` command is reading the content of the package.json file to get the following options: - -* ignore: List of dependency name patterns to ignore when updating the dependencies range. -* skipPackage: Determines if the current package should be ignored when updating the range of the dependencies. - -The configuration can be provided in the package.json file as follows: - -```json -{ - "name": "@o3r/my-package", - "otter": { - "versionHarmonize": { - "ignore": [ - "typescript", - "webpack" - ] - } - } -} -``` - -## Generate Package Exports - -> :warning: **Deprecate**: This script is deprecated and will be removed in Otter v12. - -Edits the generated package.json file to add the exports of the packages based on defined sub-entries. -The sub-entries should be specified as JSON files (`package.json` per default) in the folder to expose. - -### Usage - -```shell -Usage: generate-package-exports [options] - -Update package.json exports - -Options: - --cwd Path to the root of the project (default: "") - -o, --outDir Path to folder containing the package.json to edit (default: "./dist") - -s, --srcDir Path to source folder containing the source code (default: "./src") - -p, --pattern Pattern of the JSON filenames to read to determine sub entries (default: "package.json") - --export-types <...types> Add additional supported export types (default: ["typings","types","node","module","es2015","es2020","esm2015","esm2020","esm","default","require","import"]) - -v, --verbose Display debug logs - -h, --help display help for command -``` diff --git a/packages/@o3r/dev-tools/collection.json b/packages/@o3r/dev-tools/collection.json deleted file mode 100644 index 6bea3f165e..0000000000 --- a/packages/@o3r/dev-tools/collection.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/angular/angular-cli/main/packages/angular_devkit/schematics/collection-schema.json", - "schematics": { - "ng-add": { - "description": "Add Otter dev-tools to the project.", - "factory": "./schematics/ng-add/index#ngAdd", - "schema": "./schematics/ng-add/schema.json", - "aliases": ["install", "i"] - } - } -} diff --git a/packages/@o3r/dev-tools/configs/specReporter.config.json b/packages/@o3r/dev-tools/configs/specReporter.config.json deleted file mode 100644 index 50df65be34..0000000000 --- a/packages/@o3r/dev-tools/configs/specReporter.config.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "displayStacktrace": "none", - "displayFailuresSummary": true, - "displayPendingSummary": true, - "displaySuccessesSummary": false, - "displaySuccessfulSpec": true, - "displayFailedSpec": true, - "displayPendingSpec": true, - "displaySpecDuration": false, - "displaySuiteNumber": false, - "colors": { - "success": "green", - "failure": "red", - "pending": "yellow" - }, - "prefixes": { - "success": "✓ ", - "failure": "✗ ", - "pending": "* " - }, - "customProcessors": [] -} diff --git a/packages/@o3r/dev-tools/eslint.config.mjs b/packages/@o3r/dev-tools/eslint.config.mjs deleted file mode 100644 index 87abd087fa..0000000000 --- a/packages/@o3r/dev-tools/eslint.config.mjs +++ /dev/null @@ -1,7 +0,0 @@ -import shared from '../../../eslint.shared.config.mjs'; -import local from './eslint.local.config.mjs'; - -export default [ - ...shared, - ...local -]; diff --git a/packages/@o3r/dev-tools/eslint.local.config.mjs b/packages/@o3r/dev-tools/eslint.local.config.mjs deleted file mode 100644 index 04c6078f04..0000000000 --- a/packages/@o3r/dev-tools/eslint.local.config.mjs +++ /dev/null @@ -1,31 +0,0 @@ -import { - dirname, -} from 'node:path'; -import { - fileURLToPath, -} from 'node:url'; -import globals from 'globals'; - -const __filename = fileURLToPath(import.meta.url); -// __dirname is not defined in ES module scope -const __dirname = dirname(__filename); - -export default [ - { - name: '@o3r/dev-tools/projects', - languageOptions: { - sourceType: 'module', - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - 'tsconfig.eslint.json', - 'tsconfig.build.json', - 'tsconfig.builders.json' - ] - }, - globals: { - ...globals.node - } - } - } -]; diff --git a/packages/@o3r/dev-tools/jest.config.js b/packages/@o3r/dev-tools/jest.config.js deleted file mode 100644 index e940e10f49..0000000000 --- a/packages/@o3r/dev-tools/jest.config.js +++ /dev/null @@ -1,10 +0,0 @@ -const getJestGlobalConfig = require('../../../jest.config.ut').getJestGlobalConfig; - -/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */ -module.exports = { - ...getJestGlobalConfig(__dirname), - projects: [ - '/testing/jest.config.ut.js', - '/testing/jest.config.ut.builders.js' - ] -}; diff --git a/packages/@o3r/dev-tools/migration.json b/packages/@o3r/dev-tools/migration.json deleted file mode 100644 index 3d297d063c..0000000000 --- a/packages/@o3r/dev-tools/migration.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/angular/angular-cli/master/packages/angular_devkit/schematics/collection-schema.json", - "schematics": { - "ng-update": { - "version": "10.0.0-alpha.0", - "description": "Deprecation warning of @o3r/dev-tools for v10.0.*", - "factory": "./schematics/ng-update/index#ngUpdate" - } - } -} diff --git a/packages/@o3r/dev-tools/package.json b/packages/@o3r/dev-tools/package.json deleted file mode 100644 index cfcb9f35fb..0000000000 --- a/packages/@o3r/dev-tools/package.json +++ /dev/null @@ -1,119 +0,0 @@ -{ - "name": "@o3r/dev-tools", - "version": "0.0.0-placeholder", - "publishConfig": { - "access": "public" - }, - "deprecated": "@o3r/dev-tools package is deprecated and will no longer be updated as of v12", - "description": "Various CLI scripts to help your CI/CD process and your dependency management", - "main": "./dist/src/public_api.js", - "typings": "./dist/src/public_api.d.ts", - "keywords": [ - "otter", - "otter-module" - ], - "scripts": { - "nx": "nx", - "ng": "yarn nx", - "build": "yarn nx build dev-tools", - "build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest", - "build:source": "tsc -b tsconfig.build.json --pretty && yarn cpy ./package.json ./configs/*.json dist", - "postbuild": "patch-package-json-main", - "prepare:publish": "prepare-publish ./dist", - "prepare:build:builders": "yarn cpy 'schematics/**/*.json' dist/schematics && yarn cpy '{collection,migration}.json' dist" - }, - "bin": { - "artifact-cleaner": "./dist/src/cli/artifact-cleaner.js", - "artifact-retriever": "./dist/src/cli/artifact-retriever.js", - "comment-pr": "./dist/src/cli/comment-pr.js", - "generate-package-exports": "./dist/src/cli/generate-package-exports.js", - "git-release-management": "./dist/src/cli/git-release-management.js", - "in-source-dep-check": "./dist/src/cli/checks/in-source-dep-check.js", - "package-export": "./dist/src/cli/package-export.js", - "peer-dependencies-updater": "./dist/src/cli/peer-dependencies-updater.js", - "pr-artifact-cleaner": "./dist/src/cli/pr-artifact-cleaner.js", - "set-version": "./dist/src/cli/set-version.js", - "version-harmonize": "./dist/src/cli/version-harmonize.js" - }, - "dependencies": { - "@o3r/artifactory-tools": "workspace:^", - "@o3r/azure-tools": "workspace:^", - "@o3r/workspace": "workspace:^", - "@types/request-promise-native": "^1.0.18", - "azure-devops-node-api": "^13.0.0", - "chalk": "^4.1.2", - "commander": "^12.0.0", - "form-data": "^4.0.0", - "fs-extra": "^11.0.0", - "globby": "^11.1.0", - "isomorphic-fetch": "~3.0.0", - "jasmine-spec-reporter": "^7.0.0", - "minimatch": "~9.0.3", - "request": "^2.88.0", - "request-promise-native": "^1.0.9", - "rimraf": "^6.0.1", - "semver": "^7.5.2", - "tslib": "^2.6.2", - "type-fest": "^4.10.2", - "winston": "^3.8.2" - }, - "peerDependencies": { - "@angular-devkit/schematics": "^18.2.0" - }, - "peerDependenciesMeta": { - "@angular-devkit/schematics": { - "optional": true - } - }, - "devDependencies": { - "@angular-devkit/core": "~18.2.0", - "@angular-devkit/schematics": "~18.2.0", - "@babel/core": "~7.26.0", - "@babel/preset-typescript": "~7.26.0", - "@compodoc/compodoc": "^1.1.19", - "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0", - "@nx/eslint-plugin": "~19.8.0", - "@nx/jest": "~19.8.0", - "@o3r/build-helpers": "workspace:^", - "@o3r/eslint-plugin": "workspace:^", - "@stylistic/eslint-plugin": "~2.7.0", - "@types/fs-extra": "^11.0.0", - "@types/glob": "^8.0.0", - "@types/jest": "~29.5.2", - "@types/node": "^20.0.0", - "@types/request": "^2.48.7", - "@types/semver": "^7.3.13", - "@typescript-eslint/parser": "~8.18.0", - "angular-eslint": "~18.4.0", - "cpy-cli": "^5.0.0", - "eslint": "~9.17.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-import-resolver-typescript": "^3.6.3", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-import-newlines": "^1.4.0", - "eslint-plugin-jest": "~28.8.0", - "eslint-plugin-jsdoc": "~50.2.0", - "eslint-plugin-prefer-arrow": "~1.2.3", - "eslint-plugin-unicorn": "^56.0.0", - "eslint-plugin-unused-imports": "^4.1.4", - "globals": "^15.9.0", - "jest": "~29.7.0", - "jest-junit": "~16.0.0", - "jsonc-eslint-parser": "~2.4.0", - "node-fetch": "^3.0.0", - "nx": "~19.8.0", - "rimraf": "^6.0.1", - "ts-jest": "~29.2.0", - "ts-node": "~10.9.2", - "type-fest": "^4.10.2", - "typescript": "~5.5.4", - "typescript-eslint": "~8.18.0" - }, - "engines": { - "node": "^18.19.1 || ^20.11.1 || >=22.0.0" - }, - "schematics": "./collection.json", - "ng-update": { - "migrations": "./migration.json" - } -} diff --git a/packages/@o3r/dev-tools/project.json b/packages/@o3r/dev-tools/project.json deleted file mode 100644 index 5318e70f95..0000000000 --- a/packages/@o3r/dev-tools/project.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "dev-tools", - "$schema": "https://raw.githubusercontent.com/nrwl/nx/master/packages/nx/schemas/project-schema.json", - "projectType": "library", - "sourceRoot": "packages/@o3r/dev-tools/src", - "prefix": "o3r", - "targets": { - "build": { - "executor": "nx:run-script", - "outputs": ["{projectRoot}/dist/package.json"], - "options": { - "script": "postbuild" - }, - "dependsOn": ["compile", "build-builders"] - }, - "prepare-build-builders": { - "executor": "nx:run-script", - "options": { - "script": "prepare:build:builders" - } - }, - "build-builders": { - "executor": "nx:run-script", - "options": { - "script": "build:builders" - } - }, - "compile": { - "executor": "nx:run-script", - "options": { - "script": "build:source" - } - }, - "lint": { - "executor": "nx:run-commands" - }, - "test": { - "executor": "@nx/jest:jest", - "options": { - "jestConfig": "packages/@o3r/dev-tools/jest.config.js" - } - }, - "prepare-publish": { - "executor": "nx:run-script", - "options": { - "script": "prepare:publish" - } - }, - "publish": { - "executor": "nx:run-commands", - "options": { - "command": "npm publish packages/@o3r/dev-tools/dist" - } - }, - "documentation": { - "executor": "nx:run-script", - "options": { - "script": "compodoc" - } - } - }, - "tags": ["tools"] -} diff --git a/packages/@o3r/dev-tools/schematics/ng-add/index.ts b/packages/@o3r/dev-tools/schematics/ng-add/index.ts deleted file mode 100644 index 830678f8e2..0000000000 --- a/packages/@o3r/dev-tools/schematics/ng-add/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { - Rule, - SchematicContext, - Tree, -} from '@angular-devkit/schematics'; - -/** - * Add Otter dev-tools to an Angular Project - */ -export function ngAdd(): Rule { - return (tree: Tree, context: SchematicContext) => { - context.logger.warn('@o3r/dev-tools package is deprecated and will no longer be updated as of v12.'); - return tree; - }; -} diff --git a/packages/@o3r/dev-tools/schematics/ng-add/schema.json b/packages/@o3r/dev-tools/schematics/ng-add/schema.json deleted file mode 100644 index 13d59bb37a..0000000000 --- a/packages/@o3r/dev-tools/schematics/ng-add/schema.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "ngAddSchematicsSchema", - "title": "Add Otter dev-tools ", - "description": "ngAdd Otter dev-tools ", - "properties": { - "projectName": { - "type": "string", - "description": "Project name", - "$default": { - "$source": "projectName" - } - } - }, - "additionalProperties": true, - "required": [ - ] -} diff --git a/packages/@o3r/dev-tools/schematics/ng-add/schema.ts b/packages/@o3r/dev-tools/schematics/ng-add/schema.ts deleted file mode 100644 index d551b32f64..0000000000 --- a/packages/@o3r/dev-tools/schematics/ng-add/schema.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface NgAddSchematicsSchema { - /** Project name */ - projectName?: string | undefined; -} diff --git a/packages/@o3r/dev-tools/schematics/ng-update/index.ts b/packages/@o3r/dev-tools/schematics/ng-update/index.ts deleted file mode 100644 index 160464fe8b..0000000000 --- a/packages/@o3r/dev-tools/schematics/ng-update/index.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { - Rule, - SchematicContext, - Tree, -} from '@angular-devkit/schematics'; - -/** - * Update Otter dev-tools in an Angular Project - */ -export function ngUpdate(): Rule { - return (tree: Tree, context: SchematicContext) => { - context.logger.warn('@o3r/dev-tools package is deprecated and will no longer be updated as of v12.'); - return tree; - }; -} diff --git a/packages/@o3r/dev-tools/src/cli/aql-artifact-cleaner.ts b/packages/@o3r/dev-tools/src/cli/aql-artifact-cleaner.ts deleted file mode 100644 index 6a1447ee4b..0000000000 --- a/packages/@o3r/dev-tools/src/cli/aql-artifact-cleaner.ts +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env node - -import { - program, -} from 'commander'; -import { - Headers, - Options, -} from 'request'; -import * as request from 'request-promise-native'; -import * as winston from 'winston'; - -program - .description('[DEPRECATED] Clean artifacts older and not downloaded for a certain amount of time from artifactory repositories') - .requiredOption('-u, --artifactory-url ', 'Artifactory URL') - .option('-d, --duration-kept ', 'Only artifacts which are older and have not been downloaded during this duration (in days) will be deleted.', (v) => +v, 7) - .option('-o, --offset ', 'Minimal number of artifacts you want to keep (newest will be kept)', (v) => +v, 10) - .option('-r, --repository ', 'Artifact repository to clean up.', 'dga-docker-built-adt-nce') - .option('-p, --path ', 'Artifact paths to cleanup using matcher from AQL language. Be careful that the path do not include release artifacts.', '*') - .option('-f, --filename ', 'Filenames to cleanup using matcher from AQL language.', '*') - .option('--dry-run', 'List all files that should be deleted without actually deleting them') - .option('-a, --api-key ', 'Artifactory API Key of the user that can be used to log in', (value, previous) => /[\dA-Za-z]+/.test(value) ? value : previous) - .option('-b, --basicAuth ', 'Base 64 encoding of username:password (password already encrypted from artifactory UI)', (value, previous) => /[\dA-Za-z]+/.test(value) ? value : previous) - .option('-c, --only-creation-time', 'Pass to true if you don\'t want to consider the last downloaded time') - .option('-t, --last-downloaded-time-value ', 'This is to be used if you which to pass a different value than durationKept for the download part', (v) => +v) - .option('--property ', 'Artifactory property to filter on') - .option('--property-value ', 'Value of the Artifactory property to filter on') - .option('-v, --verbose', 'To display the executed AQL query') - .parse(process.argv); - -const winstonOptions = { - console: { - format: winston.format.combine( - winston.format.prettyPrint(), - winston.format.splat(), - winston.format.printf((info) => { - if (typeof info.message === 'object') { - info.message = JSON.stringify(info.message, null, 3); - } - - return info.message as string; - }) - ) - } -}; - -const opts = program.opts(); - -const logger = winston.createLogger({ - level: opts.verbose ? 'debug' : 'info', - format: winston.format.simple(), - transports: [ - new winston.transports.Console(winstonOptions.console) - ] -}); - -logger.warn('This script is deprecated, will be removed in Otter v12.'); - -if (!opts.basicAuth && !opts.apiKey) { - logger.error('Authentication is mandatory, please specify a base 64 encoded user:password with b parameter or an ApiKey with -a parameter'); - process.exit(1); -} else if (opts.basicAuth && opts.apiKey) { - logger.error('Only one authentication method should be used at a time. Please provide only the apiKey (-a) or the basicAuth (-b) but not both.'); - process.exit(1); -} -const authHeader: Headers = opts.basicAuth - ? { Authorization: 'Basic ' + (opts.basicAuth as string) } - : { 'X-JFrog-Art-Api': (opts.apiKey as string) }; - -let url: string = opts.artifactoryUrl; -url += (url.endsWith('/') ? '' : '/') + 'api/search/aql'; -const programOptions = opts.opts(); -const ageInDays: number = programOptions.durationKept; -const repository: string = programOptions.repository; -const path: string = programOptions.path; -const filename: string = programOptions.filename; -const offset: string = programOptions.offset; -const shouldConsiderDownloadedTime = !!programOptions.onlyCreationTime; -const isDownloadedTimeValueDefined = !!programOptions.lastDownloadedTimeValue; -const downloadedTimeValue: number = programOptions.lastDownloadedTimeValue; -const property: string = programOptions.property; -const propertyValue: string = programOptions.propertyValue; -const options = { - headers: authHeader, - uri: url, - body: `items.find( - { - "$and": - [ - {"repo": {"$eq":"${repository}"}}, - {"$and":[{"path":{"$match":"${path}"}}, {"path":{"$nmatch":"*.npm*"}}]}, - {"name":{"$match":"${filename}"}}, - ${(!!property && !!propertyValue) ? `{"@${property}":{"$eq":"${propertyValue}"}},` : ''} - {"created":{"$before":"${ageInDays}d"}}${shouldConsiderDownloadedTime ? '' : ','} - ${shouldConsiderDownloadedTime ? '' : `{"$or":[{"stat.downloaded": {"$before":"${isDownloadedTimeValueDefined ? downloadedTimeValue : ageInDays}d"}}, {"stat.downloads":{"$eq":null}}]}`} - ] - } - ) - .include("name","repo","path","created","size") - .sort({"$desc" : ["created"]}).offset(${offset}) - .limit(10000)` -} as const satisfies Options; - -logger.debug(`AQL search executed : ${options.body}`); -logger.info(`Url called : ${url}`); - -void (async () => { - logger.info(`Requesting old artifacts using ${url}`); - let responseSearch: any; - try { - responseSearch = await request.post(url, options).promise(); - } catch { - logger.error('Error while doing the call to artifactory (authentication or url might be wrong) %o', responseSearch); - process.exit(0); - } - const responseSearchObj: { results: { repo: string; path: string; name: string }[] } = JSON.parse(responseSearch); - // uris will contain the list of all artifacts that need to be deleted - const filesToDelete = responseSearchObj.results.map((data) => (opts.artifactoryUrl as string) + repository + '/' + data.path + '/' + data.name); - for (const uri of filesToDelete) { - logger.info(`Deleting ${uri}...`); - if (!opts.dryRun) { - if (uri.length < 1000) { - const response = await request.delete(uri, options).promise(); - logger.info(response); - } else { - logger.warn('Cannot delete because path is too long'); - } - } - } -})(); diff --git a/packages/@o3r/dev-tools/src/cli/artifact-cleaner.ts b/packages/@o3r/dev-tools/src/cli/artifact-cleaner.ts deleted file mode 100644 index 33338fa58f..0000000000 --- a/packages/@o3r/dev-tools/src/cli/artifact-cleaner.ts +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env node -import { - spawnSync, -} from 'node:child_process'; - -// eslint-disable-next-line no-console -- keep to warn of package deprecation -console.warn('This CLI is deprecated, please use `o3r-artifact-cleaner` from the package `@o3r/artifactory-tools`'); - -spawnSync('o3r-artifact-cleaner', process.argv.slice(2), { - shell: true, - stdio: 'inherit' -}); diff --git a/packages/@o3r/dev-tools/src/cli/artifact-retriever.ts b/packages/@o3r/dev-tools/src/cli/artifact-retriever.ts deleted file mode 100644 index de0e4b6465..0000000000 --- a/packages/@o3r/dev-tools/src/cli/artifact-retriever.ts +++ /dev/null @@ -1,252 +0,0 @@ -#!/usr/bin/env node -import * as fs from 'node:fs'; -import * as http from 'node:http'; -import * as https from 'node:https'; -import * as path from 'node:path'; -import { - program, -} from 'commander'; -import * as fse from 'fs-extra'; -import { - CookieJar, - Headers, -} from 'request'; -import * as request from 'request-promise-native'; -import * as winston from 'winston'; -import { - GavcResponse, -} from '../helpers/gavc-response'; - -const SUPPORTED_REPOSITORY_MANAGERS = ['JFrog', 'Azure Artifacts']; - -program - .description('[DEPRECATED] Get an artifact from an Artifact repository manager') - .requiredOption('--registry ', 'Registry URL. It is ignored for Azure Artifacts.') - .option('--repository-manager ', `Artifact repository manager. Supported managers are ${SUPPORTED_REPOSITORY_MANAGERS.join(', ')}`, 'JFrog') - .option('--organization ', 'Azure Artifacts organization', undefined) - .option('--project ', 'Azure Artifacts project', undefined) - .option('--feed ', 'Azure Artifacts feed', undefined) - .option('-a, --artifact-name ', 'Artifact name', undefined) - .option('-v, --artifact-version ', 'Artifact version', undefined) - .option('-g, --artifact-group-id ', 'Artifact group id', undefined) - .option('-r, --artifact-repos ', 'Artifact repositories', (repos: string) => repos.split(','), []) - .option('-u, --username ', 'Artifactory username', 'mvn-readonly') - .option('-p, --password ', 'Artifactory user password') - .option('--password_env_var ', 'Artifactory user password environment var', undefined) - .option('-o, --out ', 'Output file name (default: ./built/${name}.jar)', undefined) - .option('--silent', 'Prevent exit code 1 if artifact not found (Usage example : dep-checker with post-install scripts', false) - .option('--verbose', 'Display debug log message') - .option('--use-package-version', 'Use the package version as artifact version') - .parse(process.argv); - -const opts = program.opts(); - -const logger = winston.createLogger({ - level: opts.verbose ? 'debug' : 'info', - format: winston.format.simple(), - transports: new winston.transports.Console() -}); - -logger.warn('This script is deprecated, will be removed in Otter v12.'); - -if (!SUPPORTED_REPOSITORY_MANAGERS.includes(opts.repositoryManager)) { - logger.error(`Unsupported repository manager: ${opts.repositoryManager as string}`); - process.exit(10); -} - -if (opts.repositoryManager === 'Azure Artifacts') { - if (!opts.organization) { - logger.error('No organization specified for Azure Artifacts'); - process.exit(11); - } - if (!opts.project) { - logger.error('No project specified for Azure Artifacts'); - process.exit(12); - } - if (!opts.feed) { - logger.error('No feed specified for Azure Artifacts'); - process.exit(13); - } -} - -if (!opts.artifactVersion && !opts.usePackageVersion) { - logger.error('No version specified'); - process.exit(14); -} - -if (!opts.artifactName) { - logger.error('No artifact name specified'); - process.exit(15); -} - -if (!opts.artifactGroupId) { - logger.error('No group id specified'); - process.exit(16); -} - -let url: string = opts.registry; -const jar = request.jar(); -const options: { headers?: Headers; jar: CookieJar } = { jar }; -const password = opts.password || (opts.password_env_var && process.env[opts.password_env_var]); -if (opts.username && password) { - options.headers = { - Authorization: 'Basic ' + Buffer.from(`${opts.username as string}:${password as string}`).toString('base64') - }; -} -const name: string = opts.artifactName; -const artifactGroupId: string = opts.artifactGroupId; - -let version: string = opts.usePackageVersion ? JSON.parse(fs.readFileSync(path.resolve(process.cwd(), 'package.json'), { encoding: 'utf8' })).version : opts.artifactVersion; - -const filePath = opts.out || `./built/${name}.jar`; -fse.ensureDirSync(path.resolve(process.cwd(), path.dirname(filePath))); - -/** - * Report error on artifact downloading - * @param e - */ -const reportError = (e: Error) => { - logger.error(e); -}; - -/** - * Download the specified Artifact on JFrog - */ -async function retrieveArtifactFromJFrog() { - logger.info(`Searching for ${name}@${version}`); - - url += (url.endsWith('/') ? '' : '/') + `api/search/gavc?a=${name}&g=${artifactGroupId}`; - - if (opts.artifactRepos && opts.artifactRepos.length > 0) { - url += `&repos=${(opts.artifactRepos as string[]).join(',')}`; - } - - if (version.startsWith('0.0.0')) { - url += `&v=${version}`; - } - let responseSearch; - try { - responseSearch = await request.get(url, options).promise(); - } catch { - logger.warn('First call to get artifact information failed, retries'); - responseSearch = await request.get(url, options).promise(); - } - logger.info(responseSearch); - const responseSearchObj: { results: { uri: string }[] } = JSON.parse(responseSearch); - const uris = responseSearchObj.results - .map((res) => res.uri) - .filter((uri) => uri.endsWith('.jar')) - .sort((a, b) => { - if (a > b) { - return -1; - } else if (a < b) { - return 1; - } - return 0; - }); - - if (uris.length > 0) { - const artifactUrl = uris[0]; - logger.info(`Call to ${artifactUrl}`); - const gavcResponse: string = await request.get(artifactUrl, options).promise(); - logger.debug(`GavcResponse : ${gavcResponse}`); - const parsedGavcResponse: GavcResponse = JSON.parse(gavcResponse); - const downloadUri: string = parsedGavcResponse.downloadUri; - logger.info(`Downloading artifact ${downloadUri}`); - - const file = fs.createWriteStream(path.resolve(process.cwd(), filePath)); - file.on('error', reportError); - - const cookieString = jar.getCookieString(url); - const httpOptions = { headers: options.headers ? { ...options.headers, cookie: cookieString } : undefined }; - - if (artifactUrl.startsWith('https')) { - https.get(downloadUri, httpOptions, (response) => response.pipe(file)).on('error', reportError); - } else { - http.get(downloadUri, httpOptions, (response) => response.pipe(file)).on('error', reportError); - } - } else { - if (opts.silent) { - logger.warn('No artifact found, silent mode ON, prevented the failure'); - } else { - logger.error('No artifact found'); - process.exit(2); - } - } -} - -/** - * Get the latest version, if it exists, of the specified artifact - * @param packages Array of packages from the Azure feed - * @param artifactName Name of the artifact to get the latest version from - */ -function getLatestVersion(packages: Record[], artifactName: string) { - const normalizedArtifactName = `${artifactGroupId}:${artifactName}`.toLowerCase(); - for (const pckg of packages) { - if (pckg.normalizedName === artifactName || pckg.normalizedName === normalizedArtifactName) { - const latestVersion = (pckg.versions as { isLatest: boolean; version: string }[]).find((v) => v.isLatest); - if (!latestVersion) { - throw new Error(`No latest version found for ${artifactName}`); - } - return latestVersion.version; - } - } - throw new Error(`No package ${artifactName} found`); -} - -/** - * Download the specified Artifact on Azure - */ -async function retrieveArtifactFromAzure() { - try { - if (version.startsWith('0.0.0')) { - const res = await request.get( - `https://feeds.dev.azure.com/${opts.organization as string}/${opts.project as string}/_apis/packaging/feeds/${opts.feed as string}/packages?api-version=6.0-preview.1`, - options - ).promise(); - version = getLatestVersion(JSON.parse(res).value, name); - } - logger.info(`Searching for ${name}@${version}`); - - url = `https://pkgs.dev.azure.com/${opts.organization as string}/${opts.project as string}/_apis/packaging/feeds/${opts.feed as string}/maven/${opts.artifactGroupId as string}` - + `/${name}/${version}/${name}-${version}.jar/content?api-version=6.0-preview.1`; - - logger.info(`Call to ${url}`); - const downloadUri = await new Promise((resolve, reject) => { - https.get(url, options, (response) => resolve(response.headers.location)).on('error', reject); - }); - if (!downloadUri) { - throw new Error(`Could not get the download url for the artifact ${name}`); - } - logger.info(`Downloading artifact ${downloadUri}`); - - const file = fs.createWriteStream(path.resolve(process.cwd(), filePath)); - file.on('error', reportError); - - if (!downloadUri.startsWith('https')) { - throw new Error('Artifact must be downloaded using https protocol'); - } - https.get(downloadUri, (response) => response.pipe(file)).on('error', reportError); - } catch (e) { - if (opts.silent) { - logger.warn(e); - } else { - logger.error(e); - process.exit(3); - } - } -} -/** - * Download an artifact on the specified artifact repository manager - */ -function retrieveArtifact() { - switch (opts.repositoryManager) { - case 'JFrog': { - return retrieveArtifactFromJFrog(); - } - case 'Azure Artifacts': { - return retrieveArtifactFromAzure(); - } - } -} -void retrieveArtifact(); diff --git a/packages/@o3r/dev-tools/src/cli/checks/in-source-dep-check.ts b/packages/@o3r/dev-tools/src/cli/checks/in-source-dep-check.ts deleted file mode 100644 index ade0230ffd..0000000000 --- a/packages/@o3r/dev-tools/src/cli/checks/in-source-dep-check.ts +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env node - -import { - readFileSync, -} from 'node:fs'; -import { - dirname, - join, - resolve, -} from 'node:path'; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -- _builtinLibs is not part of repl types (due to the fact it is flagged to internal usage purpose) -// @ts-ignore -// eslint-disable-next-line import-newlines/enforce -- needed to have the `@ts-ignore` working -import { _builtinLibs as nodeWellKnownModules } from 'node:repl'; -import { - bold, -} from 'chalk'; -import { - program, -} from 'commander'; -import * as glob from 'globby'; -import * as winston from 'winston'; - -/** Console logger */ -const logger = winston.createLogger({ - format: winston.format.combine( - winston.format.colorize(), - winston.format.simple() - ), - transports: new winston.transports.Console() -}); - -const dependencyTypes = ['dependencies', 'devDependencies', 'peerDependencies']; -program - .description('[DEPRECATED] Checks that the dependencies imported in the code are declared in the package.json file') - .option('--root ', 'Project root directory', (p) => resolve(process.cwd(), p), process.cwd()) - .option( - '--ignore <...patterns>', 'Path patters to ignore', - (p, previous) => ([...previous, ...p.split(',')]), - ['**/node_modules/**', '**/dist/**', '**/dist-*/**', '**/mocks/**', '**/templates/**', '**/*.template'] - ) - .option('--ignore-workspace', 'Ignore the workspace and only check from the root directory') - .option('--fail-on-error', 'Return a non-null status in case of dependency issue found') - .parse(process.argv); - -const { root, ignore, ignoreWorkspace, failOnError } = program.opts(); - -const packagePatterns: string[] = ignoreWorkspace - ? join(root, 'package.json').replace(/\\/g, '/') - : (JSON.parse(readFileSync(join(root, 'package.json'), { encoding: 'utf8' })).workspaces?.map((p: string) => join(p, 'package.json').replace(/\\/g, '/')) || []); - -void (async () => { - logger.warn('This script is deprecated, will be removed in Otter v12'); - const packageFiles = await glob(packagePatterns, { absolute: true }); - let fixFound = false; - - await Promise.all(packageFiles - .sort() - .map(async (packageFile) => { - const packageJson = JSON.parse(readFileSync(packageFile, { encoding: 'utf8' })); - const packageName = packageJson.name; - const packageFolder = dirname(packageFile); - - const sourceFiles = glob( - [join(packageFolder, '**', '*.{cts,mts,ts,tsx,cjs,mjs,js,jsx}')].map((pattern) => pattern.replace(/\\/g, '/')), - { - absolute: true, - ignore - } - ); - - const styleFiles = glob( - [join(packageFolder, '**', '*.{css,scss}')].map((pattern) => pattern.replace(/\\/g, '/')), - { - absolute: true, - ignore - } - ); - - const deps = (await Promise.all([ - sourceFiles.then((files) => { - return files - .map((file) => readFileSync(file, { encoding: 'utf8' })) - .reduce((acc, content) => { - return [ - ...acc, - ...[ - ...content.matchAll(/^import .* from ["']([^.].*)["'];?/gm), - ...content.matchAll(/ ?= ?require\(["']([^.].*)["']\);?$/gm) - ].map(([, dep]) => dep) - ]; - }, []); - }), - styleFiles.then((files) => { - return files - .map((file) => readFileSync(file, { encoding: 'utf8' })) - .reduce((acc, content) => { - return [ - ...acc, - ...[...content.matchAll(/^@import ["']~?([^.].*)["'];?$/gm)] - .map(([, dep]) => dep) - .filter((dep) => !dep.startsWith('http')) - ]; - }, []); - }) - ])) - .flat() - // get module name only - .map((dep) => dep.startsWith('@') ? dep.split('/').slice(0, 2).join('/') : dep.split('/')[0]) - // filter node modules - .filter((dep) => !dep.startsWith('node:') && !nodeWellKnownModules.includes(dep)) - // filter auto-reference - .filter((dep) => dep !== packageName) - // remove duplicates - .filter((dep, i, arr) => arr.lastIndexOf(dep) === i); - - deps - .filter((dep) => !dependencyTypes.some((type) => !!(packageJson[type]?.[dep] || packageJson[type]?.[`@types/${dep}`]))) - .forEach((dep) => { - fixFound = true; - logger.warn(`${bold(packageName)} is missing a dependency to ${bold(dep)}`); - }); - })); - - if (!fixFound) { - logger.info('No missing package.json dependencies found'); - } else if (failOnError) { - process.exit(1); - } -})(); diff --git a/packages/@o3r/dev-tools/src/cli/comment-pr.ts b/packages/@o3r/dev-tools/src/cli/comment-pr.ts deleted file mode 100644 index d565ed6e6b..0000000000 --- a/packages/@o3r/dev-tools/src/cli/comment-pr.ts +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env node -import { - spawnSync, -} from 'node:child_process'; - -// eslint-disable-next-line no-console -- keep to warn of package deprecation -console.warn('This CLI is deprecated, please use `o3r-comment-pr` from the package `@o3r/azure-tools`'); - -spawnSync('o3r-comment-pr', process.argv.slice(2), { - shell: true, - stdio: 'inherit' -}); diff --git a/packages/@o3r/dev-tools/src/cli/generate-package-exports.ts b/packages/@o3r/dev-tools/src/cli/generate-package-exports.ts deleted file mode 100644 index b747681b43..0000000000 --- a/packages/@o3r/dev-tools/src/cli/generate-package-exports.ts +++ /dev/null @@ -1,121 +0,0 @@ -#!/usr/bin/env node - -import { - existsSync, - promises as fs, - readFileSync, -} from 'node:fs'; -import * as path from 'node:path'; -import { - program, -} from 'commander'; -import * as globby from 'globby'; -import type { - PackageJson, -} from 'type-fest'; -import * as winston from 'winston'; - -/** Options of the CLI */ -interface Options { - outDir: string; - srcDir: string; - pattern: string; - cwd: string; - exportTypes: string[]; - verbose: boolean; -} - -/** Console logger */ -const logger = winston.createLogger({ - format: winston.format.combine( - winston.format.colorize(), - winston.format.simple() - ), - transports: new winston.transports.Console() -}); - -program - .description('[DEPRECATED] Update package.json exports') - .option('--cwd ', 'Path to the root of the project', (rootPath) => path.resolve(process.cwd(), rootPath), process.cwd()) - .option('-o, --outDir ', 'Path to folder containing the package.json to edit', - (folderPath) => folderPath, - './dist' - ) - .option('-s, --srcDir ', 'Path to source folder containing the source code', - (folderPath) => folderPath, - './src' - ) - .option('-p, --pattern ', 'Pattern of the JSON filenames to read to determine sub entries', - (value) => value, - 'package.json' - ) - .option('--export-types <...types>', 'Add additional supported export types', - (value, mem) => ([...mem, ...value.split(',')]), - ['typings', 'types', 'node', 'module', 'es2015', 'es2020', 'esm2015', 'esm2020', 'esm', 'default', 'require', 'import'] - ) - .option('-v, --verbose', 'Display debug logs') - .parse(process.argv); - -logger.warn('This script is deprecated, will be removed in Otter v12.'); - -const { cwd, pattern, exportTypes, ...options } = program.opts(); -const srcDir = path.resolve(cwd, options.srcDir); -const outDir = path.resolve(cwd, options.outDir); - -logger.level = options.verbose ? 'debug' : 'info'; - -if (!existsSync(outDir)) { - logger.error(`The output directory ${outDir} does not exist`); - process.exit(1); -} - -if (!existsSync(srcDir)) { - logger.error(`The source directory ${srcDir} does not exist`); - process.exit(2); -} - -/** - * Update the package.json with sub entries in package.json exports field - */ -const editPackageJson = async () => { - const outputtedPackageJsonPath = path.join(outDir, 'package.json'); - const originPackageJsonPath = path.join(cwd, 'package.json'); - const packageJson = JSON.parse(await fs.readFile(outputtedPackageJsonPath, { encoding: 'utf8' })) as PackageJson; - logger.debug(`Parsed outputed ${outputtedPackageJsonPath}`); - const originPackageJson = existsSync(originPackageJsonPath) ? JSON.parse(await fs.readFile(originPackageJsonPath, { encoding: 'utf8' })) as PackageJson : {}; - logger.debug(`Parsed original ${originPackageJsonPath}`); - - packageJson.exports ||= {}; - (packageJson.exports as Record)['./package.json'] ||= (packageJson.exports as Record)?.['./package.json'] || { default: './package.json' }; - (packageJson.exports as Record)['.'] ||= (packageJson.exports as Record)?.['.'] || { - ...Object.fromEntries(exportTypes.map((type) => [type, originPackageJson[type] as string | undefined])), - default: originPackageJson.main || './index.js', - node: (originPackageJson.node || originPackageJson.main) as PackageJson.Exports - }; - - const subPackagesPath = await globby(path.posix.join('**', pattern), { cwd: srcDir }); - logger.debug(`${subPackagesPath.length} sub entries found (pattern: "${path.posix.join('**', pattern)}" in ${srcDir}):`); - subPackagesPath.forEach((subPackagePath) => logger.debug(`sub entry: ${subPackagePath}`)); - const exportMap = subPackagesPath.reduce>((acc, subPackagePathRelative) => { - const subPackagePath = path.join(srcDir, subPackagePathRelative); - const subPackage = JSON.parse(readFileSync(subPackagePath, { encoding: 'utf8' })) as PackageJson; - const relativePath = ('./' + path.relative(srcDir, path.dirname(subPackagePath))).split(path.sep).join(path.posix.sep); - acc[relativePath] = exportTypes.reduce>((exportsAcc, type) => { - if (subPackage[type]) { - exportsAcc[type] = ('./' + path.normalize(path.join(path.dirname(subPackagePathRelative), subPackage[type] as string))).split(path.sep).join(path.posix.sep); - } - return exportsAcc; - }, {}); - return acc; - }, {}); - packageJson.exports = { ...(packageJson.exports as Record), ...exportMap }; - logger.info(`Edit package.json with ${Object.keys(exportMap).length} sub entries`); - Object.keys(exportMap).forEach((exp) => logger.debug(`export sub entry: ${exp}`)); - await fs.writeFile(outputtedPackageJsonPath, JSON.stringify(packageJson, null, 2)); -}; - -editPackageJson() - .then(() => process.exit(0)) - .catch((err) => { - throw err; - }); diff --git a/packages/@o3r/dev-tools/src/cli/git-release-management.ts b/packages/@o3r/dev-tools/src/cli/git-release-management.ts deleted file mode 100644 index 73677f046c..0000000000 --- a/packages/@o3r/dev-tools/src/cli/git-release-management.ts +++ /dev/null @@ -1,85 +0,0 @@ -#!/usr/bin/env node -import { - program, -} from 'commander'; -import { - parse, - SemVer, -} from 'semver'; -import * as winston from 'winston'; -import { - checkoutCrtRcBranch, - checkoutCurrentAlphaOrNextBranch, - commitChangeLogs, - createNextAlphaBranch, - createNextMajorBranch, - createRcBranch, - createReleaseBranch, - deleteCrtRcBranch, - deleteCurrentAlphaOrNextBranch, - deletePreviousReleaseBranch, -} from '../helpers'; - -program - .description('[DEPRECATED] Creates next minor/major branches and delete previous ones') - .requiredOption('--release-version ', 'Version to create RC or final release for (x.y.z format)', (v) => (/^(\d+)\.(\d+)\.(\d+)$/.test(v) ? v : undefined)) - .requiredOption('--release-action ', 'Action that needs to be performed by the cli : rcRelease or finalRelease') - .option('--renovate-path ', 'Will update renovate file if found ad the given path') - .option('--delete-previous-release', 'If true, will delete previous released branch', false) - .option('--verbose', 'Display debug log message') - .parse(process.argv); - -const opts = program.opts(); - -const logger = winston.createLogger({ - level: opts.verbose ? 'debug' : 'info', - format: winston.format.simple(), - transports: new winston.transports.Console() -}); - -logger.warn('This script is deprecated, will be removed in Otter v12.'); - -/** - * Performs the operations needed for the release candidate step - * @param {object} version - */ -async function createRcRelease(version: SemVer) { - logger.info(`Initiating release candidate process for ${version.format()}`); - await checkoutCurrentAlphaOrNextBranch(version, logger); - await createRcBranch(version, logger); - await createNextAlphaBranch(version, logger, opts.renovatePath); - if (version.minor === 0) { - await createNextMajorBranch(version, logger, opts.renovatePath); - } - await deleteCurrentAlphaOrNextBranch(version, logger); -} - -/** - * Performs the operations needed for the final release step - * @param {object} version - */ -async function createFinalRelease(version: SemVer) { - logger.info(`Initiating final release process for ${version.format()}.`); - await checkoutCrtRcBranch(version, logger); - await commitChangeLogs(version); - await createReleaseBranch(version, logger); - if (opts.deletePreviousRelease) { - await deletePreviousReleaseBranch(version, logger); - } - await deleteCrtRcBranch(version, logger); -} - -const parsedVersion = parse(opts.releaseVersion); -if (!parsedVersion) { - logger.error(`Unable to parse the provided version : ${opts.releaseVersion as string}`); - process.exit(10); -} - -if (opts.releaseAction === 'rcRelease') { - void createRcRelease(parsedVersion); -} else if (opts.releaseAction === 'finalRelease') { - void createFinalRelease(parsedVersion); -} else { - logger.error(`Invalid action '${opts.releaseAction as string}'.`); - process.exit(9); -} diff --git a/packages/@o3r/dev-tools/src/cli/package-export.ts b/packages/@o3r/dev-tools/src/cli/package-export.ts deleted file mode 100644 index 7aaa648562..0000000000 --- a/packages/@o3r/dev-tools/src/cli/package-export.ts +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env node - -import * as fs from 'node:fs'; -import * as path from 'node:path'; -import { - program, -} from 'commander'; -import { - sync as globbySync, -} from 'globby'; -import * as winston from 'winston'; - -const collect = (pattern: string, patterns: string[]) => { - patterns.push(pattern); - return patterns; -}; - -let packageJsonPath: string | undefined; - -program - .arguments('[package.json file]') - .description('[DEPRECATED] Edit package.json to export the files') - .option('-i, --ignore ', 'An array of glob patterns to exclude matches', collect, []) - .option('-S, --source-folder ', 'Source folder', 'src/') - .option('--verbose', 'Display debug log message') - .action((actionPackageJsonPath = 'package.json') => { - packageJsonPath = path.resolve(process.cwd(), actionPackageJsonPath); - }) - .parse(process.argv); - -const opts = program.opts(); - -const logger = winston.createLogger({ - level: opts.verbose ? 'debug' : 'info', - format: winston.format.combine( - winston.format.colorize(), - winston.format.simple() - ), - transports: new winston.transports.Console() -}); -logger.warn('This script is deprecated, will be removed in Otter v12.'); - -let files: string[] = []; -files.push( - // List the folders in the src/ folder - ...globbySync('*/', { cwd: path.resolve(process.cwd(), opts.sourceFolder), dot: true, onlyDirectories: true }) - .map((folder) => folder.replace(/[/\\]$/i, '') + '/'), - // List the files in the src/ folder - ...globbySync('*', { cwd: path.resolve(process.cwd(), opts.sourceFolder), dot: true, onlyFiles: true, ignore: opts.ignore }) - .map((file) => { - const ext = path.extname(file); - // replace extension by ".*" - return file.replace(new RegExp(ext + '$', 'i'), '.*'); - }) -); - -const packageJsonFile = path.resolve(process.cwd(), packageJsonPath || 'package.json'); -const packageJson: { [x: string]: any } = JSON.parse(fs.readFileSync(packageJsonFile, { encoding: 'utf8' })); - -files.push( - // Keep the patterns already defined in package.json - ...packageJson.files.filter((file: string) => !files.includes(file)) -); - -// remove duplicate RegExps -files = files.reduce((acc, file) => { - const reg = new RegExp('^' + file.replace(/\\*\./gi, '\\.').replace(/\\*\*/gi, '[^\\/]*') + '$'); - return acc.filter((f) => f === file || !reg.test(f)); -}, [...files]); - -// Print the new list of files to export -packageJson.files = files; -fs.writeFileSync(packageJsonFile, JSON.stringify(packageJson, null, 2) + '\n'); - -files - .forEach((file) => logger.debug(`Added ${file} in ${packageJson.name as string} package.json`)); diff --git a/packages/@o3r/dev-tools/src/cli/peer-dependencies-updater.ts b/packages/@o3r/dev-tools/src/cli/peer-dependencies-updater.ts deleted file mode 100644 index 525dfccf97..0000000000 --- a/packages/@o3r/dev-tools/src/cli/peer-dependencies-updater.ts +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env node - -import * as path from 'node:path'; -import { - program, -} from 'commander'; -import * as winston from 'winston'; -import { - updatePeerDependencies, -} from '../utils/update-peer-dependencies'; - -const pathingCalculation = (value: string) => path.resolve(process.cwd(), value); - -let dependencies: string[] = []; - -program - .arguments('[dependencies...]') - .description('[DEPRECATED] Update the given packages version and their peer dependencies range in the provided package.json file (defaulted to local ./package.json)') - .option('-p, --package-json ', 'Path to the package.json file to update. Default: ./package.json', './package.json') - .option('--verbose', 'Display debug log message') - .option('--silent', 'Do not exit with error in case of metadata fetch error') - .action((actionDependencies: string[] = []) => { - dependencies = actionDependencies; - }) - .parse(process.argv); - -const opts = program.opts(); - -const logger = winston.createLogger({ - level: opts.verbose ? 'debug' : 'info', - format: winston.format.simple(), - transports: new winston.transports.Console() -}); - -logger.warn('This script is deprecated, will be removed in Otter v12.'); - -void (async () => { - try { - await updatePeerDependencies(dependencies, pathingCalculation(opts.packageJson), opts.verbose, opts.silent); - } catch (e) { - logger.error(e); - process.exit(1); - } -})(); diff --git a/packages/@o3r/dev-tools/src/cli/pr-artifact-cleaner.ts b/packages/@o3r/dev-tools/src/cli/pr-artifact-cleaner.ts deleted file mode 100644 index 94975e5d44..0000000000 --- a/packages/@o3r/dev-tools/src/cli/pr-artifact-cleaner.ts +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env node -import { - spawnSync, -} from 'node:child_process'; - -// eslint-disable-next-line no-console -- keep to warn of package deprecation -console.warn('This CLI is deprecated, please use `o3r-pr-artifact-cleaner` from the package `@o3r/artifactory-tools`'); - -spawnSync('o3r-pr-artifact-cleaner', process.argv.slice(2), { - shell: true, - stdio: 'inherit' -}); diff --git a/packages/@o3r/dev-tools/src/cli/set-version.ts b/packages/@o3r/dev-tools/src/cli/set-version.ts deleted file mode 100644 index 61f07a6cb8..0000000000 --- a/packages/@o3r/dev-tools/src/cli/set-version.ts +++ /dev/null @@ -1,75 +0,0 @@ -#!/usr/bin/env node - -import * as fs from 'node:fs'; -import * as path from 'node:path'; -import { - bold, -} from 'chalk'; -import { - program, -} from 'commander'; -import { - sync as globbySync, -} from 'globby'; -import { - clean, -} from 'semver'; -import * as winston from 'winston'; - -const defaultIncludedFiles = ['**/package.json', '!/**/templates/**/package.json', '!**/node_modules/**/package.json']; - -const collect = (pattern: string, patterns: string[]) => { - if (patterns === defaultIncludedFiles && pattern) { - patterns = []; - } - patterns.push(pattern); - return patterns; -}; - -const logger = winston.createLogger({ - format: winston.format.combine( - winston.format.colorize(), - winston.format.simple() - ), - transports: new winston.transports.Console() -}); - -let replaceVersion: string; -program - .arguments('') - .description('[DEPRECATED] Replace the packages version in a monorepos') - .option('-p, --placeholder ', 'Pattern of the version placeholder', '0.0.0(-placeholder)?') - .option('--include ', 'Add files pattern to apply the version replacement', collect, defaultIncludedFiles) - .option('-v, --verbose', 'Display debug logs') - .action((version: string) => { - const cleanVersion = clean(version); - logger.warn(`This CLI is deprecated, please use ${bold('o3r-set-version')} from the package ${bold('@o3r/workspace')}`); - - if (!cleanVersion) { - logger.error(`The version "${version}" is invalid`); - return process.exit(1); - } - replaceVersion = cleanVersion; - }) - .parse(process.argv); - -const options: any = program.opts(); -logger.level = options.verbose ? 'debug' : 'info'; - -globbySync(options.include, { cwd: process.cwd() }) - .map((file: string) => path.join(process.cwd(), file)) - .map((filePath: string) => ({ - path: filePath, - content: fs.readFileSync(filePath).toString() - })) - .forEach((pathWithContent: { path: string; content: string }) => { - const newContent = pathWithContent.content - .replace(new RegExp('"([~^]?)' + (options.placeholder as string).replace(/\\*\./g, '\\.') + '"', 'g'), `"$1${replaceVersion}"`) - .replace(/"workspace:([^~]?)[^"]*"(,?)$/gm, `"$1${replaceVersion}"$2`); - if (newContent === pathWithContent.content) { - logger.debug(`No change in ${pathWithContent.path}`); - } else { - logger.info(`update version in ${pathWithContent.path}`); - fs.writeFileSync(pathWithContent.path, newContent); - } - }); diff --git a/packages/@o3r/dev-tools/src/cli/version-harmonize.ts b/packages/@o3r/dev-tools/src/cli/version-harmonize.ts deleted file mode 100644 index 083765a724..0000000000 --- a/packages/@o3r/dev-tools/src/cli/version-harmonize.ts +++ /dev/null @@ -1,255 +0,0 @@ -#!/usr/bin/env node - -import { - promises as fs, - readFileSync, -} from 'node:fs'; -import * as path from 'node:path'; -import { - blue, - bold, - green, - grey, -} from 'chalk'; -import { - program, -} from 'commander'; -import * as globby from 'globby'; -import * as semver from 'semver'; -import type { - PackageJson, -} from 'type-fest'; -import * as winston from 'winston'; -import { - DependencyInfo, - DependencyToUpdate, - Options, - PackageJsonWithOtterConfiguration, -} from '../helpers/version-harmonize/interfaces'; - -/** Console logger */ -const logger = winston.createLogger({ - format: winston.format.combine( - winston.format.colorize(), - winston.format.simple() - ), - transports: new winston.transports.Console() -}); - -logger.warn(`Version-harmonize is ${bold.yellow('deprecated')}, please use the ${green('@o3r/json-dependency-versions-harmonize')} from ESLint ${blue('@o3r/eslint-plugin')} plugin`); - -program - .description('[DEPRECATED] Replace the dependencies version in a monorepos') - .option('-m, --monorepo ', 'Path to the private package.json of the monorepo', (filePath) => path.resolve(process.cwd(), filePath), path.resolve(process.cwd(), 'package.json')) - .option('-t, --dependency-types <...types>', 'List of dependency types to update, comma separated', (types) => types.split(','), - ['optionalDependencies', 'dependencies', 'devDependencies', 'peerDependencies', 'generatorDependencies']) - .option('-v, --verbose', 'Display debug logs') - .option('-a, --align-peer-dependencies', 'Enforce to align the version of the dependencies with the latest range') - .option('--apply-to <...globs>', `List of path globs of files to which apply the new calculated version without implicating them in the version determination (separated by ${path.delimiter})`, - (g, mem: string[]) => ([ - ...mem, - ...g.split(path.delimiter).map((p) => path.posix.join(process.cwd().replace(/\\/g, '/'), p)) - ]), []) - .parse(process.argv); - -/** Options from CLI */ -const options = program.opts(); -logger.level = options.verbose ? 'debug' : 'info'; - -/** - * Retrieve the best range for a dependency. - * @param dependencies List of extracted dependencies - * @param dependencyName Name of the dependency to retrieve the best range - * @returns Dependency information of the best range - */ -const getLatestRange = (dependencies: DependencyInfo[], dependencyName: string): DependencyInfo | undefined => { - const latestRange = dependencies - .reduce((acc, current) => { - if (!acc) { - return semver.validRange(current.range) ? current : acc; - } - if (semver.validRange(current.range)) { - const minCurrentVersion = semver.minVersion(current.range); - const minAccVersion = semver.minVersion(acc.range); - if (!minCurrentVersion) { - return acc; - } else if (!minAccVersion) { - return current; - } - return semver.lte(minCurrentVersion, minAccVersion) ? acc : current; - } - }, undefined); - - logger.debug(`Latest range for ${dependencyName}: ${latestRange?.range}`); - return latestRange; -}; - -/** - * Update the package.json with the best range for a dependency - * @param packageJsonUpdates List of package.json to update - * @param bestRangeDependencies Mapping of the best range for each dependency - */ -const updatePackageJson = async (packageJsonUpdates: DependencyToUpdate[], bestRangeDependencies: Record) => { - if (packageJsonUpdates.length === 0) { - logger.info('No package.json dependency harmonization needed'); - } - - const packageJsonUpdatesByPath = packageJsonUpdates.reduce>((acc, current) => { - acc[current.path] ||= []; - acc[current.path].push(current); - acc[current.path].sort(); - return acc; - }, {}); - - await Promise.all( - Object.entries(packageJsonUpdatesByPath) - .filter(([, toUpdate]) => toUpdate.length > 0) - .map(async ([packagePath, toUpdate]) => { - const packageJson = toUpdate[0].packageJson; - toUpdate.forEach((update) => { - (packageJson[update.type] as Record)[update.dependencyName] = bestRangeDependencies[update.dependencyName].range; - logger.info(`Update ${bold(update.dependencyName)} to ${bold(bestRangeDependencies[update.dependencyName].range)} in ${bold(update.packageJson.name)}` - + ` ${grey(`(${path.relative(process.cwd(), update.path)})`)}`); - logger.debug(`Reason: ${update.reason}`); - }); - await fs.writeFile(packagePath, JSON.stringify(packageJson, null, 2) + '\n'); - }) - ); -}; - -/** - * Update the package.json with the version of the package manager used by the monorepo - * @param packageJsonPaths List of package.json paths to update - * @param packageManager Package manager - */ -const updatePackageJsonPackageManager = async (packageJsonPaths: string[], packageManager: string | undefined) => { - if (!packageManager) { - logger.debug('No package manager specified in the monorepo package.json file'); - return; - } - - for (const packageJsonPath of packageJsonPaths) { - const packageJson: PackageJson = JSON.parse(await fs.readFile(packageJsonPath, { encoding: 'utf8' })); - logger.info(`Update packageManager from ${bold(packageJson.packageManager)} to ${bold(packageManager)} in ${bold(packageJson.name)} ${grey(`(${path.relative(process.cwd(), packageJsonPath)})`)}`); - packageJson.packageManager = packageManager; - await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n'); - } -}; - -void (async () => { - // eslint-disable-next-line @stylistic/max-len -- keep warning on same line - logger.warn('This script is deprecated and will be removed in v12, please use the linter rule @o3r/json-dependency-versions-harmonize instead (documentation available https://github.com/AmadeusITGroup/otter/blob/main/docs/linter/eslint-plugin/rules/json-dependency-versions-harmonize.md)'); - const monorepoPackage: PackageJson = JSON.parse(readFileSync(options.monorepo, { encoding: 'utf8' })); - const { workspaces, packageManager } = monorepoPackage; - const packageJsonPatterns = (Array.isArray(workspaces) ? workspaces : (workspaces && workspaces.packages))?.map((packagePath) => path.posix.join(packagePath, 'package.json')); - - /** List of all package.json of the workspace */ - const packageJsonPathLists = packageJsonPatterns && await globby(packageJsonPatterns); - const packagePathToUpdateThePackageManager: string[] = []; - /** Map of dependencies for each dependency name */ - const dependencyMaps: Record = {}; - - if (!packageJsonPathLists) { - logger.error('The version harmonize cannot run on non mono-repository project'); - process.exit(1); - } - - // add main package.json to the list - packageJsonPathLists.push(options.monorepo); - - for (const packageJsonPath of packageJsonPathLists) { - const packageJson: PackageJsonWithOtterConfiguration = await JSON.parse(await fs.readFile(packageJsonPath, { encoding: 'utf8' })); - if (packageJson.otter?.versionHarmonize?.skipPackage) { - logger.debug(`${packageJson.name} is ignored`); - continue; - } - if (!packageJson.otter?.versionHarmonize?.ignorePackageManager && packageJson.packageManager && packageManager && packageManager !== packageJson.packageManager) { - packagePathToUpdateThePackageManager.push(packageJsonPath); - } - const ignorePatterns = packageJson.otter?.versionHarmonize?.ignore?.map((ignorePattern) => new RegExp(ignorePattern)); - options.dependencyTypes - .filter((dependencyType) => !!packageJson[dependencyType]) - .forEach((dependencyType) => { - Object.entries(packageJson[dependencyType] as Record) - .filter(([dependencyName]) => !ignorePatterns?.some((pattern) => pattern.test(dependencyName))) - .forEach(([dependencyName, range]) => { - dependencyMaps[dependencyName] ||= []; - dependencyMaps[dependencyName].push({ - path: packageJsonPath, - packageJson, - range, - dependencyName, - type: dependencyType - }); - }); - }); - } - - /** Map of the best range for each dependency */ - const bestRangeDependencies = Object.entries(dependencyMaps) - .reduce>((acc, [depName, depInfo]) => { - const latestRange = getLatestRange(depInfo, depName); - if (latestRange) { - acc[depName] = latestRange; - } - return acc; - }, {}); - - // Add the ApplyTo files after the version calculation to benefice of the new range without being part of the calculation - if (options.applyTo.length > 0) { - const applyToFiles = await globby(options.applyTo); - for (const packageJsonPath of applyToFiles) { - let packageJson: PackageJson; - try { - packageJson = await JSON.parse(await fs.readFile(packageJsonPath, { encoding: 'utf8' })); - } catch { - logger.debug(`ignored ${packageJsonPath} because the JSON parse has failed`); - continue; - } - if (packageJson.packageManager && packageManager && !packageManager.includes('<%') && packageManager !== packageJson.packageManager) { - packagePathToUpdateThePackageManager.push(packageJsonPath); - } - options.dependencyTypes - .filter((dependencyType) => !!packageJson[dependencyType]) - .forEach((dependencyType) => { - Object.entries(packageJson[dependencyType] as Record) - .filter(([, range]) => semver.validRange(range)) // skip the dependencies that are generated in case of template - .forEach(([dependencyName, range]) => { - dependencyMaps[dependencyName] ||= []; - dependencyMaps[dependencyName].push({ - path: packageJsonPath, - packageJson, - range, - dependencyName, - type: dependencyType - }); - }); - }); - } - } - - /** List of the dependencies to update with the best ranges */ - const dependenciesToUpdate = Object.entries(bestRangeDependencies) - .reduce((acc, [depName, depInfo]) => { - if (!depInfo) { - return acc; - } - - const toAlign = dependencyMaps[depName] - .filter((dependency) => options.alignPeerDependencies || dependency.type !== 'peerDependencies') - .filter((dependency) => dependency.range !== depInfo.range) - .map((dependency) => ({ ...dependency, reason: 'version harmonize' })); - - const peerDepToFix = options.alignPeerDependencies - ? [] - : dependencyMaps[depName] - .filter((dependency) => dependency.type === 'peerDependencies') - .filter((dependency) => !semver.intersects(dependency.range, depInfo.range)) - .map((dependency) => ({ ...dependency, reason: 'fix peerDependencies' })); - - return [...acc, ...toAlign, ...peerDepToFix]; - }, []); - - await updatePackageJson(dependenciesToUpdate, bestRangeDependencies); - await updatePackageJsonPackageManager(packagePathToUpdateThePackageManager, packageManager); -})(); diff --git a/packages/@o3r/dev-tools/src/helpers/azure/pull-requests.service.ts b/packages/@o3r/dev-tools/src/helpers/azure/pull-requests.service.ts deleted file mode 100644 index 32eeeb15b1..0000000000 --- a/packages/@o3r/dev-tools/src/helpers/azure/pull-requests.service.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { - PullRequestService as PrService, -} from '@o3r/azure-tools'; - -/** - * Service to call AzureDevops API about PR - * @deprecated will be removed in v12. Please use `PullRequestService` from `@o3r/azure-tools` - */ -export class PullRequestService extends PrService {} diff --git a/packages/@o3r/dev-tools/src/helpers/gavc-response/gavc-response.interfaces.ts b/packages/@o3r/dev-tools/src/helpers/gavc-response/gavc-response.interfaces.ts deleted file mode 100644 index 484f94bf1d..0000000000 --- a/packages/@o3r/dev-tools/src/helpers/gavc-response/gavc-response.interfaces.ts +++ /dev/null @@ -1,55 +0,0 @@ -/** - * @deprecated will be removed in Otter v12. - */ -export interface GavcResponse { - /** Ex : mvn-built */ - repo: string; - - /** Ex : /io/swagger/typescriptFetch-swagger-codegen/1.0.0/typescriptFetch-swagger-codegen-1.0.0.jar */ - path: string; - - /** Ex : 2018-07-06T17:14:14.123Z */ - created: string; - - /** Ex : anonymous */ - createdBy: string; - - /** Ex : 2018-07-06T17:14:14.031Z */ - lastModified: string; - - /** Ex : anonymous */ - modifiedBy: string; - - /** Ex : 2018-07-06T17:14:14.031Z */ - lastUpdated: string; - - /** Ex : https://jfrog.io/mvn-built/io/swagger/typescriptFetch-swagger-codegen/1.0.0/typescriptFetch-swagger-codegen-1.0.0.jar */ - downloadUri: string; - - /** Ex : application/java-archive */ - mimeType: string; - - /** Ex : 41800 */ - size: 41_800; - - /** - * Ex : - * checksums : { - * sha1 : 4b12dc32f3ef1a10a872297423908b52bc1ce6ea; - * md5 : db17bea6a5f737f0644482055dcf2d36 - * }; - */ - checksums: { sha1: string; md5: string }; - - /** - * Ex : - * originalChecksums : { - * sha1 : b12dc32f3ef1a10a872297423908b52bc1ce6ea; - * md5 : db17bea6a5f737f0644482055dcf2d36 - * }; - */ - originalChecksums: { sha1: string; md5: string }; - - /** Ex : https://jfrog.io/api/storage/mvn-built/io/swagger/typescriptFetch-swagger-codegen/1.0.0/typescriptFetch-swagger-codegen-1.0.0.jar */ - uri: string; -} diff --git a/packages/@o3r/dev-tools/src/helpers/gavc-response/index.ts b/packages/@o3r/dev-tools/src/helpers/gavc-response/index.ts deleted file mode 100644 index 6bf83fa25e..0000000000 --- a/packages/@o3r/dev-tools/src/helpers/gavc-response/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './gavc-response.interfaces'; diff --git a/packages/@o3r/dev-tools/src/helpers/git-release-management/git-release-management.ts b/packages/@o3r/dev-tools/src/helpers/git-release-management/git-release-management.ts deleted file mode 100644 index 433f66da4e..0000000000 --- a/packages/@o3r/dev-tools/src/helpers/git-release-management/git-release-management.ts +++ /dev/null @@ -1,247 +0,0 @@ -#!/usr/bin/env node -import { - exec as cpExec, -} from 'node:child_process'; -import * as fs from 'node:fs'; -import * as fsPromises from 'node:fs/promises'; -import * as path from 'node:path'; -import * as util from 'node:util'; -import { - SemVer, -} from 'semver'; -import * as winston from 'winston'; - -const exec = util.promisify(cpExec); - -/** - * Computes current alpha or next branch based on a semver - * @deprecated will be removed in Otter v12. - * @param version - * @returns {string} current alpha or next branch - */ -export function getCurrentAlphaOrNextBranch(version: SemVer) { - const suffix = version.minor === 0 ? 'next' : 'alpha'; - return `release/${version.major}.${version.minor}.0-${suffix}`; -} - -/** - * Computes current release candidate branch based on a semver - * @deprecated will be removed in Otter v12. - * @param version - * @returns {string} current RC branch - */ -export function getCrtRcBranch(version: SemVer) { - return `release/${version.major}.${version.minor}.0-rc`; -} - -/** - * Deletes a given branch - * @deprecated will be removed in Otter v12. - * @param {string} branch the branch to be deleted - * @param logger - */ -export async function deleteBranch(branch: string, logger: winston.Logger) { - try { - await exec(`git show-branch remotes/origin/${branch}`); - await exec(`git push origin --delete ${branch}`); - logger.info(`${branch} has been deleted.`); - } catch (e: any) { - if (e.code === 128) { - logger.info(`${branch} does not exist.`); - } else { - logger.error(`Error while deleting ${branch}.`, e); - } - } -} - -/** - * Checkout a given branch - * @deprecated will be removed in Otter v12. - * @param {string} branch the branch to be checked out - * @param logger - */ -export async function checkoutBranch(branch: string, logger: winston.Logger) { - try { - await exec(`git checkout ${branch}`); - logger.info(`Checked out ${branch}.`); - } catch (e) { - logger.error(e); - process.exit(1); - } -} - -/** - * Checkout the current alpha branch - * @deprecated will be removed in Otter v12. - * @param version - * @param logger - */ -export async function checkoutCurrentAlphaOrNextBranch(version: SemVer, logger: winston.Logger) { - const currentAlphaOrNextBranch = getCurrentAlphaOrNextBranch(version); - await checkoutBranch(currentAlphaOrNextBranch, logger); -} - -/** - * Update the renovate base branch to the next alpha branch - * Workaround until https://github.com/renovatebot/renovate/issues/5027 is provided - * @deprecated will be removed in Otter v12. - * @param branchName - * @param renovatePath - * @param logger - */ -export async function updateRenovateBaseBranch(branchName: string, renovatePath: string, logger: winston.Logger) { - const renovateRcPath = path.resolve(renovatePath, '.renovaterc.json'); - if (fs.existsSync(renovateRcPath)) { - logger.info(`Renovate file found : ${renovateRcPath}`); - // Extract npm tag (rc | alpha) - const suffix = branchName.split('-')[1]; - const suffixRegExp = new RegExp(`${suffix}$`); - const renovateRc = JSON.parse(await fsPromises.readFile(renovateRcPath, { encoding: 'utf8' })); - logger.info(`Current base branches : ${(renovateRc.baseBranches || []).join(' ') as string}`); - // Filters branching with same npm tag than the one being created - // For example, [release/7.0.0-next release/6.1.0-rc release/6.2.0-alpha] will become [release/7.0.0-next release/6.2.0-alpha] - renovateRc.baseBranches = (renovateRc.baseBranches || []).filter((branch: string) => !suffix || !suffixRegExp.test(branch)); - // Add the current branch - renovateRc.baseBranches.push(branchName); - logger.info(`Updated base branches : ${(renovateRc.baseBranches || []).join(' ') as string}`); - await fsPromises.writeFile(renovateRcPath, `${JSON.stringify(renovateRc, null, 2)}\n`); - await exec('git add .renovaterc.json'); - await exec('git commit -m "ci: update renovate bot base branch" -m "[skip ci]"'); - logger.info('Renovate file successfully updated and committed'); - } -} - -/** - * Create a rc branch based on a version - * @deprecated will be removed in Otter v12. - * @param version - * @param logger - */ -export async function createRcBranch(version: SemVer, logger: winston.Logger) { - const rcBranch = getCrtRcBranch(version); - try { - await exec(`git show-branch remotes/origin/${rcBranch}`); - logger.info(`${rcBranch} already exists.`); - } catch { - logger.info(`Creating release candidate branch ${rcBranch}.`); - await exec(`git checkout -b ${rcBranch}`); - await exec(`git push --set-upstream origin ${rcBranch}`); - } -} - -/** - * Create an alpha branch for the next release based on a version - * @deprecated will be removed in Otter v12. - * @param version - * @param logger - * @param renovatePath - */ -export async function createNextAlphaBranch(version: SemVer, logger: winston.Logger, renovatePath?: string) { - const alphaBranchName = `${version.major}.${version.minor + 1}.0-alpha`; - const alphaBranch = `release/${alphaBranchName}`; - try { - await exec(`git show-branch remotes/origin/${alphaBranch}`); - logger.info(`${alphaBranch} already exists.`); - } catch { - logger.info(`Creating alpha branch ${alphaBranch}.`); - await exec(`git checkout -b ${alphaBranch}`); - if (renovatePath) { - await updateRenovateBaseBranch(alphaBranch, renovatePath, logger); - } - await exec(`git push --set-upstream origin ${alphaBranch}`); - } -} - -/** - * Create a -next branch for the next major release based on a version - * @deprecated will be removed in Otter v12. - * @param version - * @param logger - * @param renovatePath - */ -export async function createNextMajorBranch(version: SemVer, logger: winston.Logger, renovatePath?: string) { - const nextBranchName = `release/${version.major + 1}.0.0-next`; - try { - await exec(`git show-branch remotes/origin/${nextBranchName}`); - logger.info(`${nextBranchName} already exists.`); - } catch { - logger.info(`Creating -next branch for next major version ${nextBranchName}.`); - await exec(`git checkout -b ${nextBranchName}`); - if (renovatePath) { - await updateRenovateBaseBranch(nextBranchName, renovatePath, logger); - } - await exec(`git push --set-upstream origin ${nextBranchName}`); - } -} - -/** - * Deletes the alpha branch for a given version - * @deprecated will be removed in Otter v12. - * @param version - * @param logger - */ -export async function deleteCurrentAlphaOrNextBranch(version: SemVer, logger: winston.Logger) { - const currentAlphaOrNextBranch = getCurrentAlphaOrNextBranch(version); - await deleteBranch(currentAlphaOrNextBranch, logger); -} - -/** - * Checkout the current RC branch - * @deprecated will be removed in Otter v12. - * @param version - * @param logger - */ -export async function checkoutCrtRcBranch(version: SemVer, logger: winston.Logger) { - const crtRcBranch = getCrtRcBranch(version); - await checkoutBranch(crtRcBranch, logger); -} - -/** - * Commits the content of the change-logs folder in order to prepare the new release. - * @deprecated will be removed in Otter v12. - * @param version - */ -export async function commitChangeLogs(version: SemVer) { - await exec('git add ./change-logs'); - await exec(`git commit -m "chore: prepare change-logs for release ${version.version}"`); -} - -/** - * Create a release branch based on a version - * @deprecated will be removed in Otter v12. - * @param version - * @param logger - */ -export async function createReleaseBranch(version: SemVer, logger: winston.Logger) { - const releaseBranch = `release/${version.major}.${version.minor}`; - try { - await exec(`git show-branch remotes/origin/${releaseBranch}`); - logger.info(`${releaseBranch} already exists.`); - } catch { - logger.info(`Creating release branch ${releaseBranch}.`); - await exec(`git checkout -b ${releaseBranch}`); - await exec(`git push --set-upstream origin ${releaseBranch}`); - } -} - -/** - * Deletes the previous release branch for a given version - * @deprecated will be removed in Otter v12. - * @param version - * @param logger - */ -export async function deletePreviousReleaseBranch(version: SemVer, logger: winston.Logger) { - const prevReleaseBranch = `release/${version.major}.${version.minor - 1}`; - await deleteBranch(prevReleaseBranch, logger); -} - -/** - * Deletes the current RC branch for a given version - * @deprecated will be removed in Otter v12. - * @param version - * @param logger - */ -export async function deleteCrtRcBranch(version: SemVer, logger: winston.Logger) { - const crtRcBranch = getCrtRcBranch(version); - await deleteBranch(crtRcBranch, logger); -} diff --git a/packages/@o3r/dev-tools/src/helpers/git-release-management/index.ts b/packages/@o3r/dev-tools/src/helpers/git-release-management/index.ts deleted file mode 100644 index 52b536cc8b..0000000000 --- a/packages/@o3r/dev-tools/src/helpers/git-release-management/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './git-release-management'; diff --git a/packages/@o3r/dev-tools/src/helpers/index.ts b/packages/@o3r/dev-tools/src/helpers/index.ts deleted file mode 100644 index d9e6fb38ab..0000000000 --- a/packages/@o3r/dev-tools/src/helpers/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './gavc-response'; -export * from './git-release-management'; diff --git a/packages/@o3r/dev-tools/src/helpers/version-harmonize/interfaces.ts b/packages/@o3r/dev-tools/src/helpers/version-harmonize/interfaces.ts deleted file mode 100644 index 263d414926..0000000000 --- a/packages/@o3r/dev-tools/src/helpers/version-harmonize/interfaces.ts +++ /dev/null @@ -1,69 +0,0 @@ -import type { - PackageJson, -} from 'type-fest'; - -/** Configuration in a package.json to indication specification to this package */ -export interface PackageConfiguration { - /** List of ignored dependencies */ - ignore?: string[]; - /** Ignore the update of the package manager version */ - ignorePackageManager?: boolean; - /** Determine if this package should be ignored */ - skipPackage?: boolean; -} - -/** Package Json with Otter specific configuration */ -export type PackageJsonWithOtterConfiguration = PackageJson & { - /** Otter Specific configuration */ - otter?: { - versionHarmonize?: PackageConfiguration; - }; -}; - -/** Information of an extracted dependency */ -export interface DependencyInfo { - /** Path to the package.json */ - path: string; - /** Content of the package.json */ - packageJson: PackageJsonWithOtterConfiguration; - /** Range of the dependency */ - range: string; - /** Type of the dependency extracted */ - type: string; - /** Name of the dependency */ - dependencyName: string; -} - -/** Dependency to update */ -export interface DependencyToUpdate extends DependencyInfo { - /** Reason of the update */ - reason: string; -} - -/** Option of the Version Harmonize CLI */ -export interface Options { - /** - * Enforce to align the version of the dependencies with the latest range. - * If not set, the version will be aligned with the latest range if the latest range is not intersected with the current range. - * @default false - */ - alignPeerDependencies: boolean; - - /** - * Display debug logs - * @default false - */ - verbose: boolean; - - /** - * List of dependency types to update, comma separated - * @default ['optionalDependencies', 'dependencies', 'devDependencies', 'peerDependencies', 'generatorDependencies'] - */ - dependencyTypes: string[]; - - /** Path to the private package.json of the monorepo */ - monorepo: string; - - /** List of patterns of files to which apply the new calculated version without implicating them in the version determination */ - applyTo: string[]; -} diff --git a/packages/@o3r/dev-tools/src/public_api.ts b/packages/@o3r/dev-tools/src/public_api.ts deleted file mode 100644 index c6cc604478..0000000000 --- a/packages/@o3r/dev-tools/src/public_api.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './utils/index'; diff --git a/packages/@o3r/dev-tools/src/utils/check-peer-deps.ts b/packages/@o3r/dev-tools/src/utils/check-peer-deps.ts deleted file mode 100644 index fd426b708b..0000000000 --- a/packages/@o3r/dev-tools/src/utils/check-peer-deps.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { - readFileSync, -} from 'node:fs'; -import * as path from 'node:path'; -import { - satisfies, -} from 'semver'; -import { - PackageJson, -} from 'type-fest'; - -/** - * Interface containing a npm package name, needed version and optionally found version - * @deprecated You can use the one exposed in `@o3r/schematics`, will be removed in Otter v12. - */ -export interface PackageVersion { - /** Npm package name */ - packageName: string; - /** Npm package needed version */ - version: string; - /** Npm package installed version found */ - foundVersion?: string; -} - -/** - * Check if the first level of peer deps of a given package are installed. - * List all not installed packages or packages with version mismatch - * @deprecated You can use the one exposed in `@o3r/schematics`, will be removed in Otter v12. - * @param packageName - */ -export function getPackagesToInstallOrUpdate(packageName: string) { - let installedPackage: PackageJson; - try { - const packageJsonNamePath = require.resolve(`${packageName}${path.posix.sep}package.json`); - installedPackage = JSON.parse(readFileSync(packageJsonNamePath, { encoding: 'utf8' })); - } catch { - throw new Error(`The provided package is not installed: ${packageName}`); - } - - const packagesToInstall: PackageVersion[] = []; - const packagesWrongVersion: PackageVersion[] = []; - - const optionalPackages = Object.entries(installedPackage.peerDependenciesMeta || {}) - .filter(([, dep]) => dep?.optional) - .map(([depName]) => depName); - const peerDependenciesMap = Object.entries(installedPackage.peerDependencies || {}) - .reduce>>((acc, [name, val]) => { - if (!optionalPackages.includes(name)) { - acc[name] = val; - } - return acc; - }, {}); - Object.entries(peerDependenciesMap).forEach(([pName, pVersion]) => { - let installedPackageVersion: string | undefined; - try { - const packageJsonNamePath = require.resolve(`${pName}${path.posix.sep}package.json`); - installedPackageVersion = JSON.parse(readFileSync(packageJsonNamePath, { encoding: 'utf8' })).version; - } catch { - packagesToInstall.push({ packageName: pName, version: pVersion! }); - } - if (installedPackageVersion && !satisfies(installedPackageVersion, pVersion!)) { - packagesWrongVersion.push({ packageName: pName, foundVersion: installedPackageVersion, version: pVersion! }); - } - }); - return { packagesToInstall, packagesWrongVersion }; -} diff --git a/packages/@o3r/dev-tools/src/utils/index.ts b/packages/@o3r/dev-tools/src/utils/index.ts deleted file mode 100644 index c057de9bbc..0000000000 --- a/packages/@o3r/dev-tools/src/utils/index.ts +++ /dev/null @@ -1,6 +0,0 @@ -export * from './check-peer-deps'; -export * from './is-package-installed'; -export * from './jest.helpers'; -export * from './package-manager'; -export * from './string'; -export * from './update-peer-dependencies'; diff --git a/packages/@o3r/dev-tools/src/utils/is-package-installed.ts b/packages/@o3r/dev-tools/src/utils/is-package-installed.ts deleted file mode 100644 index 01f0b30057..0000000000 --- a/packages/@o3r/dev-tools/src/utils/is-package-installed.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { - posix, -} from 'node:path'; - -/** - * Check if an npm package is installed - * @param packageName The package to check - * @deprecated You can use the one exposed in `@o3r/schematics`, will be removed in Otter v12. - */ -export function isPackageInstalled(packageName: string) { - try { - return !!require.resolve(posix.join(packageName, 'package.json')); - } catch { - return false; - } -} diff --git a/packages/@o3r/dev-tools/src/utils/jest.helpers.ts b/packages/@o3r/dev-tools/src/utils/jest.helpers.ts deleted file mode 100644 index 4dadbaad3b..0000000000 --- a/packages/@o3r/dev-tools/src/utils/jest.helpers.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { - existsSync, - readFileSync, -} from 'node:fs'; -import { - dirname, - normalize, - relative, - resolve, -} from 'node:path'; -import { - sync as globbySync, -} from 'globby'; -import type { - TsConfigJson, -} from 'type-fest'; - -/** - * Get the list of Jest Projects in the workspace - * @deprecated Please use the one exposed in `@o3r/workspace`, will be removed in Otter v12. - * @param rootPackageJson Path to the root package.json - * @param rootDir - * @param jestConfigPattern Pattern to the jest config files - * @returns list of Jest projects - */ - -/** - * Find the closest package.json file containing workspace definition in the parent directories - * @param directory Current directory to search for - * @param rootDir First directory of the recursion - */ -const findParentPackageJson = (directory: string, rootDir?: string): string | undefined => { - const parentFolder = dirname(directory); - rootDir ||= directory; - if (parentFolder === directory) { - return undefined; - } - const packageJsonPath = resolve(parentFolder, 'package.json'); - if (!existsSync(packageJsonPath)) { - return findParentPackageJson(parentFolder, rootDir); - } - const workspaces = JSON.parse(readFileSync(packageJsonPath, { encoding: 'utf8' })).workspaces; - if (!workspaces) { - return findParentPackageJson(parentFolder, rootDir); - } - return globbySync(workspaces, { cwd: parentFolder, onlyFiles: false, absolute: true }) - .some((workspacePath) => normalize(workspacePath) === rootDir) - ? packageJsonPath - : findParentPackageJson(parentFolder, rootDir); -}; - -/** - * Get the list of modules mapping - * @deprecated Please use `pathsToModuleNameMapper` from `ts-jest`, will be removed in Otter v12. - * @param rootDir Root directory of the jest project - * @param testingTsconfigPath Path to the tsconfig.json used for test mapping files - */ -export const getJestModuleNameMapper = (rootDir: string, testingTsconfigPath?: string) => { - const workspacePackageJsonPath = findParentPackageJson(rootDir); - const workspacePath = workspacePackageJsonPath ? dirname(workspacePackageJsonPath) : process.cwd(); - testingTsconfigPath ||= resolve(workspacePath, 'tsconfig.base.json'); - - if (!existsSync(testingTsconfigPath)) { - // eslint-disable-next-line no-console -- no logger available - console.warn(`${testingTsconfigPath} not found`); - return {}; - } - const { compilerOptions } = JSON.parse(readFileSync(testingTsconfigPath, { encoding: 'utf8' })) as TsConfigJson; - const relativePath = relative(rootDir, workspacePath); - return Object.entries(compilerOptions?.paths || {}).reduce>((acc, [keyPath, mapPaths]) => { - const relativeModulePath = mapPaths.map((mapPath) => `/${relativePath.replace(/\\+/g, '/') || ''}/${mapPath.replace(/\*/g, '$1')}`.replace(/\/{2,}/g, '/')); - acc['^' + keyPath.replace(/\*/g, '(.*)') + '$'] = relativeModulePath; - return acc; - }, {}); -}; - -export { getJestProjects } from '@o3r/workspace'; diff --git a/packages/@o3r/dev-tools/src/utils/package-manager.ts b/packages/@o3r/dev-tools/src/utils/package-manager.ts deleted file mode 100644 index ad29c28bb1..0000000000 --- a/packages/@o3r/dev-tools/src/utils/package-manager.ts +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Get package manager used in runs - * Defaults to the package manager setup in process.env if no package manager set in angular.json - * @deprecated will be removed in Otter v12. - * @param angularJsonString Content of angular.json file - */ -export function getPackageManager(angularJsonString?: string | null) { - let packageManager = process.env && process.env.npm_execpath && !process.env.npm_execpath.includes('yarn') ? 'npm' : 'yarn'; - if (angularJsonString) { - const angularJsonObj = JSON.parse(angularJsonString); - if (angularJsonObj?.cli?.packageManager) { - packageManager = angularJsonObj.cli.packageManager; - } - } - return packageManager; -} diff --git a/packages/@o3r/dev-tools/src/utils/string.spec.ts b/packages/@o3r/dev-tools/src/utils/string.spec.ts deleted file mode 100644 index f9d6c89adc..0000000000 --- a/packages/@o3r/dev-tools/src/utils/string.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { - pad, -} from './string'; - -describe('String utils', () => { - it('pad should add a 0 to number <10 and >=0', () => { - for (let i = 0; i < 10; i++) { - expect(pad(i)).toBe(`0${i}`); - } - }); - - it('pad should not add a 0 to number >=10', () => { - for (let i = 10; i < 20; i++) { - expect(pad(i)).toBe(`${i}`); - } - - expect(pad(100)).toBe('100'); - }); - - it('pad should add two 0 to number <10 with digit=3', () => { - expect(pad(7, 3)).toBe('007'); - expect(pad(77, 3)).toBe('077'); - expect(pad(777, 3)).toBe('777'); - }); -}); diff --git a/packages/@o3r/dev-tools/src/utils/string.ts b/packages/@o3r/dev-tools/src/utils/string.ts deleted file mode 100644 index 3c5faa71cb..0000000000 --- a/packages/@o3r/dev-tools/src/utils/string.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Specific padding for number - * @deprecated You can use the one exposed in `@ama-sdk/core`, will be removed in Otter v12. - * @param val - * @param digits - */ -export function pad(val: number, digits = 2): string { - const str = `${val}`; - return '0'.repeat(Math.max(0, digits - str.length)) + str; -} diff --git a/packages/@o3r/dev-tools/src/utils/update-peer-dependencies.ts b/packages/@o3r/dev-tools/src/utils/update-peer-dependencies.ts deleted file mode 100644 index c3c2852624..0000000000 --- a/packages/@o3r/dev-tools/src/utils/update-peer-dependencies.ts +++ /dev/null @@ -1,160 +0,0 @@ -import { - exec, -} from 'node:child_process'; -import * as fs from 'node:fs'; -import { - promisify, -} from 'node:util'; -import { - readJsonSync, -} from 'fs-extra'; -import * as semver from 'semver'; -import * as winston from 'winston'; - -interface Dependency { - /** - * Name of the NPM package - */ - packageName: string; - - /** - * Version requested (range accepted) - */ - version?: string; - - /** - * Full name @ - */ - fullName: string; -} - -interface PackageMap { - [packageName: string]: string; -} - -interface PackageInfo { - version: string; - - peerDependencies?: PackageMap; -} - -const DEPENDENCY_TYPES = ['dependencies', 'devDependencies', 'peerDependencies', 'optionalDependencies']; - -const promisifiedExec = promisify(exec); -const dependencyPattern = new RegExp('^(@?[^@]+)(?:@(.*))?$'); - -const dependencyParser = (value: string): Dependency | undefined => { - const parsed = dependencyPattern.exec(value.trim()); - if (parsed) { - return { - packageName: parsed[1], - version: parsed[2], - fullName: value - }; - } -}; - -/** - * Update a package.json with the given dependencies versions and their respective peer dependencies. - * Relies on npm info to retrieve package information. - * Example: updatePeerDependencies(['@random/package@~2.21.0', '@o3r/core'], './package.json') - * @deprecated will be removed in Otter v12. - * @param dependencies - * @param packageJsonPath - * @param verbose - * @param silent - */ -export async function updatePeerDependencies(dependencies: string[] = [], packageJsonPath: string, verbose = false, silent = true) { - const logger = winston.createLogger({ - level: verbose ? 'debug' : 'info', - format: winston.format.simple(), - transports: new winston.transports.Console() - }); - - const dependenciesMap = dependencies.map((dependency) => dependencyParser(dependency)).filter((dependency): dependency is Dependency => !!dependency); - - const failedDependencies: Dependency[] = []; - logger.info('Start retrieving package infos.'); - - // In parallel for every package - const dependenciesToUpdate = (await Promise.all(dependenciesMap.map(async (dependency) => { - try { - // Retrieve the metadata of the requested version (or latest) using npm info - logger.info(`Retrieving package info of ${dependency.packageName}, version ${dependency.version || 'latest'}`); - const commandToExecute = `npm info "${dependency.fullName}" version peerDependencies --json`; - logger.debug(`Executing command: ${commandToExecute}`); - const execOutput = (await promisifiedExec(commandToExecute)).stdout; - - // An empty stdout means that NPM could not retrieve package information - if (!execOutput) { - logger.error(`Could not retrieve metadata for package: ${dependency.fullName}`); - failedDependencies.push(dependency); - return; - } - - const infoOutput: PackageInfo | PackageInfo[] = JSON.parse(execOutput); - const packageInfo = Array.isArray(infoOutput) - ? infoOutput.reduce((latestPackage, currentPackage) => - semver.gt(latestPackage.version, currentPackage.version) ? latestPackage : currentPackage - ) - : infoOutput; - - logger.debug(JSON.stringify(packageInfo, undefined, 2)); - - // If no version was specified, parse the version of the metadata we received - if (!dependency.version) { - dependency.version = packageInfo.version; - } - - // aggregate the requested version + the package peer dependencies as a base we will use to update our package.json - return { - [dependency.packageName]: dependency.version, - ...packageInfo.peerDependencies - }; - } catch (error: any) { - logger.error(`Failed retrieving information for package: ${dependency.packageName}`); - logger.error(error.message); - logger.error(error.stack); - failedDependencies.push(dependency); - } - })) as (PackageMap | undefined)[]) - // Aggregate the result for all packages - .reduce((_dependenciesToUpdate, currentDependenciesToUpdate) => ({ - ..._dependenciesToUpdate, - ...currentDependenciesToUpdate - }), {}) as PackageMap; - - logger.debug('Dependencies to update:'); - logger.debug(JSON.stringify(dependenciesToUpdate, undefined, 2)); - logger.info('Done retrieving package infos.'); - - // Fail the process if not silent and we failed to update at least one package - if (!silent && failedDependencies.length > 0) { - throw new Error('Exiting with error due to update failures'); - } - - const targetPackageJson = readJsonSync(packageJsonPath); - let hasTouchedPackageJson = false; - logger.info('Start updating package.json'); - // For any reference of a dependency to update in any dependency type of the target package.json, update its version if different. - DEPENDENCY_TYPES.forEach((dependencyType) => { - Object.keys(targetPackageJson[dependencyType] || {}).forEach((packageName) => { - const currentVersion = targetPackageJson[dependencyType][packageName] as string; - const newVersion = dependenciesToUpdate[packageName]; - if (newVersion && currentVersion !== newVersion) { - logger.info(`Updating ${dependencyType} ${packageName} version: ${currentVersion} -> ${newVersion}`); - targetPackageJson[dependencyType][packageName] = newVersion; - hasTouchedPackageJson = true; - } - }); - }); - - if (hasTouchedPackageJson) { - logger.info(`Writing updated content to ${packageJsonPath}`); - fs.writeFileSync(packageJsonPath, JSON.stringify(targetPackageJson, undefined, 2)); - } else { - logger.info('Nothing to update.'); - } - - logger.info('Done updating package.json'); -} diff --git a/packages/@o3r/dev-tools/testing/jest.config.ut.builders.js b/packages/@o3r/dev-tools/testing/jest.config.ut.builders.js deleted file mode 100644 index 24ac00498b..0000000000 --- a/packages/@o3r/dev-tools/testing/jest.config.ut.builders.js +++ /dev/null @@ -1,18 +0,0 @@ -const path = require('node:path'); -const getJestProjectConfig = require('../../../../jest.config.ut').getJestProjectConfig; - -const rootDir = path.join(__dirname, '..'); - -const baseConfig = getJestProjectConfig(rootDir, false); - -/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */ -module.exports = { - ...baseConfig, - displayName: `${require('../package.json').name}/builders`, - setupFilesAfterEnv: ['/testing/setup-jest.builders.ts'], - testPathIgnorePatterns: [ - '/dist', - '/.*/templates/.*', - '/src/.*' - ] -}; diff --git a/packages/@o3r/dev-tools/testing/jest.config.ut.js b/packages/@o3r/dev-tools/testing/jest.config.ut.js deleted file mode 100644 index 66a59e4796..0000000000 --- a/packages/@o3r/dev-tools/testing/jest.config.ut.js +++ /dev/null @@ -1,18 +0,0 @@ -const path = require('node:path'); -const getJestProjectConfig = require('../../../../jest.config.ut').getJestProjectConfig; - -const rootDir = path.join(__dirname, '..'); - -const baseConfig = getJestProjectConfig(rootDir, false); - -/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */ -module.exports = { - ...baseConfig, - displayName: require('../package.json').name, - testPathIgnorePatterns: [ - '/dist', - '/.*/templates/.*', - '/builders/.*', - '/schematics/.*' - ] -}; diff --git a/packages/@o3r/dev-tools/testing/setup-jest.builders.ts b/packages/@o3r/dev-tools/testing/setup-jest.builders.ts deleted file mode 100644 index 2ccaca21c3..0000000000 --- a/packages/@o3r/dev-tools/testing/setup-jest.builders.ts +++ /dev/null @@ -1 +0,0 @@ -import '@o3r/test-helpers/setup-jest-builders'; diff --git a/packages/@o3r/dev-tools/testing/setup-jest.ts b/packages/@o3r/dev-tools/testing/setup-jest.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/@o3r/dev-tools/tsconfig.build.composite.json b/packages/@o3r/dev-tools/tsconfig.build.composite.json deleted file mode 100644 index 8a2df8bd81..0000000000 --- a/packages/@o3r/dev-tools/tsconfig.build.composite.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.build", - "compilerOptions": { - "composite": true, - "tsBuildInfoFile": "build/.tsbuildinfo" - } -} diff --git a/packages/@o3r/dev-tools/tsconfig.build.json b/packages/@o3r/dev-tools/tsconfig.build.json deleted file mode 100644 index ced36acae9..0000000000 --- a/packages/@o3r/dev-tools/tsconfig.build.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../../../tsconfig.build", - "compilerOptions": { - "incremental": true, - "composite": true, - "module": "commonjs", - "moduleResolution": "node", - "outDir": "./dist", - "rootDir": ".", - "tsBuildInfoFile": "./build/.tsbuildinfo" - }, - "include": [ - "src/**/*.ts" - ], - "exclude": [ - "**/*.spec.ts" - ] -} diff --git a/packages/@o3r/dev-tools/tsconfig.builders.json b/packages/@o3r/dev-tools/tsconfig.builders.json deleted file mode 100644 index d2572aef83..0000000000 --- a/packages/@o3r/dev-tools/tsconfig.builders.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../../../tsconfig.build", - "compilerOptions": { - "incremental": true, - "composite": true, - "outDir": "./dist", - "module": "CommonJS", - "rootDir": ".", - "tsBuildInfoFile": "build/.tsbuildinfo.builders" - }, - "include": [ - "schematics/**/*.ts", - ], - "exclude": [ - "**/*.spec.ts", - "schematics/**/templates/**" - ] -} diff --git a/packages/@o3r/dev-tools/tsconfig.doc.json b/packages/@o3r/dev-tools/tsconfig.doc.json deleted file mode 100644 index 8d1e4cff88..0000000000 --- a/packages/@o3r/dev-tools/tsconfig.doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.doc", - "exclude": [ - "**/*reducer.ts", - "**/*.fixture.ts" - ], - "include": [ - "src/**/*.ts" - ] -} diff --git a/packages/@o3r/dev-tools/tsconfig.eslint.json b/packages/@o3r/dev-tools/tsconfig.eslint.json deleted file mode 100644 index 1d85775ea3..0000000000 --- a/packages/@o3r/dev-tools/tsconfig.eslint.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": "../../../tsconfig.jest", - "include": [ - "eslint*.config.mjs", - "jest.config.js", - "src/**/*.spec.ts", - "src/helpers/**/*.ts", - "testing/**/*.ts" - ], - "exclude": [] -} diff --git a/packages/@o3r/dev-tools/tsconfig.json b/packages/@o3r/dev-tools/tsconfig.json deleted file mode 100644 index 837c35b1bb..0000000000 --- a/packages/@o3r/dev-tools/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -/* For IDE usage only */ -{ - "extends": "../../../tsconfig.base", - "references": [ - { - "path": "./tsconfig.build.composite.json" - }, - { - "path": "./tsconfig.eslint.json" - } - ] -} diff --git a/packages/@o3r/dev-tools/tsconfig.spec.json b/packages/@o3r/dev-tools/tsconfig.spec.json deleted file mode 100644 index 578bb4407b..0000000000 --- a/packages/@o3r/dev-tools/tsconfig.spec.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "extends": "../../../tsconfig.jest", - "compilerOptions": { - "outDir": "test", - "rootDir": ".", - }, - "include": [ - "./src/**/*.spec.ts" - ], - "exclude": [], - "references": [ - { - "path": "./tsconfig.build.composite.json" - } - ] -} diff --git a/packages/@o3r/dynamic-content/src/services/dynamic-content/dynamic-content.module.ts b/packages/@o3r/dynamic-content/src/services/dynamic-content/dynamic-content.module.ts index e36c5e9688..6d5f1a16ec 100644 --- a/packages/@o3r/dynamic-content/src/services/dynamic-content/dynamic-content.module.ts +++ b/packages/@o3r/dynamic-content/src/services/dynamic-content/dynamic-content.module.ts @@ -3,7 +3,6 @@ import { NgModule, } from '@angular/core'; import { - DynamicContentPipe, O3rDynamicContentPipe, } from './dynamic-content.pipe'; import { @@ -30,7 +29,7 @@ export function getCmsAssets() { } @NgModule({ - declarations: [DynamicContentPipe, O3rDynamicContentPipe], + declarations: [O3rDynamicContentPipe], providers: [ { provide: DYNAMIC_CONTENT_BASE_PATH_TOKEN, @@ -42,7 +41,7 @@ export function getCmsAssets() { }, DynamicContentService ], - exports: [DynamicContentPipe, O3rDynamicContentPipe] + exports: [O3rDynamicContentPipe] }) /** * DynamicContent module diff --git a/packages/@o3r/dynamic-content/src/services/dynamic-content/dynamic-content.pipe.spec.ts b/packages/@o3r/dynamic-content/src/services/dynamic-content/dynamic-content.pipe.spec.ts index 364ae6dae6..8cf8bd4ccb 100644 --- a/packages/@o3r/dynamic-content/src/services/dynamic-content/dynamic-content.pipe.spec.ts +++ b/packages/@o3r/dynamic-content/src/services/dynamic-content/dynamic-content.pipe.spec.ts @@ -17,7 +17,6 @@ import { of, } from 'rxjs'; import { - DynamicContentPipe, O3rDynamicContentPipe, } from './dynamic-content.pipe'; import { @@ -31,7 +30,7 @@ const serviceMock: InterfaceOf = { }; @Component({ - template: `{{'assets.png' | o3rDynamicContent}}{{'deprecatedPipe.png' | dynamicContent}}` + template: `{{'assets.png' | o3rDynamicContent}}` }) class HostTestComponent {} @@ -44,7 +43,7 @@ describe('DynamicContentPipe', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [O3rDynamicContentPipe, DynamicContentPipe, HostTestComponent], + declarations: [O3rDynamicContentPipe, HostTestComponent], providers: [{ provide: DynamicContentService, useValue: serviceMock }] }).compileComponents(); @@ -55,6 +54,5 @@ describe('DynamicContentPipe', () => { fixture.detectChanges(); expect(serviceMock.getMediaPathStream).toHaveBeenCalledWith('assets.png'); - expect(serviceMock.getMediaPathStream).toHaveBeenCalledWith('deprecatedPipe.png'); }); }); diff --git a/packages/@o3r/dynamic-content/src/services/dynamic-content/dynamic-content.pipe.ts b/packages/@o3r/dynamic-content/src/services/dynamic-content/dynamic-content.pipe.ts index de9d690487..fae8fbaa9f 100644 --- a/packages/@o3r/dynamic-content/src/services/dynamic-content/dynamic-content.pipe.ts +++ b/packages/@o3r/dynamic-content/src/services/dynamic-content/dynamic-content.pipe.ts @@ -47,7 +47,3 @@ export class O3rDynamicContentPipe implements PipeTransform, OnDestroy { } } } - -/** @deprecated please use O3rDynamicContentPipe, will be removed in v12. */ -@Pipe({ name: 'dynamicContent', pure: false }) -export class DynamicContentPipe extends O3rDynamicContentPipe implements PipeTransform {} diff --git a/packages/@o3r/eslint-plugin/src/rules/typescript/matching-configuration-name/matching-configuration-name.spec.ts b/packages/@o3r/eslint-plugin/src/rules/typescript/matching-configuration-name/matching-configuration-name.spec.ts index 4fc18a347b..52d2f03032 100644 --- a/packages/@o3r/eslint-plugin/src/rules/typescript/matching-configuration-name/matching-configuration-name.spec.ts +++ b/packages/@o3r/eslint-plugin/src/rules/typescript/matching-configuration-name/matching-configuration-name.spec.ts @@ -9,25 +9,25 @@ ruleTester.run('matching-configuration-name', matchingConfigurationNameRule, { code: ` export interface MyFirstConfig extends Configuration {} - export const MY_CONFIG_ID = computeConfigurationName('MyFirstConfig', '@example/config'); + export const MY_CONFIG_ID = computeItemIdentifier('MyFirstConfig', '@example/config'); `.trim() }, { code: ` export interface MySecondConfig extends Configuration {} export interface MyThirdConfig extends Configuration {} - export const MY_CONFIG_ID = computeConfigurationName('MyThirdConfig', '@example/config'); + export const MY_CONFIG_ID = computeItemIdentifier('MyThirdConfig', '@example/config'); `.trim() }, { code: ` export interface MyFourthConfig extends Configuration {} export interface MyFifthConfig extends Configuration {} - export const MY_CONFIG_ID = computeConfigurationName('MyFourthConfig', '@example/config'); + export const MY_CONFIG_ID = computeItemIdentifier('MyFourthConfig', '@example/config'); `.trim() }, { code: ` - export const MY_CONFIG_ID = computeConfigurationName('MyConfig', '@example/config'); + export const MY_CONFIG_ID = computeItemIdentifier('MyConfig', '@example/config'); `.trim() } ], @@ -36,7 +36,7 @@ ruleTester.run('matching-configuration-name', matchingConfigurationNameRule, { code: ` export interface MyConfig extends Configuration {} -export const MY_CONFIG_ID = computeConfigurationName('InvalidName', '@example/config'); +export const MY_CONFIG_ID = computeItemIdentifier('InvalidName', '@example/config'); `.trim(), errors: [{ messageId: 'error', @@ -53,21 +53,21 @@ export const MY_CONFIG_ID = computeConfigurationName('InvalidName', '@example/co output: ` export interface MyConfig extends Configuration {} -export const MY_CONFIG_ID = computeConfigurationName('MyConfig', '@example/config'); +export const MY_CONFIG_ID = computeItemIdentifier('MyConfig', '@example/config'); `.trim() }] }], output: ` export interface MyConfig extends Configuration {} -export const MY_CONFIG_ID = computeConfigurationName('MyConfig', '@example/config'); +export const MY_CONFIG_ID = computeItemIdentifier('MyConfig', '@example/config'); `.trim() }, { code: ` export interface MyFirstConfig extends Configuration {} export interface MySecondConfig extends Configuration {} -export const MY_CONFIG_ID = computeConfigurationName('InvalidName', '@example/config'); +export const MY_CONFIG_ID = computeItemIdentifier('InvalidName', '@example/config'); `.trim(), errors: [{ messageId: 'error', @@ -86,7 +86,7 @@ export const MY_CONFIG_ID = computeConfigurationName('InvalidName', '@example/co export interface MyFirstConfig extends Configuration {} export interface MySecondConfig extends Configuration {} -export const MY_CONFIG_ID = computeConfigurationName('MyFirstConfig', '@example/config'); +export const MY_CONFIG_ID = computeItemIdentifier('MyFirstConfig', '@example/config'); `.trim() }, { @@ -99,7 +99,7 @@ export const MY_CONFIG_ID = computeConfigurationName('MyFirstConfig', '@example/ export interface MyFirstConfig extends Configuration {} export interface MySecondConfig extends Configuration {} -export const MY_CONFIG_ID = computeConfigurationName('MySecondConfig', '@example/config'); +export const MY_CONFIG_ID = computeItemIdentifier('MySecondConfig', '@example/config'); `.trim() } ] @@ -108,7 +108,7 @@ export const MY_CONFIG_ID = computeConfigurationName('MySecondConfig', '@example export interface MyFirstConfig extends Configuration {} export interface MySecondConfig extends Configuration {} -export const MY_CONFIG_ID = computeConfigurationName('MyFirstConfig', '@example/config'); +export const MY_CONFIG_ID = computeItemIdentifier('MyFirstConfig', '@example/config'); `.trim() } ] diff --git a/packages/@o3r/eslint-plugin/src/rules/typescript/matching-configuration-name/matching-configuration-name.ts b/packages/@o3r/eslint-plugin/src/rules/typescript/matching-configuration-name/matching-configuration-name.ts index 74f0c34f59..ae0ba738f5 100644 --- a/packages/@o3r/eslint-plugin/src/rules/typescript/matching-configuration-name/matching-configuration-name.ts +++ b/packages/@o3r/eslint-plugin/src/rules/typescript/matching-configuration-name/matching-configuration-name.ts @@ -5,7 +5,7 @@ import { createRule, } from '../../utils'; -const nameDeterminingFunctionNames = ['computeItemIdentifier', 'computeConfigurationName']; +const nameDeterminingFunctionNames = ['computeItemIdentifier']; export default createRule({ name: 'matching-configuration-name', @@ -15,7 +15,7 @@ export default createRule({ type: 'problem', docs: { description: 'Ensures that the configuration interface name matches the first parameter of `computeItemIdentifier`' - + ' (or `computeConfigurationName`) used beside the configuration interface to expose its ID (as generated by the configuration module).' + + ' used beside the configuration interface to expose its ID (as generated by the configuration module).' }, schema: [], messages: { diff --git a/packages/@o3r/localization/src/tools/localization-translate.pipe.spec.ts b/packages/@o3r/localization/src/tools/localization-translate.pipe.spec.ts index bb8664f087..faac556490 100644 --- a/packages/@o3r/localization/src/tools/localization-translate.pipe.spec.ts +++ b/packages/@o3r/localization/src/tools/localization-translate.pipe.spec.ts @@ -19,7 +19,6 @@ import { of, } from 'rxjs'; import { - LocalizationTranslatePipe, O3rLocalizationTranslatePipe, } from './localization-translate.pipe'; import { @@ -62,7 +61,6 @@ describe('LocalizationTranslatePipe', () => { let localizationService: LocalizationService; let translate: TranslateService; let pipe: O3rLocalizationTranslatePipe; - let deprecatedPipe: LocalizationTranslatePipe; let ref: any; describe('enableTranslationDeactivation OFF', () => { @@ -83,7 +81,6 @@ describe('LocalizationTranslatePipe', () => { translate = TestBed.inject(TranslateService); ref = new FakeChangeDetectorRef(); pipe = new O3rLocalizationTranslatePipe(localizationService, translate, ref, TestBed.inject(LOCALIZATION_CONFIGURATION_TOKEN)); - deprecatedPipe = new LocalizationTranslatePipe(localizationService, translate, ref, TestBed.inject(LOCALIZATION_CONFIGURATION_TOKEN)); expect(() => localizationService.toggleShowKeys()).toThrow(); }); @@ -113,24 +110,19 @@ describe('LocalizationTranslatePipe', () => { translate = TestBed.inject(TranslateService); ref = new FakeChangeDetectorRef(); pipe = new O3rLocalizationTranslatePipe(localizationService, translate, ref, TestBed.inject(LOCALIZATION_CONFIGURATION_TOKEN)); - deprecatedPipe = new LocalizationTranslatePipe(localizationService, translate, ref, TestBed.inject(LOCALIZATION_CONFIGURATION_TOKEN)); }); it('Should not translate if ShowKeys is activated', () => { localizationService.toggleShowKeys(); expect(pipe.transform('test')).toEqual('test'); - expect(deprecatedPipe.transform('test')).toEqual('test'); expect(pipe.transform('testParams', '{param1: "with param-1", param2: "and param-2"}')).toEqual('testParams'); - expect(deprecatedPipe.transform('testParams', '{param1: "with param-1", param2: "and param-2"}')).toEqual('testParams'); }); it('Should translate if ShowKeys is no activated', () => { expect(pipe.transform('test')).toEqual('This is a test'); - expect(deprecatedPipe.transform('test')).toEqual('This is a test'); expect(pipe.transform('testParams', '{param1: "with param-1", param2: "and param-2"}')).toEqual('This is a test with param-1 and param-2'); - expect(deprecatedPipe.transform('testParams', '{param1: "with param-1", param2: "and param-2"}')).toEqual('This is a test with param-1 and param-2'); }); }); @@ -160,24 +152,19 @@ describe('LocalizationTranslatePipe', () => { translate = TestBed.inject(TranslateService); ref = new FakeChangeDetectorRef(); pipe = new O3rLocalizationTranslatePipe(localizationService, translate, ref, TestBed.inject(LOCALIZATION_CONFIGURATION_TOKEN)); - deprecatedPipe = new LocalizationTranslatePipe(localizationService, translate, ref, TestBed.inject(LOCALIZATION_CONFIGURATION_TOKEN)); }); it('Should not translate if ShowKeys is activated', () => { localizationService.toggleShowKeys(); expect(pipe.transform('test')).toEqual('test'); - expect(deprecatedPipe.transform('test')).toEqual('test'); expect(pipe.transform('testParams', '{param1: "with param-1", param2: "and param-2"}')).toEqual('testParams'); - expect(deprecatedPipe.transform('testParams', '{param1: "with param-1", param2: "and param-2"}')).toEqual('testParams'); }); it('Should display both key and value if ShowKeys is no activated', () => { expect(pipe.transform('test')).toEqual('test - This is a test'); - expect(deprecatedPipe.transform('test')).toEqual('test - This is a test'); expect(pipe.transform('testParams', '{param1: "with param-1", param2: "and param-2"}')).toEqual('testParams - This is a test with param-1 and param-2'); - expect(deprecatedPipe.transform('testParams', '{param1: "with param-1", param2: "and param-2"}')).toEqual('testParams - This is a test with param-1 and param-2'); }); }); }); diff --git a/packages/@o3r/localization/src/tools/localization-translate.pipe.ts b/packages/@o3r/localization/src/tools/localization-translate.pipe.ts index 947b30d6e9..84ca2976b8 100644 --- a/packages/@o3r/localization/src/tools/localization-translate.pipe.ts +++ b/packages/@o3r/localization/src/tools/localization-translate.pipe.ts @@ -103,10 +103,3 @@ export class O3rLocalizationTranslatePipe extends TranslatePipe implements PipeT } } } - -/** - * TranslatePipe class adding debug functionality - * @deprecated please use O3rLocalizationTranslatePipe, will be removed in v12. - */ -@Pipe({ name: 'translate', pure: false }) -export class LocalizationTranslatePipe extends O3rLocalizationTranslatePipe implements PipeTransform {} diff --git a/packages/@o3r/localization/src/tools/localization.module.ts b/packages/@o3r/localization/src/tools/localization.module.ts index e254ec4c65..6c0c353969 100644 --- a/packages/@o3r/localization/src/tools/localization.module.ts +++ b/packages/@o3r/localization/src/tools/localization.module.ts @@ -29,7 +29,6 @@ import { LocalizationTranslateDirective, } from './localization-translate.directive'; import { - LocalizationTranslatePipe, O3rLocalizationTranslatePipe, } from './localization-translate.pipe'; import { @@ -77,9 +76,9 @@ export function localeIdNgBridge(localizationService: LocalizationService) { export const CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN = new InjectionToken>('Partial Localization configuration'); @NgModule({ - declarations: [O3rLocalizationTranslatePipe, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe], + declarations: [O3rLocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe], imports: [TranslateModule, BidiModule, DynamicContentModule, CommonModule], - exports: [TranslateModule, O3rLocalizationTranslatePipe, LocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe], + exports: [TranslateModule, O3rLocalizationTranslatePipe, LocalizationTranslateDirective, LocalizedDatePipe, LocalizedDecimalPipe, LocalizedCurrencyPipe], providers: [ { provide: LOCALIZATION_CONFIGURATION_TOKEN, useFactory: createLocalizationConfiguration, deps: [[new Optional(), CUSTOM_LOCALIZATION_CONFIGURATION_TOKEN]] }, { provide: LOCALE_ID, useFactory: localeIdNgBridge, deps: [LocalizationService] }, diff --git a/packages/@o3r/rules-engine/schemas/rulesets.schema.json b/packages/@o3r/rules-engine/schemas/rulesets.schema.json index 0de0dff846..67c7917e8e 100644 --- a/packages/@o3r/rules-engine/schemas/rulesets.schema.json +++ b/packages/@o3r/rules-engine/schemas/rulesets.schema.json @@ -50,11 +50,6 @@ }, "additionalItems": false }, - "linkedComponent": { - "$ref": "#/definitions/LinkedComponent", - "description": "Component linked to the ruleset, if set it will disable the ruleset execution per default, waiting to a subscription", - "deprecated": true - }, "linkedComponents": { "type": "object", "description": "Components linked to the ruleset. If defined, the rulest is not active by default", @@ -92,14 +87,6 @@ "type": "string" } }, - "inputFacts": { - "type": "array", - "description": "Facts that are needed for the rule execution (sent by the CMS)", - "deprecated": true, - "items": { - "type": "string" - } - }, "outputRuntimeFacts": { "type": "array", "description": "Runtime facts that are created/updated by the rule", diff --git a/packages/@o3r/rules-engine/src/components/rules-engine/ruleset-history/ruleset-history-pres.template.html b/packages/@o3r/rules-engine/src/components/rules-engine/ruleset-history/ruleset-history-pres.template.html index 53031a400e..5ef4c3074d 100644 --- a/packages/@o3r/rules-engine/src/components/rules-engine/ruleset-history/ruleset-history-pres.template.html +++ b/packages/@o3r/rules-engine/src/components/rules-engine/ruleset-history/ruleset-history-pres.template.html @@ -12,8 +12,8 @@

Ruleset Execution History

[class.error]="execution.type === 'RulesetExecutionError'" (click)="toggleExpansion(execution.executionId, 'ruleset')">
{{execution.executionCounter}} - {{execution.rulesetName | titlecase }} -
- +
+
{{lc.name}} {{lc.library}} OR
diff --git a/packages/@o3r/rules-engine/src/components/rules-engine/shared/fallback-to.pipe.ts b/packages/@o3r/rules-engine/src/components/rules-engine/shared/fallback-to.pipe.ts index d6c6678946..6008702d05 100644 --- a/packages/@o3r/rules-engine/src/components/rules-engine/shared/fallback-to.pipe.ts +++ b/packages/@o3r/rules-engine/src/components/rules-engine/shared/fallback-to.pipe.ts @@ -9,9 +9,3 @@ export class O3rFallbackToPipe implements PipeTransform { return value === undefined ? fallback : value; } } - -/** - * @deprecated please use O3rFallbackToPipe, will be removed in v12. - */ -@Pipe({ name: 'fallbackTo' }) -export class FallbackToPipe extends O3rFallbackToPipe implements PipeTransform {} diff --git a/packages/@o3r/rules-engine/src/engine/debug/helpers.spec.ts b/packages/@o3r/rules-engine/src/engine/debug/helpers.spec.ts index 24da5b2241..97ed6f956c 100644 --- a/packages/@o3r/rules-engine/src/engine/debug/helpers.spec.ts +++ b/packages/@o3r/rules-engine/src/engine/debug/helpers.spec.ts @@ -200,9 +200,6 @@ const rule = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j9', name: 'rule one', inputRuntimeFacts: [], - inputFacts: [ - 'isMobileDevice' - ], outputRuntimeFacts: ['CMS_myFact'], rootElement: { elementType: 'RULE_BLOCK', @@ -272,7 +269,7 @@ describe('Rules engine debug helpers', () => { property: 'showLanguageSelector', value: false } as ActionBlock; - const ruleEvaluation = handleRuleEvaluationDebug(rule, 'testRuleset', [outputAction], undefined, {}, [false], undefined); + const ruleEvaluation = handleRuleEvaluationDebug(rule, 'testRuleset', [outputAction], undefined, {}, [false], undefined, ['isMobileDevice']); expect(ruleEvaluation.outputActions.length).toBe(1); expect(ruleEvaluation.rule.id).toBe(rule.id); @@ -282,7 +279,7 @@ describe('Rules engine debug helpers', () => { it('handleRuleEvaluationDebug should create a rule evaluation object with error', () => { const error = { errorMessage: 'this is an error thrown at rule evaluation' }; - const ruleEvaluation = handleRuleEvaluationDebug(rule, 'testRuleset', undefined, error, {}, [false], undefined); + const ruleEvaluation = handleRuleEvaluationDebug(rule, 'testRuleset', undefined, error, {}, [false], undefined, ['isMobileDevice']); expect(ruleEvaluation.outputActions).toBeUndefined(); expect(ruleEvaluation.rule.id).toBe(rule.id); @@ -291,7 +288,7 @@ describe('Rules engine debug helpers', () => { }); it('handleRuleEvaluationDebug should compute triggers old and new value', () => { - const ruleEvaluation = handleRuleEvaluationDebug(rule, 'testRuleset', [], undefined, {}, [true], [false]); + const ruleEvaluation = handleRuleEvaluationDebug(rule, 'testRuleset', [], undefined, {}, [true], [false], ['isMobileDevice']); expect(ruleEvaluation.outputActions.length).toBe(0); expect(ruleEvaluation.rule.id).toBe(rule.id); diff --git a/packages/@o3r/rules-engine/src/engine/debug/helpers.ts b/packages/@o3r/rules-engine/src/engine/debug/helpers.ts index 2f8d20de14..555e4d3efb 100644 --- a/packages/@o3r/rules-engine/src/engine/debug/helpers.ts +++ b/packages/@o3r/rules-engine/src/engine/debug/helpers.ts @@ -12,7 +12,7 @@ import { } from '../structure'; /** - * Function to retrive from 2 sequential executions only the triggers which activated the last ruleset execution + * Function to retrieve from 2 sequential executions only the triggers which activated the last ruleset execution * @param currRes Current ruleset execution object * @param prevRes Previous ruleset execution object * @returns The triggers list which activates the last ruleset execution @@ -80,6 +80,7 @@ export function flagCachedRules(rulesEvaluations: RuleEvaluation[], triggers: Re * @param runtimeFactValues * @param factValues * @param oldFactValues + * @param inputFacts */ export function handleRuleEvaluationDebug( rule: Rule, @@ -88,15 +89,17 @@ export function handleRuleEvaluationDebug( outputError: any, runtimeFactValues: Record, factValues: any[] | undefined, - oldFactValues: any[] | undefined) { + oldFactValues: any[] | undefined, + inputFacts: string[] | undefined = [] +) { const executionId = `${rulesetName} - ${rule.name}`; const reasons: Record> = {}; for (let index = 0; index < factValues!.length; index++) { if (!oldFactValues) { - (reasons[rule.id] ||= {})[rule.inputFacts[index]] = { factName: rule.inputFacts[index], newValue: factValues![index] }; + (reasons[rule.id] ||= {})[inputFacts[index]] = { factName: inputFacts[index], newValue: factValues![index] }; } else if (oldFactValues[index]?.toString() !== factValues![index]?.toString()) { - (reasons[rule.id] ||= {})[rule.inputFacts[index]] = { factName: rule.inputFacts[index], oldValue: oldFactValues[index], newValue: factValues![index] }; + (reasons[rule.id] ||= {})[inputFacts[index]] = { factName: inputFacts[index], oldValue: oldFactValues[index], newValue: factValues![index] }; } } diff --git a/packages/@o3r/rules-engine/src/engine/engine.interface.ts b/packages/@o3r/rules-engine/src/engine/engine.interface.ts index be253e3133..89a068c390 100644 --- a/packages/@o3r/rules-engine/src/engine/engine.interface.ts +++ b/packages/@o3r/rules-engine/src/engine/engine.interface.ts @@ -94,14 +94,8 @@ export interface EngineRuleset { /** * Components linked to the ruleset. If present the ruleset will not be active by default. * 'or' condition: If at least one component has subscribed, the ruleset will become active. - * If present, the {@link linkedComponent} property will not be taken into consideration */ linkedComponents?: { or: ItemIdentifier[] }; - /** - * Component linked to the ruleset, if set it will disable the ruleset execution per default, waiting to a subscription - * @deprecated It will be removed in v12, use {@link linkedComponents} instead - */ - linkedComponent?: ItemIdentifier; /** Unique id of the ruleset*/ id: string; /** Stores the result of each rules from the ruleset */ @@ -153,7 +147,7 @@ export interface RuleEvaluationOutput { error?: any; } -/** Base obeject resulted at the end of a ruleset execution */ +/** Base object resulted at the end of a ruleset execution */ export interface BaseRulesetExecution { /** Id of the ruleset execution */ executionId: string; @@ -165,7 +159,7 @@ export interface BaseRulesetExecution { executionCounter: number; /** All input facts affecting the ruleset */ inputFacts: { factName: string; value: Facts }[]; - /** Runtime facts used accros the ruleset */ + /** Runtime facts used across the ruleset */ temporaryFacts?: Record; /** Facts changes that triggered the execution of the ruleset */ triggers: Record>; diff --git a/packages/@o3r/rules-engine/src/engine/helpers/filter-ruleset-event.operator.spec.ts b/packages/@o3r/rules-engine/src/engine/helpers/filter-ruleset-event.operator.spec.ts index 01e8a61507..06edd7401e 100644 --- a/packages/@o3r/rules-engine/src/engine/helpers/filter-ruleset-event.operator.spec.ts +++ b/packages/@o3r/rules-engine/src/engine/helpers/filter-ruleset-event.operator.spec.ts @@ -30,7 +30,6 @@ describe('Filter rulesets event operator', () => { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [ 'UI_FACT_2' ], @@ -83,7 +82,6 @@ describe('Filter rulesets event operator', () => { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j3', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [ 'UI_FACT_2', 'UI_FACT_4' diff --git a/packages/@o3r/rules-engine/src/engine/ruleset-executor.ts b/packages/@o3r/rules-engine/src/engine/ruleset-executor.ts index 3da48c50b6..0b2ace7248 100644 --- a/packages/@o3r/rules-engine/src/engine/ruleset-executor.ts +++ b/packages/@o3r/rules-engine/src/engine/ruleset-executor.ts @@ -298,7 +298,7 @@ export class RulesetExecutor { } if (this.rulesEngine.debugMode) { - output.evaluation = handleRuleEvaluationDebug({ ...rule, inputFacts }, this.ruleset.name, output.actions, output.error, runtimeFactValues, factValues, oldFactValues); + output.evaluation = handleRuleEvaluationDebug(rule, this.ruleset.name, output.actions, output.error, runtimeFactValues, factValues, oldFactValues, inputFacts); } else if (output.error) { this.rulesEngine.logger?.error(output.error); this.rulesEngine.logger?.warn(`Skipping rule ${rule.name}, and the associated ruleset`); @@ -349,7 +349,6 @@ export class RulesetExecutor { return { id: this.ruleset.id, validityRange: this.ruleset.validityRange, - linkedComponent: this.ruleset.linkedComponent, linkedComponents: this.ruleset.linkedComponents, rulesResultsSubject$: result$ } as EngineRuleset; diff --git a/packages/@o3r/rules-engine/src/engine/structure.ts b/packages/@o3r/rules-engine/src/engine/structure.ts index 287c8b3e54..37c471bbb8 100644 --- a/packages/@o3r/rules-engine/src/engine/structure.ts +++ b/packages/@o3r/rules-engine/src/engine/structure.ts @@ -71,8 +71,6 @@ export interface Rule { id: string; /** Runtime facts that are needed for the rule execution (sent by the CMS) */ inputRuntimeFacts: string[]; - /** @deprecated will be removed in v12. Facts that are needed for the rule execution (sent by the CMS) */ - inputFacts: string[]; /** Runtime facts that are created/updated by the rule*/ outputRuntimeFacts: string[]; /** Name of the rule*/ @@ -143,12 +141,6 @@ export interface Ruleset { /** * Components linked to the ruleset. If present the ruleset will not be active by default. * 'or' condition: If at least one component has subscribed, the ruleset will become active. - * If provided, the {@link linkedComponent} property will not be taken into consideration */ linkedComponents?: { or: ItemIdentifier[] }; - /** - * Component linked to the ruleset, if set it will disable the ruleset execution per default, waiting to a subscription - * @deprecated It will be removed in v12, use {@link linkedComponents} instead - */ - linkedComponent?: ItemIdentifier; } diff --git a/packages/@o3r/rules-engine/src/interfaces/action.interfaces.ts b/packages/@o3r/rules-engine/src/interfaces/action.interfaces.ts deleted file mode 100644 index 3a218e44f4..0000000000 --- a/packages/@o3r/rules-engine/src/interfaces/action.interfaces.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type { - ActionBlock, -} from '../engine/index'; - -/** - * Content of action that updates the configuration - * @deprecated use the one exposed by `@o3r/configuration` module. Will be removed in Otter v12. - */ -export interface ActionUpdateConfigBlock extends ActionBlock { - actionType: 'UPDATE_CONFIG'; - library: string; - component: string; - property: string; -} - -/** - * Content of action that updates an asset - * @deprecated use the one exposed by `@o3r/dynamic-content` module. Will be removed in Otter v12. - */ -export interface ActionUpdateAssetBlock extends ActionBlock { - actionType: 'UPDATE_ASSET'; - asset: string; - value: string; -} - -/** - * Content of action that updates localization - * @deprecated use the one exposed by `@o3r/localization` module. Will be removed in Otter v12. - */ -export interface ActionUpdateLocalisationBlock extends ActionBlock { - actionType: 'UPDATE_LOCALISATION'; - key: string; - value: string; -} - -/** - * Content of action that updates a placeholder - * @deprecated use the one exposed by `@o3r/components` module. Will be removed in Otter v12. - */ -export interface ActionUpdatePlaceholderBlock extends ActionBlock { - actionType: 'UPDATE_PLACEHOLDER'; - placeholderId: string; - value: string; -} - -/** - * Type that regroups all different kind of actions - * @deprecated will be removed in Otter v12. - */ -export type ActionOverrideBlock = - ActionUpdateConfigBlock | - ActionUpdateAssetBlock | - ActionUpdateLocalisationBlock | - ActionUpdatePlaceholderBlock; diff --git a/packages/@o3r/rules-engine/src/interfaces/index.ts b/packages/@o3r/rules-engine/src/interfaces/index.ts index 22e3be7926..aa4dd1ae9d 100644 --- a/packages/@o3r/rules-engine/src/interfaces/index.ts +++ b/packages/@o3r/rules-engine/src/interfaces/index.ts @@ -1,2 +1 @@ -export * from './action.interfaces'; export * from './linkable-to-ruleset.interfaces'; diff --git a/packages/@o3r/rules-engine/src/stores/rulesets/rulesets.selectors.spec.ts b/packages/@o3r/rules-engine/src/stores/rulesets/rulesets.selectors.spec.ts index 92451be425..8e6235c378 100644 --- a/packages/@o3r/rules-engine/src/stores/rulesets/rulesets.selectors.spec.ts +++ b/packages/@o3r/rules-engine/src/stores/rulesets/rulesets.selectors.spec.ts @@ -31,9 +31,13 @@ describe('RuleSets Selector tests', () => { name: 'r2_name', rules: [], id: 'r2', - linkedComponent: { - library: '@mylibrary', - name: 'mycomponent' + linkedComponents: { + or: [ + { + library: '@mylibrary', + name: 'mycomponent' + } + ] } }; @@ -86,10 +90,6 @@ describe('RuleSets Selector tests', () => { from: beforeYesterday.toISOString(), to: afterTomorrow.toISOString() }, - linkedComponent: { - library: '@mylibrary', - name: 'thisComponentWillBeIgnored' - }, linkedComponents: { or: [ { @@ -111,10 +111,6 @@ describe('RuleSets Selector tests', () => { validityRange: { from: afterTomorrow.toISOString() }, - linkedComponent: { - library: '@mylibrary', - name: 'thisComponentWillBeIgnored' - }, linkedComponents: { or: [ { @@ -253,26 +249,6 @@ describe('RuleSets Selector tests', () => { expect(selectors.selectActiveRuleSets.projector(rulesetsInRange)).toEqual([]); }); - it('should select the linked components rulesets', () => { - const state: RulesetsState = { - ids: [r2.id, r4.id, r8.id], - entities: { - r2: r2, - r4: r4, - r8: r8 - }, - requestIds: [] - }; - const allRuleSetsArray = selectors.selectAllRulesets.projector(state); - const rulesetsInRange = selectors.selectRuleSetsInRange.projector(allRuleSetsArray); - - const componentsWithRulesets = { - [computeItemIdentifier('mycomponent', '@mylibrary')]: [r2.id, r8.id], - [computeItemIdentifier('mycomponent2', '@mylibrary')]: [r8.id] - }; - expect(selectors.selectRuleSetLinkComponents.projector(rulesetsInRange)).toEqual(componentsWithRulesets); - }); - it('should select the map of rulesets linked components', () => { const state: RulesetsState = { ids: [r2.id, r4.id, r8.id], @@ -297,20 +273,6 @@ describe('RuleSets Selector tests', () => { expect(selectors.selectComponentsLinkedToRuleset.projector(rulesetsInRange)).toEqual(componentsWithRulesets); }); - it('should filter out the linked components rulesets outside the validity range', () => { - const state: RulesetsState = { - ids: [r9.id], - entities: { - r9: r9 - }, - requestIds: [] - }; - const allRuleSetsArray = selectors.selectAllRulesets.projector(state); - const rulesetsInRange = selectors.selectRuleSetsInRange.projector(allRuleSetsArray); - - expect(selectors.selectRuleSetLinkComponents.projector(rulesetsInRange)).toEqual({}); - }); - it('should filter out the map of rulesets linked components outside the validity range', () => { const state: RulesetsState = { ids: [r9.id], diff --git a/packages/@o3r/rules-engine/src/stores/rulesets/rulesets.selectors.ts b/packages/@o3r/rules-engine/src/stores/rulesets/rulesets.selectors.ts index e01343c2b7..b1f2aa5e56 100644 --- a/packages/@o3r/rules-engine/src/stores/rulesets/rulesets.selectors.ts +++ b/packages/@o3r/rules-engine/src/stores/rulesets/rulesets.selectors.ts @@ -77,23 +77,9 @@ export const selectRuleSetsInRange = createSelector( export const selectActiveRuleSets = createSelector( selectRuleSetsInRange, (ruleSets) => ruleSets - .filter((ruleSet: Ruleset) => (!(ruleSet.linkedComponents?.or?.length || ruleSet.linkedComponent))) + .filter((ruleSet: Ruleset) => (!ruleSet.linkedComponents?.or?.length)) .map((ruleSet: Ruleset) => ruleSet.id)); -/** - * Assign rulesetId to a component - * @deprecated It will be removed in v12 with the selector using it - * @param compName - * @param library - * @param ruleSetId - * @param acc - */ -function linkRulesetToComponent(compName: string, library: string, ruleSetId: string, acc: Record = {}) { - const configName = computeItemIdentifier(compName, library); - acc[configName] ||= []; - acc[configName].push(ruleSetId); -} - /** * Assign component to RulesetIds Map * @param compName @@ -107,31 +93,6 @@ function linkComponentToRuleset(compName: string, library: string, ruleSetId: st acc[ruleSetId].push(configName); } -/** - * Select the map of ruleSet to activate based on the component computed name - * @deprecated use {@link selectComponentsLinkedToRuleset} instead. It will be removed in v12 - */ -export const selectRuleSetLinkComponents = createSelector( - selectRuleSetsInRange, - (ruleSets) => - ruleSets - .reduce((acc: Record, ruleSet: Ruleset) => { - if ((!ruleSet.linkedComponents?.or || ruleSet.linkedComponents.or.length === 0) && !ruleSet.linkedComponent) { - return acc; - } - if (ruleSet.linkedComponents?.or?.length) { - ruleSet.linkedComponents.or.forEach((linkComp) => { - linkRulesetToComponent(linkComp.name, linkComp.library, ruleSet.id, acc); - }); - return acc; - } - if (ruleSet.linkedComponent) { - linkRulesetToComponent(ruleSet.linkedComponent.name, ruleSet.linkedComponent.library, ruleSet.id, acc); - } - return acc; - }, {}) -); - /** * Select the map of ruleSets to activate based on linked components */ @@ -140,7 +101,7 @@ export const selectComponentsLinkedToRuleset = createSelector( (ruleSets) => ruleSets .reduce((acc: { or: { [key: string]: string[] } }, ruleSet: Ruleset) => { - if ((!ruleSet.linkedComponents?.or || ruleSet.linkedComponents.or.length === 0) && !ruleSet.linkedComponent) { + if (!ruleSet.linkedComponents?.or || ruleSet.linkedComponents.or.length === 0) { return acc; } if (ruleSet.linkedComponents?.or?.length) { @@ -149,9 +110,6 @@ export const selectComponentsLinkedToRuleset = createSelector( }); return acc; } - if (ruleSet.linkedComponent) { - linkComponentToRuleset(ruleSet.linkedComponent.name, ruleSet.linkedComponent.library, ruleSet.id, acc.or); - } return acc; }, { or: {} }) ); diff --git a/packages/@o3r/rules-engine/testing/mocks/oneruleset-onerule-nocond-placeholder.mock.ts b/packages/@o3r/rules-engine/testing/mocks/oneruleset-onerule-nocond-placeholder.mock.ts index 7d8c371138..405d733c6c 100644 --- a/packages/@o3r/rules-engine/testing/mocks/oneruleset-onerule-nocond-placeholder.mock.ts +++ b/packages/@o3r/rules-engine/testing/mocks/oneruleset-onerule-nocond-placeholder.mock.ts @@ -12,7 +12,6 @@ export const jsonOneRulesetOneRuleNoCondPlaceholder: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/oneruleset-onerule-nocond.mock.ts b/packages/@o3r/rules-engine/testing/mocks/oneruleset-onerule-nocond.mock.ts index 4bad36dc88..39a1517a95 100644 --- a/packages/@o3r/rules-engine/testing/mocks/oneruleset-onerule-nocond.mock.ts +++ b/packages/@o3r/rules-engine/testing/mocks/oneruleset-onerule-nocond.mock.ts @@ -12,7 +12,6 @@ export const jsonOneRulesetOneRuleNoCond: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/oneruleset-onerule-reexecution.mock.ts b/packages/@o3r/rules-engine/testing/mocks/oneruleset-onerule-reexecution.mock.ts index 6432052722..4d8b7f287f 100644 --- a/packages/@o3r/rules-engine/testing/mocks/oneruleset-onerule-reexecution.mock.ts +++ b/packages/@o3r/rules-engine/testing/mocks/oneruleset-onerule-reexecution.mock.ts @@ -13,7 +13,6 @@ export const jsonOneRulesetOneRuleReexecution: { ruleSets: Ruleset[] } = { id: '5e7c37c9-b483-4742-86f5-bdae9b155f09', name: 'init rule', outputRuntimeFacts: ['CMS_myFact'], - inputFacts: ['foieGrasPrice', 'pageUrl'], inputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -67,7 +66,6 @@ export const jsonOneRulesetOneRuleReexecution: { ruleSets: Ruleset[] } = { id: '9d6c1b83-9350-4ab5-beb1-3f1782ab334b', name: 'best rule 2', outputRuntimeFacts: [], - inputFacts: [], inputRuntimeFacts: ['CMS_myFact'], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/oneruleset-threerules-onethrows.mock.ts b/packages/@o3r/rules-engine/testing/mocks/oneruleset-threerules-onethrows.mock.ts index 5eb95644f9..0ecb487d4e 100644 --- a/packages/@o3r/rules-engine/testing/mocks/oneruleset-threerules-onethrows.mock.ts +++ b/packages/@o3r/rules-engine/testing/mocks/oneruleset-threerules-onethrows.mock.ts @@ -13,7 +13,6 @@ export const jsonOneRulesetThreeRulesOneThrows: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -55,7 +54,6 @@ export const jsonOneRulesetThreeRulesOneThrows: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j2', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -93,7 +91,6 @@ export const jsonOneRulesetThreeRulesOneThrows: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j3', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -131,7 +128,6 @@ export const jsonOneRulesetThreeRulesOneThrows: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j3', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/oneruleset-threerules-undefinedfactused.mock.ts b/packages/@o3r/rules-engine/testing/mocks/oneruleset-threerules-undefinedfactused.mock.ts index fc784472f0..ef53349e44 100644 --- a/packages/@o3r/rules-engine/testing/mocks/oneruleset-threerules-undefinedfactused.mock.ts +++ b/packages/@o3r/rules-engine/testing/mocks/oneruleset-threerules-undefinedfactused.mock.ts @@ -13,7 +13,6 @@ export const jsonOneRulesetThreeRulesUndefinedFactUsed: { ruleSets: Ruleset[] } id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -55,7 +54,6 @@ export const jsonOneRulesetThreeRulesUndefinedFactUsed: { ruleSets: Ruleset[] } id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j2', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -93,7 +91,6 @@ export const jsonOneRulesetThreeRulesUndefinedFactUsed: { ruleSets: Ruleset[] } id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j3', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/oneruleset-twonestedrules.mock.ts b/packages/@o3r/rules-engine/testing/mocks/oneruleset-twonestedrules.mock.ts index 2f97f3a8f1..98d8ec839b 100644 --- a/packages/@o3r/rules-engine/testing/mocks/oneruleset-twonestedrules.mock.ts +++ b/packages/@o3r/rules-engine/testing/mocks/oneruleset-twonestedrules.mock.ts @@ -13,7 +13,6 @@ export const jsonOneRulesetTwoNestedRules: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: ['isMobileDevice'], outputRuntimeFacts: [ 'UI_FACT_2' ], @@ -54,7 +53,6 @@ export const jsonOneRulesetTwoNestedRules: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j2', name: 'the second rule', inputRuntimeFacts: ['UI_FACT_2'], - inputFacts: ['cart'], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/oneruleset-tworules-any-and-all.mock.ts b/packages/@o3r/rules-engine/testing/mocks/oneruleset-tworules-any-and-all.mock.ts index 5c5050ccff..cc101b9578 100644 --- a/packages/@o3r/rules-engine/testing/mocks/oneruleset-tworules-any-and-all.mock.ts +++ b/packages/@o3r/rules-engine/testing/mocks/oneruleset-tworules-any-and-all.mock.ts @@ -13,7 +13,6 @@ export const jsonOneRulesetTwoRulesAnyAndAll: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule with ALL', inputRuntimeFacts: [], - inputFacts: ['foieGrasPrice'], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -63,7 +62,6 @@ export const jsonOneRulesetTwoRulesAnyAndAll: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j2', name: 'the second rule with ANY', inputRuntimeFacts: [], - inputFacts: ['foieGrasPrice'], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/oneruleset-tworules.mock.ts b/packages/@o3r/rules-engine/testing/mocks/oneruleset-tworules.mock.ts index 746543e6d0..fdd51822a3 100644 --- a/packages/@o3r/rules-engine/testing/mocks/oneruleset-tworules.mock.ts +++ b/packages/@o3r/rules-engine/testing/mocks/oneruleset-tworules.mock.ts @@ -14,7 +14,6 @@ export const jsonOneRulesetTwoRules: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: ['aNumber'], outputRuntimeFacts: [ 'UI_FACT_2' ], @@ -70,7 +69,6 @@ export const jsonOneRulesetTwoRules: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j2', name: 'the second rule', inputRuntimeFacts: [], - inputFacts: ['foieGrasPrice'], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -118,7 +116,6 @@ export const jsonOneRulesetTwoRules: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/onerulesetvalid-onerule-nocond.mock.ts b/packages/@o3r/rules-engine/testing/mocks/onerulesetvalid-onerule-nocond.mock.ts index f661af2a60..6fc87a5ad0 100644 --- a/packages/@o3r/rules-engine/testing/mocks/onerulesetvalid-onerule-nocond.mock.ts +++ b/packages/@o3r/rules-engine/testing/mocks/onerulesetvalid-onerule-nocond.mock.ts @@ -12,7 +12,6 @@ export const jsonOneRulesetValidOneRuleNoCond: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -36,16 +35,17 @@ export const jsonOneRulesetValidOneRuleNoCond: { ruleSets: Ruleset[] } = { validityRange: { to: '2025-07-23T18:25:43.511Z' }, - linkedComponent: { - library: '@otter/comps', - name: 'TestComponent' + linkedComponents: { + or: [{ + library: '@otter/comps', + name: 'TestComponent' + }] }, rules: [ { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -69,16 +69,17 @@ export const jsonOneRulesetValidOneRuleNoCond: { ruleSets: Ruleset[] } = { validityRange: { from: '2100-07-23T18:25:43.511Z' }, - linkedComponent: { - library: '@otter/comps', - name: 'TestComponent2' + linkedComponents: { + or: [{ + library: '@otter/comps', + name: 'TestComponent2' + }] }, rules: [ { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -107,7 +108,6 @@ export const jsonOneRulesetValidOneRuleNoCond: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/two-rulesets.ts b/packages/@o3r/rules-engine/testing/mocks/two-rulesets.ts index fef3032f8f..224e963319 100644 --- a/packages/@o3r/rules-engine/testing/mocks/two-rulesets.ts +++ b/packages/@o3r/rules-engine/testing/mocks/two-rulesets.ts @@ -12,7 +12,6 @@ export const rulesetsObj: { rulesets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j9', name: 'rule zero', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -44,10 +43,6 @@ export const rulesetsObj: { rulesets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j0', name: 'rule zero', inputRuntimeFacts: [], - inputFacts: [ - 'destinationLocationCode', - 'pageUrl' - ], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -116,9 +111,6 @@ export const rulesetsObj: { rulesets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j9', name: 'rule one', inputRuntimeFacts: [], - inputFacts: [ - 'isMobileDevice' - ], outputRuntimeFacts: ['CMS_myFact'], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/tworulesets-both-ondemand.ts b/packages/@o3r/rules-engine/testing/mocks/tworulesets-both-ondemand.ts index 722bab6638..caaf14888b 100644 --- a/packages/@o3r/rules-engine/testing/mocks/tworulesets-both-ondemand.ts +++ b/packages/@o3r/rules-engine/testing/mocks/tworulesets-both-ondemand.ts @@ -24,7 +24,6 @@ export const jsonTwoRulesetsBothOnDemand: { rulesets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j9', name: 'rule zero', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -47,18 +46,17 @@ export const jsonTwoRulesetsBothOnDemand: { rulesets: Ruleset[] } = { { id: 'e5th46e84-5e4th-54eth65seth46Default', name: 'the first ruleset', - linkedComponent: { - library: '@otter/demo-app-components', - name: 'o3r-calendar-per-bound-cont' + linkedComponents: { + or: [{ + library: '@otter/demo-app-components', + name: 'o3r-calendar-per-bound-cont' + }] }, rules: [ { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j0', name: 'rule zero', inputRuntimeFacts: [], - inputFacts: [ - 'isMobileDevice' - ], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/tworulesets-one-ondemand.ts b/packages/@o3r/rules-engine/testing/mocks/tworulesets-one-ondemand.ts index e31f48799e..52a64e203c 100644 --- a/packages/@o3r/rules-engine/testing/mocks/tworulesets-one-ondemand.ts +++ b/packages/@o3r/rules-engine/testing/mocks/tworulesets-one-ondemand.ts @@ -7,16 +7,17 @@ export const jsonTwoRulesetsOneOnDemand: { rulesets: Ruleset[] } = { { id: 'e5th46e84-5e4th-54eth65seth46se8Linked', name: 'linked component ruleset', - linkedComponent: { - library: '@otter/demo-app-components', - name: 'o3r-calendar-per-bound-cont' + linkedComponents: { + or: [{ + library: '@otter/demo-app-components', + name: 'o3r-calendar-per-bound-cont' + }] }, rules: [ { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j9', name: 'rule zero', inputRuntimeFacts: [], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -44,9 +45,6 @@ export const jsonTwoRulesetsOneOnDemand: { rulesets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j0', name: 'rule zero', inputRuntimeFacts: [], - inputFacts: [ - 'isMobileDevice' - ], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/tworulesets-tworules-nocontext.mock.ts b/packages/@o3r/rules-engine/testing/mocks/tworulesets-tworules-nocontext.mock.ts index f0355bf14a..e051fdc756 100644 --- a/packages/@o3r/rules-engine/testing/mocks/tworulesets-tworules-nocontext.mock.ts +++ b/packages/@o3r/rules-engine/testing/mocks/tworulesets-tworules-nocontext.mock.ts @@ -13,7 +13,6 @@ export const jsonTwoRulesetTwoRulesNoContext: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: ['isMobileDevice'], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -61,7 +60,6 @@ export const jsonTwoRulesetTwoRulesNoContext: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j4', name: 'the second rule', inputRuntimeFacts: [], - inputFacts: ['cart'], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/rules-engine/testing/mocks/tworulesets-tworules.mock.ts b/packages/@o3r/rules-engine/testing/mocks/tworulesets-tworules.mock.ts index 3e70fa61bc..141964c3b4 100644 --- a/packages/@o3r/rules-engine/testing/mocks/tworulesets-tworules.mock.ts +++ b/packages/@o3r/rules-engine/testing/mocks/tworulesets-tworules.mock.ts @@ -13,7 +13,6 @@ export const jsonTwoRulesetTwoRules: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j1', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: ['isMobileDevice'], outputRuntimeFacts: [ 'UI_FACT_2' ], @@ -57,7 +56,6 @@ export const jsonTwoRulesetTwoRules: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j2', name: 'the second rule', inputRuntimeFacts: ['UI_FACT_2'], - inputFacts: [], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', @@ -122,7 +120,6 @@ export const jsonTwoRulesetTwoRules: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j3', name: 'the first rule', inputRuntimeFacts: [], - inputFacts: ['isMobileDevice'], outputRuntimeFacts: [ 'UI_FACT_3', 'UI_FACT_2', @@ -212,7 +209,6 @@ export const jsonTwoRulesetTwoRules: { ruleSets: Ruleset[] } = { id: '6e8t54h6s4e-6erth46sre8th4-d46t8s13t5j4', name: 'the second rule', inputRuntimeFacts: [], - inputFacts: ['cart'], outputRuntimeFacts: [], rootElement: { elementType: 'RULE_BLOCK', diff --git a/packages/@o3r/schematics/src/rule-factories/ng-add/schematics-register.ts b/packages/@o3r/schematics/src/rule-factories/ng-add/schematics-register.ts index e4528dcd87..9dd90df32d 100644 --- a/packages/@o3r/schematics/src/rule-factories/ng-add/schematics-register.ts +++ b/packages/@o3r/schematics/src/rule-factories/ng-add/schematics-register.ts @@ -78,48 +78,3 @@ export function setupSchematicsParamsForProject(schematicsDefaultParams: Record< return writeAngularJson(tree, workspace); }; } - -/** - * Setup schematics default params in angular.json - * @deprecated will be removed in v12. Use {@link setupSchematicsParamsForProject} - * @param schematicsDefaultParams default params to setup by schematic - * @param overrideValue Define if the given value should override the one already defined in the workspace - * @param angularJsonFile Path to the Angular.json file. Will use the workspace root's angular.json if not specified - */ -export function setupSchematicsDefaultParams(schematicsDefaultParams: Record, overrideValue = false, angularJsonFile?: string): Rule { - return (tree, context) => { - const workspace = getWorkspaceConfig(tree, angularJsonFile); - if (!workspace) { - context.logger.error('No workspace found'); - return tree; - } - workspace.schematics ||= {}; - Object.entries(schematicsDefaultParams).forEach(([schematicName, defaultParams]) => { - workspace.schematics![schematicName] = overrideValue - ? { - ...workspace.schematics![schematicName], - ...defaultParams - } - : { - ...defaultParams, - ...workspace.schematics![schematicName] - }; - }); - Object.values(workspace.projects).forEach((project) => { - Object.entries(schematicsDefaultParams).forEach(([schematicName, defaultParams]) => { - if (project.schematics?.[schematicName]) { - project.schematics[schematicName] = overrideValue - ? { - ...project.schematics[schematicName], - ...defaultParams - } - : { - ...defaultParams, - ...project.schematics[schematicName] - }; - } - }); - }); - return writeAngularJson(tree, workspace, angularJsonFile); - }; -} diff --git a/packages/@o3r/schematics/src/rule-factories/update-imports/list-of-vars.ts b/packages/@o3r/schematics/src/rule-factories/update-imports/list-of-vars.ts index f0c9e655c2..05776a1296 100644 --- a/packages/@o3r/schematics/src/rule-factories/update-imports/list-of-vars.ts +++ b/packages/@o3r/schematics/src/rule-factories/update-imports/list-of-vars.ts @@ -14,7 +14,6 @@ export const listOfExposedElements: SassImportExposedElement[] = [ // utils { value: '$test-mode-enabled', type: 'var' }, { value: 'error', type: 'function' }, - { value: '$alternative-breakpoints-map', type: 'var' }, { value: 'get-mandatory', type: 'function' }, { value: 'multi-map-merge', type: 'function' }, { value: '$metadata-logging', type: 'var' }, diff --git a/packages/@o3r/schematics/src/utility/matching-peers.ts b/packages/@o3r/schematics/src/utility/matching-peers.ts index 71e550a2dd..6dae970cca 100644 --- a/packages/@o3r/schematics/src/utility/matching-peers.ts +++ b/packages/@o3r/schematics/src/utility/matching-peers.ts @@ -30,14 +30,13 @@ export function getPeerDepWithPattern(packageJsonPath: string, pattern: RegExp | const basicsPackageName = new Set([ '@o3r/core', '@o3r/schematics', - '@o3r/dev-tools', '@o3r/workspace' ]); /** * Get the list of o3r peer deps from a given package.json file * @param packageJsonPath The package json on which we search for o3r peer deps - * @param filterBasics If activated it will remove the basic peer deps (o3r/core, o3r/dev-tools, o3r/workspace and o3r/schematics) from the list of results + * @param filterBasics If activated it will remove the basic peer deps (o3r/core, o3r/workspace and o3r/schematics) from the list of results * @param packagePattern Pattern of the package name to look in the packages peer dependencies. * @param versionRangePrefix Prefix to add to the package version to determine Semver Range */ diff --git a/packages/@o3r/schematics/src/utility/monorepo.ts b/packages/@o3r/schematics/src/utility/monorepo.ts index d38495760a..aa8cec36de 100644 --- a/packages/@o3r/schematics/src/utility/monorepo.ts +++ b/packages/@o3r/schematics/src/utility/monorepo.ts @@ -14,9 +14,6 @@ import type { import { getSchematicOptions, } from './collection'; -import { - getWorkspaceConfig, -} from './loaders'; /** * Find the relative path to a configuration file at the monorepo root @@ -41,16 +38,6 @@ export function isNxContext(tree: Tree) { return tree.exists('/nx.json'); } -/** - * Determine if a repository is standalone (not part of a monorepo) - * @deprecated no longer in use. Will be removed in V12 - * @param tree - */ -export function isStandaloneRepository(tree: Tree) { - const workspaceConfig = getWorkspaceConfig(tree); - return workspaceConfig && Object.keys(workspaceConfig.projects || {}).length === 1 && Object.values(workspaceConfig.projects)[0].root === ''; -} - /** * Determine if we are in a project with multi packages * @param tree diff --git a/packages/@o3r/storybook/.compodocrc.json b/packages/@o3r/storybook/.compodocrc.json deleted file mode 100644 index fdbdc777bf..0000000000 --- a/packages/@o3r/storybook/.compodocrc.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/compodoc/compodoc/develop/src/config/schema.json", - "name": "Storybook", - "output": "../../../generated-doc/storybook", - "tsconfig": "./tsconfig.doc.json", - "assetsFolder": "../../../.attachments", - "disableSourceCode": true, - "disableDomTree": true, - "disableTemplateTab": true, - "disableStyleTab": true, - "disableGraph": true, - "disableCoverage": true, - "disablePrivate": true, - "disableProtected": true, - "disableInternal": true, - "disableLifeCycleHooks": true, - "disableRoutesGraph": true, - "disableSearch": false, - "hideGenerator": true, - "customFavicon": "../../../assets/logo/flavors/otter-128x128.png", - "templates": "../../../compodoc-templates/package" -} diff --git a/packages/@o3r/storybook/.gitignore b/packages/@o3r/storybook/.gitignore deleted file mode 100644 index f54fcd67bd..0000000000 --- a/packages/@o3r/storybook/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ - -/dist -/dist-test -/dist-modules diff --git a/packages/@o3r/storybook/README.md b/packages/@o3r/storybook/README.md deleted file mode 100644 index f5817887e4..0000000000 --- a/packages/@o3r/storybook/README.md +++ /dev/null @@ -1,114 +0,0 @@ -

Otter storybook

-

- Super cute Otter! -

- -This package is an [Otter Framework Module](https://github.com/AmadeusITGroup/otter/tree/main/docs/core/MODULE.md). -
-
- -## Description - -[![Status](https://img.shields.io/badge/status-deprecated-red?style=for-the-badge)](https://www.npmjs.com/package/@o3r/storybook) -[![Stable Version](https://img.shields.io/npm/v/@o3r/storybook?style=for-the-badge)](https://www.npmjs.com/package/@o3r/storybook) -[![Bundle Size](https://img.shields.io/bundlephobia/min/@o3r/storybook?color=green&style=for-the-badge)](https://www.npmjs.com/package/@o3r/storybook) - -The Otter Framework provides several tools for Otter based projects. - -> [!CAUTION] -> **Deprecated package** -> `@o3r/storybook` package is deprecated and will no longer be updated as of Otter v12. - -## Description - -The Otter Framework provides 3 sets of tools for Storybook integration: - -- **Generators**: To generate basic Story and set up the application to support Storybook -- **Stories helpers**: to create story controllers based on Otter framework -- **AddOns**: to add features to interact with Otter Customization - -> These tools are part of the `@o3r/storybook` package - -## Setup Storybook support - -Otter framework provides 2 mechanisms to setup Storybook on an application/library: - -### When starting a new Application/Library - -When creating a new application/library (`ng new`), the Otter Framework can be added with the `ng add @o3r/schematics` and -`ng add @o3r/core` commands. When executing this command, the following question will be asked: *Add storybook setup?* (default value: `yes`). -If `yes` is chosen, [Storybook mandatory configurations](#storybook-mandatory-configurations) will be automatically added. - -### Storybook mandatory configurations - -Storybook will require 2 files in the folder `.storybook` added into the root folder of the project. - -- **main.js**: partial webpack configuration used by Storybook to build the stories. It is used by Otter to add custom CSS (including theming variables) -- **preview.js**: set of functions and default configurations used by the Storybook before displaying a component preview. This is used by Otter to load metadata (configuration, localization and styling) to set up the component controllers and integrate localization into the display. - -> For more documentation regarding the Storybook setup, your can refer to [Storybook documentation](https://storybook.js.org/docs/react/configure/overview). - -## Otter AddOns - -To facilitate the customization of an Otter component, 2 Storybook Addons are provided. - -### Global Theming tab - -- ***(1)***: To facilitate the administration of global theming of a component, a tab has been added to the default storybooks tabs. -- ***(2)***: Each global theme variable is editable -- ***(3)***: 3 action buttons are provided - - Theme switching button (visible only in case of multi theme configured). See [Multi Theme section](#multi-theming). - - Theme override download button to download the CSS generated from the edited values. - - Reset button to remove override. - -### Exporter - -3 different exports are available: - -- **Export Theme**: exports global theme as CSS file. -- **Export Configuration**: exports component configuration as JSON file. -- **Export Component style**: exports component variable override as CSS file. - -## Stories Helpers - -Otter provides 3 helpers to generate automatically the component controllers. -Each helper should be used in both `preview.js` to initialize the value and in `.stories.ts` file to retrieve the value. - -| Setter (in preview.js) | Setter parameter(s) | Extractor (in stories) | Extractor Parameter(s) | -| ------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------- | -| **setStyleMetata**: register styling metadata | *styling metadata* extracted by `@o3r/styling` from the application/library.
In case of library, a default theme should be provided | **extractStyling**: retrieve styling variable configuration for the component | *component selector* used as CSS variable name prefix in the component | -| **setConfiguratiobnMetadata**: register the configuration metadata | *configuration metadata* extracted by `@o3r/configuration` from the application/library. | **extractConfiguration**: retrieve dynamic configuration's configuration for the component | *library name*: name of the current library/component which the component is attached to.
*component name*: class name of the current component | -| **setLocalizationMetadata**: register the localization metadata | *localization metadata* extracted by `@o3r/localization` from the application/library. | **extractLocalization**: retrieve full localization configuration for the component | *translation*: current component translations map | - -> Find documentation to write a story on [Storybook documentation](https://storybook.js.org/docs/react/writing-stories/introduction). - -## Additional features - -### Multi theming - -The Theme Addon is supporting multi theme and allows the user to switch from one theme to another. -The list of themes should be provided as [global parameter](https://storybook.js.org/docs/writing-stories/parameters#global-parameters) with a key/value map: - -```typescript -import { getThemeVariables, setStyleMetadata } from '@o3r/storybook'; - -// metadata extracted from my application -import defaultStyleMetadata from '../dist/style.metadata.json'; -// metadata extracted from another theme of my application (will contains only the variable relative to this custom theme) -import customStyleMetadata from '../dist/style.metadata.json'; - -// registers my application default style metadata -setStyleMetadata({defaultStyleMetadata}); - - -export const parameters = { - actions: { argTypesRegex: '^on[A-Z].*' }, - themes: { - // the function getThemeVariables() will extract, from metadata, only the CSS variable provided by the global theme, as key/value map - // sets as default theme the map of the default theme css variable - default: getThemeVariables(), - // adds additional theme by providing the map of css variable extracted from the custom theme - custom: getThemeVariables(customStyleMetadata) - } -} -``` diff --git a/packages/@o3r/storybook/addon/exporter.tsx b/packages/@o3r/storybook/addon/exporter.tsx deleted file mode 100644 index fb2953e246..0000000000 --- a/packages/@o3r/storybook/addon/exporter.tsx +++ /dev/null @@ -1,52 +0,0 @@ -// eslint-disable-next-line no-use-before-define -import React from 'react'; -import { IconButton, Icons, TooltipLinkList, WithTooltip } from '@storybook/components'; - -/** Exporter component properties */ -export interface ExporterToolbarProps { - /** On Export Theme event */ - onExportTheme: () => void; - /** On Export Configuration event */ - onExportConfig: () => void; - /** On Export Component Styling event */ - onExportStyling: () => void; -} - -/** Exporter component from Storybook toolbar */ -export default class ExporterToolbar extends React.Component { - /** @inheritdoc */ - public render() { - return ( - { - return ( - this.props.onExportTheme() - }, - { - id: 'export-config', - title: 'Export Configuration', - onClick: () => this.props.onExportConfig() - }, - { - id: 'export-styling', - title: 'Export Component styling', - onClick: () => this.props.onExportStyling() - } - ]}/> - ); - }} - > - - - - - ); - } -} diff --git a/packages/@o3r/storybook/addon/helpers.spec.ts b/packages/@o3r/storybook/addon/helpers.spec.ts deleted file mode 100644 index 6c4bf11666..0000000000 --- a/packages/@o3r/storybook/addon/helpers.spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - generateThemeCss, -} from './helpers'; - -describe('generateThemeCss', () => { - it('should generate a css file', () => { - const result = generateThemeCss({ '--test-var': '#000' }); - - expect(result).toMatch('--test-var: #000;'); - }); - - it('should generate a css file from diff', () => { - const result = generateThemeCss({ '--test-var': '#000', '--test-var2': '#fff' }, { '--test-var': '#fff', '--test-var2': '#fff' }); - - expect(result).toMatch('--test-var: #000;'); - expect(result).not.toMatch('--test-var2'); - }); -}); diff --git a/packages/@o3r/storybook/addon/helpers.ts b/packages/@o3r/storybook/addon/helpers.ts deleted file mode 100644 index 2b6dd2624b..0000000000 --- a/packages/@o3r/storybook/addon/helpers.ts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Download a file base of content - * @param content File content - * @param type File type - * @param id ID of the temporary link - */ -export function downloadFile(content: string, type: string, id = 'generated-link') { - const blob = new Blob([content], { type }); - const url = URL.createObjectURL(blob); - const link = document.createElement('a'); - link.href = url; - link.id = id; - link.target = '_blank'; - document.body.append(link); - link.click(); - link.remove(); -} - -/** - * Generate CSS file based of theme map - * @param theme Map of CSS variables to include in the CSS generated file - * @param baseTheme Map of CSS variables to compare to generate diff variable only - */ -export function generateThemeCss(theme: Record, baseTheme: Record = {}) { - return `:root {\n${Object.entries(theme).filter(([name, value]) => value !== baseTheme[name]).map(([name, value]) => ` --${name}: ${value};`).join('\n')}\n}`; -} diff --git a/packages/@o3r/storybook/addon/index.ts b/packages/@o3r/storybook/addon/index.ts deleted file mode 100644 index 9b174c9f58..0000000000 --- a/packages/@o3r/storybook/addon/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './preset'; diff --git a/packages/@o3r/storybook/addon/preset.ts b/packages/@o3r/storybook/addon/preset.ts deleted file mode 100644 index 9f5002bb4a..0000000000 --- a/packages/@o3r/storybook/addon/preset.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Storybook preset function for addOn registration - * @param entry - */ -export function managerEntries(entry: string[] = []) { - return [...entry, require.resolve('./addon/register')]; -} diff --git a/packages/@o3r/storybook/addon/register.tsx b/packages/@o3r/storybook/addon/register.tsx deleted file mode 100644 index 9eba9242de..0000000000 --- a/packages/@o3r/storybook/addon/register.tsx +++ /dev/null @@ -1,128 +0,0 @@ -// eslint-disable-next-line no-use-before-define -import { addons, types } from '@storybook/addons'; -import { AddonPanel } from '@storybook/components'; -import React, { useState } from 'react'; - -import type { Configuration } from '@o3r/core'; -import { CONFIGURATION_PREFIX } from '../src/configuration/configuration-configs.interface'; -import { STYLING_PREFIX } from '../src/styling/style-configs.interface'; -import ExporterToolbar from './exporter'; -import { downloadFile, generateThemeCss } from './helpers'; -import ThemePanel from './theme'; - -/** State of the Theme Panel */ -export interface ThemePanelState { - /** Theme map */ - theme: Record; - /** Default theme map value */ - baseTheme: Record; - /** Name of the selected theme */ - selectedThemeName: string | undefined; -} - -const ADDON_ID = 'otter'; - -addons.register(ADDON_ID, (api) => { - - // ---------- Theme tab ---------- - let updatedTheme: Record | undefined; - let selectedThemeName: string | undefined; - addons.add(`${ADDON_ID}/theme-panel`, { - type: types.PANEL, - title: 'Theme', - render: ({active}) => { - const themes: Record> = api.getCurrentParameter('themes'); - const themeNames = themes && Object.keys(themes); - selectedThemeName = !selectedThemeName && themeNames && themeNames[0] || selectedThemeName; - const baseTheme: Record = selectedThemeName && themes[selectedThemeName] || {}; - const [state, setState] = useState({ theme: updatedTheme || baseTheme, baseTheme, selectedThemeName }); - - const updateTheme = (theme: Record) => { - updatedTheme = theme; - setState({ theme, baseTheme, selectedThemeName }); - api.updateGlobals({theme}); - }; - - const updateSelectedTheme = (themeName: string) => { - selectedThemeName = themeName; - const newBaseTheme: Record = selectedThemeName && themes && themes[selectedThemeName] || {}; - updatedTheme = newBaseTheme; - setState({ theme: newBaseTheme, baseTheme: newBaseTheme, selectedThemeName }); - api.updateGlobals({ theme: newBaseTheme }); - }; - - const loadTheme = (theme: Record) => { - selectedThemeName = undefined; - const mergeTheme = { ...state.theme, ...theme }; - setState({ theme: mergeTheme, baseTheme: mergeTheme, selectedThemeName }); - api.updateGlobals({ theme }); - }; - - if (!active) { - return ; - } - if (!updatedTheme) { - updateTheme(baseTheme); - } - return ( - - - - ); - } - }); - - // ---------- Exporter toolbar ---------- - /** Generate and download theme css file */ - const exportTheme = () => { - const baseTheme: Record = api.getCurrentParameter('theme') || {}; - const css = generateThemeCss(updatedTheme || {}, baseTheme); - downloadFile(css, 'text/css', 'theme-download-link'); - }; - - /** Generate and download Configuration file file */ - const exportConfig = () => { - const regexp = new RegExp(`^${CONFIGURATION_PREFIX}`); - const { args, initialArgs, parameters }: { args: Record | undefined; initialArgs: Record | undefined; parameters: Record } = - api.getCurrentStoryData() as any; - const config = !args ? {} : Object.entries(args) - .filter(([key, value]) => regexp.test(key) && typeof value !== 'function' && (!initialArgs || value !== initialArgs[key])) - .reduce((acc, [key, value]) => { - acc[key.replace(regexp, '')] = value; - return acc; - }, {}); - const componentId = parameters.componentId || { name: 'unknown', library: 'unknown' }; - downloadFile(JSON.stringify({...componentId, config}, null, 2), 'application/json', 'config-download-link'); - }; - - /** Generate and download component css variable file */ - const exportStyling = () => { - const regexp = new RegExp(`^${STYLING_PREFIX}`); - const { args, initialArgs }: { args: Record | undefined; initialArgs: Record | undefined } = api.getCurrentStoryData() as any; - const diffCss = !args ? {} : Object.entries(args) - .filter(([key, value]) => regexp.test(key) && typeof value !== 'function' && (!initialArgs || value !== initialArgs[key])) - .reduce>((acc, [key, value]) => { - acc[key.replace(regexp, '')] = value; - return acc; - }, {}); - const css = generateThemeCss(diffCss); - downloadFile(css, 'text/css', 'styling-download-link'); - }; - - addons.add(`${ADDON_ID}/exporter`, { - type: types.TOOL, - title: 'Otter Export', - match: ({ viewMode }) => !!(viewMode && viewMode.match(/^(story|docs)$/)), - render: () => { - return ; - } - }); - -}); diff --git a/packages/@o3r/storybook/addon/theme.tsx b/packages/@o3r/storybook/addon/theme.tsx deleted file mode 100644 index 0c444cca9a..0000000000 --- a/packages/@o3r/storybook/addon/theme.tsx +++ /dev/null @@ -1,213 +0,0 @@ -// eslint-disable-next-line no-use-before-define -import { Form, Icons, TooltipLinkList, WithTooltip } from '@storybook/components'; -import Color from 'color'; -import React, { ChangeEvent } from 'react'; -import { Subject, Subscription } from 'rxjs'; -import { debounceTime } from 'rxjs/operators'; -import { downloadFile, generateThemeCss } from './helpers'; - -/** - * Determine if the given value is a color - * - * @param value value to analyze - */ -const isColor = (value: string) => { - return /^rgba?\([^)]*\)$/.test(value) || /^#([a-f]|[0-9]){3,8}$/.test(value); -}; - -/** Theme component properties */ -export interface ThemePanelProps { - /** Theme variable map */ - theme: Record; - /** Initial theme value */ - baseTheme: Record; - /** Current theme name */ - themeName?: string; - /** List of themes */ - themeNameList?: string[]; - - /** On theme variable value change event */ - onThemeChange: (theme: Record) => void; - /** On theme change event */ - onThemeNameChange: (theme: string) => void; - /** On theme import event */ - onThemeImport: (theme: Record) => void; -} - -const CSS_PARSING_REGEXP = /:root[^{]*\{[\r\n]*([^}]*)\}/g; - -/** Theme component from Storybook panel */ -export default class ThemePanel extends React.Component { - - private themeChange$ = new Subject<{ name: string; value: string }>(); - private subscriptions = new Subscription(); - - /** - * Request update CSS Variable value - * - * @param name CSS variable name to update - * @param value new CSS variable value - */ - private handleValueChange(name: string, value: string) { - this.themeChange$.next({ name, value }); - } - - /** - * Parse CSS file content to extract variable map - * - * @param css CSS file content - */ - private parseCssFile(css: string): Record | undefined { - const result: Record = {}; - let found: RegExpExecArray | null = null; - while ((found = CSS_PARSING_REGEXP.exec(css)) !== null) { - found[1] - ?.split(/;[\r\n]*/) - .map((line) => line.trim().split(':').map((item) => item.trim())) - .filter(([variable]) => variable.startsWith('--')) - .forEach(([variable, value]) => { - result[variable.replace(/^--/, '')] = value; - }); - } - - return Object.keys(result).length > 0 ? result : undefined; - } - - /** - * Update CSS Variable value - * - * @param name CSS variable name to update - * @param value new CSS variable value - */ - private updateValue(name: string, value: string) { - const theme = { - ...this.props.theme, - [name]: value - }; - this.props.onThemeChange(theme); - } - - /** Reset theme variable to the default value */ - public resetTheme() { - this.props.onThemeChange(this.props.baseTheme); - } - - /** Export CSS file */ - public exportTheme() { - const css = generateThemeCss(this.props.theme, this.props.baseTheme); - downloadFile(css, 'text/css', 'theme-download-link'); - } - - /** - * Import CSS file to apply as application theme - * - * @param file CSS File to load - */ - public importTheme(file?: File) { - if (!file) { - return; - } - - const reader = new FileReader(); - reader.onload = (e) => { - const target = e.target; - const data = target?.result; - const fileContent = data?.toString(); - const parsedData = fileContent && this.parseCssFile(fileContent); - if (parsedData) { - this.props.onThemeImport(parsedData); - } - }; - reader.readAsText(file); - } - - /** @inheritdoc */ - public componentDidMount() { - this.subscriptions.add( - this.themeChange$.pipe( - debounceTime(300) - ).subscribe(({ name, value }) => this.updateValue(name, value)) - ); - } - - /** @inheritdoc */ - public componentWillUnmount() { - this.subscriptions.unsubscribe(); - } - - /** @inheritdoc */ - public render() { - - const buttonMargin = { margin: '0 .25em' }; - - return ( - - - - - - - - - { - Object.entries(this.props.theme).map(([name, value]) => ( - - - - - )) - } - -
Name - Value -
-
- - this.importTheme((e.target as HTMLInputElement).files?.[0])}> -
- {this.props.themeNameList && this.props.themeNameList.length > 1 && ( - { - return ( - ({ - id: `select-theme-${themeName}`, - title: themeName, - right: this.props.themeName === themeName ? : undefined, - onClick: () => this.props.onThemeNameChange(themeName) - })) - } /> - ); - }} - > - - - - - )} - this.exportTheme()}> - this.resetTheme()}> -
-
{name} - ) => this.handleValueChange(name, e.target.value) : (e: ChangeEvent) => this.updateValue(name, e.target.value)} /> -
- ); - } -} diff --git a/packages/@o3r/storybook/collection.json b/packages/@o3r/storybook/collection.json deleted file mode 100644 index d47daca3c3..0000000000 --- a/packages/@o3r/storybook/collection.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/angular/angular-cli/main/packages/angular_devkit/schematics/collection-schema.json", - "schematics": { - "ng-add": { - "description": "Add Otter Storybook to the project.", - "factory": "./schematics/ng-add/index#ngAdd", - "schema": "./schematics/ng-add/schema.json", - "aliases": ["install", "i"] - } - } -} diff --git a/packages/@o3r/storybook/component-wrapper/component-wrapper.component.ts b/packages/@o3r/storybook/component-wrapper/component-wrapper.component.ts deleted file mode 100644 index 202f3f8bbd..0000000000 --- a/packages/@o3r/storybook/component-wrapper/component-wrapper.component.ts +++ /dev/null @@ -1,40 +0,0 @@ -/* - * This file contains the component which will wrap otter based components in storybook context - * The file is in typescript as it needs to be built with the storybook application - */ - -import { - ChangeDetectionStrategy, - Component, -} from '@angular/core'; -import { - takeUntilDestroyed, -} from '@angular/core/rxjs-interop'; -import { - Store, -} from '@ngrx/store'; -import { - ConfigurationStore, - upsertConfigurationEntity, -} from '@o3r/configuration'; -import { - ComponentWrapperService, -} from './component-wrapper.service'; - -/** - * Component which wraps the component to be displayed in Storybook - * Used to dispatch an action to update the config store when a config property is changed in Storybook UI - */ -@Component({ - selector: 'o3r-component-wrapper', - template: '', - changeDetection: ChangeDetectionStrategy.OnPush -}) -// eslint-disable-next-line @angular-eslint/component-class-suffix -- legacy code -export class ComponentWrapper { - constructor(store: Store, wrapper: ComponentWrapperService) { - wrapper.configChange$.pipe(takeUntilDestroyed()).subscribe((change) => { - store.dispatch(upsertConfigurationEntity({ id: change.componentId, configuration: change.props })); - }); - } -} diff --git a/packages/@o3r/storybook/component-wrapper/component-wrapper.module.ts b/packages/@o3r/storybook/component-wrapper/component-wrapper.module.ts deleted file mode 100644 index 1eeabb573c..0000000000 --- a/packages/@o3r/storybook/component-wrapper/component-wrapper.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { - NgModule, -} from '@angular/core'; -import { - ConfigurationStoreModule, -} from '@o3r/configuration'; -import { - ComponentWrapper, -} from './component-wrapper.component'; -import { - ComponentWrapperService, - wrapperService, -} from './component-wrapper.service'; - -@NgModule({ - imports: [ConfigurationStoreModule], - declarations: [ComponentWrapper], - exports: [ComponentWrapper], - providers: [{ provide: ComponentWrapperService, useValue: wrapperService }] -}) -export class ComponentWrapperModule {} diff --git a/packages/@o3r/storybook/component-wrapper/component-wrapper.service.ts b/packages/@o3r/storybook/component-wrapper/component-wrapper.service.ts deleted file mode 100644 index cb758e3c75..0000000000 --- a/packages/@o3r/storybook/component-wrapper/component-wrapper.service.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { - Configuration, -} from '@o3r/core'; -import { - Observable, - ReplaySubject, - Subject, -} from 'rxjs'; - -export class ComponentWrapperService { - private readonly configChangeSubject$: Subject<{ componentId: string; props: Configuration }> = new ReplaySubject(1); - - /** - * Stream which emits each time a config property has been changed in storybook UI - */ - public configChange$: Observable<{ componentId: string; props: Configuration }>; - - constructor() { - this.configChange$ = this.configChangeSubject$.asObservable(); - } - - /** - * Trigger a config update for a given component - * @param componentId Id of component to update the config for - * @param props Configuration update object - */ - public changeConfig(componentId: string, props: T) { - this.configChangeSubject$.next({ componentId, props }); - } -} - -/** - * Instance of ComponentWrapperService to be used in stories - */ -export const wrapperService = new ComponentWrapperService(); diff --git a/packages/@o3r/storybook/component-wrapper/index.ts b/packages/@o3r/storybook/component-wrapper/index.ts deleted file mode 100644 index cc6b6e33a4..0000000000 --- a/packages/@o3r/storybook/component-wrapper/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './component-wrapper.component'; -export * from './component-wrapper.module'; -export * from './component-wrapper.service'; diff --git a/packages/@o3r/storybook/eslint.config.mjs b/packages/@o3r/storybook/eslint.config.mjs deleted file mode 100644 index 87abd087fa..0000000000 --- a/packages/@o3r/storybook/eslint.config.mjs +++ /dev/null @@ -1,7 +0,0 @@ -import shared from '../../../eslint.shared.config.mjs'; -import local from './eslint.local.config.mjs'; - -export default [ - ...shared, - ...local -]; diff --git a/packages/@o3r/storybook/eslint.local.config.mjs b/packages/@o3r/storybook/eslint.local.config.mjs deleted file mode 100644 index ff184b40f4..0000000000 --- a/packages/@o3r/storybook/eslint.local.config.mjs +++ /dev/null @@ -1,72 +0,0 @@ -import { - dirname, -} from 'node:path'; -import { - fileURLToPath, -} from 'node:url'; -import globals from 'globals'; - -const __filename = fileURLToPath(import.meta.url); -// __dirname is not defined in ES module scope -const __dirname = dirname(__filename); - -export default [ - { - name: '@o3r/storybook/projects', - languageOptions: { - sourceType: 'module', - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - 'tsconfig.build.json', - 'tsconfig.build.react.json', - 'tsconfig.builders.json', - 'tsconfig.component-wrapper.json', - 'tsconfig.spec.json', - 'tsconfig.eslint.json' - ] - }, - globals: { - ...globals.node, - ...globals.browser - } - } - }, - { - name: '@o3r/storybook/react', - files: [ - '*.{t,j}sx' - ], - parserOptions: { - tsconfigRootDir: __dirname, - project: [ - 'tsconfig.build.react.json', - 'tsconfig.eslint.json' - ], - sourceType: 'module' - } - }, - { - name: '@o3r/storybook/spec/globals', - files: [ - '**/*{.,-}spec.ts' - ], - languageOptions: { - globals: { - ...globals.browser, - ...globals.node, - ...globals.jest, - ...globals.es6, - globalThis: true - }, - sourceType: 'commonjs', - parserOptions: { - tsconfigRootDir: __dirname, - project: ['tsconfig.spec.json'] - } - }, - rules: { - strict: 'off' - } - } -]; diff --git a/packages/@o3r/storybook/jest.config.js b/packages/@o3r/storybook/jest.config.js deleted file mode 100644 index e940e10f49..0000000000 --- a/packages/@o3r/storybook/jest.config.js +++ /dev/null @@ -1,10 +0,0 @@ -const getJestGlobalConfig = require('../../../jest.config.ut').getJestGlobalConfig; - -/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */ -module.exports = { - ...getJestGlobalConfig(__dirname), - projects: [ - '/testing/jest.config.ut.js', - '/testing/jest.config.ut.builders.js' - ] -}; diff --git a/packages/@o3r/storybook/package.json b/packages/@o3r/storybook/package.json deleted file mode 100644 index d1affbfb16..0000000000 --- a/packages/@o3r/storybook/package.json +++ /dev/null @@ -1,150 +0,0 @@ -{ - "name": "@o3r/storybook", - "version": "0.0.0-placeholder", - "publishConfig": { - "access": "public" - }, - "deprecated": "@o3r/storybook package is deprecated and will no longer be updated as of v12", - "description": "The Otter Framework provides several tools for Otter-based projects.", - "keywords": [ - "storybook", - "otter", - "amadeus", - "otter-module" - ], - "scripts": { - "nx": "nx", - "ng": "yarn nx", - "copy:templates": "yarn cpy 'schematics/**/templates/**' dist/schematics", - "prepare:build:builders": "yarn cpy 'collection.json' dist && yarn cpy 'schematics/**/*.json' dist/schematics && yarn copy:templates", - "build": "yarn nx build storybook", - "build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest", - "build:react": "tsc -b tsconfig.build.react.json", - "build:source": "tsc -b tsconfig.build.json && yarn cpy package.json dist", - "build:wrapper": "ngc -p tsconfig.component-wrapper.json", - "prepare:publish": "prepare-publish ./dist" - }, - "exports": { - ".": { - "typings": "./src/public_api.d.ts", - "default": "./src/public_api.js" - }, - "./package.json": { - "default": "./package.json" - }, - "./component-wrapper": { - "typings": "./component-wrapper/index.d.ts", - "default": "./component-wrapper/index.js" - }, - "./addon": { - "typings": "./addon/index.d.ts", - "default": "./addon/index.js" - } - }, - "dependencies": { - "color": "^4.2.3", - "react": "^18.0.0", - "react-dom": "^18.0.0", - "ts-node": "~10.9.2", - "tslib": "^2.6.2" - }, - "peerDependencies": { - "@angular-devkit/core": "^18.2.0", - "@angular-devkit/schematics": "^18.2.0", - "@angular/core": "^18.2.0", - "@ngrx/store": "^18.0.0", - "@o3r/components": "workspace:^", - "@o3r/configuration": "workspace:^", - "@o3r/core": "workspace:^", - "@o3r/localization": "workspace:^", - "@o3r/logger": "workspace:^", - "@o3r/schematics": "workspace:^", - "@o3r/styling": "workspace:^", - "@schematics/angular": "^18.2.0", - "@storybook/addons": "^7.5.3", - "@storybook/angular": "^8.0.0", - "@storybook/api": "^7.5.3", - "@storybook/components": "^8.0.0", - "rxjs": "^7.8.1", - "typescript": "^5.5.4" - }, - "peerDependenciesMeta": { - "@angular-devkit/schematics": { - "optional": true - }, - "@o3r/schematics": { - "optional": true - } - }, - "devDependencies": { - "@angular-devkit/architect": "~0.1802.0", - "@angular-devkit/build-angular": "~18.2.0", - "@angular-devkit/core": "~18.2.0", - "@angular-devkit/schematics": "~18.2.0", - "@angular/animations": "~18.2.0", - "@angular/common": "~18.2.0", - "@angular/compiler": "~18.2.0", - "@angular/compiler-cli": "~18.2.0", - "@angular/core": "~18.2.0", - "@angular/forms": "~18.2.0", - "@angular/platform-browser": "~18.2.0", - "@angular/platform-browser-dynamic": "~18.2.0", - "@babel/core": "~7.26.0", - "@babel/preset-typescript": "~7.26.0", - "@compodoc/compodoc": "^1.1.19", - "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0", - "@ngrx/store": "~18.0.0", - "@nx/eslint-plugin": "~19.8.0", - "@nx/jest": "~19.8.0", - "@o3r/build-helpers": "workspace:^", - "@o3r/components": "workspace:^", - "@o3r/configuration": "workspace:^", - "@o3r/core": "workspace:^", - "@o3r/eslint-config": "workspace:^", - "@o3r/eslint-plugin": "workspace:^", - "@o3r/localization": "workspace:^", - "@o3r/logger": "workspace:^", - "@o3r/schematics": "workspace:^", - "@o3r/styling": "workspace:^", - "@o3r/test-helpers": "workspace:^", - "@schematics/angular": "~18.2.0", - "@storybook/addons": "^7.6.16", - "@storybook/angular": "~8.1.0", - "@storybook/api": "^7.6.16", - "@storybook/components": "~8.1.0", - "@stylistic/eslint-plugin": "~2.7.0", - "@types/color": "^3.0.6", - "@types/jest": "~29.5.2", - "@types/node": "^20.0.0", - "@types/react": "^18.0.0", - "@typescript-eslint/parser": "~8.18.0", - "angular-eslint": "~18.4.0", - "concurrently": "^9.1.0", - "cpy-cli": "^5.0.0", - "eslint": "~9.17.0", - "eslint-import-resolver-node": "^0.3.9", - "eslint-import-resolver-typescript": "^3.6.3", - "eslint-plugin-import": "^2.31.0", - "eslint-plugin-import-newlines": "^1.4.0", - "eslint-plugin-jest": "~28.8.0", - "eslint-plugin-jsdoc": "~50.2.0", - "eslint-plugin-prefer-arrow": "~1.2.3", - "eslint-plugin-unicorn": "^56.0.0", - "eslint-plugin-unused-imports": "^4.1.4", - "globals": "^15.9.0", - "jest": "~29.7.0", - "jest-junit": "~16.0.0", - "jsonc-eslint-parser": "~2.4.0", - "nx": "~19.8.0", - "pid-from-port": "^1.1.3", - "rimraf": "^6.0.1", - "rxjs": "^7.8.1", - "semver": "^7.5.2", - "ts-jest": "~29.2.0", - "ts-node": "~10.9.2", - "typescript": "~5.5.4", - "typescript-eslint": "~8.18.0", - "zone.js": "~0.14.2" - }, - "schematics": "./collection.json" -} diff --git a/packages/@o3r/storybook/project.json b/packages/@o3r/storybook/project.json deleted file mode 100644 index a747480c79..0000000000 --- a/packages/@o3r/storybook/project.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "name": "storybook", - "$schema": "https://raw.githubusercontent.com/nrwl/nx/master/packages/nx/schemas/project-schema.json", - "projectType": "library", - "sourceRoot": "packages/@o3r/storybook/src", - "prefix": "o3r", - "targets": { - "build": { - "executor": "nx:noop", - "dependsOn": ["build-builders", "compile", "build-wrapper", "build-react"] - }, - "prepare-build-builders": { - "executor": "nx:run-script", - "options": { - "script": "prepare:build:builders" - } - }, - "build-builders": { - "executor": "nx:run-script", - "options": { - "script": "build:builders" - } - }, - "compile": { - "executor": "nx:run-script", - "options": { - "script": "build:source" - }, - "dependsOn": ["^build"] - }, - "build-wrapper": { - "executor": "nx:run-script", - "outputs": ["{projectRoot}/dist/component-wrapper"], - "options": { - "script": "build:wrapper" - }, - "dependsOn": ["compile"] - }, - "build-react": { - "executor": "nx:run-script", - "inputs": [ - "{projectRoot}/tsconfig.build.react.json", - "{projectRoot}/addon/**/*.ts", - "!{projectRoot}/addon/**/*.spec.ts", - "source", - "^source" - ], - "outputs": ["{projectRoot}/dist/addon"], - "options": { - "script": "build:react" - }, - "dependsOn": ["compile"] - }, - "lint": { - "executor": "nx:run-commands" - }, - "test": { - "executor": "@nx/jest:jest", - "options": { - "jestConfig": "packages/@o3r/storybook/jest.config.js" - } - }, - "prepare-publish": { - "executor": "nx:run-script", - "options": { - "script": "prepare:publish" - } - }, - "publish": { - "executor": "nx:run-commands", - "options": { - "command": "npm publish packages/@o3r/storybook/dist" - } - }, - "documentation": { - "executor": "nx:run-script", - "options": { - "script": "compodoc" - } - } - }, - "tags": [] -} diff --git a/packages/@o3r/storybook/schematics/ng-add/index.ts b/packages/@o3r/storybook/schematics/ng-add/index.ts deleted file mode 100644 index 551421bc20..0000000000 --- a/packages/@o3r/storybook/schematics/ng-add/index.ts +++ /dev/null @@ -1,60 +0,0 @@ -import * as path from 'node:path'; -import { - chain, - noop, - type Rule, -} from '@angular-devkit/schematics'; -import type { - NgAddSchematicsSchema, -} from './schema'; - -const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json'); - -const reportMissingSchematicsDep = (logger: { error: (message: string) => any }) => (reason: any) => { - logger.error(`[ERROR]: Adding @o3r/storybook has failed. -If the error is related to missing @o3r dependencies you need to install '@o3r/core' to be able to use the storybook package. Please run 'ng add @o3r/core' . -Otherwise, use the error message as guidance.`); - throw reason; -}; - -/** - * Add Otter storybook to an Angular Project - * @param options - */ -function ngAddFn(options: NgAddSchematicsSchema): Rule { - return async (tree) => { - const { applyEsLintFix, getPackageInstallConfig, setupDependencies, getO3rPeerDeps, getProjectNewDependenciesTypes, getWorkspaceConfig, removePackages } = await import('@o3r/schematics'); - const { updateStorybook } = await import('../storybook-base'); - const depsInfo = getO3rPeerDeps(packageJsonPath); - const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined; - const dependencies = depsInfo.o3rPeerDeps.reduce((acc, dep) => { - acc[dep] = { - inManifest: [{ - range: `${options.exactO3rVersion ? '' : '~'}${depsInfo.packageVersion}`, - types: getProjectNewDependenciesTypes(workspaceProject) - }], - ngAddOptions: { exactO3rVersion: options.exactO3rVersion } - }; - return acc; - }, getPackageInstallConfig(packageJsonPath, tree, options.projectName, false, !!options.exactO3rVersion)); - return chain([ - removePackages(['@otter/storybook']), - updateStorybook(options, __dirname), - options.skipLinter ? noop() : applyEsLintFix(), - setupDependencies({ - projectName: options.projectName, - dependencies, - ngAddToRun: depsInfo.o3rPeerDeps - }) - ]); - }; -} - -/** - * Add Otter storybook to an Angular Project - * @param options - */ -export const ngAdd = (options: NgAddSchematicsSchema): Rule => async (_, { logger }) => { - const { createSchematicWithMetricsIfInstalled } = await import('@o3r/schematics').catch(reportMissingSchematicsDep(logger)); - return createSchematicWithMetricsIfInstalled(ngAddFn)(options); -}; diff --git a/packages/@o3r/storybook/schematics/ng-add/schema.json b/packages/@o3r/storybook/schematics/ng-add/schema.json deleted file mode 100644 index c3adfd71a1..0000000000 --- a/packages/@o3r/storybook/schematics/ng-add/schema.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "$schema": "http://json-schema.org/draft-07/schema", - "$id": "ngAddSchematicsSchema", - "title": "Add Otter Storybook", - "description": "ngAdd Otter Storybook", - "properties": { - "projectName": { - "type": "string", - "description": "Project name", - "$default": { - "$source": "projectName" - } - }, - "skipLinter": { - "type": "boolean", - "description": "Skip the linter process", - "default": false - }, - "skipInstall": { - "type": "boolean", - "description": "Skip the install process", - "default": true - }, - "exactO3rVersion": { - "type": "boolean", - "description": "Use a pinned version for otter packages", - "default": false - } - }, - "additionalProperties": true, - "required": [ - ] -} diff --git a/packages/@o3r/storybook/schematics/ng-add/schema.ts b/packages/@o3r/storybook/schematics/ng-add/schema.ts deleted file mode 100644 index c635ea411b..0000000000 --- a/packages/@o3r/storybook/schematics/ng-add/schema.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { - SchematicOptionObject, -} from '@o3r/schematics'; - -export interface NgAddSchematicsSchema extends SchematicOptionObject { - /** Project name */ - projectName?: string | undefined; - /** Skip the linter process */ - skipLinter: boolean; - /** Skip the install process */ - skipInstall: boolean; - /** Use a pinned version for otter packages */ - exactO3rVersion?: boolean; -} diff --git a/packages/@o3r/storybook/schematics/storybook-base/index.ts b/packages/@o3r/storybook/schematics/storybook-base/index.ts deleted file mode 100644 index 604929f081..0000000000 --- a/packages/@o3r/storybook/schematics/storybook-base/index.ts +++ /dev/null @@ -1,194 +0,0 @@ -import { - readFileSync, -} from 'node:fs'; -import * as path from 'node:path'; -import { - strings, -} from '@angular-devkit/core'; -import { - apply, - MergeStrategy, - mergeWith, - renameTemplateFiles, - Rule, - SchematicContext, - template, - Tree, - url, -} from '@angular-devkit/schematics'; -import { - getPackageManagerRunner, - getTemplateFolder, - getWorkspaceConfig, -} from '@o3r/schematics'; -import { - addPackageJsonDependency, - getPackageJsonDependency, - NodeDependencyType, -} from '@schematics/angular/utility/dependencies'; -import * as ts from 'typescript'; - -/** - * Add Storybook to Otter application - * @param options @see RuleFactory.options - * @param options.projectName - * @param rootPath @see RuleFactory.rootPath - */ -export function updateStorybook(options: { projectName?: string | null | undefined }, rootPath: string): Rule { - return (tree: Tree, context: SchematicContext) => { - const workspaceProject = options.projectName ? getWorkspaceConfig(tree)?.projects[options.projectName] : undefined; - if (!workspaceProject) { - context.logger.warn('No project found, the update of storybook will be skipped'); - return tree; - } - const isLibrary = workspaceProject.projectType === 'library'; - - // update gitignore - if (tree.exists('/.gitignore')) { - let gitignoreContent = tree.read('/.gitignore')!.toString(); - if (!gitignoreContent.includes('/storybook-static')) { - gitignoreContent - += ` - -# Storybook -/.storybook/style.metadata.json -/documentation.json -/storybook-static -`; - tree.overwrite('/.gitignore', gitignoreContent); - } - } - - // update tsconfig - if (tree.exists('/tsconfig.json')) { - const tsconfig = ts.parseConfigFileTextToJson('/tsconfig.json', tree.readText('/tsconfig.json')).config; - if (!tsconfig.compilerOptions.lib.includes('scripthost')) { - tsconfig.compilerOptions.lib = [...tsconfig.compilerOptions.lib, 'scripthost']; - tree.overwrite('/tsconfig.json', JSON.stringify(tsconfig, null, 2)); - } - } - - let localizationMetadata = '../localisation.metadata.json'; - let configMetadata = '../component.config.metadata.json'; - let styleMetadata = '../style.metadata.json'; - - // update angular.json - const workspace = getWorkspaceConfig(tree); - if (!workspace) { - context.logger.error('No workspace found, the storybook project will not be updated'); - return tree; - } - if (!workspace.projects.storybook) { - workspace.projects.storybook = { - projectType: 'application', - root: '.storybook', - sourceRoot: '.storybook', - prefix: '', - architect: { - build: { - builder: '@angular-devkit/build-angular:browser', - options: { - tsConfig: 'tsconfig.json', - assets: [ - { - glob: '**/*', - input: 'node_modules/@o3r/styling/assets', - output: '/assets' - } - ] - } - }, - 'extract-style': { - builder: '@o3r/styling:extractor', - options: { - filePatterns: [ - '.storybook/styles/**/*.scss' - ], - outputFile: styleMetadata - } - } - } - }; - tree.overwrite('/angular.json', JSON.stringify(workspace, null, 2)); - } - - // register scripts - if (tree.exists('/package.json')) { - const packageJson = JSON.parse(tree.read('/package.json')!.toString()); - const packageManagerRunner = getPackageManagerRunner(); - packageJson.scripts = packageJson.scripts || {}; - const compodoc = packageJson.scripts['doc:generate'] ? 'doc:generate' : 'compodoc'; - packageJson.scripts['doc:json'] = packageJson.scripts['doc:json'] || `${packageManagerRunner} ${compodoc} -e json -d .`; - packageJson.scripts.storybook = packageJson.scripts.storybook - || `${packageManagerRunner} doc:json && ${packageManagerRunner} cms-adapters:metadata${isLibrary ? ' && ng run storybook:extract-style' : ''} && start-storybook -p 6006`; - packageJson.scripts['build:storybook'] = packageJson.scripts['build:storybook'] - || `${packageManagerRunner} doc:json && ${packageManagerRunner} cms-adapters:metadata${isLibrary ? ' && ng run storybook:extract-style' : ''} && build-storybook`; - tree.overwrite('/package.json', JSON.stringify(packageJson, null, 2)); - } - - if (!getPackageJsonDependency(tree, '@storybook/angular', '/package.json')) { - // add dependencies - const storybookVersion = JSON.parse(readFileSync(path.resolve(__dirname, '..', '..', 'package.json')).toString()).peerDependencies['@storybook/components']; - const currentPackageJson = JSON.parse(tree.read('/package.json')!.toString()); - const angularVersion = currentPackageJson.devDependencies['@angular/cli']; - const sassLoaderVerion = currentPackageJson.devDependencies['sass-loader']; - const babelLoaderVerion = currentPackageJson.devDependencies['babel-loader']; - const storybookPresetSCSSVersion = currentPackageJson.devDependencies['@storybook/preset-scss']; - addPackageJsonDependency(tree, { name: '@angular/localize', version: angularVersion, type: NodeDependencyType.Dev, overwrite: true }); - addPackageJsonDependency(tree, { name: '@compodoc/compodoc', version: '^1.1.11', type: NodeDependencyType.Dev, overwrite: true }); - addPackageJsonDependency(tree, { name: '@storybook/addon-actions', version: storybookVersion, type: NodeDependencyType.Dev, overwrite: false }); - addPackageJsonDependency(tree, { name: '@storybook/addon-docs', version: storybookVersion, type: NodeDependencyType.Dev, overwrite: false }); - addPackageJsonDependency(tree, { name: '@storybook/addon-essentials', version: storybookVersion, type: NodeDependencyType.Dev, overwrite: false }); - addPackageJsonDependency(tree, { name: '@storybook/addon-links', version: storybookVersion, type: NodeDependencyType.Dev, overwrite: false }); - addPackageJsonDependency(tree, { name: '@storybook/addons', version: storybookVersion, type: NodeDependencyType.Dev, overwrite: false }); - addPackageJsonDependency(tree, { name: '@storybook/angular', version: storybookVersion, type: NodeDependencyType.Dev, overwrite: false }); - addPackageJsonDependency(tree, { name: '@storybook/cli', version: storybookVersion, type: NodeDependencyType.Dev, overwrite: false }); - addPackageJsonDependency(tree, { name: '@storybook/builder-webpack5', version: storybookVersion, type: NodeDependencyType.Dev, overwrite: false }); - addPackageJsonDependency(tree, { name: '@storybook/manager-webpack5', version: storybookVersion, type: NodeDependencyType.Dev, overwrite: false }); - addPackageJsonDependency(tree, { name: '@storybook/preset-scss', version: storybookPresetSCSSVersion, type: NodeDependencyType.Dev, overwrite: false }); - addPackageJsonDependency(tree, { name: 'babel-loader', version: babelLoaderVerion, type: NodeDependencyType.Dev, overwrite: false }); - addPackageJsonDependency(tree, { name: 'sass-loader', version: sassLoaderVerion, type: NodeDependencyType.Dev, overwrite: false }); - } - - if (!tree.exists('.storybook/main.js')) { - // Generate files - Object.values(workspace.projects) - .forEach((project) => { - if (project.architect) { - Object.values(project.architect) - .forEach((build) => { - switch (build.builder as string) { - case '@o3r/localization:extractor': { - localizationMetadata = (build.options?.outputFile && `../${build.options?.outputFile as string}`) || localizationMetadata; - break; - } - case '@o3r/components:extractor': { - configMetadata = (build.options?.configOutputFile && `../${build.options?.configOutputFile as string}`) || configMetadata; - break; - } - case '@o3r/styling:extractor': { - styleMetadata = (!workspace.projects.storybook && build.options?.outputFile && `../${build.options?.outputFile as string}`) || styleMetadata; - break; - } - } - }); - } - }); - const templateSource = apply(url(getTemplateFolder(rootPath, __dirname)), [ - template({ - ...strings, - localizationMetadata, - configMetadata, - styleMetadata, - isLibrary, - dot: '.' - }), - renameTemplateFiles() - ]); - - const rule = mergeWith(templateSource, MergeStrategy.AllowCreationConflict); - return rule(tree, context); - } - return tree; - }; -} diff --git a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__compodocrc.json b/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__compodocrc.json deleted file mode 100644 index a4754cff00..0000000000 --- a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__compodocrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "$schema": "./node_modules/@compodoc/compodoc/src/config/schema.json", - "name": "Otter Demo App", - "output": "./generated-doc", - "tsconfig": "./tsconfig.doc.json", - "theme": "material", - "maxSearchResults": 0, - "disableLifeCycleHooks": true, - "disablePrivate": true, - "disableProtected": true, - "disableInternal": true, - "disableCoverage": true, - "hideGenerator": true -} diff --git a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/main.js b/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/main.js deleted file mode 100644 index c6b43bd7e6..0000000000 --- a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/main.js +++ /dev/null @@ -1,17 +0,0 @@ -const path = require('path'); - -module.exports = { - 'stories': [ - // TODO: change to be more restrictive according to the project - '../**/src/**/*.stories.ts' - ], - addons: [ - '@storybook/addon-links', - '@storybook/addon-essentials', - '@storybook/preset-scss', - '@o3r/storybook' - ], - core: { - 'builder': 'webpack5' - } -}; diff --git a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/preview.js.template b/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/preview.js.template deleted file mode 100644 index e44bc7c6a9..0000000000 --- a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/preview.js.template +++ /dev/null @@ -1,57 +0,0 @@ -import { getThemeVariables, setStyleMetadata, setConfigurationMetadata, setLocalizationMetadata } from '@o3r/storybook'; -import { setCompodocJson } from '@storybook/addon-docs/angular'; - -import '@angular/localize/init'; - -// Default Otter theme, should be replace by application theme SCSS file in case of application -import globalStyle from './styles/index.scss'; - -import docJson from '../documentation.json'; - -<% if (isLibrary) {%>import StyleThemeMetadata from './style.metadata.json';<% } %> -import StyleMetadata from '<%= styleMetadata %>'; -import ConfigMetadata from '<%= configMetadata %>'; -import LocalizationMetadata from '<%= localizationMetadata %>'; - -setCompodocJson(docJson); -<% if (isLibrary) { %> setStyleMetadata({ ...StyleThemeMetadata, ...StyleMetadata });<% } else { %> -setStyleMetadata(StyleMetadata);<% } %> -setConfigurationMetadata(ConfigMetadata); -setLocalizationMetadata(LocalizationMetadata); - -export const parameters = { - actions: { argTypesRegex: '^on[A-Z].*' }, - themes: { - default: getThemeVariables() - } -} - -export const decorators = [ - (story) => { - - // add material typography class - if (!document.body.classList.contains("mat-typography")) { - document.body.classList.add("mat-typography"); - } - - // add material icons - if (!document.querySelector('#material-icons-link')) { - const link = document.createElement('link'); - link.setAttribute('id', 'material-icons-link') - link.setAttribute('href', "https://fonts.googleapis.com/icon?family=Material+Icons"); - link.setAttribute('rel', "stylesheet"); - document.head.append(link); - } - - // add global theme - if (!document.querySelector('#o3r-global-theme')) { - const styleMarkup = document.createElement('style'); - styleMarkup.setAttribute('id', 'o3r-global-theme'); - styleMarkup.setAttribute('type', 'text/css'); - styleMarkup.textContent = globalStyle; - document.head.append(styleMarkup); - } - - return story(); - } -]; diff --git a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/styles/_styling.scss b/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/styles/_styling.scss deleted file mode 100644 index f1509789f4..0000000000 --- a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/styles/_styling.scss +++ /dev/null @@ -1,14 +0,0 @@ -@use '@angular/material' as mat; -@use '@o3r/styling/otter-theme' as otter-theme; - -// Generate Material Design Theme -$meta-theme: otter-theme.generate-otter-theme() !default; - -// Convert Meta theme to Otter -$theme: otter-theme.meta-theme-to-otter($meta-theme) !default; - -// Convert Meta theme to Material Design Theme -$mat-theme: otter-theme.meta-theme-to-material($meta-theme) !default; - -// Typography for material theming -$typography: mat.define-typography-config() !default; diff --git a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/styles/index.scss b/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/styles/index.scss deleted file mode 100644 index bfc03c2cb6..0000000000 --- a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/styles/index.scss +++ /dev/null @@ -1,18 +0,0 @@ -// Angular Material Import -@use '@angular/material' as mat; -@use '@angular/cdk'; -@use '@o3r/styling' as o3r; -@use '@o3r/styling/otter-theme' as otter-theme; - -// Import the application styling -@import './styling'; - -// The theme to apply to the whole application -@include o3r.apply-theme(otter-theme.$default-theme); - -// See https://material.angular.io/guide/theming for details -@include mat.core($typography); -@include mat.all-component-typographies($typography); -@include mat.all-component-themes($mat-theme); - -@include cdk.text-field-autofill(); diff --git a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/tsconfig.json b/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/tsconfig.json deleted file mode 100644 index c66abbfa4e..0000000000 --- a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../tsconfig", - "compilerOptions": { - "types": [ - "node" - ], - "allowSyntheticDefaultImports": true - }, - "exclude": [ - "../**/fixture/**/*.ts", - "../**/testing/**/*.ts", - "../**/src/**/*.spec.ts", - "../**/src/**/*.int-spec.ts", - "../**/node_modules/" - ], - "include": [ - "../**/src/**/*" - ], - "files": [ - "./typings.d.ts" - ] -} diff --git a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/typings.d.ts b/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/typings.d.ts deleted file mode 100644 index f73d61b396..0000000000 --- a/packages/@o3r/storybook/schematics/storybook-base/templates/__dot__storybook/typings.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module '*.md' { - const content: string; - export default content; -} diff --git a/packages/@o3r/storybook/schematics/storybook-base/templates/tsconfig.doc.json b/packages/@o3r/storybook/schematics/storybook-base/templates/tsconfig.doc.json deleted file mode 100644 index 189c85f1e7..0000000000 --- a/packages/@o3r/storybook/schematics/storybook-base/templates/tsconfig.doc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "./tsconfig", - "include": [ - "src/components/**/*.ts" - ] -} diff --git a/packages/@o3r/storybook/src/configuration/configuration-configs.interface.ts b/packages/@o3r/storybook/src/configuration/configuration-configs.interface.ts deleted file mode 100644 index c75f6b06d6..0000000000 --- a/packages/@o3r/storybook/src/configuration/configuration-configs.interface.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { - StorybookStoryConfiguration, -} from '../types'; - -/** Configuration argument name prefix */ -export const CONFIGURATION_PREFIX = 'config-'; - -/** Configuration of Storybook stories */ -export interface ConfigurationConfigs extends StorybookStoryConfiguration { -} diff --git a/packages/@o3r/storybook/src/configuration/configuration.helpers.ts b/packages/@o3r/storybook/src/configuration/configuration.helpers.ts deleted file mode 100644 index ba6383dc8b..0000000000 --- a/packages/@o3r/storybook/src/configuration/configuration.helpers.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { - ComponentConfigOutput, -} from '@o3r/components'; -import { - CONFIGURATION_PREFIX, - ConfigurationConfigs, -} from './configuration-configs.interface'; -import { - getConfigurationMetadata, -} from './metadata-manager'; - -/** - * Extract storybook argument type base for component configuration - * @param library Name of the library - * @param componentName Name of the storybook component - * @param metadata Configuration Metadata - */ -export function extractConfiguration(library: string, componentName: string, metadata: ComponentConfigOutput[] = getConfigurationMetadata()): ConfigurationConfigs { - const component = metadata.find((data) => data.name === componentName && data.library === library); - if (!component) { - return { argTypes: {} }; - } - - return component.properties.reduce((acc, config) => { - const control: any = {}; - let value: any; - switch (config.type) { - case 'boolean': { - control.type = config.type; - value = config.value === 'true'; - break; - } - case 'number': { - control.type = config.type; - value = +config.value!; - break; - } - case 'string': { - control.type = 'text'; - value = config.value; - break; - } - case 'enum': { - control.type = 'select'; - control.options = config.choices; - value = config.value; - break; - } - case 'string[]': { - control.type = 'array'; - value = config.values; - break; - } - case 'element[]': - case 'unknown': { - control.type = 'object'; - value = config.values; - break; - } - case 'unknown[]': { - control.type = 'array'; - value = config.values; - break; - } - default: { - throw new Error(`Not supported type ${config.type} of ${config.name}`); - } - } - acc.argTypes[`${CONFIGURATION_PREFIX}${config.name}`] = { - name: `Config: ${config.label || config.name}`, - description: config.description, - defaultValue: value, - table: { - defaultValue: { - summary: value - } - }, - control - }; - return acc; - }, { argTypes: {} }); -} - -const regexp = new RegExp(`^${CONFIGURATION_PREFIX}`); - -/** - * Retrieve config fields from properties received from storybook UI - * @param props - * @returns A map of config fields and their values - */ -export function retrieveConfigFromProps(props: any) { - return Object.keys(props).filter((prop) => prop.match(regexp)).reduce>((acc, configKey) => { - acc[configKey.replace(regexp, '')] = props[configKey]; - return acc; - }, {}); -} diff --git a/packages/@o3r/storybook/src/configuration/configuration.spec.ts b/packages/@o3r/storybook/src/configuration/configuration.spec.ts deleted file mode 100644 index 766a57456e..0000000000 --- a/packages/@o3r/storybook/src/configuration/configuration.spec.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { - CONFIGURATION_PREFIX, -} from './configuration-configs.interface'; -import { - extractConfiguration, - retrieveConfigFromProps, -} from './configuration.helpers'; -import { - getConfigurationMetadata, - setConfigurationMetadata, -} from './metadata-manager'; - -describe('Configuration Metadata setup', () => { - beforeEach(() => { - if (typeof window === 'undefined') { - globalThis.window = {} as any; - } - delete window.__OTTER_STORYBOOK_CONFIGURATION_METADATA__; - }); - - it('should register the metadata', () => { - const mockMetadata = { test: 'fakeValue' } as any; - setConfigurationMetadata(mockMetadata); - - expect(window.__OTTER_STORYBOOK_CONFIGURATION_METADATA__).toBe(mockMetadata); - }); - - it('should retrieve the metadata', () => { - const mockMetadata = { test: 'fakeValue' } as any; - - window.__OTTER_STORYBOOK_CONFIGURATION_METADATA__ = mockMetadata; - - expect(getConfigurationMetadata()).toBe(mockMetadata); - }); -}); - -describe('Configuration helper', () => { - describe('extractConfiguration', () => { - it('should extract description from metadata', () => { - const result = extractConfiguration('@otter/test', 'testComponent', [ - { - library: '@otter/test', - name: 'testComponent', - properties: [ - { - type: 'string', - description: 'test prop', - name: 'testProp', - label: 'test prop', - value: 'test' - } - ], - path: '', - type: 'BLOCK' - }, - { - library: '@otter/test', - name: 'testComponent2', - properties: [ - { - type: 'boolean', - description: 'test prop', - name: 'testProp', - label: 'test prop' - } - ], - path: '', - type: 'BLOCK' - } - ]); - - expect(Object.keys(result.argTypes).length).toBe(1); - expect(result.argTypes[`${CONFIGURATION_PREFIX}testProp`]).toBeDefined(); - expect(result.argTypes[`${CONFIGURATION_PREFIX}testProp`].defaultValue).toBe('test'); - }); - }); - - describe('retrieveConfigFromProps', () => { - it('should extract only config properties', () => { - const props = { - 'cssvar-simple-header-pres-background-color': 'rgba(0, 66, 160, 1)', - 'cssvar-simple-header-pres-language-color': 'rgba(255, 255, 255, 1)', - 'cssvar-simple-header-pres-color': 'rgba(255, 255, 255, 1)', - 'config-showMotto': false, - 'config-showLanguageSelector': true, - 'localization-motto': 'o3r-simple-header-pres.motto', - 'localization-airline': 'o3r-simple-header-pres.airline', - 'localization-logoAltText': 'o3r-simple-header-pres.logoAltText', - 'localization-themedark': 'o3r-simple-header-pres.dynamicTheme.dark', - 'localization-themeblue': 'o3r-simple-header-pres.dynamicTheme.blue', - 'localization-themeyellow': 'o3r-simple-header-pres.dynamicTheme.yellow', - 'localization-languageEn': 'o3r-simple-header-pres.language.en', - 'localization-languageFr': 'o3r-simple-header-pres.language.fr', - 'localization-languageAr': 'o3r-simple-header-pres.language.ar' - }; - const result = retrieveConfigFromProps(props); - const configFieldName1 = 'showMotto'; - - expect(Object.keys(result).length).toBe(2); - expect(result[configFieldName1]).toBe(false); - }); - - it('should return empty object if no config property found', () => { - const props = { - 'cssvar-simple-header-pres-background-color': 'rgba(0, 66, 160, 1)', - 'cssvar-simple-header-pres-language-color': 'rgba(255, 255, 255, 1)', - 'cssvar-simple-header-pres-color': 'rgba(255, 255, 255, 1)', - 'localization-motto': 'o3r-simple-header-pres.motto', - 'localization-airline': 'o3r-simple-header-pres.airline', - 'localization-logoAltText': 'o3r-simple-header-pres.logoAltText', - 'localization-themedark': 'o3r-simple-header-pres.dynamicTheme.dark', - 'localization-themeblue': 'o3r-simple-header-pres.dynamicTheme.blue', - 'localization-themeyellow': 'o3r-simple-header-pres.dynamicTheme.yellow', - 'localization-languageEn': 'o3r-simple-header-pres.language.en', - 'localization-languageFr': 'o3r-simple-header-pres.language.fr', - 'localization-languageAr': 'o3r-simple-header-pres.language.ar' - }; - const result = retrieveConfigFromProps(props); - const configFieldName1 = 'showMotto'; - - expect(Object.keys(result).length).toBe(0); - expect(result[configFieldName1]).not.toBeDefined(); - }); - }); -}); diff --git a/packages/@o3r/storybook/src/configuration/index.ts b/packages/@o3r/storybook/src/configuration/index.ts deleted file mode 100644 index 05465f05f5..0000000000 --- a/packages/@o3r/storybook/src/configuration/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './configuration-configs.interface'; -export * from './configuration.helpers'; -export * from './metadata-manager'; diff --git a/packages/@o3r/storybook/src/configuration/metadata-manager.ts b/packages/@o3r/storybook/src/configuration/metadata-manager.ts deleted file mode 100644 index 06e15e0e8d..0000000000 --- a/packages/@o3r/storybook/src/configuration/metadata-manager.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { - ComponentConfigOutput, -} from '@o3r/components'; - -declare global { - interface Window { - /** Otter Configuration metadata */ - // eslint-disable-next-line @typescript-eslint/naming-convention -- custom variable exposed on window - __OTTER_STORYBOOK_CONFIGURATION_METADATA__?: ComponentConfigOutput[]; - } -} - -/** - * Set Configuration Metadata - * @param metadata Configuration Metadata - */ -export function setConfigurationMetadata(metadata: ComponentConfigOutput[]) { - window.__OTTER_STORYBOOK_CONFIGURATION_METADATA__ = metadata; -} - -/** - * Get Configuration Metadata - */ -export function getConfigurationMetadata(): ComponentConfigOutput[] { - const metadata = window.__OTTER_STORYBOOK_CONFIGURATION_METADATA__; - if (!metadata) { - throw new Error('No Configuration metadata registered'); - } - return metadata; -} diff --git a/packages/@o3r/storybook/src/localization/index.ts b/packages/@o3r/storybook/src/localization/index.ts deleted file mode 100644 index 095cbb3873..0000000000 --- a/packages/@o3r/storybook/src/localization/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './localization-configs.interface'; -export * from './localization.helpers'; -export * from './metadata-manager'; diff --git a/packages/@o3r/storybook/src/localization/localization-configs.interface.ts b/packages/@o3r/storybook/src/localization/localization-configs.interface.ts deleted file mode 100644 index dfad14fb66..0000000000 --- a/packages/@o3r/storybook/src/localization/localization-configs.interface.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { - StorybookStoryConfiguration, -} from '../types'; - -/** Localization argument name prefix */ -export const LOCALIZATION_PREFIX = 'localization-'; - -/** Localization configuration of Storybook stories */ -export interface LocalizationConfigs extends StorybookStoryConfiguration { -} diff --git a/packages/@o3r/storybook/src/localization/localization.helpers.ts b/packages/@o3r/storybook/src/localization/localization.helpers.ts deleted file mode 100644 index ed792ab788..0000000000 --- a/packages/@o3r/storybook/src/localization/localization.helpers.ts +++ /dev/null @@ -1,94 +0,0 @@ -import type { - LocalizationMetadata, -} from '@o3r/localization'; -import { - LOCALIZATION_PREFIX, - LocalizationConfigs, -} from './localization-configs.interface'; -import { - getLocalizationMetadata, -} from './metadata-manager'; - -/** - * Get storybook Localization configuration from metadata - * @param translations Localization map - * @param metadata Localization Metadata - */ -export function extractLocalization(translations: Record, metadata: LocalizationMetadata = getLocalizationMetadata()): LocalizationConfigs { - return Object.entries(translations).reduce((acc, [localKey, defaultKey]) => { - const data = metadata.find((loc) => loc.key === defaultKey); - acc.argTypes[`${LOCALIZATION_PREFIX}${localKey}`] = { - name: `Localization: ${localKey}`, - description: data?.description, - defaultValue: defaultKey, - table: { - defaultValue: { - summary: defaultKey - } - }, - control: 'text' - }; - return acc; - }, { argTypes: {} }); -} - -/** - * Retrieve final value from reference - * @param metadata Localization Metadata - * @param memory discovered references - * @param ref metadata reference - */ -function discoverRef(metadata: LocalizationMetadata, memory: Record, ref: string): string { - if (memory[ref]) { - return memory[ref]; - } - - const loc = metadata.find((data) => data.key === ref); - if (!loc) { - return ref; - } - - if (loc.value) { - memory[loc.key] = loc.value; - return loc.value; - } else if (loc.ref) { - const finalValue = discoverRef(metadata, memory, loc.ref); - memory[loc.key] = finalValue; - return finalValue; - } - - return loc.key; -} - -/** - * Get localization map from metatada - * @param metadata Localization Metadata - */ -export function getLocalizations(metadata: LocalizationMetadata = getLocalizationMetadata()): Record { - return metadata.reduce>((acc, loc) => { - if (acc[loc.key]) { - return acc; - } - - if (loc.value) { - acc[loc.key] = loc.value; - } else if (loc.ref) { - acc[loc.key] = discoverRef(metadata, acc, loc.ref); - } - return acc; - }, {}); -} - -/** - * Apply component localization to the loaded component - * @param localization Localization map - * @param props Properties set to storybook control - */ -export function applyLocalization>(localization: LocalizationConfigs, props: any): T { - const regexp = new RegExp(`^${LOCALIZATION_PREFIX}`); - return Object.keys(localization.argTypes) - .reduce((acc, localKey) => { - acc[localKey.replace(regexp, '') as keyof T] = props[localKey]; - return acc; - }, {} as T); -} diff --git a/packages/@o3r/storybook/src/localization/localization.spec.ts b/packages/@o3r/storybook/src/localization/localization.spec.ts deleted file mode 100644 index 0f784297de..0000000000 --- a/packages/@o3r/storybook/src/localization/localization.spec.ts +++ /dev/null @@ -1,84 +0,0 @@ -import { - LOCALIZATION_PREFIX, -} from './localization-configs.interface'; -import { - extractLocalization, - getLocalizations, -} from './localization.helpers'; -import { - getLocalizationMetadata, - setLocalizationMetadata, -} from './metadata-manager'; - -describe('Localization Metadata setup', () => { - beforeEach(() => { - if (typeof window === 'undefined') { - globalThis.window = {} as any; - } - delete window.__OTTER_STORYBOOK_LOCALIZATION_METADATA__; - }); - - it('should register the metadata', () => { - const mockMetadata = { test: 'fakeValue' } as any; - setLocalizationMetadata(mockMetadata); - - expect(window.__OTTER_STORYBOOK_LOCALIZATION_METADATA__).toBe(mockMetadata); - }); - - it('should retrieve the metadata', () => { - const mockMetadata = { test: 'fakeValue' } as any; - window.__OTTER_STORYBOOK_LOCALIZATION_METADATA__ = mockMetadata; - - expect(getLocalizationMetadata()).toBe(mockMetadata); - }); -}); - -describe('Localization helper', () => { - describe('extractLocalization', () => { - it('should extract description from metadata', () => { - const result = extractLocalization({ localKeyTest: 'keyTest' }, [ - { - key: 'keyTest', - description: 'ok description', - dictionary: false, - referenceData: false - }, - { - key: 'keyTest-2', - description: 'nok description', - dictionary: false, - referenceData: false - } - ]); - - expect(Object.keys(result.argTypes).length).toBe(1); - expect(result.argTypes[`${LOCALIZATION_PREFIX}localKeyTest`]).toBeDefined(); - expect(result.argTypes[`${LOCALIZATION_PREFIX}localKeyTest`].description).toBe('ok description'); - }); - }); - - describe('getLocalizations', () => { - it('should extract key/value from metadata', () => { - const result = getLocalizations([ - { - key: 'test', - value: 'test value 1', - description: 'ok description', - dictionary: false, - referenceData: false - }, - { - key: 'test-2', - description: 'other description', - value: 'test value 2', - dictionary: false, - referenceData: false - } - ]); - - expect(Object.keys(result).length).toBe(2); - expect(result.test).toBeDefined(); - expect(result.test).toBe('test value 1'); - }); - }); -}); diff --git a/packages/@o3r/storybook/src/localization/metadata-manager.ts b/packages/@o3r/storybook/src/localization/metadata-manager.ts deleted file mode 100644 index 86f64dabfc..0000000000 --- a/packages/@o3r/storybook/src/localization/metadata-manager.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { - LocalizationMetadata, -} from '@o3r/localization'; - -declare global { - interface Window { - /** Otter Localization metadata */ - // eslint-disable-next-line @typescript-eslint/naming-convention -- custom variable exposed on window - __OTTER_STORYBOOK_LOCALIZATION_METADATA__?: LocalizationMetadata; - } -} - -/** - * Set Localization Metadata - * @param metadata Localization Metadata - */ -export function setLocalizationMetadata(metadata: LocalizationMetadata) { - window.__OTTER_STORYBOOK_LOCALIZATION_METADATA__ = metadata; -} - -/** - * Get Localization Metadata - */ -export function getLocalizationMetadata(): LocalizationMetadata { - const metadata = window.__OTTER_STORYBOOK_LOCALIZATION_METADATA__; - if (!metadata) { - throw new Error('No Localization metadata registered'); - } - return metadata; -} diff --git a/packages/@o3r/storybook/src/public_api.ts b/packages/@o3r/storybook/src/public_api.ts deleted file mode 100644 index b05e9d01cb..0000000000 --- a/packages/@o3r/storybook/src/public_api.ts +++ /dev/null @@ -1,4 +0,0 @@ -export * from './configuration/index'; -export * from './localization/index'; -export * from './styling/index'; -export * from './types'; diff --git a/packages/@o3r/storybook/src/styling/index.ts b/packages/@o3r/storybook/src/styling/index.ts deleted file mode 100644 index 7b8d7e3567..0000000000 --- a/packages/@o3r/storybook/src/styling/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './metadata-manager'; -export * from './style-configs.interface'; -export * from './styling.helpers'; diff --git a/packages/@o3r/storybook/src/styling/metadata-manager.ts b/packages/@o3r/storybook/src/styling/metadata-manager.ts deleted file mode 100644 index ffd9283aff..0000000000 --- a/packages/@o3r/storybook/src/styling/metadata-manager.ts +++ /dev/null @@ -1,30 +0,0 @@ -import type { - CssMetadata, -} from '@o3r/styling'; - -declare global { - interface Window { - /** Otter Style metadata */ - // eslint-disable-next-line @typescript-eslint/naming-convention -- custom variable exposed on window - __OTTER_STORYBOOK_STYLE_METADATA__?: CssMetadata; - } -} - -/** - * Set Style Metadata - * @param metadata CSS Style Metadata - */ -export function setStyleMetadata(metadata: CssMetadata) { - window.__OTTER_STORYBOOK_STYLE_METADATA__ = metadata; -} - -/** - * Get Style Metadata - */ -export function getStyleMetadata(): CssMetadata { - const metadata = window.__OTTER_STORYBOOK_STYLE_METADATA__; - if (!metadata) { - throw new Error('No Styling metadata registered'); - } - return metadata; -} diff --git a/packages/@o3r/storybook/src/styling/style-configs.interface.ts b/packages/@o3r/storybook/src/styling/style-configs.interface.ts deleted file mode 100644 index 40ae05e890..0000000000 --- a/packages/@o3r/storybook/src/styling/style-configs.interface.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { - StorybookStoryConfiguration, -} from '../types'; - -/** Style argument name prefix */ -export const STYLING_PREFIX = 'cssvar-'; - -/** Style configuration of Storybook stories */ -export interface StyleConfigs extends StorybookStoryConfiguration { - /** Raw values as defined in metadata */ - rawValues: Record; -} diff --git a/packages/@o3r/storybook/src/styling/styling.helpers.ts b/packages/@o3r/storybook/src/styling/styling.helpers.ts deleted file mode 100644 index 82f1d8c093..0000000000 --- a/packages/@o3r/storybook/src/styling/styling.helpers.ts +++ /dev/null @@ -1,149 +0,0 @@ -import type { - CssMetadata, - CssVariable, -} from '@o3r/styling'; -import { - getStyleMetadata, -} from './metadata-manager'; -import { - StyleConfigs, - STYLING_PREFIX, -} from './style-configs.interface'; - -/** RegExp to check if the value is a color*/ -const colorRegExp = /^(#[\dA-Fa-f]{3,8}|rgba?\([^)]+\))\s*;?$/; - -/** - * Inject CSS variable into the DOM - * @param variableName Variable name - * @param value Value of the CSS variable - * @param styleElementId ID of the HTML Style element where to inject the css variable - */ -export function setCssVariable(variableName: string, value: string, styleElementId = 'storybook-css-variable-injection') { - const styleElement = document.querySelector(`#${styleElementId}`); - if (styleElement) { - const content = styleElement.innerHTML; - const regExpVariable = new RegExp(`${variableName}\\s*:\\s*[^;]*;`); - if (regExpVariable.test(content)) { - styleElement.innerHTML = content.replace(regExpVariable, `${variableName}: ${value};`); - } else { - const index = content.indexOf('{') + 1; - styleElement.innerHTML = content.slice(0, index) + `\n${variableName}: ${value};` + content.slice(index); - } - } else { - const newStyleElement = document.createElement('style'); - newStyleElement.id = styleElementId; - newStyleElement.innerHTML = ` -:root { - ${variableName}: ${value}; -}`; - document.head.append(newStyleElement); - } -} - -/** - * Get Argument type based on CSS variable type - * @param data CSS Variable - * @param metadata CSS Style Metadata - * @param mem - */ -export function getTypeAndValue(data: CssVariable, metadata: CssMetadata, mem: string[] = []): { type: 'text' | 'color'; value: string; referTo?: string } { - if (colorRegExp.test(data.defaultValue)) { - return { - type: 'color', - value: data.defaultValue - }; - } - if (data.references && data.references.length === 1 && /^var *\(.*\)$/.test(data.defaultValue)) { - const referTo = data.references[0].name; - if (metadata.variables[referTo]) { - const isCircular = mem.includes(referTo); - mem.push(referTo); - if (isCircular) { - // eslint-disable-next-line no-console -- no other logger available - console.error(`CSS Variable circular reference: ${mem.join('->')}. "${mem[0]}" variable will be fallback to string type input.`); - return { - type: 'text', - value: data.defaultValue, - referTo - }; - } else { - return { - ...getTypeAndValue(metadata.variables[referTo], metadata, mem), - referTo - }; - } - } - if (colorRegExp.test(data.references[0].defaultValue)) { - return { - type: 'color', - value: data.references[0].defaultValue - }; - } - } - return { - type: 'text', - value: data.defaultValue - }; -} - -/** - * Extract storybook argument type base for component styling - * @param prefix Component prefix for CSS variable - * @param metadata CSS Style Metadata - */ -export function extractStyling(prefix = '', metadata: CssMetadata = getStyleMetadata()): StyleConfigs { - return Object.entries(metadata.variables) - .filter(([name]) => name.startsWith(prefix)) - .reduce((acc, [name, data]) => { - const { type, value, referTo } = getTypeAndValue(data, metadata); - const controlName = `${STYLING_PREFIX}${name}`; - acc.argTypes[controlName] = { - name: `CSS: ${name}`, - description: 'CSS Variable' + (referTo ? ` (refer to: ${referTo})` : ''), - defaultValue: value, - table: { - defaultValue: { - summary: data.defaultValue - } - }, - control: { type } - }; - acc.rawValues[controlName] = data.defaultValue; - return acc; - }, { argTypes: {}, rawValues: {} }); -} - -/** - * Apply component style and theme to the loaded component - * @param style Component style - * @param props Properties set to storybook control - * @param theme Application theme - */ -export function applyStyle(style: StyleConfigs, props: any, theme?: Record) { - if (theme) { - Object.entries(theme) - .forEach(([name, value]) => - setCssVariable(`--${name}`, value, 'storybook-css-theme-injection') - ); - } - - const regexp = new RegExp(`^${STYLING_PREFIX}`); - Object.keys(style.argTypes) - .forEach((variable) => - setCssVariable(`--${variable.replace(regexp, '')}`, style.argTypes[variable].defaultValue === props[variable] ? style.rawValues[variable] : props[variable]) - ); -} - -/** - * Get theme from metadata - * @param metadata CSS Style Metadata - */ -export function getThemeVariables(metadata: CssMetadata = getStyleMetadata()) { - return Object.entries(metadata.variables) - .filter(([_, data]) => data.tags && data.tags.includes('theme')) - .reduce>((acc, [name, data]) => { - acc[name] = data.defaultValue; - return acc; - }, {}); -} diff --git a/packages/@o3r/storybook/src/styling/styling.spec.ts b/packages/@o3r/storybook/src/styling/styling.spec.ts deleted file mode 100644 index 7c88f52738..0000000000 --- a/packages/@o3r/storybook/src/styling/styling.spec.ts +++ /dev/null @@ -1,208 +0,0 @@ -import { - getStyleMetadata, - setStyleMetadata, -} from './metadata-manager'; -import { - STYLING_PREFIX, -} from './style-configs.interface'; -import { - extractStyling, - getThemeVariables, - getTypeAndValue, - setCssVariable, -} from './styling.helpers'; - -describe('Styling Metadata setup', () => { - beforeEach(() => { - if (typeof window === 'undefined') { - globalThis.window = {} as any; - } - - delete window.__OTTER_STORYBOOK_STYLE_METADATA__; - }); - - it('should register the metadata', () => { - const mockMetadata = { variables: { test: 'fakeValue' } } as any; - setStyleMetadata(mockMetadata); - - expect(window.__OTTER_STORYBOOK_STYLE_METADATA__).toBe(mockMetadata); - }); - - it('should retrieve the metadata', () => { - const mockMetadata = { variables: { test: 'fakeValue' } } as any; - window.__OTTER_STORYBOOK_STYLE_METADATA__ = mockMetadata; - - expect(getStyleMetadata()).toBe(mockMetadata); - }); -}); - -describe('Styling Helpers', () => { - beforeEach(() => { - if (typeof document === 'undefined') { - globalThis.document = { - head: { - append: () => {} - } as any, - createElement: () => {}, - querySelector: () => {} - } as any; - } - }); - - describe('setCssVariable', () => { - let createElement: jest.SpyInstance; - let querySelector: jest.SpyInstance; - let append: jest.SpyInstance; - - afterEach(() => { - jest.restoreAllMocks(); - }); - - it('should create a new style element', () => { - createElement = jest.spyOn(document, 'createElement').mockReturnValue({} as any); - querySelector = jest.spyOn(document, 'querySelector').mockReturnValue(null); - append = jest.spyOn(document.head, 'append').mockReturnValue({} as any); - setCssVariable('--test-var', 'myValue', 'styleElementId'); - - expect(createElement).toHaveBeenCalledTimes(1); - expect(append).toHaveBeenCalledWith({ - id: 'styleElementId', - innerHTML: ` -:root { - --test-var: myValue; -}` - }); - }); - - it('should edit an existing variable', () => { - const element: any = { innerHTML: ':root { --test-var: oldValue; }' }; - createElement = jest.spyOn(document, 'createElement').mockReturnValue({} as any); - querySelector = jest.spyOn(document, 'querySelector').mockReturnValue(element); - append = jest.spyOn(document.head, 'append').mockReturnValue({} as any); - setCssVariable('--test-var', 'myValue', 'styleElementId'); - - expect(createElement).not.toHaveBeenCalled(); - expect(querySelector).toHaveBeenCalledTimes(1); - expect(element.innerHTML).toMatch('--test-var: myValue;'); - }); - }); - - describe('getTypeAndValue', () => { - it('should return a color editor for color', () => { - const result = getTypeAndValue({ defaultValue: '#000', name: 'test-var' }, { variables: {} }); - - expect(result.type).toBe('color'); - expect(result.value).toBe('#000'); - }); - - it('should return a text editor for color', () => { - const result = getTypeAndValue({ defaultValue: '1px solid #000', name: 'test-var' }, { variables: {} }); - - expect(result.type).toBe('text'); - expect(result.value).toBe('1px solid #000'); - }); - }); - - describe('extractStyling', () => { - it('should extract component variable', () => { - const result = extractStyling('test-component-', { variables: { - 'test-component-example-1': { - defaultValue: '#000', - name: 'test-component-example-1' - }, - 'test-component-example-2': { - defaultValue: '1px solid #000', - name: 'test-component-example-2' - } - } }); - - expect(Object.keys(result.argTypes).length).toBe(2); - expect(Object.keys(result.rawValues).length).toBe(2); - - Object.entries(result.argTypes).forEach(([argName, argType]) => - - expect(argType.defaultValue).toBe(result.rawValues[argName]) - ); - }); - - it('should not extract incorrect variable', () => { - const result = extractStyling('test-component-', { variables: { - 'test-component-example-1': { - defaultValue: '#000', - name: 'test-component-example-1' - }, - 'test-component-example-2': { - defaultValue: '1px solid #000', - name: 'test-component-example-2' - }, - 'other-component-example': { - defaultValue: '1px solid #000', - name: 'test-component-example-2' - } - } }); - - expect(Object.keys(result.argTypes).length).toBe(2); - expect(Object.keys(result.rawValues).length).toBe(2); - }); - - it('should return the final value of the referenced variable', () => { - const result = extractStyling('test-component-', { variables: { - 'test-component-example-1': { - defaultValue: '#000', - name: 'test-component-example-1' - }, - 'test-component-example-2': { - defaultValue: 'var(--primary-600, #000)', - name: 'test-component-example-2', - references: [ - { - name: 'primary-600', - defaultValue: '#000' - } - ] - }, - 'primary-600': { - name: 'primary-600', - defaultValue: '#0056B1' - } - } }); - - const name = `${STYLING_PREFIX}test-component-example-2`; - - expect(Object.keys(result.argTypes).length).toBe(2); - expect(Object.keys(result.rawValues).length).toBe(2); - - expect(result.argTypes[name].defaultValue).toBe('#0056B1'); - expect(result.rawValues[name]).toBe('var(--primary-600, #000)'); - }); - }); - - describe('getThemeVariables', () => { - it('should extract theme variable only', () => { - const result = getThemeVariables({ variables: { - 'test-component-example-1': { - defaultValue: '#000', - name: 'test-component-example-1' - }, - 'test-component-example-2': { - defaultValue: 'var(--primary-600, #000)', - name: 'test-component-example-2', - references: [ - { - name: 'primary-600', - defaultValue: '#000' - } - ] - }, - 'primary-600': { - name: 'primary-600', - defaultValue: '#0056B1', - tags: ['theme'] - } - } }); - - expect(Object.keys(result).length).toBe(1); - expect(result['primary-600']).toBe('#0056B1'); - }); - }); -}); diff --git a/packages/@o3r/storybook/src/types.ts b/packages/@o3r/storybook/src/types.ts deleted file mode 100644 index e0d0415e54..0000000000 --- a/packages/@o3r/storybook/src/types.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { - ArgTypes, -} from '@storybook/angular'; - -/** Configuration of Storybook stories */ -export interface StorybookStoryConfiguration { - /** list of component type arguments */ - argTypes: ArgTypes; -} diff --git a/packages/@o3r/storybook/testing/jest.config.ut.builders.js b/packages/@o3r/storybook/testing/jest.config.ut.builders.js deleted file mode 100644 index 5944f4e809..0000000000 --- a/packages/@o3r/storybook/testing/jest.config.ut.builders.js +++ /dev/null @@ -1,17 +0,0 @@ -const path = require('node:path'); -const getJestProjectConfig = require('../../../../jest.config.ut').getJestProjectConfig; - -const rootDir = path.join(__dirname, '..'); - -const baseConfig = getJestProjectConfig(rootDir, false); - -/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */ -module.exports = { - ...baseConfig, - displayName: `${require('../package.json').name}/builders`, - setupFilesAfterEnv: ['/testing/setup-jest.builders.ts'], - testPathIgnorePatterns: [ - ...baseConfig.testPathIgnorePatterns, - '/src/.*' - ] -}; diff --git a/packages/@o3r/storybook/testing/jest.config.ut.js b/packages/@o3r/storybook/testing/jest.config.ut.js deleted file mode 100644 index 0b739571fe..0000000000 --- a/packages/@o3r/storybook/testing/jest.config.ut.js +++ /dev/null @@ -1,17 +0,0 @@ -const path = require('node:path'); -const getJestProjectConfig = require('../../../../jest.config.ut').getJestProjectConfig; - -const rootDir = path.join(__dirname, '..'); - -const baseConfig = getJestProjectConfig(rootDir, false); - -/** @type {import('ts-jest/dist/types').JestConfigWithTsJest} */ -module.exports = { - ...baseConfig, - displayName: require('../package.json').name, - testPathIgnorePatterns: [ - ...baseConfig.testPathIgnorePatterns, - '/builders/.*', - '/schematics/.*' - ] -}; diff --git a/packages/@o3r/storybook/testing/setup-jest.builders.ts b/packages/@o3r/storybook/testing/setup-jest.builders.ts deleted file mode 100644 index 2ccaca21c3..0000000000 --- a/packages/@o3r/storybook/testing/setup-jest.builders.ts +++ /dev/null @@ -1 +0,0 @@ -import '@o3r/test-helpers/setup-jest-builders'; diff --git a/packages/@o3r/storybook/testing/setup-jest.ts b/packages/@o3r/storybook/testing/setup-jest.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/packages/@o3r/storybook/tsconfig.build.json b/packages/@o3r/storybook/tsconfig.build.json deleted file mode 100644 index a2f7147d7a..0000000000 --- a/packages/@o3r/storybook/tsconfig.build.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "extends": "../../../tsconfig.build", - "compilerOptions": { - "skipLibCheck": true, // Due to react sub dependencies - "incremental": true, - "composite": true, - "tsBuildInfoFile": "build/.tsbuildinfo", - "lib": ["ES2020", "dom"], - "outDir": "dist", - "target": "ES2020", - "module": "CommonJS" - }, - "include": [ - "src/**/*.ts" - ], - "exclude": [ - "**/*.spec.ts", - "component-wrapper/**/*.ts", - "addon/**" - ] -} diff --git a/packages/@o3r/storybook/tsconfig.build.react.json b/packages/@o3r/storybook/tsconfig.build.react.json deleted file mode 100644 index 91ba766c22..0000000000 --- a/packages/@o3r/storybook/tsconfig.build.react.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "extends": "../../../tsconfig.build", - "compilerOptions": { - "skipLibCheck": true, // Due to react sub dependencies - "incremental": true, - "composite": true, - "outDir": "./dist", - "jsx": "react", - "module": "ESNext", - "tsBuildInfoFile": "build/.tsbuildinfo.react", - "allowSyntheticDefaultImports": true - }, - "include": [ - "addon/*.tsx", - "addon/*.ts" - ], - "exclude": [ - "**/*.spec.ts" - ], - "references": [ - { - "path": "tsconfig.build.json" - } - ] -} diff --git a/packages/@o3r/storybook/tsconfig.builders.json b/packages/@o3r/storybook/tsconfig.builders.json deleted file mode 100644 index 459ed573ce..0000000000 --- a/packages/@o3r/storybook/tsconfig.builders.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "extends": "../../../tsconfig.build", - "compilerOptions": { - "incremental": true, - "composite": true, - "outDir": "./dist", - "module": "CommonJS", - "rootDir": ".", - "tsBuildInfoFile": "build/.tsbuildinfo.builders" - }, - "include": [ - "schematics/**/*.ts" - ], - "exclude": [ - "**/*.spec.ts", - "schematics/**/templates/**" - ] -} diff --git a/packages/@o3r/storybook/tsconfig.component-wrapper.json b/packages/@o3r/storybook/tsconfig.component-wrapper.json deleted file mode 100644 index d6c30621eb..0000000000 --- a/packages/@o3r/storybook/tsconfig.component-wrapper.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "extends": "../../../tsconfig.build", - "compilerOptions": { - "incremental": true, - "composite": true, - "lib": [ - "ES2020", - "dom" - ], - "outDir": "./dist", - "target": "ES2020", - "module": "CommonJS", - "moduleResolution": "node", - "tsBuildInfoFile": "build/.tsbuildinfo.wrapper", - "rootDir": "." - }, - "include": [ - "component-wrapper/**/*.ts" - ], - "exclude": [ - "**/*.spec.ts" - ], - "angularCompilerOptions": { - "annotateForClosureCompiler": false - } -} diff --git a/packages/@o3r/storybook/tsconfig.doc.json b/packages/@o3r/storybook/tsconfig.doc.json deleted file mode 100644 index 8d1e4cff88..0000000000 --- a/packages/@o3r/storybook/tsconfig.doc.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.doc", - "exclude": [ - "**/*reducer.ts", - "**/*.fixture.ts" - ], - "include": [ - "src/**/*.ts" - ] -} diff --git a/packages/@o3r/storybook/tsconfig.eslint.json b/packages/@o3r/storybook/tsconfig.eslint.json deleted file mode 100644 index 2b171c4331..0000000000 --- a/packages/@o3r/storybook/tsconfig.eslint.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "./tsconfig.build", - "include": [ - "eslint*.config.mjs", - "jest.config.js", - "src/addon/helpers.ts", - "testing/*.ts" - ] -} diff --git a/packages/@o3r/storybook/tsconfig.json b/packages/@o3r/storybook/tsconfig.json deleted file mode 100644 index fc6ab08ac7..0000000000 --- a/packages/@o3r/storybook/tsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -/* For IDE usage only */ -{ - "extends": "../../../tsconfig.base", - "references": [ - { - "path": "./tsconfig.build.json" - }, - { - "path": "./tsconfig.build.react.json" - }, - { - "path": "./tsconfig.component-wrapper.json" - }, - { - "path": "./tsconfig.spec.json" - } - ] -} diff --git a/packages/@o3r/storybook/tsconfig.spec.json b/packages/@o3r/storybook/tsconfig.spec.json deleted file mode 100644 index 7b1504009d..0000000000 --- a/packages/@o3r/storybook/tsconfig.spec.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../../../tsconfig.jest", - "compilerOptions": { - "lib": ["ES2020", "dom"], - }, - "include": [ - "**/*.spec.ts" - ], - "exclude": [] -} diff --git a/packages/@o3r/styling/project.json b/packages/@o3r/styling/project.json index ff90d3b00b..2bc14eaf1e 100644 --- a/packages/@o3r/styling/project.json +++ b/packages/@o3r/styling/project.json @@ -14,7 +14,17 @@ "options": { "project": "packages/@o3r/styling/ng-package.json", "tsConfig": "packages/@o3r/styling/tsconfig.build.json" - } + }, + "inputs": [ + "source", + "^source", + "{projectRoot}/schemas/*.json", + "{projectRoot}/scss/**/*", + "!{projectRoot}/scss/**/*.spec.ts", + "{projectRoot}/assets/**", + "{projectRoot}/_index.scss", + "{projectRoot}/_otter-theme.scss" + ] }, "prepare-build-builders": { "executor": "nx:run-script", diff --git a/packages/@o3r/styling/scss/theming/_functions.scss b/packages/@o3r/styling/scss/theming/_functions.scss index 7a03e0983a..eadec03efb 100644 --- a/packages/@o3r/styling/scss/theming/_functions.scss +++ b/packages/@o3r/styling/scss/theming/_functions.scss @@ -49,7 +49,7 @@ @each $key in $keys { @if (not $hasInvalid) { $isValidItem: false; - @each $valid in ('value', 'details', 'variable') { // 'variable' is deprecated and will be removed in v12 + @each $valid in ('value', 'details', 'variable') { @if ($key == $valid) { $isValidItem: true; } diff --git a/packages/@o3r/styling/scss/theming/otter-theme/_functions.scss b/packages/@o3r/styling/scss/theming/otter-theme/_functions.scss index ab86348573..0685ec6440 100644 --- a/packages/@o3r/styling/scss/theming/otter-theme/_functions.scss +++ b/packages/@o3r/styling/scss/theming/otter-theme/_functions.scss @@ -7,7 +7,7 @@ @function _meta-theme-to-otter($meta-theme, $root-name) { @if (meta.type-of($meta-theme) != map) { @return ( - variable: $root-name, // Deprecated, this is not used in the final theme calculation, will be removed in Otter v12 + variable: $root-name, value: $meta-theme ); } diff --git a/packages/@o3r/styling/scss/utils/_variables.scss b/packages/@o3r/styling/scss/utils/_variables.scss index ef9db34a6c..e69de29bb2 100644 --- a/packages/@o3r/styling/scss/utils/_variables.scss +++ b/packages/@o3r/styling/scss/utils/_variables.scss @@ -1,13 +0,0 @@ -/// Map containing the list of possible alternatives for each breakpoint if the value is missing from a property -/// Ex. If there is no value for xxs on header-height property, the next alternative breakpoint is xs and if the latter -/// is not available, it will be sm etc. -/// @deprecate will be removed in v12 as not used anymore by material neither bootstrap -/// @type map -$alternative-breakpoints-map: ( - xxs: xxs, - xs: xs xxs, - sm: sm xs xxs, - md: md sm xs xxs, - lg: lg md sm xs xxs, - xl: xl lg md sm xs xxs, -); diff --git a/packages/@o3r/styling/src/breakpoints.ts b/packages/@o3r/styling/src/breakpoints.ts deleted file mode 100644 index a84b1fa510..0000000000 --- a/packages/@o3r/styling/src/breakpoints.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { - Breakpoints, -} from '@angular/cdk/layout'; - -/** - * Angular CDK Breakpoints to detect devices - * @deprecated use Breakpoints exported by @angular/cdk instead, will be removed in v12 - */ -export const deviceBreakpoints = { - mobile: [Breakpoints.HandsetLandscape, Breakpoints.HandsetPortrait], - tablet: [Breakpoints.TabletLandscape, Breakpoints.TabletPortrait] -}; diff --git a/packages/@o3r/styling/src/public_api.ts b/packages/@o3r/styling/src/public_api.ts index 6d7f4bad96..96ee21115d 100644 --- a/packages/@o3r/styling/src/public_api.ts +++ b/packages/@o3r/styling/src/public_api.ts @@ -1,4 +1,2 @@ -export * from './breakpoints'; export * from './core/index'; export * from './devkit/index'; -export * from './services/index'; diff --git a/packages/@o3r/styling/src/services/index.ts b/packages/@o3r/styling/src/services/index.ts deleted file mode 100644 index 94975b5e6a..0000000000 --- a/packages/@o3r/styling/src/services/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './styling/index'; diff --git a/packages/@o3r/styling/src/services/styling/index.ts b/packages/@o3r/styling/src/services/styling/index.ts deleted file mode 100644 index 18d261c036..0000000000 --- a/packages/@o3r/styling/src/services/styling/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './style-lazy-loader.module'; -export * from './style-lazy-loader.service'; diff --git a/packages/@o3r/styling/src/services/styling/style-lazy-loader.module.ts b/packages/@o3r/styling/src/services/styling/style-lazy-loader.module.ts deleted file mode 100644 index 8b209f4cc0..0000000000 --- a/packages/@o3r/styling/src/services/styling/style-lazy-loader.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { - NgModule, -} from '@angular/core'; -import { - DynamicContentModule, -} from '@o3r/dynamic-content'; - -/** - * @deprecated use StyleLazyLoaderModule exported by @o3r/dynamic-content instead, will be removed in v12 - */ -@NgModule({ - imports: [DynamicContentModule] -}) -export class StyleLazyLoaderModule {} diff --git a/packages/@o3r/styling/src/services/styling/style-lazy-loader.service.ts b/packages/@o3r/styling/src/services/styling/style-lazy-loader.service.ts deleted file mode 100644 index d40fc4b4e0..0000000000 --- a/packages/@o3r/styling/src/services/styling/style-lazy-loader.service.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { - Injectable, -} from '@angular/core'; -import { - DynamicContentService, -} from '@o3r/dynamic-content'; -import { - firstValueFrom, -} from 'rxjs'; -import { - StyleLazyLoaderModule, -} from './style-lazy-loader.module'; - -/** - * Interface to describe a style to lazy load from a url. - * @deprecated use StyleURL exported by @o3r/dynamic-content instead, will be removed in v12 - */ -export interface StyleURL { - /** url to file */ - href: string; - /** id of the HTML element */ - id?: string; - /** html integrity attribute to verify fetched resources */ - integrity?: string; - /** html crossOrigin attribute for CORS support. */ - crossOrigin?: 'anonymous' | 'use-credentials' | ''; -} - -/** - * Service to lazy load a CSS file - * @deprecated use StyleLazyLoader exported by @o3r/dynamic-content instead, will be removed in v12 - */ -@Injectable({ - providedIn: StyleLazyLoaderModule -}) -export class StyleLazyLoader { - private readonly DEFAULT_STYLE_ELEMENT_ID = 'external-theme'; - - constructor(private readonly dcService: DynamicContentService) {} - - /** - * Load a new CSS from an absolute URL, if we already HTML element exists with the url, otherwise - * @param styleUrlConfig object containing CSS File absolute URL to load, integrity and crossOrigin attributes - * and the styleId id of the dynamic style in the body tag. - */ - public loadStyleFromURL(styleUrlConfig: StyleURL) { - const elementId = styleUrlConfig.id || this.DEFAULT_STYLE_ELEMENT_ID; - let style = document.querySelector(`#${elementId}`); - - if (style === null) { - style = document.createElement('link'); - style.rel = 'stylesheet'; - style.type = 'text/css'; - const head = document.querySelectorAll('head')[0]; - head.append(style); - } - if (styleUrlConfig.integrity) { - style.integrity = styleUrlConfig.integrity; - } - if (styleUrlConfig.crossOrigin !== undefined) { - style.crossOrigin = styleUrlConfig.crossOrigin; - } - style.href = styleUrlConfig.href; - } - - /** - * Load a new CSS File - * @param styleUrlConfig CSS File config containing URL to load, integrity and crossOrigin attributes - * and the styleId id of the dynamic style in the body tag - */ - public async asyncLoadStyleFromDynamicContent(styleUrlConfig: StyleURL) { - const dynamicContentPath = await firstValueFrom( - this.dcService.getContentPathStream(styleUrlConfig.href) - ); - styleUrlConfig.href = dynamicContentPath; - this.loadStyleFromURL(styleUrlConfig); - } -} diff --git a/packages/@o3r/testing/src/localization/localization-mock.ts b/packages/@o3r/testing/src/localization/localization-mock.ts index 95eec07471..a4bddaa6e2 100644 --- a/packages/@o3r/testing/src/localization/localization-mock.ts +++ b/packages/@o3r/testing/src/localization/localization-mock.ts @@ -12,7 +12,7 @@ import { import { LocalizationConfiguration, LocalizationModule, - LocalizationTranslatePipe, + O3rLocalizationTranslatePipe, } from '@o3r/localization'; import { of, @@ -47,7 +47,7 @@ export class LocalizationDependencyMocks { public static forTest(pipeWithPrefix = false): ModuleWithProviders { return { ngModule: LocalizationDependencyMocks, - providers: [{ provide: LocalizationTranslatePipe, useClass: pipeWithPrefix ? O3rTranslatePipeMock : TranslatePipeMock }] + providers: [{ provide: O3rLocalizationTranslatePipe, useClass: pipeWithPrefix ? O3rTranslatePipeMock : TranslatePipeMock }] }; } } diff --git a/packages/@o3r/third-party/project.json b/packages/@o3r/third-party/project.json index 10a0a8b8c5..9dfe505133 100644 --- a/packages/@o3r/third-party/project.json +++ b/packages/@o3r/third-party/project.json @@ -4,7 +4,6 @@ "projectType": "library", "sourceRoot": "packages/@o3r/third-party/src", "prefix": "o3r", - "implicitDependencies": ["dev-tools"], "targets": { "build": { "executor": "nx:noop", diff --git a/tools/github-actions/audit/src/reports.spec.ts b/tools/github-actions/audit/src/reports.spec.ts index 6737b36528..a79c538c28 100644 --- a/tools/github-actions/audit/src/reports.spec.ts +++ b/tools/github-actions/audit/src/reports.spec.ts @@ -30,9 +30,9 @@ describe('github-action audit', () => { const response = await readFile(join(MOCK_FOLDER, 'npm-v2-audit.json'), 'utf8'); const report = computeNpmReport(response, 'high'); expect(report.errors.length).toBe(3); - expect(report.warnings.length).toBe(32); + expect(report.warnings.length).toBe(31); expect(report.highestSeverityFound).toBe('critical'); - expect(report.nbVulnerabilities).toBe(35); + expect(report.nbVulnerabilities).toBe(34); }); }); describe('using Yarn', () => { diff --git a/tools/github-actions/audit/testing/mocks/npm-v2-audit.json b/tools/github-actions/audit/testing/mocks/npm-v2-audit.json index 990501d847..3fed4a8f83 100644 --- a/tools/github-actions/audit/testing/mocks/npm-v2-audit.json +++ b/tools/github-actions/audit/testing/mocks/npm-v2-audit.json @@ -10,7 +10,6 @@ ], "effects": [ "@nx/angular", - "@storybook/angular", "jest-preset-angular" ], "range": ">=0.1100.0-next.0", @@ -122,8 +121,7 @@ "range": "*", "nodes": [ "apps/chrome-devtools/node_modules/@o3r/components", - "apps/showcase/node_modules/@o3r/components", - "packages/@o3r/storybook/node_modules/@o3r/components" + "apps/showcase/node_modules/@o3r/components" ], "fixAvailable": { "name": "@o3r/components", @@ -145,8 +143,7 @@ "nodes": [ "apps/chrome-devtools/node_modules/@o3r/configuration", "apps/showcase/node_modules/@o3r/configuration", - "packages/@o3r/components/node_modules/@o3r/configuration", - "packages/@o3r/storybook/node_modules/@o3r/configuration" + "packages/@o3r/components/node_modules/@o3r/configuration" ], "fixAvailable": false }, @@ -192,7 +189,6 @@ "packages/@o3r/routing/node_modules/@o3r/core", "packages/@o3r/rules-engine/node_modules/@o3r/core", "packages/@o3r/store-sync/node_modules/@o3r/core", - "packages/@o3r/storybook/node_modules/@o3r/core", "packages/@o3r/styling/node_modules/@o3r/core", "packages/@o3r/testing/node_modules/@o3r/core", "packages/@o3r/third-party/node_modules/@o3r/core", @@ -276,7 +272,6 @@ "apps/chrome-devtools/node_modules/@o3r/localization", "apps/showcase/node_modules/@o3r/localization", "packages/@o3r/components/node_modules/@o3r/localization", - "packages/@o3r/storybook/node_modules/@o3r/localization", "packages/@o3r/testing/node_modules/@o3r/localization" ], "fixAvailable": { @@ -305,8 +300,7 @@ "packages/@o3r/localization/node_modules/@o3r/logger", "packages/@o3r/mobile/node_modules/@o3r/logger", "packages/@o3r/rules-engine/node_modules/@o3r/logger", - "packages/@o3r/store-sync/node_modules/@o3r/logger", - "packages/@o3r/storybook/node_modules/@o3r/logger" + "packages/@o3r/store-sync/node_modules/@o3r/logger" ], "fixAvailable": { "name": "@o3r/logger", @@ -406,8 +400,7 @@ "nodes": [ "apps/chrome-devtools/node_modules/@o3r/styling", "apps/showcase/node_modules/@o3r/styling", - "packages/@o3r/design/node_modules/@o3r/styling", - "packages/@o3r/storybook/node_modules/@o3r/styling" + "packages/@o3r/design/node_modules/@o3r/styling" ], "fixAvailable": { "name": "@o3r/styling", @@ -463,24 +456,6 @@ "isSemVerMajor": true } }, - "@storybook/angular": { - "name": "@storybook/angular", - "severity": "moderate", - "isDirect": true, - "via": [ - "@angular-devkit/build-angular" - ], - "effects": [], - "range": "<=0.0.0-pr-29353-sha-c7d17a36 || 5.2.0-alpha.0 - 5.2.0-rc.11 || >=6.5.17-alpha.0", - "nodes": [ - "node_modules/@storybook/angular" - ], - "fixAvailable": { - "name": "@storybook/angular", - "version": "6.5.16", - "isSemVerMajor": true - } - }, "cookie": { "name": "cookie", "severity": "low", @@ -824,7 +799,7 @@ "vulnerabilities": { "info": 0, "low": 5, - "moderate": 27, + "moderate": 26, "high": 0, "critical": 3, "total": 35 diff --git a/tsconfig.base.json b/tsconfig.base.json index faab8ca982..e553a4fbf5 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -187,9 +187,6 @@ "@o3r/store-sync": [ "packages/@o3r/store-sync/src/public_api" ], - "@o3r/storybook": [ - "packages/@o3r/storybook/src/public_api" - ], "@o3r/stylelint-plugin": [ "packages/@o3r/stylelint-plugin/src" ], diff --git a/tsconfig.build.json b/tsconfig.build.json index dc097c8b29..a3089f174a 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -45,7 +45,6 @@ "@o3r/rules-engine": ["packages/@o3r/rules-engine/dist", "packages/@o3r/rules-engine/src/public_api"], "@o3r/schematics": ["packages/@o3r/schematics/dist", "packages/@o3r/schematics/src/public_api"], "@o3r/store-sync": ["packages/@o3r/store-sync/dist", "packages/@o3r/store-sync/src/public_api"], - "@o3r/storybook": ["packages/@o3r/storybook/dist", "packages/@o3r/storybook/src/public_api"], "@o3r/stylelint-plugin": ["packages/@o3r/stylelint-plugin/dist", "packages/@o3r/stylelint-plugin/src/public_api"], "@o3r/styling": ["packages/@o3r/styling/dist", "packages/@o3r/styling/src/public_api"], "@o3r/styling/builders/*/helpers": ["packages/@o3r/styling/dist/builders/*/helpers/index", "packages/@o3r/styling/builders/*/helpers"], diff --git a/yarn.lock b/yarn.lock index f504c6e3f4..37b7d9b050 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1724,17 +1724,6 @@ __metadata: languageName: node linkType: hard -"@aw-web-design/x-default-browser@npm:1.4.126": - version: 1.4.126 - resolution: "@aw-web-design/x-default-browser@npm:1.4.126" - dependencies: - default-browser-id: "npm:3.0.0" - bin: - x-default-browser: bin/x-default-browser.js - checksum: 10/f7111a6f00953f32d344a05c9a1bc1f22124dfc2696b2b7906ca856a9f845a282f272f603c997ebbb8a2d6b865664f46fda3bec1c480f040e21b815ff8ed3607 - languageName: node - linkType: hard - "@azure/abort-controller@npm:^2.0.0": version: 2.1.2 resolution: "@azure/abort-controller@npm:2.1.2" @@ -1938,7 +1927,7 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.23.2, @babel/core@npm:^7.23.9, @babel/core@npm:^7.24.4, @babel/core@npm:~7.26.0": +"@babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.23.2, @babel/core@npm:^7.23.9, @babel/core@npm:~7.26.0": version: 7.26.0 resolution: "@babel/core@npm:7.26.0" dependencies: @@ -1973,7 +1962,7 @@ __metadata: languageName: node linkType: hard -"@babel/generator@npm:^7.24.4, @babel/generator@npm:^7.25.0, @babel/generator@npm:^7.25.7, @babel/generator@npm:^7.26.0, @babel/generator@npm:^7.26.3, @babel/generator@npm:^7.7.2": +"@babel/generator@npm:^7.25.0, @babel/generator@npm:^7.25.7, @babel/generator@npm:^7.26.0, @babel/generator@npm:^7.26.3, @babel/generator@npm:^7.7.2": version: 7.26.3 resolution: "@babel/generator@npm:7.26.3" dependencies: @@ -2198,7 +2187,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.24.4, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.8, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.3": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.23.9, @babel/parser@npm:^7.25.0, @babel/parser@npm:^7.25.8, @babel/parser@npm:^7.25.9, @babel/parser@npm:^7.26.0, @babel/parser@npm:^7.26.3": version: 7.26.3 resolution: "@babel/parser@npm:7.26.3" dependencies: @@ -3524,7 +3513,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.24.1, @babel/traverse@npm:^7.25.0, @babel/traverse@npm:^7.25.2, @babel/traverse@npm:^7.25.7, @babel/traverse@npm:^7.25.9": +"@babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.25.0, @babel/traverse@npm:^7.25.2, @babel/traverse@npm:^7.25.7, @babel/traverse@npm:^7.25.9": version: 7.26.4 resolution: "@babel/traverse@npm:7.26.4" dependencies: @@ -3539,7 +3528,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.24.0, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.8, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.26.3, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4": +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.20.7, @babel/types@npm:^7.24.7, @babel/types@npm:^7.25.0, @babel/types@npm:^7.25.2, @babel/types@npm:^7.25.8, @babel/types@npm:^7.25.9, @babel/types@npm:^7.26.0, @babel/types@npm:^7.26.3, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4": version: 7.26.3 resolution: "@babel/types@npm:7.26.3" dependencies: @@ -3641,13 +3630,6 @@ __metadata: languageName: node linkType: hard -"@colors/colors@npm:1.5.0": - version: 1.5.0 - resolution: "@colors/colors@npm:1.5.0" - checksum: 10/9d226461c1e91e95f067be2bdc5e6f99cfe55a721f45afb44122e23e4b8602eeac4ff7325af6b5a369f36396ee1514d3809af3f57769066d80d83790d8e53339 - languageName: node - linkType: hard - "@colors/colors@npm:1.6.0, @colors/colors@npm:^1.6.0": version: 1.6.0 resolution: "@colors/colors@npm:1.6.0" @@ -4034,7 +4016,7 @@ __metadata: languageName: node linkType: hard -"@discoveryjs/json-ext@npm:^0.5.0, @discoveryjs/json-ext@npm:^0.5.3": +"@discoveryjs/json-ext@npm:^0.5.0": version: 0.5.7 resolution: "@discoveryjs/json-ext@npm:0.5.7" checksum: 10/b95682a852448e8ef50d6f8e3b7ba288aab3fd98a2bafbe46881a3db0c6e7248a2debe9e1ee0d4137c521e4743ca5bbcb1c0765c9d7b3e0ef53231506fec42b4 @@ -4076,15 +4058,6 @@ __metadata: languageName: node linkType: hard -"@emotion/use-insertion-effect-with-fallbacks@npm:^1.0.0, @emotion/use-insertion-effect-with-fallbacks@npm:^1.0.1": - version: 1.2.0 - resolution: "@emotion/use-insertion-effect-with-fallbacks@npm:1.2.0" - peerDependencies: - react: ">=16.8.0" - checksum: 10/2374999db8d53ef661d61ed1026c42a849632e4f03826f7eba0314c1d92ae342161d737f5045453aa46dd4008e13ccefeba68d3165b667dfad8e5784fcb0c643 - languageName: node - linkType: hard - "@es-joy/jsdoccomment@npm:~0.48.0": version: 0.48.0 resolution: "@es-joy/jsdoccomment@npm:0.48.0" @@ -4096,13 +4069,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/aix-ppc64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/aix-ppc64@npm:0.20.2" - conditions: os=aix & cpu=ppc64 - languageName: node - linkType: hard - "@esbuild/aix-ppc64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/aix-ppc64@npm:0.21.5" @@ -4131,13 +4097,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/android-arm64@npm:0.20.2" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - "@esbuild/android-arm64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/android-arm64@npm:0.21.5" @@ -4166,13 +4125,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-arm@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/android-arm@npm:0.20.2" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - "@esbuild/android-arm@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/android-arm@npm:0.21.5" @@ -4201,13 +4153,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/android-x64@npm:0.20.2" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - "@esbuild/android-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/android-x64@npm:0.21.5" @@ -4236,13 +4181,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/darwin-arm64@npm:0.20.2" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - "@esbuild/darwin-arm64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/darwin-arm64@npm:0.21.5" @@ -4271,13 +4209,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/darwin-x64@npm:0.20.2" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - "@esbuild/darwin-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/darwin-x64@npm:0.21.5" @@ -4306,13 +4237,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/freebsd-arm64@npm:0.20.2" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - "@esbuild/freebsd-arm64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/freebsd-arm64@npm:0.21.5" @@ -4341,13 +4265,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/freebsd-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/freebsd-x64@npm:0.20.2" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - "@esbuild/freebsd-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/freebsd-x64@npm:0.21.5" @@ -4376,13 +4293,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-arm64@npm:0.20.2" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - "@esbuild/linux-arm64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-arm64@npm:0.21.5" @@ -4411,13 +4321,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-arm@npm:0.20.2" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - "@esbuild/linux-arm@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-arm@npm:0.21.5" @@ -4446,13 +4349,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-ia32@npm:0.20.2" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - "@esbuild/linux-ia32@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-ia32@npm:0.21.5" @@ -4481,13 +4377,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-loong64@npm:0.20.2" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - "@esbuild/linux-loong64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-loong64@npm:0.21.5" @@ -4516,13 +4405,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-mips64el@npm:0.20.2" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - "@esbuild/linux-mips64el@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-mips64el@npm:0.21.5" @@ -4551,13 +4433,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-ppc64@npm:0.20.2" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - "@esbuild/linux-ppc64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-ppc64@npm:0.21.5" @@ -4586,13 +4461,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-riscv64@npm:0.20.2" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - "@esbuild/linux-riscv64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-riscv64@npm:0.21.5" @@ -4621,13 +4489,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-s390x@npm:0.20.2" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - "@esbuild/linux-s390x@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-s390x@npm:0.21.5" @@ -4656,13 +4517,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/linux-x64@npm:0.20.2" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - "@esbuild/linux-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/linux-x64@npm:0.21.5" @@ -4691,13 +4545,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/netbsd-x64@npm:0.20.2" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - "@esbuild/netbsd-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/netbsd-x64@npm:0.21.5" @@ -4747,13 +4594,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/openbsd-x64@npm:0.20.2" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - "@esbuild/openbsd-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/openbsd-x64@npm:0.21.5" @@ -4782,13 +4622,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/sunos-x64@npm:0.20.2" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - "@esbuild/sunos-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/sunos-x64@npm:0.21.5" @@ -4817,13 +4650,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/win32-arm64@npm:0.20.2" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - "@esbuild/win32-arm64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/win32-arm64@npm:0.21.5" @@ -4852,13 +4678,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/win32-ia32@npm:0.20.2" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - "@esbuild/win32-ia32@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/win32-ia32@npm:0.21.5" @@ -4887,13 +4706,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.20.2": - version: 0.20.2 - resolution: "@esbuild/win32-x64@npm:0.20.2" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@esbuild/win32-x64@npm:0.21.5": version: 0.21.5 resolution: "@esbuild/win32-x64@npm:0.21.5" @@ -5024,13 +4836,6 @@ __metadata: languageName: node linkType: hard -"@fal-works/esbuild-plugin-global-externals@npm:^2.1.2": - version: 2.1.2 - resolution: "@fal-works/esbuild-plugin-global-externals@npm:2.1.2" - checksum: 10/fd68714cccfbd33a8ec31d11ac7c6373100a5e1b8e31941a45c723c802feccb0a00dde946f55cc91d58bff77d405adc2064b22f0faf5ee165968965e5da758a1 - languageName: node - linkType: hard - "@fastify/busboy@npm:^2.0.0": version: 2.1.1 resolution: "@fastify/busboy@npm:2.1.1" @@ -7783,7 +7588,7 @@ __metadata: languageName: unknown linkType: soft -"@o3r/artifactory-tools@workspace:^, @o3r/artifactory-tools@workspace:packages/@o3r/artifactory-tools": +"@o3r/artifactory-tools@workspace:packages/@o3r/artifactory-tools": version: 0.0.0-use.local resolution: "@o3r/artifactory-tools@workspace:packages/@o3r/artifactory-tools" dependencies: @@ -7841,7 +7646,7 @@ __metadata: languageName: unknown linkType: soft -"@o3r/azure-tools@workspace:^, @o3r/azure-tools@workspace:packages/@o3r/azure-tools": +"@o3r/azure-tools@workspace:packages/@o3r/azure-tools": version: 0.0.0-use.local resolution: "@o3r/azure-tools@workspace:packages/@o3r/azure-tools" dependencies: @@ -8587,90 +8392,6 @@ __metadata: languageName: unknown linkType: soft -"@o3r/dev-tools@workspace:packages/@o3r/dev-tools": - version: 0.0.0-use.local - resolution: "@o3r/dev-tools@workspace:packages/@o3r/dev-tools" - dependencies: - "@angular-devkit/core": "npm:~18.2.0" - "@angular-devkit/schematics": "npm:~18.2.0" - "@babel/core": "npm:~7.26.0" - "@babel/preset-typescript": "npm:~7.26.0" - "@compodoc/compodoc": "npm:^1.1.19" - "@eslint-community/eslint-plugin-eslint-comments": "npm:^4.4.0" - "@nx/eslint-plugin": "npm:~19.8.0" - "@nx/jest": "npm:~19.8.0" - "@o3r/artifactory-tools": "workspace:^" - "@o3r/azure-tools": "workspace:^" - "@o3r/build-helpers": "workspace:^" - "@o3r/eslint-plugin": "workspace:^" - "@o3r/workspace": "workspace:^" - "@stylistic/eslint-plugin": "npm:~2.7.0" - "@types/fs-extra": "npm:^11.0.0" - "@types/glob": "npm:^8.0.0" - "@types/jest": "npm:~29.5.2" - "@types/node": "npm:^20.0.0" - "@types/request": "npm:^2.48.7" - "@types/request-promise-native": "npm:^1.0.18" - "@types/semver": "npm:^7.3.13" - "@typescript-eslint/parser": "npm:~8.18.0" - angular-eslint: "npm:~18.4.0" - azure-devops-node-api: "npm:^13.0.0" - chalk: "npm:^4.1.2" - commander: "npm:^12.0.0" - cpy-cli: "npm:^5.0.0" - eslint: "npm:~9.17.0" - eslint-import-resolver-node: "npm:^0.3.9" - eslint-import-resolver-typescript: "npm:^3.6.3" - eslint-plugin-import: "npm:^2.31.0" - eslint-plugin-import-newlines: "npm:^1.4.0" - eslint-plugin-jest: "npm:~28.8.0" - eslint-plugin-jsdoc: "npm:~50.2.0" - eslint-plugin-prefer-arrow: "npm:~1.2.3" - eslint-plugin-unicorn: "npm:^56.0.0" - eslint-plugin-unused-imports: "npm:^4.1.4" - form-data: "npm:^4.0.0" - fs-extra: "npm:^11.0.0" - globals: "npm:^15.9.0" - globby: "npm:^11.1.0" - isomorphic-fetch: "npm:~3.0.0" - jasmine-spec-reporter: "npm:^7.0.0" - jest: "npm:~29.7.0" - jest-junit: "npm:~16.0.0" - jsonc-eslint-parser: "npm:~2.4.0" - minimatch: "npm:~9.0.3" - node-fetch: "npm:^3.0.0" - nx: "npm:~19.8.0" - request: "npm:^2.88.0" - request-promise-native: "npm:^1.0.9" - rimraf: "npm:^6.0.1" - semver: "npm:^7.5.2" - ts-jest: "npm:~29.2.0" - ts-node: "npm:~10.9.2" - tslib: "npm:^2.6.2" - type-fest: "npm:^4.10.2" - typescript: "npm:~5.5.4" - typescript-eslint: "npm:~8.18.0" - winston: "npm:^3.8.2" - peerDependencies: - "@angular-devkit/schematics": ^18.2.0 - peerDependenciesMeta: - "@angular-devkit/schematics": - optional: true - bin: - artifact-cleaner: ./dist/src/cli/artifact-cleaner.js - artifact-retriever: ./dist/src/cli/artifact-retriever.js - comment-pr: ./dist/src/cli/comment-pr.js - generate-package-exports: ./dist/src/cli/generate-package-exports.js - git-release-management: ./dist/src/cli/git-release-management.js - in-source-dep-check: ./dist/src/cli/checks/in-source-dep-check.js - package-export: ./dist/src/cli/package-export.js - peer-dependencies-updater: ./dist/src/cli/peer-dependencies-updater.js - pr-artifact-cleaner: ./dist/src/cli/pr-artifact-cleaner.js - set-version: ./dist/src/cli/set-version.js - version-harmonize: ./dist/src/cli/version-harmonize.js - languageName: unknown - linkType: soft - "@o3r/dynamic-content@workspace:^, @o3r/dynamic-content@workspace:packages/@o3r/dynamic-content": version: 0.0.0-use.local resolution: "@o3r/dynamic-content@workspace:packages/@o3r/dynamic-content" @@ -9360,8 +9081,6 @@ __metadata: postcss-scss: "npm:~4.0.9" prism-themes: "npm:^1.9.0" prismjs: "npm:^1.28.0" - react: "npm:^18.0.0" - react-dom: "npm:^18.0.0" replace-in-files-cli: "npm:^2.2.0" rimraf: "npm:^6.0.1" rxjs: "npm:^7.8.1" @@ -10440,109 +10159,6 @@ __metadata: languageName: unknown linkType: soft -"@o3r/storybook@workspace:packages/@o3r/storybook": - version: 0.0.0-use.local - resolution: "@o3r/storybook@workspace:packages/@o3r/storybook" - dependencies: - "@angular-devkit/architect": "npm:~0.1802.0" - "@angular-devkit/build-angular": "npm:~18.2.0" - "@angular-devkit/core": "npm:~18.2.0" - "@angular-devkit/schematics": "npm:~18.2.0" - "@angular/animations": "npm:~18.2.0" - "@angular/common": "npm:~18.2.0" - "@angular/compiler": "npm:~18.2.0" - "@angular/compiler-cli": "npm:~18.2.0" - "@angular/core": "npm:~18.2.0" - "@angular/forms": "npm:~18.2.0" - "@angular/platform-browser": "npm:~18.2.0" - "@angular/platform-browser-dynamic": "npm:~18.2.0" - "@babel/core": "npm:~7.26.0" - "@babel/preset-typescript": "npm:~7.26.0" - "@compodoc/compodoc": "npm:^1.1.19" - "@eslint-community/eslint-plugin-eslint-comments": "npm:^4.4.0" - "@ngrx/store": "npm:~18.0.0" - "@nx/eslint-plugin": "npm:~19.8.0" - "@nx/jest": "npm:~19.8.0" - "@o3r/build-helpers": "workspace:^" - "@o3r/components": "workspace:^" - "@o3r/configuration": "workspace:^" - "@o3r/core": "workspace:^" - "@o3r/eslint-config": "workspace:^" - "@o3r/eslint-plugin": "workspace:^" - "@o3r/localization": "workspace:^" - "@o3r/logger": "workspace:^" - "@o3r/schematics": "workspace:^" - "@o3r/styling": "workspace:^" - "@o3r/test-helpers": "workspace:^" - "@schematics/angular": "npm:~18.2.0" - "@storybook/addons": "npm:^7.6.16" - "@storybook/angular": "npm:~8.1.0" - "@storybook/api": "npm:^7.6.16" - "@storybook/components": "npm:~8.1.0" - "@stylistic/eslint-plugin": "npm:~2.7.0" - "@types/color": "npm:^3.0.6" - "@types/jest": "npm:~29.5.2" - "@types/node": "npm:^20.0.0" - "@types/react": "npm:^18.0.0" - "@typescript-eslint/parser": "npm:~8.18.0" - angular-eslint: "npm:~18.4.0" - color: "npm:^4.2.3" - concurrently: "npm:^9.1.0" - cpy-cli: "npm:^5.0.0" - eslint: "npm:~9.17.0" - eslint-import-resolver-node: "npm:^0.3.9" - eslint-import-resolver-typescript: "npm:^3.6.3" - eslint-plugin-import: "npm:^2.31.0" - eslint-plugin-import-newlines: "npm:^1.4.0" - eslint-plugin-jest: "npm:~28.8.0" - eslint-plugin-jsdoc: "npm:~50.2.0" - eslint-plugin-prefer-arrow: "npm:~1.2.3" - eslint-plugin-unicorn: "npm:^56.0.0" - eslint-plugin-unused-imports: "npm:^4.1.4" - globals: "npm:^15.9.0" - jest: "npm:~29.7.0" - jest-junit: "npm:~16.0.0" - jsonc-eslint-parser: "npm:~2.4.0" - nx: "npm:~19.8.0" - pid-from-port: "npm:^1.1.3" - react: "npm:^18.0.0" - react-dom: "npm:^18.0.0" - rimraf: "npm:^6.0.1" - rxjs: "npm:^7.8.1" - semver: "npm:^7.5.2" - ts-jest: "npm:~29.2.0" - ts-node: "npm:~10.9.2" - tslib: "npm:^2.6.2" - typescript: "npm:~5.5.4" - typescript-eslint: "npm:~8.18.0" - zone.js: "npm:~0.14.2" - peerDependencies: - "@angular-devkit/core": ^18.2.0 - "@angular-devkit/schematics": ^18.2.0 - "@angular/core": ^18.2.0 - "@ngrx/store": ^18.0.0 - "@o3r/components": "workspace:^" - "@o3r/configuration": "workspace:^" - "@o3r/core": "workspace:^" - "@o3r/localization": "workspace:^" - "@o3r/logger": "workspace:^" - "@o3r/schematics": "workspace:^" - "@o3r/styling": "workspace:^" - "@schematics/angular": ^18.2.0 - "@storybook/addons": ^7.5.3 - "@storybook/angular": ^8.0.0 - "@storybook/api": ^7.5.3 - "@storybook/components": ^8.0.0 - rxjs: ^7.8.1 - typescript: ^5.5.4 - peerDependenciesMeta: - "@angular-devkit/schematics": - optional: true - "@o3r/schematics": - optional: true - languageName: unknown - linkType: soft - "@o3r/stylelint-plugin@workspace:packages/@o3r/stylelint-plugin": version: 0.0.0-use.local resolution: "@o3r/stylelint-plugin@workspace:packages/@o3r/stylelint-plugin" @@ -11863,273 +11479,6 @@ __metadata: languageName: node linkType: hard -"@radix-ui/primitive@npm:1.1.1": - version: 1.1.1 - resolution: "@radix-ui/primitive@npm:1.1.1" - checksum: 10/d7e819177590108b74139809d52ec043c0962ae3513e947998be575fb13639c5c1c091896ddcf1d6a22a777d44ade59d22c2019ce9099607fc62a5de09c59707 - languageName: node - linkType: hard - -"@radix-ui/react-compose-refs@npm:1.1.1": - version: 1.1.1 - resolution: "@radix-ui/react-compose-refs@npm:1.1.1" - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/1be82f9f7fab96cc10f167a2e4f976e0135a63d473334f664c06f02af13bc5ea1994cb0505f89ed190d756cb65d57506721c030908af07e49b9e3cfd36044f33 - languageName: node - linkType: hard - -"@radix-ui/react-context@npm:1.1.1": - version: 1.1.1 - resolution: "@radix-ui/react-context@npm:1.1.1" - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/f6469583bf11cc7bff3ea5c95c56b0774a959512adead00dc64b0527cca01b90b476ca39a64edfd7e18e428e17940aa0339116b1ce5b6e8eab513cfd1065d391 - languageName: node - linkType: hard - -"@radix-ui/react-dialog@npm:^1.0.5": - version: 1.1.3 - resolution: "@radix-ui/react-dialog@npm:1.1.3" - dependencies: - "@radix-ui/primitive": "npm:1.1.1" - "@radix-ui/react-compose-refs": "npm:1.1.1" - "@radix-ui/react-context": "npm:1.1.1" - "@radix-ui/react-dismissable-layer": "npm:1.1.2" - "@radix-ui/react-focus-guards": "npm:1.1.1" - "@radix-ui/react-focus-scope": "npm:1.1.1" - "@radix-ui/react-id": "npm:1.1.0" - "@radix-ui/react-portal": "npm:1.1.3" - "@radix-ui/react-presence": "npm:1.1.2" - "@radix-ui/react-primitive": "npm:2.0.1" - "@radix-ui/react-slot": "npm:1.1.1" - "@radix-ui/react-use-controllable-state": "npm:1.1.0" - aria-hidden: "npm:^1.1.1" - react-remove-scroll: "npm:2.6.0" - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 10/70efa2688a599cb43f0b9d3b6730a5d44339bbe20446c16a98f2ae86b72fa1e2e4389e705d9eb1c368cefd4895b0e058a49d65d3b412d5436cac8a39545ff857 - languageName: node - linkType: hard - -"@radix-ui/react-dismissable-layer@npm:1.1.2": - version: 1.1.2 - resolution: "@radix-ui/react-dismissable-layer@npm:1.1.2" - dependencies: - "@radix-ui/primitive": "npm:1.1.1" - "@radix-ui/react-compose-refs": "npm:1.1.1" - "@radix-ui/react-primitive": "npm:2.0.1" - "@radix-ui/react-use-callback-ref": "npm:1.1.0" - "@radix-ui/react-use-escape-keydown": "npm:1.1.0" - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 10/cc67988d8341aaa870773486de689f22c1414ec15ee748baa4f2c16c900acc7f8d0a2c6f1b19c765d76da87b06d688c1c308241ae306f0ab72acd4fbfe26e717 - languageName: node - linkType: hard - -"@radix-ui/react-focus-guards@npm:1.1.1": - version: 1.1.1 - resolution: "@radix-ui/react-focus-guards@npm:1.1.1" - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/ac8dd31f48fa0500bafd9368f2f06c5a06918dccefa89fa5dc77ca218dc931a094a81ca57f6b181138029822f7acdd5280dceccf5ba4d9263c754fb8f7961879 - languageName: node - linkType: hard - -"@radix-ui/react-focus-scope@npm:1.1.1": - version: 1.1.1 - resolution: "@radix-ui/react-focus-scope@npm:1.1.1" - dependencies: - "@radix-ui/react-compose-refs": "npm:1.1.1" - "@radix-ui/react-primitive": "npm:2.0.1" - "@radix-ui/react-use-callback-ref": "npm:1.1.0" - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 10/128508e7e34a47fd44d51bdb3d66a35a337c54b64125548d4a98bb377ee89b2fd8f96e0a075368d393c6664abba1e5a2f167734a6adbb170c41da0aa7a06d05f - languageName: node - linkType: hard - -"@radix-ui/react-id@npm:1.1.0": - version: 1.1.0 - resolution: "@radix-ui/react-id@npm:1.1.0" - dependencies: - "@radix-ui/react-use-layout-effect": "npm:1.1.0" - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/6fbc9d1739b3b082412da10359e63967b4f3a60383ebda4c9e56b07a722d29bee53b203b3b1418f88854a29315a7715867133bb149e6e22a027a048cdd20d970 - languageName: node - linkType: hard - -"@radix-ui/react-portal@npm:1.1.3": - version: 1.1.3 - resolution: "@radix-ui/react-portal@npm:1.1.3" - dependencies: - "@radix-ui/react-primitive": "npm:2.0.1" - "@radix-ui/react-use-layout-effect": "npm:1.1.0" - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 10/470fb50c940772d05cc268e219b3d15848909dcd0a2dc1952965d0af905992f0ccab99e99c490dea6564c441397eba720b8425ba9f4582c94bef40ebe27ac0d0 - languageName: node - linkType: hard - -"@radix-ui/react-presence@npm:1.1.2": - version: 1.1.2 - resolution: "@radix-ui/react-presence@npm:1.1.2" - dependencies: - "@radix-ui/react-compose-refs": "npm:1.1.1" - "@radix-ui/react-use-layout-effect": "npm:1.1.0" - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 10/b7c7a1eed6e2a4b8778f37d925bca12fccb2a3fdd48fa854cb3d6308592aec7253b0a193cba65b8c323e14a14119935434e8f6d9bdc0fbf97450c0da1b4eb0f9 - languageName: node - linkType: hard - -"@radix-ui/react-primitive@npm:2.0.1": - version: 2.0.1 - resolution: "@radix-ui/react-primitive@npm:2.0.1" - dependencies: - "@radix-ui/react-slot": "npm:1.1.1" - peerDependencies: - "@types/react": "*" - "@types/react-dom": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - react-dom: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - "@types/react-dom": - optional: true - checksum: 10/ed6829b8ff4117cde2c02b14325ff78b7902fe9e8324b9fdbfd11646c5bb703f38711d8da5029ffc873384496481b7d398d0e3c17f7cc287b52fb92fbaf67da2 - languageName: node - linkType: hard - -"@radix-ui/react-slot@npm:1.1.1, @radix-ui/react-slot@npm:^1.0.2": - version: 1.1.1 - resolution: "@radix-ui/react-slot@npm:1.1.1" - dependencies: - "@radix-ui/react-compose-refs": "npm:1.1.1" - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/5b1ee5100da356c8f9f56cd7ca273838a373fa3808f0f909b1e132c4f734282571cb666e86a548831ee82a62240e126d43379994285a9b030fd34ea43538b5e2 - languageName: node - linkType: hard - -"@radix-ui/react-use-callback-ref@npm:1.1.0": - version: 1.1.0 - resolution: "@radix-ui/react-use-callback-ref@npm:1.1.0" - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/2ec7903c67e3034b646005556f44fd975dc5204db6885fc58403e3584f27d95f0b573bc161de3d14fab9fda25150bf3b91f718d299fdfc701c736bd0bd2281fa - languageName: node - linkType: hard - -"@radix-ui/react-use-controllable-state@npm:1.1.0": - version: 1.1.0 - resolution: "@radix-ui/react-use-controllable-state@npm:1.1.0" - dependencies: - "@radix-ui/react-use-callback-ref": "npm:1.1.0" - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/9583679150dc521c9de20ee22cb858697dd4f5cefc46ab8ebfc5e7511415a053994e87d4ca3f49de84d27eebc13535b0a6c9892c91ab43e3e553e5d7270f378f - languageName: node - linkType: hard - -"@radix-ui/react-use-escape-keydown@npm:1.1.0": - version: 1.1.0 - resolution: "@radix-ui/react-use-escape-keydown@npm:1.1.0" - dependencies: - "@radix-ui/react-use-callback-ref": "npm:1.1.0" - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/9bf88ea272b32ea0f292afd336780a59c5646f795036b7e6105df2d224d73c54399ee5265f61d571eb545d28382491a8b02dc436e3088de8dae415d58b959b71 - languageName: node - linkType: hard - -"@radix-ui/react-use-layout-effect@npm:1.1.0": - version: 1.1.0 - resolution: "@radix-ui/react-use-layout-effect@npm:1.1.0" - peerDependencies: - "@types/react": "*" - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/271ea0bf1cd74718895a68414a6e95537737f36e02ad08eeb61a82b229d6abda9cff3135a479e134e1f0ce2c3ff97bb85babbdce751985fb755a39b231d7ccf2 - languageName: node - linkType: hard - "@rollup/plugin-json@npm:^6.1.0": version: 6.1.0 resolution: "@rollup/plugin-json@npm:6.1.0" @@ -12686,610 +12035,6 @@ __metadata: languageName: node linkType: hard -"@storybook/addons@npm:^7.6.16": - version: 7.6.20 - resolution: "@storybook/addons@npm:7.6.20" - dependencies: - "@storybook/manager-api": "npm:7.6.20" - "@storybook/preview-api": "npm:7.6.20" - "@storybook/types": "npm:7.6.20" - checksum: 10/801b8281b6e7b6f96808c83c8f862da86d9bb3f5e1abf57a0f51ba4b46b1530613b869a9660147115ebc7787e0bf01eb10b92516c608da0cd6e83e6bf74a2e9c - languageName: node - linkType: hard - -"@storybook/angular@npm:~8.1.0": - version: 8.1.11 - resolution: "@storybook/angular@npm:8.1.11" - dependencies: - "@storybook/builder-webpack5": "npm:8.1.11" - "@storybook/client-logger": "npm:8.1.11" - "@storybook/core-common": "npm:8.1.11" - "@storybook/core-events": "npm:8.1.11" - "@storybook/core-server": "npm:8.1.11" - "@storybook/core-webpack": "npm:8.1.11" - "@storybook/docs-tools": "npm:8.1.11" - "@storybook/global": "npm:^5.0.0" - "@storybook/node-logger": "npm:8.1.11" - "@storybook/preview-api": "npm:8.1.11" - "@storybook/telemetry": "npm:8.1.11" - "@storybook/types": "npm:8.1.11" - "@types/node": "npm:^18.0.0" - "@types/react": "npm:^18.0.37" - "@types/react-dom": "npm:^18.0.11" - "@types/semver": "npm:^7.3.4" - "@types/webpack-env": "npm:^1.18.0" - find-up: "npm:^5.0.0" - read-pkg-up: "npm:^7.0.1" - semver: "npm:^7.3.7" - telejson: "npm:^7.2.0" - ts-dedent: "npm:^2.0.0" - tsconfig-paths-webpack-plugin: "npm:^4.0.1" - util-deprecate: "npm:^1.0.2" - webpack: "npm:5" - peerDependencies: - "@angular-devkit/architect": ">=0.1500.0 < 0.1900.0" - "@angular-devkit/build-angular": ">=15.0.0 < 19.0.0" - "@angular-devkit/core": ">=15.0.0 < 19.0.0" - "@angular/cli": ">=15.0.0 < 19.0.0" - "@angular/common": ">=15.0.0 < 19.0.0" - "@angular/compiler": ">=15.0.0 < 19.0.0" - "@angular/compiler-cli": ">=15.0.0 < 19.0.0" - "@angular/core": ">=15.0.0 < 19.0.0" - "@angular/forms": ">=15.0.0 < 19.0.0" - "@angular/platform-browser": ">=15.0.0 < 19.0.0" - "@angular/platform-browser-dynamic": ">=15.0.0 < 19.0.0" - rxjs: ^6.0.0 || ^7.4.0 - typescript: ^4.0.0 || ^5.0.0 - zone.js: ">= 0.11.1 < 1.0.0" - peerDependenciesMeta: - "@angular/cli": - optional: true - checksum: 10/f015f4b51aaa25b64718319082c7783e0c72e267778fac9585cfac34c106107bb5aa2b8fd9c10f6c2a3acb319bc52873c6c18254bbd9d398f9ca6719eca1efa3 - languageName: node - linkType: hard - -"@storybook/api@npm:^7.6.16": - version: 7.6.20 - resolution: "@storybook/api@npm:7.6.20" - dependencies: - "@storybook/client-logger": "npm:7.6.20" - "@storybook/manager-api": "npm:7.6.20" - checksum: 10/2aeabb07d1d245c4a3500dec8dd2472e0f0e6f81c06d1bdcc81f79e9a416c3ddb91b98a72449d8857a26177532bfc93f8094918ef047284c971075062d713630 - languageName: node - linkType: hard - -"@storybook/builder-manager@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/builder-manager@npm:8.1.11" - dependencies: - "@fal-works/esbuild-plugin-global-externals": "npm:^2.1.2" - "@storybook/core-common": "npm:8.1.11" - "@storybook/manager": "npm:8.1.11" - "@storybook/node-logger": "npm:8.1.11" - "@types/ejs": "npm:^3.1.1" - "@yarnpkg/esbuild-plugin-pnp": "npm:^3.0.0-rc.10" - browser-assert: "npm:^1.2.1" - ejs: "npm:^3.1.10" - esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0" - esbuild-plugin-alias: "npm:^0.2.1" - express: "npm:^4.17.3" - fs-extra: "npm:^11.1.0" - process: "npm:^0.11.10" - util: "npm:^0.12.4" - checksum: 10/1624c0b69bd4f082eab0b105cfd0ba894c9c4cf9ecc3b1c6ddf336ef304ab244caeaaa4576cd98eef1e7fec4cac616c897aeabc446283619d13d73880f983f44 - languageName: node - linkType: hard - -"@storybook/builder-webpack5@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/builder-webpack5@npm:8.1.11" - dependencies: - "@storybook/channels": "npm:8.1.11" - "@storybook/client-logger": "npm:8.1.11" - "@storybook/core-common": "npm:8.1.11" - "@storybook/core-events": "npm:8.1.11" - "@storybook/core-webpack": "npm:8.1.11" - "@storybook/node-logger": "npm:8.1.11" - "@storybook/preview": "npm:8.1.11" - "@storybook/preview-api": "npm:8.1.11" - "@types/node": "npm:^18.0.0" - "@types/semver": "npm:^7.3.4" - browser-assert: "npm:^1.2.1" - case-sensitive-paths-webpack-plugin: "npm:^2.4.0" - cjs-module-lexer: "npm:^1.2.3" - constants-browserify: "npm:^1.0.0" - css-loader: "npm:^6.7.1" - es-module-lexer: "npm:^1.5.0" - express: "npm:^4.17.3" - fork-ts-checker-webpack-plugin: "npm:^8.0.0" - fs-extra: "npm:^11.1.0" - html-webpack-plugin: "npm:^5.5.0" - magic-string: "npm:^0.30.5" - path-browserify: "npm:^1.0.1" - process: "npm:^0.11.10" - semver: "npm:^7.3.7" - style-loader: "npm:^3.3.1" - terser-webpack-plugin: "npm:^5.3.1" - ts-dedent: "npm:^2.0.0" - url: "npm:^0.11.0" - util: "npm:^0.12.4" - util-deprecate: "npm:^1.0.2" - webpack: "npm:5" - webpack-dev-middleware: "npm:^6.1.2" - webpack-hot-middleware: "npm:^2.25.1" - webpack-virtual-modules: "npm:^0.5.0" - peerDependenciesMeta: - typescript: - optional: true - checksum: 10/75584ac6fd51856c1d713a4a5203fb3458c89fc302e75a5db8bff5738fe7121d86689996ca96af4599fab343bbd9db7d242493747a210e93b5a4111fda00e696 - languageName: node - linkType: hard - -"@storybook/channels@npm:7.6.20": - version: 7.6.20 - resolution: "@storybook/channels@npm:7.6.20" - dependencies: - "@storybook/client-logger": "npm:7.6.20" - "@storybook/core-events": "npm:7.6.20" - "@storybook/global": "npm:^5.0.0" - qs: "npm:^6.10.0" - telejson: "npm:^7.2.0" - tiny-invariant: "npm:^1.3.1" - checksum: 10/3dc827df9d0d0c0c68f10edbf5169e42c2cdb43832cb14ce3ac8149f295219f8bae6ed27300fd50e6a78080914cf142d1810fdbcf687dd313a7bfac41386cd95 - languageName: node - linkType: hard - -"@storybook/channels@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/channels@npm:8.1.11" - dependencies: - "@storybook/client-logger": "npm:8.1.11" - "@storybook/core-events": "npm:8.1.11" - "@storybook/global": "npm:^5.0.0" - telejson: "npm:^7.2.0" - tiny-invariant: "npm:^1.3.1" - checksum: 10/7ca5c0c418d76ca151369b11d3bce0f514f1ca63f6bc66b94ebcbbaa908b4859358020de4aff67a9dec9a43aa0b7c57f9acec67189ec61df8f617403b63023ce - languageName: node - linkType: hard - -"@storybook/client-logger@npm:7.6.20": - version: 7.6.20 - resolution: "@storybook/client-logger@npm:7.6.20" - dependencies: - "@storybook/global": "npm:^5.0.0" - checksum: 10/0062c440c825ab460667d799b00d3ff87dcf4dabce05733c11ffbb1ea70e0a2e77fdc313ce9bdeccc4ac816101abe17572b96cc20c975874812f875828653704 - languageName: node - linkType: hard - -"@storybook/client-logger@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/client-logger@npm:8.1.11" - dependencies: - "@storybook/global": "npm:^5.0.0" - checksum: 10/4d2b652133a7aa51387d4667e428db084b81eb67d215cb401a7bdd7e7021a8e698c8b4a203a3ca17d0bef0a8edaeac09bdd37ba770fd87a150d038435835e47a - languageName: node - linkType: hard - -"@storybook/components@npm:~8.1.0": - version: 8.1.11 - resolution: "@storybook/components@npm:8.1.11" - dependencies: - "@radix-ui/react-dialog": "npm:^1.0.5" - "@radix-ui/react-slot": "npm:^1.0.2" - "@storybook/client-logger": "npm:8.1.11" - "@storybook/csf": "npm:^0.1.7" - "@storybook/global": "npm:^5.0.0" - "@storybook/icons": "npm:^1.2.5" - "@storybook/theming": "npm:8.1.11" - "@storybook/types": "npm:8.1.11" - memoizerific: "npm:^1.11.3" - util-deprecate: "npm:^1.0.2" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - checksum: 10/ccc2fdfd291d99eb706210baacd731c6742520b4bee85fa3e38931cc212daf0ead2365837899a6c6c5c4fcdb40c783d66c858f42134096656b4166b826c8d1ed - languageName: node - linkType: hard - -"@storybook/core-common@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/core-common@npm:8.1.11" - dependencies: - "@storybook/core-events": "npm:8.1.11" - "@storybook/csf-tools": "npm:8.1.11" - "@storybook/node-logger": "npm:8.1.11" - "@storybook/types": "npm:8.1.11" - "@yarnpkg/fslib": "npm:2.10.3" - "@yarnpkg/libzip": "npm:2.3.0" - chalk: "npm:^4.1.0" - cross-spawn: "npm:^7.0.3" - esbuild: "npm:^0.18.0 || ^0.19.0 || ^0.20.0" - esbuild-register: "npm:^3.5.0" - execa: "npm:^5.0.0" - file-system-cache: "npm:2.3.0" - find-cache-dir: "npm:^3.0.0" - find-up: "npm:^5.0.0" - fs-extra: "npm:^11.1.0" - glob: "npm:^10.0.0" - handlebars: "npm:^4.7.7" - lazy-universal-dotenv: "npm:^4.0.0" - node-fetch: "npm:^2.0.0" - picomatch: "npm:^2.3.0" - pkg-dir: "npm:^5.0.0" - prettier-fallback: "npm:prettier@^3" - pretty-hrtime: "npm:^1.0.3" - resolve-from: "npm:^5.0.0" - semver: "npm:^7.3.7" - tempy: "npm:^3.1.0" - tiny-invariant: "npm:^1.3.1" - ts-dedent: "npm:^2.0.0" - util: "npm:^0.12.4" - peerDependencies: - prettier: ^2 || ^3 - peerDependenciesMeta: - prettier: - optional: true - checksum: 10/f76cfba89418bc9c494bbd1f57cca308b1b1596c7a2f2a6452668e8db3b91e702c3a9d93a66b3b1c50271a7181b4fe0f19d0d77e7da327663a4daf8be7c10c38 - languageName: node - linkType: hard - -"@storybook/core-events@npm:7.6.20": - version: 7.6.20 - resolution: "@storybook/core-events@npm:7.6.20" - dependencies: - ts-dedent: "npm:^2.0.0" - checksum: 10/bd72649a262017f244aa6311352c1b38f2b38478c19b9aee4851bfdff5b2b11565dd768fe144f1304f9f130b533ffa4ab3fd2eea1361d202a76ff920cc377601 - languageName: node - linkType: hard - -"@storybook/core-events@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/core-events@npm:8.1.11" - dependencies: - "@storybook/csf": "npm:^0.1.7" - ts-dedent: "npm:^2.0.0" - checksum: 10/8628593b9604b189ef295532a1c2210a8e6fc5d8d7b9a6ff79553296985e77abc20e83a000a35c401bbfc39cc4734fdf346637d97508d6b6759603651ac29e8f - languageName: node - linkType: hard - -"@storybook/core-server@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/core-server@npm:8.1.11" - dependencies: - "@aw-web-design/x-default-browser": "npm:1.4.126" - "@babel/core": "npm:^7.24.4" - "@babel/parser": "npm:^7.24.4" - "@discoveryjs/json-ext": "npm:^0.5.3" - "@storybook/builder-manager": "npm:8.1.11" - "@storybook/channels": "npm:8.1.11" - "@storybook/core-common": "npm:8.1.11" - "@storybook/core-events": "npm:8.1.11" - "@storybook/csf": "npm:^0.1.7" - "@storybook/csf-tools": "npm:8.1.11" - "@storybook/docs-mdx": "npm:3.1.0-next.0" - "@storybook/global": "npm:^5.0.0" - "@storybook/manager": "npm:8.1.11" - "@storybook/manager-api": "npm:8.1.11" - "@storybook/node-logger": "npm:8.1.11" - "@storybook/preview-api": "npm:8.1.11" - "@storybook/telemetry": "npm:8.1.11" - "@storybook/types": "npm:8.1.11" - "@types/detect-port": "npm:^1.3.0" - "@types/diff": "npm:^5.0.9" - "@types/node": "npm:^18.0.0" - "@types/pretty-hrtime": "npm:^1.0.0" - "@types/semver": "npm:^7.3.4" - better-opn: "npm:^3.0.2" - chalk: "npm:^4.1.0" - cli-table3: "npm:^0.6.1" - compression: "npm:^1.7.4" - detect-port: "npm:^1.3.0" - diff: "npm:^5.2.0" - express: "npm:^4.17.3" - fs-extra: "npm:^11.1.0" - globby: "npm:^14.0.1" - lodash: "npm:^4.17.21" - open: "npm:^8.4.0" - pretty-hrtime: "npm:^1.0.3" - prompts: "npm:^2.4.0" - read-pkg-up: "npm:^7.0.1" - semver: "npm:^7.3.7" - telejson: "npm:^7.2.0" - tiny-invariant: "npm:^1.3.1" - ts-dedent: "npm:^2.0.0" - util: "npm:^0.12.4" - util-deprecate: "npm:^1.0.2" - watchpack: "npm:^2.2.0" - ws: "npm:^8.2.3" - checksum: 10/b5d8217389000d2e25d5f350bc9f3ccec40a24f35547ebb2f5037704bb1a5d78bfb5832b200ef980c33a23ba0394d1e1f42536deca8d3d86030b28bf1a99997f - languageName: node - linkType: hard - -"@storybook/core-webpack@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/core-webpack@npm:8.1.11" - dependencies: - "@storybook/core-common": "npm:8.1.11" - "@storybook/node-logger": "npm:8.1.11" - "@storybook/types": "npm:8.1.11" - "@types/node": "npm:^18.0.0" - ts-dedent: "npm:^2.0.0" - checksum: 10/95b19a133980ee7959e97795fdc4f2cd0aa4ac11602b0f22ffb0b070649eae0bc97a91ed2b326c04774719716e11e78b85641dcf24eb3f6a56f06073d8f8ce07 - languageName: node - linkType: hard - -"@storybook/csf-tools@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/csf-tools@npm:8.1.11" - dependencies: - "@babel/generator": "npm:^7.24.4" - "@babel/parser": "npm:^7.24.4" - "@babel/traverse": "npm:^7.24.1" - "@babel/types": "npm:^7.24.0" - "@storybook/csf": "npm:^0.1.7" - "@storybook/types": "npm:8.1.11" - fs-extra: "npm:^11.1.0" - recast: "npm:^0.23.5" - ts-dedent: "npm:^2.0.0" - checksum: 10/eb9efa4f2b1ad6bcb6a8f420f3dfbcf9c709c7e5a4b3b08669bfa9e798a0058b4a73ebb50ce82b877c57f051c73a9d7ff63ce1faa054cc5ceb3a01788bf47ef2 - languageName: node - linkType: hard - -"@storybook/csf@npm:^0.1.2, @storybook/csf@npm:^0.1.7": - version: 0.1.12 - resolution: "@storybook/csf@npm:0.1.12" - dependencies: - type-fest: "npm:^2.19.0" - checksum: 10/f661709de5bd68bfd4ced67df31ef26341168d6679bc13564cb024cfdbc8fdfa94d384267c20b3c858a3058b1ee8dbd71cea169245fcf7b28298890d6c3e1da4 - languageName: node - linkType: hard - -"@storybook/docs-mdx@npm:3.1.0-next.0": - version: 3.1.0-next.0 - resolution: "@storybook/docs-mdx@npm:3.1.0-next.0" - checksum: 10/ba02a76ebfc23c0ffb5b6ced32ed35d68a0a8438cf467f4d4ac23f66385a3cb4fba3a89ec00cb414e2aae8256ebb1f598ee6fc3920633e30dd18bcf0c0322561 - languageName: node - linkType: hard - -"@storybook/docs-tools@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/docs-tools@npm:8.1.11" - dependencies: - "@storybook/core-common": "npm:8.1.11" - "@storybook/core-events": "npm:8.1.11" - "@storybook/preview-api": "npm:8.1.11" - "@storybook/types": "npm:8.1.11" - "@types/doctrine": "npm:^0.0.3" - assert: "npm:^2.1.0" - doctrine: "npm:^3.0.0" - lodash: "npm:^4.17.21" - checksum: 10/baaba321d380c26918ce479bd4095d58efe63b14f7352c1f2577d535b80137f64d90583d98ccaf73780471c5f9132150a80038d0b16939a685cdf862dbcb462e - languageName: node - linkType: hard - -"@storybook/global@npm:^5.0.0": - version: 5.0.0 - resolution: "@storybook/global@npm:5.0.0" - checksum: 10/0e7b495f4fe7f36447e793926f1c0460ec07fd66f0da68e3150da5878f6043c9eeb9b41614a45c5ec0d48d5d383c59ca8f88b6dc7882a2a784ac9b20375d8edb - languageName: node - linkType: hard - -"@storybook/icons@npm:^1.2.5": - version: 1.3.0 - resolution: "@storybook/icons@npm:1.3.0" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - checksum: 10/927d7df7b16a4bab1340c303772938cbc932cdac0795be87491c09924f26a4222f2b574d650e9324e4a1459eeb394cce49b03f72411ae3a19889ab94c33e85b3 - languageName: node - linkType: hard - -"@storybook/manager-api@npm:7.6.20": - version: 7.6.20 - resolution: "@storybook/manager-api@npm:7.6.20" - dependencies: - "@storybook/channels": "npm:7.6.20" - "@storybook/client-logger": "npm:7.6.20" - "@storybook/core-events": "npm:7.6.20" - "@storybook/csf": "npm:^0.1.2" - "@storybook/global": "npm:^5.0.0" - "@storybook/router": "npm:7.6.20" - "@storybook/theming": "npm:7.6.20" - "@storybook/types": "npm:7.6.20" - dequal: "npm:^2.0.2" - lodash: "npm:^4.17.21" - memoizerific: "npm:^1.11.3" - store2: "npm:^2.14.2" - telejson: "npm:^7.2.0" - ts-dedent: "npm:^2.0.0" - checksum: 10/ad66099e1bdcab11ac6542c65849b7dcf905207b2e6cc2bff8684450ce2b9838e1e913160803e4cd0d59c708400a25f0225d1b083853e737516e99eab6636315 - languageName: node - linkType: hard - -"@storybook/manager-api@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/manager-api@npm:8.1.11" - dependencies: - "@storybook/channels": "npm:8.1.11" - "@storybook/client-logger": "npm:8.1.11" - "@storybook/core-events": "npm:8.1.11" - "@storybook/csf": "npm:^0.1.7" - "@storybook/global": "npm:^5.0.0" - "@storybook/icons": "npm:^1.2.5" - "@storybook/router": "npm:8.1.11" - "@storybook/theming": "npm:8.1.11" - "@storybook/types": "npm:8.1.11" - dequal: "npm:^2.0.2" - lodash: "npm:^4.17.21" - memoizerific: "npm:^1.11.3" - store2: "npm:^2.14.2" - telejson: "npm:^7.2.0" - ts-dedent: "npm:^2.0.0" - checksum: 10/aa042e1646182b37c3f14d4805d0a2c9b0120690a9973f63e2fc6c5020e9330e7af2ee67bad3c4abd0d43c2308551a7c0c6dbc845860de33b8b646dda0f45243 - languageName: node - linkType: hard - -"@storybook/manager@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/manager@npm:8.1.11" - checksum: 10/30630fe27f8e88592d3d13474862b4e722e86ddb216eb1cc36d824bb9990156f971f99c1eef4de911086f210ec3e847a99b13ac75c6703cd5cebbe27ef449c8d - languageName: node - linkType: hard - -"@storybook/node-logger@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/node-logger@npm:8.1.11" - checksum: 10/9f96c30cacae8c138f5f17f11e243a3d506faad606e4146e57a5cafdfbcb0d1f3397d6f17c36b2422db4e927451cf9c6de785cc6f81e078b729f7b906af39650 - languageName: node - linkType: hard - -"@storybook/preview-api@npm:7.6.20": - version: 7.6.20 - resolution: "@storybook/preview-api@npm:7.6.20" - dependencies: - "@storybook/channels": "npm:7.6.20" - "@storybook/client-logger": "npm:7.6.20" - "@storybook/core-events": "npm:7.6.20" - "@storybook/csf": "npm:^0.1.2" - "@storybook/global": "npm:^5.0.0" - "@storybook/types": "npm:7.6.20" - "@types/qs": "npm:^6.9.5" - dequal: "npm:^2.0.2" - lodash: "npm:^4.17.21" - memoizerific: "npm:^1.11.3" - qs: "npm:^6.10.0" - synchronous-promise: "npm:^2.0.15" - ts-dedent: "npm:^2.0.0" - util-deprecate: "npm:^1.0.2" - checksum: 10/1facc19c6f3723d509114e3023dca1d19fd28f199673c81b77a2f31dea6d13c31455ce3b0eb57841e77b438479df9a6b73f2d5d0d4636bb123a3637c81910b49 - languageName: node - linkType: hard - -"@storybook/preview-api@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/preview-api@npm:8.1.11" - dependencies: - "@storybook/channels": "npm:8.1.11" - "@storybook/client-logger": "npm:8.1.11" - "@storybook/core-events": "npm:8.1.11" - "@storybook/csf": "npm:^0.1.7" - "@storybook/global": "npm:^5.0.0" - "@storybook/types": "npm:8.1.11" - "@types/qs": "npm:^6.9.5" - dequal: "npm:^2.0.2" - lodash: "npm:^4.17.21" - memoizerific: "npm:^1.11.3" - qs: "npm:^6.10.0" - tiny-invariant: "npm:^1.3.1" - ts-dedent: "npm:^2.0.0" - util-deprecate: "npm:^1.0.2" - checksum: 10/228fc11266d4e33e4da2964b301d3d6f6ab40b7488d8e5dfcf556f7f5eb5db9270ddc1e4794995e3e4c30acf5ff91344c28306e648cfea7a6b22ca930ebc5826 - languageName: node - linkType: hard - -"@storybook/preview@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/preview@npm:8.1.11" - checksum: 10/e47d65f283fe1ba4a5e92add77f8c27a9c049e3283f1a4248ec34952bcd7ea9883437131bbc5b2e7c86ae5075039136067565680743c719198107ffa8688ba3f - languageName: node - linkType: hard - -"@storybook/router@npm:7.6.20": - version: 7.6.20 - resolution: "@storybook/router@npm:7.6.20" - dependencies: - "@storybook/client-logger": "npm:7.6.20" - memoizerific: "npm:^1.11.3" - qs: "npm:^6.10.0" - checksum: 10/dd7a7ef64efc4d7d133be1f17667b2d8d8a0b6ee8738ce971d783fb4b0c9213d52cacc08513287e36683b3ea93f94e91b5211a458dad466006213cb1bfa12f4a - languageName: node - linkType: hard - -"@storybook/router@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/router@npm:8.1.11" - dependencies: - "@storybook/client-logger": "npm:8.1.11" - memoizerific: "npm:^1.11.3" - qs: "npm:^6.10.0" - checksum: 10/f4ee8fbf67dfca302a00ad7a511ff4682aee25fc37b5d7c8aed9277a454221f1409175dcf422a432461af1e2eaf7c08d0eb930e4e17724f8a28d217e6e1e256f - languageName: node - linkType: hard - -"@storybook/telemetry@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/telemetry@npm:8.1.11" - dependencies: - "@storybook/client-logger": "npm:8.1.11" - "@storybook/core-common": "npm:8.1.11" - "@storybook/csf-tools": "npm:8.1.11" - chalk: "npm:^4.1.0" - detect-package-manager: "npm:^2.0.1" - fetch-retry: "npm:^5.0.2" - fs-extra: "npm:^11.1.0" - read-pkg-up: "npm:^7.0.1" - checksum: 10/221479581dae762955d8680f0907e8ef07f80f7cef55d9af4747f1a52e8b32e8c603c4b21671aa80c5994c3dddeae06543aaf8ae0586af416b05da3729a5b3b7 - languageName: node - linkType: hard - -"@storybook/theming@npm:7.6.20": - version: 7.6.20 - resolution: "@storybook/theming@npm:7.6.20" - dependencies: - "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.0" - "@storybook/client-logger": "npm:7.6.20" - "@storybook/global": "npm:^5.0.0" - memoizerific: "npm:^1.11.3" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 - checksum: 10/c26ba05d8fa1ba6c9d62b1d690dc55ba56874c493a7dfef5e85df89fc1da2ce8be09d7426071e43dbb3bf16ca4bc579a94f8f1a1ab14cfd29465a6a6eca5b158 - languageName: node - linkType: hard - -"@storybook/theming@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/theming@npm:8.1.11" - dependencies: - "@emotion/use-insertion-effect-with-fallbacks": "npm:^1.0.1" - "@storybook/client-logger": "npm:8.1.11" - "@storybook/global": "npm:^5.0.0" - memoizerific: "npm:^1.11.3" - peerDependencies: - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta - peerDependenciesMeta: - react: - optional: true - react-dom: - optional: true - checksum: 10/5b0f5e6c64dfeed37e136901f65b0bbdda64549ac04ea07cb10e0dbd1c7f4df257e0e807404a133ad61b8525223809f1d9ec3abff2361ca8fdcfee55cd92e6e2 - languageName: node - linkType: hard - -"@storybook/types@npm:7.6.20": - version: 7.6.20 - resolution: "@storybook/types@npm:7.6.20" - dependencies: - "@storybook/channels": "npm:7.6.20" - "@types/babel__core": "npm:^7.0.0" - "@types/express": "npm:^4.7.0" - file-system-cache: "npm:2.3.0" - checksum: 10/8da9513f1f34f606b114026af5fad5a7658ce5e2fa7af3363d9f3d481e5e22ed9ae6343f28aa9d14208bff07f489cb7f5ae3adcad5a603f8181e952b2ee29f3f - languageName: node - linkType: hard - -"@storybook/types@npm:8.1.11": - version: 8.1.11 - resolution: "@storybook/types@npm:8.1.11" - dependencies: - "@storybook/channels": "npm:8.1.11" - "@types/express": "npm:^4.7.0" - file-system-cache: "npm:2.3.0" - checksum: 10/80e2ba60cee54f4471025b9a986df78e12b6f6096769e6a2224549f2008235c2079965a71c9af05be26eafb8ddfaba8431ffcf4b8e39b229c08fb2d48670d851 - languageName: node - linkType: hard - "@stylistic/eslint-plugin-ts@npm:~2.7.0": version: 2.7.2 resolution: "@stylistic/eslint-plugin-ts@npm:2.7.2" @@ -13660,7 +12405,7 @@ __metadata: languageName: node linkType: hard -"@types/babel__core@npm:7.20.5, @types/babel__core@npm:^7.0.0, @types/babel__core@npm:^7.1.14": +"@types/babel__core@npm:7.20.5, @types/babel__core@npm:^7.1.14": version: 7.20.5 resolution: "@types/babel__core@npm:7.20.5" dependencies: @@ -13748,13 +12493,6 @@ __metadata: languageName: node linkType: hard -"@types/caseless@npm:*": - version: 0.12.5 - resolution: "@types/caseless@npm:0.12.5" - checksum: 10/f6a3628add76d27005495914c9c3873a93536957edaa5b69c63b46fe10b4649a6fecf16b676c1695f46aab851da47ec6047dcf3570fa8d9b6883492ff6d074e0 - languageName: node - linkType: hard - "@types/cheerio@npm:~0.22.35": version: 0.22.35 resolution: "@types/cheerio@npm:0.22.35" @@ -14099,28 +12837,7 @@ __metadata: languageName: node linkType: hard -"@types/detect-port@npm:^1.3.0": - version: 1.3.5 - resolution: "@types/detect-port@npm:1.3.5" - checksum: 10/923cf04c6a05af59090743baeb9948f1938ceb98c1f7ea93db7ac310210426b385aa00005d23039ebb8019a9d13e141f5246e9c733b290885018d722a4787921 - languageName: node - linkType: hard - -"@types/diff@npm:^5.0.9": - version: 5.2.3 - resolution: "@types/diff@npm:5.2.3" - checksum: 10/2b426a0e6936c6dd3b8da35146fea8786e3fab4f4d96fe0174ac6bf704ff933fddde08a95e125484568205cea56c3d7dca85b8e11465c0ee5ce8c1f7b877f6df - languageName: node - linkType: hard - -"@types/doctrine@npm:^0.0.3": - version: 0.0.3 - resolution: "@types/doctrine@npm:0.0.3" - checksum: 10/398c30efc903a750c71166c7385d763c98605723dfae23f0134d6de4d365a8f0a5585a0fe6f959569ff33646e7f43fa83bacb5f2a4d5929cd0f6163d06e4f6b3 - languageName: node - linkType: hard - -"@types/ejs@npm:^3.1.1, @types/ejs@npm:^3.1.2": +"@types/ejs@npm:^3.1.2": version: 3.1.5 resolution: "@types/ejs@npm:3.1.5" checksum: 10/918898fd279108087722c1713e2ddb0c152ab839397946d164db8a18b5bbd732af9746373882a9bcf4843d35c6b191a8f569a7a4e51e90726d24501b39f40367 @@ -14220,7 +12937,7 @@ __metadata: languageName: node linkType: hard -"@types/express@npm:^4.17.21, @types/express@npm:^4.7.0": +"@types/express@npm:^4.17.21": version: 4.17.21 resolution: "@types/express@npm:4.17.21" dependencies: @@ -14300,13 +13017,6 @@ __metadata: languageName: node linkType: hard -"@types/html-minifier-terser@npm:^6.0.0": - version: 6.1.0 - resolution: "@types/html-minifier-terser@npm:6.1.0" - checksum: 10/06bb3e1e8ebff43602c826d67f53f1fd3a6b9c751bfbc67d7ea4e85679446a639e20e60adad8c9d44ab4baf1337b3861b91e7e5e2be798575caf0cc1a5712552 - languageName: node - linkType: hard - "@types/http-cache-semantics@npm:*, @types/http-cache-semantics@npm:^4.0.2": version: 4.0.4 resolution: "@types/http-cache-semantics@npm:4.0.4" @@ -14547,13 +13257,6 @@ __metadata: languageName: node linkType: hard -"@types/pretty-hrtime@npm:^1.0.0": - version: 1.0.3 - resolution: "@types/pretty-hrtime@npm:1.0.3" - checksum: 10/288061dff992c8107d5c7b5a1277bbb0a314a27eb10087dea628a08fa37694a655191a69e25a212c95e61e498363c48ad9e281d23964a448f6c14100a6be0910 - languageName: node - linkType: hard - "@types/progress@npm:^2.0.5": version: 2.0.7 resolution: "@types/progress@npm:2.0.7" @@ -14573,13 +13276,6 @@ __metadata: languageName: node linkType: hard -"@types/prop-types@npm:*": - version: 15.7.14 - resolution: "@types/prop-types@npm:15.7.14" - checksum: 10/d0c5407b9ccc3dd5fae0ccf9b1007e7622ba5e6f1c18399b4f24dff33619d469da4b9fa918a374f19dc0d9fe6a013362aab0b844b606cfc10676efba3f5f736d - languageName: node - linkType: hard - "@types/q@npm:^0.0.32": version: 0.0.32 resolution: "@types/q@npm:0.0.32" @@ -14587,7 +13283,7 @@ __metadata: languageName: node linkType: hard -"@types/qs@npm:*, @types/qs@npm:^6.9.5": +"@types/qs@npm:*": version: 6.9.17 resolution: "@types/qs@npm:6.9.17" checksum: 10/fc3beda0be70e820ddabaa361e8dfec5e09b482b8f6cf1515615479a027dd06cd5ba0ffbd612b654c2605523f45f484c8905a475623d6cd0c4cadcf5d0c517f5 @@ -14601,46 +13297,6 @@ __metadata: languageName: node linkType: hard -"@types/react-dom@npm:^18.0.11": - version: 18.3.5 - resolution: "@types/react-dom@npm:18.3.5" - peerDependencies: - "@types/react": ^18.0.0 - checksum: 10/02095b326f373867498e0eb2b5ebb60f9bd9535db0d757ea13504c4b7d75e16605cf1d43ce7a2e67893d177b51db4357cabb2842fb4257c49427d02da1a14e09 - languageName: node - linkType: hard - -"@types/react@npm:^18.0.0, @types/react@npm:^18.0.37": - version: 18.3.16 - resolution: "@types/react@npm:18.3.16" - dependencies: - "@types/prop-types": "npm:*" - csstype: "npm:^3.0.2" - checksum: 10/971b4f46af9aeda85326000ba4a78973db6a1f11e10665c014e1274a68ae801469f057b56d850512694cf04a69cc264c07e6a507b4613874e8bf6ab4df7904f1 - languageName: node - linkType: hard - -"@types/request-promise-native@npm:^1.0.18": - version: 1.0.21 - resolution: "@types/request-promise-native@npm:1.0.21" - dependencies: - "@types/request": "npm:*" - checksum: 10/341af69971a366be4f3f1abf445f88a1edd3ef4a140cf0139d707fd6f66e3b10e94be5561bc3e137a713810f2e62af073b933061995eef4a3731fb7569be4448 - languageName: node - linkType: hard - -"@types/request@npm:*, @types/request@npm:^2.48.7": - version: 2.48.12 - resolution: "@types/request@npm:2.48.12" - dependencies: - "@types/caseless": "npm:*" - "@types/node": "npm:*" - "@types/tough-cookie": "npm:*" - form-data: "npm:^2.5.0" - checksum: 10/a7b3f9f14cacc18fe235bb8e57eff1232a04bd3fa3dad29371f24a5d96db2cd295a0c8b6b34ed7efa3efbbcff845febb02c9635cd68c54811c947ea66ae22090 - languageName: node - linkType: hard - "@types/resolve@npm:1.20.2": version: 1.20.2 resolution: "@types/resolve@npm:1.20.2" @@ -14671,7 +13327,7 @@ __metadata: languageName: node linkType: hard -"@types/semver@npm:7.5.8, @types/semver@npm:^7.1.0, @types/semver@npm:^7.3.13, @types/semver@npm:^7.3.4": +"@types/semver@npm:7.5.8, @types/semver@npm:^7.1.0, @types/semver@npm:^7.3.13": version: 7.5.8 resolution: "@types/semver@npm:7.5.8" checksum: 10/3496808818ddb36deabfe4974fd343a78101fa242c4690044ccdc3b95dcf8785b494f5d628f2f47f38a702f8db9c53c67f47d7818f2be1b79f2efb09692e1178 @@ -14823,13 +13479,6 @@ __metadata: languageName: node linkType: hard -"@types/webpack-env@npm:^1.18.0": - version: 1.18.5 - resolution: "@types/webpack-env@npm:1.18.5" - checksum: 10/3c8dd0b23d45e2d33abdfbae7f1d8f75ce23d54588b08943e833f4dba81eb683ac68672a75eccbdba8e008bc1647638803c1bcadc8cdfd1dd7142fa2c3f612de - languageName: node - linkType: hard - "@types/wrap-ansi@npm:^3.0.0": version: 3.0.0 resolution: "@types/wrap-ansi@npm:3.0.0" @@ -15668,17 +14317,6 @@ __metadata: languageName: node linkType: hard -"@yarnpkg/esbuild-plugin-pnp@npm:^3.0.0-rc.10": - version: 3.0.0-rc.15 - resolution: "@yarnpkg/esbuild-plugin-pnp@npm:3.0.0-rc.15" - dependencies: - tslib: "npm:^2.4.0" - peerDependencies: - esbuild: ">=0.10.0" - checksum: 10/454f521088c1fa24fda51f83ca4a50ba6e3bd147e5dee8c899e6bf24a7196186532c3abb18480e83395708ffb7238c9cac5b82595c3985ce93593b5afbd0a9f0 - languageName: node - linkType: hard - "@yarnpkg/extensions@npm:^2.0.4": version: 2.0.4 resolution: "@yarnpkg/extensions@npm:2.0.4" @@ -15688,16 +14326,6 @@ __metadata: languageName: node linkType: hard -"@yarnpkg/fslib@npm:2.10.3": - version: 2.10.3 - resolution: "@yarnpkg/fslib@npm:2.10.3" - dependencies: - "@yarnpkg/libzip": "npm:^2.3.0" - tslib: "npm:^1.13.0" - checksum: 10/29b38bd2054e3ec14677c16321a20ed69ac41d9d6f2fee7d9d7bc0a5a737e6d94add79cfa5f6ab867b5a98ab6aa2df3b53cb34f81159907cc308576a7bc08c67 - languageName: node - linkType: hard - "@yarnpkg/fslib@npm:^3.0.0, @yarnpkg/fslib@npm:^3.0.1, @yarnpkg/fslib@npm:^3.0.2, @yarnpkg/fslib@npm:^3.1.0, @yarnpkg/fslib@npm:^3.1.1": version: 3.1.1 resolution: "@yarnpkg/fslib@npm:3.1.1" @@ -15719,16 +14347,6 @@ __metadata: languageName: node linkType: hard -"@yarnpkg/libzip@npm:2.3.0, @yarnpkg/libzip@npm:^2.3.0": - version: 2.3.0 - resolution: "@yarnpkg/libzip@npm:2.3.0" - dependencies: - "@types/emscripten": "npm:^1.39.6" - tslib: "npm:^1.13.0" - checksum: 10/0eb147f39eab2830c29120d17e8bfba5aa15dedb940a7378070c67d4de08e9ba8d34068522e15e6b4db94ecaed4ad520e1e517588a36a348d1aa160bc36156ea - languageName: node - linkType: hard - "@yarnpkg/libzip@npm:^3.0.0, @yarnpkg/libzip@npm:^3.1.0": version: 3.1.0 resolution: "@yarnpkg/libzip@npm:3.1.0" @@ -16566,7 +15184,7 @@ __metadata: languageName: node linkType: hard -"ansi-html-community@npm:0.0.8, ansi-html-community@npm:^0.0.8": +"ansi-html-community@npm:^0.0.8": version: 0.0.8 resolution: "ansi-html-community@npm:0.0.8" bin: @@ -16661,13 +15279,6 @@ __metadata: languageName: node linkType: hard -"app-root-dir@npm:^1.0.2": - version: 1.0.2 - resolution: "app-root-dir@npm:1.0.2" - checksum: 10/d4b1653fc60b6465b982bf5a88b12051ed2d807d70609386a809306e1c636496f53522d61fa30f9f98c71aaae34f34e1651889cf17d81a44e3dafd2859d495ad - languageName: node - linkType: hard - "arch@npm:^3.0.0": version: 3.0.0 resolution: "arch@npm:3.0.0" @@ -16747,15 +15358,6 @@ __metadata: languageName: node linkType: hard -"aria-hidden@npm:^1.1.1": - version: 1.2.4 - resolution: "aria-hidden@npm:1.2.4" - dependencies: - tslib: "npm:^2.0.0" - checksum: 10/df4bc15423aaaba3729a7d40abcbf6d3fffa5b8fd5eb33d3ac8b7da0110c47552fca60d97f2e1edfbb68a27cae1da499f1c3896966efb3e26aac4e3b57e3cc8b - languageName: node - linkType: hard - "aria-query@npm:5.3.2": version: 5.3.2 resolution: "aria-query@npm:5.3.2" @@ -16914,19 +15516,6 @@ __metadata: languageName: node linkType: hard -"assert@npm:^2.1.0": - version: 2.1.0 - resolution: "assert@npm:2.1.0" - dependencies: - call-bind: "npm:^1.0.2" - is-nan: "npm:^1.3.2" - object-is: "npm:^1.1.5" - object.assign: "npm:^4.1.4" - util: "npm:^0.12.5" - checksum: 10/6b9d813c8eef1c0ac13feac5553972e4bd180ae16000d4eb5c0ded2489188737c75a5aacefc97a985008b37502f62fe1bad34da1a7481a54bbfabec3964c8aa7 - languageName: node - linkType: hard - "ast-types@npm:^0.13.4": version: 0.13.4 resolution: "ast-types@npm:0.13.4" @@ -16936,15 +15525,6 @@ __metadata: languageName: node linkType: hard -"ast-types@npm:^0.16.1": - version: 0.16.1 - resolution: "ast-types@npm:0.16.1" - dependencies: - tslib: "npm:^2.0.1" - checksum: 10/f569b475eb1c8cb93888cb6e7b7e36dc43fa19a77e4eb132cbff6e3eb1598ca60f850db6e60b070e5a0ee8c1559fca921dac0916e576f2f104e198793b0bdd8d - languageName: node - linkType: hard - "astral-regex@npm:^2.0.0": version: 2.0.0 resolution: "astral-regex@npm:2.0.0" @@ -17432,22 +16012,6 @@ __metadata: languageName: node linkType: hard -"better-opn@npm:^3.0.2": - version: 3.0.2 - resolution: "better-opn@npm:3.0.2" - dependencies: - open: "npm:^8.0.4" - checksum: 10/24668e5a837d0d2c0edf17ad5ebcfeb00a8a5578a5eb09f7a409e1a60617cdfea40b8ebfc95e5f12d9568157930d033e6805788fcf0780413ac982c95d3745d1 - languageName: node - linkType: hard - -"big-integer@npm:^1.6.44": - version: 1.6.52 - resolution: "big-integer@npm:1.6.52" - checksum: 10/4bc6ae152a96edc9f95020f5fc66b13d26a9ad9a021225a9f0213f7e3dc44269f423aa8c42e19d6ac4a63bb2b22140b95d10be8f9ca7a6d9aa1b22b330d1f514 - languageName: node - linkType: hard - "big.js@npm:^5.2.2": version: 5.2.2 resolution: "big.js@npm:5.2.2" @@ -17585,15 +16149,6 @@ __metadata: languageName: node linkType: hard -"bplist-parser@npm:^0.2.0": - version: 0.2.0 - resolution: "bplist-parser@npm:0.2.0" - dependencies: - big-integer: "npm:^1.6.44" - checksum: 10/15d31c1b0c7e0fb384e96349453879a33609d92d91b55a9ccee04b4be4b0645f1c823253d73326a1a23104521fbc45c2dd97fb05adf61863841b68cbb2ca7a3d - languageName: node - linkType: hard - "brace-expansion@npm:^1.1.7": version: 1.1.11 resolution: "brace-expansion@npm:1.1.11" @@ -17622,13 +16177,6 @@ __metadata: languageName: node linkType: hard -"browser-assert@npm:^1.2.1": - version: 1.2.1 - resolution: "browser-assert@npm:1.2.1" - checksum: 10/8b2407cd04c1ed592cf892dec35942b7d72635829221e0788c9a16c4d2afa8b7156bc9705b1c4b32c30d88136c576fda3cbcb8f494d6f865264c706ea8798d92 - languageName: node - linkType: hard - "browserslist@npm:^4.0.0, browserslist@npm:^4.21.10, browserslist@npm:^4.21.4, browserslist@npm:^4.21.5, browserslist@npm:^4.22.1, browserslist@npm:^4.23.0, browserslist@npm:^4.23.3, browserslist@npm:^4.24.0, browserslist@npm:^4.24.2": version: 4.24.3 resolution: "browserslist@npm:4.24.3" @@ -17861,7 +16409,7 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.0, call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7, call-bind@npm:^1.0.8": +"call-bind@npm:^1.0.2, call-bind@npm:^1.0.5, call-bind@npm:^1.0.6, call-bind@npm:^1.0.7, call-bind@npm:^1.0.8": version: 1.0.8 resolution: "call-bind@npm:1.0.8" dependencies: @@ -17904,16 +16452,6 @@ __metadata: languageName: node linkType: hard -"camel-case@npm:^4.1.2": - version: 4.1.2 - resolution: "camel-case@npm:4.1.2" - dependencies: - pascal-case: "npm:^3.1.2" - tslib: "npm:^2.0.3" - checksum: 10/bcbd25cd253b3cbc69be3f535750137dbf2beb70f093bdc575f73f800acc8443d34fd52ab8f0a2413c34f1e8203139ffc88428d8863e4dfe530cfb257a379ad6 - languageName: node - linkType: hard - "camelcase-keys@npm:^6.2.2": version: 6.2.2 resolution: "camelcase-keys@npm:6.2.2" @@ -18013,13 +16551,6 @@ __metadata: languageName: unknown linkType: soft -"case-sensitive-paths-webpack-plugin@npm:^2.4.0": - version: 2.4.0 - resolution: "case-sensitive-paths-webpack-plugin@npm:2.4.0" - checksum: 10/8187f4a6d9c1342a62e76466d4f2ed53e6c0ea73fdbf7779751538f2abe49738bfd16b43592367f00f37fdd593accf92162c1043c016dd6d9ccb55180b6b5fa7 - languageName: node - linkType: hard - "caseless@npm:~0.12.0": version: 0.12.0 resolution: "caseless@npm:0.12.0" @@ -18297,22 +16828,13 @@ __metadata: languageName: node linkType: hard -"cjs-module-lexer@npm:^1.0.0, cjs-module-lexer@npm:^1.2.3": +"cjs-module-lexer@npm:^1.0.0": version: 1.4.1 resolution: "cjs-module-lexer@npm:1.4.1" checksum: 10/6e830a1e00a34d416949bbc1924f3e8da65cef4a6a09e2b7fa35722e2d1c34bf378d3baca987b698d1cbc3eb83e44b044039b4e82755c96f30e0f03d1d227637 languageName: node linkType: hard -"clean-css@npm:^5.2.2": - version: 5.3.3 - resolution: "clean-css@npm:5.3.3" - dependencies: - source-map: "npm:~0.6.0" - checksum: 10/2db1ae37b384c8ff0a06a12bfa80f56cc02b4abcaaf340db98c0ae88a61dd67c856653fd8135ace6eb0ec13aeab3089c425d2e4238d2a2ad6b6917e6ccc74729 - languageName: node - linkType: hard - "clean-regexp@npm:^1.0.0": version: 1.0.0 resolution: "clean-regexp@npm:1.0.0" @@ -18377,19 +16899,6 @@ __metadata: languageName: node linkType: hard -"cli-table3@npm:^0.6.1": - version: 0.6.5 - resolution: "cli-table3@npm:0.6.5" - dependencies: - "@colors/colors": "npm:1.5.0" - string-width: "npm:^4.2.0" - dependenciesMeta: - "@colors/colors": - optional: true - checksum: 10/8dca71256f6f1367bab84c33add3f957367c7c43750a9828a4212ebd31b8df76bd7419d386e3391ac7419698a8540c25f1a474584028f35b170841cde2e055c5 - languageName: node - linkType: hard - "cli-truncate@npm:^2.1.0": version: 2.1.0 resolution: "cli-truncate@npm:2.1.0" @@ -18603,7 +17112,7 @@ __metadata: languageName: node linkType: hard -"color-string@npm:^1.6.0, color-string@npm:^1.9.0": +"color-string@npm:^1.6.0": version: 1.9.1 resolution: "color-string@npm:1.9.1" dependencies: @@ -18632,16 +17141,6 @@ __metadata: languageName: node linkType: hard -"color@npm:^4.2.3": - version: 4.2.3 - resolution: "color@npm:4.2.3" - dependencies: - color-convert: "npm:^2.0.1" - color-string: "npm:^1.9.0" - checksum: 10/b23f5e500a79ea22428db43d1a70642d983405c0dd1f95ef59dbdb9ba66afbb4773b334fa0b75bb10b0552fd7534c6b28d4db0a8b528f91975976e70973c0152 - languageName: node - linkType: hard - "colord@npm:^2.9.3": version: 2.9.3 resolution: "colord@npm:2.9.3" @@ -18979,13 +17478,6 @@ __metadata: languageName: node linkType: hard -"constants-browserify@npm:^1.0.0": - version: 1.0.0 - resolution: "constants-browserify@npm:1.0.0" - checksum: 10/49ef0babd907616dddde6905b80fe44ad5948e1eaaf6cf65d5f23a8c60c029ff63a1198c364665be1d6b2cb183d7e12921f33049cc126734ade84a3cfdbc83f6 - languageName: node - linkType: hard - "content-disposition@npm:0.5.4, content-disposition@npm:^0.5.4, content-disposition@npm:~0.5.2": version: 0.5.4 resolution: "content-disposition@npm:0.5.4" @@ -19573,15 +18065,6 @@ __metadata: languageName: node linkType: hard -"crypto-random-string@npm:^4.0.0": - version: 4.0.0 - resolution: "crypto-random-string@npm:4.0.0" - dependencies: - type-fest: "npm:^1.0.1" - checksum: 10/cd5d7ae13803de53680aaed4c732f67209af5988cbeec5f6b29082020347c2d8849ca921b2008be7d6bd1d9d198c3c3697e7441d6d0d3da1bf51e9e4d2032149 - languageName: node - linkType: hard - "csp_evaluator@npm:1.1.1": version: 1.1.1 resolution: "csp_evaluator@npm:1.1.1" @@ -19629,7 +18112,7 @@ __metadata: languageName: node linkType: hard -"css-loader@npm:^6.4.0, css-loader@npm:^6.7.1": +"css-loader@npm:^6.4.0": version: 6.11.0 resolution: "css-loader@npm:6.11.0" dependencies: @@ -19682,19 +18165,6 @@ __metadata: languageName: node linkType: hard -"css-select@npm:^4.1.3": - version: 4.3.0 - resolution: "css-select@npm:4.3.0" - dependencies: - boolbase: "npm:^1.0.0" - css-what: "npm:^6.0.1" - domhandler: "npm:^4.3.1" - domutils: "npm:^2.8.0" - nth-check: "npm:^2.0.1" - checksum: 10/8f7310c9af30ccaba8f72cb4a54d32232c53bf9ba05d019b693e16bfd7ba5df0affc1f4d74b1ee55923643d23b80a837eedcf60938c53356e479b04049ff9994 - languageName: node - linkType: hard - "css-select@npm:^5.1.0": version: 5.1.0 resolution: "css-select@npm:5.1.0" @@ -19738,7 +18208,7 @@ __metadata: languageName: node linkType: hard -"css-what@npm:^6.0.1, css-what@npm:^6.1.0": +"css-what@npm:^6.1.0": version: 6.1.0 resolution: "css-what@npm:6.1.0" checksum: 10/c67a3a2d0d81843af87f8bf0a4d0845b0f952377714abbb2884e48942409d57a2110eabee003609d02ee487b054614bdfcfc59ee265728ff105bd5aa221c1d0e @@ -19856,13 +18326,6 @@ __metadata: languageName: node linkType: hard -"csstype@npm:^3.0.2": - version: 3.1.3 - resolution: "csstype@npm:3.1.3" - checksum: 10/f593cce41ff5ade23f44e77521e3a1bcc2c64107041e1bf6c3c32adc5187d0d60983292fda326154d20b01079e24931aa5b08e4467cc488b60bb1e7f6d478ade - languageName: node - linkType: hard - "cytoscape-cose-bilkent@npm:^4.1.0": version: 4.1.0 resolution: "cytoscape-cose-bilkent@npm:4.1.0" @@ -20509,16 +18972,6 @@ __metadata: languageName: node linkType: hard -"default-browser-id@npm:3.0.0": - version: 3.0.0 - resolution: "default-browser-id@npm:3.0.0" - dependencies: - bplist-parser: "npm:^0.2.0" - untildify: "npm:^4.0.0" - checksum: 10/279c7ad492542e5556336b6c254a4eaf31b2c63a5433265655ae6e47301197b6cfb15c595a6fdc6463b2ff8e1a1a1ed3cba56038a60e1527ba4ab1628c6b9941 - languageName: node - linkType: hard - "default-browser-id@npm:^5.0.0": version: 5.0.0 resolution: "default-browser-id@npm:5.0.0" @@ -20593,7 +19046,7 @@ __metadata: languageName: node linkType: hard -"define-properties@npm:^1.1.3, define-properties@npm:^1.2.1": +"define-properties@npm:^1.2.1": version: 1.2.1 resolution: "define-properties@npm:1.2.1" dependencies: @@ -20695,7 +19148,7 @@ __metadata: languageName: node linkType: hard -"dequal@npm:^2.0.0, dequal@npm:^2.0.2": +"dequal@npm:^2.0.0": version: 2.0.3 resolution: "dequal@npm:2.0.3" checksum: 10/6ff05a7561f33603df87c45e389c9ac0a95e3c056be3da1a0c4702149e3a7f6fe5ffbb294478687ba51a9e95f3a60e8b6b9005993acd79c292c7d15f71964b6b @@ -20739,13 +19192,6 @@ __metadata: languageName: node linkType: hard -"detect-node-es@npm:^1.1.0": - version: 1.1.0 - resolution: "detect-node-es@npm:1.1.0" - checksum: 10/e46307d7264644975b71c104b9f028ed1d3d34b83a15b8a22373640ce5ea630e5640b1078b8ea15f202b54641da71e4aa7597093bd4b91f113db520a26a37449 - languageName: node - linkType: hard - "detect-node@npm:^2.0.4": version: 2.1.0 resolution: "detect-node@npm:2.1.0" @@ -20753,16 +19199,7 @@ __metadata: languageName: node linkType: hard -"detect-package-manager@npm:^2.0.1": - version: 2.0.1 - resolution: "detect-package-manager@npm:2.0.1" - dependencies: - execa: "npm:^5.1.1" - checksum: 10/e72b910182d5ad479198d4235be206ac64a479257b32201bb06f3c842cc34c65ea851d46f72cc1d4bf535bcc6c4b44b5b86bb29fe1192b8c9c07b46883672f28 - languageName: node - linkType: hard - -"detect-port@npm:^1.3.0, detect-port@npm:^1.5.1": +"detect-port@npm:^1.5.1": version: 1.6.1 resolution: "detect-port@npm:1.6.1" dependencies: @@ -20812,7 +19249,7 @@ __metadata: languageName: node linkType: hard -"diff@npm:^5.1.0, diff@npm:^5.2.0": +"diff@npm:^5.1.0": version: 5.2.0 resolution: "diff@npm:5.2.0" checksum: 10/01b7b440f83a997350a988e9d2f558366c0f90f15be19f4aa7f1bb3109a4e153dfc3b9fbf78e14ea725717017407eeaa2271e3896374a0181e8f52445740846d @@ -20846,35 +19283,6 @@ __metadata: languageName: node linkType: hard -"doctrine@npm:^3.0.0": - version: 3.0.0 - resolution: "doctrine@npm:3.0.0" - dependencies: - esutils: "npm:^2.0.2" - checksum: 10/b4b28f1df5c563f7d876e7461254a4597b8cabe915abe94d7c5d1633fed263fcf9a85e8d3836591fc2d040108e822b0d32758e5ec1fe31c590dc7e08086e3e48 - languageName: node - linkType: hard - -"dom-converter@npm:^0.2.0": - version: 0.2.0 - resolution: "dom-converter@npm:0.2.0" - dependencies: - utila: "npm:~0.4" - checksum: 10/71b22f56bce6255a963694a72860a99f08763cf500f02ff38ce4c7489f95b07e7a0069f10b04c7d200e21375474abe01232833ca1600f104bdee7173e493a5b9 - languageName: node - linkType: hard - -"dom-serializer@npm:^1.0.1": - version: 1.4.1 - resolution: "dom-serializer@npm:1.4.1" - dependencies: - domelementtype: "npm:^2.0.1" - domhandler: "npm:^4.2.0" - entities: "npm:^2.0.0" - checksum: 10/53b217bcfed4a0f90dd47f34f239b1c81fff53ffa39d164d722325817fdb554903b145c2d12c8421ce0df7d31c1b180caf7eacd3c86391dd925f803df8027dcc - languageName: node - linkType: hard - "dom-serializer@npm:^2.0.0": version: 2.0.0 resolution: "dom-serializer@npm:2.0.0" @@ -20886,7 +19294,7 @@ __metadata: languageName: node linkType: hard -"domelementtype@npm:^2.0.1, domelementtype@npm:^2.2.0, domelementtype@npm:^2.3.0": +"domelementtype@npm:^2.3.0": version: 2.3.0 resolution: "domelementtype@npm:2.3.0" checksum: 10/ee837a318ff702622f383409d1f5b25dd1024b692ef64d3096ff702e26339f8e345820f29a68bcdcea8cfee3531776b3382651232fbeae95612d6f0a75efb4f6 @@ -20902,15 +19310,6 @@ __metadata: languageName: node linkType: hard -"domhandler@npm:^4.0.0, domhandler@npm:^4.2.0, domhandler@npm:^4.3.1": - version: 4.3.1 - resolution: "domhandler@npm:4.3.1" - dependencies: - domelementtype: "npm:^2.2.0" - checksum: 10/e0d2af7403997a3ca040a9ace4a233b75ebe321e0ef628b417e46d619d65d47781b2f2038b6c2ef6e56e73e66aec99caf6a12c7e687ecff18ef74af6dfbde5de - languageName: node - linkType: hard - "domhandler@npm:^5.0.2, domhandler@npm:^5.0.3": version: 5.0.3 resolution: "domhandler@npm:5.0.3" @@ -20932,17 +19331,6 @@ __metadata: languageName: node linkType: hard -"domutils@npm:^2.5.2, domutils@npm:^2.8.0": - version: 2.8.0 - resolution: "domutils@npm:2.8.0" - dependencies: - dom-serializer: "npm:^1.0.1" - domelementtype: "npm:^2.2.0" - domhandler: "npm:^4.2.0" - checksum: 10/1f316a03f00b09a8893d4a25d297d5cbffd02c564509dede28ef72d5ce38d93f6d61f1de88d439f31b14a1d9b42f587ed711b9e8b1b4d3bf6001399832bfc4e0 - languageName: node - linkType: hard - "domutils@npm:^3.0.1, domutils@npm:^3.1.0": version: 3.1.0 resolution: "domutils@npm:3.1.0" @@ -20954,16 +19342,6 @@ __metadata: languageName: node linkType: hard -"dot-case@npm:^3.0.4": - version: 3.0.4 - resolution: "dot-case@npm:3.0.4" - dependencies: - no-case: "npm:^3.0.4" - tslib: "npm:^2.0.3" - checksum: 10/a65e3519414856df0228b9f645332f974f2bf5433370f544a681122eab59e66038fc3349b4be1cdc47152779dac71a5864f1ccda2f745e767c46e9c6543b1169 - languageName: node - linkType: hard - "dot-prop@npm:^5.1.0, dot-prop@npm:^5.2.0": version: 5.3.0 resolution: "dot-prop@npm:5.3.0" @@ -20980,13 +19358,6 @@ __metadata: languageName: node linkType: hard -"dotenv-expand@npm:^10.0.0": - version: 10.0.0 - resolution: "dotenv-expand@npm:10.0.0" - checksum: 10/b41eb278bc96b92cbf3037ca5f3d21e8845bf165dc06b6f9a0a03d278c2bd5a01c0cfbb3528ae3a60301ba1a8a9cace30e748c54b460753bc00d4c014b675597 - languageName: node - linkType: hard - "dotenv-expand@npm:~11.0.6": version: 11.0.7 resolution: "dotenv-expand@npm:11.0.7" @@ -20996,7 +19367,7 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:^16.0.0, dotenv@npm:^16.3.1, dotenv@npm:^16.4.5, dotenv@npm:~16.4.5": +"dotenv@npm:^16.3.1, dotenv@npm:^16.4.5, dotenv@npm:~16.4.5": version: 16.4.7 resolution: "dotenv@npm:16.4.7" checksum: 10/f13bfe97db88f0df4ec505eeffb8925ec51f2d56a3d0b6d916964d8b4af494e6fb1633ba5d09089b552e77ab2a25de58d70259b2c5ed45ec148221835fc99a0c @@ -21254,13 +19625,6 @@ __metadata: languageName: node linkType: hard -"entities@npm:^2.0.0": - version: 2.2.0 - resolution: "entities@npm:2.2.0" - checksum: 10/2c765221ee324dbe25e1b8ca5d1bf2a4d39e750548f2e85cbf7ca1d167d709689ddf1796623e66666ae747364c11ed512c03b48c5bbe70968d30f2a4009509b7 - languageName: node - linkType: hard - "entities@npm:^4.2.0, entities@npm:^4.3.0, entities@npm:^4.4.0, entities@npm:^4.5.0": version: 4.5.0 resolution: "entities@npm:4.5.0" @@ -21388,7 +19752,7 @@ __metadata: languageName: node linkType: hard -"es-module-lexer@npm:^1.2.1, es-module-lexer@npm:^1.5.0, es-module-lexer@npm:^1.5.3": +"es-module-lexer@npm:^1.2.1, es-module-lexer@npm:^1.5.3": version: 1.5.4 resolution: "es-module-lexer@npm:1.5.4" checksum: 10/f29c7c97a58eb17640dcbd71bd6ef754ad4f58f95c3073894573d29dae2cad43ecd2060d97ed5b866dfb7804d5590fb7de1d2c5339a5fceae8bd60b580387fc5 @@ -21458,24 +19822,6 @@ __metadata: languageName: node linkType: hard -"esbuild-plugin-alias@npm:^0.2.1": - version: 0.2.1 - resolution: "esbuild-plugin-alias@npm:0.2.1" - checksum: 10/afe2d2c8b5f09d5321cb8d9c0825e8a9f6e03c2d50df92f953a291d4620cc29eddb3da9e33b238f6d8f77738e0277bdcb831f127399449fecf78fb84c04e5da9 - languageName: node - linkType: hard - -"esbuild-register@npm:^3.5.0": - version: 3.6.0 - resolution: "esbuild-register@npm:3.6.0" - dependencies: - debug: "npm:^4.3.4" - peerDependencies: - esbuild: ">=0.12 <1" - checksum: 10/4ae1a016e3dad5b53c3d68cf07e31d8c1cec1a0b584038ece726097ac80bd33ab48fb224c766c9b341c04793837e652461eaca9327a116e7564f553b61ccca71 - languageName: node - linkType: hard - "esbuild-wasm@npm:0.23.0": version: 0.23.0 resolution: "esbuild-wasm@npm:0.23.0" @@ -21660,86 +20006,6 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.18.0 || ^0.19.0 || ^0.20.0": - version: 0.20.2 - resolution: "esbuild@npm:0.20.2" - dependencies: - "@esbuild/aix-ppc64": "npm:0.20.2" - "@esbuild/android-arm": "npm:0.20.2" - "@esbuild/android-arm64": "npm:0.20.2" - "@esbuild/android-x64": "npm:0.20.2" - "@esbuild/darwin-arm64": "npm:0.20.2" - "@esbuild/darwin-x64": "npm:0.20.2" - "@esbuild/freebsd-arm64": "npm:0.20.2" - "@esbuild/freebsd-x64": "npm:0.20.2" - "@esbuild/linux-arm": "npm:0.20.2" - "@esbuild/linux-arm64": "npm:0.20.2" - "@esbuild/linux-ia32": "npm:0.20.2" - "@esbuild/linux-loong64": "npm:0.20.2" - "@esbuild/linux-mips64el": "npm:0.20.2" - "@esbuild/linux-ppc64": "npm:0.20.2" - "@esbuild/linux-riscv64": "npm:0.20.2" - "@esbuild/linux-s390x": "npm:0.20.2" - "@esbuild/linux-x64": "npm:0.20.2" - "@esbuild/netbsd-x64": "npm:0.20.2" - "@esbuild/openbsd-x64": "npm:0.20.2" - "@esbuild/sunos-x64": "npm:0.20.2" - "@esbuild/win32-arm64": "npm:0.20.2" - "@esbuild/win32-ia32": "npm:0.20.2" - "@esbuild/win32-x64": "npm:0.20.2" - dependenciesMeta: - "@esbuild/aix-ppc64": - optional: true - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: 10/663215ab7e599651e00d61b528a63136e1f1d397db8b9c3712540af928c9476d61da95aefa81b7a8dfc7a9fdd7616fcf08395c27be68be8c99953fb461863ce4 - languageName: node - linkType: hard - "esbuild@npm:^0.21.3": version: 0.21.5 resolution: "esbuild@npm:0.21.5" @@ -22250,7 +20516,7 @@ __metadata: languageName: node linkType: hard -"esprima@npm:^4.0.0, esprima@npm:^4.0.1, esprima@npm:~4.0.0": +"esprima@npm:^4.0.0, esprima@npm:^4.0.1": version: 4.0.1 resolution: "esprima@npm:4.0.1" bin: @@ -22750,13 +21016,6 @@ __metadata: languageName: node linkType: hard -"fetch-retry@npm:^5.0.2": - version: 5.0.6 - resolution: "fetch-retry@npm:5.0.6" - checksum: 10/9d64b37f9d179fecf486725ada210d169375803b731304a9500754e094a2a6aa81630d946adbb313d7f9d54457ad0d17c3ed5c115034961a719e8a65faa8b77c - languageName: node - linkType: hard - "figgy-pudding@npm:^3.5.1": version: 3.5.2 resolution: "figgy-pudding@npm:3.5.2" @@ -22791,16 +21050,6 @@ __metadata: languageName: node linkType: hard -"file-system-cache@npm:2.3.0": - version: 2.3.0 - resolution: "file-system-cache@npm:2.3.0" - dependencies: - fs-extra: "npm:11.1.1" - ramda: "npm:0.29.0" - checksum: 10/8f0530aaa8bed115ef1b00f69accde8d1311d0eaffc6e37bb0b5057b8be79e6e960823025ea3c980a58147eed0ba690b9906c2229e132f5d96158e9b635a052c - languageName: node - linkType: hard - "file-type@npm:^19.0.0": version: 19.6.0 resolution: "file-type@npm:19.6.0" @@ -22877,7 +21126,7 @@ __metadata: languageName: node linkType: hard -"find-cache-dir@npm:^3.0.0, find-cache-dir@npm:^3.3.2": +"find-cache-dir@npm:^3.3.2": version: 3.3.2 resolution: "find-cache-dir@npm:3.3.2" dependencies: @@ -23097,29 +21346,6 @@ __metadata: languageName: node linkType: hard -"fork-ts-checker-webpack-plugin@npm:^8.0.0": - version: 8.0.0 - resolution: "fork-ts-checker-webpack-plugin@npm:8.0.0" - dependencies: - "@babel/code-frame": "npm:^7.16.7" - chalk: "npm:^4.1.2" - chokidar: "npm:^3.5.3" - cosmiconfig: "npm:^7.0.1" - deepmerge: "npm:^4.2.2" - fs-extra: "npm:^10.0.0" - memfs: "npm:^3.4.1" - minimatch: "npm:^3.0.4" - node-abort-controller: "npm:^3.0.1" - schema-utils: "npm:^3.1.1" - semver: "npm:^7.3.5" - tapable: "npm:^2.2.1" - peerDependencies: - typescript: ">3.6.0" - webpack: ^5.11.0 - checksum: 10/49be81a780271b0e1f8c230c32ddb54d7e7ca562565b29811a94d5e679607b947850b133c3bb63057a71e67ac717c6c86c6d0390d1ecc885b506ae9158cf9bb5 - languageName: node - linkType: hard - "form-data-encoder@npm:^2.1.2": version: 2.1.4 resolution: "form-data-encoder@npm:2.1.4" @@ -23127,18 +21353,6 @@ __metadata: languageName: node linkType: hard -"form-data@npm:^2.5.0": - version: 2.5.2 - resolution: "form-data@npm:2.5.2" - dependencies: - asynckit: "npm:^0.4.0" - combined-stream: "npm:^1.0.6" - mime-types: "npm:^2.1.12" - safe-buffer: "npm:^5.2.1" - checksum: 10/ef602e52f0bfcc8f8c346b8783f6dbd2fb271596788d42cf929dddaa50bd61e97da21f01464b4524e77872682264765e53c75ac1ab1466ea23f5c96de585faff - languageName: node - linkType: hard - "form-data@npm:^4.0.0": version: 4.0.1 resolution: "form-data@npm:4.0.1" @@ -23225,17 +21439,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:11.1.1": - version: 11.1.1 - resolution: "fs-extra@npm:11.1.1" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 10/c4e9fabf9762a70d1403316b7faa899f3d3303c8afa765b891c2210fdeba368461e04ae1203920b64ef6a7d066a39ab8cef2160b5ce8d1011bb4368688cd9bb7 - languageName: node - linkType: hard - "fs-extra@npm:9.1.0": version: 9.1.0 resolution: "fs-extra@npm:9.1.0" @@ -23406,13 +21609,6 @@ __metadata: languageName: node linkType: hard -"get-nonce@npm:^1.0.0": - version: 1.0.1 - resolution: "get-nonce@npm:1.0.1" - checksum: 10/ad5104871d114a694ecc506a2d406e2331beccb961fe1e110dc25556b38bcdbf399a823a8a375976cd8889668156a9561e12ebe3fa6a4c6ba169c8466c2ff868 - languageName: node - linkType: hard - "get-npm-tag-gh-action@workspace:tools/github-actions/get-npm-tag": version: 0.0.0-use.local resolution: "get-npm-tag-gh-action@workspace:tools/github-actions/get-npm-tag" @@ -23846,7 +22042,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^14.0.0, globby@npm:^14.0.1": +"globby@npm:^14.0.0": version: 14.0.2 resolution: "globby@npm:14.0.2" dependencies: @@ -24214,7 +22410,7 @@ __metadata: languageName: node linkType: hard -"html-entities@npm:^2.1.0, html-entities@npm:^2.4.0, html-entities@npm:^2.5.2": +"html-entities@npm:^2.4.0, html-entities@npm:^2.5.2": version: 2.5.2 resolution: "html-entities@npm:2.5.2" checksum: 10/4ec12ebdf2d5ba8192c68e1aef3c1e4a4f36b29246a0a88464fe278a54517d0196d3489af46a3145c7ecacb4fc5fd50497be19eb713b810acab3f0efcf36fdc2 @@ -24228,23 +22424,6 @@ __metadata: languageName: node linkType: hard -"html-minifier-terser@npm:^6.0.2": - version: 6.1.0 - resolution: "html-minifier-terser@npm:6.1.0" - dependencies: - camel-case: "npm:^4.1.2" - clean-css: "npm:^5.2.2" - commander: "npm:^8.3.0" - he: "npm:^1.2.0" - param-case: "npm:^3.0.4" - relateurl: "npm:^0.2.7" - terser: "npm:^5.10.0" - bin: - html-minifier-terser: cli.js - checksum: 10/a244fa944e002b57c66cc829a3f2dfdb9514b1833c2d838ada624964bf8c0afaf61d36c371758c7e44dedae95cea740a84d8d1067b916ed204f35175184d0e27 - languageName: node - linkType: hard - "html-tags@npm:^3.3.1": version: 3.3.1 resolution: "html-tags@npm:3.3.1" @@ -24259,39 +22438,6 @@ __metadata: languageName: node linkType: hard -"html-webpack-plugin@npm:^5.5.0": - version: 5.6.3 - resolution: "html-webpack-plugin@npm:5.6.3" - dependencies: - "@types/html-minifier-terser": "npm:^6.0.0" - html-minifier-terser: "npm:^6.0.2" - lodash: "npm:^4.17.21" - pretty-error: "npm:^4.0.0" - tapable: "npm:^2.0.0" - peerDependencies: - "@rspack/core": 0.x || 1.x - webpack: ^5.20.0 - peerDependenciesMeta: - "@rspack/core": - optional: true - webpack: - optional: true - checksum: 10/fd2bf1ac04823526c8b609555d027b38b9d61b4ba9f5c8116a37cc6b62d5b86cab1f478616e8c5344fee13663d2566f5c470c66265ecb1e9574dc38d0459889d - languageName: node - linkType: hard - -"htmlparser2@npm:^6.1.0": - version: 6.1.0 - resolution: "htmlparser2@npm:6.1.0" - dependencies: - domelementtype: "npm:^2.0.1" - domhandler: "npm:^4.0.0" - domutils: "npm:^2.5.2" - entities: "npm:^2.0.0" - checksum: 10/c9c34b0b722f5923c4ae05e59268aeb768582152969e3338a1cd3342b87f8dd2c0420f4745e46d2fd87f1b677ea2f314c3a93436ed8831905997e6347e081a5d - languageName: node - linkType: hard - "htmlparser2@npm:^8.0.1, htmlparser2@npm:^8.0.2": version: 8.0.2 resolution: "htmlparser2@npm:8.0.2" @@ -24989,16 +23135,6 @@ __metadata: languageName: node linkType: hard -"is-arguments@npm:^1.0.4": - version: 1.2.0 - resolution: "is-arguments@npm:1.2.0" - dependencies: - call-bound: "npm:^1.0.2" - has-tostringtag: "npm:^1.0.2" - checksum: 10/471a8ef631b8ee8829c43a8ab05c081700c0e25180c73d19f3bf819c1a8448c426a9e8e601f278973eca68966384b16ceb78b8c63af795b099cd199ea5afc457 - languageName: node - linkType: hard - "is-array-buffer@npm:^3.0.4": version: 3.0.4 resolution: "is-array-buffer@npm:3.0.4" @@ -25263,16 +23399,6 @@ __metadata: languageName: node linkType: hard -"is-nan@npm:^1.3.2": - version: 1.3.2 - resolution: "is-nan@npm:1.3.2" - dependencies: - call-bind: "npm:^1.0.0" - define-properties: "npm:^1.1.3" - checksum: 10/1f784d3472c09bc2e47acba7ffd4f6c93b0394479aa613311dc1d70f1bfa72eb0846c81350967722c959ba65811bae222204d6c65856fdce68f31986140c7b0e - languageName: node - linkType: hard - "is-negative-zero@npm:^2.0.3": version: 2.0.3 resolution: "is-negative-zero@npm:2.0.3" @@ -25477,7 +23603,7 @@ __metadata: languageName: node linkType: hard -"is-typed-array@npm:^1.1.13, is-typed-array@npm:^1.1.3": +"is-typed-array@npm:^1.1.13": version: 1.1.13 resolution: "is-typed-array@npm:1.1.13" dependencies: @@ -25780,15 +23906,6 @@ __metadata: languageName: node linkType: hard -"jasmine-spec-reporter@npm:^7.0.0": - version: 7.0.0 - resolution: "jasmine-spec-reporter@npm:7.0.0" - dependencies: - colors: "npm:1.4.0" - checksum: 10/69afad4935977c941b4d72fa81cc640d5f22cd35c7797468420d837cb94b469f9e6e767faa4112414511cc64e75ca9c7d641eba7df41e0d41c10b0c9bf4d0508 - languageName: node - linkType: hard - "jasmine@npm:2.8.0": version: 2.8.0 resolution: "jasmine@npm:2.8.0" @@ -26964,17 +25081,6 @@ __metadata: languageName: node linkType: hard -"lazy-universal-dotenv@npm:^4.0.0": - version: 4.0.0 - resolution: "lazy-universal-dotenv@npm:4.0.0" - dependencies: - app-root-dir: "npm:^1.0.2" - dotenv: "npm:^16.0.0" - dotenv-expand: "npm:^10.0.0" - checksum: 10/5aa4d1a01d108d1f4a565576b58e728be949ceccecef894d6a9de56cb2b8e2e033abd47424190d0a546cb22b4b4a3ab553346b9710c3294870660d4a3555dd34 - languageName: node - linkType: hard - "lazystream@npm:^1.0.0": version: 1.0.1 resolution: "lazystream@npm:1.0.1" @@ -27620,7 +25726,7 @@ __metadata: languageName: node linkType: hard -"lodash@npm:4.17.21, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.19, lodash@npm:^4.17.20, lodash@npm:^4.17.21": +"lodash@npm:4.17.21, lodash@npm:^4.17.14, lodash@npm:^4.17.15, lodash@npm:^4.17.20, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: 10/c08619c038846ea6ac754abd6dd29d2568aa705feb69339e836dfa8d8b09abbb2f859371e86863eda41848221f9af43714491467b5b0299122431e202bb0c532 @@ -27750,15 +25856,6 @@ __metadata: languageName: node linkType: hard -"lower-case@npm:^2.0.2": - version: 2.0.2 - resolution: "lower-case@npm:2.0.2" - dependencies: - tslib: "npm:^2.0.3" - checksum: 10/83a0a5f159ad7614bee8bf976b96275f3954335a84fad2696927f609ddae902802c4f3312d86668722e668bef41400254807e1d3a7f2e8c3eede79691aa1f010 - languageName: node - linkType: hard - "lowercase-keys@npm:^2.0.0": version: 2.0.0 resolution: "lowercase-keys@npm:2.0.0" @@ -27859,7 +25956,7 @@ __metadata: languageName: node linkType: hard -"magic-string@npm:^0.30.5, magic-string@npm:~0.30.2": +"magic-string@npm:~0.30.2": version: 0.30.17 resolution: "magic-string@npm:0.30.17" dependencies: @@ -27965,13 +26062,6 @@ __metadata: languageName: node linkType: hard -"map-or-similar@npm:^1.5.0": - version: 1.5.0 - resolution: "map-or-similar@npm:1.5.0" - checksum: 10/3cf43bcd0e7af41d7bade5f8b5be6bb9d021cc47e6008ad545d071cf3a709ba782884002f9eec6ccd51f572fc17841e07bf74628e0bc3694c33f4622b03e4b4c - languageName: node - linkType: hard - "map-stream@npm:0.0.7": version: 0.0.7 resolution: "map-stream@npm:0.0.7" @@ -28121,7 +26211,7 @@ __metadata: languageName: node linkType: hard -"memfs@npm:^3.4.1, memfs@npm:^3.4.12": +"memfs@npm:^3.4.1": version: 3.5.3 resolution: "memfs@npm:3.5.3" dependencies: @@ -28142,15 +26232,6 @@ __metadata: languageName: node linkType: hard -"memoizerific@npm:^1.11.3": - version: 1.11.3 - resolution: "memoizerific@npm:1.11.3" - dependencies: - map-or-similar: "npm:^1.5.0" - checksum: 10/72b6b80699777d000f03db6e15fdabcd4afe77feb45be51fe195cb230c64a368fcfcfbb976375eac3283bd8193d6b1a67ac3081cae07f64fca73f1aa568d59e3 - languageName: node - linkType: hard - "memorystream@npm:^0.3.1": version: 0.3.1 resolution: "memorystream@npm:0.3.1" @@ -29058,16 +27139,6 @@ __metadata: languageName: node linkType: hard -"no-case@npm:^3.0.4": - version: 3.0.4 - resolution: "no-case@npm:3.0.4" - dependencies: - lower-case: "npm:^2.0.2" - tslib: "npm:^2.0.3" - checksum: 10/0b2ebc113dfcf737d48dde49cfebf3ad2d82a8c3188e7100c6f375e30eafbef9e9124aadc3becef237b042fd5eb0aad2fd78669c20972d045bbe7fea8ba0be5c - languageName: node - linkType: hard - "nock@npm:^13.0.5": version: 13.5.6 resolution: "nock@npm:13.5.6" @@ -29145,7 +27216,7 @@ __metadata: languageName: node linkType: hard -"node-fetch@npm:^2.0.0, node-fetch@npm:^2.6.1": +"node-fetch@npm:^2.6.1": version: 2.7.0 resolution: "node-fetch@npm:2.7.0" dependencies: @@ -29650,16 +27721,6 @@ __metadata: languageName: node linkType: hard -"object-is@npm:^1.1.5": - version: 1.1.6 - resolution: "object-is@npm:1.1.6" - dependencies: - call-bind: "npm:^1.0.7" - define-properties: "npm:^1.2.1" - checksum: 10/4f6f544773a595da21c69a7531e0e1d6250670f4e09c55f47eb02c516035cfcb1b46ceb744edfd3ecb362309dbccb6d7f88e43bf42e4d4595ac10a329061053a - languageName: node - linkType: hard - "object-keys@npm:^1.1.1": version: 1.1.1 resolution: "object-keys@npm:1.1.1" @@ -29667,7 +27728,7 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.1.4, object.assign@npm:^4.1.5": +"object.assign@npm:^4.1.5": version: 4.1.5 resolution: "object.assign@npm:4.1.5" dependencies: @@ -29852,7 +27913,7 @@ __metadata: languageName: node linkType: hard -"open@npm:^8.0.0, open@npm:^8.0.4, open@npm:^8.4.0, open@npm:~8.4.0": +"open@npm:^8.0.0, open@npm:^8.4.0, open@npm:~8.4.0": version: 8.4.2 resolution: "open@npm:8.4.2" dependencies: @@ -30335,16 +28396,6 @@ __metadata: languageName: node linkType: hard -"param-case@npm:^3.0.4": - version: 3.0.4 - resolution: "param-case@npm:3.0.4" - dependencies: - dot-case: "npm:^3.0.4" - tslib: "npm:^2.0.3" - checksum: 10/b34227fd0f794e078776eb3aa6247442056cb47761e9cd2c4c881c86d84c64205f6a56ef0d70b41ee7d77da02c3f4ed2f88e3896a8fefe08bdfb4deca037c687 - languageName: node - linkType: hard - "parent-module@npm:^1.0.0": version: 1.0.1 resolution: "parent-module@npm:1.0.1" @@ -30496,16 +28547,6 @@ __metadata: languageName: node linkType: hard -"pascal-case@npm:^3.1.2": - version: 3.1.2 - resolution: "pascal-case@npm:3.1.2" - dependencies: - no-case: "npm:^3.0.4" - tslib: "npm:^2.0.3" - checksum: 10/ba98bfd595fc91ef3d30f4243b1aee2f6ec41c53b4546bfa3039487c367abaa182471dcfc830a1f9e1a0df00c14a370514fa2b3a1aacc68b15a460c31116873e - languageName: node - linkType: hard - "patch-console@npm:^1.0.0": version: 1.0.0 resolution: "patch-console@npm:1.0.0" @@ -30705,7 +28746,7 @@ __metadata: languageName: node linkType: hard -"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.0, picomatch@npm:^2.3.1": +"picomatch@npm:^2.0.4, picomatch@npm:^2.2.1, picomatch@npm:^2.2.3, picomatch@npm:^2.3.1": version: 2.3.1 resolution: "picomatch@npm:2.3.1" checksum: 10/60c2595003b05e4535394d1da94850f5372c9427ca4413b71210f437f7b2ca091dbd611c45e8b37d10036fa8eade25c1b8951654f9d3973bfa66a2ff4d3b08bc @@ -30899,15 +28940,6 @@ __metadata: languageName: node linkType: hard -"pkg-dir@npm:^5.0.0": - version: 5.0.0 - resolution: "pkg-dir@npm:5.0.0" - dependencies: - find-up: "npm:^5.0.0" - checksum: 10/b167bb8dac7bbf22b1d5e30ec223e6b064b84b63010c9d49384619a36734caf95ed23ad23d4f9bd975e8e8082b60a83395f43a89bb192df53a7c25a38ecb57d9 - languageName: node - linkType: hard - "pkg-dir@npm:^7.0.0": version: 7.0.0 resolution: "pkg-dir@npm:7.0.0" @@ -31522,25 +29554,6 @@ __metadata: languageName: node linkType: hard -"prettier-fallback@npm:prettier@^3": - version: 3.4.2 - resolution: "prettier@npm:3.4.2" - bin: - prettier: bin/prettier.cjs - checksum: 10/a3e806fb0b635818964d472d35d27e21a4e17150c679047f5501e1f23bd4aa806adf660f0c0d35214a210d5d440da6896c2e86156da55f221a57938278dc326e - languageName: node - linkType: hard - -"pretty-error@npm:^4.0.0": - version: 4.0.0 - resolution: "pretty-error@npm:4.0.0" - dependencies: - lodash: "npm:^4.17.20" - renderkid: "npm:^3.0.0" - checksum: 10/0212ad8742f8bb6f412f95b07d7f6874c55514ac4384f4f7de0defe77e767cca99f667c2316529f62a041fa654194a99c1ee7e321e1b7f794b5cc700777634d6 - languageName: node - linkType: hard - "pretty-format@npm:^29.0.0, pretty-format@npm:^29.7.0": version: 29.7.0 resolution: "pretty-format@npm:29.7.0" @@ -31552,13 +29565,6 @@ __metadata: languageName: node linkType: hard -"pretty-hrtime@npm:^1.0.3": - version: 1.0.3 - resolution: "pretty-hrtime@npm:1.0.3" - checksum: 10/0a462e88a0a3fd3320288fd8307f488974326ae8e13eea8c27f590f8ee767ccb59cf35bcae1cadff241cd8b72f3e373fc76ff1be95243649899bf8c816874af9 - languageName: node - linkType: hard - "prism-themes@npm:^1.9.0": version: 1.9.0 resolution: "prism-themes@npm:1.9.0" @@ -31675,7 +29681,7 @@ __metadata: languageName: node linkType: hard -"prompts@npm:^2.0.1, prompts@npm:^2.4.0, prompts@npm:^2.4.2": +"prompts@npm:^2.0.1, prompts@npm:^2.4.2": version: 2.4.2 resolution: "prompts@npm:2.4.2" dependencies: @@ -31848,13 +29854,6 @@ __metadata: languageName: node linkType: hard -"punycode@npm:^1.4.1": - version: 1.4.1 - resolution: "punycode@npm:1.4.1" - checksum: 10/af2700dde1a116791ff8301348ff344c47d6c224e875057237d1b5112035655fb07a6175cfdb8bf0e3a8cdfd2dc82b3a622e0aefd605566c0e949a6d0d1256a4 - languageName: node - linkType: hard - "punycode@npm:^2.1.0, punycode@npm:^2.1.1, punycode@npm:^2.3.1": version: 2.3.1 resolution: "punycode@npm:2.3.1" @@ -31906,7 +29905,7 @@ __metadata: languageName: node linkType: hard -"qs@npm:^6.10.0, qs@npm:^6.12.3, qs@npm:^6.4.0, qs@npm:^6.9.1": +"qs@npm:^6.4.0, qs@npm:^6.9.1": version: 6.13.1 resolution: "qs@npm:6.13.1" dependencies: @@ -31984,13 +29983,6 @@ __metadata: languageName: node linkType: hard -"ramda@npm:0.29.0": - version: 0.29.0 - resolution: "ramda@npm:0.29.0" - checksum: 10/b156660f2c58b4a13bcc4f1a0eabc1145d8db11d33d26a2fb03cd6adf3983a1c1f2bbaaf708c421029e9b09684262d056752623f7e62b79a503fb9217dec69d4 - languageName: node - linkType: hard - "randombytes@npm:^2.1.0": version: 2.1.0 resolution: "randombytes@npm:2.1.0" @@ -32043,18 +30035,6 @@ __metadata: languageName: node linkType: hard -"react-dom@npm:^18.0.0": - version: 18.3.1 - resolution: "react-dom@npm:18.3.1" - dependencies: - loose-envify: "npm:^1.1.0" - scheduler: "npm:^0.23.2" - peerDependencies: - react: ^18.3.1 - checksum: 10/3f4b73a3aa083091173b29812b10394dd06f4ac06aff410b74702cfb3aa29d7b0ced208aab92d5272919b612e5cda21aeb1d54191848cf6e46e9e354f3541f81 - languageName: node - linkType: hard - "react-is@npm:^18.0.0": version: 18.3.1 resolution: "react-is@npm:18.3.1" @@ -32075,57 +30055,6 @@ __metadata: languageName: node linkType: hard -"react-remove-scroll-bar@npm:^2.3.6": - version: 2.3.8 - resolution: "react-remove-scroll-bar@npm:2.3.8" - dependencies: - react-style-singleton: "npm:^2.2.2" - tslib: "npm:^2.0.0" - peerDependencies: - "@types/react": "*" - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/6c0f8cff98b9f49a4ee2263f1eedf12926dced5ce220fbe83bd93544460e2a7ec8ec39b35d1b2a75d2fced0b2d64afeb8e66f830431ca896e05a20585f9fc350 - languageName: node - linkType: hard - -"react-remove-scroll@npm:2.6.0": - version: 2.6.0 - resolution: "react-remove-scroll@npm:2.6.0" - dependencies: - react-remove-scroll-bar: "npm:^2.3.6" - react-style-singleton: "npm:^2.2.1" - tslib: "npm:^2.1.0" - use-callback-ref: "npm:^1.3.0" - use-sidecar: "npm:^1.1.2" - peerDependencies: - "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/9fac79e1c2ed2c85729bfe82f61ef4ae5ce51f478736a13892a9a11e05cbd4e9599f9f0e012cb5fc0719e18dc1dd687ab61f516193228615df636db8b851245e - languageName: node - linkType: hard - -"react-style-singleton@npm:^2.2.1, react-style-singleton@npm:^2.2.2": - version: 2.2.3 - resolution: "react-style-singleton@npm:2.2.3" - dependencies: - get-nonce: "npm:^1.0.0" - tslib: "npm:^2.0.0" - peerDependencies: - "@types/react": "*" - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/62498094ff3877a37f351b29e6cad9e38b2eb1ac3c0cb27ebf80aee96554f80b35e17bdb552bcd7ac8b7cb9904fea93ea5668f2057c73d38f90b5d46bb9b27ab - languageName: node - linkType: hard - "react@npm:^17.0.2": version: 17.0.2 resolution: "react@npm:17.0.2" @@ -32136,15 +30065,6 @@ __metadata: languageName: node linkType: hard -"react@npm:^18.0.0": - version: 18.3.1 - resolution: "react@npm:18.3.1" - dependencies: - loose-envify: "npm:^1.1.0" - checksum: 10/261137d3f3993eaa2368a83110466fc0e558bc2c7f7ae7ca52d94f03aac945f45146bd85e5f481044db1758a1dbb57879e2fcdd33924e2dde1bdc550ce73f7bf - languageName: node - linkType: hard - "read-cache@npm:^1.0.0": version: 1.0.0 resolution: "read-cache@npm:1.0.0" @@ -32330,19 +30250,6 @@ __metadata: languageName: node linkType: hard -"recast@npm:^0.23.5": - version: 0.23.9 - resolution: "recast@npm:0.23.9" - dependencies: - ast-types: "npm:^0.16.1" - esprima: "npm:~4.0.0" - source-map: "npm:~0.6.1" - tiny-invariant: "npm:^1.3.3" - tslib: "npm:^2.0.1" - checksum: 10/d60584be179d81a82fbe58b5bbe009aa42831ee114a21a3e3a22bda91334e0b8a1a4610dca8ecb7f9ea1426da4febc08134d3003085ad6ecee478d1808eb8796 - languageName: node - linkType: hard - "rechoir@npm:^0.8.0": version: 0.8.0 resolution: "rechoir@npm:0.8.0" @@ -32546,13 +30453,6 @@ __metadata: languageName: node linkType: hard -"relateurl@npm:^0.2.7": - version: 0.2.7 - resolution: "relateurl@npm:0.2.7" - checksum: 10/f5d6ba58f2a5d5076389090600c243a0ba7072bcf347490a09e4241e2427ccdb260b4e22cea7be4f1fcd3c2bf05908b1e0d0bc9605e3199d4ecf37af1d5681fa - languageName: node - linkType: hard - "release-gh-action@workspace:tools/github-actions/release": version: 0.0.0-use.local resolution: "release-gh-action@workspace:tools/github-actions/release" @@ -32593,19 +30493,6 @@ __metadata: languageName: node linkType: hard -"renderkid@npm:^3.0.0": - version: 3.0.0 - resolution: "renderkid@npm:3.0.0" - dependencies: - css-select: "npm:^4.1.3" - dom-converter: "npm:^0.2.0" - htmlparser2: "npm:^6.1.0" - lodash: "npm:^4.17.21" - strip-ansi: "npm:^6.0.1" - checksum: 10/434bd56d9930dd344bcba3ef7683f3dd893396b6bc7e8caa551a4cacbe75a9466dc6cf3d75bc324a5979278a73ef968d7854f8f660dbf1a52c38a73f1fb59b20 - languageName: node - linkType: hard - "repeat-string@npm:^1.6.1": version: 1.6.1 resolution: "repeat-string@npm:1.6.1" @@ -32635,31 +30522,7 @@ __metadata: languageName: node linkType: hard -"request-promise-core@npm:1.1.4": - version: 1.1.4 - resolution: "request-promise-core@npm:1.1.4" - dependencies: - lodash: "npm:^4.17.19" - peerDependencies: - request: ^2.34 - checksum: 10/79714e46b078c8de539c4de13e78878a3c7e3f33e194547c5ec3f0c8e47b0b222aa1718bbd2dbfb1a7990149041c6cc0be6c5916e03d99f4e75939f2a840046e - languageName: node - linkType: hard - -"request-promise-native@npm:^1.0.9": - version: 1.0.9 - resolution: "request-promise-native@npm:1.0.9" - dependencies: - request-promise-core: "npm:1.1.4" - stealthy-require: "npm:^1.1.1" - tough-cookie: "npm:^2.3.3" - peerDependencies: - request: ^2.34 - checksum: 10/6df0cf75cbddd08b568e462570fb63033f040efdf961f39af572e52821a831a13ee9027db7ba78f1d980759cc7913f2a12a34424deac5a0ec56c5d8ebbf45391 - languageName: node - linkType: hard - -"request@npm:^2.87.0, request@npm:^2.88.0": +"request@npm:^2.87.0": version: 2.88.2 resolution: "request@npm:2.88.2" dependencies: @@ -33177,7 +31040,7 @@ __metadata: languageName: node linkType: hard -"safe-buffer@npm:5.2.1, safe-buffer@npm:>=5.1.0, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.2, safe-buffer@npm:^5.2.1, safe-buffer@npm:~5.2.0": +"safe-buffer@npm:5.2.1, safe-buffer@npm:>=5.1.0, safe-buffer@npm:^5.0.1, safe-buffer@npm:^5.1.0, safe-buffer@npm:^5.1.2, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451 @@ -33368,15 +31231,6 @@ __metadata: languageName: node linkType: hard -"scheduler@npm:^0.23.2": - version: 0.23.2 - resolution: "scheduler@npm:0.23.2" - dependencies: - loose-envify: "npm:^1.1.0" - checksum: 10/e8d68b89d18d5b028223edf090092846868a765a591944760942b77ea1f69b17235f7e956696efbb62c8130ab90af7e0949bfb8eba7896335507317236966bc9 - languageName: node - linkType: hard - "schema-utils@npm:^3.1.1, schema-utils@npm:^3.2.0": version: 3.3.0 resolution: "schema-utils@npm:3.3.0" @@ -33480,7 +31334,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:7.6.3, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.7, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.3": +"semver@npm:7.6.3, semver@npm:^7.0.0, semver@npm:^7.1.1, semver@npm:^7.1.2, semver@npm:^7.3.4, semver@npm:^7.3.5, semver@npm:^7.3.8, semver@npm:^7.5.2, semver@npm:^7.5.3, semver@npm:^7.5.4, semver@npm:^7.6.0, semver@npm:^7.6.3": version: 7.6.3 resolution: "semver@npm:7.6.3" bin: @@ -34286,13 +32140,6 @@ __metadata: languageName: node linkType: hard -"stealthy-require@npm:^1.1.1": - version: 1.1.1 - resolution: "stealthy-require@npm:1.1.1" - checksum: 10/a408a51f5b6c1fe535e4459732ac0b66d7921583f89fc8289bfdc937a497fe8196219d1e04d234047349b90723ecff1a1cb4a92bef2315e01a3081dc72db8d41 - languageName: node - linkType: hard - "stoppable@npm:^1.1.0": version: 1.1.0 resolution: "stoppable@npm:1.1.0" @@ -34300,13 +32147,6 @@ __metadata: languageName: node linkType: hard -"store2@npm:^2.14.2": - version: 2.14.3 - resolution: "store2@npm:2.14.3" - checksum: 10/f95f6fbacff14cc3bb9e5e16ced2f29e2d706e30b248c16cf19abed8b2bb31d8f3907c8ccf1a5284d806fdcaf06e96710e4f4f52195e51522a452536beaf7af9 - languageName: node - linkType: hard - "stream-combiner@npm:^0.2.2": version: 0.2.2 resolution: "stream-combiner@npm:0.2.2" @@ -34621,7 +32461,7 @@ __metadata: languageName: node linkType: hard -"style-loader@npm:^3.3.0, style-loader@npm:^3.3.1": +"style-loader@npm:^3.3.0": version: 3.3.4 resolution: "style-loader@npm:3.3.4" peerDependencies: @@ -34846,13 +32686,6 @@ __metadata: languageName: node linkType: hard -"synchronous-promise@npm:^2.0.15": - version: 2.0.17 - resolution: "synchronous-promise@npm:2.0.17" - checksum: 10/dd74b1c05caab8ea34e26c8b52a0966efd70b0229ad39447ce066501dd6931d4d97a3f88b0f306880a699660cd334180a24d9738b385aed0bd0104a5be207ec1 - languageName: node - linkType: hard - "synckit@npm:^0.9.1": version: 0.9.2 resolution: "synckit@npm:0.9.2" @@ -34883,7 +32716,7 @@ __metadata: languageName: node linkType: hard -"tapable@npm:^2.0.0, tapable@npm:^2.1.1, tapable@npm:^2.2.0, tapable@npm:^2.2.1": +"tapable@npm:^2.1.1, tapable@npm:^2.2.0, tapable@npm:^2.2.1": version: 2.2.1 resolution: "tapable@npm:2.2.1" checksum: 10/1769336dd21481ae6347611ca5fca47add0962fd8e80466515032125eca0084a4f0ede11e65341b9c0018ef4e1cf1ad820adbb0fba7cc99865c6005734000b0a @@ -34990,22 +32823,6 @@ __metadata: languageName: node linkType: hard -"telejson@npm:^7.2.0": - version: 7.2.0 - resolution: "telejson@npm:7.2.0" - dependencies: - memoizerific: "npm:^1.11.3" - checksum: 10/6e89b3d3c45b5a2aced9132f6a968fcdf758c00be4c3acb115d7d81e95c9e04083a7a4a9b43057fcf48b101156c1607a38f5491615956acb28d4d1f78a4bda20 - languageName: node - linkType: hard - -"temp-dir@npm:^3.0.0": - version: 3.0.0 - resolution: "temp-dir@npm:3.0.0" - checksum: 10/577211e995d1d584dd60f1469351d45e8a5b4524e4a9e42d3bdd12cfde1d0bb8f5898311bef24e02aaafb69514c1feb58c7b4c33dcec7129da3b0861a4ca935b - languageName: node - linkType: hard - "temporal-polyfill@npm:^0.2.0": version: 0.2.5 resolution: "temporal-polyfill@npm:0.2.5" @@ -35022,19 +32839,7 @@ __metadata: languageName: node linkType: hard -"tempy@npm:^3.1.0": - version: 3.1.0 - resolution: "tempy@npm:3.1.0" - dependencies: - is-stream: "npm:^3.0.0" - temp-dir: "npm:^3.0.0" - type-fest: "npm:^2.12.2" - unique-string: "npm:^3.0.0" - checksum: 10/f5540bc24dcd9d41ab0b31e9eed73c3ef825080f1c8b1e854e4b73059155c889f72f5f7c15e8cd462d59aa10c9726e423c81d6a365d614b538c6cc78a1209cc6 - languageName: node - linkType: hard - -"terser-webpack-plugin@npm:^5.3.1, terser-webpack-plugin@npm:^5.3.10, terser-webpack-plugin@npm:^5.3.3": +"terser-webpack-plugin@npm:^5.3.10, terser-webpack-plugin@npm:^5.3.3": version: 5.3.11 resolution: "terser-webpack-plugin@npm:5.3.11" dependencies: @@ -35070,7 +32875,7 @@ __metadata: languageName: node linkType: hard -"terser@npm:^5.10.0, terser@npm:^5.31.1": +"terser@npm:^5.31.1": version: 5.37.0 resolution: "terser@npm:5.37.0" dependencies: @@ -35200,13 +33005,6 @@ __metadata: languageName: node linkType: hard -"tiny-invariant@npm:^1.3.1, tiny-invariant@npm:^1.3.3": - version: 1.3.3 - resolution: "tiny-invariant@npm:1.3.3" - checksum: 10/5e185c8cc2266967984ce3b352a4e57cb89dad5a8abb0dea21468a6ecaa67cd5bb47a3b7a85d08041008644af4f667fb8b6575ba38ba5fb00b3b5068306e59fe - languageName: node - linkType: hard - "tinycolor2@npm:^1.6.0": version: 1.6.0 resolution: "tinycolor2@npm:1.6.0" @@ -35323,16 +33121,6 @@ __metadata: languageName: node linkType: hard -"tough-cookie@npm:^2.3.3, tough-cookie@npm:~2.5.0": - version: 2.5.0 - resolution: "tough-cookie@npm:2.5.0" - dependencies: - psl: "npm:^1.1.28" - punycode: "npm:^2.1.1" - checksum: 10/024cb13a4d1fe9af57f4323dff765dd9b217cc2a69be77e3b8a1ca45600aa33a097b6ad949f225d885e904f4bd3ceccef104741ef202d8378e6ca78e850ff82f - languageName: node - linkType: hard - "tough-cookie@npm:^4.1.2": version: 4.1.4 resolution: "tough-cookie@npm:4.1.4" @@ -35354,6 +33142,16 @@ __metadata: languageName: node linkType: hard +"tough-cookie@npm:~2.5.0": + version: 2.5.0 + resolution: "tough-cookie@npm:2.5.0" + dependencies: + psl: "npm:^1.1.28" + punycode: "npm:^2.1.1" + checksum: 10/024cb13a4d1fe9af57f4323dff765dd9b217cc2a69be77e3b8a1ca45600aa33a097b6ad949f225d885e904f4bd3ceccef104741ef202d8378e6ca78e850ff82f + languageName: node + linkType: hard + "tr46@npm:^3.0.0": version: 3.0.0 resolution: "tr46@npm:3.0.0" @@ -35441,7 +33239,7 @@ __metadata: languageName: node linkType: hard -"ts-dedent@npm:^2.0.0, ts-dedent@npm:^2.2.0": +"ts-dedent@npm:^2.2.0": version: 2.2.0 resolution: "ts-dedent@npm:2.2.0" checksum: 10/93ed8f7878b6d5ed3c08d99b740010eede6bccfe64bce61c5a4da06a2c17d6ddbb80a8c49c2d15251de7594a4f93ffa21dd10e7be75ef66a4dc9951b4a94e2af @@ -35614,18 +33412,6 @@ __metadata: languageName: node linkType: hard -"tsconfig-paths-webpack-plugin@npm:^4.0.1": - version: 4.2.0 - resolution: "tsconfig-paths-webpack-plugin@npm:4.2.0" - dependencies: - chalk: "npm:^4.1.0" - enhanced-resolve: "npm:^5.7.0" - tapable: "npm:^2.2.1" - tsconfig-paths: "npm:^4.1.2" - checksum: 10/946f23a38a404bf2d3803b60b5af1d7a6cc85bed411c9feefa707656efd9007cdcee7eb0e860ca8690ba479810c7b94ce026f6ac70daa6c803e55aac809c86c4 - languageName: node - linkType: hard - "tsconfig-paths@npm:^3.15.0": version: 3.15.0 resolution: "tsconfig-paths@npm:3.15.0" @@ -35649,7 +33435,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:2, tslib@npm:2.8.1, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.0.3, tslib@npm:^2.1.0, tslib@npm:^2.2.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.6.2, tslib@npm:^2.6.3, tslib@npm:^2.7.0, tslib@npm:^2.8.0": +"tslib@npm:2, tslib@npm:2.8.1, tslib@npm:^2.0.0, tslib@npm:^2.0.1, tslib@npm:^2.1.0, tslib@npm:^2.2.0, tslib@npm:^2.3.0, tslib@npm:^2.3.1, tslib@npm:^2.4.0, tslib@npm:^2.6.2, tslib@npm:^2.6.3, tslib@npm:^2.7.0, tslib@npm:^2.8.0": version: 2.8.1 resolution: "tslib@npm:2.8.1" checksum: 10/3e2e043d5c2316461cb54e5c7fe02c30ef6dccb3384717ca22ae5c6b5bc95232a6241df19c622d9c73b809bea33b187f6dbc73030963e29950c2141bc32a79f7 @@ -35670,7 +33456,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^1.13.0, tslib@npm:^1.9.0": +"tslib@npm:^1.9.0": version: 1.14.1 resolution: "tslib@npm:1.14.1" checksum: 10/7dbf34e6f55c6492637adb81b555af5e3b4f9cc6b998fb440dac82d3b42bdc91560a35a5fb75e20e24a076c651438234da6743d139e4feabf0783f3cdfe1dddb @@ -35797,13 +33583,6 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^2.12.2, type-fest@npm:^2.19.0": - version: 2.19.0 - resolution: "type-fest@npm:2.19.0" - checksum: 10/7bf9e8fdf34f92c8bb364c0af14ca875fac7e0183f2985498b77be129dc1b3b1ad0a6b3281580f19e48c6105c037fb966ad9934520c69c6434d17fd0af4eed78 - languageName: node - linkType: hard - "type-fest@npm:^4.10.2": version: 4.30.1 resolution: "type-fest@npm:4.30.1" @@ -36225,15 +34004,6 @@ __metadata: languageName: node linkType: hard -"unique-string@npm:^3.0.0": - version: 3.0.0 - resolution: "unique-string@npm:3.0.0" - dependencies: - crypto-random-string: "npm:^4.0.0" - checksum: 10/1a1e2e7d02eab1bb10f720475da735e1990c8a5ff34edd1a3b6bc31590cb4210b7a1233d779360cc622ce11c211e43afa1628dd658f35d3e6a89964b622940df - languageName: node - linkType: hard - "unist-util-is@npm:^6.0.0": version: 6.0.0 resolution: "unist-util-is@npm:6.0.0" @@ -36397,16 +34167,6 @@ __metadata: languageName: node linkType: hard -"url@npm:^0.11.0": - version: 0.11.4 - resolution: "url@npm:0.11.4" - dependencies: - punycode: "npm:^1.4.1" - qs: "npm:^6.12.3" - checksum: 10/e787d070f0756518b982a4653ef6cdf4d9030d8691eee2d483344faf2b530b71d302287fa63b292299455fea5075c502a5ad5f920cb790e95605847f957a65e4 - languageName: node - linkType: hard - "urlpattern-polyfill@npm:10.0.0": version: 10.0.0 resolution: "urlpattern-polyfill@npm:10.0.0" @@ -36414,37 +34174,6 @@ __metadata: languageName: node linkType: hard -"use-callback-ref@npm:^1.3.0": - version: 1.3.2 - resolution: "use-callback-ref@npm:1.3.2" - dependencies: - tslib: "npm:^2.0.0" - peerDependencies: - "@types/react": ^16.8.0 || ^17.0.0 || ^18.0.0 - react: ^16.8.0 || ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/3be76eae71b52ab233b4fde974eddeff72e67e6723100a0c0297df4b0d60daabedfa706ffb314d0a52645f2c1235e50fdbd53d99f374eb5df68c74d412e98a9b - languageName: node - linkType: hard - -"use-sidecar@npm:^1.1.2": - version: 1.1.3 - resolution: "use-sidecar@npm:1.1.3" - dependencies: - detect-node-es: "npm:^1.1.0" - tslib: "npm:^2.0.0" - peerDependencies: - "@types/react": "*" - react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc - peerDependenciesMeta: - "@types/react": - optional: true - checksum: 10/2fec05eb851cdfc4a4657b1dfb434e686f346c3265ffc9db8a974bb58f8128bd4a708a3cc00e8f51655fccf81822ed4419ebed42f41610589e3aab0cf2492edb - languageName: node - linkType: hard - "util-deprecate@npm:^1.0.1, util-deprecate@npm:^1.0.2, util-deprecate@npm:~1.0.1": version: 1.0.2 resolution: "util-deprecate@npm:1.0.2" @@ -36452,26 +34181,6 @@ __metadata: languageName: node linkType: hard -"util@npm:^0.12.4, util@npm:^0.12.5": - version: 0.12.5 - resolution: "util@npm:0.12.5" - dependencies: - inherits: "npm:^2.0.3" - is-arguments: "npm:^1.0.4" - is-generator-function: "npm:^1.0.7" - is-typed-array: "npm:^1.1.3" - which-typed-array: "npm:^1.1.2" - checksum: 10/61a10de7753353dd4d744c917f74cdd7d21b8b46379c1e48e1c4fd8e83f8190e6bd9978fc4e5102ab6a10ebda6019d1b36572fa4a325e175ec8b789a121f6147 - languageName: node - linkType: hard - -"utila@npm:~0.4": - version: 0.4.0 - resolution: "utila@npm:0.4.0" - checksum: 10/b068d8cb140588da0d0c80ee3c14c6b75d3f68760d8a1c6c3908d0270e9e4056454ff16189586481b7382926c44674f6929d08e06eaf9ec8f62736cd900169c5 - languageName: node - linkType: hard - "utils-merge@npm:1.0.1": version: 1.0.1 resolution: "utils-merge@npm:1.0.1" @@ -36769,7 +34478,7 @@ __metadata: languageName: node linkType: hard -"watchpack@npm:^2.2.0, watchpack@npm:^2.4.1": +"watchpack@npm:^2.4.1": version: 2.4.2 resolution: "watchpack@npm:2.4.2" dependencies: @@ -36907,24 +34616,6 @@ __metadata: languageName: node linkType: hard -"webpack-dev-middleware@npm:^6.1.2": - version: 6.1.3 - resolution: "webpack-dev-middleware@npm:6.1.3" - dependencies: - colorette: "npm:^2.0.10" - memfs: "npm:^3.4.12" - mime-types: "npm:^2.1.31" - range-parser: "npm:^1.2.1" - schema-utils: "npm:^4.0.0" - peerDependencies: - webpack: ^5.0.0 - peerDependenciesMeta: - webpack: - optional: true - checksum: 10/ee699430c33c4dfa2a016becc85e32a9b04aa0b6edbce0bb173c4dfd29c80c77d192d14fd2f2ec500dbdede4e0f1c5557993aa20a04a44190750a1e8e13f6d67 - languageName: node - linkType: hard - "webpack-dev-server@npm:5.0.4": version: 5.0.4 resolution: "webpack-dev-server@npm:5.0.4" @@ -37016,17 +34707,6 @@ __metadata: languageName: node linkType: hard -"webpack-hot-middleware@npm:^2.25.1": - version: 2.26.1 - resolution: "webpack-hot-middleware@npm:2.26.1" - dependencies: - ansi-html-community: "npm:0.0.8" - html-entities: "npm:^2.1.0" - strip-ansi: "npm:^6.0.0" - checksum: 10/69fa1a25284eeba386c99b0b159d61b0cf800d21379ae7b03203c52e5d58d9082d96ca9f98ebbd8436165cd105de496a0356a8191064b277abff4d3c56825843 - languageName: node - linkType: hard - "webpack-merge@npm:6.0.1": version: 6.0.1 resolution: "webpack-merge@npm:6.0.1" @@ -37078,24 +34758,17 @@ __metadata: languageName: node linkType: hard -"webpack-virtual-modules@npm:^0.5.0": - version: 0.5.0 - resolution: "webpack-virtual-modules@npm:0.5.0" - checksum: 10/65a8f90c7e6609ba1c4ad2697bb83ae662485893fb545f6aa9a74e3a5d7485bbc50ef057c5bc3feca25d3153ebf9c097c233cbe4d67b52418bc84348dfb20c1a - languageName: node - linkType: hard - -"webpack@npm:5, webpack@npm:^5.80.0, webpack@npm:^5.88.0": - version: 5.97.1 - resolution: "webpack@npm:5.97.1" +"webpack@npm:5.94.0": + version: 5.94.0 + resolution: "webpack@npm:5.94.0" dependencies: - "@types/eslint-scope": "npm:^3.7.7" - "@types/estree": "npm:^1.0.6" - "@webassemblyjs/ast": "npm:^1.14.1" - "@webassemblyjs/wasm-edit": "npm:^1.14.1" - "@webassemblyjs/wasm-parser": "npm:^1.14.1" - acorn: "npm:^8.14.0" - browserslist: "npm:^4.24.0" + "@types/estree": "npm:^1.0.5" + "@webassemblyjs/ast": "npm:^1.12.1" + "@webassemblyjs/wasm-edit": "npm:^1.12.1" + "@webassemblyjs/wasm-parser": "npm:^1.12.1" + acorn: "npm:^8.7.1" + acorn-import-attributes: "npm:^1.9.5" + browserslist: "npm:^4.21.10" chrome-trace-event: "npm:^1.0.2" enhanced-resolve: "npm:^5.17.1" es-module-lexer: "npm:^1.2.1" @@ -37117,21 +34790,21 @@ __metadata: optional: true bin: webpack: bin/webpack.js - checksum: 10/665bd3b8c84b20f0b1f250159865e4d3e9b76c682030313d49124d5f8e96357ccdcc799dd9fe0ebf010fdb33dbc59d9863d79676a308e868e360ac98f7c09987 + checksum: 10/648449c5fbbb0839814116e3b2b044ac6c75a7ba272435155ddeb1e64dfaa2f8079be3adfbb691f648b69900756ce0f6fb73beab0ced3cf5e0fd46868b4593a6 languageName: node linkType: hard -"webpack@npm:5.94.0": - version: 5.94.0 - resolution: "webpack@npm:5.94.0" +"webpack@npm:^5.80.0, webpack@npm:^5.88.0": + version: 5.97.1 + resolution: "webpack@npm:5.97.1" dependencies: - "@types/estree": "npm:^1.0.5" - "@webassemblyjs/ast": "npm:^1.12.1" - "@webassemblyjs/wasm-edit": "npm:^1.12.1" - "@webassemblyjs/wasm-parser": "npm:^1.12.1" - acorn: "npm:^8.7.1" - acorn-import-attributes: "npm:^1.9.5" - browserslist: "npm:^4.21.10" + "@types/eslint-scope": "npm:^3.7.7" + "@types/estree": "npm:^1.0.6" + "@webassemblyjs/ast": "npm:^1.14.1" + "@webassemblyjs/wasm-edit": "npm:^1.14.1" + "@webassemblyjs/wasm-parser": "npm:^1.14.1" + acorn: "npm:^8.14.0" + browserslist: "npm:^4.24.0" chrome-trace-event: "npm:^1.0.2" enhanced-resolve: "npm:^5.17.1" es-module-lexer: "npm:^1.2.1" @@ -37153,7 +34826,7 @@ __metadata: optional: true bin: webpack: bin/webpack.js - checksum: 10/648449c5fbbb0839814116e3b2b044ac6c75a7ba272435155ddeb1e64dfaa2f8079be3adfbb691f648b69900756ce0f6fb73beab0ced3cf5e0fd46868b4593a6 + checksum: 10/665bd3b8c84b20f0b1f250159865e4d3e9b76c682030313d49124d5f8e96357ccdcc799dd9fe0ebf010fdb33dbc59d9863d79676a308e868e360ac98f7c09987 languageName: node linkType: hard @@ -37333,7 +35006,7 @@ __metadata: languageName: node linkType: hard -"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.2": +"which-typed-array@npm:^1.1.14, which-typed-array@npm:^1.1.16": version: 1.1.16 resolution: "which-typed-array@npm:1.1.16" dependencies: @@ -37553,7 +35226,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:8.18.0, ws@npm:^8.11.0, ws@npm:^8.16.0, ws@npm:^8.18.0, ws@npm:^8.2.3": +"ws@npm:8.18.0, ws@npm:^8.11.0, ws@npm:^8.16.0, ws@npm:^8.18.0": version: 8.18.0 resolution: "ws@npm:8.18.0" peerDependencies: