@transifex/api 1.0.3 → 2.0.0-rc2
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/browser.transifexApi.js +3 -0
- package/dist/browser.transifexApi.js.LICENSE.txt +1 -0
- package/dist/browser.transifexApi.js.map +1 -0
- package/dist/node.transifexApi.js +3 -0
- package/dist/node.transifexApi.js.LICENSE.txt +1 -0
- package/dist/node.transifexApi.js.map +1 -0
- package/package.json +18 -19
- package/src/{index.js → transifexApi.js} +25 -25
- package/webpack.config.js +34 -21
- package/dist/index.js +0 -3
- package/dist/index.js.LICENSE.txt +0 -1
- package/dist/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transifex/api",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-rc2",
|
|
4
4
|
"description": "Transifex API SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"transifex",
|
|
@@ -10,34 +10,31 @@
|
|
|
10
10
|
"API",
|
|
11
11
|
"SDK"
|
|
12
12
|
],
|
|
13
|
-
"author": "Transifex",
|
|
14
13
|
"homepage": "https://github.com/transifex/transifex-javascript/tree/master/packages/api",
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
"source": "src/index.js",
|
|
18
|
-
"browser": "dist/index.js",
|
|
19
|
-
"module": "dist/index.js",
|
|
20
|
-
"publishConfig": {
|
|
21
|
-
"access": "public"
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/transifex/transifex-javascript/issues"
|
|
22
16
|
},
|
|
17
|
+
"license": "Apache-2.0",
|
|
18
|
+
"author": "Transifex",
|
|
19
|
+
"main": "dist/node.transifexApi.js",
|
|
20
|
+
"browser": "dist/browser.transifexApi.js",
|
|
23
21
|
"repository": "git://github.com/transifex/transifex-javascript.git",
|
|
24
22
|
"scripts": {
|
|
25
23
|
"build": "webpack",
|
|
26
24
|
"lint": "eslint src",
|
|
27
|
-
"publish-npm": "npm publish"
|
|
28
|
-
"test": "webpack"
|
|
25
|
+
"publish-npm": "npm publish"
|
|
29
26
|
},
|
|
30
|
-
"
|
|
31
|
-
"
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"@transifex/jsonapi": "^1.0.0 || ^2.0.0"
|
|
32
29
|
},
|
|
33
|
-
"
|
|
34
|
-
"
|
|
30
|
+
"dependencies": {
|
|
31
|
+
"core-js": "^3.17.2"
|
|
35
32
|
},
|
|
36
33
|
"devDependencies": {
|
|
37
34
|
"@babel/cli": "^7.15.4",
|
|
38
35
|
"@babel/core": "^7.15.5",
|
|
39
36
|
"@babel/preset-env": "^7.15.0",
|
|
40
|
-
"@transifex/jsonapi": "^
|
|
37
|
+
"@transifex/jsonapi": "^2.0.0-rc2",
|
|
41
38
|
"babel-eslint": "^10.1.0",
|
|
42
39
|
"babel-loader": "^8.2.2",
|
|
43
40
|
"eslint": "^7.32.0",
|
|
@@ -46,8 +43,10 @@
|
|
|
46
43
|
"webpack": "^5.51.1",
|
|
47
44
|
"webpack-cli": "^4.8.0"
|
|
48
45
|
},
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=12.0.0"
|
|
48
|
+
},
|
|
49
|
+
"publishConfig": {
|
|
50
|
+
"access": "public"
|
|
52
51
|
}
|
|
53
52
|
}
|
|
@@ -7,126 +7,126 @@ export class TransifexApi extends JsonApi {
|
|
|
7
7
|
class Organization extends JsonApiResource {
|
|
8
8
|
static TYPE = 'organizations';
|
|
9
9
|
}
|
|
10
|
-
TransifexApi.register(Organization);
|
|
10
|
+
TransifexApi.register(Organization, 'Organization');
|
|
11
11
|
|
|
12
12
|
class User extends JsonApiResource {
|
|
13
13
|
static TYPE = 'users';
|
|
14
14
|
}
|
|
15
|
-
TransifexApi.register(User);
|
|
15
|
+
TransifexApi.register(User, 'User');
|
|
16
16
|
|
|
17
17
|
class Language extends JsonApiResource {
|
|
18
18
|
static TYPE = 'languages';
|
|
19
19
|
}
|
|
20
|
-
TransifexApi.register(Language);
|
|
20
|
+
TransifexApi.register(Language, 'Language');
|
|
21
21
|
|
|
22
22
|
class Project extends JsonApiResource {
|
|
23
23
|
static TYPE = 'projects';
|
|
24
24
|
}
|
|
25
|
-
TransifexApi.register(Project);
|
|
25
|
+
TransifexApi.register(Project, 'Project');
|
|
26
26
|
|
|
27
27
|
class ProjectWebhook extends JsonApiResource {
|
|
28
28
|
static TYPE = 'project_webhooks';
|
|
29
29
|
}
|
|
30
|
-
TransifexApi.register(ProjectWebhook);
|
|
30
|
+
TransifexApi.register(ProjectWebhook, 'ProjectWebhook');
|
|
31
31
|
|
|
32
32
|
class Resource extends JsonApiResource {
|
|
33
33
|
static TYPE = 'resources';
|
|
34
34
|
}
|
|
35
|
-
TransifexApi.register(Resource);
|
|
35
|
+
TransifexApi.register(Resource, 'Resource');
|
|
36
36
|
|
|
37
37
|
class ResourceString extends JsonApiResource {
|
|
38
38
|
static TYPE = 'resource_strings';
|
|
39
39
|
}
|
|
40
|
-
TransifexApi.register(ResourceString);
|
|
40
|
+
TransifexApi.register(ResourceString, 'ResourceString');
|
|
41
41
|
|
|
42
42
|
class ResourceStringAsyncDownload extends JsonApiResource {
|
|
43
43
|
static TYPE = 'resource_string_async_downloads';
|
|
44
44
|
}
|
|
45
|
-
TransifexApi.register(ResourceStringAsyncDownload);
|
|
45
|
+
TransifexApi.register(ResourceStringAsyncDownload, 'ResourceStringAsyncDownload');
|
|
46
46
|
|
|
47
47
|
class ResourceStringAsyncUpload extends JsonApiResource {
|
|
48
48
|
static TYPE = 'resource_string_async_downloads';
|
|
49
49
|
}
|
|
50
|
-
TransifexApi.register(ResourceStringAsyncUpload);
|
|
50
|
+
TransifexApi.register(ResourceStringAsyncUpload, 'ResourceStringAsyncUpload');
|
|
51
51
|
|
|
52
52
|
class ResourceStringComment extends JsonApiResource {
|
|
53
53
|
static TYPE = 'Resource_string_comments';
|
|
54
54
|
}
|
|
55
|
-
TransifexApi.register(ResourceStringComment);
|
|
55
|
+
TransifexApi.register(ResourceStringComment, 'ResourceStringComment');
|
|
56
56
|
|
|
57
57
|
class I18nFormat extends JsonApiResource {
|
|
58
58
|
static TYPE = 'i18n_formats';
|
|
59
59
|
}
|
|
60
|
-
TransifexApi.register(I18nFormat);
|
|
60
|
+
TransifexApi.register(I18nFormat, 'I18nFormat');
|
|
61
61
|
|
|
62
62
|
class ContextScreenshotMap extends JsonApiResource {
|
|
63
63
|
static TYPE = 'context_screenshot_maps';
|
|
64
64
|
}
|
|
65
|
-
TransifexApi.register(ContextScreenshotMap);
|
|
65
|
+
TransifexApi.register(ContextScreenshotMap, 'ContextScreenshotMap');
|
|
66
66
|
|
|
67
67
|
class ContextScreenshot extends JsonApiResource {
|
|
68
68
|
static TYPE = 'context_screenshots';
|
|
69
69
|
}
|
|
70
|
-
TransifexApi.register(ContextScreenshot);
|
|
70
|
+
TransifexApi.register(ContextScreenshot, 'ContextScreenshot');
|
|
71
71
|
|
|
72
72
|
class OrganizationActivityReportsAsyncDownload extends JsonApiResource {
|
|
73
73
|
static TYPE = 'organization_activity_reports_async_downloads';
|
|
74
74
|
}
|
|
75
|
-
TransifexApi.register(OrganizationActivityReportsAsyncDownload);
|
|
75
|
+
TransifexApi.register(OrganizationActivityReportsAsyncDownload, 'OrganizationActivityReportsAsyncDownload');
|
|
76
76
|
|
|
77
77
|
class ProjectActivityReportsAsyncDownload extends JsonApiResource {
|
|
78
78
|
static TYPE = 'project_activity_reports_async_downloads';
|
|
79
79
|
}
|
|
80
|
-
TransifexApi.register(ProjectActivityReportsAsyncDownload);
|
|
80
|
+
TransifexApi.register(ProjectActivityReportsAsyncDownload, 'ProjectActivityReportsAsyncDownload');
|
|
81
81
|
|
|
82
82
|
class ResourceActivityReportsAsyncDownload extends JsonApiResource {
|
|
83
83
|
static TYPE = 'resource_activity_reports_async_downloads';
|
|
84
84
|
}
|
|
85
|
-
TransifexApi.register(ResourceActivityReportsAsyncDownload);
|
|
85
|
+
TransifexApi.register(ResourceActivityReportsAsyncDownload, 'ResourceActivityReportsAsyncDownload');
|
|
86
86
|
|
|
87
87
|
class TeamActivityReportsAsyncDownload extends JsonApiResource {
|
|
88
88
|
static TYPE = 'team_activity_reports_async_downloads';
|
|
89
89
|
}
|
|
90
|
-
TransifexApi.register(TeamActivityReportsAsyncDownload);
|
|
90
|
+
TransifexApi.register(TeamActivityReportsAsyncDownload, 'TeamActivityReportsAsyncDownload');
|
|
91
91
|
|
|
92
92
|
class ResourceLanguageStat extends JsonApiResource {
|
|
93
93
|
static TYPE = 'resource_language_stats';
|
|
94
94
|
}
|
|
95
|
-
TransifexApi.register(ResourceLanguageStat);
|
|
95
|
+
TransifexApi.register(ResourceLanguageStat, 'ResourceLanguageStat');
|
|
96
96
|
|
|
97
97
|
class ResourceTranslation extends JsonApiResource {
|
|
98
98
|
static TYPE = 'resource_translations';
|
|
99
99
|
}
|
|
100
|
-
TransifexApi.register(ResourceTranslation);
|
|
100
|
+
TransifexApi.register(ResourceTranslation, 'ResourceTranslation');
|
|
101
101
|
|
|
102
102
|
class ResourceTranslationAsyncDownload extends JsonApiResource {
|
|
103
103
|
static TYPE = 'resource_translations_async_downloads';
|
|
104
104
|
}
|
|
105
|
-
TransifexApi.register(ResourceTranslationAsyncDownload);
|
|
105
|
+
TransifexApi.register(ResourceTranslationAsyncDownload, 'ResourceTranslationAsyncDownload');
|
|
106
106
|
|
|
107
107
|
class ResourceTranslationAsyncUpload extends JsonApiResource {
|
|
108
108
|
static TYPE = 'resource_translations_async_uploads';
|
|
109
109
|
}
|
|
110
|
-
TransifexApi.register(ResourceTranslationAsyncUpload);
|
|
110
|
+
TransifexApi.register(ResourceTranslationAsyncUpload, 'ResourceTranslationAsyncUpload');
|
|
111
111
|
|
|
112
112
|
class TeamMembership extends JsonApiResource {
|
|
113
113
|
static TYPE = 'team_memberships';
|
|
114
114
|
}
|
|
115
|
-
TransifexApi.register(TeamMembership);
|
|
115
|
+
TransifexApi.register(TeamMembership, 'TeamMembership');
|
|
116
116
|
|
|
117
117
|
class Team extends JsonApiResource {
|
|
118
118
|
static TYPE = 'teams';
|
|
119
119
|
}
|
|
120
|
-
TransifexApi.register(Team);
|
|
120
|
+
TransifexApi.register(Team, 'Team');
|
|
121
121
|
|
|
122
122
|
class TmxAsyncDownload extends JsonApiResource {
|
|
123
123
|
static TYPE = 'tmx_async_downloads';
|
|
124
124
|
}
|
|
125
|
-
TransifexApi.register(TmxAsyncDownload);
|
|
125
|
+
TransifexApi.register(TmxAsyncDownload, 'TmxAsyncDownload');
|
|
126
126
|
|
|
127
127
|
class TmxAsyncUpload extends JsonApiResource {
|
|
128
128
|
static TYPE = 'tmx_async_uploads';
|
|
129
129
|
}
|
|
130
|
-
TransifexApi.register(TmxAsyncUpload);
|
|
130
|
+
TransifexApi.register(TmxAsyncUpload, 'TmxAsyncUpload');
|
|
131
131
|
|
|
132
132
|
export const transifexApi = new TransifexApi();
|
package/webpack.config.js
CHANGED
|
@@ -1,26 +1,39 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
2
|
|
|
3
|
-
module.exports =
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
module.exports = [
|
|
4
|
+
{
|
|
5
|
+
mode: 'production',
|
|
6
|
+
entry: './src/transifexApi.js',
|
|
7
|
+
output: {
|
|
8
|
+
path: path.resolve(__dirname, 'dist'),
|
|
9
|
+
filename: 'node.transifexApi.js',
|
|
10
|
+
library: 'transifexApi',
|
|
11
|
+
libraryTarget: 'umd',
|
|
12
12
|
},
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
target: 'node',
|
|
14
|
+
devtool: 'source-map',
|
|
15
15
|
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
{
|
|
17
|
+
mode: 'production',
|
|
18
|
+
entry: './src/transifexApi.js',
|
|
19
|
+
output: {
|
|
20
|
+
path: path.resolve(__dirname, 'dist'),
|
|
21
|
+
filename: 'browser.transifexApi.js',
|
|
22
|
+
library: 'transifexApi',
|
|
23
|
+
libraryTarget: 'umd',
|
|
24
|
+
},
|
|
25
|
+
target: 'web',
|
|
26
|
+
devtool: 'source-map',
|
|
27
|
+
module: {
|
|
28
|
+
rules: [
|
|
29
|
+
{
|
|
30
|
+
test: /\.(js|jsx)$/,
|
|
31
|
+
exclude: /(node_modules|dist)/,
|
|
32
|
+
use: {
|
|
33
|
+
loader: 'babel-loader',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
},
|
|
24
38
|
},
|
|
25
|
-
|
|
26
|
-
};
|
|
39
|
+
];
|