@squiz/job-runner-lib 1.66.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +1 -0
- package/CHANGELOG.md +726 -0
- package/build.js +17 -0
- package/jest.config.ts +24 -0
- package/jest.integration.config.ts +27 -0
- package/lib/TestHelpers.d.ts +18 -0
- package/lib/TestHelpers.js +97 -0
- package/lib/TestHelpers.js.map +1 -0
- package/lib/domains/__test__/createPackage.d.ts +3 -0
- package/lib/domains/__test__/createPackage.js +45 -0
- package/lib/domains/__test__/createPackage.js.map +1 -0
- package/lib/domains/__test__/loadAllUnitTestComponents.d.ts +3 -0
- package/lib/domains/__test__/loadAllUnitTestComponents.js +63 -0
- package/lib/domains/__test__/loadAllUnitTestComponents.js.map +1 -0
- package/lib/domains/component/component-context/__mocks__/mockedManifestModel.d.ts +3 -0
- package/lib/domains/component/component-context/__mocks__/mockedManifestModel.js +33 -0
- package/lib/domains/component/component-context/__mocks__/mockedManifestModel.js.map +1 -0
- package/lib/domains/component/component-context/__mocks__/mockedUriObj.d.ts +3 -0
- package/lib/domains/component/component-context/__mocks__/mockedUriObj.js +38 -0
- package/lib/domains/component/component-context/__mocks__/mockedUriObj.js.map +1 -0
- package/lib/domains/component/component-context/__mocks__/mockedUriObjPreview.d.ts +3 -0
- package/lib/domains/component/component-context/__mocks__/mockedUriObjPreview.js +38 -0
- package/lib/domains/component/component-context/__mocks__/mockedUriObjPreview.js.map +1 -0
- package/lib/domains/component/component-context/createComponentContextualFunctions.d.ts +23 -0
- package/lib/domains/component/component-context/createComponentContextualFunctions.js +75 -0
- package/lib/domains/component/component-context/createComponentContextualFunctions.js.map +1 -0
- package/lib/domains/component/component-context/createComponentContextualFunctions.spec.d.ts +1 -0
- package/lib/domains/component/component-context/createComponentContextualFunctions.spec.js +248 -0
- package/lib/domains/component/component-context/createComponentContextualFunctions.spec.js.map +1 -0
- package/lib/domains/component/errors/ComponentError.d.ts +12 -0
- package/lib/domains/component/errors/ComponentError.js +20 -0
- package/lib/domains/component/errors/ComponentError.js.map +1 -0
- package/lib/domains/component/errors/JobError.d.ts +10 -0
- package/lib/domains/component/errors/JobError.js +18 -0
- package/lib/domains/component/errors/JobError.js.map +1 -0
- package/lib/domains/component/index.d.ts +13 -0
- package/lib/domains/component/index.js +30 -0
- package/lib/domains/component/index.js.map +1 -0
- package/lib/domains/component/models/Component.d.ts +7 -0
- package/lib/domains/component/models/Component.js +13 -0
- package/lib/domains/component/models/Component.js.map +1 -0
- package/lib/domains/component/models/Component.spec.d.ts +1 -0
- package/lib/domains/component/models/Component.spec.js +18 -0
- package/lib/domains/component/models/Component.spec.js.map +1 -0
- package/lib/domains/component/models/ComponentVersion.d.ts +18 -0
- package/lib/domains/component/models/ComponentVersion.js +35 -0
- package/lib/domains/component/models/ComponentVersion.js.map +1 -0
- package/lib/domains/component/models/ComponentVersion.spec.d.ts +1 -0
- package/lib/domains/component/models/ComponentVersion.spec.js +55 -0
- package/lib/domains/component/models/ComponentVersion.spec.js.map +1 -0
- package/lib/domains/component/repositories/ComponentRepository.d.ts +12 -0
- package/lib/domains/component/repositories/ComponentRepository.integration.spec.d.ts +1 -0
- package/lib/domains/component/repositories/ComponentRepository.integration.spec.js +111 -0
- package/lib/domains/component/repositories/ComponentRepository.integration.spec.js.map +1 -0
- package/lib/domains/component/repositories/ComponentRepository.js +28 -0
- package/lib/domains/component/repositories/ComponentRepository.js.map +1 -0
- package/lib/domains/component/repositories/ComponentVersionRepository.d.ts +21 -0
- package/lib/domains/component/repositories/ComponentVersionRepository.integration.spec.d.ts +1 -0
- package/lib/domains/component/repositories/ComponentVersionRepository.integration.spec.js +378 -0
- package/lib/domains/component/repositories/ComponentVersionRepository.integration.spec.js.map +1 -0
- package/lib/domains/component/repositories/ComponentVersionRepository.js +83 -0
- package/lib/domains/component/repositories/ComponentVersionRepository.js.map +1 -0
- package/lib/domains/component/services/ComponentService.d.ts +40 -0
- package/lib/domains/component/services/ComponentService.integration.spec.d.ts +1 -0
- package/lib/domains/component/services/ComponentService.integration.spec.js +614 -0
- package/lib/domains/component/services/ComponentService.integration.spec.js.map +1 -0
- package/lib/domains/component/services/ComponentService.js +254 -0
- package/lib/domains/component/services/ComponentService.js.map +1 -0
- package/lib/domains/component/services/content-item-uri-resolver/ComponentContentUriResolverForPreview.d.ts +12 -0
- package/lib/domains/component/services/content-item-uri-resolver/ComponentContentUriResolverForPreview.js +15 -0
- package/lib/domains/component/services/content-item-uri-resolver/ComponentContentUriResolverForPreview.js.map +1 -0
- package/lib/domains/component/services/content-item-uri-resolver/ComponentContentUriResolverForPreview.spec.d.ts +1 -0
- package/lib/domains/component/services/content-item-uri-resolver/ComponentContentUriResolverForPreview.spec.js +75 -0
- package/lib/domains/component/services/content-item-uri-resolver/ComponentContentUriResolverForPreview.spec.js.map +1 -0
- package/lib/domains/component/utils/getComponentFileSystemFolder.d.ts +1 -0
- package/lib/domains/component/utils/getComponentFileSystemFolder.js +12 -0
- package/lib/domains/component/utils/getComponentFileSystemFolder.js.map +1 -0
- package/lib/domains/component/utils/getComponentFileSystemFolder.spec.d.ts +1 -0
- package/lib/domains/component/utils/getComponentFileSystemFolder.spec.js +13 -0
- package/lib/domains/component/utils/getComponentFileSystemFolder.spec.js.map +1 -0
- package/lib/domains/component/utils/getComponentName.d.ts +1 -0
- package/lib/domains/component/utils/getComponentName.js +8 -0
- package/lib/domains/component/utils/getComponentName.js.map +1 -0
- package/lib/domains/component/utils/getComponentName.spec.d.ts +1 -0
- package/lib/domains/component/utils/getComponentName.spec.js +9 -0
- package/lib/domains/component/utils/getComponentName.spec.js.map +1 -0
- package/lib/domains/component/utils/moveFilesAndDirectories.d.ts +1 -0
- package/lib/domains/component/utils/moveFilesAndDirectories.js +33 -0
- package/lib/domains/component/utils/moveFilesAndDirectories.js.map +1 -0
- package/lib/domains/component/utils/moveFilesAndDirectories.spec.d.ts +1 -0
- package/lib/domains/component/utils/moveFilesAndDirectories.spec.js +52 -0
- package/lib/domains/component/utils/moveFilesAndDirectories.spec.js.map +1 -0
- package/lib/domains/component/web-models/ComponentForWeb.d.ts +11 -0
- package/lib/domains/component/web-models/ComponentForWeb.js +3 -0
- package/lib/domains/component/web-models/ComponentForWeb.js.map +1 -0
- package/lib/domains/component/web-models/ComponentVersionWebModel.d.ts +15 -0
- package/lib/domains/component/web-models/ComponentVersionWebModel.js +3 -0
- package/lib/domains/component/web-models/ComponentVersionWebModel.js.map +1 -0
- package/lib/domains/component/web-models/ComponentsForWeb.d.ts +17 -0
- package/lib/domains/component/web-models/ComponentsForWeb.js +3 -0
- package/lib/domains/component/web-models/ComponentsForWeb.js.map +1 -0
- package/lib/domains/component-set/errors/InvalidEnvironmentVariablesError.d.ts +5 -0
- package/lib/domains/component-set/errors/InvalidEnvironmentVariablesError.js +14 -0
- package/lib/domains/component-set/errors/InvalidEnvironmentVariablesError.js.map +1 -0
- package/lib/domains/component-set/index.d.ts +13 -0
- package/lib/domains/component-set/index.js +30 -0
- package/lib/domains/component-set/index.js.map +1 -0
- package/lib/domains/component-set/models/ComponentSet.d.ts +20 -0
- package/lib/domains/component-set/models/ComponentSet.js +28 -0
- package/lib/domains/component-set/models/ComponentSet.js.map +1 -0
- package/lib/domains/component-set/models/ComponentSet.spec.d.ts +1 -0
- package/lib/domains/component-set/models/ComponentSet.spec.js +45 -0
- package/lib/domains/component-set/models/ComponentSet.spec.js.map +1 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersion.d.ts +23 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersion.js +29 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersion.js.map +1 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersion.spec.d.ts +1 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersion.spec.js +83 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersion.spec.js.map +1 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersionEditable.d.ts +12 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersionEditable.js +57 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersionEditable.js.map +1 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersionEditable.spec.d.ts +1 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersionEditable.spec.js +60 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersionEditable.spec.js.map +1 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersionExcluded.d.ts +11 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersionExcluded.js +17 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersionExcluded.js.map +1 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersionExcluded.spec.d.ts +1 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersionExcluded.spec.js +34 -0
- package/lib/domains/component-set/models/ComponentSetComponentVersionExcluded.spec.js.map +1 -0
- package/lib/domains/component-set/models/ComponentSetRule.d.ts +12 -0
- package/lib/domains/component-set/models/ComponentSetRule.js +50 -0
- package/lib/domains/component-set/models/ComponentSetRule.js.map +1 -0
- package/lib/domains/component-set/models/ComponentSetRule.spec.d.ts +1 -0
- package/lib/domains/component-set/models/ComponentSetRule.spec.js +29 -0
- package/lib/domains/component-set/models/ComponentSetRule.spec.js.map +1 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionEditableRepository.d.ts +10 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionEditableRepository.integration.spec.d.ts +1 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionEditableRepository.integration.spec.js +127 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionEditableRepository.integration.spec.js.map +1 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionEditableRepository.js +37 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionEditableRepository.js.map +1 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionExcludedRepository.d.ts +10 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionExcludedRepository.integration.spec.d.ts +1 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionExcludedRepository.integration.spec.js +127 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionExcludedRepository.integration.spec.js.map +1 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionExcludedRepository.js +37 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionExcludedRepository.js.map +1 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionRepository.d.ts +10 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionRepository.integration.spec.d.ts +1 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionRepository.integration.spec.js +163 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionRepository.integration.spec.js.map +1 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionRepository.js +22 -0
- package/lib/domains/component-set/repositories/ComponentSetComponentVersionRepository.js.map +1 -0
- package/lib/domains/component-set/repositories/ComponentSetRepository.d.ts +13 -0
- package/lib/domains/component-set/repositories/ComponentSetRepository.integration.spec.d.ts +1 -0
- package/lib/domains/component-set/repositories/ComponentSetRepository.integration.spec.js +161 -0
- package/lib/domains/component-set/repositories/ComponentSetRepository.integration.spec.js.map +1 -0
- package/lib/domains/component-set/repositories/ComponentSetRepository.js +48 -0
- package/lib/domains/component-set/repositories/ComponentSetRepository.js.map +1 -0
- package/lib/domains/component-set/repositories/ComponentSetRuleRepository.d.ts +13 -0
- package/lib/domains/component-set/repositories/ComponentSetRuleRepository.integration.spec.d.ts +1 -0
- package/lib/domains/component-set/repositories/ComponentSetRuleRepository.integration.spec.js +88 -0
- package/lib/domains/component-set/repositories/ComponentSetRuleRepository.integration.spec.js.map +1 -0
- package/lib/domains/component-set/repositories/ComponentSetRuleRepository.js +55 -0
- package/lib/domains/component-set/repositories/ComponentSetRuleRepository.js.map +1 -0
- package/lib/domains/component-set/services/ComponentSetRuleService.d.ts +10 -0
- package/lib/domains/component-set/services/ComponentSetRuleService.integration.spec.d.ts +1 -0
- package/lib/domains/component-set/services/ComponentSetRuleService.integration.spec.js +107 -0
- package/lib/domains/component-set/services/ComponentSetRuleService.integration.spec.js.map +1 -0
- package/lib/domains/component-set/services/ComponentSetRuleService.js +23 -0
- package/lib/domains/component-set/services/ComponentSetRuleService.js.map +1 -0
- package/lib/domains/component-set/services/ComponentSetService.d.ts +37 -0
- package/lib/domains/component-set/services/ComponentSetService.js +13 -0
- package/lib/domains/component-set/services/ComponentSetService.js.map +1 -0
- package/lib/domains/component-set/services/ComponentSetService.spec.d.ts +1 -0
- package/lib/domains/component-set/services/ComponentSetService.spec.js +120 -0
- package/lib/domains/component-set/services/ComponentSetService.spec.js.map +1 -0
- package/lib/domains/component-set/services/ComponentSetServiceForLocalDev.d.ts +24 -0
- package/lib/domains/component-set/services/ComponentSetServiceForLocalDev.js +85 -0
- package/lib/domains/component-set/services/ComponentSetServiceForLocalDev.js.map +1 -0
- package/lib/domains/component-set/services/ComponentSetServiceForLocalDev.spec.d.ts +1 -0
- package/lib/domains/component-set/services/ComponentSetServiceForLocalDev.spec.js +141 -0
- package/lib/domains/component-set/services/ComponentSetServiceForLocalDev.spec.js.map +1 -0
- package/lib/domains/component-set/services/ComponentSetServiceForProduction.d.ts +53 -0
- package/lib/domains/component-set/services/ComponentSetServiceForProduction.integration.spec.d.ts +1 -0
- package/lib/domains/component-set/services/ComponentSetServiceForProduction.integration.spec.js +2565 -0
- package/lib/domains/component-set/services/ComponentSetServiceForProduction.integration.spec.js.map +1 -0
- package/lib/domains/component-set/services/ComponentSetServiceForProduction.js +601 -0
- package/lib/domains/component-set/services/ComponentSetServiceForProduction.js.map +1 -0
- package/lib/domains/component-set/services/EnvironmentVariables.d.ts +1 -0
- package/lib/domains/component-set/services/EnvironmentVariables.js +3 -0
- package/lib/domains/component-set/services/EnvironmentVariables.js.map +1 -0
- package/lib/domains/component-set/services/Headers.d.ts +1 -0
- package/lib/domains/component-set/services/Headers.js +3 -0
- package/lib/domains/component-set/services/Headers.js.map +1 -0
- package/lib/domains/component-set/services/RuntimeComponentSet.d.ts +6 -0
- package/lib/domains/component-set/services/RuntimeComponentSet.js +3 -0
- package/lib/domains/component-set/services/RuntimeComponentSet.js.map +1 -0
- package/lib/domains/component-set/web-models/ComponentSetComponentVersionForWeb.d.ts +5 -0
- package/lib/domains/component-set/web-models/ComponentSetComponentVersionForWeb.js +3 -0
- package/lib/domains/component-set/web-models/ComponentSetComponentVersionForWeb.js.map +1 -0
- package/lib/domains/component-set/web-models/ComponentSetForWeb.d.ts +64 -0
- package/lib/domains/component-set/web-models/ComponentSetForWeb.js +22 -0
- package/lib/domains/component-set/web-models/ComponentSetForWeb.js.map +1 -0
- package/lib/domains/content/index.d.ts +4 -0
- package/lib/domains/content/index.js +21 -0
- package/lib/domains/content/index.js.map +1 -0
- package/lib/domains/content/services/ComponentContentSchemaService.d.ts +9 -0
- package/lib/domains/content/services/ComponentContentSchemaService.js +45 -0
- package/lib/domains/content/services/ComponentContentSchemaService.js.map +1 -0
- package/lib/domains/content/services/ComponentContentSchemaService.spec.d.ts +1 -0
- package/lib/domains/content/services/ComponentContentSchemaService.spec.js +240 -0
- package/lib/domains/content/services/ComponentContentSchemaService.spec.js.map +1 -0
- package/lib/domains/content/services/ContentItemService.d.ts +7 -0
- package/lib/domains/content/services/ContentItemService.js +36 -0
- package/lib/domains/content/services/ContentItemService.js.map +1 -0
- package/lib/domains/content/services/ContentItemService.spec.d.ts +1 -0
- package/lib/domains/content/services/ContentItemService.spec.js +95 -0
- package/lib/domains/content/services/ContentItemService.spec.js.map +1 -0
- package/lib/domains/content/services/DynamicContentItemService.d.ts +8 -0
- package/lib/domains/content/services/DynamicContentItemService.js +31 -0
- package/lib/domains/content/services/DynamicContentItemService.js.map +1 -0
- package/lib/domains/content/services/DynamicContentItemService.spec.d.ts +1 -0
- package/lib/domains/content/services/DynamicContentItemService.spec.js +81 -0
- package/lib/domains/content/services/DynamicContentItemService.spec.js.map +1 -0
- package/lib/domains/content/utils/getContentSchemaName.d.ts +1 -0
- package/lib/domains/content/utils/getContentSchemaName.js +8 -0
- package/lib/domains/content/utils/getContentSchemaName.js.map +1 -0
- package/lib/domains/content/utils/getContentSchemaName.spec.d.ts +1 -0
- package/lib/domains/content/utils/getContentSchemaName.spec.js +9 -0
- package/lib/domains/content/utils/getContentSchemaName.spec.js.map +1 -0
- package/lib/domains/db/ComponentConnectionManager.d.ts +3 -0
- package/lib/domains/db/ComponentConnectionManager.js +3 -0
- package/lib/domains/db/ComponentConnectionManager.js.map +1 -0
- package/lib/domains/db/ComponentRepositories.d.ts +19 -0
- package/lib/domains/db/ComponentRepositories.js +23 -0
- package/lib/domains/db/ComponentRepositories.js.map +1 -0
- package/lib/domains/db/createConnectionManager.d.ts +5 -0
- package/lib/domains/db/createConnectionManager.js +16 -0
- package/lib/domains/db/createConnectionManager.js.map +1 -0
- package/lib/domains/db/index.d.ts +3 -0
- package/lib/domains/db/index.js +20 -0
- package/lib/domains/db/index.js.map +1 -0
- package/lib/domains/db/migration-list.d.ts +2 -0
- package/lib/domains/db/migration-list.js +19 -0
- package/lib/domains/db/migration-list.js.map +1 -0
- package/lib/domains/job/ParsePartitionKey/ParsePartitionKey.d.ts +2 -0
- package/lib/domains/job/ParsePartitionKey/ParsePartitionKey.js +24 -0
- package/lib/domains/job/ParsePartitionKey/ParsePartitionKey.js.map +1 -0
- package/lib/domains/job/ParsePartitionKey/ParsePartitionKey.spec.d.ts +5 -0
- package/lib/domains/job/ParsePartitionKey/ParsePartitionKey.spec.js +24 -0
- package/lib/domains/job/ParsePartitionKey/ParsePartitionKey.spec.js.map +1 -0
- package/lib/domains/job/ParsePartitionKey/index.d.ts +1 -0
- package/lib/domains/job/ParsePartitionKey/index.js +18 -0
- package/lib/domains/job/ParsePartitionKey/index.js.map +1 -0
- package/lib/domains/job/constants/JobExecutionStatus.constants.d.ts +8 -0
- package/lib/domains/job/constants/JobExecutionStatus.constants.js +12 -0
- package/lib/domains/job/constants/JobExecutionStatus.constants.js.map +1 -0
- package/lib/domains/job/constants/QueryParams.d.ts +14 -0
- package/lib/domains/job/constants/QueryParams.js +19 -0
- package/lib/domains/job/constants/QueryParams.js.map +1 -0
- package/lib/domains/job/constants/Repository.constants.d.ts +12 -0
- package/lib/domains/job/constants/Repository.constants.js +15 -0
- package/lib/domains/job/constants/Repository.constants.js.map +1 -0
- package/lib/domains/job/core/dynamoClient.mock.d.ts +8 -0
- package/lib/domains/job/core/dynamoClient.mock.js +32 -0
- package/lib/domains/job/core/dynamoClient.mock.js.map +1 -0
- package/lib/domains/job/core/pagination/index.d.ts +3 -0
- package/lib/domains/job/core/pagination/index.js +20 -0
- package/lib/domains/job/core/pagination/index.js.map +1 -0
- package/lib/domains/job/core/pagination/model/PageQuery.d.ts +28 -0
- package/lib/domains/job/core/pagination/model/PageQuery.js +7 -0
- package/lib/domains/job/core/pagination/model/PageQuery.js.map +1 -0
- package/lib/domains/job/core/pagination/model/PaginationInfo.d.ts +35 -0
- package/lib/domains/job/core/pagination/model/PaginationInfo.js +7 -0
- package/lib/domains/job/core/pagination/model/PaginationInfo.js.map +1 -0
- package/lib/domains/job/core/pagination/model/PaginationKey.d.ts +2 -0
- package/lib/domains/job/core/pagination/model/PaginationKey.js +3 -0
- package/lib/domains/job/core/pagination/model/PaginationKey.js.map +1 -0
- package/lib/domains/job/core/pagination/model/PaginationLinks.d.ts +27 -0
- package/lib/domains/job/core/pagination/model/PaginationLinks.js +7 -0
- package/lib/domains/job/core/pagination/model/PaginationLinks.js.map +1 -0
- package/lib/domains/job/core/pagination/model/PaginationQueryParams.d.ts +14 -0
- package/lib/domains/job/core/pagination/model/PaginationQueryParams.js +3 -0
- package/lib/domains/job/core/pagination/model/PaginationQueryParams.js.map +1 -0
- package/lib/domains/job/core/pagination/model/PaginationQueryResponse.d.ts +24 -0
- package/lib/domains/job/core/pagination/model/PaginationQueryResponse.js +7 -0
- package/lib/domains/job/core/pagination/model/PaginationQueryResponse.js.map +1 -0
- package/lib/domains/job/core/pagination/model/PaginationResponse.d.ts +43 -0
- package/lib/domains/job/core/pagination/model/PaginationResponse.js +7 -0
- package/lib/domains/job/core/pagination/model/PaginationResponse.js.map +1 -0
- package/lib/domains/job/core/pagination/model/PaginationTypes.d.ts +39 -0
- package/lib/domains/job/core/pagination/model/PaginationTypes.js +29 -0
- package/lib/domains/job/core/pagination/model/PaginationTypes.js.map +1 -0
- package/lib/domains/job/core/pagination/model/index.d.ts +8 -0
- package/lib/domains/job/core/pagination/model/index.js +25 -0
- package/lib/domains/job/core/pagination/model/index.js.map +1 -0
- package/lib/domains/job/core/pagination/services/PaginationService.d.ts +41 -0
- package/lib/domains/job/core/pagination/services/PaginationService.js +129 -0
- package/lib/domains/job/core/pagination/services/PaginationService.js.map +1 -0
- package/lib/domains/job/core/pagination/services/PaginationService.spec.d.ts +5 -0
- package/lib/domains/job/core/pagination/services/PaginationService.spec.js +179 -0
- package/lib/domains/job/core/pagination/services/PaginationService.spec.js.map +1 -0
- package/lib/domains/job/core/pagination/services/index.d.ts +1 -0
- package/lib/domains/job/core/pagination/services/index.js +18 -0
- package/lib/domains/job/core/pagination/services/index.js.map +1 -0
- package/lib/domains/job/core/pagination/utils/PaginationUtils.d.ts +48 -0
- package/lib/domains/job/core/pagination/utils/PaginationUtils.js +139 -0
- package/lib/domains/job/core/pagination/utils/PaginationUtils.js.map +1 -0
- package/lib/domains/job/core/pagination/utils/PaginationUtils.spec.d.ts +5 -0
- package/lib/domains/job/core/pagination/utils/PaginationUtils.spec.js +212 -0
- package/lib/domains/job/core/pagination/utils/PaginationUtils.spec.js.map +1 -0
- package/lib/domains/job/core/pagination/utils/index.d.ts +1 -0
- package/lib/domains/job/core/pagination/utils/index.js +18 -0
- package/lib/domains/job/core/pagination/utils/index.js.map +1 -0
- package/lib/domains/job/errors/BadRequestError.d.ts +15 -0
- package/lib/domains/job/errors/BadRequestError.js +23 -0
- package/lib/domains/job/errors/BadRequestError.js.map +1 -0
- package/lib/domains/job/errors/Error.constants.d.ts +32 -0
- package/lib/domains/job/errors/Error.constants.js +36 -0
- package/lib/domains/job/errors/Error.constants.js.map +1 -0
- package/lib/domains/job/errors/ErrorWithHttpStatusCode.d.ts +16 -0
- package/lib/domains/job/errors/ErrorWithHttpStatusCode.js +23 -0
- package/lib/domains/job/errors/ErrorWithHttpStatusCode.js.map +1 -0
- package/lib/domains/job/errors/ExecutionStatusError.d.ts +3 -0
- package/lib/domains/job/errors/ExecutionStatusError.js +11 -0
- package/lib/domains/job/errors/ExecutionStatusError.js.map +1 -0
- package/lib/domains/job/errors/InternalServerError.d.ts +15 -0
- package/lib/domains/job/errors/InternalServerError.js +23 -0
- package/lib/domains/job/errors/InternalServerError.js.map +1 -0
- package/lib/domains/job/errors/NotFoundError.d.ts +14 -0
- package/lib/domains/job/errors/NotFoundError.js +22 -0
- package/lib/domains/job/errors/NotFoundError.js.map +1 -0
- package/lib/domains/job/errors/NotImplementedError.d.ts +15 -0
- package/lib/domains/job/errors/NotImplementedError.js +23 -0
- package/lib/domains/job/errors/NotImplementedError.js.map +1 -0
- package/lib/domains/job/errors/UnprocessableContent.d.ts +15 -0
- package/lib/domains/job/errors/UnprocessableContent.js +23 -0
- package/lib/domains/job/errors/UnprocessableContent.js.map +1 -0
- package/lib/domains/job/errors/index.d.ts +8 -0
- package/lib/domains/job/errors/index.js +25 -0
- package/lib/domains/job/errors/index.js.map +1 -0
- package/lib/domains/job/index.d.ts +16 -0
- package/lib/domains/job/index.js +33 -0
- package/lib/domains/job/index.js.map +1 -0
- package/lib/domains/job/manifest/JobManifestTypes.d.ts +126 -0
- package/lib/domains/job/manifest/JobManifestTypes.js +7 -0
- package/lib/domains/job/manifest/JobManifestTypes.js.map +1 -0
- package/lib/domains/job/manifest/JobManifestV1.d.ts +17 -0
- package/lib/domains/job/manifest/JobManifestV1.js +58 -0
- package/lib/domains/job/manifest/JobManifestV1.js.map +1 -0
- package/lib/domains/job/manifest/JobManifestV1.spec.d.ts +1 -0
- package/lib/domains/job/manifest/JobManifestV1.spec.js +136 -0
- package/lib/domains/job/manifest/JobManifestV1.spec.js.map +1 -0
- package/lib/domains/job/manifest/index.d.ts +5 -0
- package/lib/domains/job/manifest/index.js +22 -0
- package/lib/domains/job/manifest/index.js.map +1 -0
- package/lib/domains/job/manifest/mocks/JobManifest.mock.d.ts +7 -0
- package/lib/domains/job/manifest/mocks/JobManifest.mock.js +36 -0
- package/lib/domains/job/manifest/mocks/JobManifest.mock.js.map +1 -0
- package/lib/domains/job/manifest/mocks/JobManifestDto.mock.d.ts +7 -0
- package/lib/domains/job/manifest/mocks/JobManifestDto.mock.js +48 -0
- package/lib/domains/job/manifest/mocks/JobManifestDto.mock.js.map +1 -0
- package/lib/domains/job/manifest/mocks/JobManifestRecord.mock.d.ts +7 -0
- package/lib/domains/job/manifest/mocks/JobManifestRecord.mock.js +38 -0
- package/lib/domains/job/manifest/mocks/JobManifestRecord.mock.js.map +1 -0
- package/lib/domains/job/manifest/mocks/JobManifestRequest.mock.d.ts +6 -0
- package/lib/domains/job/manifest/mocks/JobManifestRequest.mock.js +29 -0
- package/lib/domains/job/manifest/mocks/JobManifestRequest.mock.js.map +1 -0
- package/lib/domains/job/model/Base/Base.d.ts +40 -0
- package/lib/domains/job/model/Base/Base.js +3 -0
- package/lib/domains/job/model/Base/Base.js.map +1 -0
- package/lib/domains/job/model/Base/index.d.ts +1 -0
- package/lib/domains/job/model/Base/index.js +18 -0
- package/lib/domains/job/model/Base/index.js.map +1 -0
- package/lib/domains/job/model/Job/Job.d.ts +85 -0
- package/lib/domains/job/model/Job/Job.js +7 -0
- package/lib/domains/job/model/Job/Job.js.map +1 -0
- package/lib/domains/job/model/Job/index.d.ts +5 -0
- package/lib/domains/job/model/Job/index.js +22 -0
- package/lib/domains/job/model/Job/index.js.map +1 -0
- package/lib/domains/job/model/Job/mocks/Job.mock.d.ts +7 -0
- package/lib/domains/job/model/Job/mocks/Job.mock.js +28 -0
- package/lib/domains/job/model/Job/mocks/Job.mock.js.map +1 -0
- package/lib/domains/job/model/Job/mocks/JobDto.mock.d.ts +7 -0
- package/lib/domains/job/model/Job/mocks/JobDto.mock.js +39 -0
- package/lib/domains/job/model/Job/mocks/JobDto.mock.js.map +1 -0
- package/lib/domains/job/model/Job/mocks/JobRecord.mock.d.ts +7 -0
- package/lib/domains/job/model/Job/mocks/JobRecord.mock.js +29 -0
- package/lib/domains/job/model/Job/mocks/JobRecord.mock.js.map +1 -0
- package/lib/domains/job/model/Job/mocks/JobRequest.mock.d.ts +6 -0
- package/lib/domains/job/model/Job/mocks/JobRequest.mock.js +21 -0
- package/lib/domains/job/model/Job/mocks/JobRequest.mock.js.map +1 -0
- package/lib/domains/job/model/JobContext/JobContext.d.ts +87 -0
- package/lib/domains/job/model/JobContext/JobContext.js +7 -0
- package/lib/domains/job/model/JobContext/JobContext.js.map +1 -0
- package/lib/domains/job/model/JobContext/index.d.ts +5 -0
- package/lib/domains/job/model/JobContext/index.js +22 -0
- package/lib/domains/job/model/JobContext/index.js.map +1 -0
- package/lib/domains/job/model/JobContext/mocks/JobContext.mock.d.ts +7 -0
- package/lib/domains/job/model/JobContext/mocks/JobContext.mock.js +35 -0
- package/lib/domains/job/model/JobContext/mocks/JobContext.mock.js.map +1 -0
- package/lib/domains/job/model/JobContext/mocks/JobContextDto.mock.d.ts +7 -0
- package/lib/domains/job/model/JobContext/mocks/JobContextDto.mock.js +46 -0
- package/lib/domains/job/model/JobContext/mocks/JobContextDto.mock.js.map +1 -0
- package/lib/domains/job/model/JobContext/mocks/JobContextRecord.mock.d.ts +7 -0
- package/lib/domains/job/model/JobContext/mocks/JobContextRecord.mock.js +34 -0
- package/lib/domains/job/model/JobContext/mocks/JobContextRecord.mock.js.map +1 -0
- package/lib/domains/job/model/JobContext/mocks/JobContextRequest.mock.d.ts +6 -0
- package/lib/domains/job/model/JobContext/mocks/JobContextRequest.mock.js +25 -0
- package/lib/domains/job/model/JobContext/mocks/JobContextRequest.mock.js.map +1 -0
- package/lib/domains/job/model/JobExecution/JobExecution.d.ts +189 -0
- package/lib/domains/job/model/JobExecution/JobExecution.js +7 -0
- package/lib/domains/job/model/JobExecution/JobExecution.js.map +1 -0
- package/lib/domains/job/model/JobExecution/index.d.ts +5 -0
- package/lib/domains/job/model/JobExecution/index.js +22 -0
- package/lib/domains/job/model/JobExecution/index.js.map +1 -0
- package/lib/domains/job/model/JobExecution/mocks/JobExecution.mock.d.ts +7 -0
- package/lib/domains/job/model/JobExecution/mocks/JobExecution.mock.js +45 -0
- package/lib/domains/job/model/JobExecution/mocks/JobExecution.mock.js.map +1 -0
- package/lib/domains/job/model/JobExecution/mocks/JobExecutionDto.mock.d.ts +7 -0
- package/lib/domains/job/model/JobExecution/mocks/JobExecutionDto.mock.js +64 -0
- package/lib/domains/job/model/JobExecution/mocks/JobExecutionDto.mock.js.map +1 -0
- package/lib/domains/job/model/JobExecution/mocks/JobExecutionRecord.mock.d.ts +7 -0
- package/lib/domains/job/model/JobExecution/mocks/JobExecutionRecord.mock.js +48 -0
- package/lib/domains/job/model/JobExecution/mocks/JobExecutionRecord.mock.js.map +1 -0
- package/lib/domains/job/model/JobExecution/mocks/JobExecutionRequest.mock.d.ts +6 -0
- package/lib/domains/job/model/JobExecution/mocks/JobExecutionRequest.mock.js +25 -0
- package/lib/domains/job/model/JobExecution/mocks/JobExecutionRequest.mock.js.map +1 -0
- package/lib/domains/job/repository/AbstractRepository.d.ts +73 -0
- package/lib/domains/job/repository/AbstractRepository.js +174 -0
- package/lib/domains/job/repository/AbstractRepository.js.map +1 -0
- package/lib/domains/job/repository/JobContextRepository/JobContextRepository.d.ts +24 -0
- package/lib/domains/job/repository/JobContextRepository/JobContextRepository.js +169 -0
- package/lib/domains/job/repository/JobContextRepository/JobContextRepository.js.map +1 -0
- package/lib/domains/job/repository/JobContextRepository/JobContextRepository.spec.d.ts +5 -0
- package/lib/domains/job/repository/JobContextRepository/JobContextRepository.spec.js +246 -0
- package/lib/domains/job/repository/JobContextRepository/JobContextRepository.spec.js.map +1 -0
- package/lib/domains/job/repository/JobExecutionRepository/JobExecutionRepository.d.ts +47 -0
- package/lib/domains/job/repository/JobExecutionRepository/JobExecutionRepository.js +276 -0
- package/lib/domains/job/repository/JobExecutionRepository/JobExecutionRepository.js.map +1 -0
- package/lib/domains/job/repository/JobExecutionRepository/JobExecutionRepository.spec.d.ts +5 -0
- package/lib/domains/job/repository/JobExecutionRepository/JobExecutionRepository.spec.js +296 -0
- package/lib/domains/job/repository/JobExecutionRepository/JobExecutionRepository.spec.js.map +1 -0
- package/lib/domains/job/repository/JobManifestRepository/JobManifestRepository.d.ts +16 -0
- package/lib/domains/job/repository/JobManifestRepository/JobManifestRepository.js +133 -0
- package/lib/domains/job/repository/JobManifestRepository/JobManifestRepository.js.map +1 -0
- package/lib/domains/job/repository/JobManifestRepository/JobManifestRepository.spec.d.ts +5 -0
- package/lib/domains/job/repository/JobManifestRepository/JobManifestRepository.spec.js +162 -0
- package/lib/domains/job/repository/JobManifestRepository/JobManifestRepository.spec.js.map +1 -0
- package/lib/domains/job/repository/JobRepository/JobRepository.d.ts +30 -0
- package/lib/domains/job/repository/JobRepository/JobRepository.js +189 -0
- package/lib/domains/job/repository/JobRepository/JobRepository.js.map +1 -0
- package/lib/domains/job/repository/JobRepository/JobRepository.spec.d.ts +5 -0
- package/lib/domains/job/repository/JobRepository/JobRepository.spec.js +270 -0
- package/lib/domains/job/repository/JobRepository/JobRepository.spec.js.map +1 -0
- package/lib/domains/job/repository/index.d.ts +5 -0
- package/lib/domains/job/repository/index.js +22 -0
- package/lib/domains/job/repository/index.js.map +1 -0
- package/lib/domains/job/repository/mocks/mockIoc.d.ts +5 -0
- package/lib/domains/job/repository/mocks/mockIoc.js +40 -0
- package/lib/domains/job/repository/mocks/mockIoc.js.map +1 -0
- package/lib/domains/job/services/JobExecutionTaskService/JobExecutionTaskService.d.ts +13 -0
- package/lib/domains/job/services/JobExecutionTaskService/JobExecutionTaskService.defs.d.ts +39 -0
- package/lib/domains/job/services/JobExecutionTaskService/JobExecutionTaskService.defs.js +3 -0
- package/lib/domains/job/services/JobExecutionTaskService/JobExecutionTaskService.defs.js.map +1 -0
- package/lib/domains/job/services/JobExecutionTaskService/JobExecutionTaskService.js +139 -0
- package/lib/domains/job/services/JobExecutionTaskService/JobExecutionTaskService.js.map +1 -0
- package/lib/domains/job/services/JobExecutionTaskService/JobExecutionTaskService.spec.d.ts +1 -0
- package/lib/domains/job/services/JobExecutionTaskService/JobExecutionTaskService.spec.js +78 -0
- package/lib/domains/job/services/JobExecutionTaskService/JobExecutionTaskService.spec.js.map +1 -0
- package/lib/domains/job/services/index.d.ts +1 -0
- package/lib/domains/job/services/index.js +18 -0
- package/lib/domains/job/services/index.js.map +1 -0
- package/lib/domains/job/singletonProvider.d.ts +6 -0
- package/lib/domains/job/singletonProvider.js +14 -0
- package/lib/domains/job/singletonProvider.js.map +1 -0
- package/lib/domains/job/transientProvider.d.ts +6 -0
- package/lib/domains/job/transientProvider.js +14 -0
- package/lib/domains/job/transientProvider.js.map +1 -0
- package/lib/domains/job/utils/SlackClient/SlackClient.d.ts +44 -0
- package/lib/domains/job/utils/SlackClient/SlackClient.js +113 -0
- package/lib/domains/job/utils/SlackClient/SlackClient.js.map +1 -0
- package/lib/domains/job/utils/SlackClient/SlackClient.spec.d.ts +5 -0
- package/lib/domains/job/utils/SlackClient/SlackClient.spec.js +116 -0
- package/lib/domains/job/utils/SlackClient/SlackClient.spec.js.map +1 -0
- package/lib/domains/job/utils/SlackClient/types/SlackClient.types.d.ts +56 -0
- package/lib/domains/job/utils/SlackClient/types/SlackClient.types.js +28 -0
- package/lib/domains/job/utils/SlackClient/types/SlackClient.types.js.map +1 -0
- package/lib/domains/job/utils/SortByTimeQueued/SortByTimeQueued.d.ts +9 -0
- package/lib/domains/job/utils/SortByTimeQueued/SortByTimeQueued.js +21 -0
- package/lib/domains/job/utils/SortByTimeQueued/SortByTimeQueued.js.map +1 -0
- package/lib/domains/job/utils/SortByTimeQueued/SortByTimeQueued.spec.d.ts +5 -0
- package/lib/domains/job/utils/SortByTimeQueued/SortByTimeQueued.spec.js +26 -0
- package/lib/domains/job/utils/SortByTimeQueued/SortByTimeQueued.spec.js.map +1 -0
- package/lib/domains/job/utils/index.d.ts +3 -0
- package/lib/domains/job/utils/index.js +20 -0
- package/lib/domains/job/utils/index.js.map +1 -0
- package/lib/domains/manifest/AbstractManifest.d.ts +38 -0
- package/lib/domains/manifest/AbstractManifest.js +45 -0
- package/lib/domains/manifest/AbstractManifest.js.map +1 -0
- package/lib/domains/manifest/ManifestModel.d.ts +7 -0
- package/lib/domains/manifest/ManifestModel.js +3 -0
- package/lib/domains/manifest/ManifestModel.js.map +1 -0
- package/lib/domains/manifest/ManifestV1.d.ts +18 -0
- package/lib/domains/manifest/ManifestV1.js +124 -0
- package/lib/domains/manifest/ManifestV1.js.map +1 -0
- package/lib/domains/manifest/ManifestV1.spec.d.ts +1 -0
- package/lib/domains/manifest/ManifestV1.spec.js +347 -0
- package/lib/domains/manifest/ManifestV1.spec.js.map +1 -0
- package/lib/domains/manifest/errors/ManifestLocationError.d.ts +5 -0
- package/lib/domains/manifest/errors/ManifestLocationError.js +13 -0
- package/lib/domains/manifest/errors/ManifestLocationError.js.map +1 -0
- package/lib/domains/manifest/errors/ManifestValidationError.d.ts +3 -0
- package/lib/domains/manifest/errors/ManifestValidationError.js +12 -0
- package/lib/domains/manifest/errors/ManifestValidationError.js.map +1 -0
- package/lib/domains/manifest/index.d.ts +16 -0
- package/lib/domains/manifest/index.js +33 -0
- package/lib/domains/manifest/index.js.map +1 -0
- package/lib/domains/manifest/services/AbstractManifestService.d.ts +49 -0
- package/lib/domains/manifest/services/AbstractManifestService.js +235 -0
- package/lib/domains/manifest/services/AbstractManifestService.js.map +1 -0
- package/lib/domains/manifest/services/AbstractManifestService.spec.d.ts +1 -0
- package/lib/domains/manifest/services/AbstractManifestService.spec.js +301 -0
- package/lib/domains/manifest/services/AbstractManifestService.spec.js.map +1 -0
- package/lib/domains/manifest/services/ComponentFunctionService.d.ts +35 -0
- package/lib/domains/manifest/services/ComponentFunctionService.js +129 -0
- package/lib/domains/manifest/services/ComponentFunctionService.js.map +1 -0
- package/lib/domains/manifest/services/ComponentFunctionService.spec.d.ts +1 -0
- package/lib/domains/manifest/services/ComponentFunctionService.spec.js +567 -0
- package/lib/domains/manifest/services/ComponentFunctionService.spec.js.map +1 -0
- package/lib/domains/manifest/services/ComponentInputValidationService.d.ts +5 -0
- package/lib/domains/manifest/services/ComponentInputValidationService.js +11 -0
- package/lib/domains/manifest/services/ComponentInputValidationService.js.map +1 -0
- package/lib/domains/manifest/services/ComponentSchemaValidationService.d.ts +5 -0
- package/lib/domains/manifest/services/ComponentSchemaValidationService.js +11 -0
- package/lib/domains/manifest/services/ComponentSchemaValidationService.js.map +1 -0
- package/lib/domains/manifest/services/JobFunctionService.d.ts +12 -0
- package/lib/domains/manifest/services/JobFunctionService.js +23 -0
- package/lib/domains/manifest/services/JobFunctionService.js.map +1 -0
- package/lib/domains/manifest/services/JobFunctionService.spec.d.ts +1 -0
- package/lib/domains/manifest/services/JobFunctionService.spec.js +132 -0
- package/lib/domains/manifest/services/JobFunctionService.spec.js.map +1 -0
- package/lib/domains/manifest/services/ManifestServiceForDev.d.ts +18 -0
- package/lib/domains/manifest/services/ManifestServiceForDev.js +83 -0
- package/lib/domains/manifest/services/ManifestServiceForDev.js.map +1 -0
- package/lib/domains/manifest/services/ManifestServiceForDev.spec.d.ts +1 -0
- package/lib/domains/manifest/services/ManifestServiceForDev.spec.js +184 -0
- package/lib/domains/manifest/services/ManifestServiceForDev.spec.js.map +1 -0
- package/lib/domains/manifest/services/ManifestServiceForProduction.d.ts +12 -0
- package/lib/domains/manifest/services/ManifestServiceForProduction.js +81 -0
- package/lib/domains/manifest/services/ManifestServiceForProduction.js.map +1 -0
- package/lib/domains/manifest/services/ManifestServiceForProduction.spec.d.ts +1 -0
- package/lib/domains/manifest/services/ManifestServiceForProduction.spec.js +81 -0
- package/lib/domains/manifest/services/ManifestServiceForProduction.spec.js.map +1 -0
- package/lib/domains/manifest/utils/assertFuncEntryFilesAreValid.d.ts +3 -0
- package/lib/domains/manifest/utils/assertFuncEntryFilesAreValid.js +14 -0
- package/lib/domains/manifest/utils/assertFuncEntryFilesAreValid.js.map +1 -0
- package/lib/domains/manifest/utils/assertStaticFilesAreValid.d.ts +3 -0
- package/lib/domains/manifest/utils/assertStaticFilesAreValid.js +27 -0
- package/lib/domains/manifest/utils/assertStaticFilesAreValid.js.map +1 -0
- package/lib/domains/manifest/utils/assertStaticFilesHaveAbsolutePath.d.ts +2 -0
- package/lib/domains/manifest/utils/assertStaticFilesHaveAbsolutePath.js +16 -0
- package/lib/domains/manifest/utils/assertStaticFilesHaveAbsolutePath.js.map +1 -0
- package/lib/domains/manifest/utils/assertStaticFilesHaveAbsolutePath.spec.d.ts +1 -0
- package/lib/domains/manifest/utils/assertStaticFilesHaveAbsolutePath.spec.js +111 -0
- package/lib/domains/manifest/utils/assertStaticFilesHaveAbsolutePath.spec.js.map +1 -0
- package/lib/domains/manifest/utils/getAndAssertJobManifestVersion.d.ts +3 -0
- package/lib/domains/manifest/utils/getAndAssertJobManifestVersion.js +28 -0
- package/lib/domains/manifest/utils/getAndAssertJobManifestVersion.js.map +1 -0
- package/lib/domains/manifest/utils/getAndAssertJobManifestVersion.spec.d.ts +1 -0
- package/lib/domains/manifest/utils/getAndAssertJobManifestVersion.spec.js +115 -0
- package/lib/domains/manifest/utils/getAndAssertJobManifestVersion.spec.js.map +1 -0
- package/lib/domains/manifest/utils/getAndAssertManifestVersion.d.ts +3 -0
- package/lib/domains/manifest/utils/getAndAssertManifestVersion.js +23 -0
- package/lib/domains/manifest/utils/getAndAssertManifestVersion.js.map +1 -0
- package/lib/domains/manifest/utils/getAndAssertManifestVersion.spec.d.ts +1 -0
- package/lib/domains/manifest/utils/getAndAssertManifestVersion.spec.js +109 -0
- package/lib/domains/manifest/utils/getAndAssertManifestVersion.spec.js.map +1 -0
- package/lib/domains/manifest/utils/isValidManifestVersion.d.ts +2 -0
- package/lib/domains/manifest/utils/isValidManifestVersion.js +12 -0
- package/lib/domains/manifest/utils/isValidManifestVersion.js.map +1 -0
- package/lib/domains/manifest/utils/isValidManifestVersion.spec.d.ts +1 -0
- package/lib/domains/manifest/utils/isValidManifestVersion.spec.js +19 -0
- package/lib/domains/manifest/utils/isValidManifestVersion.spec.js.map +1 -0
- package/lib/domains/url/convertFunctionStaticFilesToFqdn.d.ts +1 -0
- package/lib/domains/url/convertFunctionStaticFilesToFqdn.js +22 -0
- package/lib/domains/url/convertFunctionStaticFilesToFqdn.js.map +1 -0
- package/lib/domains/url/convertFunctionStaticFilesToFqdn.spec.d.ts +1 -0
- package/lib/domains/url/convertFunctionStaticFilesToFqdn.spec.js +16 -0
- package/lib/domains/url/convertFunctionStaticFilesToFqdn.spec.js.map +1 -0
- package/lib/domains/url/convertFunctionStaticFilesToFqdnForPreview.d.ts +1 -0
- package/lib/domains/url/convertFunctionStaticFilesToFqdnForPreview.js +22 -0
- package/lib/domains/url/convertFunctionStaticFilesToFqdnForPreview.js.map +1 -0
- package/lib/domains/url/convertFunctionStaticFilesToFqdnForPreview.spec.d.ts +1 -0
- package/lib/domains/url/convertFunctionStaticFilesToFqdnForPreview.spec.js +16 -0
- package/lib/domains/url/convertFunctionStaticFilesToFqdnForPreview.spec.js.map +1 -0
- package/lib/domains/url/index.d.ts +1 -0
- package/lib/domains/url/index.js +18 -0
- package/lib/domains/url/index.js.map +1 -0
- package/lib/index.d.ts +9 -0
- package/lib/index.js +39 -0
- package/lib/index.js.map +1 -0
- package/lib/jest-global-setup.d.ts +3 -0
- package/lib/jest-global-setup.js +22 -0
- package/lib/jest-global-setup.js.map +1 -0
- package/package.json +59 -0
- package/src/TestHelpers.ts +111 -0
- package/src/custom-types.d.ts +7 -0
- package/src/domains/__test__/createPackage.ts +48 -0
- package/src/domains/__test__/loadAllUnitTestComponents.ts +73 -0
- package/src/domains/component/component-context/__mocks__/mockedManifestModel.ts +30 -0
- package/src/domains/component/component-context/__mocks__/mockedUriObj.ts +38 -0
- package/src/domains/component/component-context/__mocks__/mockedUriObjPreview.ts +38 -0
- package/src/domains/component/component-context/createComponentContextualFunctions.spec.ts +299 -0
- package/src/domains/component/component-context/createComponentContextualFunctions.ts +108 -0
- package/src/domains/component/errors/ComponentError.ts +22 -0
- package/src/domains/component/errors/JobError.ts +20 -0
- package/src/domains/component/index.ts +17 -0
- package/src/domains/component/models/Component.spec.ts +21 -0
- package/src/domains/component/models/Component.ts +16 -0
- package/src/domains/component/models/ComponentVersion.spec.ts +77 -0
- package/src/domains/component/models/ComponentVersion.ts +55 -0
- package/src/domains/component/repositories/ComponentRepository.integration.spec.ts +148 -0
- package/src/domains/component/repositories/ComponentRepository.ts +37 -0
- package/src/domains/component/repositories/ComponentVersionRepository.integration.spec.ts +523 -0
- package/src/domains/component/repositories/ComponentVersionRepository.ts +138 -0
- package/src/domains/component/services/ComponentService.integration.spec.ts +721 -0
- package/src/domains/component/services/ComponentService.ts +350 -0
- package/src/domains/component/services/content-item-uri-resolver/ComponentContentUriResolverForPreview.spec.ts +78 -0
- package/src/domains/component/services/content-item-uri-resolver/ComponentContentUriResolverForPreview.ts +18 -0
- package/src/domains/component/utils/getComponentFileSystemFolder.spec.ts +8 -0
- package/src/domains/component/utils/getComponentFileSystemFolder.ts +5 -0
- package/src/domains/component/utils/getComponentName.spec.ts +7 -0
- package/src/domains/component/utils/getComponentName.ts +3 -0
- package/src/domains/component/utils/moveFilesAndDirectories.spec.ts +62 -0
- package/src/domains/component/utils/moveFilesAndDirectories.ts +27 -0
- package/src/domains/component/web-models/ComponentForWeb.ts +11 -0
- package/src/domains/component/web-models/ComponentVersionWebModel.ts +16 -0
- package/src/domains/component/web-models/ComponentsForWeb.ts +17 -0
- package/src/domains/component-set/errors/InvalidEnvironmentVariablesError.ts +11 -0
- package/src/domains/component-set/index.ts +18 -0
- package/src/domains/component-set/models/ComponentSet.spec.ts +66 -0
- package/src/domains/component-set/models/ComponentSet.ts +67 -0
- package/src/domains/component-set/models/ComponentSetComponentVersion.spec.ts +106 -0
- package/src/domains/component-set/models/ComponentSetComponentVersion.ts +54 -0
- package/src/domains/component-set/models/ComponentSetComponentVersionEditable.spec.ts +82 -0
- package/src/domains/component-set/models/ComponentSetComponentVersionEditable.ts +46 -0
- package/src/domains/component-set/models/ComponentSetComponentVersionExcluded.spec.ts +46 -0
- package/src/domains/component-set/models/ComponentSetComponentVersionExcluded.ts +26 -0
- package/src/domains/component-set/models/ComponentSetRule.spec.ts +39 -0
- package/src/domains/component-set/models/ComponentSetRule.ts +37 -0
- package/src/domains/component-set/repositories/ComponentSetComponentVersionEditableRepository.integration.spec.ts +172 -0
- package/src/domains/component-set/repositories/ComponentSetComponentVersionEditableRepository.ts +47 -0
- package/src/domains/component-set/repositories/ComponentSetComponentVersionExcludedRepository.integration.spec.ts +172 -0
- package/src/domains/component-set/repositories/ComponentSetComponentVersionExcludedRepository.ts +47 -0
- package/src/domains/component-set/repositories/ComponentSetComponentVersionRepository.integration.spec.ts +229 -0
- package/src/domains/component-set/repositories/ComponentSetComponentVersionRepository.ts +37 -0
- package/src/domains/component-set/repositories/ComponentSetRepository.integration.spec.ts +199 -0
- package/src/domains/component-set/repositories/ComponentSetRepository.ts +68 -0
- package/src/domains/component-set/repositories/ComponentSetRuleRepository.integration.spec.ts +107 -0
- package/src/domains/component-set/repositories/ComponentSetRuleRepository.ts +40 -0
- package/src/domains/component-set/services/ComponentSetRuleService.integration.spec.ts +137 -0
- package/src/domains/component-set/services/ComponentSetRuleService.ts +34 -0
- package/src/domains/component-set/services/ComponentSetService.spec.ts +144 -0
- package/src/domains/component-set/services/ComponentSetService.ts +82 -0
- package/src/domains/component-set/services/ComponentSetServiceForLocalDev.spec.ts +209 -0
- package/src/domains/component-set/services/ComponentSetServiceForLocalDev.ts +111 -0
- package/src/domains/component-set/services/ComponentSetServiceForProduction.integration.spec.ts +2898 -0
- package/src/domains/component-set/services/ComponentSetServiceForProduction.ts +839 -0
- package/src/domains/component-set/services/EnvironmentVariables.ts +1 -0
- package/src/domains/component-set/services/Headers.ts +1 -0
- package/src/domains/component-set/services/RuntimeComponentSet.ts +7 -0
- package/src/domains/component-set/web-models/ComponentSetComponentVersionForWeb.ts +7 -0
- package/src/domains/component-set/web-models/ComponentSetForWeb.ts +83 -0
- package/src/domains/content/index.ts +4 -0
- package/src/domains/content/services/ComponentContentSchemaService.spec.ts +264 -0
- package/src/domains/content/services/ComponentContentSchemaService.ts +53 -0
- package/src/domains/content/services/ContentItemService.spec.ts +108 -0
- package/src/domains/content/services/ContentItemService.ts +34 -0
- package/src/domains/content/services/DynamicContentItemService.spec.ts +97 -0
- package/src/domains/content/services/DynamicContentItemService.ts +30 -0
- package/src/domains/content/utils/getContentSchemaName.spec.ts +7 -0
- package/src/domains/content/utils/getContentSchemaName.ts +7 -0
- package/src/domains/db/ComponentConnectionManager.ts +4 -0
- package/src/domains/db/ComponentRepositories.ts +31 -0
- package/src/domains/db/createConnectionManager.ts +24 -0
- package/src/domains/db/index.ts +3 -0
- package/src/domains/db/migration-list.ts +16 -0
- package/src/domains/job/ParsePartitionKey/ParsePartitionKey.spec.ts +27 -0
- package/src/domains/job/ParsePartitionKey/ParsePartitionKey.ts +19 -0
- package/src/domains/job/ParsePartitionKey/index.ts +1 -0
- package/src/domains/job/constants/JobExecutionStatus.constants.ts +9 -0
- package/src/domains/job/constants/QueryParams.ts +16 -0
- package/src/domains/job/constants/Repository.constants.ts +18 -0
- package/src/domains/job/core/dynamoClient.mock.ts +34 -0
- package/src/domains/job/core/pagination/index.ts +3 -0
- package/src/domains/job/core/pagination/model/PageQuery.ts +31 -0
- package/src/domains/job/core/pagination/model/PaginationInfo.ts +40 -0
- package/src/domains/job/core/pagination/model/PaginationKey.ts +4 -0
- package/src/domains/job/core/pagination/model/PaginationLinks.ts +30 -0
- package/src/domains/job/core/pagination/model/PaginationQueryParams.ts +15 -0
- package/src/domains/job/core/pagination/model/PaginationQueryResponse.ts +27 -0
- package/src/domains/job/core/pagination/model/PaginationResponse.ts +48 -0
- package/src/domains/job/core/pagination/model/PaginationTypes.ts +45 -0
- package/src/domains/job/core/pagination/model/index.ts +8 -0
- package/src/domains/job/core/pagination/services/PaginationService.spec.ts +248 -0
- package/src/domains/job/core/pagination/services/PaginationService.ts +142 -0
- package/src/domains/job/core/pagination/services/index.ts +1 -0
- package/src/domains/job/core/pagination/utils/PaginationUtils.spec.ts +263 -0
- package/src/domains/job/core/pagination/utils/PaginationUtils.ts +156 -0
- package/src/domains/job/core/pagination/utils/index.ts +1 -0
- package/src/domains/job/errors/BadRequestError.ts +19 -0
- package/src/domains/job/errors/Error.constants.ts +34 -0
- package/src/domains/job/errors/ErrorWithHttpStatusCode.ts +16 -0
- package/src/domains/job/errors/ExecutionStatusError.ts +3 -0
- package/src/domains/job/errors/InternalServerError.ts +19 -0
- package/src/domains/job/errors/NotFoundError.ts +19 -0
- package/src/domains/job/errors/NotImplementedError.ts +19 -0
- package/src/domains/job/errors/UnprocessableContent.ts +19 -0
- package/src/domains/job/errors/index.ts +8 -0
- package/src/domains/job/index.ts +21 -0
- package/src/domains/job/manifest/JobManifestTypes.ts +145 -0
- package/src/domains/job/manifest/JobManifestV1.spec.ts +148 -0
- package/src/domains/job/manifest/JobManifestV1.ts +60 -0
- package/src/domains/job/manifest/index.ts +5 -0
- package/src/domains/job/manifest/mocks/JobManifest.mock.ts +35 -0
- package/src/domains/job/manifest/mocks/JobManifestDto.mock.ts +46 -0
- package/src/domains/job/manifest/mocks/JobManifestRecord.mock.ts +37 -0
- package/src/domains/job/manifest/mocks/JobManifestRequest.mock.ts +30 -0
- package/src/domains/job/model/Base/Base.ts +44 -0
- package/src/domains/job/model/Base/index.ts +1 -0
- package/src/domains/job/model/Job/Job.ts +98 -0
- package/src/domains/job/model/Job/index.ts +5 -0
- package/src/domains/job/model/Job/mocks/Job.mock.ts +26 -0
- package/src/domains/job/model/Job/mocks/JobDto.mock.ts +37 -0
- package/src/domains/job/model/Job/mocks/JobRecord.mock.ts +28 -0
- package/src/domains/job/model/Job/mocks/JobRequest.mock.ts +20 -0
- package/src/domains/job/model/JobContext/JobContext.ts +101 -0
- package/src/domains/job/model/JobContext/index.ts +5 -0
- package/src/domains/job/model/JobContext/mocks/JobContext.mock.ts +34 -0
- package/src/domains/job/model/JobContext/mocks/JobContextDto.mock.ts +46 -0
- package/src/domains/job/model/JobContext/mocks/JobContextRecord.mock.ts +32 -0
- package/src/domains/job/model/JobContext/mocks/JobContextRequest.mock.ts +26 -0
- package/src/domains/job/model/JobExecution/JobExecution.ts +220 -0
- package/src/domains/job/model/JobExecution/index.ts +5 -0
- package/src/domains/job/model/JobExecution/mocks/JobExecution.mock.ts +43 -0
- package/src/domains/job/model/JobExecution/mocks/JobExecutionDto.mock.ts +62 -0
- package/src/domains/job/model/JobExecution/mocks/JobExecutionRecord.mock.ts +47 -0
- package/src/domains/job/model/JobExecution/mocks/JobExecutionRequest.mock.ts +26 -0
- package/src/domains/job/repository/AbstractRepository.ts +219 -0
- package/src/domains/job/repository/JobContextRepository/JobContextRepository.spec.ts +301 -0
- package/src/domains/job/repository/JobContextRepository/JobContextRepository.ts +168 -0
- package/src/domains/job/repository/JobExecutionRepository/JobExecutionRepository.spec.ts +371 -0
- package/src/domains/job/repository/JobExecutionRepository/JobExecutionRepository.ts +293 -0
- package/src/domains/job/repository/JobManifestRepository/JobManifestRepository.spec.ts +222 -0
- package/src/domains/job/repository/JobManifestRepository/JobManifestRepository.ts +120 -0
- package/src/domains/job/repository/JobRepository/JobRepository.spec.ts +337 -0
- package/src/domains/job/repository/JobRepository/JobRepository.ts +188 -0
- package/src/domains/job/repository/index.ts +5 -0
- package/src/domains/job/repository/mocks/mockIoc.ts +42 -0
- package/src/domains/job/services/JobExecutionTaskService/JobExecutionTaskService.defs.ts +40 -0
- package/src/domains/job/services/JobExecutionTaskService/JobExecutionTaskService.spec.ts +95 -0
- package/src/domains/job/services/JobExecutionTaskService/JobExecutionTaskService.ts +138 -0
- package/src/domains/job/services/index.ts +1 -0
- package/src/domains/job/singletonProvider.ts +12 -0
- package/src/domains/job/transientProvider.ts +12 -0
- package/src/domains/job/utils/SlackClient/SlackClient.spec.ts +176 -0
- package/src/domains/job/utils/SlackClient/SlackClient.ts +132 -0
- package/src/domains/job/utils/SlackClient/types/SlackClient.types.ts +70 -0
- package/src/domains/job/utils/SortByTimeQueued/SortByTimeQueued.spec.ts +28 -0
- package/src/domains/job/utils/SortByTimeQueued/SortByTimeQueued.ts +21 -0
- package/src/domains/job/utils/index.ts +3 -0
- package/src/domains/manifest/AbstractManifest.ts +57 -0
- package/src/domains/manifest/ManifestModel.ts +9 -0
- package/src/domains/manifest/ManifestV1.spec.ts +436 -0
- package/src/domains/manifest/ManifestV1.ts +146 -0
- package/src/domains/manifest/errors/ManifestLocationError.ts +9 -0
- package/src/domains/manifest/errors/ManifestValidationError.ts +7 -0
- package/src/domains/manifest/index.ts +18 -0
- package/src/domains/manifest/services/AbstractManifestService.spec.ts +427 -0
- package/src/domains/manifest/services/AbstractManifestService.ts +316 -0
- package/src/domains/manifest/services/ComponentFunctionService.spec.ts +683 -0
- package/src/domains/manifest/services/ComponentFunctionService.ts +178 -0
- package/src/domains/manifest/services/ComponentInputValidationService.ts +22 -0
- package/src/domains/manifest/services/ComponentSchemaValidationService.ts +22 -0
- package/src/domains/manifest/services/JobFunctionService.spec.ts +165 -0
- package/src/domains/manifest/services/JobFunctionService.ts +25 -0
- package/src/domains/manifest/services/ManifestServiceForDev.spec.ts +199 -0
- package/src/domains/manifest/services/ManifestServiceForDev.ts +96 -0
- package/src/domains/manifest/services/ManifestServiceForProduction.spec.ts +90 -0
- package/src/domains/manifest/services/ManifestServiceForProduction.ts +98 -0
- package/src/domains/manifest/utils/assertFuncEntryFilesAreValid.ts +19 -0
- package/src/domains/manifest/utils/assertStaticFilesAreValid.ts +37 -0
- package/src/domains/manifest/utils/assertStaticFilesHaveAbsolutePath.spec.ts +121 -0
- package/src/domains/manifest/utils/assertStaticFilesHaveAbsolutePath.ts +15 -0
- package/src/domains/manifest/utils/getAndAssertJobManifestVersion.spec.ts +145 -0
- package/src/domains/manifest/utils/getAndAssertJobManifestVersion.ts +31 -0
- package/src/domains/manifest/utils/getAndAssertManifestVersion.spec.ts +134 -0
- package/src/domains/manifest/utils/getAndAssertManifestVersion.ts +27 -0
- package/src/domains/manifest/utils/isValidManifestVersion.spec.ts +19 -0
- package/src/domains/manifest/utils/isValidManifestVersion.ts +9 -0
- package/src/domains/url/convertFunctionStaticFilesToFqdn.spec.ts +24 -0
- package/src/domains/url/convertFunctionStaticFilesToFqdn.ts +25 -0
- package/src/domains/url/convertFunctionStaticFilesToFqdnForPreview.spec.ts +48 -0
- package/src/domains/url/convertFunctionStaticFilesToFqdnForPreview.ts +25 -0
- package/src/domains/url/index.ts +1 -0
- package/src/index.ts +10 -0
- package/src/jest-global-setup.ts +20 -0
- package/src/migrations/20220704054051_initial.sql +19 -0
- package/src/migrations/20220718172237_adding_component_sets.sql +23 -0
- package/src/migrations/20220728113941_add_env_vars_field.sql +1 -0
- package/src/migrations/20220817113300_removing_null_props_from_jsonb.sql +41 -0
- package/src/migrations/20221027151225_dummy.sql +2 -0
- package/src/migrations/20221117151200_add_detail_columns_to_component_version.js +49 -0
- package/src/migrations/20221220151200_add_required_to_manifests.js +61 -0
- package/src/migrations/20221222151200_add_required_to_manifests.js +138 -0
- package/src/migrations/20223525103556_component_set_rule.sql +19 -0
- package/src/migrations/20230111095522_update_environment_property.js +72 -0
- package/src/migrations/20230203084900_ensure_static_root_exists.js +57 -0
- package/src/migrations/20230210143300_lowercase_all_uri_names.js +106 -0
- package/src/migrations/20230217151212_component_set_component_version_updates.sql +38 -0
- package/src/migrations/20230218121212_add_component_set_rules.js +31 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { ManifestValidationError } from '../errors/ManifestValidationError';
|
|
2
|
+
import { ManifestModel } from '../ManifestModel';
|
|
3
|
+
import { getAndAssertManifestVersion } from './getAndAssertManifestVersion';
|
|
4
|
+
|
|
5
|
+
describe('getAndAssertManifestVersion', () => {
|
|
6
|
+
it("should throw an error if Manifest object hasn't defined a $schema", () => {
|
|
7
|
+
expect(() =>
|
|
8
|
+
getAndAssertManifestVersion({
|
|
9
|
+
$schema: '',
|
|
10
|
+
mainFunction: 'main',
|
|
11
|
+
name: 'test',
|
|
12
|
+
version: '1.0.0',
|
|
13
|
+
namespace: 'foo',
|
|
14
|
+
displayName: 'something',
|
|
15
|
+
description: 'some-description',
|
|
16
|
+
functions: [
|
|
17
|
+
{
|
|
18
|
+
entry: 'entry',
|
|
19
|
+
input: {},
|
|
20
|
+
name: 'main',
|
|
21
|
+
output: {
|
|
22
|
+
responseType: 'html',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
],
|
|
26
|
+
}),
|
|
27
|
+
).toThrowError(
|
|
28
|
+
new ManifestValidationError(
|
|
29
|
+
'Could not determine manifest version. Your manifest must have a $schema property defined.',
|
|
30
|
+
),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
expect(() =>
|
|
34
|
+
getAndAssertManifestVersion({
|
|
35
|
+
mainFunction: 'main',
|
|
36
|
+
name: 'test',
|
|
37
|
+
version: '1.0.0',
|
|
38
|
+
namespace: 'foo',
|
|
39
|
+
displayName: 'something',
|
|
40
|
+
description: 'some-description',
|
|
41
|
+
functions: [
|
|
42
|
+
{
|
|
43
|
+
entry: 'entry',
|
|
44
|
+
input: {},
|
|
45
|
+
name: 'main',
|
|
46
|
+
output: {
|
|
47
|
+
responseType: 'html',
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
} as ManifestModel),
|
|
52
|
+
).toThrowError(
|
|
53
|
+
new ManifestValidationError(
|
|
54
|
+
'Could not determine manifest version. Your manifest must have a $schema property defined.',
|
|
55
|
+
),
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it('should throw an error if Manifest object has invalid $schema version', () => {
|
|
60
|
+
expect(() =>
|
|
61
|
+
getAndAssertManifestVersion({
|
|
62
|
+
$schema: 'something-invalid',
|
|
63
|
+
mainFunction: 'main',
|
|
64
|
+
name: 'test',
|
|
65
|
+
version: '1.0.0',
|
|
66
|
+
namespace: 'foo',
|
|
67
|
+
displayName: 'something',
|
|
68
|
+
description: 'some-description',
|
|
69
|
+
functions: [
|
|
70
|
+
{
|
|
71
|
+
entry: 'entry',
|
|
72
|
+
input: {},
|
|
73
|
+
name: 'main',
|
|
74
|
+
output: {
|
|
75
|
+
responseType: 'html',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
}),
|
|
80
|
+
).toThrowError(new ManifestValidationError('Could not determine manifest version from $schema value.'));
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it("should throw an error if Manifest isn't a valid/defined version", () => {
|
|
84
|
+
expect(() =>
|
|
85
|
+
getAndAssertManifestVersion({
|
|
86
|
+
$schema: 'http://../schemas/v9999.json',
|
|
87
|
+
mainFunction: 'main',
|
|
88
|
+
name: 'test',
|
|
89
|
+
version: '1.0.0',
|
|
90
|
+
namespace: 'foo',
|
|
91
|
+
displayName: 'something',
|
|
92
|
+
description: 'some-description',
|
|
93
|
+
|
|
94
|
+
functions: [
|
|
95
|
+
{
|
|
96
|
+
entry: 'entry',
|
|
97
|
+
input: {},
|
|
98
|
+
name: 'main',
|
|
99
|
+
output: {
|
|
100
|
+
responseType: 'html',
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
}),
|
|
105
|
+
).toThrowError(
|
|
106
|
+
new ManifestValidationError('manifest version "v9999" isn\'t a valid version. Valid versions are "v1", "JobV1"'),
|
|
107
|
+
);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('should return the schema version number if its valid and exists', () => {
|
|
111
|
+
expect(
|
|
112
|
+
getAndAssertManifestVersion({
|
|
113
|
+
$schema: 'http://../schemas/v1.json',
|
|
114
|
+
mainFunction: 'main',
|
|
115
|
+
name: 'test',
|
|
116
|
+
version: '1.0.0',
|
|
117
|
+
namespace: 'foo',
|
|
118
|
+
displayName: 'something',
|
|
119
|
+
description: 'some-description',
|
|
120
|
+
|
|
121
|
+
functions: [
|
|
122
|
+
{
|
|
123
|
+
entry: 'entry',
|
|
124
|
+
input: {},
|
|
125
|
+
name: 'main',
|
|
126
|
+
output: {
|
|
127
|
+
responseType: 'html',
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
],
|
|
131
|
+
}),
|
|
132
|
+
).toEqual('v1');
|
|
133
|
+
});
|
|
134
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { schemaVersionRegex, SchemaVersions, SCHEMA_VERSIONS } from '../AbstractManifest';
|
|
2
|
+
import { ManifestValidationError } from '../errors/ManifestValidationError';
|
|
3
|
+
import { ManifestModel } from '../ManifestModel';
|
|
4
|
+
import { isValidManifestVersion } from './isValidManifestVersion';
|
|
5
|
+
|
|
6
|
+
export function getAndAssertManifestVersion(manifest: ManifestModel): SchemaVersions {
|
|
7
|
+
if (!manifest['$schema']) {
|
|
8
|
+
throw new ManifestValidationError(
|
|
9
|
+
'Could not determine manifest version. Your manifest must have a $schema property defined.',
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const match = schemaVersionRegex.exec(manifest['$schema']);
|
|
14
|
+
const version = match?.groups?.schema;
|
|
15
|
+
|
|
16
|
+
if (version === undefined) {
|
|
17
|
+
throw new ManifestValidationError('Could not determine manifest version from $schema value.');
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (isValidManifestVersion(version)) {
|
|
21
|
+
return version as SchemaVersions;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
throw new ManifestValidationError(
|
|
25
|
+
`manifest version "${version}" isn't a valid version. Valid versions are "${SCHEMA_VERSIONS.join('", "')}"`,
|
|
26
|
+
);
|
|
27
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SCHEMA_VERSIONS } from '../AbstractManifest';
|
|
2
|
+
import { isValidManifestVersion } from './isValidManifestVersion';
|
|
3
|
+
|
|
4
|
+
describe('isValidManifestVersion', () => {
|
|
5
|
+
it('should return true if the input value is a valid schema version', () => {
|
|
6
|
+
for (const validVersion of SCHEMA_VERSIONS) {
|
|
7
|
+
expect(isValidManifestVersion(validVersion)).toEqual(true);
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
it('should return false if any value other than a valid version is entered', () => {
|
|
12
|
+
expect(isValidManifestVersion('bad-version')).toEqual(false);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
it('should not exception if arbitrary objects are added', () => {
|
|
16
|
+
expect(isValidManifestVersion({ 'bad-version': 123 })).toEqual(false);
|
|
17
|
+
expect(isValidManifestVersion(undefined)).toEqual(false);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { convertFunctionStaticFilesToFqdn } from './convertFunctionStaticFilesToFqdn';
|
|
2
|
+
|
|
3
|
+
describe('convertFunctionStaticFilesToFqdn', () => {
|
|
4
|
+
it('should resolve a file path to a component static resource url string', () => {
|
|
5
|
+
expect(
|
|
6
|
+
convertFunctionStaticFilesToFqdn('http://localhost:3000/', './hello/file.txt', 'set-a', 'test', '1.0.0'),
|
|
7
|
+
).toEqual('http://localhost:3000/s/test/1.0.0/hello/file.txt?_componentSet=set-a');
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
it('should resolve a relative file path', () => {
|
|
11
|
+
expect(
|
|
12
|
+
convertFunctionStaticFilesToFqdn('http://localhost:3000/', './hello/../file.txt', 'set-a', 'test', '1.0.0'),
|
|
13
|
+
).toEqual('http://localhost:3000/s/test/1.0.0/file.txt?_componentSet=set-a');
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('if give a url do nothing but return it', () => {
|
|
17
|
+
expect(
|
|
18
|
+
convertFunctionStaticFilesToFqdn('http://localhost:3000/', 'http://hello/world', 'set-a', 'test', '1.0.0'),
|
|
19
|
+
).toEqual('http://hello/world');
|
|
20
|
+
expect(
|
|
21
|
+
convertFunctionStaticFilesToFqdn('http://localhost:3000/', 'https://hello/world', 'set-a', 'test', '1.0.0'),
|
|
22
|
+
).toEqual('https://hello/world');
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { joinAbsoluteUrlPath } from '@squiz/dx-common-lib';
|
|
2
|
+
import queryString from 'query-string';
|
|
3
|
+
|
|
4
|
+
export function convertFunctionStaticFilesToFqdn(
|
|
5
|
+
rootUrl: string,
|
|
6
|
+
file: string,
|
|
7
|
+
componentSet: string,
|
|
8
|
+
componentName: string,
|
|
9
|
+
version: string,
|
|
10
|
+
): string {
|
|
11
|
+
if (file.startsWith('https://') || file.startsWith('http://')) {
|
|
12
|
+
return file;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const path = joinAbsoluteUrlPath(rootUrl, 's', componentName, version, file);
|
|
16
|
+
return queryString.stringifyUrl(
|
|
17
|
+
{
|
|
18
|
+
url: path,
|
|
19
|
+
query: {
|
|
20
|
+
_componentSet: componentSet,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{ skipNull: true, encode: true, arrayFormat: 'bracket' },
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { convertFunctionStaticFilesToFqdnForPreview } from './convertFunctionStaticFilesToFqdnForPreview';
|
|
2
|
+
|
|
3
|
+
describe('convertFunctionStaticFilesToFqdnForPreview', () => {
|
|
4
|
+
it('should resolve a file path to a component static resource url string', () => {
|
|
5
|
+
expect(
|
|
6
|
+
convertFunctionStaticFilesToFqdnForPreview(
|
|
7
|
+
'http://localhost:3000/',
|
|
8
|
+
'./hello/file.txt',
|
|
9
|
+
'test',
|
|
10
|
+
'1.0.0',
|
|
11
|
+
'test-preview',
|
|
12
|
+
),
|
|
13
|
+
).toEqual('http://localhost:3000/s/test/1.0.0/hello/file.txt?_previewKey=test-preview');
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
it('should resolve a relative file path', () => {
|
|
17
|
+
expect(
|
|
18
|
+
convertFunctionStaticFilesToFqdnForPreview(
|
|
19
|
+
'http://localhost:3000/',
|
|
20
|
+
'./hello/../file.txt',
|
|
21
|
+
'test',
|
|
22
|
+
'1.0.0',
|
|
23
|
+
'test-preview',
|
|
24
|
+
),
|
|
25
|
+
).toEqual('http://localhost:3000/s/test/1.0.0/file.txt?_previewKey=test-preview');
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('if given a url do nothing but return it', () => {
|
|
29
|
+
expect(
|
|
30
|
+
convertFunctionStaticFilesToFqdnForPreview(
|
|
31
|
+
'http://localhost:3000/',
|
|
32
|
+
'http://hello/world',
|
|
33
|
+
'test',
|
|
34
|
+
'1.0.0',
|
|
35
|
+
'test-preview',
|
|
36
|
+
),
|
|
37
|
+
).toEqual('http://hello/world');
|
|
38
|
+
expect(
|
|
39
|
+
convertFunctionStaticFilesToFqdnForPreview(
|
|
40
|
+
'http://localhost:3000/',
|
|
41
|
+
'https://hello/world',
|
|
42
|
+
'test',
|
|
43
|
+
'1.0.0',
|
|
44
|
+
'test-preview',
|
|
45
|
+
),
|
|
46
|
+
).toEqual('https://hello/world');
|
|
47
|
+
});
|
|
48
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { joinAbsoluteUrlPath } from '@squiz/dx-common-lib';
|
|
2
|
+
import queryString from 'query-string';
|
|
3
|
+
|
|
4
|
+
export function convertFunctionStaticFilesToFqdnForPreview(
|
|
5
|
+
rootUrl: string,
|
|
6
|
+
file: string,
|
|
7
|
+
componentName: string,
|
|
8
|
+
version: string,
|
|
9
|
+
previewKey: string,
|
|
10
|
+
): string {
|
|
11
|
+
if (file.startsWith('https://') || file.startsWith('http://')) {
|
|
12
|
+
return file;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const path = joinAbsoluteUrlPath(rootUrl, 's', componentName, version, file);
|
|
16
|
+
return queryString.stringifyUrl(
|
|
17
|
+
{
|
|
18
|
+
url: path,
|
|
19
|
+
query: {
|
|
20
|
+
_previewKey: previewKey,
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{ skipNull: true, encode: true, arrayFormat: 'bracket' },
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './convertFunctionStaticFilesToFqdn';
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './domains/manifest/ManifestModel';
|
|
2
|
+
export * from './domains/db';
|
|
3
|
+
export * from './domains/component-set';
|
|
4
|
+
export * from './domains/component';
|
|
5
|
+
export * from './domains/job';
|
|
6
|
+
export * from './domains/content';
|
|
7
|
+
export * from './domains/url';
|
|
8
|
+
export * from './domains/manifest';
|
|
9
|
+
|
|
10
|
+
export * as TestHelpers from './TestHelpers';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Squiz Australia Pty Ltd. All Rights Reserved.
|
|
4
|
+
*/
|
|
5
|
+
import { getLogger } from '@squiz/dx-logger-lib';
|
|
6
|
+
|
|
7
|
+
export const testLogger = getLogger({
|
|
8
|
+
name: 'component-lib-test',
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export default async (): Promise<void> => {
|
|
12
|
+
process.env.TZ = 'UTC';
|
|
13
|
+
process.env.DYNAMODB_TABLE = 'jobs-test';
|
|
14
|
+
process.env.ENVIRONMENT = 'local';
|
|
15
|
+
process.env.CLUSTER_ARN = '1234';
|
|
16
|
+
process.env.RUNTIME_TASK_DEFINITION_ARN = '5678';
|
|
17
|
+
process.env.SUBNETS_STRING = 'subnet1_subnet2';
|
|
18
|
+
process.env.S3_BUCKET = 'jobs';
|
|
19
|
+
process.env.JOB_RUNNER_API_URL = 'http://localhost:3040';
|
|
20
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
|
|
3
|
+
CREATE TABLE "component" ("name" VARCHAR(128) NOT NULL,
|
|
4
|
+
CONSTRAINT "component_pkey" PRIMARY KEY ("name"));
|
|
5
|
+
|
|
6
|
+
-- CreateTable
|
|
7
|
+
|
|
8
|
+
CREATE TABLE "component_version" ("component_name" VARCHAR(128) NOT NULL,
|
|
9
|
+
"version" VARCHAR(128) NOT NULL,
|
|
10
|
+
CONSTRAINT "component_version_pkey" PRIMARY KEY ("component_name",
|
|
11
|
+
"version"));
|
|
12
|
+
|
|
13
|
+
-- AddForeignKey
|
|
14
|
+
|
|
15
|
+
ALTER TABLE "component_version" ADD CONSTRAINT "component_version_component_name_fkey"
|
|
16
|
+
FOREIGN KEY ("component_name") REFERENCES "component"("name") ON
|
|
17
|
+
DELETE CASCADE ON
|
|
18
|
+
UPDATE CASCADE;
|
|
19
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
CREATE TABLE "component_set" (
|
|
3
|
+
"web_path" VARCHAR(128) NOT NULL,
|
|
4
|
+
"display_name" VARCHAR(128) NOT NULL,
|
|
5
|
+
"description" VARCHAR,
|
|
6
|
+
"env_vars" JSONB,
|
|
7
|
+
"headers" JSONB,
|
|
8
|
+
|
|
9
|
+
CONSTRAINT "component_set_pkey" PRIMARY KEY ("web_path")
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
-- CreateTable
|
|
13
|
+
CREATE TABLE "component_set_component_version" (
|
|
14
|
+
"component_set_web_path" VARCHAR(128) NOT NULL,
|
|
15
|
+
"component_name" VARCHAR(128) NOT NULL,
|
|
16
|
+
"component_version" VARCHAR(128) NOT NULL,
|
|
17
|
+
|
|
18
|
+
CONSTRAINT "component_set_component_version_pkey" PRIMARY KEY ("component_set_web_path", "component_name", "component_version")
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
-- AddForeignKey
|
|
22
|
+
ALTER TABLE "component_set_component_version" ADD CONSTRAINT "component_set_web_path_fkey" FOREIGN KEY ("component_set_web_path") REFERENCES "component_set"("web_path") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
23
|
+
ALTER TABLE "component_set_component_version" ADD CONSTRAINT "component_version_componet_name_version_fkey" FOREIGN KEY ("component_name", "component_version") REFERENCES "component_version"("component_name", "version") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE "component_set_component_version" ADD COLUMN "env_vars" jsonb;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
UPDATE component_set as rc
|
|
2
|
+
set env_vars = (
|
|
3
|
+
|
|
4
|
+
-- subtract non string properties, resulting object is all keys have values
|
|
5
|
+
select COALESCE((o2.env_vars - od.nonStringProps), '{}'::jsonb) as stringProps
|
|
6
|
+
from component_set as o2 , (
|
|
7
|
+
|
|
8
|
+
-- select get an array of all properties whos value is not a string, as an array
|
|
9
|
+
select web_path, array(
|
|
10
|
+
select envK
|
|
11
|
+
from component_set, jsonb_object_keys(env_vars) as envK
|
|
12
|
+
where jsonb_typeof(component_set.env_vars->envk) <> 'string' and o.web_path = component_set.web_path
|
|
13
|
+
) as nonStringProps
|
|
14
|
+
from component_set as o
|
|
15
|
+
) as od
|
|
16
|
+
|
|
17
|
+
-- make sure all the web_paths are the same
|
|
18
|
+
where o2.web_path = od.web_path and rc.web_path = o2.web_path
|
|
19
|
+
),
|
|
20
|
+
headers = (
|
|
21
|
+
-- subtract non string properties resulting object is all keys have values
|
|
22
|
+
select COALESCE((o2.headers - od.nonStringProps), '{}'::jsonb) as stringProps
|
|
23
|
+
from component_set as o2 , (
|
|
24
|
+
|
|
25
|
+
-- select get an array of all properties whos value is not a string, as an array
|
|
26
|
+
select web_path, array(
|
|
27
|
+
select headerK
|
|
28
|
+
from component_set, jsonb_object_keys(headers) as headerK
|
|
29
|
+
where jsonb_typeof(component_set.headers->headerK) <> 'string' and o.web_path = component_set.web_path
|
|
30
|
+
) as nonStringProps
|
|
31
|
+
from component_set as o
|
|
32
|
+
) as od
|
|
33
|
+
|
|
34
|
+
-- make sure all the web_paths are the same
|
|
35
|
+
where o2.web_path = od.web_path and rc.web_path = o2.web_path
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
-- make columns not nullable
|
|
39
|
+
ALTER TABLE component_set ALTER COLUMN env_vars SET NOT NULL;
|
|
40
|
+
ALTER TABLE component_set ALTER COLUMN headers SET NOT NULL;
|
|
41
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
|
|
5
|
+
exports.default = async function (db, logger) {
|
|
6
|
+
await db.query(`ALTER TABLE component_version add display_name varchar not null default '';`);
|
|
7
|
+
await db.query(`ALTER TABLE component_version add description varchar not null default '';`);
|
|
8
|
+
await db.query(`ALTER TABLE component_version add icon jsonb;`);
|
|
9
|
+
|
|
10
|
+
const versions = await db.query(`select * from component_version`);
|
|
11
|
+
const dataMount = process.env.DATA_MOUNT_POINT;
|
|
12
|
+
|
|
13
|
+
if (dataMount === undefined) {
|
|
14
|
+
throw new Error(`DATA_MOUNT_POINT is undefined`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
for (const row of versions.rows) {
|
|
18
|
+
logger.info(dataMount, row.component_name, row.version, 'manifest.json');
|
|
19
|
+
|
|
20
|
+
const manifestPath = path.join(dataMount, row.component_name, row.version, 'manifest.json');
|
|
21
|
+
|
|
22
|
+
if (fs.existsSync(manifestPath)) {
|
|
23
|
+
logger.info(`found manifest ${manifestPath}`);
|
|
24
|
+
|
|
25
|
+
const manifestString = fs.readFileSync(manifestPath, {
|
|
26
|
+
encoding: 'utf-8',
|
|
27
|
+
});
|
|
28
|
+
const manifest = JSON.parse(manifestString);
|
|
29
|
+
|
|
30
|
+
logger.info(`adding ${manifest.displayName} ${manifest.description} ${manifest.icon} from manifest`);
|
|
31
|
+
let paramIndex = 1;
|
|
32
|
+
const params = [];
|
|
33
|
+
let setClause = `SET display_name=$${paramIndex++}, description=$${paramIndex++}`;
|
|
34
|
+
params.push(manifest.displayName ?? '');
|
|
35
|
+
params.push(manifest.description ?? '');
|
|
36
|
+
|
|
37
|
+
if (manifest.icon) {
|
|
38
|
+
setClause = `${setClause}, icon=$${paramIndex++}`;
|
|
39
|
+
params.push(JSON.stringify(manifest.icon));
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let sql = `UPDATE component_version ${setClause} WHERE component_name=$${paramIndex++} and version=$${paramIndex++}`;
|
|
43
|
+
params.push(`${manifest.namespace}/${manifest.name}`);
|
|
44
|
+
params.push(manifest.version);
|
|
45
|
+
|
|
46
|
+
await db.query(sql, params);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
+
const { JsonValidationService, SchemaValidationError } = require('@squiz/dx-json-schema-lib');
|
|
3
|
+
const assert = require('assert');
|
|
4
|
+
const fsp = require('fs/promises');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
async function listDirectories(filePath) {
|
|
8
|
+
return (await fsp.readdir(filePath, { withFileTypes: true }))
|
|
9
|
+
.filter((dirent) => dirent.isDirectory())
|
|
10
|
+
.map((dirent) => path.resolve(filePath, dirent.name));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function addRequiredToNestedObjects(obj) {
|
|
14
|
+
if ('properties' in obj) {
|
|
15
|
+
obj.required ??= [];
|
|
16
|
+
for (const prop of Object.values(obj.properties)) {
|
|
17
|
+
addRequiredToNestedObjects(prop);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Migrate the manifest files to add required to the input properties
|
|
24
|
+
* when then existing manifest did not provide it. This is to match the
|
|
25
|
+
* change of requirement of having a "required" property specified
|
|
26
|
+
*/
|
|
27
|
+
exports.default = async function () {
|
|
28
|
+
assert.ok(process.env.DATA_MOUNT_POINT, 'DATA_MOUNT_POINT is undefined');
|
|
29
|
+
const validationService = new JsonValidationService();
|
|
30
|
+
|
|
31
|
+
for (const namespaceDir of await listDirectories(process.env.DATA_MOUNT_POINT)) {
|
|
32
|
+
for (const componentNameDir of await listDirectories(namespaceDir)) {
|
|
33
|
+
for (const versionDir of await listDirectories(componentNameDir)) {
|
|
34
|
+
try {
|
|
35
|
+
const manifestPath = path.resolve(versionDir, 'manifest.json');
|
|
36
|
+
const manifest = JSON.parse(await fsp.readFile(manifestPath, { encoding: 'utf-8' }));
|
|
37
|
+
if (manifest.$schema?.match(/v1\.json#?$/)) {
|
|
38
|
+
for (const fn of manifest.functions) {
|
|
39
|
+
addRequiredToNestedObjects(fn.input);
|
|
40
|
+
}
|
|
41
|
+
await fsp.writeFile(manifestPath, JSON.stringify(manifest, null, 2));
|
|
42
|
+
try {
|
|
43
|
+
validationService.validateManifest(manifest, 'v1');
|
|
44
|
+
} catch (e) {
|
|
45
|
+
if (e instanceof SchemaValidationError) {
|
|
46
|
+
if (e.message.includes("must have required property 'required'")) {
|
|
47
|
+
e.message = `Failed to migrate manifest ${manifest.namespace}/${manifest.name}/${manifest.version}: ${e.message}`;
|
|
48
|
+
throw e;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
} catch (e) {
|
|
54
|
+
if (e instanceof SchemaValidationError) {
|
|
55
|
+
throw e;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
};
|