@ever-works/hubspot-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
@@ -28,6 +28,26 @@ var PLUGIN_CAPABILITIES = {
28
28
  // external events into the platform ingest pipeline. See
29
29
  // capabilities/event-source.interface.ts.
30
30
  EVENT_SOURCE: "event-source"};
31
+ var GITHUB_FULL_SCOPES_ALL = [
32
+ "user:email",
33
+ "read:user",
34
+ "repo",
35
+ "delete_repo",
36
+ "workflow",
37
+ "write:repo_hook",
38
+ "read:org",
39
+ "project"
40
+ ];
41
+ var GITHUB_DELETE_REPO_SCOPE = "delete_repo";
42
+ function isGithubDeleteRepoScopeEnabled(env = readEnv()) {
43
+ return (env?.GITHUB_OAUTH_DELETE_REPO_SCOPE_ENABLED ?? "").trim().toLowerCase() === "true";
44
+ }
45
+ function readEnv() {
46
+ return typeof process !== "undefined" ? process.env : void 0;
47
+ }
48
+ Object.freeze(
49
+ GITHUB_FULL_SCOPES_ALL.filter((scope) => scope !== GITHUB_DELETE_REPO_SCOPE || isGithubDeleteRepoScopeEnabled())
50
+ );
31
51
 
32
52
  // src/hubspot-connector-plugin.ts
33
53
  var HUBSPOT_EVENT_TEXT_MAX_CHARS = 4e3;
package/dist/index.js CHANGED
@@ -24,6 +24,26 @@ var PLUGIN_CAPABILITIES = {
24
24
  // external events into the platform ingest pipeline. See
25
25
  // capabilities/event-source.interface.ts.
26
26
  EVENT_SOURCE: "event-source"};
27
+ var GITHUB_FULL_SCOPES_ALL = [
28
+ "user:email",
29
+ "read:user",
30
+ "repo",
31
+ "delete_repo",
32
+ "workflow",
33
+ "write:repo_hook",
34
+ "read:org",
35
+ "project"
36
+ ];
37
+ var GITHUB_DELETE_REPO_SCOPE = "delete_repo";
38
+ function isGithubDeleteRepoScopeEnabled(env = readEnv()) {
39
+ return (env?.GITHUB_OAUTH_DELETE_REPO_SCOPE_ENABLED ?? "").trim().toLowerCase() === "true";
40
+ }
41
+ function readEnv() {
42
+ return typeof process !== "undefined" ? process.env : void 0;
43
+ }
44
+ Object.freeze(
45
+ GITHUB_FULL_SCOPES_ALL.filter((scope) => scope !== GITHUB_DELETE_REPO_SCOPE || isGithubDeleteRepoScopeEnabled())
46
+ );
27
47
 
28
48
  // src/hubspot-connector-plugin.ts
29
49
  var HUBSPOT_EVENT_TEXT_MAX_CHARS = 4e3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ever-works/hubspot-connector-plugin",
3
- "version": "1.0.1",
3
+ "version": "1.0.4",
4
4
  "description": "HubSpot CRM connector plugin for Ever Works platform (outbound notes + record creation via the official @hubspot/api-client, and event-source pull of contact/company/deal changes 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
  "@hubspot/api-client": "^14.0.1"
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": {
@@ -101,16 +101,16 @@
101
101
  },
102
102
  "repository": {
103
103
  "type": "git",
104
- "url": "git+https://github.com/ever-works/ever-works.git",
104
+ "url": "git+https://github.com/ever-co/ever-works.git",
105
105
  "directory": "packages/plugins/hubspot-connector"
106
106
  },
107
- "homepage": "https://github.com/ever-works/ever-works/tree/main/packages/plugins/hubspot-connector#readme",
107
+ "homepage": "https://github.com/ever-co/ever-works/tree/main/packages/plugins/hubspot-connector#readme",
108
108
  "bugs": {
109
- "url": "https://github.com/ever-works/ever-works/issues"
109
+ "url": "https://github.com/ever-co/ever-works/issues"
110
110
  },
111
111
  "everworksRelease": {
112
- "contentHash": "sha256:f278d394907a9d09aa97fb7b890eb71b5ba16f74ce1e3250231b991043ad684d",
113
- "commit": "481654e1181e43571ceb71e50ec465d9df360cb2",
114
- "source": "https://github.com/ever-works/ever-works/tree/481654e1181e43571ceb71e50ec465d9df360cb2/packages/plugins/hubspot-connector"
112
+ "contentHash": "sha256:391288e7d17a33df4346b143c5f328e4858cb009e06ca011081e321b1b8c27f2",
113
+ "commit": "2288ff7e91562b0f079c365348ba08ab3a16f1dd",
114
+ "source": "https://github.com/ever-co/ever-works/tree/2288ff7e91562b0f079c365348ba08ab3a16f1dd/packages/plugins/hubspot-connector"
115
115
  }
116
116
  }