nitro-web 0.0.28 → 0.0.30

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.
@@ -9,7 +9,7 @@ export default {
9
9
  email: { type: 'email', required: true, index: 'unique' },
10
10
  firstName: { type: 'string', required: true },
11
11
  lastName: { type: 'string' },
12
- password: { type: 'string', minLength: 6, required: true },
12
+ password: { type: 'string', minLength: 6 },
13
13
  resetToken: { type: 'string' },
14
14
  status: { type: 'string', default: 'active', enum: ['active', 'deleted', 'inactive'] },
15
15
  stripeCustomer: { type: 'any' },
package/tsconfig.json CHANGED
@@ -31,6 +31,7 @@
31
31
  "client",
32
32
  "components/**/*.tsx",
33
33
  "components/**/*.ts",
34
- "types"
34
+ "types",
35
+ "./types/core-only-globals.d.ts"
35
36
  ]
36
37
  }
@@ -0,0 +1,9 @@
1
+ import { Store } from 'nitro-web/types'
2
+ import { Dispatch, SetStateAction } from 'react'
3
+
4
+ // Core-only global, this global will be defined globally in the project (e.g. in ./client/index.ts)
5
+ declare global {
6
+ const useTracked: () => [Store, Dispatch<SetStateAction<Store>>]
7
+ }
8
+
9
+ export {}
package/types.ts CHANGED
@@ -46,10 +46,10 @@ export type MessageObject = {
46
46
  }
47
47
 
48
48
  export type Store = {
49
- message?: MessageObject | string | null
50
- user?: User | null,
51
49
  apiAvailable?: boolean
52
50
  jwt?: string
51
+ message?: MessageObject | string
52
+ user?: User,
53
53
  }
54
54
 
55
55
  export type Svg = React.FC<React.SVGProps<SVGElement>>