@sw-tsdk/connector 3.4.0 → 3.6.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/lib/logo.d.ts +1 -1
- package/lib/logo.js +10 -4
- package/lib/logo.js.map +1 -1
- package/package.json +5 -5
package/lib/logo.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function updateImage(directory: string, logoPath: string): Promise<void>;
|
|
1
|
+
export declare function updateImage(directory: string, logoPath: string, imageName?: string): Promise<void>;
|
package/lib/logo.js
CHANGED
|
@@ -5,13 +5,19 @@ const common_1 = require("@sw-tsdk/common");
|
|
|
5
5
|
const node_fs_1 = require("node:fs");
|
|
6
6
|
const node_path_1 = require("node:path");
|
|
7
7
|
const fs_extra_1 = require("fs-extra");
|
|
8
|
-
async function updateImage(directory, logoPath) {
|
|
9
|
-
|
|
8
|
+
async function updateImage(directory, logoPath, imageName = 'logo') {
|
|
9
|
+
let images = null;
|
|
10
|
+
if (imageName === 'logo') {
|
|
11
|
+
images = await common_1.ImageProcessor.processLogoImage(logoPath);
|
|
12
|
+
}
|
|
13
|
+
else if (imageName === 'overview') {
|
|
14
|
+
images = await common_1.ImageProcessor.processOverviewImage(logoPath);
|
|
15
|
+
}
|
|
10
16
|
if (images === null) {
|
|
11
|
-
throw new Error('Could not process image');
|
|
17
|
+
throw new Error('Could not process ' + imageName + ' image');
|
|
12
18
|
}
|
|
13
19
|
await (0, fs_extra_1.ensureDir)((0, node_path_1.join)(directory, 'image'));
|
|
14
|
-
await node_fs_1.promises.writeFile((0, node_path_1.join)(directory, 'image', '
|
|
20
|
+
await node_fs_1.promises.writeFile((0, node_path_1.join)(directory, 'image', imageName + '.png'), images.source.getRaw());
|
|
15
21
|
}
|
|
16
22
|
exports.updateImage = updateImage;
|
|
17
23
|
//# sourceMappingURL=logo.js.map
|
package/lib/logo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logo.js","sourceRoot":"","sources":["../src/logo.ts"],"names":[],"mappings":";;;AAAA,4CAA8C;AAC9C,qCAAgC;AAChC,yCAA8B;AAC9B,uCAAkC;AAE3B,KAAK,UAAU,WAAW,CAAC,SAAiB,EAAE,QAAgB;
|
|
1
|
+
{"version":3,"file":"logo.js","sourceRoot":"","sources":["../src/logo.ts"],"names":[],"mappings":";;;AAAA,4CAA8C;AAC9C,qCAAgC;AAChC,yCAA8B;AAC9B,uCAAkC;AAE3B,KAAK,UAAU,WAAW,CAAC,SAAiB,EAAE,QAAgB,EAAE,SAAS,GAAG,MAAM;IACvF,IAAI,MAAM,GAAG,IAAI,CAAA;IACjB,IAAI,SAAS,KAAK,MAAM,EAAE;QACxB,MAAM,GAAG,MAAM,uBAAc,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAA;KACzD;SAAM,IAAI,SAAS,KAAK,UAAU,EAAE;QACnC,MAAM,GAAG,MAAM,uBAAc,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAA;KAC7D;IAED,IAAI,MAAM,KAAK,IAAI,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,SAAS,GAAG,QAAQ,CAAC,CAAA;KAC7D;IAED,MAAM,IAAA,oBAAS,EAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAA;IACzC,MAAM,kBAAQ,CAAC,SAAS,CAAC,IAAA,gBAAI,EAAC,SAAS,EAAE,OAAO,EAAE,SAAS,GAAG,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAA;AAChG,CAAC;AAdD,kCAcC"}
|
package/package.json
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"@oclif/core": "2.8.5",
|
|
10
10
|
"@oclif/plugin-help": "5.2.9",
|
|
11
11
|
"@oclif/plugin-plugins": "3.1.2",
|
|
12
|
-
"@sw-tsdk/common": "^3.
|
|
13
|
-
"@sw-tsdk/core": "^3.
|
|
14
|
-
"@sw-tsdk/docker": "^3.
|
|
12
|
+
"@sw-tsdk/common": "^3.6.0",
|
|
13
|
+
"@sw-tsdk/core": "^3.6.0",
|
|
14
|
+
"@sw-tsdk/docker": "^3.6.0",
|
|
15
15
|
"@swimlane/connector-interfaces": "1.11.0",
|
|
16
16
|
"@swimlane/cosign": "1.4.1",
|
|
17
17
|
"archiver": "5.3.1",
|
|
@@ -65,6 +65,6 @@
|
|
|
65
65
|
"test": "jest --passWithNoTests"
|
|
66
66
|
},
|
|
67
67
|
"types": "lib/index.d.ts",
|
|
68
|
-
"version": "3.
|
|
69
|
-
"gitHead": "
|
|
68
|
+
"version": "3.6.0",
|
|
69
|
+
"gitHead": "665d45ad866dae3a5b80529e4e911ee3ac2afd89"
|
|
70
70
|
}
|