Skip to content

Commit

Permalink
Fix types.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterp committed Jun 15, 2020
1 parent 6b16e51 commit 4491f12
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"packages/core/src/__tests__/__fixtures__"
],
"scripts": {
"build": "yarn build:clean && yarn build:js && yarn build:types",
"build": "yarn build:clean && yarn build:js",
"build:clean": "lerna run build:clean",
"build:js": "cross-env NODE_ENV=production lerna run build",
"build:types": "tsc --build --clean && tsc --build",
Expand Down
1 change: 1 addition & 0 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"merge-graphql-schemas": "^1.7.6"
},
"devDependencies": {
"@redwoodjs/auth": "^0.10.0",
"@types/graphql-iso-date": "^3.3.3",
"@types/graphql-type-json": "^0.3.2",
"@types/jsonwebtoken": "^8.3.9",
Expand Down
3 changes: 2 additions & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
"license": "MIT",
"devDependencies": {
"@auth0/auth0-spa-js": "^1.7.0",
"@types/netlify-identity-widget": "^1.4.1",
"@types/react": "16.9.35",
"firebase": "^7.14.5",
"gotrue-js": "^0.9.25",
"gotrue-js": "git://github.com/netlify/gotrue-js.git#28df09cfcac505feadcb1719714d2a9507cf68eb",
"magic-sdk": "^1.3.5",
"netlify-identity-widget": "1.6.0",
"react": "^16.13.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/auth/src/AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const AuthContext = React.createContext<Partial<AuthContextInterface>>(
)

type AuthProviderProps = {
client: AuthClient
client: SupportedAuthClients
type: SupportedAuthTypes
skipFetchCurrentUser?: boolean
}
Expand Down Expand Up @@ -70,7 +70,7 @@ export class AuthProvider extends React.Component<

rwClient: AuthClient

constructor(props) {
constructor(props: AuthProviderProps) {
super(props)
this.rwClient = createAuthClient(props.client, props.type)
}
Expand Down Expand Up @@ -124,7 +124,7 @@ export class AuthProvider extends React.Component<
})
}

logIn = async (options?) => {
logIn = async (options?: any) => {
await this.rwClient.login(options)
return this.setAuthState()
}
Expand Down
7 changes: 4 additions & 3 deletions packages/auth/src/authClients/gotrue.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type { default as GoTrue, User as GoTrueUser } from 'gotrue-js'
import type { default as GoTrue } from 'gotrue-js'
import type { User } from 'gotrue-js'

import type { AuthClient } from './index'

export type { GoTrue, GoTrueUser }
export type GoTrueUser = User
export type { GoTrue }

export interface AuthClientGoTrue extends AuthClient {
login(options: {
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/authClients/magicLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export type MagicUser = MagicUserMetadata
import type { AuthClient } from './'

export interface AuthClientMagicLink extends AuthClient {
login(options: { email: string; showUI?: boolean })
login(options: { email: string; showUI?: boolean }): Promise<any>
}

export const magicLink = (client: MagicLink): AuthClientMagicLink => {
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/authClients/netlify.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type NetlifyIdentityNS from 'netlify-identity-widget'
import type * as NetlifyIdentityNS from 'netlify-identity-widget'

import type { AuthClient } from './'

Expand Down
11 changes: 11 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3336,6 +3336,11 @@
dependencies:
"@types/express" "*"

"@types/netlify-identity-widget@^1.4.1":
version "1.4.1"
resolved "https://registry.npmjs.org/@types/netlify-identity-widget/-/netlify-identity-widget-1.4.1.tgz#a963bd0360ac9dd8f4fd437be6764179d396e3a4"
integrity sha512-mTdN5Z71smk1+TeqgDF1RhkB+CDCS/CvCm4Iy7gGpheB4tsJVk2hnAhTi6w9v2H0jhixfAMgu1bUkqDA1yuq2Q==

"@types/[email protected]", "@types/node-fetch@^2.5.5":
version "2.5.7"
resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.7.tgz#20a2afffa882ab04d44ca786449a276f9f6bbf3c"
Expand Down Expand Up @@ -8684,6 +8689,12 @@ gotrue-js@^0.9.25:
dependencies:
micro-api-client "^3.2.1"

"gotrue-js@git://github.com/netlify/gotrue-js.git#28df09cfcac505feadcb1719714d2a9507cf68eb":
version "0.9.24"
resolved "git://github.com/netlify/gotrue-js.git#28df09cfcac505feadcb1719714d2a9507cf68eb"
dependencies:
micro-api-client "^3.2.1"

graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4:
version "4.2.4"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
Expand Down

0 comments on commit 4491f12

Please sign in to comment.