create-faas-app 8.0.0-beta.32 → 8.0.0-beta.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { dirname, join } from "node:path";
|
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import enquirer from "enquirer";
|
|
8
8
|
//#region package.json
|
|
9
|
-
var version = "8.0.0-beta.
|
|
9
|
+
var version = "8.0.0-beta.33";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/action/index.ts
|
|
12
12
|
const prompt = enquirer.prompt;
|
package/package.json
CHANGED
|
@@ -25,6 +25,7 @@ declare module '@faasjs/types' {
|
|
|
25
25
|
|
|
26
26
|
import { faas, useApp } from '@faasjs/ant-design'
|
|
27
27
|
import { useFaas } from '@faasjs/react'
|
|
28
|
+
import { toErrorMessage } from '@faasjs/utils'
|
|
28
29
|
import { Button, Card, Input, Space, Table, Typography } from 'antd'
|
|
29
30
|
import { useState } from 'react'
|
|
30
31
|
|
|
@@ -58,7 +59,7 @@ export default function HomePage() {
|
|
|
58
59
|
app.message.success('User saved to PostgreSQL')
|
|
59
60
|
await reload()
|
|
60
61
|
} catch (error: unknown) {
|
|
61
|
-
const errorMessage = error
|
|
62
|
+
const errorMessage = toErrorMessage(error, 'Request failed')
|
|
62
63
|
setMessageText(errorMessage)
|
|
63
64
|
app.notification.error({
|
|
64
65
|
message: 'API call failed',
|
|
@@ -84,7 +85,7 @@ export default function HomePage() {
|
|
|
84
85
|
setMessageText(`Auth plugin injected current user: ${currentUser?.name || 'unknown'}`)
|
|
85
86
|
app.message.success('Auth plugin demo loaded current_user')
|
|
86
87
|
} catch (error: unknown) {
|
|
87
|
-
const errorMessage = error
|
|
88
|
+
const errorMessage = toErrorMessage(error, 'Auth demo failed')
|
|
88
89
|
setMessageText(errorMessage)
|
|
89
90
|
app.notification.error({
|
|
90
91
|
message: 'Auth demo failed',
|