@one_deploy/sdk 1.0.1 → 1.0.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.
@@ -1,15 +1,17 @@
1
1
  'use strict';
2
2
 
3
3
  // src/config/index.ts
4
+ var DEFAULT_ENGINE_URL = "https://api.one23.io";
5
+ var DEFAULT_CLIENT_ID = "one_pk_e8f647bfa643fdcfaa3a23f760488e49be09f929296eed4a6c399d437d907f60";
4
6
  var config = null;
5
7
  function initOneSDK(options) {
6
- if (!options.oneEngineUrl) {
7
- throw new Error("oneEngineUrl is required");
8
- }
9
- if (!options.oneClientId) {
10
- throw new Error("oneClientId is required");
11
- }
12
- config = options;
8
+ const engineUrl = options.oneEngineUrl || DEFAULT_ENGINE_URL;
9
+ const clientId = options.oneClientId || DEFAULT_CLIENT_ID;
10
+ config = {
11
+ ...options,
12
+ oneEngineUrl: engineUrl,
13
+ oneClientId: clientId
14
+ };
13
15
  }
14
16
  function getConfig() {
15
17
  if (!config) {