tigger 0.0.38 → 0.0.40

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.
Files changed (37) hide show
  1. package/lib/constants.js +8 -8
  2. package/lib/index.js +5 -5
  3. package/lib/uris.js +9 -9
  4. package/lib/utilities/comment.js +21 -21
  5. package/lib/utilities/commit.js +35 -35
  6. package/lib/utilities/headers.js +17 -23
  7. package/lib/utilities/issue.js +28 -28
  8. package/lib/utilities/repository.js +11 -11
  9. package/lib/utilities/request.js +21 -21
  10. package/package.json +5 -1
  11. package/.swcrc +0 -5
  12. package/bin/example/handler/alterIssue.js +0 -30
  13. package/bin/example/handler/commit.js +0 -44
  14. package/bin/example/handler/createComment.js +0 -30
  15. package/bin/example/handler/createIssue.js +0 -28
  16. package/bin/example/handler/editComment.js +0 -32
  17. package/bin/example/handler/editIssue.js +0 -32
  18. package/bin/example/handler/issue.js +0 -26
  19. package/bin/example/handler/issues.js +0 -24
  20. package/bin/example/handler/removeComment.js +0 -30
  21. package/bin/example/operation/alterIssue.js +0 -29
  22. package/bin/example/operation/createComment.js +0 -29
  23. package/bin/example/operation/createIssue.js +0 -36
  24. package/bin/example/operation/editComment.js +0 -29
  25. package/bin/example/operation/editIssue.js +0 -29
  26. package/bin/example/operation/getBaseTreeSHA.js +0 -36
  27. package/bin/example/operation/getComments.js +0 -36
  28. package/bin/example/operation/getIssue.js +0 -35
  29. package/bin/example/operation/getIssues.js +0 -35
  30. package/bin/example/operation/getLatestCommitSHA.js +0 -36
  31. package/bin/example/operation/postCommitSHA.js +0 -35
  32. package/bin/example/operation/postCommitTreeSHA.js +0 -43
  33. package/bin/example/operation/postMetaJSONFileContent.js +0 -36
  34. package/bin/example/operation/postReadmeFileContent.js +0 -36
  35. package/bin/example/operation/postUpdatedHead.js +0 -29
  36. package/bin/example/operation/removeComment.js +0 -27
  37. package/bin/example.js +0 -24
@@ -22,55 +22,55 @@ _export(exports, {
22
22
  return postRequest;
23
23
  }
24
24
  });
25
- var _stream = require("stream");
26
- var _necessary = require("necessary");
27
- var _constants = require("../constants");
28
- var _headers = require("../utilities/headers");
29
- var createRequest = _necessary.requestUtilities.createRequest, GET_METHOD = _necessary.methods.GET_METHOD, POST_METHOD = _necessary.methods.POST_METHOD, DELETE_METHOD = _necessary.methods.DELETE_METHOD, PATCH_METHOD = _necessary.methods.PATCH_METHOD;
25
+ const _stream = require("stream");
26
+ const _necessary = require("necessary");
27
+ const _constants = require("../constants");
28
+ const _headers = require("../utilities/headers");
29
+ const { createRequest } = _necessary.requestUtilities, { GET_METHOD, POST_METHOD, DELETE_METHOD, PATCH_METHOD } = _necessary.methods;
30
30
  function getRequest(uri, query, userAgent, clientId, clientSecret, callback) {
31
- var host = _constants.GITHUB_API_HOST, method = GET_METHOD, headers = (0, _headers.headersFromUserAgentClientIdAndClientSecret)(userAgent, clientId, clientSecret), request = createRequest(host, uri, query, method, headers, function(error, response) {
32
- contentFromResponse(response, function(content) {
33
- var jsonString = content, json = JSON.parse(jsonString);
31
+ const host = _constants.GITHUB_API_HOST, method = GET_METHOD, headers = (0, _headers.headersFromUserAgentClientIdAndClientSecret)(userAgent, clientId, clientSecret), request = createRequest(host, uri, query, method, headers, (error, response)=>{
32
+ contentFromResponse(response, (content)=>{
33
+ const jsonString = content, json = JSON.parse(jsonString);
34
34
  callback(error, json);
35
35
  });
36
36
  });
37
37
  request.end();
38
38
  }
39
39
  function postRequest(uri, query, content, userAgent, gitHubAccessToken, callback) {
40
- var host = _constants.GITHUB_API_HOST, method = POST_METHOD, headers = (0, _headers.headersFromUserAgentAndGitHubAccessToken)(userAgent, gitHubAccessToken), postRequest = createRequest(host, uri, query, method, headers, function(error, response) {
41
- contentFromResponse(response, function(content) {
42
- var jsonString = content, json = JSON.parse(jsonString);
40
+ const host = _constants.GITHUB_API_HOST, method = POST_METHOD, headers = (0, _headers.headersFromUserAgentAndGitHubAccessToken)(userAgent, gitHubAccessToken), postRequest = createRequest(host, uri, query, method, headers, (error, response)=>{
41
+ contentFromResponse(response, (content)=>{
42
+ const jsonString = content, json = JSON.parse(jsonString);
43
43
  callback(error, json);
44
44
  });
45
45
  }), readable = _stream.Readable.from(content);
46
46
  readable.pipe(postRequest);
47
47
  }
48
48
  function patchRequest(uri, query, content, userAgent, gitHubAccessToken, callback) {
49
- var host = _constants.GITHUB_API_HOST, method = PATCH_METHOD, headers = (0, _headers.headersFromUserAgentAndGitHubAccessToken)(userAgent, gitHubAccessToken), postRequest = createRequest(host, uri, query, method, headers, function(error, response) {
50
- contentFromResponse(response, function(content) {
51
- var jsonString = content, json = JSON.parse(jsonString);
49
+ const host = _constants.GITHUB_API_HOST, method = PATCH_METHOD, headers = (0, _headers.headersFromUserAgentAndGitHubAccessToken)(userAgent, gitHubAccessToken), postRequest = createRequest(host, uri, query, method, headers, (error, response)=>{
50
+ contentFromResponse(response, (content)=>{
51
+ const jsonString = content, json = JSON.parse(jsonString);
52
52
  callback(error, json);
53
53
  });
54
54
  }), readable = _stream.Readable.from(content);
55
55
  readable.pipe(postRequest);
56
56
  }
57
57
  function deleteRequest(uri, query, userAgent, gitHubAccessToken, callback) {
58
- var host = _constants.GITHUB_API_HOST, method = DELETE_METHOD, headers = (0, _headers.headersFromUserAgentAndGitHubAccessToken)(userAgent, gitHubAccessToken), deleteRequest = createRequest(host, uri, query, method, headers, function(error, response) {
59
- contentFromResponse(response, function(content) {
60
- var string = content; ///
58
+ const host = _constants.GITHUB_API_HOST, method = DELETE_METHOD, headers = (0, _headers.headersFromUserAgentAndGitHubAccessToken)(userAgent, gitHubAccessToken), deleteRequest = createRequest(host, uri, query, method, headers, (error, response)=>{
59
+ contentFromResponse(response, (content)=>{
60
+ const string = content; ///
61
61
  callback(error, string);
62
62
  });
63
63
  });
64
64
  deleteRequest.end();
65
65
  }
66
66
  function contentFromResponse(response, callback) {
67
- var content = _constants.EMPTY_STRING;
68
- response.on(_constants.DATA, function(data) {
67
+ let content = _constants.EMPTY_STRING;
68
+ response.on(_constants.DATA, (data)=>{
69
69
  content += data;
70
70
  });
71
- response.on(_constants.END, function() {
71
+ response.on(_constants.END, ()=>{
72
72
  callback(content);
73
73
  });
74
74
  }
75
75
 
76
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy91dGlsaXRpZXMvcmVxdWVzdC5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJcInVzZSBzdHJpY3RcIjtcblxuaW1wb3J0IHsgUmVhZGFibGUgfSBmcm9tIFwic3RyZWFtXCI7XG5pbXBvcnQgeyBtZXRob2RzLCByZXF1ZXN0VXRpbGl0aWVzIH0gZnJvbSBcIm5lY2Vzc2FyeVwiO1xuXG5pbXBvcnQgeyBFTkQsIERBVEEsIEVNUFRZX1NUUklORywgR0lUSFVCX0FQSV9IT1NUIH0gZnJvbSBcIi4uL2NvbnN0YW50c1wiO1xuaW1wb3J0IHsgaGVhZGVyc0Zyb21Vc2VyQWdlbnRBbmRHaXRIdWJBY2Nlc3NUb2tlbiwgaGVhZGVyc0Zyb21Vc2VyQWdlbnRDbGllbnRJZEFuZENsaWVudFNlY3JldCB9IGZyb20gXCIuLi91dGlsaXRpZXMvaGVhZGVyc1wiO1xuXG5jb25zdCB7IGNyZWF0ZVJlcXVlc3QgfSA9IHJlcXVlc3RVdGlsaXRpZXMsXG4gICAgICB7IEdFVF9NRVRIT0QsIFBPU1RfTUVUSE9ELCBERUxFVEVfTUVUSE9ELCBQQVRDSF9NRVRIT0QgfSA9IG1ldGhvZHM7XG5cbmV4cG9ydCBmdW5jdGlvbiBnZXRSZXF1ZXN0KHVyaSwgcXVlcnksIHVzZXJBZ2VudCwgY2xpZW50SWQsIGNsaWVudFNlY3JldCwgY2FsbGJhY2spIHtcbiAgY29uc3QgaG9zdCA9IEdJVEhVQl9BUElfSE9TVCxcbiAgICAgICAgbWV0aG9kID0gR0VUX01FVEhPRCxcbiAgICAgICAgaGVhZGVycyA9IGhlYWRlcnNGcm9t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==
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tigger",
3
3
  "author": "James Smith",
4
- "version": "0.0.38",
4
+ "version": "0.0.40",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/tigger",
7
7
  "description": "Tales the fun out of using the GitHub API.",
@@ -28,5 +28,9 @@
28
28
  "watch": "npm run clean && npm run batch && npm run incremental",
29
29
  "watch-debug": "npm run clean && npm run batch-debug && npm run incremental-debug"
30
30
  },
31
+ "files": [
32
+ "src",
33
+ "lib"
34
+ ],
31
35
  "main": "./lib/index.js"
32
36
  }
package/.swcrc DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "module": {
3
- "type": "commonjs"
4
- }
5
- }
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- const { asynchronousUtilities } = require("necessary");
4
-
5
- const getIssueOperation = require("../operation/getIssue"),
6
- alterIssueOperation = require("../operation/alterIssue"),
7
- getCommentsOperation = require("../operation/getComments");
8
-
9
- const { sequence } = asynchronousUtilities;
10
-
11
- function alterIssueHandler(context) {
12
- const operations = [
13
- alterIssueOperation,
14
- getIssueOperation,
15
- getCommentsOperation
16
- ],
17
- state = "closed",
18
- issueNumber = 1;
19
-
20
- Object.assign(context, {
21
- state,
22
- issueNumber
23
- });
24
-
25
- sequence(operations, () => {
26
- ///
27
- }, context);
28
- }
29
-
30
- module.exports = alterIssueHandler;
@@ -1,44 +0,0 @@
1
- "use strict";
2
-
3
- const { asynchronousUtilities } = require("necessary");
4
-
5
- const postCommitSHAOperation = require("../operation/postCommitSHA"),
6
- getBaseTreeSHAOperation = require("../operation/getBaseTreeSHA"),
7
- postUpdatedHeadOperation = require("../operation/postUpdatedHead"),
8
- postCommitTreeSHAOperation = require("../operation/postCommitTreeSHA"),
9
- getLatestCommitSHAOperation = require("../operation/getLatestCommitSHA"),
10
- postReadmeFileContentOperation = require("../operation/postReadmeFileContent"),
11
- postMetaJSONFileContentOperation = require("../operation/postMetaJSONFileContent");
12
-
13
- const { sequence } = asynchronousUtilities;
14
-
15
- function commitHandler(context) {
16
- const commitMessage = "...",
17
- readmeFilePath = "...",
18
- metaJSONFilePath = "...",
19
- readmeFileContent = "...",
20
- metaJSONFileContent = "...",
21
- operations = [
22
- getLatestCommitSHAOperation,
23
- getBaseTreeSHAOperation,
24
- postReadmeFileContentOperation,
25
- postMetaJSONFileContentOperation,
26
- postCommitTreeSHAOperation,
27
- postCommitSHAOperation,
28
- postUpdatedHeadOperation
29
- ];
30
-
31
- Object.assign(context, {
32
- commitMessage,
33
- readmeFilePath,
34
- metaJSONFilePath,
35
- readmeFileContent,
36
- metaJSONFileContent
37
- });
38
-
39
- sequence(operations, () => {
40
- ///
41
- }, context);
42
- }
43
-
44
- module.exports = commitHandler;
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- const { asynchronousUtilities } = require("necessary");
4
-
5
- const getIssueOperation = require("../operation/getIssue"),
6
- getCommentsOperation = require("../operation/getComments"),
7
- createCommentOperation = require("../operation/createComment");
8
-
9
- const { sequence } = asynchronousUtilities;
10
-
11
- function createCommentHandler(context) {
12
- const operations = [
13
- createCommentOperation,
14
- getIssueOperation,
15
- getCommentsOperation
16
- ],
17
- issueNumber = 1,
18
- description = "...";
19
-
20
- Object.assign(context, {
21
- description,
22
- issueNumber
23
- });
24
-
25
- sequence(operations, () => {
26
- ///
27
- }, context);
28
- }
29
-
30
- module.exports = createCommentHandler;
@@ -1,28 +0,0 @@
1
- "use strict";
2
-
3
- const { asynchronousUtilities } = require("necessary");
4
-
5
- const getIssueOperation = require("../operation/getIssue"),
6
- createIssueOperation = require("../operation/createIssue");
7
-
8
- const { sequence } = asynchronousUtilities;
9
-
10
- function createIssueHandler(context) {
11
- const operations = [
12
- createIssueOperation,
13
- getIssueOperation
14
- ],
15
- title = "...",
16
- description = "...";
17
-
18
- Object.assign(context, {
19
- title,
20
- description
21
- });
22
-
23
- sequence(operations, () => {
24
- ///
25
- }, context);
26
- }
27
-
28
- module.exports = createIssueHandler;
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- const { asynchronousUtilities } = require("necessary");
4
-
5
- const getIssueOperation = require("../operation/getIssue"),
6
- getCommentsOperation = require("../operation/getComments"),
7
- editCommentOperation = require("../operation/editComment");
8
-
9
- const { sequence } = asynchronousUtilities;
10
-
11
- function editCommentHandler(context) {
12
- const operations = [
13
- editCommentOperation,
14
- getIssueOperation,
15
- getCommentsOperation
16
- ],
17
- issueNumber = 1,
18
- description = "...",
19
- commentIdentifier = 123;
20
-
21
- Object.assign(context, {
22
- description,
23
- issueNumber,
24
- commentIdentifier
25
- });
26
-
27
- sequence(operations, () => {
28
- debugger
29
- }, context);
30
- }
31
-
32
- module.exports = editCommentHandler;
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- const { asynchronousUtilities } = require("necessary");
4
-
5
- const getIssueOperation = require("../operation/getIssue"),
6
- editIssueOperation = require("../operation/editIssue"),
7
- getCommentsOperation = require("../operation/getComments");
8
-
9
- const { sequence } = asynchronousUtilities;
10
-
11
- function editIssueHandler(context) {
12
- const operations = [
13
- editIssueOperation,
14
- getIssueOperation,
15
- getCommentsOperation
16
- ],
17
- title = "...",
18
- issueNumber = 1,
19
- description = "...";
20
-
21
- Object.assign(context, {
22
- title,
23
- description,
24
- issueNumber
25
- });
26
-
27
- sequence(operations, () => {
28
- ///
29
- }, context);
30
- }
31
-
32
- module.exports = editIssueHandler;
@@ -1,26 +0,0 @@
1
- "use strict";
2
-
3
- const { asynchronousUtilities } = require("necessary");
4
-
5
- const getIssueOperation = require("../operation/getIssue"),
6
- getCommentsOperation = require("../operation/getComments");
7
-
8
- const { sequence } = asynchronousUtilities;
9
-
10
- function issueHandler(context) {
11
- const operations = [
12
- getIssueOperation,
13
- getCommentsOperation
14
- ],
15
- issueNumber = 1;
16
-
17
- Object.assign(context, {
18
- issueNumber
19
- });
20
-
21
- sequence(operations, () => {
22
- ///
23
- }, context);
24
- }
25
-
26
- module.exports = issueHandler;
@@ -1,24 +0,0 @@
1
- "use strict";
2
-
3
- const { asynchronousUtilities } = require("necessary");
4
-
5
- const getIssuesOperation = require("../operation/getIssues");
6
-
7
- const { sequence } = asynchronousUtilities;
8
-
9
- function issuesHandler(context) {
10
- const operations = [
11
- getIssuesOperation
12
- ],
13
- state = "open";
14
-
15
- Object.assign(context, {
16
- state
17
- });
18
-
19
- sequence(operations, () => {
20
- ///
21
- }, context);
22
- }
23
-
24
- module.exports = issuesHandler;
@@ -1,30 +0,0 @@
1
- "use strict";
2
-
3
- const { asynchronousUtilities } = require("necessary");
4
-
5
- const getIssueOperation = require("../operation/getIssue"),
6
- getCommentsOperation = require("../operation/getComments"),
7
- removeCommentOperation = require("../operation/removeComment");
8
-
9
- const { sequence } = asynchronousUtilities;
10
-
11
- function removeCommentHandler(context) {
12
- const operations = [
13
- removeCommentOperation,
14
- getIssueOperation,
15
- getCommentsOperation
16
- ],
17
- issueNumber = 1,
18
- commentIdentifier = 123;
19
-
20
- Object.assign(context, {
21
- issueNumber,
22
- commentIdentifier
23
- });
24
-
25
- sequence(operations, () => {
26
- ///
27
- }, context);
28
- }
29
-
30
- module.exports = removeCommentHandler;
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- const { issueUtilities } = require("../../../lib"); ///
4
-
5
- const { alterIssuePatchRequest } = issueUtilities;
6
-
7
- function alterIssueOperation(next, done, context) {
8
- const { repository, state, issueNumber, userAgent, gitHubAccessToken } = context;
9
-
10
- alterIssuePatchRequest(repository, state, issueNumber, userAgent, gitHubAccessToken, (error, json) => {
11
- if (error) {
12
- done();
13
-
14
- return;
15
- }
16
-
17
- const { message = null } = json;
18
-
19
- if (message !== null) {
20
- done();
21
-
22
- return;
23
- }
24
-
25
- next();
26
- });
27
- }
28
-
29
- module.exports = alterIssueOperation;
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- const { commentUtilities } = require("../../../lib"); ///
4
-
5
- const { createCommentPostRequest } = commentUtilities;
6
-
7
- function createCommentOperation(next, done, context) {
8
- const { repository, description, issueNumber, userAgent, gitHubAccessToken } = context;
9
-
10
- createCommentPostRequest(repository, description, issueNumber, userAgent, gitHubAccessToken, (error, json) => {
11
- if (error) {
12
- done();
13
-
14
- return;
15
- }
16
-
17
- const { message = null } = json;
18
-
19
- if (message !== null) {
20
- done();
21
-
22
- return;
23
- }
24
-
25
- next();
26
- });
27
- }
28
-
29
- module.exports = createCommentOperation;
@@ -1,36 +0,0 @@
1
- "use strict";
2
-
3
- const { issueUtilities } = require("../../../lib"); ///
4
-
5
- const { createIssuePostRequest } = issueUtilities
6
-
7
- function createIssueOperation(next, done, context) {
8
- const { repository, title, description, userAgent, gitHubAccessToken } = context;
9
-
10
- createIssuePostRequest(repository, title, description, userAgent, gitHubAccessToken, (error, json) => {
11
- if (error) {
12
- done();
13
-
14
- return;
15
- }
16
-
17
- const { message = null } = json;
18
-
19
- if (message !== null) {
20
- done();
21
-
22
- return;
23
- }
24
-
25
- const { number } = json,
26
- issueNumber = number; ///
27
-
28
- Object.assign(context, {
29
- issueNumber
30
- });
31
-
32
- next();
33
- });
34
- }
35
-
36
- module.exports = createIssueOperation;
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- const { commentUtilities } = require("../../../lib"); ///
4
-
5
- const { editCommentPatchRequest } = commentUtilities;
6
-
7
- function editCommentOperation(next, done, context) {
8
- const { repository, description, commentIdentifier, userAgent, gitHubAccessToken } = context;
9
-
10
- editCommentPatchRequest(repository, description, commentIdentifier, userAgent, gitHubAccessToken, (error, json) => {
11
- if (error) {
12
- done();
13
-
14
- return;
15
- }
16
-
17
- const { message = null } = json;
18
-
19
- if (message !== null) {
20
- done();
21
-
22
- return;
23
- }
24
-
25
- next();
26
- });
27
- }
28
-
29
- module.exports = editCommentOperation;
@@ -1,29 +0,0 @@
1
- "use strict";
2
-
3
- const { issueUtilities } = require("../../../lib"); ///
4
-
5
- const { editIssuePatchRequest } = issueUtilities;
6
-
7
- function editIssueOperation(next, done, context) {
8
- const { repository, title, description, issueNumber, userAgent, gitHubAccessToken } = context;
9
-
10
- editIssuePatchRequest(repository, title, description, issueNumber, userAgent, gitHubAccessToken, (error, json) => {
11
- if (error) {
12
- done();
13
-
14
- return;
15
- }
16
-
17
- const { message = null } = json;
18
-
19
- if (message !== null) {
20
- done();
21
-
22
- return;
23
- }
24
-
25
- next();
26
- });
27
- }
28
-
29
- module.exports = editIssueOperation;
@@ -1,36 +0,0 @@
1
- "use strict";
2
-
3
- const { commitUtilities } = require("../../../lib"); ///
4
-
5
- const { baseTreeSHAGetRequest } = commitUtilities
6
-
7
- function getBaseTreeSHAOperation(next, done, context) {
8
- const { repository, userAgent, clientId, clientSecret, latestCommitSHA } = context;
9
-
10
- baseTreeSHAGetRequest(repository, latestCommitSHA, userAgent, clientId, clientSecret, (error, json) => {
11
- if (error) {
12
- done();
13
-
14
- return;
15
- }
16
-
17
- const { tree = null } = json;
18
-
19
- if (tree === null) {
20
- done();
21
-
22
- return;
23
- }
24
-
25
- const { sha } = tree,
26
- baseTreeSHA = sha; ///
27
-
28
- Object.assign(context, {
29
- baseTreeSHA
30
- });
31
-
32
- next();
33
- });
34
- }
35
-
36
- module.exports = getBaseTreeSHAOperation;
@@ -1,36 +0,0 @@
1
- "use strict";
2
-
3
- const { commentUtilities } = require("../../../lib"); ///
4
-
5
- const { commentsGetRequest } = commentUtilities;
6
-
7
- function getCommentsOperation(next, done, context) {
8
- const { repository, issueNumber, userAgent, clientId, clientSecret } = context;
9
-
10
- commentsGetRequest(repository, issueNumber, userAgent, clientId, clientSecret, (error, json) => {
11
- if (error) {
12
- done();
13
-
14
- return;
15
- }
16
-
17
- const { message = null } = json;
18
-
19
- if (message !== null) {
20
- done();
21
-
22
- return;
23
- }
24
-
25
- const { issue } = context,
26
- comments = json; ///
27
-
28
- Object.assign(issue, {
29
- comments
30
- });
31
-
32
- next();
33
- });
34
- }
35
-
36
- module.exports = getCommentsOperation;