n8n-nodes-github-copilot 3.27.5 → 3.28.0

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/dist/credentials/GitHubCopilotApi.credentials.d.ts +1 -1
  2. package/dist/credentials/GitHubCopilotApi.credentials.js +19 -19
  3. package/dist/credentials/GitHubCopilotOAuth2Api.credentials.backup.d.ts +1 -1
  4. package/dist/credentials/GitHubCopilotOAuth2Api.credentials.backup.js +71 -71
  5. package/dist/credentials/GitHubCopilotOAuth2Api.credentials.d.ts +1 -1
  6. package/dist/credentials/GitHubCopilotOAuth2Api.credentials.js +67 -67
  7. package/dist/credentials/GitHubCopilotOAuth2Api.credentials.oauth.d.ts +1 -9
  8. package/dist/credentials/GitHubCopilotOAuth2Api.credentials.oauth.js +38 -63
  9. package/dist/nodes/GitHubCopilot/GitHubCopilot.node.d.ts +1 -1
  10. package/dist/nodes/GitHubCopilot/GitHubCopilot.node.js +188 -181
  11. package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.d.ts +1 -1
  12. package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.js +38 -38
  13. package/dist/nodes/GitHubCopilotChatAPI/nodeProperties.d.ts +1 -1
  14. package/dist/nodes/GitHubCopilotChatAPI/nodeProperties.js +97 -97
  15. package/dist/nodes/GitHubCopilotChatAPI/utils/imageProcessor.d.ts +2 -2
  16. package/dist/nodes/GitHubCopilotChatAPI/utils/imageProcessor.js +16 -15
  17. package/dist/nodes/GitHubCopilotChatAPI/utils/index.d.ts +3 -3
  18. package/dist/nodes/GitHubCopilotChatAPI/utils/mediaDetection.d.ts +3 -3
  19. package/dist/nodes/GitHubCopilotChatAPI/utils/mediaDetection.js +20 -26
  20. package/dist/nodes/GitHubCopilotChatAPI/utils/modelCapabilities.d.ts +1 -1
  21. package/dist/nodes/GitHubCopilotChatAPI/utils/modelCapabilities.js +24 -24
  22. package/dist/nodes/GitHubCopilotChatAPI/utils/types.d.ts +4 -4
  23. package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.d.ts +1 -1
  24. package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.js +86 -82
  25. package/dist/nodes/GitHubCopilotOpenAI/GitHubCopilotOpenAI.node.d.ts +5 -0
  26. package/dist/nodes/GitHubCopilotOpenAI/GitHubCopilotOpenAI.node.js +142 -0
  27. package/dist/nodes/GitHubCopilotOpenAI/nodeProperties.d.ts +2 -0
  28. package/dist/nodes/GitHubCopilotOpenAI/nodeProperties.js +326 -0
  29. package/dist/nodes/GitHubCopilotOpenAI/utils/index.d.ts +2 -0
  30. package/dist/nodes/GitHubCopilotOpenAI/utils/index.js +24 -0
  31. package/dist/nodes/GitHubCopilotOpenAI/utils/openaiCompat.d.ts +95 -0
  32. package/dist/nodes/GitHubCopilotOpenAI/utils/openaiCompat.js +175 -0
  33. package/dist/nodes/GitHubCopilotOpenAI/utils/types.d.ts +101 -0
  34. package/dist/nodes/GitHubCopilotOpenAI/utils/types.js +2 -0
  35. package/dist/nodes/GitHubCopilotTest/GitHubCopilotTest.node.d.ts +1 -1
  36. package/dist/nodes/GitHubCopilotTest/GitHubCopilotTest.node.js +96 -94
  37. package/package.json +75 -74
@@ -4,60 +4,60 @@ exports.GitHubCopilotOAuth2Api = void 0;
4
4
  const GitHubCopilotEndpoints_1 = require("../shared/utils/GitHubCopilotEndpoints");
5
5
  class GitHubCopilotOAuth2Api {
6
6
  constructor() {
7
- this.name = 'githubCopilotOAuth2Api';
8
- this.extends = ['oAuth2Api'];
9
- this.displayName = 'GitHub Copilot OAuth2 API';
10
- this.documentationUrl = 'github';
7
+ this.name = "githubCopilotOAuth2Api";
8
+ this.extends = ["oAuth2Api"];
9
+ this.displayName = "GitHub Copilot OAuth2 API";
10
+ this.documentationUrl = "github";
11
11
  this.properties = [
12
12
  {
13
- displayName: 'Grant Type',
14
- name: 'grantType',
15
- type: 'hidden',
16
- default: 'authorizationCode',
13
+ displayName: "Grant Type",
14
+ name: "grantType",
15
+ type: "hidden",
16
+ default: "authorizationCode",
17
17
  },
18
18
  {
19
- displayName: 'Client ID',
20
- name: 'clientId',
21
- type: 'hidden',
22
- default: '01ab8ac9400c4e429b23',
19
+ displayName: "Client ID",
20
+ name: "clientId",
21
+ type: "hidden",
22
+ default: "01ab8ac9400c4e429b23",
23
23
  },
24
24
  {
25
- displayName: 'Client Secret',
26
- name: 'clientSecret',
27
- type: 'hidden',
28
- default: '',
25
+ displayName: "Client Secret",
26
+ name: "clientSecret",
27
+ type: "hidden",
28
+ default: "",
29
29
  },
30
30
  {
31
- displayName: 'Authorization URL',
32
- name: 'authUrl',
33
- type: 'hidden',
34
- default: 'https://github.com/login/device/code',
31
+ displayName: "Authorization URL",
32
+ name: "authUrl",
33
+ type: "hidden",
34
+ default: "https://github.com/login/oauth/authorize",
35
35
  required: true,
36
36
  },
37
37
  {
38
- displayName: 'Access Token URL',
39
- name: 'accessTokenUrl',
40
- type: 'hidden',
41
- default: 'https://github.com/login/oauth/access_token',
38
+ displayName: "Access Token URL",
39
+ name: "accessTokenUrl",
40
+ type: "hidden",
41
+ default: "https://github.com/login/oauth/access_token",
42
42
  required: true,
43
43
  },
44
44
  {
45
- displayName: 'Scope',
46
- name: 'scope',
47
- type: 'hidden',
48
- default: 'repo user:email',
45
+ displayName: "Scope",
46
+ name: "scope",
47
+ type: "hidden",
48
+ default: "repo user:email",
49
49
  },
50
50
  {
51
- displayName: 'Auth URI Query Parameters',
52
- name: 'authQueryParameters',
53
- type: 'hidden',
54
- default: '',
51
+ displayName: "Auth URI Query Parameters",
52
+ name: "authQueryParameters",
53
+ type: "hidden",
54
+ default: "",
55
55
  },
56
56
  {
57
- displayName: 'Authentication',
58
- name: 'authentication',
59
- type: 'hidden',
60
- default: 'header',
57
+ displayName: "Authentication",
58
+ name: "authentication",
59
+ type: "hidden",
60
+ default: "header",
61
61
  },
62
62
  ];
63
63
  this.test = {
@@ -65,36 +65,11 @@ class GitHubCopilotOAuth2Api {
65
65
  baseURL: GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.GITHUB_BASE_URL,
66
66
  url: GitHubCopilotEndpoints_1.GITHUB_COPILOT_API.ENDPOINTS.USER_COPILOT,
67
67
  headers: {
68
- 'Accept': 'application/vnd.github.v3+json',
69
- 'User-Agent': 'n8n-GitHub-Copilot',
68
+ Accept: "application/vnd.github.v3+json",
69
+ "User-Agent": "n8n-GitHub-Copilot",
70
70
  },
71
71
  },
72
72
  };
73
73
  }
74
- async preAuthentication() {
75
- const deviceResponse = await fetch('https://github.com/login/device/code', {
76
- method: 'POST',
77
- headers: {
78
- 'Accept': 'application/json',
79
- 'Content-Type': 'application/x-www-form-urlencoded',
80
- },
81
- body: new URLSearchParams({
82
- client_id: '01ab8ac9400c4e429b23',
83
- scope: 'repo user:email'
84
- })
85
- });
86
- if (!deviceResponse.ok) {
87
- throw new Error(`Failed to get device code: ${deviceResponse.status}`);
88
- }
89
- const deviceData = await deviceResponse.json();
90
- return {
91
- device_code: deviceData.device_code,
92
- user_code: deviceData.user_code,
93
- verification_uri: deviceData.verification_uri,
94
- verification_uri_complete: deviceData.verification_uri_complete,
95
- expires_in: deviceData.expires_in,
96
- interval: deviceData.interval
97
- };
98
- }
99
74
  }
100
75
  exports.GitHubCopilotOAuth2Api = GitHubCopilotOAuth2Api;
@@ -1,4 +1,4 @@
1
- import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from 'n8n-workflow';
1
+ import { IExecuteFunctions, INodeExecutionData, INodeType, INodeTypeDescription } from "n8n-workflow";
2
2
  export declare class GitHubCopilot implements INodeType {
3
3
  description: INodeTypeDescription;
4
4
  execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]>;