Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
495a3ffafd | |||
ffd1274f21 | |||
8e4ad6159a | |||
c5a2383fd3 | |||
2c25cd0655 | |||
370caae226 | |||
75c3979120 | |||
b5d792d58c | |||
05b80b618b | |||
511b7ee143 | |||
08d37dc037 | |||
2b5056085c | |||
8f31088ab5 | |||
6e99af15f9 | |||
914615fa4d | |||
70c6ffcbd3 | |||
b3023d61f3 | |||
ca585b20e3 | |||
944837f338 | |||
5068a2d035 | |||
97de52456e |
@ -15,7 +15,9 @@ stages:
|
|||||||
testLEGACY:
|
testLEGACY:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test legacy
|
- npmci node install lts
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -24,7 +26,9 @@ testLEGACY:
|
|||||||
testLTS:
|
testLTS:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test lts
|
- npmci node install lts
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -32,7 +36,9 @@ testLTS:
|
|||||||
testSTABLE:
|
testSTABLE:
|
||||||
stage: test
|
stage: test
|
||||||
script:
|
script:
|
||||||
- npmci test stable
|
- npmci node install stable
|
||||||
|
- npmci npm install
|
||||||
|
- npmci npm test
|
||||||
coverage: /\d+.?\d+?\%\s*coverage/
|
coverage: /\d+.?\d+?\%\s*coverage/
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
@ -40,7 +46,8 @@ testSTABLE:
|
|||||||
release:
|
release:
|
||||||
stage: release
|
stage: release
|
||||||
script:
|
script:
|
||||||
- npmci publish
|
- npmci npm prepare
|
||||||
|
- npmci npm publish
|
||||||
only:
|
only:
|
||||||
- tags
|
- tags
|
||||||
tags:
|
tags:
|
||||||
|
2
dist/index.d.ts
vendored
2
dist/index.d.ts
vendored
@ -1 +1 @@
|
|||||||
export { AnalyticsAccount } from './smartanalytics.classes.analyticsaccount';
|
export { Analytics } from './smartanalytics.classes.analytics';
|
||||||
|
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -1,5 +1,5 @@
|
|||||||
"use strict";
|
"use strict";
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
var smartanalytics_classes_analyticsaccount_1 = require("./smartanalytics.classes.analyticsaccount");
|
var smartanalytics_classes_analytics_1 = require("./smartanalytics.classes.analytics");
|
||||||
exports.AnalyticsAccount = smartanalytics_classes_analyticsaccount_1.AnalyticsAccount;
|
exports.Analytics = smartanalytics_classes_analytics_1.Analytics;
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHFHQUE0RTtBQUFuRSxxRUFBQSxnQkFBZ0IsQ0FBQSJ9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHVGQUE4RDtBQUFyRCx1REFBQSxTQUFTLENBQUEifQ==
|
13
dist/smartanalytics.classes.analytics.d.ts
vendored
Normal file
13
dist/smartanalytics.classes.analytics.d.ts
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
export declare class Analytics {
|
||||||
|
projectId: string;
|
||||||
|
appName: string;
|
||||||
|
apiEndPoint: string;
|
||||||
|
secretKey: string;
|
||||||
|
constructor(optionsArg: {
|
||||||
|
projectId: string;
|
||||||
|
appName: string;
|
||||||
|
apiEndPoint: string;
|
||||||
|
secretKey?: string;
|
||||||
|
});
|
||||||
|
recordEvent(eventIdArg: string, analyticsDataArg: any): Promise<void>;
|
||||||
|
}
|
43
dist/smartanalytics.classes.analytics.js
vendored
Normal file
43
dist/smartanalytics.classes.analytics.js
vendored
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const plugins = require("./smartanalytics.plugins");
|
||||||
|
class Analytics {
|
||||||
|
constructor(optionsArg) {
|
||||||
|
this.secretKey = '';
|
||||||
|
this.projectId = optionsArg.projectId;
|
||||||
|
this.appName = optionsArg.appName;
|
||||||
|
this.apiEndPoint = optionsArg.apiEndPoint;
|
||||||
|
if (optionsArg.secretKey) {
|
||||||
|
this.secretKey = optionsArg.secretKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
recordEvent(eventIdArg, analyticsDataArg) {
|
||||||
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
|
let dataToSend = {
|
||||||
|
projectId: this.projectId,
|
||||||
|
appName: this.appName,
|
||||||
|
eventId: eventIdArg,
|
||||||
|
analyticsData: analyticsDataArg
|
||||||
|
};
|
||||||
|
yield plugins.smartrequest.post(this.apiEndPoint, {
|
||||||
|
headers: {
|
||||||
|
'authenticate': this.secretKey,
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
requestBody: dataToSend
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Analytics = Analytics;
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhbmFseXRpY3MuY2xhc3Nlcy5hbmFseXRpY3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGFuYWx5dGljcy5jbGFzc2VzLmFuYWx5dGljcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsb0RBQW1EO0FBRW5EO0lBS0UsWUFBYSxVQUtaO1FBTkQsY0FBUyxHQUFXLEVBQUUsQ0FBQTtRQU9wQixJQUFJLENBQUMsU0FBUyxHQUFHLFVBQVUsQ0FBQyxTQUFTLENBQUE7UUFDckMsSUFBSSxDQUFDLE9BQU8sR0FBRyxVQUFVLENBQUMsT0FBTyxDQUFBO1FBQ2pDLElBQUksQ0FBQyxXQUFXLEdBQUcsVUFBVSxDQUFDLFdBQVcsQ0FBQTtRQUN6QyxFQUFFLENBQUMsQ0FBQyxVQUFVLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQztZQUN6QixJQUFJLENBQUMsU0FBUyxHQUFHLFVBQVUsQ0FBQyxTQUFTLENBQUE7UUFDdkMsQ0FBQztJQUNILENBQUM7SUFFSyxXQUFXLENBQUUsVUFBa0IsRUFBRSxnQkFBcUI7O1lBQzFELElBQUksVUFBVSxHQUFHO2dCQUNmLFNBQVMsRUFBRSxJQUFJLENBQUMsU0FBUztnQkFDekIsT0FBTyxFQUFFLElBQUksQ0FBQyxPQUFPO2dCQUNyQixPQUFPLEVBQUUsVUFBVTtnQkFDbkIsYUFBYSxFQUFFLGdCQUFnQjthQUNoQyxDQUFBO1lBQ0QsTUFBTSxPQUFPLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsV0FBVyxFQUFFO2dCQUNoRCxPQUFPLEVBQUU7b0JBQ1AsY0FBYyxFQUFFLElBQUksQ0FBQyxTQUFTO29CQUM5QixjQUFjLEVBQUUsa0JBQWtCO2lCQUNuQztnQkFDRCxXQUFXLEVBQUUsVUFBVTthQUN4QixDQUFDLENBQUMsS0FBSyxDQUFDLEdBQUc7Z0JBQ1YsT0FBTyxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsQ0FBQTtZQUNsQixDQUFDLENBQUMsQ0FBQTtRQUNKLENBQUM7S0FBQTtDQUNGO0FBcENELDhCQW9DQyJ9
|
@ -1,6 +0,0 @@
|
|||||||
export declare class AnalyticsAccount {
|
|
||||||
appName: string;
|
|
||||||
trackingId: string;
|
|
||||||
constructor(appNameArg: string, trackingIdArg: string);
|
|
||||||
sendEvent(eventCategoryArg: any, eventActionArg: any, eventLabelArg: string): void;
|
|
||||||
}
|
|
14
dist/smartanalytics.classes.analyticsaccount.js
vendored
14
dist/smartanalytics.classes.analyticsaccount.js
vendored
@ -1,14 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
const send = require("./smartanalytics.send");
|
|
||||||
class AnalyticsAccount {
|
|
||||||
constructor(appNameArg, trackingIdArg) {
|
|
||||||
this.appName = appNameArg;
|
|
||||||
this.trackingId = trackingIdArg;
|
|
||||||
}
|
|
||||||
sendEvent(eventCategoryArg, eventActionArg, eventLabelArg) {
|
|
||||||
send.event(this.trackingId, this.appName, eventCategoryArg, eventActionArg, eventLabelArg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
exports.AnalyticsAccount = AnalyticsAccount;
|
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhbmFseXRpY3MuY2xhc3Nlcy5hbmFseXRpY3NhY2NvdW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnRhbmFseXRpY3MuY2xhc3Nlcy5hbmFseXRpY3NhY2NvdW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQ0EsOENBQTZDO0FBRTdDO0lBR0UsWUFBWSxVQUFrQixFQUFFLGFBQXFCO1FBQ25ELElBQUksQ0FBQyxPQUFPLEdBQUcsVUFBVSxDQUFBO1FBQ3pCLElBQUksQ0FBQyxVQUFVLEdBQUcsYUFBYSxDQUFBO0lBQ2pDLENBQUM7SUFFRCxTQUFTLENBQUUsZ0JBQWdCLEVBQUUsY0FBYyxFQUFFLGFBQXFCO1FBQ2hFLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLFVBQVUsRUFBRSxJQUFJLENBQUMsT0FBTyxFQUFFLGdCQUFnQixFQUFFLGNBQWMsRUFBRSxhQUFhLENBQUMsQ0FBQTtJQUM1RixDQUFDO0NBQ0Y7QUFYRCw0Q0FXQyJ9
|
|
1
dist/smartanalytics.send.d.ts
vendored
1
dist/smartanalytics.send.d.ts
vendored
@ -1 +0,0 @@
|
|||||||
export declare let event: (trackingIdArg: string, appNameArg: string, eventCategoryArg: string, eventActionArg: any, eventLabelArg?: string) => void;
|
|
30
dist/smartanalytics.send.js
vendored
30
dist/smartanalytics.send.js
vendored
@ -1,30 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
Object.defineProperty(exports, "__esModule", { value: true });
|
|
||||||
const plugins = require("./smartanalytics.plugins");
|
|
||||||
exports.event = (trackingIdArg, appNameArg, eventCategoryArg, eventActionArg, eventLabelArg = 'null') => {
|
|
||||||
let payload = 'v=1' +
|
|
||||||
`&tid=${trackingIdArg}` +
|
|
||||||
'&cid=555' +
|
|
||||||
'&aip=1' +
|
|
||||||
'&t=event' +
|
|
||||||
`&ec=${eventCategoryArg}` +
|
|
||||||
`&ea=${eventActionArg}` +
|
|
||||||
`&el=${eventLabelArg}` +
|
|
||||||
'&ev=300' +
|
|
||||||
`&an=${appNameArg}`;
|
|
||||||
send(payload);
|
|
||||||
};
|
|
||||||
let send = (requestBodyArg) => __awaiter(this, void 0, void 0, function* () {
|
|
||||||
yield plugins.smartrequest.post('https://www.google-analytics.com/collect', {
|
|
||||||
requestBody: requestBodyArg
|
|
||||||
});
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRhbmFseXRpY3Muc2VuZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0YW5hbHl0aWNzLnNlbmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUFBLG9EQUFtRDtBQUV4QyxRQUFBLEtBQUssR0FBRyxDQUFDLGFBQXFCLEVBQUUsVUFBa0IsRUFBRSxnQkFBd0IsRUFBRSxjQUFjLEVBQUUsZ0JBQXdCLE1BQU07SUFDckksSUFBSSxPQUFPLEdBQVcsS0FBSztRQUN6QixRQUFRLGFBQWEsRUFBRTtRQUN2QixVQUFVO1FBQ1YsUUFBUTtRQUNSLFVBQVU7UUFDVixPQUFPLGdCQUFnQixFQUFFO1FBQ3pCLE9BQU8sY0FBYyxFQUFFO1FBQ3ZCLE9BQU8sYUFBYSxFQUFFO1FBQ3RCLFNBQVM7UUFDVCxPQUFPLFVBQVUsRUFBRSxDQUFBO0lBQ3JCLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQTtBQUNmLENBQUMsQ0FBQTtBQUdELElBQUksSUFBSSxHQUFHLENBQU8sY0FBc0I7SUFDdEMsTUFBTSxPQUFPLENBQUMsWUFBWSxDQUFDLElBQUksQ0FBQywwQ0FBMEMsRUFBRTtRQUMxRSxXQUFXLEVBQUUsY0FBYztLQUM1QixDQUFDLENBQUE7QUFDSixDQUFDLENBQUEsQ0FBQSJ9
|
|
46
docs/index.md
Normal file
46
docs/index.md
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
# smartanalytics
|
||||||
|
Google Analytics everywhere
|
||||||
|
|
||||||
|
## Availabililty
|
||||||
|
[](https://www.npmjs.com/package/smartanalytics)
|
||||||
|
[](https://GitLab.com/pushrocks/smartanalytics)
|
||||||
|
[](https://github.com/pushrocks/smartanalytics)
|
||||||
|
[](https://pushrocks.gitlab.io/smartanalytics/)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
[](https://GitLab.com/pushrocks/smartanalytics/commits/master)
|
||||||
|
[](https://GitLab.com/pushrocks/smartanalytics/commits/master)
|
||||||
|
[](https://www.npmjs.com/package/smartanalytics)
|
||||||
|
[](https://david-dm.org/pushrocks/smartanalytics)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/smartanalytics/master/dependencies/npm)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/smartanalytics)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](http://standardjs.com/)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
Use TypeScript for best in class instellisense.
|
||||||
|
|
||||||
|
### Why does this package exist?
|
||||||
|
Tracking users in webapps is common. We use Google Analytics to gain insight in who is using what
|
||||||
|
and where to spend resources for best efficiency.
|
||||||
|
|
||||||
|
Doing the same stuff in apps can be a bit of a hassle.
|
||||||
|
Unnecessary dependencies used by many existing analytics tools make the whole app slow
|
||||||
|
just to gain a little usage info.
|
||||||
|
Say hello to smartanalytics.
|
||||||
|
It features a very slim dependency tree using the native node request module to send posts to Google Analytics.
|
||||||
|
|
||||||
|
### How do I use this package?
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
import {AnalyticsAccount} from 'smartanalytics'
|
||||||
|
let myAnalyticsAccount = new AnalyticsAccount('My App Name', 'UA-XXXXXX-Y')
|
||||||
|
myAnalyticsAccount.sendEvent('npmtool', 'install', 'somelabel')
|
||||||
|
```
|
||||||
|
|
||||||
|
For further information read the linked docs at the top of this README.
|
||||||
|
|
||||||
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
|
||||||
|
[](https://push.rocks)
|
@ -1,9 +1,8 @@
|
|||||||
{
|
{
|
||||||
"npmts": {
|
"npmts": {
|
||||||
"coverageTreshold": 40
|
|
||||||
},
|
},
|
||||||
"npmci": {
|
"npmci": {
|
||||||
"globalNpmTools": [
|
"npmGlobalTools": [
|
||||||
"npmts"
|
"npmts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "smartanalytics",
|
"name": "smartanalytics",
|
||||||
"version": "1.0.6",
|
"version": "2.0.9",
|
||||||
"description": "Google Analytics everywhere",
|
"description": "Google Analytics everywhere",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "dist/index.d.ts",
|
"typings": "dist/index.d.ts",
|
||||||
@ -15,7 +15,6 @@
|
|||||||
"typings-global": "^1.0.14"
|
"typings-global": "^1.0.14"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"smartchai": "^1.0.3",
|
"tapbundle": "^1.1.1"
|
||||||
"typings-test": "^1.0.3"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
31
test/test.js
31
test/test.js
@ -1,31 +0,0 @@
|
|||||||
"use strict";
|
|
||||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
||||||
return new (P || (P = Promise))(function (resolve, reject) {
|
|
||||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
||||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
||||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
||||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
||||||
});
|
|
||||||
};
|
|
||||||
require("typings-test");
|
|
||||||
const smartanalytics = require("../dist/index");
|
|
||||||
let testAccount;
|
|
||||||
describe('smartanalytics', function () {
|
|
||||||
it('should create a valid AnalyticsAccount', function () {
|
|
||||||
testAccount = new smartanalytics.AnalyticsAccount('smartanalytics', 'UA-92592300-1');
|
|
||||||
});
|
|
||||||
it('should send a request to Google Analytics', function () {
|
|
||||||
let doit = () => __awaiter(this, void 0, void 0, function* () {
|
|
||||||
yield testAccount.sendEvent('npmtool', 'install', 'pushrocks/smartq');
|
|
||||||
yield testAccount.sendEvent('npmtool', 'started', 'pushrocks/smartanalytics');
|
|
||||||
yield testAccount.sendEvent('npmtool', 'install', 'pushrocks/smartq');
|
|
||||||
yield testAccount.sendEvent('npmtool', 'started', 'pushrocks/smartanalytics');
|
|
||||||
yield testAccount.sendEvent('npmtool', 'install', 'pushrocks/smartq');
|
|
||||||
yield testAccount.sendEvent('npmtool', 'started', 'pushrocks/smartanalytics');
|
|
||||||
yield testAccount.sendEvent('npmtool', 'install', 'pushrocks/smartq');
|
|
||||||
yield testAccount.sendEvent('npmtool', 'started', 'pushrocks/smartanalytics');
|
|
||||||
});
|
|
||||||
doit();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUEsd0JBQXFCO0FBSXJCLGdEQUErQztBQUUvQyxJQUFJLFdBQTRDLENBQUE7QUFFaEQsUUFBUSxDQUFDLGdCQUFnQixFQUFFO0lBQ3pCLEVBQUUsQ0FBQyx3Q0FBd0MsRUFBRTtRQUMzQyxXQUFXLEdBQUcsSUFBSSxjQUFjLENBQUMsZ0JBQWdCLENBQUMsZ0JBQWdCLEVBQUUsZUFBZSxDQUFDLENBQUE7SUFDdEYsQ0FBQyxDQUFDLENBQUE7SUFFRixFQUFFLENBQUMsMkNBQTJDLEVBQUU7UUFDOUMsSUFBSSxJQUFJLEdBQUc7WUFDVCxNQUFNLFdBQVcsQ0FBQyxTQUFTLENBQUMsU0FBUyxFQUFFLFNBQVMsRUFBRSxrQkFBa0IsQ0FBQyxDQUFBO1lBQ3JFLE1BQU0sV0FBVyxDQUFDLFNBQVMsQ0FBQyxTQUFTLEVBQUUsU0FBUyxFQUFFLDBCQUEwQixDQUFDLENBQUE7WUFDN0UsTUFBTSxXQUFXLENBQUMsU0FBUyxDQUFDLFNBQVMsRUFBRSxTQUFTLEVBQUUsa0JBQWtCLENBQUMsQ0FBQTtZQUNyRSxNQUFNLFdBQVcsQ0FBQyxTQUFTLENBQUMsU0FBUyxFQUFFLFNBQVMsRUFBRSwwQkFBMEIsQ0FBQyxDQUFBO1lBQzdFLE1BQU0sV0FBVyxDQUFDLFNBQVMsQ0FBQyxTQUFTLEVBQUUsU0FBUyxFQUFFLGtCQUFrQixDQUFDLENBQUE7WUFDckUsTUFBTSxXQUFXLENBQUMsU0FBUyxDQUFDLFNBQVMsRUFBRSxTQUFTLEVBQUUsMEJBQTBCLENBQUMsQ0FBQTtZQUM3RSxNQUFNLFdBQVcsQ0FBQyxTQUFTLENBQUMsU0FBUyxFQUFFLFNBQVMsRUFBRSxrQkFBa0IsQ0FBQyxDQUFBO1lBQ3JFLE1BQU0sV0FBVyxDQUFDLFNBQVMsQ0FBQyxTQUFTLEVBQUUsU0FBUyxFQUFFLDBCQUEwQixDQUFDLENBQUE7UUFDL0UsQ0FBQyxDQUFBLENBQUE7UUFDRCxJQUFJLEVBQUUsQ0FBQTtJQUNSLENBQUMsQ0FBQyxDQUFBO0FBQ0osQ0FBQyxDQUFDLENBQUEifQ==
|
|
36
test/test.ts
36
test/test.ts
@ -1,27 +1,27 @@
|
|||||||
import 'typings-test'
|
import { expect, tap } from 'tapbundle'
|
||||||
|
|
||||||
import { expect } from 'smartchai'
|
import * as smartanalytics from '../ts/index'
|
||||||
|
|
||||||
import * as smartanalytics from '../dist/index'
|
let testAnalytics: smartanalytics.Analytics
|
||||||
|
|
||||||
let testAccount: smartanalytics.AnalyticsAccount
|
tap.test('should create a valid AnalyticsAccount', async () => {
|
||||||
|
testAnalytics = new smartanalytics.Analytics({
|
||||||
describe('smartanalytics', function () {
|
projectId: 'sandbox',
|
||||||
it('should create a valid AnalyticsAccount', function () {
|
appName: 'smartanalytics',
|
||||||
testAccount = new smartanalytics.AnalyticsAccount('smartanalytics', 'UA-92592300-1')
|
apiEndPoint: 'https://pubapi-1.lossless.one/analytics'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should send a request to Google Analytics', function () {
|
tap.test('should send a request to Lossless API endpoint', async () => {
|
||||||
let doit = async () => {
|
let doit = async () => {
|
||||||
await testAccount.sendEvent('npmtool', 'install', 'pushrocks/smartq')
|
await testAnalytics.recordEvent('sandbox', {
|
||||||
await testAccount.sendEvent('npmtool', 'started', 'pushrocks/smartanalytics')
|
trackingPurpose: 'test'
|
||||||
await testAccount.sendEvent('npmtool', 'install', 'pushrocks/smartq')
|
})
|
||||||
await testAccount.sendEvent('npmtool', 'started', 'pushrocks/smartanalytics')
|
await testAnalytics.recordEvent('sandbox', {
|
||||||
await testAccount.sendEvent('npmtool', 'install', 'pushrocks/smartq')
|
someValue: 'someData'
|
||||||
await testAccount.sendEvent('npmtool', 'started', 'pushrocks/smartanalytics')
|
})
|
||||||
await testAccount.sendEvent('npmtool', 'install', 'pushrocks/smartq')
|
|
||||||
await testAccount.sendEvent('npmtool', 'started', 'pushrocks/smartanalytics')
|
|
||||||
}
|
}
|
||||||
doit()
|
doit()
|
||||||
})
|
})
|
||||||
})
|
|
||||||
|
tap.start()
|
||||||
|
@ -1 +1 @@
|
|||||||
export { AnalyticsAccount } from './smartanalytics.classes.analyticsaccount'
|
export { Analytics } from './smartanalytics.classes.analytics'
|
||||||
|
39
ts/smartanalytics.classes.analytics.ts
Normal file
39
ts/smartanalytics.classes.analytics.ts
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
import * as plugins from './smartanalytics.plugins'
|
||||||
|
|
||||||
|
export class Analytics {
|
||||||
|
projectId: string
|
||||||
|
appName: string
|
||||||
|
apiEndPoint: string
|
||||||
|
secretKey: string = ''
|
||||||
|
constructor (optionsArg: {
|
||||||
|
projectId: string
|
||||||
|
appName: string
|
||||||
|
apiEndPoint: string
|
||||||
|
secretKey?: string
|
||||||
|
}) {
|
||||||
|
this.projectId = optionsArg.projectId
|
||||||
|
this.appName = optionsArg.appName
|
||||||
|
this.apiEndPoint = optionsArg.apiEndPoint
|
||||||
|
if (optionsArg.secretKey) {
|
||||||
|
this.secretKey = optionsArg.secretKey
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async recordEvent (eventIdArg: string, analyticsDataArg: any) {
|
||||||
|
let dataToSend = {
|
||||||
|
projectId: this.projectId,
|
||||||
|
appName: this.appName,
|
||||||
|
eventId: eventIdArg,
|
||||||
|
analyticsData: analyticsDataArg
|
||||||
|
}
|
||||||
|
await plugins.smartrequest.post(this.apiEndPoint, {
|
||||||
|
headers: {
|
||||||
|
'authenticate': this.secretKey,
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
requestBody: dataToSend
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
@ -1,15 +0,0 @@
|
|||||||
import * as plugins from './smartanalytics.plugins'
|
|
||||||
import * as send from './smartanalytics.send'
|
|
||||||
|
|
||||||
export class AnalyticsAccount {
|
|
||||||
appName: string
|
|
||||||
trackingId: string
|
|
||||||
constructor(appNameArg: string, trackingIdArg: string) {
|
|
||||||
this.appName = appNameArg
|
|
||||||
this.trackingId = trackingIdArg
|
|
||||||
}
|
|
||||||
|
|
||||||
sendEvent (eventCategoryArg, eventActionArg, eventLabelArg: string) {
|
|
||||||
send.event(this.trackingId, this.appName, eventCategoryArg, eventActionArg, eventLabelArg)
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
import * as plugins from './smartanalytics.plugins'
|
|
||||||
|
|
||||||
export let event = (trackingIdArg: string, appNameArg: string, eventCategoryArg: string, eventActionArg, eventLabelArg: string = 'null') => {
|
|
||||||
let payload: string = 'v=1' +
|
|
||||||
`&tid=${trackingIdArg}` + // the tracking ID
|
|
||||||
'&cid=555' +
|
|
||||||
'&aip=1' + // anonymize the IP
|
|
||||||
'&t=event' +
|
|
||||||
`&ec=${eventCategoryArg}` + // event category
|
|
||||||
`&ea=${eventActionArg}` + // event action
|
|
||||||
`&el=${eventLabelArg}` + // event label
|
|
||||||
'&ev=300' +
|
|
||||||
`&an=${appNameArg}`
|
|
||||||
send(payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
let send = async (requestBodyArg: string) => {
|
|
||||||
await plugins.smartrequest.post('https://www.google-analytics.com/collect', {
|
|
||||||
requestBody: requestBodyArg
|
|
||||||
})
|
|
||||||
}
|
|
305
yarn.lock
305
yarn.lock
@ -10,36 +10,77 @@
|
|||||||
"@types/promises-a-plus" "*"
|
"@types/promises-a-plus" "*"
|
||||||
|
|
||||||
"@types/chai-string@^1.1.30":
|
"@types/chai-string@^1.1.30":
|
||||||
version "1.1.30"
|
version "1.1.31"
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.1.30.tgz#4d8744b31a5a2295fc01c981ed1e2d4c8a070f0a"
|
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.1.31.tgz#a22f75d713f69da8c5cf34f8bc808a62cd249405"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/chai" "*"
|
"@types/chai" "*"
|
||||||
|
|
||||||
"@types/chai@*", "@types/chai@^3.4.35":
|
"@types/chai@*":
|
||||||
version "3.4.35"
|
version "4.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.4.35.tgz#e8d65f83492d2944f816fc620741821c28a8c900"
|
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.4.tgz#fe86315d9a66827feeb16f73bc954688ec950e18"
|
||||||
|
|
||||||
"@types/mocha@^2.2.31":
|
"@types/chai@^3.4.35":
|
||||||
version "2.2.39"
|
version "3.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.39.tgz#f68d63db8b69c38e9558b4073525cf96c4f7a829"
|
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
|
||||||
|
|
||||||
|
"@types/glob@*":
|
||||||
|
version "5.0.32"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.32.tgz#aec5cfe987c72f099fdb1184452986aa506d5e8f"
|
||||||
|
dependencies:
|
||||||
|
"@types/minimatch" "*"
|
||||||
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@types/minimatch@*":
|
||||||
|
version "3.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.1.tgz#b683eb60be358304ef146f5775db4c0e3696a550"
|
||||||
|
|
||||||
|
"@types/node@*":
|
||||||
|
version "8.0.24"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.24.tgz#06c580084d9add1fb40c1510ef0b448961246fb1"
|
||||||
|
|
||||||
"@types/promises-a-plus@*":
|
"@types/promises-a-plus@*":
|
||||||
version "0.0.27"
|
version "0.0.27"
|
||||||
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
||||||
|
|
||||||
|
"@types/shelljs@^0.7.2":
|
||||||
|
version "0.7.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.4.tgz#137b5f31306eaff4de120ffe5b9d74b297809cfc"
|
||||||
|
dependencies:
|
||||||
|
"@types/glob" "*"
|
||||||
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@types/which@^1.0.28":
|
||||||
|
version "1.0.28"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6"
|
||||||
|
|
||||||
|
ansi-256-colors@^1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
|
||||||
|
|
||||||
assertion-error@^1.0.1:
|
assertion-error@^1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
||||||
|
|
||||||
balanced-match@^0.4.1:
|
balanced-match@^1.0.0:
|
||||||
version "0.4.2"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||||
|
|
||||||
brace-expansion@^1.0.0:
|
beautycolor@^1.0.7:
|
||||||
version "1.1.6"
|
version "1.0.11"
|
||||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9"
|
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.11.tgz#71c5568d5a7ed5c144d3a54f753ad1b08862aea5"
|
||||||
dependencies:
|
dependencies:
|
||||||
balanced-match "^0.4.1"
|
ansi-256-colors "^1.1.0"
|
||||||
|
typings-global "^1.0.14"
|
||||||
|
|
||||||
|
bindings@^1.2.1:
|
||||||
|
version "1.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7"
|
||||||
|
|
||||||
|
brace-expansion@^1.1.7:
|
||||||
|
version "1.1.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
|
||||||
|
dependencies:
|
||||||
|
balanced-match "^1.0.0"
|
||||||
concat-map "0.0.1"
|
concat-map "0.0.1"
|
||||||
|
|
||||||
chai-as-promised@^6.0.0:
|
chai-as-promised@^6.0.0:
|
||||||
@ -49,8 +90,8 @@ chai-as-promised@^6.0.0:
|
|||||||
check-error "^1.0.2"
|
check-error "^1.0.2"
|
||||||
|
|
||||||
chai-string@^1.3.0:
|
chai-string@^1.3.0:
|
||||||
version "1.3.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.3.0.tgz#df6139f294391b1035be5606f60a843b3a5041e7"
|
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.4.0.tgz#359140c051d36a4e4b1a5fc6b910152f438a8d49"
|
||||||
|
|
||||||
chai@^3.5.0:
|
chai@^3.5.0:
|
||||||
version "3.5.0"
|
version "3.5.0"
|
||||||
@ -74,21 +115,72 @@ deep-eql@^0.1.3:
|
|||||||
dependencies:
|
dependencies:
|
||||||
type-detect "0.1.1"
|
type-detect "0.1.1"
|
||||||
|
|
||||||
|
define-properties@^1.1.2:
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
|
||||||
|
dependencies:
|
||||||
|
foreach "^2.0.5"
|
||||||
|
object-keys "^1.0.8"
|
||||||
|
|
||||||
|
early@^2.1.1:
|
||||||
|
version "2.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
|
||||||
|
dependencies:
|
||||||
|
beautycolor "^1.0.7"
|
||||||
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
|
es-abstract@^1.5.1:
|
||||||
|
version "1.8.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.0.tgz#3b00385e85729932beffa9163bbea1234e932914"
|
||||||
|
dependencies:
|
||||||
|
es-to-primitive "^1.1.1"
|
||||||
|
function-bind "^1.1.0"
|
||||||
|
has "^1.0.1"
|
||||||
|
is-callable "^1.1.3"
|
||||||
|
is-regex "^1.0.4"
|
||||||
|
|
||||||
|
es-to-primitive@^1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
|
||||||
|
dependencies:
|
||||||
|
is-callable "^1.1.1"
|
||||||
|
is-date-object "^1.0.1"
|
||||||
|
is-symbol "^1.0.1"
|
||||||
|
|
||||||
|
es6-error@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98"
|
||||||
|
|
||||||
|
foreach@^2.0.5:
|
||||||
|
version "2.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
|
||||||
|
|
||||||
fs.realpath@^1.0.0:
|
fs.realpath@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||||
|
|
||||||
|
function-bind@^1.0.2, function-bind@^1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771"
|
||||||
|
|
||||||
glob@^7.0.0:
|
glob@^7.0.0:
|
||||||
version "7.1.1"
|
version "7.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8"
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
||||||
dependencies:
|
dependencies:
|
||||||
fs.realpath "^1.0.0"
|
fs.realpath "^1.0.0"
|
||||||
inflight "^1.0.4"
|
inflight "^1.0.4"
|
||||||
inherits "2"
|
inherits "2"
|
||||||
minimatch "^3.0.2"
|
minimatch "^3.0.4"
|
||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
|
has@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
|
||||||
|
dependencies:
|
||||||
|
function-bind "^1.0.2"
|
||||||
|
|
||||||
inflight@^1.0.4:
|
inflight@^1.0.4:
|
||||||
version "1.0.6"
|
version "1.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||||
@ -101,14 +193,76 @@ inherits@2:
|
|||||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||||
|
|
||||||
interpret@^1.0.0:
|
interpret@^1.0.0:
|
||||||
version "1.0.1"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.1.tgz#d579fb7f693b858004947af39fa0db49f795602c"
|
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
|
||||||
|
|
||||||
minimatch@^3.0.2:
|
is-callable@^1.1.1, is-callable@^1.1.3:
|
||||||
version "3.0.3"
|
version "1.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774"
|
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
|
||||||
|
|
||||||
|
is-date-object@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
|
||||||
|
|
||||||
|
is-regex@^1.0.4:
|
||||||
|
version "1.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
|
||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion "^1.0.0"
|
has "^1.0.1"
|
||||||
|
|
||||||
|
is-symbol@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
|
||||||
|
|
||||||
|
isexe@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||||
|
|
||||||
|
leakage@^0.3.0:
|
||||||
|
version "0.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39"
|
||||||
|
dependencies:
|
||||||
|
es6-error "^4.0.2"
|
||||||
|
left-pad "^1.1.3"
|
||||||
|
memwatch-next "^0.3.0"
|
||||||
|
minimist "^1.2.0"
|
||||||
|
pretty-bytes "^4.0.2"
|
||||||
|
|
||||||
|
left-pad@^1.1.3:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a"
|
||||||
|
|
||||||
|
memwatch-next@^0.3.0:
|
||||||
|
version "0.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/memwatch-next/-/memwatch-next-0.3.0.tgz#2111050f9a906e0aa2d72a4ec0f0089c78726f8f"
|
||||||
|
dependencies:
|
||||||
|
bindings "^1.2.1"
|
||||||
|
nan "^2.3.2"
|
||||||
|
|
||||||
|
minimatch@^3.0.4:
|
||||||
|
version "3.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||||
|
dependencies:
|
||||||
|
brace-expansion "^1.1.7"
|
||||||
|
|
||||||
|
minimist@^1.2.0:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
||||||
|
|
||||||
|
nan@^2.3.2:
|
||||||
|
version "2.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/nan/-/nan-2.6.2.tgz#e4ff34e6c95fdfb5aecc08de6596f43605a7db45"
|
||||||
|
|
||||||
|
object-keys@^1.0.8:
|
||||||
|
version "1.0.11"
|
||||||
|
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
||||||
|
|
||||||
|
object.getownpropertydescriptors@^2.0.3:
|
||||||
|
version "2.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"
|
||||||
|
dependencies:
|
||||||
|
define-properties "^1.1.2"
|
||||||
|
es-abstract "^1.5.1"
|
||||||
|
|
||||||
once@^1.3.0:
|
once@^1.3.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
@ -120,6 +274,14 @@ path-is-absolute@^1.0.0:
|
|||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||||
|
|
||||||
|
path-parse@^1.0.5:
|
||||||
|
version "1.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
|
||||||
|
|
||||||
|
pretty-bytes@^4.0.2:
|
||||||
|
version "4.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
|
||||||
|
|
||||||
rechoir@^0.6.2:
|
rechoir@^0.6.2:
|
||||||
version "0.6.2"
|
version "0.6.2"
|
||||||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
||||||
@ -127,16 +289,18 @@ rechoir@^0.6.2:
|
|||||||
resolve "^1.1.6"
|
resolve "^1.1.6"
|
||||||
|
|
||||||
resolve@^1.1.6:
|
resolve@^1.1.6:
|
||||||
version "1.2.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.2.0.tgz#9589c3f2f6149d1417a40becc1663db6ec6bc26c"
|
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86"
|
||||||
|
dependencies:
|
||||||
|
path-parse "^1.0.5"
|
||||||
|
|
||||||
semver@^5.3.0:
|
semver@^5.3.0:
|
||||||
version "5.3.0"
|
version "5.4.1"
|
||||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f"
|
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
|
||||||
|
|
||||||
shelljs@^0.7.4:
|
shelljs@^0.7.8:
|
||||||
version "0.7.6"
|
version "0.7.8"
|
||||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.6.tgz#379cccfb56b91c8601e4793356eb5382924de9ad"
|
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
|
||||||
dependencies:
|
dependencies:
|
||||||
glob "^7.0.0"
|
glob "^7.0.0"
|
||||||
interpret "^1.0.0"
|
interpret "^1.0.0"
|
||||||
@ -153,19 +317,48 @@ smartchai@^1.0.3:
|
|||||||
chai-as-promised "^6.0.0"
|
chai-as-promised "^6.0.0"
|
||||||
chai-string "^1.3.0"
|
chai-string "^1.3.0"
|
||||||
|
|
||||||
smartq@^1.1.0, smartq@^1.1.1:
|
smartdelay@^1.0.3:
|
||||||
version "1.1.1"
|
version "1.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.1.tgz#efb358705260d41ae18aef7ffd815f7b6fe17dd3"
|
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.3.tgz#5fd44dad77262d110702f0293efa80c072cfb579"
|
||||||
dependencies:
|
dependencies:
|
||||||
typed-promisify "^0.3.0"
|
smartq "^1.1.1"
|
||||||
typings-global "^1.0.14"
|
typings-global "^1.0.16"
|
||||||
|
|
||||||
|
smartq@^1.1.1, smartq@^1.1.6:
|
||||||
|
version "1.1.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.6.tgz#0c1ff4336d95e95b4f1fdd8ccd7e2c5a323b8412"
|
||||||
|
dependencies:
|
||||||
|
typings-global "^1.0.19"
|
||||||
|
util.promisify "^1.0.0"
|
||||||
|
|
||||||
smartrequest@^1.0.4:
|
smartrequest@^1.0.4:
|
||||||
version "1.0.4"
|
version "1.0.6"
|
||||||
resolved "https://registry.yarnpkg.com/smartrequest/-/smartrequest-1.0.4.tgz#86af2163ae28f1031b01c2d8ad8c429733920611"
|
resolved "https://registry.yarnpkg.com/smartrequest/-/smartrequest-1.0.6.tgz#a006454332453b0a70d38a003a29963d039a7783"
|
||||||
dependencies:
|
dependencies:
|
||||||
smartq "^1.1.0"
|
smartq "^1.1.1"
|
||||||
typings-global "^1.0.14"
|
typings-global "^1.0.17"
|
||||||
|
|
||||||
|
smartshell@^1.0.6:
|
||||||
|
version "1.0.13"
|
||||||
|
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.13.tgz#277b34e6624df70003e0e3a6c900cd5ebab7eb92"
|
||||||
|
dependencies:
|
||||||
|
"@types/shelljs" "^0.7.2"
|
||||||
|
"@types/which" "^1.0.28"
|
||||||
|
shelljs "^0.7.8"
|
||||||
|
smartq "^1.1.6"
|
||||||
|
typings-global "^1.0.19"
|
||||||
|
which "^1.2.14"
|
||||||
|
|
||||||
|
tapbundle@^1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.1.1.tgz#ec4172c0e82a77b1f6133fef2606311ede28a62d"
|
||||||
|
dependencies:
|
||||||
|
early "^2.1.1"
|
||||||
|
leakage "^0.3.0"
|
||||||
|
smartchai "^1.0.3"
|
||||||
|
smartdelay "^1.0.3"
|
||||||
|
smartq "^1.1.1"
|
||||||
|
typings-global "^1.0.19"
|
||||||
|
|
||||||
type-detect@0.1.1:
|
type-detect@0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
@ -175,23 +368,25 @@ type-detect@^1.0.0:
|
|||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
|
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
|
||||||
|
|
||||||
typed-promisify@^0.3.0:
|
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.17, typings-global@^1.0.19:
|
||||||
version "0.3.0"
|
version "1.0.20"
|
||||||
resolved "https://registry.yarnpkg.com/typed-promisify/-/typed-promisify-0.3.0.tgz#1ba0af5e444c87d8047406f18ce49092a1191853"
|
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.20.tgz#3da769c54db538247c5d877d1d9e97eb2ec981ff"
|
||||||
|
|
||||||
typings-global@*, typings-global@^1.0.14:
|
|
||||||
version "1.0.14"
|
|
||||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.14.tgz#ab682720a03d6b9278869fb5c30c30d7dc61d12c"
|
|
||||||
dependencies:
|
dependencies:
|
||||||
semver "^5.3.0"
|
semver "^5.3.0"
|
||||||
shelljs "^0.7.4"
|
smartshell "^1.0.6"
|
||||||
|
|
||||||
typings-test@^1.0.3:
|
util.promisify@^1.0.0:
|
||||||
version "1.0.3"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/typings-test/-/typings-test-1.0.3.tgz#fbab895eb3f0c44842e73db059f65946b971e369"
|
resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@types/mocha" "^2.2.31"
|
define-properties "^1.1.2"
|
||||||
typings-global "*"
|
object.getownpropertydescriptors "^2.0.3"
|
||||||
|
|
||||||
|
which@^1.2.14:
|
||||||
|
version "1.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
|
||||||
|
dependencies:
|
||||||
|
isexe "^2.0.0"
|
||||||
|
|
||||||
wrappy@1:
|
wrappy@1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
|
Reference in New Issue
Block a user