create-faas-app 8.0.0-beta.33 → 8.0.0-beta.35
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 +3 -4
- package/package.json +1 -1
- package/template/admin/src/{types/faasjs-pg.d.ts → db/tables/users.ts} +0 -2
- package/template/admin/src/pages/home/index.tsx +3 -2
- package/template/admin/tsconfig.json +1 -1
- /package/template/admin/{migrations → src/db/migrations}/20250101000000_create_users.ts +0 -0
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.34";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/action/index.ts
|
|
12
12
|
const prompt = enquirer.prompt;
|
|
@@ -56,7 +56,7 @@ function scaffold(rootPath, replacements, templateName) {
|
|
|
56
56
|
* @param {object} [options] - Optional CLI arguments used to choose the project name and template.
|
|
57
57
|
* @param {string} [options.name] - Target folder name for the generated app.
|
|
58
58
|
* @param {string} [options.template] - Template name such as `admin` or `minimal`.
|
|
59
|
-
* @returns {Promise<void>} Resolves after the project is
|
|
59
|
+
* @returns {Promise<void>} Resolves after the project is scaffolded, dependencies are installed, and tests pass.
|
|
60
60
|
* @throws {Error} When the selected template is unknown.
|
|
61
61
|
* @example
|
|
62
62
|
* ```ts
|
|
@@ -87,8 +87,7 @@ async function action(options = {}) {
|
|
|
87
87
|
/**
|
|
88
88
|
* Register the `create-faas-app` command on a Commander program.
|
|
89
89
|
*
|
|
90
|
-
* @param {Command} program - Commander program instance
|
|
91
|
-
* @returns {void} No return value.
|
|
90
|
+
* @param {Command} program - Commander program instance to register the command on.
|
|
92
91
|
* @example
|
|
93
92
|
* ```ts
|
|
94
93
|
* const program = new Command()
|
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',
|
|
File without changes
|