attlaz-client 1.13.1 → 1.13.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.
package/dist/Client.js CHANGED
@@ -64,6 +64,7 @@ export class Client {
64
64
  };
65
65
  apiEndpoint = 'https://api.attlaz.com';
66
66
  parseConfig(config) {
67
+ // TODO: go over other records in config and warn if any unknown ones
67
68
  return config;
68
69
  }
69
70
  constructor(token = null, config = {}) {
@@ -10,6 +10,9 @@ export class DataValueCollection extends JsonSerializable {
10
10
  if (Utils.isNullOrUndefined(rawValues)) {
11
11
  return new DataValueCollection();
12
12
  }
13
+ if (!Utils.isIterable(rawValues)) {
14
+ throw new Error('Raw values is not iterable: ' + JSON.stringify(rawValues));
15
+ }
13
16
  const result = new DataValueCollection();
14
17
  for (const rawValue of rawValues) {
15
18
  // TODO: validate rawTag
@@ -61,9 +61,9 @@ export class SourcesAccountEndpoint extends Endpoint {
61
61
  return rawSourcesAccountRepositories;
62
62
  }
63
63
  async getRepositoryBranches(codeSourceAccountId, repositoryKey, pagination = null) {
64
+ repositoryKey = Utils.base64encode(repositoryKey);
64
65
  const queryString = new QueryString('codesourceaccounts/' + codeSourceAccountId + '/repositories/' + repositoryKey + '/branches');
65
66
  queryString.addPagination(pagination);
66
- repositoryKey = Utils.base64encode(repositoryKey);
67
67
  const rawBranches = await this.requestCollection(queryString, SourcesAccountRepositoryBranch.parse);
68
68
  return rawBranches;
69
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "attlaz-client",
3
- "version": "1.13.1",
3
+ "version": "1.13.3",
4
4
  "description": "Javascript Client to access Attlaz API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",