skapi-js 1.0.21 → 1.0.22

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.
@@ -32,7 +32,7 @@ export default class Skapi {
32
32
  private __socket_group;
33
33
  constructor(service: string, owner: string, options?: {
34
34
  autoLogin: boolean;
35
- });
35
+ }, __etc?: any);
36
36
  updateConnection(): Promise<Connection>;
37
37
  private checkAdmin;
38
38
  private request;
package/js/main/skapi.js CHANGED
@@ -22,8 +22,8 @@ export default class Skapi {
22
22
  }
23
23
  set user(value) {
24
24
  }
25
- constructor(service, owner, options) {
26
- this.version = '1.0.21';
25
+ constructor(service, owner, options, __etc) {
26
+ this.version = '1.0.22';
27
27
  this.session = null;
28
28
  this.connection = null;
29
29
  this.host = 'skapi';
@@ -98,6 +98,8 @@ export default class Skapi {
98
98
  this.service = service;
99
99
  this.owner = owner;
100
100
  let autoLogin = typeof options?.autoLogin === 'boolean' ? options.autoLogin : true;
101
+ this.target_cdn = __etc?.target_cdn || this.target_cdn;
102
+ this.hostDomain = __etc?.hostDomain || this.hostDomain;
101
103
  const cdn_domain = `https://${this.target_cdn}.cloudfront.net`;
102
104
  let sreg = service.substring(0, 4);
103
105
  this.admin_endpoint = fetch(`${cdn_domain}/${sreg}/admin.json`)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "skapi-js",
3
- "version": "1.0.21",
4
- "description": "Javascript library for Skapi: Complete JAM Stack, front-end driven serverless backend API service.",
3
+ "version": "1.0.22",
4
+ "description": "Skapi: Serverless Backend API.",
5
5
  "main": "./dist/skapi.module.js",
6
6
  "types": "./js/Main.d.ts",
7
7
  "files": [
@@ -33,6 +33,7 @@
33
33
  "backend",
34
34
  "skapi",
35
35
  "api",
36
- "jamstack"
36
+ "jamstack",
37
+ "serverless"
37
38
  ]
38
39
  }