@sap-ux/fiori-migration-writer 0.0.16 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,5 @@
1
- import type { BackendConfig, Message, NeoappDestination, TemplateData } from '../types.js';
1
+ import type { FioriToolsProxyConfigBackend } from '@sap-ux/ui5-config';
2
+ import type { Message, NeoappDestination, TemplateData } from '../types.js';
2
3
  /**
3
4
  * Updates YAML backends by removing default /sap backend if no datasource exists
4
5
  * and adding backends for service paths that don't start with /sap
@@ -20,5 +21,5 @@ export declare function updateYamlBackends(proxyConfigInput: any, templateData:
20
21
  * @param strict - Enable strict validation mode (WARNING becomes ERROR)
21
22
  * @returns Array of updated backend configurations
22
23
  */
23
- export declare function updateNeoYamlBackends(neoappDestinations: NeoappDestination[], proxyBackend: BackendConfig[], templateData: TemplateData, messages: Message[], destination: string | undefined, firstNeoAppDestination?: string, strict?: boolean): BackendConfig[];
24
+ export declare function updateNeoYamlBackends(neoappDestinations: NeoappDestination[], proxyBackend: FioriToolsProxyConfigBackend[], templateData: TemplateData, messages: Message[], destination: string | undefined, firstNeoAppDestination?: string, strict?: boolean): FioriToolsProxyConfigBackend[];
24
25
  //# sourceMappingURL=backend.d.ts.map
@@ -63,7 +63,7 @@ export function updateNeoYamlBackends(neoappDestinations, proxyBackend, template
63
63
  };
64
64
  if (destination === backend.destination || firstNeoAppDestination === backend.destination) {
65
65
  //destination from the webview
66
- backend.url = templateData.ui5Yaml?.proxyHost;
66
+ backend.url = templateData.ui5Yaml?.proxyHost ?? '';
67
67
  backend.destination = templateData.ui5Yaml?.destination;
68
68
  if (templateData.ui5Yaml?.client !== '') {
69
69
  backend.client = templateData.ui5Yaml?.client;
@@ -5,7 +5,7 @@ import { basename, join, sep as pathSep } from 'node:path';
5
5
  import { isAppStudio } from '@sap-ux/btp-utils';
6
6
  import { FioriElementsVersion } from '../project-spec-types.js';
7
7
  import { createLaunchConfig } from '@sap-ux/launch-config';
8
- import { ODataVersion } from '../types.js';
8
+ import { ODataVersion } from '@sap-ux/axios-extension';
9
9
  /**
10
10
  * Generate and write VS Code launch configuration for the migrated project
11
11
  *
@@ -4,7 +4,7 @@
4
4
  import type { ManifestNamespace } from '../project-spec-types.js';
5
5
  import { FioriElementsVersion } from '../project-spec-types.js';
6
6
  import type { NeoappDestination } from '../types.js';
7
- import { ODataVersion } from '../types.js';
7
+ import { ODataVersion } from '@sap-ux/axios-extension';
8
8
  /**
9
9
  * Result of neo-app and OData version processing
10
10
  */
@@ -1,5 +1,5 @@
1
1
  import { FioriElementsVersion } from '../project-spec-types.js';
2
- import { ODataVersion } from '../types.js';
2
+ import { ODataVersion } from '@sap-ux/axios-extension';
3
3
  /**
4
4
  * Process neo-app configuration and determine OData version
5
5
  * Handles destination extraction, UI5 version, and OData version determination
@@ -8,7 +8,7 @@ import { FioriElementsVersion } from '../project-spec-types.js';
8
8
  import { propertyEditorTaskProjectTypes, isGenerateIndex } from '../utils/common.js';
9
9
  import { determineSapUxLayer } from '../utils/migration-utils.js';
10
10
  import { MigrationTypes } from '../utils/constants.js';
11
- import { ODataVersion } from '../types.js';
11
+ import { ODataVersion } from '@sap-ux/axios-extension';
12
12
  const TEST_FILES = [
13
13
  { type: 'suite', path: 'test/testsuite.qunit.html' },
14
14
  { type: 'suite', path: 'test/qunit.runner.testsuite.html' },
@@ -1,18 +1,10 @@
1
1
  import type { FioriElementsVersion, SapAppSourceTemplate, Manifest } from './project-spec-types.js';
2
2
  import type { MigrationTypes, postMigrationAction } from './utils/constants.js';
3
- import type { CdsUi5PluginInfo } from '@sap-ux/project-access';
4
- import type { Annotations } from '@sap-ux/axios-extension';
3
+ import type { UI5FlexLayer } from '@sap-ux/project-access';
4
+ import type { Annotations, ODataVersion } from '@sap-ux/axios-extension';
5
5
  import type { Editor } from 'mem-fs-editor';
6
6
  export type { ProjectFolder } from './types/project-folder.js';
7
7
  export { isProjectFolderArray } from './types/project-folder.js';
8
- /**
9
- * OData versions supported by the catalog service
10
- */
11
- export declare const ODataVersion: {
12
- readonly v2: "2";
13
- readonly v4: "4";
14
- };
15
- export type ODataVersion = (typeof ODataVersion)[keyof typeof ODataVersion];
16
8
  /**
17
9
  * package.json script entries (commands and tasks)
18
10
  */
@@ -20,11 +12,6 @@ export type Script = {
20
12
  name: string;
21
13
  command: string;
22
14
  };
23
- export declare const SapUxLayer: {
24
- readonly VENDOR: "VENDOR";
25
- readonly CUSTOMER_BASE: "CUSTOMER_BASE";
26
- };
27
- export type SapUxLayer = (typeof SapUxLayer)[keyof typeof SapUxLayer];
28
15
  /** package.json interface */
29
16
  export interface PackageJson {
30
17
  name: string;
@@ -45,7 +32,7 @@ export interface PackageJson {
45
32
  localStartFile?: string;
46
33
  runTasks?: Script[];
47
34
  enableEslint: boolean;
48
- sapuxLayer?: SapUxLayer;
35
+ sapuxLayer?: UI5FlexLayer;
49
36
  }
50
37
  export declare const DatasourceType: {
51
38
  readonly FILE: "File";
@@ -76,14 +63,6 @@ export type NeoappDestination = {
76
63
  name: string;
77
64
  entryPath?: string;
78
65
  };
79
- export interface BackendConfig {
80
- path: string;
81
- url?: string;
82
- client?: string;
83
- destination?: string;
84
- destinationInstance?: string;
85
- pathPrefix?: string;
86
- }
87
66
  export interface EntityConfig {
88
67
  mainEntity?: {
89
68
  entityName: string;
@@ -212,7 +191,6 @@ export type TemplateMap = {
212
191
  export interface TemplateData<P extends ProjectMigrate = ProjectMigrate, S extends Service = Service> {
213
192
  project: Partial<P>;
214
193
  service: Partial<S>;
215
- readMe?: Partial<ReadMe>;
216
194
  ui5Yaml?: Partial<Ui5Yaml> & Partial<Ui5MockYaml>;
217
195
  packageJson?: Partial<PackageJsonMigrate>;
218
196
  appId?: string;
@@ -267,6 +245,8 @@ export interface Project {
267
245
  * SECURITY: This interface contains sensitive authentication data.
268
246
  * The `password` field must NEVER be logged, included in error messages,
269
247
  * or transmitted to telemetry systems.
248
+ *
249
+ * @deprecated Not used by the migration writer. Will be removed in a future release.
270
250
  */
271
251
  export interface Credentials {
272
252
  /** Username for authentication */
@@ -289,21 +269,6 @@ export declare const ApiHubType: {
289
269
  readonly apiHubEnterprise: "API_HUB_ENTERPRISE";
290
270
  };
291
271
  export type ApiHubType = (typeof ApiHubType)[keyof typeof ApiHubType];
292
- /**
293
- * Defines the api hub service properties or enterprise and non-enterprise versions
294
- */
295
- export interface ApiHubConfig {
296
- apiHubKey: string;
297
- apiHubType: ApiHubType;
298
- }
299
- export interface CapService {
300
- projectPath: string;
301
- serviceName: string;
302
- appPath?: string;
303
- serviceCdsPath?: string;
304
- capType?: CapType;
305
- capCdsInfo?: CdsUi5PluginInfo;
306
- }
307
272
  export declare const SapSystemSourceType: {
308
273
  readonly SCP: "SCP";
309
274
  readonly ON_PREM: "ON_PREM";
@@ -320,40 +285,12 @@ export interface Service {
320
285
  edmx: string;
321
286
  annotations?: Annotations[];
322
287
  version?: ODataVersion;
323
- capService?: CapService;
324
288
  source: DatasourceType;
325
289
  sapSystemSource?: SapSystemSourceType;
326
290
  localEdmxFilePath?: string;
327
291
  destinationAuthType?: string;
328
- apiHubConfig?: ApiHubConfig;
329
292
  ignoreCertError?: boolean;
330
293
  }
331
- /** README.txt base definition */
332
- export interface ReadMe {
333
- genDate: string;
334
- genPlatform: string;
335
- dataSourceLabel: string;
336
- metadataFilename?: string;
337
- serviceUrl: string;
338
- projectName: string;
339
- projectTitle: string;
340
- projectNamespace: string;
341
- projectDescription: string;
342
- ui5Theme: string;
343
- projectUI5Version: string;
344
- enableCodeAssist: boolean;
345
- enableEslint: boolean;
346
- enableTypeScript: boolean;
347
- showMockDataInfo?: boolean;
348
- genId: string;
349
- genVersion: string;
350
- templateLabel: string;
351
- additionalEntries?: {
352
- label: string;
353
- value: string;
354
- }[];
355
- launchText?: string;
356
- }
357
294
  interface Ui5YamlProps {
358
295
  ui5Version: string;
359
296
  ui5Url: string;
@@ -1,15 +1,4 @@
1
1
  export { isProjectFolderArray } from './types/project-folder.js';
2
- /**
3
- * OData versions supported by the catalog service
4
- */
5
- export const ODataVersion = {
6
- v2: '2',
7
- v4: '4'
8
- };
9
- export const SapUxLayer = {
10
- VENDOR: 'VENDOR',
11
- CUSTOMER_BASE: 'CUSTOMER_BASE'
12
- };
13
2
  // Common constants defs used throughout
14
3
  export const DatasourceType = {
15
4
  FILE: 'File',
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Helper functions for processing adaptation project configuration
3
3
  */
4
- import type { Package } from '../project-spec-types.js';
4
+ import type { Package } from '@sap-ux/project-access';
5
5
  import type { ImportProjectInfo, NeoappDestination } from '../types.js';
6
6
  /**
7
7
  * Configuration for processing adaptation project
@@ -5,7 +5,8 @@ import { SapUiLibs } from '../index.js';
5
5
  import { defaultMinUi5Version, minUi5VersionV4Template } from '@sap-ux/ui5-info';
6
6
  import { getManifestVersion } from '@sap-ux/ui5-application-writer';
7
7
  import { getUI5Version, stripSpaces } from '../utils/index.js';
8
- import { DatasourceType, ODataVersion } from '../types.js';
8
+ import { ODataVersion } from '@sap-ux/axios-extension';
9
+ import { DatasourceType } from '../types.js';
9
10
  /**
10
11
  * Prepare sanitized project names and namespaces
11
12
  *
@@ -1,5 +1,6 @@
1
- import type { Manifest, Package } from '../project-spec-types.js';
1
+ import type { Manifest } from '../project-spec-types.js';
2
2
  import type { ImportProjectInfo, NeoappDestination } from '../types.js';
3
+ import type { Package } from '@sap-ux/project-access';
3
4
  /**
4
5
  * Configuration for processing project extension
5
6
  */
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Helper functions for processing reuse library projects
3
3
  */
4
- import type { Manifest, Package } from '../project-spec-types.js';
4
+ import type { Package } from '@sap-ux/project-access';
5
+ import type { Manifest } from '../project-spec-types.js';
5
6
  import type { ImportProjectInfo, ProjectFolder } from '../types.js';
6
7
  /**
7
8
  * Process reuse library project to build projectInfo
@@ -48,22 +48,6 @@ export declare const DirName: {
48
48
  readonly Sapux: "src";
49
49
  };
50
50
  export type DirName = (typeof DirName)[keyof typeof DirName];
51
- /**
52
- * Package.json structure
53
- */
54
- export interface Package {
55
- name?: string;
56
- version?: string;
57
- description?: string;
58
- scripts?: Record<string, string>;
59
- dependencies?: Record<string, string>;
60
- devDependencies?: Record<string, string>;
61
- ui5?: {
62
- dependencies?: string[];
63
- };
64
- sapux?: string[] | boolean;
65
- [key: string]: unknown;
66
- }
67
51
  /**
68
52
  * UI5 routing target from manifest.json
69
53
  */
@@ -75,15 +59,4 @@ export interface SapUi5RoutingTarget {
75
59
  viewLevel?: number;
76
60
  transition?: string;
77
61
  }
78
- /**
79
- * Middleware proxy configuration for ui5.yaml
80
- */
81
- export interface MiddlewareProxy {
82
- name?: string;
83
- path: string;
84
- url?: string;
85
- destination?: string;
86
- destinationInstance?: string;
87
- client?: string;
88
- }
89
62
  //# sourceMappingURL=project-spec-types.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import { DirName } from '../project-spec-types.js';
2
- import { FLOOR_PLAN, ODataVersion } from '../types.js';
2
+ import { ODataVersion } from '@sap-ux/axios-extension';
3
+ import { FLOOR_PLAN } from '../types.js';
3
4
  import { escapeDoubleQuotes } from '../utils/index.js';
4
5
  /**
5
6
  * Creates Ui5Yaml configuration object
@@ -1,5 +1,6 @@
1
1
  import type { Editor } from 'mem-fs-editor';
2
- import type { Manifest, Package } from '../project-spec-types.js';
2
+ import type { Package } from '@sap-ux/project-access';
3
+ import type { Manifest } from '../project-spec-types.js';
3
4
  import type { ImportProjectInfo, Message, MigratableFolder, ProjectFolder } from '../types.js';
4
5
  import { MigrationTypes } from './constants.js';
5
6
  import { getFirstBackend } from './project-readers/index.js';
@@ -3,7 +3,7 @@ import { createMemFsEditor } from './fs-adapter.js';
3
3
  import { getReuseLibs, findAllProjectRoots, ReuseLibType } from './file-discovery.js';
4
4
  import { DirName } from '../project-spec-types.js';
5
5
  import { legacyPath, findAllWebIDEProjectFolders, findProjectsByManifest } from './common.js';
6
- import { ODataVersion } from '../types.js';
6
+ import { ODataVersion } from '@sap-ux/axios-extension';
7
7
  import { MigrationTypes } from './constants.js';
8
8
  import { URI } from 'vscode-uri';
9
9
  import { processProjectExtension } from '../project/project-extension.js';
@@ -1,7 +1,8 @@
1
1
  import type { Data } from 'ejs';
2
2
  import type { Editor } from 'mem-fs-editor';
3
3
  import type { Manifest, SapAppSourceTemplate } from '../project-spec-types.js';
4
- import type { TemplateProperties, SapUxLayer } from '../types.js';
4
+ import type { UI5FlexLayer } from '@sap-ux/project-access';
5
+ import type { TemplateProperties } from '../types.js';
5
6
  /**
6
7
  * Filter out only SAP libs
7
8
  *
@@ -62,7 +63,7 @@ export declare function generateToolsId(): string;
62
63
  * @param isInternal - Whether the project is internal (SAP-developed)
63
64
  * @returns SAP UX layer identifier
64
65
  */
65
- export declare function determineSapUxLayer(isInternal: boolean): SapUxLayer;
66
+ export declare function determineSapUxLayer(isInternal: boolean): UI5FlexLayer;
66
67
  /**
67
68
  * Format a string url parameter from the input arguments. Accepts empty string as input arguments.
68
69
  *
@@ -131,7 +131,7 @@ export function generateToolsId() {
131
131
  * @returns SAP UX layer identifier
132
132
  */
133
133
  export function determineSapUxLayer(isInternal) {
134
- return (isInternal ? 'VENDOR' : 'CUSTOMER_BASE');
134
+ return isInternal ? 'VENDOR' : 'CUSTOMER_BASE';
135
135
  }
136
136
  /**
137
137
  * Format a string url parameter from the input arguments. Accepts empty string as input arguments.
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "bugs": {
11
11
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Afiori-migration-writer"
12
12
  },
13
- "version": "0.0.16",
13
+ "version": "1.0.0",
14
14
  "license": "Apache-2.0",
15
15
  "main": "dist/index.js",
16
16
  "files": [
@@ -39,7 +39,6 @@
39
39
  "yaml": "2.9.1",
40
40
  "@sap-ux/adp-tooling": "1.2.0",
41
41
  "@sap-ux/axios-extension": "2.1.6",
42
- "@sap-ux/btp-utils": "2.0.8",
43
42
  "@sap-ux/i18n": "1.0.7",
44
43
  "@sap-ux/launch-config": "1.0.28",
45
44
  "@sap-ux/nodejs-utils": "1.0.14",
@@ -47,7 +46,8 @@
47
46
  "@sap-ux/store": "2.0.8",
48
47
  "@sap-ux/ui5-application-writer": "2.1.7",
49
48
  "@sap-ux/ui5-config": "1.0.11",
50
- "@sap-ux/ui5-info": "1.0.7"
49
+ "@sap-ux/ui5-info": "1.0.7",
50
+ "@sap-ux/btp-utils": "2.0.8"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@jest/globals": "30.5.2",