n8n-nodes-github-copilot 3.31.5 → 3.31.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.
@@ -34,8 +34,7 @@ class GitHubCopilotAuthHelper {
34
34
  displayName: "🎯 Como Usar",
35
35
  name: "instructions",
36
36
  type: "notice",
37
- default: "",
38
- description: `
37
+ default: `
39
38
  <div style="background: #e8f5e8; padding: 20px; border-left: 4px solid #4CAF50; border-radius: 4px;">
40
39
  <h3 style="margin-top: 0; color: #2E7D32;">✨ Autenticação Visual - Sem Terminal!</h3>
41
40
 
@@ -468,8 +467,41 @@ function generateAuthPage(proxyUrl) {
468
467
  }
469
468
 
470
469
  function copyCode() {
471
- navigator.clipboard.writeText(userCode);
472
- const btn = document.getElementById("step2").querySelector(".btn");
470
+ // Try modern clipboard API first
471
+ if (navigator.clipboard && navigator.clipboard.writeText) {
472
+ navigator.clipboard.writeText(userCode).then(() => {
473
+ showCopySuccess("step2");
474
+ }).catch((err) => {
475
+ // Fallback to execCommand
476
+ fallbackCopyCode();
477
+ });
478
+ } else {
479
+ // Fallback for older browsers
480
+ fallbackCopyCode();
481
+ }
482
+ }
483
+
484
+ function fallbackCopyCode() {
485
+ // Create temporary textarea
486
+ const textarea = document.createElement("textarea");
487
+ textarea.value = userCode;
488
+ textarea.style.position = "fixed";
489
+ textarea.style.opacity = "0";
490
+ document.body.appendChild(textarea);
491
+ textarea.select();
492
+
493
+ try {
494
+ document.execCommand("copy");
495
+ showCopySuccess("step2");
496
+ } catch (err) {
497
+ alert("Erro ao copiar. Código: " + userCode);
498
+ } finally {
499
+ document.body.removeChild(textarea);
500
+ }
501
+ }
502
+
503
+ function showCopySuccess(stepId) {
504
+ const btn = document.getElementById(stepId).querySelector(".btn");
473
505
  const originalText = btn.innerHTML;
474
506
  btn.innerHTML = '<span>✅</span><span>Copiado!</span>';
475
507
  setTimeout(() => {
@@ -560,13 +592,37 @@ function generateAuthPage(proxyUrl) {
560
592
  }
561
593
 
562
594
  function copyToken() {
563
- navigator.clipboard.writeText(accessToken);
564
- const btn = document.getElementById("successSection").querySelector(".btn");
565
- const originalText = btn.innerHTML;
566
- btn.innerHTML = '<span>✅</span><span>Token Copiado!</span>';
567
- setTimeout(() => {
568
- btn.innerHTML = originalText;
569
- }, 2000);
595
+ // Try modern clipboard API first
596
+ if (navigator.clipboard && navigator.clipboard.writeText) {
597
+ navigator.clipboard.writeText(accessToken).then(() => {
598
+ showCopySuccess("successSection");
599
+ }).catch((err) => {
600
+ // Fallback to execCommand
601
+ fallbackCopyToken();
602
+ });
603
+ } else {
604
+ // Fallback for older browsers
605
+ fallbackCopyToken();
606
+ }
607
+ }
608
+
609
+ function fallbackCopyToken() {
610
+ // Create temporary textarea
611
+ const textarea = document.createElement("textarea");
612
+ textarea.value = accessToken;
613
+ textarea.style.position = "fixed";
614
+ textarea.style.opacity = "0";
615
+ document.body.appendChild(textarea);
616
+ textarea.select();
617
+
618
+ try {
619
+ document.execCommand("copy");
620
+ showCopySuccess("successSection");
621
+ } catch (err) {
622
+ alert("Erro ao copiar token. Por favor, selecione e copie manualmente.");
623
+ } finally {
624
+ document.body.removeChild(textarea);
625
+ }
570
626
  }
571
627
 
572
628
  function sleep(ms) {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.31.5",
3
+ "version": "3.31.6",
4
4
  "description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "n8n-nodes-github-copilot",
3
- "version": "3.31.5",
3
+ "version": "3.31.6",
4
4
  "description": "n8n community node for GitHub Copilot with CLI integration, Chat API access, and AI Chat Model for workflows - access GPT-5, Claude, Gemini and more using your Copilot subscription",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/sufficit/n8n-nodes-github-copilot",