Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into nx_updates
Browse files Browse the repository at this point in the history
* origin/main:
  chore - Fix audit issues (#2528)
  chore: apply latest changesets
  fix(fiori-gen-shared): fix reading README template in fiori gen shared (#2595)
  chore: apply latest changesets
  fix(odata-service-inquirer): i18n bundles not loading (#2592)
  chore: apply latest changesets
  feat(btp-utils): adds options for list destination api (#2586)
  chore: apply latest changesets
  fix(abap-deploy-config-writer): add `reentranceTicket` auth type to all deploy configs when passed in (#2556)
  chore: apply latest changesets
  feat: add namespaces to annotation template (#2452)
  chore: apply latest changesets
  fix: Handle higher layer changes (#2536)
  chore: apply latest changesets
  fix(cf-deploy-config-writer): cleanup based on local testing when using headless (#2546)
  • Loading branch information
devinea committed Nov 19, 2024
2 parents 4360675 + 2a72ad2 commit 13efcb8
Show file tree
Hide file tree
Showing 162 changed files with 2,828 additions and 2,660 deletions.
16 changes: 16 additions & 0 deletions .changeset/two-emus-melt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"@sap-ux/adp-tooling": patch
"@sap-ux/backend-proxy-middleware": patch
"@sap-ux/cards-editor-middleware": patch
"@sap-ux/cf-deploy-config-writer": patch
"@sap-ux-private/preview-middleware-client": patch
"@sap-ux/preview-middleware": patch
"@sap-ux/reload-middleware": patch
"@sap-ux/serve-static-middleware": patch
"@sap-ux/ui-components": patch
"@sap-ux/ui-prompting": patch
"@sap-ux/ui5-proxy-middleware": patch
"@sap-ux-private/ui-prompting-examples": patch
---

chore - Fix audit issues
6 changes: 6 additions & 0 deletions examples/fe-fpm-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @sap-ux/fe-fpm-cli

## 0.0.45

### Patch Changes

- @sap-ux/fe-fpm-writer@0.31.18

## 0.0.44

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/fe-fpm-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sap-ux/fe-fpm-cli",
"version": "0.0.44",
"version": "0.0.45",
"description": "A simple CLI to prompt required information to create a building block using the fe-fpm-writer module's prompt and generate functions.",
"license": "Apache-2.0",
"private": true,
Expand Down
15 changes: 15 additions & 0 deletions examples/odata-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# @sap-ux/odata-cli

## 0.15.12

### Patch Changes

- Updated dependencies [a62ff25]
- @sap-ux/btp-utils@0.17.0
- @sap-ux/axios-extension@1.17.4

## 0.15.11

### Patch Changes

- Updated dependencies [8237f83]
- @sap-ux/axios-extension@1.17.3

## 0.15.10

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/odata-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sap-ux/odata-cli",
"version": "0.15.10",
"version": "0.15.12",
"description": "Simple example CLI uing the @sap-ux/axios-extension module to fetch metadata and annotations from an SAP system.",
"license": "Apache-2.0",
"private": true,
Expand Down
37 changes: 37 additions & 0 deletions examples/simple-generator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
# @sap-ux/generator-simple-fe

## 1.0.84

### Patch Changes

- @sap-ux/fiori-elements-writer@1.3.27
- @sap-ux/fiori-freestyle-writer@1.2.24

## 1.0.83

### Patch Changes

- Updated dependencies [a62ff25]
- @sap-ux/btp-utils@0.17.0
- @sap-ux/axios-extension@1.17.4
- @sap-ux/system-access@0.5.19
- @sap-ux/fiori-elements-writer@1.3.26
- @sap-ux/fiori-freestyle-writer@1.2.23

## 1.0.82

### Patch Changes

- @sap-ux/fiori-elements-writer@1.3.25
- @sap-ux/fiori-freestyle-writer@1.2.22
- @sap-ux/axios-extension@1.17.3
- @sap-ux/system-access@0.5.18

## 1.0.81

### Patch Changes

- Updated dependencies [8237f83]
- @sap-ux/axios-extension@1.17.3
- @sap-ux/system-access@0.5.18
- @sap-ux/fiori-elements-writer@1.3.24
- @sap-ux/fiori-freestyle-writer@1.2.21

## 1.0.80

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-generator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sap-ux/generator-simple-fe",
"version": "1.0.80",
"version": "1.0.84",
"description": "Simple example of a yeoman generator for Fiori elements.",
"license": "Apache-2.0",
"private": true,
Expand Down
8 changes: 4 additions & 4 deletions examples/ui-prompting-examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
"@sap-ux/i18n": "workspace:*",
"@sap-ux/project-access": "workspace:*",
"@storybook/addons": "7.6.17",
"@storybook/components": "8.1.11",
"@storybook/react": "8.1.11",
"@storybook/react-webpack5": "8.1.11",
"@storybook/components": "8.4.2",
"@storybook/react": "8.4.2",
"@storybook/react-webpack5": "8.4.2",
"@types/inquirer": "8.2.6",
"@types/mem-fs": "1.1.2",
"@types/mem-fs-editor": "7.0.1",
Expand All @@ -62,7 +62,7 @@
"react-dom": "16.14.0",
"sass": "1.66.1",
"sass-loader": "13.3.2",
"storybook": "8.1.11",
"storybook": "8.4.2",
"storybook-addon-turbo-build": "2.0.1",
"style-loader": "3.3.3",
"ts-loader": "9.4.4",
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "@SAP/ux-tools-team",
"private": true,
"devDependencies": {
"@changesets/cli": "2.27.7",
"@changesets/cli": "2.27.9",
"@playwright/test": "1.39.0",
"@types/jest": "29.5.5",
"@types/node": "18.11.9",
Expand Down Expand Up @@ -61,7 +61,8 @@
"packageManager": "[email protected]",
"pnpm": {
"overrides": {
"router>path-to-regexp": "0.1.10"
"router>path-to-regexp": "0.1.10",
"cross-spawn": "7.0.5"
}
}
}
39 changes: 39 additions & 0 deletions packages/abap-deploy-config-inquirer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
# @sap-ux/abap-deploy-config-inquirer

## 1.0.24

### Patch Changes

- Updated dependencies [575ff89]
- @sap-ux/fiori-generator-shared@0.7.10
- @sap-ux/inquirer-common@0.5.3

## 1.0.23

### Patch Changes

- a62ff25: adds new options for listing destinations api
- Updated dependencies [a62ff25]
- @sap-ux/btp-utils@0.17.0
- @sap-ux/axios-extension@1.17.4
- @sap-ux/fiori-generator-shared@0.7.9
- @sap-ux/inquirer-common@0.5.2
- @sap-ux/system-access@0.5.19

## 1.0.22

### Patch Changes

- Updated dependencies [1beac7e]
- @sap-ux/ui5-config@0.25.2
- @sap-ux/axios-extension@1.17.3
- @sap-ux/fiori-generator-shared@0.7.8
- @sap-ux/system-access@0.5.18
- @sap-ux/inquirer-common@0.5.1

## 1.0.21

### Patch Changes

- Updated dependencies [8237f83]
- @sap-ux/axios-extension@1.17.3
- @sap-ux/system-access@0.5.18

## 1.0.20

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/abap-deploy-config-inquirer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://github.com/SAP/open-ux-tools.git",
"directory": "packages/abap-deploy-config-inquirer"
},
"version": "1.0.20",
"version": "1.0.24",
"license": "Apache-2.0",
"main": "dist/index.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion packages/abap-deploy-config-inquirer/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ export async function getAbapSystems(): Promise<{
let backendSystems;

if (isAppStudio()) {
destinations = await listDestinations();
destinations = await listDestinations({
stripS4HCApiHosts: true
});
cachedDestinations = destinations;
} else {
const systemStore = await getService<BackendSystem, BackendSystemKey>({
Expand Down
22 changes: 22 additions & 0 deletions packages/abap-deploy-config-writer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# @sap-ux/abap-deploy-config-writer

## 0.0.62

### Patch Changes

- @sap-ux/system-access@0.5.19

## 0.0.61

### Patch Changes

- 1beac7e: adds reentrance ticket auth type to deploy config
- Updated dependencies [1beac7e]
- @sap-ux/ui5-config@0.25.2
- @sap-ux/project-access@1.28.7
- @sap-ux/system-access@0.5.18

## 0.0.60

### Patch Changes

- @sap-ux/system-access@0.5.18

## 0.0.59

### Patch Changes
Expand Down
3 changes: 1 addition & 2 deletions packages/abap-deploy-config-writer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://github.com/SAP/open-ux-tools.git",
"directory": "packages/abap-deploy-config-writer"
},
"version": "0.0.59",
"version": "0.0.62",
"license": "Apache-2.0",
"main": "dist/index.js",
"scripts": {
Expand All @@ -31,7 +31,6 @@
"node": ">=18.x"
},
"dependencies": {
"@sap-ux/btp-utils": "workspace:*",
"@sap-ux/project-access": "workspace:*",
"@sap-ux/system-access": "workspace:*",
"@sap-ux/ui5-config": "workspace:*",
Expand Down
27 changes: 17 additions & 10 deletions packages/abap-deploy-config-writer/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { isAppStudio } from '@sap-ux/btp-utils';
import { UI5Config } from '@sap-ux/ui5-config';
import { UI5_TASK_FLATTEN_LIB } from './constants';
import type { Editor } from 'mem-fs-editor';
import type { AbapDeployConfig, AbapTarget } from '@sap-ux/ui5-config';
import type { AbapDeployConfig, AbapTarget, CustomTask, NodeComment } from '@sap-ux/ui5-config';

/**
* Updates the base config with the required custom tasks.
Expand Down Expand Up @@ -33,6 +32,7 @@ export function updateBaseConfig(isLib: boolean, basePath: string, baseConfig: U
*/
export async function getDeployConfig(config: AbapDeployConfig, baseConfig: UI5Config): Promise<UI5Config> {
const target: Partial<AbapTarget> = {};
const comments: NodeComment<CustomTask<AbapDeployConfig>>[] = [];

if (config.target.destination !== undefined) {
target.destination = config.target.destination;
Expand All @@ -47,13 +47,13 @@ export async function getDeployConfig(config: AbapDeployConfig, baseConfig: UI5C
target.scp = true;
}

if (!isAppStudio()) {
const backendConfigs = baseConfig.getBackendConfigsFromFioriToolsProxydMiddleware();
for (const backend of backendConfigs) {
if (backend.authenticationType === 'reentranceTicket') {
target.authenticationType = 'reentranceTicket';
}
}
if (config.target.authenticationType === 'reentranceTicket') {
target.authenticationType = 'reentranceTicket';
comments.push({
path: 'configuration.target.authenticationType',
comment: ' SAML support for vscode',
key: 'authenticationType'
});
}

const baseUi5Doc = baseConfig.removeConfig('server');
Expand All @@ -64,7 +64,14 @@ export async function getDeployConfig(config: AbapDeployConfig, baseConfig: UI5C
location: 'beginning'
});

ui5DeployConfig.addAbapDeployTask(target as unknown as AbapTarget, config.app, true, ['/test/'], config.index);
ui5DeployConfig.addAbapDeployTask(
target as unknown as AbapTarget,
config.app,
true,
['/test/'],
config.index,
comments
);

return ui5DeployConfig;
}
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ builder:
target:
url: https://example.com
client: '000'
authenticationType: reentranceTicket
authenticationType: reentranceTicket # SAML support for vscode
app:
name: test-js-app
package: TESTPKG12
Expand Down
15 changes: 7 additions & 8 deletions packages/abap-deploy-config-writer/test/unit/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
import { join } from 'path';
import { generate } from '../../src';
import fsExtra from 'fs-extra';
import { isAppStudio } from '@sap-ux/btp-utils';
import type { AbapDeployConfig, BspApp } from '@sap-ux/ui5-config';
import type { DeployConfigOptions } from '../../src/types';

jest.mock('@sap-ux/btp-utils', () => ({
isAppStudio: jest.fn()
}));
const mockIsAppStudio = isAppStudio as jest.Mock;

describe('generate', () => {
const outputDir = join(__dirname, '../test-output');
const debug = !!process.env['UX_DEBUG'];
Expand All @@ -31,7 +25,13 @@ describe('generate', () => {
}> = [
{
name: 'test-js-app',
config,
config: {
...config,
target: {
...config.target,
authenticationType: 'reentranceTicket'
}
},
isAppStudio: false
},
{
Expand Down Expand Up @@ -59,7 +59,6 @@ describe('generate', () => {

test.each(testConfigs)('Generate deployment configs: $name', async ({ name, options, config, isAppStudio }) => {
(config.app as BspApp).name = name;
mockIsAppStudio.mockReturnValueOnce(isAppStudio);
const testPath = join(outputDir, name);
fsExtra.mkdirSync(outputDir, { recursive: true });
fsExtra.mkdirSync(testPath);
Expand Down
3 changes: 0 additions & 3 deletions packages/abap-deploy-config-writer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
"outDir": "dist"
},
"references": [
{
"path": "../btp-utils"
},
{
"path": "../project-access"
},
Expand Down
Loading

0 comments on commit 13efcb8

Please sign in to comment.