@contember/create 2.0.0-alpha.29 → 2.0.0-alpha.31
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/package.json +2 -2
- package/resources/templates/template-workspace/admin/lib/binding/binding.tsx +2 -1
- package/resources/templates/template-workspace/admin/lib/binding/identity.tsx +2 -1
- package/resources/templates/template-workspace/admin/lib/datagrid/filters/relation.tsx +41 -23
- package/resources/templates/template-workspace/admin/lib/field/formatted-field.tsx +10 -0
- package/resources/templates/template-workspace/admin/lib/field/index.ts +1 -0
- package/resources/templates/template-workspace/admin/lib/formatting/formatting.ts +23 -0
- package/resources/templates/template-workspace/admin/lib/select/filter.tsx +3 -2
- package/resources/templates/template-workspace/admin/lib/select/list.tsx +35 -1
- package/resources/templates/template-workspace/admin/lib/select/multi-select.tsx +6 -15
- package/resources/templates/template-workspace/admin/lib/select/select.tsx +5 -15
- package/resources/templates/template-workspace/admin/lib/select/sortable-select.tsx +23 -18
- package/resources/templates/template-workspace/admin/lib/ui/collapsible.tsx +9 -0
- package/resources/templates/template-workspace/package.json +3 -3
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contember/create",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.31",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"bin": "dist/production/run.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@contember/cli-common": "2.0.0-alpha.
|
|
7
|
+
"@contember/cli-common": "2.0.0-alpha.31",
|
|
8
8
|
"chalk": "^5.3.0",
|
|
9
9
|
"fs-extra": "^11.2.0",
|
|
10
10
|
"js-yaml": "^4.1.0"
|
|
@@ -23,7 +23,8 @@ export interface BindingStateRendererProps {
|
|
|
23
23
|
function BindingStateRenderer({ accessorTreeState, children }: BindingStateRendererProps) {
|
|
24
24
|
useEffect(() => {
|
|
25
25
|
if (accessorTreeState.name === 'error' && accessorTreeState.error.type === 'unauthorized') {
|
|
26
|
-
window.location.
|
|
26
|
+
const backlink = window.location.pathname + window.location.search
|
|
27
|
+
window.location.href = `/?backlink=${encodeURIComponent(backlink)}` // redirect to login with backlink
|
|
27
28
|
}
|
|
28
29
|
}, [accessorTreeState])
|
|
29
30
|
|
|
@@ -43,7 +43,8 @@ export const IdentityLoader = ({ children }: {
|
|
|
43
43
|
|
|
44
44
|
const Redirect = () => {
|
|
45
45
|
useEffect(() => {
|
|
46
|
-
window.location.
|
|
46
|
+
const backlink = window.location.pathname + window.location.search
|
|
47
|
+
window.location.href = `/?backlink=${encodeURIComponent(backlink)}` // redirect to login with backlink
|
|
47
48
|
})
|
|
48
49
|
return null
|
|
49
50
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react'
|
|
2
|
-
import { forwardRef, ReactNode, useCallback } from 'react'
|
|
2
|
+
import { forwardRef, ReactNode, useCallback, useMemo } from 'react'
|
|
3
3
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui/tooltip'
|
|
4
4
|
import {
|
|
5
5
|
DataViewHasManyFilter,
|
|
@@ -30,6 +30,7 @@ import { SelectDefaultFilter, SelectListInner, SelectPopoverContent } from '../.
|
|
|
30
30
|
import { dict } from '../../dict'
|
|
31
31
|
import { DataGridFilterMobileHiding } from './mobile'
|
|
32
32
|
import { DataViewHasManyLabel, DataViewHasOneLabel } from '../labels'
|
|
33
|
+
import { createRequiredContext } from '@contember/react-utils'
|
|
33
34
|
|
|
34
35
|
|
|
35
36
|
type DataGridRelationFilterInnerProps = {
|
|
@@ -143,25 +144,31 @@ export const DataGridRelationFilteredItemsList = ({ children }: {
|
|
|
143
144
|
</>
|
|
144
145
|
)
|
|
145
146
|
|
|
146
|
-
const
|
|
147
|
+
const [, useFilterFactory, FilterFactoryContextProvider] = createRequiredContext<(value: EntityId) => UseDataViewRelationFilterResult>('FilterFactoryContext')
|
|
148
|
+
|
|
149
|
+
type DataGridRelationFilterSelectItemProps = {
|
|
147
150
|
children: ReactNode
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
}
|
|
152
|
+
const DataGridRelationFilterSelectItem = forwardRef<HTMLButtonElement, DataGridRelationFilterSelectItemProps>(({
|
|
153
|
+
children,
|
|
154
|
+
...props
|
|
155
|
+
}, ref) => {
|
|
156
|
+
const entity = useEntity()
|
|
157
|
+
const filterFactory = useFilterFactory()
|
|
158
|
+
const [current, setFilter] = filterFactory(entity.id)
|
|
152
159
|
|
|
153
|
-
|
|
154
|
-
|
|
160
|
+
const include = useCallback(() => setFilter('toggleInclude'), [setFilter])
|
|
161
|
+
const exclude = useCallback(() => setFilter('toggleExclude'), [setFilter])
|
|
155
162
|
|
|
156
|
-
|
|
157
|
-
|
|
163
|
+
const isIncluded = current === 'include'
|
|
164
|
+
const isExcluded = current === 'exclude'
|
|
158
165
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
166
|
+
return (
|
|
167
|
+
<DataGridFilterSelectItemUI ref={ref} onExclude={exclude} onInclude={include} isExcluded={isExcluded} isIncluded={isIncluded} {...props}>
|
|
168
|
+
{children}
|
|
169
|
+
</DataGridFilterSelectItemUI>
|
|
170
|
+
)
|
|
171
|
+
})
|
|
165
172
|
|
|
166
173
|
|
|
167
174
|
export const DataGridRelationFilterSelect = ({ children, queryField, label }: {
|
|
@@ -190,19 +197,30 @@ export const DataGridRelationFilterControls = ({ children, queryField }: {
|
|
|
190
197
|
queryField?: DataViewUnionFilterFields
|
|
191
198
|
children: ReactNode
|
|
192
199
|
}) => {
|
|
200
|
+
const inner = useMemo(() => <DataGridRelationFilterControlsInner>{children}</DataGridRelationFilterControlsInner>, [children])
|
|
193
201
|
const filterFactory = useDataViewRelationFilterFactory(useDataViewFilterName())
|
|
194
202
|
return (
|
|
195
|
-
|
|
203
|
+
<FilterFactoryContextProvider value={filterFactory}>
|
|
196
204
|
<DataViewRelationFilterOptions queryField={queryField}>
|
|
197
|
-
|
|
198
|
-
<DataGridRelationFilterSelectItem filterFactory={filterFactory}>
|
|
199
|
-
{children}
|
|
200
|
-
</DataGridRelationFilterSelectItem>
|
|
201
|
-
</SelectListInner>
|
|
205
|
+
{inner}
|
|
202
206
|
</DataViewRelationFilterOptions>
|
|
203
207
|
<div>
|
|
204
208
|
<DataGridNullFilter />
|
|
205
209
|
</div>
|
|
206
|
-
|
|
210
|
+
</FilterFactoryContextProvider>
|
|
207
211
|
)
|
|
208
212
|
}
|
|
213
|
+
|
|
214
|
+
type DataGridRelationFilterControlsInnerProps = {
|
|
215
|
+
children: ReactNode
|
|
216
|
+
}
|
|
217
|
+
const DataGridRelationFilterControlsInner = Component<DataGridRelationFilterControlsInnerProps>(({ children }) => {
|
|
218
|
+
|
|
219
|
+
return <>
|
|
220
|
+
<SelectListInner filterToolbar={<SelectDefaultFilter />}>
|
|
221
|
+
<DataGridRelationFilterSelectItem>
|
|
222
|
+
{children}
|
|
223
|
+
</DataGridRelationFilterSelectItem>
|
|
224
|
+
</SelectListInner>
|
|
225
|
+
</>
|
|
226
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Component, FieldView, SugaredRelativeSingleField } from '@contember/interface'
|
|
2
|
+
import { getFormatter } from '../formatting'
|
|
3
|
+
|
|
4
|
+
export interface FormattedFieldProps {
|
|
5
|
+
field: SugaredRelativeSingleField['field']
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export const FormattedField = Component<FormattedFieldProps>(({ field }) => {
|
|
9
|
+
return <FieldView field={field} render={it => getFormatter(it.schema)(it.value)} />
|
|
10
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './formatted-field'
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SchemaColumn } from '@contember/interface'
|
|
1
2
|
import { dict } from '../dict'
|
|
2
3
|
|
|
3
4
|
export const formatDate = (date: string | null) => {
|
|
@@ -58,3 +59,25 @@ export const formatDuration = (duration: number) => {
|
|
|
58
59
|
const seconds = duration % 60
|
|
59
60
|
return `${minutes}:${seconds.toString().padStart(2, '0')}`
|
|
60
61
|
}
|
|
62
|
+
|
|
63
|
+
export const formatJson = (value: any) => {
|
|
64
|
+
return JSON.stringify(value, null, 2)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export const getFormatter = (schema: SchemaColumn) => {
|
|
68
|
+
switch (schema.type) {
|
|
69
|
+
case 'Date':
|
|
70
|
+
return formatDate
|
|
71
|
+
case 'DateTime':
|
|
72
|
+
return formatDateTime
|
|
73
|
+
case 'Bool':
|
|
74
|
+
return formatBoolean
|
|
75
|
+
case 'Integer':
|
|
76
|
+
case 'Float':
|
|
77
|
+
return formatNumber
|
|
78
|
+
case 'Json':
|
|
79
|
+
return formatJson
|
|
80
|
+
default:
|
|
81
|
+
return (value: any) => value
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -2,12 +2,13 @@ import * as React from 'react'
|
|
|
2
2
|
import { Input } from '../ui/input'
|
|
3
3
|
import { DataViewHasFilterType, DataViewQueryFilterName, DataViewTextFilterInput } from '@contember/react-dataview'
|
|
4
4
|
import { dict } from '../dict'
|
|
5
|
+
import { memo } from 'react'
|
|
5
6
|
|
|
6
7
|
|
|
7
|
-
export const SelectDefaultFilter = () => (
|
|
8
|
+
export const SelectDefaultFilter = memo(() => (
|
|
8
9
|
<DataViewHasFilterType name={DataViewQueryFilterName}>
|
|
9
10
|
<DataViewTextFilterInput name={DataViewQueryFilterName}>
|
|
10
11
|
<Input placeholder={dict.select.search} className={'w-full'} autoFocus inputSize={'sm'} />
|
|
11
12
|
</DataViewTextFilterInput>
|
|
12
13
|
</DataViewHasFilterType>
|
|
13
|
-
)
|
|
14
|
+
))
|
|
@@ -11,12 +11,44 @@ import {
|
|
|
11
11
|
DataViewInfiniteLoadTrigger,
|
|
12
12
|
DataViewKeyboardEventHandler,
|
|
13
13
|
DataViewLoaderState,
|
|
14
|
+
DataViewSortingDirections,
|
|
15
|
+
DataViewUnionFilterFields,
|
|
14
16
|
} from '@contember/react-dataview'
|
|
15
17
|
import { useOnHighlight } from './highlight'
|
|
16
18
|
import { Component } from '@contember/interface'
|
|
17
19
|
import { Button } from '../ui/button'
|
|
18
20
|
import { ArrowBigDownDash } from 'lucide-react'
|
|
21
|
+
import { SelectDefaultFilter } from './filter'
|
|
22
|
+
import { SelectListItemUI } from './ui'
|
|
23
|
+
import { SelectDataView, SelectItemTrigger, SelectOption } from '@contember/react-select'
|
|
19
24
|
|
|
25
|
+
export interface DefaultSelectDataViewProps {
|
|
26
|
+
queryField?: DataViewUnionFilterFields
|
|
27
|
+
initialSorting?: DataViewSortingDirections
|
|
28
|
+
children: ReactNode
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const DefaultSelectDataView = Component< DefaultSelectDataViewProps>(({ children, initialSorting, queryField }) => {
|
|
32
|
+
return <>
|
|
33
|
+
<SelectDataView initialSorting={initialSorting} queryField={queryField}>
|
|
34
|
+
<DefaultSelectDataViewRenderer>
|
|
35
|
+
{children}
|
|
36
|
+
</DefaultSelectDataViewRenderer>
|
|
37
|
+
</SelectDataView>
|
|
38
|
+
</>
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
const DefaultSelectDataViewRenderer = Component<{children: ReactNode}>(({ children }) => <>
|
|
42
|
+
<SelectListInner filterToolbar={<SelectDefaultFilter />}>
|
|
43
|
+
<SelectOption>
|
|
44
|
+
<SelectItemTrigger>
|
|
45
|
+
<SelectListItemUI>
|
|
46
|
+
{children}
|
|
47
|
+
</SelectListItemUI>
|
|
48
|
+
</SelectItemTrigger>
|
|
49
|
+
</SelectOption>
|
|
50
|
+
</SelectListInner>
|
|
51
|
+
</>)
|
|
20
52
|
|
|
21
53
|
export type SelectListProps =
|
|
22
54
|
& {
|
|
@@ -41,7 +73,9 @@ export const SelectListInner = Component(({ children, filterToolbar }: SelectLis
|
|
|
41
73
|
{children}
|
|
42
74
|
</DataViewHighlightRow>
|
|
43
75
|
</DataViewInfiniteLoadEachRow>
|
|
44
|
-
<
|
|
76
|
+
<DataViewLoaderState loaded>
|
|
77
|
+
<DataViewInfiniteLoadScrollObserver />
|
|
78
|
+
</DataViewLoaderState>
|
|
45
79
|
<DataViewInfiniteLoadTrigger>
|
|
46
80
|
<Button size="sm" variant="ghost" className="disabled:hidden">
|
|
47
81
|
<ArrowBigDownDash size={16} />
|
|
@@ -9,15 +9,13 @@ import {
|
|
|
9
9
|
SelectInputActionsUI,
|
|
10
10
|
SelectInputUI,
|
|
11
11
|
SelectInputWrapperUI,
|
|
12
|
-
SelectListItemUI,
|
|
13
12
|
SelectPopoverContent,
|
|
14
13
|
} from './ui'
|
|
15
14
|
import { ChevronDownIcon } from 'lucide-react'
|
|
16
15
|
import { Popover, PopoverTrigger } from '../ui/popover'
|
|
17
16
|
import { Component, RecursionTerminatorPortal, SugaredQualifiedEntityList, SugaredRelativeEntityList } from '@contember/interface'
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import { MultiSelect, SelectDataView, SelectEachValue, SelectItemTrigger, SelectOption, SelectPlaceholder } from '@contember/react-select'
|
|
17
|
+
import { DefaultSelectDataView } from './list'
|
|
18
|
+
import { MultiSelect, SelectEachValue, SelectItemTrigger, SelectPlaceholder } from '@contember/react-select'
|
|
21
19
|
import { CreateEntityDialog } from './create-new'
|
|
22
20
|
import { DataViewSortingDirections, DataViewUnionFilterFields } from '@contember/react-dataview'
|
|
23
21
|
import { useFormFieldId } from '@contember/react-form'
|
|
@@ -35,6 +33,7 @@ export type MultiSelectInputProps =
|
|
|
35
33
|
|
|
36
34
|
export const MultiSelectInput = Component<MultiSelectInputProps>(({ field, queryField, options, children, placeholder, createNewForm, initialSorting }) => {
|
|
37
35
|
const id = useFormFieldId()
|
|
36
|
+
|
|
38
37
|
return (
|
|
39
38
|
<MultiSelect field={field} options={options}>
|
|
40
39
|
<div className="flex gap-1 items-center">
|
|
@@ -65,17 +64,9 @@ export const MultiSelectInput = Component<MultiSelectInputProps>(({ field, query
|
|
|
65
64
|
|
|
66
65
|
</SelectInputWrapperUI>
|
|
67
66
|
<SelectPopoverContent>
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
<SelectItemTrigger>
|
|
72
|
-
<SelectListItemUI>
|
|
73
|
-
{children}
|
|
74
|
-
</SelectListItemUI>
|
|
75
|
-
</SelectItemTrigger>
|
|
76
|
-
</SelectOption>
|
|
77
|
-
</SelectListInner>
|
|
78
|
-
</SelectDataView>
|
|
67
|
+
<DefaultSelectDataView initialSorting={initialSorting} queryField={queryField}>
|
|
68
|
+
{children}
|
|
69
|
+
</DefaultSelectDataView>
|
|
79
70
|
</SelectPopoverContent>
|
|
80
71
|
</Popover>
|
|
81
72
|
{createNewForm && (
|
|
@@ -17,13 +17,11 @@ import {
|
|
|
17
17
|
SelectInputActionsUI,
|
|
18
18
|
SelectInputUI,
|
|
19
19
|
SelectInputWrapperUI,
|
|
20
|
-
SelectListItemUI,
|
|
21
20
|
SelectPopoverContent,
|
|
22
21
|
} from './ui'
|
|
23
|
-
import {
|
|
24
|
-
import { Select,
|
|
22
|
+
import { DefaultSelectDataView } from './list'
|
|
23
|
+
import { Select, SelectEachValue, SelectItemTrigger, SelectPlaceholder } from '@contember/react-select'
|
|
25
24
|
import { CreateEntityDialog } from './create-new'
|
|
26
|
-
import { SelectDefaultFilter } from './filter'
|
|
27
25
|
import { DataViewSortingDirections, DataViewUnionFilterFields } from '@contember/react-dataview'
|
|
28
26
|
import { useFormFieldId } from '@contember/react-form'
|
|
29
27
|
import { dict } from '../dict'
|
|
@@ -82,17 +80,9 @@ export const SelectInput = Component<SelectInputProps>(({ field, queryField, opt
|
|
|
82
80
|
</SelectInputActionsUI>
|
|
83
81
|
</SelectInputWrapperUI>
|
|
84
82
|
<SelectPopoverContent>
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<SelectItemTrigger>
|
|
89
|
-
<SelectListItemUI>
|
|
90
|
-
{children}
|
|
91
|
-
</SelectListItemUI>
|
|
92
|
-
</SelectItemTrigger>
|
|
93
|
-
</SelectOption>
|
|
94
|
-
</SelectListInner>
|
|
95
|
-
</SelectDataView>
|
|
83
|
+
<DefaultSelectDataView initialSorting={initialSorting} queryField={queryField}>
|
|
84
|
+
{children}
|
|
85
|
+
</DefaultSelectDataView>
|
|
96
86
|
</SelectPopoverContent>
|
|
97
87
|
</Popover>
|
|
98
88
|
{createNewForm && (
|
|
@@ -10,19 +10,32 @@ import {
|
|
|
10
10
|
SelectCreateNewTrigger,
|
|
11
11
|
SelectDefaultPlaceholderUI,
|
|
12
12
|
SelectInputActionsUI,
|
|
13
|
-
SelectInputUI,
|
|
14
|
-
|
|
13
|
+
SelectInputUI,
|
|
14
|
+
SelectInputWrapperUI,
|
|
15
15
|
SelectPopoverContent,
|
|
16
16
|
} from './ui'
|
|
17
17
|
import { Popover, PopoverTrigger } from '../ui/popover'
|
|
18
18
|
import { ChevronDownIcon } from 'lucide-react'
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
import { DefaultSelectDataView } from './list'
|
|
20
|
+
import {
|
|
21
|
+
RepeaterSortable,
|
|
22
|
+
RepeaterSortableDragOverlay,
|
|
23
|
+
RepeaterSortableDropIndicator,
|
|
24
|
+
RepeaterSortableEachItem,
|
|
25
|
+
RepeaterSortableItemActivator,
|
|
26
|
+
RepeaterSortableItemNode,
|
|
27
|
+
} from '@contember/react-repeater-dnd-kit'
|
|
28
|
+
import {
|
|
29
|
+
Component,
|
|
30
|
+
HasOne,
|
|
31
|
+
SugaredQualifiedEntityList,
|
|
32
|
+
SugaredRelativeEntityList,
|
|
33
|
+
SugaredRelativeSingleEntity,
|
|
34
|
+
SugaredRelativeSingleField,
|
|
35
|
+
} from '@contember/interface'
|
|
36
|
+
import { SelectItemTrigger, SelectPlaceholder, SortableMultiSelect } from '@contember/react-select'
|
|
23
37
|
import { CreateEntityDialog } from './create-new'
|
|
24
38
|
import { DataViewSortingDirections, DataViewUnionFilterFields } from '@contember/react-dataview'
|
|
25
|
-
import { SelectDefaultFilter } from './filter'
|
|
26
39
|
import { useFormFieldId } from '@contember/react-form'
|
|
27
40
|
|
|
28
41
|
const MultiSortableSelectDropIndicator = ({ position }: { position: 'before' | 'after' }) => (
|
|
@@ -99,17 +112,9 @@ export const SortableMultiSelectInput = Component<SortableMultiSelectInputProps>
|
|
|
99
112
|
</SelectInputWrapperUI>
|
|
100
113
|
|
|
101
114
|
<SelectPopoverContent>
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
<SelectItemTrigger>
|
|
106
|
-
<SelectListItemUI>
|
|
107
|
-
{children}
|
|
108
|
-
</SelectListItemUI>
|
|
109
|
-
</SelectItemTrigger>
|
|
110
|
-
</SelectOption>
|
|
111
|
-
</SelectListInner>
|
|
112
|
-
</SelectDataView>
|
|
115
|
+
<DefaultSelectDataView initialSorting={initialSorting} queryField={queryField}>
|
|
116
|
+
{children}
|
|
117
|
+
</DefaultSelectDataView>
|
|
113
118
|
</SelectPopoverContent>
|
|
114
119
|
</Popover>
|
|
115
120
|
{createNewForm && (
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'
|
|
2
|
+
|
|
3
|
+
const Collapsible = CollapsiblePrimitive.Root
|
|
4
|
+
|
|
5
|
+
const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger
|
|
6
|
+
|
|
7
|
+
const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent
|
|
8
|
+
|
|
9
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent }
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
3
|
"scripts": {
|
|
4
|
-
"contember": "docker
|
|
4
|
+
"contember": "docker compose run --rm contember-cli",
|
|
5
5
|
"start": "yarn run contember:start-engine && yarn run client:generate && yarn contember:start-admin",
|
|
6
6
|
"build": "yarn run ts:build && yarn run contember:build-admin \"$0\" && yarn run contember:build-api",
|
|
7
|
-
"deploy": "yarn run build \"$0\" && docker
|
|
8
|
-
"contember:start-engine": "docker
|
|
7
|
+
"deploy": "yarn run build \"$0\" && docker compose run --no-deps contember-cli deploy \"$@\" --root",
|
|
8
|
+
"contember:start-engine": "docker compose up --detach && yarn run contember migrations:execute --yes",
|
|
9
9
|
"contember:start-admin": "yarn workspace @app/admin dev",
|
|
10
10
|
"contember:build-admin": "tsc --project admin && yarn workspace @app/admin build \"$0\"",
|
|
11
11
|
"contember:build-api": "tsc --project api",
|