@cdmbase/wiki-browser 12.0.18-alpha.10
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/LICENSE +21 -0
- package/lib/components/Logo.d.ts +4 -0
- package/lib/components/Logo.d.ts.map +1 -0
- package/lib/components/Logo.js +16 -0
- package/lib/components/Logo.js.map +1 -0
- package/lib/components/help/SidebarSearch.d.ts +8 -0
- package/lib/components/help/SidebarSearch.d.ts.map +1 -0
- package/lib/components/help/SidebarSearch.js +111 -0
- package/lib/components/help/SidebarSearch.js.map +1 -0
- package/lib/components/help/index.d.ts +2 -0
- package/lib/components/help/index.d.ts.map +1 -0
- package/lib/components/landing/FeatureCard.d.ts +13 -0
- package/lib/components/landing/FeatureCard.d.ts.map +1 -0
- package/lib/components/landing/FeatureCard.js +85 -0
- package/lib/components/landing/FeatureCard.js.map +1 -0
- package/lib/components/landing/QuickLinkCard.d.ts +8 -0
- package/lib/components/landing/QuickLinkCard.d.ts.map +1 -0
- package/lib/components/landing/QuickLinkCard.js +26 -0
- package/lib/components/landing/QuickLinkCard.js.map +1 -0
- package/lib/components/landing/SearchInput.d.ts +10 -0
- package/lib/components/landing/SearchInput.d.ts.map +1 -0
- package/lib/components/landing/SearchInput.js +223 -0
- package/lib/components/landing/SearchInput.js.map +1 -0
- package/lib/components/landing/index.d.ts +4 -0
- package/lib/components/landing/index.d.ts.map +1 -0
- package/lib/components/welcome.d.ts +3 -0
- package/lib/components/welcome.d.ts.map +1 -0
- package/lib/compute.d.ts +4 -0
- package/lib/compute.d.ts.map +1 -0
- package/lib/compute.js +96 -0
- package/lib/compute.js.map +1 -0
- package/lib/config/env-config.d.ts +4 -0
- package/lib/config/env-config.d.ts.map +1 -0
- package/lib/config/env-config.js +7 -0
- package/lib/config/env-config.js.map +1 -0
- package/lib/docs.config.d.ts +48 -0
- package/lib/docs.config.d.ts.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/loaders/search.d.ts +1 -0
- package/lib/loaders/search.d.ts.map +1 -0
- package/lib/module.d.ts +4 -0
- package/lib/module.d.ts.map +1 -0
- package/lib/module.js +11 -0
- package/lib/module.js.map +1 -0
- package/lib/pages/ArticlePage/ArticlePage.d.ts +4 -0
- package/lib/pages/ArticlePage/ArticlePage.d.ts.map +1 -0
- package/lib/pages/ArticlePage/ArticlePage.js +222 -0
- package/lib/pages/ArticlePage/ArticlePage.js.map +1 -0
- package/lib/pages/ArticlePage/index.d.ts +3 -0
- package/lib/pages/ArticlePage/index.d.ts.map +1 -0
- package/lib/pages/ArticlePage/index.js +3 -0
- package/lib/pages/ArticlePage/index.js.map +1 -0
- package/lib/pages/CategoryCollection/CategoryCollection.d.ts +4 -0
- package/lib/pages/CategoryCollection/CategoryCollection.d.ts.map +1 -0
- package/lib/pages/CategoryCollection/CategoryCollection.js +103 -0
- package/lib/pages/CategoryCollection/CategoryCollection.js.map +1 -0
- package/lib/pages/CategoryCollection/index.d.ts +3 -0
- package/lib/pages/CategoryCollection/index.d.ts.map +1 -0
- package/lib/pages/CategoryCollection/index.js +3 -0
- package/lib/pages/CategoryCollection/index.js.map +1 -0
- package/lib/pages/Help/HelpIndex.d.ts +4 -0
- package/lib/pages/Help/HelpIndex.d.ts.map +1 -0
- package/lib/pages/Help/HelpIndex.js +44 -0
- package/lib/pages/Help/HelpIndex.js.map +1 -0
- package/lib/pages/Help/index.d.ts +4 -0
- package/lib/pages/Help/index.d.ts.map +1 -0
- package/lib/pages/Help/index.js +226 -0
- package/lib/pages/Help/index.js.map +1 -0
- package/lib/pages/Landing/index.d.ts +3 -0
- package/lib/pages/Landing/index.d.ts.map +1 -0
- package/lib/pages/Landing/index.js +281 -0
- package/lib/pages/Landing/index.js.map +1 -0
- package/lib/routes.json +2533 -0
- package/lib/seo.d.ts +22 -0
- package/lib/seo.d.ts.map +1 -0
- package/lib/slot-fill/FooterFill.d.ts +3 -0
- package/lib/slot-fill/FooterFill.d.ts.map +1 -0
- package/lib/slot-fill/FooterFill.js +18 -0
- package/lib/slot-fill/FooterFill.js.map +1 -0
- package/lib/slot-fill/LogoFill.d.ts +5 -0
- package/lib/slot-fill/LogoFill.d.ts.map +1 -0
- package/lib/slot-fill/LogoFill.js +74 -0
- package/lib/slot-fill/LogoFill.js.map +1 -0
- package/lib/slot-fill/consts.d.ts +5 -0
- package/lib/slot-fill/consts.d.ts.map +1 -0
- package/lib/slot-fill/consts.js +1 -0
- package/lib/slot-fill/consts.js.map +1 -0
- package/lib/slot-fill/index.d.ts +4 -0
- package/lib/slot-fill/index.d.ts.map +1 -0
- package/lib/templates/assets/images/add-link-frontend.png +0 -0
- package/lib/templates/assets/images/add-package-backend.png +0 -0
- package/lib/templates/assets/images/add-to-backend-module.png +0 -0
- package/lib/templates/assets/images/add-upload-client-frontend.png +0 -0
- package/lib/templates/assets/images/additional-parameters.png +0 -0
- package/lib/templates/assets/images/aeh-implementation.png +0 -0
- package/lib/templates/assets/images/aeh-usage.png +0 -0
- package/lib/templates/assets/images/apollo-client/recommendation_cache_mgmt.png +0 -0
- package/lib/templates/assets/images/app-deploy-new-version/jenkins1.PNG +0 -0
- package/lib/templates/assets/images/app-deploy-new-version/jenkins2.PNG +0 -0
- package/lib/templates/assets/images/auth-wrapper-code.png +0 -0
- package/lib/templates/assets/images/cdebase.png +0 -0
- package/lib/templates/assets/images/cdm-locales-directory.png +0 -0
- package/lib/templates/assets/images/client-settings.png +0 -0
- package/lib/templates/assets/images/codegen_file_update.png +0 -0
- package/lib/templates/assets/images/configuration.png +0 -0
- package/lib/templates/assets/images/copy-plugin.png +0 -0
- package/lib/templates/assets/images/docusaurus.png +0 -0
- package/lib/templates/assets/images/error-link.png +0 -0
- package/lib/templates/assets/images/error-sample.png +0 -0
- package/lib/templates/assets/images/extension copy.png +0 -0
- package/lib/templates/assets/images/extension.png +0 -0
- package/lib/templates/assets/images/graphql/graphql-folder-backend.png +0 -0
- package/lib/templates/assets/images/graphql/graphql-folder-with-gql.png +0 -0
- package/lib/templates/assets/images/i18n-config.png +0 -0
- package/lib/templates/assets/images/image.png +0 -0
- package/lib/templates/assets/images/logo.svg +10 -0
- package/lib/templates/assets/images/logo1.svg +1 -0
- package/lib/templates/assets/images/modify-upload-false-server.png +0 -0
- package/lib/templates/assets/images/navigation-auth-enabled.png +0 -0
- package/lib/templates/assets/images/org-dashboard-navigation.png +0 -0
- package/lib/templates/assets/images/org-navigation.png +0 -0
- package/lib/templates/assets/images/preferences_graphql_type.png +0 -0
- package/lib/templates/assets/images/provider.png +0 -0
- package/lib/templates/assets/images/route-config.png +0 -0
- package/lib/templates/assets/images/service-accounts.png +0 -0
- package/lib/templates/assets/images/source-code/source-code-environments.png +0 -0
- package/lib/templates/assets/images/source-code/source-code-organization.png +0 -0
- package/lib/templates/assets/images/spin-clone-develop-deployment/jenkins-changes.png +0 -0
- package/lib/templates/assets/images/spin-clone-develop-deployment/lerna-changes.png +0 -0
- package/lib/templates/assets/images/spin-clone-develop-deployment/root-package-json-changes.png +0 -0
- package/lib/templates/assets/images/spin-clone-develop-deployment/values-dev-changes.png +0 -0
- package/lib/templates/assets/images/sso-mappers.png +0 -0
- package/lib/templates/assets/images/sso-picture-mapper.png +0 -0
- package/lib/templates/assets/images/sso-settings.png +0 -0
- package/lib/templates/assets/images/timesheet_apollo_cache.png +0 -0
- package/lib/templates/assets/images/timesheet_query.png +0 -0
- package/lib/templates/assets/images/tutorial/docsVersionDropdown.png +0 -0
- package/lib/templates/assets/images/tutorial/localeDropdown.png +0 -0
- package/lib/templates/assets/images/unauthenticated.png +0 -0
- package/lib/templates/assets/images/undraw_docusaurus_mountain.svg +170 -0
- package/lib/templates/assets/images/undraw_docusaurus_react.svg +169 -0
- package/lib/templates/assets/images/undraw_docusaurus_tree.svg +1 -0
- package/lib/templates/assets/images/vite-plugin-config.png +0 -0
- package/lib/templates/content/docs/Generators/Project/generate-fullproject.md +12 -0
- package/lib/templates/content/docs/LLM/Logger.llm.md +194 -0
- package/lib/templates/content/docs/LLM/backend-proxies-services-llm.md +2687 -0
- package/lib/templates/content/docs/LLM/backend-service-llm.md +3384 -0
- package/lib/templates/content/docs/LLM/db_migration_llm.md +954 -0
- package/lib/templates/content/docs/LLM/frontend/REMIX-15.3-upgrade-llm.md +1245 -0
- package/lib/templates/content/docs/LLM/inngest/INNGEST_FUNCTION_DEVELOPMENT_GUIDE_LLM.md +1241 -0
- package/lib/templates/content/docs/LLM/inngest/INNGEST_NAMESPACE_LLM.md +384 -0
- package/lib/templates/content/docs/LLM/llm_workflow_namespace.md +384 -0
- package/lib/templates/content/docs/LLM/organization-components-form-llm.md +1395 -0
- package/lib/templates/content/docs/LLM/page-component-llm.md +173 -0
- package/lib/templates/content/docs/LLM/preferences-settings-llm.md +2781 -0
- package/lib/templates/content/docs/LLM/tailwind-css-llm.md +502 -0
- package/lib/templates/content/docs/UI/SchemaBasedUI.md +334 -0
- package/lib/templates/content/docs/UI/SlotFillComponent.md +334 -0
- package/lib/templates/content/docs/adminide-modules/account/auth0-login.md +31 -0
- package/lib/templates/content/docs/adminide-modules/account/index.md +14 -0
- package/lib/templates/content/docs/adminide-modules/account/keycloak-remix-setup.md +86 -0
- package/lib/templates/content/docs/adminide-modules/account/remix-auth-setup.md +79 -0
- package/lib/templates/content/docs/adminide-modules/account/various-auth-qatest.md +157 -0
- package/lib/templates/content/docs/adminide-modules/api-builders/graphql.md +906 -0
- package/lib/templates/content/docs/adminide-modules/billing/payments/index.md +14 -0
- package/lib/templates/content/docs/adminide-modules/billing/payments/stripe/index.md +14 -0
- package/lib/templates/content/docs/adminide-modules/billing/payments/stripe/settingup-stripe-locally.md +25 -0
- package/lib/templates/content/docs/adminide-modules/billing/tier-config.md +293 -0
- package/lib/templates/content/docs/adminide-modules/connectors/Connector.md +207 -0
- package/lib/templates/content/docs/adminide-modules/file-upload/index.md +16 -0
- package/lib/templates/content/docs/adminide-modules/file-upload/setup.md +435 -0
- package/lib/templates/content/docs/adminide-modules/file-upload/upload-file-using-signed-url.md +161 -0
- package/lib/templates/content/docs/adminide-modules/preferences/AddAdditionalPermissions.md +151 -0
- package/lib/templates/content/docs/adminide-modules/preferences/Configuration.md +241 -0
- package/lib/templates/content/docs/adminide-modules/preferences/Policy-Configuration.md +61 -0
- package/lib/templates/content/docs/adminide-modules/preferences/UI-components/ResourceSettingsLoader.md +319 -0
- package/lib/templates/content/docs/adminide-modules/preferences/contribute_scope_target.md +280 -0
- package/lib/templates/content/docs/adminide-modules/preferences/generate-urii.md +94 -0
- package/lib/templates/content/docs/adminide-modules/preferences/index.md +28 -0
- package/lib/templates/content/docs/adminide-modules/preferences/machine-configuration.md +157 -0
- package/lib/templates/content/docs/adminide-modules/preferences/pageSettings/generateCdecodeUri.md +1289 -0
- package/lib/templates/content/docs/adminide-modules/preferences/pageSettings/migratingFromUseSettings.md +215 -0
- package/lib/templates/content/docs/adminide-modules/preferences/permissions/Roles-Permissions.md +72 -0
- package/lib/templates/content/docs/adminide-modules/preferences/permissions/settingUserPermissions.md +139 -0
- package/lib/templates/content/docs/adminide-modules/preferences/preference-dependency.md +138 -0
- package/lib/templates/content/docs/adminide-modules/preferences/route-based-configuration.md +41 -0
- package/lib/templates/content/docs/adminide-modules/preferences/schema-configuration.md +71 -0
- package/lib/templates/content/docs/adminide-modules/preferences/supported.md +24 -0
- package/lib/templates/content/docs/adminide-modules/preferences/useSettingsLoader.md +248 -0
- package/lib/templates/content/docs/adminide-modules/project-tools/auth-providers.md +1317 -0
- package/lib/templates/content/docs/adminide-modules/project-tools/keycloak-guide.md +543 -0
- package/lib/templates/content/docs/adminide-modules/project-tools/tenant-management/tenant-based-authentication.md +846 -0
- package/lib/templates/content/docs/adminide-modules/project-tools/tenant-management/tenant-management.md +708 -0
- package/lib/templates/content/docs/adminide-modules/project-tools/tenant-management/tenants.md +1117 -0
- package/lib/templates/content/docs/chrome-extension/index.md +14 -0
- package/lib/templates/content/docs/chrome-extension/setup.md +30 -0
- package/lib/templates/content/docs/contributing/adding-package.md +23 -0
- package/lib/templates/content/docs/contributing/adding_new_modules.md +99 -0
- package/lib/templates/content/docs/contributing/architecture-updates.md +19 -0
- package/lib/templates/content/docs/contributing/avoid-using-promises-ui.md +116 -0
- package/lib/templates/content/docs/contributing/coding-guidelines.md +111 -0
- package/lib/templates/content/docs/contributing/do-and-dont.md +42 -0
- package/lib/templates/content/docs/contributing/faq.md +22 -0
- package/lib/templates/content/docs/contributing/folder-setup/browser.md +12 -0
- package/lib/templates/content/docs/contributing/folder-setup/config.md +12 -0
- package/lib/templates/content/docs/contributing/folder-setup/containers-server.md +12 -0
- package/lib/templates/content/docs/contributing/folder-setup/core.md +12 -0
- package/lib/templates/content/docs/contributing/folder-setup/graphql.md +12 -0
- package/lib/templates/content/docs/contributing/folder-setup/index.md +30 -0
- package/lib/templates/content/docs/contributing/folder-setup/module.md +12 -0
- package/lib/templates/content/docs/contributing/folder-setup/server.md +12 -0
- package/lib/templates/content/docs/contributing/folder-setup/services.md +12 -0
- package/lib/templates/content/docs/contributing/folder-setup/store.md +12 -0
- package/lib/templates/content/docs/contributing/frontend-coding.md +30 -0
- package/lib/templates/content/docs/contributing/git-subtree-sharing.md +73 -0
- package/lib/templates/content/docs/contributing/graphql-subscriptions.md +69 -0
- package/lib/templates/content/docs/contributing/how-to-contribute.md +30 -0
- package/lib/templates/content/docs/contributing/how_to_check_pure_esm.md +29 -0
- package/lib/templates/content/docs/contributing/index.md +60 -0
- package/lib/templates/content/docs/contributing/installation-issues.md +23 -0
- package/lib/templates/content/docs/contributing/keyboard-shortcut.md +131 -0
- package/lib/templates/content/docs/contributing/language/locale-support.md +12 -0
- package/lib/templates/content/docs/contributing/lerna-build-tools.md +516 -0
- package/lib/templates/content/docs/contributing/lerna-yarn-workspaces.md +95 -0
- package/lib/templates/content/docs/contributing/lint-and-formatter.md +20 -0
- package/lib/templates/content/docs/contributing/mobile-setup.md +16 -0
- package/lib/templates/content/docs/contributing/project-setup.md +233 -0
- package/lib/templates/content/docs/contributing/react/index.md +14 -0
- package/lib/templates/content/docs/contributing/react/lazy-component.md +70 -0
- package/lib/templates/content/docs/contributing/run-various-options.md +124 -0
- package/lib/templates/content/docs/contributing/schema-first-graphql-types.md +37 -0
- package/lib/templates/content/docs/contributing/source-code-organization.md +57 -0
- package/lib/templates/content/docs/contributing/staging-docker.md +88 -0
- package/lib/templates/content/docs/contributing/third-party/apollo-client-v3-tutorials.md +28 -0
- package/lib/templates/content/docs/contributing/third-party/index.md +18 -0
- package/lib/templates/content/docs/contributing/typescript-contribution.md +16 -0
- package/lib/templates/content/docs/devops/app-deploy-new-version.md +30 -0
- package/lib/templates/content/docs/devops/index.md +14 -0
- package/lib/templates/content/docs/devops/mobile-jenkins-build.md +40 -0
- package/lib/templates/content/docs/devops/versioning-the-project.md +128 -0
- package/lib/templates/content/docs/error-handler/application-error-handler.md +40 -0
- package/lib/templates/content/docs/error-handler/error-handling.md +26 -0
- package/lib/templates/content/docs/error-handler/index.md +16 -0
- package/lib/templates/content/docs/error-handler/logging-errors.md +14 -0
- package/lib/templates/content/docs/feature-api/copy-operation.md +427 -0
- package/lib/templates/content/docs/feature-api/feature-browser/assets.md +46 -0
- package/lib/templates/content/docs/feature-api/feature-browser/auth-permissions.md +12 -0
- package/lib/templates/content/docs/feature-api/feature-browser/feature.md +131 -0
- package/lib/templates/content/docs/feature-api/feature-browser/index.md +22 -0
- package/lib/templates/content/docs/feature-api/feature-browser/routes-menu.md +110 -0
- package/lib/templates/content/docs/feature-api/feature-browser/routing-convention.md +124 -0
- package/lib/templates/content/docs/feature-api/feature-browser/routing.md +338 -0
- package/lib/templates/content/docs/feature-api/feature-mobile/auth-permissions.md +20 -0
- package/lib/templates/content/docs/feature-api/feature-mobile/feature.md +130 -0
- package/lib/templates/content/docs/feature-api/feature-mobile/index.md +18 -0
- package/lib/templates/content/docs/feature-api/feature-mobile/navigation.md +187 -0
- package/lib/templates/content/docs/feature-api/feature-server/Scheduling.md +44 -0
- package/lib/templates/content/docs/feature-api/feature-server/dataloader.md +320 -0
- package/lib/templates/content/docs/feature-api/feature-server/dependency-injection.md +81 -0
- package/lib/templates/content/docs/feature-api/feature-server/feature.md +65 -0
- package/lib/templates/content/docs/feature-api/feature-server/generic-dataloader.md +135 -0
- package/lib/templates/content/docs/feature-api/feature-server/index.md +40 -0
- package/lib/templates/content/docs/feature-api/feature-server/migration.md +127 -0
- package/lib/templates/content/docs/feature-api/feature-server/mongo-model.md +72 -0
- package/lib/templates/content/docs/feature-api/feature-server/permissions.md +12 -0
- package/lib/templates/content/docs/feature-api/feature-server/policies.md +57 -0
- package/lib/templates/content/docs/feature-api/feature-server/preferences.md +57 -0
- package/lib/templates/content/docs/feature-api/feature-server/repositories.md +114 -0
- package/lib/templates/content/docs/feature-api/feature-server/resolvers.md +126 -0
- package/lib/templates/content/docs/feature-api/feature-server/rules.md +132 -0
- package/lib/templates/content/docs/feature-api/feature-server/schema.md +12 -0
- package/lib/templates/content/docs/feature-api/feature-server/services.md +102 -0
- package/lib/templates/content/docs/feature-api/feature-server/setup-resource-crud.md +359 -0
- package/lib/templates/content/docs/feature-api/index.md +18 -0
- package/lib/templates/content/docs/graphql/apolloClient-mutation.md +94 -0
- package/lib/templates/content/docs/graphql/index.md +14 -0
- package/lib/templates/content/docs/graphql/scalars.md +15 -0
- package/lib/templates/content/docs/help/index.md +14 -0
- package/lib/templates/content/docs/help/intro.md +16 -0
- package/lib/templates/content/docs/intl/ant-design-menu-translation.md +74 -0
- package/lib/templates/content/docs/intl/intl-namespace.md +129 -0
- package/lib/templates/content/docs/intl/vite-plugin-intl.md +87 -0
- package/lib/templates/content/docs/intl/webpack-plugin-intl.md +12 -0
- package/lib/templates/content/docs/intro.md +18 -0
- package/lib/templates/content/docs/knowledge/basic-fullstack.md +238 -0
- package/lib/templates/content/docs/mailing/index.md +14 -0
- package/lib/templates/content/docs/mailing/mailing-template.md +148 -0
- package/lib/templates/content/docs/mobile/App-navigation-generator.md +410 -0
- package/lib/templates/content/docs/mobile/MobileTestCases.md +264 -0
- package/lib/templates/content/docs/mobile/eas-profile-build.md +107 -0
- package/lib/templates/content/docs/mobile/expo-push-notification-setup.md +216 -0
- package/lib/templates/content/docs/mobile/index.md +14 -0
- package/lib/templates/content/docs/mobile/routes.md +83 -0
- package/lib/templates/content/docs/organization/adding-account-context.md +116 -0
- package/lib/templates/content/docs/organization/adding-org-mobile-navigation.md +22 -0
- package/lib/templates/content/docs/organization/adding-org-web-navigation.md +12 -0
- package/lib/templates/content/docs/organization/index.md +20 -0
- package/lib/templates/content/docs/organization/initialization.md +20 -0
- package/lib/templates/content/docs/organization/organization-resource-vs-resource.md +112 -0
- package/lib/templates/content/docs/remix/configuration/component-structure-best-practices.md +152 -0
- package/lib/templates/content/docs/remix/configuration/configurations.md +218 -0
- package/lib/templates/content/docs/remix/configuration/css-import-and-stylesheets.md +142 -0
- package/lib/templates/content/docs/remix/configuration/dont-subcomponent-network.md +166 -0
- package/lib/templates/content/docs/remix/configuration/generated-data-loaders.md +122 -0
- package/lib/templates/content/docs/remix/configuration/generated-resource-loaders.md +257 -0
- package/lib/templates/content/docs/remix/configuration/query-params-generator.md +216 -0
- package/lib/templates/content/docs/remix/configuration/routes-extra-icons.md +103 -0
- package/lib/templates/content/docs/remix/configuration/routes-json-advanced.md +86 -0
- package/lib/templates/content/docs/remix/configuration/routes-json-auth.md +113 -0
- package/lib/templates/content/docs/remix/configuration/routes-json-best-practices.md +55 -0
- package/lib/templates/content/docs/remix/configuration/routes-json-fields.md +79 -0
- package/lib/templates/content/docs/remix/configuration/routes-json-graphql.md +79 -0
- package/lib/templates/content/docs/remix/configuration/routes-json-index.md +112 -0
- package/lib/templates/content/docs/remix/configuration/routes-json-loaders.md +165 -0
- package/lib/templates/content/docs/remix/configuration/routes-json-middleware.md +196 -0
- package/lib/templates/content/docs/remix/configuration/routes-json-overview.md +53 -0
- package/lib/templates/content/docs/remix/data-loaders.md +43 -0
- package/lib/templates/content/docs/remix/devtools/remix-devtools.md +58 -0
- package/lib/templates/content/docs/remix/examples/changes-using-servercode.md +79 -0
- package/lib/templates/content/docs/remix/extra-icons.md +62 -0
- package/lib/templates/content/docs/remix/extra-links.md +65 -0
- package/lib/templates/content/docs/remix/generated-data-loaders.md +114 -0
- package/lib/templates/content/docs/remix/queryParamsGenerator.md +89 -0
- package/lib/templates/content/docs/remix/resources.md +16 -0
- package/lib/templates/content/docs/remix/styles.md +132 -0
- package/lib/templates/content/docs/remix/wiki.md +12 -0
- package/lib/templates/content/docs/security/auth-wrapper/auth-wrapper.md +24 -0
- package/lib/templates/content/docs/security/index.md +18 -0
- package/lib/templates/content/docs/security/secure-button-mobilenative.md +88 -0
- package/lib/templates/content/docs/security/secure-button-web.md +89 -0
- package/lib/templates/content/docs/server-side/account-customization.md +82 -0
- package/lib/templates/content/docs/server-side/apollo/caching.md +164 -0
- package/lib/templates/content/docs/server-side/backend-architecture/FINAL-DECISION.md +209 -0
- package/lib/templates/content/docs/server-side/backend-architecture/TRUE-FINAL-ARCHITECTURE.md +603 -0
- package/lib/templates/content/docs/server-side/backend-architecture/index1.md +0 -0
- package/lib/templates/content/docs/server-side/backend-coding.md +839 -0
- package/lib/templates/content/docs/server-side/e2b/manageing-template.md +197 -0
- package/lib/templates/content/docs/server-side/index.md +14 -0
- package/lib/templates/content/docs/server-side/inngest-functions-module.md +309 -0
- package/lib/templates/content/docs/server-side/listen-stripe-events.md +43 -0
- package/lib/templates/content/docs/server-side/slug-service.md +323 -0
- package/lib/templates/content/docs/tests/index.md +18 -0
- package/lib/templates/content/docs/tests/jest-test-debug-vscode.md +40 -0
- package/lib/templates/content/docs/tests/known-errors.md +116 -0
- package/lib/templates/content/docs/tests/service-test-template.md +118 -0
- package/lib/templates/content/docs/tests/test-setup.md +93 -0
- package/lib/templates/content/docs/xstate.md +23 -0
- package/lib/types.d.ts +37 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/utils/docsNavigation.d.ts +9 -0
- package/lib/utils/docsNavigation.d.ts.map +1 -0
- package/lib/utils/docsNavigation.js +37 -0
- package/lib/utils/docsNavigation.js.map +1 -0
- package/lib/utils/helpCenterUtils.d.ts +26 -0
- package/lib/utils/helpCenterUtils.d.ts.map +1 -0
- package/lib/utils/index.d.ts +3 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +3 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/markdownLoader.d.ts +36 -0
- package/lib/utils/markdownLoader.d.ts.map +1 -0
- package/lib/utils/markdownLoader.js +2242 -0
- package/lib/utils/markdownLoader.js.map +1 -0
- package/package.json +71 -0
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
# ResourceSettingsLoader Usage Guide
|
|
2
|
+
|
|
3
|
+
This guide explains how to use `ResourceSettingsLoader` component, which leverages `useSettingsLoader` hook to fetch configuration data from Remix loaders.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
`ResourceSettingsLoader` is a component that displays and manages settings/configuration data. Unlike `ResourceSettings` which requires you to pass the `input` (preferencesInput) prop directly, `ResourceSettingsLoader` automatically retrieves the configuration and preferencesInput from the Remix loader data based on the `schemaId` you provide.
|
|
8
|
+
|
|
9
|
+
## Key Differences: ResourceSettings vs ResourceSettingsLoader
|
|
10
|
+
|
|
11
|
+
| Feature | ResourceSettings | ResourceSettingsLoader |
|
|
12
|
+
| ---------------- | ------------------------------------- | -------------------------------------------------- |
|
|
13
|
+
| Data Source | Direct Apollo query via `useSettings` | Remix loader data via `useSettingsLoader` |
|
|
14
|
+
| Input Prop | Required - must pass `input` prop | Optional - auto-resolves from loader by `schemaId` |
|
|
15
|
+
| Network Requests | Makes GraphQL query on mount | Uses SSR-loaded data, no extra requests |
|
|
16
|
+
| Configuration | Fetches on client | Pre-fetched during SSR/navigation |
|
|
17
|
+
|
|
18
|
+
## Prerequisites: Route Configuration with extraParams
|
|
19
|
+
|
|
20
|
+
For `ResourceSettingsLoader` to work correctly, your route configuration must include `extraParams.resourceParams` with the appropriate `schemaId`. This tells the middleware which configurations to pre-fetch during SSR.
|
|
21
|
+
|
|
22
|
+
### Example Route Configuration
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
// In your route module (e.g., compute.ts)
|
|
26
|
+
import { ConfigCollectionName, ConfigFragmentName, ContributionSchemaId } from 'common';
|
|
27
|
+
|
|
28
|
+
export const routes: IRouteModule[] = [
|
|
29
|
+
{
|
|
30
|
+
name: 'menu.policy',
|
|
31
|
+
key: 'pref-policy-view',
|
|
32
|
+
tab: 'Policy View',
|
|
33
|
+
path: '/org/:orgName/preferences/policies',
|
|
34
|
+
auth: true,
|
|
35
|
+
authority: [PreDefineAccountPermissions.editPolicies],
|
|
36
|
+
component: () => import('./policies/OrganizationPolicies'),
|
|
37
|
+
// IMPORTANT: extraParams tells the middleware what to pre-fetch
|
|
38
|
+
extraParams: {
|
|
39
|
+
resourceParams: [
|
|
40
|
+
// First: Default configuration schema (optional but recommended)
|
|
41
|
+
{
|
|
42
|
+
fragment: ConfigFragmentName.Settings,
|
|
43
|
+
query: { name: '$params.orgName' },
|
|
44
|
+
path: ConfigCollectionName.Organizations,
|
|
45
|
+
resourceType: ConfigCollectionName.Organizations,
|
|
46
|
+
resourceId: 'name:$params.orgName',
|
|
47
|
+
organization: '$params.orgName',
|
|
48
|
+
options: {
|
|
49
|
+
configKey: '',
|
|
50
|
+
schemaId: ContributionSchemaId.Configuration,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
// Second: Policy schema (the one we want to display)
|
|
54
|
+
{
|
|
55
|
+
fragment: ConfigFragmentName.Policies,
|
|
56
|
+
query: { name: '$params.orgName' },
|
|
57
|
+
path: ConfigCollectionName.Organizations,
|
|
58
|
+
resourceType: ConfigCollectionName.Organizations,
|
|
59
|
+
resourceId: 'name:$params.orgName',
|
|
60
|
+
organization: '$params.orgName',
|
|
61
|
+
options: {
|
|
62
|
+
configKey: '',
|
|
63
|
+
schemaId: ContributionSchemaId.Policy, // <-- This schema will be available
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
];
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Key Points for Route Configuration
|
|
73
|
+
|
|
74
|
+
1. **`$params.orgName`**: Use `$params.xxx` placeholders to reference URL parameters. These are resolved by the middleware.
|
|
75
|
+
|
|
76
|
+
2. **Multiple resourceParams**: You can specify multiple schemas. Each will be fetched and stored in:
|
|
77
|
+
- `configurationsBySchemaId[schemaId]` - the configuration data
|
|
78
|
+
- `preferencesInputBySchemaId[schemaId]` - the input needed for mutations
|
|
79
|
+
|
|
80
|
+
3. **schemaId in options**: The `options.schemaId` determines which schema bucket the data goes into.
|
|
81
|
+
|
|
82
|
+
## Using ResourceSettingsLoader Component
|
|
83
|
+
|
|
84
|
+
### Basic Usage
|
|
85
|
+
|
|
86
|
+
```tsx
|
|
87
|
+
import { ResourceSettingsLoader } from '@adminide-stack/platform-browser/lib/tailwind-module/components/SettingsEditor/ResourceSettingsLoader.js';
|
|
88
|
+
import { ConfigurationTarget, ContributionSchemaId } from 'common';
|
|
89
|
+
|
|
90
|
+
export default function OrganizationPolicies() {
|
|
91
|
+
return (
|
|
92
|
+
<ResourceSettingsLoader
|
|
93
|
+
target={ConfigurationTarget.ORGANIZATION}
|
|
94
|
+
preferences={preferences} // Array of IContributionSettings (schema definitions)
|
|
95
|
+
schemaId={ContributionSchemaId.Policy} // Must match the schemaId in route extraParams
|
|
96
|
+
showSidebar={true}
|
|
97
|
+
hasPermission={true}
|
|
98
|
+
/>
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### With Suspense and Loader Data (Recommended Pattern)
|
|
104
|
+
|
|
105
|
+
```tsx
|
|
106
|
+
import * as React from 'react';
|
|
107
|
+
import { Await, useLoaderData } from '@remix-run/react';
|
|
108
|
+
import { ResourceSettingsLoader } from '@adminide-stack/platform-browser/lib/tailwind-module/components/SettingsEditor/ResourceSettingsLoader.js';
|
|
109
|
+
import { ConfigurationTarget, ContributionSchemaId } from 'common';
|
|
110
|
+
|
|
111
|
+
export default function OrganizationPolicies() {
|
|
112
|
+
const loaderData = useLoaderData();
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<div className="themed-card shadow-themed-sm">
|
|
116
|
+
<React.Suspense fallback={<LoadingSpinner />}>
|
|
117
|
+
<Await resolve={loaderData.defaultResolveSettingsQuery}>
|
|
118
|
+
{(data) => (
|
|
119
|
+
<WithPermissionByLoader
|
|
120
|
+
permissionKeys={[PreDefineAccountPermissions.editPolicies]}
|
|
121
|
+
render={({ hasPermission }) => (
|
|
122
|
+
<ResourceSettingsLoader
|
|
123
|
+
target={ConfigurationTarget.ORGANIZATION}
|
|
124
|
+
preferences={data.data.resolveSettings || []}
|
|
125
|
+
schemaId={ContributionSchemaId.Policy}
|
|
126
|
+
showSidebar={true}
|
|
127
|
+
hasPermission={hasPermission}
|
|
128
|
+
/>
|
|
129
|
+
)}
|
|
130
|
+
/>
|
|
131
|
+
)}
|
|
132
|
+
</Await>
|
|
133
|
+
</React.Suspense>
|
|
134
|
+
</div>
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Props Reference
|
|
140
|
+
|
|
141
|
+
| Prop | Type | Required | Default | Description |
|
|
142
|
+
| -------------------- | ------------------------- | -------- | ------------ | -------------------------------------------------------------------- |
|
|
143
|
+
| `target` | `ConfigurationTarget` | Yes | - | Where to save settings (ORGANIZATION, USER, etc.) |
|
|
144
|
+
| `preferences` | `IContributionSettings[]` | Yes | - | Schema definitions for the settings UI |
|
|
145
|
+
| `schemaId` | `string` | No | - | Schema ID to fetch from loader (e.g., `ContributionSchemaId.Policy`) |
|
|
146
|
+
| `showSidebar` | `boolean` | Yes | - | Whether to show the settings sidebar |
|
|
147
|
+
| `hasPermission` | `boolean` | No | - | Whether user can edit settings |
|
|
148
|
+
| `input` | `IPreferencesInputInput` | No | - | Override preferencesInput (auto-resolved if not provided) |
|
|
149
|
+
| `configKey` | `string` | No | `''` | Specific config key to fetch |
|
|
150
|
+
| `resourceUri` | `any` | No | - | Specific resource URI to query |
|
|
151
|
+
| `includeMarketplace` | `boolean` | No | `false` | Include marketplace configurations |
|
|
152
|
+
| `type` | `string` | No | `'settings'` | Type of settings fragment |
|
|
153
|
+
|
|
154
|
+
## How It Works
|
|
155
|
+
|
|
156
|
+
### Data Flow
|
|
157
|
+
|
|
158
|
+
```
|
|
159
|
+
1. Route Navigation
|
|
160
|
+
↓
|
|
161
|
+
2. Middleware reads extraParams.resourceParams
|
|
162
|
+
↓
|
|
163
|
+
3. configurationLoader fetches data for each schemaId
|
|
164
|
+
↓
|
|
165
|
+
4. Data stored in loader response:
|
|
166
|
+
- configurations (primary)
|
|
167
|
+
- configurationsBySchemaId[schemaId]
|
|
168
|
+
- preferencesInputBySchemaId[schemaId]
|
|
169
|
+
↓
|
|
170
|
+
5. ResourceSettingsLoader uses useSettingsLoader hook
|
|
171
|
+
↓
|
|
172
|
+
6. useSettingsLoader reads from loader data by schemaId
|
|
173
|
+
↓
|
|
174
|
+
7. Component renders with pre-fetched data
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### useSettingsLoader Hook (Internal)
|
|
178
|
+
|
|
179
|
+
The `ResourceSettingsLoader` internally uses `useSettingsLoader`:
|
|
180
|
+
|
|
181
|
+
```typescript
|
|
182
|
+
const {
|
|
183
|
+
updateConfiguration,
|
|
184
|
+
data: configData,
|
|
185
|
+
loading,
|
|
186
|
+
preferencesInput,
|
|
187
|
+
} = useSettingsLoader({
|
|
188
|
+
configKey: '',
|
|
189
|
+
schemaId: ContributionSchemaId.Policy, // Reads from configurationsBySchemaId['policy']
|
|
190
|
+
resourceUri: undefined,
|
|
191
|
+
includeMarketplace: false,
|
|
192
|
+
});
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The hook:
|
|
196
|
+
|
|
197
|
+
1. Reads `useLoaderData()` from Remix
|
|
198
|
+
2. If `schemaId` is provided, looks in `configurationsBySchemaId[schemaId]`
|
|
199
|
+
3. Also retrieves `preferencesInputBySchemaId[schemaId]` for mutations
|
|
200
|
+
4. Returns data without making additional network requests
|
|
201
|
+
|
|
202
|
+
## Available Schema IDs
|
|
203
|
+
|
|
204
|
+
```typescript
|
|
205
|
+
export const enum ContributionSchemaId {
|
|
206
|
+
Configuration = 'configuration', // Default settings
|
|
207
|
+
Policy = 'policy', // Organization policies
|
|
208
|
+
Permission = 'permission', // Permissions
|
|
209
|
+
UiLayout = 'uiLayout', // UI layout configurations
|
|
210
|
+
// ... add more as needed
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Common Patterns
|
|
215
|
+
|
|
216
|
+
### Pattern 1: Single Schema (e.g., Policies Only)
|
|
217
|
+
|
|
218
|
+
```typescript
|
|
219
|
+
// Route config
|
|
220
|
+
extraParams: {
|
|
221
|
+
resourceParams: {
|
|
222
|
+
fragment: ConfigFragmentName.Policies,
|
|
223
|
+
options: { schemaId: ContributionSchemaId.Policy },
|
|
224
|
+
// ... other params
|
|
225
|
+
},
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Component
|
|
229
|
+
<ResourceSettingsLoader
|
|
230
|
+
schemaId={ContributionSchemaId.Policy}
|
|
231
|
+
// ...
|
|
232
|
+
/>
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Pattern 2: Multiple Schemas (e.g., Settings + UiLayout)
|
|
236
|
+
|
|
237
|
+
```typescript
|
|
238
|
+
// Route config
|
|
239
|
+
extraParams: {
|
|
240
|
+
resourceParams: [
|
|
241
|
+
{
|
|
242
|
+
fragment: ConfigFragmentName.Settings,
|
|
243
|
+
options: { schemaId: ContributionSchemaId.Configuration },
|
|
244
|
+
// ...
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
fragment: ConfigFragmentName.UiSettings,
|
|
248
|
+
options: { schemaId: ContributionSchemaId.UiLayout },
|
|
249
|
+
// ...
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
// Component - use the schema you need
|
|
255
|
+
<ResourceSettingsLoader
|
|
256
|
+
schemaId={ContributionSchemaId.UiLayout}
|
|
257
|
+
// ...
|
|
258
|
+
/>
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Pattern 3: Fallback to Default Configuration
|
|
262
|
+
|
|
263
|
+
If you don't provide a `schemaId`, the component uses the primary `configurations` from the loader:
|
|
264
|
+
|
|
265
|
+
```typescript
|
|
266
|
+
<ResourceSettingsLoader
|
|
267
|
+
target={ConfigurationTarget.ORGANIZATION}
|
|
268
|
+
preferences={preferences}
|
|
269
|
+
showSidebar={true}
|
|
270
|
+
// No schemaId - uses default configurations
|
|
271
|
+
/>
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Troubleshooting
|
|
275
|
+
|
|
276
|
+
### Configuration data is empty
|
|
277
|
+
|
|
278
|
+
1. **Check route extraParams**: Ensure your route has `extraParams.resourceParams` with the correct `schemaId`
|
|
279
|
+
2. **Verify $params placeholders**: Make sure placeholders like `$params.orgName` match your URL parameters
|
|
280
|
+
3. **Check middleware order**: Ensure `configurationMiddleware` runs after `lifecycleMiddleware`
|
|
281
|
+
|
|
282
|
+
### preferencesInput is undefined
|
|
283
|
+
|
|
284
|
+
1. **Check schemaId match**: The `schemaId` prop must match the `options.schemaId` in route config
|
|
285
|
+
2. **Verify loader data**: Check browser DevTools → Network → loader response
|
|
286
|
+
|
|
287
|
+
### Settings not saving
|
|
288
|
+
|
|
289
|
+
1. **Check target**: Ensure `target` prop matches your expected save location
|
|
290
|
+
2. **Verify permissions**: Check that `hasPermission` is true
|
|
291
|
+
3. **Check preferencesInput.editableSettingsInput**: This is used for the mutation
|
|
292
|
+
|
|
293
|
+
## Migration from ResourceSettings
|
|
294
|
+
|
|
295
|
+
Before (ResourceSettings):
|
|
296
|
+
|
|
297
|
+
```tsx
|
|
298
|
+
<ResourceSettings
|
|
299
|
+
target={ConfigurationTarget.ORGANIZATION}
|
|
300
|
+
preferences={preferences}
|
|
301
|
+
input={loaderData.dataContext?.preferencesInputBySchemaId[ContributionSchemaId.Policy]}
|
|
302
|
+
showSidebar={true}
|
|
303
|
+
hasPermission={hasPermission}
|
|
304
|
+
/>
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
After (ResourceSettingsLoader):
|
|
308
|
+
|
|
309
|
+
```tsx
|
|
310
|
+
<ResourceSettingsLoader
|
|
311
|
+
target={ConfigurationTarget.ORGANIZATION}
|
|
312
|
+
preferences={preferences}
|
|
313
|
+
schemaId={ContributionSchemaId.Policy} // Auto-resolves input
|
|
314
|
+
showSidebar={true}
|
|
315
|
+
hasPermission={hasPermission}
|
|
316
|
+
/>
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
The key change: Replace `input` prop with `schemaId` prop. The component handles the rest.
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
# Configuration Scope and Target Documentation
|
|
2
|
+
|
|
3
|
+
This document explains how `ConfigurationScope` and `ConfigurationTarget` work in the configuration system, and how they interact to determine which settings are available at different levels of the application hierarchy.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The configuration system uses two related but distinct concepts:
|
|
8
|
+
|
|
9
|
+
1. **ConfigurationScope** - Defines _where_ a configuration property can be set (its "settability")
|
|
10
|
+
2. **ConfigurationTarget** - Defines _which_ configuration file/level is being read from or written to
|
|
11
|
+
|
|
12
|
+
## ConfigurationScope
|
|
13
|
+
|
|
14
|
+
`ConfigurationScope` is assigned to each configuration property when it's defined. It determines at which levels that property can be configured.
|
|
15
|
+
|
|
16
|
+
### Scope Values
|
|
17
|
+
|
|
18
|
+
| Scope | Value | Description |
|
|
19
|
+
| ---------------------- | ----- | --------------------------------------------------------------------------------------------------------- |
|
|
20
|
+
| `APPLICATION` | 1 | Application-specific configuration. Can only be configured in local user settings. |
|
|
21
|
+
| `MACHINE` | 2 | Machine-specific configuration. Can only be configured in local and remote user settings. |
|
|
22
|
+
| `WINDOW` | 3 | Window-specific configuration. Can be configured in user or organization settings. |
|
|
23
|
+
| `RESOURCE` | 4 | Resource-specific configuration. Can be configured in user, organization, or resource/workspace settings. |
|
|
24
|
+
| `RESOURCE_OVERRIDABLE` | 5 | Resource-specific configuration that can be overridden at multiple levels. |
|
|
25
|
+
| `MACHINE_OVERRIDABLE` | 6 | Machine-specific configuration that can also be overridden. |
|
|
26
|
+
|
|
27
|
+
### Scope Hierarchy
|
|
28
|
+
|
|
29
|
+
Scopes follow an inheritance pattern where higher-level scopes can cascade down:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
APPLICATION (1)
|
|
33
|
+
↓
|
|
34
|
+
MACHINE (2)
|
|
35
|
+
↓
|
|
36
|
+
WINDOW (3) ← Most common for organization-level settings
|
|
37
|
+
↓
|
|
38
|
+
RESOURCE (4) ← Most specific, can be set at resource/workspace level
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Scope Collections
|
|
42
|
+
|
|
43
|
+
The system defines pre-built scope collections for common use cases:
|
|
44
|
+
|
|
45
|
+
```typescript
|
|
46
|
+
// User-level scopes
|
|
47
|
+
USER_SCOPES = [APPLICATION];
|
|
48
|
+
|
|
49
|
+
// Local machine scopes
|
|
50
|
+
LOCAL_MACHINE_SCOPES = [APPLICATION, WINDOW, RESOURCE];
|
|
51
|
+
|
|
52
|
+
// Remote machine scopes
|
|
53
|
+
REMOTE_MACHINE_SCOPES = [MACHINE, WINDOW, RESOURCE];
|
|
54
|
+
|
|
55
|
+
// Organization-level scopes
|
|
56
|
+
ORGANIZATION_SCOPES = [WINDOW, RESOURCE];
|
|
57
|
+
|
|
58
|
+
// Resource-level scopes
|
|
59
|
+
RESOURCE_SCOPES = [RESOURCE];
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## ConfigurationTarget
|
|
63
|
+
|
|
64
|
+
`ConfigurationTarget` specifies which configuration file or level is being accessed when reading or writing configuration values.
|
|
65
|
+
|
|
66
|
+
### Target Values
|
|
67
|
+
|
|
68
|
+
| Target | Value | Description |
|
|
69
|
+
| ----------------------- | ----- | --------------------------------------------------------------- |
|
|
70
|
+
| `USER` | 1 | User/application configuration file |
|
|
71
|
+
| `APPLICATION` | 2 | Application configuration file |
|
|
72
|
+
| `MACHINE` | 3 | Machine configuration file (requires machine context) |
|
|
73
|
+
| `ORGANIZATION` | 4 | Organization configuration file (requires organization context) |
|
|
74
|
+
| `ORGANIZATION_RESOURCE` | 5 | Resource configuration within an organization |
|
|
75
|
+
| `DEFAULT` | 6 | Default configuration (system defaults) |
|
|
76
|
+
| `MEMORY` | 7 | In-memory configuration (not persisted) |
|
|
77
|
+
| `RESOURCE_OVERRIDABLE` | 8 | Resource configuration that can be overridden |
|
|
78
|
+
| `MACHINE_OVERRIDABLE` | 9 | Machine configuration that can be overridden |
|
|
79
|
+
|
|
80
|
+
## Target-to-Scope Mapping
|
|
81
|
+
|
|
82
|
+
When querying configurations for a specific target, only properties with matching scopes are returned. This mapping is defined in `getScopesForTarget()`:
|
|
83
|
+
|
|
84
|
+
| Target | Allowed Scopes | Description |
|
|
85
|
+
| ---------------------------------------------- | ------------------------------------------ | ------------------------------------------ |
|
|
86
|
+
| `USER` | `[APPLICATION]` | Only application-scoped properties |
|
|
87
|
+
| `APPLICATION` | `[APPLICATION, WINDOW, RESOURCE]` | All local-configurable properties |
|
|
88
|
+
| `MACHINE` | `[MACHINE, WINDOW, RESOURCE]` | Machine and lower-level properties |
|
|
89
|
+
| `ORGANIZATION` | `[WINDOW, RESOURCE]` | Organization-level and resource properties |
|
|
90
|
+
| `ORGANIZATION_RESOURCE` | `[RESOURCE]` | Only resource-scoped properties |
|
|
91
|
+
| `DEFAULT` / `MEMORY` | `[APPLICATION, MACHINE, WINDOW, RESOURCE]` | All scopes (complete view) |
|
|
92
|
+
| `RESOURCE_OVERRIDABLE` / `MACHINE_OVERRIDABLE` | `[MACHINE, WINDOW, RESOURCE]` | Overridable properties |
|
|
93
|
+
|
|
94
|
+
## How Scope Filtering Works
|
|
95
|
+
|
|
96
|
+
### Example: Defining a Configuration Property
|
|
97
|
+
|
|
98
|
+
When defining a configuration property in a contribution file:
|
|
99
|
+
|
|
100
|
+
```typescript
|
|
101
|
+
// This property can be set at organization level or resource level
|
|
102
|
+
{
|
|
103
|
+
'myExtension.featureEnabled': {
|
|
104
|
+
type: 'boolean',
|
|
105
|
+
default: true,
|
|
106
|
+
scope: ConfigurationScope.WINDOW, // ← Settable at WINDOW level and above
|
|
107
|
+
description: 'Enable my feature'
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// This property can ONLY be set at resource level
|
|
112
|
+
{
|
|
113
|
+
'myExtension.resourceSetting': {
|
|
114
|
+
type: 'string',
|
|
115
|
+
default: 'default',
|
|
116
|
+
scope: ConfigurationScope.RESOURCE, // ← Only settable at RESOURCE level
|
|
117
|
+
description: 'Resource-specific setting'
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Example: Querying Configuration
|
|
123
|
+
|
|
124
|
+
When querying with different targets:
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
// Query with target=4 (ORGANIZATION)
|
|
128
|
+
// Returns properties with scope: WINDOW or RESOURCE
|
|
129
|
+
pageSettings({ target: ConfigurationTarget.ORGANIZATION });
|
|
130
|
+
// Result: includes 'myExtension.featureEnabled' and 'myExtension.resourceSetting'
|
|
131
|
+
|
|
132
|
+
// Query with target=5 (ORGANIZATION_RESOURCE)
|
|
133
|
+
// Returns ONLY properties with scope: RESOURCE
|
|
134
|
+
pageSettings({ target: ConfigurationTarget.ORGANIZATION_RESOURCE });
|
|
135
|
+
// Result: includes only 'myExtension.resourceSetting'
|
|
136
|
+
// 'myExtension.featureEnabled' is EXCLUDED because it has scope: WINDOW
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Configuration Cascade Flow
|
|
140
|
+
|
|
141
|
+
When resolving the final value for a configuration property, the system merges values from multiple levels:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
145
|
+
│ DEFAULT │
|
|
146
|
+
│ (System defaults from contribution files) │
|
|
147
|
+
└───────────────────────────┬─────────────────────────────────────┘
|
|
148
|
+
↓
|
|
149
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
150
|
+
│ APPLICATION │
|
|
151
|
+
│ (Application-level settings) │
|
|
152
|
+
└───────────────────────────┬─────────────────────────────────────┘
|
|
153
|
+
↓
|
|
154
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
155
|
+
│ USER │
|
|
156
|
+
│ (User-specific settings) │
|
|
157
|
+
└───────────────────────────┬─────────────────────────────────────┘
|
|
158
|
+
↓
|
|
159
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
160
|
+
│ ORGANIZATION │
|
|
161
|
+
│ (Organization-level settings - scope: WINDOW, RESOURCE) │
|
|
162
|
+
└───────────────────────────┬─────────────────────────────────────┘
|
|
163
|
+
↓
|
|
164
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
165
|
+
│ ORGANIZATION_RESOURCE │
|
|
166
|
+
│ (Resource-level settings - scope: RESOURCE only) │
|
|
167
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Merge Order**: Later levels override earlier levels. A value set at `ORGANIZATION_RESOURCE` takes precedence over the same key set at `ORGANIZATION`.
|
|
171
|
+
|
|
172
|
+
## Common Use Cases
|
|
173
|
+
|
|
174
|
+
### 1. Organization-Wide Settings
|
|
175
|
+
|
|
176
|
+
For settings that apply across an entire organization:
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
{
|
|
180
|
+
'organization.theme': {
|
|
181
|
+
type: 'string',
|
|
182
|
+
default: 'light',
|
|
183
|
+
scope: ConfigurationScope.WINDOW, // Settable at organization level
|
|
184
|
+
description: 'Organization-wide theme'
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### 2. Resource-Specific Settings
|
|
190
|
+
|
|
191
|
+
For settings that can vary per resource/workspace:
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
{
|
|
195
|
+
'workspace.buildCommand': {
|
|
196
|
+
type: 'string',
|
|
197
|
+
default: 'npm run build',
|
|
198
|
+
scope: ConfigurationScope.RESOURCE, // Settable at resource level
|
|
199
|
+
description: 'Build command for this workspace'
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### 3. Application-Only Settings
|
|
205
|
+
|
|
206
|
+
For settings that should only be set at the application level:
|
|
207
|
+
|
|
208
|
+
```typescript
|
|
209
|
+
{
|
|
210
|
+
'app.telemetryEnabled': {
|
|
211
|
+
type: 'boolean',
|
|
212
|
+
default: true,
|
|
213
|
+
scope: ConfigurationScope.APPLICATION, // Only at application level
|
|
214
|
+
description: 'Enable telemetry'
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## API Usage
|
|
220
|
+
|
|
221
|
+
### Reading Configuration
|
|
222
|
+
|
|
223
|
+
```typescript
|
|
224
|
+
// Get configuration for organization level
|
|
225
|
+
const orgConfig = await pageSettings({
|
|
226
|
+
uri: cdecodeUri,
|
|
227
|
+
options: {
|
|
228
|
+
target: ConfigurationTarget.ORGANIZATION, // target: 4
|
|
229
|
+
},
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
// Get configuration for resource level
|
|
233
|
+
const resourceConfig = await pageSettings({
|
|
234
|
+
uri: cdecodeUri,
|
|
235
|
+
options: {
|
|
236
|
+
target: ConfigurationTarget.ORGANIZATION_RESOURCE, // target: 5
|
|
237
|
+
},
|
|
238
|
+
});
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Writing Configuration
|
|
242
|
+
|
|
243
|
+
```typescript
|
|
244
|
+
// Write to organization level
|
|
245
|
+
await writeSettings(
|
|
246
|
+
editingUri,
|
|
247
|
+
{ 'myExtension.featureEnabled': false },
|
|
248
|
+
overrides,
|
|
249
|
+
ConfigurationTarget.ORGANIZATION,
|
|
250
|
+
false,
|
|
251
|
+
schemaId,
|
|
252
|
+
);
|
|
253
|
+
|
|
254
|
+
// Write to resource level
|
|
255
|
+
await writeSettings(
|
|
256
|
+
editingUri,
|
|
257
|
+
{ 'myExtension.resourceSetting': 'custom-value' },
|
|
258
|
+
overrides,
|
|
259
|
+
ConfigurationTarget.ORGANIZATION_RESOURCE,
|
|
260
|
+
false,
|
|
261
|
+
schemaId,
|
|
262
|
+
);
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
## Important Notes
|
|
266
|
+
|
|
267
|
+
1. **Scope defines settability, not visibility**: A property with `scope: RESOURCE` can only be _set_ at resource level, but its value is still _visible_ when querying at higher levels.
|
|
268
|
+
|
|
269
|
+
2. **Empty results at ORGANIZATION_RESOURCE**: If you query with `target: ORGANIZATION_RESOURCE` (5) and get empty results, it's likely because your properties are defined with `scope: WINDOW` instead of `scope: RESOURCE`.
|
|
270
|
+
|
|
271
|
+
3. **Default configuration and targets**: When fetching `DefaultConfiguration`, the target affects which properties are included based on their scope. This is intentional to show only the settings that can actually be modified at that level.
|
|
272
|
+
|
|
273
|
+
4. **Caching**: Configuration properties are cached per target. Different targets will have separate cache entries to ensure scope-filtered results are properly cached.
|
|
274
|
+
|
|
275
|
+
## File Locations
|
|
276
|
+
|
|
277
|
+
- **Scope definitions**: `packages/adminide-core/src/interfaces/configuration/configuration.ts`
|
|
278
|
+
- **Target definitions**: `packages/common/src/configuration.ts`
|
|
279
|
+
- **Scope-to-Target mapping**: `packages/adminide-platform/server/src/utils/getScope.ts`
|
|
280
|
+
- **Scope matching logic**: `packages/adminide-platform/server/src/core/configuration/default-settings/configurationHelpers.ts`
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
meta:
|
|
3
|
+
title: Generate URI
|
|
4
|
+
description: Generate URI
|
|
5
|
+
date: '2023-06-02T00:00:00'
|
|
6
|
+
updated: '2024-06-02T00:00:00'
|
|
7
|
+
excerpt: Generate URI...
|
|
8
|
+
headers:
|
|
9
|
+
Cache-Control: no-cache
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Generate URI
|
|
13
|
+
|
|
14
|
+
Use `generateUri` from `@adminide-stack/core`.
|
|
15
|
+
|
|
16
|
+
params of the URI's query should be `sorted` in order which the above function does it automatically.
|
|
17
|
+
|
|
18
|
+
### To generate organization URI
|
|
19
|
+
|
|
20
|
+
Another helpful function, if generating `orgUri`.
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
const orgUri = generateOrgUri(orgName, IConfigFragmentName.settings);
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### To generate User URI
|
|
28
|
+
|
|
29
|
+
In the frontend, we can pass userId as `self` as there are methods to replace with right value.
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
import {
|
|
33
|
+
IClientCacheTypeNames,
|
|
34
|
+
generateResourceUri,
|
|
35
|
+
IConfigCollectionName,
|
|
36
|
+
TeamContextFragmentDoc,
|
|
37
|
+
} from '@adminide-stack/core';
|
|
38
|
+
|
|
39
|
+
const userProxyURI = generateUserUri('self'); // we don't give `params` in the client side.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If you want to generate User resource URI to use in `backend service` from a given user's `alias`.
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
const generatedUserUri = generateResourceUri(
|
|
46
|
+
IConfigCollectionName.accounts,
|
|
47
|
+
{alias: [user.auth0UserId]} as any,
|
|
48
|
+
IConfigFragmentName.settings,
|
|
49
|
+
)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### To generate Resource URI
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
import {
|
|
56
|
+
IClientCacheTypeNames,
|
|
57
|
+
generateResourceUri,
|
|
58
|
+
IConfigCollectionName,
|
|
59
|
+
TeamContextFragmentDoc,
|
|
60
|
+
} from '@adminide-stack/core';
|
|
61
|
+
|
|
62
|
+
const teamUri = generateResourceUri(
|
|
63
|
+
IConfigCollectionName.teams,
|
|
64
|
+
{ name: teamName, orgName },
|
|
65
|
+
IConfigFragmentName.settings,
|
|
66
|
+
);
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Fragment name to generate Permission/Policy/Settings URI
|
|
70
|
+
|
|
71
|
+
`IConfigFragmentName` name that is given based on type of URI you want to generate.
|
|
72
|
+
|
|
73
|
+
For Settings URI: use `IConfigFragmentName.settings`
|
|
74
|
+
For Permission URI: use `IConfigFragmentName.permissions`
|
|
75
|
+
FOr Policy URI: use `IConfigFragmentName.Policy`
|
|
76
|
+
|
|
77
|
+
## Params in the generateURI
|
|
78
|
+
|
|
79
|
+
Except for OrgURI, rest of the URIs such as UserUri, TeamURI, ProjectURI, ClientURI need to pass `Collection Name` and `Params to filter the resource id`
|
|
80
|
+
|
|
81
|
+
### Collection mapping
|
|
82
|
+
|
|
83
|
+
Here are following collections avaialble based on the resource URI.
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
enum IConfigCollectionName {
|
|
87
|
+
accounts = "accounts",
|
|
88
|
+
organizations = "organizations",
|
|
89
|
+
workspaces = "workspaces",
|
|
90
|
+
teams = "teams",
|
|
91
|
+
projects = "projects",
|
|
92
|
+
clients = "clients"
|
|
93
|
+
}
|
|
94
|
+
```
|