Skip to content

Commit dec6d39

Browse files
committed
Merge branch 'main' into feat-gcs-locker
* main: (59 commits) Replace demo folder with StackBlitz (tus#704) @tus/gcs-store: correctly pass content type (tus#702) @tus/s3-store: fix zero byte files (tus#700) Update package-lock.json [ci] release (tus#696) fix: handling consistent cancellation across stream and locks (tus#699) @tus/s3-store: Change private modifier into protected (tus#698) Create funding-manifest-urls Bump @aws-sdk/client-s3 from 3.703.0 to 3.717.0 (tus#695) Bump mocha from 10.4.0 to 11.0.1 (tus#693) Bump @biomejs/biome from 1.9.2 to 1.9.4 (tus#694) [ci] release (tus#690) Bump @aws-sdk/client-s3 from 3.701.0 to 3.703.0 (tus#685) @tus/s3-store: fix part number increment (tus#689) Revert "Bump rimraf from 3.0.2 to 6.0.1 (tus#681)" Bump @aws-sdk/client-s3 from 3.682.0 to 3.701.0 (tus#683) Bump @changesets/cli from 2.27.9 to 2.27.10 (tus#682) Bump rimraf from 3.0.2 to 6.0.1 (tus#681) Bump @types/node from 20.11.5 to 22.10.1 (tus#679) Ignore JSON for Biome formatting ...
2 parents 0ce3a90 + 3b5718b commit dec6d39

Some content is hidden

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

89 files changed

+3599
-5072
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"access": "public",
88
"baseBranch": "main",
99
"updateInternalDependencies": "patch",
10-
"ignore": ["demo", "test"]
10+
"ignore": ["test"]
1111
}

.changeset/gold-adults-warn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@tus/s3-store": patch
3+
---
4+
5+
Fix zero byte files only storing a .info file. Now correctly stores an empty file.

.changeset/proud-terms-swim.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@tus/gcs-store": patch
3+
---
4+
5+
Correctly pass the content type from upload.metadata to GCS.

.eslintrc.js

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

.github/contributing.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# Contributing
22

3-
`tus-node-server` is a mono-repository managed by [Turborepo](https://turbo.build/repo).
4-
This means running `npm run build` in the root will build all packages in parallel. The
5-
same goes for `lint` and `format`.
6-
73
## Changesets
84

95
We use [changesets](https://github.com/changesets/changesets) to manage versioning,

.github/workflows/ci.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
name: main
1+
name: CI
22
on:
33
push:
44
branches: [main]
55
pull_request_target:
66
types: [opened, synchronize, reopened]
77
paths-ignore:
8-
- '**.md'
8+
- "**.md"
9+
- ".changeset/**"
910
pull_request:
1011
types: [opened, synchronize, reopened]
1112
paths:
@@ -15,15 +16,8 @@ concurrency: ${{ github.workflow }}--${{ github.ref }}
1516

1617
jobs:
1718
main:
18-
name: ${{matrix.node}}
19+
name: Node.js LTS
1920
runs-on: ubuntu-latest
20-
strategy:
21-
# We do not want to run CRUD tests in parallel
22-
max-parallel: 1
23-
matrix:
24-
node:
25-
- lts/hydrogen
26-
- node
2721

2822
steps:
2923
- name: Checkout sources
@@ -39,14 +33,17 @@ jobs:
3933
- name: Install Node.js
4034
uses: actions/setup-node@v3
4135
with:
42-
node-version: ${{matrix.node-version}}
36+
node-version: lts/*
4337

4438
- name: Install dependencies
4539
run: npm ci --no-fund --no-audit
4640

4741
- name: Build
4842
run: npm run build
4943

44+
- name: Check formatting
45+
run: npm run format:check
46+
5047
- name: Run linters
5148
run: npm run lint
5249

@@ -56,4 +53,7 @@ jobs:
5653
AWS_BUCKET: ${{secrets.AWS_BUCKET}}
5754
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
5855
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
56+
AZURE_ACCOUNT_ID: ${{secrets.AZURE_ACCOUNT_ID}}
57+
AZURE_ACCOUNT_KEY: ${{secrets.AZURE_ACCOUNT_KEY}}
58+
AZURE_CONTAINER_NAME: ${{secrets.AZURE_CONTAINER_NAME}}
5959
AWS_REGION: ${{secrets.AWS_REGION}}

.prettierrc.json

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

.well-known/funding-manifest-urls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
https://tus.io/funding.json

README.md

Lines changed: 13 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ easily be added to tus-node-server
2727
- [Quick start](#quick-start)
2828
- [Packages](#packages)
2929
- [Extensions](#extensions)
30-
- [Demos](#demos)
3130
- [Types](#types)
3231
- [Compatibility](#compatibility)
3332
- [Contribute](#contribute)
@@ -49,6 +48,9 @@ integrate it into your existing one. There are also other mature servers, like
4948

5049
A standalone server which stores files on disk.
5150

51+
> [!TIP]
52+
> Try it yourself in [StackBlitz](https://stackblitz.com/edit/stackblitz-starters-zg6mgnuf?file=index.js)
53+
5254
```js
5355
const {Server} = require('@tus/server')
5456
const {FileStore} = require('@tus/file-store')
@@ -100,45 +102,21 @@ fastify.listen(3000, (err) => {
100102
- [`@tus/file-store`][]. Store files on disk.
101103
- [`@tus/s3-store`][]. Store files on AWS S3.
102104
- [`@tus/gcs-store`][]. Store files on Google Cloud Storage.
105+
- [`@tus/azure-store`][]. Store files on Azure.
103106

104107
## Extensions
105108

106109
The tus protocol supports optional [extensions][]. Below is a table of the supported
107110
extensions.
108111

109-
| Extension | [`file-store`][`@tus/file-store`] | [`s3-store`][`@tus/s3-store`] | [`gcs-store`][`@tus/gcs-store`] |
110-
| ------------------------ | --------------------------------- | ----------------------------- | ------------------------------- |
111-
| [Creation][] ||||
112-
| [Creation With Upload][] ||||
113-
| [Expiration][] ||||
114-
| [Checksum][] ||||
115-
| [Termination][] ||||
116-
| [Concatenation][] ||||
117-
118-
## Demos
119-
120-
Start the demo server using Local File Storage
121-
122-
```bash
123-
npm run build && npm run demo
124-
```
125-
126-
Start up the demo server using AWS S3. The environment variables `AWS_BUCKET`,
127-
`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, and `AWS_REGION` need to be present.
128-
129-
```bash
130-
npm run build && npm run demo:s3
131-
```
132-
133-
Start up the demo server using Google Cloud Storage. A `keyfile.json` needs to be present
134-
in the root of the repository.
135-
136-
```bash
137-
npm run build && npm run demo:gcs
138-
```
139-
140-
Then navigate to the demo ([localhost:1080](http://localhost:1080)) which uses
141-
[`tus-js-client`](https://github.com/tus/tus-js-client).
112+
| Extension | [`file-store`][`@tus/file-store`] | [`s3-store`][`@tus/s3-store`] | [`gcs-store`][`@tus/gcs-store`] | [`azure-store`][`@tus/azure-store`] |
113+
| ------------------------ | --------------------------------- | ----------------------------- | ------------------------------- | ----------------------------------- |
114+
| [Creation][] |||||
115+
| [Creation With Upload][] |||||
116+
| [Expiration][] |||||
117+
| [Checksum][] |||||
118+
| [Termination][] |||||
119+
| [Concatenation][] |||||
142120

143121
## Types
144122

@@ -163,6 +141,7 @@ See
163141
[`@tus/file-store`]: https://github.com/tus/tus-node-server/tree/main/packages/file-store
164142
[`@tus/s3-store`]: https://github.com/tus/tus-node-server/tree/main/packages/s3-store
165143
[`@tus/gcs-store`]: https://github.com/tus/tus-node-server/tree/main/packages/gcs-store
144+
[`@tus/azure-store`]: https://github.com/tus/tus-node-server/tree/main/packages/azure-store
166145
[extensions]: https://tus.io/protocols/resumable-upload.html#protocol-extensions
167146
[creation]: https://tus.io/protocols/resumable-upload.html#creation
168147
[creation with upload]:

biome.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
3+
"organizeImports": {
4+
"enabled": true
5+
},
6+
"files": {
7+
"ignore": ["./**/dist/**/*"]
8+
},
9+
"linter": {
10+
"enabled": true,
11+
"rules": {
12+
"recommended": true,
13+
"style": {
14+
"noParameterAssign": "off"
15+
}
16+
}
17+
},
18+
"formatter": {
19+
"enabled": true,
20+
"formatWithErrors": false,
21+
"indentStyle": "space",
22+
"indentWidth": 2,
23+
"lineEnding": "lf",
24+
"lineWidth": 90
25+
},
26+
"json": {
27+
"linter": {
28+
"enabled": false
29+
},
30+
"formatter": {
31+
"enabled": false
32+
}
33+
},
34+
"javascript": {
35+
"formatter": {
36+
"trailingCommas": "es5",
37+
"semicolons": "asNeeded",
38+
"bracketSpacing": false,
39+
"quoteStyle": "single"
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)