Skip to content

Commit

Permalink
refactor: remove html & http-util as standalone lib
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieusieben committed Apr 24, 2024
1 parent ab109f6 commit f3dca7a
Show file tree
Hide file tree
Showing 72 changed files with 111 additions and 422 deletions.
1 change: 0 additions & 1 deletion packages/html/TODO.md

This file was deleted.

34 changes: 0 additions & 34 deletions packages/html/package.json

This file was deleted.

8 changes: 0 additions & 8 deletions packages/html/tsconfig.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/http-util/TODO.md

This file was deleted.

45 changes: 0 additions & 45 deletions packages/http-util/package.json

This file was deleted.

194 changes: 0 additions & 194 deletions packages/http-util/src/server.ts

This file was deleted.

8 changes: 0 additions & 8 deletions packages/http-util/tsconfig.json

This file was deleted.

5 changes: 3 additions & 2 deletions packages/oauth-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
"dependencies": {
"@atproto/fetch": "workspace:*",
"@atproto/fetch-node": "workspace:*",
"@atproto/html": "workspace:*",
"@atproto/http-util": "workspace:*",
"@atproto/jwk": "workspace:*",
"@atproto/jwk-node": "workspace:*",
"@atproto/oauth-client-metadata": "workspace:*",
"@atproto/oauth-server-metadata": "workspace:*",
"@hapi/accept": "^6.0.3",
"@hapi/bourne": "^3.0.0",
"cookie": "^0.6.0",
"http-errors": "^2.0.0",
"jose": "^5.2.0",
"keygrip": "^1.1.0",
"oidc-token-hash": "^5.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/oauth-provider/src/account/account-hooks.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Client } from '../client/client.js'
import { DeviceId } from '../device/device-id.js'
import { Awaitable } from '../lib/util/type.js'
import { ClientAuth } from '../token/token-store.js'
import { Awaitable } from '../util/awaitable.js'
import { Account } from './account-store.js'
// https://github.com/typescript-eslint/typescript-eslint/issues/8902
// eslint-disable-next-line
Expand Down
2 changes: 1 addition & 1 deletion packages/oauth-provider/src/account/account-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { DeviceId } from '../device/device-id.js'
import { InvalidRequestError } from '../oauth-errors.js'
import { Sub } from '../oidc/sub.js'
import { ClientAuth } from '../token/token-store.js'
import { constantTime } from '../util/time.js'
import { constantTime } from '../lib/util/time.js'
import { AccountHooks } from './account-hooks.js'
import {
Account,
Expand Down
2 changes: 1 addition & 1 deletion packages/oauth-provider/src/account/account-store.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { OAuthClientId } from '@atproto/oauth-client-metadata'

import { DeviceId } from '../device/device-id.js'
import { Awaitable } from '../lib/util/type.js'
import { Sub } from '../oidc/sub.js'
import { Awaitable } from '../util/awaitable.js'
import { Account } from './account.js'

export type LoginCredentials = {
Expand Down
2 changes: 1 addition & 1 deletion packages/oauth-provider/src/account/account.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { OIDCStandardPayload } from '../oidc/claims.js'
import { Sub } from '../oidc/sub.js'
import { Simplify } from '../util/type.js'
import { Simplify } from '../lib/util/type.js'

export type Account = Simplify<
{
Expand Down
2 changes: 1 addition & 1 deletion packages/oauth-provider/src/assets/assets-middleware.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { writeStream } from '@atproto/http-util'
import { writeStream } from '../lib/http/index.js'

import { ASSETS_URL_PREFIX, getAsset } from './index.js'

Expand Down
2 changes: 1 addition & 1 deletion packages/oauth-provider/src/client/client-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
OAuthClientId,
OAuthClientMetadata,
} from '@atproto/oauth-client-metadata'
import { Awaitable } from '../util/awaitable.js'
import { Awaitable } from '../lib/util/type.js'

/**
* Use this to alter, override or validate the client metadata & jwks returned
Expand Down
2 changes: 1 addition & 1 deletion packages/oauth-provider/src/client/client-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
OAuthClientId,
OAuthClientMetadata,
} from '@atproto/oauth-client-metadata'
import { Awaitable } from '../util/awaitable.js'
import { Awaitable } from '../lib/util/type.js'
import { ClientData } from './client-data.js'

// Export all types needed to implement the ClientStore interface
Expand Down
2 changes: 1 addition & 1 deletion packages/oauth-provider/src/device/device-data.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from 'zod'

import { SESSION_ID_BYTES_LENGTH, SESSION_ID_PREFIX } from '../constants.js'
import { randomHexId } from '../util/crypto.js'
import { randomHexId } from '../lib/util/crypto.js'
import { deviceDetailsSchema } from './device-details.js'

export const sessionIdSchema = z
Expand Down
2 changes: 1 addition & 1 deletion packages/oauth-provider/src/device/device-id.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { z } from 'zod'

import { DEVICE_ID_BYTES_LENGTH, DEVICE_ID_PREFIX } from '../constants.js'
import { randomHexId } from '../util/crypto.js'
import { randomHexId } from '../lib/util/crypto.js'

export const deviceIdSchema = z
.string()
Expand Down

0 comments on commit f3dca7a

Please sign in to comment.