Skip to content

Commit d87792c

Browse files
Merge remote-tracking branch 'origin/master' into release
2 parents c057e29 + d149e56 commit d87792c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+832
-147
lines changed

JenkinsfileRelease

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ node('words-linux') {
7979

8080
gitlabCommitStatus("audit security") {
8181
stage('audit security'){
82-
sh "npm audit fix"
82+
sh "npm audit fix --production"
8383
sh "npm audit --production --audit-level=moderate"
8484
}
8585
}

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ Feel free to explore the [Developer's Guide](https://docs.aspose.cloud/display/w
1616
- Add & remove watermarks and protection.
1717
- Read & write access to Document Object Model.
1818

19+
## Enhancements in Version 22.2
20+
21+
- Made 'SaveOprionsData.SaveFormat' property readonly with default value.
22+
- Added subclasses for all formats of SaveOprionsData with specified SaveFormat.
23+
- 'SaveOptionsData', 'FixedPageSaveOptionsData', 'ImageSaveOptionsData', 'OoxmlSaveOptionsData', 'TxtSaveOptionsBaseData' classes now is abstract.
24+
25+
1926
## Enhancements in Version 22.1
2027

2128
- Added 'FieldOptions.FieldUpdateCultureName' to set Culture for fields
@@ -216,9 +223,8 @@ The complete source code is available at [GitHub Repository](https://github.com/
216223
// save the file as pdf in the cloud
217224
const request = new SaveAsRequest({
218225
name: "uploaded.docx",
219-
saveOptionsData: new SaveOptionsData(
226+
saveOptionsData: new PdfSaveOptionsData(
220227
{
221-
saveFormat: "pdf",
222228
fileName: "destination.pdf"
223229
})
224230
});

bdd/features/conversion/saveAs.feature

Lines changed: 0 additions & 53 deletions
This file was deleted.

bdd/steps/conversions/saveAsSteps.ts

Lines changed: 0 additions & 63 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "asposewordscloud",
3-
"version": "22.1.0",
3+
"version": "22.2.0",
44
"description": "Aspose.Words Cloud SDK for Node.js",
55
"homepage": "https://products.aspose.cloud/words/cloud",
66
"author": {

src/internal/requestHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async function invokeApiMethodInternal(requestOptions: request.OptionsWithUri, c
141141
requestOptions.timeout = 1000 * confguration.timeout;
142142

143143
requestOptions.headers["x-aspose-client"] = "nodejs sdk";
144-
requestOptions.headers["x-aspose-client-version"] = "22.1";
144+
requestOptions.headers["x-aspose-client-version"] = "22.2";
145145

146146
requestOptions.uri = encodeURI(requestOptions.uri.toString());
147147

src/model/bmpSaveOptionsData.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ export class BmpSaveOptionsData extends ImageSaveOptionsData {
5252

5353
public constructor(init?: Partial< BmpSaveOptionsData >) {
5454
super(init);
55+
this.saveFormat = 'bmp';
56+
5557
Object.assign(this, init);
5658
}
5759
}

src/model/commentBase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const importsMapCommentBase = {
3535
/**
3636
* Comment.
3737
*/
38-
export class CommentBase {
38+
export abstract class CommentBase {
3939
/**
4040
* Attribute type map
4141
*/

src/model/docSaveOptionsData.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ export class DocSaveOptionsData extends SaveOptionsData {
9393

9494
public constructor(init?: Partial< DocSaveOptionsData >) {
9595
super(init);
96+
this.saveFormat = 'doc';
97+
9698
Object.assign(this, init);
9799
}
98100
}

src/model/docmSaveOptionsData.ts

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* --------------------------------------------------------------------------------
3+
* <copyright company="Aspose" file="docmSaveOptionsData.ts">
4+
* Copyright (c) 2022 Aspose.Words for Cloud
5+
* </copyright>
6+
* <summary>
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in all
15+
* copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23+
* SOFTWARE.
24+
* </summary>
25+
* --------------------------------------------------------------------------------
26+
*/
27+
28+
import { AttributeInfo } from '../internal/attributeInfo';
29+
import { OoxmlSaveOptionsData } from './ooxmlSaveOptionsData';
30+
31+
export const importsMapDocmSaveOptionsData = {
32+
OoxmlSaveOptionsData,
33+
};
34+
35+
/**
36+
* Container class for docm save options.
37+
*/
38+
export class DocmSaveOptionsData extends OoxmlSaveOptionsData {
39+
/**
40+
* Attribute type map
41+
*/
42+
public static attributeTypeMap: Array<AttributeInfo> = [
43+
];
44+
45+
/**
46+
* Returns attribute type map
47+
*/
48+
public static getAttributeTypeMap() {
49+
return super.getAttributeTypeMap().concat(DocmSaveOptionsData.attributeTypeMap);
50+
}
51+
52+
53+
public constructor(init?: Partial< DocmSaveOptionsData >) {
54+
super(init);
55+
this.saveFormat = 'docm';
56+
57+
Object.assign(this, init);
58+
}
59+
}
60+

0 commit comments

Comments
 (0)