@sap-ux/fiori-generator-shared
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -13,9 +13,2 @@ /** | ||
}; | ||
/** | ||
* Generates a variant management script in preview mode. | ||
* | ||
* @param {string} sapClient - The SAP client parameter to include in the URL. If not provided, the URL will not include the `sap-client` parameter. | ||
* @returns {string} A variant management script to run the application in preview mode. | ||
*/ | ||
export declare function getVariantPreviewAppScript(sapClient?: string): string; | ||
//# sourceMappingURL=helpers.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getVariantPreviewAppScript = exports.getBootstrapResourceUrls = void 0; | ||
exports.getBootstrapResourceUrls = void 0; | ||
/** | ||
@@ -27,23 +27,2 @@ * Get the resource URLs for the UShell bootstrap and UI5 bootstrap based on project type and UI5 framework details. | ||
exports.getBootstrapResourceUrls = getBootstrapResourceUrls; | ||
/** | ||
* Generates a variant management script in preview mode. | ||
* | ||
* @param {string} sapClient - The SAP client parameter to include in the URL. If not provided, the URL will not include the `sap-client` parameter. | ||
* @returns {string} A variant management script to run the application in preview mode. | ||
*/ | ||
function getVariantPreviewAppScript(sapClient) { | ||
const previewAppAnchor = '#preview-app'; | ||
const disableCacheParam = 'sap-ui-xx-viewCache=false'; | ||
const sapClientParam = sapClient ? `&sap-client=${sapClient}` : ''; | ||
const urlParam = `?${[ | ||
sapClientParam, | ||
disableCacheParam, | ||
'fiori-tools-rta-mode=true', | ||
'sap-ui-rta-skip-flex-validation=true' | ||
] | ||
.filter(Boolean) | ||
.join('&')}`; | ||
return `fiori run --open \"preview.html${urlParam}${previewAppAnchor}\"`; | ||
} | ||
exports.getVariantPreviewAppScript = getVariantPreviewAppScript; | ||
//# sourceMappingURL=helpers.js.map |
export * from './cap'; | ||
export * from './environment'; | ||
export { getBootstrapResourceUrls, getVariantPreviewAppScript } from './helpers'; | ||
export { getPackageScripts } from './getPackageScripts'; | ||
export { getBootstrapResourceUrls } from './helpers'; | ||
export { generateReadMe } from './read-me'; | ||
export * from './system-utils'; | ||
export { PackageJsonScripts } from './types'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -17,8 +17,9 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.generateReadMe = exports.getVariantPreviewAppScript = exports.getBootstrapResourceUrls = void 0; | ||
exports.generateReadMe = exports.getBootstrapResourceUrls = exports.getPackageScripts = void 0; | ||
__exportStar(require("./cap"), exports); | ||
__exportStar(require("./environment"), exports); | ||
var getPackageScripts_1 = require("./getPackageScripts"); | ||
Object.defineProperty(exports, "getPackageScripts", { enumerable: true, get: function () { return getPackageScripts_1.getPackageScripts; } }); | ||
var helpers_1 = require("./helpers"); | ||
Object.defineProperty(exports, "getBootstrapResourceUrls", { enumerable: true, get: function () { return helpers_1.getBootstrapResourceUrls; } }); | ||
Object.defineProperty(exports, "getVariantPreviewAppScript", { enumerable: true, get: function () { return helpers_1.getVariantPreviewAppScript; } }); | ||
var read_me_1 = require("./read-me"); | ||
@@ -25,0 +26,0 @@ Object.defineProperty(exports, "generateReadMe", { enumerable: true, get: function () { return read_me_1.generateReadMe; } }); |
@@ -56,3 +56,41 @@ /** | ||
} | ||
/** | ||
* Defines the structure for the `package.json` scripts section. | ||
*/ | ||
export interface PackageJsonScripts { | ||
/** The command to start the application. */ | ||
start: string; | ||
/** The command to start the application with local configuration */ | ||
'start-local': string; | ||
/** Optional command to start the application without flp command. */ | ||
'start-noflp'?: string; | ||
/** Optional command to start the application with a mock server configuration. */ | ||
'start-mock'?: string; | ||
/** Optional command to run tests. */ | ||
'int-test'?: string; | ||
/** Optional command to add the variants management script. */ | ||
'start-variants-management'?: string; | ||
} | ||
/** | ||
* Defines the options for generating `package.json` scripts. | ||
*/ | ||
export interface PackageScriptsOptions { | ||
/** Specifies whether only a local server is available. If true, certain scripts may display a warning message. */ | ||
localOnly: boolean; | ||
/** Indicates if a script for using a mock server should be added. Defaults to true. */ | ||
addMock?: boolean; | ||
/** Indicates if a script for running integration tests should be added. Defaults to false. */ | ||
addTest?: boolean; | ||
/** The SAP client to be used, if applicable. */ | ||
sapClient?: string; | ||
/** The flp app ID to be used in URLs. */ | ||
flpAppId?: string; | ||
/** The path to the file that should be opened with the `start` script. */ | ||
startFile?: string; | ||
/** The path to the file that should be opened with the `start-local` script. */ | ||
localStartFile?: string; | ||
/** If true, a script for starting the app without flp will be generated. Defaults to true. */ | ||
generateIndex?: boolean; | ||
} | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@sap-ux/fiori-generator-shared", | ||
"description": "Commonly used shared functionality and types to support the fiori generator.", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"repository": { | ||
@@ -20,2 +20,3 @@ "type": "git", | ||
"dependencies": { | ||
"i18next": "20.6.1", | ||
"mem-fs": "2.1.0", | ||
@@ -22,0 +23,0 @@ "mem-fs-editor": "9.4.0", |
39487
23
553
5
+ Addedi18next@20.6.1
+ Added@babel/runtime@7.26.9(transitive)
+ Addedi18next@20.6.1(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)