@webiny/migrations 6.0.0-beta.0 → 6.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -7
- package/README.md +11 -1
- package/ddb-es.d.ts +1 -19
- package/ddb-es.js +5 -66
- package/ddb-es.js.map +1 -1
- package/ddb.d.ts +1 -19
- package/ddb.js +5 -50
- package/ddb.js.map +1 -1
- package/package.json +20 -32
- package/utils/createEntity.d.ts +3 -89
- package/utils/createEntity.js +3 -37
- package/utils/createEntity.js.map +1 -1
- package/utils/createTenantEntity.d.ts +2 -48
- package/utils/createTenantEntity.js +3 -10
- package/utils/createTenantEntity.js.map +1 -1
- package/utils/dynamoDb.d.ts +2 -1
- package/utils/dynamoDb.js +2 -60
- package/utils/dynamoDb.js.map +1 -1
- package/utils/elasticsearch/disableEsIndexing.d.ts +2 -2
- package/utils/elasticsearch/disableEsIndexing.js +3 -11
- package/utils/elasticsearch/disableEsIndexing.js.map +1 -1
- package/utils/elasticsearch/esCreateIndex.d.ts +1 -2
- package/utils/elasticsearch/esCreateIndex.js +8 -24
- package/utils/elasticsearch/esCreateIndex.js.map +1 -1
- package/utils/elasticsearch/esFindOne.d.ts +2 -2
- package/utils/elasticsearch/esFindOne.js +1 -8
- package/utils/elasticsearch/esFindOne.js.map +1 -1
- package/utils/elasticsearch/esGetIndexExist.d.ts +1 -2
- package/utils/elasticsearch/esGetIndexExist.js +4 -13
- package/utils/elasticsearch/esGetIndexExist.js.map +1 -1
- package/utils/elasticsearch/esGetIndexName.d.ts +0 -1
- package/utils/elasticsearch/esGetIndexName.js +8 -23
- package/utils/elasticsearch/esGetIndexName.js.map +1 -1
- package/utils/elasticsearch/esGetIndexSettings.d.ts +1 -1
- package/utils/elasticsearch/esGetIndexSettings.js +5 -13
- package/utils/elasticsearch/esGetIndexSettings.js.map +1 -1
- package/utils/elasticsearch/esListIndexes.d.ts +1 -1
- package/utils/elasticsearch/esListIndexes.js +1 -8
- package/utils/elasticsearch/esListIndexes.js.map +1 -1
- package/utils/elasticsearch/esPutIndexSettings.d.ts +1 -1
- package/utils/elasticsearch/esPutIndexSettings.js +3 -11
- package/utils/elasticsearch/esPutIndexSettings.js.map +1 -1
- package/utils/elasticsearch/esQueryAll.d.ts +2 -2
- package/utils/elasticsearch/esQueryAll.js +3 -10
- package/utils/elasticsearch/esQueryAll.js.map +1 -1
- package/utils/elasticsearch/esQueryAllWithCallback.d.ts +2 -2
- package/utils/elasticsearch/esQueryAllWithCallback.js +3 -10
- package/utils/elasticsearch/esQueryAllWithCallback.js.map +1 -1
- package/utils/elasticsearch/fetchOriginalEsSettings.d.ts +2 -3
- package/utils/elasticsearch/fetchOriginalEsSettings.js +4 -12
- package/utils/elasticsearch/fetchOriginalEsSettings.js.map +1 -1
- package/utils/elasticsearch/index.d.ts +12 -12
- package/utils/elasticsearch/index.js +12 -137
- package/utils/elasticsearch/index.js.map +1 -1
- package/utils/elasticsearch/plugins/base.js +3 -9
- package/utils/elasticsearch/plugins/base.js.map +1 -1
- package/utils/elasticsearch/plugins/index.d.ts +1 -1
- package/utils/elasticsearch/plugins/index.js +3 -11
- package/utils/elasticsearch/plugins/index.js.map +1 -1
- package/utils/elasticsearch/restoreOriginalEsSettings.d.ts +3 -4
- package/utils/elasticsearch/restoreOriginalEsSettings.js +13 -12
- package/utils/elasticsearch/restoreOriginalEsSettings.js.map +1 -1
- package/utils/getCompressedData.js +12 -0
- package/utils/getCompressedData.js.map +1 -0
- package/utils/index.d.ts +5 -6
- package/utils/index.js +5 -71
- package/utils/index.js.map +1 -1
- package/migrations/5.35.0/001/FileSettingsMigration.d.ts +0 -12
- package/migrations/5.35.0/001/FileSettingsMigration.js +0 -93
- package/migrations/5.35.0/001/FileSettingsMigration.js.map +0 -1
- package/migrations/5.35.0/001/ddb/FileDataMigration.d.ts +0 -14
- package/migrations/5.35.0/001/ddb/FileDataMigration.js +0 -156
- package/migrations/5.35.0/001/ddb/FileDataMigration.js.map +0 -1
- package/migrations/5.35.0/001/ddb/index.d.ts +0 -10
- package/migrations/5.35.0/001/ddb/index.js +0 -50
- package/migrations/5.35.0/001/ddb/index.js.map +0 -1
- package/migrations/5.35.0/001/ddb-es/FileDataMigration.d.ts +0 -17
- package/migrations/5.35.0/001/ddb-es/FileDataMigration.js +0 -172
- package/migrations/5.35.0/001/ddb-es/FileDataMigration.js.map +0 -1
- package/migrations/5.35.0/001/ddb-es/index.d.ts +0 -12
- package/migrations/5.35.0/001/ddb-es/index.js +0 -65
- package/migrations/5.35.0/001/ddb-es/index.js.map +0 -1
- package/migrations/5.35.0/001/entities/createFileEntity.d.ts +0 -92
- package/migrations/5.35.0/001/entities/createFileEntity.js +0 -61
- package/migrations/5.35.0/001/entities/createFileEntity.js.map +0 -1
- package/migrations/5.35.0/001/entities/createLocaleEntity.d.ts +0 -42
- package/migrations/5.35.0/001/entities/createLocaleEntity.js +0 -52
- package/migrations/5.35.0/001/entities/createLocaleEntity.js.map +0 -1
- package/migrations/5.35.0/001/entities/createSettingsEntity.d.ts +0 -90
- package/migrations/5.35.0/001/entities/createSettingsEntity.js +0 -37
- package/migrations/5.35.0/001/entities/createSettingsEntity.js.map +0 -1
- package/migrations/5.35.0/001/entities/createTenantEntity.d.ts +0 -42
- package/migrations/5.35.0/001/entities/createTenantEntity.js +0 -69
- package/migrations/5.35.0/001/entities/createTenantEntity.js.map +0 -1
- package/migrations/5.35.0/001/types.d.ts +0 -19
- package/migrations/5.35.0/001/types.js +0 -7
- package/migrations/5.35.0/001/types.js.map +0 -1
- package/migrations/5.35.0/002/createLocaleEntity.d.ts +0 -42
- package/migrations/5.35.0/002/createLocaleEntity.js +0 -32
- package/migrations/5.35.0/002/createLocaleEntity.js.map +0 -1
- package/migrations/5.35.0/002/createSettingsEntity.d.ts +0 -90
- package/migrations/5.35.0/002/createSettingsEntity.js +0 -61
- package/migrations/5.35.0/002/createSettingsEntity.js.map +0 -1
- package/migrations/5.35.0/002/createTenantEntity.d.ts +0 -42
- package/migrations/5.35.0/002/createTenantEntity.js +0 -46
- package/migrations/5.35.0/002/createTenantEntity.js.map +0 -1
- package/migrations/5.35.0/002/index.d.ts +0 -13
- package/migrations/5.35.0/002/index.js +0 -117
- package/migrations/5.35.0/002/index.js.map +0 -1
- package/migrations/5.35.0/003/createTenantEntity.d.ts +0 -42
- package/migrations/5.35.0/003/createTenantEntity.js +0 -46
- package/migrations/5.35.0/003/createTenantEntity.js.map +0 -1
- package/migrations/5.35.0/003/createUserEntity.d.ts +0 -90
- package/migrations/5.35.0/003/createUserEntity.js +0 -55
- package/migrations/5.35.0/003/createUserEntity.js.map +0 -1
- package/migrations/5.35.0/003/index.d.ts +0 -12
- package/migrations/5.35.0/003/index.js +0 -92
- package/migrations/5.35.0/003/index.js.map +0 -1
- package/migrations/5.35.0/004/createTenantEntity.d.ts +0 -90
- package/migrations/5.35.0/004/createTenantEntity.js +0 -57
- package/migrations/5.35.0/004/createTenantEntity.js.map +0 -1
- package/migrations/5.35.0/004/index.d.ts +0 -11
- package/migrations/5.35.0/004/index.js +0 -80
- package/migrations/5.35.0/004/index.js.map +0 -1
- package/migrations/5.35.0/005/createLocaleEntity.d.ts +0 -42
- package/migrations/5.35.0/005/createLocaleEntity.js +0 -32
- package/migrations/5.35.0/005/createLocaleEntity.js.map +0 -1
- package/migrations/5.35.0/005/createModelEntity.d.ts +0 -42
- package/migrations/5.35.0/005/createModelEntity.js +0 -101
- package/migrations/5.35.0/005/createModelEntity.js.map +0 -1
- package/migrations/5.35.0/005/createTenantEntity.d.ts +0 -48
- package/migrations/5.35.0/005/createTenantEntity.js +0 -13
- package/migrations/5.35.0/005/createTenantEntity.js.map +0 -1
- package/migrations/5.35.0/005/index.d.ts +0 -15
- package/migrations/5.35.0/005/index.js +0 -144
- package/migrations/5.35.0/005/index.js.map +0 -1
- package/migrations/5.35.0/005/types.d.ts +0 -42
- package/migrations/5.35.0/005/types.js +0 -7
- package/migrations/5.35.0/005/types.js.map +0 -1
- package/migrations/5.35.0/006/constants.d.ts +0 -3
- package/migrations/5.35.0/006/constants.js +0 -11
- package/migrations/5.35.0/006/constants.js.map +0 -1
- package/migrations/5.35.0/006/ddb/PageDataMigration.d.ts +0 -17
- package/migrations/5.35.0/006/ddb/PageDataMigration.js +0 -249
- package/migrations/5.35.0/006/ddb/PageDataMigration.js.map +0 -1
- package/migrations/5.35.0/006/ddb/index.d.ts +0 -10
- package/migrations/5.35.0/006/ddb/index.js +0 -49
- package/migrations/5.35.0/006/ddb/index.js.map +0 -1
- package/migrations/5.35.0/006/ddb-es/PageDataMigration.d.ts +0 -22
- package/migrations/5.35.0/006/ddb-es/PageDataMigration.js +0 -413
- package/migrations/5.35.0/006/ddb-es/PageDataMigration.js.map +0 -1
- package/migrations/5.35.0/006/ddb-es/index.d.ts +0 -12
- package/migrations/5.35.0/006/ddb-es/index.js +0 -64
- package/migrations/5.35.0/006/ddb-es/index.js.map +0 -1
- package/migrations/5.35.0/006/entities/createEntryEntity.d.ts +0 -89
- package/migrations/5.35.0/006/entities/createEntryEntity.js +0 -106
- package/migrations/5.35.0/006/entities/createEntryEntity.js.map +0 -1
- package/migrations/5.35.0/006/entities/createLocaleEntity.d.ts +0 -42
- package/migrations/5.35.0/006/entities/createLocaleEntity.js +0 -32
- package/migrations/5.35.0/006/entities/createLocaleEntity.js.map +0 -1
- package/migrations/5.35.0/006/entities/createPageEntity.d.ts +0 -89
- package/migrations/5.35.0/006/entities/createPageEntity.js +0 -113
- package/migrations/5.35.0/006/entities/createPageEntity.js.map +0 -1
- package/migrations/5.35.0/006/entities/createTenantEntity.d.ts +0 -48
- package/migrations/5.35.0/006/entities/createTenantEntity.js +0 -13
- package/migrations/5.35.0/006/entities/createTenantEntity.js.map +0 -1
- package/migrations/5.35.0/006/types.d.ts +0 -91
- package/migrations/5.35.0/006/types.js +0 -7
- package/migrations/5.35.0/006/types.js.map +0 -1
- package/migrations/5.35.0/006/utils/getCompressedData.js +0 -19
- package/migrations/5.35.0/006/utils/getCompressedData.js.map +0 -1
- package/migrations/5.35.0/006/utils/getLexicalContentText.d.ts +0 -1
- package/migrations/5.35.0/006/utils/getLexicalContentText.js +0 -29
- package/migrations/5.35.0/006/utils/getLexicalContentText.js.map +0 -1
- package/migrations/5.35.0/006/utils/getSearchableContent.d.ts +0 -6
- package/migrations/5.35.0/006/utils/getSearchableContent.js +0 -45
- package/migrations/5.35.0/006/utils/getSearchableContent.js.map +0 -1
- package/migrations/5.35.0/006/utils/processors/button.d.ts +0 -1
- package/migrations/5.35.0/006/utils/processors/button.js +0 -17
- package/migrations/5.35.0/006/utils/processors/button.js.map +0 -1
- package/migrations/5.35.0/006/utils/processors/image.d.ts +0 -1
- package/migrations/5.35.0/006/utils/processors/image.js +0 -17
- package/migrations/5.35.0/006/utils/processors/image.js.map +0 -1
- package/migrations/5.35.0/006/utils/processors/images.d.ts +0 -1
- package/migrations/5.35.0/006/utils/processors/images.js +0 -18
- package/migrations/5.35.0/006/utils/processors/images.js.map +0 -1
- package/migrations/5.35.0/006/utils/processors/index.d.ts +0 -1
- package/migrations/5.35.0/006/utils/processors/index.js +0 -13
- package/migrations/5.35.0/006/utils/processors/index.js.map +0 -1
- package/migrations/5.35.0/006/utils/processors/paragraph.d.ts +0 -1
- package/migrations/5.35.0/006/utils/processors/paragraph.js +0 -25
- package/migrations/5.35.0/006/utils/processors/paragraph.js.map +0 -1
- package/migrations/5.36.0/001/constants.d.ts +0 -3
- package/migrations/5.36.0/001/constants.js +0 -11
- package/migrations/5.36.0/001/constants.js.map +0 -1
- package/migrations/5.36.0/001/ddb/FileDataMigration.d.ts +0 -17
- package/migrations/5.36.0/001/ddb/FileDataMigration.js +0 -241
- package/migrations/5.36.0/001/ddb/FileDataMigration.js.map +0 -1
- package/migrations/5.36.0/001/ddb/index.d.ts +0 -10
- package/migrations/5.36.0/001/ddb/index.js +0 -49
- package/migrations/5.36.0/001/ddb/index.js.map +0 -1
- package/migrations/5.36.0/001/ddb-es/FileDataMigration.d.ts +0 -20
- package/migrations/5.36.0/001/ddb-es/FileDataMigration.js +0 -405
- package/migrations/5.36.0/001/ddb-es/FileDataMigration.js.map +0 -1
- package/migrations/5.36.0/001/ddb-es/index.d.ts +0 -12
- package/migrations/5.36.0/001/ddb-es/index.js +0 -64
- package/migrations/5.36.0/001/ddb-es/index.js.map +0 -1
- package/migrations/5.36.0/001/entities/createEntryEntity.d.ts +0 -89
- package/migrations/5.36.0/001/entities/createEntryEntity.js +0 -106
- package/migrations/5.36.0/001/entities/createEntryEntity.js.map +0 -1
- package/migrations/5.36.0/001/entities/createFileEntity.d.ts +0 -95
- package/migrations/5.36.0/001/entities/createFileEntity.js +0 -33
- package/migrations/5.36.0/001/entities/createFileEntity.js.map +0 -1
- package/migrations/5.36.0/001/entities/createLocaleEntity.d.ts +0 -42
- package/migrations/5.36.0/001/entities/createLocaleEntity.js +0 -32
- package/migrations/5.36.0/001/entities/createLocaleEntity.js.map +0 -1
- package/migrations/5.36.0/001/entities/createTenantEntity.d.ts +0 -48
- package/migrations/5.36.0/001/entities/createTenantEntity.js +0 -13
- package/migrations/5.36.0/001/entities/createTenantEntity.js.map +0 -1
- package/migrations/5.36.0/001/types.d.ts +0 -67
- package/migrations/5.36.0/001/types.js +0 -7
- package/migrations/5.36.0/001/types.js.map +0 -1
- package/migrations/5.36.0/001/utils/createMimeTag.d.ts +0 -1
- package/migrations/5.36.0/001/utils/createMimeTag.js +0 -10
- package/migrations/5.36.0/001/utils/createMimeTag.js.map +0 -1
- package/migrations/5.36.0/001/utils/getCompressedData.d.ts +0 -4
- package/migrations/5.36.0/001/utils/getCompressedData.js +0 -19
- package/migrations/5.36.0/001/utils/getCompressedData.js.map +0 -1
- package/migrations/5.37.0/001/TenantLinkDataMigration.d.ts +0 -14
- package/migrations/5.37.0/001/TenantLinkDataMigration.js +0 -106
- package/migrations/5.37.0/001/TenantLinkDataMigration.js.map +0 -1
- package/migrations/5.37.0/001/entities/createTenantEntity.d.ts +0 -48
- package/migrations/5.37.0/001/entities/createTenantEntity.js +0 -13
- package/migrations/5.37.0/001/entities/createTenantEntity.js.map +0 -1
- package/migrations/5.37.0/001/entities/createTenantLinkEntity.d.ts +0 -48
- package/migrations/5.37.0/001/entities/createTenantLinkEntity.js +0 -17
- package/migrations/5.37.0/001/entities/createTenantLinkEntity.js.map +0 -1
- package/migrations/5.37.0/001/index.d.ts +0 -10
- package/migrations/5.37.0/001/index.js +0 -49
- package/migrations/5.37.0/001/index.js.map +0 -1
- package/migrations/5.37.0/001/types.d.ts +0 -25
- package/migrations/5.37.0/001/types.js +0 -7
- package/migrations/5.37.0/001/types.js.map +0 -1
- package/migrations/5.37.0/001/utils/isMigratedTenantLink.d.ts +0 -2
- package/migrations/5.37.0/001/utils/isMigratedTenantLink.js +0 -12
- package/migrations/5.37.0/001/utils/isMigratedTenantLink.js.map +0 -1
- package/migrations/5.37.0/002/constants.d.ts +0 -1
- package/migrations/5.37.0/002/constants.js +0 -9
- package/migrations/5.37.0/002/constants.js.map +0 -1
- package/migrations/5.37.0/002/ddb/index.d.ts +0 -22
- package/migrations/5.37.0/002/ddb/index.js +0 -133
- package/migrations/5.37.0/002/ddb/index.js.map +0 -1
- package/migrations/5.37.0/002/ddb-es/index.d.ts +0 -35
- package/migrations/5.37.0/002/ddb-es/index.js +0 -321
- package/migrations/5.37.0/002/ddb-es/index.js.map +0 -1
- package/migrations/5.37.0/002/entities/createEntryEntity.d.ts +0 -89
- package/migrations/5.37.0/002/entities/createEntryEntity.js +0 -109
- package/migrations/5.37.0/002/entities/createEntryEntity.js.map +0 -1
- package/migrations/5.37.0/002/entities/createLocaleEntity.d.ts +0 -42
- package/migrations/5.37.0/002/entities/createLocaleEntity.js +0 -32
- package/migrations/5.37.0/002/entities/createLocaleEntity.js.map +0 -1
- package/migrations/5.37.0/002/entities/createTenantEntity.d.ts +0 -48
- package/migrations/5.37.0/002/entities/createTenantEntity.js +0 -13
- package/migrations/5.37.0/002/entities/createTenantEntity.js.map +0 -1
- package/migrations/5.37.0/002/types.d.ts +0 -53
- package/migrations/5.37.0/002/types.js +0 -7
- package/migrations/5.37.0/002/types.js.map +0 -1
- package/migrations/5.37.0/002/utils/getCompressedData.d.ts +0 -4
- package/migrations/5.37.0/002/utils/getCompressedData.js +0 -19
- package/migrations/5.37.0/002/utils/getCompressedData.js.map +0 -1
- package/migrations/5.37.0/002/utils/getDecompressedData.d.ts +0 -1
- package/migrations/5.37.0/002/utils/getDecompressedData.js +0 -31
- package/migrations/5.37.0/002/utils/getDecompressedData.js.map +0 -1
- package/migrations/5.37.0/003/constants.d.ts +0 -3
- package/migrations/5.37.0/003/constants.js +0 -11
- package/migrations/5.37.0/003/constants.js.map +0 -1
- package/migrations/5.37.0/003/ddb/AcoFolderMigration.d.ts +0 -15
- package/migrations/5.37.0/003/ddb/AcoFolderMigration.js +0 -179
- package/migrations/5.37.0/003/ddb/AcoFolderMigration.js.map +0 -1
- package/migrations/5.37.0/003/ddb/index.d.ts +0 -10
- package/migrations/5.37.0/003/ddb/index.js +0 -49
- package/migrations/5.37.0/003/ddb/index.js.map +0 -1
- package/migrations/5.37.0/003/ddb-es/AcoFolderMigration.d.ts +0 -20
- package/migrations/5.37.0/003/ddb-es/AcoFolderMigration.js +0 -313
- package/migrations/5.37.0/003/ddb-es/AcoFolderMigration.js.map +0 -1
- package/migrations/5.37.0/003/ddb-es/index.d.ts +0 -12
- package/migrations/5.37.0/003/ddb-es/index.js +0 -64
- package/migrations/5.37.0/003/ddb-es/index.js.map +0 -1
- package/migrations/5.37.0/003/ddb-es/latestElasticsearchData.d.ts +0 -4
- package/migrations/5.37.0/003/ddb-es/latestElasticsearchData.js +0 -30
- package/migrations/5.37.0/003/ddb-es/latestElasticsearchData.js.map +0 -1
- package/migrations/5.37.0/003/entities/createEntryEntity.d.ts +0 -89
- package/migrations/5.37.0/003/entities/createEntryEntity.js +0 -109
- package/migrations/5.37.0/003/entities/createEntryEntity.js.map +0 -1
- package/migrations/5.37.0/003/entities/createLocaleEntity.d.ts +0 -42
- package/migrations/5.37.0/003/entities/createLocaleEntity.js +0 -32
- package/migrations/5.37.0/003/entities/createLocaleEntity.js.map +0 -1
- package/migrations/5.37.0/003/entities/createTenantEntity.d.ts +0 -48
- package/migrations/5.37.0/003/entities/createTenantEntity.js +0 -13
- package/migrations/5.37.0/003/entities/createTenantEntity.js.map +0 -1
- package/migrations/5.37.0/003/types.d.ts +0 -46
- package/migrations/5.37.0/003/types.js +0 -7
- package/migrations/5.37.0/003/types.js.map +0 -1
- package/migrations/5.37.0/003/utils/getCompressedData.d.ts +0 -4
- package/migrations/5.37.0/003/utils/getCompressedData.js +0 -19
- package/migrations/5.37.0/003/utils/getCompressedData.js.map +0 -1
- package/migrations/5.37.0/003/utils/getDecompressedData.d.ts +0 -1
- package/migrations/5.37.0/003/utils/getDecompressedData.js +0 -31
- package/migrations/5.37.0/003/utils/getDecompressedData.js.map +0 -1
- package/migrations/5.37.0/004/constants.d.ts +0 -7
- package/migrations/5.37.0/004/constants.js +0 -15
- package/migrations/5.37.0/004/constants.js.map +0 -1
- package/migrations/5.37.0/004/ddb/PageDataMigration.d.ts +0 -17
- package/migrations/5.37.0/004/ddb/PageDataMigration.js +0 -269
- package/migrations/5.37.0/004/ddb/PageDataMigration.js.map +0 -1
- package/migrations/5.37.0/004/ddb/index.d.ts +0 -10
- package/migrations/5.37.0/004/ddb/index.js +0 -49
- package/migrations/5.37.0/004/ddb/index.js.map +0 -1
- package/migrations/5.37.0/004/ddb-es/PageDataMigration.d.ts +0 -22
- package/migrations/5.37.0/004/ddb-es/PageDataMigration.js +0 -364
- package/migrations/5.37.0/004/ddb-es/PageDataMigration.js.map +0 -1
- package/migrations/5.37.0/004/ddb-es/index.d.ts +0 -12
- package/migrations/5.37.0/004/ddb-es/index.js +0 -64
- package/migrations/5.37.0/004/ddb-es/index.js.map +0 -1
- package/migrations/5.37.0/004/entities/createEntryEntity.d.ts +0 -89
- package/migrations/5.37.0/004/entities/createEntryEntity.js +0 -109
- package/migrations/5.37.0/004/entities/createEntryEntity.js.map +0 -1
- package/migrations/5.37.0/004/entities/createLocaleEntity.d.ts +0 -42
- package/migrations/5.37.0/004/entities/createLocaleEntity.js +0 -32
- package/migrations/5.37.0/004/entities/createLocaleEntity.js.map +0 -1
- package/migrations/5.37.0/004/entities/createPageEntity.d.ts +0 -89
- package/migrations/5.37.0/004/entities/createPageEntity.js +0 -113
- package/migrations/5.37.0/004/entities/createPageEntity.js.map +0 -1
- package/migrations/5.37.0/004/entities/createTenantEntity.d.ts +0 -48
- package/migrations/5.37.0/004/entities/createTenantEntity.js +0 -13
- package/migrations/5.37.0/004/entities/createTenantEntity.js.map +0 -1
- package/migrations/5.37.0/004/types.d.ts +0 -149
- package/migrations/5.37.0/004/types.js +0 -7
- package/migrations/5.37.0/004/types.js.map +0 -1
- package/migrations/5.37.0/004/utils/getCompressedData.d.ts +0 -4
- package/migrations/5.37.0/004/utils/getCompressedData.js +0 -19
- package/migrations/5.37.0/004/utils/getCompressedData.js.map +0 -1
- package/migrations/5.37.0/005/constants.d.ts +0 -3
- package/migrations/5.37.0/005/constants.js +0 -11
- package/migrations/5.37.0/005/constants.js.map +0 -1
- package/migrations/5.37.0/005/ddb/index.d.ts +0 -20
- package/migrations/5.37.0/005/ddb/index.js +0 -245
- package/migrations/5.37.0/005/ddb/index.js.map +0 -1
- package/migrations/5.37.0/005/ddb-es/index.d.ts +0 -22
- package/migrations/5.37.0/005/ddb-es/index.js +0 -382
- package/migrations/5.37.0/005/ddb-es/index.js.map +0 -1
- package/migrations/5.37.0/005/entities/createEntryEntity.d.ts +0 -89
- package/migrations/5.37.0/005/entities/createEntryEntity.js +0 -109
- package/migrations/5.37.0/005/entities/createEntryEntity.js.map +0 -1
- package/migrations/5.37.0/005/entities/createFileEntity.d.ts +0 -95
- package/migrations/5.37.0/005/entities/createFileEntity.js +0 -33
- package/migrations/5.37.0/005/entities/createFileEntity.js.map +0 -1
- package/migrations/5.37.0/005/entities/createLocaleEntity.d.ts +0 -42
- package/migrations/5.37.0/005/entities/createLocaleEntity.js +0 -32
- package/migrations/5.37.0/005/entities/createLocaleEntity.js.map +0 -1
- package/migrations/5.37.0/005/entities/createTenantEntity.d.ts +0 -48
- package/migrations/5.37.0/005/entities/createTenantEntity.js +0 -13
- package/migrations/5.37.0/005/entities/createTenantEntity.js.map +0 -1
- package/migrations/5.37.0/005/entities/createTenantLinkEntity.d.ts +0 -48
- package/migrations/5.37.0/005/entities/createTenantLinkEntity.js +0 -17
- package/migrations/5.37.0/005/entities/createTenantLinkEntity.js.map +0 -1
- package/migrations/5.37.0/005/types.d.ts +0 -109
- package/migrations/5.37.0/005/types.js +0 -7
- package/migrations/5.37.0/005/types.js.map +0 -1
- package/migrations/5.38.0/001/ddb/index.d.ts +0 -11
- package/migrations/5.38.0/001/ddb/index.js +0 -116
- package/migrations/5.38.0/001/ddb/index.js.map +0 -1
- package/migrations/5.38.0/001/ddb-es/index.d.ts +0 -13
- package/migrations/5.38.0/001/ddb-es/index.js +0 -211
- package/migrations/5.38.0/001/ddb-es/index.js.map +0 -1
- package/migrations/5.38.0/001/entities/createFormEntity.d.ts +0 -42
- package/migrations/5.38.0/001/entities/createFormEntity.js +0 -92
- package/migrations/5.38.0/001/entities/createFormEntity.js.map +0 -1
- package/migrations/5.38.0/001/types.d.ts +0 -11
- package/migrations/5.38.0/001/types.js +0 -7
- package/migrations/5.38.0/001/types.js.map +0 -1
- package/migrations/5.38.0/002/ddb/index.d.ts +0 -22
- package/migrations/5.38.0/002/ddb/index.js +0 -140
- package/migrations/5.38.0/002/ddb/index.js.map +0 -1
- package/migrations/5.38.0/002/ddb-es/index.d.ts +0 -32
- package/migrations/5.38.0/002/ddb-es/index.js +0 -250
- package/migrations/5.38.0/002/ddb-es/index.js.map +0 -1
- package/migrations/5.38.0/002/entities/createFormEntity.d.ts +0 -42
- package/migrations/5.38.0/002/entities/createFormEntity.js +0 -92
- package/migrations/5.38.0/002/entities/createFormEntity.js.map +0 -1
- package/migrations/5.38.0/002/entities/createFormSubmissionDdbEsEntity.d.ts +0 -48
- package/migrations/5.38.0/002/entities/createFormSubmissionDdbEsEntity.js +0 -29
- package/migrations/5.38.0/002/entities/createFormSubmissionDdbEsEntity.js.map +0 -1
- package/migrations/5.38.0/002/entities/createFormSubmissionEntity.d.ts +0 -42
- package/migrations/5.38.0/002/entities/createFormSubmissionEntity.js +0 -56
- package/migrations/5.38.0/002/entities/createFormSubmissionEntity.js.map +0 -1
- package/migrations/5.38.0/002/types.d.ts +0 -23
- package/migrations/5.38.0/002/types.js +0 -7
- package/migrations/5.38.0/002/types.js.map +0 -1
- package/migrations/5.38.0/003/ddb/compressContent.d.ts +0 -4
- package/migrations/5.38.0/003/ddb/compressContent.js +0 -17
- package/migrations/5.38.0/003/ddb/compressContent.js.map +0 -1
- package/migrations/5.38.0/003/ddb/index.d.ts +0 -12
- package/migrations/5.38.0/003/ddb/index.js +0 -143
- package/migrations/5.38.0/003/ddb/index.js.map +0 -1
- package/migrations/5.38.0/003/entities/createPageBlockEntity.d.ts +0 -83
- package/migrations/5.38.0/003/entities/createPageBlockEntity.js +0 -68
- package/migrations/5.38.0/003/entities/createPageBlockEntity.js.map +0 -1
- package/migrations/5.38.0/003/types.d.ts +0 -8
- package/migrations/5.38.0/003/types.js +0 -7
- package/migrations/5.38.0/003/types.js.map +0 -1
- package/migrations/5.39.0/001/ddb/index.d.ts +0 -20
- package/migrations/5.39.0/001/ddb/index.js +0 -136
- package/migrations/5.39.0/001/ddb/index.js.map +0 -1
- package/migrations/5.39.0/001/ddb-es/index.d.ts +0 -30
- package/migrations/5.39.0/001/ddb-es/index.js +0 -266
- package/migrations/5.39.0/001/ddb-es/index.js.map +0 -1
- package/migrations/5.39.0/001/entities/createEntryEntity.d.ts +0 -89
- package/migrations/5.39.0/001/entities/createEntryEntity.js +0 -188
- package/migrations/5.39.0/001/entities/createEntryEntity.js.map +0 -1
- package/migrations/5.39.0/001/types.d.ts +0 -136
- package/migrations/5.39.0/001/types.js +0 -7
- package/migrations/5.39.0/001/types.js.map +0 -1
- package/migrations/5.39.0/001/utils/assignNewMetaFields.d.ts +0 -11
- package/migrations/5.39.0/001/utils/assignNewMetaFields.js +0 -44
- package/migrations/5.39.0/001/utils/assignNewMetaFields.js.map +0 -1
- package/migrations/5.39.0/001/utils/ensureAllNonNullableValues.d.ts +0 -8
- package/migrations/5.39.0/001/utils/ensureAllNonNullableValues.js +0 -38
- package/migrations/5.39.0/001/utils/ensureAllNonNullableValues.js.map +0 -1
- package/migrations/5.39.0/001/utils/fixTypeFieldValue.d.ts +0 -3
- package/migrations/5.39.0/001/utils/fixTypeFieldValue.js +0 -33
- package/migrations/5.39.0/001/utils/fixTypeFieldValue.js.map +0 -1
- package/migrations/5.39.0/001/utils/getCompressedData.d.ts +0 -4
- package/migrations/5.39.0/001/utils/getCompressedData.js +0 -19
- package/migrations/5.39.0/001/utils/getCompressedData.js.map +0 -1
- package/migrations/5.39.0/001/utils/getDecompressedData.d.ts +0 -1
- package/migrations/5.39.0/001/utils/getDecompressedData.js +0 -31
- package/migrations/5.39.0/001/utils/getDecompressedData.js.map +0 -1
- package/migrations/5.39.0/001/utils/getFallbackIdentity.d.ts +0 -8
- package/migrations/5.39.0/001/utils/getFallbackIdentity.js +0 -44
- package/migrations/5.39.0/001/utils/getFallbackIdentity.js.map +0 -1
- package/migrations/5.39.0/001/utils/getFirstLastPublishedOn.d.ts +0 -11
- package/migrations/5.39.0/001/utils/getFirstLastPublishedOn.js +0 -40
- package/migrations/5.39.0/001/utils/getFirstLastPublishedOn.js.map +0 -1
- package/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues.d.ts +0 -2
- package/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues.js +0 -22
- package/migrations/5.39.0/001/utils/getNonNullableFieldsWithMissingValues.js.map +0 -1
- package/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn.d.ts +0 -11
- package/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn.js +0 -33
- package/migrations/5.39.0/001/utils/getOldestRevisionCreatedOn.js.map +0 -1
- package/migrations/5.39.0/001/utils/hasAllNonNullableValues.d.ts +0 -2
- package/migrations/5.39.0/001/utils/hasAllNonNullableValues.js +0 -21
- package/migrations/5.39.0/001/utils/hasAllNonNullableValues.js.map +0 -1
- package/migrations/5.39.0/001/utils/hasValidTypeFieldValue.d.ts +0 -4
- package/migrations/5.39.0/001/utils/hasValidTypeFieldValue.js +0 -21
- package/migrations/5.39.0/001/utils/hasValidTypeFieldValue.js.map +0 -1
- package/migrations/5.39.0/001/utils/isMigratedEntry.d.ts +0 -2
- package/migrations/5.39.0/001/utils/isMigratedEntry.js +0 -12
- package/migrations/5.39.0/001/utils/isMigratedEntry.js.map +0 -1
- package/migrations/5.39.0/002/ddb/FileManager_5_39_0_002.d.ts +0 -14
- package/migrations/5.39.0/002/ddb/FileManager_5_39_0_002.js +0 -133
- package/migrations/5.39.0/002/ddb/FileManager_5_39_0_002.js.map +0 -1
- package/migrations/5.39.0/002/ddb/index.d.ts +0 -1
- package/migrations/5.39.0/002/ddb/index.js +0 -18
- package/migrations/5.39.0/002/ddb/index.js.map +0 -1
- package/migrations/5.39.0/002/ddb-es/FileManager_5_39_0_002.d.ts +0 -15
- package/migrations/5.39.0/002/ddb-es/FileManager_5_39_0_002.js +0 -190
- package/migrations/5.39.0/002/ddb-es/FileManager_5_39_0_002.js.map +0 -1
- package/migrations/5.39.0/002/ddb-es/index.d.ts +0 -1
- package/migrations/5.39.0/002/ddb-es/index.js +0 -18
- package/migrations/5.39.0/002/ddb-es/index.js.map +0 -1
- package/migrations/5.39.0/002/utils/FileMetadata.d.ts +0 -12
- package/migrations/5.39.0/002/utils/FileMetadata.js +0 -55
- package/migrations/5.39.0/002/utils/FileMetadata.js.map +0 -1
- package/migrations/5.39.0/002/utils/createFileEntity.d.ts +0 -53
- package/migrations/5.39.0/002/utils/createFileEntity.js +0 -50
- package/migrations/5.39.0/002/utils/createFileEntity.js.map +0 -1
- package/migrations/5.39.0/002/utils/createLocaleEntity.d.ts +0 -42
- package/migrations/5.39.0/002/utils/createLocaleEntity.js +0 -32
- package/migrations/5.39.0/002/utils/createLocaleEntity.js.map +0 -1
- package/migrations/5.39.0/002/utils/createTenantEntity.d.ts +0 -48
- package/migrations/5.39.0/002/utils/createTenantEntity.js +0 -13
- package/migrations/5.39.0/002/utils/createTenantEntity.js.map +0 -1
- package/migrations/5.39.2/001/ddb-es/index.d.ts +0 -30
- package/migrations/5.39.2/001/ddb-es/index.js +0 -276
- package/migrations/5.39.2/001/ddb-es/index.js.map +0 -1
- package/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.d.ts +0 -21
- package/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.js +0 -167
- package/migrations/5.39.6/001/ddb-es/MetaFieldsMigration.js.map +0 -1
- package/migrations/5.39.6/001/ddb-es/SegmentProcessor.d.ts +0 -23
- package/migrations/5.39.6/001/ddb-es/SegmentProcessor.js +0 -31
- package/migrations/5.39.6/001/ddb-es/SegmentProcessor.js.map +0 -1
- package/migrations/5.39.6/001/ddb-es/bin.d.ts +0 -2
- package/migrations/5.39.6/001/ddb-es/bin.js +0 -83
- package/migrations/5.39.6/001/ddb-es/bin.js.map +0 -1
- package/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.d.ts +0 -11
- package/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.js +0 -83
- package/migrations/5.39.6/001/ddb-es/createMetaFieldsDataMigrationDeploymentHook.js.map +0 -1
- package/migrations/5.39.6/001/ddb-es/index.d.ts +0 -30
- package/migrations/5.39.6/001/ddb-es/index.js +0 -329
- package/migrations/5.39.6/001/ddb-es/index.js.map +0 -1
- package/migrations/5.39.6/001/ddb-es/utils.d.ts +0 -28
- package/migrations/5.39.6/001/ddb-es/utils.js +0 -60
- package/migrations/5.39.6/001/ddb-es/utils.js.map +0 -1
- package/migrations/5.39.6/001/ddb-es/worker.d.ts +0 -1
- package/migrations/5.39.6/001/ddb-es/worker.js +0 -352
- package/migrations/5.39.6/001/ddb-es/worker.js.map +0 -1
- package/migrations/5.40.0/001/ddb/compression.d.ts +0 -15
- package/migrations/5.40.0/001/ddb/compression.js +0 -42
- package/migrations/5.40.0/001/ddb/compression.js.map +0 -1
- package/migrations/5.40.0/001/ddb/createBlockEntity.d.ts +0 -42
- package/migrations/5.40.0/001/ddb/createBlockEntity.js +0 -54
- package/migrations/5.40.0/001/ddb/createBlockEntity.js.map +0 -1
- package/migrations/5.40.0/001/ddb/index.d.ts +0 -13
- package/migrations/5.40.0/001/ddb/index.js +0 -155
- package/migrations/5.40.0/001/ddb/index.js.map +0 -1
- package/migrations/5.40.0/001/ddb/types.d.ts +0 -20
- package/migrations/5.40.0/001/ddb/types.js +0 -7
- package/migrations/5.40.0/001/ddb/types.js.map +0 -1
- package/utils/createLocaleEntity.d.ts +0 -42
- package/utils/createLocaleEntity.js +0 -32
- package/utils/createLocaleEntity.js.map +0 -1
- package/utils/elasticsearch/plugins/japanese.d.ts +0 -4
- package/utils/elasticsearch/plugins/japanese.js +0 -13
- package/utils/elasticsearch/plugins/japanese.js.map +0 -1
- package/utils/forEachTenantLocale.d.ts +0 -13
- package/utils/forEachTenantLocale.js +0 -55
- package/utils/forEachTenantLocale.js.map +0 -1
- /package/{migrations/5.35.0/006/utils → utils}/getCompressedData.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["esGetIndexSettings","fetchOriginalElasticsearchSettings","params","index","logger","settings","elasticsearchClient","fields","refresh_interval","ex","error","message","code","data"],"sources":["fetchOriginalEsSettings.ts"],"sourcesContent":["import { esGetIndexSettings } from \"~/utils/index.js\";\nimport type { Logger } from \"@webiny/data-migration\";\nimport type { Client } from \"@elastic/elasticsearch\";\n\ninterface FetchOriginalElasticsearchSettingsParams {\n elasticsearchClient: Client;\n index: string;\n logger: Logger;\n}\n\ninterface IndexSettings {\n refresh_interval: `${number}s`;\n}\n\nexport const fetchOriginalElasticsearchSettings = async (\n params: FetchOriginalElasticsearchSettingsParams\n): Promise<IndexSettings | null> => {\n const { index, logger } = params;\n try {\n const settings = await esGetIndexSettings({\n elasticsearchClient: params.elasticsearchClient,\n index,\n fields: [\"refresh_interval\"]\n });\n return {\n refresh_interval: settings.refresh_interval || \"1s\"\n };\n } catch (ex) {\n logger.error(`Failed to fetch original Elasticsearch settings for index \"${index}\".`);\n logger.error({\n ...ex,\n message: ex.message,\n code: ex.code,\n data: ex.data\n });\n }\n\n return null;\n};\n"],"mappings":"AAAA,SAASA,kBAAkB;AAc3B,OAAO,MAAMC,kCAAkC,GAAG,MAC9CC,MAAgD,IAChB;EAChC,MAAM;IAAEC,KAAK;IAAEC;EAAO,CAAC,GAAGF,MAAM;EAChC,IAAI;IACA,MAAMG,QAAQ,GAAG,MAAML,kBAAkB,CAAC;MACtCM,mBAAmB,EAAEJ,MAAM,CAACI,mBAAmB;MAC/CH,KAAK;MACLI,MAAM,EAAE,CAAC,kBAAkB;IAC/B,CAAC,CAAC;IACF,OAAO;MACHC,gBAAgB,EAAEH,QAAQ,CAACG,gBAAgB,IAAI;IACnD,CAAC;EACL,CAAC,CAAC,OAAOC,EAAE,EAAE;IACTL,MAAM,CAACM,KAAK,CAAC,8DAA8DP,KAAK,IAAI,CAAC;IACrFC,MAAM,CAACM,KAAK,CAAC;MACT,GAAGD,EAAE;MACLE,OAAO,EAAEF,EAAE,CAACE,OAAO;MACnBC,IAAI,EAAEH,EAAE,CAACG,IAAI;MACbC,IAAI,EAAEJ,EAAE,CAACI;IACb,CAAC,CAAC;EACN;EAEA,OAAO,IAAI;AACf,CAAC","ignoreList":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export * from "./esCreateIndex";
|
|
2
|
-
export * from "./esFindOne";
|
|
3
|
-
export * from "./esGetIndexExist";
|
|
4
|
-
export * from "./esGetIndexName";
|
|
5
|
-
export * from "./esGetIndexSettings";
|
|
6
|
-
export * from "./esPutIndexSettings";
|
|
7
|
-
export * from "./esQueryAllWithCallback";
|
|
8
|
-
export * from "./esQueryAll";
|
|
9
|
-
export * from "./esListIndexes";
|
|
10
|
-
export * from "./disableEsIndexing";
|
|
11
|
-
export * from "./fetchOriginalEsSettings";
|
|
12
|
-
export * from "./restoreOriginalEsSettings";
|
|
1
|
+
export * from "./esCreateIndex.js";
|
|
2
|
+
export * from "./esFindOne.js";
|
|
3
|
+
export * from "./esGetIndexExist.js";
|
|
4
|
+
export * from "./esGetIndexName.js";
|
|
5
|
+
export * from "./esGetIndexSettings.js";
|
|
6
|
+
export * from "./esPutIndexSettings.js";
|
|
7
|
+
export * from "./esQueryAllWithCallback.js";
|
|
8
|
+
export * from "./esQueryAll.js";
|
|
9
|
+
export * from "./esListIndexes.js";
|
|
10
|
+
export * from "./disableEsIndexing.js";
|
|
11
|
+
export * from "./fetchOriginalEsSettings.js";
|
|
12
|
+
export * from "./restoreOriginalEsSettings.js";
|
|
@@ -1,139 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return _esCreateIndex[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _esFindOne = require("./esFindOne");
|
|
18
|
-
Object.keys(_esFindOne).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _esFindOne[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _esFindOne[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _esGetIndexExist = require("./esGetIndexExist");
|
|
29
|
-
Object.keys(_esGetIndexExist).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _esGetIndexExist[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _esGetIndexExist[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _esGetIndexName = require("./esGetIndexName");
|
|
40
|
-
Object.keys(_esGetIndexName).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _esGetIndexName[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _esGetIndexName[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _esGetIndexSettings = require("./esGetIndexSettings");
|
|
51
|
-
Object.keys(_esGetIndexSettings).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _esGetIndexSettings[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _esGetIndexSettings[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _esPutIndexSettings = require("./esPutIndexSettings");
|
|
62
|
-
Object.keys(_esPutIndexSettings).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _esPutIndexSettings[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return _esPutIndexSettings[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
var _esQueryAllWithCallback = require("./esQueryAllWithCallback");
|
|
73
|
-
Object.keys(_esQueryAllWithCallback).forEach(function (key) {
|
|
74
|
-
if (key === "default" || key === "__esModule") return;
|
|
75
|
-
if (key in exports && exports[key] === _esQueryAllWithCallback[key]) return;
|
|
76
|
-
Object.defineProperty(exports, key, {
|
|
77
|
-
enumerable: true,
|
|
78
|
-
get: function () {
|
|
79
|
-
return _esQueryAllWithCallback[key];
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
var _esQueryAll = require("./esQueryAll");
|
|
84
|
-
Object.keys(_esQueryAll).forEach(function (key) {
|
|
85
|
-
if (key === "default" || key === "__esModule") return;
|
|
86
|
-
if (key in exports && exports[key] === _esQueryAll[key]) return;
|
|
87
|
-
Object.defineProperty(exports, key, {
|
|
88
|
-
enumerable: true,
|
|
89
|
-
get: function () {
|
|
90
|
-
return _esQueryAll[key];
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
var _esListIndexes = require("./esListIndexes");
|
|
95
|
-
Object.keys(_esListIndexes).forEach(function (key) {
|
|
96
|
-
if (key === "default" || key === "__esModule") return;
|
|
97
|
-
if (key in exports && exports[key] === _esListIndexes[key]) return;
|
|
98
|
-
Object.defineProperty(exports, key, {
|
|
99
|
-
enumerable: true,
|
|
100
|
-
get: function () {
|
|
101
|
-
return _esListIndexes[key];
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
var _disableEsIndexing = require("./disableEsIndexing");
|
|
106
|
-
Object.keys(_disableEsIndexing).forEach(function (key) {
|
|
107
|
-
if (key === "default" || key === "__esModule") return;
|
|
108
|
-
if (key in exports && exports[key] === _disableEsIndexing[key]) return;
|
|
109
|
-
Object.defineProperty(exports, key, {
|
|
110
|
-
enumerable: true,
|
|
111
|
-
get: function () {
|
|
112
|
-
return _disableEsIndexing[key];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
var _fetchOriginalEsSettings = require("./fetchOriginalEsSettings");
|
|
117
|
-
Object.keys(_fetchOriginalEsSettings).forEach(function (key) {
|
|
118
|
-
if (key === "default" || key === "__esModule") return;
|
|
119
|
-
if (key in exports && exports[key] === _fetchOriginalEsSettings[key]) return;
|
|
120
|
-
Object.defineProperty(exports, key, {
|
|
121
|
-
enumerable: true,
|
|
122
|
-
get: function () {
|
|
123
|
-
return _fetchOriginalEsSettings[key];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
var _restoreOriginalEsSettings = require("./restoreOriginalEsSettings");
|
|
128
|
-
Object.keys(_restoreOriginalEsSettings).forEach(function (key) {
|
|
129
|
-
if (key === "default" || key === "__esModule") return;
|
|
130
|
-
if (key in exports && exports[key] === _restoreOriginalEsSettings[key]) return;
|
|
131
|
-
Object.defineProperty(exports, key, {
|
|
132
|
-
enumerable: true,
|
|
133
|
-
get: function () {
|
|
134
|
-
return _restoreOriginalEsSettings[key];
|
|
135
|
-
}
|
|
136
|
-
});
|
|
137
|
-
});
|
|
1
|
+
export * from "./esCreateIndex.js";
|
|
2
|
+
export * from "./esFindOne.js";
|
|
3
|
+
export * from "./esGetIndexExist.js";
|
|
4
|
+
export * from "./esGetIndexName.js";
|
|
5
|
+
export * from "./esGetIndexSettings.js";
|
|
6
|
+
export * from "./esPutIndexSettings.js";
|
|
7
|
+
export * from "./esQueryAllWithCallback.js";
|
|
8
|
+
export * from "./esQueryAll.js";
|
|
9
|
+
export * from "./esListIndexes.js";
|
|
10
|
+
export * from "./disableEsIndexing.js";
|
|
11
|
+
export * from "./fetchOriginalEsSettings.js";
|
|
12
|
+
export * from "./restoreOriginalEsSettings.js";
|
|
138
13
|
|
|
139
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./esCreateIndex.js\";\nexport * from \"./esFindOne.js\";\nexport * from \"./esGetIndexExist.js\";\nexport * from \"./esGetIndexName.js\";\nexport * from \"./esGetIndexSettings.js\";\nexport * from \"./esPutIndexSettings.js\";\nexport * from \"./esQueryAllWithCallback.js\";\nexport * from \"./esQueryAll.js\";\nexport * from \"./esListIndexes.js\";\nexport * from \"./disableEsIndexing.js\";\nexport * from \"./fetchOriginalEsSettings.js\";\nexport * from \"./restoreOriginalEsSettings.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.base = void 0;
|
|
7
|
-
var _apiElasticsearch = require("@webiny/api-elasticsearch");
|
|
8
|
-
const base = exports.base = {
|
|
9
|
-
body: (0, _apiElasticsearch.getBaseConfiguration)()
|
|
1
|
+
import { getBaseConfiguration } from "@webiny/api-elasticsearch";
|
|
2
|
+
export const base = {
|
|
3
|
+
body: getBaseConfiguration()
|
|
10
4
|
};
|
|
11
5
|
|
|
12
6
|
//# sourceMappingURL=base.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["getBaseConfiguration","base","body"],"sources":["base.ts"],"sourcesContent":["import { getBaseConfiguration } from \"@webiny/api-elasticsearch\";\n\nexport const base = {\n body: getBaseConfiguration()\n};\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,2BAA2B;AAEhE,OAAO,MAAMC,IAAI,GAAG;EAChBC,IAAI,EAAEF,oBAAoB,CAAC;AAC/B,CAAC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElasticsearchIndexRequestBody } from "@webiny/api-elasticsearch/types";
|
|
1
|
+
import type { ElasticsearchIndexRequestBody } from "@webiny/api-elasticsearch/types.js";
|
|
2
2
|
export interface ElasticsearchIndexPlugins {
|
|
3
3
|
body: ElasticsearchIndexRequestBody;
|
|
4
4
|
locales?: string[];
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.elasticsearchIndexPlugins = void 0;
|
|
7
|
-
var _base = require("./base");
|
|
8
|
-
var _japanese = require("./japanese");
|
|
9
|
-
const elasticsearchIndexPlugins = () => {
|
|
10
|
-
return [_base.base, _japanese.japanese];
|
|
1
|
+
import { base } from "./base.js";
|
|
2
|
+
export const elasticsearchIndexPlugins = () => {
|
|
3
|
+
return [base];
|
|
11
4
|
};
|
|
12
|
-
exports.elasticsearchIndexPlugins = elasticsearchIndexPlugins;
|
|
13
5
|
|
|
14
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["base","elasticsearchIndexPlugins"],"sources":["index.ts"],"sourcesContent":["import type { ElasticsearchIndexRequestBody } from \"@webiny/api-elasticsearch/types.js\";\n\nimport { base } from \"./base.js\";\n\nexport interface ElasticsearchIndexPlugins {\n body: ElasticsearchIndexRequestBody;\n locales?: string[];\n}\n\nexport const elasticsearchIndexPlugins = (): ElasticsearchIndexPlugins[] => {\n return [base];\n};\n"],"mappings":"AAEA,SAASA,IAAI;AAOb,OAAO,MAAMC,yBAAyB,GAAGA,CAAA,KAAmC;EACxE,OAAO,CAACD,IAAI,CAAC;AACjB,CAAC","ignoreList":[]}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { Logger } from "@webiny/data-migration";
|
|
2
|
-
import { Client } from "@elastic/elasticsearch";
|
|
1
|
+
import type { Logger } from "@webiny/data-migration";
|
|
2
|
+
import type { Client } from "@elastic/elasticsearch";
|
|
3
3
|
interface IndexSettings {
|
|
4
|
-
|
|
5
|
-
refresh_interval: `${number}s`;
|
|
4
|
+
refresh_interval: `${number}s` | "-1";
|
|
6
5
|
}
|
|
7
6
|
interface RestoreOriginalElasticsearchSettingsParams {
|
|
8
7
|
indexSettings: {
|
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.restoreOriginalElasticsearchSettings = void 0;
|
|
7
|
-
var _ = require("./..");
|
|
8
|
-
const restoreOriginalElasticsearchSettings = async params => {
|
|
1
|
+
import { esPutIndexSettings } from "../index.js";
|
|
2
|
+
export const restoreOriginalElasticsearchSettings = async params => {
|
|
9
3
|
const {
|
|
10
4
|
indexSettings,
|
|
11
5
|
logger
|
|
@@ -19,13 +13,21 @@ const restoreOriginalElasticsearchSettings = async params => {
|
|
|
19
13
|
if (!settings || typeof settings !== "object") {
|
|
20
14
|
continue;
|
|
21
15
|
}
|
|
16
|
+
|
|
17
|
+
// We must ensure that the refresh interval is not set to a negative value. Why?
|
|
18
|
+
// We've had a case where a migration run has been manually stopped, and the index settings
|
|
19
|
+
// were never restored. Once a second run was started and this restore function
|
|
20
|
+
// was called, the refresh interval was set to `-1s`, which effectively disabled indexing.
|
|
21
|
+
let refreshInterval = settings.refresh_interval || `1s`;
|
|
22
|
+
if (refreshInterval === "-1") {
|
|
23
|
+
refreshInterval = "1s";
|
|
24
|
+
}
|
|
22
25
|
try {
|
|
23
|
-
await
|
|
26
|
+
await esPutIndexSettings({
|
|
24
27
|
elasticsearchClient: params.elasticsearchClient,
|
|
25
28
|
index,
|
|
26
29
|
settings: {
|
|
27
|
-
|
|
28
|
-
refresh_interval: settings.refresh_interval || `1s`
|
|
30
|
+
refresh_interval: refreshInterval
|
|
29
31
|
}
|
|
30
32
|
});
|
|
31
33
|
} catch (ex) {
|
|
@@ -39,6 +41,5 @@ const restoreOriginalElasticsearchSettings = async params => {
|
|
|
39
41
|
}
|
|
40
42
|
}
|
|
41
43
|
};
|
|
42
|
-
exports.restoreOriginalElasticsearchSettings = restoreOriginalElasticsearchSettings;
|
|
43
44
|
|
|
44
45
|
//# sourceMappingURL=restoreOriginalEsSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["esPutIndexSettings","restoreOriginalElasticsearchSettings","params","indexSettings","logger","indexes","index","settings","refreshInterval","refresh_interval","elasticsearchClient","ex","error","message","code","data"],"sources":["restoreOriginalEsSettings.ts"],"sourcesContent":["import { esPutIndexSettings } from \"~/utils/index.js\";\nimport type { Logger } from \"@webiny/data-migration\";\nimport type { Client } from \"@elastic/elasticsearch\";\n\ninterface IndexSettings {\n refresh_interval: `${number}s` | \"-1\";\n}\n\ninterface RestoreOriginalElasticsearchSettingsParams {\n indexSettings: {\n [index: string]: IndexSettings | null;\n };\n logger: Logger;\n elasticsearchClient: Client;\n}\n\nexport const restoreOriginalElasticsearchSettings = async (\n params: RestoreOriginalElasticsearchSettingsParams\n): Promise<void> => {\n const { indexSettings, logger } = params;\n\n const indexes = indexSettings;\n if (!indexes || typeof indexes !== \"object\") {\n return;\n }\n\n for (const index in indexes) {\n const settings = indexes[index];\n if (!settings || typeof settings !== \"object\") {\n continue;\n }\n\n // We must ensure that the refresh interval is not set to a negative value. Why?\n // We've had a case where a migration run has been manually stopped, and the index settings\n // were never restored. Once a second run was started and this restore function\n // was called, the refresh interval was set to `-1s`, which effectively disabled indexing.\n let refreshInterval = settings.refresh_interval || `1s`;\n if (refreshInterval === \"-1\") {\n refreshInterval = \"1s\";\n }\n\n try {\n await esPutIndexSettings({\n elasticsearchClient: params.elasticsearchClient,\n index,\n settings: {\n refresh_interval: refreshInterval\n }\n });\n } catch (ex) {\n logger.error(\n `Failed to restore original settings for index \"${index}\". Please do it manually.`\n );\n logger.error({\n ...ex,\n message: ex.message,\n code: ex.code,\n data: ex.data\n });\n }\n }\n};\n"],"mappings":"AAAA,SAASA,kBAAkB;AAgB3B,OAAO,MAAMC,oCAAoC,GAAG,MAChDC,MAAkD,IAClC;EAChB,MAAM;IAAEC,aAAa;IAAEC;EAAO,CAAC,GAAGF,MAAM;EAExC,MAAMG,OAAO,GAAGF,aAAa;EAC7B,IAAI,CAACE,OAAO,IAAI,OAAOA,OAAO,KAAK,QAAQ,EAAE;IACzC;EACJ;EAEA,KAAK,MAAMC,KAAK,IAAID,OAAO,EAAE;IACzB,MAAME,QAAQ,GAAGF,OAAO,CAACC,KAAK,CAAC;IAC/B,IAAI,CAACC,QAAQ,IAAI,OAAOA,QAAQ,KAAK,QAAQ,EAAE;MAC3C;IACJ;;IAEA;IACA;IACA;IACA;IACA,IAAIC,eAAe,GAAGD,QAAQ,CAACE,gBAAgB,IAAI,IAAI;IACvD,IAAID,eAAe,KAAK,IAAI,EAAE;MAC1BA,eAAe,GAAG,IAAI;IAC1B;IAEA,IAAI;MACA,MAAMR,kBAAkB,CAAC;QACrBU,mBAAmB,EAAER,MAAM,CAACQ,mBAAmB;QAC/CJ,KAAK;QACLC,QAAQ,EAAE;UACNE,gBAAgB,EAAED;QACtB;MACJ,CAAC,CAAC;IACN,CAAC,CAAC,OAAOG,EAAE,EAAE;MACTP,MAAM,CAACQ,KAAK,CACR,kDAAkDN,KAAK,2BAC3D,CAAC;MACDF,MAAM,CAACQ,KAAK,CAAC;QACT,GAAGD,EAAE;QACLE,OAAO,EAAEF,EAAE,CAACE,OAAO;QACnBC,IAAI,EAAEH,EAAE,CAACG,IAAI;QACbC,IAAI,EAAEJ,EAAE,CAACI;MACb,CAAC,CAAC;IACN;EACJ;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { compress as gzip } from "@webiny/utils/compression/gzip.js";
|
|
2
|
+
const GZIP = "gzip";
|
|
3
|
+
const TO_STORAGE_ENCODING = "base64";
|
|
4
|
+
export const getCompressedData = async data => {
|
|
5
|
+
const value = await gzip(JSON.stringify(data));
|
|
6
|
+
return {
|
|
7
|
+
compression: GZIP,
|
|
8
|
+
value: value.toString(TO_STORAGE_ENCODING)
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=getCompressedData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["compress","gzip","GZIP","TO_STORAGE_ENCODING","getCompressedData","data","value","JSON","stringify","compression","toString"],"sources":["getCompressedData.ts"],"sourcesContent":["import { compress as gzip } from \"@webiny/utils/compression/gzip.js\";\n\nconst GZIP = \"gzip\";\nconst TO_STORAGE_ENCODING = \"base64\";\n\nexport const getCompressedData = async (data: any) => {\n const value = await gzip(JSON.stringify(data));\n\n return {\n compression: GZIP,\n value: value.toString(TO_STORAGE_ENCODING)\n };\n};\n"],"mappings":"AAAA,SAASA,QAAQ,IAAIC,IAAI,QAAQ,mCAAmC;AAEpE,MAAMC,IAAI,GAAG,MAAM;AACnB,MAAMC,mBAAmB,GAAG,QAAQ;AAEpC,OAAO,MAAMC,iBAAiB,GAAG,MAAOC,IAAS,IAAK;EAClD,MAAMC,KAAK,GAAG,MAAML,IAAI,CAACM,IAAI,CAACC,SAAS,CAACH,IAAI,CAAC,CAAC;EAE9C,OAAO;IACHI,WAAW,EAAEP,IAAI;IACjBI,KAAK,EAAEA,KAAK,CAACI,QAAQ,CAACP,mBAAmB;EAC7C,CAAC;AACL,CAAC","ignoreList":[]}
|
package/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
export * from "./dynamoDb";
|
|
2
|
-
export * from "./elasticsearch";
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./createTenantEntity";
|
|
1
|
+
export * from "./dynamoDb.js";
|
|
2
|
+
export * from "./elasticsearch/index.js";
|
|
3
|
+
export * from "./createEntity.js";
|
|
4
|
+
export * from "./createTenantEntity.js";
|
|
5
|
+
export * from "./getCompressedData.js";
|
package/utils/index.js
CHANGED
|
@@ -1,73 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var _dynamoDb = require("./dynamoDb");
|
|
7
|
-
Object.keys(_dynamoDb).forEach(function (key) {
|
|
8
|
-
if (key === "default" || key === "__esModule") return;
|
|
9
|
-
if (key in exports && exports[key] === _dynamoDb[key]) return;
|
|
10
|
-
Object.defineProperty(exports, key, {
|
|
11
|
-
enumerable: true,
|
|
12
|
-
get: function () {
|
|
13
|
-
return _dynamoDb[key];
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
var _elasticsearch = require("./elasticsearch");
|
|
18
|
-
Object.keys(_elasticsearch).forEach(function (key) {
|
|
19
|
-
if (key === "default" || key === "__esModule") return;
|
|
20
|
-
if (key in exports && exports[key] === _elasticsearch[key]) return;
|
|
21
|
-
Object.defineProperty(exports, key, {
|
|
22
|
-
enumerable: true,
|
|
23
|
-
get: function () {
|
|
24
|
-
return _elasticsearch[key];
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
var _forEachTenantLocale = require("./forEachTenantLocale");
|
|
29
|
-
Object.keys(_forEachTenantLocale).forEach(function (key) {
|
|
30
|
-
if (key === "default" || key === "__esModule") return;
|
|
31
|
-
if (key in exports && exports[key] === _forEachTenantLocale[key]) return;
|
|
32
|
-
Object.defineProperty(exports, key, {
|
|
33
|
-
enumerable: true,
|
|
34
|
-
get: function () {
|
|
35
|
-
return _forEachTenantLocale[key];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
var _createEntity = require("./createEntity");
|
|
40
|
-
Object.keys(_createEntity).forEach(function (key) {
|
|
41
|
-
if (key === "default" || key === "__esModule") return;
|
|
42
|
-
if (key in exports && exports[key] === _createEntity[key]) return;
|
|
43
|
-
Object.defineProperty(exports, key, {
|
|
44
|
-
enumerable: true,
|
|
45
|
-
get: function () {
|
|
46
|
-
return _createEntity[key];
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
var _createLocaleEntity = require("./createLocaleEntity");
|
|
51
|
-
Object.keys(_createLocaleEntity).forEach(function (key) {
|
|
52
|
-
if (key === "default" || key === "__esModule") return;
|
|
53
|
-
if (key in exports && exports[key] === _createLocaleEntity[key]) return;
|
|
54
|
-
Object.defineProperty(exports, key, {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _createLocaleEntity[key];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
var _createTenantEntity = require("./createTenantEntity");
|
|
62
|
-
Object.keys(_createTenantEntity).forEach(function (key) {
|
|
63
|
-
if (key === "default" || key === "__esModule") return;
|
|
64
|
-
if (key in exports && exports[key] === _createTenantEntity[key]) return;
|
|
65
|
-
Object.defineProperty(exports, key, {
|
|
66
|
-
enumerable: true,
|
|
67
|
-
get: function () {
|
|
68
|
-
return _createTenantEntity[key];
|
|
69
|
-
}
|
|
70
|
-
});
|
|
71
|
-
});
|
|
1
|
+
export * from "./dynamoDb.js";
|
|
2
|
+
export * from "./elasticsearch/index.js";
|
|
3
|
+
export * from "./createEntity.js";
|
|
4
|
+
export * from "./createTenantEntity.js";
|
|
5
|
+
export * from "./getCompressedData.js";
|
|
72
6
|
|
|
73
7
|
//# sourceMappingURL=index.js.map
|
package/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./dynamoDb.js\";\nexport * from \"./elasticsearch/index.js\";\nexport * from \"./createEntity.js\";\nexport * from \"./createTenantEntity.js\";\nexport * from \"./getCompressedData.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
-
import { DataMigrationContext } from "@webiny/data-migration";
|
|
3
|
-
export declare class FileManager_5_35_0_001_FileManagerSettings {
|
|
4
|
-
private readonly newSettingsEntity;
|
|
5
|
-
private readonly legacySettingsEntity;
|
|
6
|
-
private readonly tenantEntity;
|
|
7
|
-
constructor(table: Table<string, string, string>);
|
|
8
|
-
getId(): string;
|
|
9
|
-
getDescription(): string;
|
|
10
|
-
shouldExecute({ logger }: DataMigrationContext): Promise<boolean>;
|
|
11
|
-
execute({ logger }: DataMigrationContext): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.FileManager_5_35_0_001_FileManagerSettings = void 0;
|
|
7
|
-
var _utils = require("../../../utils");
|
|
8
|
-
var _createTenantEntity = require("./entities/createTenantEntity");
|
|
9
|
-
var _createSettingsEntity = require("./entities/createSettingsEntity");
|
|
10
|
-
var _dbDynamodb = require("@webiny/db-dynamodb");
|
|
11
|
-
class FileManager_5_35_0_001_FileManagerSettings {
|
|
12
|
-
constructor(table) {
|
|
13
|
-
this.newSettingsEntity = (0, _utils.createStandardEntity)(table, "FM.Settings");
|
|
14
|
-
this.legacySettingsEntity = (0, _createSettingsEntity.createLegacySettingsEntity)(table);
|
|
15
|
-
this.tenantEntity = (0, _createTenantEntity.createTenantEntity)(table);
|
|
16
|
-
}
|
|
17
|
-
getId() {
|
|
18
|
-
return "FM Settings";
|
|
19
|
-
}
|
|
20
|
-
getDescription() {
|
|
21
|
-
return "";
|
|
22
|
-
}
|
|
23
|
-
async shouldExecute({
|
|
24
|
-
logger
|
|
25
|
-
}) {
|
|
26
|
-
const settings = await (0, _utils.queryOne)({
|
|
27
|
-
entity: this.legacySettingsEntity,
|
|
28
|
-
partitionKey: `T#root#FM#SETTINGS`,
|
|
29
|
-
options: {
|
|
30
|
-
eq: "default"
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
if (!settings) {
|
|
34
|
-
logger.info(`Settings not found; system is not yet installed.`);
|
|
35
|
-
// The system is not yet installed, skip migration.
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
const newSettings = await (0, _utils.queryOne)({
|
|
39
|
-
entity: this.newSettingsEntity,
|
|
40
|
-
partitionKey: `T#root#FM#SETTINGS`,
|
|
41
|
-
options: {
|
|
42
|
-
eq: "A"
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
if (newSettings) {
|
|
46
|
-
logger.info(`Settings record seems to be in order.`);
|
|
47
|
-
return false;
|
|
48
|
-
}
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
async execute({
|
|
52
|
-
logger
|
|
53
|
-
}) {
|
|
54
|
-
const tenants = await (0, _utils.queryAll)({
|
|
55
|
-
entity: this.tenantEntity,
|
|
56
|
-
partitionKey: "TENANTS",
|
|
57
|
-
options: {
|
|
58
|
-
index: "GSI1",
|
|
59
|
-
gt: " "
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
for (const tenant of tenants) {
|
|
63
|
-
const settings = await (0, _utils.queryOne)({
|
|
64
|
-
entity: this.legacySettingsEntity,
|
|
65
|
-
partitionKey: `T#${tenant.id}#FM#SETTINGS`,
|
|
66
|
-
options: {
|
|
67
|
-
eq: "default"
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
if (!settings) {
|
|
71
|
-
// It's possible that a tenant exists, but it was not yet installed.
|
|
72
|
-
logger.info(`Tenant ${tenant.name} (${tenant.id}) is not installed. Skipping migration of settings.`);
|
|
73
|
-
continue;
|
|
74
|
-
}
|
|
75
|
-
logger.info(`Updating FM settings for tenant ${tenant.name} (${tenant.id}).`);
|
|
76
|
-
await (0, _dbDynamodb.put)({
|
|
77
|
-
entity: this.newSettingsEntity,
|
|
78
|
-
item: {
|
|
79
|
-
PK: `T#${tenant.id}#FM#SETTINGS`,
|
|
80
|
-
SK: "A",
|
|
81
|
-
TYPE: "fm.settings",
|
|
82
|
-
data: {
|
|
83
|
-
...(0, _createSettingsEntity.getSettingsData)(settings),
|
|
84
|
-
tenant: tenant.id
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
exports.FileManager_5_35_0_001_FileManagerSettings = FileManager_5_35_0_001_FileManagerSettings;
|
|
92
|
-
|
|
93
|
-
//# sourceMappingURL=FileSettingsMigration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_utils","require","_createTenantEntity","_createSettingsEntity","_dbDynamodb","FileManager_5_35_0_001_FileManagerSettings","constructor","table","newSettingsEntity","createStandardEntity","legacySettingsEntity","createLegacySettingsEntity","tenantEntity","createTenantEntity","getId","getDescription","shouldExecute","logger","settings","queryOne","entity","partitionKey","options","eq","info","newSettings","execute","tenants","queryAll","index","gt","tenant","id","name","put","item","PK","SK","TYPE","data","getSettingsData","exports"],"sources":["FileSettingsMigration.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { DataMigrationContext } from \"@webiny/data-migration\";\nimport { createStandardEntity, queryAll, queryOne } from \"~/utils\";\nimport { createTenantEntity } from \"./entities/createTenantEntity\";\nimport {\n createLegacySettingsEntity,\n createSettingsEntity,\n getSettingsData\n} from \"./entities/createSettingsEntity\";\nimport { put } from \"@webiny/db-dynamodb\";\n\nexport class FileManager_5_35_0_001_FileManagerSettings {\n private readonly newSettingsEntity: ReturnType<typeof createSettingsEntity>;\n private readonly legacySettingsEntity: ReturnType<typeof createLegacySettingsEntity>;\n private readonly tenantEntity: ReturnType<typeof createTenantEntity>;\n\n constructor(table: Table<string, string, string>) {\n this.newSettingsEntity = createStandardEntity(table, \"FM.Settings\");\n this.legacySettingsEntity = createLegacySettingsEntity(table);\n this.tenantEntity = createTenantEntity(table);\n }\n\n getId() {\n return \"FM Settings\";\n }\n\n getDescription() {\n return \"\";\n }\n\n async shouldExecute({ logger }: DataMigrationContext): Promise<boolean> {\n const settings = await queryOne({\n entity: this.legacySettingsEntity,\n partitionKey: `T#root#FM#SETTINGS`,\n options: {\n eq: \"default\"\n }\n });\n\n if (!settings) {\n logger.info(`Settings not found; system is not yet installed.`);\n // The system is not yet installed, skip migration.\n return false;\n }\n\n const newSettings = await queryOne({\n entity: this.newSettingsEntity,\n partitionKey: `T#root#FM#SETTINGS`,\n options: {\n eq: \"A\"\n }\n });\n\n if (newSettings) {\n logger.info(`Settings record seems to be in order.`);\n return false;\n }\n\n return true;\n }\n\n async execute({ logger }: DataMigrationContext): Promise<void> {\n const tenants = await queryAll<{ id: string; name: string }>({\n entity: this.tenantEntity,\n partitionKey: \"TENANTS\",\n options: {\n index: \"GSI1\",\n gt: \" \"\n }\n });\n\n for (const tenant of tenants) {\n const settings = await queryOne({\n entity: this.legacySettingsEntity,\n partitionKey: `T#${tenant.id}#FM#SETTINGS`,\n options: {\n eq: \"default\"\n }\n });\n\n if (!settings) {\n // It's possible that a tenant exists, but it was not yet installed.\n logger.info(\n `Tenant ${tenant.name} (${tenant.id}) is not installed. Skipping migration of settings.`\n );\n continue;\n }\n\n logger.info(`Updating FM settings for tenant ${tenant.name} (${tenant.id}).`);\n await put({\n entity: this.newSettingsEntity,\n item: {\n PK: `T#${tenant.id}#FM#SETTINGS`,\n SK: \"A\",\n TYPE: \"fm.settings\",\n data: {\n ...getSettingsData(settings),\n tenant: tenant.id\n }\n }\n });\n }\n }\n}\n"],"mappings":";;;;;;AAEA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAF,OAAA;AAKA,IAAAG,WAAA,GAAAH,OAAA;AAEO,MAAMI,0CAA0C,CAAC;EAKpDC,WAAWA,CAACC,KAAoC,EAAE;IAC9C,IAAI,CAACC,iBAAiB,GAAG,IAAAC,2BAAoB,EAACF,KAAK,EAAE,aAAa,CAAC;IACnE,IAAI,CAACG,oBAAoB,GAAG,IAAAC,gDAA0B,EAACJ,KAAK,CAAC;IAC7D,IAAI,CAACK,YAAY,GAAG,IAAAC,sCAAkB,EAACN,KAAK,CAAC;EACjD;EAEAO,KAAKA,CAAA,EAAG;IACJ,OAAO,aAAa;EACxB;EAEAC,cAAcA,CAAA,EAAG;IACb,OAAO,EAAE;EACb;EAEA,MAAMC,aAAaA,CAAC;IAAEC;EAA6B,CAAC,EAAoB;IACpE,MAAMC,QAAQ,GAAG,MAAM,IAAAC,eAAQ,EAAC;MAC5BC,MAAM,EAAE,IAAI,CAACV,oBAAoB;MACjCW,YAAY,EAAG,oBAAmB;MAClCC,OAAO,EAAE;QACLC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,IAAI,CAACL,QAAQ,EAAE;MACXD,MAAM,CAACO,IAAI,CAAE,kDAAiD,CAAC;MAC/D;MACA,OAAO,KAAK;IAChB;IAEA,MAAMC,WAAW,GAAG,MAAM,IAAAN,eAAQ,EAAC;MAC/BC,MAAM,EAAE,IAAI,CAACZ,iBAAiB;MAC9Ba,YAAY,EAAG,oBAAmB;MAClCC,OAAO,EAAE;QACLC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,IAAIE,WAAW,EAAE;MACbR,MAAM,CAACO,IAAI,CAAE,uCAAsC,CAAC;MACpD,OAAO,KAAK;IAChB;IAEA,OAAO,IAAI;EACf;EAEA,MAAME,OAAOA,CAAC;IAAET;EAA6B,CAAC,EAAiB;IAC3D,MAAMU,OAAO,GAAG,MAAM,IAAAC,eAAQ,EAA+B;MACzDR,MAAM,EAAE,IAAI,CAACR,YAAY;MACzBS,YAAY,EAAE,SAAS;MACvBC,OAAO,EAAE;QACLO,KAAK,EAAE,MAAM;QACbC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,KAAK,MAAMC,MAAM,IAAIJ,OAAO,EAAE;MAC1B,MAAMT,QAAQ,GAAG,MAAM,IAAAC,eAAQ,EAAC;QAC5BC,MAAM,EAAE,IAAI,CAACV,oBAAoB;QACjCW,YAAY,EAAG,KAAIU,MAAM,CAACC,EAAG,cAAa;QAC1CV,OAAO,EAAE;UACLC,EAAE,EAAE;QACR;MACJ,CAAC,CAAC;MAEF,IAAI,CAACL,QAAQ,EAAE;QACX;QACAD,MAAM,CAACO,IAAI,CACN,UAASO,MAAM,CAACE,IAAK,KAAIF,MAAM,CAACC,EAAG,qDACxC,CAAC;QACD;MACJ;MAEAf,MAAM,CAACO,IAAI,CAAE,mCAAkCO,MAAM,CAACE,IAAK,KAAIF,MAAM,CAACC,EAAG,IAAG,CAAC;MAC7E,MAAM,IAAAE,eAAG,EAAC;QACNd,MAAM,EAAE,IAAI,CAACZ,iBAAiB;QAC9B2B,IAAI,EAAE;UACFC,EAAE,EAAG,KAAIL,MAAM,CAACC,EAAG,cAAa;UAChCK,EAAE,EAAE,GAAG;UACPC,IAAI,EAAE,aAAa;UACnBC,IAAI,EAAE;YACF,GAAG,IAAAC,qCAAe,EAACtB,QAAQ,CAAC;YAC5Ba,MAAM,EAAEA,MAAM,CAACC;UACnB;QACJ;MACJ,CAAC,CAAC;IACN;EACJ;AACJ;AAACS,OAAA,CAAApC,0CAAA,GAAAA,0CAAA","ignoreList":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
-
import { DataMigration, DataMigrationContext } from "@webiny/data-migration";
|
|
3
|
-
export declare type FileMigrationCheckpoint = Record<string, string | boolean | undefined>;
|
|
4
|
-
export declare class FileManager_5_35_0_001_FileData implements DataMigration<FileMigrationCheckpoint> {
|
|
5
|
-
private readonly newFileEntity;
|
|
6
|
-
private readonly legacyFileEntity;
|
|
7
|
-
private readonly tenantEntity;
|
|
8
|
-
private readonly localeEntity;
|
|
9
|
-
constructor(table: Table<string, string, string>);
|
|
10
|
-
getId(): string;
|
|
11
|
-
getDescription(): string;
|
|
12
|
-
shouldExecute({ logger }: DataMigrationContext): Promise<boolean>;
|
|
13
|
-
execute({ logger, ...context }: DataMigrationContext): Promise<void>;
|
|
14
|
-
}
|