@ever-works/jira-connector-plugin 1.0.1 → 1.0.4

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/dist/index.cjs CHANGED
@@ -30,6 +30,26 @@ var PLUGIN_CAPABILITIES = {
30
30
  // external events into the platform ingest pipeline. See
31
31
  // capabilities/event-source.interface.ts.
32
32
  EVENT_SOURCE: "event-source"};
33
+ var GITHUB_FULL_SCOPES_ALL = [
34
+ "user:email",
35
+ "read:user",
36
+ "repo",
37
+ "delete_repo",
38
+ "workflow",
39
+ "write:repo_hook",
40
+ "read:org",
41
+ "project"
42
+ ];
43
+ var GITHUB_DELETE_REPO_SCOPE = "delete_repo";
44
+ function isGithubDeleteRepoScopeEnabled(env = readEnv()) {
45
+ return (env?.GITHUB_OAUTH_DELETE_REPO_SCOPE_ENABLED ?? "").trim().toLowerCase() === "true";
46
+ }
47
+ function readEnv() {
48
+ return typeof process !== "undefined" ? process.env : void 0;
49
+ }
50
+ Object.freeze(
51
+ GITHUB_FULL_SCOPES_ALL.filter((scope) => scope !== GITHUB_DELETE_REPO_SCOPE || isGithubDeleteRepoScopeEnabled())
52
+ );
33
53
 
34
54
  // src/jira-connector-plugin.ts
35
55
  var JIRA_EVENT_TEXT_MAX_CHARS = 4e3;
package/dist/index.js CHANGED
@@ -26,6 +26,26 @@ var PLUGIN_CAPABILITIES = {
26
26
  // external events into the platform ingest pipeline. See
27
27
  // capabilities/event-source.interface.ts.
28
28
  EVENT_SOURCE: "event-source"};
29
+ var GITHUB_FULL_SCOPES_ALL = [
30
+ "user:email",
31
+ "read:user",
32
+ "repo",
33
+ "delete_repo",
34
+ "workflow",
35
+ "write:repo_hook",
36
+ "read:org",
37
+ "project"
38
+ ];
39
+ var GITHUB_DELETE_REPO_SCOPE = "delete_repo";
40
+ function isGithubDeleteRepoScopeEnabled(env = readEnv()) {
41
+ return (env?.GITHUB_OAUTH_DELETE_REPO_SCOPE_ENABLED ?? "").trim().toLowerCase() === "true";
42
+ }
43
+ function readEnv() {
44
+ return typeof process !== "undefined" ? process.env : void 0;
45
+ }
46
+ Object.freeze(
47
+ GITHUB_FULL_SCOPES_ALL.filter((scope) => scope !== GITHUB_DELETE_REPO_SCOPE || isGithubDeleteRepoScopeEnabled())
48
+ );
29
49
 
30
50
  // src/jira-connector-plugin.ts
31
51
  var JIRA_EVENT_TEXT_MAX_CHARS = 4e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/jira-connector-plugin",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "description": "JIRA connector plugin for Ever Works platform (outbound issue comments via jira.js and event-source pull of issues/comments into the event-ingest pipeline, with opt-in historical backfill)",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -32,15 +32,15 @@
32
32
  "test:watch": "vitest"
33
33
  },
34
34
  "dependencies": {
35
- "@ever-works/contracts": "^1.0.3",
36
- "@ever-works/plugin": "^1.2.3",
35
+ "@ever-works/contracts": "^1.1.1",
36
+ "@ever-works/plugin": "^1.2.28",
37
37
  "jira.js": "^5.4.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@types/node": "^26.6.4",
41
41
  "tsup": "^8.0.0",
42
42
  "typescript": "^5.9.3",
43
- "vitest": "^4.1.0"
43
+ "vitest": "^5.0.5"
44
44
  },
45
45
  "everworks": {
46
46
  "plugin": {
@@ -110,16 +110,16 @@
110
110
  },
111
111
  "repository": {
112
112
  "type": "git",
113
- "url": "git+https://github.com/ever-works/ever-works.git",
113
+ "url": "git+https://github.com/ever-co/ever-works.git",
114
114
  "directory": "packages/plugins/jira-connector"
115
115
  },
116
- "homepage": "https://github.com/ever-works/ever-works/tree/main/packages/plugins/jira-connector#readme",
116
+ "homepage": "https://github.com/ever-co/ever-works/tree/main/packages/plugins/jira-connector#readme",
117
117
  "bugs": {
118
- "url": "https://github.com/ever-works/ever-works/issues"
118
+ "url": "https://github.com/ever-co/ever-works/issues"
119
119
  },
120
120
  "everworksRelease": {
121
- "contentHash": "sha256:7d0f091cb7fa8022af24097f22cdfc667b0c886a9b752225f1f2435dfd13b67e",
122
- "commit": "481654e1181e43571ceb71e50ec465d9df360cb2",
123
- "source": "https://github.com/ever-works/ever-works/tree/481654e1181e43571ceb71e50ec465d9df360cb2/packages/plugins/jira-connector"
121
+ "contentHash": "sha256:0b34144341452fb60b97cf986a77304c14706cf2ed5e9d56480a98d787704c2e",
122
+ "commit": "2288ff7e91562b0f079c365348ba08ab3a16f1dd",
123
+ "source": "https://github.com/ever-co/ever-works/tree/2288ff7e91562b0f079c365348ba08ab3a16f1dd/packages/plugins/jira-connector"
124
124
  }
125
125
  }