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.
- package/dist/credentials/GitHubCopilotApi.credentials.d.ts +1 -1
- package/dist/credentials/GitHubCopilotApi.credentials.js +19 -19
- package/dist/credentials/GitHubCopilotOAuth2Api.credentials.backup.d.ts +1 -1
- package/dist/credentials/GitHubCopilotOAuth2Api.credentials.backup.js +71 -71
- package/dist/credentials/GitHubCopilotOAuth2Api.credentials.d.ts +1 -1
- package/dist/credentials/GitHubCopilotOAuth2Api.credentials.js +67 -67
- package/dist/credentials/GitHubCopilotOAuth2Api.credentials.oauth.d.ts +1 -9
- package/dist/credentials/GitHubCopilotOAuth2Api.credentials.oauth.js +38 -63
- package/dist/nodes/GitHubCopilot/GitHubCopilot.node.d.ts +1 -1
- package/dist/nodes/GitHubCopilot/GitHubCopilot.node.js +188 -181
- package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.d.ts +1 -1
- package/dist/nodes/GitHubCopilotChatAPI/GitHubCopilotChatAPI.node.js +38 -38
- package/dist/nodes/GitHubCopilotChatAPI/nodeProperties.d.ts +1 -1
- package/dist/nodes/GitHubCopilotChatAPI/nodeProperties.js +97 -97
- package/dist/nodes/GitHubCopilotChatAPI/utils/imageProcessor.d.ts +2 -2
- package/dist/nodes/GitHubCopilotChatAPI/utils/imageProcessor.js +16 -15
- package/dist/nodes/GitHubCopilotChatAPI/utils/index.d.ts +3 -3
- package/dist/nodes/GitHubCopilotChatAPI/utils/mediaDetection.d.ts +3 -3
- package/dist/nodes/GitHubCopilotChatAPI/utils/mediaDetection.js +20 -26
- package/dist/nodes/GitHubCopilotChatAPI/utils/modelCapabilities.d.ts +1 -1
- package/dist/nodes/GitHubCopilotChatAPI/utils/modelCapabilities.js +24 -24
- package/dist/nodes/GitHubCopilotChatAPI/utils/types.d.ts +4 -4
- package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.d.ts +1 -1
- package/dist/nodes/GitHubCopilotChatModel/GitHubCopilotChatModel.node.js +86 -82
- package/dist/nodes/GitHubCopilotOpenAI/GitHubCopilotOpenAI.node.d.ts +5 -0
- package/dist/nodes/GitHubCopilotOpenAI/GitHubCopilotOpenAI.node.js +142 -0
- package/dist/nodes/GitHubCopilotOpenAI/nodeProperties.d.ts +2 -0
- package/dist/nodes/GitHubCopilotOpenAI/nodeProperties.js +326 -0
- package/dist/nodes/GitHubCopilotOpenAI/utils/index.d.ts +2 -0
- package/dist/nodes/GitHubCopilotOpenAI/utils/index.js +24 -0
- package/dist/nodes/GitHubCopilotOpenAI/utils/openaiCompat.d.ts +95 -0
- package/dist/nodes/GitHubCopilotOpenAI/utils/openaiCompat.js +175 -0
- package/dist/nodes/GitHubCopilotOpenAI/utils/types.d.ts +101 -0
- package/dist/nodes/GitHubCopilotOpenAI/utils/types.js +2 -0
- package/dist/nodes/GitHubCopilotTest/GitHubCopilotTest.node.d.ts +1 -1
- package/dist/nodes/GitHubCopilotTest/GitHubCopilotTest.node.js +96 -94
- 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 =
|
|
8
|
-
this.extends = [
|
|
9
|
-
this.displayName =
|
|
10
|
-
this.documentationUrl =
|
|
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:
|
|
14
|
-
name:
|
|
15
|
-
type:
|
|
16
|
-
default:
|
|
13
|
+
displayName: "Grant Type",
|
|
14
|
+
name: "grantType",
|
|
15
|
+
type: "hidden",
|
|
16
|
+
default: "authorizationCode",
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
|
-
displayName:
|
|
20
|
-
name:
|
|
21
|
-
type:
|
|
22
|
-
default:
|
|
19
|
+
displayName: "Client ID",
|
|
20
|
+
name: "clientId",
|
|
21
|
+
type: "hidden",
|
|
22
|
+
default: "01ab8ac9400c4e429b23",
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
|
-
displayName:
|
|
26
|
-
name:
|
|
27
|
-
type:
|
|
28
|
-
default:
|
|
25
|
+
displayName: "Client Secret",
|
|
26
|
+
name: "clientSecret",
|
|
27
|
+
type: "hidden",
|
|
28
|
+
default: "",
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
displayName:
|
|
32
|
-
name:
|
|
33
|
-
type:
|
|
34
|
-
default:
|
|
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:
|
|
39
|
-
name:
|
|
40
|
-
type:
|
|
41
|
-
default:
|
|
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:
|
|
46
|
-
name:
|
|
47
|
-
type:
|
|
48
|
-
default:
|
|
45
|
+
displayName: "Scope",
|
|
46
|
+
name: "scope",
|
|
47
|
+
type: "hidden",
|
|
48
|
+
default: "repo user:email",
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
|
-
displayName:
|
|
52
|
-
name:
|
|
53
|
-
type:
|
|
54
|
-
default:
|
|
51
|
+
displayName: "Auth URI Query Parameters",
|
|
52
|
+
name: "authQueryParameters",
|
|
53
|
+
type: "hidden",
|
|
54
|
+
default: "",
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
|
-
displayName:
|
|
58
|
-
name:
|
|
59
|
-
type:
|
|
60
|
-
default:
|
|
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
|
-
|
|
69
|
-
|
|
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
|
|
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[][]>;
|