Skip to content

Commit da7f462

Browse files
committed
run prettier on the repository
1 parent 9aec36d commit da7f462

File tree

564 files changed

+77028
-30279
lines changed

Some content is hidden

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

564 files changed

+77028
-30279
lines changed

.code-generation/config.js

Lines changed: 82 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,96 +1,130 @@
11
module.exports = {
2-
"SDKSpecVersion": "master",
3-
"langConfig": {
4-
newInstanceSyntax: 'new #name(#req)#optional',
5-
lang: 'Javascript',
6-
methodDelimiter: '.',
7-
groupDelimiter: '.',
8-
openQualifiersChar: '',
9-
closeQualifiersChar: '',
10-
closeTransformationChar: '',
2+
SDKSpecVersion: "master",
3+
langConfig: {
4+
newInstanceSyntax: "new #name(#req)#optional",
5+
lang: "Javascript",
6+
methodDelimiter: ".",
7+
groupDelimiter: ".",
8+
openQualifiersChar: "",
9+
closeQualifiersChar: "",
10+
closeTransformationChar: "",
1111
hideActionGroups: true,
12-
useSimpleQualifierValuesForGroups: ['Compass','AudioCodec','AnimatedFormat','ArtisticFilter','blendMode','Flag','FontStyle','FontAntialias','FontWeight','FontHinting','textAlignment','textDecoration', 'GradientDirection','ImproveMode','OutlineMode','Progressive','SimulateColorBlind','StreamingProfile'],
12+
useSimpleQualifierValuesForGroups: [
13+
"Compass",
14+
"AudioCodec",
15+
"AnimatedFormat",
16+
"ArtisticFilter",
17+
"blendMode",
18+
"Flag",
19+
"FontStyle",
20+
"FontAntialias",
21+
"FontWeight",
22+
"FontHinting",
23+
"textAlignment",
24+
"textDecoration",
25+
"GradientDirection",
26+
"ImproveMode",
27+
"OutlineMode",
28+
"Progressive",
29+
"SimulateColorBlind",
30+
"StreamingProfile",
31+
],
1332
mainTransformationString: {
1433
openSyntaxString: {
15-
image: 'new CloudinaryImage(\'#publicID\')',
16-
video: 'new CloudinaryVideo(\'#publicID\')',
17-
media: 'new CloudinaryMedia(\'#publicID\')'
34+
image: "new CloudinaryImage('#publicID')",
35+
video: "new CloudinaryVideo('#publicID')",
36+
media: "new CloudinaryMedia('#publicID')",
1837
},
19-
closeSyntaxString: ';'
38+
closeSyntaxString: ";",
2039
},
21-
openActionChar: '(',
22-
closeActionChar: ')',
23-
overwritePreset: 'javascript',
24-
arraySeparator: ', ',
25-
arrayOpen: '[',
26-
arrayClose: ']',
40+
openActionChar: "(",
41+
closeActionChar: ")",
42+
overwritePreset: "javascript",
43+
arraySeparator: ", ",
44+
arrayOpen: "[",
45+
arrayClose: "]",
2746
prettier: {
28-
parser: 'babel'
47+
parser: "babel",
2948
},
3049
formats: {
31-
formatClassOrEnum: 'PascalCase',
32-
formatMethod: 'camelCase',
50+
formatClassOrEnum: "PascalCase",
51+
formatMethod: "camelCase",
3352
formatFloat: (f) => {
34-
if (!f.toString().includes('.')) {
35-
return `'${f}.0'` // In JS world, 1.0 is 1, so we make sure 1.0 stays 1.0
53+
if (!f.toString().includes(".")) {
54+
return `'${f}.0'`; // In JS world, 1.0 is 1, so we make sure 1.0 stays 1.0
3655
} else {
3756
return f;
3857
}
39-
}
58+
},
4059
},
4160
methodNameMap: {
42-
'delivery_type': 'set_delivery_type',
43-
'asset_type': 'set_asset_type',
44-
'deliveryType': 'set_delivery_type',
45-
'assetType': 'set_asset_type',
46-
'signature': 'setSignature',
61+
delivery_type: "set_delivery_type",
62+
asset_type: "set_asset_type",
63+
deliveryType: "set_delivery_type",
64+
assetType: "set_asset_type",
65+
signature: "setSignature",
4766
},
48-
canGenerateSignature:false,
67+
canGenerateSignature: false,
4968
classNameMap: {},
5069
childTransformations: {
5170
image: {
5271
open: "new ImageTransformation()",
53-
close: '',
72+
close: "",
5473
},
5574
video: {
5675
open: "new VideoTransformation()",
57-
close: '',
76+
close: "",
5877
},
5978
media: {
6079
open: "new Transformation()",
61-
close: '',
62-
}
80+
close: "",
81+
},
6382
},
64-
unsupportedTxParams: ['fl_waveform', 'fl_animated', 'e_tint', 'e_theme', 'af_'],
65-
unsupportedSyntaxList: ['.stroke(', '.textFit(', 'Animated.edit', '.RoundCorners(', 'getVideoFrame', '.transcode(']
83+
unsupportedTxParams: [
84+
"fl_waveform",
85+
"fl_animated",
86+
"e_tint",
87+
"e_theme",
88+
"af_",
89+
],
90+
unsupportedSyntaxList: [
91+
".stroke(",
92+
".textFit(",
93+
"Animated.edit",
94+
".RoundCorners(",
95+
"getVideoFrame",
96+
".transcode(",
97+
],
6698
},
67-
"overwrites": {
99+
overwrites: {
68100
qualifiers: {
69101
// colorOverride is a qualifier of Reshape.trim action.
70102
color_override: (payload) => {
71-
const {qualifierDTO} = payload;
103+
const { qualifierDTO } = payload;
72104
const colorName = qualifierDTO.qualifiers[0].name;
73105

74106
// TODO this should be streamlined with how we deal with color.
75-
return `.colorOverride("${colorName}")`
107+
return `.colorOverride("${colorName}")`;
76108
},
77109
color: (payload) => {
78-
const {qualifierDTO} = payload;
110+
const { qualifierDTO } = payload;
79111
// This case supports three types of qualifiers
80112
// TODO this DTO structure needs to be aligned
81113
// {name:color, is_required:true qualifiers: [{group:'color', name: 'red', is_required:true}]}
82114
// {group:'color', name: 'red', is_required:true}
83115
// {group:'color', name: 'rgb', qualifiers: [{ "name": "color", "value": "#d5d2ca", "is_required": true, "value_type": "string" }]}
84116

85117
let colorName;
86-
if (qualifierDTO.qualifiers && qualifierDTO.name === 'rgb') {
118+
if (qualifierDTO.qualifiers && qualifierDTO.name === "rgb") {
87119
colorName = qualifierDTO.qualifiers[0].value;
88120
} else {
89-
colorName = qualifierDTO.qualifiers ? qualifierDTO.qualifiers[0].name : qualifierDTO.name;
121+
colorName = qualifierDTO.qualifiers
122+
? qualifierDTO.qualifiers[0].name
123+
: qualifierDTO.name;
90124
}
91125

92126
return `'${colorName}'`;
93-
}
94-
}
95-
}
96-
}
127+
},
128+
},
129+
},
130+
};

.eslintrc

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,48 @@
11
{
22
"root": true,
33
"parser": "@typescript-eslint/parser",
4-
"plugins": [
5-
"@typescript-eslint",
6-
"import"
7-
],
8-
"extends": [
9-
"eslint:recommended",
10-
"plugin:@typescript-eslint/recommended"
11-
],
4+
"plugins": ["@typescript-eslint", "import"],
5+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
126
"parserOptions": {
137
"ecmaVersion": 2018,
148
"sourceType": "module"
159
},
16-
"ignorePatterns": ["dist", "docs", "node_modules", "dev/*.esm*", "src/backwards"],
10+
"ignorePatterns": [
11+
"dist",
12+
"docs",
13+
"node_modules",
14+
"dev/*.esm*",
15+
"src/backwards"
16+
],
1717
"env": {
1818
"browser": true,
1919
"jest": true
2020
},
2121
"rules": {
2222
"require-jsdoc": "error",
2323
"no-unused-vars": "warn",
24-
"indent" : ["error", 2, { "SwitchCase": 1 }],
25-
"dot-notation" : "error",
26-
"no-param-reassign" : "error",
27-
"no-unreachable" : "error",
28-
"arrow-parens" : "error",
29-
"one-var-declaration-per-line" : "error",
24+
"indent": ["error", 2, { "SwitchCase": 1 }],
25+
"dot-notation": "error",
26+
"no-param-reassign": "error",
27+
"no-unreachable": "error",
28+
"arrow-parens": "error",
29+
"one-var-declaration-per-line": "error",
3030
"curly": "error",
3131
"semi": "error",
3232
"prefer-const": "error",
33-
"vars-on-top" : "error",
33+
"vars-on-top": "error",
3434
"no-cond-assign": "error",
35-
"@typescript-eslint/ban-ts-comment" : "warn",
36-
"comma-spacing" : "error",
37-
"no-multi-spaces" : "error",
38-
"prefer-template" : "error",
35+
"@typescript-eslint/ban-ts-comment": "warn",
36+
"comma-spacing": "error",
37+
"no-multi-spaces": "error",
38+
"prefer-template": "error",
3939
"import/extensions": [2, "ignorePackages"],
40-
"max-nested-callbacks" : ["error",{
41-
"max": 3
42-
}],
40+
"max-nested-callbacks": [
41+
"error",
42+
{
43+
"max": 3
44+
}
45+
],
4346
"@typescript-eslint/no-empty-interface": 0,
4447
"@typescript-eslint/no-empty-function": 0
4548
}

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
### Pull request for @cloudinary/transformation-builder-sdk
22

3-
43
#### What does this PR solve?
5-
... A few words
64

5+
... A few words
76

87
#### Final checklist
8+
99
- [ ] Implementation is aligned to Spec.
1010
- [ ] Tests - Add proper tests to the added code.

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
npx lint-staged

.release-it.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"out": ["package.json", "../package.json"]
55
}
66
},
7-
"hooks" :{
8-
"after:bump" : "git add .. -u"
7+
"hooks": {
8+
"after:bump": "git add .. -u"
99
}
1010
}

CHANGELOG.md

Lines changed: 20 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,58 @@
1-
1.2.10 / 2023-07-11
2-
==================
1+
# 1.2.10 / 2023-07-11
32

43
- Add support for Generative Fill background
54
- Adjust allowed Background Removal hints syntax
65

7-
1.2.9 / 2023-06-06
8-
==================
6+
# 1.2.9 / 2023-06-06
97

108
- Default value for background removal fine edges option
119

12-
1.2.8 / 2023-05-04
13-
==================
10+
# 1.2.8 / 2023-05-04
1411

1512
- Return nested transformation errors at the layer action level
1613

17-
1.2.7 / 2023-03-08
18-
==================
14+
# 1.2.7 / 2023-03-08
1915

2016
- Add missing focusOn named export
2117

22-
1.2.6 / 2023-02-22
23-
==================
18+
# 1.2.6 / 2023-02-22
2419

25-
- Border actionModel params compliant with transformation-model
20+
- Border actionModel params compliant with transformation-model
2621

27-
1.2.5 / 2023-02-21
28-
==================
22+
# 1.2.5 / 2023-02-21
2923

30-
- Adjust border radius in from/toJson model
24+
- Adjust border radius in from/toJson model
3125

32-
1.2.4 / 2023-02-20
33-
==================
26+
# 1.2.4 / 2023-02-20
3427

3528
- Align RoundCorners action with the specs
3629

37-
1.2.3 / 2023-02-03
38-
==================
30+
# 1.2.3 / 2023-02-03
3931

4032
- Add fromJson support to Opacity action
4133

42-
1.2.2 / 2023-02-03
43-
==================
34+
# 1.2.2 / 2023-02-03
4435

4536
- Fix opacity action (missing actionModel)
4637

47-
1.2.1 / 2023-01-31
48-
==================
38+
# 1.2.1 / 2023-01-31
4939

5040
- Updated default values of Drop Shadow action
5141

52-
1.2.0 / 2023-01-11
53-
==================
42+
# 1.2.0 / 2023-01-11
5443

5544
- Add DropShadow effect
5645

57-
1.1.0 / 2022-10-20
58-
==================
46+
# 1.1.0 / 2022-10-20
5947

60-
* Add Background Removal effect
61-
* Add from/toJson for rotateByAngle Action
48+
- Add Background Removal effect
49+
- Add from/toJson for rotateByAngle Action
6250

63-
1.0.1 / 2022-09-13
64-
==================
51+
# 1.0.1 / 2022-09-13
6552

66-
* Fix broken prettier version
67-
* Default length for the fade action
53+
- Fix broken prettier version
54+
- Default length for the fade action
6855

69-
1.0.0 / 2022-05-12
70-
==================
56+
# 1.0.0 / 2022-05-12
7157

7258
Release package
73-

0 commit comments

Comments
 (0)