@contember/create 2.1.0-alpha.3 → 2.1.0-alpha.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/development/run.cjs +6 -4
- package/dist/development/run.cjs.map +1 -1
- package/dist/development/run.js +6 -4
- package/dist/development/run.js.map +1 -1
- package/dist/development/src/commands/WorkspaceCreateCommand.cjs +37 -23
- package/dist/development/src/commands/WorkspaceCreateCommand.cjs.map +1 -1
- package/dist/development/src/commands/WorkspaceCreateCommand.js +37 -23
- package/dist/development/src/commands/WorkspaceCreateCommand.js.map +1 -1
- package/dist/development/src/lib/FileSystem.cjs +1 -0
- package/dist/development/src/lib/FileSystem.cjs.map +1 -1
- package/dist/development/src/lib/FileSystem.js +1 -0
- package/dist/development/src/lib/FileSystem.js.map +1 -1
- package/dist/development/src/lib/TemplateInstaller.cjs +28 -12
- package/dist/development/src/lib/TemplateInstaller.cjs.map +1 -1
- package/dist/development/src/lib/TemplateInstaller.js +28 -12
- package/dist/development/src/lib/TemplateInstaller.js.map +1 -1
- package/dist/development/src/lib/packageManagerDetector.cjs +22 -0
- package/dist/development/src/lib/packageManagerDetector.cjs.map +1 -0
- package/dist/development/src/lib/packageManagerDetector.js +22 -0
- package/dist/development/src/lib/packageManagerDetector.js.map +1 -0
- package/dist/development/src/lib/version.cjs.map +1 -1
- package/dist/development/src/lib/version.js.map +1 -1
- package/dist/development/src/paths.cjs.map +1 -1
- package/dist/development/src/paths.js.map +1 -1
- package/dist/production/run.cjs +6 -4
- package/dist/production/run.cjs.map +1 -1
- package/dist/production/run.js +6 -4
- package/dist/production/run.js.map +1 -1
- package/dist/production/src/commands/WorkspaceCreateCommand.cjs +37 -23
- package/dist/production/src/commands/WorkspaceCreateCommand.cjs.map +1 -1
- package/dist/production/src/commands/WorkspaceCreateCommand.js +37 -23
- package/dist/production/src/commands/WorkspaceCreateCommand.js.map +1 -1
- package/dist/production/src/lib/FileSystem.cjs +1 -0
- package/dist/production/src/lib/FileSystem.cjs.map +1 -1
- package/dist/production/src/lib/FileSystem.js +1 -0
- package/dist/production/src/lib/FileSystem.js.map +1 -1
- package/dist/production/src/lib/TemplateInstaller.cjs +28 -12
- package/dist/production/src/lib/TemplateInstaller.cjs.map +1 -1
- package/dist/production/src/lib/TemplateInstaller.js +28 -12
- package/dist/production/src/lib/TemplateInstaller.js.map +1 -1
- package/dist/production/src/lib/packageManagerDetector.cjs +22 -0
- package/dist/production/src/lib/packageManagerDetector.cjs.map +1 -0
- package/dist/production/src/lib/packageManagerDetector.js +22 -0
- package/dist/production/src/lib/packageManagerDetector.js.map +1 -0
- package/dist/production/src/lib/version.cjs.map +1 -1
- package/dist/production/src/lib/version.js.map +1 -1
- package/dist/production/src/paths.cjs.map +1 -1
- package/dist/production/src/paths.js.map +1 -1
- package/dist/types/commands/WorkspaceCreateCommand.d.ts +4 -2
- package/dist/types/commands/WorkspaceCreateCommand.d.ts.map +1 -1
- package/dist/types/lib/FileSystem.d.ts +1 -0
- package/dist/types/lib/FileSystem.d.ts.map +1 -1
- package/dist/types/lib/TemplateInstaller.d.ts.map +1 -1
- package/dist/types/lib/packageManagerDetector.d.ts +3 -0
- package/dist/types/lib/packageManagerDetector.d.ts.map +1 -0
- package/package.json +15 -6
- package/resources/templates/{template-workspace → default}/.github/workflows/deploy.yaml +1 -1
- package/resources/templates/default/.gitignore.dist +154 -0
- package/resources/templates/default/README.md +98 -0
- package/resources/templates/{template-workspace → default}/admin/.env.development +1 -0
- package/resources/templates/default/admin/.env.production +6 -0
- package/resources/templates/{template-workspace → default}/admin/app/components/layout.tsx +7 -3
- package/resources/templates/default/admin/app/components/navigation.tsx +85 -0
- package/resources/templates/{template-workspace → default}/admin/app/index.tsx +4 -4
- package/resources/templates/default/admin/app/pages/tenant.tsx +160 -0
- package/resources/templates/default/admin/entrypoint/components/layout.tsx +14 -0
- package/resources/templates/default/admin/entrypoint/components/logged-in.tsx +47 -0
- package/resources/templates/default/admin/entrypoint/components/login.tsx +103 -0
- package/resources/templates/default/admin/entrypoint/config.ts +35 -0
- package/resources/templates/default/admin/entrypoint/contexts/login.tsx +18 -0
- package/resources/templates/default/admin/entrypoint/index.tsx +12 -0
- package/resources/templates/default/admin/entrypoint/login-entrypoint.tsx +24 -0
- package/resources/templates/default/admin/entrypoint/pages/index.tsx +48 -0
- package/resources/templates/default/admin/entrypoint/pages/magicLink.tsx +56 -0
- package/resources/templates/default/admin/entrypoint/pages/magicLinkSent.tsx +63 -0
- package/resources/templates/default/admin/entrypoint/pages/passwordReset.tsx +44 -0
- package/resources/templates/default/admin/entrypoint/pages/resetRequest.tsx +35 -0
- package/resources/templates/default/admin/entrypoint/pages/resetRequestSuccess.tsx +34 -0
- package/resources/templates/default/admin/index.css +94 -0
- package/resources/templates/{template-workspace → default}/admin/index.html +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/binding/binding.tsx +0 -2
- package/resources/templates/{template-workspace → default}/admin/lib/binding/hooks.tsx +14 -8
- package/resources/templates/default/admin/lib/binding/identity.tsx +51 -0
- package/resources/templates/{template-workspace → default}/admin/lib/binding/navigation-guard-dialog.tsx +12 -8
- package/resources/templates/{template-workspace → default}/admin/lib/binding/persist.tsx +7 -5
- package/resources/templates/{template-workspace → default}/admin/lib/block-repeater/block-repeater.tsx +14 -16
- package/resources/templates/{template-workspace → default}/admin/lib/board/board.tsx +61 -47
- package/resources/templates/{template-workspace → default}/admin/lib/buttons/back-button.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/cells.tsx +49 -35
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/column-header.tsx +47 -38
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/columns.tsx +128 -105
- package/resources/templates/default/admin/lib/datagrid/elements.tsx +63 -0
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/empty.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/boolean.tsx +1 -4
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/common.tsx +14 -14
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/date.tsx +35 -21
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/defined.tsx +0 -1
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/enum.tsx +24 -30
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/mobile.tsx +2 -3
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/number.tsx +0 -3
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/relation.tsx +36 -30
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/labels.tsx +0 -1
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/loader.tsx +2 -7
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/pagination.tsx +33 -38
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/table.tsx +8 -6
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/tiles.tsx +10 -5
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/toolbar.tsx +10 -7
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/ui.tsx +12 -15
- package/resources/templates/{template-workspace → default}/admin/lib/dev/login-panel.tsx +23 -16
- package/resources/templates/{template-workspace → default}/admin/lib/dict.ts +17 -5
- package/resources/templates/default/admin/lib/dimensions/dimensions.tsx +159 -0
- package/resources/templates/{template-workspace → default}/admin/lib/editor/block-editor.tsx +22 -10
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/baseEditorPlugins.tsx +0 -2
- package/resources/templates/default/admin/lib/editor/common/buttons.tsx +205 -0
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/editor-block-toolbar.tsx +3 -1
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/editor-canvas.tsx +6 -4
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/editor-editable-canvas.tsx +0 -1
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/editor-inline-toolbar.tsx +5 -2
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/AnchorRenderer.tsx +18 -16
- package/resources/templates/default/admin/lib/editor/common/elements/BlockElement.tsx +60 -0
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/HeadingRenderer.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/TableCellElementRenderer.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/TableElementRenderer.tsx +2 -7
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/TableRowElementRenderer.tsx +1 -5
- package/resources/templates/{template-workspace → default}/admin/lib/editor/editor-block.tsx +17 -10
- package/resources/templates/{template-workspace → default}/admin/lib/editor/rich-text-view.tsx +11 -6
- package/resources/templates/{template-workspace → default}/admin/lib/editor/rich-text.tsx +6 -7
- package/resources/templates/default/admin/lib/editor/sortable-block.tsx +57 -0
- package/resources/templates/default/admin/lib/form/container.tsx +72 -0
- package/resources/templates/{template-workspace → default}/admin/lib/form/inputs.tsx +14 -12
- package/resources/templates/{template-workspace → default}/admin/lib/form/select.tsx +93 -51
- package/resources/templates/{template-workspace → default}/admin/lib/form/ui.tsx +1 -1
- package/resources/templates/default/admin/lib/form/upload-repeaters.tsx +221 -0
- package/resources/templates/{template-workspace → default}/admin/lib/form/upload.tsx +61 -62
- package/resources/templates/{template-workspace → default}/admin/lib/labels/enum-labels.ts +6 -3
- package/resources/templates/{template-workspace → default}/admin/lib/labels/field-labels.ts +4 -2
- package/resources/templates/{template-workspace → default}/admin/lib/layout/layout-boxed.tsx +39 -29
- package/resources/templates/{template-workspace → default}/admin/lib/layout/slots.tsx +1 -4
- package/resources/templates/{template-workspace → default}/admin/lib/outdated-application-dialog/outdated-application-dialog.tsx +10 -4
- package/resources/templates/{template-workspace → default}/admin/lib/repeater/repeater.tsx +24 -15
- package/resources/templates/{template-workspace → default}/admin/lib/select/create-new.tsx +0 -3
- package/resources/templates/{template-workspace → default}/admin/lib/select/filter.tsx +0 -1
- package/resources/templates/{template-workspace → default}/admin/lib/select/list.tsx +33 -28
- package/resources/templates/default/admin/lib/select/multi-select.tsx +92 -0
- package/resources/templates/default/admin/lib/select/select.tsx +109 -0
- package/resources/templates/default/admin/lib/select/sortable-select.tsx +138 -0
- package/resources/templates/{template-workspace → default}/admin/lib/select/ui.tsx +13 -11
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/change-my-password.tsx +21 -8
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/common.tsx +21 -12
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/create-api-key.tsx +9 -5
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/invite.tsx +12 -7
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/login.tsx +26 -7
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/memberships-control.tsx +32 -20
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/password-reset-request.tsx +9 -5
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/password-reset.tsx +21 -8
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/passwordless-signin-init.tsx +9 -5
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/passwordless-signin.tsx +25 -12
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/update-project-member.tsx +3 -4
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/hooks/useInviteUser.tsx +2 -3
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/listing/api-key-list.tsx +5 -3
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/listing/member-delete-dialog.tsx +13 -2
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/listing/member-list.tsx +17 -11
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/listing/person-list.tsx +6 -4
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/otp/otp-setup.tsx +86 -59
- package/resources/templates/default/admin/lib/toast/toast.tsx +113 -0
- package/resources/templates/{template-workspace → default}/admin/lib/toast/toaster.tsx +0 -1
- package/resources/templates/{template-workspace → default}/admin/lib/ui/alert-dialog.tsx +4 -3
- package/resources/templates/default/admin/lib/ui/button.tsx +30 -0
- package/resources/templates/{template-workspace → default}/admin/lib/ui/card.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/ui/dialog.tsx +12 -8
- package/resources/templates/default/admin/lib/ui/dimension.tsx +9 -0
- package/resources/templates/{template-workspace → default}/admin/lib/ui/dropdown.tsx +18 -15
- package/resources/templates/default/admin/lib/ui/input.tsx +68 -0
- package/resources/templates/{template-workspace → default}/admin/lib/ui/loader.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/ui/menu.tsx +3 -11
- package/resources/templates/{template-workspace → default}/admin/lib/ui/overlay.tsx +11 -9
- package/resources/templates/{template-workspace → default}/admin/lib/ui/popover.tsx +2 -2
- package/resources/templates/{template-workspace → default}/admin/lib/ui/property-list.tsx +5 -5
- package/resources/templates/{template-workspace → default}/admin/lib/ui/scroll-area.tsx +11 -11
- package/resources/templates/{template-workspace → default}/admin/lib/ui/select.tsx +4 -5
- package/resources/templates/{template-workspace → default}/admin/lib/ui/sheet.tsx +9 -8
- package/resources/templates/{template-workspace → default}/admin/lib/ui/sidebar.tsx +53 -42
- package/resources/templates/{template-workspace → default}/admin/lib/ui/sortable.tsx +1 -1
- package/resources/templates/default/admin/lib/ui/switch.tsx +11 -0
- package/resources/templates/{template-workspace → default}/admin/lib/ui/table.tsx +3 -3
- package/resources/templates/{template-workspace → default}/admin/lib/ui/textarea.tsx +10 -7
- package/resources/templates/{template-workspace → default}/admin/lib/ui/toggle-group.tsx +9 -5
- package/resources/templates/{template-workspace → default}/admin/lib/ui/toggle.tsx +3 -5
- package/resources/templates/{template-workspace → default}/admin/lib/ui/tooltip.tsx +4 -3
- package/resources/templates/{template-workspace → default}/admin/lib/upload/dropzone.tsx +14 -10
- package/resources/templates/{template-workspace → default}/admin/lib/upload/repeater.tsx +0 -1
- package/resources/templates/{template-workspace → default}/admin/lib/upload/ui.tsx +4 -8
- package/resources/templates/{template-workspace → default}/admin/lib/upload/upload-progress.tsx +28 -12
- package/resources/templates/{template-workspace → default}/admin/lib/upload/view.tsx +130 -68
- package/resources/templates/{template-workspace → default}/admin/lib/utils/createComponentOpenHooks.tsx +10 -6
- package/resources/templates/{template-workspace → default}/admin/lib/utils/uic.tsx +24 -14
- package/resources/templates/{template-workspace → default}/admin/lib/utils/use-mobile.ts +1 -3
- package/resources/templates/{template-workspace → default}/admin/package.json +6 -4
- package/resources/templates/default/admin/sentry.ts +26 -0
- package/resources/templates/{template-workspace → default}/admin/tsconfig.json +1 -9
- package/resources/templates/default/admin/vite-env.d.ts +12 -0
- package/resources/templates/default/admin/vite.config.ts +11 -0
- package/resources/templates/default/api/README.md +87 -0
- package/resources/templates/{template-workspace → default}/biome.json +1 -1
- package/resources/templates/default/client/README.md +285 -0
- package/resources/templates/{template-workspace → default}/contember.template.yaml +5 -0
- package/resources/templates/{template-workspace → default}/package.json +1 -1
- package/resources/templates/default/scripts/generate-client.sh +7 -0
- package/resources/templates/default/scripts/update-ui-lib.sh +344 -0
- package/src/commands/WorkspaceCreateCommand.ts +41 -25
- package/src/lib/FileSystem.ts +1 -0
- package/src/lib/TemplateInstaller.ts +32 -12
- package/src/lib/packageManagerDetector.ts +24 -0
- package/src/run.ts +8 -7
- package/dist/types/tsconfig.tsbuildinfo +0 -1
- package/resources/templates/template-workspace/.gitignore.dist +0 -3
- package/resources/templates/template-workspace/admin/app/components/navigation.tsx +0 -1
- package/resources/templates/template-workspace/admin/index.css +0 -53
- package/resources/templates/template-workspace/admin/index.tsx +0 -268
- package/resources/templates/template-workspace/admin/lib/binding/identity.tsx +0 -50
- package/resources/templates/template-workspace/admin/lib/datagrid/elements.tsx +0 -48
- package/resources/templates/template-workspace/admin/lib/dimensions/dimensions.tsx +0 -135
- package/resources/templates/template-workspace/admin/lib/editor/common/buttons.tsx +0 -83
- package/resources/templates/template-workspace/admin/lib/editor/common/elements/BlockElement.tsx +0 -48
- package/resources/templates/template-workspace/admin/lib/editor/sortable-block.tsx +0 -51
- package/resources/templates/template-workspace/admin/lib/form/container.tsx +0 -59
- package/resources/templates/template-workspace/admin/lib/form/upload-repeaters.tsx +0 -188
- package/resources/templates/template-workspace/admin/lib/select/multi-select.tsx +0 -96
- package/resources/templates/template-workspace/admin/lib/select/select.tsx +0 -104
- package/resources/templates/template-workspace/admin/lib/select/sortable-select.tsx +0 -136
- package/resources/templates/template-workspace/admin/lib/toast/toast.tsx +0 -112
- package/resources/templates/template-workspace/admin/lib/ui/button.tsx +0 -29
- package/resources/templates/template-workspace/admin/lib/ui/input.tsx +0 -69
- package/resources/templates/template-workspace/admin/lib/ui/switch.tsx +0 -9
- package/resources/templates/template-workspace/admin/postcss.config.js +0 -6
- package/resources/templates/template-workspace/admin/tailwind.config.js +0 -73
- package/resources/templates/template-workspace/admin/vite-env.d.ts +0 -7
- package/resources/templates/template-workspace/scripts/generate-client.sh +0 -8
- package/resources/templates/{template-workspace → default}/.github/scripts/setup-actions-variables.sh +0 -0
- package/resources/templates/{template-workspace → default}/admin/app/components/logo.tsx +0 -0
- package/resources/templates/{template-workspace → default}/admin/app/config.ts +0 -0
- package/resources/templates/{template-workspace → default}/admin/app/index.html +0 -0
- package/resources/templates/{template-workspace → default}/admin/app/pages/index.tsx +0 -0
- package/resources/templates/{template-workspace → default}/admin/lib/binding/delete.tsx +0 -0
- package/resources/templates/{template-workspace → default}/admin/lib/binding/index.ts +0 -0
- package/resources/templates/{template-workspace → default}/admin/lib/block-repeater/index.ts +0 -0
- package/resources/templates/{template-workspace → default}/admin/lib/board/index.ts +0 -0
- package/resources/templates/{template-workspace → default}/admin/lib/buttons/index.ts +0 -0
- package/resources/templates/{template-workspace → default}/admin/lib/buttons/link-back-button.tsx +0 -0
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/column-leaf.tsx +0 -0
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/export.tsx +0 -0
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/index.ts +0 -0
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/text.tsx +0 -0
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/grid.tsx +0 -0
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/index.ts +21 -21
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/layout-switcher.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/dev/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/dev/todo.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/dimensions/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/HorizontalRuleRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/ListItemRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/OrderedListRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/ParagraphRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/ScrollTargetRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/UnorderedListRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/plugins.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/errors/error-boundary.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/errors/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/errors/use-error-formatter.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/field/formatted-field.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/field/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/form/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/form/labels.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/formatting/formatting.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/formatting/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/images/formatImageResizeUrl.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/images/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/labels/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/layout/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/layout/layout.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/outdated-application-dialog/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/repeater/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/select/highlight.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/select/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/hooks/useInvite.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/listing/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/otp/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/toast/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/avatar.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/collapsible.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/divider.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/label.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/progress.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/separator.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/skeleton.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/upload/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/utils/cn.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/utils/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/public/favicon.png +0 -0
- /package/resources/templates/{template-workspace → default}/api/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/api/migrations/.gitkeep +0 -0
- /package/resources/templates/{template-workspace → default}/api/model/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/api/package.json +0 -0
- /package/resources/templates/{template-workspace → default}/api/tsconfig.json +0 -0
- /package/resources/templates/{template-workspace → default}/client/package.json +0 -0
- /package/resources/templates/{template-workspace → default}/client/src/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/client/tsconfig.json +0 -0
- /package/resources/templates/{template-workspace → default}/docker-compose.yaml +0 -0
- /package/resources/templates/{template-workspace → default}/tsconfig.json +0 -0
- /package/resources/templates/{template-workspace → default}/tsconfig.settings.json +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const node_fs = require("node:fs");
|
|
4
|
+
const node_path = require("node:path");
|
|
5
|
+
const detectPackageManager = () => {
|
|
6
|
+
const userAgent = process.env.npm_config_user_agent;
|
|
7
|
+
if (userAgent) {
|
|
8
|
+
if (userAgent.startsWith("yarn/")) return "yarn";
|
|
9
|
+
if (userAgent.startsWith("pnpm/")) return "pnpm";
|
|
10
|
+
if (userAgent.startsWith("npm/")) return "npm";
|
|
11
|
+
if (userAgent.startsWith("bun/")) return "bun";
|
|
12
|
+
}
|
|
13
|
+
const cwd = process.cwd();
|
|
14
|
+
if (node_fs.existsSync(node_path.join(cwd, "yarn.lock"))) return "yarn";
|
|
15
|
+
if (node_fs.existsSync(node_path.join(cwd, "pnpm-lock.yaml"))) return "pnpm";
|
|
16
|
+
if (node_fs.existsSync(node_path.join(cwd, "package-lock.json"))) return "npm";
|
|
17
|
+
if (node_fs.existsSync(node_path.join(cwd, "bun.lockb"))) return "bun";
|
|
18
|
+
if (node_fs.existsSync(node_path.join(cwd, "bun.lock"))) return "bun";
|
|
19
|
+
return "npm";
|
|
20
|
+
};
|
|
21
|
+
exports.detectPackageManager = detectPackageManager;
|
|
22
|
+
//# sourceMappingURL=packageManagerDetector.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageManagerDetector.cjs","sources":["../../../../../packages/create/src/lib/packageManagerDetector.ts"],"sourcesContent":["import { existsSync } from 'node:fs'\nimport { join } from 'node:path'\n\nexport type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun'\n\nexport const detectPackageManager = (): PackageManager => {\n\tconst userAgent = process.env.npm_config_user_agent\n\n\tif (userAgent) {\n\t\tif (userAgent.startsWith('yarn/')) return 'yarn'\n\t\tif (userAgent.startsWith('pnpm/')) return 'pnpm'\n\t\tif (userAgent.startsWith('npm/')) return 'npm'\n\t\tif (userAgent.startsWith('bun/')) return 'bun'\n\t}\n\n\tconst cwd = process.cwd()\n\tif (existsSync(join(cwd, 'yarn.lock'))) return 'yarn'\n\tif (existsSync(join(cwd, 'pnpm-lock.yaml'))) return 'pnpm'\n\tif (existsSync(join(cwd, 'package-lock.json'))) return 'npm'\n\tif (existsSync(join(cwd, 'bun.lockb'))) return 'bun'\n\tif (existsSync(join(cwd, 'bun.lock'))) return 'bun'\n\n\treturn 'npm'\n}\n"],"names":["existsSync","join"],"mappings":";;;;AAKO,MAAM,uBAAuB,MAAsB;AACzD,QAAM,YAAY,QAAQ,IAAI;AAE9B,MAAI,WAAW;AACd,QAAI,UAAU,WAAW,OAAO,EAAG,QAAO;AAC1C,QAAI,UAAU,WAAW,OAAO,EAAG,QAAO;AAC1C,QAAI,UAAU,WAAW,MAAM,EAAG,QAAO;AACzC,QAAI,UAAU,WAAW,MAAM,EAAG,QAAO;AAAA,EAC1C;AAEA,QAAM,MAAM,QAAQ,IAAA;AACpB,MAAIA,QAAAA,WAAWC,UAAAA,KAAK,KAAK,WAAW,CAAC,EAAG,QAAO;AAC/C,MAAID,QAAAA,WAAWC,UAAAA,KAAK,KAAK,gBAAgB,CAAC,EAAG,QAAO;AACpD,MAAID,QAAAA,WAAWC,UAAAA,KAAK,KAAK,mBAAmB,CAAC,EAAG,QAAO;AACvD,MAAID,QAAAA,WAAWC,UAAAA,KAAK,KAAK,WAAW,CAAC,EAAG,QAAO;AAC/C,MAAID,QAAAA,WAAWC,UAAAA,KAAK,KAAK,UAAU,CAAC,EAAG,QAAO;AAE9C,SAAO;AACR;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
const detectPackageManager = () => {
|
|
4
|
+
const userAgent = process.env.npm_config_user_agent;
|
|
5
|
+
if (userAgent) {
|
|
6
|
+
if (userAgent.startsWith("yarn/")) return "yarn";
|
|
7
|
+
if (userAgent.startsWith("pnpm/")) return "pnpm";
|
|
8
|
+
if (userAgent.startsWith("npm/")) return "npm";
|
|
9
|
+
if (userAgent.startsWith("bun/")) return "bun";
|
|
10
|
+
}
|
|
11
|
+
const cwd = process.cwd();
|
|
12
|
+
if (existsSync(join(cwd, "yarn.lock"))) return "yarn";
|
|
13
|
+
if (existsSync(join(cwd, "pnpm-lock.yaml"))) return "pnpm";
|
|
14
|
+
if (existsSync(join(cwd, "package-lock.json"))) return "npm";
|
|
15
|
+
if (existsSync(join(cwd, "bun.lockb"))) return "bun";
|
|
16
|
+
if (existsSync(join(cwd, "bun.lock"))) return "bun";
|
|
17
|
+
return "npm";
|
|
18
|
+
};
|
|
19
|
+
export {
|
|
20
|
+
detectPackageManager
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=packageManagerDetector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageManagerDetector.js","sources":["../../../../../packages/create/src/lib/packageManagerDetector.ts"],"sourcesContent":["import { existsSync } from 'node:fs'\nimport { join } from 'node:path'\n\nexport type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun'\n\nexport const detectPackageManager = (): PackageManager => {\n\tconst userAgent = process.env.npm_config_user_agent\n\n\tif (userAgent) {\n\t\tif (userAgent.startsWith('yarn/')) return 'yarn'\n\t\tif (userAgent.startsWith('pnpm/')) return 'pnpm'\n\t\tif (userAgent.startsWith('npm/')) return 'npm'\n\t\tif (userAgent.startsWith('bun/')) return 'bun'\n\t}\n\n\tconst cwd = process.cwd()\n\tif (existsSync(join(cwd, 'yarn.lock'))) return 'yarn'\n\tif (existsSync(join(cwd, 'pnpm-lock.yaml'))) return 'pnpm'\n\tif (existsSync(join(cwd, 'package-lock.json'))) return 'npm'\n\tif (existsSync(join(cwd, 'bun.lockb'))) return 'bun'\n\tif (existsSync(join(cwd, 'bun.lock'))) return 'bun'\n\n\treturn 'npm'\n}\n"],"names":[],"mappings":";;AAKO,MAAM,uBAAuB,MAAsB;AACzD,QAAM,YAAY,QAAQ,IAAI;AAE9B,MAAI,WAAW;AACd,QAAI,UAAU,WAAW,OAAO,EAAG,QAAO;AAC1C,QAAI,UAAU,WAAW,OAAO,EAAG,QAAO;AAC1C,QAAI,UAAU,WAAW,MAAM,EAAG,QAAO;AACzC,QAAI,UAAU,WAAW,MAAM,EAAG,QAAO;AAAA,EAC1C;AAEA,QAAM,MAAM,QAAQ,IAAA;AACpB,MAAI,WAAW,KAAK,KAAK,WAAW,CAAC,EAAG,QAAO;AAC/C,MAAI,WAAW,KAAK,KAAK,gBAAgB,CAAC,EAAG,QAAO;AACpD,MAAI,WAAW,KAAK,KAAK,mBAAmB,CAAC,EAAG,QAAO;AACvD,MAAI,WAAW,KAAK,KAAK,WAAW,CAAC,EAAG,QAAO;AAC/C,MAAI,WAAW,KAAK,KAAK,UAAU,CAAC,EAAG,QAAO;AAE9C,SAAO;AACR;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.cjs","sources":["../../../../../packages/create/src/lib/version.ts"],"sourcesContent":["import { join } from 'node:path'\nimport fs from 'node:fs/promises'\nimport { packageRoot } from '../paths'\n\nexport const getPackageVersion = async () => {\n\treturn JSON.parse(await fs.readFile(join(packageRoot, 'package.json'), 'utf-8')).version\n}\n"],"names":["join","packageRoot"],"mappings":";;;;;AAIO,MAAM,oBAAoB,YAAY;
|
|
1
|
+
{"version":3,"file":"version.cjs","sources":["../../../../../packages/create/src/lib/version.ts"],"sourcesContent":["import { join } from 'node:path'\nimport fs from 'node:fs/promises'\nimport { packageRoot } from '../paths'\n\nexport const getPackageVersion = async () => {\n\treturn JSON.parse(await fs.readFile(join(packageRoot, 'package.json'), 'utf-8')).version\n}\n"],"names":["join","packageRoot"],"mappings":";;;;;AAIO,MAAM,oBAAoB,YAAY;AAC5C,SAAO,KAAK,MAAM,MAAM,GAAG,SAASA,eAAKC,MAAAA,aAAa,cAAc,GAAG,OAAO,CAAC,EAAE;AAClF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../../../packages/create/src/lib/version.ts"],"sourcesContent":["import { join } from 'node:path'\nimport fs from 'node:fs/promises'\nimport { packageRoot } from '../paths'\n\nexport const getPackageVersion = async () => {\n\treturn JSON.parse(await fs.readFile(join(packageRoot, 'package.json'), 'utf-8')).version\n}\n"],"names":["fs"],"mappings":";;;AAIO,MAAM,oBAAoB,YAAY;
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../../../packages/create/src/lib/version.ts"],"sourcesContent":["import { join } from 'node:path'\nimport fs from 'node:fs/promises'\nimport { packageRoot } from '../paths'\n\nexport const getPackageVersion = async () => {\n\treturn JSON.parse(await fs.readFile(join(packageRoot, 'package.json'), 'utf-8')).version\n}\n"],"names":["fs"],"mappings":";;;AAIO,MAAM,oBAAoB,YAAY;AAC5C,SAAO,KAAK,MAAM,MAAMA,YAAG,SAAS,KAAK,aAAa,cAAc,GAAG,OAAO,CAAC,EAAE;AAClF;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.cjs","sources":["../../../../packages/create/src/paths.ts"],"sourcesContent":["import { findPackageRoot } from '@contember/cli-common'\nimport { dirname, join } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst currentFilePath = dirname(fileURLToPath(import.meta.url))\nexport const packageRoot = process.env.CONTEMBER_CLI_PACKAGE_ROOT || findPackageRoot(currentFilePath)\nexport const resourcesDir = join(packageRoot, './resources')\n"],"names":["dirname","fileURLToPath","findPackageRoot","join"],"mappings":";;;;;;AAIA,MAAM,kBAAkBA,
|
|
1
|
+
{"version":3,"file":"paths.cjs","sources":["../../../../packages/create/src/paths.ts"],"sourcesContent":["import { findPackageRoot } from '@contember/cli-common'\nimport { dirname, join } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst currentFilePath = dirname(fileURLToPath(import.meta.url))\nexport const packageRoot = process.env.CONTEMBER_CLI_PACKAGE_ROOT || findPackageRoot(currentFilePath)\nexport const resourcesDir = join(packageRoot, './resources')\n"],"names":["dirname","fileURLToPath","findPackageRoot","join"],"mappings":";;;;;;AAIA,MAAM,kBAAkBA,UAAAA,QAAQC,uBAAc,OAAA,aAAA,cAAA,QAAA,KAAA,EAAA,cAAA,UAAA,EAAA,OAAA,0BAAA,uBAAA,QAAA,YAAA,MAAA,YAAA,uBAAA,OAAA,IAAA,IAAA,wBAAA,SAAA,OAAA,EAAA,IAAe,CAAC;AACvD,MAAM,cAAc,QAAQ,IAAI,8BAA8BC,UAAAA,gBAAgB,eAAe;AAC7F,MAAM,eAAeC,UAAAA,KAAK,aAAa,aAAa;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sources":["../../../../packages/create/src/paths.ts"],"sourcesContent":["import { findPackageRoot } from '@contember/cli-common'\nimport { dirname, join } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst currentFilePath = dirname(fileURLToPath(import.meta.url))\nexport const packageRoot = process.env.CONTEMBER_CLI_PACKAGE_ROOT || findPackageRoot(currentFilePath)\nexport const resourcesDir = join(packageRoot, './resources')\n"],"names":[],"mappings":";;;AAIA,MAAM,kBAAkB,QAAQ,cAAc,YAAY,GAAG,CAAC;AACvD,MAAM,cAAc,QAAQ,IAAI,8BAA8B,gBAAgB,eAAe;
|
|
1
|
+
{"version":3,"file":"paths.js","sources":["../../../../packages/create/src/paths.ts"],"sourcesContent":["import { findPackageRoot } from '@contember/cli-common'\nimport { dirname, join } from 'node:path'\nimport { fileURLToPath } from 'node:url'\n\nconst currentFilePath = dirname(fileURLToPath(import.meta.url))\nexport const packageRoot = process.env.CONTEMBER_CLI_PACKAGE_ROOT || findPackageRoot(currentFilePath)\nexport const resourcesDir = join(packageRoot, './resources')\n"],"names":[],"mappings":";;;AAIA,MAAM,kBAAkB,QAAQ,cAAc,YAAY,GAAG,CAAC;AACvD,MAAM,cAAc,QAAQ,IAAI,8BAA8B,gBAAgB,eAAe;AAC7F,MAAM,eAAe,KAAK,aAAa,aAAa;"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { Command, CommandConfiguration, Input } from '@contember/cli-common';
|
|
2
2
|
import { TemplateInstaller } from '../lib/TemplateInstaller';
|
|
3
3
|
type Args = {
|
|
4
|
-
|
|
4
|
+
projectName: string;
|
|
5
|
+
};
|
|
6
|
+
type Options = {
|
|
7
|
+
template: string;
|
|
5
8
|
};
|
|
6
|
-
type Options = {};
|
|
7
9
|
export declare class WorkspaceCreateCommand extends Command<Args, Options> {
|
|
8
10
|
private readonly templateInstaller;
|
|
9
11
|
constructor(templateInstaller: TemplateInstaller);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkspaceCreateCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/WorkspaceCreateCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAG5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"WorkspaceCreateCommand.d.ts","sourceRoot":"","sources":["../../../src/commands/WorkspaceCreateCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAA;AAG5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAI5D,KAAK,IAAI,GAAG;IACX,WAAW,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,KAAK,OAAO,GAAG;IACd,QAAQ,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,qBAAa,sBAAuB,SAAQ,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;IAEhE,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAAjB,iBAAiB,EAAE,iBAAiB;IAKtD,SAAS,CAAC,SAAS,CAAC,aAAa,EAAE,oBAAoB,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,IAAI;cAM7D,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;CAcnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileSystem.d.ts","sourceRoot":"","sources":["../../../src/lib/FileSystem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAG/B,qBAAa,UAAU;IACtB,QAAQ,qBAAc;IACtB,SAAS,sBAAe;IACxB,MAAM,mBAAY;IAClB,OAAO,oBAAa;IACpB,IAAI,cAAO;IACX,MAAM,mBAAY;IAClB,UAAU,GAAU,MAAM,MAAM,sBAO/B;IACD,aAAa,wBAEZ;CACD"}
|
|
1
|
+
{"version":3,"file":"FileSystem.d.ts","sourceRoot":"","sources":["../../../src/lib/FileSystem.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAA;AAG/B,qBAAa,UAAU;IACtB,QAAQ,qBAAc;IACtB,SAAS,sBAAe;IACxB,MAAM,mBAAY;IAClB,OAAO,oBAAa;IACpB,IAAI,cAAO;IACX,MAAM,mBAAY;IAClB,MAAM,eAAQ;IACd,UAAU,GAAU,MAAM,MAAM,sBAO/B;IACD,aAAa,wBAEZ;CACD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateInstaller.d.ts","sourceRoot":"","sources":["../../../src/lib/TemplateInstaller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAIzC,qBAAa,iBAAiB;
|
|
1
|
+
{"version":3,"file":"TemplateInstaller.d.ts","sourceRoot":"","sources":["../../../src/lib/TemplateInstaller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAIzC,qBAAa,iBAAiB;IAI5B,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,EAAE;IAJpB,OAAO,CAAC,cAAc,CAAwB;gBAG5B,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,UAAU;IAOhC,eAAe,GACd,UAAU,MAAM,EAChB,WAAW,MAAM,EACjB,YAAW,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,mBAkFtC;IAED,OAAO,CAAC,kBAAkB,CAIzB;IAED,OAAO,CAAC,QAAQ,CAGf;CACD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageManagerDetector.d.ts","sourceRoot":"","sources":["../../../src/lib/packageManagerDetector.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAA;AAE5D,eAAO,MAAM,oBAAoB,QAAO,cAkBvC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contember/create",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.35",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"bin": "dist/production/run.js",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@contember/cli-common": "
|
|
8
|
-
"chalk": "
|
|
9
|
-
"
|
|
10
|
-
"
|
|
7
|
+
"@contember/cli-common": "workspace:*",
|
|
8
|
+
"chalk": "catalog:",
|
|
9
|
+
"degit": "catalog:",
|
|
10
|
+
"fs-extra": "catalog:",
|
|
11
|
+
"js-yaml": "catalog:"
|
|
11
12
|
},
|
|
12
13
|
"type": "module",
|
|
13
14
|
"scripts": {
|
|
14
|
-
"pre-build": "rm -rf rm ./resources/templates/
|
|
15
|
+
"pre-build": "rm -rf rm ./resources/templates/default/admin/lib && cp -r ../react-ui-lib/src ./resources/templates/default/admin/lib && rm ./resources/templates/default/admin/lib/index.ts ./resources/templates/default/admin/lib/tsconfig.json"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/degit": "catalog:"
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/contember/contember.git",
|
|
23
|
+
"directory": "packages/create"
|
|
15
24
|
}
|
|
16
25
|
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
### Linux ###
|
|
2
|
+
*~
|
|
3
|
+
|
|
4
|
+
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
5
|
+
.fuse_hidden*
|
|
6
|
+
|
|
7
|
+
# KDE directory preferences
|
|
8
|
+
.directory
|
|
9
|
+
|
|
10
|
+
# Linux trash folder which might appear on any partition or disk
|
|
11
|
+
.Trash-*
|
|
12
|
+
|
|
13
|
+
# .nfs files are created when an open file is removed but is still being accessed
|
|
14
|
+
.nfs*
|
|
15
|
+
|
|
16
|
+
### macOS ###
|
|
17
|
+
# General
|
|
18
|
+
.DS_Store
|
|
19
|
+
.AppleDouble
|
|
20
|
+
.LSOverride
|
|
21
|
+
|
|
22
|
+
# Icon must end with two \r
|
|
23
|
+
Icon
|
|
24
|
+
|
|
25
|
+
# Thumbnails
|
|
26
|
+
._*
|
|
27
|
+
|
|
28
|
+
# Files that might appear in the root of a volume
|
|
29
|
+
.DocumentRevisions-V100
|
|
30
|
+
.fseventsd
|
|
31
|
+
.Spotlight-V100
|
|
32
|
+
.TemporaryItems
|
|
33
|
+
.Trashes
|
|
34
|
+
.VolumeIcon.icns
|
|
35
|
+
.com.apple.timemachine.donotpresent
|
|
36
|
+
|
|
37
|
+
# Directories potentially created on remote AFP share
|
|
38
|
+
.AppleDB
|
|
39
|
+
.AppleDesktop
|
|
40
|
+
Network Trash Folder
|
|
41
|
+
Temporary Items
|
|
42
|
+
.apdisk
|
|
43
|
+
|
|
44
|
+
### macOS Patch ###
|
|
45
|
+
# iCloud generated files
|
|
46
|
+
*.icloud
|
|
47
|
+
|
|
48
|
+
### Node ###
|
|
49
|
+
# Logs
|
|
50
|
+
logs
|
|
51
|
+
*.log
|
|
52
|
+
npm-debug.log*
|
|
53
|
+
yarn-debug.log*
|
|
54
|
+
yarn-error.log*
|
|
55
|
+
lerna-debug.log*
|
|
56
|
+
.pnpm-debug.log*
|
|
57
|
+
|
|
58
|
+
# Diagnostic reports (https://nodejs.org/api/report.html)
|
|
59
|
+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
|
60
|
+
|
|
61
|
+
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
62
|
+
build/Release
|
|
63
|
+
|
|
64
|
+
# Dependency directories
|
|
65
|
+
node_modules/
|
|
66
|
+
jspm_packages/
|
|
67
|
+
|
|
68
|
+
# TypeScript cache
|
|
69
|
+
*.tsbuildinfo
|
|
70
|
+
|
|
71
|
+
# Optional npm cache directory
|
|
72
|
+
.npm
|
|
73
|
+
|
|
74
|
+
# Optional stylelint cache
|
|
75
|
+
.stylelintcache
|
|
76
|
+
|
|
77
|
+
# Microbundle cache
|
|
78
|
+
.rpt2_cache/
|
|
79
|
+
.rts2_cache_cjs/
|
|
80
|
+
.rts2_cache_es/
|
|
81
|
+
.rts2_cache_umd/
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# Output of 'npm pack'
|
|
85
|
+
*.tgz
|
|
86
|
+
|
|
87
|
+
# Yarn Integrity file
|
|
88
|
+
.yarn-integrity
|
|
89
|
+
|
|
90
|
+
# dotenv environment variable files
|
|
91
|
+
.env
|
|
92
|
+
.env.development.local
|
|
93
|
+
.env.test.local
|
|
94
|
+
.env.production.local
|
|
95
|
+
.env.local
|
|
96
|
+
|
|
97
|
+
# Cloudflare Workers
|
|
98
|
+
.dev.vars
|
|
99
|
+
|
|
100
|
+
# Build output
|
|
101
|
+
dist
|
|
102
|
+
|
|
103
|
+
### react ###
|
|
104
|
+
.DS_*
|
|
105
|
+
**/*.backup.*
|
|
106
|
+
**/*.back.*
|
|
107
|
+
|
|
108
|
+
node_modules
|
|
109
|
+
|
|
110
|
+
### Windows ###
|
|
111
|
+
# Windows thumbnail cache files
|
|
112
|
+
Thumbs.db
|
|
113
|
+
Thumbs.db:encryptable
|
|
114
|
+
ehthumbs.db
|
|
115
|
+
ehthumbs_vista.db
|
|
116
|
+
|
|
117
|
+
# Dump file
|
|
118
|
+
*.stackdump
|
|
119
|
+
|
|
120
|
+
# Folder config file
|
|
121
|
+
[Dd]esktop.ini
|
|
122
|
+
|
|
123
|
+
# Recycle Bin used on file shares
|
|
124
|
+
$RECYCLE.BIN/
|
|
125
|
+
|
|
126
|
+
# Windows Installer files
|
|
127
|
+
*.cab
|
|
128
|
+
*.msi
|
|
129
|
+
*.msix
|
|
130
|
+
*.msm
|
|
131
|
+
*.msp
|
|
132
|
+
|
|
133
|
+
# Windows shortcuts
|
|
134
|
+
*.lnk
|
|
135
|
+
|
|
136
|
+
### yarn ###
|
|
137
|
+
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
|
|
138
|
+
|
|
139
|
+
.yarn/*
|
|
140
|
+
!.yarn/releases
|
|
141
|
+
!.yarn/patches
|
|
142
|
+
!.yarn/plugins
|
|
143
|
+
!.yarn/sdks
|
|
144
|
+
!.yarn/versions
|
|
145
|
+
|
|
146
|
+
# if you are NOT using Zero-installs, then:
|
|
147
|
+
# comment the following lines
|
|
148
|
+
#!.yarn/cache
|
|
149
|
+
|
|
150
|
+
# and uncomment the following lines
|
|
151
|
+
.pnp.*
|
|
152
|
+
|
|
153
|
+
# Docker Compose override file
|
|
154
|
+
/docker-compose.override.yaml
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# My awesome multilingual CMS
|
|
2
|
+
|
|
3
|
+
Welcome to your new project created with [Contember AI Studio](https://www.contember.com/studio)! If you need
|
|
4
|
+
assistance, feel free to join the conversation in
|
|
5
|
+
our [GitHub Discussions](https://github.com/orgs/contember/discussions/categories/support).
|
|
6
|
+
|
|
7
|
+
## Getting Started
|
|
8
|
+
|
|
9
|
+
Before you begin, ensure you have:
|
|
10
|
+
|
|
11
|
+
- [Yarn](https://yarnpkg.com/getting-started/install) installed
|
|
12
|
+
- [Docker](https://docs.docker.com/get-docker/) installed and running
|
|
13
|
+
|
|
14
|
+
### Project Overview
|
|
15
|
+
|
|
16
|
+
Your project consists of the following packages:
|
|
17
|
+
|
|
18
|
+
#### [@app/admin](./admin)
|
|
19
|
+
|
|
20
|
+
- **Location:** `./admin`
|
|
21
|
+
- **Description:** A React SPA that serves as the administration UI, built with Contember DataBinding for seamless integration with the Contember API.
|
|
22
|
+
- **Sentry:** [Sentry](https://sentry.io) is integrated into the project. To enable Sentry, set the `VITE_SENTRY_DSN` environment variable in the `.env.production` file.
|
|
23
|
+
|
|
24
|
+
#### [@app/api](./api)
|
|
25
|
+
|
|
26
|
+
- **Location:** `./api`
|
|
27
|
+
- **Description:** Defines the data model and permissions for the Contember API.
|
|
28
|
+
|
|
29
|
+
#### [@app/client](./client)
|
|
30
|
+
|
|
31
|
+
- **Location:** `./client`
|
|
32
|
+
- **Description:** A type-safe GraphQL client for interacting with the Contember API, complete with generated types.
|
|
33
|
+
- **Documentation:** [Client Documentation](./client/README.md)
|
|
34
|
+
|
|
35
|
+
#### [@app/worker](./worker)
|
|
36
|
+
|
|
37
|
+
- **Location:** `./worker`
|
|
38
|
+
- **Description:** A serverless function deployed to Cloudflare Workers for executing server-side operations.
|
|
39
|
+
- **Documentation:** [Worker Documentation](./worker/README.md)
|
|
40
|
+
|
|
41
|
+
- - -
|
|
42
|
+
|
|
43
|
+
## Running the Project Locally
|
|
44
|
+
|
|
45
|
+
Follow these steps to set up and run your project locally:
|
|
46
|
+
|
|
47
|
+
1. **Install Dependencies**
|
|
48
|
+
|
|
49
|
+
Run the following command to install all required dependencies:
|
|
50
|
+
```bash
|
|
51
|
+
{packageManager} install
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
2. **Start the Project**
|
|
55
|
+
|
|
56
|
+
Start the admin application and all necessary services with:
|
|
57
|
+
```bash
|
|
58
|
+
{packageManager} run start
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
This will launch the following components:
|
|
62
|
+
|
|
63
|
+
| Container | Port | Url |
|
|
64
|
+
|------------------|------|------------------------------------------------|
|
|
65
|
+
| Contember Engine | 1481 | [http://localhost:1481](http://localhost:1481) |
|
|
66
|
+
| Postgres | 1482 | [http://localhost:1482](http://localhost:1482) |
|
|
67
|
+
| S3 | 1483 | [http://localhost:1483](http://localhost:1483) |
|
|
68
|
+
| MailPit | 1484 | [http://localhost:1484](http://localhost:1484) |
|
|
69
|
+
| Adminer | 1485 | [http://localhost:1485](http://localhost:1485) |
|
|
70
|
+
| S3 Dashboard | 1486 | [http://localhost:1486](http://localhost:1486) |
|
|
71
|
+
|
|
72
|
+
When you're done, stop the Docker containers with:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
docker compose down
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
- - -
|
|
79
|
+
|
|
80
|
+
## Next Steps
|
|
81
|
+
|
|
82
|
+
Congratulations, your project is now running locally! Access the administration UI
|
|
83
|
+
at [http://localhost:1480](http://localhost:1480/).
|
|
84
|
+
|
|
85
|
+
Enjoy building with Contember!
|
|
86
|
+
|
|
87
|
+
- - -
|
|
88
|
+
|
|
89
|
+
## Update headless UI components
|
|
90
|
+
|
|
91
|
+
To update the headless UI components, run the following command:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
sh ./scripts/update-ui-lib.sh
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
This will update `lib` folder in the `@app/admin` package with the latest headless UI components. If you have made any
|
|
98
|
+
changes to the components, make sure to commit them before running this command.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { memo, PropsWithChildren } from 'react'
|
|
2
|
-
import {
|
|
3
|
-
import { LayoutComponent, Slots } from '@app/lib/layout'
|
|
4
|
-
import { Navigation } from './navigation'
|
|
2
|
+
import { Navigation, UserNavigation } from './navigation'
|
|
5
3
|
import { Link } from '@contember/interface'
|
|
6
4
|
import { Logo } from './logo'
|
|
5
|
+
import { IdentityLoader } from '~/lib/binding'
|
|
6
|
+
import { LayoutComponent, Slots } from '~/lib/layout'
|
|
7
7
|
|
|
8
8
|
export const Layout = memo(({ children }: PropsWithChildren) => {
|
|
9
9
|
return (
|
|
@@ -20,6 +20,10 @@ export const Layout = memo(({ children }: PropsWithChildren) => {
|
|
|
20
20
|
<Navigation />
|
|
21
21
|
</Slots.Navigation>
|
|
22
22
|
|
|
23
|
+
<Slots.UserNavigation>
|
|
24
|
+
<UserNavigation />
|
|
25
|
+
</Slots.UserNavigation>
|
|
26
|
+
|
|
23
27
|
<Slots.Footer>
|
|
24
28
|
<p><small>Created with <a className="content-link" href="https://www.contember.com/">Contember</a></small></p>
|
|
25
29
|
</Slots.Footer>
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { Link, LogoutTrigger, useIdentity } from '@contember/interface'
|
|
2
|
+
import { BadgeCheckIcon, BellIcon, ChevronsUpDown, LogOutIcon } from 'lucide-react'
|
|
3
|
+
import { dict } from '~/lib/dict'
|
|
4
|
+
import { Avatar, AvatarFallback } from '~/lib/ui/avatar'
|
|
5
|
+
import { AnchorButton, Button } from '~/lib/ui/button'
|
|
6
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '~/lib/ui/dropdown'
|
|
7
|
+
import { SidebarMenuButton } from '~/lib/ui/sidebar'
|
|
8
|
+
import { useIsMobile } from '~/lib/utils/use-mobile'
|
|
9
|
+
|
|
10
|
+
export const Navigation = () => (<div>Navigation</div>)
|
|
11
|
+
|
|
12
|
+
export const UserNavigation = () => {
|
|
13
|
+
const isMobile = useIsMobile()
|
|
14
|
+
const identity = useIdentity()
|
|
15
|
+
|
|
16
|
+
const userEmail = identity?.person?.email
|
|
17
|
+
const userInitial = userEmail?.substring(0, 1).toLocaleUpperCase()
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<DropdownMenu>
|
|
21
|
+
<DropdownMenuTrigger asChild>
|
|
22
|
+
<SidebarMenuButton
|
|
23
|
+
size="lg"
|
|
24
|
+
className="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground"
|
|
25
|
+
>
|
|
26
|
+
<Avatar className="icon h-6 w-6 rounded-lg">
|
|
27
|
+
<AvatarFallback avatarFallbackColorString={userEmail} className="rounded-lg">
|
|
28
|
+
{userInitial}
|
|
29
|
+
</AvatarFallback>
|
|
30
|
+
</Avatar>
|
|
31
|
+
<div className="grid flex-1 text-left text-sm leading-tight">
|
|
32
|
+
<span className="truncate font-semibold">{userEmail}</span>
|
|
33
|
+
</div>
|
|
34
|
+
<ChevronsUpDown className="ml-auto size-4" />
|
|
35
|
+
</SidebarMenuButton>
|
|
36
|
+
</DropdownMenuTrigger>
|
|
37
|
+
<DropdownMenuContent
|
|
38
|
+
className="w-[--radix-dropdown-menu-trigger-width] min-w-56 rounded-lg"
|
|
39
|
+
side={isMobile ? 'bottom' : 'right'}
|
|
40
|
+
align="end"
|
|
41
|
+
sideOffset={4}
|
|
42
|
+
>
|
|
43
|
+
<DropdownMenuLabel className="p-0 font-normal">
|
|
44
|
+
<div className="flex items-center gap-2 pl-3 pr-1 py-1.5 text-left text-sm">
|
|
45
|
+
<Avatar className="h-8 w-8 rounded-lg">
|
|
46
|
+
<AvatarFallback avatarFallbackColorString={userEmail} className="rounded-lg">
|
|
47
|
+
{userInitial}
|
|
48
|
+
</AvatarFallback>
|
|
49
|
+
</Avatar>
|
|
50
|
+
<div className="grid flex-1 text-left text-sm leading-tight">
|
|
51
|
+
<span className="truncate font-semibold">{userEmail}</span>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</DropdownMenuLabel>
|
|
55
|
+
<DropdownMenuSeparator />
|
|
56
|
+
<DropdownMenuGroup>
|
|
57
|
+
<DropdownMenuItem>
|
|
58
|
+
<Link to="tenant/security">
|
|
59
|
+
<AnchorButton variant="ghost" size="xs" className="flex gap-2">
|
|
60
|
+
<BadgeCheckIcon size={16} />
|
|
61
|
+
Security
|
|
62
|
+
</AnchorButton>
|
|
63
|
+
</Link>
|
|
64
|
+
</DropdownMenuItem>
|
|
65
|
+
<DropdownMenuItem>
|
|
66
|
+
<Link to="tenant/apiKeys">
|
|
67
|
+
<AnchorButton variant="ghost" size="xs" className="flex gap-2">
|
|
68
|
+
<BellIcon size={16} />
|
|
69
|
+
API keys
|
|
70
|
+
</AnchorButton>
|
|
71
|
+
</Link>
|
|
72
|
+
</DropdownMenuItem>
|
|
73
|
+
</DropdownMenuGroup>
|
|
74
|
+
<DropdownMenuSeparator />
|
|
75
|
+
<DropdownMenuItem>
|
|
76
|
+
<LogoutTrigger>
|
|
77
|
+
<Button variant="ghost" size="xs" className="flex gap-2">
|
|
78
|
+
<LogOutIcon size={16} /> {dict.logout}
|
|
79
|
+
</Button>
|
|
80
|
+
</LogoutTrigger>
|
|
81
|
+
</DropdownMenuItem>
|
|
82
|
+
</DropdownMenuContent>
|
|
83
|
+
</DropdownMenu>
|
|
84
|
+
)
|
|
85
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { LoginWithEmail } from '../lib/dev'
|
|
2
|
-
import { OutdatedApplicationDialog } from '@app/lib/outdated-application-dialog'
|
|
3
|
-
import { Toaster } from '@app/lib/toast'
|
|
4
1
|
import { ApplicationEntrypoint, PageModule, Pages } from '@contember/interface'
|
|
5
2
|
import { createErrorHandler, DevBar, DevPanel } from '@contember/react-devbar'
|
|
6
3
|
import { SlotsProvider } from '@contember/react-slots'
|
|
7
4
|
import { LogInIcon } from 'lucide-react'
|
|
8
5
|
import { createRoot } from 'react-dom/client'
|
|
9
|
-
import {
|
|
6
|
+
import { OutdatedApplicationDialog } from '~/lib/outdated-application-dialog'
|
|
7
|
+
import { Toaster } from '~/lib/toast'
|
|
10
8
|
import '../index.css'
|
|
9
|
+
import { LoginWithEmail } from '../lib/dev'
|
|
10
|
+
import { Layout } from './components/layout'
|
|
11
11
|
import { getConfig } from './config'
|
|
12
12
|
|
|
13
13
|
const errorHandler = createErrorHandler((dom, react, onRecoverableError) => createRoot(dom, { onRecoverableError }).render(react))
|