Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- run: corepack yarn tsc:zod
- uses: changesets/action@v1
with:
version: corepack yarn changeset version && corepack yarn
version: corepack yarn changeset:version:release
publish: corepack yarn changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"check": "yarn lint:changesets && yarn fix:deps && yarn fix:js && yarn lint:ts && yarn test:unit",
"verify": "yarn lint:changesets && yarn lint:publish && yarn lint:deps && yarn lint:js && yarn lint:ts && yarn test:unit",
"verify:full": "yarn verify && yarn knip && yarn parity:transloadit && yarn test:types",
"changeset:version:release": "yarn changeset version && yarn",
"lint:js": "biome check .",
"lint:ts": "yarn tsc:types && yarn tsc:node && yarn tsc:zod && yarn workspace @transloadit/notify-url-relay lint:ts",
"lint:changesets": "node scripts/guard-changesets.ts",
Expand Down
11 changes: 11 additions & 0 deletions packages/node/test/unit/cli/auth-token.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { mkdtempSync, writeFileSync } from 'node:fs'
import { tmpdir } from 'node:os'
import path from 'node:path'
import { afterEach, describe, expect, it, vi } from 'vitest'
import { main } from '../../../src/cli.ts'

Expand Down Expand Up @@ -258,10 +261,18 @@ describe('cli auth token', () => {
})

it('fails when credentials are missing', async () => {
const emptyCredentialsFile = path.join(
mkdtempSync(path.join(tmpdir(), 'transloadit-auth-token-')),
'credentials',
)
writeFileSync(emptyCredentialsFile, '')

vi.stubEnv('TRANSLOADIT_KEY', '')
vi.stubEnv('TRANSLOADIT_SECRET', '')
vi.stubEnv('TRANSLOADIT_AUTH_KEY', '')
vi.stubEnv('TRANSLOADIT_AUTH_SECRET', '')
vi.stubEnv('TRANSLOADIT_AUTH_TOKEN', '')
vi.stubEnv('TRANSLOADIT_CREDENTIALS_FILE', emptyCredentialsFile)

const stderrSpy = vi.spyOn(console, 'error').mockImplementation(() => {})

Expand Down
Loading