Skip to content

Commit 2734f69

Browse files
lukeocodesftr-lwilsonSandraRodgers
authored
Release: JS SDK V3 (#208)
* feat!: promote v3.0.0-alpha.12 to v3.0.0-beta (#187) * feat!: create new structure for isomorphic SDK * feat: add commitlint * feat: add test coverage for client * chore: remove unused variables * feat: sort out default options, tests for helpers * fix: remove postinstall script * chore: updating various bits and constants * feat: laying out the structure of the new library * feat: get requests working * feat: add tests, prerecorded samples, prerecorded requests * feat: working live transcription * feat: rejig the architecture to more closely reflect the documented high-level architecture plan * feat: storing the API domain as a URL object, easier to pass around all clients * fix: missing endpoint from fetch requests to the API * chore: update integration test samples for new usage pattern * feat: types rewriten for all endpoints * feat: add tests for making transcription requests * fix: rename listen test to prerecorded test * chore: reorder some imports for tidiness * fix: rename project API to manage API in the main client * feat: added manage and onprem tests, fixed issues caught by tests * feat: large amount of tests, websocket tests, test server changes, fixes to types * feat: test server and dockerfile * feat: use the mock server's current address to run tests against * feat: fixes to live stream client * fix: fix event types * fix: working live * fix: string should be integer * chore: link to RFC for conforming code * chore: configure prerelease channels * fix: case-sensitive file system issues on mac * feat: marking alpha as a major release version (#166) BREAKING CHANGE: complete rearchitecture of the Node/JavaScript SDK to work in browsers and Node. * feat: export types and enums from main module (#167) * feat: export enums and types from the main module * fix: fix CI workflow not finding coverage report * chore: switch from coveralls to codecov * feat: remove test server code from sdk repo, and fix tests (#170) * feat: remove duplicate example apps (#172) * feat: update workflows so PRs run on all release channel PRs (#175) * chore: ran npm audit * chore: update workflows so CI runs on alpha pulls * feat: remove mimetype requirement from batch requests (rfc #4) (#177) * feat: remove mimetype requirement from local file transcirption (rfc #4) * fix: fix stray array of boolean type (#179) * feat: making schema's possible from request types (#180) * feat: any typing of request options renamed to schema for schema type generation * feat: rename request options types to schema * feat: remove json from this repo * fix: default to application/json when not provided deepgram/audio+video content-type (#181) * fix: blob datatype issues where blob as arraybufferlike had no bytelength (#182) * fix: remove unused package from lock * fix: fixed blob data type issue where blob as arraybufferlike had no bytelength in the browser * fix: remove erroneous browser check * fix: we need node 18 to be blob friendly * fix(types): nested arrays defined as singular tuples incorrectly (#184) * fix(types): nested arrays in LiveTranscriptionEvent (#183) * fix(types): this many array types were defined as singlular tuples - whoops * chore(test): update tests for new mock API url --------- Co-authored-by: Luke Wilson <[email protected]> * feat: proxy, CORs, README rewrite (#185) * feat: overhaul client interfaces and scoped option handling * feat: add proxy options for REST calls in the browser, error for browser REST calls without proxy * chore: update code snippets for v-3 (#186) * chore: remove unused packages/vars * feat: add captions as a dependency * feat: small changes to docs * feat: smol changes to README * feat: smol changes to README again * fix(readme): remove version from ESM include example * fix(dependency): fix dependency issue caused by adding the captions library * feat: export client/packages from the entryfile --------- Co-authored-by: Sandra Rodgers <[email protected]> --------- Co-authored-by: Luke Wilson <[email protected]> Co-authored-by: Sandra Rodgers <[email protected]> * fix: fix dependency issues up and downstream (#188) * fix: find a fix to allow the client to work in either websocket environment (#199) * fix: fixes issues 197 and 198 (#202) * fix: closing the socket too early (#201) * fix: a wild fix for this has appeared (#200) * chore: update examples to match console missions [no ci] (#204) * feat: update websocket to use w3cwebsocket for node/browser/edge worker examples (#205) * feat: tightly couple the api key to the proxy logic, so an api can't mistakenly be made public (#206) --------- Co-authored-by: Luke Wilson <[email protected]> Co-authored-by: Sandra Rodgers <[email protected]>
1 parent 95f9291 commit 2734f69

File tree

175 files changed

+7029
-7469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+7029
-7469
lines changed

.devcontainer/Dockerfile

Lines changed: 0 additions & 14 deletions
This file was deleted.

.devcontainer/base.Dockerfile

Lines changed: 0 additions & 17 deletions
This file was deleted.

.devcontainer/devcontainer.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

.dockerignore

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.DS_Store
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# TypeScript v1 declaration files
46+
typings/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Microbundle cache
58+
.rpt2_cache/
59+
.rts2_cache_cjs/
60+
.rts2_cache_es/
61+
.rts2_cache_umd/
62+
63+
# Optional REPL history
64+
.node_repl_history
65+
66+
# Output of 'npm pack'
67+
*.tgz
68+
69+
# Yarn Integrity file
70+
.yarn-integrity
71+
72+
# dotenv environment variables file
73+
.env
74+
.env.test
75+
76+
# parcel-bundler cache (https://parceljs.org/)
77+
.cache
78+
79+
# Next.js build output
80+
.next
81+
82+
# Nuxt.js build / generate output
83+
.nuxt
84+
dist
85+
86+
# Gatsby files
87+
.cache/
88+
# Comment in the public line in if your project uses Gatsby and *not* Next.js
89+
# https://nextjs.org/blog/next-9-1#public-directory-support
90+
# public
91+
92+
# vuepress build output
93+
.vuepress/dist
94+
95+
# Serverless directories
96+
.serverless/
97+
98+
# FuseBox cache
99+
.fusebox/
100+
101+
# DynamoDB Local files
102+
.dynamodb/
103+
104+
# TernJS port file
105+
.tern-port
106+
107+
docs/v2
108+
109+
# testing
110+
testServer/

.github/workflows/CD.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/CI.yml

Lines changed: 46 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,55 @@
11
name: CI
22

33
on:
4-
push:
5-
branches: [ main ]
64
pull_request:
7-
branches: [ main ]
5+
branches:
6+
- main
7+
- next
8+
- rc
9+
- beta
10+
- alpha
11+
paths-ignore:
12+
- "docs/**"
13+
- "**/*.md"
14+
- ".prettierrc"
15+
- "**/*ignore"
16+
push:
17+
branches:
18+
- main
19+
- next
20+
- rc
21+
- beta
22+
- alpha
23+
paths-ignore:
24+
- "docs/**"
25+
- "**/*.md"
26+
- ".prettierrc"
27+
- "**/*ignore"
28+
829
jobs:
9-
build:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v1
14-
with:
15-
node-version: 12
16-
17-
- name: Update Version in package.json
18-
run: sed -i 's/X.X.X/0.0.1/g' ./package.json
30+
test:
31+
name: Test / OS ${{ matrix.os }} / Node ${{ matrix.node }}
32+
strategy:
33+
matrix:
34+
os: [ubuntu-latest]
35+
node: ["18"]
36+
37+
runs-on: ${{ matrix.os }}
1938

20-
- name: Install Dependencies
21-
run: npm install
39+
steps:
40+
- uses: actions/checkout@v3
2241

23-
- name: Run Tests
24-
run: npm run test
42+
- name: Set up Node
43+
uses: actions/setup-node@v3
44+
with:
45+
node-version: ${{ matrix.node }}
2546

26-
- name: Lint Source
27-
run: npm run lint
47+
- name: Run tests
48+
run: |
49+
npm clean-install
50+
npm run test:coverage
2851
29-
- name: Build TypeScript
30-
run: npm run build
52+
- name: Upload coverage reports to Codecov
53+
uses: codecov/codecov-action@v3
54+
env:
55+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/docs.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
docs:
11+
name: Publish docs / OS ${{ matrix.os }} / Node ${{ matrix.node }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest]
15+
node: ["18"]
16+
17+
runs-on: ${{ matrix.os }}
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Set up Node
23+
uses: actions/setup-node@v2
24+
with:
25+
node-version: ${{ matrix.node }}
26+
27+
- run: |
28+
npm ci
29+
npm run docs
30+
npm run docs:json
31+
32+
- name: Publish
33+
uses: peaceiris/actions-gh-pages@v3
34+
with:
35+
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
publish_dir: docs
37+
force_orphan: true
38+
commit_message: "docs: update"

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- next
8+
- rc
9+
- beta
10+
- alpha
11+
workflow_dispatch:
12+
13+
jobs:
14+
release:
15+
name: Release / Node ${{ matrix.node }}
16+
strategy:
17+
matrix:
18+
node: ["18"]
19+
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- name: Set up Node
26+
uses: actions/setup-node@v2
27+
with:
28+
node-version: ${{ matrix.node }}
29+
30+
- run: |
31+
npm ci
32+
npm run build
33+
34+
- name: Create a release
35+
run: npx semantic-release@^18.0.0
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)