@sap-ux/environment-check 0.14.2 → 0.15.1
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/archive/index.d.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
|
+
interface ArchiveProjectOptions {
|
|
2
|
+
projectRoot: string;
|
|
3
|
+
targetFolder?: string;
|
|
4
|
+
targetFileName?: string;
|
|
5
|
+
}
|
|
1
6
|
/**
|
|
2
7
|
* Archive a project to zip file. Result file is written to parent of the project root folder.
|
|
3
8
|
*
|
|
4
|
-
* @param
|
|
5
|
-
* @param
|
|
9
|
+
* @param options - archive project options
|
|
10
|
+
* @param options.projectRoot - root of the project, where package.json is located
|
|
11
|
+
* @param options.targetFolder - optional, target folder where to create the archive
|
|
12
|
+
* @param options.targetFileName - optional file name, defaults to project folder + timestamp + .zip
|
|
6
13
|
*/
|
|
7
|
-
export declare function archiveProject(projectRoot
|
|
14
|
+
export declare function archiveProject({ projectRoot, targetFolder, targetFileName }: ArchiveProjectOptions): Promise<{
|
|
8
15
|
path: string;
|
|
9
16
|
size: string;
|
|
10
17
|
}>;
|
|
18
|
+
export {};
|
|
11
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/archive/index.ts"],"names":[],"mappings":"AAQA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/archive/index.ts"],"names":[],"mappings":"AAQA,UAAU,qBAAqB;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,EACjC,WAAW,EACX,YAAY,EACZ,cAAc,EACjB,EAAE,qBAAqB,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAiCjE"}
|
package/dist/archive/index.js
CHANGED
|
@@ -42,10 +42,12 @@ const formatter_1 = require("../formatter");
|
|
|
42
42
|
/**
|
|
43
43
|
* Archive a project to zip file. Result file is written to parent of the project root folder.
|
|
44
44
|
*
|
|
45
|
-
* @param
|
|
46
|
-
* @param
|
|
45
|
+
* @param options - archive project options
|
|
46
|
+
* @param options.projectRoot - root of the project, where package.json is located
|
|
47
|
+
* @param options.targetFolder - optional, target folder where to create the archive
|
|
48
|
+
* @param options.targetFileName - optional file name, defaults to project folder + timestamp + .zip
|
|
47
49
|
*/
|
|
48
|
-
function archiveProject(projectRoot, targetFileName) {
|
|
50
|
+
function archiveProject({ projectRoot, targetFolder, targetFileName }) {
|
|
49
51
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
52
|
if (!fs_1.existsSync(projectRoot)) {
|
|
51
53
|
return Promise.reject(new Error(i18n_1.t('error.noProjectRoot', { projectRoot })));
|
|
@@ -67,7 +69,7 @@ function archiveProject(projectRoot, targetFileName) {
|
|
|
67
69
|
.replace(':', '')
|
|
68
70
|
.substring(0, 14)}.zip`;
|
|
69
71
|
}
|
|
70
|
-
const targetPath = path_1.join(path_1.dirname(projectRoot), targetName);
|
|
72
|
+
const targetPath = targetFolder ? path_1.join(targetFolder, targetName) : path_1.join(path_1.dirname(projectRoot), targetName);
|
|
71
73
|
const writeStream = fs_1.createWriteStream(targetPath);
|
|
72
74
|
zip.pipe(writeStream);
|
|
73
75
|
zip.on('error', (error) => reject(error));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/archive/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2BAA6D;AAC7D,+BAA+C;AAC/C,mDAAqC;AACrC,mDAAsC;AACtC,oDAA4B;AAC5B,kCAA4B;AAC5B,4CAAsD;
|
|
1
|
+
{"version":3,"file":"index.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AO,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC,MAAM,aAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;QACpH,MAAM,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC;QAE/D,MAAM,KAAK,GAAG,MAAM,qBAAI,CAAC,WAAW,EAAE;YAClC,GAAG;YACH,GAAG;YACH,MAAM,EAAE,gBAAM,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC;YAC7B,IAAI;SACP,CAAC,CAAC;QACH,OAAO,KAAK,CAAC;IACjB,CAAC;CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/environment-check",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "SAP Fiori environment check",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"bin": {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@sap-ux/axios-extension": "0.14.1",
|
|
13
13
|
"@sap-ux/btp-utils": "0.11.4",
|
|
14
14
|
"@sap-ux/logger": "0.3.4",
|
|
15
|
-
"@sap-ux/project-access": "1.0
|
|
15
|
+
"@sap-ux/project-access": "1.1.0",
|
|
16
16
|
"@sap-ux/store": "0.3.9",
|
|
17
17
|
"@sap-ux/ui5-config": "0.16.2",
|
|
18
18
|
"@sap/bas-sdk": "3.1.0",
|