Merge branch 'html-home' into 'main'
Node Moudule deleted and Menu, Home, Info modified See merge request !7
Showing
1000 changed files
with
49 additions
and
3919 deletions
Too many changes to show.
To preserve performance only 1000 of 1000+ files are displayed.
... | @@ -94,7 +94,7 @@ | ... | @@ -94,7 +94,7 @@ |
94 | <div class="output_bar"> | 94 | <div class="output_bar"> |
95 | <h2>Transcription Raw Data</h2> | 95 | <h2>Transcription Raw Data</h2> |
96 | </div> | 96 | </div> |
97 | - <div id="output"></div> | 97 | + <div id="output" style="overflow:auto;"></div> |
98 | <i class="fas fa-arrow-circle-down"></i> | 98 | <i class="fas fa-arrow-circle-down"></i> |
99 | <div class="output_bar"> | 99 | <div class="output_bar"> |
100 | <h2>TTP</h2> | 100 | <h2>TTP</h2> | ... | ... |
... | @@ -2,6 +2,8 @@ | ... | @@ -2,6 +2,8 @@ |
2 | --text-color:#fffde7; | 2 | --text-color:#fffde7; |
3 | --background-color:#ff94c2; | 3 | --background-color:#ff94c2; |
4 | --accent-color:#ba2d65; | 4 | --accent-color:#ba2d65; |
5 | + --output-color:#ff7043; | ||
6 | + --output-accent-color:#c63f17; | ||
5 | } | 7 | } |
6 | 8 | ||
7 | body{ | 9 | body{ |
... | @@ -23,10 +25,12 @@ a{ | ... | @@ -23,10 +25,12 @@ a{ |
23 | .menu_bar_content li:hover{ | 25 | .menu_bar_content li:hover{ |
24 | background-color:var(--accent-color); | 26 | background-color:var(--accent-color); |
25 | border-radius: 4px; | 27 | border-radius: 4px; |
28 | + color:var(--text-color); | ||
26 | } | 29 | } |
27 | .menu_bar_icons li:hover{ | 30 | .menu_bar_icons li:hover{ |
28 | background-color:var(--accent-color); | 31 | background-color:var(--accent-color); |
29 | border-radius: 4px; | 32 | border-radius: 4px; |
33 | + color:var(--text-color); | ||
30 | } | 34 | } |
31 | .menu_bar_logo{ | 35 | .menu_bar_logo{ |
32 | font-size: 20px; | 36 | font-size: 20px; |
... | @@ -35,6 +39,9 @@ a{ | ... | @@ -35,6 +39,9 @@ a{ |
35 | .menu_bar_logo i{ | 39 | .menu_bar_logo i{ |
36 | color:var(--accent-color); | 40 | color:var(--accent-color); |
37 | } | 41 | } |
42 | +.basic:hover{ | ||
43 | + color:var(--text-color); | ||
44 | +} | ||
38 | .menu_bar_content{ | 45 | .menu_bar_content{ |
39 | display:flex; | 46 | display:flex; |
40 | list-style: none; | 47 | list-style: none; |
... | @@ -52,13 +59,17 @@ a{ | ... | @@ -52,13 +59,17 @@ a{ |
52 | padding: 8px 12px; | 59 | padding: 8px 12px; |
53 | } | 60 | } |
54 | .menu_toggle{ | 61 | .menu_toggle{ |
62 | + color:var(--text-color); | ||
55 | display: none; | 63 | display: none; |
56 | position: absolute; | 64 | position: absolute; |
57 | right:32px; | 65 | right:32px; |
58 | font-size: 24px; | 66 | font-size: 24px; |
59 | } | 67 | } |
68 | +.menu_toggle:hover{ | ||
69 | + color:var(--text-color); | ||
70 | +} | ||
60 | @media screen and (max-width: 500px) { | 71 | @media screen and (max-width: 500px) { |
61 | - .menu{ | 72 | + .voi_menu{ |
62 | flex-direction: column; | 73 | flex-direction: column; |
63 | align-items: flex-start; | 74 | align-items: flex-start; |
64 | padding: 8px 24px; | 75 | padding: 8px 24px; |
... | @@ -80,18 +91,15 @@ a{ | ... | @@ -80,18 +91,15 @@ a{ |
80 | } | 91 | } |
81 | .menu_toggle{ | 92 | .menu_toggle{ |
82 | display: block; | 93 | display: block; |
94 | + color:var(--text-color); | ||
83 | } | 95 | } |
84 | .menu_bar_content.active, | 96 | .menu_bar_content.active, |
85 | .menu_bar_icons.active{ | 97 | .menu_bar_icons.active{ |
86 | display:flex; | 98 | display:flex; |
87 | } | 99 | } |
88 | } | 100 | } |
89 | -button{ | 101 | +.basic{ |
90 | - background-color:var(--background-color); | ||
91 | - border:none; | ||
92 | color:var(--text-color); | 102 | color:var(--text-color); |
93 | -} | 103 | + font-size:20px; |
94 | -button:hover{ | 104 | + font-weight: bold; |
95 | - background-color:var(--accent-color); | ||
96 | - border-radius: 4px; | ||
97 | } | 105 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -10,21 +10,23 @@ | ... | @@ -10,21 +10,23 @@ |
10 | <script src="menu.js" defer></script> | 10 | <script src="menu.js" defer></script> |
11 | <link rel="preconnect" href="https://fonts.gstatic.com"> | 11 | <link rel="preconnect" href="https://fonts.gstatic.com"> |
12 | <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300&display=swap" rel="stylesheet"> | 12 | <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300&display=swap" rel="stylesheet"> |
13 | + <link href="https://fonts.googleapis.com/css2?family=Raleway:wght@200&display=swap" rel="stylesheet"> | ||
14 | + <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+KR&family=Raleway:wght@200&display=swap" rel="stylesheet"> | ||
13 | </head> | 15 | </head> |
14 | <body> | 16 | <body> |
15 | <nav class="voi_menu"> | 17 | <nav class="voi_menu"> |
16 | <div class="menu_bar_logo"> | 18 | <div class="menu_bar_logo"> |
17 | <i class="fas fa-microphone-alt"></i> | 19 | <i class="fas fa-microphone-alt"></i> |
18 | - <a href="Voico_Home.html">Voicoding</a> | 20 | + <a class = "basic" href="Voico_Menu.html">Voicoding</a> |
19 | </div> | 21 | </div> |
20 | <ul class="menu_bar_content"> | 22 | <ul class="menu_bar_content"> |
21 | - <a href="Voico_Home.html"><li>Home</li></a> | 23 | + <a class = "basic" href="Voico_Home.html"><li>Home</li></a> |
22 | - <a href="\Manual.txt"><li>Manual</li></a> | 24 | + <a class = "basic" href="\Manual.txt"><li>Manual</li></a> |
23 | - <a href="Voico_Contact.html"><li>info</li></a> | 25 | + <a class = "basic" href="Voico_Contact.html"><li>info</li></a> |
24 | </ul> | 26 | </ul> |
25 | <ul class="menu_bar_icons"> | 27 | <ul class="menu_bar_icons"> |
26 | - <li><a = href="https://www.instagram.com/waterinbottle48/"><i class="fab fa-instagram"></i></a></li> | 28 | + <li><a class = "basic" href="https://www.instagram.com/waterinbottle48/"><i class="fab fa-instagram"></i></a></li> |
27 | - <li><a = href="http://khuhub.khu.ac.kr/2019102168/Voicoding"><i class="fab fa-github"></i></a></li> | 29 | + <li><a class = "basic" href="http://khuhub.khu.ac.kr/2019102168/Voicoding"><i class="fab fa-github"></i></a></li> |
28 | </ul> | 30 | </ul> |
29 | <a href="#" class="menu_toggle"><i class="fas fa-bars"></i></a> | 31 | <a href="#" class="menu_toggle"><i class="fas fa-bars"></i></a> |
30 | </nav> | 32 | </nav> | ... | ... |
... | @@ -2,6 +2,8 @@ | ... | @@ -2,6 +2,8 @@ |
2 | --text-color:#fffde7; | 2 | --text-color:#fffde7; |
3 | --background-color:#ff94c2; | 3 | --background-color:#ff94c2; |
4 | --accent-color:#ba2d65; | 4 | --accent-color:#ba2d65; |
5 | + --output-color:#ff7043; | ||
6 | + --output-accent-color:#c63f17; | ||
5 | } | 7 | } |
6 | 8 | ||
7 | body{ | 9 | body{ |
... | @@ -23,10 +25,12 @@ a{ | ... | @@ -23,10 +25,12 @@ a{ |
23 | .menu_bar_content li:hover{ | 25 | .menu_bar_content li:hover{ |
24 | background-color:var(--accent-color); | 26 | background-color:var(--accent-color); |
25 | border-radius: 4px; | 27 | border-radius: 4px; |
28 | + color:var(--text-color); | ||
26 | } | 29 | } |
27 | .menu_bar_icons li:hover{ | 30 | .menu_bar_icons li:hover{ |
28 | background-color:var(--accent-color); | 31 | background-color:var(--accent-color); |
29 | border-radius: 4px; | 32 | border-radius: 4px; |
33 | + color:var(--text-color); | ||
30 | } | 34 | } |
31 | .menu_bar_logo{ | 35 | .menu_bar_logo{ |
32 | font-size: 20px; | 36 | font-size: 20px; |
... | @@ -35,6 +39,9 @@ a{ | ... | @@ -35,6 +39,9 @@ a{ |
35 | .menu_bar_logo i{ | 39 | .menu_bar_logo i{ |
36 | color:var(--accent-color); | 40 | color:var(--accent-color); |
37 | } | 41 | } |
42 | +.basic:hover{ | ||
43 | + color:var(--text-color); | ||
44 | +} | ||
38 | .menu_bar_content{ | 45 | .menu_bar_content{ |
39 | display:flex; | 46 | display:flex; |
40 | list-style: none; | 47 | list-style: none; |
... | @@ -52,13 +59,17 @@ a{ | ... | @@ -52,13 +59,17 @@ a{ |
52 | padding: 8px 12px; | 59 | padding: 8px 12px; |
53 | } | 60 | } |
54 | .menu_toggle{ | 61 | .menu_toggle{ |
62 | + color:var(--text-color); | ||
55 | display: none; | 63 | display: none; |
56 | position: absolute; | 64 | position: absolute; |
57 | right:32px; | 65 | right:32px; |
58 | font-size: 24px; | 66 | font-size: 24px; |
59 | } | 67 | } |
68 | +.menu_toggle:hover{ | ||
69 | + color:var(--text-color); | ||
70 | +} | ||
60 | @media screen and (max-width: 500px) { | 71 | @media screen and (max-width: 500px) { |
61 | - .menu{ | 72 | + .voi_menu{ |
62 | flex-direction: column; | 73 | flex-direction: column; |
63 | align-items: flex-start; | 74 | align-items: flex-start; |
64 | padding: 8px 24px; | 75 | padding: 8px 24px; |
... | @@ -80,18 +91,15 @@ a{ | ... | @@ -80,18 +91,15 @@ a{ |
80 | } | 91 | } |
81 | .menu_toggle{ | 92 | .menu_toggle{ |
82 | display: block; | 93 | display: block; |
94 | + color:var(--text-color); | ||
83 | } | 95 | } |
84 | .menu_bar_content.active, | 96 | .menu_bar_content.active, |
85 | .menu_bar_icons.active{ | 97 | .menu_bar_icons.active{ |
86 | display:flex; | 98 | display:flex; |
87 | } | 99 | } |
88 | } | 100 | } |
89 | -button{ | 101 | +.basic{ |
90 | - background-color:var(--background-color); | ||
91 | - border:none; | ||
92 | color:var(--text-color); | 102 | color:var(--text-color); |
93 | -} | 103 | + font-size:20px; |
94 | -button:hover{ | 104 | + font-weight: bold; |
95 | - background-color:var(--accent-color); | ||
96 | - border-radius: 4px; | ||
97 | } | 105 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -10,21 +10,23 @@ | ... | @@ -10,21 +10,23 @@ |
10 | <script src="menu.js" defer></script> | 10 | <script src="menu.js" defer></script> |
11 | <link rel="preconnect" href="https://fonts.gstatic.com"> | 11 | <link rel="preconnect" href="https://fonts.gstatic.com"> |
12 | <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300&display=swap" rel="stylesheet"> | 12 | <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@300&display=swap" rel="stylesheet"> |
13 | + <link href="https://fonts.googleapis.com/css2?family=Raleway:wght@200&display=swap" rel="stylesheet"> | ||
14 | + <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+KR&family=Raleway:wght@200&display=swap" rel="stylesheet"> | ||
13 | </head> | 15 | </head> |
14 | <body> | 16 | <body> |
15 | <nav class="voi_menu"> | 17 | <nav class="voi_menu"> |
16 | <div class="menu_bar_logo"> | 18 | <div class="menu_bar_logo"> |
17 | <i class="fas fa-microphone-alt"></i> | 19 | <i class="fas fa-microphone-alt"></i> |
18 | - <a href="Voico_Home.html">Voicoding</a> | 20 | + <a class="basic" href="Voico_Menu.html">Voicoding</a> |
19 | </div> | 21 | </div> |
20 | <ul class="menu_bar_content"> | 22 | <ul class="menu_bar_content"> |
21 | - <a href="Voico_Home.html"><li>Home</li></a> | 23 | + <a class="basic" href="Voico_Home.html"><li>Home</li></a> |
22 | - <a href="\Manual.txt"><li>Manual</li></a> | 24 | + <a class="basic" href="\Manual.txt"><li>Manual</li></a> |
23 | - <a href="Voico_Info.html"><li>info</li></a> | 25 | + <a class="basic" href="Voico_Info.html"><li>info</li></a> |
24 | </ul> | 26 | </ul> |
25 | <ul class="menu_bar_icons"> | 27 | <ul class="menu_bar_icons"> |
26 | - <li><a href="https://www.instagram.com/waterinbottle48/"><i class="fab fa-instagram"></i></a></li> | 28 | + <li><a class="basic" href="https://www.instagram.com/waterinbottle48/"><i class="fab fa-instagram"></i></a></li> |
27 | - <li><a href="http://khuhub.khu.ac.kr/2019102168/Voicoding"><i class="fab fa-github"></i></a></li> | 29 | + <li><a class="basic" href="http://khuhub.khu.ac.kr/2019102168/Voicoding"><i class="fab fa-github"></i></a></li> |
28 | </ul> | 30 | </ul> |
29 | <a href="#" class="menu_toggle"><i class="fas fa-bars"></i></a> | 31 | <a href="#" class="menu_toggle"><i class="fas fa-bars"></i></a> |
30 | </nav> | 32 | </nav> | ... | ... |
node_modules/.bin/compileProtos
deleted
100644 → 0
1 | -#!/bin/sh | ||
2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | - | ||
4 | -case `uname` in | ||
5 | - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | -esac | ||
7 | - | ||
8 | -if [ -x "$basedir/node" ]; then | ||
9 | - "$basedir/node" "$basedir/../google-gax/build/tools/compileProtos.js" "$@" | ||
10 | - ret=$? | ||
11 | -else | ||
12 | - node "$basedir/../google-gax/build/tools/compileProtos.js" "$@" | ||
13 | - ret=$? | ||
14 | -fi | ||
15 | -exit $ret |
node_modules/.bin/compileProtos.cmd
deleted
100644 → 0
1 | -@ECHO off | ||
2 | -SETLOCAL | ||
3 | -CALL :find_dp0 | ||
4 | - | ||
5 | -IF EXIST "%dp0%\node.exe" ( | ||
6 | - SET "_prog=%dp0%\node.exe" | ||
7 | -) ELSE ( | ||
8 | - SET "_prog=node" | ||
9 | - SET PATHEXT=%PATHEXT:;.JS;=;% | ||
10 | -) | ||
11 | - | ||
12 | -"%_prog%" "%dp0%\..\google-gax\build\tools\compileProtos.js" %* | ||
13 | -ENDLOCAL | ||
14 | -EXIT /b %errorlevel% | ||
15 | -:find_dp0 | ||
16 | -SET dp0=%~dp0 | ||
17 | -EXIT /b |
node_modules/.bin/compileProtos.ps1
deleted
100644 → 0
1 | -#!/usr/bin/env pwsh | ||
2 | -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | - | ||
4 | -$exe="" | ||
5 | -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | - # Fix case when both the Windows and Linux builds of Node | ||
7 | - # are installed in the same directory | ||
8 | - $exe=".exe" | ||
9 | -} | ||
10 | -$ret=0 | ||
11 | -if (Test-Path "$basedir/node$exe") { | ||
12 | - & "$basedir/node$exe" "$basedir/../google-gax/build/tools/compileProtos.js" $args | ||
13 | - $ret=$LASTEXITCODE | ||
14 | -} else { | ||
15 | - & "node$exe" "$basedir/../google-gax/build/tools/compileProtos.js" $args | ||
16 | - $ret=$LASTEXITCODE | ||
17 | -} | ||
18 | -exit $ret |
node_modules/.bin/gp12-pem
deleted
100644 → 0
1 | -#!/bin/sh | ||
2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | - | ||
4 | -case `uname` in | ||
5 | - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | -esac | ||
7 | - | ||
8 | -if [ -x "$basedir/node" ]; then | ||
9 | - "$basedir/node" "$basedir/../google-p12-pem/build/src/bin/gp12-pem.js" "$@" | ||
10 | - ret=$? | ||
11 | -else | ||
12 | - node "$basedir/../google-p12-pem/build/src/bin/gp12-pem.js" "$@" | ||
13 | - ret=$? | ||
14 | -fi | ||
15 | -exit $ret |
node_modules/.bin/gp12-pem.cmd
deleted
100644 → 0
1 | -@ECHO off | ||
2 | -SETLOCAL | ||
3 | -CALL :find_dp0 | ||
4 | - | ||
5 | -IF EXIST "%dp0%\node.exe" ( | ||
6 | - SET "_prog=%dp0%\node.exe" | ||
7 | -) ELSE ( | ||
8 | - SET "_prog=node" | ||
9 | - SET PATHEXT=%PATHEXT:;.JS;=;% | ||
10 | -) | ||
11 | - | ||
12 | -"%_prog%" "%dp0%\..\google-p12-pem\build\src\bin\gp12-pem.js" %* | ||
13 | -ENDLOCAL | ||
14 | -EXIT /b %errorlevel% | ||
15 | -:find_dp0 | ||
16 | -SET dp0=%~dp0 | ||
17 | -EXIT /b |
node_modules/.bin/gp12-pem.ps1
deleted
100644 → 0
1 | -#!/usr/bin/env pwsh | ||
2 | -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | - | ||
4 | -$exe="" | ||
5 | -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | - # Fix case when both the Windows and Linux builds of Node | ||
7 | - # are installed in the same directory | ||
8 | - $exe=".exe" | ||
9 | -} | ||
10 | -$ret=0 | ||
11 | -if (Test-Path "$basedir/node$exe") { | ||
12 | - & "$basedir/node$exe" "$basedir/../google-p12-pem/build/src/bin/gp12-pem.js" $args | ||
13 | - $ret=$LASTEXITCODE | ||
14 | -} else { | ||
15 | - & "node$exe" "$basedir/../google-p12-pem/build/src/bin/gp12-pem.js" $args | ||
16 | - $ret=$LASTEXITCODE | ||
17 | -} | ||
18 | -exit $ret |
node_modules/.bin/mime
deleted
100644 → 0
1 | -#!/bin/sh | ||
2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | - | ||
4 | -case `uname` in | ||
5 | - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | -esac | ||
7 | - | ||
8 | -if [ -x "$basedir/node" ]; then | ||
9 | - "$basedir/node" "$basedir/../mime/cli.js" "$@" | ||
10 | - ret=$? | ||
11 | -else | ||
12 | - node "$basedir/../mime/cli.js" "$@" | ||
13 | - ret=$? | ||
14 | -fi | ||
15 | -exit $ret |
node_modules/.bin/mime.cmd
deleted
100644 → 0
1 | -@ECHO off | ||
2 | -SETLOCAL | ||
3 | -CALL :find_dp0 | ||
4 | - | ||
5 | -IF EXIST "%dp0%\node.exe" ( | ||
6 | - SET "_prog=%dp0%\node.exe" | ||
7 | -) ELSE ( | ||
8 | - SET "_prog=node" | ||
9 | - SET PATHEXT=%PATHEXT:;.JS;=;% | ||
10 | -) | ||
11 | - | ||
12 | -"%_prog%" "%dp0%\..\mime\cli.js" %* | ||
13 | -ENDLOCAL | ||
14 | -EXIT /b %errorlevel% | ||
15 | -:find_dp0 | ||
16 | -SET dp0=%~dp0 | ||
17 | -EXIT /b |
node_modules/.bin/mime.ps1
deleted
100644 → 0
1 | -#!/usr/bin/env pwsh | ||
2 | -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | - | ||
4 | -$exe="" | ||
5 | -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | - # Fix case when both the Windows and Linux builds of Node | ||
7 | - # are installed in the same directory | ||
8 | - $exe=".exe" | ||
9 | -} | ||
10 | -$ret=0 | ||
11 | -if (Test-Path "$basedir/node$exe") { | ||
12 | - & "$basedir/node$exe" "$basedir/../mime/cli.js" $args | ||
13 | - $ret=$LASTEXITCODE | ||
14 | -} else { | ||
15 | - & "node$exe" "$basedir/../mime/cli.js" $args | ||
16 | - $ret=$LASTEXITCODE | ||
17 | -} | ||
18 | -exit $ret |
node_modules/.bin/mkdirp
deleted
100644 → 0
1 | -#!/bin/sh | ||
2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | - | ||
4 | -case `uname` in | ||
5 | - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | -esac | ||
7 | - | ||
8 | -if [ -x "$basedir/node" ]; then | ||
9 | - "$basedir/node" "$basedir/../mkdirp/bin/cmd.js" "$@" | ||
10 | - ret=$? | ||
11 | -else | ||
12 | - node "$basedir/../mkdirp/bin/cmd.js" "$@" | ||
13 | - ret=$? | ||
14 | -fi | ||
15 | -exit $ret |
node_modules/.bin/mkdirp.cmd
deleted
100644 → 0
1 | -@ECHO off | ||
2 | -SETLOCAL | ||
3 | -CALL :find_dp0 | ||
4 | - | ||
5 | -IF EXIST "%dp0%\node.exe" ( | ||
6 | - SET "_prog=%dp0%\node.exe" | ||
7 | -) ELSE ( | ||
8 | - SET "_prog=node" | ||
9 | - SET PATHEXT=%PATHEXT:;.JS;=;% | ||
10 | -) | ||
11 | - | ||
12 | -"%_prog%" "%dp0%\..\mkdirp\bin\cmd.js" %* | ||
13 | -ENDLOCAL | ||
14 | -EXIT /b %errorlevel% | ||
15 | -:find_dp0 | ||
16 | -SET dp0=%~dp0 | ||
17 | -EXIT /b |
node_modules/.bin/mkdirp.ps1
deleted
100644 → 0
1 | -#!/usr/bin/env pwsh | ||
2 | -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | - | ||
4 | -$exe="" | ||
5 | -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | - # Fix case when both the Windows and Linux builds of Node | ||
7 | - # are installed in the same directory | ||
8 | - $exe=".exe" | ||
9 | -} | ||
10 | -$ret=0 | ||
11 | -if (Test-Path "$basedir/node$exe") { | ||
12 | - & "$basedir/node$exe" "$basedir/../mkdirp/bin/cmd.js" $args | ||
13 | - $ret=$LASTEXITCODE | ||
14 | -} else { | ||
15 | - & "node$exe" "$basedir/../mkdirp/bin/cmd.js" $args | ||
16 | - $ret=$LASTEXITCODE | ||
17 | -} | ||
18 | -exit $ret |
node_modules/.bin/pbjs
deleted
100644 → 0
1 | -#!/bin/sh | ||
2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | - | ||
4 | -case `uname` in | ||
5 | - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | -esac | ||
7 | - | ||
8 | -if [ -x "$basedir/node" ]; then | ||
9 | - "$basedir/node" "$basedir/../protobufjs/bin/pbjs" "$@" | ||
10 | - ret=$? | ||
11 | -else | ||
12 | - node "$basedir/../protobufjs/bin/pbjs" "$@" | ||
13 | - ret=$? | ||
14 | -fi | ||
15 | -exit $ret |
node_modules/.bin/pbjs.cmd
deleted
100644 → 0
1 | -@ECHO off | ||
2 | -SETLOCAL | ||
3 | -CALL :find_dp0 | ||
4 | - | ||
5 | -IF EXIST "%dp0%\node.exe" ( | ||
6 | - SET "_prog=%dp0%\node.exe" | ||
7 | -) ELSE ( | ||
8 | - SET "_prog=node" | ||
9 | - SET PATHEXT=%PATHEXT:;.JS;=;% | ||
10 | -) | ||
11 | - | ||
12 | -"%_prog%" "%dp0%\..\protobufjs\bin\pbjs" %* | ||
13 | -ENDLOCAL | ||
14 | -EXIT /b %errorlevel% | ||
15 | -:find_dp0 | ||
16 | -SET dp0=%~dp0 | ||
17 | -EXIT /b |
node_modules/.bin/pbjs.ps1
deleted
100644 → 0
1 | -#!/usr/bin/env pwsh | ||
2 | -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | - | ||
4 | -$exe="" | ||
5 | -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | - # Fix case when both the Windows and Linux builds of Node | ||
7 | - # are installed in the same directory | ||
8 | - $exe=".exe" | ||
9 | -} | ||
10 | -$ret=0 | ||
11 | -if (Test-Path "$basedir/node$exe") { | ||
12 | - & "$basedir/node$exe" "$basedir/../protobufjs/bin/pbjs" $args | ||
13 | - $ret=$LASTEXITCODE | ||
14 | -} else { | ||
15 | - & "node$exe" "$basedir/../protobufjs/bin/pbjs" $args | ||
16 | - $ret=$LASTEXITCODE | ||
17 | -} | ||
18 | -exit $ret |
node_modules/.bin/pbts
deleted
100644 → 0
1 | -#!/bin/sh | ||
2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | - | ||
4 | -case `uname` in | ||
5 | - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | -esac | ||
7 | - | ||
8 | -if [ -x "$basedir/node" ]; then | ||
9 | - "$basedir/node" "$basedir/../protobufjs/bin/pbts" "$@" | ||
10 | - ret=$? | ||
11 | -else | ||
12 | - node "$basedir/../protobufjs/bin/pbts" "$@" | ||
13 | - ret=$? | ||
14 | -fi | ||
15 | -exit $ret |
node_modules/.bin/pbts.cmd
deleted
100644 → 0
1 | -@ECHO off | ||
2 | -SETLOCAL | ||
3 | -CALL :find_dp0 | ||
4 | - | ||
5 | -IF EXIST "%dp0%\node.exe" ( | ||
6 | - SET "_prog=%dp0%\node.exe" | ||
7 | -) ELSE ( | ||
8 | - SET "_prog=node" | ||
9 | - SET PATHEXT=%PATHEXT:;.JS;=;% | ||
10 | -) | ||
11 | - | ||
12 | -"%_prog%" "%dp0%\..\protobufjs\bin\pbts" %* | ||
13 | -ENDLOCAL | ||
14 | -EXIT /b %errorlevel% | ||
15 | -:find_dp0 | ||
16 | -SET dp0=%~dp0 | ||
17 | -EXIT /b |
node_modules/.bin/pbts.ps1
deleted
100644 → 0
1 | -#!/usr/bin/env pwsh | ||
2 | -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | - | ||
4 | -$exe="" | ||
5 | -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | - # Fix case when both the Windows and Linux builds of Node | ||
7 | - # are installed in the same directory | ||
8 | - $exe=".exe" | ||
9 | -} | ||
10 | -$ret=0 | ||
11 | -if (Test-Path "$basedir/node$exe") { | ||
12 | - & "$basedir/node$exe" "$basedir/../protobufjs/bin/pbts" $args | ||
13 | - $ret=$LASTEXITCODE | ||
14 | -} else { | ||
15 | - & "node$exe" "$basedir/../protobufjs/bin/pbts" $args | ||
16 | - $ret=$LASTEXITCODE | ||
17 | -} | ||
18 | -exit $ret |
1 | -#!/bin/sh | ||
2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | - | ||
4 | -case `uname` in | ||
5 | - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | -esac | ||
7 | - | ||
8 | -if [ -x "$basedir/node" ]; then | ||
9 | - "$basedir/node" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" "$@" | ||
10 | - ret=$? | ||
11 | -else | ||
12 | - node "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" "$@" | ||
13 | - ret=$? | ||
14 | -fi | ||
15 | -exit $ret |
1 | -@ECHO off | ||
2 | -SETLOCAL | ||
3 | -CALL :find_dp0 | ||
4 | - | ||
5 | -IF EXIST "%dp0%\node.exe" ( | ||
6 | - SET "_prog=%dp0%\node.exe" | ||
7 | -) ELSE ( | ||
8 | - SET "_prog=node" | ||
9 | - SET PATHEXT=%PATHEXT:;.JS;=;% | ||
10 | -) | ||
11 | - | ||
12 | -"%_prog%" "%dp0%\..\@grpc\proto-loader\build\bin\proto-loader-gen-types.js" %* | ||
13 | -ENDLOCAL | ||
14 | -EXIT /b %errorlevel% | ||
15 | -:find_dp0 | ||
16 | -SET dp0=%~dp0 | ||
17 | -EXIT /b |
1 | -#!/usr/bin/env pwsh | ||
2 | -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | - | ||
4 | -$exe="" | ||
5 | -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | - # Fix case when both the Windows and Linux builds of Node | ||
7 | - # are installed in the same directory | ||
8 | - $exe=".exe" | ||
9 | -} | ||
10 | -$ret=0 | ||
11 | -if (Test-Path "$basedir/node$exe") { | ||
12 | - & "$basedir/node$exe" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args | ||
13 | - $ret=$LASTEXITCODE | ||
14 | -} else { | ||
15 | - & "node$exe" "$basedir/../@grpc/proto-loader/build/bin/proto-loader-gen-types.js" $args | ||
16 | - $ret=$LASTEXITCODE | ||
17 | -} | ||
18 | -exit $ret |
node_modules/.bin/uuid
deleted
100644 → 0
1 | -#!/bin/sh | ||
2 | -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')") | ||
3 | - | ||
4 | -case `uname` in | ||
5 | - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;; | ||
6 | -esac | ||
7 | - | ||
8 | -if [ -x "$basedir/node" ]; then | ||
9 | - "$basedir/node" "$basedir/../uuid/dist/bin/uuid" "$@" | ||
10 | - ret=$? | ||
11 | -else | ||
12 | - node "$basedir/../uuid/dist/bin/uuid" "$@" | ||
13 | - ret=$? | ||
14 | -fi | ||
15 | -exit $ret |
node_modules/.bin/uuid.cmd
deleted
100644 → 0
1 | -@ECHO off | ||
2 | -SETLOCAL | ||
3 | -CALL :find_dp0 | ||
4 | - | ||
5 | -IF EXIST "%dp0%\node.exe" ( | ||
6 | - SET "_prog=%dp0%\node.exe" | ||
7 | -) ELSE ( | ||
8 | - SET "_prog=node" | ||
9 | - SET PATHEXT=%PATHEXT:;.JS;=;% | ||
10 | -) | ||
11 | - | ||
12 | -"%_prog%" "%dp0%\..\uuid\dist\bin\uuid" %* | ||
13 | -ENDLOCAL | ||
14 | -EXIT /b %errorlevel% | ||
15 | -:find_dp0 | ||
16 | -SET dp0=%~dp0 | ||
17 | -EXIT /b |
node_modules/.bin/uuid.ps1
deleted
100644 → 0
1 | -#!/usr/bin/env pwsh | ||
2 | -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent | ||
3 | - | ||
4 | -$exe="" | ||
5 | -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { | ||
6 | - # Fix case when both the Windows and Linux builds of Node | ||
7 | - # are installed in the same directory | ||
8 | - $exe=".exe" | ||
9 | -} | ||
10 | -$ret=0 | ||
11 | -if (Test-Path "$basedir/node$exe") { | ||
12 | - & "$basedir/node$exe" "$basedir/../uuid/dist/bin/uuid" $args | ||
13 | - $ret=$LASTEXITCODE | ||
14 | -} else { | ||
15 | - & "node$exe" "$basedir/../uuid/dist/bin/uuid" $args | ||
16 | - $ret=$LASTEXITCODE | ||
17 | -} | ||
18 | -exit $ret |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 | -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
2 | -[//]: # "To regenerate it, use `python -m synthtool`." | ||
3 | -<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/> | ||
4 | - | ||
5 | -# [Google Cloud Common: Node.js Client](https://github.com/googleapis/nodejs-common) | ||
6 | - | ||
7 | -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) | ||
8 | -[![npm version](https://img.shields.io/npm/v/@google-cloud/common.svg)](https://www.npmjs.org/package/@google-cloud/common) | ||
9 | -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-common/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-common) | ||
10 | - | ||
11 | - | ||
12 | - | ||
13 | - | ||
14 | -Common components for Cloud APIs Node.js Client Libraries | ||
15 | - | ||
16 | - | ||
17 | -A comprehensive list of changes in each version may be found in | ||
18 | -[the CHANGELOG](https://github.com/googleapis/nodejs-common/blob/master/CHANGELOG.md). | ||
19 | - | ||
20 | -* [Google Cloud Common Node.js Client API Reference][client-docs] | ||
21 | - | ||
22 | -* [github.com/googleapis/nodejs-common](https://github.com/googleapis/nodejs-common) | ||
23 | - | ||
24 | -Read more about the client libraries for Cloud APIs, including the older | ||
25 | -Google APIs Client Libraries, in [Client Libraries Explained][explained]. | ||
26 | - | ||
27 | -[explained]: https://cloud.google.com/apis/docs/client-libraries-explained | ||
28 | - | ||
29 | -**Table of contents:** | ||
30 | - | ||
31 | - | ||
32 | -* [Quickstart](#quickstart) | ||
33 | - | ||
34 | - * [Installing the client library](#installing-the-client-library) | ||
35 | - | ||
36 | - | ||
37 | -* [Versioning](#versioning) | ||
38 | -* [Contributing](#contributing) | ||
39 | -* [License](#license) | ||
40 | - | ||
41 | -## Quickstart | ||
42 | - | ||
43 | -### Installing the client library | ||
44 | - | ||
45 | -```bash | ||
46 | -npm install @google-cloud/common | ||
47 | -``` | ||
48 | - | ||
49 | -It's unlikely you will need to install this package directly, as it will be | ||
50 | -installed as a dependency when you install other `@google-cloud` packages. | ||
51 | - | ||
52 | - | ||
53 | - | ||
54 | -The [Google Cloud Common Node.js Client API Reference][client-docs] documentation | ||
55 | -also contains samples. | ||
56 | - | ||
57 | -## Supported Node.js Versions | ||
58 | - | ||
59 | -Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). | ||
60 | -Libraries are compatible with all current _active_ and _maintenance_ versions of | ||
61 | -Node.js. | ||
62 | - | ||
63 | -Client libraries targeting some end-of-life versions of Node.js are available, and | ||
64 | -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). | ||
65 | -The dist-tags follow the naming convention `legacy-(version)`. | ||
66 | - | ||
67 | -_Legacy Node.js versions are supported as a best effort:_ | ||
68 | - | ||
69 | -* Legacy versions will not be tested in continuous integration. | ||
70 | -* Some security patches may not be able to be backported. | ||
71 | -* Dependencies will not be kept up-to-date, and features will not be backported. | ||
72 | - | ||
73 | -#### Legacy tags available | ||
74 | - | ||
75 | -* `legacy-8`: install client libraries from this dist-tag for versions | ||
76 | - compatible with Node.js 8. | ||
77 | - | ||
78 | -## Versioning | ||
79 | - | ||
80 | -This library follows [Semantic Versioning](http://semver.org/). | ||
81 | - | ||
82 | - | ||
83 | -This library is considered to be **General Availability (GA)**. This means it | ||
84 | -is stable; the code surface will not change in backwards-incompatible ways | ||
85 | -unless absolutely necessary (e.g. because of critical security issues) or with | ||
86 | -an extensive deprecation period. Issues and requests against **GA** libraries | ||
87 | -are addressed with the highest priority. | ||
88 | - | ||
89 | - | ||
90 | - | ||
91 | - | ||
92 | - | ||
93 | -More Information: [Google Cloud Platform Launch Stages][launch_stages] | ||
94 | - | ||
95 | -[launch_stages]: https://cloud.google.com/terms/launch-stages | ||
96 | - | ||
97 | -## Contributing | ||
98 | - | ||
99 | -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-common/blob/master/CONTRIBUTING.md). | ||
100 | - | ||
101 | -Please note that this `README.md`, the `samples/README.md`, | ||
102 | -and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) | ||
103 | -are generated from a central template. To edit one of these files, make an edit | ||
104 | -to its template in this | ||
105 | -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). | ||
106 | - | ||
107 | -## License | ||
108 | - | ||
109 | -Apache Version 2.0 | ||
110 | - | ||
111 | -See [LICENSE](https://github.com/googleapis/nodejs-common/blob/master/LICENSE) | ||
112 | - | ||
113 | -[client-docs]: https://googleapis.dev/nodejs/common/latest | ||
114 | - | ||
115 | -[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png | ||
116 | -[projects]: https://console.cloud.google.com/project | ||
117 | -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing | ||
118 | - | ||
119 | -[auth]: https://cloud.google.com/docs/authentication/getting-started |
1 | -export { GoogleAuthOptions } from 'google-auth-library'; | ||
2 | -/** | ||
3 | - * @type {module:common/operation} | ||
4 | - * @private | ||
5 | - */ | ||
6 | -export { Operation } from './operation'; | ||
7 | -/** | ||
8 | - * @type {module:common/service} | ||
9 | - * @private | ||
10 | - */ | ||
11 | -export { Service, ServiceConfig, ServiceOptions, StreamRequestOptions, } from './service'; | ||
12 | -/** | ||
13 | - * @type {module:common/serviceObject} | ||
14 | - * @private | ||
15 | - */ | ||
16 | -export { DeleteCallback, ExistsCallback, GetConfig, InstanceResponseCallback, Interceptor, Metadata, MetadataCallback, MetadataResponse, Methods, ResponseCallback, ServiceObject, ServiceObjectConfig, ServiceObjectParent, SetMetadataResponse, } from './service-object'; | ||
17 | -/** | ||
18 | - * @type {module:common/util} | ||
19 | - * @private | ||
20 | - */ | ||
21 | -export { Abortable, AbortableDuplex, ApiError, BodyResponseCallback, DecorateRequestOptions, ResponseBody, util, } from './util'; |
1 | -"use strict"; | ||
2 | -// Copyright 2016 Google LLC | ||
3 | -// | ||
4 | -// Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | -// you may not use this file except in compliance with the License. | ||
6 | -// You may obtain a copy of the License at | ||
7 | -// | ||
8 | -// http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | -// | ||
10 | -// Unless required by applicable law or agreed to in writing, software | ||
11 | -// distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | -// See the License for the specific language governing permissions and | ||
14 | -// limitations under the License. | ||
15 | -Object.defineProperty(exports, "__esModule", { value: true }); | ||
16 | -/** | ||
17 | - * @type {module:common/operation} | ||
18 | - * @private | ||
19 | - */ | ||
20 | -var operation_1 = require("./operation"); | ||
21 | -exports.Operation = operation_1.Operation; | ||
22 | -/** | ||
23 | - * @type {module:common/service} | ||
24 | - * @private | ||
25 | - */ | ||
26 | -var service_1 = require("./service"); | ||
27 | -exports.Service = service_1.Service; | ||
28 | -/** | ||
29 | - * @type {module:common/serviceObject} | ||
30 | - * @private | ||
31 | - */ | ||
32 | -var service_object_1 = require("./service-object"); | ||
33 | -exports.ServiceObject = service_object_1.ServiceObject; | ||
34 | -/** | ||
35 | - * @type {module:common/util} | ||
36 | - * @private | ||
37 | - */ | ||
38 | -var util_1 = require("./util"); | ||
39 | -exports.ApiError = util_1.ApiError; | ||
40 | -exports.util = util_1.util; | ||
41 | -//# sourceMappingURL=index.js.map | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -/*! | ||
2 | - * @module common/operation | ||
3 | - */ | ||
4 | -import { MetadataCallback, ServiceObject, ServiceObjectConfig } from './service-object'; | ||
5 | -export declare class Operation<T = any> extends ServiceObject<T> { | ||
6 | - completeListeners: number; | ||
7 | - hasActiveListeners: boolean; | ||
8 | - /** | ||
9 | - * An Operation object allows you to interact with APIs that take longer to | ||
10 | - * process things. | ||
11 | - * | ||
12 | - * @constructor | ||
13 | - * @alias module:common/operation | ||
14 | - * | ||
15 | - * @param {object} config - Configuration object. | ||
16 | - * @param {module:common/service|module:common/serviceObject|module:common/grpcService|module:common/grpcServiceObject} config.parent - The parent object. | ||
17 | - */ | ||
18 | - constructor(config: ServiceObjectConfig); | ||
19 | - /** | ||
20 | - * Wraps the `complete` and `error` events in a Promise. | ||
21 | - * | ||
22 | - * @return {Promise} | ||
23 | - */ | ||
24 | - promise(): Promise<unknown>; | ||
25 | - /** | ||
26 | - * Begin listening for events on the operation. This method keeps track of how | ||
27 | - * many "complete" listeners are registered and removed, making sure polling | ||
28 | - * is handled automatically. | ||
29 | - * | ||
30 | - * As long as there is one active "complete" listener, the connection is open. | ||
31 | - * When there are no more listeners, the polling stops. | ||
32 | - * | ||
33 | - * @private | ||
34 | - */ | ||
35 | - protected listenForEvents_(): void; | ||
36 | - /** | ||
37 | - * Poll for a status update. Returns null for an incomplete | ||
38 | - * status, and metadata for a complete status. | ||
39 | - * | ||
40 | - * @private | ||
41 | - */ | ||
42 | - protected poll_(callback: MetadataCallback): void; | ||
43 | - /** | ||
44 | - * Poll `getMetadata` to check the operation's status. This runs a loop to | ||
45 | - * ping the API on an interval. | ||
46 | - * | ||
47 | - * Note: This method is automatically called once a "complete" event handler | ||
48 | - * is registered on the operation. | ||
49 | - * | ||
50 | - * @private | ||
51 | - */ | ||
52 | - protected startPolling_(): Promise<void>; | ||
53 | -} |
1 | -"use strict"; | ||
2 | -// Copyright 2016 Google LLC | ||
3 | -// | ||
4 | -// Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | -// you may not use this file except in compliance with the License. | ||
6 | -// You may obtain a copy of the License at | ||
7 | -// | ||
8 | -// http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | -// | ||
10 | -// Unless required by applicable law or agreed to in writing, software | ||
11 | -// distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | -// See the License for the specific language governing permissions and | ||
14 | -// limitations under the License. | ||
15 | -Object.defineProperty(exports, "__esModule", { value: true }); | ||
16 | -/*! | ||
17 | - * @module common/operation | ||
18 | - */ | ||
19 | -const service_object_1 = require("./service-object"); | ||
20 | -const util_1 = require("util"); | ||
21 | -// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
22 | -class Operation extends service_object_1.ServiceObject { | ||
23 | - /** | ||
24 | - * An Operation object allows you to interact with APIs that take longer to | ||
25 | - * process things. | ||
26 | - * | ||
27 | - * @constructor | ||
28 | - * @alias module:common/operation | ||
29 | - * | ||
30 | - * @param {object} config - Configuration object. | ||
31 | - * @param {module:common/service|module:common/serviceObject|module:common/grpcService|module:common/grpcServiceObject} config.parent - The parent object. | ||
32 | - */ | ||
33 | - constructor(config) { | ||
34 | - const methods = { | ||
35 | - /** | ||
36 | - * Checks to see if an operation exists. | ||
37 | - */ | ||
38 | - exists: true, | ||
39 | - /** | ||
40 | - * Retrieves the operation. | ||
41 | - */ | ||
42 | - get: true, | ||
43 | - /** | ||
44 | - * Retrieves metadata for the operation. | ||
45 | - */ | ||
46 | - getMetadata: { | ||
47 | - reqOpts: { | ||
48 | - name: config.id, | ||
49 | - }, | ||
50 | - }, | ||
51 | - }; | ||
52 | - config = Object.assign({ | ||
53 | - baseUrl: '', | ||
54 | - }, config); | ||
55 | - // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
56 | - config.methods = (config.methods || methods); | ||
57 | - super(config); | ||
58 | - this.completeListeners = 0; | ||
59 | - this.hasActiveListeners = false; | ||
60 | - this.listenForEvents_(); | ||
61 | - } | ||
62 | - /** | ||
63 | - * Wraps the `complete` and `error` events in a Promise. | ||
64 | - * | ||
65 | - * @return {Promise} | ||
66 | - */ | ||
67 | - promise() { | ||
68 | - return new Promise((resolve, reject) => { | ||
69 | - this.on('error', reject).on('complete', (metadata) => { | ||
70 | - resolve([metadata]); | ||
71 | - }); | ||
72 | - }); | ||
73 | - } | ||
74 | - /** | ||
75 | - * Begin listening for events on the operation. This method keeps track of how | ||
76 | - * many "complete" listeners are registered and removed, making sure polling | ||
77 | - * is handled automatically. | ||
78 | - * | ||
79 | - * As long as there is one active "complete" listener, the connection is open. | ||
80 | - * When there are no more listeners, the polling stops. | ||
81 | - * | ||
82 | - * @private | ||
83 | - */ | ||
84 | - listenForEvents_() { | ||
85 | - this.on('newListener', (event) => { | ||
86 | - if (event === 'complete') { | ||
87 | - this.completeListeners++; | ||
88 | - if (!this.hasActiveListeners) { | ||
89 | - this.hasActiveListeners = true; | ||
90 | - this.startPolling_(); | ||
91 | - } | ||
92 | - } | ||
93 | - }); | ||
94 | - this.on('removeListener', (event) => { | ||
95 | - if (event === 'complete' && --this.completeListeners === 0) { | ||
96 | - this.hasActiveListeners = false; | ||
97 | - } | ||
98 | - }); | ||
99 | - } | ||
100 | - /** | ||
101 | - * Poll for a status update. Returns null for an incomplete | ||
102 | - * status, and metadata for a complete status. | ||
103 | - * | ||
104 | - * @private | ||
105 | - */ | ||
106 | - poll_(callback) { | ||
107 | - this.getMetadata((err, body) => { | ||
108 | - if (err || body.error) { | ||
109 | - callback(err || body.error); | ||
110 | - return; | ||
111 | - } | ||
112 | - if (!body.done) { | ||
113 | - callback(null); | ||
114 | - return; | ||
115 | - } | ||
116 | - callback(null, body); | ||
117 | - }); | ||
118 | - } | ||
119 | - /** | ||
120 | - * Poll `getMetadata` to check the operation's status. This runs a loop to | ||
121 | - * ping the API on an interval. | ||
122 | - * | ||
123 | - * Note: This method is automatically called once a "complete" event handler | ||
124 | - * is registered on the operation. | ||
125 | - * | ||
126 | - * @private | ||
127 | - */ | ||
128 | - async startPolling_() { | ||
129 | - if (!this.hasActiveListeners) { | ||
130 | - return; | ||
131 | - } | ||
132 | - try { | ||
133 | - const metadata = await util_1.promisify(this.poll_.bind(this))(); | ||
134 | - if (!metadata) { | ||
135 | - setTimeout(this.startPolling_.bind(this), this.pollIntervalMs || 500); | ||
136 | - return; | ||
137 | - } | ||
138 | - this.emit('complete', metadata); | ||
139 | - } | ||
140 | - catch (err) { | ||
141 | - this.emit('error', err); | ||
142 | - } | ||
143 | - } | ||
144 | -} | ||
145 | -exports.Operation = Operation; | ||
146 | -//# sourceMappingURL=operation.js.map | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -/// <reference types="node" /> | ||
2 | -import { EventEmitter } from 'events'; | ||
3 | -import * as r from 'teeny-request'; | ||
4 | -import { ApiError, BodyResponseCallback, DecorateRequestOptions } from './util'; | ||
5 | -export declare type RequestResponse = [Metadata, r.Response]; | ||
6 | -export interface ServiceObjectParent { | ||
7 | - interceptors: Interceptor[]; | ||
8 | - getRequestInterceptors(): Function[]; | ||
9 | - requestStream(reqOpts: DecorateRequestOptions): r.Request; | ||
10 | - request(reqOpts: DecorateRequestOptions, callback: BodyResponseCallback): void; | ||
11 | -} | ||
12 | -export interface Interceptor { | ||
13 | - request(opts: r.Options): DecorateRequestOptions; | ||
14 | -} | ||
15 | -export declare type GetMetadataOptions = object; | ||
16 | -export declare type Metadata = any; | ||
17 | -export declare type MetadataResponse = [Metadata, r.Response]; | ||
18 | -export declare type MetadataCallback = (err: Error | null, metadata?: Metadata, apiResponse?: r.Response) => void; | ||
19 | -export declare type ExistsOptions = object; | ||
20 | -export interface ExistsCallback { | ||
21 | - (err: Error | null, exists?: boolean): void; | ||
22 | -} | ||
23 | -export interface ServiceObjectConfig { | ||
24 | - /** | ||
25 | - * The base URL to make API requests to. | ||
26 | - */ | ||
27 | - baseUrl?: string; | ||
28 | - /** | ||
29 | - * The method which creates this object. | ||
30 | - */ | ||
31 | - createMethod?: Function; | ||
32 | - /** | ||
33 | - * The identifier of the object. For example, the name of a Storage bucket or | ||
34 | - * Pub/Sub topic. | ||
35 | - */ | ||
36 | - id?: string; | ||
37 | - /** | ||
38 | - * A map of each method name that should be inherited. | ||
39 | - */ | ||
40 | - methods?: Methods; | ||
41 | - /** | ||
42 | - * The parent service instance. For example, an instance of Storage if the | ||
43 | - * object is Bucket. | ||
44 | - */ | ||
45 | - parent: ServiceObjectParent; | ||
46 | - /** | ||
47 | - * For long running operations, how often should the client poll | ||
48 | - * for completion. | ||
49 | - */ | ||
50 | - pollIntervalMs?: number; | ||
51 | -} | ||
52 | -export interface Methods { | ||
53 | - [methodName: string]: { | ||
54 | - reqOpts?: r.CoreOptions; | ||
55 | - } | boolean; | ||
56 | -} | ||
57 | -export interface InstanceResponseCallback<T> { | ||
58 | - (err: ApiError | null, instance?: T | null, apiResponse?: r.Response): void; | ||
59 | -} | ||
60 | -export interface CreateOptions { | ||
61 | -} | ||
62 | -export declare type CreateResponse<T> = any[]; | ||
63 | -export interface CreateCallback<T> { | ||
64 | - (err: ApiError | null, instance?: T | null, ...args: any[]): void; | ||
65 | -} | ||
66 | -export declare type DeleteOptions = { | ||
67 | - ignoreNotFound?: boolean; | ||
68 | -} & object; | ||
69 | -export interface DeleteCallback { | ||
70 | - (err: Error | null, apiResponse?: r.Response): void; | ||
71 | -} | ||
72 | -export interface GetConfig { | ||
73 | - /** | ||
74 | - * Create the object if it doesn't already exist. | ||
75 | - */ | ||
76 | - autoCreate?: boolean; | ||
77 | -} | ||
78 | -declare type GetOrCreateOptions = GetConfig & CreateOptions; | ||
79 | -export declare type GetResponse<T> = [T, r.Response]; | ||
80 | -export interface ResponseCallback { | ||
81 | - (err?: Error | null, apiResponse?: r.Response): void; | ||
82 | -} | ||
83 | -export declare type SetMetadataResponse = [Metadata]; | ||
84 | -export declare type SetMetadataOptions = object; | ||
85 | -/** | ||
86 | - * ServiceObject is a base class, meant to be inherited from by a "service | ||
87 | - * object," like a BigQuery dataset or Storage bucket. | ||
88 | - * | ||
89 | - * Most of the time, these objects share common functionality; they can be | ||
90 | - * created or deleted, and you can get or set their metadata. | ||
91 | - * | ||
92 | - * By inheriting from this class, a service object will be extended with these | ||
93 | - * shared behaviors. Note that any method can be overridden when the service | ||
94 | - * object requires specific behavior. | ||
95 | - */ | ||
96 | -declare class ServiceObject<T = any> extends EventEmitter { | ||
97 | - metadata: Metadata; | ||
98 | - baseUrl?: string; | ||
99 | - parent: ServiceObjectParent; | ||
100 | - id?: string; | ||
101 | - pollIntervalMs?: number; | ||
102 | - private createMethod?; | ||
103 | - protected methods: Methods; | ||
104 | - interceptors: Interceptor[]; | ||
105 | - constructor(config: ServiceObjectConfig); | ||
106 | - /** | ||
107 | - * Create the object. | ||
108 | - * | ||
109 | - * @param {object=} options - Configuration object. | ||
110 | - * @param {function} callback - The callback function. | ||
111 | - * @param {?error} callback.err - An error returned while making this request. | ||
112 | - * @param {object} callback.instance - The instance. | ||
113 | - * @param {object} callback.apiResponse - The full API response. | ||
114 | - */ | ||
115 | - create(options?: CreateOptions): Promise<CreateResponse<T>>; | ||
116 | - create(options: CreateOptions, callback: CreateCallback<T>): void; | ||
117 | - create(callback: CreateCallback<T>): void; | ||
118 | - /** | ||
119 | - * Delete the object. | ||
120 | - * | ||
121 | - * @param {function=} callback - The callback function. | ||
122 | - * @param {?error} callback.err - An error returned while making this request. | ||
123 | - * @param {object} callback.apiResponse - The full API response. | ||
124 | - */ | ||
125 | - delete(options?: DeleteOptions): Promise<[r.Response]>; | ||
126 | - delete(options: DeleteOptions, callback: DeleteCallback): void; | ||
127 | - delete(callback: DeleteCallback): void; | ||
128 | - /** | ||
129 | - * Check if the object exists. | ||
130 | - * | ||
131 | - * @param {function} callback - The callback function. | ||
132 | - * @param {?error} callback.err - An error returned while making this request. | ||
133 | - * @param {boolean} callback.exists - Whether the object exists or not. | ||
134 | - */ | ||
135 | - exists(options?: ExistsOptions): Promise<[boolean]>; | ||
136 | - exists(options: ExistsOptions, callback: ExistsCallback): void; | ||
137 | - exists(callback: ExistsCallback): void; | ||
138 | - /** | ||
139 | - * Get the object if it exists. Optionally have the object created if an | ||
140 | - * options object is provided with `autoCreate: true`. | ||
141 | - * | ||
142 | - * @param {object=} options - The configuration object that will be used to | ||
143 | - * create the object if necessary. | ||
144 | - * @param {boolean} options.autoCreate - Create the object if it doesn't already exist. | ||
145 | - * @param {function} callback - The callback function. | ||
146 | - * @param {?error} callback.err - An error returned while making this request. | ||
147 | - * @param {object} callback.instance - The instance. | ||
148 | - * @param {object} callback.apiResponse - The full API response. | ||
149 | - */ | ||
150 | - get(options?: GetOrCreateOptions): Promise<GetResponse<T>>; | ||
151 | - get(callback: InstanceResponseCallback<T>): void; | ||
152 | - get(options: GetOrCreateOptions, callback: InstanceResponseCallback<T>): void; | ||
153 | - /** | ||
154 | - * Get the metadata of this object. | ||
155 | - * | ||
156 | - * @param {function} callback - The callback function. | ||
157 | - * @param {?error} callback.err - An error returned while making this request. | ||
158 | - * @param {object} callback.metadata - The metadata for this object. | ||
159 | - * @param {object} callback.apiResponse - The full API response. | ||
160 | - */ | ||
161 | - getMetadata(options?: GetMetadataOptions): Promise<MetadataResponse>; | ||
162 | - getMetadata(options: GetMetadataOptions, callback: MetadataCallback): void; | ||
163 | - getMetadata(callback: MetadataCallback): void; | ||
164 | - /** | ||
165 | - * Return the user's custom request interceptors. | ||
166 | - */ | ||
167 | - getRequestInterceptors(): Function[]; | ||
168 | - /** | ||
169 | - * Set the metadata for this object. | ||
170 | - * | ||
171 | - * @param {object} metadata - The metadata to set on this object. | ||
172 | - * @param {object=} options - Configuration options. | ||
173 | - * @param {function=} callback - The callback function. | ||
174 | - * @param {?error} callback.err - An error returned while making this request. | ||
175 | - * @param {object} callback.apiResponse - The full API response. | ||
176 | - */ | ||
177 | - setMetadata(metadata: Metadata, options?: SetMetadataOptions): Promise<SetMetadataResponse>; | ||
178 | - setMetadata(metadata: Metadata, callback: MetadataCallback): void; | ||
179 | - setMetadata(metadata: Metadata, options: SetMetadataOptions, callback: MetadataCallback): void; | ||
180 | - /** | ||
181 | - * Make an authenticated API request. | ||
182 | - * | ||
183 | - * @private | ||
184 | - * | ||
185 | - * @param {object} reqOpts - Request options that are passed to `request`. | ||
186 | - * @param {string} reqOpts.uri - A URI relative to the baseUrl. | ||
187 | - * @param {function} callback - The callback function passed to `request`. | ||
188 | - */ | ||
189 | - private request_; | ||
190 | - /** | ||
191 | - * Make an authenticated API request. | ||
192 | - * | ||
193 | - * @param {object} reqOpts - Request options that are passed to `request`. | ||
194 | - * @param {string} reqOpts.uri - A URI relative to the baseUrl. | ||
195 | - * @param {function} callback - The callback function passed to `request`. | ||
196 | - */ | ||
197 | - request(reqOpts: DecorateRequestOptions): Promise<RequestResponse>; | ||
198 | - request(reqOpts: DecorateRequestOptions, callback: BodyResponseCallback): void; | ||
199 | - /** | ||
200 | - * Make an authenticated API request. | ||
201 | - * | ||
202 | - * @param {object} reqOpts - Request options that are passed to `request`. | ||
203 | - * @param {string} reqOpts.uri - A URI relative to the baseUrl. | ||
204 | - */ | ||
205 | - requestStream(reqOpts: DecorateRequestOptions): r.Request; | ||
206 | -} | ||
207 | -export { ServiceObject }; |
This diff is collapsed. Click to expand it.
1 | -import { GoogleAuth, GoogleAuthOptions } from 'google-auth-library'; | ||
2 | -import * as r from 'teeny-request'; | ||
3 | -import { Interceptor } from './service-object'; | ||
4 | -import { BodyResponseCallback, DecorateRequestOptions, MakeAuthenticatedRequest, PackageJson } from './util'; | ||
5 | -export interface StreamRequestOptions extends DecorateRequestOptions { | ||
6 | - shouldReturnStream: true; | ||
7 | -} | ||
8 | -export interface ServiceConfig { | ||
9 | - /** | ||
10 | - * The base URL to make API requests to. | ||
11 | - */ | ||
12 | - baseUrl: string; | ||
13 | - /** | ||
14 | - * The API Endpoint to use when connecting to the service. | ||
15 | - * Example: storage.googleapis.com | ||
16 | - */ | ||
17 | - apiEndpoint: string; | ||
18 | - /** | ||
19 | - * The scopes required for the request. | ||
20 | - */ | ||
21 | - scopes: string[]; | ||
22 | - projectIdRequired?: boolean; | ||
23 | - packageJson: PackageJson; | ||
24 | - /** | ||
25 | - * Reuse an existing GoogleAuth client instead of creating a new one. | ||
26 | - */ | ||
27 | - authClient?: GoogleAuth; | ||
28 | -} | ||
29 | -export interface ServiceOptions extends GoogleAuthOptions { | ||
30 | - authClient?: GoogleAuth; | ||
31 | - interceptors_?: Interceptor[]; | ||
32 | - email?: string; | ||
33 | - token?: string; | ||
34 | - timeout?: number; | ||
35 | - userAgent?: string; | ||
36 | -} | ||
37 | -export declare class Service { | ||
38 | - baseUrl: string; | ||
39 | - private globalInterceptors; | ||
40 | - interceptors: Interceptor[]; | ||
41 | - private packageJson; | ||
42 | - projectId: string; | ||
43 | - private projectIdRequired; | ||
44 | - providedUserAgent?: string; | ||
45 | - makeAuthenticatedRequest: MakeAuthenticatedRequest; | ||
46 | - authClient: GoogleAuth; | ||
47 | - private getCredentials; | ||
48 | - readonly apiEndpoint: string; | ||
49 | - timeout?: number; | ||
50 | - /** | ||
51 | - * Service is a base class, meant to be inherited from by a "service," like | ||
52 | - * BigQuery or Storage. | ||
53 | - * | ||
54 | - * This handles making authenticated requests by exposing a `makeReq_` | ||
55 | - * function. | ||
56 | - * | ||
57 | - * @constructor | ||
58 | - * @alias module:common/service | ||
59 | - * | ||
60 | - * @param {object} config - Configuration object. | ||
61 | - * @param {string} config.baseUrl - The base URL to make API requests to. | ||
62 | - * @param {string[]} config.scopes - The scopes required for the request. | ||
63 | - * @param {object=} options - [Configuration object](#/docs). | ||
64 | - */ | ||
65 | - constructor(config: ServiceConfig, options?: ServiceOptions); | ||
66 | - /** | ||
67 | - * Return the user's custom request interceptors. | ||
68 | - */ | ||
69 | - getRequestInterceptors(): Function[]; | ||
70 | - /** | ||
71 | - * Get and update the Service's project ID. | ||
72 | - * | ||
73 | - * @param {function} callback - The callback function. | ||
74 | - */ | ||
75 | - getProjectId(): Promise<string>; | ||
76 | - getProjectId(callback: (err: Error | null, projectId?: string) => void): void; | ||
77 | - protected getProjectIdAsync(): Promise<string>; | ||
78 | - /** | ||
79 | - * Make an authenticated API request. | ||
80 | - * | ||
81 | - * @private | ||
82 | - * | ||
83 | - * @param {object} reqOpts - Request options that are passed to `request`. | ||
84 | - * @param {string} reqOpts.uri - A URI relative to the baseUrl. | ||
85 | - * @param {function} callback - The callback function passed to `request`. | ||
86 | - */ | ||
87 | - private request_; | ||
88 | - /** | ||
89 | - * Make an authenticated API request. | ||
90 | - * | ||
91 | - * @param {object} reqOpts - Request options that are passed to `request`. | ||
92 | - * @param {string} reqOpts.uri - A URI relative to the baseUrl. | ||
93 | - * @param {function} callback - The callback function passed to `request`. | ||
94 | - */ | ||
95 | - request(reqOpts: DecorateRequestOptions, callback: BodyResponseCallback): void; | ||
96 | - /** | ||
97 | - * Make an authenticated API request. | ||
98 | - * | ||
99 | - * @param {object} reqOpts - Request options that are passed to `request`. | ||
100 | - * @param {string} reqOpts.uri - A URI relative to the baseUrl. | ||
101 | - */ | ||
102 | - requestStream(reqOpts: DecorateRequestOptions): r.Request; | ||
103 | -} |
1 | -"use strict"; | ||
2 | -// Copyright 2015 Google LLC | ||
3 | -// | ||
4 | -// Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | -// you may not use this file except in compliance with the License. | ||
6 | -// You may obtain a copy of the License at | ||
7 | -// | ||
8 | -// http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | -// | ||
10 | -// Unless required by applicable law or agreed to in writing, software | ||
11 | -// distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | -// See the License for the specific language governing permissions and | ||
14 | -// limitations under the License. | ||
15 | -Object.defineProperty(exports, "__esModule", { value: true }); | ||
16 | -/*! | ||
17 | - * @module common/service | ||
18 | - */ | ||
19 | -const arrify = require("arrify"); | ||
20 | -const extend = require("extend"); | ||
21 | -const util_1 = require("./util"); | ||
22 | -const PROJECT_ID_TOKEN = '{{projectId}}'; | ||
23 | -class Service { | ||
24 | - /** | ||
25 | - * Service is a base class, meant to be inherited from by a "service," like | ||
26 | - * BigQuery or Storage. | ||
27 | - * | ||
28 | - * This handles making authenticated requests by exposing a `makeReq_` | ||
29 | - * function. | ||
30 | - * | ||
31 | - * @constructor | ||
32 | - * @alias module:common/service | ||
33 | - * | ||
34 | - * @param {object} config - Configuration object. | ||
35 | - * @param {string} config.baseUrl - The base URL to make API requests to. | ||
36 | - * @param {string[]} config.scopes - The scopes required for the request. | ||
37 | - * @param {object=} options - [Configuration object](#/docs). | ||
38 | - */ | ||
39 | - constructor(config, options = {}) { | ||
40 | - this.baseUrl = config.baseUrl; | ||
41 | - this.apiEndpoint = config.apiEndpoint; | ||
42 | - this.timeout = options.timeout; | ||
43 | - this.globalInterceptors = arrify(options.interceptors_); | ||
44 | - this.interceptors = []; | ||
45 | - this.packageJson = config.packageJson; | ||
46 | - this.projectId = options.projectId || PROJECT_ID_TOKEN; | ||
47 | - this.projectIdRequired = config.projectIdRequired !== false; | ||
48 | - this.providedUserAgent = options.userAgent; | ||
49 | - const reqCfg = extend({}, config, { | ||
50 | - projectIdRequired: this.projectIdRequired, | ||
51 | - projectId: this.projectId, | ||
52 | - authClient: options.authClient, | ||
53 | - credentials: options.credentials, | ||
54 | - keyFile: options.keyFilename, | ||
55 | - email: options.email, | ||
56 | - token: options.token, | ||
57 | - }); | ||
58 | - this.makeAuthenticatedRequest = util_1.util.makeAuthenticatedRequestFactory(reqCfg); | ||
59 | - this.authClient = this.makeAuthenticatedRequest.authClient; | ||
60 | - this.getCredentials = this.makeAuthenticatedRequest.getCredentials; | ||
61 | - const isCloudFunctionEnv = !!process.env.FUNCTION_NAME; | ||
62 | - if (isCloudFunctionEnv) { | ||
63 | - this.interceptors.push({ | ||
64 | - request(reqOpts) { | ||
65 | - reqOpts.forever = false; | ||
66 | - return reqOpts; | ||
67 | - }, | ||
68 | - }); | ||
69 | - } | ||
70 | - } | ||
71 | - /** | ||
72 | - * Return the user's custom request interceptors. | ||
73 | - */ | ||
74 | - getRequestInterceptors() { | ||
75 | - // Interceptors should be returned in the order they were assigned. | ||
76 | - return [].slice | ||
77 | - .call(this.globalInterceptors) | ||
78 | - .concat(this.interceptors) | ||
79 | - .filter(interceptor => typeof interceptor.request === 'function') | ||
80 | - .map(interceptor => interceptor.request); | ||
81 | - } | ||
82 | - getProjectId(callback) { | ||
83 | - if (!callback) { | ||
84 | - return this.getProjectIdAsync(); | ||
85 | - } | ||
86 | - this.getProjectIdAsync().then(p => callback(null, p), callback); | ||
87 | - } | ||
88 | - async getProjectIdAsync() { | ||
89 | - const projectId = await this.authClient.getProjectId(); | ||
90 | - if (this.projectId === PROJECT_ID_TOKEN && projectId) { | ||
91 | - this.projectId = projectId; | ||
92 | - } | ||
93 | - return this.projectId; | ||
94 | - } | ||
95 | - request_(reqOpts, callback) { | ||
96 | - reqOpts = extend(true, {}, reqOpts, { timeout: this.timeout }); | ||
97 | - const isAbsoluteUrl = reqOpts.uri.indexOf('http') === 0; | ||
98 | - const uriComponents = [this.baseUrl]; | ||
99 | - if (this.projectIdRequired) { | ||
100 | - uriComponents.push('projects'); | ||
101 | - uriComponents.push(this.projectId); | ||
102 | - } | ||
103 | - uriComponents.push(reqOpts.uri); | ||
104 | - if (isAbsoluteUrl) { | ||
105 | - uriComponents.splice(0, uriComponents.indexOf(reqOpts.uri)); | ||
106 | - } | ||
107 | - reqOpts.uri = uriComponents | ||
108 | - .map(uriComponent => { | ||
109 | - const trimSlashesRegex = /^\/*|\/*$/g; | ||
110 | - return uriComponent.replace(trimSlashesRegex, ''); | ||
111 | - }) | ||
112 | - .join('/') | ||
113 | - // Some URIs have colon separators. | ||
114 | - // Bad: https://.../projects/:list | ||
115 | - // Good: https://.../projects:list | ||
116 | - .replace(/\/:/g, ':'); | ||
117 | - const requestInterceptors = this.getRequestInterceptors(); | ||
118 | - arrify(reqOpts.interceptors_).forEach(interceptor => { | ||
119 | - if (typeof interceptor.request === 'function') { | ||
120 | - requestInterceptors.push(interceptor.request); | ||
121 | - } | ||
122 | - }); | ||
123 | - requestInterceptors.forEach(requestInterceptor => { | ||
124 | - reqOpts = requestInterceptor(reqOpts); | ||
125 | - }); | ||
126 | - delete reqOpts.interceptors_; | ||
127 | - const pkg = this.packageJson; | ||
128 | - let userAgent = util_1.util.getUserAgentFromPackageJson(pkg); | ||
129 | - if (this.providedUserAgent) { | ||
130 | - userAgent = `${this.providedUserAgent} ${userAgent}`; | ||
131 | - } | ||
132 | - reqOpts.headers = extend({}, reqOpts.headers, { | ||
133 | - 'User-Agent': userAgent, | ||
134 | - 'x-goog-api-client': `gl-node/${process.versions.node} gccl/${pkg.version}`, | ||
135 | - }); | ||
136 | - if (reqOpts.shouldReturnStream) { | ||
137 | - return this.makeAuthenticatedRequest(reqOpts); | ||
138 | - } | ||
139 | - else { | ||
140 | - this.makeAuthenticatedRequest(reqOpts, callback); | ||
141 | - } | ||
142 | - } | ||
143 | - /** | ||
144 | - * Make an authenticated API request. | ||
145 | - * | ||
146 | - * @param {object} reqOpts - Request options that are passed to `request`. | ||
147 | - * @param {string} reqOpts.uri - A URI relative to the baseUrl. | ||
148 | - * @param {function} callback - The callback function passed to `request`. | ||
149 | - */ | ||
150 | - request(reqOpts, callback) { | ||
151 | - Service.prototype.request_.call(this, reqOpts, callback); | ||
152 | - } | ||
153 | - /** | ||
154 | - * Make an authenticated API request. | ||
155 | - * | ||
156 | - * @param {object} reqOpts - Request options that are passed to `request`. | ||
157 | - * @param {string} reqOpts.uri - A URI relative to the baseUrl. | ||
158 | - */ | ||
159 | - requestStream(reqOpts) { | ||
160 | - const opts = extend(true, reqOpts, { shouldReturnStream: true }); | ||
161 | - return Service.prototype.request_.call(this, opts); | ||
162 | - } | ||
163 | -} | ||
164 | -exports.Service = Service; | ||
165 | -//# sourceMappingURL=service.js.map | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 | -{ | ||
2 | - "_from": "@google-cloud/common@^3.0.0", | ||
3 | - "_id": "@google-cloud/common@3.6.0", | ||
4 | - "_inBundle": false, | ||
5 | - "_integrity": "sha512-aHIFTqJZmeTNO9md8XxV+ywuvXF3xBm5WNmgWeeCK+XN5X+kGW0WEX94wGwj+/MdOnrVf4dL2RvSIt9J5yJG6Q==", | ||
6 | - "_location": "/@google-cloud/common", | ||
7 | - "_phantomChildren": {}, | ||
8 | - "_requested": { | ||
9 | - "type": "range", | ||
10 | - "registry": true, | ||
11 | - "raw": "@google-cloud/common@^3.0.0", | ||
12 | - "name": "@google-cloud/common", | ||
13 | - "escapedName": "@google-cloud%2fcommon", | ||
14 | - "scope": "@google-cloud", | ||
15 | - "rawSpec": "^3.0.0", | ||
16 | - "saveSpec": null, | ||
17 | - "fetchSpec": "^3.0.0" | ||
18 | - }, | ||
19 | - "_requiredBy": [ | ||
20 | - "/@google-cloud/speech" | ||
21 | - ], | ||
22 | - "_resolved": "https://registry.npmjs.org/@google-cloud/common/-/common-3.6.0.tgz", | ||
23 | - "_shasum": "c2f6da5f79279a4a9ac7c71fc02d582beab98e8b", | ||
24 | - "_spec": "@google-cloud/common@^3.0.0", | ||
25 | - "_where": "C:\\Users\\1000c\\이것저것\\옾소\\Voicoding\\node_modules\\@google-cloud\\speech", | ||
26 | - "author": { | ||
27 | - "name": "Google Inc." | ||
28 | - }, | ||
29 | - "bugs": { | ||
30 | - "url": "https://github.com/googleapis/nodejs-common/issues" | ||
31 | - }, | ||
32 | - "bundleDependencies": false, | ||
33 | - "dependencies": { | ||
34 | - "@google-cloud/projectify": "^2.0.0", | ||
35 | - "@google-cloud/promisify": "^2.0.0", | ||
36 | - "arrify": "^2.0.1", | ||
37 | - "duplexify": "^4.1.1", | ||
38 | - "ent": "^2.2.0", | ||
39 | - "extend": "^3.0.2", | ||
40 | - "google-auth-library": "^7.0.2", | ||
41 | - "retry-request": "^4.1.1", | ||
42 | - "teeny-request": "^7.0.0" | ||
43 | - }, | ||
44 | - "deprecated": false, | ||
45 | - "description": "Common components for Cloud APIs Node.js Client Libraries", | ||
46 | - "devDependencies": { | ||
47 | - "@compodoc/compodoc": "^1.1.11", | ||
48 | - "@microsoft/api-documenter": "^7.8.10", | ||
49 | - "@microsoft/api-extractor": "^7.8.10", | ||
50 | - "@types/ent": "^2.2.1", | ||
51 | - "@types/extend": "^3.0.1", | ||
52 | - "@types/mocha": "^8.0.0", | ||
53 | - "@types/mv": "^2.1.0", | ||
54 | - "@types/ncp": "^2.0.3", | ||
55 | - "@types/node": "^12.12.31", | ||
56 | - "@types/proxyquire": "^1.3.28", | ||
57 | - "@types/request": "^2.48.4", | ||
58 | - "@types/sinon": "^9.0.0", | ||
59 | - "@types/tmp": "0.2.0", | ||
60 | - "c8": "^7.1.0", | ||
61 | - "codecov": "^3.6.5", | ||
62 | - "gts": "^2.0.0", | ||
63 | - "linkinator": "^2.0.4", | ||
64 | - "mocha": "^8.0.0", | ||
65 | - "mv": "^2.1.1", | ||
66 | - "ncp": "^2.0.0", | ||
67 | - "nock": "^13.0.0", | ||
68 | - "proxyquire": "^2.1.3", | ||
69 | - "sinon": "^9.0.1", | ||
70 | - "tmp": "0.2.1", | ||
71 | - "typescript": "~3.8.3" | ||
72 | - }, | ||
73 | - "engines": { | ||
74 | - "node": ">=10" | ||
75 | - }, | ||
76 | - "files": [ | ||
77 | - "build/src", | ||
78 | - "!build/src/**/*.map" | ||
79 | - ], | ||
80 | - "homepage": "https://github.com/googleapis/nodejs-common#readme", | ||
81 | - "license": "Apache-2.0", | ||
82 | - "main": "./build/src/index.js", | ||
83 | - "name": "@google-cloud/common", | ||
84 | - "repository": { | ||
85 | - "type": "git", | ||
86 | - "url": "git+https://github.com/googleapis/nodejs-common.git" | ||
87 | - }, | ||
88 | - "scripts": { | ||
89 | - "api-documenter": "api-documenter yaml --input-folder=temp", | ||
90 | - "api-extractor": "api-extractor run --local", | ||
91 | - "clean": "gts clean", | ||
92 | - "compile": "tsc -p .", | ||
93 | - "docs": "compodoc src/", | ||
94 | - "docs-test": "linkinator docs", | ||
95 | - "fix": "gts fix", | ||
96 | - "lint": "gts check", | ||
97 | - "precompile": "gts clean", | ||
98 | - "predocs-test": "npm run docs", | ||
99 | - "prelint": "cd samples; npm link ../; npm install", | ||
100 | - "prepare": "npm run compile", | ||
101 | - "presystem-test": "npm run compile", | ||
102 | - "pretest": "npm run compile", | ||
103 | - "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", | ||
104 | - "system-test": "mocha build/system-test", | ||
105 | - "test": "c8 mocha build/test" | ||
106 | - }, | ||
107 | - "types": "./build/src/index.d.ts", | ||
108 | - "version": "3.6.0" | ||
109 | -} |
1 | -# Changelog | ||
2 | - | ||
3 | -[npm history][1] | ||
4 | - | ||
5 | -[1]: https://www.npmjs.com/package/@google-cloud/projectify?activeTab=versions | ||
6 | -### [2.0.1](https://www.github.com/googleapis/nodejs-projectify/compare/v2.0.0...v2.0.1) (2020-07-06) | ||
7 | - | ||
8 | - | ||
9 | -### Bug Fixes | ||
10 | - | ||
11 | -* update node issue template ([#197](https://www.github.com/googleapis/nodejs-projectify/issues/197)) ([3406f2a](https://www.github.com/googleapis/nodejs-projectify/commit/3406f2aa431ed04541585b63c330c04270c602aa)) | ||
12 | - | ||
13 | -## [2.0.0](https://www.github.com/googleapis/nodejs-projectify/compare/v1.0.4...v2.0.0) (2020-03-24) | ||
14 | - | ||
15 | - | ||
16 | -### ⚠ BREAKING CHANGES | ||
17 | - | ||
18 | -* typescript@3.7 introduced some breaking changes | ||
19 | -* drop Node 8 from engines field (#172) | ||
20 | - | ||
21 | -### Features | ||
22 | - | ||
23 | -* drop Node 8 from engines field ([#172](https://www.github.com/googleapis/nodejs-projectify/issues/172)) ([3eac424](https://www.github.com/googleapis/nodejs-projectify/commit/3eac424bfb1ee47144a77888dc68db687988945e)) | ||
24 | - | ||
25 | - | ||
26 | -### Build System | ||
27 | - | ||
28 | -* update to latest version of gts/typescript ([#171](https://www.github.com/googleapis/nodejs-projectify/issues/171)) ([30f90cc](https://www.github.com/googleapis/nodejs-projectify/commit/30f90cc172da6ed9394da91869556bf5eef42434)) | ||
29 | - | ||
30 | -### [1.0.4](https://www.github.com/googleapis/nodejs-projectify/compare/v1.0.3...v1.0.4) (2019-12-05) | ||
31 | - | ||
32 | - | ||
33 | -### Bug Fixes | ||
34 | - | ||
35 | -* **publish:** publication failed to reach npm ([#141](https://www.github.com/googleapis/nodejs-projectify/issues/141)) ([5406ba5](https://www.github.com/googleapis/nodejs-projectify/commit/5406ba5e1d43a228a19072023c1baebce34190af)) | ||
36 | - | ||
37 | -### [1.0.3](https://www.github.com/googleapis/nodejs-projectify/compare/v1.0.2...v1.0.3) (2019-12-05) | ||
38 | - | ||
39 | - | ||
40 | -### Bug Fixes | ||
41 | - | ||
42 | -* **deps:** pin TypeScript below 3.7.0 ([6c95307](https://www.github.com/googleapis/nodejs-projectify/commit/6c953070139a77d30c4ce5b7dee1443874046906)) | ||
43 | - | ||
44 | -### [1.0.2](https://www.github.com/googleapis/nodejs-projectify/compare/v1.0.1...v1.0.2) (2019-11-14) | ||
45 | - | ||
46 | - | ||
47 | -### Bug Fixes | ||
48 | - | ||
49 | -* **docs:** add jsdoc-region-tag plugin ([#135](https://www.github.com/googleapis/nodejs-projectify/issues/135)) ([59301e7](https://www.github.com/googleapis/nodejs-projectify/commit/59301e7cfa855add4894dd9c46870e61fffa7413)) | ||
50 | - | ||
51 | -### [1.0.1](https://www.github.com/googleapis/nodejs-projectify/compare/v1.0.0...v1.0.1) (2019-06-26) | ||
52 | - | ||
53 | - | ||
54 | -### Bug Fixes | ||
55 | - | ||
56 | -* **docs:** link to reference docs section on googleapis.dev ([#119](https://www.github.com/googleapis/nodejs-projectify/issues/119)) ([90a009f](https://www.github.com/googleapis/nodejs-projectify/commit/90a009f)) | ||
57 | - | ||
58 | -## [1.0.0](https://www.github.com/googleapis/nodejs-projectify/compare/v0.3.3...v1.0.0) (2019-05-02) | ||
59 | - | ||
60 | - | ||
61 | -### Build System | ||
62 | - | ||
63 | -* upgrade engines field to >=8.10.0 ([#103](https://www.github.com/googleapis/nodejs-projectify/issues/103)) ([0149650](https://www.github.com/googleapis/nodejs-projectify/commit/0149650)) | ||
64 | - | ||
65 | - | ||
66 | -### BREAKING CHANGES | ||
67 | - | ||
68 | -* upgrade engines field to >=8.10.0 (#103) | ||
69 | - | ||
70 | -## v0.3.3 | ||
71 | - | ||
72 | -03-12-2019 12:27 PDT | ||
73 | - | ||
74 | -This patch release contains a few updates to the docs. That's all! | ||
75 | - | ||
76 | -### Documentation | ||
77 | -- docs: update links in contrib guide ([#86](https://github.com/googleapis/nodejs-projectify/pull/86)) | ||
78 | -- docs: update contributing path in README ([#82](https://github.com/googleapis/nodejs-projectify/pull/82)) | ||
79 | -- docs: move CONTRIBUTING.md to root ([#81](https://github.com/googleapis/nodejs-projectify/pull/81)) | ||
80 | -- docs: add lint/fix example to contributing guide ([#79](https://github.com/googleapis/nodejs-projectify/pull/79)) | ||
81 | - | ||
82 | -### Internal / Testing Changes | ||
83 | -- build: Add docuploader credentials to node publish jobs ([#90](https://github.com/googleapis/nodejs-projectify/pull/90)) | ||
84 | -- build: use node10 to run samples-test, system-test etc ([#89](https://github.com/googleapis/nodejs-projectify/pull/89)) | ||
85 | -- build: update release configuration | ||
86 | -- chore(deps): update dependency mocha to v6 | ||
87 | -- build: use linkinator for docs test ([#85](https://github.com/googleapis/nodejs-projectify/pull/85)) | ||
88 | -- build: create docs test npm scripts ([#84](https://github.com/googleapis/nodejs-projectify/pull/84)) | ||
89 | -- build: test using @grpc/grpc-js in CI ([#83](https://github.com/googleapis/nodejs-projectify/pull/83)) | ||
90 | -- build: ignore googleapis.com in doc link check ([#78](https://github.com/googleapis/nodejs-projectify/pull/78)) | ||
91 | -- build: check for 404s in the docs ([#77](https://github.com/googleapis/nodejs-projectify/pull/77)) | ||
92 | -- chore(build): inject yoshi automation key ([#75](https://github.com/googleapis/nodejs-projectify/pull/75)) | ||
93 | -- chore: update nyc and eslint configs ([#74](https://github.com/googleapis/nodejs-projectify/pull/74)) | ||
94 | -- chore: fix publish.sh permission +x ([#72](https://github.com/googleapis/nodejs-projectify/pull/72)) | ||
95 | -- fix(build): fix Kokoro release script ([#71](https://github.com/googleapis/nodejs-projectify/pull/71)) | ||
96 | -- build: add Kokoro configs for autorelease ([#70](https://github.com/googleapis/nodejs-projectify/pull/70)) | ||
97 | -- chore: always nyc report before calling codecov ([#67](https://github.com/googleapis/nodejs-projectify/pull/67)) | ||
98 | -- chore: nyc ignore build/test by default ([#66](https://github.com/googleapis/nodejs-projectify/pull/66)) | ||
99 | -- chore(build): update prettier config ([#64](https://github.com/googleapis/nodejs-projectify/pull/64)) | ||
100 | -- chore: update license file ([#63](https://github.com/googleapis/nodejs-projectify/pull/63)) | ||
101 | -- fix(build): fix system key decryption ([#59](https://github.com/googleapis/nodejs-projectify/pull/59)) | ||
102 | -- chore: add synth.metadata | ||
103 | - | ||
104 | -## v0.3.2 | ||
105 | - | ||
106 | -### Bug fixes | ||
107 | -- fix: do not replace projectId on stream objects ([#53](https://github.com/googleapis/nodejs-projectify/pull/53)) | ||
108 | - | ||
109 | -### Dependencies | ||
110 | -- chore(deps): update dependency gts to ^0.9.0 ([#52](https://github.com/googleapis/nodejs-projectify/pull/52)) | ||
111 | - | ||
112 | -### Internal / Testing Changes | ||
113 | -- chore: update eslintignore config ([#51](https://github.com/googleapis/nodejs-projectify/pull/51)) | ||
114 | -- chore: use latest npm on Windows ([#50](https://github.com/googleapis/nodejs-projectify/pull/50)) | ||
115 | -- chore: update CircleCI config ([#49](https://github.com/googleapis/nodejs-projectify/pull/49)) | ||
116 | -- chore: include build in eslintignore ([#46](https://github.com/googleapis/nodejs-projectify/pull/46)) | ||
117 | - | ||
118 | -## v0.3.1 | ||
119 | - | ||
120 | -### Implementation Changes | ||
121 | -- fix: replaceProjectId should not fail when passed a Buffer ([#43](https://github.com/googleapis/nodejs-projectify/pull/43)) | ||
122 | - | ||
123 | -### Dependencies | ||
124 | -- chore(deps): update dependency nyc to v13 ([#13](https://github.com/googleapis/nodejs-projectify/pull/13)) | ||
125 | -- chore(deps): lock file maintenance ([#11](https://github.com/googleapis/nodejs-projectify/pull/11)) | ||
126 | -- chore(deps): lock file maintenance ([#8](https://github.com/googleapis/nodejs-projectify/pull/8)) | ||
127 | -- chore(deps): update dependency typescript to v3 ([#7](https://github.com/googleapis/nodejs-projectify/pull/7)) | ||
128 | -- chore(deps): update dependency gts to ^0.8.0 ([#2](https://github.com/googleapis/nodejs-projectify/pull/2)) | ||
129 | -- chore(deps): lock file maintenance ([#4](https://github.com/googleapis/nodejs-projectify/pull/4)) | ||
130 | -- chore(deps): lock file maintenance ([#3](https://github.com/googleapis/nodejs-projectify/pull/3)) | ||
131 | - | ||
132 | -### Internal / Testing Changes | ||
133 | -- chore: update issue templates ([#40](https://github.com/googleapis/nodejs-projectify/pull/40)) | ||
134 | -- chore: remove old issue template ([#38](https://github.com/googleapis/nodejs-projectify/pull/38)) | ||
135 | -- build: run tests on node11 ([#37](https://github.com/googleapis/nodejs-projectify/pull/37)) | ||
136 | -- chores(build): run codecov on continuous builds ([#34](https://github.com/googleapis/nodejs-projectify/pull/34)) | ||
137 | -- chores(build): do not collect sponge.xml from windows builds ([#35](https://github.com/googleapis/nodejs-projectify/pull/35)) | ||
138 | -- chore: update new issue template ([#33](https://github.com/googleapis/nodejs-projectify/pull/33)) | ||
139 | -- build: fix codecov uploading on Kokoro ([#30](https://github.com/googleapis/nodejs-projectify/pull/30)) | ||
140 | -- Update kokoro config ([#28](https://github.com/googleapis/nodejs-projectify/pull/28)) | ||
141 | -- Update CI config ([#26](https://github.com/googleapis/nodejs-projectify/pull/26)) | ||
142 | -- Don't publish sourcemaps ([#24](https://github.com/googleapis/nodejs-projectify/pull/24)) | ||
143 | -- build: prevent system/sample-test from leaking credentials | ||
144 | -- Update kokoro config ([#22](https://github.com/googleapis/nodejs-projectify/pull/22)) | ||
145 | -- test: remove appveyor config ([#21](https://github.com/googleapis/nodejs-projectify/pull/21)) | ||
146 | -- Update CI config ([#20](https://github.com/googleapis/nodejs-projectify/pull/20)) | ||
147 | -- Enable prefer-const in the eslint config ([#19](https://github.com/googleapis/nodejs-projectify/pull/19)) | ||
148 | -- Enable no-var in eslint ([#18](https://github.com/googleapis/nodejs-projectify/pull/18)) | ||
149 | -- Update CI config ([#17](https://github.com/googleapis/nodejs-projectify/pull/17)) | ||
150 | -- Add synth and update CI config ([#15](https://github.com/googleapis/nodejs-projectify/pull/15)) | ||
151 | -- chore: ignore package-lock.json ([#12](https://github.com/googleapis/nodejs-projectify/pull/12)) | ||
152 | -- chore: update renovate config ([#10](https://github.com/googleapis/nodejs-projectify/pull/10)) | ||
153 | -- remove that whitespace ([#9](https://github.com/googleapis/nodejs-projectify/pull/9)) | ||
154 | -- chore: assert.deelEqual => assert.deepStrictEqual ([#6](https://github.com/googleapis/nodejs-projectify/pull/6)) | ||
155 | -- chore: move mocha options to mocha.opts ([#5](https://github.com/googleapis/nodejs-projectify/pull/5)) |
This diff is collapsed. Click to expand it.
1 | -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
2 | -[//]: # "To regenerate it, use `python -m synthtool`." | ||
3 | -<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/> | ||
4 | - | ||
5 | -# [Google Cloud Common Projectify: Node.js Client](https://github.com/googleapis/nodejs-projectify) | ||
6 | - | ||
7 | -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) | ||
8 | -[![npm version](https://img.shields.io/npm/v/@google-cloud/projectify.svg)](https://www.npmjs.org/package/@google-cloud/projectify) | ||
9 | -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-projectify/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-projectify) | ||
10 | - | ||
11 | - | ||
12 | - | ||
13 | - | ||
14 | -A simple utility for replacing the projectid token in objects. | ||
15 | - | ||
16 | - | ||
17 | - | ||
18 | - | ||
19 | -* [github.com/googleapis/nodejs-projectify](https://github.com/googleapis/nodejs-projectify) | ||
20 | - | ||
21 | -Read more about the client libraries for Cloud APIs, including the older | ||
22 | -Google APIs Client Libraries, in [Client Libraries Explained][explained]. | ||
23 | - | ||
24 | -[explained]: https://cloud.google.com/apis/docs/client-libraries-explained | ||
25 | - | ||
26 | -**Table of contents:** | ||
27 | - | ||
28 | - | ||
29 | -* [Quickstart](#quickstart) | ||
30 | - | ||
31 | - * [Installing the client library](#installing-the-client-library) | ||
32 | - * [Using the client library](#using-the-client-library) | ||
33 | -* [Samples](#samples) | ||
34 | -* [Versioning](#versioning) | ||
35 | -* [Contributing](#contributing) | ||
36 | -* [License](#license) | ||
37 | - | ||
38 | -## Quickstart | ||
39 | - | ||
40 | -### Installing the client library | ||
41 | - | ||
42 | -```bash | ||
43 | -npm install @google-cloud/projectify | ||
44 | -``` | ||
45 | - | ||
46 | - | ||
47 | -### Using the client library | ||
48 | - | ||
49 | -```javascript | ||
50 | -const {replaceProjectIdToken} = require('@google-cloud/projectify'); | ||
51 | -const options = { | ||
52 | - projectId: '{{projectId}}', | ||
53 | -}; | ||
54 | -replaceProjectIdToken(options, 'fake-project-id'); | ||
55 | - | ||
56 | -``` | ||
57 | - | ||
58 | - | ||
59 | - | ||
60 | -## Samples | ||
61 | - | ||
62 | -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-projectify/tree/master/samples) directory. The samples' `README.md` | ||
63 | -has instructions for running the samples. | ||
64 | - | ||
65 | -| Sample | Source Code | Try it | | ||
66 | -| --------------------------- | --------------------------------- | ------ | | ||
67 | -| Quickstart | [source code](https://github.com/googleapis/nodejs-projectify/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-projectify&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | ||
68 | - | ||
69 | - | ||
70 | - | ||
71 | -## Supported Node.js Versions | ||
72 | - | ||
73 | -Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). | ||
74 | -Libraries are compatible with all current _active_ and _maintenance_ versions of | ||
75 | -Node.js. | ||
76 | - | ||
77 | -Client libraries targetting some end-of-life versions of Node.js are available, and | ||
78 | -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). | ||
79 | -The dist-tags follow the naming convention `legacy-(version)`. | ||
80 | - | ||
81 | -_Legacy Node.js versions are supported as a best effort:_ | ||
82 | - | ||
83 | -* Legacy versions will not be tested in continuous integration. | ||
84 | -* Some security patches may not be able to be backported. | ||
85 | -* Dependencies will not be kept up-to-date, and features will not be backported. | ||
86 | - | ||
87 | -#### Legacy tags available | ||
88 | - | ||
89 | -* `legacy-8`: install client libraries from this dist-tag for versions | ||
90 | - compatible with Node.js 8. | ||
91 | - | ||
92 | -## Versioning | ||
93 | - | ||
94 | -This library follows [Semantic Versioning](http://semver.org/). | ||
95 | - | ||
96 | - | ||
97 | -This library is considered to be **General Availability (GA)**. This means it | ||
98 | -is stable; the code surface will not change in backwards-incompatible ways | ||
99 | -unless absolutely necessary (e.g. because of critical security issues) or with | ||
100 | -an extensive deprecation period. Issues and requests against **GA** libraries | ||
101 | -are addressed with the highest priority. | ||
102 | - | ||
103 | - | ||
104 | - | ||
105 | - | ||
106 | - | ||
107 | -More Information: [Google Cloud Platform Launch Stages][launch_stages] | ||
108 | - | ||
109 | -[launch_stages]: https://cloud.google.com/terms/launch-stages | ||
110 | - | ||
111 | -## Contributing | ||
112 | - | ||
113 | -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-projectify/blob/master/CONTRIBUTING.md). | ||
114 | - | ||
115 | -Please note that this `README.md`, the `samples/README.md`, | ||
116 | -and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) | ||
117 | -are generated from a central template. To edit one of these files, make an edit | ||
118 | -to its template in this | ||
119 | -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). | ||
120 | - | ||
121 | -## License | ||
122 | - | ||
123 | -Apache Version 2.0 | ||
124 | - | ||
125 | -See [LICENSE](https://github.com/googleapis/nodejs-projectify/blob/master/LICENSE) | ||
126 | - | ||
127 | - | ||
128 | - | ||
129 | -[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png | ||
130 | -[projects]: https://console.cloud.google.com/project | ||
131 | -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing | ||
132 | - | ||
133 | -[auth]: https://cloud.google.com/docs/authentication/getting-started |
1 | -/** | ||
2 | - * Populate the `{{projectId}}` placeholder. | ||
3 | - * | ||
4 | - * @throws {Error} If a projectId is required, but one is not provided. | ||
5 | - * | ||
6 | - * @param {*} - Any input value that may contain a placeholder. Arrays and objects will be looped. | ||
7 | - * @param {string} projectId - A projectId. If not provided | ||
8 | - * @return {*} - The original argument with all placeholders populated. | ||
9 | - */ | ||
10 | -export declare function replaceProjectIdToken(value: any, projectId: string): any; | ||
11 | -/** | ||
12 | - * Custom error type for missing project ID errors. | ||
13 | - */ | ||
14 | -export declare class MissingProjectIdError extends Error { | ||
15 | - message: string; | ||
16 | -} |
1 | -"use strict"; | ||
2 | -Object.defineProperty(exports, "__esModule", { value: true }); | ||
3 | -const stream_1 = require("stream"); | ||
4 | -// Copyright 2014 Google LLC | ||
5 | -// | ||
6 | -// Licensed under the Apache License, Version 2.0 (the "License"); | ||
7 | -// you may not use this file except in compliance with the License. | ||
8 | -// You may obtain a copy of the License at | ||
9 | -// | ||
10 | -// http://www.apache.org/licenses/LICENSE-2.0 | ||
11 | -// | ||
12 | -// Unless required by applicable law or agreed to in writing, software | ||
13 | -// distributed under the License is distributed on an "AS IS" BASIS, | ||
14 | -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
15 | -// See the License for the specific language governing permissions and | ||
16 | -// limitations under the License. | ||
17 | -/** | ||
18 | - * Populate the `{{projectId}}` placeholder. | ||
19 | - * | ||
20 | - * @throws {Error} If a projectId is required, but one is not provided. | ||
21 | - * | ||
22 | - * @param {*} - Any input value that may contain a placeholder. Arrays and objects will be looped. | ||
23 | - * @param {string} projectId - A projectId. If not provided | ||
24 | - * @return {*} - The original argument with all placeholders populated. | ||
25 | - */ | ||
26 | -// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
27 | -function replaceProjectIdToken(value, projectId) { | ||
28 | - if (Array.isArray(value)) { | ||
29 | - value = value.map(v => replaceProjectIdToken(v, projectId)); | ||
30 | - } | ||
31 | - if (value !== null && | ||
32 | - typeof value === 'object' && | ||
33 | - !(value instanceof Buffer) && | ||
34 | - !(value instanceof stream_1.Stream) && | ||
35 | - typeof value.hasOwnProperty === 'function') { | ||
36 | - for (const opt in value) { | ||
37 | - // eslint-disable-next-line no-prototype-builtins | ||
38 | - if (value.hasOwnProperty(opt)) { | ||
39 | - value[opt] = replaceProjectIdToken(value[opt], projectId); | ||
40 | - } | ||
41 | - } | ||
42 | - } | ||
43 | - if (typeof value === 'string' && | ||
44 | - value.indexOf('{{projectId}}') > -1) { | ||
45 | - if (!projectId || projectId === '{{projectId}}') { | ||
46 | - throw new MissingProjectIdError(); | ||
47 | - } | ||
48 | - value = value.replace(/{{projectId}}/g, projectId); | ||
49 | - } | ||
50 | - return value; | ||
51 | -} | ||
52 | -exports.replaceProjectIdToken = replaceProjectIdToken; | ||
53 | -/** | ||
54 | - * Custom error type for missing project ID errors. | ||
55 | - */ | ||
56 | -class MissingProjectIdError extends Error { | ||
57 | - constructor() { | ||
58 | - super(...arguments); | ||
59 | - this.message = `Sorry, we cannot connect to Cloud Services without a project | ||
60 | - ID. You may specify one with an environment variable named | ||
61 | - "GOOGLE_CLOUD_PROJECT".`.replace(/ +/g, ' '); | ||
62 | - } | ||
63 | -} | ||
64 | -exports.MissingProjectIdError = MissingProjectIdError; | ||
65 | -//# sourceMappingURL=index.js.map | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -{ | ||
2 | - "_from": "@google-cloud/projectify@^2.0.0", | ||
3 | - "_id": "@google-cloud/projectify@2.0.1", | ||
4 | - "_inBundle": false, | ||
5 | - "_integrity": "sha512-ZDG38U/Yy6Zr21LaR3BTiiLtpJl6RkPS/JwoRT453G+6Q1DhlV0waNf8Lfu+YVYGIIxgKnLayJRfYlFJfiI8iQ==", | ||
6 | - "_location": "/@google-cloud/projectify", | ||
7 | - "_phantomChildren": {}, | ||
8 | - "_requested": { | ||
9 | - "type": "range", | ||
10 | - "registry": true, | ||
11 | - "raw": "@google-cloud/projectify@^2.0.0", | ||
12 | - "name": "@google-cloud/projectify", | ||
13 | - "escapedName": "@google-cloud%2fprojectify", | ||
14 | - "scope": "@google-cloud", | ||
15 | - "rawSpec": "^2.0.0", | ||
16 | - "saveSpec": null, | ||
17 | - "fetchSpec": "^2.0.0" | ||
18 | - }, | ||
19 | - "_requiredBy": [ | ||
20 | - "/@google-cloud/common" | ||
21 | - ], | ||
22 | - "_resolved": "https://registry.npmjs.org/@google-cloud/projectify/-/projectify-2.0.1.tgz", | ||
23 | - "_shasum": "13350ee609346435c795bbfe133a08dfeab78d65", | ||
24 | - "_spec": "@google-cloud/projectify@^2.0.0", | ||
25 | - "_where": "C:\\Users\\1000c\\이것저것\\옾소\\Voicoding\\node_modules\\@google-cloud\\common", | ||
26 | - "author": { | ||
27 | - "name": "Google Inc." | ||
28 | - }, | ||
29 | - "bugs": { | ||
30 | - "url": "https://github.com/googleapis/nodejs-projectify/issues" | ||
31 | - }, | ||
32 | - "bundleDependencies": false, | ||
33 | - "deprecated": false, | ||
34 | - "description": "A simple utility for replacing the projectid token in objects.", | ||
35 | - "devDependencies": { | ||
36 | - "@compodoc/compodoc": "^1.1.11", | ||
37 | - "@types/mocha": "^7.0.2", | ||
38 | - "@types/node": "^10.17.17", | ||
39 | - "c8": "^7.1.0", | ||
40 | - "codecov": "^3.6.5", | ||
41 | - "gts": "^2.0.0", | ||
42 | - "linkinator": "^2.0.4", | ||
43 | - "mocha": "^8.0.0", | ||
44 | - "typescript": "3.8.3" | ||
45 | - }, | ||
46 | - "engines": { | ||
47 | - "node": ">=10" | ||
48 | - }, | ||
49 | - "files": [ | ||
50 | - "build/src", | ||
51 | - "!build/src/**/*.map" | ||
52 | - ], | ||
53 | - "homepage": "https://github.com/googleapis/nodejs-projectify#readme", | ||
54 | - "keywords": [], | ||
55 | - "license": "Apache-2.0", | ||
56 | - "main": "build/src/index.js", | ||
57 | - "name": "@google-cloud/projectify", | ||
58 | - "repository": { | ||
59 | - "type": "git", | ||
60 | - "url": "git+https://github.com/googleapis/nodejs-projectify.git" | ||
61 | - }, | ||
62 | - "scripts": { | ||
63 | - "clean": "gts clean", | ||
64 | - "compile": "tsc -p .", | ||
65 | - "docs": "compodoc src/", | ||
66 | - "docs-test": "linkinator docs", | ||
67 | - "fix": "gts fix", | ||
68 | - "lint": "gts check", | ||
69 | - "precompile": "gts clean", | ||
70 | - "predocs-test": "npm run docs", | ||
71 | - "prelint": "cd samples; npm link ../; npm install", | ||
72 | - "prepare": "npm run compile", | ||
73 | - "presystem-test": "npm run compile", | ||
74 | - "pretest": "npm run compile", | ||
75 | - "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", | ||
76 | - "system-test": "mocha build/system-test", | ||
77 | - "test": "c8 mocha build/test" | ||
78 | - }, | ||
79 | - "types": "build/src/index.d.ts", | ||
80 | - "version": "2.0.1" | ||
81 | -} |
1 | -# Changelog | ||
2 | - | ||
3 | -[npm history][1] | ||
4 | - | ||
5 | -[1]: https://www.npmjs.com/package/nodejs-promisify?activeTab=versions | ||
6 | - | ||
7 | -### [2.0.3](https://www.github.com/googleapis/nodejs-promisify/compare/v2.0.2...v2.0.3) (2020-09-04) | ||
8 | - | ||
9 | - | ||
10 | -### Bug Fixes | ||
11 | - | ||
12 | -* allow excluding accessor methods ([#228](https://www.github.com/googleapis/nodejs-promisify/issues/228)) ([114d8bc](https://www.github.com/googleapis/nodejs-promisify/commit/114d8bcef7093bdfda195a15e0c2f376195fd3fc)) | ||
13 | - | ||
14 | -### [2.0.2](https://www.github.com/googleapis/nodejs-promisify/compare/v2.0.1...v2.0.2) (2020-07-06) | ||
15 | - | ||
16 | - | ||
17 | -### Bug Fixes | ||
18 | - | ||
19 | -* update node issue template ([#204](https://www.github.com/googleapis/nodejs-promisify/issues/204)) ([a2ba8d8](https://www.github.com/googleapis/nodejs-promisify/commit/a2ba8d8e45ef03d093d987292a467696745fc9fd)) | ||
20 | - | ||
21 | -### [2.0.1](https://www.github.com/googleapis/nodejs-promisify/compare/v2.0.0...v2.0.1) (2020-05-08) | ||
22 | - | ||
23 | - | ||
24 | -### Bug Fixes | ||
25 | - | ||
26 | -* apache license URL ([#468](https://www.github.com/googleapis/nodejs-promisify/issues/468)) ([#191](https://www.github.com/googleapis/nodejs-promisify/issues/191)) ([0edc724](https://www.github.com/googleapis/nodejs-promisify/commit/0edc7246c53d25d9dd220b813561bcee97250783)) | ||
27 | - | ||
28 | -## [2.0.0](https://www.github.com/googleapis/nodejs-promisify/compare/v1.0.4...v2.0.0) (2020-03-23) | ||
29 | - | ||
30 | - | ||
31 | -### ⚠ BREAKING CHANGES | ||
32 | - | ||
33 | -* update to latest version of gts/typescript (#183) | ||
34 | -* drop Node 8 from engines field (#184) | ||
35 | - | ||
36 | -### Features | ||
37 | - | ||
38 | -* drop Node 8 from engines field ([#184](https://www.github.com/googleapis/nodejs-promisify/issues/184)) ([7e6d3c5](https://www.github.com/googleapis/nodejs-promisify/commit/7e6d3c54066d89530ed25c7f9722efd252f43fb8)) | ||
39 | - | ||
40 | - | ||
41 | -### Build System | ||
42 | - | ||
43 | -* update to latest version of gts/typescript ([#183](https://www.github.com/googleapis/nodejs-promisify/issues/183)) ([9c3ed12](https://www.github.com/googleapis/nodejs-promisify/commit/9c3ed12c12f4bb1e17af7440c6371c4cefddcd59)) | ||
44 | - | ||
45 | -### [1.0.4](https://www.github.com/googleapis/nodejs-promisify/compare/v1.0.3...v1.0.4) (2019-12-05) | ||
46 | - | ||
47 | - | ||
48 | -### Bug Fixes | ||
49 | - | ||
50 | -* **deps:** pin TypeScript below 3.7.0 ([e48750e](https://www.github.com/googleapis/nodejs-promisify/commit/e48750ef96aa20eb3a2b73fe2f062d04430468a7)) | ||
51 | - | ||
52 | -### [1.0.3](https://www.github.com/googleapis/nodejs-promisify/compare/v1.0.2...v1.0.3) (2019-11-13) | ||
53 | - | ||
54 | - | ||
55 | -### Bug Fixes | ||
56 | - | ||
57 | -* **docs:** add jsdoc-region-tag plugin ([#146](https://www.github.com/googleapis/nodejs-promisify/issues/146)) ([ff0ee74](https://www.github.com/googleapis/nodejs-promisify/commit/ff0ee7408f50e8f7147b8ccf7e10337aa5920076)) | ||
58 | - | ||
59 | -### [1.0.2](https://www.github.com/googleapis/nodejs-promisify/compare/v1.0.1...v1.0.2) (2019-06-26) | ||
60 | - | ||
61 | - | ||
62 | -### Bug Fixes | ||
63 | - | ||
64 | -* **docs:** link to reference docs section on googleapis.dev ([#128](https://www.github.com/googleapis/nodejs-promisify/issues/128)) ([5a8bd90](https://www.github.com/googleapis/nodejs-promisify/commit/5a8bd90)) | ||
65 | - | ||
66 | -### [1.0.1](https://www.github.com/googleapis/nodejs-promisify/compare/v1.0.0...v1.0.1) (2019-06-14) | ||
67 | - | ||
68 | - | ||
69 | -### Bug Fixes | ||
70 | - | ||
71 | -* **docs:** move to new client docs URL ([#124](https://www.github.com/googleapis/nodejs-promisify/issues/124)) ([34d18cd](https://www.github.com/googleapis/nodejs-promisify/commit/34d18cd)) | ||
72 | - | ||
73 | -## [1.0.0](https://www.github.com/googleapis/nodejs-promisify/compare/v0.4.0...v1.0.0) (2019-05-02) | ||
74 | - | ||
75 | - | ||
76 | -### Build System | ||
77 | - | ||
78 | -* upgrade engines field to >=8.10.0 ([#108](https://www.github.com/googleapis/nodejs-promisify/issues/108)) ([78ab89c](https://www.github.com/googleapis/nodejs-promisify/commit/78ab89c)) | ||
79 | - | ||
80 | - | ||
81 | -### BREAKING CHANGES | ||
82 | - | ||
83 | -* upgrade engines field to >=8.10.0 (#108) | ||
84 | - | ||
85 | -## v0.4.0 | ||
86 | - | ||
87 | -02-12-2019 19:44 PST | ||
88 | - | ||
89 | -### New features | ||
90 | -- feat: add callbackify() and callbackifyAll() methods ([#82](https://github.com/googleapis/nodejs-promisify/pull/82)) | ||
91 | - | ||
92 | -### Documentation | ||
93 | -- docs: update contributing path in README ([#86](https://github.com/googleapis/nodejs-promisify/pull/86)) | ||
94 | -- chore: move CONTRIBUTING.md to root ([#85](https://github.com/googleapis/nodejs-promisify/pull/85)) | ||
95 | -- docs: add lint/fix example to contributing guide ([#83](https://github.com/googleapis/nodejs-promisify/pull/83)) | ||
96 | - | ||
97 | -### Internal / Testing Changes | ||
98 | -- build: create docs test npm scripts ([#88](https://github.com/googleapis/nodejs-promisify/pull/88)) | ||
99 | -- build: test using @grpc/grpc-js in CI ([#87](https://github.com/googleapis/nodejs-promisify/pull/87)) | ||
100 | -- build: ignore googleapis.com in doc link check ([#81](https://github.com/googleapis/nodejs-promisify/pull/81)) | ||
101 | -- build: check broken links in generated docs ([#79](https://github.com/googleapis/nodejs-promisify/pull/79)) | ||
102 | -- chore(deps): update dependency @types/sinon to v7 ([#78](https://github.com/googleapis/nodejs-promisify/pull/78)) | ||
103 | -- chore(build): inject yoshi automation key ([#77](https://github.com/googleapis/nodejs-promisify/pull/77)) | ||
104 | -- chore: update nyc and eslint configs ([#76](https://github.com/googleapis/nodejs-promisify/pull/76)) | ||
105 | -- chore: fix publish.sh permission +x ([#74](https://github.com/googleapis/nodejs-promisify/pull/74)) | ||
106 | -- fix(build): fix Kokoro release script ([#73](https://github.com/googleapis/nodejs-promisify/pull/73)) | ||
107 | -- build: add Kokoro configs for autorelease ([#72](https://github.com/googleapis/nodejs-promisify/pull/72)) | ||
108 | -- chore: always nyc report before calling codecov ([#69](https://github.com/googleapis/nodejs-promisify/pull/69)) | ||
109 | -- chore: nyc ignore build/test by default ([#68](https://github.com/googleapis/nodejs-promisify/pull/68)) | ||
110 | -- chore(build): update prettier config ([#66](https://github.com/googleapis/nodejs-promisify/pull/66)) | ||
111 | -- fix: get the build passing ([#65](https://github.com/googleapis/nodejs-promisify/pull/65)) | ||
112 | -- chore: update license file ([#64](https://github.com/googleapis/nodejs-promisify/pull/64)) | ||
113 | -- fix(build): fix system key decryption ([#60](https://github.com/googleapis/nodejs-promisify/pull/60)) | ||
114 | -- chore(deps): update dependency @types/sinon to v5.0.7 ([#58](https://github.com/googleapis/nodejs-promisify/pull/58)) | ||
115 | -- fix: Pin @types/sinon to last compatible version ([#57](https://github.com/googleapis/nodejs-promisify/pull/57)) | ||
116 | -- chore: add synth.metadata | ||
117 | -- chore(deps): update dependency gts to ^0.9.0 ([#54](https://github.com/googleapis/nodejs-promisify/pull/54)) | ||
118 | -- chore: update eslintignore config ([#53](https://github.com/googleapis/nodejs-promisify/pull/53)) | ||
119 | -- chore: use latest npm on Windows ([#52](https://github.com/googleapis/nodejs-promisify/pull/52)) | ||
120 | -- chore: update CircleCI config ([#51](https://github.com/googleapis/nodejs-promisify/pull/51)) | ||
121 | -- chore: include build in eslintignore ([#48](https://github.com/googleapis/nodejs-promisify/pull/48)) | ||
122 | -- chore: update issue templates ([#44](https://github.com/googleapis/nodejs-promisify/pull/44)) | ||
123 | -- chore: remove old issue template ([#42](https://github.com/googleapis/nodejs-promisify/pull/42)) | ||
124 | -- build: run tests on node11 ([#41](https://github.com/googleapis/nodejs-promisify/pull/41)) | ||
125 | -- chores(build): do not collect sponge.xml from windows builds ([#40](https://github.com/googleapis/nodejs-promisify/pull/40)) | ||
126 | -- chores(build): run codecov on continuous builds ([#39](https://github.com/googleapis/nodejs-promisify/pull/39)) | ||
127 | -- chore: update new issue template ([#38](https://github.com/googleapis/nodejs-promisify/pull/38)) | ||
128 | -- chore(deps): update dependency sinon to v7 ([#33](https://github.com/googleapis/nodejs-promisify/pull/33)) | ||
129 | -- build: fix codecov uploading on Kokoro ([#34](https://github.com/googleapis/nodejs-promisify/pull/34)) | ||
130 | -- Update kokoro config ([#30](https://github.com/googleapis/nodejs-promisify/pull/30)) | ||
131 | -- Update CI config ([#28](https://github.com/googleapis/nodejs-promisify/pull/28)) | ||
132 | -- Don't publish sourcemaps ([#26](https://github.com/googleapis/nodejs-promisify/pull/26)) | ||
133 | -- Update kokoro config ([#24](https://github.com/googleapis/nodejs-promisify/pull/24)) | ||
134 | -- test: remove appveyor config ([#23](https://github.com/googleapis/nodejs-promisify/pull/23)) | ||
135 | -- Update CI config ([#22](https://github.com/googleapis/nodejs-promisify/pull/22)) | ||
136 | -- Enable prefer-const in the eslint config ([#21](https://github.com/googleapis/nodejs-promisify/pull/21)) | ||
137 | -- Enable no-var in eslint ([#19](https://github.com/googleapis/nodejs-promisify/pull/19)) | ||
138 | -- Update CI config ([#18](https://github.com/googleapis/nodejs-promisify/pull/18)) | ||
139 | - | ||
140 | -## v0.3.1 | ||
141 | - | ||
142 | -### Internal / Testing Changes | ||
143 | -- Add synth script and update CI (#14) | ||
144 | -- chore(deps): update dependency nyc to v13 (#12) | ||
145 | -- chore: ignore package-lock.json (#11) | ||
146 | -- chore(deps): lock file maintenance (#10) | ||
147 | -- chore: update renovate config (#9) | ||
148 | -- remove that whitespace (#8) | ||
149 | -- chore(deps): lock file maintenance (#7) | ||
150 | -- chore(deps): update dependency typescript to v3 (#6) | ||
151 | -- chore: assert.deelEqual => assert.deepStrictEqual (#5) | ||
152 | -- chore: move mocha options to mocha.opts (#4) | ||
153 | -- chore(deps): update dependency gts to ^0.8.0 (#1) | ||
154 | -- chore(deps): lock file maintenance (#3) | ||
155 | -- chore(deps): lock file maintenance (#2) |
This diff is collapsed. Click to expand it.
1 | -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
2 | -[//]: # "To regenerate it, use `python -m synthtool`." | ||
3 | -<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/> | ||
4 | - | ||
5 | -# [Google Cloud Common Promisify: Node.js Client](https://github.com/googleapis/nodejs-promisify) | ||
6 | - | ||
7 | -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) | ||
8 | -[![npm version](https://img.shields.io/npm/v/@google-cloud/promisify.svg)](https://www.npmjs.org/package/@google-cloud/promisify) | ||
9 | -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-promisify/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-promisify) | ||
10 | - | ||
11 | - | ||
12 | - | ||
13 | - | ||
14 | -A simple utility for promisifying functions and classes. | ||
15 | - | ||
16 | - | ||
17 | -A comprehensive list of changes in each version may be found in | ||
18 | -[the CHANGELOG](https://github.com/googleapis/nodejs-promisify/blob/master/CHANGELOG.md). | ||
19 | - | ||
20 | -* [Google Cloud Common Promisify Node.js Client API Reference][client-docs] | ||
21 | - | ||
22 | -* [github.com/googleapis/nodejs-promisify](https://github.com/googleapis/nodejs-promisify) | ||
23 | - | ||
24 | -Read more about the client libraries for Cloud APIs, including the older | ||
25 | -Google APIs Client Libraries, in [Client Libraries Explained][explained]. | ||
26 | - | ||
27 | -[explained]: https://cloud.google.com/apis/docs/client-libraries-explained | ||
28 | - | ||
29 | -**Table of contents:** | ||
30 | - | ||
31 | - | ||
32 | -* [Quickstart](#quickstart) | ||
33 | - | ||
34 | - * [Installing the client library](#installing-the-client-library) | ||
35 | - * [Using the client library](#using-the-client-library) | ||
36 | -* [Samples](#samples) | ||
37 | -* [Versioning](#versioning) | ||
38 | -* [Contributing](#contributing) | ||
39 | -* [License](#license) | ||
40 | - | ||
41 | -## Quickstart | ||
42 | - | ||
43 | -### Installing the client library | ||
44 | - | ||
45 | -```bash | ||
46 | -npm install @google-cloud/promisify | ||
47 | -``` | ||
48 | - | ||
49 | - | ||
50 | -### Using the client library | ||
51 | - | ||
52 | -```javascript | ||
53 | -const {promisify} = require('@google-cloud/promisify'); | ||
54 | - | ||
55 | -/** | ||
56 | - * This is a very basic example function that accepts a callback. | ||
57 | - */ | ||
58 | -function someCallbackFunction(name, callback) { | ||
59 | - if (!name) { | ||
60 | - callback(new Error('Name is required!')); | ||
61 | - } else { | ||
62 | - callback(null, `Well hello there, ${name}!`); | ||
63 | - } | ||
64 | -} | ||
65 | - | ||
66 | -// let's promisify it! | ||
67 | -const somePromiseFunction = promisify(someCallbackFunction); | ||
68 | - | ||
69 | -async function quickstart() { | ||
70 | - // now we can just `await` the function to use it like a promisified method | ||
71 | - const [result] = await somePromiseFunction('nodestronaut'); | ||
72 | - console.log(result); | ||
73 | -} | ||
74 | -quickstart(); | ||
75 | - | ||
76 | -``` | ||
77 | -It's unlikely you will need to install this package directly, as it will be | ||
78 | -installed as a dependency when you install other `@google-cloud` packages. | ||
79 | - | ||
80 | - | ||
81 | -## Samples | ||
82 | - | ||
83 | -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-promisify/tree/master/samples) directory. The samples' `README.md` | ||
84 | -has instructions for running the samples. | ||
85 | - | ||
86 | -| Sample | Source Code | Try it | | ||
87 | -| --------------------------- | --------------------------------- | ------ | | ||
88 | -| Quickstart | [source code](https://github.com/googleapis/nodejs-promisify/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-promisify&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | ||
89 | - | ||
90 | - | ||
91 | - | ||
92 | -The [Google Cloud Common Promisify Node.js Client API Reference][client-docs] documentation | ||
93 | -also contains samples. | ||
94 | - | ||
95 | -## Supported Node.js Versions | ||
96 | - | ||
97 | -Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). | ||
98 | -Libraries are compatible with all current _active_ and _maintenance_ versions of | ||
99 | -Node.js. | ||
100 | - | ||
101 | -Client libraries targetting some end-of-life versions of Node.js are available, and | ||
102 | -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). | ||
103 | -The dist-tags follow the naming convention `legacy-(version)`. | ||
104 | - | ||
105 | -_Legacy Node.js versions are supported as a best effort:_ | ||
106 | - | ||
107 | -* Legacy versions will not be tested in continuous integration. | ||
108 | -* Some security patches may not be able to be backported. | ||
109 | -* Dependencies will not be kept up-to-date, and features will not be backported. | ||
110 | - | ||
111 | -#### Legacy tags available | ||
112 | - | ||
113 | -* `legacy-8`: install client libraries from this dist-tag for versions | ||
114 | - compatible with Node.js 8. | ||
115 | - | ||
116 | -## Versioning | ||
117 | - | ||
118 | -This library follows [Semantic Versioning](http://semver.org/). | ||
119 | - | ||
120 | - | ||
121 | -This library is considered to be **General Availability (GA)**. This means it | ||
122 | -is stable; the code surface will not change in backwards-incompatible ways | ||
123 | -unless absolutely necessary (e.g. because of critical security issues) or with | ||
124 | -an extensive deprecation period. Issues and requests against **GA** libraries | ||
125 | -are addressed with the highest priority. | ||
126 | - | ||
127 | - | ||
128 | - | ||
129 | - | ||
130 | - | ||
131 | -More Information: [Google Cloud Platform Launch Stages][launch_stages] | ||
132 | - | ||
133 | -[launch_stages]: https://cloud.google.com/terms/launch-stages | ||
134 | - | ||
135 | -## Contributing | ||
136 | - | ||
137 | -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-promisify/blob/master/CONTRIBUTING.md). | ||
138 | - | ||
139 | -Please note that this `README.md`, the `samples/README.md`, | ||
140 | -and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) | ||
141 | -are generated from a central template. To edit one of these files, make an edit | ||
142 | -to its template in this | ||
143 | -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). | ||
144 | - | ||
145 | -## License | ||
146 | - | ||
147 | -Apache Version 2.0 | ||
148 | - | ||
149 | -See [LICENSE](https://github.com/googleapis/nodejs-promisify/blob/master/LICENSE) | ||
150 | - | ||
151 | -[client-docs]: https://googleapis.dev/nodejs/promisify/latest | ||
152 | - | ||
153 | -[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png | ||
154 | -[projects]: https://console.cloud.google.com/project | ||
155 | -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing | ||
156 | - | ||
157 | -[auth]: https://cloud.google.com/docs/authentication/getting-started |
1 | -export interface PromisifyAllOptions extends PromisifyOptions { | ||
2 | - /** | ||
3 | - * Array of methods to ignore when promisifying. | ||
4 | - */ | ||
5 | - exclude?: string[]; | ||
6 | -} | ||
7 | -export interface PromisifyOptions { | ||
8 | - /** | ||
9 | - * Resolve the promise with single arg instead of an array. | ||
10 | - */ | ||
11 | - singular?: boolean; | ||
12 | -} | ||
13 | -export interface PromiseMethod extends Function { | ||
14 | - promisified_?: boolean; | ||
15 | -} | ||
16 | -export interface WithPromise { | ||
17 | - Promise?: PromiseConstructor; | ||
18 | -} | ||
19 | -export interface CallbackifyAllOptions { | ||
20 | - /** | ||
21 | - * Array of methods to ignore when callbackifying. | ||
22 | - */ | ||
23 | - exclude?: string[]; | ||
24 | -} | ||
25 | -export interface CallbackMethod extends Function { | ||
26 | - callbackified_?: boolean; | ||
27 | -} | ||
28 | -/** | ||
29 | - * Wraps a callback style function to conditionally return a promise. | ||
30 | - * | ||
31 | - * @param {function} originalMethod - The method to promisify. | ||
32 | - * @param {object=} options - Promise options. | ||
33 | - * @param {boolean} options.singular - Resolve the promise with single arg instead of an array. | ||
34 | - * @return {function} wrapped | ||
35 | - */ | ||
36 | -export declare function promisify(originalMethod: PromiseMethod, options?: PromisifyOptions): any; | ||
37 | -/** | ||
38 | - * Promisifies certain Class methods. This will not promisify private or | ||
39 | - * streaming methods. | ||
40 | - * | ||
41 | - * @param {module:common/service} Class - Service class. | ||
42 | - * @param {object=} options - Configuration object. | ||
43 | - */ | ||
44 | -export declare function promisifyAll(Class: Function, options?: PromisifyAllOptions): void; | ||
45 | -/** | ||
46 | - * Wraps a promisy type function to conditionally call a callback function. | ||
47 | - * | ||
48 | - * @param {function} originalMethod - The method to callbackify. | ||
49 | - * @param {object=} options - Callback options. | ||
50 | - * @param {boolean} options.singular - Pass to the callback a single arg instead of an array. | ||
51 | - * @return {function} wrapped | ||
52 | - */ | ||
53 | -export declare function callbackify(originalMethod: CallbackMethod): CallbackMethod; | ||
54 | -/** | ||
55 | - * Callbackifies certain Class methods. This will not callbackify private or | ||
56 | - * streaming methods. | ||
57 | - * | ||
58 | - * @param {module:common/service} Class - Service class. | ||
59 | - * @param {object=} options - Configuration object. | ||
60 | - */ | ||
61 | -export declare function callbackifyAll(Class: Function, options?: CallbackifyAllOptions): void; |
1 | -"use strict"; | ||
2 | -/* eslint-disable prefer-rest-params */ | ||
3 | -Object.defineProperty(exports, "__esModule", { value: true }); | ||
4 | -exports.callbackifyAll = exports.callbackify = exports.promisifyAll = exports.promisify = void 0; | ||
5 | -/** | ||
6 | - * Wraps a callback style function to conditionally return a promise. | ||
7 | - * | ||
8 | - * @param {function} originalMethod - The method to promisify. | ||
9 | - * @param {object=} options - Promise options. | ||
10 | - * @param {boolean} options.singular - Resolve the promise with single arg instead of an array. | ||
11 | - * @return {function} wrapped | ||
12 | - */ | ||
13 | -function promisify(originalMethod, options) { | ||
14 | - if (originalMethod.promisified_) { | ||
15 | - return originalMethod; | ||
16 | - } | ||
17 | - options = options || {}; | ||
18 | - const slice = Array.prototype.slice; | ||
19 | - // tslint:disable-next-line:no-any | ||
20 | - const wrapper = function () { | ||
21 | - let last; | ||
22 | - for (last = arguments.length - 1; last >= 0; last--) { | ||
23 | - const arg = arguments[last]; | ||
24 | - if (typeof arg === 'undefined') { | ||
25 | - continue; // skip trailing undefined. | ||
26 | - } | ||
27 | - if (typeof arg !== 'function') { | ||
28 | - break; // non-callback last argument found. | ||
29 | - } | ||
30 | - return originalMethod.apply(this, arguments); | ||
31 | - } | ||
32 | - // peel trailing undefined. | ||
33 | - const args = slice.call(arguments, 0, last + 1); | ||
34 | - // tslint:disable-next-line:variable-name | ||
35 | - let PromiseCtor = Promise; | ||
36 | - // Because dedupe will likely create a single install of | ||
37 | - // @google-cloud/common to be shared amongst all modules, we need to | ||
38 | - // localize it at the Service level. | ||
39 | - if (this && this.Promise) { | ||
40 | - PromiseCtor = this.Promise; | ||
41 | - } | ||
42 | - return new PromiseCtor((resolve, reject) => { | ||
43 | - // tslint:disable-next-line:no-any | ||
44 | - args.push((...args) => { | ||
45 | - const callbackArgs = slice.call(args); | ||
46 | - const err = callbackArgs.shift(); | ||
47 | - if (err) { | ||
48 | - return reject(err); | ||
49 | - } | ||
50 | - if (options.singular && callbackArgs.length === 1) { | ||
51 | - resolve(callbackArgs[0]); | ||
52 | - } | ||
53 | - else { | ||
54 | - resolve(callbackArgs); | ||
55 | - } | ||
56 | - }); | ||
57 | - originalMethod.apply(this, args); | ||
58 | - }); | ||
59 | - }; | ||
60 | - wrapper.promisified_ = true; | ||
61 | - return wrapper; | ||
62 | -} | ||
63 | -exports.promisify = promisify; | ||
64 | -/** | ||
65 | - * Promisifies certain Class methods. This will not promisify private or | ||
66 | - * streaming methods. | ||
67 | - * | ||
68 | - * @param {module:common/service} Class - Service class. | ||
69 | - * @param {object=} options - Configuration object. | ||
70 | - */ | ||
71 | -// tslint:disable-next-line:variable-name | ||
72 | -function promisifyAll(Class, options) { | ||
73 | - const exclude = (options && options.exclude) || []; | ||
74 | - const ownPropertyNames = Object.getOwnPropertyNames(Class.prototype); | ||
75 | - const methods = ownPropertyNames.filter(methodName => { | ||
76 | - // clang-format off | ||
77 | - return (!exclude.includes(methodName) && | ||
78 | - typeof Class.prototype[methodName] === 'function' && // is it a function? | ||
79 | - !/(^_|(Stream|_)|promise$)|^constructor$/.test(methodName) // is it promisable? | ||
80 | - ); | ||
81 | - // clang-format on | ||
82 | - }); | ||
83 | - methods.forEach(methodName => { | ||
84 | - const originalMethod = Class.prototype[methodName]; | ||
85 | - if (!originalMethod.promisified_) { | ||
86 | - Class.prototype[methodName] = exports.promisify(originalMethod, options); | ||
87 | - } | ||
88 | - }); | ||
89 | -} | ||
90 | -exports.promisifyAll = promisifyAll; | ||
91 | -/** | ||
92 | - * Wraps a promisy type function to conditionally call a callback function. | ||
93 | - * | ||
94 | - * @param {function} originalMethod - The method to callbackify. | ||
95 | - * @param {object=} options - Callback options. | ||
96 | - * @param {boolean} options.singular - Pass to the callback a single arg instead of an array. | ||
97 | - * @return {function} wrapped | ||
98 | - */ | ||
99 | -function callbackify(originalMethod) { | ||
100 | - if (originalMethod.callbackified_) { | ||
101 | - return originalMethod; | ||
102 | - } | ||
103 | - // tslint:disable-next-line:no-any | ||
104 | - const wrapper = function () { | ||
105 | - if (typeof arguments[arguments.length - 1] !== 'function') { | ||
106 | - return originalMethod.apply(this, arguments); | ||
107 | - } | ||
108 | - const cb = Array.prototype.pop.call(arguments); | ||
109 | - originalMethod.apply(this, arguments).then( | ||
110 | - // tslint:disable-next-line:no-any | ||
111 | - (res) => { | ||
112 | - res = Array.isArray(res) ? res : [res]; | ||
113 | - cb(null, ...res); | ||
114 | - }, (err) => cb(err)); | ||
115 | - }; | ||
116 | - wrapper.callbackified_ = true; | ||
117 | - return wrapper; | ||
118 | -} | ||
119 | -exports.callbackify = callbackify; | ||
120 | -/** | ||
121 | - * Callbackifies certain Class methods. This will not callbackify private or | ||
122 | - * streaming methods. | ||
123 | - * | ||
124 | - * @param {module:common/service} Class - Service class. | ||
125 | - * @param {object=} options - Configuration object. | ||
126 | - */ | ||
127 | -function callbackifyAll( | ||
128 | -// tslint:disable-next-line:variable-name | ||
129 | -Class, options) { | ||
130 | - const exclude = (options && options.exclude) || []; | ||
131 | - const ownPropertyNames = Object.getOwnPropertyNames(Class.prototype); | ||
132 | - const methods = ownPropertyNames.filter(methodName => { | ||
133 | - // clang-format off | ||
134 | - return (!exclude.includes(methodName) && | ||
135 | - typeof Class.prototype[methodName] === 'function' && // is it a function? | ||
136 | - !/^_|(Stream|_)|^constructor$/.test(methodName) // is it callbackifyable? | ||
137 | - ); | ||
138 | - // clang-format on | ||
139 | - }); | ||
140 | - methods.forEach(methodName => { | ||
141 | - const originalMethod = Class.prototype[methodName]; | ||
142 | - if (!originalMethod.callbackified_) { | ||
143 | - Class.prototype[methodName] = exports.callbackify(originalMethod); | ||
144 | - } | ||
145 | - }); | ||
146 | -} | ||
147 | -exports.callbackifyAll = callbackifyAll; | ||
148 | -//# sourceMappingURL=index.js.map | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -{ | ||
2 | - "_from": "@google-cloud/promisify@^2.0.0", | ||
3 | - "_id": "@google-cloud/promisify@2.0.3", | ||
4 | - "_inBundle": false, | ||
5 | - "_integrity": "sha512-d4VSA86eL/AFTe5xtyZX+ePUjE8dIFu2T8zmdeNBSa5/kNgXPCx/o/wbFNHAGLJdGnk1vddRuMESD9HbOC8irw==", | ||
6 | - "_location": "/@google-cloud/promisify", | ||
7 | - "_phantomChildren": {}, | ||
8 | - "_requested": { | ||
9 | - "type": "range", | ||
10 | - "registry": true, | ||
11 | - "raw": "@google-cloud/promisify@^2.0.0", | ||
12 | - "name": "@google-cloud/promisify", | ||
13 | - "escapedName": "@google-cloud%2fpromisify", | ||
14 | - "scope": "@google-cloud", | ||
15 | - "rawSpec": "^2.0.0", | ||
16 | - "saveSpec": null, | ||
17 | - "fetchSpec": "^2.0.0" | ||
18 | - }, | ||
19 | - "_requiredBy": [ | ||
20 | - "/@google-cloud/common" | ||
21 | - ], | ||
22 | - "_resolved": "https://registry.npmjs.org/@google-cloud/promisify/-/promisify-2.0.3.tgz", | ||
23 | - "_shasum": "f934b5cdc939e3c7039ff62b9caaf59a9d89e3a8", | ||
24 | - "_spec": "@google-cloud/promisify@^2.0.0", | ||
25 | - "_where": "C:\\Users\\1000c\\이것저것\\옾소\\Voicoding\\node_modules\\@google-cloud\\common", | ||
26 | - "author": { | ||
27 | - "name": "Google Inc." | ||
28 | - }, | ||
29 | - "bugs": { | ||
30 | - "url": "https://github.com/googleapis/nodejs-promisify/issues" | ||
31 | - }, | ||
32 | - "bundleDependencies": false, | ||
33 | - "deprecated": false, | ||
34 | - "description": "A simple utility for promisifying functions and classes.", | ||
35 | - "devDependencies": { | ||
36 | - "@compodoc/compodoc": "^1.1.9", | ||
37 | - "@microsoft/api-documenter": "^7.8.10", | ||
38 | - "@microsoft/api-extractor": "^7.8.10", | ||
39 | - "@types/mocha": "^8.0.0", | ||
40 | - "@types/node": "^10.5.2", | ||
41 | - "@types/sinon": "^9.0.0", | ||
42 | - "c8": "^7.0.0", | ||
43 | - "chai": "^4.2.0", | ||
44 | - "codecov": "^3.0.4", | ||
45 | - "gts": "^2.0.0", | ||
46 | - "hard-rejection": "^2.1.0", | ||
47 | - "linkinator": "^2.0.0", | ||
48 | - "mocha": "^8.0.0", | ||
49 | - "sinon": "^9.0.0", | ||
50 | - "typescript": "^3.8.3" | ||
51 | - }, | ||
52 | - "engines": { | ||
53 | - "node": ">=10" | ||
54 | - }, | ||
55 | - "files": [ | ||
56 | - "build/src", | ||
57 | - "!build/src/**/*.map" | ||
58 | - ], | ||
59 | - "homepage": "https://github.com/googleapis/nodejs-promisify#readme", | ||
60 | - "keywords": [], | ||
61 | - "license": "Apache-2.0", | ||
62 | - "main": "build/src/index.js", | ||
63 | - "name": "@google-cloud/promisify", | ||
64 | - "repository": { | ||
65 | - "type": "git", | ||
66 | - "url": "git+https://github.com/googleapis/nodejs-promisify.git" | ||
67 | - }, | ||
68 | - "scripts": { | ||
69 | - "api-documenter": "api-documenter yaml --input-folder=temp", | ||
70 | - "api-extractor": "api-extractor run --local", | ||
71 | - "clean": "gts clean", | ||
72 | - "compile": "tsc -p .", | ||
73 | - "docs": "compodoc src/", | ||
74 | - "docs-test": "linkinator docs", | ||
75 | - "fix": "gts fix", | ||
76 | - "lint": "gts check", | ||
77 | - "precompile": "gts clean", | ||
78 | - "predocs-test": "npm run docs", | ||
79 | - "prelint": "cd samples; npm link ../; npm install", | ||
80 | - "prepare": "npm run compile", | ||
81 | - "presystem-test": "npm run compile", | ||
82 | - "pretest": "npm run compile", | ||
83 | - "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", | ||
84 | - "system-test": "mocha build/system-test", | ||
85 | - "test": "c8 mocha build/test" | ||
86 | - }, | ||
87 | - "types": "build/src/index.d.ts", | ||
88 | - "version": "2.0.3" | ||
89 | -} |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 | -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." | ||
2 | -[//]: # "To regenerate it, use `python -m synthtool`." | ||
3 | -<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/> | ||
4 | - | ||
5 | -# [Cloud Speech: Node.js Client](https://github.com/googleapis/nodejs-speech) | ||
6 | - | ||
7 | -[![release level](https://img.shields.io/badge/release%20level-general%20availability%20%28GA%29-brightgreen.svg?style=flat)](https://cloud.google.com/terms/launch-stages) | ||
8 | -[![npm version](https://img.shields.io/npm/v/@google-cloud/speech.svg)](https://www.npmjs.org/package/@google-cloud/speech) | ||
9 | -[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-speech/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-speech) | ||
10 | - | ||
11 | - | ||
12 | - | ||
13 | - | ||
14 | -Cloud Speech Client Library for Node.js | ||
15 | - | ||
16 | - | ||
17 | -A comprehensive list of changes in each version may be found in | ||
18 | -[the CHANGELOG](https://github.com/googleapis/nodejs-speech/blob/master/CHANGELOG.md). | ||
19 | - | ||
20 | -* [Cloud Speech Node.js Client API Reference][client-docs] | ||
21 | -* [Cloud Speech Documentation][product-docs] | ||
22 | -* [github.com/googleapis/nodejs-speech](https://github.com/googleapis/nodejs-speech) | ||
23 | - | ||
24 | -Read more about the client libraries for Cloud APIs, including the older | ||
25 | -Google APIs Client Libraries, in [Client Libraries Explained][explained]. | ||
26 | - | ||
27 | -[explained]: https://cloud.google.com/apis/docs/client-libraries-explained | ||
28 | - | ||
29 | -**Table of contents:** | ||
30 | - | ||
31 | - | ||
32 | -* [Quickstart](#quickstart) | ||
33 | - * [Before you begin](#before-you-begin) | ||
34 | - * [Installing the client library](#installing-the-client-library) | ||
35 | - * [Using the client library](#using-the-client-library) | ||
36 | -* [Samples](#samples) | ||
37 | -* [Versioning](#versioning) | ||
38 | -* [Contributing](#contributing) | ||
39 | -* [License](#license) | ||
40 | - | ||
41 | -## Quickstart | ||
42 | - | ||
43 | -### Before you begin | ||
44 | - | ||
45 | -1. [Select or create a Cloud Platform project][projects]. | ||
46 | -1. [Enable the Cloud Speech API][enable_api]. | ||
47 | -1. [Set up authentication with a service account][auth] so you can access the | ||
48 | - API from your local workstation. | ||
49 | - | ||
50 | -### Installing the client library | ||
51 | - | ||
52 | -```bash | ||
53 | -npm install @google-cloud/speech | ||
54 | -``` | ||
55 | - | ||
56 | - | ||
57 | -### Using the client library | ||
58 | - | ||
59 | -```javascript | ||
60 | -// Imports the Google Cloud client library | ||
61 | -const speech = require('@google-cloud/speech'); | ||
62 | - | ||
63 | -// Creates a client | ||
64 | -const client = new speech.SpeechClient(); | ||
65 | - | ||
66 | -async function quickstart() { | ||
67 | - // The path to the remote LINEAR16 file | ||
68 | - const gcsUri = 'gs://cloud-samples-data/speech/brooklyn_bridge.raw'; | ||
69 | - | ||
70 | - // The audio file's encoding, sample rate in hertz, and BCP-47 language code | ||
71 | - const audio = { | ||
72 | - uri: gcsUri, | ||
73 | - }; | ||
74 | - const config = { | ||
75 | - encoding: 'LINEAR16', | ||
76 | - sampleRateHertz: 16000, | ||
77 | - languageCode: 'en-US', | ||
78 | - }; | ||
79 | - const request = { | ||
80 | - audio: audio, | ||
81 | - config: config, | ||
82 | - }; | ||
83 | - | ||
84 | - // Detects speech in the audio file | ||
85 | - const [response] = await client.recognize(request); | ||
86 | - const transcription = response.results | ||
87 | - .map(result => result.alternatives[0].transcript) | ||
88 | - .join('\n'); | ||
89 | - console.log(`Transcription: ${transcription}`); | ||
90 | -} | ||
91 | -quickstart(); | ||
92 | - | ||
93 | -``` | ||
94 | - | ||
95 | - | ||
96 | - | ||
97 | -## Samples | ||
98 | - | ||
99 | -Samples are in the [`samples/`](https://github.com/googleapis/nodejs-speech/tree/master/samples) directory. Each sample's `README.md` has instructions for running its sample. | ||
100 | - | ||
101 | -| Sample | Source Code | Try it | | ||
102 | -| --------------------------- | --------------------------------- | ------ | | ||
103 | -| Microphone stream | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/MicrophoneStream.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/MicrophoneStream.js,samples/README.md) | | ||
104 | -| Beta Features | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/betaFeatures.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/betaFeatures.js,samples/README.md) | | ||
105 | -| Infinite Streaming | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/infiniteStreaming.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/infiniteStreaming.js,samples/README.md) | | ||
106 | -| Model Adaptation | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/modelAdaptation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/modelAdaptation.js,samples/README.md) | | ||
107 | -| Multi Region | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/multiRegion.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/multiRegion.js,samples/README.md) | | ||
108 | -| Profanity Filter | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/profanityFilter.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/profanityFilter.js,samples/README.md) | | ||
109 | -| Quickstart | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) | | ||
110 | -| Recognize | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/recognize.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/recognize.js,samples/README.md) | | ||
111 | -| Recognize speech with metadata | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/recognize.v1p1beta1.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/recognize.v1p1beta1.js,samples/README.md) | | ||
112 | -| Transcribe Context Classes | [source code](https://github.com/googleapis/nodejs-speech/blob/master/samples/transcribeContextClasses.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-speech&page=editor&open_in_editor=samples/transcribeContextClasses.js,samples/README.md) | | ||
113 | - | ||
114 | - | ||
115 | - | ||
116 | -The [Cloud Speech Node.js Client API Reference][client-docs] documentation | ||
117 | -also contains samples. | ||
118 | - | ||
119 | -## Supported Node.js Versions | ||
120 | - | ||
121 | -Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/). | ||
122 | -Libraries are compatible with all current _active_ and _maintenance_ versions of | ||
123 | -Node.js. | ||
124 | - | ||
125 | -Client libraries targeting some end-of-life versions of Node.js are available, and | ||
126 | -can be installed via npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). | ||
127 | -The dist-tags follow the naming convention `legacy-(version)`. | ||
128 | - | ||
129 | -_Legacy Node.js versions are supported as a best effort:_ | ||
130 | - | ||
131 | -* Legacy versions will not be tested in continuous integration. | ||
132 | -* Some security patches may not be able to be backported. | ||
133 | -* Dependencies will not be kept up-to-date, and features will not be backported. | ||
134 | - | ||
135 | -#### Legacy tags available | ||
136 | - | ||
137 | -* `legacy-8`: install client libraries from this dist-tag for versions | ||
138 | - compatible with Node.js 8. | ||
139 | - | ||
140 | -## Versioning | ||
141 | - | ||
142 | -This library follows [Semantic Versioning](http://semver.org/). | ||
143 | - | ||
144 | - | ||
145 | -This library is considered to be **General Availability (GA)**. This means it | ||
146 | -is stable; the code surface will not change in backwards-incompatible ways | ||
147 | -unless absolutely necessary (e.g. because of critical security issues) or with | ||
148 | -an extensive deprecation period. Issues and requests against **GA** libraries | ||
149 | -are addressed with the highest priority. | ||
150 | - | ||
151 | - | ||
152 | - | ||
153 | - | ||
154 | - | ||
155 | -More Information: [Google Cloud Platform Launch Stages][launch_stages] | ||
156 | - | ||
157 | -[launch_stages]: https://cloud.google.com/terms/launch-stages | ||
158 | - | ||
159 | -## Contributing | ||
160 | - | ||
161 | -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/nodejs-speech/blob/master/CONTRIBUTING.md). | ||
162 | - | ||
163 | -Please note that this `README.md`, the `samples/README.md`, | ||
164 | -and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) | ||
165 | -are generated from a central template. To edit one of these files, make an edit | ||
166 | -to its template in this | ||
167 | -[directory](https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/node_library). | ||
168 | - | ||
169 | -## License | ||
170 | - | ||
171 | -Apache Version 2.0 | ||
172 | - | ||
173 | -See [LICENSE](https://github.com/googleapis/nodejs-speech/blob/master/LICENSE) | ||
174 | - | ||
175 | -[client-docs]: https://googleapis.dev/nodejs/speech/latest | ||
176 | -[product-docs]: https://cloud.google.com/speech-to-text/docs/ | ||
177 | -[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png | ||
178 | -[projects]: https://console.cloud.google.com/project | ||
179 | -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing | ||
180 | -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=speech.googleapis.com | ||
181 | -[auth]: https://cloud.google.com/docs/authentication/getting-started |
node_modules/@google-cloud/speech/build/protos/google/cloud/speech/v1/cloud_speech.proto
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@google-cloud/speech/build/protos/google/cloud/speech/v1p1beta1/resource.proto
deleted
100644 → 0
1 | -// Copyright 2021 Google LLC | ||
2 | -// | ||
3 | -// Licensed under the Apache License, Version 2.0 (the "License"); | ||
4 | -// you may not use this file except in compliance with the License. | ||
5 | -// You may obtain a copy of the License at | ||
6 | -// | ||
7 | -// http://www.apache.org/licenses/LICENSE-2.0 | ||
8 | -// | ||
9 | -// Unless required by applicable law or agreed to in writing, software | ||
10 | -// distributed under the License is distributed on an "AS IS" BASIS, | ||
11 | -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
12 | -// See the License for the specific language governing permissions and | ||
13 | -// limitations under the License. | ||
14 | - | ||
15 | -syntax = "proto3"; | ||
16 | - | ||
17 | -package google.cloud.speech.v1p1beta1; | ||
18 | - | ||
19 | -import "google/api/resource.proto"; | ||
20 | -import "google/api/annotations.proto"; | ||
21 | - | ||
22 | -option cc_enable_arenas = true; | ||
23 | -option go_package = "google.golang.org/genproto/googleapis/cloud/speech/v1p1beta1;speech"; | ||
24 | -option java_multiple_files = true; | ||
25 | -option java_outer_classname = "SpeechResourceProto"; | ||
26 | -option java_package = "com.google.cloud.speech.v1p1beta1"; | ||
27 | -option objc_class_prefix = "GCS"; | ||
28 | - | ||
29 | -// A set of words or phrases that represents a common concept likely to appear | ||
30 | -// in your audio, for example a list of passenger ship names. CustomClass items | ||
31 | -// can be substituted into placeholders that you set in PhraseSet phrases. | ||
32 | -message CustomClass { | ||
33 | - option (google.api.resource) = { | ||
34 | - type: "speech.googleapis.com/CustomClass" | ||
35 | - pattern: "projects/{project}/locations/{location}/customClasses/{custom_class}" | ||
36 | - }; | ||
37 | - | ||
38 | - // An item of the class. | ||
39 | - message ClassItem { | ||
40 | - // The class item's value. | ||
41 | - string value = 1; | ||
42 | - } | ||
43 | - | ||
44 | - // The resource name of the custom class. | ||
45 | - string name = 1; | ||
46 | - | ||
47 | - // If this custom class is a resource, the custom_class_id is the resource id | ||
48 | - // of the CustomClass. Case sensitive. | ||
49 | - string custom_class_id = 2; | ||
50 | - | ||
51 | - // A collection of class items. | ||
52 | - repeated ClassItem items = 3; | ||
53 | -} | ||
54 | - | ||
55 | -// Provides "hints" to the speech recognizer to favor specific words and phrases | ||
56 | -// in the results. | ||
57 | -message PhraseSet { | ||
58 | - option (google.api.resource) = { | ||
59 | - type: "speech.googleapis.com/PhraseSet" | ||
60 | - pattern: "projects/{project}/locations/{location}/phraseSets/{phrase_set}" | ||
61 | - }; | ||
62 | - | ||
63 | - // A phrases containing words and phrase "hints" so that | ||
64 | - // the speech recognition is more likely to recognize them. This can be used | ||
65 | - // to improve the accuracy for specific words and phrases, for example, if | ||
66 | - // specific commands are typically spoken by the user. This can also be used | ||
67 | - // to add additional words to the vocabulary of the recognizer. See | ||
68 | - // [usage limits](https://cloud.google.com/speech-to-text/quotas#content). | ||
69 | - // | ||
70 | - // List items can also include pre-built or custom classes containing groups | ||
71 | - // of words that represent common concepts that occur in natural language. For | ||
72 | - // example, rather than providing a phrase hint for every month of the | ||
73 | - // year (e.g. "i was born in january", "i was born in febuary", ...), use the | ||
74 | - // pre-built `$MONTH` class improves the likelihood of correctly transcribing | ||
75 | - // audio that includes months (e.g. "i was born in $month"). | ||
76 | - // To refer to pre-built classes, use the class' symbol prepended with `$` | ||
77 | - // e.g. `$MONTH`. To refer to custom classes that were defined inline in the | ||
78 | - // request, set the class's `custom_class_id` to a string unique to all class | ||
79 | - // resources and inline classes. Then use the class' id wrapped in $`{...}` | ||
80 | - // e.g. "${my-months}". To refer to custom classes resources, use the class' | ||
81 | - // id wrapped in `${}` (e.g. `${my-months}`). | ||
82 | - message Phrase { | ||
83 | - // The phrase itself. | ||
84 | - string value = 1; | ||
85 | - | ||
86 | - // Hint Boost. Overrides the boost set at the phrase set level. | ||
87 | - // Positive value will increase the probability that a specific phrase will | ||
88 | - // be recognized over other similar sounding phrases. The higher the boost, | ||
89 | - // the higher the chance of false positive recognition as well. Negative | ||
90 | - // boost values would correspond to anti-biasing. Anti-biasing is not | ||
91 | - // enabled, so negative boost will simply be ignored. Though `boost` can | ||
92 | - // accept a wide range of positive values, most use cases are best served | ||
93 | - // with values between 0 and 20. We recommend using a binary search approach | ||
94 | - // to finding the optimal value for your use case. Speech recognition | ||
95 | - // will skip PhraseSets with a boost value of 0. | ||
96 | - float boost = 2; | ||
97 | - } | ||
98 | - | ||
99 | - // The resource name of the phrase set. | ||
100 | - string name = 1; | ||
101 | - | ||
102 | - // A list of word and phrases. | ||
103 | - repeated Phrase phrases = 2; | ||
104 | - | ||
105 | - // Hint Boost. Positive value will increase the probability that a specific | ||
106 | - // phrase will be recognized over other similar sounding phrases. The higher | ||
107 | - // the boost, the higher the chance of false positive recognition as well. | ||
108 | - // Negative boost values would correspond to anti-biasing. Anti-biasing is not | ||
109 | - // enabled, so negative boost will simply be ignored. Though `boost` can | ||
110 | - // accept a wide range of positive values, most use cases are best served with | ||
111 | - // values between 0 (exclusive) and 20. We recommend using a binary search | ||
112 | - // approach to finding the optimal value for your use case. Speech recognition | ||
113 | - // will skip PhraseSets with a boost value of 0. | ||
114 | - float boost = 4; | ||
115 | -} | ||
116 | - | ||
117 | -// Speech adaptation configuration. | ||
118 | -message SpeechAdaptation { | ||
119 | - // A collection of phrase sets. To specify the hints inline, leave the | ||
120 | - // phrase set's `name` blank and fill in the rest of its fields. Any | ||
121 | - // phrase set can use any custom class. | ||
122 | - repeated PhraseSet phrase_sets = 1; | ||
123 | - | ||
124 | - // A collection of phrase set resource names to use. | ||
125 | - repeated string phrase_set_references = 2; | ||
126 | - | ||
127 | - // A collection of custom classes. To specify the classes inline, leave the | ||
128 | - // class' `name` blank and fill in the rest of its fields, giving it a unique | ||
129 | - // `custom_class_id`. Refer to the inline defined class in phrase hints by its | ||
130 | - // `custom_class_id`. | ||
131 | - repeated CustomClass custom_classes = 3; | ||
132 | -} |
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
1 | -import * as pumpify from 'pumpify'; | ||
2 | -import * as protosTypes from '../protos/protos'; | ||
3 | -import * as gax from 'google-gax'; | ||
4 | -export declare class ImprovedStreamingClient { | ||
5 | - /** | ||
6 | - * Performs bidirectional streaming speech recognition: receive results while | ||
7 | - * sending audio. This method is only available via the gRPC API (not REST). | ||
8 | - * | ||
9 | - * @param {object} config The configuration for the stream. This is | ||
10 | - * appropriately wrapped and sent as the first argument. It should be an | ||
11 | - * object conforming to the [StreamingRecognitionConfig]{@link StreamingRecognitionConfig} | ||
12 | - * structure. | ||
13 | - * @param {object} [options] Optional parameters. You can override the default | ||
14 | - * settings for this call, e.g, timeout, retries, paginations, etc. See | ||
15 | - * [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} | ||
16 | - * for the details. | ||
17 | - * @returns {stream} An object stream which is both readable and writable. It | ||
18 | - * accepts raw audio for the `write()` method, and will emit objects | ||
19 | - * representing [StreamingRecognizeResponse]{@link StreamingRecognizeResponse} | ||
20 | - * on the 'data' event asynchronously. | ||
21 | - * | ||
22 | - * @example | ||
23 | - * const speech = require('@google-cloud/speech'); | ||
24 | - * const client = new speech.SpeechClient(); | ||
25 | - * | ||
26 | - * const stream = client.streamingRecognize({ | ||
27 | - * config: { | ||
28 | - * encoding: 'LINEAR16', | ||
29 | - * languageCode: 'en-us', | ||
30 | - * sampleRateHertz: 44100, | ||
31 | - * }, | ||
32 | - * }).on('data', function(response) { | ||
33 | - * // doThingsWith(response); | ||
34 | - * }); | ||
35 | - * const request = {}; | ||
36 | - * // Write request objects. | ||
37 | - * stream.write(request); | ||
38 | - */ | ||
39 | - streamingRecognize(streamingConfig?: protosTypes.google.cloud.speech.v1.IStreamingRecognitionConfig | protosTypes.google.cloud.speech.v1p1beta1.IStreamingRecognitionConfig, options?: gax.CallOptions): pumpify; | ||
40 | -} |
1 | -"use strict"; | ||
2 | -/* | ||
3 | - * Copyright 2017 Google Inc. All Rights Reserved. | ||
4 | - * | ||
5 | - * Licensed under the Apache License, Version 2.0 (the "License"); | ||
6 | - * you may not use this file except in compliance with the License. | ||
7 | - * You may obtain a copy of the License at | ||
8 | - * | ||
9 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
10 | - * | ||
11 | - * Unless required by applicable law or agreed to in writing, software | ||
12 | - * distributed under the License is distributed on an "AS IS" BASIS, | ||
13 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
14 | - * See the License for the specific language governing permissions and | ||
15 | - * limitations under the License. | ||
16 | - */ | ||
17 | -Object.defineProperty(exports, "__esModule", { value: true }); | ||
18 | -exports.ImprovedStreamingClient = void 0; | ||
19 | -const common = require("@google-cloud/common"); | ||
20 | -const pumpify = require("pumpify"); | ||
21 | -const streamEvents = require("stream-events"); | ||
22 | -const stream_1 = require("stream"); | ||
23 | -class ImprovedStreamingClient { | ||
24 | - /** | ||
25 | - * Performs bidirectional streaming speech recognition: receive results while | ||
26 | - * sending audio. This method is only available via the gRPC API (not REST). | ||
27 | - * | ||
28 | - * @param {object} config The configuration for the stream. This is | ||
29 | - * appropriately wrapped and sent as the first argument. It should be an | ||
30 | - * object conforming to the [StreamingRecognitionConfig]{@link StreamingRecognitionConfig} | ||
31 | - * structure. | ||
32 | - * @param {object} [options] Optional parameters. You can override the default | ||
33 | - * settings for this call, e.g, timeout, retries, paginations, etc. See | ||
34 | - * [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} | ||
35 | - * for the details. | ||
36 | - * @returns {stream} An object stream which is both readable and writable. It | ||
37 | - * accepts raw audio for the `write()` method, and will emit objects | ||
38 | - * representing [StreamingRecognizeResponse]{@link StreamingRecognizeResponse} | ||
39 | - * on the 'data' event asynchronously. | ||
40 | - * | ||
41 | - * @example | ||
42 | - * const speech = require('@google-cloud/speech'); | ||
43 | - * const client = new speech.SpeechClient(); | ||
44 | - * | ||
45 | - * const stream = client.streamingRecognize({ | ||
46 | - * config: { | ||
47 | - * encoding: 'LINEAR16', | ||
48 | - * languageCode: 'en-us', | ||
49 | - * sampleRateHertz: 44100, | ||
50 | - * }, | ||
51 | - * }).on('data', function(response) { | ||
52 | - * // doThingsWith(response); | ||
53 | - * }); | ||
54 | - * const request = {}; | ||
55 | - * // Write request objects. | ||
56 | - * stream.write(request); | ||
57 | - */ | ||
58 | - streamingRecognize(streamingConfig, options) { | ||
59 | - options = options || {}; | ||
60 | - streamingConfig = streamingConfig || {}; | ||
61 | - // Format the audio content as input request for pipeline | ||
62 | - const recognizeStream = streamEvents(new pumpify.obj()); | ||
63 | - // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
64 | - const requestStream = this | ||
65 | - ._streamingRecognize(options) | ||
66 | - .on('error', (err) => { | ||
67 | - recognizeStream.destroy(err); | ||
68 | - }) | ||
69 | - .on('response', (response) => { | ||
70 | - recognizeStream.emit('response', response); | ||
71 | - }); | ||
72 | - // Attach the events to the request stream, but only do so | ||
73 | - // when the first write (of data) comes in. | ||
74 | - // | ||
75 | - // This also means that the sending of the initial request (with the | ||
76 | - // config) is delayed until we get the first burst of data. | ||
77 | - recognizeStream.once('writing', () => { | ||
78 | - // The first message should contain the streaming config. | ||
79 | - requestStream.write({ streamingConfig }); | ||
80 | - // Set up appropriate piping between the stream returned by | ||
81 | - // the underlying API method and the one that we return. | ||
82 | - recognizeStream.setPipeline([ | ||
83 | - // Format the user's input. | ||
84 | - // This entails that the user sends raw audio; it is wrapped in | ||
85 | - // the appropriate request structure. | ||
86 | - new stream_1.PassThrough({ | ||
87 | - objectMode: true, | ||
88 | - transform: (audioContent, _, next) => { | ||
89 | - if (audioContent !== undefined) { | ||
90 | - next(undefined, { audioContent }); | ||
91 | - return; | ||
92 | - } | ||
93 | - next(); | ||
94 | - }, | ||
95 | - }), | ||
96 | - requestStream, | ||
97 | - new stream_1.PassThrough({ | ||
98 | - objectMode: true, | ||
99 | - transform: (response, enc, next) => { | ||
100 | - if (response.error) { | ||
101 | - next(new common.util.ApiError(response.error)); | ||
102 | - return; | ||
103 | - } | ||
104 | - next(undefined, response); | ||
105 | - }, | ||
106 | - }), | ||
107 | - ]); | ||
108 | - }); | ||
109 | - return recognizeStream; | ||
110 | - } | ||
111 | -} | ||
112 | -exports.ImprovedStreamingClient = ImprovedStreamingClient; | ||
113 | -//# sourceMappingURL=helpers.js.map | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEH,+CAA+C;AAC/C,mCAAmC;AACnC,8CAA8C;AAC9C,mCAAmC;AAInC,MAAa,uBAAuB;IAClC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,kBAAkB,CAChB,e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,GAAG,EAAE,IAAI,EAAE,EAAE;wBACjC,IAAI,QAAQ,CAAC,KAAK,EAAE;4BAClB,IAAI,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;4BAC/C,OAAO;yBACR;wBACD,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;oBAC5B,CAAC;iBACF,CAAC;aACH,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,eAAe,CAAC;IACzB,CAAC;CACF;AAzGD,0DAyGC"} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -import * as v1p1beta1 from './v1p1beta1'; | ||
2 | -import * as v1 from './v1'; | ||
3 | -declare const SpeechClient: typeof v1.SpeechClient; | ||
4 | -declare type SpeechClient = v1.SpeechClient; | ||
5 | -export { v1, v1p1beta1, SpeechClient }; | ||
6 | -declare const _default: { | ||
7 | - v1: typeof v1; | ||
8 | - v1p1beta1: typeof v1p1beta1; | ||
9 | - SpeechClient: typeof v1.SpeechClient; | ||
10 | -}; | ||
11 | -export default _default; | ||
12 | -import * as protos from '../protos/protos'; | ||
13 | -export { protos }; |
1 | -"use strict"; | ||
2 | -// Copyright 2018 Google LLC | ||
3 | -// | ||
4 | -// Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | -// you may not use this file except in compliance with the License. | ||
6 | -// You may obtain a copy of the License at | ||
7 | -// | ||
8 | -// https://www.apache.org/licenses/LICENSE-2.0 | ||
9 | -// | ||
10 | -// Unless required by applicable law or agreed to in writing, software | ||
11 | -// distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | -// See the License for the specific language governing permissions and | ||
14 | -// limitations under the License. | ||
15 | -Object.defineProperty(exports, "__esModule", { value: true }); | ||
16 | -exports.protos = exports.SpeechClient = exports.v1p1beta1 = exports.v1 = void 0; | ||
17 | -const helpers_1 = require("./helpers"); | ||
18 | -const v1p1beta1 = require("./v1p1beta1"); | ||
19 | -exports.v1p1beta1 = v1p1beta1; | ||
20 | -const v1 = require("./v1"); | ||
21 | -exports.v1 = v1; | ||
22 | -// The following code is adapted from http://www.typescriptlang.org/docs/handbook/mixins.html | ||
23 | -// tslint:disable-next-line no-any | ||
24 | -Object.defineProperty(v1.SpeechClient.prototype, 'streamingRecognize', Object.getOwnPropertyDescriptor(helpers_1.ImprovedStreamingClient.prototype, 'streamingRecognize')); | ||
25 | -Object.defineProperty(v1p1beta1.SpeechClient.prototype, 'streamingRecognize', Object.getOwnPropertyDescriptor(helpers_1.ImprovedStreamingClient.prototype, 'streamingRecognize')); | ||
26 | -const SpeechClient = v1.SpeechClient; | ||
27 | -exports.SpeechClient = SpeechClient; | ||
28 | -// For compatibility with JavaScript libraries we need to provide this default export: | ||
29 | -// tslint:disable-next-line no-default-export | ||
30 | -exports.default = { v1, v1p1beta1, SpeechClient }; | ||
31 | -const protos = require("../protos/protos"); | ||
32 | -exports.protos = protos; | ||
33 | -//# sourceMappingURL=index.js.map | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAEjC,uCAAkD;AAClD,yCAAyC;AAwB7B,8BAAS;AAvBrB,2BAA2B;AAuBnB,gBAAE;AArBV,6FAA6F;AAC7F,kCAAkC;AAClC,MAAM,CAAC,cAAc,CACnB,EAAE,CAAC,YAAY,CAAC,SAAS,EACzB,oBAAoB,EACpB,MAAM,CAAC,wBAAwB,CAC7B,iCAAuB,CAAC,SAAS,EACjC,oBAAoB,CACpB,CACH,CAAC;AACF,MAAM,CAAC,cAAc,CACnB,SAAS,CAAC,YAAY,CAAC,SAAS,EAChC,oBAAoB,EACpB,MAAM,CAAC,wBAAwB,CAC7B,iCAAuB,CAAC,SAAS,EACjC,oBAAoB,CACpB,CACH,CAAC;AAEF,MAAM,YAAY,GAAG,EAAE,CAAC,YAAY,CAAC;AAEd,oCAAY;AACnC,sFAAsF;AACtF,6CAA6C;AAC7C,kBAAe,EAAC,EAAE,EAAE,SAAS,EAAE,YAAY,EAAC,CAAC;AAC7C,2CAA2C;AACnC,wBAAM"} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -export { SpeechClient } from './speech_client'; |
1 | -"use strict"; | ||
2 | -// Copyright 2021 Google LLC | ||
3 | -// | ||
4 | -// Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | -// you may not use this file except in compliance with the License. | ||
6 | -// You may obtain a copy of the License at | ||
7 | -// | ||
8 | -// https://www.apache.org/licenses/LICENSE-2.0 | ||
9 | -// | ||
10 | -// Unless required by applicable law or agreed to in writing, software | ||
11 | -// distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | -// See the License for the specific language governing permissions and | ||
14 | -// limitations under the License. | ||
15 | -// | ||
16 | -// ** This file is automatically generated by gapic-generator-typescript. ** | ||
17 | -// ** https://github.com/googleapis/gapic-generator-typescript ** | ||
18 | -// ** All changes to this file may be overwritten. ** | ||
19 | -Object.defineProperty(exports, "__esModule", { value: true }); | ||
20 | -var speech_client_1 = require("./speech_client"); | ||
21 | -Object.defineProperty(exports, "SpeechClient", { enumerable: true, get: function () { return speech_client_1.SpeechClient; } }); | ||
22 | -//# sourceMappingURL=index.js.map | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1/index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,4EAA4E;AAC5E,iEAAiE;AACjE,qDAAqD;;AAErD,iDAA6C;AAArC,6GAAA,YAAY,OAAA"} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -import * as gax from 'google-gax'; | ||
2 | -import { Callback, CallOptions, Descriptors, ClientOptions, LROperation } from 'google-gax'; | ||
3 | -import * as protos from '../../protos/protos'; | ||
4 | -/** | ||
5 | - * Service that implements Google Cloud Speech API. | ||
6 | - * @class | ||
7 | - * @memberof v1 | ||
8 | - */ | ||
9 | -export declare class SpeechClient { | ||
10 | - private _terminated; | ||
11 | - private _opts; | ||
12 | - private _gaxModule; | ||
13 | - private _gaxGrpc; | ||
14 | - private _protos; | ||
15 | - private _defaults; | ||
16 | - auth: gax.GoogleAuth; | ||
17 | - descriptors: Descriptors; | ||
18 | - innerApiCalls: { | ||
19 | - [name: string]: Function; | ||
20 | - }; | ||
21 | - operationsClient: gax.OperationsClient; | ||
22 | - speechStub?: Promise<{ | ||
23 | - [name: string]: Function; | ||
24 | - }>; | ||
25 | - /** | ||
26 | - * Construct an instance of SpeechClient. | ||
27 | - * | ||
28 | - * @param {object} [options] - The configuration object. | ||
29 | - * The options accepted by the constructor are described in detail | ||
30 | - * in [this document](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#creating-the-client-instance). | ||
31 | - * The common options are: | ||
32 | - * @param {object} [options.credentials] - Credentials object. | ||
33 | - * @param {string} [options.credentials.client_email] | ||
34 | - * @param {string} [options.credentials.private_key] | ||
35 | - * @param {string} [options.email] - Account email address. Required when | ||
36 | - * using a .pem or .p12 keyFilename. | ||
37 | - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or | ||
38 | - * .p12 key downloaded from the Google Developers Console. If you provide | ||
39 | - * a path to a JSON file, the projectId option below is not necessary. | ||
40 | - * NOTE: .pem and .p12 require you to specify options.email as well. | ||
41 | - * @param {number} [options.port] - The port on which to connect to | ||
42 | - * the remote host. | ||
43 | - * @param {string} [options.projectId] - The project ID from the Google | ||
44 | - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check | ||
45 | - * the environment variable GCLOUD_PROJECT for your project ID. If your | ||
46 | - * app is running in an environment which supports | ||
47 | - * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, | ||
48 | - * your project ID will be detected automatically. | ||
49 | - * @param {string} [options.apiEndpoint] - The domain name of the | ||
50 | - * API remote host. | ||
51 | - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. | ||
52 | - * Follows the structure of {@link gapicConfig}. | ||
53 | - * @param {boolean} [options.fallback] - Use HTTP fallback mode. | ||
54 | - * In fallback mode, a special browser-compatible transport implementation is used | ||
55 | - * instead of gRPC transport. In browser context (if the `window` object is defined) | ||
56 | - * the fallback mode is enabled automatically; set `options.fallback` to `false` | ||
57 | - * if you need to override this behavior. | ||
58 | - */ | ||
59 | - constructor(opts?: ClientOptions); | ||
60 | - /** | ||
61 | - * Initialize the client. | ||
62 | - * Performs asynchronous operations (such as authentication) and prepares the client. | ||
63 | - * This function will be called automatically when any class method is called for the | ||
64 | - * first time, but if you need to initialize it before calling an actual method, | ||
65 | - * feel free to call initialize() directly. | ||
66 | - * | ||
67 | - * You can await on this method if you want to make sure the client is initialized. | ||
68 | - * | ||
69 | - * @returns {Promise} A promise that resolves to an authenticated service stub. | ||
70 | - */ | ||
71 | - initialize(): Promise<{ | ||
72 | - [name: string]: Function; | ||
73 | - }>; | ||
74 | - /** | ||
75 | - * The DNS address for this API service. | ||
76 | - * @returns {string} The DNS address for this service. | ||
77 | - */ | ||
78 | - static get servicePath(): string; | ||
79 | - /** | ||
80 | - * The DNS address for this API service - same as servicePath(), | ||
81 | - * exists for compatibility reasons. | ||
82 | - * @returns {string} The DNS address for this service. | ||
83 | - */ | ||
84 | - static get apiEndpoint(): string; | ||
85 | - /** | ||
86 | - * The port for this API service. | ||
87 | - * @returns {number} The default port for this service. | ||
88 | - */ | ||
89 | - static get port(): number; | ||
90 | - /** | ||
91 | - * The scopes needed to make gRPC calls for every method defined | ||
92 | - * in this service. | ||
93 | - * @returns {string[]} List of default scopes. | ||
94 | - */ | ||
95 | - static get scopes(): string[]; | ||
96 | - getProjectId(): Promise<string>; | ||
97 | - getProjectId(callback: Callback<string, undefined, undefined>): void; | ||
98 | - recognize(request: protos.google.cloud.speech.v1.IRecognizeRequest, options?: CallOptions): Promise<[protos.google.cloud.speech.v1.IRecognizeResponse, protos.google.cloud.speech.v1.IRecognizeRequest | undefined, {} | undefined]>; | ||
99 | - recognize(request: protos.google.cloud.speech.v1.IRecognizeRequest, options: CallOptions, callback: Callback<protos.google.cloud.speech.v1.IRecognizeResponse, protos.google.cloud.speech.v1.IRecognizeRequest | null | undefined, {} | null | undefined>): void; | ||
100 | - recognize(request: protos.google.cloud.speech.v1.IRecognizeRequest, callback: Callback<protos.google.cloud.speech.v1.IRecognizeResponse, protos.google.cloud.speech.v1.IRecognizeRequest | null | undefined, {} | null | undefined>): void; | ||
101 | - /** | ||
102 | - * Performs bidirectional streaming speech recognition: receive results while | ||
103 | - * sending audio. This method is only available via the gRPC API (not REST). | ||
104 | - * | ||
105 | - * @param {object} [options] | ||
106 | - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. | ||
107 | - * @returns {Stream} | ||
108 | - * An object stream which is both readable and writable. It accepts objects | ||
109 | - * representing [StreamingRecognizeRequest]{@link google.cloud.speech.v1.StreamingRecognizeRequest} for write() method, and | ||
110 | - * will emit objects representing [StreamingRecognizeResponse]{@link google.cloud.speech.v1.StreamingRecognizeResponse} on 'data' event asynchronously. | ||
111 | - * Please see the | ||
112 | - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#bi-directional-streaming) | ||
113 | - * for more details and examples. | ||
114 | - * @example | ||
115 | - * const stream = client.streamingRecognize(); | ||
116 | - * stream.on('data', (response) => { ... }); | ||
117 | - * stream.on('end', () => { ... }); | ||
118 | - * stream.write(request); | ||
119 | - * stream.end(); | ||
120 | - */ | ||
121 | - _streamingRecognize(options?: CallOptions): gax.CancellableStream; | ||
122 | - longRunningRecognize(request: protos.google.cloud.speech.v1.ILongRunningRecognizeRequest, options?: CallOptions): Promise<[LROperation<protos.google.cloud.speech.v1.ILongRunningRecognizeResponse, protos.google.cloud.speech.v1.ILongRunningRecognizeMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined]>; | ||
123 | - longRunningRecognize(request: protos.google.cloud.speech.v1.ILongRunningRecognizeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.speech.v1.ILongRunningRecognizeResponse, protos.google.cloud.speech.v1.ILongRunningRecognizeMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; | ||
124 | - longRunningRecognize(request: protos.google.cloud.speech.v1.ILongRunningRecognizeRequest, callback: Callback<LROperation<protos.google.cloud.speech.v1.ILongRunningRecognizeResponse, protos.google.cloud.speech.v1.ILongRunningRecognizeMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; | ||
125 | - /** | ||
126 | - * Check the status of the long running operation returned by `longRunningRecognize()`. | ||
127 | - * @param {String} name | ||
128 | - * The operation name that will be passed. | ||
129 | - * @returns {Promise} - The promise which resolves to an object. | ||
130 | - * The decoded operation object has result and metadata field to get information from. | ||
131 | - * Please see the | ||
132 | - * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) | ||
133 | - * for more details and examples. | ||
134 | - * @example | ||
135 | - * const decodedOperation = await checkLongRunningRecognizeProgress(name); | ||
136 | - * console.log(decodedOperation.result); | ||
137 | - * console.log(decodedOperation.done); | ||
138 | - * console.log(decodedOperation.metadata); | ||
139 | - */ | ||
140 | - checkLongRunningRecognizeProgress(name: string): Promise<LROperation<protos.google.cloud.speech.v1.LongRunningRecognizeResponse, protos.google.cloud.speech.v1.LongRunningRecognizeMetadata>>; | ||
141 | - /** | ||
142 | - * Terminate the gRPC channel and close the client. | ||
143 | - * | ||
144 | - * The client will no longer be usable and all future behavior is undefined. | ||
145 | - * @returns {Promise} A promise that resolves when the client is closed. | ||
146 | - */ | ||
147 | - close(): Promise<void>; | ||
148 | -} | ||
149 | -import { ImprovedStreamingClient } from '../helpers'; | ||
150 | -export interface SpeechClient extends ImprovedStreamingClient { | ||
151 | -} |
This diff is collapsed. Click to expand it.
1 | -{"version":3,"file":"speech_client.js","sourceRoot":"","sources":["../../../src/v1/speech_client.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,4EAA4E;AAC5E,iEAAiE;AACjE,qDAAqD;;;AAErD,mBAAmB;AACnB,kCAAkC;AAUlC,uDAAwD;AACxD;;;;GAIG;AACH,2DAA2D;AAC3D,2CAA4C;AAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC;AAEzD;;;;GAIG;AACH,MAAa,YAAY;IAkBvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,YAAY,IAAoB;;QAnDxB,gBAAW,GAAG,KAAK,CAAC;QAO5B,gBAAW,GAAgB;YACzB,IAAI,EAAE,EAAE;YACR,MAAM,EAAE,EAAE;YACV,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,EAAE;SACb,CAAC;QAwCA,uDAAuD;QACvD,MAAM,aAAa,GAAG,IAAI,CAAC,WAAkC,CAAC;QAC9D,MAAM,WAAW,GACf,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,MAAI,IAAI,aAAJ,IAAI,uBAAJ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CAAC;gBACxB,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;CACF;AA5hBD,oCA4hBC"} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -{ | ||
2 | - "interfaces": { | ||
3 | - "google.cloud.speech.v1.Speech": { | ||
4 | - "retry_codes": { | ||
5 | - "non_idempotent": [], | ||
6 | - "idempotent": [ | ||
7 | - "DEADLINE_EXCEEDED", | ||
8 | - "UNAVAILABLE" | ||
9 | - ] | ||
10 | - }, | ||
11 | - "retry_params": { | ||
12 | - "default": { | ||
13 | - "initial_retry_delay_millis": 100, | ||
14 | - "retry_delay_multiplier": 1.3, | ||
15 | - "max_retry_delay_millis": 60000, | ||
16 | - "initial_rpc_timeout_millis": 60000, | ||
17 | - "rpc_timeout_multiplier": 1, | ||
18 | - "max_rpc_timeout_millis": 60000, | ||
19 | - "total_timeout_millis": 600000 | ||
20 | - } | ||
21 | - }, | ||
22 | - "methods": { | ||
23 | - "Recognize": { | ||
24 | - "timeout_millis": 5000000, | ||
25 | - "retry_codes_name": "idempotent", | ||
26 | - "retry_params_name": "default" | ||
27 | - }, | ||
28 | - "LongRunningRecognize": { | ||
29 | - "timeout_millis": 5000000, | ||
30 | - "retry_codes_name": "non_idempotent", | ||
31 | - "retry_params_name": "default" | ||
32 | - }, | ||
33 | - "StreamingRecognize": { | ||
34 | - "timeout_millis": 5000000, | ||
35 | - "retry_codes_name": "idempotent", | ||
36 | - "retry_params_name": "default" | ||
37 | - } | ||
38 | - } | ||
39 | - } | ||
40 | - } | ||
41 | -} |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@google-cloud/speech/build/src/v1p1beta1/adaptation_client_config.json
deleted
100644 → 0
1 | -{ | ||
2 | - "interfaces": { | ||
3 | - "google.cloud.speech.v1p1beta1.Adaptation": { | ||
4 | - "retry_codes": { | ||
5 | - "non_idempotent": [], | ||
6 | - "idempotent": [ | ||
7 | - "DEADLINE_EXCEEDED", | ||
8 | - "UNAVAILABLE" | ||
9 | - ] | ||
10 | - }, | ||
11 | - "retry_params": { | ||
12 | - "default": { | ||
13 | - "initial_retry_delay_millis": 100, | ||
14 | - "retry_delay_multiplier": 1.3, | ||
15 | - "max_retry_delay_millis": 60000, | ||
16 | - "initial_rpc_timeout_millis": 60000, | ||
17 | - "rpc_timeout_multiplier": 1, | ||
18 | - "max_rpc_timeout_millis": 60000, | ||
19 | - "total_timeout_millis": 600000 | ||
20 | - } | ||
21 | - }, | ||
22 | - "methods": { | ||
23 | - "CreatePhraseSet": { | ||
24 | - "retry_codes_name": "non_idempotent", | ||
25 | - "retry_params_name": "default" | ||
26 | - }, | ||
27 | - "GetPhraseSet": { | ||
28 | - "retry_codes_name": "non_idempotent", | ||
29 | - "retry_params_name": "default" | ||
30 | - }, | ||
31 | - "ListPhraseSet": { | ||
32 | - "retry_codes_name": "non_idempotent", | ||
33 | - "retry_params_name": "default" | ||
34 | - }, | ||
35 | - "UpdatePhraseSet": { | ||
36 | - "retry_codes_name": "non_idempotent", | ||
37 | - "retry_params_name": "default" | ||
38 | - }, | ||
39 | - "DeletePhraseSet": { | ||
40 | - "retry_codes_name": "non_idempotent", | ||
41 | - "retry_params_name": "default" | ||
42 | - }, | ||
43 | - "CreateCustomClass": { | ||
44 | - "retry_codes_name": "non_idempotent", | ||
45 | - "retry_params_name": "default" | ||
46 | - }, | ||
47 | - "GetCustomClass": { | ||
48 | - "retry_codes_name": "non_idempotent", | ||
49 | - "retry_params_name": "default" | ||
50 | - }, | ||
51 | - "ListCustomClasses": { | ||
52 | - "retry_codes_name": "non_idempotent", | ||
53 | - "retry_params_name": "default" | ||
54 | - }, | ||
55 | - "UpdateCustomClass": { | ||
56 | - "retry_codes_name": "non_idempotent", | ||
57 | - "retry_params_name": "default" | ||
58 | - }, | ||
59 | - "DeleteCustomClass": { | ||
60 | - "retry_codes_name": "non_idempotent", | ||
61 | - "retry_params_name": "default" | ||
62 | - } | ||
63 | - } | ||
64 | - } | ||
65 | - } | ||
66 | -} |
1 | -"use strict"; | ||
2 | -// Copyright 2021 Google LLC | ||
3 | -// | ||
4 | -// Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | -// you may not use this file except in compliance with the License. | ||
6 | -// You may obtain a copy of the License at | ||
7 | -// | ||
8 | -// https://www.apache.org/licenses/LICENSE-2.0 | ||
9 | -// | ||
10 | -// Unless required by applicable law or agreed to in writing, software | ||
11 | -// distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | -// See the License for the specific language governing permissions and | ||
14 | -// limitations under the License. | ||
15 | -// | ||
16 | -// ** This file is automatically generated by gapic-generator-typescript. ** | ||
17 | -// ** https://github.com/googleapis/gapic-generator-typescript ** | ||
18 | -// ** All changes to this file may be overwritten. ** | ||
19 | -Object.defineProperty(exports, "__esModule", { value: true }); | ||
20 | -var adaptation_client_1 = require("./adaptation_client"); | ||
21 | -Object.defineProperty(exports, "AdaptationClient", { enumerable: true, get: function () { return adaptation_client_1.AdaptationClient; } }); | ||
22 | -var speech_client_1 = require("./speech_client"); | ||
23 | -Object.defineProperty(exports, "SpeechClient", { enumerable: true, get: function () { return speech_client_1.SpeechClient; } }); | ||
24 | -//# sourceMappingURL=index.js.map | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1p1beta1/index.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,4EAA4E;AAC5E,iEAAiE;AACjE,qDAAqD;;AAErD,yDAAqD;AAA7C,qHAAA,gBAAgB,OAAA;AACxB,iDAA6C;AAArC,6GAAA,YAAY,OAAA"} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 | -{"version":3,"file":"speech_client.js","sourceRoot":"","sources":["../../../src/v1p1beta1/speech_client.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,4EAA4E;AAC5E,iEAAiE;AACjE,qDAAqD;;;AAErD,mBAAmB;AACnB,kCAAkC;AAUlC,uDAAwD;AACxD;;;;GAIG;AACH,2DAA2D;AAC3D,2CAA4C;AAC5C,MAAM,OAAO,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC;AAEzD;;;;GAIG;AACH,MAAa,YAAY;IAmBvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,YAAY,IAAoB;;QApDxB,gBAAW,GAAG,KAAK,CAAC;QAO5B,gBAAW,GAAgB;YACzB,IAAI,EAAE,EAAE;YACR,MAAM,EAAE,EAAE;YACV,WAAW,EAAE,EAAE;YACf,QAAQ,EAAE,EAAE;SACb,CAAC;QAyCA,uDAAuD;QACvD,MAAM,aAAa,GAAG,IAAI,CAAC,WAAkC,CAAC;QAC9D,MAAM,WAAW,GACf,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,MAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,CAAA,IAAI,aAAa,CAAC,WAAW,CAAC;QACtE,MAAM,IAAI,GAAG,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,KAAI,aAAa,CAAC,IAAI,CAA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AC,aAAa,CAAC;aACjE,UAAU,CAAC;IAChB,CAAC;IAED;;;;;OAKG;IACH,KAAK;QACH,IAAI,CAAC,UAAU,EAAE,CAAC;QAClB,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;YACrB,OAAO,IAAI,CAAC,UAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBAClC,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;gBACxB,IAAI,CAAC,KAAK,EAAE,CAAC;YACf,CAAC,CAAC,CAAC;SACJ;QACD,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC3B,CAAC;CACF;AAxpBD,oCAwpBC"} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -{ | ||
2 | - "interfaces": { | ||
3 | - "google.cloud.speech.v1p1beta1.Speech": { | ||
4 | - "retry_codes": { | ||
5 | - "non_idempotent": [], | ||
6 | - "idempotent": [ | ||
7 | - "DEADLINE_EXCEEDED", | ||
8 | - "UNAVAILABLE" | ||
9 | - ] | ||
10 | - }, | ||
11 | - "retry_params": { | ||
12 | - "default": { | ||
13 | - "initial_retry_delay_millis": 100, | ||
14 | - "retry_delay_multiplier": 1.3, | ||
15 | - "max_retry_delay_millis": 60000, | ||
16 | - "initial_rpc_timeout_millis": 60000, | ||
17 | - "rpc_timeout_multiplier": 1, | ||
18 | - "max_rpc_timeout_millis": 60000, | ||
19 | - "total_timeout_millis": 600000 | ||
20 | - } | ||
21 | - }, | ||
22 | - "methods": { | ||
23 | - "Recognize": { | ||
24 | - "timeout_millis": 5000000, | ||
25 | - "retry_codes_name": "idempotent", | ||
26 | - "retry_params_name": "default" | ||
27 | - }, | ||
28 | - "LongRunningRecognize": { | ||
29 | - "timeout_millis": 5000000, | ||
30 | - "retry_codes_name": "non_idempotent", | ||
31 | - "retry_params_name": "default" | ||
32 | - }, | ||
33 | - "StreamingRecognize": { | ||
34 | - "timeout_millis": 5000000, | ||
35 | - "retry_codes_name": "idempotent", | ||
36 | - "retry_params_name": "default" | ||
37 | - } | ||
38 | - } | ||
39 | - } | ||
40 | - } | ||
41 | -} |
1 | -{ | ||
2 | - "_from": "@google-cloud/speech", | ||
3 | - "_id": "@google-cloud/speech@4.5.2", | ||
4 | - "_inBundle": false, | ||
5 | - "_integrity": "sha512-MAxa6tlXzA0ZDL2Or7U7GTjrlbjU7ZpSxAeu0gUe79Df1W3ALcFl33zMJmBAc/xzKWZ+yQ1XIdPIYq2ydam4WQ==", | ||
6 | - "_location": "/@google-cloud/speech", | ||
7 | - "_phantomChildren": {}, | ||
8 | - "_requested": { | ||
9 | - "type": "tag", | ||
10 | - "registry": true, | ||
11 | - "raw": "@google-cloud/speech", | ||
12 | - "name": "@google-cloud/speech", | ||
13 | - "escapedName": "@google-cloud%2fspeech", | ||
14 | - "scope": "@google-cloud", | ||
15 | - "rawSpec": "", | ||
16 | - "saveSpec": null, | ||
17 | - "fetchSpec": "latest" | ||
18 | - }, | ||
19 | - "_requiredBy": [ | ||
20 | - "#USER", | ||
21 | - "/" | ||
22 | - ], | ||
23 | - "_resolved": "https://registry.npmjs.org/@google-cloud/speech/-/speech-4.5.2.tgz", | ||
24 | - "_shasum": "96fab034f49ecb319c2ed8531cbcfa02b7b9b87c", | ||
25 | - "_spec": "@google-cloud/speech", | ||
26 | - "_where": "C:\\Users\\qud97\\Desktop\\opensource\\Voicoding", | ||
27 | - "author": { | ||
28 | - "name": "Google Inc." | ||
29 | - }, | ||
30 | - "bugs": { | ||
31 | - "url": "https://github.com/googleapis/nodejs-speech/issues" | ||
32 | - }, | ||
33 | - "bundleDependencies": false, | ||
34 | - "dependencies": { | ||
35 | - "@google-cloud/common": "^3.0.0", | ||
36 | - "@types/pumpify": "^1.4.1", | ||
37 | - "google-gax": "^2.12.0", | ||
38 | - "protobufjs": "^6.8.6", | ||
39 | - "pumpify": "^2.0.0", | ||
40 | - "stream-events": "^1.0.4", | ||
41 | - "uuid": "^8.3.2" | ||
42 | - }, | ||
43 | - "deprecated": false, | ||
44 | - "description": "Cloud Speech Client Library for Node.js", | ||
45 | - "devDependencies": { | ||
46 | - "@microsoft/api-documenter": "^7.8.10", | ||
47 | - "@microsoft/api-extractor": "^7.8.10", | ||
48 | - "@types/mocha": "^8.0.0", | ||
49 | - "@types/node": "^14.0.0", | ||
50 | - "@types/sinon": "^10.0.0", | ||
51 | - "c8": "^7.0.0", | ||
52 | - "codecov": "^3.0.2", | ||
53 | - "gts": "^2.0.0", | ||
54 | - "jsdoc": "^3.5.5", | ||
55 | - "jsdoc-fresh": "^1.0.1", | ||
56 | - "jsdoc-region-tag": "^1.0.2", | ||
57 | - "linkinator": "^2.0.0", | ||
58 | - "mocha": "^8.0.0", | ||
59 | - "null-loader": "^4.0.0", | ||
60 | - "pack-n-play": "^1.0.0-2", | ||
61 | - "sinon": "^11.0.0", | ||
62 | - "ts-loader": "^8.0.0", | ||
63 | - "typescript": "^3.8.3", | ||
64 | - "webpack": "^5.0.0", | ||
65 | - "webpack-cli": "^4.0.0" | ||
66 | - }, | ||
67 | - "engines": { | ||
68 | - "node": ">=10" | ||
69 | - }, | ||
70 | - "files": [ | ||
71 | - "build/protos", | ||
72 | - "build/src", | ||
73 | - "AUTHORS", | ||
74 | - "LICENSE" | ||
75 | - ], | ||
76 | - "homepage": "https://github.com/googleapis/nodejs-speech#readme", | ||
77 | - "keywords": [ | ||
78 | - "google apis client", | ||
79 | - "google api client", | ||
80 | - "google apis", | ||
81 | - "google api", | ||
82 | - "google", | ||
83 | - "google cloud platform", | ||
84 | - "google cloud", | ||
85 | - "cloud", | ||
86 | - "google speech", | ||
87 | - "speech", | ||
88 | - "Google Cloud Speech API" | ||
89 | - ], | ||
90 | - "license": "Apache-2.0", | ||
91 | - "main": "./build/src/index.js", | ||
92 | - "name": "@google-cloud/speech", | ||
93 | - "repository": { | ||
94 | - "type": "git", | ||
95 | - "url": "git+https://github.com/googleapis/nodejs-speech.git" | ||
96 | - }, | ||
97 | - "scripts": { | ||
98 | - "api-documenter": "api-documenter yaml --input-folder=temp", | ||
99 | - "api-extractor": "api-extractor run --local", | ||
100 | - "clean": "gts clean", | ||
101 | - "compile": "tsc -p . && cp system-test/*.js build/system-test/ && cp -r protos build/", | ||
102 | - "compile-protos": "compileProtos src", | ||
103 | - "docs": "jsdoc -c .jsdoc.js", | ||
104 | - "docs-test": "linkinator docs", | ||
105 | - "fix": "gts fix", | ||
106 | - "lint": "gts check", | ||
107 | - "precompile": "gts clean", | ||
108 | - "predocs-test": "npm run docs", | ||
109 | - "prelint": "cd samples; npm link ../; npm install", | ||
110 | - "prepare": "npm run compile-protos && npm run compile", | ||
111 | - "pretest": "npm run compile", | ||
112 | - "samples-test": "cd samples/ && npm link ../ && npm test && cd ../", | ||
113 | - "system-test": "c8 mocha build/system-test/*.js --timeout 600000", | ||
114 | - "test": "c8 mocha build/test/*.js" | ||
115 | - }, | ||
116 | - "version": "4.5.2" | ||
117 | -} |
node_modules/@grpc/grpc-js/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@grpc/grpc-js/README.md
deleted
100644 → 0
1 | -# Pure JavaScript gRPC Client | ||
2 | - | ||
3 | -## Installation | ||
4 | - | ||
5 | -Node 12 is recommended. The exact set of compatible Node versions can be found in the `engines` field of the `package.json` file. | ||
6 | - | ||
7 | -```sh | ||
8 | -npm install @grpc/grpc-js | ||
9 | -``` | ||
10 | - | ||
11 | -## Documentation | ||
12 | - | ||
13 | -Documentation specifically for the `@grpc/grpc-js` package is currently not available. However, [documentation is available for the `grpc` package](https://grpc.github.io/grpc/node/grpc.html), and the two packages contain mostly the same interface. There are a few notable differences, however, and these differences are noted in the "Migrating from grpc" section below. | ||
14 | - | ||
15 | -## Features | ||
16 | - | ||
17 | -- Clients | ||
18 | -- Automatic reconnection | ||
19 | -- Servers | ||
20 | -- Streaming | ||
21 | -- Metadata | ||
22 | -- Partial compression support: clients can decompress response messages | ||
23 | -- Pick first and round robin load balancing policies | ||
24 | -- Client Interceptors | ||
25 | -- Connection Keepalives | ||
26 | -- HTTP Connect support (proxies) | ||
27 | - | ||
28 | -This library does not directly handle `.proto` files. To use `.proto` files with this library we recommend using the `@grpc/proto-loader` package. | ||
29 | - | ||
30 | -## Migrating from [`grpc`](https://www.npmjs.com/package/grpc) | ||
31 | - | ||
32 | -`@grpc/grpc-js` is almost a drop-in replacement for `grpc`, but you may need to make a few code changes to use it: | ||
33 | - | ||
34 | -- If you are currently loading `.proto` files using `grpc.load`, that function is not available in this library. You should instead load your `.proto` files using `@grpc/proto-loader` and load the resulting package definition objects into `@grpc/grpc-js` using `grpc.loadPackageDefinition`. | ||
35 | -- If you are currently loading packages generated by `grpc-tools`, you should instead generate your files using the `generate_package_definition` option in `grpc-tools`, then load the object exported by the generated file into `@grpc/grpc-js` using `grpc.loadPackageDefinition`. | ||
36 | -- If you have a server and you are using `Server#bind` to bind ports, you will need to use `Server#bindAsync` instead. | ||
37 | - | ||
38 | -## Some Notes on API Guarantees | ||
39 | - | ||
40 | -The public API of this library follows semantic versioning, with some caveats: | ||
41 | - | ||
42 | -- Some methods are prefixed with an underscore. These methods are internal and should not be considered part of the public API. | ||
43 | -- The class `Call` is only exposed due to limitations of TypeScript. It should not be considered part of the public API. | ||
44 | -- In general, any API that is exposed by this library but is not exposed by the `grpc` library is likely an error and should not be considered part of the public API. | ||
45 | -- The `grpc.experimental` namespace contains APIs that have not stabilized. Any API in that namespace may break in any minor version update. |
1 | -export interface BackoffOptions { | ||
2 | - initialDelay?: number; | ||
3 | - multiplier?: number; | ||
4 | - jitter?: number; | ||
5 | - maxDelay?: number; | ||
6 | -} | ||
7 | -export declare class BackoffTimeout { | ||
8 | - private callback; | ||
9 | - private initialDelay; | ||
10 | - private multiplier; | ||
11 | - private maxDelay; | ||
12 | - private jitter; | ||
13 | - private nextDelay; | ||
14 | - private timerId; | ||
15 | - private running; | ||
16 | - private hasRef; | ||
17 | - constructor(callback: () => void, options?: BackoffOptions); | ||
18 | - /** | ||
19 | - * Call the callback after the current amount of delay time | ||
20 | - */ | ||
21 | - runOnce(): void; | ||
22 | - /** | ||
23 | - * Stop the timer. The callback will not be called until `runOnce` is called | ||
24 | - * again. | ||
25 | - */ | ||
26 | - stop(): void; | ||
27 | - /** | ||
28 | - * Reset the delay time to its initial value. | ||
29 | - */ | ||
30 | - reset(): void; | ||
31 | - isRunning(): boolean; | ||
32 | - ref(): void; | ||
33 | - unref(): void; | ||
34 | -} |
1 | -"use strict"; | ||
2 | -/* | ||
3 | - * Copyright 2019 gRPC authors. | ||
4 | - * | ||
5 | - * Licensed under the Apache License, Version 2.0 (the "License"); | ||
6 | - * you may not use this file except in compliance with the License. | ||
7 | - * You may obtain a copy of the License at | ||
8 | - * | ||
9 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
10 | - * | ||
11 | - * Unless required by applicable law or agreed to in writing, software | ||
12 | - * distributed under the License is distributed on an "AS IS" BASIS, | ||
13 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
14 | - * See the License for the specific language governing permissions and | ||
15 | - * limitations under the License. | ||
16 | - * | ||
17 | - */ | ||
18 | -Object.defineProperty(exports, "__esModule", { value: true }); | ||
19 | -exports.BackoffTimeout = void 0; | ||
20 | -const INITIAL_BACKOFF_MS = 1000; | ||
21 | -const BACKOFF_MULTIPLIER = 1.6; | ||
22 | -const MAX_BACKOFF_MS = 120000; | ||
23 | -const BACKOFF_JITTER = 0.2; | ||
24 | -/** | ||
25 | - * Get a number uniformly at random in the range [min, max) | ||
26 | - * @param min | ||
27 | - * @param max | ||
28 | - */ | ||
29 | -function uniformRandom(min, max) { | ||
30 | - return Math.random() * (max - min) + min; | ||
31 | -} | ||
32 | -class BackoffTimeout { | ||
33 | - constructor(callback, options) { | ||
34 | - this.callback = callback; | ||
35 | - this.initialDelay = INITIAL_BACKOFF_MS; | ||
36 | - this.multiplier = BACKOFF_MULTIPLIER; | ||
37 | - this.maxDelay = MAX_BACKOFF_MS; | ||
38 | - this.jitter = BACKOFF_JITTER; | ||
39 | - this.running = false; | ||
40 | - this.hasRef = true; | ||
41 | - if (options) { | ||
42 | - if (options.initialDelay) { | ||
43 | - this.initialDelay = options.initialDelay; | ||
44 | - } | ||
45 | - if (options.multiplier) { | ||
46 | - this.multiplier = options.multiplier; | ||
47 | - } | ||
48 | - if (options.jitter) { | ||
49 | - this.jitter = options.jitter; | ||
50 | - } | ||
51 | - if (options.maxDelay) { | ||
52 | - this.maxDelay = options.maxDelay; | ||
53 | - } | ||
54 | - } | ||
55 | - this.nextDelay = this.initialDelay; | ||
56 | - this.timerId = setTimeout(() => { }, 0); | ||
57 | - clearTimeout(this.timerId); | ||
58 | - } | ||
59 | - /** | ||
60 | - * Call the callback after the current amount of delay time | ||
61 | - */ | ||
62 | - runOnce() { | ||
63 | - var _a, _b; | ||
64 | - this.running = true; | ||
65 | - this.timerId = setTimeout(() => { | ||
66 | - this.callback(); | ||
67 | - this.running = false; | ||
68 | - }, this.nextDelay); | ||
69 | - if (!this.hasRef) { | ||
70 | - (_b = (_a = this.timerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
71 | - } | ||
72 | - const nextBackoff = Math.min(this.nextDelay * this.multiplier, this.maxDelay); | ||
73 | - const jitterMagnitude = nextBackoff * this.jitter; | ||
74 | - this.nextDelay = | ||
75 | - nextBackoff + uniformRandom(-jitterMagnitude, jitterMagnitude); | ||
76 | - } | ||
77 | - /** | ||
78 | - * Stop the timer. The callback will not be called until `runOnce` is called | ||
79 | - * again. | ||
80 | - */ | ||
81 | - stop() { | ||
82 | - clearTimeout(this.timerId); | ||
83 | - this.running = false; | ||
84 | - } | ||
85 | - /** | ||
86 | - * Reset the delay time to its initial value. | ||
87 | - */ | ||
88 | - reset() { | ||
89 | - this.nextDelay = this.initialDelay; | ||
90 | - } | ||
91 | - isRunning() { | ||
92 | - return this.running; | ||
93 | - } | ||
94 | - ref() { | ||
95 | - var _a, _b; | ||
96 | - this.hasRef = true; | ||
97 | - (_b = (_a = this.timerId).ref) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
98 | - } | ||
99 | - unref() { | ||
100 | - var _a, _b; | ||
101 | - this.hasRef = false; | ||
102 | - (_b = (_a = this.timerId).unref) === null || _b === void 0 ? void 0 : _b.call(_a); | ||
103 | - } | ||
104 | -} | ||
105 | -exports.BackoffTimeout = BackoffTimeout; | ||
106 | -//# sourceMappingURL=backoff-timeout.js.map | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -{"version":3,"file":"backoff-timeout.js","sourceRoot":"","sources":["../../src/backoff-timeout.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAEH,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,cAAc,GAAG,MAAM,CAAC;AAC9B,MAAM,cAAc,GAAG,GAAG,CAAC;AAE3B;;;;GAIG;AACH,SAAS,aAAa,CAAC,GAAW,EAAE,GAAW;IAC7C,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;AAC3C,CAAC;AASD,MAAa,cAAc;IAUzB,YAAoB,QAAoB,EAAE,OAAwB;QAA9C,aAAQ,GAAR,QAAQ,CAAY;QAThC,iBAAY,GAAW,kBAAkB,CAAC;QAC1C,eAAU,GAAW,kBAAkB,CAAC;QACxC,aAAQ,GAAW,cAAc,CAAC;QAClC,WAAM,GAAW,cAAc,CAAC;QAGhC,YAAO,GAAG,KAAK,CAAC;QAChB,WAAM,GAAG,IAAI,CAAC;QAGpB,IAAI,OAAO,EAAE;YACX,IAAI,OAAO,CAAC,YAAY,EAAE;gBACxB,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC;aAC1C;YACD,IAAI,OAAO,CAAC,UAAU,EAAE;gBACtB,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;aACtC;YACD,IAAI,OAAO,CAAC,MAAM,EAAE;gBAClB,IAAI,CAAC,MAAM,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,OAAO,CAAC;IACtB,CAAC;IAED,GAAG;;QACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,MAAA,MAAA,IAAI,CAAC,OAAO,EAAC,GAAG,mDAAK;IACvB,CAAC;IAED,KAAK;;QACH,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,MAAA,MAAA,IAAI,CAAC,OAAO,EAAC,KAAK,mDAAK;IACzB,CAAC;CACF;AAhFD,wCAgFC"} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -import { Call } from './call-stream'; | ||
2 | -import { Channel } from './channel'; | ||
3 | -import { BaseFilter, Filter, FilterFactory } from './filter'; | ||
4 | -import { Metadata } from './metadata'; | ||
5 | -export declare class CallCredentialsFilter extends BaseFilter implements Filter { | ||
6 | - private readonly channel; | ||
7 | - private readonly stream; | ||
8 | - private serviceUrl; | ||
9 | - constructor(channel: Channel, stream: Call); | ||
10 | - sendMetadata(metadata: Promise<Metadata>): Promise<Metadata>; | ||
11 | -} | ||
12 | -export declare class CallCredentialsFilterFactory implements FilterFactory<CallCredentialsFilter> { | ||
13 | - private readonly channel; | ||
14 | - constructor(channel: Channel); | ||
15 | - createFilter(callStream: Call): CallCredentialsFilter; | ||
16 | -} |
1 | -"use strict"; | ||
2 | -/* | ||
3 | - * Copyright 2019 gRPC authors. | ||
4 | - * | ||
5 | - * Licensed under the Apache License, Version 2.0 (the "License"); | ||
6 | - * you may not use this file except in compliance with the License. | ||
7 | - * You may obtain a copy of the License at | ||
8 | - * | ||
9 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
10 | - * | ||
11 | - * Unless required by applicable law or agreed to in writing, software | ||
12 | - * distributed under the License is distributed on an "AS IS" BASIS, | ||
13 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
14 | - * See the License for the specific language governing permissions and | ||
15 | - * limitations under the License. | ||
16 | - * | ||
17 | - */ | ||
18 | -Object.defineProperty(exports, "__esModule", { value: true }); | ||
19 | -exports.CallCredentialsFilterFactory = exports.CallCredentialsFilter = void 0; | ||
20 | -const filter_1 = require("./filter"); | ||
21 | -const constants_1 = require("./constants"); | ||
22 | -const uri_parser_1 = require("./uri-parser"); | ||
23 | -class CallCredentialsFilter extends filter_1.BaseFilter { | ||
24 | - constructor(channel, stream) { | ||
25 | - var _a, _b; | ||
26 | - super(); | ||
27 | - this.channel = channel; | ||
28 | - this.stream = stream; | ||
29 | - this.channel = channel; | ||
30 | - this.stream = stream; | ||
31 | - const splitPath = stream.getMethod().split('/'); | ||
32 | - let serviceName = ''; | ||
33 | - /* The standard path format is "/{serviceName}/{methodName}", so if we split | ||
34 | - * by '/', the first item should be empty and the second should be the | ||
35 | - * service name */ | ||
36 | - if (splitPath.length >= 2) { | ||
37 | - serviceName = splitPath[1]; | ||
38 | - } | ||
39 | - const hostname = (_b = (_a = uri_parser_1.splitHostPort(stream.getHost())) === null || _a === void 0 ? void 0 : _a.host) !== null && _b !== void 0 ? _b : 'localhost'; | ||
40 | - /* Currently, call credentials are only allowed on HTTPS connections, so we | ||
41 | - * can assume that the scheme is "https" */ | ||
42 | - this.serviceUrl = `https://${hostname}/${serviceName}`; | ||
43 | - } | ||
44 | - async sendMetadata(metadata) { | ||
45 | - const credentials = this.stream.getCredentials(); | ||
46 | - const credsMetadata = credentials.generateMetadata({ | ||
47 | - service_url: this.serviceUrl, | ||
48 | - }); | ||
49 | - const resultMetadata = await metadata; | ||
50 | - try { | ||
51 | - resultMetadata.merge(await credsMetadata); | ||
52 | - } | ||
53 | - catch (error) { | ||
54 | - this.stream.cancelWithStatus(constants_1.Status.UNAUTHENTICATED, `Failed to retrieve auth metadata with error: ${error.message}`); | ||
55 | - return Promise.reject('Failed to retrieve auth metadata'); | ||
56 | - } | ||
57 | - if (resultMetadata.get('authorization').length > 1) { | ||
58 | - this.stream.cancelWithStatus(constants_1.Status.INTERNAL, '"authorization" metadata cannot have multiple values'); | ||
59 | - return Promise.reject('"authorization" metadata cannot have multiple values'); | ||
60 | - } | ||
61 | - return resultMetadata; | ||
62 | - } | ||
63 | -} | ||
64 | -exports.CallCredentialsFilter = CallCredentialsFilter; | ||
65 | -class CallCredentialsFilterFactory { | ||
66 | - constructor(channel) { | ||
67 | - this.channel = channel; | ||
68 | - this.channel = channel; | ||
69 | - } | ||
70 | - createFilter(callStream) { | ||
71 | - return new CallCredentialsFilter(this.channel, callStream); | ||
72 | - } | ||
73 | -} | ||
74 | -exports.CallCredentialsFilterFactory = CallCredentialsFilterFactory; | ||
75 | -//# sourceMappingURL=call-credentials-filter.js.map | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -{"version":3,"file":"call-credentials-filter.js","sourceRoot":"","sources":["../../src/call-credentials-filter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAIH,qCAA6D;AAE7D,2CAAqC;AACrC,6CAA6C;AAG7C,MAAa,qBAAsB,SAAQ,mBAAU;IAEnD,YACmB,OAAgB,EAChB,MAAY;;QAE7B,KAAK,EAAE,CAAC;QAHS,YAAO,GAAP,OAAO,CAAS;QAChB,WAAM,GAAN,MAAM,CAAM;QAG7B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,MAAM,SAAS,GAAa,MAAM,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC1D,IAAI,WAAW,GAAG,EAAE,CAAC;QACrB;;0BAEkB;QAClB,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE;YACzB,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;SAC5B;QACD,MAAM,QAAQ,eAAG,0BAAa,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,0CAAE,IAAI,mCAAI,WAAW,CAAC;QACtE;mDAC2C;QAC3C,IAAI,CAAC,UAAU,GAAG,WAAW,QAAQ,IAAI,WAAW,EAAE,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,QAA2B;QAC5C,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;QACjD,MAAM,aAAa,GAAG,WAAW,CAAC,gBAAgB,CAAC;YACjD,WAAW,EAAE,IAAI,CAAC,UAAU;SAC7B,CAAC,CAAC;QACH,MAAM,cAAc,GAAG,MAAM,QAAQ,CAAC;QACtC,IAAI;YACF,cAAc,CAAC,KAAK,CAAC,MAAM,aAAa,CAAC,CAAC;SAC3C;QAAC,OAAO,KAAK,EAAE;YACd,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAC1B,kBAAM,CAAC,eAAe,EACtB,gDAAgD,KAAK,CAAC,OAAO,EAAE,CAChE,CAAC;YACF,OAAO,OAAO,CAAC,MAAM,CAAW,kCAAkC,CAAC,CAAC;SACrE;QACD,IAAI,cAAc,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;YAClD,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAC1B,kBAAM,CAAC,QAAQ,EACf,sDAAsD,CACvD,CAAC;YACF,OAAO,OAAO,CAAC,MAAM,CAAW,sDAAsD,CAAC,CAAC;SACzF;QACD,OAAO,cAAc,CAAC;IACxB,CAAC;CACF;AA/CD,sDA+CC;AAED,MAAa,4BAA4B;IAEvC,YAA6B,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;QAC3C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,CAAC;IAED,YAAY,CAAC,UAAgB;QAC3B,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IAC7D,CAAC;CACF;AATD,oEASC"} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
1 | -import { Metadata } from './metadata'; | ||
2 | -export interface CallMetadataOptions { | ||
3 | - service_url: string; | ||
4 | -} | ||
5 | -export declare type CallMetadataGenerator = (options: CallMetadataOptions, cb: (err: Error | null, metadata?: Metadata) => void) => void; | ||
6 | -export interface OldOAuth2Client { | ||
7 | - getRequestMetadata: (url: string, callback: (err: Error | null, headers?: { | ||
8 | - [index: string]: string; | ||
9 | - }) => void) => void; | ||
10 | -} | ||
11 | -export interface CurrentOAuth2Client { | ||
12 | - getRequestHeaders: (url?: string) => Promise<{ | ||
13 | - [index: string]: string; | ||
14 | - }>; | ||
15 | -} | ||
16 | -export declare type OAuth2Client = OldOAuth2Client | CurrentOAuth2Client; | ||
17 | -/** | ||
18 | - * A class that represents a generic method of adding authentication-related | ||
19 | - * metadata on a per-request basis. | ||
20 | - */ | ||
21 | -export declare abstract class CallCredentials { | ||
22 | - /** | ||
23 | - * Asynchronously generates a new Metadata object. | ||
24 | - * @param options Options used in generating the Metadata object. | ||
25 | - */ | ||
26 | - abstract generateMetadata(options: CallMetadataOptions): Promise<Metadata>; | ||
27 | - /** | ||
28 | - * Creates a new CallCredentials object from properties of both this and | ||
29 | - * another CallCredentials object. This object's metadata generator will be | ||
30 | - * called first. | ||
31 | - * @param callCredentials The other CallCredentials object. | ||
32 | - */ | ||
33 | - abstract compose(callCredentials: CallCredentials): CallCredentials; | ||
34 | - /** | ||
35 | - * Check whether two call credentials objects are equal. Separate | ||
36 | - * SingleCallCredentials with identical metadata generator functions are | ||
37 | - * equal. | ||
38 | - * @param other The other CallCredentials object to compare with. | ||
39 | - */ | ||
40 | - abstract _equals(other: CallCredentials): boolean; | ||
41 | - /** | ||
42 | - * Creates a new CallCredentials object from a given function that generates | ||
43 | - * Metadata objects. | ||
44 | - * @param metadataGenerator A function that accepts a set of options, and | ||
45 | - * generates a Metadata object based on these options, which is passed back | ||
46 | - * to the caller via a supplied (err, metadata) callback. | ||
47 | - */ | ||
48 | - static createFromMetadataGenerator(metadataGenerator: CallMetadataGenerator): CallCredentials; | ||
49 | - /** | ||
50 | - * Create a gRPC credential from a Google credential object. | ||
51 | - * @param googleCredentials The authentication client to use. | ||
52 | - * @return The resulting CallCredentials object. | ||
53 | - */ | ||
54 | - static createFromGoogleCredential(googleCredentials: OAuth2Client): CallCredentials; | ||
55 | - static createEmpty(): CallCredentials; | ||
56 | -} |
1 | -"use strict"; | ||
2 | -/* | ||
3 | - * Copyright 2019 gRPC authors. | ||
4 | - * | ||
5 | - * Licensed under the Apache License, Version 2.0 (the "License"); | ||
6 | - * you may not use this file except in compliance with the License. | ||
7 | - * You may obtain a copy of the License at | ||
8 | - * | ||
9 | - * http://www.apache.org/licenses/LICENSE-2.0 | ||
10 | - * | ||
11 | - * Unless required by applicable law or agreed to in writing, software | ||
12 | - * distributed under the License is distributed on an "AS IS" BASIS, | ||
13 | - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
14 | - * See the License for the specific language governing permissions and | ||
15 | - * limitations under the License. | ||
16 | - * | ||
17 | - */ | ||
18 | -Object.defineProperty(exports, "__esModule", { value: true }); | ||
19 | -exports.CallCredentials = void 0; | ||
20 | -const metadata_1 = require("./metadata"); | ||
21 | -function isCurrentOauth2Client(client) { | ||
22 | - return ('getRequestHeaders' in client && | ||
23 | - typeof client.getRequestHeaders === 'function'); | ||
24 | -} | ||
25 | -/** | ||
26 | - * A class that represents a generic method of adding authentication-related | ||
27 | - * metadata on a per-request basis. | ||
28 | - */ | ||
29 | -class CallCredentials { | ||
30 | - /** | ||
31 | - * Creates a new CallCredentials object from a given function that generates | ||
32 | - * Metadata objects. | ||
33 | - * @param metadataGenerator A function that accepts a set of options, and | ||
34 | - * generates a Metadata object based on these options, which is passed back | ||
35 | - * to the caller via a supplied (err, metadata) callback. | ||
36 | - */ | ||
37 | - static createFromMetadataGenerator(metadataGenerator) { | ||
38 | - return new SingleCallCredentials(metadataGenerator); | ||
39 | - } | ||
40 | - /** | ||
41 | - * Create a gRPC credential from a Google credential object. | ||
42 | - * @param googleCredentials The authentication client to use. | ||
43 | - * @return The resulting CallCredentials object. | ||
44 | - */ | ||
45 | - static createFromGoogleCredential(googleCredentials) { | ||
46 | - return CallCredentials.createFromMetadataGenerator((options, callback) => { | ||
47 | - let getHeaders; | ||
48 | - if (isCurrentOauth2Client(googleCredentials)) { | ||
49 | - getHeaders = googleCredentials.getRequestHeaders(options.service_url); | ||
50 | - } | ||
51 | - else { | ||
52 | - getHeaders = new Promise((resolve, reject) => { | ||
53 | - googleCredentials.getRequestMetadata(options.service_url, (err, headers) => { | ||
54 | - if (err) { | ||
55 | - reject(err); | ||
56 | - return; | ||
57 | - } | ||
58 | - resolve(headers); | ||
59 | - }); | ||
60 | - }); | ||
61 | - } | ||
62 | - getHeaders.then((headers) => { | ||
63 | - const metadata = new metadata_1.Metadata(); | ||
64 | - for (const key of Object.keys(headers)) { | ||
65 | - metadata.add(key, headers[key]); | ||
66 | - } | ||
67 | - callback(null, metadata); | ||
68 | - }, (err) => { | ||
69 | - callback(err); | ||
70 | - }); | ||
71 | - }); | ||
72 | - } | ||
73 | - static createEmpty() { | ||
74 | - return new EmptyCallCredentials(); | ||
75 | - } | ||
76 | -} | ||
77 | -exports.CallCredentials = CallCredentials; | ||
78 | -class ComposedCallCredentials extends CallCredentials { | ||
79 | - constructor(creds) { | ||
80 | - super(); | ||
81 | - this.creds = creds; | ||
82 | - } | ||
83 | - async generateMetadata(options) { | ||
84 | - const base = new metadata_1.Metadata(); | ||
85 | - const generated = await Promise.all(this.creds.map((cred) => cred.generateMetadata(options))); | ||
86 | - for (const gen of generated) { | ||
87 | - base.merge(gen); | ||
88 | - } | ||
89 | - return base; | ||
90 | - } | ||
91 | - compose(other) { | ||
92 | - return new ComposedCallCredentials(this.creds.concat([other])); | ||
93 | - } | ||
94 | - _equals(other) { | ||
95 | - if (this === other) { | ||
96 | - return true; | ||
97 | - } | ||
98 | - if (other instanceof ComposedCallCredentials) { | ||
99 | - return this.creds.every((value, index) => value._equals(other.creds[index])); | ||
100 | - } | ||
101 | - else { | ||
102 | - return false; | ||
103 | - } | ||
104 | - } | ||
105 | -} | ||
106 | -class SingleCallCredentials extends CallCredentials { | ||
107 | - constructor(metadataGenerator) { | ||
108 | - super(); | ||
109 | - this.metadataGenerator = metadataGenerator; | ||
110 | - } | ||
111 | - generateMetadata(options) { | ||
112 | - return new Promise((resolve, reject) => { | ||
113 | - this.metadataGenerator(options, (err, metadata) => { | ||
114 | - if (metadata !== undefined) { | ||
115 | - resolve(metadata); | ||
116 | - } | ||
117 | - else { | ||
118 | - reject(err); | ||
119 | - } | ||
120 | - }); | ||
121 | - }); | ||
122 | - } | ||
123 | - compose(other) { | ||
124 | - return new ComposedCallCredentials([this, other]); | ||
125 | - } | ||
126 | - _equals(other) { | ||
127 | - if (this === other) { | ||
128 | - return true; | ||
129 | - } | ||
130 | - if (other instanceof SingleCallCredentials) { | ||
131 | - return this.metadataGenerator === other.metadataGenerator; | ||
132 | - } | ||
133 | - else { | ||
134 | - return false; | ||
135 | - } | ||
136 | - } | ||
137 | -} | ||
138 | -class EmptyCallCredentials extends CallCredentials { | ||
139 | - generateMetadata(options) { | ||
140 | - return Promise.resolve(new metadata_1.Metadata()); | ||
141 | - } | ||
142 | - compose(other) { | ||
143 | - return other; | ||
144 | - } | ||
145 | - _equals(other) { | ||
146 | - return other instanceof EmptyCallCredentials; | ||
147 | - } | ||
148 | -} | ||
149 | -//# sourceMappingURL=call-credentials.js.map | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/long/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/long/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/long/index.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/assert.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/base.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/buffer.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/crypto.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/dgram.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/dns.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/domain.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/events.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/fs.d.ts
deleted
100644 → 0
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/http.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/http2.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/https.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/index.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
node_modules/@types/node/module.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/net.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/os.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/path.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/repl.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/stream.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/timers.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/tls.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/tty.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/url.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/util.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/v8.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/vm.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/node/wasi.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/@types/node/zlib.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/@types/pumpify/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/accepts/HISTORY.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/accepts/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/accepts/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/accepts/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/accepts/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/agent-base/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/agent-base/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/agent-base/src/index.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/ansi-regex/index.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ansi-regex/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ansi-regex/license
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ansi-regex/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ansi-regex/readme.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ansi-styles/index.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ansi-styles/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ansi-styles/license
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/ansi-styles/readme.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/append-field/.npmignore
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/append-field/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/append-field/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/append-field/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/array-flatten/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/array-flatten/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/arrify/index.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/arrify/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/arrify/license
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/arrify/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/arrify/readme.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/base64-js/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/base64-js/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/base64-js/index.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/base64-js/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/base64-js/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/bignumber.js/LICENCE.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/bignumber.js/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/body-parser/HISTORY.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/body-parser/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/body-parser/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/body-parser/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/body-parser/lib/read.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/buffer-from/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/buffer-from/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/buffer-from/readme.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/busboy/.travis.yml
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/busboy/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/busboy/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
node_modules/busboy/lib/main.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/busboy/lib/utils.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/busboy/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/busboy/test/test.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/bytes/History.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/bytes/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/bytes/Readme.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/bytes/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/bytes/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/cliui/CHANGELOG.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/cliui/LICENSE.txt
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/cliui/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/cliui/build/index.cjs
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/cliui/index.mjs
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/cliui/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/color-convert/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/color-convert/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/color-convert/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/color-convert/route.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/color-name/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/color-name/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/color-name/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/color-name/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/concat-stream/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/concat-stream/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/concat-stream/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/BufferList.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/destroy.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/concat-stream/node_modules/readable-stream/lib/internal/streams/stream.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/concat-stream/readme.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/content-type/HISTORY.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/content-type/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/content-type/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/content-type/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/cookie/HISTORY.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/cookie/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/cookie/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/cookie/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/cookie/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/core-util-is/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/core-util-is/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/core-util-is/test.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/debug/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/debug/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/debug/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/debug/src/browser.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/debug/src/common.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/debug/src/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/debug/src/node.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/depd/History.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/depd/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/depd/Readme.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/depd/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/depd/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/destroy/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/destroy/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/destroy/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/destroy/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/dicer/.travis.yml
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/dicer/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/dicer/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/dicer/lib/Dicer.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/dicer/lib/PartStream.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/dicer/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/dicer/test/test.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/.travis.yml
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/example.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/async_iterator.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/buffer_list.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/destroy.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/from-browser.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/pipeline.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/state.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream-browser.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/node_modules/readable-stream/lib/internal/streams/stream.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/duplexify/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/duplexify/test.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/ee-first/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ee-first/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ee-first/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ee-first/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/emoji-regex/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/emoji-regex/index.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/emoji-regex/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/emoji-regex/text.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/encodeurl/HISTORY.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/encodeurl/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/encodeurl/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/encodeurl/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/encodeurl/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/end-of-stream/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/end-of-stream/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/end-of-stream/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/ent/.npmignore
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/.travis.yml
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/decode.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/encode.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/entities.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/examples/simple.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/readme.markdown
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/reversed.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/test/codes.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/test/hex.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/ent/test/num.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/escalade/dist/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/escalade/dist/index.mjs
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/escalade/index.d.ts
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/escalade/license
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/escalade/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/escalade/readme.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/escalade/sync/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/escalade/sync/index.mjs
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/escape-html/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/escape-html/Readme.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/escape-html/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/etag/HISTORY.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/etag/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/etag/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/etag/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/etag/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/express/History.md
deleted
100644 → 0
This diff could not be displayed because it is too large.
node_modules/express/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/express/Readme.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/express/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/express/lib/express.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/express/lib/request.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/express/lib/response.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/express/lib/utils.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/express/lib/view.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/express/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/extend/.editorconfig
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/extend/.eslintrc
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/extend/.jscs.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/extend/.travis.yml
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/extend/CHANGELOG.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/extend/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/extend/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/extend/component.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/extend/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/extend/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/finalhandler/HISTORY.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/finalhandler/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/finalhandler/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/finalhandler/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/forwarded/HISTORY.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/forwarded/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/forwarded/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/forwarded/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/forwarded/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/fresh/HISTORY.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/fresh/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/fresh/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/fresh/index.js
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/fresh/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/fs/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/fs/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/gaxios/CHANGELOG.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/gaxios/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/gaxios/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/gaxios/package.json
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
node_modules/gcp-metadata/LICENSE
deleted
100644 → 0
This diff is collapsed. Click to expand it.
node_modules/gcp-metadata/README.md
deleted
100644 → 0
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
-
Please register or login to post a comment