Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
hperl committed Mar 6, 2024
1 parent 3676f09 commit 6b99edf
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 80 deletions.
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

module.exports = {
presets: [
["@babel/preset-env", { targets: { node: "current" } }],
Expand Down
2 changes: 1 addition & 1 deletion examples/nextjs-spa/src/pages/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const Settings: NextPageWithLayout = () => {
// include scripts for webauthn support
includeScripts={true}
// submit the form data the user provides to Ory
onSubmit={({ body }) => onSubmit(body)}
onSubmit={({ body }) => onSubmit(body as UpdateSettingsFlowBody)}
/>
))}
</div>
Expand Down
4 changes: 3 additions & 1 deletion examples/nextjs-spa/src/pkg/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export const HandleError = (
defaultNav: string | undefined = undefined,
fatalToError = false,
) => {
return async (error: AxiosError): Promise<AxiosError | void> => {
return async (
error: AxiosError<any, unknown>,
): Promise<AxiosError | void> => {
if (!error.response || error.response?.status === 0) {
window.location.href = `/error?error=${encodeURIComponent(
JSON.stringify(error.response),
Expand Down
2 changes: 1 addition & 1 deletion examples/preact-spa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"preact": "10.13.1",
"wouter": "2.10.0"
"wouter-preact": "3.0.1"
},
"devDependencies": {
"@ory/elements-preact": "*",
Expand Down
2 changes: 1 addition & 1 deletion examples/preact-spa/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import "@ory/elements-preact/assets/normalize.css"

import { render } from "preact"
import { Route, Router } from "wouter/preact"
import { Route, Router } from "wouter-preact"
import { Dashboard } from "./app"
import { Error } from "./error"
import "./index.css"
Expand Down
2 changes: 1 addition & 1 deletion examples/preact-spa/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const sdkError = (
const [location, setLocation] = useLocation()

return useCallback(
(error: AxiosError): Promise<AxiosError | void> => {
(error: AxiosError<any, unknown>): Promise<AxiosError | void> => {
const responseData = error.response?.data || {}

switch (error.response?.status) {
Expand Down
2 changes: 1 addition & 1 deletion examples/preact-spa/src/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const Settings = () => {
flow={flow}
method={flowType}
includeScripts={true}
onSubmit={({ body }) => onSubmit(body)}
onSubmit={({ body }) => onSubmit(body as UpdateSettingsFlowBody)}
/>
))}
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/react-spa/src/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const Settings = () => {
// include scripts for webauthn support
includeScripts={true}
// submit the form data the user provides to Ory
onSubmit={({ body }) => onSubmit(body)}
onSubmit={({ body }) => onSubmit(body as UpdateSettingsFlowBody)}
/>
))}
</div>
Expand Down
2 changes: 1 addition & 1 deletion examples/react-spa/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const sdkError = (
const navigate = useNavigate()

return useCallback(
(error: AxiosError): Promise<AxiosError | void> => {
(error: AxiosError<any, unknown>): Promise<AxiosError | void> => {
const responseData = error.response?.data || {}

switch (error.response?.status) {
Expand Down
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

/*
* For a detailed explanation regarding each configuration property, visit:
* https://jestjs.io/docs/configuration
Expand Down
100 changes: 29 additions & 71 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@babel/core": "7.18.10",
"@babel/preset-typescript": "7.23.3",
"@formatjs/cli-lib": "6.3.3",
"@ory/client": "1.2.10",
"@ory/client": "1.6.2",
"@playwright/experimental-ct-react": "1.38.0",
"@playwright/test": "1.38.0",
"@preact/preset-vite": "2.5.0",
Expand Down
3 changes: 3 additions & 0 deletions src/ui/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import { UiNode } from "@ory/client"
import { filterNodesByGroups, FilterNodesByGroups, getNodeLabel } from "./index"
import nodes from "./fixtures/nodes.json"
Expand Down
3 changes: 3 additions & 0 deletions src/ui/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright © 2024 Ory Corp
// SPDX-License-Identifier: Apache-2.0

import type {
UiNode,
UiNodeAnchorAttributes,
Expand Down

0 comments on commit 6b99edf

Please sign in to comment.