@ever-works/mastodon-connector-plugin 1.0.4 → 1.0.6

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
@@ -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
  function isSafeWebhookUrl(rawUrl) {
30
50
  let url;
31
51
  try {
package/dist/index.js CHANGED
@@ -22,6 +22,26 @@ var PLUGIN_CAPABILITIES = {
22
22
  // external events into the platform ingest pipeline. See
23
23
  // capabilities/event-source.interface.ts.
24
24
  EVENT_SOURCE: "event-source"};
25
+ var GITHUB_FULL_SCOPES_ALL = [
26
+ "user:email",
27
+ "read:user",
28
+ "repo",
29
+ "delete_repo",
30
+ "workflow",
31
+ "write:repo_hook",
32
+ "read:org",
33
+ "project"
34
+ ];
35
+ var GITHUB_DELETE_REPO_SCOPE = "delete_repo";
36
+ function isGithubDeleteRepoScopeEnabled(env = readEnv()) {
37
+ return (env?.GITHUB_OAUTH_DELETE_REPO_SCOPE_ENABLED ?? "").trim().toLowerCase() === "true";
38
+ }
39
+ function readEnv() {
40
+ return typeof process !== "undefined" ? process.env : void 0;
41
+ }
42
+ Object.freeze(
43
+ GITHUB_FULL_SCOPES_ALL.filter((scope) => scope !== GITHUB_DELETE_REPO_SCOPE || isGithubDeleteRepoScopeEnabled())
44
+ );
25
45
  function isSafeWebhookUrl(rawUrl) {
26
46
  let url;
27
47
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/mastodon-connector-plugin",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Mastodon social connector plugin for Ever Works platform (outbound statuses via the masto SDK, and event-source pull of mentions/notifications plus the account's own statuses into the event-ingest pipeline, with opt-in historical backfill)",
5
5
  "author": {
6
6
  "name": "Ever Co. LTD",
@@ -32,8 +32,8 @@
32
32
  "test:watch": "vitest"
33
33
  },
34
34
  "dependencies": {
35
- "@ever-works/contracts": "^1.0.19",
36
- "@ever-works/plugin": "^1.2.16",
35
+ "@ever-works/contracts": "^1.1.1",
36
+ "@ever-works/plugin": "^1.2.28",
37
37
  "masto": "^7.12.0"
38
38
  },
39
39
  "devDependencies": {
@@ -99,16 +99,16 @@
99
99
  },
100
100
  "repository": {
101
101
  "type": "git",
102
- "url": "git+https://github.com/ever-works/ever-works.git",
102
+ "url": "git+https://github.com/ever-co/ever-works.git",
103
103
  "directory": "packages/plugins/mastodon-connector"
104
104
  },
105
- "homepage": "https://github.com/ever-works/ever-works/tree/main/packages/plugins/mastodon-connector#readme",
105
+ "homepage": "https://github.com/ever-co/ever-works/tree/main/packages/plugins/mastodon-connector#readme",
106
106
  "bugs": {
107
- "url": "https://github.com/ever-works/ever-works/issues"
107
+ "url": "https://github.com/ever-co/ever-works/issues"
108
108
  },
109
109
  "everworksRelease": {
110
- "contentHash": "sha256:33c7d4e01e69084d7f8356af1ac651aeadb3717cb5920efd8c1de43435fbc401",
111
- "commit": "89cee44a662034ea957b07ec5e1230ecf340b107",
112
- "source": "https://github.com/ever-works/ever-works/tree/89cee44a662034ea957b07ec5e1230ecf340b107/packages/plugins/mastodon-connector"
110
+ "contentHash": "sha256:1fc65567f9e52bdadc472fbf7b1d95034b4e23ce475ee8afa3bac036d9fd35b0",
111
+ "commit": "2288ff7e91562b0f079c365348ba08ab3a16f1dd",
112
+ "source": "https://github.com/ever-co/ever-works/tree/2288ff7e91562b0f079c365348ba08ab3a16f1dd/packages/plugins/mastodon-connector"
113
113
  }
114
114
  }