@antelopejs/dms 0.8.3 → 0.9.1
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/CHANGELOG.md +36 -0
- package/data/module-store/catalog.json +71 -0
- package/dist/config.d.ts +7 -0
- package/dist/config.js +8 -0
- package/dist/config.js.map +1 -1
- package/dist/implementations/dms/frontend-backend-proxies.d.ts +3 -0
- package/dist/implementations/dms/frontend-backend-proxies.js +39 -0
- package/dist/implementations/dms/frontend-backend-proxies.js.map +1 -0
- package/dist/implementations/dms/frontend-bootstrap.d.ts +1 -0
- package/dist/implementations/dms/frontend-bootstrap.js +13 -0
- package/dist/implementations/dms/frontend-bootstrap.js.map +1 -1
- package/dist/implementations/dms/frontend-modules.d.ts +6 -2
- package/dist/implementations/dms/frontend-modules.js +37 -8
- package/dist/implementations/dms/frontend-modules.js.map +1 -1
- package/dist/implementations/dms/frontend-ready.d.ts +8 -0
- package/dist/implementations/dms/frontend-ready.js +34 -0
- package/dist/implementations/dms/frontend-ready.js.map +1 -0
- package/dist/implementations/dms/manifest.d.ts +7 -0
- package/dist/implementations/dms/manifest.js +13 -0
- package/dist/implementations/dms/manifest.js.map +1 -1
- package/dist/implementations/dms/menu-categories.d.ts +16 -0
- package/dist/implementations/dms/menu-categories.js +30 -0
- package/dist/implementations/dms/menu-categories.js.map +1 -0
- package/dist/implementations/dms/nav-badges.d.ts +0 -8
- package/dist/implementations/dms/nav-badges.js +0 -16
- package/dist/implementations/dms/nav-badges.js.map +1 -1
- package/dist/implementations/dms/page.d.ts +13 -5
- package/dist/implementations/dms/page.js +72 -41
- package/dist/implementations/dms/page.js.map +1 -1
- package/dist/implementations/dms-html-render/index.js +5 -2
- package/dist/implementations/dms-html-render/index.js.map +1 -1
- package/dist/implementations/dms-notifications/index.d.ts +4 -3
- package/dist/implementations/dms-notifications/index.js +14 -6
- package/dist/implementations/dms-notifications/index.js.map +1 -1
- package/dist/pages/settings/settings-index.js +3 -2
- package/dist/pages/settings/settings-index.js.map +1 -1
- package/dist/pages/settings/users/invites.js +2 -2
- package/dist/pages/settings/users/invites.js.map +1 -1
- package/dist/pages/settings/users/member-change-notifications.js +17 -6
- package/dist/pages/settings/users/member-change-notifications.js.map +1 -1
- package/dist/pages/settings/users/member-invite-form.d.ts +3 -2
- package/dist/pages/settings/users/member-invite-form.js +7 -4
- package/dist/pages/settings/users/member-invite-form.js.map +1 -1
- package/dist/pages/settings/users/member-roles-field.js +2 -1
- package/dist/pages/settings/users/member-roles-field.js.map +1 -1
- package/dist/pages/settings/users/members.js +4 -1
- package/dist/pages/settings/users/members.js.map +1 -1
- package/dist/pages/settings/users/notifications.d.ts +6 -0
- package/dist/pages/settings/users/notifications.js +23 -15
- package/dist/pages/settings/users/notifications.js.map +1 -1
- package/dist/pages/settings/users/profile.js +1 -1
- package/dist/pages/settings/users/profile.js.map +1 -1
- package/dist/pages/settings/users/region-form.d.ts +1 -1
- package/dist/pages/settings/users/region-form.js +2 -1
- package/dist/pages/settings/users/region-form.js.map +1 -1
- package/dist/pages/settings/users/role-editor-store.d.ts +3 -1
- package/dist/pages/settings/users/role-editor-store.js +17 -4
- package/dist/pages/settings/users/role-editor-store.js.map +1 -1
- package/dist/pages/settings/users/roles.js +1 -0
- package/dist/pages/settings/users/roles.js.map +1 -1
- package/dist/realtime/registry.d.ts +1 -0
- package/dist/realtime/registry.js +5 -0
- package/dist/realtime/registry.js.map +1 -1
- package/dist/routes/index.d.ts +1 -0
- package/dist/routes/index.js +1 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/realtime.d.ts +5 -1
- package/dist/routes/realtime.js +16 -9
- package/dist/routes/realtime.js.map +1 -1
- package/dist/routes/store.d.ts +21 -0
- package/dist/routes/store.js +130 -0
- package/dist/routes/store.js.map +1 -0
- package/dist/store/activity.d.ts +2 -0
- package/dist/store/activity.js +12 -0
- package/dist/store/activity.js.map +1 -0
- package/dist/store/cache.d.ts +8 -0
- package/dist/store/cache.js +29 -0
- package/dist/store/cache.js.map +1 -0
- package/dist/store/catalog.d.ts +4 -0
- package/dist/store/catalog.js +69 -0
- package/dist/store/catalog.js.map +1 -0
- package/dist/store/compatibility.d.ts +3 -0
- package/dist/store/compatibility.js +45 -0
- package/dist/store/compatibility.js.map +1 -0
- package/dist/store/declarations.d.ts +18 -0
- package/dist/store/declarations.js +116 -0
- package/dist/store/declarations.js.map +1 -0
- package/dist/store/frontend-compatibility.d.ts +18 -0
- package/dist/store/frontend-compatibility.js +93 -0
- package/dist/store/frontend-compatibility.js.map +1 -0
- package/dist/store/interfaces.d.ts +6 -0
- package/dist/store/interfaces.js +126 -0
- package/dist/store/interfaces.js.map +1 -0
- package/dist/store/listing.d.ts +2 -0
- package/dist/store/listing.js +180 -0
- package/dist/store/listing.js.map +1 -0
- package/dist/store/operations.d.ts +8 -0
- package/dist/store/operations.js +254 -0
- package/dist/store/operations.js.map +1 -0
- package/dist/store/registry.d.ts +4 -0
- package/dist/store/registry.js +61 -0
- package/dist/store/registry.js.map +1 -0
- package/dist/store/requirements.d.ts +14 -0
- package/dist/store/requirements.js +81 -0
- package/dist/store/requirements.js.map +1 -0
- package/dist/store/runtime.d.ts +11 -0
- package/dist/store/runtime.js +78 -0
- package/dist/store/runtime.js.map +1 -0
- package/dist/store/tarball.d.ts +2 -0
- package/dist/store/tarball.js +80 -0
- package/dist/store/tarball.js.map +1 -0
- package/dist/store/types.d.ts +98 -0
- package/dist/store/types.js +3 -0
- package/dist/store/types.js.map +1 -0
- package/dist/test/integration/account-deletion.test.js +2 -2
- package/dist/test/integration/account-deletion.test.js.map +1 -1
- package/dist/test/integration/auth/auth-key-rotation.test.js +2 -1
- package/dist/test/integration/auth/auth-key-rotation.test.js.map +1 -1
- package/dist/test/integration/auth/current-password.test.js +2 -1
- package/dist/test/integration/auth/current-password.test.js.map +1 -1
- package/dist/test/integration/auth/session-revocation.test.js +2 -1
- package/dist/test/integration/auth/session-revocation.test.js.map +1 -1
- package/dist/test/integration/auth/sign-in-country.test.js +2 -1
- package/dist/test/integration/auth/sign-in-country.test.js.map +1 -1
- package/dist/test/integration/auth/two-factor-codes.test.js +2 -1
- package/dist/test/integration/auth/two-factor-codes.test.js.map +1 -1
- package/dist/test/integration/auth/two-factor-password.test.js +3 -2
- package/dist/test/integration/auth/two-factor-password.test.js.map +1 -1
- package/dist/test/integration/email-change.test.js +2 -1
- package/dist/test/integration/email-change.test.js.map +1 -1
- package/dist/test/integration/files/component-files.test.js +2 -2
- package/dist/test/integration/files/component-files.test.js.map +1 -1
- package/dist/test/integration/member-settings-access.test.js +8 -7
- package/dist/test/integration/member-settings-access.test.js.map +1 -1
- package/dist/test/integration/menu-access-events.test.d.ts +1 -0
- package/dist/test/integration/menu-access-events.test.js +148 -0
- package/dist/test/integration/menu-access-events.test.js.map +1 -0
- package/dist/test/integration/notification-inbox.test.js +4 -1
- package/dist/test/integration/notification-inbox.test.js.map +1 -1
- package/dist/test/integration/notification-locked-subjects.test.js +3 -2
- package/dist/test/integration/notification-locked-subjects.test.js.map +1 -1
- package/dist/test/integration/notification-unread-badge.test.js +51 -5
- package/dist/test/integration/notification-unread-badge.test.js.map +1 -1
- package/dist/test/integration/page-layout-route-guard.test.d.ts +1 -0
- package/dist/test/integration/page-layout-route-guard.test.js +56 -0
- package/dist/test/integration/page-layout-route-guard.test.js.map +1 -0
- package/dist/test/integration/permission-warnings.test.js +3 -2
- package/dist/test/integration/permission-warnings.test.js.map +1 -1
- package/dist/test/integration/removed-member-notifications.test.js +3 -2
- package/dist/test/integration/removed-member-notifications.test.js.map +1 -1
- package/dist/test/integration/role-delete-reassign.test.js +2 -1
- package/dist/test/integration/role-delete-reassign.test.js.map +1 -1
- package/dist/test/integration/role-permission-ancestors.test.js +2 -1
- package/dist/test/integration/role-permission-ancestors.test.js.map +1 -1
- package/dist/test/unit/frontend-bootstrap.test.js +13 -0
- package/dist/test/unit/frontend-bootstrap.test.js.map +1 -1
- package/dist/test/unit/implementations/dms/category-slug-registry.test.js +14 -5
- package/dist/test/unit/implementations/dms/category-slug-registry.test.js.map +1 -1
- package/dist/test/unit/implementations/dms/frontend-backend-proxies.test.d.ts +1 -0
- package/dist/test/unit/implementations/dms/frontend-backend-proxies.test.js +66 -0
- package/dist/test/unit/implementations/dms/frontend-backend-proxies.test.js.map +1 -0
- package/dist/test/unit/implementations/dms/manifest-strip.test.js +26 -0
- package/dist/test/unit/implementations/dms/manifest-strip.test.js.map +1 -1
- package/dist/test/unit/implementations/dms/nav-badges.test.js +23 -9
- package/dist/test/unit/implementations/dms/nav-badges.test.js.map +1 -1
- package/dist/test/unit/implementations/dms-html-render/generate-html.test.js +22 -4
- package/dist/test/unit/implementations/dms-html-render/generate-html.test.js.map +1 -1
- package/dist/test/unit/interfaces/dms/page-layout-query.test.js +12 -0
- package/dist/test/unit/interfaces/dms/page-layout-query.test.js.map +1 -1
- package/dist/test/unit/interfaces/dms/page-teardown.test.js +1 -1
- package/dist/test/unit/interfaces/dms/page-teardown.test.js.map +1 -1
- package/dist/test/unit/pages/settings/member-roles-field.test.js +1 -1
- package/dist/test/unit/pages/settings/member-roles-field.test.js.map +1 -1
- package/dist/test/unit/pages/settings/role-delete-confirm.test.js.map +1 -1
- package/dist/test/unit/realtime/menu-topics.test.d.ts +1 -0
- package/dist/test/unit/realtime/menu-topics.test.js +26 -0
- package/dist/test/unit/realtime/menu-topics.test.js.map +1 -0
- package/dist/test/unit/store/store.test.d.ts +1 -0
- package/dist/test/unit/store/store.test.js +127 -0
- package/dist/test/unit/store/store.test.js.map +1 -0
- package/dist/validation/store.schema.d.ts +39 -0
- package/dist/validation/store.schema.js +27 -0
- package/dist/validation/store.schema.js.map +1 -0
- package/frontend-vue/deferred-plugins.ts +3 -4
- package/frontend-vue/dms.email.ts +5 -1
- package/frontend-vue/dms.frontend.ts +15 -5
- package/frontend-vue/dms.server.ts +74 -0
- package/frontend-vue/layers/dms-auth/app/composables/useLogout.ts +1 -1
- package/frontend-vue/layers/dms-auth/app/composables/usePostLoginRedirect.ts +16 -3
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/2fa.vue +3 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/backup.vue +3 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/forgot-validation.vue +1 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/oauth-complete.vue +26 -3
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/recover.vue +1 -1
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/signup.vue +22 -25
- package/frontend-vue/layers/dms-auth/app/custom-pages/auth/validate.vue +1 -1
- package/frontend-vue/layers/dms-auth/app/middleware/auth.ts +5 -7
- package/frontend-vue/layers/dms-auth/app/plugins/permissions-preload.ts +17 -0
- package/frontend-vue/layers/dms-auth/server/accounts.ts +135 -0
- package/frontend-vue/layers/dms-auth/server/actions.ts +251 -0
- package/frontend-vue/layers/dms-auth/server/oauth.ts +260 -0
- package/frontend-vue/layers/dms-auth/server/session.ts +158 -0
- package/frontend-vue/layers/dms-core/app/build/utils/asyncDataScope.ts +47 -0
- package/frontend-vue/layers/dms-core/app/build/utils/permission-preview.ts +6 -2
- package/frontend-vue/layers/dms-core/app/composables/auth/useApiData.ts +148 -0
- package/frontend-vue/layers/dms-core/app/composables/auth/useAuthFetch.ts +7 -20
- package/frontend-vue/layers/dms-core/app/composables/auth/useCurrentUser.ts +2 -2
- package/frontend-vue/layers/dms-core/app/composables/auth/useMultiAccount.ts +18 -5
- package/frontend-vue/layers/dms-core/app/composables/auth/usePermissions.ts +35 -6
- package/frontend-vue/layers/dms-core/app/composables/auth/useSessionRecovery.ts +1 -1
- package/frontend-vue/layers/dms-core/app/composables/period/compareResolvers.ts +20 -14
- package/frontend-vue/layers/dms-core/app/composables/period/periodClock.ts +121 -0
- package/frontend-vue/layers/dms-core/app/composables/period/periodRenderNow.ts +42 -0
- package/frontend-vue/layers/dms-core/app/composables/period/periodTimeZone.ts +31 -0
- package/frontend-vue/layers/dms-core/app/composables/period/presetResolvers.ts +48 -19
- package/frontend-vue/layers/dms-core/app/composables/period/usePeriod.ts +33 -4
- package/frontend-vue/layers/dms-core/app/composables/period/usePeriodScope.ts +78 -25
- package/frontend-vue/layers/dms-core/app/composables/realtime/usePageRealtime.ts +3 -0
- package/frontend-vue/layers/dms-core/app/composables/realtime/useUserRealtime.ts +36 -6
- package/frontend-vue/layers/dms-core/app/composables/user/useUserRegionalPreferences.ts +1 -1
- package/frontend-vue/layers/dms-core/app/plugins/async-data-scope.ts +26 -0
- package/frontend-vue/layers/dms-core/app/utils/pageRoutes.ts +22 -0
- package/frontend-vue/layers/dms-core/app/utils/regional.ts +36 -3
- package/frontend-vue/layers/dms-core/app/utils/trailingDeduper.ts +10 -1
- package/frontend-vue/layers/dms-core/shared/types/app-config.ts +48 -4
- package/frontend-vue/layers/dms-layout/app/app.config.ts +42 -23
- package/frontend-vue/layers/dms-layout/app/assets/css/main.css +72 -20
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardFrame.vue +9 -0
- package/frontend-vue/layers/dms-layout/app/build/components/layout/DashboardSidebar.vue +0 -3
- package/frontend-vue/layers/dms-layout/app/build/components/notification/NotificationPopover.vue +9 -3
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleStoreDependencyPicker.vue +136 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleStoreRequirements.vue +98 -0
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleStoreTile.vue +247 -29
- package/frontend-vue/layers/dms-layout/app/build/components/pages/modules/ModuleTile.vue +19 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/members/MemberRolePicker.vue +13 -12
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationInboxDisplay.vue +17 -7
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/notification/NotificationPreferencesForm.vue +0 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/profile/ProfilePersonalInfo.vue +36 -33
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/profile/ProfileSecuritySummary.vue +1 -2
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/roles/role-types.ts +5 -4
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecuritySessions.vue +35 -28
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecurityStatus.vue +0 -1
- package/frontend-vue/layers/dms-layout/app/build/components/pages/settings/security/SecurityTwoFactor.vue +1 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/dev-reload/useDevReloadHolder.ts +7 -6
- package/frontend-vue/layers/dms-layout/app/build/composables/layout/sidePanelState.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/navigation/useVisitNavBadges.ts +26 -0
- package/frontend-vue/layers/dms-layout/app/build/composables/notification/useNotificationCatalog.ts +25 -23
- package/frontend-vue/layers/dms-layout/app/build/composables/notification/useNotificationPreferences.ts +44 -23
- package/frontend-vue/layers/dms-layout/app/build/composables/security/useSessionHandoff.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/preferencesSummary.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useAccountData.ts +3 -2
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useProfileAvatar.ts +1 -18
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/profile/useProfilePreferences.ts +19 -23
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/security/useSecurityFormat.ts +6 -3
- package/frontend-vue/layers/dms-layout/app/build/composables/settings/security/useSecurityOverview.ts +13 -18
- package/frontend-vue/layers/dms-layout/app/build/utils/module-store-catalog.ts +186 -120
- package/frontend-vue/layers/dms-layout/app/build/utils/module-store-install.ts +146 -0
- package/frontend-vue/layers/dms-layout/app/build/utils/modules-catalog.ts +8 -6
- package/frontend-vue/layers/dms-layout/app/build/utils/publicErrorMessage.ts +19 -0
- package/frontend-vue/layers/dms-layout/app/components/navigation/CollapsedMenuItem.vue +0 -11
- package/frontend-vue/layers/dms-layout/app/components/navigation/NavigationMenu.vue +3 -13
- package/frontend-vue/layers/dms-layout/app/composables/general/useSystemState.ts +7 -11
- package/frontend-vue/layers/dms-layout/app/composables/notification/useNotifications.ts +103 -22
- package/frontend-vue/layers/dms-layout/app/composables/page/useModuleStore.ts +109 -0
- package/frontend-vue/layers/dms-layout/app/composables/page/useModulesListing.ts +25 -102
- package/frontend-vue/layers/dms-layout/app/composables/page/usePageComponentPreload.ts +0 -10
- package/frontend-vue/layers/dms-layout/app/composables/page/useSiteLayout.ts +177 -96
- package/frontend-vue/layers/dms-layout/app/composables/profile/useUserLanguage.ts +3 -2
- package/frontend-vue/layers/dms-layout/app/custom-pages/modules.vue +341 -62
- package/frontend-vue/layers/dms-layout/app/emails/components/EmailLayout.vue +31 -11
- package/frontend-vue/layers/dms-layout/app/error.vue +5 -2
- package/frontend-vue/layers/dms-layout/app/middleware/module-routing.global.ts +1 -1
- package/frontend-vue/layers/dms-layout/app/middleware/page-leave-guard.global.ts +2 -2
- package/frontend-vue/layers/dms-layout/app/pages/[...slug].vue +12 -9
- package/frontend-vue/layers/dms-layout/app/plugins/dms-menu-sync.client.ts +31 -3
- package/frontend-vue/layers/dms-layout/app/plugins/favicon.ts +58 -0
- package/frontend-vue/layers/dms-layout/app/plugins/notification-stream.client.ts +15 -7
- package/frontend-vue/layers/dms-layout/app/plugins/profile-sync.client.ts +5 -1
- package/frontend-vue/layers/dms-layout/app/plugins/regional-preferences.ts +10 -4
- package/frontend-vue/layers/dms-layout/app/plugins/time-zone-cookie.client.ts +12 -0
- package/frontend-vue/layers/dms-layout/app/types/module-store.ts +134 -0
- package/frontend-vue/layers/dms-layout/app/types/page.ts +13 -0
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-en-GB.json +107 -9
- package/frontend-vue/layers/dms-layout/i18n/locales/layout-fr-FR.json +107 -9
- package/frontend-vue/layers/dms-layout/server/html-render.ts +58 -0
- package/frontend-vue/layers/dms-layout/server/render-token.ts +95 -0
- package/frontend-vue/layers/dms-onboarding/app/composables/onboarding/useOnboarding.ts +25 -21
- package/frontend-vue/layers/dms-onboarding/app/middleware/onboarding.global.ts +1 -1
- package/frontend-vue/layers/dms-onboarding/app/plugins/onboarding-preload.ts +9 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/data-types/registerDefaults.ts +4 -1
- package/frontend-vue/layers/dms-ui/app/build/composables/files/useFileMetadata.ts +162 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/form/formRecordLoad.ts +23 -4
- package/frontend-vue/layers/dms-ui/app/build/composables/live/usePageDataRefresh.ts +101 -0
- package/frontend-vue/layers/dms-ui/app/build/composables/navigation/useNavBadges.ts +33 -6
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodDisplay.ts +19 -16
- package/frontend-vue/layers/dms-ui/app/build/composables/period/periodQuery.ts +40 -20
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableFooter.ts +6 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableListData.ts +42 -14
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableRows.ts +19 -8
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useTableViews.ts +1 -1
- package/frontend-vue/layers/dms-ui/app/components/chart/ChartCard.vue +5 -2
- package/frontend-vue/layers/dms-ui/app/components/flow-canvas/FlowCanvas.vue +9 -9
- package/frontend-vue/layers/dms-ui/app/components/form/Form.vue +20 -18
- package/frontend-vue/layers/dms-ui/app/components/form/components/Cascader.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/components/form/components/File.vue +26 -132
- package/frontend-vue/layers/dms-ui/app/components/form/components/Image.vue +40 -105
- package/frontend-vue/layers/dms-ui/app/components/form/components/InputAddress.vue +2 -0
- package/frontend-vue/layers/dms-ui/app/components/form/components/Relation.vue +4 -4
- package/frontend-vue/layers/dms-ui/app/components/period/PeriodSelector.vue +9 -13
- package/frontend-vue/layers/dms-ui/app/components/table-view/CascaderPath.vue +2 -1
- package/frontend-vue/layers/dms-ui/app/components/table-view/FilePreview.vue +12 -24
- package/frontend-vue/layers/dms-ui/app/components/table-view/ImagePreview.vue +17 -29
- package/frontend-vue/layers/dms-ui/app/components/table-view/KanbanBoard.vue +7 -3
- package/frontend-vue/layers/dms-ui/app/components/table-view/TableView.vue +20 -8
- package/frontend-vue/layers/dms-ui/app/components/top-list/TopListCard.vue +8 -11
- package/frontend-vue/layers/dms-ui/app/composables/chart/useChartFetch.ts +146 -182
- package/frontend-vue/layers/dms-ui/app/composables/live/usePageLiveRefresh.ts +8 -2
- package/frontend-vue/layers/dms-ui/app/composables/useFileReadUrls.ts +11 -99
- package/frontend-vue/layers/dms-ui/app/utils/blockRefresh.ts +32 -3
- package/frontend-vue/package.json +3 -3
- package/frontend-vue/pnpm-lock.yaml +16 -22
- package/frontend-vue/server/private-options.ts +27 -0
- package/frontend-vue/tests/async-data-scope.test.ts +121 -0
- package/frontend-vue/tests/auth-middleware-error.test.ts +3 -3
- package/frontend-vue/tests/banner-block-fetch.test.ts +3 -0
- package/frontend-vue/tests/block-fetch-options-forwarding.test.ts +3 -0
- package/frontend-vue/tests/block-items-period-realtime.test.ts +3 -0
- package/frontend-vue/tests/block-not-found.test.ts +16 -2
- package/frontend-vue/tests/block-page-refresh.test.ts +3 -0
- package/frontend-vue/tests/block-route-params.test.ts +3 -0
- package/frontend-vue/tests/branding-defaults.test.ts +34 -0
- package/frontend-vue/tests/builtin-emails.test.ts +23 -2
- package/frontend-vue/tests/chart-live-pause.test.ts +4 -1
- package/frontend-vue/tests/chart-value-propagation.test.ts +4 -1
- package/frontend-vue/tests/composed-text-blocks.test.ts +3 -0
- package/frontend-vue/tests/email-layout.test.ts +66 -4
- package/frontend-vue/tests/error-page-message.test.ts +25 -2
- package/frontend-vue/tests/favicon.test.ts +131 -0
- package/frontend-vue/tests/file-fields-ssr.test.ts +145 -0
- package/frontend-vue/tests/file-read-urls.test.ts +145 -34
- package/frontend-vue/tests/file-unavailable.test.ts +5 -1
- package/frontend-vue/tests/fixtures/dataEngine.ts +44 -0
- package/frontend-vue/tests/form-load-error.test.ts +55 -1
- package/frontend-vue/tests/helpers/api-data-runtime.ts +77 -0
- package/frontend-vue/tests/image-hydration-ids.test.ts +21 -16
- package/frontend-vue/tests/image-reference-preservation.test.ts +59 -53
- package/frontend-vue/tests/input-number-adjust.test.ts +14 -0
- package/frontend-vue/tests/key-value-list-copy.test.ts +3 -0
- package/frontend-vue/tests/member-role-picker.test.ts +4 -2
- package/frontend-vue/tests/menu-sync-reconnect.test.ts +47 -0
- package/frontend-vue/tests/metadata-retry.test.ts +5 -1
- package/frontend-vue/tests/module-routing.test.ts +2 -5
- package/frontend-vue/tests/module-store-catalog.test.ts +270 -51
- package/frontend-vue/tests/modules-catalog.test.ts +17 -4
- package/frontend-vue/tests/modules-listing-transfer.test.ts +95 -0
- package/frontend-vue/tests/multi-account-validate.test.ts +23 -1
- package/frontend-vue/tests/nav-badge-tones.test.ts +66 -3
- package/frontend-vue/tests/notification-counts-from-writes.test.ts +223 -0
- package/frontend-vue/tests/notification-counts-transfer.test.ts +88 -0
- package/frontend-vue/tests/notification-inbox-display.test.ts +57 -5
- package/frontend-vue/tests/notification-popover-errors.test.ts +21 -1
- package/frontend-vue/tests/oauth-complete-handoff.test.ts +209 -0
- package/frontend-vue/tests/onboarding-middleware.test.ts +1 -1
- package/frontend-vue/tests/onboarding-transfer.test.ts +106 -0
- package/frontend-vue/tests/page-data-refresh.test.ts +141 -0
- package/frontend-vue/tests/page-fill-height.test.ts +16 -3
- package/frontend-vue/tests/page-no-visible-blocks.test.ts +12 -2
- package/frontend-vue/tests/page-realtime-remount.test.ts +1 -1
- package/frontend-vue/tests/page-record-label.test.ts +0 -7
- package/frontend-vue/tests/page-validation-redirect.test.ts +12 -2
- package/frontend-vue/tests/period-hydration-now.test.ts +185 -0
- package/frontend-vue/tests/period-live-pause.test.ts +3 -0
- package/frontend-vue/tests/period-reader-zone.test.ts +137 -0
- package/frontend-vue/tests/period-scope-first-fetch.test.ts +17 -1
- package/frontend-vue/tests/period-ssr.test.ts +195 -0
- package/frontend-vue/tests/permission-preview-partial.test.ts +0 -2
- package/frontend-vue/tests/permissions-transfer.test.ts +194 -0
- package/frontend-vue/tests/post-login-redirect.test.ts +10 -5
- package/frontend-vue/tests/profile-personal-info-ssr.test.ts +150 -0
- package/frontend-vue/tests/profile-preferences-summary.test.ts +15 -11
- package/frontend-vue/tests/realtime-reconnect.test.ts +22 -3
- package/frontend-vue/tests/roles-name-errors.test.ts +1 -1
- package/frontend-vue/tests/row-side-panel.test.ts +1 -1
- package/frontend-vue/tests/security-sessions-load-error.test.ts +3 -1
- package/frontend-vue/tests/server-routes-vs-pages.test.ts +26 -0
- package/frontend-vue/tests/server-routes.test.ts +582 -0
- package/frontend-vue/tests/session-handoff.test.ts +1 -1
- package/frontend-vue/tests/settings-reads-ssr.test.ts +232 -0
- package/frontend-vue/tests/side-panels.test.ts +8 -1
- package/frontend-vue/tests/sign-in-exit-history.test.ts +219 -0
- package/frontend-vue/tests/signup-invitation-link.test.ts +56 -8
- package/frontend-vue/tests/site-layout-categories.test.ts +42 -0
- package/frontend-vue/tests/site-layout-hydration.test.ts +3 -3
- package/frontend-vue/tests/site-layout-rendered.test.ts +103 -0
- package/frontend-vue/tests/site-layout-resync.test.ts +87 -0
- package/frontend-vue/tests/ssr-guard-preload.test.ts +188 -0
- package/frontend-vue/tests/table-cell-tones.test.ts +36 -1
- package/frontend-vue/tests/table-data-ssr.test.ts +195 -0
- package/frontend-vue/tests/table-list-data-requests.test.ts +154 -0
- package/frontend-vue/tests/table-retry-loading.test.ts +37 -0
- package/frontend-vue/tests/table-source-navigation.test.ts +0 -1
- package/frontend-vue/tests/table-source-period-scope.test.ts +0 -1
- package/frontend-vue/tests/table-view-views.test.ts +1 -1
- package/frontend-vue/tests/top-list-card-actions.test.ts +3 -0
- package/frontend-vue/tests/top-list-card-period-badge-ssr.test.ts +212 -0
- package/frontend-vue/tests/top-list-card-period-badge.test.ts +79 -0
- package/frontend-vue/tests/top-list-card-value-suffix.test.ts +3 -0
- package/frontend-vue/tests/trailing-deduper.test.ts +22 -0
- package/frontend-vue/tests/use-api-data-update.test.ts +119 -0
- package/frontend-vue/tests/use-api-data.test.ts +410 -0
- package/frontend-vue/tests/user-language.test.ts +8 -5
- package/frontend-vue/tests/widget-label-i18n.test.ts +4 -1
- package/frontend-vue/vitest.config.ts +6 -0
- package/package.json +2 -2
- package/skills/dms/SKILL.md +2 -1
- package/skills/dms-module/SKILL.md +1 -1
- package/skills/dms-pages/SKILL.md +4 -1
- package/frontend-vue/layers/dms-core/app/build/composables/page/usePageRecordLabel.ts +0 -9
- package/frontend-vue/layers/dms-layout/app/composables/page/usePrefetch.ts +0 -21
- package/frontend-vue/layers/dms-ui/app/build/composables/form/useControlError.ts +0 -10
- package/frontend-vue/layers/dms-ui/app/build/composables/table-view/useServerRenderedAsyncData.ts +0 -23
- package/frontend-vue/tests/control-error-path.test.ts +0 -11
- package/frontend-vue/tests/modules-listing-per-request.test.ts +0 -104
- package/frontend-vue/tests/page-layout-background-refresh.test.ts +0 -321
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.ModuleStoreController = void 0;
|
|
16
|
+
const interface_api_1 = require("@antelopejs/interface-api");
|
|
17
|
+
const interface_api_util_1 = require("@antelopejs/interface-api-util");
|
|
18
|
+
const db_1 = require("@antelopejs/interface-dms/db");
|
|
19
|
+
const auth_1 = require("@antelopejs/interface-dms/auth");
|
|
20
|
+
const request_tenant_1 = require("@antelopejs/interface-dms/request-tenant");
|
|
21
|
+
const tenant_scoped_model_1 = require("@antelopejs/interface-dms/tenant-scoped-model");
|
|
22
|
+
const page_1 = require("../implementations/dms/page");
|
|
23
|
+
const listing_1 = require("../store/listing");
|
|
24
|
+
const operations_1 = require("../store/operations");
|
|
25
|
+
const store_schema_1 = require("../validation/store.schema");
|
|
26
|
+
const HTTP_FORBIDDEN = 403;
|
|
27
|
+
const ERROR_UNAUTHORIZED = "error.unauthorized";
|
|
28
|
+
class ModuleStoreController extends (0, interface_api_1.Controller)("/dms/store") {
|
|
29
|
+
async assertOwner() {
|
|
30
|
+
const isOwner = await (0, page_1.isPlatformOwner)(this.user, this.memberModel, this.roleModel, (0, request_tenant_1.getRequestTenantId)(this.requestContext));
|
|
31
|
+
(0, interface_api_util_1.assert)(isOwner, HTTP_FORBIDDEN, ERROR_UNAUTHORIZED);
|
|
32
|
+
}
|
|
33
|
+
async run(kind, body) {
|
|
34
|
+
await this.assertOwner();
|
|
35
|
+
const { id } = (0, interface_api_util_1.assertValidation)(body, (value) => store_schema_1.storeOperationSchema.parse(value));
|
|
36
|
+
await (0, operations_1.startStoreOperation)(kind, id);
|
|
37
|
+
return (0, listing_1.buildStoreListing)();
|
|
38
|
+
}
|
|
39
|
+
async listing() {
|
|
40
|
+
await this.assertOwner();
|
|
41
|
+
return (0, listing_1.buildStoreListing)();
|
|
42
|
+
}
|
|
43
|
+
async install(body) {
|
|
44
|
+
await this.assertOwner();
|
|
45
|
+
const { id, dependencies } = (0, interface_api_util_1.assertValidation)(body, (value) => store_schema_1.storeInstallSchema.parse(value));
|
|
46
|
+
await (0, operations_1.startStoreOperation)("install", id, { dependencies });
|
|
47
|
+
return (0, listing_1.buildStoreListing)();
|
|
48
|
+
}
|
|
49
|
+
update(body) {
|
|
50
|
+
return this.run("update", body);
|
|
51
|
+
}
|
|
52
|
+
enable(body) {
|
|
53
|
+
return this.run("enable", body);
|
|
54
|
+
}
|
|
55
|
+
disable(body) {
|
|
56
|
+
return this.run("disable", body);
|
|
57
|
+
}
|
|
58
|
+
uninstall(body) {
|
|
59
|
+
return this.run("uninstall", body);
|
|
60
|
+
}
|
|
61
|
+
apply(body) {
|
|
62
|
+
return this.run("apply", body);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.ModuleStoreController = ModuleStoreController;
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, interface_api_1.Context)(),
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
|
+
], ModuleStoreController.prototype, "requestContext", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, tenant_scoped_model_1.TenantScopedModel)(db_1.RoleModel),
|
|
72
|
+
__metadata("design:type", db_1.RoleModel)
|
|
73
|
+
], ModuleStoreController.prototype, "roleModel", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, tenant_scoped_model_1.TenantScopedModel)(db_1.TenantMemberModel),
|
|
76
|
+
__metadata("design:type", db_1.TenantMemberModel)
|
|
77
|
+
], ModuleStoreController.prototype, "memberModel", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, auth_1.IfAuthUser)(),
|
|
80
|
+
__metadata("design:type", Object)
|
|
81
|
+
], ModuleStoreController.prototype, "user", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, interface_api_1.Get)("/listing"),
|
|
84
|
+
__metadata("design:type", Function),
|
|
85
|
+
__metadata("design:paramtypes", []),
|
|
86
|
+
__metadata("design:returntype", Promise)
|
|
87
|
+
], ModuleStoreController.prototype, "listing", null);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, interface_api_1.Post)("/install"),
|
|
90
|
+
__param(0, (0, interface_api_1.JSONBody)()),
|
|
91
|
+
__metadata("design:type", Function),
|
|
92
|
+
__metadata("design:paramtypes", [Object]),
|
|
93
|
+
__metadata("design:returntype", Promise)
|
|
94
|
+
], ModuleStoreController.prototype, "install", null);
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, interface_api_1.Post)("/update"),
|
|
97
|
+
__param(0, (0, interface_api_1.JSONBody)()),
|
|
98
|
+
__metadata("design:type", Function),
|
|
99
|
+
__metadata("design:paramtypes", [Object]),
|
|
100
|
+
__metadata("design:returntype", Promise)
|
|
101
|
+
], ModuleStoreController.prototype, "update", null);
|
|
102
|
+
__decorate([
|
|
103
|
+
(0, interface_api_1.Post)("/enable"),
|
|
104
|
+
__param(0, (0, interface_api_1.JSONBody)()),
|
|
105
|
+
__metadata("design:type", Function),
|
|
106
|
+
__metadata("design:paramtypes", [Object]),
|
|
107
|
+
__metadata("design:returntype", Promise)
|
|
108
|
+
], ModuleStoreController.prototype, "enable", null);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, interface_api_1.Post)("/disable"),
|
|
111
|
+
__param(0, (0, interface_api_1.JSONBody)()),
|
|
112
|
+
__metadata("design:type", Function),
|
|
113
|
+
__metadata("design:paramtypes", [Object]),
|
|
114
|
+
__metadata("design:returntype", Promise)
|
|
115
|
+
], ModuleStoreController.prototype, "disable", null);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, interface_api_1.Post)("/uninstall"),
|
|
118
|
+
__param(0, (0, interface_api_1.JSONBody)()),
|
|
119
|
+
__metadata("design:type", Function),
|
|
120
|
+
__metadata("design:paramtypes", [Object]),
|
|
121
|
+
__metadata("design:returntype", Promise)
|
|
122
|
+
], ModuleStoreController.prototype, "uninstall", null);
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, interface_api_1.Post)("/apply"),
|
|
125
|
+
__param(0, (0, interface_api_1.JSONBody)()),
|
|
126
|
+
__metadata("design:type", Function),
|
|
127
|
+
__metadata("design:paramtypes", [Object]),
|
|
128
|
+
__metadata("design:returntype", Promise)
|
|
129
|
+
], ModuleStoreController.prototype, "apply", null);
|
|
130
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/routes/store.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6DAOmC;AACnC,uEAA0E;AAC1E,qDAA4E;AAC5E,yDAA4D;AAE5D,6EAA8E;AAC9E,uFAAkF;AAClF,sDAA8D;AAC9D,8CAAqD;AACrD,oDAA0D;AAE1D,6DAGoC;AAEpC,MAAM,cAAc,GAAG,GAAG,CAAC;AAC3B,MAAM,kBAAkB,GAAG,oBAAoB,CAAC;AAOhD,MAAa,qBAAsB,SAAQ,IAAA,0BAAU,EAAC,YAAY,CAAC;IAazD,KAAK,CAAC,WAAW;QACvB,MAAM,OAAO,GAAG,MAAM,IAAA,sBAAe,EACnC,IAAI,CAAC,IAAI,EACT,IAAI,CAAC,WAAW,EAChB,IAAI,CAAC,SAAS,EACd,IAAA,mCAAkB,EAAC,IAAI,CAAC,cAAc,CAAC,CACxC,CAAC;QACF,IAAA,2BAAM,EAAC,OAAO,EAAE,cAAc,EAAE,kBAAkB,CAAC,CAAC;IACtD,CAAC;IAEO,KAAK,CAAC,GAAG,CACf,IAAwB,EACxB,IAAa;QAEb,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QACzB,MAAM,EAAE,EAAE,EAAE,GAAG,IAAA,qCAAgB,EAAC,IAAI,EAAE,CAAC,KAAK,EAAE,EAAE,CAC9C,mCAAoB,CAAC,KAAK,CAAC,KAAK,CAAC,CAClC,CAAC;QACF,MAAM,IAAA,gCAAmB,EAAC,IAAI,EAAE,EAAE,CAAC,CAA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AAC,sBAAiB,CAAC;8BAChB,sBAAiB;0DAAC;AAG/B;IADP,IAAA,iBAAU,GAAE;;mDACkB;AAyBzB;IADL,IAAA,mBAAG,EAAC,UAAU,CAAC;;;;oDAIf;AAGK;IADL,IAAA,oBAAI,EAAC,UAAU,CAAC;IACF,WAAA,IAAA,wBAAQ,GAAE,CAAA;;;;oDAOxB;AAGD;IADC,IAAA,oBAAI,EAAC,SAAS,CAAC;IACR,WAAA,IAAA,wBAAQ,GAAE,CAAA;;;;mDAEjB;AAGD;IADC,IAAA,oBAAI,EAAC,SAAS,CAAC;IACR,WAAA,IAAA,wBAAQ,GAAE,CAAA;;;;mDAEjB;AAGD;IADC,IAAA,oBAAI,EAAC,UAAU,CAAC;IACR,WAAA,IAAA,wBAAQ,GAAE,CAAA;;;;oDAElB;AAGD;IADC,IAAA,oBAAI,EAAC,YAAY,CAAC;IACR,WAAA,IAAA,wBAAQ,GAAE,CAAA;;;;sDAEpB;AAGD;IADC,IAAA,oBAAI,EAAC,QAAQ,CAAC;IACR,WAAA,IAAA,wBAAQ,GAAE,CAAA;;;;kDAEhB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isStoreOperationRunning = isStoreOperationRunning;
|
|
4
|
+
exports.setStoreOperationRunning = setStoreOperationRunning;
|
|
5
|
+
let isBusy = false;
|
|
6
|
+
function isStoreOperationRunning() {
|
|
7
|
+
return isBusy;
|
|
8
|
+
}
|
|
9
|
+
function setStoreOperationRunning(running) {
|
|
10
|
+
isBusy = running;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=activity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.js","sourceRoot":"","sources":["../../src/store/activity.ts"],"names":[],"mappings":";;AAOA,0DAEC;AAED,4DAEC;AAbD,IAAI,MAAM,GAAG,KAAK,CAAC;AAOnB,SAAgB,uBAAuB;IACrC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAgB,wBAAwB,CAAC,OAAgB;IACvD,MAAM,GAAG,OAAO,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface CacheLifetimes {
|
|
2
|
+
found: number;
|
|
3
|
+
failed: number;
|
|
4
|
+
}
|
|
5
|
+
export interface LookupCache<T> {
|
|
6
|
+
get(key: string, lookup: () => Promise<T | undefined>): Promise<T | undefined>;
|
|
7
|
+
}
|
|
8
|
+
export declare function createLookupCache<T>(lifetimes: CacheLifetimes): LookupCache<T>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createLookupCache = createLookupCache;
|
|
4
|
+
function createLookupCache(lifetimes) {
|
|
5
|
+
const values = new Map();
|
|
6
|
+
const pending = new Map();
|
|
7
|
+
const isFresh = (cached) => Date.now() - cached.fetchedAt <
|
|
8
|
+
(cached.value === undefined ? lifetimes.failed : lifetimes.found);
|
|
9
|
+
return {
|
|
10
|
+
get(key, lookup) {
|
|
11
|
+
const cached = values.get(key);
|
|
12
|
+
if (cached && isFresh(cached))
|
|
13
|
+
return Promise.resolve(cached.value);
|
|
14
|
+
const inFlight = pending.get(key);
|
|
15
|
+
if (inFlight)
|
|
16
|
+
return inFlight;
|
|
17
|
+
const run = lookup()
|
|
18
|
+
.catch(() => undefined)
|
|
19
|
+
.then((value) => {
|
|
20
|
+
values.set(key, { fetchedAt: Date.now(), value });
|
|
21
|
+
return value;
|
|
22
|
+
})
|
|
23
|
+
.finally(() => pending.delete(key));
|
|
24
|
+
pending.set(key, run);
|
|
25
|
+
return run;
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../src/store/cache.ts"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
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StoreCatalogEntry } from "./types";
|
|
2
|
+
export declare function readCatalogDocument(document: unknown): StoreCatalogEntry[];
|
|
3
|
+
export declare function loadStoreCatalog(): Promise<StoreCatalogEntry[]>;
|
|
4
|
+
export declare function findCatalogEntry(id: string): Promise<StoreCatalogEntry | undefined>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.readCatalogDocument = readCatalogDocument;
|
|
7
|
+
exports.loadStoreCatalog = loadStoreCatalog;
|
|
8
|
+
exports.findCatalogEntry = findCatalogEntry;
|
|
9
|
+
const node_fs_1 = require("node:fs");
|
|
10
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
11
|
+
const logging_1 = require("@antelopejs/interface-core/logging");
|
|
12
|
+
const config_1 = require("../config");
|
|
13
|
+
const BUNDLED_CATALOG_PATH = node_path_1.default.join(__dirname, "../../data/module-store/catalog.json");
|
|
14
|
+
const CATALOG_TTL_MS = 60 * 60 * 1000;
|
|
15
|
+
const CATALOG_FETCH_TIMEOUT_MS = 10_000;
|
|
16
|
+
const SUPPORTED_CATALOG_VERSION = 1;
|
|
17
|
+
let cachedRemote;
|
|
18
|
+
let bundled;
|
|
19
|
+
function isCatalogEntry(value) {
|
|
20
|
+
const entry = value;
|
|
21
|
+
return (typeof entry?.id === "string" &&
|
|
22
|
+
typeof entry.package === "string" &&
|
|
23
|
+
typeof entry.icon === "string" &&
|
|
24
|
+
typeof entry.category === "string");
|
|
25
|
+
}
|
|
26
|
+
function readCatalogDocument(document) {
|
|
27
|
+
const catalog = document;
|
|
28
|
+
if (catalog?.version !== SUPPORTED_CATALOG_VERSION) {
|
|
29
|
+
throw new Error(`Unsupported module catalog version: ${String(catalog?.version)}`);
|
|
30
|
+
}
|
|
31
|
+
return (catalog.modules ?? []).filter(isCatalogEntry);
|
|
32
|
+
}
|
|
33
|
+
function bundledCatalog() {
|
|
34
|
+
bundled ??= readCatalogDocument(JSON.parse((0, node_fs_1.readFileSync)(BUNDLED_CATALOG_PATH, "utf-8")));
|
|
35
|
+
return bundled;
|
|
36
|
+
}
|
|
37
|
+
async function fetchRemoteCatalog(url) {
|
|
38
|
+
const response = await fetch(url, {
|
|
39
|
+
signal: AbortSignal.timeout(CATALOG_FETCH_TIMEOUT_MS),
|
|
40
|
+
});
|
|
41
|
+
if (!response.ok) {
|
|
42
|
+
throw new Error(`HTTP ${response.status}`);
|
|
43
|
+
}
|
|
44
|
+
return readCatalogDocument(await response.json());
|
|
45
|
+
}
|
|
46
|
+
async function loadStoreCatalog() {
|
|
47
|
+
const url = (0, config_1.getStoreConfig)().catalogUrl;
|
|
48
|
+
if (!url) {
|
|
49
|
+
return bundledCatalog();
|
|
50
|
+
}
|
|
51
|
+
const isFresh = cachedRemote?.url === url &&
|
|
52
|
+
Date.now() - cachedRemote.fetchedAt < CATALOG_TTL_MS;
|
|
53
|
+
if (isFresh && cachedRemote) {
|
|
54
|
+
return cachedRemote.modules;
|
|
55
|
+
}
|
|
56
|
+
try {
|
|
57
|
+
const modules = await fetchRemoteCatalog(url);
|
|
58
|
+
cachedRemote = { url, fetchedAt: Date.now(), modules };
|
|
59
|
+
return modules;
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
logging_1.Logging.Warn(`[DMS] Module catalog ${url} could not be read, using the bundled one: ${String(error)}`);
|
|
63
|
+
return cachedRemote?.url === url ? cachedRemote.modules : bundledCatalog();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
async function findCatalogEntry(id) {
|
|
67
|
+
return (await loadStoreCatalog()).find((entry) => entry.id === id);
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +1 @@
|
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AC7E,CAAC;AACH,CAAC;AAGM,KAAK,UAAU,gBAAgB,CACpC,EAAU;IAEV,OAAO,CAAC,MAAM,gBAAgB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AACrE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.installedInterfaceVersion = installedInterfaceVersion;
|
|
7
|
+
exports.isCompatible = isCompatible;
|
|
8
|
+
const node_fs_1 = require("node:fs");
|
|
9
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
10
|
+
const semver_1 = require("semver");
|
|
11
|
+
const registry_1 = require("./registry");
|
|
12
|
+
const PACKAGE_JSON = "package.json";
|
|
13
|
+
const INTERFACE_ENTRY = `${registry_1.INTERFACE_PACKAGE}/page`;
|
|
14
|
+
let interfaceVersion;
|
|
15
|
+
function readManifest(folder) {
|
|
16
|
+
try {
|
|
17
|
+
return JSON.parse((0, node_fs_1.readFileSync)(node_path_1.default.join(folder, PACKAGE_JSON), "utf-8"));
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function installedInterfaceVersion() {
|
|
24
|
+
if (interfaceVersion)
|
|
25
|
+
return interfaceVersion;
|
|
26
|
+
let folder = node_path_1.default.dirname(require.resolve(INTERFACE_ENTRY));
|
|
27
|
+
while (folder !== node_path_1.default.dirname(folder)) {
|
|
28
|
+
const manifest = readManifest(folder);
|
|
29
|
+
if (manifest?.name === registry_1.INTERFACE_PACKAGE && manifest.version) {
|
|
30
|
+
interfaceVersion = manifest.version;
|
|
31
|
+
return interfaceVersion;
|
|
32
|
+
}
|
|
33
|
+
folder = node_path_1.default.dirname(folder);
|
|
34
|
+
}
|
|
35
|
+
throw new Error(`Cannot find the installed ${registry_1.INTERFACE_PACKAGE} version`);
|
|
36
|
+
}
|
|
37
|
+
function isCompatible(release, installedVersion) {
|
|
38
|
+
const range = release.interfaceRange
|
|
39
|
+
? (0, semver_1.validRange)(release.interfaceRange)
|
|
40
|
+
: null;
|
|
41
|
+
if (!range)
|
|
42
|
+
return true;
|
|
43
|
+
return (0, semver_1.satisfies)(installedVersion, range, { includePrerelease: true });
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=compatibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compatibility.js","sourceRoot":"","sources":["../../src/store/compatibility.ts"],"names":[],"mappings":";;;;;AA+BA,8DAYC;AAOD,oCASC;AA3DD,qCAAuC;AACvC,0DAA6B;AAC7B,mCAA+C;AAC/C,yCAA+C;AAG/C,MAAM,YAAY,GAAG,cAAc,CAAC;AACpC,MAAM,eAAe,GAAG,GAAG,4BAAiB,OAAO,CAAC;AAOpD,IAAI,gBAAoC,CAAC;AAEzC,SAAS,YAAY,CAAC,MAAc;IAClC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CACf,IAAA,sBAAY,EAAC,mBAAI,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,OAAO,CAAC,CACpC,CAAC;IACvB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC;AAOD,SAAgB,yBAAyB;IACvC,IAAI,gBAAgB;QAAE,OAAO,gBAAgB,CAAC;IAC9C,IAAI,MAAM,GAAG,mBAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC;IAC5D,OAAO,MAAM,KAAK,mBAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACvC,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,QAAQ,EAAE,IAAI,KAAK,4BAAiB,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YAC7D,gBAAgB,GAAG,QAAQ,CAAC,OAAO,CAAC;YACpC,OAAO,gBAAgB,CAAC;QAC1B,CAAC;QACD,MAAM,GAAG,mBAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,6BAA6B,4BAAiB,UAAU,CAAC,CAAC;AAC5E,CAAC;AAOD,SAAgB,YAAY,CAC1B,OAAuB,EACvB,gBAAwB;IAExB,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc;QAClC,CAAC,CAAC,IAAA,mBAAU,EAAC,OAAO,CAAC,cAAc,CAAC;QACpC,CAAC,CAAC,IAAI,CAAC;IACT,IAAI,CAAC,KAAK;QAAE,OAAO,IAAI,CAAC;IACxB,OAAO,IAAA,kBAAS,EAAC,gBAAgB,EAAE,KAAK,EAAE,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ModuleSourcePackage } from "@antelopejs/interface-core/config";
|
|
2
|
+
import type { StoreCatalogEntry, StoreDeclaration } from "./types";
|
|
3
|
+
interface ModuleDeclaration {
|
|
4
|
+
source?: unknown;
|
|
5
|
+
config?: unknown;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
optional?: boolean;
|
|
8
|
+
}
|
|
9
|
+
type ModuleDeclarationChanges = Partial<ModuleDeclaration>;
|
|
10
|
+
export declare class DeclarationsUnavailableError extends Error {
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
|
13
|
+
export declare function listCatalogDeclarations(catalog: readonly StoreCatalogEntry[]): Promise<Map<string, StoreDeclaration>>;
|
|
14
|
+
export declare function hasDeclaration(key: string): Promise<boolean>;
|
|
15
|
+
export declare function saveDeclaration(key: string, changes: ModuleDeclarationChanges): Promise<void>;
|
|
16
|
+
export declare function removeDeclaration(key: string): Promise<void>;
|
|
17
|
+
export declare function packageDeclarationSource(packageName: string, range: string): ModuleSourcePackage;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.DeclarationsUnavailableError = void 0;
|
|
37
|
+
exports.listCatalogDeclarations = listCatalogDeclarations;
|
|
38
|
+
exports.hasDeclaration = hasDeclaration;
|
|
39
|
+
exports.saveDeclaration = saveDeclaration;
|
|
40
|
+
exports.removeDeclaration = removeDeclaration;
|
|
41
|
+
exports.packageDeclarationSource = packageDeclarationSource;
|
|
42
|
+
const coreModules = __importStar(require("@antelopejs/interface-core/modules"));
|
|
43
|
+
const PACKAGE_SOURCE_TYPE = "package";
|
|
44
|
+
const DECLARATIONS_TIMEOUT_MS = 5000;
|
|
45
|
+
const DECLARATION_FUNCTIONS = [
|
|
46
|
+
"ListModuleDeclarations",
|
|
47
|
+
"SaveModuleDeclaration",
|
|
48
|
+
"RemoveModuleDeclaration",
|
|
49
|
+
];
|
|
50
|
+
class DeclarationsUnavailableError extends Error {
|
|
51
|
+
constructor() {
|
|
52
|
+
super("This @antelopejs/core cannot edit antelope.config.ts: update it to one that implements the module declaration functions");
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.DeclarationsUnavailableError = DeclarationsUnavailableError;
|
|
56
|
+
function isFunction(value) {
|
|
57
|
+
return typeof value === "function";
|
|
58
|
+
}
|
|
59
|
+
function declarationFunctions() {
|
|
60
|
+
const exported = { ...coreModules };
|
|
61
|
+
const functions = DECLARATION_FUNCTIONS.map((name) => exported[name]);
|
|
62
|
+
if (!functions.every(isFunction)) {
|
|
63
|
+
throw new DeclarationsUnavailableError();
|
|
64
|
+
}
|
|
65
|
+
const [list, save, remove] = functions;
|
|
66
|
+
return {
|
|
67
|
+
ListModuleDeclarations: list,
|
|
68
|
+
SaveModuleDeclaration: save,
|
|
69
|
+
RemoveModuleDeclaration: remove,
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function withTimeout(call) {
|
|
73
|
+
let timer;
|
|
74
|
+
const timeout = new Promise((_, reject) => {
|
|
75
|
+
timer = setTimeout(() => reject(new DeclarationsUnavailableError()), DECLARATIONS_TIMEOUT_MS);
|
|
76
|
+
timer.unref();
|
|
77
|
+
});
|
|
78
|
+
return Promise.race([call, timeout]).finally(() => clearTimeout(timer));
|
|
79
|
+
}
|
|
80
|
+
function packageSource(declaration) {
|
|
81
|
+
const source = declaration.source;
|
|
82
|
+
return source?.type === PACKAGE_SOURCE_TYPE ? source : undefined;
|
|
83
|
+
}
|
|
84
|
+
async function listCatalogDeclarations(catalog) {
|
|
85
|
+
const declarations = await withTimeout(declarationFunctions().ListModuleDeclarations());
|
|
86
|
+
const byPackage = new Map(catalog.map((entry) => [entry.package, entry.id]));
|
|
87
|
+
const result = new Map();
|
|
88
|
+
for (const [key, declaration] of Object.entries(declarations)) {
|
|
89
|
+
const source = packageSource(declaration);
|
|
90
|
+
const id = source?.package ? byPackage.get(source.package) : undefined;
|
|
91
|
+
if (!id || !source?.package || result.has(id))
|
|
92
|
+
continue;
|
|
93
|
+
result.set(id, {
|
|
94
|
+
key,
|
|
95
|
+
package: source.package,
|
|
96
|
+
range: source.version ?? "",
|
|
97
|
+
disabled: declaration.disabled === true,
|
|
98
|
+
config: declaration.config,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
return result;
|
|
102
|
+
}
|
|
103
|
+
async function hasDeclaration(key) {
|
|
104
|
+
const declarations = await withTimeout(declarationFunctions().ListModuleDeclarations());
|
|
105
|
+
return Object.hasOwn(declarations, key);
|
|
106
|
+
}
|
|
107
|
+
function saveDeclaration(key, changes) {
|
|
108
|
+
return withTimeout(declarationFunctions().SaveModuleDeclaration(key, changes));
|
|
109
|
+
}
|
|
110
|
+
function removeDeclaration(key) {
|
|
111
|
+
return withTimeout(declarationFunctions().RemoveModuleDeclaration(key));
|
|
112
|
+
}
|
|
113
|
+
function packageDeclarationSource(packageName, range) {
|
|
114
|
+
return { type: PACKAGE_SOURCE_TYPE, package: packageName, version: range };
|
|
115
|
+
}
|
|
116
|
+
//# sourceMappingURL=declarations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"declarations.js","sourceRoot":"","sources":["../../src/store/declarations.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqGA,0DAqBC;AAGD,wCAKC;AAED,0CAOC;AAED,8CAEC;AAGD,4DAKC;AAtJD,gFAAkE;AAGlE,MAAM,mBAAmB,GAAG,SAAkB,CAAC;AAK/C,MAAM,uBAAuB,GAAG,IAAI,CAAC;AA0BrC,MAAM,qBAAqB,GAA8C;IACvE,wBAAwB;IACxB,uBAAuB;IACvB,yBAAyB;CAC1B,CAAC;AASF,MAAa,4BAA6B,SAAQ,KAAK;IACrD;QACE,KAAK,CACH,yHAAyH,CAC1H,CAAC;IACJ,CAAC;CACF;AAND,oEAMC;AAED,SAAS,UAAU,CAAC,KAAc;IAChC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC;AAED,SAAS,oBAAoB;IAC3B,MAAM,QAAQ,GAA4B,EAAE,GAAG,WAAW,EAAE,CAAC;IAC7D,MAAM,SAAS,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IACtE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,4BAA4B,EAAE,CAAC;IAC3C,CAAC;IACD,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC;IACvC,OAAO;QACL,sBAAsB,EACpB,IAAsD;QACxD,qBAAqB,EACnB,IAAqD;QACvD,uBAAuB,EACrB,MAAyD;KAC5D,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAI,IAAgB;IACtC,IAAI,KAAiC,CAAC;IACtC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE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M,CAAC,GAAG,CAAC,EAAE,CAAC;YAAE,SAAS;QACxD,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE;YACb,GAAG;YACH,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,KAAK,EAAE,MAAM,CAAC,OAAO,IAAI,EAAE;YAC3B,QAAQ,EAAE,WAAW,CAAC,QAAQ,KAAK,IAAI;YACvC,MAAM,EAAE,WAAW,CAAC,MAAM;SAC3B,CAAC,CAAC;IACL,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAGM,KAAK,UAAU,cAAc,CAAC,GAAW;IAC9C,MAAM,YAAY,GAAG,MAAM,WAAW,CACpC,oBAAoB,EAAE,CAAC,sBAAsB,EAAE,CAChD,CAAC;IACF,OAAO,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,CAAC;AAC1C,CAAC;AAED,SAAgB,eAAe,CAC7B,GAAW,EACX,OAAiC;IAEjC,OAAO,WAAW,CAChB,oBAAoB,EAAE,CAAC,qBAAqB,CAAC,GAAG,EAAE,OAAO,CAAC,CAC3D,CAAC;AACJ,CAAC;AAED,SAAgB,iBAAiB,CAAC,GAAW;IAC3C,OAAO,WAAW,CAAC,oBAAoB,EAAE,CAAC,uBAAuB,CAAC,GAAG,CAAC,CAAC,CAAC;AAC1E,CAAC;AAGD,SAAgB,wBAAwB,CACtC,WAAmB,EACnB,KAAa;IAEb,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { FrontendRequirement, FrontendVersionSource } from "./types";
|
|
2
|
+
export declare const FRONTEND_PACKAGE = "@antelopejs/dms-frontend";
|
|
3
|
+
export interface RunningFrontend {
|
|
4
|
+
version: string;
|
|
5
|
+
source: FrontendVersionSource;
|
|
6
|
+
}
|
|
7
|
+
type DeclaredRange = string | null;
|
|
8
|
+
export declare function releaseFrontendRange(packageName: string, version: string, projectPath: string): Promise<DeclaredRange | undefined>;
|
|
9
|
+
export declare function runningFrontend(projectPath: string): RunningFrontend | undefined;
|
|
10
|
+
export declare function supportsFrontend(range: string, version: string): boolean;
|
|
11
|
+
export interface FrontendRequirementInput {
|
|
12
|
+
range: string;
|
|
13
|
+
running: string;
|
|
14
|
+
projectPath: string;
|
|
15
|
+
replacedFolder?: string;
|
|
16
|
+
}
|
|
17
|
+
export declare function frontendRequirement(input: FrontendRequirementInput): Promise<FrontendRequirement | undefined>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.FRONTEND_PACKAGE = void 0;
|
|
7
|
+
exports.releaseFrontendRange = releaseFrontendRange;
|
|
8
|
+
exports.runningFrontend = runningFrontend;
|
|
9
|
+
exports.supportsFrontend = supportsFrontend;
|
|
10
|
+
exports.frontendRequirement = frontendRequirement;
|
|
11
|
+
const node_fs_1 = require("node:fs");
|
|
12
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
13
|
+
const semver_1 = require("semver");
|
|
14
|
+
const frontend_modules_1 = require("../implementations/dms/frontend-modules");
|
|
15
|
+
const frontend_ready_1 = require("../implementations/dms/frontend-ready");
|
|
16
|
+
const cache_1 = require("./cache");
|
|
17
|
+
const registry_1 = require("./registry");
|
|
18
|
+
const tarball_1 = require("./tarball");
|
|
19
|
+
exports.FRONTEND_PACKAGE = "@antelopejs/dms-frontend";
|
|
20
|
+
const LAYER_MANIFEST = "frontend-vue/package.json";
|
|
21
|
+
const PACKAGE_JSON = "package.json";
|
|
22
|
+
const HOUR_MS = 60 * 60 * 1000;
|
|
23
|
+
const FAILED_LOOKUP_MS = 5 * 60 * 1000;
|
|
24
|
+
const RELEASE_RANGE_LIFETIMES = { found: Infinity, failed: FAILED_LOOKUP_MS };
|
|
25
|
+
const VERSIONS_LIFETIMES = { found: HOUR_MS, failed: FAILED_LOOKUP_MS };
|
|
26
|
+
const releaseRanges = (0, cache_1.createLookupCache)(RELEASE_RANGE_LIFETIMES);
|
|
27
|
+
const publishedVersions = (0, cache_1.createLookupCache)(VERSIONS_LIFETIMES);
|
|
28
|
+
function readManifest(file) {
|
|
29
|
+
try {
|
|
30
|
+
return JSON.parse((0, node_fs_1.readFileSync)(file, "utf-8"));
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function engineRange(manifest) {
|
|
37
|
+
const range = manifest?.engines?.[exports.FRONTEND_PACKAGE];
|
|
38
|
+
return typeof range === "string" && (0, semver_1.validRange)(range) ? range : null;
|
|
39
|
+
}
|
|
40
|
+
function releaseFrontendRange(packageName, version, projectPath) {
|
|
41
|
+
return releaseRanges.get(`${packageName}@${version}`, async () => {
|
|
42
|
+
const files = await (0, tarball_1.readPublishedFiles)(packageName, version, projectPath, [
|
|
43
|
+
LAYER_MANIFEST,
|
|
44
|
+
]);
|
|
45
|
+
const manifest = files.get(LAYER_MANIFEST);
|
|
46
|
+
return manifest
|
|
47
|
+
? engineRange(JSON.parse(manifest))
|
|
48
|
+
: null;
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function runningFrontend(projectPath) {
|
|
52
|
+
const reported = (0, frontend_ready_1.getFrontendAcknowledgement)()?.version;
|
|
53
|
+
if (reported)
|
|
54
|
+
return { version: reported, source: "reported" };
|
|
55
|
+
const installed = readManifest(node_path_1.default.join(projectPath, "node_modules", exports.FRONTEND_PACKAGE, PACKAGE_JSON))?.version;
|
|
56
|
+
return installed ? { version: installed, source: "project" } : undefined;
|
|
57
|
+
}
|
|
58
|
+
function supportsFrontend(range, version) {
|
|
59
|
+
const line = (0, semver_1.coerce)(version)?.version ?? version;
|
|
60
|
+
return (0, semver_1.satisfies)(line, range);
|
|
61
|
+
}
|
|
62
|
+
function listPublishedVersions(projectPath) {
|
|
63
|
+
return publishedVersions.get(exports.FRONTEND_PACKAGE, async () => {
|
|
64
|
+
const versions = await (0, registry_1.npmView)(exports.FRONTEND_PACKAGE, ["versions"], projectPath);
|
|
65
|
+
return Array.isArray(versions) ? versions.map(String) : undefined;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function layersRefusing(version, replacedFolder) {
|
|
69
|
+
const isReplaced = (sourcePath) => replacedFolder !== undefined &&
|
|
70
|
+
!node_path_1.default.relative(replacedFolder, sourcePath).startsWith("..");
|
|
71
|
+
return (0, frontend_modules_1.GetFrontendModules)()
|
|
72
|
+
.filter((layer) => !isReplaced(layer.sourcePath))
|
|
73
|
+
.flatMap((layer) => {
|
|
74
|
+
const range = engineRange(readManifest(node_path_1.default.join(layer.sourcePath, PACKAGE_JSON)));
|
|
75
|
+
return range && !supportsFrontend(range, version)
|
|
76
|
+
? [{ name: layer.name, range }]
|
|
77
|
+
: [];
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
async function frontendRequirement(input) {
|
|
81
|
+
if (supportsFrontend(input.range, input.running))
|
|
82
|
+
return undefined;
|
|
83
|
+
const versions = (await listPublishedVersions(input.projectPath)) ?? [];
|
|
84
|
+
const target = (0, semver_1.maxSatisfying)(versions, input.range) ?? undefined;
|
|
85
|
+
return {
|
|
86
|
+
range: input.range,
|
|
87
|
+
running: input.running,
|
|
88
|
+
target,
|
|
89
|
+
command: target ? `pnpm add -D ${exports.FRONTEND_PACKAGE}@${target}` : undefined,
|
|
90
|
+
breaks: target ? layersRefusing(target, input.replacedFolder) : [],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=frontend-compatibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontend-compatibility.js","sourceRoot":"","sources":["../../src/store/frontend-compatib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CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC;IACxE,MAAM,MAAM,GAAG,IAAA,sBAAa,EAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC;IACjE,OAAO;QACL,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,MAAM;QACN,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,eAAe,wBAAgB,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,SAAS;QACzE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,EAAE;KACnE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { InterfaceImplementation, MissingInterface, PackageRelease, RuntimeModule } from "./types";
|
|
2
|
+
export declare function findImplementations(interfacePackage: string): Promise<InterfaceImplementation[]>;
|
|
3
|
+
export declare function implementedBy(localPath: string): Promise<string[]>;
|
|
4
|
+
export declare function implementedInterfaces(modules: readonly RuntimeModule[]): Promise<Set<string>>;
|
|
5
|
+
export declare function findMissingInterfaces(release: PackageRelease, implemented: ReadonlySet<string>, projectPath: string): Promise<MissingInterface[]>;
|
|
6
|
+
export declare function findDependents(module: RuntimeModule, running: readonly RuntimeModule[]): Promise<string[]>;
|