@crowdin/app-project-module 0.17.1 → 0.17.3

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.
@@ -85,7 +85,7 @@ function each(query, params) {
85
85
  }
86
86
  function migrate() {
87
87
  return __awaiter(this, void 0, void 0, function* () {
88
- const newColumns = ['app_secret', 'domain', 'userId', 'organizationId', 'baseUrl'];
88
+ const newColumns = ['app_secret', 'domain', 'user_id', 'organization_id', 'base_url'];
89
89
  const crowdinCredentialsInfo = yield each('PRAGMA table_info(crowdin_credentials);', []);
90
90
  crowdinCredentialsInfo.map((columnInfo) => __awaiter(this, void 0, void 0, function* () {
91
91
  const index = newColumns.indexOf(columnInfo.name);
@@ -119,16 +119,16 @@ function connect(folder) {
119
119
  yield _run(`
120
120
  create table if not exists crowdin_credentials
121
121
  (
122
- id varchar not null primary key,
123
- app_secret varchar null,
124
- domain varchar null,
125
- userId varchar null,
126
- organizationId varchar null,
127
- baseUrl varchar null,
128
- access_token varchar not null,
129
- refresh_token varchar not null,
130
- expire varchar not null,
131
- type varchar not null
122
+ id varchar not null primary key,
123
+ app_secret varchar null,
124
+ domain varchar null,
125
+ user_id varchar null,
126
+ organization_id varchar null,
127
+ base_url varchar null,
128
+ access_token varchar not null,
129
+ refresh_token varchar not null,
130
+ expire varchar not null,
131
+ type varchar not null
132
132
  );
133
133
  `, []);
134
134
  yield _run(`
@@ -169,7 +169,7 @@ function connect(folder) {
169
169
  }
170
170
  exports.connect = connect;
171
171
  function saveCrowdinCredentials(credentials) {
172
- return run('INSERT INTO crowdin_credentials(id, app_secret, domain, user_id, organization_id, base_url, access_token, refresh_token, expire, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)', [
172
+ return run('INSERT INTO crowdin_credentials(id, app_secret, domain, user_id, organization_id, base_url, access_token, refresh_token, expire, type) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)', [
173
173
  credentials.id,
174
174
  credentials.appSecret,
175
175
  credentials.domain,
@@ -179,6 +179,7 @@ function saveCrowdinCredentials(credentials) {
179
179
  credentials.accessToken,
180
180
  credentials.refreshToken,
181
181
  credentials.expire,
182
+ credentials.type,
182
183
  ]);
183
184
  }
184
185
  exports.saveCrowdinCredentials = saveCrowdinCredentials;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdin/app-project-module",
3
- "version": "0.17.1",
3
+ "version": "0.17.3",
4
4
  "description": "Module that generates for you all common endpoints for serving standalone Crowdin App",
5
5
  "main": "out/index.js",
6
6
  "types": "out/index.d.ts",