@adaptabletools/adaptable-plugin-ipushpull 15.0.1 → 15.0.3-canary.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaptabletools/adaptable-plugin-ipushpull",
3
- "version": "15.0.1",
3
+ "version": "15.0.3-canary.0",
4
4
  "description": "",
5
5
  "homepage": "http://www.adaptabletools.com/",
6
6
  "author": {
@@ -19,6 +19,6 @@
19
19
  "redux": "4.0.5",
20
20
  "styled-components": "^4.4.1",
21
21
  "tslib": "^2.3.0",
22
- "@adaptabletools/adaptable": "15.0.1"
22
+ "@adaptabletools/adaptable": "15.0.3-canary.0"
23
23
  }
24
24
  }
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
5
5
  const AdaptableModuleBase_1 = require("@adaptabletools/adaptable/src/Strategy/AdaptableModuleBase");
6
6
  const ModuleConstants = tslib_1.__importStar(require("@adaptabletools/adaptable/src/Utilities/Constants/ModuleConstants"));
7
7
  const throttle_1 = tslib_1.__importDefault(require("lodash/throttle"));
8
- const logger_1 = require("../logger");
9
8
  const GeneralConstants_1 = require("@adaptabletools/adaptable/src/Utilities/Constants/GeneralConstants");
10
9
  const EQUAL_DATA_ERR = 'equal data, so not sending';
11
10
  class PushPullModule extends AdaptableModuleBase_1.AdaptableModuleBase {
@@ -113,7 +112,7 @@ class PushPullModule extends AdaptableModuleBase_1.AdaptableModuleBase {
113
112
  let reportAsArray = this.adaptable.ReportService.getReportDataAsArray(report);
114
113
  const currentData = JSON.stringify(reportAsArray);
115
114
  if (currentData === this.lastData) {
116
- (0, logger_1.LogAdaptableWarning)(EQUAL_DATA_ERR);
115
+ this.adaptable.logger.warn(EQUAL_DATA_ERR);
117
116
  this.isSendingData = false;
118
117
  return;
119
118
  }
@@ -136,7 +135,7 @@ class PushPullModule extends AdaptableModuleBase_1.AdaptableModuleBase {
136
135
  return this.adaptable.ReportService.PublishLiveLiveDataChangedEvent('ipushpull', 'LiveDataUpdated', currentLiveIPushPullReport);
137
136
  })
138
137
  .catch((reason) => {
139
- (0, logger_1.LogAdaptableWarning)('Failed to send data to ipushpull for [' + currentLiveIPushPullReport.ReportName + ']', reason);
138
+ this.adaptable.logger.warn('Failed to send data to ipushpull for [' + currentLiveIPushPullReport.ReportName + ']', reason);
140
139
  this.stopLiveData();
141
140
  let errorMessage = 'Export Failed';
142
141
  if (reason) {
@@ -147,11 +146,11 @@ class PushPullModule extends AdaptableModuleBase_1.AdaptableModuleBase {
147
146
  });
148
147
  Promise.resolve()
149
148
  .then(() => {
150
- (0, logger_1.LogAdaptableSuccess)('All live report data sent');
149
+ this.adaptable.logger.success('All live report data sent');
151
150
  this.isSendingData = false;
152
151
  })
153
152
  .catch(() => {
154
- (0, logger_1.LogAdaptableWarning)('Failed to send data');
153
+ this.adaptable.logger.warn('Failed to send data');
155
154
  this.isSendingData = false;
156
155
  });
157
156
  }
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PushPullService = exports.ServiceStatus = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const logger_1 = require("../../logger");
6
5
  const StringExtensions_1 = tslib_1.__importDefault(require("@adaptabletools/adaptable/src/Utilities/Extensions/StringExtensions"));
7
6
  var ServiceStatus;
8
7
  (function (ServiceStatus) {
@@ -66,7 +65,7 @@ class PushPullService {
66
65
  .login(login, password)
67
66
  .then((result) => {
68
67
  this.ppInstance.__status = ServiceStatus.Connected;
69
- (0, logger_1.LogAdaptableSuccess)('Logged in to ipushpull');
68
+ this.adaptable.logger.success('Logged in to ipushpull');
70
69
  return result;
71
70
  })
72
71
  .catch((err) => {
@@ -84,7 +83,7 @@ class PushPullService {
84
83
  return this.ppInstance.api
85
84
  .getDomainsAndPages(this.ppInstance.config.api_key)
86
85
  .then((response) => {
87
- (0, logger_1.LogAdaptableSuccess)('Retrieved ipushpull Folder/Page info');
86
+ this.adaptable.logger.success('Retrieved ipushpull Folder/Page info');
88
87
  return response.data.domains.map((domain) => ({
89
88
  Name: domain.name,
90
89
  FolderId: domain.id,
@@ -94,7 +93,7 @@ class PushPullService {
94
93
  }));
95
94
  })
96
95
  .catch((error) => {
97
- (0, logger_1.LogAdaptableError)("Couldn't get Domain/Pages from ipushpull : ", error);
96
+ this.adaptable.logger.error("Couldn't get Domain/Pages from ipushpull : ", error);
98
97
  throw error.message;
99
98
  });
100
99
  }
@@ -105,7 +104,7 @@ class PushPullService {
105
104
  return new Promise((resolve, reject) => {
106
105
  const page = new this.ppInstance.Page(pageIPP, folderIPP);
107
106
  page.on(page.EVENT_NEW_CONTENT, () => {
108
- (0, logger_1.LogAdaptableInfo)(`Page Ready : ${pageIPP}`);
107
+ this.adaptable.logger.info(`Page Ready : ${pageIPP}`);
109
108
  this.pages.set(pageIPP, page);
110
109
  resolve(page);
111
110
  // we return true so it removes the listener for new content.
@@ -119,7 +118,7 @@ class PushPullService {
119
118
  if (pageIPP) {
120
119
  pageIPP.destroy();
121
120
  this.pages.delete(page);
122
- (0, logger_1.LogAdaptableInfo)(`Page Unloaded : ${page}`);
121
+ this.adaptable.logger.info(`Page Unloaded : ${page}`);
123
122
  }
124
123
  }
125
124
  addNewPage(folderId, page) {
@@ -134,7 +133,7 @@ class PushPullService {
134
133
  return this.getIPPApi().retrieveIPushPullDomainsFromIPushPull();
135
134
  })
136
135
  .catch((err) => {
137
- (0, logger_1.LogAdaptableError)("Couldn't create Page: '" + page + "'. Reason: " + err);
136
+ this.adaptable.logger.error("Couldn't create Page: '" + page + "'. Reason: " + err);
138
137
  });
139
138
  }
140
139
  pushData(page, data) {
@@ -203,10 +202,10 @@ class PushPullService {
203
202
  pageIPP.Content.canDoDelta = false;
204
203
  pageIPP.Content.update(newData, true);
205
204
  pageIPP.push().then(() => {
206
- (0, logger_1.LogAdaptableSuccess)(`Data pushed for ipushpull page : ${page}`);
205
+ this.adaptable.logger.success(`Data pushed for ipushpull page : ${page}`);
207
206
  resolve();
208
207
  }, (err) => {
209
- (0, logger_1.LogAdaptableInfo)(`Error pushing data for ipushpull page : ${page}`);
208
+ this.adaptable.logger.info(`Error pushing data for ipushpull page : ${page}`);
210
209
  reject();
211
210
  });
212
211
  });
package/src/logger.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const LogAdaptableError: (message: string, ...optionalParams: any[]) => void, LogAdaptableInfo: (message: string, ...optionalParams: any[]) => void, LogAdaptableSuccess: (message: string, ...optionalParams: any[]) => void, LogAdaptableWarning: (message: string, ...optionalParams: any[]) => void;
package/src/logger.js DELETED
@@ -1,6 +0,0 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.LogAdaptableWarning = exports.LogAdaptableSuccess = exports.LogAdaptableInfo = exports.LogAdaptableError = void 0;
5
- const LoggingHelper_1 = require("@adaptabletools/adaptable/src/Utilities/Helpers/LoggingHelper");
6
- _a = (0, LoggingHelper_1.getLoggingFunctions)('ipushpull'), exports.LogAdaptableError = _a.LogAdaptableError, exports.LogAdaptableInfo = _a.LogAdaptableInfo, exports.LogAdaptableSuccess = _a.LogAdaptableSuccess, exports.LogAdaptableWarning = _a.LogAdaptableWarning;