@sap-ux/fiori-generator-shared 0.0.17 → 0.1.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.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/read-me.d.ts +12 -0
- package/dist/read-me.js +22 -0
- package/dist/types.d.ts +57 -0
- package/dist/types.js +3 -0
- package/package.json +7 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -14,5 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.generateReadMe = void 0;
|
|
17
18
|
__exportStar(require("./cap"), exports);
|
|
19
|
+
var read_me_1 = require("./read-me");
|
|
20
|
+
Object.defineProperty(exports, "generateReadMe", { enumerable: true, get: function () { return read_me_1.generateReadMe; } });
|
|
18
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ReadMe } from './types';
|
|
2
|
+
import type { Editor } from 'mem-fs-editor';
|
|
3
|
+
/**
|
|
4
|
+
* Generates a README file at the specified destination path using the provided configuration and file system editor.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} destPath - The desitination path where the README file will be created.
|
|
7
|
+
* @param {ReadMe} readMe - The configuration object containing the details to be included in the README file.
|
|
8
|
+
* @param {Editor} fs - The file system editor instance used to write the README file.
|
|
9
|
+
* @returns {Editor} The file system editor instance used to write the README file.
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateReadMe(destPath: string, readMe: ReadMe, fs: Editor): Editor;
|
|
12
|
+
//# sourceMappingURL=read-me.d.ts.map
|
package/dist/read-me.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateReadMe = void 0;
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
/**
|
|
6
|
+
* Generates a README file at the specified destination path using the provided configuration and file system editor.
|
|
7
|
+
*
|
|
8
|
+
* @param {string} destPath - The desitination path where the README file will be created.
|
|
9
|
+
* @param {ReadMe} readMe - The configuration object containing the details to be included in the README file.
|
|
10
|
+
* @param {Editor} fs - The file system editor instance used to write the README file.
|
|
11
|
+
* @returns {Editor} The file system editor instance used to write the README file.
|
|
12
|
+
*/
|
|
13
|
+
function generateReadMe(destPath, readMe, fs) {
|
|
14
|
+
// Apply the configuration to generate the README file
|
|
15
|
+
const templateSourcePath = (0, path_1.join)(__dirname, '..', 'templates/README.md');
|
|
16
|
+
const templateDestPath = `${destPath}/README.md`;
|
|
17
|
+
// copy template
|
|
18
|
+
fs.copyTpl(templateSourcePath, templateDestPath, readMe);
|
|
19
|
+
return fs;
|
|
20
|
+
}
|
|
21
|
+
exports.generateReadMe = generateReadMe;
|
|
22
|
+
//# sourceMappingURL=read-me.js.map
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface representing additional entries for the README file.
|
|
3
|
+
*/
|
|
4
|
+
interface AdditionalEntries {
|
|
5
|
+
/** The label for the additional entry. */
|
|
6
|
+
label: string;
|
|
7
|
+
/** The value corresponding to the label of the additional entry. */
|
|
8
|
+
value: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Interface representing the configuration for generating a README file.
|
|
12
|
+
* Extends OptionalEntries to include dynamic properties along with the core properties.
|
|
13
|
+
*/
|
|
14
|
+
export interface ReadMe {
|
|
15
|
+
/** The name of the application. */
|
|
16
|
+
appName: string;
|
|
17
|
+
/** The title of the application. */
|
|
18
|
+
appTitle: string;
|
|
19
|
+
/** The namespace of the application. */
|
|
20
|
+
appNamespace: string;
|
|
21
|
+
/** The description of the application. */
|
|
22
|
+
appDescription: string;
|
|
23
|
+
/** The UI5 theme used in the application. */
|
|
24
|
+
ui5Theme: string;
|
|
25
|
+
/** The name of generator used. */
|
|
26
|
+
generatorName: string;
|
|
27
|
+
/** The version of the generator used. */
|
|
28
|
+
generatorVersion: string;
|
|
29
|
+
/** The ui5 version used in the application. */
|
|
30
|
+
ui5Version: string;
|
|
31
|
+
/** The floorplan template name used to generate the application. */
|
|
32
|
+
template: string;
|
|
33
|
+
/** The date when the generator was run. */
|
|
34
|
+
generationDate?: string;
|
|
35
|
+
/** The service URL of the application */
|
|
36
|
+
serviceUrl?: string;
|
|
37
|
+
/** The service type for the application. */
|
|
38
|
+
serviceType?: string;
|
|
39
|
+
/** The platform on which the generator was run. */
|
|
40
|
+
generatorPlatform?: string;
|
|
41
|
+
/** The filename of the metadata file */
|
|
42
|
+
metadataFilename?: string;
|
|
43
|
+
/** Flag indicating whether code assistance is enabled. */
|
|
44
|
+
enableCodeAssist?: boolean;
|
|
45
|
+
/** Flag indicating whether TypeScript is enabled. */
|
|
46
|
+
enableTypeScript?: boolean;
|
|
47
|
+
/** Flag indicating whether ESLint is enabled. */
|
|
48
|
+
enableEslint?: boolean;
|
|
49
|
+
/** Flag indicating whether to show mock data info. */
|
|
50
|
+
showMockDataInfo?: boolean;
|
|
51
|
+
/** Text used to launch the application */
|
|
52
|
+
launchText?: string;
|
|
53
|
+
/** Additional custom entries for the application. */
|
|
54
|
+
additionalEntries?: AdditionalEntries[];
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.js
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-generator-shared",
|
|
3
3
|
"description": "Commonly used shared functionality and types to support the fiori generator.",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -16,8 +16,14 @@
|
|
|
16
16
|
"!dist/**/*.map"
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
|
+
"mem-fs": "2.1.0",
|
|
20
|
+
"mem-fs-editor": "9.4.0",
|
|
19
21
|
"@sap-ux/project-access": "1.22.3"
|
|
20
22
|
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/mem-fs-editor": "7.0.1",
|
|
25
|
+
"@types/mem-fs": "1.1.2"
|
|
26
|
+
},
|
|
21
27
|
"engines": {
|
|
22
28
|
"node": ">=18.x"
|
|
23
29
|
},
|