swdc-tracker
Advanced tools
Comparing version 1.0.21 to 1.0.22
@@ -8,26 +8,2 @@ /** | ||
data: { | ||
keystrokes: number; | ||
chars_added: number; | ||
chars_deleted: number; | ||
chars_pasted: number; | ||
pastes: number; | ||
lines_added: number; | ||
lines_deleted: number; | ||
start_time: number; | ||
end_time: number; | ||
}; | ||
} | { | ||
schema: string; | ||
data: { | ||
entity: string; | ||
type: string; | ||
}; | ||
} | { | ||
schema: string; | ||
data: { | ||
interaction_type: string; | ||
}; | ||
} | { | ||
schema: string; | ||
data: { | ||
element_name: string; | ||
@@ -34,0 +10,0 @@ element_location: string; |
@@ -40,4 +40,2 @@ "use strict"; | ||
exports.buildContexts = void 0; | ||
var codetime_1 = require("../events/codetime"); | ||
var editor_action_1 = require("../events/editor_action"); | ||
var auth_1 = require("../entities/auth"); | ||
@@ -48,3 +46,2 @@ var project_1 = require("../entities/project"); | ||
var plugin_1 = require("../entities/plugin"); | ||
var ui_interaction_1 = require("../events/ui_interaction"); | ||
var ui_element_1 = require("../entities/ui_element"); | ||
@@ -57,3 +54,3 @@ /** | ||
return __awaiter(this, void 0, void 0, function () { | ||
var contexts, _codetimePayload, _editorActionPayload, _uiInteractionPayload, _uiElementPayload, _projectPayload, _repoPayload, _filePayload, _pluginPayload, _authPayload; | ||
var contexts, _uiElementPayload, _projectPayload, _repoPayload, _filePayload, _pluginPayload, _authPayload; | ||
return __generator(this, function (_a) { | ||
@@ -63,59 +60,38 @@ switch (_a.label) { | ||
contexts = []; | ||
if (!codetime_1.CodeTime.hasData(params)) return [3 /*break*/, 2]; | ||
return [4 /*yield*/, new codetime_1.CodeTime(params).buildPayload()]; | ||
if (!ui_element_1.UIElement.hasData(params)) return [3 /*break*/, 2]; | ||
return [4 /*yield*/, new ui_element_1.UIElement(params).buildPayload()]; | ||
case 1: | ||
_codetimePayload = _a.sent(); | ||
contexts.push(_codetimePayload); | ||
_uiElementPayload = _a.sent(); | ||
contexts.push(_uiElementPayload); | ||
_a.label = 2; | ||
case 2: | ||
if (!editor_action_1.EditorAction.hasData(params)) return [3 /*break*/, 4]; | ||
return [4 /*yield*/, new editor_action_1.EditorAction(params).buildPayload()]; | ||
if (!project_1.Project.hasData(params)) return [3 /*break*/, 4]; | ||
return [4 /*yield*/, new project_1.Project(params).buildPayload(params.jwt)]; | ||
case 3: | ||
_editorActionPayload = _a.sent(); | ||
contexts.push(_editorActionPayload); | ||
_projectPayload = _a.sent(); | ||
contexts.push(_projectPayload); | ||
_a.label = 4; | ||
case 4: | ||
if (!ui_interaction_1.UIInteraction.hasData(params)) return [3 /*break*/, 6]; | ||
return [4 /*yield*/, new ui_interaction_1.UIInteraction(params).buildPayload()]; | ||
if (!repo_1.Repo.hasData(params)) return [3 /*break*/, 6]; | ||
return [4 /*yield*/, new repo_1.Repo(params).buildPayload(params.jwt)]; | ||
case 5: | ||
_uiInteractionPayload = _a.sent(); | ||
contexts.push(_uiInteractionPayload); | ||
_repoPayload = _a.sent(); | ||
contexts.push(_repoPayload); | ||
_a.label = 6; | ||
case 6: | ||
if (!ui_element_1.UIElement.hasData(params)) return [3 /*break*/, 8]; | ||
return [4 /*yield*/, new ui_element_1.UIElement(params).buildPayload()]; | ||
if (!file_1.File.hasData(params)) return [3 /*break*/, 8]; | ||
return [4 /*yield*/, new file_1.File(params).buildPayload(params.jwt)]; | ||
case 7: | ||
_uiElementPayload = _a.sent(); | ||
contexts.push(_uiElementPayload); | ||
_filePayload = _a.sent(); | ||
contexts.push(_filePayload); | ||
_a.label = 8; | ||
case 8: | ||
if (!project_1.Project.hasData(params)) return [3 /*break*/, 10]; | ||
return [4 /*yield*/, new project_1.Project(params).buildPayload(params.jwt)]; | ||
if (!plugin_1.Plugin.hasData(params)) return [3 /*break*/, 10]; | ||
return [4 /*yield*/, new plugin_1.Plugin(params).buildPayload()]; | ||
case 9: | ||
_projectPayload = _a.sent(); | ||
contexts.push(_projectPayload); | ||
_pluginPayload = _a.sent(); | ||
contexts.push(_pluginPayload); | ||
_a.label = 10; | ||
case 10: | ||
if (!repo_1.Repo.hasData(params)) return [3 /*break*/, 12]; | ||
return [4 /*yield*/, new repo_1.Repo(params).buildPayload(params.jwt)]; | ||
case 10: return [4 /*yield*/, new auth_1.Auth(params).buildPayload()]; | ||
case 11: | ||
_repoPayload = _a.sent(); | ||
contexts.push(_repoPayload); | ||
_a.label = 12; | ||
case 12: | ||
if (!file_1.File.hasData(params)) return [3 /*break*/, 14]; | ||
return [4 /*yield*/, new file_1.File(params).buildPayload(params.jwt)]; | ||
case 13: | ||
_filePayload = _a.sent(); | ||
contexts.push(_filePayload); | ||
_a.label = 14; | ||
case 14: | ||
if (!plugin_1.Plugin.hasData(params)) return [3 /*break*/, 16]; | ||
return [4 /*yield*/, new plugin_1.Plugin(params).buildPayload()]; | ||
case 15: | ||
_pluginPayload = _a.sent(); | ||
contexts.push(_pluginPayload); | ||
_a.label = 16; | ||
case 16: return [4 /*yield*/, new auth_1.Auth(params).buildPayload()]; | ||
case 17: | ||
_authPayload = _a.sent(); | ||
@@ -122,0 +98,0 @@ contexts.push(_authPayload); |
{ | ||
"name": "swdc-tracker", | ||
"version": "1.0.21", | ||
"version": "1.0.22", | ||
"description": "swdc event tracker", | ||
@@ -5,0 +5,0 @@ "main": "dist", |
@@ -19,20 +19,2 @@ import { CodeTime } from "../events/codetime"; | ||
// code time | ||
if (CodeTime.hasData(params)) { | ||
const _codetimePayload = await new CodeTime(params).buildPayload(); | ||
contexts.push(_codetimePayload); | ||
} | ||
// editor action | ||
if (EditorAction.hasData(params)) { | ||
const _editorActionPayload = await new EditorAction(params).buildPayload(); | ||
contexts.push(_editorActionPayload); | ||
} | ||
// ui interaction | ||
if (UIInteraction.hasData(params)) { | ||
const _uiInteractionPayload = await new UIInteraction(params).buildPayload(); | ||
contexts.push(_uiInteractionPayload); | ||
} | ||
// ui element | ||
@@ -39,0 +21,0 @@ if (UIElement.hasData(params)) { |
107792
2259