bazis-front 0.1.0__tar.gz
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.
- bazis_front-0.1.0/.dockerignore +3 -0
- bazis_front-0.1.0/.editorconfig +12 -0
- bazis_front-0.1.0/.github/workflows/build-publish.yml +20 -0
- bazis_front-0.1.0/.github/workflows/release.yml +77 -0
- bazis_front-0.1.0/.github/workflows/tests.yml +402 -0
- bazis_front-0.1.0/.github/workflows/update-licenses.yml +18 -0
- bazis_front-0.1.0/.gitignore +54 -0
- bazis_front-0.1.0/CLAUDE.md +556 -0
- bazis_front-0.1.0/LICENSE +175 -0
- bazis_front-0.1.0/NOTICE +8 -0
- bazis_front-0.1.0/PKG-INFO +79 -0
- bazis_front-0.1.0/README.md +37 -0
- bazis_front-0.1.0/bazis/contrib/front/AGENTS.md +4656 -0
- bazis_front-0.1.0/bazis/contrib/front/__init__.py +19 -0
- bazis_front-0.1.0/bazis/contrib/front/_version.py +24 -0
- bazis_front-0.1.0/bazis/contrib/front/apps.py +26 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/README.md +231 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/package.json +15 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/scripts/extract-fixture.mjs +88 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/src/client.ts +664 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/src/download.ts +61 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/src/errors.ts +152 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/src/filter.ts +120 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/src/index.ts +61 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/src/pagination.ts +62 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/src/permit.ts +72 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/src/types.ts +268 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/test/authing.test.ts +183 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/test/background.test.ts +113 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/test/client.test.ts +565 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/test/download.test.ts +68 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/test/filter.test.ts +78 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/test/fixtures/openapi.json +5509 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/test/fixtures/schema.d.ts +2785 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/test/pagination.test.ts +56 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/test/permit.test.ts +62 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/test/support.ts +37 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/test/types.typecheck.ts +214 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/test/upload.test.ts +198 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/client/tsconfig.json +7 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/README.md +70 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/bazis/index.ts +568 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/fixtures/brief.txt +1 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/manager-adds-a-step.spec.ts +49 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/manager-adds-a-watcher.spec.ts +50 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/manager-assigns-a-task.spec.ts +39 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/manager-attaches-a-brief.spec.ts +39 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/manager-cannot-change-the-report.spec.ts +30 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/manager-cannot-save-an-empty-title.spec.ts +61 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/manager-finishes-a-task.spec.ts +39 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/manager-is-notified-of-a-finished-task.spec.ts +39 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/manager-places-a-task.spec.ts +39 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/manager-sets-the-priority.spec.ts +40 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/product.ts +25 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/viewer-only-reads.spec.ts +30 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/generated/viewer-reads-the-drafts.spec.ts +23 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/package.json +15 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/playwright.config.ts +26 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/test/helpers.spec.ts +785 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/test/picker.spec.ts +150 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/test/types.typecheck.ts +38 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/playwright/tsconfig.json +28 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/README.md +320 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/package.json +22 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/actions.ts +196 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/async/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/async/tasks.ts +109 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/bg/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/bg/tasks.ts +122 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/context.tsx +77 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/download.ts +71 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/form.ts +236 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/i18n/format.ts +79 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/i18n/index.ts +38 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/i18n/language.tsx +240 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/i18n/messages/en.ts +158 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/i18n/messages/ru.ts +158 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/i18n/profile.ts +136 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/i18n/translate.ts +64 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/index.ts +56 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/keys.ts +97 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/mutations.ts +112 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/notify/inbox.ts +182 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/notify/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/queries.ts +180 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/related.ts +119 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/schema.ts +254 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/statusy/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/statusy/transits.ts +146 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/types.ts +120 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/uploadable/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/uploadable/upload.ts +118 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/ws/index.ts +33 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/ws/live.ts +61 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/ws/messages.ts +92 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/src/ws/socket.tsx +354 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/actions.test.tsx +239 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/async.test.tsx +112 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/bg.test.tsx +113 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/download.test.tsx +126 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/fixtures/parent.ts +96 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/fixtures/sample.json +2648 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/fixtures/schema.d.ts +62 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/form.test.tsx +350 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/i18n.test.tsx +330 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/mutations.test.tsx +178 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/notify.test.tsx +174 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/queries.test.tsx +261 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/related.test.tsx +93 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/schema.test.ts +239 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/socket.ts +71 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/statusy.test.tsx +146 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/support.tsx +141 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/types.typecheck.ts +161 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/uploadable.test.tsx +195 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/test/ws.test.tsx +490 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/tsconfig.json +31 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/react/vitest.config.ts +33 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/registry.json +740 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/.gitignore +7 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/.prettierignore +8 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/AGENTS.md +41 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/components.json +21 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/e2e/custom/README.md +20 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/eslint.config.js +37 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/index.html +27 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/package.json +60 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/playwright.config.ts +58 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/app/errors.test.tsx +73 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/app/errors.tsx +69 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/app/language.test.ts +120 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/app/language.ts +89 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/app/lazy.test.tsx +152 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/app/lazy.tsx +87 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/app/product.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/app/providers.test.ts +93 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/app/providers.tsx +101 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/app/router.tsx +106 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/app/session.test.ts +213 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/app/session.ts +190 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/i18n/en.ts +27 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/i18n/index.ts +24 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/i18n/ru.ts +25 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/index.css +26 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/lib/utils.ts +21 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/main.tsx +36 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/screens/home/index.tsx +91 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/src/screens/login/index.tsx +59 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/tsconfig.json +24 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/template/vite.config.ts +99 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/README.md +354 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/app-shell/app-shell.contract.test.tsx +376 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/app-shell/app-shell.tsx +465 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/app-shell/color-mode.tsx +113 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/app-shell/index.ts +21 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/app-shell/language.tsx +52 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/app-shell/list-card.tsx +74 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/async-result/async-result.contract.test.tsx +111 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/async-result/async-result.tsx +120 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/async-result/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/file-field/file-field.contract.test.tsx +273 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/file-field/file-field.tsx +119 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/file-field/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/file-field/upload-field.tsx +262 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/live-query/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/live-query/live-query.contract.test.tsx +124 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/live-query/live-query.tsx +69 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/login-form/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/login-form/login-form.contract.test.tsx +99 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/login-form/login-form.tsx +201 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/map/index.ts +18 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/map/leaflet-map.tsx +161 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/map/map.contract.test.tsx +348 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/map/map.tsx +237 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/map/resource-map.tsx +107 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/notification-center/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/notification-center/notification-center.contract.test.tsx +221 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/notification-center/notification-center.tsx +265 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/package.json +30 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource/field-input.tsx +297 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource/field-value.tsx +48 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource/fields.ts +263 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource/files.tsx +246 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource/hooks.ts +113 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource/index.ts +68 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource/points.tsx +212 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource/relation-picker.contract.test.tsx +401 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource/relation-picker.tsx +530 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource/relation.tsx +50 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource/resource.contract.test.tsx +500 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource-card/index.ts +18 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource-card/related-list.tsx +131 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource-card/resource-card.contract.test.tsx +383 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource-card/resource-card.tsx +281 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource-form/form-surface.tsx +91 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource-form/index.ts +19 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource-form/resource-form.contract.test.tsx +375 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource-form/resource-form.tsx +210 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource-list/filters.tsx +266 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource-list/index.ts +18 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource-list/resource-list.contract.test.tsx +507 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/resource-list/resource-list.tsx +670 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/shadcn/badge.tsx +72 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/shadcn/button.tsx +88 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/shadcn/card.tsx +116 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/shadcn/dialog.tsx +185 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/shadcn/input.tsx +45 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/shadcn/label.tsx +46 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/shadcn/native-select.tsx +86 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/shadcn/popover.tsx +71 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/shadcn/sheet.tsx +169 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/shadcn/skeleton.tsx +39 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/shadcn/table.tsx +138 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/state-panel/index.ts +23 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/state-panel/state-panel.contract.test.tsx +122 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/state-panel/state-panel.tsx +198 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/state-panel/toast.tsx +139 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/status-badge/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/status-badge/status-badge.contract.test.tsx +40 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/status-badge/status-badge.tsx +53 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/status-badge/statusy.ts +81 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/status-history/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/status-history/status-history.contract.test.tsx +57 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/status-history/status-history.tsx +85 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/task-progress/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/task-progress/task-progress.contract.test.tsx +155 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/task-progress/task-progress.tsx +195 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/test/browser/index.html +32 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/test/browser/picker.tsx +90 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/test/fixtures/contract.ts +723 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/test/fixtures/theme.ts +43 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/testing/index.tsx +380 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/transit-bar/index.ts +16 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/transit-bar/transit-bar.contract.test.tsx +142 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/transit-bar/transit-bar.tsx +238 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/tsconfig.json +64 -0
- bazis_front-0.1.0/bazis/contrib/front/assets/ui/vitest.config.ts +46 -0
- bazis_front-0.1.0/bazis/contrib/front/bazis_manifest.toml +97 -0
- bazis_front-0.1.0/bazis/contrib/front/capabilities/__init__.py +209 -0
- bazis_front-0.1.0/bazis/contrib/front/capabilities/async_background.py +40 -0
- bazis_front-0.1.0/bazis/contrib/front/capabilities/async_request.py +29 -0
- bazis_front-0.1.0/bazis/contrib/front/capabilities/authing.py +73 -0
- bazis_front-0.1.0/bazis/contrib/front/capabilities/bg.py +35 -0
- bazis_front-0.1.0/bazis/contrib/front/capabilities/notify.py +36 -0
- bazis_front-0.1.0/bazis/contrib/front/capabilities/permit.py +74 -0
- bazis_front-0.1.0/bazis/contrib/front/capabilities/statusy.py +94 -0
- bazis_front-0.1.0/bazis/contrib/front/capabilities/uploadable.py +41 -0
- bazis_front-0.1.0/bazis/contrib/front/capabilities/users.py +54 -0
- bazis_front-0.1.0/bazis/contrib/front/capabilities/ws.py +52 -0
- bazis_front-0.1.0/bazis/contrib/front/checks.py +281 -0
- bazis_front-0.1.0/bazis/contrib/front/contract/__init__.py +21 -0
- bazis_front-0.1.0/bazis/contrib/front/contract/export.py +149 -0
- bazis_front-0.1.0/bazis/contrib/front/contract/generated.py +142 -0
- bazis_front-0.1.0/bazis/contrib/front/contract/openapi.py +27 -0
- bazis_front-0.1.0/bazis/contrib/front/contract/resources.py +286 -0
- bazis_front-0.1.0/bazis/contrib/front/contract/typescript.py +158 -0
- bazis_front-0.1.0/bazis/contrib/front/management/__init__.py +13 -0
- bazis_front-0.1.0/bazis/contrib/front/management/commands/__init__.py +13 -0
- bazis_front-0.1.0/bazis/contrib/front/management/commands/bazis_front.py +568 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/__init__.py +21 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/access.py +320 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/color.py +113 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/create.py +93 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/design.py +393 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/e2e.py +248 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/issues.py +165 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/refs.py +983 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/scenarios.py +472 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/schemas/design.schema.json +33 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/schemas/product.schema.json +345 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/schemas/screen.schema.json +183 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/schemas/tokens.schema.json +65 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/starters/design/portal/theme.yaml +14 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/starters/design/portal/tokens.json +46 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/starters/design/workspace/theme.yaml +14 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/starters/design/workspace/tokens.json +50 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/starters/product.yaml +16 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/theme.py +276 -0
- bazis_front-0.1.0/bazis/contrib/front/spec/validate.py +314 -0
- bazis_front-0.1.0/bazis/contrib/front/vendor/__init__.py +22 -0
- bazis_front-0.1.0/bazis/contrib/front/vendor/copy.py +311 -0
- bazis_front-0.1.0/bazis/contrib/front/vendor/lock.py +174 -0
- bazis_front-0.1.0/bazis/contrib/front/vendor/npm.py +98 -0
- bazis_front-0.1.0/bazis/contrib/front/vendor/registry.py +122 -0
- bazis_front-0.1.0/bazis/contrib/front/vendor/update.py +593 -0
- bazis_front-0.1.0/bazis_front.egg-info/PKG-INFO +79 -0
- bazis_front-0.1.0/bazis_front.egg-info/SOURCES.txt +394 -0
- bazis_front-0.1.0/bazis_front.egg-info/dependency_links.txt +1 -0
- bazis_front-0.1.0/bazis_front.egg-info/requires.txt +20 -0
- bazis_front-0.1.0/bazis_front.egg-info/scm_file_list.json +390 -0
- bazis_front-0.1.0/bazis_front.egg-info/scm_version.json +8 -0
- bazis_front-0.1.0/bazis_front.egg-info/top_level.txt +1 -0
- bazis_front-0.1.0/docs/architecture.md +332 -0
- bazis_front-0.1.0/docs/releases/0.1.0.md +32 -0
- bazis_front-0.1.0/eslint.config.js +52 -0
- bazis_front-0.1.0/package-lock.json +6065 -0
- bazis_front-0.1.0/package.json +31 -0
- bazis_front-0.1.0/pyproject.toml +141 -0
- bazis_front-0.1.0/pytest.ini +4 -0
- bazis_front-0.1.0/sample/frontend-overlay/README.md +24 -0
- bazis_front-0.1.0/sample/frontend-overlay/e2e/custom/actions.spec.ts +33 -0
- bazis_front-0.1.0/sample/frontend-overlay/e2e/custom/download.spec.ts +51 -0
- bazis_front-0.1.0/sample/frontend-overlay/e2e/custom/language.spec.ts +55 -0
- bazis_front-0.1.0/sample/frontend-overlay/e2e/custom/late-labels.spec.ts +38 -0
- bazis_front-0.1.0/sample/frontend-overlay/e2e/custom/layout.spec.ts +67 -0
- bazis_front-0.1.0/sample/frontend-overlay/e2e/custom/profile-language.spec.ts +66 -0
- bazis_front-0.1.0/sample/frontend-overlay/e2e/custom/related.spec.ts +48 -0
- bazis_front-0.1.0/sample/frontend-overlay/e2e/fixtures/brief.txt +1 -0
- bazis_front-0.1.0/sample/frontend-overlay/src/app/product.ts +24 -0
- bazis_front-0.1.0/sample/frontend-overlay/src/app/router.tsx +148 -0
- bazis_front-0.1.0/sample/frontend-overlay/src/i18n/en.ts +46 -0
- bazis_front-0.1.0/sample/frontend-overlay/src/i18n/ru.ts +45 -0
- bazis_front-0.1.0/sample/frontend-overlay/src/screens/draft-tasks/index.tsx +48 -0
- bazis_front-0.1.0/sample/frontend-overlay/src/screens/task-card/index.tsx +116 -0
- bazis_front-0.1.0/sample/frontend-overlay/src/screens/task-list/index.tsx +179 -0
- bazis_front-0.1.0/sample/locale/ru/LC_MESSAGES/django.mo +0 -0
- bazis_front-0.1.0/sample/locale/ru/LC_MESSAGES/django.po +24 -0
- bazis_front-0.1.0/sample/locale/translations.json +6 -0
- bazis_front-0.1.0/sample/manage.py +35 -0
- bazis_front-0.1.0/sample/project.env +11 -0
- bazis_front-0.1.0/sample/sample/__init__.py +14 -0
- bazis_front-0.1.0/sample/sample/main.py +33 -0
- bazis_front-0.1.0/sample/sample/router.py +34 -0
- bazis_front-0.1.0/sample/sample/settings.py +20 -0
- bazis_front-0.1.0/sample/sample/urls.py +29 -0
- bazis_front-0.1.0/sample/sample/wsgi.py +22 -0
- bazis_front-0.1.0/sample/spec/design/theme.yaml +14 -0
- bazis_front-0.1.0/sample/spec/design/tokens.json +50 -0
- bazis_front-0.1.0/sample/spec/product.yaml +211 -0
- bazis_front-0.1.0/sample/spec/screens/draft-tasks.yaml +16 -0
- bazis_front-0.1.0/sample/spec/screens/task-card.yaml +26 -0
- bazis_front-0.1.0/sample/spec/screens/task-list.yaml +18 -0
- bazis_front-0.1.0/sample/tasks/__init__.py +13 -0
- bazis_front-0.1.0/sample/tasks/bg/__init__.py +13 -0
- bazis_front-0.1.0/sample/tasks/bg/count.py +45 -0
- bazis_front-0.1.0/sample/tasks/e2e.py +75 -0
- bazis_front-0.1.0/sample/tasks/locale/ru/LC_MESSAGES/django.mo +0 -0
- bazis_front-0.1.0/sample/tasks/locale/ru/LC_MESSAGES/django.po +128 -0
- bazis_front-0.1.0/sample/tasks/management/__init__.py +13 -0
- bazis_front-0.1.0/sample/tasks/management/commands/__init__.py +13 -0
- bazis_front-0.1.0/sample/tasks/management/commands/e2e_data.py +41 -0
- bazis_front-0.1.0/sample/tasks/migrations/0001_initial.py +62 -0
- bazis_front-0.1.0/sample/tasks/migrations/0002_initial.py +69 -0
- bazis_front-0.1.0/sample/tasks/migrations/0003_title_not_empty.py +33 -0
- bazis_front-0.1.0/sample/tasks/migrations/0004_attachment.py +34 -0
- bazis_front-0.1.0/sample/tasks/migrations/0005_workflow.py +35 -0
- bazis_front-0.1.0/sample/tasks/migrations/0006_workflow_ru.py +31 -0
- bazis_front-0.1.0/sample/tasks/migrations/0007_assignee_verbose_name.py +35 -0
- bazis_front-0.1.0/sample/tasks/migrations/0008_priority_step.py +53 -0
- bazis_front-0.1.0/sample/tasks/migrations/0009_location.py +33 -0
- bazis_front-0.1.0/sample/tasks/migrations/0010_watchers.py +34 -0
- bazis_front-0.1.0/sample/tasks/migrations/__init__.py +13 -0
- bazis_front-0.1.0/sample/tasks/models.py +102 -0
- bazis_front-0.1.0/sample/tasks/notifications.py +25 -0
- bazis_front-0.1.0/sample/tasks/roles.py +62 -0
- bazis_front-0.1.0/sample/tasks/router.py +22 -0
- bazis_front-0.1.0/sample/tasks/routes.py +75 -0
- bazis_front-0.1.0/sample/tasks/schemas.py +19 -0
- bazis_front-0.1.0/sample/tasks/workflow.py +37 -0
- bazis_front-0.1.0/sample/users/__init__.py +13 -0
- bazis_front-0.1.0/sample/users/apps.py +19 -0
- bazis_front-0.1.0/sample/users/migrations/0001_initial.py +66 -0
- bazis_front-0.1.0/sample/users/migrations/0002_user_language.py +43 -0
- bazis_front-0.1.0/sample/users/migrations/__init__.py +13 -0
- bazis_front-0.1.0/sample/users/models.py +38 -0
- bazis_front-0.1.0/sample/users/router.py +23 -0
- bazis_front-0.1.0/sample/users/routes.py +60 -0
- bazis_front-0.1.0/scripts/check_chunks.py +79 -0
- bazis_front-0.1.0/scripts/check_wheel.py +59 -0
- bazis_front-0.1.0/scripts/gen_api_reference.mjs +450 -0
- bazis_front-0.1.0/setup.cfg +4 -0
- bazis_front-0.1.0/tests/__init__.py +14 -0
- bazis_front-0.1.0/tests/conftest.py +54 -0
- bazis_front-0.1.0/tests/support.py +48 -0
- bazis_front-0.1.0/tests/test_add.py +236 -0
- bazis_front-0.1.0/tests/test_assets.py +287 -0
- bazis_front-0.1.0/tests/test_can.py +72 -0
- bazis_front-0.1.0/tests/test_chunks.py +86 -0
- bazis_front-0.1.0/tests/test_contract.py +758 -0
- bazis_front-0.1.0/tests/test_design.py +232 -0
- bazis_front-0.1.0/tests/test_e2e.py +518 -0
- bazis_front-0.1.0/tests/test_generated.py +404 -0
- bazis_front-0.1.0/tests/test_guide.py +103 -0
- bazis_front-0.1.0/tests/test_init.py +252 -0
- bazis_front-0.1.0/tests/test_item_invalid.py +63 -0
- bazis_front-0.1.0/tests/test_manifest.py +32 -0
- bazis_front-0.1.0/tests/test_notify.py +122 -0
- bazis_front-0.1.0/tests/test_profile_language.py +73 -0
- bazis_front-0.1.0/tests/test_react_fixture.py +514 -0
- bazis_front-0.1.0/tests/test_related.py +237 -0
- bazis_front-0.1.0/tests/test_spec.py +1157 -0
- bazis_front-0.1.0/tests/test_status.py +102 -0
- bazis_front-0.1.0/tests/test_steps.py +59 -0
- bazis_front-0.1.0/tests/test_update.py +818 -0
- bazis_front-0.1.0/tests/test_watchers.py +108 -0
- bazis_front-0.1.0/tsconfig.base.json +16 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
name: Build and Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*.*.*'
|
|
7
|
+
# started by the Release workflow on the tag it creates: a tag pushed with the
|
|
8
|
+
# workflow token does not trigger the push event above
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
build:
|
|
16
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
17
|
+
uses: ecofuture-tech/.github/.github/workflows/reusable-build-publish.yml@main
|
|
18
|
+
secrets:
|
|
19
|
+
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
|
|
20
|
+
TEST_PYPI_TOKEN: ${{ secrets.TEST_PYPI_TOKEN }}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# Creates the release tag vX.Y.Z on the current main commit and starts Build and Publish
|
|
4
|
+
# for it. Run it from the Actions tab (or through the GitHub API) on the main branch.
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
version:
|
|
10
|
+
description: 'Version without the "v" prefix, e.g. 2.3.0 or 2.4.0-rc1'
|
|
11
|
+
required: true
|
|
12
|
+
type: string
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
actions: write
|
|
17
|
+
|
|
18
|
+
concurrency:
|
|
19
|
+
group: release
|
|
20
|
+
cancel-in-progress: false
|
|
21
|
+
|
|
22
|
+
jobs:
|
|
23
|
+
release:
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
timeout-minutes: 10
|
|
26
|
+
if: github.ref == 'refs/heads/main'
|
|
27
|
+
env:
|
|
28
|
+
GH_TOKEN: ${{ github.token }}
|
|
29
|
+
VERSION: ${{ inputs.version }}
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
with:
|
|
33
|
+
fetch-depth: 0
|
|
34
|
+
|
|
35
|
+
- name: Validate the version
|
|
36
|
+
run: |
|
|
37
|
+
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-(alpha|beta|rc)[0-9]+)?$ ]]; then
|
|
38
|
+
echo "::error::Invalid version '$VERSION', expected e.g. 2.3.0 or 2.4.0-rc1"
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
41
|
+
if git rev-parse -q --verify "refs/tags/v$VERSION" >/dev/null; then
|
|
42
|
+
echo "::error::Tag v$VERSION already exists"
|
|
43
|
+
exit 1
|
|
44
|
+
fi
|
|
45
|
+
# versionsort.suffix: a pre-release (v2.4.0-rc1) sorts before its release (v2.4.0)
|
|
46
|
+
LAST_TAG=$(git -c versionsort.suffix=- tag --list 'v*' --sort=-v:refname | head -n 1)
|
|
47
|
+
echo "Last release: ${LAST_TAG:-none}, new release: v$VERSION"
|
|
48
|
+
# sort -V orders "~" before anything, as versionsort.suffix does with "-"
|
|
49
|
+
NEWEST=$(printf '%s\n%s\n' "${LAST_TAG#v}" "$VERSION" | sed 's/-/~/' | sort -V | tail -n 1)
|
|
50
|
+
if [ -n "$LAST_TAG" ] && [ "$NEWEST" != "${VERSION/-/\~}" ]; then
|
|
51
|
+
echo "::error::Version $VERSION is not newer than $LAST_TAG"
|
|
52
|
+
exit 1
|
|
53
|
+
fi
|
|
54
|
+
|
|
55
|
+
- name: Require green tests on this commit
|
|
56
|
+
run: |
|
|
57
|
+
CONCLUSION=$(gh run list --workflow tests.yml --commit "$GITHUB_SHA" --status completed \
|
|
58
|
+
--json conclusion --jq 'map(.conclusion) | first // "none"')
|
|
59
|
+
echo "Tests on $GITHUB_SHA: $CONCLUSION"
|
|
60
|
+
if [ "$CONCLUSION" != "success" ]; then
|
|
61
|
+
echo "::error::The Tests workflow has not succeeded on $GITHUB_SHA ($CONCLUSION)"
|
|
62
|
+
exit 1
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
- name: Create the tag
|
|
66
|
+
run: |
|
|
67
|
+
git config user.name 'github-actions[bot]'
|
|
68
|
+
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
|
|
69
|
+
git tag -a "v$VERSION" -m "${{ github.event.repository.name }} $VERSION" "$GITHUB_SHA"
|
|
70
|
+
git push origin "v$VERSION"
|
|
71
|
+
|
|
72
|
+
- name: Start Build and Publish
|
|
73
|
+
run: gh workflow run build-publish.yml --ref "v$VERSION"
|
|
74
|
+
|
|
75
|
+
- name: Summary
|
|
76
|
+
run: |
|
|
77
|
+
echo "Tagged \`v$VERSION\` at \`$GITHUB_SHA\` and started Build and Publish." >> "$GITHUB_STEP_SUMMARY"
|
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
name: Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: tests-${{ github.ref }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
lint:
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
timeout-minutes: 10
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- uses: astral-sh/setup-uv@v6
|
|
23
|
+
- run: uvx ruff check bazis tests sample scripts
|
|
24
|
+
- name: Check the contents of the wheel
|
|
25
|
+
run: |
|
|
26
|
+
uv build --wheel --out-dir wheel
|
|
27
|
+
python scripts/check_wheel.py wheel
|
|
28
|
+
|
|
29
|
+
tests:
|
|
30
|
+
name: tests (python ${{ matrix.python }}, ${{ matrix.resolution }})
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
timeout-minutes: 30
|
|
33
|
+
strategy:
|
|
34
|
+
fail-fast: false
|
|
35
|
+
matrix:
|
|
36
|
+
python: ['3.12', '3.13', '3.14']
|
|
37
|
+
resolution: [highest]
|
|
38
|
+
include:
|
|
39
|
+
# the lowest versions allowed by pyproject.toml
|
|
40
|
+
- python: '3.12'
|
|
41
|
+
resolution: lowest-direct
|
|
42
|
+
|
|
43
|
+
# the contract reads the roles of bazis-permit and the transits of bazis-statusy from the
|
|
44
|
+
# database of the sample
|
|
45
|
+
services:
|
|
46
|
+
postgres:
|
|
47
|
+
image: postgis/postgis:16-3.4
|
|
48
|
+
env:
|
|
49
|
+
POSTGRES_USER: postgres
|
|
50
|
+
POSTGRES_PASSWORD: postgres
|
|
51
|
+
POSTGRES_DB: bazis
|
|
52
|
+
ports:
|
|
53
|
+
- 5432:5432
|
|
54
|
+
options: >-
|
|
55
|
+
--health-cmd pg_isready
|
|
56
|
+
--health-interval 5s
|
|
57
|
+
--health-timeout 5s
|
|
58
|
+
--health-retries 10
|
|
59
|
+
redis:
|
|
60
|
+
image: redis:7
|
|
61
|
+
ports:
|
|
62
|
+
- 6379:6379
|
|
63
|
+
options: >-
|
|
64
|
+
--health-cmd "redis-cli ping"
|
|
65
|
+
--health-interval 5s
|
|
66
|
+
--health-timeout 5s
|
|
67
|
+
--health-retries 10
|
|
68
|
+
env:
|
|
69
|
+
BS_DEBUG: 'true'
|
|
70
|
+
BS_SECRET_KEY: ci-only-secret-key-that-is-long-enough-0123456789
|
|
71
|
+
BS_DATABASES__DEFAULT__HOST: localhost
|
|
72
|
+
BS_DATABASES__DEFAULT__PORT: '5432'
|
|
73
|
+
BS_DATABASES__DEFAULT__NAME: bazis
|
|
74
|
+
BS_DATABASES__DEFAULT__USER: postgres
|
|
75
|
+
BS_DATABASES__DEFAULT__PASSWORD: postgres
|
|
76
|
+
BS_CACHES__DEFAULT__LOCATION: redis://localhost:6379/1
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/checkout@v4
|
|
79
|
+
|
|
80
|
+
- name: Install GDAL (required by the PostGIS database backend)
|
|
81
|
+
# a stalled Ubuntu mirror must fail the step quickly instead of hanging the job
|
|
82
|
+
timeout-minutes: 10
|
|
83
|
+
run: |
|
|
84
|
+
APT="sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30"
|
|
85
|
+
$APT update
|
|
86
|
+
$APT install -y --no-install-recommends gdal-bin
|
|
87
|
+
|
|
88
|
+
- uses: astral-sh/setup-uv@v6
|
|
89
|
+
with:
|
|
90
|
+
python-version: ${{ matrix.python }}
|
|
91
|
+
activate-environment: true
|
|
92
|
+
|
|
93
|
+
- name: Install dependencies
|
|
94
|
+
run: uv pip install --resolution ${{ matrix.resolution }} -e '.[test]'
|
|
95
|
+
|
|
96
|
+
- name: Check for missing migrations
|
|
97
|
+
working-directory: sample
|
|
98
|
+
run: python manage.py makemigrations --check --dry-run
|
|
99
|
+
|
|
100
|
+
- name: Run tests
|
|
101
|
+
working-directory: sample
|
|
102
|
+
run: python -m pytest ../tests -o addopts="" -p no:cacheprovider
|
|
103
|
+
|
|
104
|
+
# the TypeScript assets: dev-only Node tooling of this repository
|
|
105
|
+
assets:
|
|
106
|
+
runs-on: ubuntu-latest
|
|
107
|
+
timeout-minutes: 10
|
|
108
|
+
steps:
|
|
109
|
+
- uses: actions/checkout@v4
|
|
110
|
+
- uses: actions/setup-node@v4
|
|
111
|
+
with:
|
|
112
|
+
node-version: 22
|
|
113
|
+
cache: npm
|
|
114
|
+
- run: npm ci
|
|
115
|
+
- run: npm run lint
|
|
116
|
+
- run: npm run typecheck
|
|
117
|
+
# the tests of the helpers of the end-to-end tests run in Chromium
|
|
118
|
+
- run: npx playwright install --with-deps chromium
|
|
119
|
+
- run: npm test
|
|
120
|
+
|
|
121
|
+
# a frontend made by `init` from the sample backend, with every component added: the
|
|
122
|
+
# template and the components compile, lint, pass their contract tests and build against
|
|
123
|
+
# the generated contract, the copied client and the copied hooks
|
|
124
|
+
frontend:
|
|
125
|
+
name: frontend (${{ matrix.variant }})
|
|
126
|
+
runs-on: ubuntu-latest
|
|
127
|
+
timeout-minutes: 20
|
|
128
|
+
# the components take their defaults from the theme: their contract tests run under
|
|
129
|
+
# the starters of both presets. `empty` is a new product before its first model: the
|
|
130
|
+
# sample without its apps and routes (only bazis-front, as `bazis new` creates it), whose
|
|
131
|
+
# contract has no resources, roles or transits
|
|
132
|
+
strategy:
|
|
133
|
+
fail-fast: false
|
|
134
|
+
matrix:
|
|
135
|
+
include:
|
|
136
|
+
- {variant: workspace, preset: workspace}
|
|
137
|
+
- {variant: portal, preset: portal}
|
|
138
|
+
- {variant: empty, preset: workspace, empty: true}
|
|
139
|
+
services:
|
|
140
|
+
postgres:
|
|
141
|
+
image: postgis/postgis:16-3.4
|
|
142
|
+
env:
|
|
143
|
+
POSTGRES_USER: postgres
|
|
144
|
+
POSTGRES_PASSWORD: postgres
|
|
145
|
+
POSTGRES_DB: bazis
|
|
146
|
+
ports:
|
|
147
|
+
- 5432:5432
|
|
148
|
+
options: >-
|
|
149
|
+
--health-cmd pg_isready
|
|
150
|
+
--health-interval 5s
|
|
151
|
+
--health-timeout 5s
|
|
152
|
+
--health-retries 10
|
|
153
|
+
redis:
|
|
154
|
+
image: redis:7
|
|
155
|
+
ports:
|
|
156
|
+
- 6379:6379
|
|
157
|
+
options: >-
|
|
158
|
+
--health-cmd "redis-cli ping"
|
|
159
|
+
--health-interval 5s
|
|
160
|
+
--health-timeout 5s
|
|
161
|
+
--health-retries 10
|
|
162
|
+
env:
|
|
163
|
+
BS_DEBUG: 'true'
|
|
164
|
+
BS_SECRET_KEY: ci-only-secret-key-that-is-long-enough-0123456789
|
|
165
|
+
BS_DATABASES__DEFAULT__HOST: localhost
|
|
166
|
+
BS_DATABASES__DEFAULT__PORT: '5432'
|
|
167
|
+
BS_DATABASES__DEFAULT__NAME: bazis
|
|
168
|
+
BS_DATABASES__DEFAULT__USER: postgres
|
|
169
|
+
BS_DATABASES__DEFAULT__PASSWORD: postgres
|
|
170
|
+
BS_CACHES__DEFAULT__LOCATION: redis://localhost:6379/1
|
|
171
|
+
steps:
|
|
172
|
+
- uses: actions/checkout@v4
|
|
173
|
+
|
|
174
|
+
- name: Install GDAL (required by the PostGIS database backend)
|
|
175
|
+
timeout-minutes: 10
|
|
176
|
+
run: |
|
|
177
|
+
APT="sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30"
|
|
178
|
+
$APT update
|
|
179
|
+
$APT install -y --no-install-recommends gdal-bin
|
|
180
|
+
|
|
181
|
+
- uses: astral-sh/setup-uv@v6
|
|
182
|
+
with:
|
|
183
|
+
python-version: '3.12'
|
|
184
|
+
activate-environment: true
|
|
185
|
+
- uses: actions/setup-node@v4
|
|
186
|
+
with:
|
|
187
|
+
node-version: 22
|
|
188
|
+
|
|
189
|
+
- name: Install dependencies
|
|
190
|
+
run: uv pip install -e '.[test]'
|
|
191
|
+
|
|
192
|
+
# the product root (BASE_DIR) is outside the checkout, so that the frontend is not
|
|
193
|
+
# inside the npm workspaces of this repository
|
|
194
|
+
- name: Create the frontend of the sample
|
|
195
|
+
if: ${{ !matrix.empty }}
|
|
196
|
+
working-directory: sample
|
|
197
|
+
run: |
|
|
198
|
+
echo "BS_BASE_DIR=$RUNNER_TEMP/product" >> "$GITHUB_ENV"
|
|
199
|
+
export BS_BASE_DIR="$RUNNER_TEMP/product"
|
|
200
|
+
mkdir -p "$BS_BASE_DIR"
|
|
201
|
+
python manage.py migrate
|
|
202
|
+
python manage.py bazis_front init --preset ${{ matrix.preset }}
|
|
203
|
+
python manage.py bazis_front contract
|
|
204
|
+
python manage.py bazis_front contract --check
|
|
205
|
+
python manage.py bazis_front check
|
|
206
|
+
# the theme that init compiled from the starters of the design
|
|
207
|
+
python manage.py bazis_front design --check
|
|
208
|
+
python manage.py bazis_front add resource-list resource-card resource-form status-badge status-history transit-bar file-field live-query notification-center task-progress async-result map
|
|
209
|
+
|
|
210
|
+
- name: Check and build the frontend
|
|
211
|
+
if: ${{ !matrix.empty }}
|
|
212
|
+
working-directory: ${{ env.BS_BASE_DIR }}/frontend
|
|
213
|
+
run: |
|
|
214
|
+
# the sample has bazis-statusy, bazis-uploadable, bazis-ws, bazis-notify, bazis-bg and
|
|
215
|
+
# bazis-async-background: their hooks are copied and compiled with the rest
|
|
216
|
+
test -f src/bazis/react/statusy/index.ts
|
|
217
|
+
test -f src/bazis/react/uploadable/index.ts
|
|
218
|
+
test -f src/bazis/react/ws/index.ts
|
|
219
|
+
test -f src/bazis/react/notify/index.ts
|
|
220
|
+
test -f src/bazis/react/bg/index.ts
|
|
221
|
+
test -f src/bazis/react/async/index.ts
|
|
222
|
+
test -f src/bazis/ui/transit-bar/transit-bar.contract.test.tsx
|
|
223
|
+
test -f src/bazis/ui/file-field/file-field.contract.test.tsx
|
|
224
|
+
test -f src/bazis/ui/notification-center/notification-center.contract.test.tsx
|
|
225
|
+
test -f src/bazis/ui/task-progress/task-progress.contract.test.tsx
|
|
226
|
+
test -f src/bazis/ui/async-result/async-result.contract.test.tsx
|
|
227
|
+
test -f src/bazis/ui/map/map.contract.test.tsx
|
|
228
|
+
# the npm dependency that `add map` set in package.json (Leaflet)
|
|
229
|
+
npm install
|
|
230
|
+
npx tsc --noEmit
|
|
231
|
+
npm run lint
|
|
232
|
+
# `npm run format` of a new product changes nothing: the template has its style
|
|
233
|
+
npx --no-install prettier --check src e2e
|
|
234
|
+
# the contract tests of the components with the tests of the template
|
|
235
|
+
npm test
|
|
236
|
+
npm run build -- --manifest
|
|
237
|
+
# the chunks loaded with the entry: within the budget, Leaflet not among them
|
|
238
|
+
python "$GITHUB_WORKSPACE/scripts/check_chunks.py" dist
|
|
239
|
+
|
|
240
|
+
# the overrides of the settings of sample/project.env: no app of the sample, the
|
|
241
|
+
# default router (nothing registered) and the user model of Django
|
|
242
|
+
- name: Create the frontend of a product without resources
|
|
243
|
+
if: ${{ matrix.empty }}
|
|
244
|
+
working-directory: sample
|
|
245
|
+
env:
|
|
246
|
+
BS_INSTALLED_APPS: '["bazis.contrib.front"]'
|
|
247
|
+
BS_BAZIS_ROUTER_MODULE: ''
|
|
248
|
+
BS_AUTH_USER_MODEL: auth.User
|
|
249
|
+
BS_AUTH_ANONYMOUS_USER_MODEL: ''
|
|
250
|
+
run: |
|
|
251
|
+
echo "BS_BASE_DIR=$RUNNER_TEMP/product" >> "$GITHUB_ENV"
|
|
252
|
+
export BS_BASE_DIR="$RUNNER_TEMP/product"
|
|
253
|
+
mkdir -p "$BS_BASE_DIR"
|
|
254
|
+
python manage.py migrate
|
|
255
|
+
python manage.py bazis_front init --preset ${{ matrix.preset }}
|
|
256
|
+
python manage.py bazis_front contract
|
|
257
|
+
python manage.py bazis_front contract --check
|
|
258
|
+
python -c 'import json, sys; c = json.load(open(sys.argv[1])); assert c["project"]["resources"] == {} and "permit" not in c["capabilities"], c' "$BS_BASE_DIR/contract/contract.json"
|
|
259
|
+
python manage.py bazis_front check
|
|
260
|
+
python manage.py bazis_front design --check
|
|
261
|
+
# the components that need no capability
|
|
262
|
+
python manage.py bazis_front add resource-list resource-card resource-form notification-center map
|
|
263
|
+
|
|
264
|
+
- name: Check and build the frontend of a product without resources
|
|
265
|
+
if: ${{ matrix.empty }}
|
|
266
|
+
working-directory: ${{ env.BS_BASE_DIR }}/frontend
|
|
267
|
+
run: |
|
|
268
|
+
npm install
|
|
269
|
+
npx tsc --noEmit
|
|
270
|
+
npm run lint
|
|
271
|
+
npx --no-install prettier --check src e2e
|
|
272
|
+
npm test
|
|
273
|
+
npm run build -- --manifest
|
|
274
|
+
python "$GITHUB_WORKSPACE/scripts/check_chunks.py" dist
|
|
275
|
+
|
|
276
|
+
# the end-to-end tests of the scenarios of the sample (sample/spec/product.yaml): a frontend
|
|
277
|
+
# made by `init` from the sample, with the components and the screens of the sample
|
|
278
|
+
# (sample/frontend-overlay/), the tests generated by `bazis_front e2e`, run by Playwright
|
|
279
|
+
# against the sample backend with its test data
|
|
280
|
+
e2e:
|
|
281
|
+
runs-on: ubuntu-latest
|
|
282
|
+
timeout-minutes: 30
|
|
283
|
+
services:
|
|
284
|
+
postgres:
|
|
285
|
+
image: postgis/postgis:16-3.4
|
|
286
|
+
env:
|
|
287
|
+
POSTGRES_USER: postgres
|
|
288
|
+
POSTGRES_PASSWORD: postgres
|
|
289
|
+
POSTGRES_DB: bazis
|
|
290
|
+
ports:
|
|
291
|
+
- 5432:5432
|
|
292
|
+
options: >-
|
|
293
|
+
--health-cmd pg_isready
|
|
294
|
+
--health-interval 5s
|
|
295
|
+
--health-timeout 5s
|
|
296
|
+
--health-retries 10
|
|
297
|
+
redis:
|
|
298
|
+
image: redis:7
|
|
299
|
+
ports:
|
|
300
|
+
- 6379:6379
|
|
301
|
+
options: >-
|
|
302
|
+
--health-cmd "redis-cli ping"
|
|
303
|
+
--health-interval 5s
|
|
304
|
+
--health-timeout 5s
|
|
305
|
+
--health-retries 10
|
|
306
|
+
env:
|
|
307
|
+
BS_DEBUG: 'true'
|
|
308
|
+
BS_SECRET_KEY: ci-only-secret-key-that-is-long-enough-0123456789
|
|
309
|
+
BS_DATABASES__DEFAULT__HOST: localhost
|
|
310
|
+
BS_DATABASES__DEFAULT__PORT: '5432'
|
|
311
|
+
BS_DATABASES__DEFAULT__NAME: bazis
|
|
312
|
+
BS_DATABASES__DEFAULT__USER: postgres
|
|
313
|
+
BS_DATABASES__DEFAULT__PASSWORD: postgres
|
|
314
|
+
BS_CACHES__DEFAULT__LOCATION: redis://localhost:6379/1
|
|
315
|
+
# the password of the test users, set by `e2e_data` and read by the tests
|
|
316
|
+
E2E_PASSWORD: ci-only-e2e-password-0123
|
|
317
|
+
steps:
|
|
318
|
+
- uses: actions/checkout@v4
|
|
319
|
+
|
|
320
|
+
- name: Install GDAL (required by the PostGIS database backend)
|
|
321
|
+
timeout-minutes: 10
|
|
322
|
+
run: |
|
|
323
|
+
APT="sudo apt-get -o Acquire::Retries=3 -o Acquire::http::Timeout=30 -o Acquire::https::Timeout=30"
|
|
324
|
+
$APT update
|
|
325
|
+
$APT install -y --no-install-recommends gdal-bin
|
|
326
|
+
|
|
327
|
+
- uses: astral-sh/setup-uv@v6
|
|
328
|
+
with:
|
|
329
|
+
python-version: '3.12'
|
|
330
|
+
activate-environment: true
|
|
331
|
+
- uses: actions/setup-node@v4
|
|
332
|
+
with:
|
|
333
|
+
node-version: 22
|
|
334
|
+
|
|
335
|
+
- name: Install dependencies
|
|
336
|
+
run: uv pip install -e '.[test]'
|
|
337
|
+
|
|
338
|
+
# the product root (BASE_DIR) is outside the checkout, as in the frontend job; it has
|
|
339
|
+
# the complete specs of the sample, with their scenarios
|
|
340
|
+
- name: Create the frontend of the sample and its end-to-end tests
|
|
341
|
+
working-directory: sample
|
|
342
|
+
run: |
|
|
343
|
+
echo "BS_BASE_DIR=$RUNNER_TEMP/product" >> "$GITHUB_ENV"
|
|
344
|
+
export BS_BASE_DIR="$RUNNER_TEMP/product"
|
|
345
|
+
mkdir -p "$BS_BASE_DIR"
|
|
346
|
+
cp -R spec "$BS_BASE_DIR/spec"
|
|
347
|
+
# `migrate` applies the declared roles, statuses and transits of the sample
|
|
348
|
+
python manage.py migrate
|
|
349
|
+
# the e2e data command: the test users of the roles and the task of a scenario
|
|
350
|
+
python manage.py e2e_data
|
|
351
|
+
python manage.py bazis_front init
|
|
352
|
+
python manage.py bazis_front contract
|
|
353
|
+
python manage.py bazis_front check
|
|
354
|
+
python manage.py bazis_front add resource-list resource-card resource-form status-badge status-history transit-bar file-field live-query notification-center task-progress map
|
|
355
|
+
# the screens of the sample, product code, and the files that its scenarios upload
|
|
356
|
+
cp -R frontend-overlay/src/. "$BS_BASE_DIR/frontend/src/"
|
|
357
|
+
cp -R frontend-overlay/e2e/. "$BS_BASE_DIR/frontend/e2e/"
|
|
358
|
+
python manage.py bazis_front e2e
|
|
359
|
+
python manage.py bazis_front e2e --check
|
|
360
|
+
# the theme of the design of the sample
|
|
361
|
+
python manage.py bazis_front design --check
|
|
362
|
+
|
|
363
|
+
- name: Check and build the frontend
|
|
364
|
+
working-directory: ${{ env.BS_BASE_DIR }}/frontend
|
|
365
|
+
run: |
|
|
366
|
+
# the npm dependency that `add map` set in package.json (Leaflet)
|
|
367
|
+
npm install
|
|
368
|
+
npx tsc --noEmit
|
|
369
|
+
npm run lint
|
|
370
|
+
npm run build -- --manifest
|
|
371
|
+
# Leaflet and the file field are chunks of their own, not in the main chunk, and the
|
|
372
|
+
# chunks loaded with the entry are within the budget with the screens of the sample
|
|
373
|
+
python "$GITHUB_WORKSPACE/scripts/check_chunks.py" dist
|
|
374
|
+
|
|
375
|
+
# the backend serves the socket of bazis-ws (`/api/v1/ws`), which `vite preview` proxies: the
|
|
376
|
+
# notifications of the scenarios come over it (Redis pub/sub)
|
|
377
|
+
- name: Start the backend and the frontend
|
|
378
|
+
run: |
|
|
379
|
+
(cd sample && nohup uvicorn sample.main:app --host 127.0.0.1 --port 8000 > "$RUNNER_TEMP/backend.log" 2>&1 &)
|
|
380
|
+
(cd "$BS_BASE_DIR/frontend" && BAZIS_API_URL=http://127.0.0.1:8000 nohup npx vite preview --port 4173 --strictPort > "$RUNNER_TEMP/frontend.log" 2>&1 &)
|
|
381
|
+
# the list of the tasks, which an anonymous user (the viewer role) may read, through the proxy
|
|
382
|
+
timeout 120 sh -c 'until curl -sf -o /dev/null http://localhost:4173/api/v1/tasks/task/; do sleep 1; done'
|
|
383
|
+
|
|
384
|
+
- name: Run the end-to-end tests
|
|
385
|
+
working-directory: ${{ env.BS_BASE_DIR }}/frontend
|
|
386
|
+
env:
|
|
387
|
+
E2E_BASE_URL: http://localhost:4173
|
|
388
|
+
run: |
|
|
389
|
+
npx playwright install --with-deps chromium
|
|
390
|
+
npm run e2e
|
|
391
|
+
|
|
392
|
+
- name: Upload the report of Playwright
|
|
393
|
+
if: failure()
|
|
394
|
+
uses: actions/upload-artifact@v4
|
|
395
|
+
with:
|
|
396
|
+
name: playwright-report
|
|
397
|
+
path: |
|
|
398
|
+
${{ env.BS_BASE_DIR }}/frontend/playwright-report/
|
|
399
|
+
${{ env.BS_BASE_DIR }}/frontend/test-results/
|
|
400
|
+
${{ runner.temp }}/backend.log
|
|
401
|
+
${{ runner.temp }}/frontend.log
|
|
402
|
+
retention-days: 7
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
name: Update Licenses
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- '**.py'
|
|
9
|
+
- 'pyproject.toml'
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: write
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
update-licenses:
|
|
16
|
+
uses: ecofuture-tech/.github/.github/workflows/reusable-update-licenses.yml@main
|
|
17
|
+
secrets:
|
|
18
|
+
WORKFLOW_LICENSE_TOKEN: ${{ secrets.WORKFLOW_LICENSE_TOKEN }}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
.idea
|
|
2
|
+
.ipynb_checkpoints
|
|
3
|
+
.mypy_cache
|
|
4
|
+
.vscode
|
|
5
|
+
__pycache__
|
|
6
|
+
.pytest_cache
|
|
7
|
+
htmlcov
|
|
8
|
+
dist
|
|
9
|
+
site
|
|
10
|
+
.coverage
|
|
11
|
+
coverage.xml
|
|
12
|
+
.netlify
|
|
13
|
+
test.db
|
|
14
|
+
log.txt
|
|
15
|
+
Pipfile.lock
|
|
16
|
+
env3.*
|
|
17
|
+
env
|
|
18
|
+
docs_build
|
|
19
|
+
venv
|
|
20
|
+
.venv
|
|
21
|
+
docs.zip
|
|
22
|
+
archive.zip
|
|
23
|
+
|
|
24
|
+
.env
|
|
25
|
+
local.env
|
|
26
|
+
*/.env*
|
|
27
|
+
|
|
28
|
+
# vim temporary files
|
|
29
|
+
*~
|
|
30
|
+
.*.sw?
|
|
31
|
+
*.DS_Store
|
|
32
|
+
|
|
33
|
+
*.egg-info
|
|
34
|
+
build
|
|
35
|
+
dist
|
|
36
|
+
|
|
37
|
+
docs/_autosummary
|
|
38
|
+
docs/_build
|
|
39
|
+
*.DS_Store
|
|
40
|
+
*.log
|
|
41
|
+
my-*
|
|
42
|
+
My*
|
|
43
|
+
*/**/_version.py
|
|
44
|
+
/uv.lock
|
|
45
|
+
|
|
46
|
+
# Node tooling of the assets (dev-only)
|
|
47
|
+
node_modules/
|
|
48
|
+
coverage/
|
|
49
|
+
*.tsbuildinfo
|
|
50
|
+
build/
|
|
51
|
+
|
|
52
|
+
# Playwright runs of the helpers
|
|
53
|
+
test-results/
|
|
54
|
+
playwright-report/
|