@redocly/revel-reef 0.124.0-next.16 → 0.124.0-next.18
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 +38 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/cli/develop.d.ts.map +1 -1
- package/dist/cli/develop.js +1 -1
- package/dist/cli/develop.js.map +1 -1
- package/dist/cli/prepare/copy-migrations.d.ts +6 -0
- package/dist/cli/prepare/copy-migrations.d.ts.map +1 -0
- package/dist/cli/prepare/copy-migrations.js +1 -0
- package/dist/cli/prepare/copy-migrations.js.map +1 -0
- package/dist/cli/prepare/index.d.ts.map +1 -1
- package/dist/cli/prepare/index.js +1 -1
- package/dist/cli/prepare/index.js.map +1 -1
- package/dist/cli/translations/update-translations.d.ts.map +1 -1
- package/dist/cli/translations/update-translations.js +1 -1
- package/dist/cli/translations/update-translations.js.map +1 -1
- package/dist/client/app/hooks/catalog/useCatalogFilter.d.ts.map +1 -1
- package/dist/client/app/hooks/catalog/useCatalogFilter.js +1 -1
- package/dist/client/app/hooks/catalog/useCatalogFilter.js.map +1 -1
- package/dist/client/app/hooks/catalog/useFetchCatalogEntities.d.ts.map +1 -1
- package/dist/client/app/hooks/catalog/useFetchCatalogEntities.js +1 -1
- package/dist/client/app/hooks/catalog/useFetchCatalogEntities.js.map +1 -1
- package/dist/client/app/hooks/codeHighlight/map-lang.d.ts.map +1 -1
- package/dist/client/app/hooks/codeHighlight/map-lang.js +1 -1
- package/dist/client/app/hooks/codeHighlight/map-lang.js.map +1 -1
- package/dist/client/app/hooks/codeHighlight/ruby.d.ts +3 -0
- package/dist/client/app/hooks/codeHighlight/ruby.d.ts.map +1 -0
- package/dist/client/app/hooks/codeHighlight/ruby.js +1 -0
- package/dist/client/app/hooks/codeHighlight/ruby.js.map +1 -0
- package/dist/client/app/hooks/codeHighlight/useCodeHighlight.d.ts.map +1 -1
- package/dist/client/app/hooks/codeHighlight/useCodeHighlight.js +1 -1
- package/dist/client/app/hooks/codeHighlight/useCodeHighlight.js.map +1 -1
- package/dist/client/app/l10n/index.d.ts +1 -1
- package/dist/client/app/l10n/index.d.ts.map +1 -1
- package/dist/client/app/l10n/index.js +1 -1
- package/dist/client/app/l10n/index.js.map +1 -1
- package/dist/client/utils/catalog/format-filter-query.d.ts.map +1 -1
- package/dist/client/utils/catalog/format-filter-query.js +1 -1
- package/dist/client/utils/catalog/format-filter-query.js.map +1 -1
- package/dist/server/constants/plugins/catalog-entities.d.ts.map +1 -1
- package/dist/server/constants/plugins/catalog-entities.js +1 -1
- package/dist/server/constants/plugins/catalog-entities.js.map +1 -1
- package/dist/server/plugins/api-functions/api-functions-handler-runner.d.ts.map +1 -1
- package/dist/server/plugins/api-functions/api-functions-handler-runner.js +1 -1
- package/dist/server/plugins/api-functions/api-functions-handler-runner.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/catalog-entities-service.d.ts +16 -13
- package/dist/server/plugins/catalog-entities/databases/catalog-entities-service.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/catalog-entities-service.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/catalog-entities-service.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/database/client.d.ts +4 -11
- package/dist/server/plugins/catalog-entities/databases/database/client.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/database/client.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/database/client.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/database/migrations/0000_initilize-entities-catalog.sql +43 -0
- package/dist/server/plugins/catalog-entities/databases/database/migrations/meta/0000_snapshot.json +286 -0
- package/dist/server/plugins/catalog-entities/databases/database/migrations/meta/_journal.json +13 -0
- package/dist/server/plugins/catalog-entities/databases/database-path-generator.d.ts +49 -0
- package/dist/server/plugins/catalog-entities/databases/database-path-generator.d.ts.map +1 -0
- package/dist/server/plugins/catalog-entities/databases/database-path-generator.js +1 -0
- package/dist/server/plugins/catalog-entities/databases/database-path-generator.js.map +1 -0
- package/dist/server/plugins/catalog-entities/databases/mappers/create-bff-entity.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-bff-entity.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-bff-entity.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-bff-related-entity.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-bff-related-entity.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-bff-related-entity.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-db-record.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-db-record.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-db-record.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-db-record.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-read-model.d.ts +2 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-read-model.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-read-model.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-read-model.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-relation-db-record-from-dto.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-relation-db-record-from-dto.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-relation-db-record-from-dto.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-relation-db-record-from-dto.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-relation-db-record-from-file-schema.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-relation-db-record-from-file-schema.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-relation-db-record-from-file-schema.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-relation-db-record-from-file-schema.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-relation.d.ts +2 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-relation.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/mappers/create-entity-relation.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/after-and-before.d.ts +6 -2
- package/dist/server/plugins/catalog-entities/databases/pagination/after-and-before.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/after-and-before.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/after-and-before.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/combined-filters.d.ts +4 -0
- package/dist/server/plugins/catalog-entities/databases/pagination/combined-filters.d.ts.map +1 -0
- package/dist/server/plugins/catalog-entities/databases/pagination/combined-filters.js +1 -0
- package/dist/server/plugins/catalog-entities/databases/pagination/combined-filters.js.map +1 -0
- package/dist/server/plugins/catalog-entities/databases/pagination/filter.d.ts +6 -2
- package/dist/server/plugins/catalog-entities/databases/pagination/filter.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/filter.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/filter.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/index.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/databases/pagination/index.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/index.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/index.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/limit.d.ts +3 -2
- package/dist/server/plugins/catalog-entities/databases/pagination/limit.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/limit.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/limit.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/search.d.ts +6 -2
- package/dist/server/plugins/catalog-entities/databases/pagination/search.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/search.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/search.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/skip.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/databases/pagination/skip.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/skip.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/skip.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/sort.d.ts +2 -2
- package/dist/server/plugins/catalog-entities/databases/pagination/sort.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/sort.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/pagination/sort.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/repositories/local/catalog-entities-local-read-repository.d.ts +4 -21
- package/dist/server/plugins/catalog-entities/databases/repositories/local/catalog-entities-local-read-repository.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/repositories/local/catalog-entities-local-read-repository.js +13 -321
- package/dist/server/plugins/catalog-entities/databases/repositories/local/catalog-entities-local-read-repository.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/repositories/local/catalog-entities-local-repository.d.ts +9 -24
- package/dist/server/plugins/catalog-entities/databases/repositories/local/catalog-entities-local-repository.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/repositories/local/catalog-entities-local-repository.js +1 -1
- package/dist/server/plugins/catalog-entities/databases/repositories/local/catalog-entities-local-repository.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/repositories/local/catalog-entities-local-write-repository.d.ts +4 -4
- package/dist/server/plugins/catalog-entities/databases/repositories/local/catalog-entities-local-write-repository.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/repositories/local/catalog-entities-local-write-repository.js +1 -13
- package/dist/server/plugins/catalog-entities/databases/repositories/local/catalog-entities-local-write-repository.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/repositories/remote/catalog-entities-remote-repository.d.ts +4 -3
- package/dist/server/plugins/catalog-entities/databases/repositories/remote/catalog-entities-remote-repository.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/repositories/remote/catalog-entities-remote-repository.js +1 -13
- package/dist/server/plugins/catalog-entities/databases/repositories/remote/catalog-entities-remote-repository.js.map +1 -1
- package/dist/server/plugins/catalog-entities/databases/repositories/utils.d.ts +67 -0
- package/dist/server/plugins/catalog-entities/databases/repositories/utils.d.ts.map +1 -0
- package/dist/server/plugins/catalog-entities/databases/repositories/utils.js +1 -0
- package/dist/server/plugins/catalog-entities/databases/repositories/utils.js.map +1 -0
- package/dist/server/plugins/catalog-entities/databases/schemas/entities-relations-table.d.ts +236 -0
- package/dist/server/plugins/catalog-entities/databases/schemas/entities-relations-table.d.ts.map +1 -0
- package/dist/server/plugins/catalog-entities/databases/schemas/entities-relations-table.js +1 -0
- package/dist/server/plugins/catalog-entities/databases/schemas/entities-relations-table.js.map +1 -0
- package/dist/server/plugins/catalog-entities/databases/schemas/entities-table.d.ts +331 -0
- package/dist/server/plugins/catalog-entities/databases/schemas/entities-table.d.ts.map +1 -0
- package/dist/server/plugins/catalog-entities/databases/schemas/entities-table.js +1 -0
- package/dist/server/plugins/catalog-entities/databases/schemas/entities-table.js.map +1 -0
- package/dist/server/plugins/catalog-entities/databases/schemas/index.d.ts +3 -0
- package/dist/server/plugins/catalog-entities/databases/schemas/index.d.ts.map +1 -0
- package/dist/server/plugins/catalog-entities/databases/schemas/index.js +1 -0
- package/dist/server/plugins/catalog-entities/databases/schemas/index.js.map +1 -0
- package/dist/server/plugins/catalog-entities/extensions/api-description/extractors/base.js +1 -1
- package/dist/server/plugins/catalog-entities/extensions/api-description/extractors/base.js.map +1 -1
- package/dist/server/plugins/catalog-entities/get-server-props.d.ts +0 -2
- package/dist/server/plugins/catalog-entities/get-server-props.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/get-server-props.js +1 -1
- package/dist/server/plugins/catalog-entities/get-server-props.js.map +1 -1
- package/dist/server/plugins/catalog-entities/merge-catalog-config.d.ts +52 -0
- package/dist/server/plugins/catalog-entities/merge-catalog-config.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/merge-catalog-config.js +1 -1
- package/dist/server/plugins/catalog-entities/merge-catalog-config.js.map +1 -1
- package/dist/server/plugins/catalog-entities/plugin.js +1 -1
- package/dist/server/plugins/catalog-entities/plugin.js.map +1 -1
- package/dist/server/plugins/catalog-entities/schemas/database-schemas.d.ts +3 -3
- package/dist/server/plugins/catalog-entities/schemas/database-schemas.js +1 -1
- package/dist/server/plugins/catalog-entities/schemas/database-schemas.js.map +1 -1
- package/dist/server/plugins/catalog-entities/template/index.d.ts.map +1 -1
- package/dist/server/plugins/catalog-entities/template/index.js +1 -1
- package/dist/server/plugins/catalog-entities/template/index.js.map +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/code-walkthrough/map-file-extension-to-language.js +1 -1
- package/dist/server/plugins/markdown/attribute-resolvers/code-walkthrough/map-file-extension-to-language.js.map +1 -1
- package/dist/server/web-server/routes/catalog/catalog-relations.d.ts.map +1 -1
- package/dist/server/web-server/routes/catalog/catalog-relations.js +1 -1
- package/dist/server/web-server/routes/catalog/catalog-relations.js.map +1 -1
- package/dist/server/web-server/utils/prepare-list-response.js +1 -1
- package/dist/server/web-server/utils/prepare-list-response.js.map +1 -1
- package/dist/shared/l10n/default-translations.d.ts +3 -1
- package/dist/shared/l10n/default-translations.d.ts.map +1 -1
- package/dist/shared/l10n/default-translations.js +1 -1
- package/dist/shared/l10n/default-translations.js.map +1 -1
- package/dist/shared/l10n/initL10n.d.ts +1 -1
- package/dist/shared/l10n/initL10n.d.ts.map +1 -1
- package/dist/shared/l10n/initL10n.js +1 -1
- package/dist/shared/l10n/initL10n.js.map +1 -1
- package/dist/shared/l10n/langs/ar.d.ts.map +1 -1
- package/dist/shared/l10n/langs/ar.js +1 -1
- package/dist/shared/l10n/langs/ar.js.map +1 -1
- package/dist/shared/l10n/langs/de.d.ts.map +1 -1
- package/dist/shared/l10n/langs/de.js +1 -1
- package/dist/shared/l10n/langs/de.js.map +1 -1
- package/dist/shared/l10n/langs/en.d.ts.map +1 -1
- package/dist/shared/l10n/langs/en.js +1 -1
- package/dist/shared/l10n/langs/en.js.map +1 -1
- package/dist/shared/l10n/langs/es.d.ts.map +1 -1
- package/dist/shared/l10n/langs/es.js +1 -1
- package/dist/shared/l10n/langs/es.js.map +1 -1
- package/dist/shared/l10n/langs/fr.d.ts.map +1 -1
- package/dist/shared/l10n/langs/fr.js +1 -1
- package/dist/shared/l10n/langs/fr.js.map +1 -1
- package/dist/shared/l10n/langs/hi.d.ts.map +1 -1
- package/dist/shared/l10n/langs/hi.js +1 -1
- package/dist/shared/l10n/langs/hi.js.map +1 -1
- package/dist/shared/l10n/langs/it.d.ts.map +1 -1
- package/dist/shared/l10n/langs/it.js +1 -1
- package/dist/shared/l10n/langs/it.js.map +1 -1
- package/dist/shared/l10n/langs/ja.d.ts.map +1 -1
- package/dist/shared/l10n/langs/ja.js +1 -1
- package/dist/shared/l10n/langs/ja.js.map +1 -1
- package/dist/shared/l10n/langs/ko.d.ts.map +1 -1
- package/dist/shared/l10n/langs/ko.js +1 -1
- package/dist/shared/l10n/langs/ko.js.map +1 -1
- package/dist/shared/l10n/langs/pl.d.ts.map +1 -1
- package/dist/shared/l10n/langs/pl.js +1 -1
- package/dist/shared/l10n/langs/pl.js.map +1 -1
- package/dist/shared/l10n/langs/pt-BR.d.ts.map +1 -1
- package/dist/shared/l10n/langs/pt-BR.js +1 -1
- package/dist/shared/l10n/langs/pt-BR.js.map +1 -1
- package/dist/shared/l10n/langs/pt.d.ts.map +1 -1
- package/dist/shared/l10n/langs/pt.js +1 -1
- package/dist/shared/l10n/langs/pt.js.map +1 -1
- package/dist/shared/l10n/langs/ru.d.ts.map +1 -1
- package/dist/shared/l10n/langs/ru.js +1 -1
- package/dist/shared/l10n/langs/ru.js.map +1 -1
- package/dist/shared/l10n/langs/uk.d.ts.map +1 -1
- package/dist/shared/l10n/langs/uk.js +1 -1
- package/dist/shared/l10n/langs/uk.js.map +1 -1
- package/dist/shared/l10n/langs/zh.d.ts.map +1 -1
- package/dist/shared/l10n/langs/zh.js +1 -1
- package/dist/shared/l10n/langs/zh.js.map +1 -1
- package/package.json +11 -10
- package/dist/server/plugins/catalog-entities/databases/database/sql-builder.d.ts +0 -36
- package/dist/server/plugins/catalog-entities/databases/database/sql-builder.d.ts.map +0 -1
- package/dist/server/plugins/catalog-entities/databases/database/sql-builder.js +0 -1
- package/dist/server/plugins/catalog-entities/databases/database/sql-builder.js.map +0 -1
- package/dist/server/plugins/catalog-entities/databases/initialize-catalog-scripts.d.ts +0 -4
- package/dist/server/plugins/catalog-entities/databases/initialize-catalog-scripts.d.ts.map +0 -1
- package/dist/server/plugins/catalog-entities/databases/initialize-catalog-scripts.js +0 -34
- package/dist/server/plugins/catalog-entities/databases/initialize-catalog-scripts.js.map +0 -1
- package/dist/server/plugins/catalog-entities/databases/prepare-database-path.d.ts +0 -10
- package/dist/server/plugins/catalog-entities/databases/prepare-database-path.d.ts.map +0 -1
- package/dist/server/plugins/catalog-entities/databases/prepare-database-path.js +0 -1
- package/dist/server/plugins/catalog-entities/databases/prepare-database-path.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const a=["node_modules","dist","build",".git","@l10n"],
|
|
1
|
+
const a=["node_modules","dist","build",".git","@l10n"],t={catalogs:{all:{slug:"all",hide:!1,includes:[],excludes:[],filters:[],titleTranslationKey:"catalog.catalogs.all.title",descriptionTranslationKey:"catalog.catalogs.all.description",catalogSwitcherLabelTranslationKey:"catalog.catalogs.all.switcherLabel"},services:{slug:"services",hide:!1,includes:[{type:"service"}],excludes:[],filters:[],titleTranslationKey:"catalog.catalogs.service.title",descriptionTranslationKey:"catalog.catalogs.service.description",catalogSwitcherLabelTranslationKey:"catalog.catalogs.service.switcherLabel"},domains:{slug:"domains",hide:!1,includes:[{type:"domain"}],excludes:[],filters:[],titleTranslationKey:"catalog.catalogs.domain.title",descriptionTranslationKey:"catalog.catalogs.domain.description",catalogSwitcherLabelTranslationKey:"catalog.catalogs.domain.switcherLabel"},teams:{slug:"teams",hide:!1,includes:[{type:"team"}],excludes:[],filters:[],titleTranslationKey:"catalog.catalogs.team.title",descriptionTranslationKey:"catalog.catalogs.team.description",catalogSwitcherLabelTranslationKey:"catalog.catalogs.team.switcherLabel"},users:{slug:"users",hide:!1,includes:[{type:"user"}],excludes:[],filters:[],titleTranslationKey:"catalog.catalogs.user.title",descriptionTranslationKey:"catalog.catalogs.user.description",catalogSwitcherLabelTranslationKey:"catalog.catalogs.user.switcherLabel"},apiDescriptions:{slug:"api-descriptions",hide:!1,includes:[{type:"api-description"}],excludes:[],filters:[],titleTranslationKey:"catalog.catalogs.apiDescription.title",descriptionTranslationKey:"catalog.catalogs.apiDescription.description",catalogSwitcherLabelTranslationKey:"catalog.catalogs.apiDescription.switcherLabel"},dataSchemas:{slug:"data-schemas",hide:!1,includes:[{type:"data-schema"}],excludes:[],filters:[],titleTranslationKey:"catalog.catalogs.dataSchema.title",descriptionTranslationKey:"catalog.catalogs.dataSchema.description",catalogSwitcherLabelTranslationKey:"catalog.catalogs.dataSchema.switcherLabel"},apiOperations:{slug:"api-operations",hide:!1,includes:[{type:"api-operation"}],excludes:[],filters:[],titleTranslationKey:"catalog.catalogs.apiOperation.title",descriptionTranslationKey:"catalog.catalogs.apiOperation.description",catalogSwitcherLabelTranslationKey:"catalog.catalogs.apiOperation.switcherLabel"}}};export{t as CATALOG_ENTITIES_DEFAULT_CONFIG,a as ENTITY_SCHEMA_EXCLUDED_FOLDERS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-entities.js","sourceRoot":"","sources":["../../../../../../src/server/constants/plugins/catalog-entities.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE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F;YACD,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,EAAE;YACX,mBAAmB,EAAE,6BAA6B;YAClD,yBAAyB,EAAE,mCAAmC;YAC9D,kCAAkC,EAAE,qCAAqC;SAC1E;QACD,eAAe,EAAE;YACf,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,iBAAiB;iBACxB;aACF;YACD,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,EAAE;YACX,mBAAmB,EAAE,uCAAuC;YAC5D,yBAAyB,EAAE,6CAA6C;YACxE,kCAAkC,EAAE,+CAA+C;SACpF;KACF;CACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"catalog-entities.js","sourceRoot":"","sources":["../../../../../../src/server/constants/plugins/catalog-entities.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;AAEjG,MAAM,CAAC,MAAM,+BAA+B,GAA0B;IACpE,QAAQ,EAAE;QACR,GAAG,EAAE;YACH,IAAI,EAAE,KAAK;YACX,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE,EAAE;YACZ,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,EAAE;YACX,mBAAmB,EAAE,4BAA4B;YACjD,yBAAyB,EAAE,kCAAkC;YAC7D,kCAAkC,EAAE,oCAAoC;SACzE;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,SAAS;iBAChB;aACF;YACD,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,EAAE;YACX,mBAAmB,EAAE,gCAAgC;YACrD,yBAAyB,EAAE,sCAAsC;YACjE,kCAAkC,EAAE,wCAAwC;SAC7E;QACD,OAAO,EAAE;YACP,IAAI,EAAE,SAA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AyB,EAAE,yCAAyC;YACpE,kCAAkC,EAAE,2CAA2C;SAChF;QACD,aAAa,EAAE;YACb,IAAI,EAAE,gBAAgB;YACtB,IAAI,EAAE,KAAK;YACX,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,eAAe;iBACtB;aACF;YACD,QAAQ,EAAE,EAAE;YACZ,OAAO,EAAE,EAAE;YACX,mBAAmB,EAAE,qCAAqC;YAC1D,yBAAyB,EAAE,2CAA2C;YACtE,kCAAkC,EAAE,6CAA6C;SAClF;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-functions-handler-runner.d.ts","sourceRoot":"","sources":["../../../../../../src/server/plugins/api-functions/api-functions-handler-runner.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAWtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAwCvC,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"api-functions-handler-runner.d.ts","sourceRoot":"","sources":["../../../../../../src/server/plugins/api-functions/api-functions-handler-runner.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAWtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAwCvC,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,gBAAgB,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,qBAyF9F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as p from"workerpool";import{withPathPrefix as
|
|
1
|
+
import*as p from"workerpool";import{withPathPrefix as O}from"@redocly/theme/core/utils";import{EXCLUDED_ENV_VARS as g,MAX_RESPONSE_SIZE_MB as _,MAX_WORKERS_COUNT as S,TIMEOUT_LIMIT as h}from"../../constants/plugins/api-functions.js";import{telemetry as u}from"../../telemetry/telemetry.js";import{MemoryUsageLimitError as k,TimeoutExceededError as y}from"./errors.js";import{serializeRequest as M}from"./utils/serialize-request.js";import{isDevelopMode as T}from"../../utils/is-develop-mode.js";import{fromCurrentDir as w}from"../../utils/paths.js";import n from"../../utils/reporter/logger.js";let c;const A="Workerpool Worker terminated Unexpectedly";function I(){return Object.fromEntries(Object.entries(process.env).filter(([e])=>!g.includes(e)))}function D(){const e=T()?"js":"mjs",o=w(import.meta.url,"./api-functions-handler-worker."+e);return c||(c=p.pool(o,{maxWorkers:S,minWorkers:1,workerType:"process",forkOpts:{env:{...I(),REDOCLY_RUNNING_COMMAND:process.env.REDOCLY_RUNNING_COMMAND,PORTAL_LOG_FORMAT:process.env.PORTAL_LOG_FORMAT,REPORTER_VERBOSE:process.env.REPORTER_VERBOSE},stdio:"inherit"}})),c}async function W(e,o,s){const E=D(),r=o.get("auth"),m=await s.resolveRouteStaticData(e)||{};try{const t=E.exec("runHandler",[{serverOutDir:s.serverOutDir,slug:O(e.slug),requestHandlerId:e.requestHandlerId,maxResponseSizeMB:_,ctxData:{user:{teams:r.teams,email:r.claims.email,claims:r.claims,idpAccessToken:r.idpAccessToken,idpId:r.claims.idpId,isAuthenticated:r.isAuthenticated},config:s.config},staticData:{...m,props:{...m.props,routeSlug:e.slug,outdir:s.outdir}},req:await M(o.req.raw),loggerStickyState:n.getStickyState()}]).catch(i=>{throw i.message.includes(A)?new k("Memory usage exceeded limit."):(n.error(`[${e.requestHandlerId}] ${i.message} ${i.stack}`),i)}).timeout(h),{status:l,headers:d,body:a,loggerStickyState:R}=await t;n.setStickyState(R),u.send({type:"api_function.called",payload:{error:null,handler:e.requestHandlerId,body:a,headers:d,status:l}});const f=a.data?Buffer.from(a.data):null;return new Response(f,{status:l,headers:d})}catch(t){throw u.send({type:"api_function.error",payload:{handler:e.requestHandlerId,message:t?.message,stack:t?.stack}}),t instanceof p.Promise.TimeoutError?new y("Timeout exceeded"):t}}export{W as runApiFunctionHandler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-functions-handler-runner.js","sourceRoot":"","sources":["../../../../../../src/server/plugins/api-functions/api-functions-handler-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAKzC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,GACd,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,MAA6B,MAAM,gCAAgC,CAAC;AAE3E,IAAI,IAAqB,CAAC;AAE1B,MAAM,gCAAgC,GAAG,2CAA2C,CAAC;AAErF,SAAS,aAAa;IACpB,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAChF,CAAC;AACJ,CAAC;AAED,SAAS,aAAa;IACpB,MAAM,GAAG,GAAG,aAAa,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IAC3C,MAAM,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,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ACP;SACF,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"api-functions-handler-runner.js","sourceRoot":"","sources":["../../../../../../src/server/plugins/api-functions/api-functions-handler-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,YAAY,CAAC;AAKzC,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,GACd,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,MAA6B,MAAM,gCAAgC,CAAC;AAE3E,IAAI,IAAqB,CAAC;AAE1B,MAAM,gCAAgC,GAAG,2CAA2C,CAAC;AAErF,SAAS,aAAa;IACpB,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAChF,CAAC;AACJ,CAAC;AAED,SAAS,aAAa;IACpB,MAAM,GAAG,GAAG,aAAa,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;IAC3C,MAAM,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,iCAAiC,GAAG,GAAG,CAAC,CAAC;IAC5F,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,U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AC,CAAC,CAAC,IAAI,CAAC;QAE/D,OAAO,IAAI,QAAQ,CAAC,YAAY,EAAE;YAChC,MAAM;YACN,OAAO;SACR,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,SAAS,CAAC,IAAI,CAAC;YACb,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE;gBACP,OAAO,EAAE,KAAK,CAAC,gBAAgB;gBAC/B,OAAO,EAAE,KAAK,EAAE,OAAO;gBACvB,KAAK,EAAE,KAAK,EAAE,KAAK;aACpB;SACF,CAAC,CAAC;QACH,IAAI,KAAK,YAAY,UAAU,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;YACrD,MAAM,IAAI,oBAAoB,CAAC,kBAAkB,CAAC,CAAC;QACrD,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BffCatalogEntity, BffCatalogEntityList, BffCatalogRelatedEntityList } from '@redocly/theme';
|
|
2
2
|
import type { PaginationParams } from './pagination/schemas.js';
|
|
3
|
-
import type {
|
|
3
|
+
import type { EntityReadModelSchema, EntityRelationReadModelSchema } from '../schemas/read-model-schemas.js';
|
|
4
4
|
import { type EntityDtoSchema, type EntityRelationDtoSchema } from '../schemas/dto-schemas.js';
|
|
5
5
|
import { type EntityFileSchema } from '../schemas/file-schemas.js';
|
|
6
6
|
import { type ListResponseResult } from '../../../web-server/utils/prepare-list-response.js';
|
|
@@ -29,7 +29,7 @@ export declare class CatalogEntitiesService {
|
|
|
29
29
|
metadata: Record<string, unknown>;
|
|
30
30
|
}>): Promise<EntityReadModelSchema | null | undefined>;
|
|
31
31
|
deleteEntityByKey(key: string): Promise<string | null>;
|
|
32
|
-
getEntityRelationById(id: string
|
|
32
|
+
getEntityRelationById(id: string): Promise<EntityRelationReadModelSchema | null>;
|
|
33
33
|
getEntitiesRelations(paginationParams?: PaginationParams): Promise<ListResponseResult<{
|
|
34
34
|
createdAt?: string | null | undefined;
|
|
35
35
|
updatedAt?: string | null | undefined;
|
|
@@ -43,31 +43,34 @@ export declare class CatalogEntitiesService {
|
|
|
43
43
|
targetId: string;
|
|
44
44
|
}>>;
|
|
45
45
|
createEntityRelation(relation: EntityRelationDtoSchema): Promise<{
|
|
46
|
-
createdAt?: string | null | undefined;
|
|
47
|
-
updatedAt?: string | null | undefined;
|
|
48
|
-
type: string;
|
|
49
46
|
id: string;
|
|
47
|
+
createdAt: string;
|
|
50
48
|
organizationId: string;
|
|
51
49
|
projectId: string;
|
|
52
50
|
sourceKey: string;
|
|
53
51
|
targetKey: string;
|
|
54
|
-
sourceId: string;
|
|
55
|
-
targetId: string;
|
|
52
|
+
sourceId: string | null;
|
|
53
|
+
targetId: string | null;
|
|
54
|
+
updatedAt: string;
|
|
55
|
+
schemaVersion: number;
|
|
56
|
+
sourceToTargetRelation: string;
|
|
57
|
+
targetToSourceRelation: string;
|
|
56
58
|
} | null | undefined>;
|
|
57
59
|
updateEntityRelation(id: string, relation: EntityRelationDtoSchema): Promise<{
|
|
58
|
-
createdAt?: string | null | undefined;
|
|
59
|
-
updatedAt?: string | null | undefined;
|
|
60
|
-
type: string;
|
|
61
60
|
id: string;
|
|
61
|
+
createdAt: string;
|
|
62
62
|
organizationId: string;
|
|
63
63
|
projectId: string;
|
|
64
64
|
sourceKey: string;
|
|
65
65
|
targetKey: string;
|
|
66
|
-
sourceId: string;
|
|
67
|
-
targetId: string;
|
|
66
|
+
sourceId: string | null;
|
|
67
|
+
targetId: string | null;
|
|
68
|
+
updatedAt: string;
|
|
69
|
+
schemaVersion: number;
|
|
70
|
+
sourceToTargetRelation: string;
|
|
71
|
+
targetToSourceRelation: string;
|
|
68
72
|
} | null | undefined>;
|
|
69
73
|
deleteEntityRelation(id: string): Promise<string | null>;
|
|
70
|
-
getEntitiesRelationsByEntityKey(entityKey: string, paginationParams?: PaginationParams): Promise<ListResponseResult<EntityRelationReadModelSchema>>;
|
|
71
74
|
getEntitiesWithRelations(paginationParams?: PaginationParams): Promise<BffCatalogEntityList>;
|
|
72
75
|
getEntityWithRelationsByKey(entityKey: string): Promise<BffCatalogEntity | null>;
|
|
73
76
|
getRelatedEntities(entityKey: string, paginationParams?: PaginationParams): Promise<BffCatalogRelatedEntityList>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-entities-service.d.ts","sourceRoot":"","sources":["../../../../../../../src/server/plugins/catalog-entities/databases/catalog-entities-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"catalog-entities-service.d.ts","sourceRoot":"","sources":["../../../../../../../src/server/plugins/catalog-entities/databases/catalog-entities-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EACV,qBAAqB,EACrB,6BAA6B,EAC9B,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC7B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAIrF,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,oDAAoD,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAYhD,qBAAa,sBAAsB;IAI/B,OAAO,CAAC,QAAQ,CAAC,eAAe;IAChC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;IAJpC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAyB;IAEhD,OAAO;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@@ -1 +1 @@
|
|
|
1
|
-
import{entityRelationDtoSchema as R}from"../schemas/dto-schemas.js";import{deepMerge as
|
|
1
|
+
import{entityRelationDtoSchema as R}from"../schemas/dto-schemas.js";import{deepMerge as r}from"../../../../shared/jsUtils.js";import{entityFileSchema as m}from"../schemas/file-schemas.js";import{CatalogEntitiesLocalRepository as p}from"./repositories/local/catalog-entities-local-repository.js";import{CatalogEntitiesRemoteRepository as E}from"./repositories/remote/catalog-entities-remote-repository.js";import y from"../../../utils/reporter/logger.js";import{prepareListResponse as s}from"../../../web-server/utils/prepare-list-response.js";import{ENTITY_RELATION_FROM_DATABASE as l}from"./mappers/field-transformations.js";import{createValidator as c}from"../utils/ajv-validator.js";const d=c(R,"Entity relation validation failed"),h=c(m,"Entity file validation failed");class n{localRepository;remoteRepository;static instance;constructor(t,e){this.localRepository=t,this.remoteRepository=e}static async initialize(t){const[e,i]=await Promise.all([p.getInstance(t),t.runOnlyLocalDatabase?void 0:E.getInstance(t)]),a=new n(e,i);i&&(process.env.NODE_ENV==="development"&&y.info("Attaching remote database to local database"),await a.localRepository.attachDatabase(i.path)),n.instance=a}static async getInstance(t){return t.runOnlyLocalDatabase===void 0&&(t.runOnlyLocalDatabase=process.env.REDOCLY_LOCAL_DEV==="true"),t.removeExisting===void 0&&(t.removeExisting=!1),n.instance||await n.initialize(t),n.instance}async getEntities(t){await this.remoteRepository?.sync();const{items:e,total:i,hasMore:a}=await this.localRepository.getEntities(t);return s({data:e,params:t,totalCount:i,hasMore:a})}async getEntityByKey(t){return await this.remoteRepository?.sync(),await this.localRepository.getEntityByKey(t)}async createEntity(t){return this.remoteRepository?this.remoteRepository.createEntity(t):(y.warn("No remote database found"),null)}async createEntityInLocalDatabase(t,e){await this.localRepository.createEntity(t,e)}async createEntityRelationInLocalDatabase(t){await this.localRepository.createEntityRelation(t)}async updateEntityByKey(t,e){const i=await this.localRepository.getEntityByKey(t);if(!i)throw new Error(`Entity with key ${t} not found`);const a=r(i,e),o=h(a);return await this.remoteRepository?.updateEntity({...o,id:i.id,createdAt:i.createdAt||""})}async deleteEntityByKey(t){let e=await this.remoteRepository?.deleteEntity(t);return e||(e=await this.localRepository.deleteEntity(t)),e}async getEntityRelationById(t){return await this.remoteRepository?.sync(),await this.localRepository.getEntityRelationById(t)}async getEntitiesRelations(t={}){await this.remoteRepository?.sync();const{items:e,total:i,hasMore:a}=await this.localRepository.getEntitiesRelations(t);return s({data:e,params:t,totalCount:i,nameTransformationsFromDatabase:l,hasMore:a})}async createEntityRelation(t){return this.remoteRepository?.createEntityRelation(t)}async updateEntityRelation(t,e){const i=await this.localRepository.getEntityRelationById(t);if(!i)throw new Error(`Entity relation with id ${t} not found`);const a=r(i,e),o=d(a);return this.remoteRepository?.createEntityRelation(o)}async deleteEntityRelation(t){let e=await this.remoteRepository?.deleteEntityRelation(t);return e||(e=await this.localRepository.deleteEntityRelation(t)),e}async getEntitiesWithRelations(t={}){await this.remoteRepository?.sync();const{items:e,total:i,hasMore:a}=await this.localRepository.getEntitiesWithRelations(t);return s({data:e,params:t,totalCount:i,hasMore:a})}async getEntityWithRelationsByKey(t){return this.localRepository.getEntityWithRelationsByKey(t)}async getRelatedEntities(t,e={}){await this.remoteRepository?.sync();const{items:i,total:a,hasMore:o}=await this.localRepository.getRelatedEntities(t,e);return s({data:i,params:e,totalCount:a,nameTransformationsFromDatabase:l,hasMore:o})}}export{n as CatalogEntitiesService};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog-entities-service.js","sourceRoot":"","sources":["../../../../../../../src/server/plugins/catalog-entities/databases/catalog-entities-service.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,uBAAuB,GAGxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAyB,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,2DAA2D,CAAC;AAC3G,OA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QAClE,CAAC;QAED,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,KAAK,CAAC,qBAAqB,
|
|
1
|
+
{"version":3,"file":"catalog-entities-service.js","sourceRoot":"","sources":["../../../../../../../src/server/plugins/catalog-entities/databases/catalog-entities-service.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,uBAAuB,GAGxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAyB,MAAM,4BAA4B,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,2DAA2D,CAAC;AAC3G,OAAO,EAAE,+BAA+B,EAAE,MAAM,6DAA6D,CAAC;AAC9G,OAAO,MAAM,MAAM,mCAAmC,CAAC;AACvD,OAAO,EAEL,mBAAmB,GACpB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,oCAAoC,CAAC;AAEnF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5D,MAAM,sBAAsB,GAAG,eAAe,CAC5C,uBAAuB,EACvB,mCAAmC,CACpC,CAAC;AACF,MAAM,eAAe,GAAG,eAAe,CACrC,gBAAgB,EAChB,+BAA+B,CAChC,CAAC;AAEF,MAAM,OAAO,sBAAsB;IAId;IACA;IAJX,MAAM,CAAC,QAAQ,CAAyB;IAEhD,YACmB,eAA+C,EAC/C,gBAAkD;QADlD,oBAAe,GAAf,eAAe,CAAgC;QAC/C,qBAAgB,GAAhB,gBAAgB,CAAkC;IAClE,CAAC;IAEI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,OAA0B;QACxD,MAAM,CAAC,eAAe,EAAE,gBAAgB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YAC5D,8BAA8B,CAAC,WAAW,CAAC,OAAO,CAAC;YACnD,OAAO,CAAC,oBAAoB;gBAC1B,CAAC,CAAC,SAAS;gBACX,CAAC,CAAC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kBAAkB,CACtB,SAAiB,EACjB,mBAAqC,EAAE;QAEvC,MAAM,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAC;QAEpC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,kBAAkB,CAC7E,SAAS,EACT,gBAAgB,CACjB,CAAC;QACF,OAAO,mBAAmB,CAAC;YACzB,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,gBAAgB;YACxB,UAAU,EAAE,KAAK;YACjB,+BAA+B,EAAE,6BAA6B;YAC9D,OAAO;SACR,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
import { Config
|
|
1
|
+
import { Config } from '@libsql/client';
|
|
2
|
+
import { drizzle } from 'drizzle-orm/libsql';
|
|
2
3
|
export declare class DatabaseClient {
|
|
3
|
-
|
|
4
|
+
readonly client: ReturnType<typeof drizzle>;
|
|
4
5
|
constructor(config: Config);
|
|
5
|
-
migrate(
|
|
6
|
+
migrate(prefix: string): Promise<void>;
|
|
6
7
|
close(): Promise<void>;
|
|
7
|
-
execute({ sql, args }: {
|
|
8
|
-
sql: string;
|
|
9
|
-
args: any[];
|
|
10
|
-
}): Promise<import("@libsql/client").ResultSet>;
|
|
11
|
-
executeBatch(operations: {
|
|
12
|
-
sql: string;
|
|
13
|
-
args: any[];
|
|
14
|
-
}[]): Promise<import("@libsql/client").ResultSet[]>;
|
|
15
8
|
sync(): Promise<import("@libsql/client").Replicated>;
|
|
16
9
|
}
|
|
17
10
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../../../src/server/plugins/catalog-entities/databases/database/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../../../src/server/plugins/catalog-entities/databases/database/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAgB,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAK7C,qBAAa,cAAc;IACzB,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC;gBAEhC,MAAM,EAAE,MAAM;IASpB,OAAO,CAAC,MAAM,EAAE,MAAM;IAMtB,KAAK;IAIL,IAAI;CAGX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createClient as
|
|
1
|
+
import{createClient as i}from"@libsql/client";import{drizzle as e}from"drizzle-orm/libsql";import{migrate as n}from"drizzle-orm/libsql/migrator";import{entitiesTable as s,entitiesRelationsTable as r}from"../schemas/index.js";class h{client;constructor(t){this.client=e(i(t),{schema:{entities:s,entitiesRelations:r}})}async migrate(t){await n(this.client,{migrationsFolder:t+"/migrations"})}async close(){this.client.$client.close()}async sync(){return this.client.$client.sync()}}export{h as DatabaseClient};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../../../../src/server/plugins/catalog-entities/databases/database/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../../../../../../src/server/plugins/catalog-entities/databases/database/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAE5E,MAAM,OAAO,cAAc;IAChB,MAAM,CAA6B;IAE5C,YAAY,MAAc;QACxB,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE;YAC1C,MAAM,EAAE;gBACN,QAAQ,EAAE,aAAa;gBACvB,iBAAiB,EAAE,sBAAsB;aAC1C;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,MAAc;QAC1B,MAAM,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE;YACzB,gBAAgB,EAAE,MAAM,GAAG,aAAa;SACzC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,KAAK;QACT,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IAC9B,CAAC;IAED,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IACpC,CAAC;CACF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
CREATE TABLE IF NOT EXISTS `entities` (
|
|
2
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
3
|
+
`organization_id` text NOT NULL,
|
|
4
|
+
`project_id` text NOT NULL,
|
|
5
|
+
`key` text NOT NULL,
|
|
6
|
+
`type` text NOT NULL,
|
|
7
|
+
`title` text NOT NULL,
|
|
8
|
+
`summary` text,
|
|
9
|
+
`tags` text,
|
|
10
|
+
`metadata` text,
|
|
11
|
+
`git` text,
|
|
12
|
+
`contact` text,
|
|
13
|
+
`links` text,
|
|
14
|
+
`created_at` text NOT NULL,
|
|
15
|
+
`updated_at` text NOT NULL,
|
|
16
|
+
`source` text DEFAULT 'file',
|
|
17
|
+
`source_file` text,
|
|
18
|
+
`schema_version` integer DEFAULT 1 NOT NULL
|
|
19
|
+
);
|
|
20
|
+
--> statement-breakpoint
|
|
21
|
+
CREATE UNIQUE INDEX IF NOT EXISTS `entities_key_unique` ON `entities` (`key`);--> statement-breakpoint
|
|
22
|
+
CREATE INDEX IF NOT EXISTS `idx_entities_type` ON `entities` (`type`);--> statement-breakpoint
|
|
23
|
+
CREATE UNIQUE INDEX IF NOT EXISTS `idx_entities_key_source` ON `entities` (`key`,`source`);--> statement-breakpoint
|
|
24
|
+
CREATE TABLE IF NOT EXISTS `entities_relations` (
|
|
25
|
+
`id` text PRIMARY KEY NOT NULL,
|
|
26
|
+
`organization_id` text NOT NULL,
|
|
27
|
+
`project_id` text NOT NULL,
|
|
28
|
+
`source_key` text NOT NULL,
|
|
29
|
+
`source_id` text,
|
|
30
|
+
`source_to_target_relation` text NOT NULL,
|
|
31
|
+
`target_key` text NOT NULL,
|
|
32
|
+
`target_id` text,
|
|
33
|
+
`target_to_source_relation` text NOT NULL,
|
|
34
|
+
`created_at` text NOT NULL,
|
|
35
|
+
`updated_at` text NOT NULL,
|
|
36
|
+
`schema_version` integer DEFAULT 1 NOT NULL
|
|
37
|
+
);
|
|
38
|
+
--> statement-breakpoint
|
|
39
|
+
CREATE INDEX IF NOT EXISTS `idx_entities_relations_source_key` ON `entities_relations` (`source_key`);--> statement-breakpoint
|
|
40
|
+
CREATE INDEX IF NOT EXISTS `idx_entities_relations_target_key` ON `entities_relations` (`target_key`);--> statement-breakpoint
|
|
41
|
+
CREATE INDEX IF NOT EXISTS `idx_entities_relations_source_target` ON `entities_relations` (`source_to_target_relation`);--> statement-breakpoint
|
|
42
|
+
CREATE INDEX IF NOT EXISTS `idx_entities_relations_target_source` ON `entities_relations` (`target_to_source_relation`);--> statement-breakpoint
|
|
43
|
+
CREATE UNIQUE INDEX IF NOT EXISTS `idx_entities_relations_source_key_target_to_source_relation_target_key` ON `entities_relations` (`source_key`,`target_to_source_relation`,`target_key`);
|
package/dist/server/plugins/catalog-entities/databases/database/migrations/meta/0000_snapshot.json
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "6",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "bb524838-41cf-4ca7-b34e-5dfdaacbc56a",
|
|
5
|
+
"prevId": "00000000-0000-0000-0000-000000000000",
|
|
6
|
+
"tables": {
|
|
7
|
+
"entities": {
|
|
8
|
+
"name": "entities",
|
|
9
|
+
"columns": {
|
|
10
|
+
"id": {
|
|
11
|
+
"name": "id",
|
|
12
|
+
"type": "text",
|
|
13
|
+
"primaryKey": true,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": false
|
|
16
|
+
},
|
|
17
|
+
"organization_id": {
|
|
18
|
+
"name": "organization_id",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true,
|
|
22
|
+
"autoincrement": false
|
|
23
|
+
},
|
|
24
|
+
"project_id": {
|
|
25
|
+
"name": "project_id",
|
|
26
|
+
"type": "text",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": true,
|
|
29
|
+
"autoincrement": false
|
|
30
|
+
},
|
|
31
|
+
"key": {
|
|
32
|
+
"name": "key",
|
|
33
|
+
"type": "text",
|
|
34
|
+
"primaryKey": false,
|
|
35
|
+
"notNull": true,
|
|
36
|
+
"autoincrement": false
|
|
37
|
+
},
|
|
38
|
+
"type": {
|
|
39
|
+
"name": "type",
|
|
40
|
+
"type": "text",
|
|
41
|
+
"primaryKey": false,
|
|
42
|
+
"notNull": true,
|
|
43
|
+
"autoincrement": false
|
|
44
|
+
},
|
|
45
|
+
"title": {
|
|
46
|
+
"name": "title",
|
|
47
|
+
"type": "text",
|
|
48
|
+
"primaryKey": false,
|
|
49
|
+
"notNull": true,
|
|
50
|
+
"autoincrement": false
|
|
51
|
+
},
|
|
52
|
+
"summary": {
|
|
53
|
+
"name": "summary",
|
|
54
|
+
"type": "text",
|
|
55
|
+
"primaryKey": false,
|
|
56
|
+
"notNull": false,
|
|
57
|
+
"autoincrement": false
|
|
58
|
+
},
|
|
59
|
+
"tags": {
|
|
60
|
+
"name": "tags",
|
|
61
|
+
"type": "text",
|
|
62
|
+
"primaryKey": false,
|
|
63
|
+
"notNull": false,
|
|
64
|
+
"autoincrement": false
|
|
65
|
+
},
|
|
66
|
+
"metadata": {
|
|
67
|
+
"name": "metadata",
|
|
68
|
+
"type": "text",
|
|
69
|
+
"primaryKey": false,
|
|
70
|
+
"notNull": false,
|
|
71
|
+
"autoincrement": false
|
|
72
|
+
},
|
|
73
|
+
"git": {
|
|
74
|
+
"name": "git",
|
|
75
|
+
"type": "text",
|
|
76
|
+
"primaryKey": false,
|
|
77
|
+
"notNull": false,
|
|
78
|
+
"autoincrement": false
|
|
79
|
+
},
|
|
80
|
+
"contact": {
|
|
81
|
+
"name": "contact",
|
|
82
|
+
"type": "text",
|
|
83
|
+
"primaryKey": false,
|
|
84
|
+
"notNull": false,
|
|
85
|
+
"autoincrement": false
|
|
86
|
+
},
|
|
87
|
+
"links": {
|
|
88
|
+
"name": "links",
|
|
89
|
+
"type": "text",
|
|
90
|
+
"primaryKey": false,
|
|
91
|
+
"notNull": false,
|
|
92
|
+
"autoincrement": false
|
|
93
|
+
},
|
|
94
|
+
"created_at": {
|
|
95
|
+
"name": "created_at",
|
|
96
|
+
"type": "text",
|
|
97
|
+
"primaryKey": false,
|
|
98
|
+
"notNull": true,
|
|
99
|
+
"autoincrement": false
|
|
100
|
+
},
|
|
101
|
+
"updated_at": {
|
|
102
|
+
"name": "updated_at",
|
|
103
|
+
"type": "text",
|
|
104
|
+
"primaryKey": false,
|
|
105
|
+
"notNull": true,
|
|
106
|
+
"autoincrement": false
|
|
107
|
+
},
|
|
108
|
+
"source": {
|
|
109
|
+
"name": "source",
|
|
110
|
+
"type": "text",
|
|
111
|
+
"primaryKey": false,
|
|
112
|
+
"notNull": false,
|
|
113
|
+
"autoincrement": false,
|
|
114
|
+
"default": "'file'"
|
|
115
|
+
},
|
|
116
|
+
"source_file": {
|
|
117
|
+
"name": "source_file",
|
|
118
|
+
"type": "text",
|
|
119
|
+
"primaryKey": false,
|
|
120
|
+
"notNull": false,
|
|
121
|
+
"autoincrement": false
|
|
122
|
+
},
|
|
123
|
+
"schema_version": {
|
|
124
|
+
"name": "schema_version",
|
|
125
|
+
"type": "integer",
|
|
126
|
+
"primaryKey": false,
|
|
127
|
+
"notNull": true,
|
|
128
|
+
"autoincrement": false,
|
|
129
|
+
"default": 1
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"indexes": {
|
|
133
|
+
"entities_key_unique": {
|
|
134
|
+
"name": "entities_key_unique",
|
|
135
|
+
"columns": ["key"],
|
|
136
|
+
"isUnique": true
|
|
137
|
+
},
|
|
138
|
+
"idx_entities_type": {
|
|
139
|
+
"name": "idx_entities_type",
|
|
140
|
+
"columns": ["type"],
|
|
141
|
+
"isUnique": false
|
|
142
|
+
},
|
|
143
|
+
"idx_entities_key_source": {
|
|
144
|
+
"name": "idx_entities_key_source",
|
|
145
|
+
"columns": ["key", "source"],
|
|
146
|
+
"isUnique": true
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"foreignKeys": {},
|
|
150
|
+
"compositePrimaryKeys": {},
|
|
151
|
+
"uniqueConstraints": {},
|
|
152
|
+
"checkConstraints": {}
|
|
153
|
+
},
|
|
154
|
+
"entities_relations": {
|
|
155
|
+
"name": "entities_relations",
|
|
156
|
+
"columns": {
|
|
157
|
+
"id": {
|
|
158
|
+
"name": "id",
|
|
159
|
+
"type": "text",
|
|
160
|
+
"primaryKey": true,
|
|
161
|
+
"notNull": true,
|
|
162
|
+
"autoincrement": false
|
|
163
|
+
},
|
|
164
|
+
"organization_id": {
|
|
165
|
+
"name": "organization_id",
|
|
166
|
+
"type": "text",
|
|
167
|
+
"primaryKey": false,
|
|
168
|
+
"notNull": true,
|
|
169
|
+
"autoincrement": false
|
|
170
|
+
},
|
|
171
|
+
"project_id": {
|
|
172
|
+
"name": "project_id",
|
|
173
|
+
"type": "text",
|
|
174
|
+
"primaryKey": false,
|
|
175
|
+
"notNull": true,
|
|
176
|
+
"autoincrement": false
|
|
177
|
+
},
|
|
178
|
+
"source_key": {
|
|
179
|
+
"name": "source_key",
|
|
180
|
+
"type": "text",
|
|
181
|
+
"primaryKey": false,
|
|
182
|
+
"notNull": true,
|
|
183
|
+
"autoincrement": false
|
|
184
|
+
},
|
|
185
|
+
"source_id": {
|
|
186
|
+
"name": "source_id",
|
|
187
|
+
"type": "text",
|
|
188
|
+
"primaryKey": false,
|
|
189
|
+
"notNull": false,
|
|
190
|
+
"autoincrement": false
|
|
191
|
+
},
|
|
192
|
+
"source_to_target_relation": {
|
|
193
|
+
"name": "source_to_target_relation",
|
|
194
|
+
"type": "text",
|
|
195
|
+
"primaryKey": false,
|
|
196
|
+
"notNull": true,
|
|
197
|
+
"autoincrement": false
|
|
198
|
+
},
|
|
199
|
+
"target_key": {
|
|
200
|
+
"name": "target_key",
|
|
201
|
+
"type": "text",
|
|
202
|
+
"primaryKey": false,
|
|
203
|
+
"notNull": true,
|
|
204
|
+
"autoincrement": false
|
|
205
|
+
},
|
|
206
|
+
"target_id": {
|
|
207
|
+
"name": "target_id",
|
|
208
|
+
"type": "text",
|
|
209
|
+
"primaryKey": false,
|
|
210
|
+
"notNull": false,
|
|
211
|
+
"autoincrement": false
|
|
212
|
+
},
|
|
213
|
+
"target_to_source_relation": {
|
|
214
|
+
"name": "target_to_source_relation",
|
|
215
|
+
"type": "text",
|
|
216
|
+
"primaryKey": false,
|
|
217
|
+
"notNull": true,
|
|
218
|
+
"autoincrement": false
|
|
219
|
+
},
|
|
220
|
+
"created_at": {
|
|
221
|
+
"name": "created_at",
|
|
222
|
+
"type": "text",
|
|
223
|
+
"primaryKey": false,
|
|
224
|
+
"notNull": true,
|
|
225
|
+
"autoincrement": false
|
|
226
|
+
},
|
|
227
|
+
"updated_at": {
|
|
228
|
+
"name": "updated_at",
|
|
229
|
+
"type": "text",
|
|
230
|
+
"primaryKey": false,
|
|
231
|
+
"notNull": true,
|
|
232
|
+
"autoincrement": false
|
|
233
|
+
},
|
|
234
|
+
"schema_version": {
|
|
235
|
+
"name": "schema_version",
|
|
236
|
+
"type": "integer",
|
|
237
|
+
"primaryKey": false,
|
|
238
|
+
"notNull": true,
|
|
239
|
+
"autoincrement": false,
|
|
240
|
+
"default": 1
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"indexes": {
|
|
244
|
+
"idx_entities_relations_source_key": {
|
|
245
|
+
"name": "idx_entities_relations_source_key",
|
|
246
|
+
"columns": ["source_key"],
|
|
247
|
+
"isUnique": false
|
|
248
|
+
},
|
|
249
|
+
"idx_entities_relations_target_key": {
|
|
250
|
+
"name": "idx_entities_relations_target_key",
|
|
251
|
+
"columns": ["target_key"],
|
|
252
|
+
"isUnique": false
|
|
253
|
+
},
|
|
254
|
+
"idx_entities_relations_source_target": {
|
|
255
|
+
"name": "idx_entities_relations_source_target",
|
|
256
|
+
"columns": ["source_to_target_relation"],
|
|
257
|
+
"isUnique": false
|
|
258
|
+
},
|
|
259
|
+
"idx_entities_relations_target_source": {
|
|
260
|
+
"name": "idx_entities_relations_target_source",
|
|
261
|
+
"columns": ["target_to_source_relation"],
|
|
262
|
+
"isUnique": false
|
|
263
|
+
},
|
|
264
|
+
"idx_entities_relations_source_key_target_to_source_relation_target_key": {
|
|
265
|
+
"name": "idx_entities_relations_source_key_target_to_source_relation_target_key",
|
|
266
|
+
"columns": ["source_key", "target_to_source_relation", "target_key"],
|
|
267
|
+
"isUnique": true
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
"foreignKeys": {},
|
|
271
|
+
"compositePrimaryKeys": {},
|
|
272
|
+
"uniqueConstraints": {},
|
|
273
|
+
"checkConstraints": {}
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"views": {},
|
|
277
|
+
"enums": {},
|
|
278
|
+
"_meta": {
|
|
279
|
+
"schemas": {},
|
|
280
|
+
"tables": {},
|
|
281
|
+
"columns": {}
|
|
282
|
+
},
|
|
283
|
+
"internal": {
|
|
284
|
+
"indexes": {}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface DatabasePathOptions {
|
|
2
|
+
baseDir: string;
|
|
3
|
+
databaseName: string;
|
|
4
|
+
additionalFolder?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare class DatabasePathGenerator {
|
|
7
|
+
private static readonly LOCAL_DATABASE_NAME;
|
|
8
|
+
private static readonly REMOTE_DATABASE_NAME;
|
|
9
|
+
private static readonly LOCAL_ADDITIONAL_FOLDER;
|
|
10
|
+
private static readonly REMOTE_ADDITIONAL_FOLDER;
|
|
11
|
+
/**
|
|
12
|
+
* Generate database path without any file system operations
|
|
13
|
+
* This is a pure function that can be used synchronously
|
|
14
|
+
*/
|
|
15
|
+
private static generateDatabasePath;
|
|
16
|
+
/**
|
|
17
|
+
* Prepare database path with file system operations
|
|
18
|
+
* This handles directory creation and cleanup
|
|
19
|
+
*/
|
|
20
|
+
static prepareDatabasePath({ baseDir, databaseName, additionalFolder, removeExisting, }: DatabasePathOptions & {
|
|
21
|
+
removeExisting?: boolean;
|
|
22
|
+
}): Promise<{
|
|
23
|
+
databasePath: string;
|
|
24
|
+
alreadyExisted: boolean;
|
|
25
|
+
}>;
|
|
26
|
+
/**
|
|
27
|
+
* Generate local database path with predefined configuration
|
|
28
|
+
*/
|
|
29
|
+
static generateLocalDatabasePath(baseDir: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Generate remote database path with predefined configuration
|
|
32
|
+
*/
|
|
33
|
+
static generateRemoteDatabasePath(baseDir: string): string;
|
|
34
|
+
/**
|
|
35
|
+
* Prepare local database path with file system operations
|
|
36
|
+
*/
|
|
37
|
+
static prepareLocalDatabasePath(baseDir: string, removeExisting?: boolean): Promise<{
|
|
38
|
+
databasePath: string;
|
|
39
|
+
alreadyExisted: boolean;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* Prepare remote database path with file system operations
|
|
43
|
+
*/
|
|
44
|
+
static prepareRemoteDatabasePath(baseDir: string, removeExisting?: boolean): Promise<{
|
|
45
|
+
databasePath: string;
|
|
46
|
+
alreadyExisted: boolean;
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=database-path-generator.d.ts.map
|