@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,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.getSettingsData = exports.createSettingsEntity = exports.createLegacySettingsEntity = void 0;
|
|
8
|
-
var _pick = _interopRequireDefault(require("lodash/pick"));
|
|
9
|
-
var _utils = require("../../../utils");
|
|
10
|
-
const attributes = {
|
|
11
|
-
name: {
|
|
12
|
-
type: "string"
|
|
13
|
-
},
|
|
14
|
-
websiteUrl: {
|
|
15
|
-
type: "string"
|
|
16
|
-
},
|
|
17
|
-
websitePreviewUrl: {
|
|
18
|
-
type: "string"
|
|
19
|
-
},
|
|
20
|
-
favicon: {
|
|
21
|
-
type: "map"
|
|
22
|
-
},
|
|
23
|
-
logo: {
|
|
24
|
-
type: "map"
|
|
25
|
-
},
|
|
26
|
-
prerendering: {
|
|
27
|
-
type: "map"
|
|
28
|
-
},
|
|
29
|
-
social: {
|
|
30
|
-
type: "map"
|
|
31
|
-
},
|
|
32
|
-
htmlTags: {
|
|
33
|
-
type: "map"
|
|
34
|
-
},
|
|
35
|
-
pages: {
|
|
36
|
-
type: "map"
|
|
37
|
-
},
|
|
38
|
-
tenant: {
|
|
39
|
-
type: "string"
|
|
40
|
-
},
|
|
41
|
-
locale: {
|
|
42
|
-
type: "string"
|
|
43
|
-
},
|
|
44
|
-
theme: {
|
|
45
|
-
type: "string"
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
const getSettingsData = settings => {
|
|
49
|
-
return (0, _pick.default)(settings, Object.keys(attributes));
|
|
50
|
-
};
|
|
51
|
-
exports.getSettingsData = getSettingsData;
|
|
52
|
-
const createLegacySettingsEntity = table => {
|
|
53
|
-
return (0, _utils.createLegacyEntity)(table, "PbSettings", attributes);
|
|
54
|
-
};
|
|
55
|
-
exports.createLegacySettingsEntity = createLegacySettingsEntity;
|
|
56
|
-
const createSettingsEntity = table => {
|
|
57
|
-
return (0, _utils.createStandardEntity)(table, "PB.Settings");
|
|
58
|
-
};
|
|
59
|
-
exports.createSettingsEntity = createSettingsEntity;
|
|
60
|
-
|
|
61
|
-
//# sourceMappingURL=createSettingsEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_pick","_interopRequireDefault","require","_utils","attributes","name","type","websiteUrl","websitePreviewUrl","favicon","logo","prerendering","social","htmlTags","pages","tenant","locale","theme","getSettingsData","settings","pick","Object","keys","exports","createLegacySettingsEntity","table","createLegacyEntity","createSettingsEntity","createStandardEntity"],"sources":["createSettingsEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport pick from \"lodash/pick\";\nimport { createLegacyEntity, createStandardEntity } from \"~/utils\";\n\nconst attributes: Parameters<typeof createLegacyEntity>[2] = {\n name: {\n type: \"string\"\n },\n websiteUrl: {\n type: \"string\"\n },\n websitePreviewUrl: {\n type: \"string\"\n },\n favicon: {\n type: \"map\"\n },\n logo: {\n type: \"map\"\n },\n prerendering: {\n type: \"map\"\n },\n social: {\n type: \"map\"\n },\n htmlTags: {\n type: \"map\"\n },\n pages: {\n type: \"map\"\n },\n tenant: {\n type: \"string\"\n },\n locale: {\n type: \"string\"\n },\n theme: {\n type: \"string\"\n }\n};\n\nexport const getSettingsData = (settings: any) => {\n return pick(settings, Object.keys(attributes));\n};\n\nexport const createLegacySettingsEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"PbSettings\", attributes);\n};\n\nexport const createSettingsEntity = (table: Table<string, string, string>) => {\n return createStandardEntity(table, \"PB.Settings\");\n};\n"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,UAAoD,GAAG;EACzDC,IAAI,EAAE;IACFC,IAAI,EAAE;EACV,CAAC;EACDC,UAAU,EAAE;IACRD,IAAI,EAAE;EACV,CAAC;EACDE,iBAAiB,EAAE;IACfF,IAAI,EAAE;EACV,CAAC;EACDG,OAAO,EAAE;IACLH,IAAI,EAAE;EACV,CAAC;EACDI,IAAI,EAAE;IACFJ,IAAI,EAAE;EACV,CAAC;EACDK,YAAY,EAAE;IACVL,IAAI,EAAE;EACV,CAAC;EACDM,MAAM,EAAE;IACJN,IAAI,EAAE;EACV,CAAC;EACDO,QAAQ,EAAE;IACNP,IAAI,EAAE;EACV,CAAC;EACDQ,KAAK,EAAE;IACHR,IAAI,EAAE;EACV,CAAC;EACDS,MAAM,EAAE;IACJT,IAAI,EAAE;EACV,CAAC;EACDU,MAAM,EAAE;IACJV,IAAI,EAAE;EACV,CAAC;EACDW,KAAK,EAAE;IACHX,IAAI,EAAE;EACV;AACJ,CAAC;AAEM,MAAMY,eAAe,GAAIC,QAAa,IAAK;EAC9C,OAAO,IAAAC,aAAI,EAACD,QAAQ,EAAEE,MAAM,CAACC,IAAI,CAAClB,UAAU,CAAC,CAAC;AAClD,CAAC;AAACmB,OAAA,CAAAL,eAAA,GAAAA,eAAA;AAEK,MAAMM,0BAA0B,GAAIC,KAAoC,IAAK;EAChF,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,YAAY,EAAErB,UAAU,CAAC;AAC9D,CAAC;AAACmB,OAAA,CAAAC,0BAAA,GAAAA,0BAAA;AAEK,MAAMG,oBAAoB,GAAIF,KAAoC,IAAK;EAC1E,OAAO,IAAAG,2BAAoB,EAACH,KAAK,EAAE,aAAa,CAAC;AACrD,CAAC;AAACF,OAAA,CAAAI,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
-
export declare const createTenantEntity: (table: Table<string, string, string>) => import("dynamodb-toolbox/dist/cjs/classes/Entity/Entity").default<string, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, Table<string, string, string>, true, true, boolean, string, string, string, boolean, {
|
|
3
|
-
PK: {
|
|
4
|
-
partitionKey: true;
|
|
5
|
-
};
|
|
6
|
-
SK: {
|
|
7
|
-
sortKey: true;
|
|
8
|
-
};
|
|
9
|
-
GSI1_PK: {
|
|
10
|
-
type: "string";
|
|
11
|
-
};
|
|
12
|
-
GSI1_SK: {
|
|
13
|
-
type: "string";
|
|
14
|
-
};
|
|
15
|
-
TYPE: {
|
|
16
|
-
type: "string";
|
|
17
|
-
};
|
|
18
|
-
}, {
|
|
19
|
-
PK: {
|
|
20
|
-
partitionKey: true;
|
|
21
|
-
};
|
|
22
|
-
SK: {
|
|
23
|
-
sortKey: true;
|
|
24
|
-
};
|
|
25
|
-
GSI1_PK: {
|
|
26
|
-
type: "string";
|
|
27
|
-
};
|
|
28
|
-
GSI1_SK: {
|
|
29
|
-
type: "string";
|
|
30
|
-
};
|
|
31
|
-
TYPE: {
|
|
32
|
-
type: "string";
|
|
33
|
-
};
|
|
34
|
-
}, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
|
|
35
|
-
[x: string]: any;
|
|
36
|
-
[x: number]: any;
|
|
37
|
-
[x: symbol]: any;
|
|
38
|
-
}, {
|
|
39
|
-
[x: string]: any;
|
|
40
|
-
[x: number]: any;
|
|
41
|
-
[x: symbol]: any;
|
|
42
|
-
}>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createTenantEntity = void 0;
|
|
7
|
-
var _utils = require("../../../utils");
|
|
8
|
-
const createTenantEntity = table => {
|
|
9
|
-
return (0, _utils.createLegacyEntity)(table, "TenancyTenant", {
|
|
10
|
-
id: {
|
|
11
|
-
type: "string"
|
|
12
|
-
},
|
|
13
|
-
name: {
|
|
14
|
-
type: "string"
|
|
15
|
-
},
|
|
16
|
-
description: {
|
|
17
|
-
type: "string"
|
|
18
|
-
},
|
|
19
|
-
status: {
|
|
20
|
-
type: "string",
|
|
21
|
-
default: "active"
|
|
22
|
-
},
|
|
23
|
-
createdOn: {
|
|
24
|
-
type: "string"
|
|
25
|
-
},
|
|
26
|
-
savedOn: {
|
|
27
|
-
type: "string"
|
|
28
|
-
},
|
|
29
|
-
createdBy: {
|
|
30
|
-
type: "map"
|
|
31
|
-
},
|
|
32
|
-
parent: {
|
|
33
|
-
type: "string"
|
|
34
|
-
},
|
|
35
|
-
webinyVersion: {
|
|
36
|
-
type: "string"
|
|
37
|
-
},
|
|
38
|
-
settings: {
|
|
39
|
-
type: "map",
|
|
40
|
-
default: {}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
exports.createTenantEntity = createTenantEntity;
|
|
45
|
-
|
|
46
|
-
//# sourceMappingURL=createTenantEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_utils","require","createTenantEntity","table","createLegacyEntity","id","type","name","description","status","default","createdOn","savedOn","createdBy","parent","webinyVersion","settings","exports"],"sources":["createTenantEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { createLegacyEntity } from \"~/utils\";\n\nexport const createTenantEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"TenancyTenant\", {\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n status: {\n type: \"string\",\n default: \"active\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n parent: {\n type: \"string\"\n },\n webinyVersion: {\n type: \"string\"\n },\n settings: {\n type: \"map\",\n default: {}\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,kBAAkB,GAAIC,KAAoC,IAAK;EACxE,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,eAAe,EAAE;IAC9CE,EAAE,EAAE;MACAC,IAAI,EAAE;IACV,CAAC;IACDC,IAAI,EAAE;MACFD,IAAI,EAAE;IACV,CAAC;IACDE,WAAW,EAAE;MACTF,IAAI,EAAE;IACV,CAAC;IACDG,MAAM,EAAE;MACJH,IAAI,EAAE,QAAQ;MACdI,OAAO,EAAE;IACb,CAAC;IACDC,SAAS,EAAE;MACPL,IAAI,EAAE;IACV,CAAC;IACDM,OAAO,EAAE;MACLN,IAAI,EAAE;IACV,CAAC;IACDO,SAAS,EAAE;MACPP,IAAI,EAAE;IACV,CAAC;IACDQ,MAAM,EAAE;MACJR,IAAI,EAAE;IACV,CAAC;IACDS,aAAa,EAAE;MACXT,IAAI,EAAE;IACV,CAAC;IACDU,QAAQ,EAAE;MACNV,IAAI,EAAE,KAAK;MACXI,OAAO,EAAE,CAAC;IACd;EACJ,CAAC,CAAC;AACN,CAAC;AAACO,OAAA,CAAAf,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
-
import { DataMigrationContext } from "@webiny/data-migration";
|
|
3
|
-
export declare class PageBuilder_5_35_0_002 {
|
|
4
|
-
private readonly newSettingsEntity;
|
|
5
|
-
private readonly legacySettingsEntity;
|
|
6
|
-
private readonly tenantEntity;
|
|
7
|
-
private readonly localeEntity;
|
|
8
|
-
constructor(table: Table<string, string, string>);
|
|
9
|
-
getId(): string;
|
|
10
|
-
getDescription(): string;
|
|
11
|
-
shouldExecute({ logger }: DataMigrationContext): Promise<boolean>;
|
|
12
|
-
execute({ logger }: DataMigrationContext): Promise<void>;
|
|
13
|
-
}
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PageBuilder_5_35_0_002 = void 0;
|
|
7
|
-
var _dataMigration = require("@webiny/data-migration");
|
|
8
|
-
var _utils = require("../../../utils");
|
|
9
|
-
var _createTenantEntity = require("./createTenantEntity");
|
|
10
|
-
var _createSettingsEntity = require("./createSettingsEntity");
|
|
11
|
-
var _createLocaleEntity = require("./createLocaleEntity");
|
|
12
|
-
var _ioc = require("@webiny/ioc");
|
|
13
|
-
var _dbDynamodb = require("@webiny/db-dynamodb");
|
|
14
|
-
class PageBuilder_5_35_0_002 {
|
|
15
|
-
constructor(table) {
|
|
16
|
-
this.newSettingsEntity = (0, _createSettingsEntity.createSettingsEntity)(table);
|
|
17
|
-
this.legacySettingsEntity = (0, _createSettingsEntity.createLegacySettingsEntity)(table);
|
|
18
|
-
this.tenantEntity = (0, _createTenantEntity.createTenantEntity)(table);
|
|
19
|
-
this.localeEntity = (0, _createLocaleEntity.createLocaleEntity)(table);
|
|
20
|
-
}
|
|
21
|
-
getId() {
|
|
22
|
-
return "5.35.0-002";
|
|
23
|
-
}
|
|
24
|
-
getDescription() {
|
|
25
|
-
return "Move PB Settings attributes to a `data` envelope.";
|
|
26
|
-
}
|
|
27
|
-
async shouldExecute({
|
|
28
|
-
logger
|
|
29
|
-
}) {
|
|
30
|
-
const defaultLocale = await (0, _utils.queryOne)({
|
|
31
|
-
entity: this.localeEntity,
|
|
32
|
-
partitionKey: `T#root#I18N#L#D`,
|
|
33
|
-
options: {
|
|
34
|
-
eq: "default"
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
if (!defaultLocale) {
|
|
38
|
-
logger.info(`Default locale not found; system is not yet installed.`);
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
const settings = await (0, _utils.queryOne)({
|
|
42
|
-
entity: this.legacySettingsEntity,
|
|
43
|
-
partitionKey: `T#root#L#${defaultLocale.code}#PB#SETTINGS`,
|
|
44
|
-
options: {
|
|
45
|
-
eq: "default"
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
if (!settings) {
|
|
49
|
-
logger.info(`Settings not found; system is not yet installed.`);
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
const newSettings = await (0, _utils.queryOne)({
|
|
53
|
-
entity: this.newSettingsEntity,
|
|
54
|
-
partitionKey: `T#root#L#${defaultLocale.code}#PB#SETTINGS`,
|
|
55
|
-
options: {
|
|
56
|
-
eq: "A"
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
if (newSettings) {
|
|
60
|
-
logger.info(`Settings record seems to be in order.`);
|
|
61
|
-
return false;
|
|
62
|
-
}
|
|
63
|
-
return true;
|
|
64
|
-
}
|
|
65
|
-
async execute({
|
|
66
|
-
logger
|
|
67
|
-
}) {
|
|
68
|
-
const tenants = await (0, _utils.queryAll)({
|
|
69
|
-
entity: this.tenantEntity,
|
|
70
|
-
partitionKey: "TENANTS",
|
|
71
|
-
options: {
|
|
72
|
-
index: "GSI1",
|
|
73
|
-
gt: " "
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
for (const tenant of tenants) {
|
|
77
|
-
const locales = await (0, _utils.queryAll)({
|
|
78
|
-
entity: this.localeEntity,
|
|
79
|
-
partitionKey: `T#${tenant.id}#I18N#L`,
|
|
80
|
-
options: {
|
|
81
|
-
gt: " "
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
for (const locale of locales) {
|
|
85
|
-
const settings = await (0, _utils.queryOne)({
|
|
86
|
-
entity: this.legacySettingsEntity,
|
|
87
|
-
partitionKey: `T#${tenant.id}#L#${locale.code}#PB#SETTINGS`,
|
|
88
|
-
options: {
|
|
89
|
-
eq: "default"
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
if (!settings) {
|
|
93
|
-
// It's possible that a tenant exists, but it was not yet installed.
|
|
94
|
-
logger.info(`Tenant ${tenant.name} (${tenant.id}) is not installed. Skipping migration of settings.`);
|
|
95
|
-
continue;
|
|
96
|
-
}
|
|
97
|
-
logger.info(`Updating PB settings for tenant ${tenant.name} (${tenant.id}).`);
|
|
98
|
-
await (0, _dbDynamodb.put)({
|
|
99
|
-
entity: this.newSettingsEntity,
|
|
100
|
-
item: {
|
|
101
|
-
PK: `T#${tenant.id}#L#${locale.code}#PB#SETTINGS`,
|
|
102
|
-
SK: "A",
|
|
103
|
-
TYPE: "pb.settings",
|
|
104
|
-
data: {
|
|
105
|
-
...(0, _createSettingsEntity.getSettingsData)(settings),
|
|
106
|
-
tenant: tenant.id
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
exports.PageBuilder_5_35_0_002 = PageBuilder_5_35_0_002;
|
|
115
|
-
(0, _ioc.makeInjectable)(PageBuilder_5_35_0_002, [(0, _ioc.inject)(_dataMigration.PrimaryDynamoTableSymbol)]);
|
|
116
|
-
|
|
117
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_dataMigration","require","_utils","_createTenantEntity","_createSettingsEntity","_createLocaleEntity","_ioc","_dbDynamodb","PageBuilder_5_35_0_002","constructor","table","newSettingsEntity","createSettingsEntity","legacySettingsEntity","createLegacySettingsEntity","tenantEntity","createTenantEntity","localeEntity","createLocaleEntity","getId","getDescription","shouldExecute","logger","defaultLocale","queryOne","entity","partitionKey","options","eq","info","settings","code","newSettings","execute","tenants","queryAll","index","gt","tenant","locales","id","locale","name","put","item","PK","SK","TYPE","data","getSettingsData","exports","makeInjectable","inject","PrimaryDynamoTableSymbol"],"sources":["index.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { DataMigrationContext, PrimaryDynamoTableSymbol } from \"@webiny/data-migration\";\nimport { queryAll, queryOne } from \"~/utils\";\nimport { createTenantEntity } from \"./createTenantEntity\";\nimport {\n createLegacySettingsEntity,\n createSettingsEntity,\n getSettingsData\n} from \"./createSettingsEntity\";\nimport { createLocaleEntity } from \"./createLocaleEntity\";\nimport { inject, makeInjectable } from \"@webiny/ioc\";\nimport { put } from \"@webiny/db-dynamodb\";\n\nexport class PageBuilder_5_35_0_002 {\n private readonly newSettingsEntity: ReturnType<typeof createSettingsEntity>;\n private readonly legacySettingsEntity: ReturnType<typeof createLegacySettingsEntity>;\n private readonly tenantEntity: ReturnType<typeof createTenantEntity>;\n private readonly localeEntity: ReturnType<typeof createLocaleEntity>;\n\n constructor(table: Table<string, string, string>) {\n this.newSettingsEntity = createSettingsEntity(table);\n this.legacySettingsEntity = createLegacySettingsEntity(table);\n this.tenantEntity = createTenantEntity(table);\n this.localeEntity = createLocaleEntity(table);\n }\n\n getId() {\n return \"5.35.0-002\";\n }\n\n getDescription() {\n return \"Move PB Settings attributes to a `data` envelope.\";\n }\n\n async shouldExecute({ logger }: DataMigrationContext): Promise<boolean> {\n const defaultLocale = await queryOne<{ code: string }>({\n entity: this.localeEntity,\n partitionKey: `T#root#I18N#L#D`,\n options: {\n eq: \"default\"\n }\n });\n\n if (!defaultLocale) {\n logger.info(`Default locale not found; system is not yet installed.`);\n return false;\n }\n\n const settings = await queryOne({\n entity: this.legacySettingsEntity,\n partitionKey: `T#root#L#${defaultLocale.code}#PB#SETTINGS`,\n options: {\n eq: \"default\"\n }\n });\n\n if (!settings) {\n logger.info(`Settings not found; system is not yet installed.`);\n return false;\n }\n\n const newSettings = await queryOne({\n entity: this.newSettingsEntity,\n partitionKey: `T#root#L#${defaultLocale.code}#PB#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 locales = await queryAll<{ code: string }>({\n entity: this.localeEntity,\n partitionKey: `T#${tenant.id}#I18N#L`,\n options: {\n gt: \" \"\n }\n });\n\n for (const locale of locales) {\n const settings = await queryOne({\n entity: this.legacySettingsEntity,\n partitionKey: `T#${tenant.id}#L#${locale.code}#PB#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 PB settings for tenant ${tenant.name} (${tenant.id}).`);\n await put({\n entity: this.newSettingsEntity,\n item: {\n PK: `T#${tenant.id}#L#${locale.code}#PB#SETTINGS`,\n SK: \"A\",\n TYPE: \"pb.settings\",\n data: {\n ...getSettingsData(settings),\n tenant: tenant.id\n }\n }\n });\n }\n }\n }\n}\n\nmakeInjectable(PageBuilder_5_35_0_002, [inject(PrimaryDynamoTableSymbol)]);\n"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AAKA,IAAAI,mBAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AAEO,MAAMO,sBAAsB,CAAC;EAMhCC,WAAWA,CAACC,KAAoC,EAAE;IAC9C,IAAI,CAACC,iBAAiB,GAAG,IAAAC,0CAAoB,EAACF,KAAK,CAAC;IACpD,IAAI,CAACG,oBAAoB,GAAG,IAAAC,gDAA0B,EAACJ,KAAK,CAAC;IAC7D,IAAI,CAACK,YAAY,GAAG,IAAAC,sCAAkB,EAACN,KAAK,CAAC;IAC7C,IAAI,CAACO,YAAY,GAAG,IAAAC,sCAAkB,EAACR,KAAK,CAAC;EACjD;EAEAS,KAAKA,CAAA,EAAG;IACJ,OAAO,YAAY;EACvB;EAEAC,cAAcA,CAAA,EAAG;IACb,OAAO,mDAAmD;EAC9D;EAEA,MAAMC,aAAaA,CAAC;IAAEC;EAA6B,CAAC,EAAoB;IACpE,MAAMC,aAAa,GAAG,MAAM,IAAAC,eAAQ,EAAmB;MACnDC,MAAM,EAAE,IAAI,CAACR,YAAY;MACzBS,YAAY,EAAG,iBAAgB;MAC/BC,OAAO,EAAE;QACLC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,IAAI,CAACL,aAAa,EAAE;MAChBD,MAAM,CAACO,IAAI,CAAE,wDAAuD,CAAC;MACrE,OAAO,KAAK;IAChB;IAEA,MAAMC,QAAQ,GAAG,MAAM,IAAAN,eAAQ,EAAC;MAC5BC,MAAM,EAAE,IAAI,CAACZ,oBAAoB;MACjCa,YAAY,EAAG,YAAWH,aAAa,CAACQ,IAAK,cAAa;MAC1DJ,OAAO,EAAE;QACLC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,IAAI,CAACE,QAAQ,EAAE;MACXR,MAAM,CAACO,IAAI,CAAE,kDAAiD,CAAC;MAC/D,OAAO,KAAK;IAChB;IAEA,MAAMG,WAAW,GAAG,MAAM,IAAAR,eAAQ,EAAC;MAC/BC,MAAM,EAAE,IAAI,CAACd,iBAAiB;MAC9Be,YAAY,EAAG,YAAWH,aAAa,CAACQ,IAAK,cAAa;MAC1DJ,OAAO,EAAE;QACLC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,IAAII,WAAW,EAAE;MACbV,MAAM,CAACO,IAAI,CAAE,uCAAsC,CAAC;MACpD,OAAO,KAAK;IAChB;IAEA,OAAO,IAAI;EACf;EAEA,MAAMI,OAAOA,CAAC;IAAEX;EAA6B,CAAC,EAAiB;IAC3D,MAAMY,OAAO,GAAG,MAAM,IAAAC,eAAQ,EAA+B;MACzDV,MAAM,EAAE,IAAI,CAACV,YAAY;MACzBW,YAAY,EAAE,SAAS;MACvBC,OAAO,EAAE;QACLS,KAAK,EAAE,MAAM;QACbC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,KAAK,MAAMC,MAAM,IAAIJ,OAAO,EAAE;MAC1B,MAAMK,OAAO,GAAG,MAAM,IAAAJ,eAAQ,EAAmB;QAC7CV,MAAM,EAAE,IAAI,CAACR,YAAY;QACzBS,YAAY,EAAG,KAAIY,MAAM,CAACE,EAAG,SAAQ;QACrCb,OAAO,EAAE;UACLU,EAAE,EAAE;QACR;MACJ,CAAC,CAAC;MAEF,KAAK,MAAMI,MAAM,IAAIF,OAAO,EAAE;QAC1B,MAAMT,QAAQ,GAAG,MAAM,IAAAN,eAAQ,EAAC;UAC5BC,MAAM,EAAE,IAAI,CAACZ,oBAAoB;UACjCa,YAAY,EAAG,KAAIY,MAAM,CAACE,EAAG,MAAKC,MAAM,CAACV,IAAK,cAAa;UAC3DJ,OAAO,EAAE;YACLC,EAAE,EAAE;UACR;QACJ,CAAC,CAAC;QAEF,IAAI,CAACE,QAAQ,EAAE;UACX;UACAR,MAAM,CAACO,IAAI,CACN,UAASS,MAAM,CAACI,IAAK,KAAIJ,MAAM,CAACE,EAAG,qDACxC,CAAC;UACD;QACJ;QAEAlB,MAAM,CAACO,IAAI,CAAE,mCAAkCS,MAAM,CAACI,IAAK,KAAIJ,MAAM,CAACE,EAAG,IAAG,CAAC;QAC7E,MAAM,IAAAG,eAAG,EAAC;UACNlB,MAAM,EAAE,IAAI,CAACd,iBAAiB;UAC9BiC,IAAI,EAAE;YACFC,EAAE,EAAG,KAAIP,MAAM,CAACE,EAAG,MAAKC,MAAM,CAACV,IAAK,cAAa;YACjDe,EAAE,EAAE,GAAG;YACPC,IAAI,EAAE,aAAa;YACnBC,IAAI,EAAE;cACF,GAAG,IAAAC,qCAAe,EAACnB,QAAQ,CAAC;cAC5BQ,MAAM,EAAEA,MAAM,CAACE;YACnB;UACJ;QACJ,CAAC,CAAC;MACN;IACJ;EACJ;AACJ;AAACU,OAAA,CAAA1C,sBAAA,GAAAA,sBAAA;AAED,IAAA2C,mBAAc,EAAC3C,sBAAsB,EAAE,CAAC,IAAA4C,WAAM,EAACC,uCAAwB,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
-
export declare const createTenantEntity: (table: Table<string, string, string>) => import("dynamodb-toolbox/dist/cjs/classes/Entity/Entity").default<string, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, Table<string, string, string>, true, true, boolean, string, string, string, boolean, {
|
|
3
|
-
PK: {
|
|
4
|
-
partitionKey: true;
|
|
5
|
-
};
|
|
6
|
-
SK: {
|
|
7
|
-
sortKey: true;
|
|
8
|
-
};
|
|
9
|
-
GSI1_PK: {
|
|
10
|
-
type: "string";
|
|
11
|
-
};
|
|
12
|
-
GSI1_SK: {
|
|
13
|
-
type: "string";
|
|
14
|
-
};
|
|
15
|
-
TYPE: {
|
|
16
|
-
type: "string";
|
|
17
|
-
};
|
|
18
|
-
}, {
|
|
19
|
-
PK: {
|
|
20
|
-
partitionKey: true;
|
|
21
|
-
};
|
|
22
|
-
SK: {
|
|
23
|
-
sortKey: true;
|
|
24
|
-
};
|
|
25
|
-
GSI1_PK: {
|
|
26
|
-
type: "string";
|
|
27
|
-
};
|
|
28
|
-
GSI1_SK: {
|
|
29
|
-
type: "string";
|
|
30
|
-
};
|
|
31
|
-
TYPE: {
|
|
32
|
-
type: "string";
|
|
33
|
-
};
|
|
34
|
-
}, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
|
|
35
|
-
[x: string]: any;
|
|
36
|
-
[x: number]: any;
|
|
37
|
-
[x: symbol]: any;
|
|
38
|
-
}, {
|
|
39
|
-
[x: string]: any;
|
|
40
|
-
[x: number]: any;
|
|
41
|
-
[x: symbol]: any;
|
|
42
|
-
}>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createTenantEntity = void 0;
|
|
7
|
-
var _utils = require("../../../utils");
|
|
8
|
-
const createTenantEntity = table => {
|
|
9
|
-
return (0, _utils.createLegacyEntity)(table, "TenancyTenant", {
|
|
10
|
-
id: {
|
|
11
|
-
type: "string"
|
|
12
|
-
},
|
|
13
|
-
name: {
|
|
14
|
-
type: "string"
|
|
15
|
-
},
|
|
16
|
-
description: {
|
|
17
|
-
type: "string"
|
|
18
|
-
},
|
|
19
|
-
status: {
|
|
20
|
-
type: "string",
|
|
21
|
-
default: "active"
|
|
22
|
-
},
|
|
23
|
-
createdOn: {
|
|
24
|
-
type: "string"
|
|
25
|
-
},
|
|
26
|
-
savedOn: {
|
|
27
|
-
type: "string"
|
|
28
|
-
},
|
|
29
|
-
createdBy: {
|
|
30
|
-
type: "map"
|
|
31
|
-
},
|
|
32
|
-
parent: {
|
|
33
|
-
type: "string"
|
|
34
|
-
},
|
|
35
|
-
webinyVersion: {
|
|
36
|
-
type: "string"
|
|
37
|
-
},
|
|
38
|
-
settings: {
|
|
39
|
-
type: "map",
|
|
40
|
-
default: {}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
exports.createTenantEntity = createTenantEntity;
|
|
45
|
-
|
|
46
|
-
//# sourceMappingURL=createTenantEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_utils","require","createTenantEntity","table","createLegacyEntity","id","type","name","description","status","default","createdOn","savedOn","createdBy","parent","webinyVersion","settings","exports"],"sources":["createTenantEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { createLegacyEntity } from \"~/utils\";\n\nexport const createTenantEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"TenancyTenant\", {\n id: {\n type: \"string\"\n },\n name: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n status: {\n type: \"string\",\n default: \"active\"\n },\n createdOn: {\n type: \"string\"\n },\n savedOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n parent: {\n type: \"string\"\n },\n webinyVersion: {\n type: \"string\"\n },\n settings: {\n type: \"map\",\n default: {}\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,kBAAkB,GAAIC,KAAoC,IAAK;EACxE,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,eAAe,EAAE;IAC9CE,EAAE,EAAE;MACAC,IAAI,EAAE;IACV,CAAC;IACDC,IAAI,EAAE;MACFD,IAAI,EAAE;IACV,CAAC;IACDE,WAAW,EAAE;MACTF,IAAI,EAAE;IACV,CAAC;IACDG,MAAM,EAAE;MACJH,IAAI,EAAE,QAAQ;MACdI,OAAO,EAAE;IACb,CAAC;IACDC,SAAS,EAAE;MACPL,IAAI,EAAE;IACV,CAAC;IACDM,OAAO,EAAE;MACLN,IAAI,EAAE;IACV,CAAC;IACDO,SAAS,EAAE;MACPP,IAAI,EAAE;IACV,CAAC;IACDQ,MAAM,EAAE;MACJR,IAAI,EAAE;IACV,CAAC;IACDS,aAAa,EAAE;MACXT,IAAI,EAAE;IACV,CAAC;IACDU,QAAQ,EAAE;MACNV,IAAI,EAAE,KAAK;MACXI,OAAO,EAAE,CAAC;IACd;EACJ,CAAC,CAAC;AACN,CAAC;AAACO,OAAA,CAAAf,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
-
export declare const getUserData: (user: any) => Pick<any, string>;
|
|
3
|
-
export declare const createLegacyUserEntity: (table: Table<string, string, string>) => import("dynamodb-toolbox/dist/cjs/classes/Entity/Entity").default<string, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, Table<string, string, string>, true, true, boolean, string, string, string, boolean, {
|
|
4
|
-
PK: {
|
|
5
|
-
partitionKey: true;
|
|
6
|
-
};
|
|
7
|
-
SK: {
|
|
8
|
-
sortKey: true;
|
|
9
|
-
};
|
|
10
|
-
GSI1_PK: {
|
|
11
|
-
type: "string";
|
|
12
|
-
};
|
|
13
|
-
GSI1_SK: {
|
|
14
|
-
type: "string";
|
|
15
|
-
};
|
|
16
|
-
TYPE: {
|
|
17
|
-
type: "string";
|
|
18
|
-
};
|
|
19
|
-
}, {
|
|
20
|
-
PK: {
|
|
21
|
-
partitionKey: true;
|
|
22
|
-
};
|
|
23
|
-
SK: {
|
|
24
|
-
sortKey: true;
|
|
25
|
-
};
|
|
26
|
-
GSI1_PK: {
|
|
27
|
-
type: "string";
|
|
28
|
-
};
|
|
29
|
-
GSI1_SK: {
|
|
30
|
-
type: "string";
|
|
31
|
-
};
|
|
32
|
-
TYPE: {
|
|
33
|
-
type: "string";
|
|
34
|
-
};
|
|
35
|
-
}, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
|
|
36
|
-
[x: string]: any;
|
|
37
|
-
[x: number]: any;
|
|
38
|
-
[x: symbol]: any;
|
|
39
|
-
}, {
|
|
40
|
-
[x: string]: any;
|
|
41
|
-
[x: number]: any;
|
|
42
|
-
[x: symbol]: any;
|
|
43
|
-
}>;
|
|
44
|
-
export declare const createUserEntity: (table: Table<string, string, string>) => import("dynamodb-toolbox/dist/cjs/classes/Entity/Entity").default<string, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, import("dynamodb-toolbox/dist/cjs/classes/Entity").Overlay, Table<string, string, string>, true, true, boolean, string, string, string, boolean, {
|
|
45
|
-
PK: {
|
|
46
|
-
partitionKey: true;
|
|
47
|
-
};
|
|
48
|
-
SK: {
|
|
49
|
-
sortKey: true;
|
|
50
|
-
};
|
|
51
|
-
GSI1_PK: {
|
|
52
|
-
type: "string";
|
|
53
|
-
};
|
|
54
|
-
GSI1_SK: {
|
|
55
|
-
type: "string";
|
|
56
|
-
};
|
|
57
|
-
TYPE: {
|
|
58
|
-
type: "string";
|
|
59
|
-
};
|
|
60
|
-
data: {
|
|
61
|
-
type: "map";
|
|
62
|
-
};
|
|
63
|
-
}, {
|
|
64
|
-
PK: {
|
|
65
|
-
partitionKey: true;
|
|
66
|
-
};
|
|
67
|
-
SK: {
|
|
68
|
-
sortKey: true;
|
|
69
|
-
};
|
|
70
|
-
GSI1_PK: {
|
|
71
|
-
type: "string";
|
|
72
|
-
};
|
|
73
|
-
GSI1_SK: {
|
|
74
|
-
type: "string";
|
|
75
|
-
};
|
|
76
|
-
TYPE: {
|
|
77
|
-
type: "string";
|
|
78
|
-
};
|
|
79
|
-
data: {
|
|
80
|
-
type: "map";
|
|
81
|
-
};
|
|
82
|
-
}, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
|
|
83
|
-
[x: string]: any;
|
|
84
|
-
[x: number]: any;
|
|
85
|
-
[x: symbol]: any;
|
|
86
|
-
}, {
|
|
87
|
-
[x: string]: any;
|
|
88
|
-
[x: number]: any;
|
|
89
|
-
[x: symbol]: any;
|
|
90
|
-
}>;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.getUserData = exports.createUserEntity = exports.createLegacyUserEntity = void 0;
|
|
8
|
-
var _pick = _interopRequireDefault(require("lodash/pick"));
|
|
9
|
-
var _utils = require("../../../utils");
|
|
10
|
-
const attributes = {
|
|
11
|
-
id: {
|
|
12
|
-
type: "string"
|
|
13
|
-
},
|
|
14
|
-
tenant: {
|
|
15
|
-
type: "string"
|
|
16
|
-
},
|
|
17
|
-
email: {
|
|
18
|
-
type: "string"
|
|
19
|
-
},
|
|
20
|
-
firstName: {
|
|
21
|
-
type: "string"
|
|
22
|
-
},
|
|
23
|
-
lastName: {
|
|
24
|
-
type: "string"
|
|
25
|
-
},
|
|
26
|
-
avatar: {
|
|
27
|
-
type: "map"
|
|
28
|
-
},
|
|
29
|
-
createdBy: {
|
|
30
|
-
type: "map"
|
|
31
|
-
},
|
|
32
|
-
createdOn: {
|
|
33
|
-
type: "string"
|
|
34
|
-
},
|
|
35
|
-
group: {
|
|
36
|
-
type: "string"
|
|
37
|
-
},
|
|
38
|
-
webinyVersion: {
|
|
39
|
-
type: "string"
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
const getUserData = user => {
|
|
43
|
-
return (0, _pick.default)(user, Object.keys(attributes));
|
|
44
|
-
};
|
|
45
|
-
exports.getUserData = getUserData;
|
|
46
|
-
const createLegacyUserEntity = table => {
|
|
47
|
-
return (0, _utils.createLegacyEntity)(table, "AdminUsers.User", attributes);
|
|
48
|
-
};
|
|
49
|
-
exports.createLegacyUserEntity = createLegacyUserEntity;
|
|
50
|
-
const createUserEntity = table => {
|
|
51
|
-
return (0, _utils.createStandardEntity)(table, "AdminUsers.User", attributes);
|
|
52
|
-
};
|
|
53
|
-
exports.createUserEntity = createUserEntity;
|
|
54
|
-
|
|
55
|
-
//# sourceMappingURL=createUserEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_pick","_interopRequireDefault","require","_utils","attributes","id","type","tenant","email","firstName","lastName","avatar","createdBy","createdOn","group","webinyVersion","getUserData","user","pick","Object","keys","exports","createLegacyUserEntity","table","createLegacyEntity","createUserEntity","createStandardEntity"],"sources":["createUserEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport pick from \"lodash/pick\";\nimport { createLegacyEntity, createStandardEntity } from \"~/utils\";\n\nconst attributes: Parameters<typeof createLegacyEntity>[2] = {\n id: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n },\n email: {\n type: \"string\"\n },\n firstName: {\n type: \"string\"\n },\n lastName: {\n type: \"string\"\n },\n avatar: {\n type: \"map\"\n },\n createdBy: {\n type: \"map\"\n },\n createdOn: {\n type: \"string\"\n },\n group: {\n type: \"string\"\n },\n webinyVersion: {\n type: \"string\"\n }\n};\n\nexport const getUserData = (user: any) => {\n return pick(user, Object.keys(attributes));\n};\n\nexport const createLegacyUserEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"AdminUsers.User\", attributes);\n};\n\nexport const createUserEntity = (table: Table<string, string, string>) => {\n return createStandardEntity(table, \"AdminUsers.User\", attributes);\n};\n"],"mappings":";;;;;;;AACA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,UAAoD,GAAG;EACzDC,EAAE,EAAE;IACAC,IAAI,EAAE;EACV,CAAC;EACDC,MAAM,EAAE;IACJD,IAAI,EAAE;EACV,CAAC;EACDE,KAAK,EAAE;IACHF,IAAI,EAAE;EACV,CAAC;EACDG,SAAS,EAAE;IACPH,IAAI,EAAE;EACV,CAAC;EACDI,QAAQ,EAAE;IACNJ,IAAI,EAAE;EACV,CAAC;EACDK,MAAM,EAAE;IACJL,IAAI,EAAE;EACV,CAAC;EACDM,SAAS,EAAE;IACPN,IAAI,EAAE;EACV,CAAC;EACDO,SAAS,EAAE;IACPP,IAAI,EAAE;EACV,CAAC;EACDQ,KAAK,EAAE;IACHR,IAAI,EAAE;EACV,CAAC;EACDS,aAAa,EAAE;IACXT,IAAI,EAAE;EACV;AACJ,CAAC;AAEM,MAAMU,WAAW,GAAIC,IAAS,IAAK;EACtC,OAAO,IAAAC,aAAI,EAACD,IAAI,EAAEE,MAAM,CAACC,IAAI,CAAChB,UAAU,CAAC,CAAC;AAC9C,CAAC;AAACiB,OAAA,CAAAL,WAAA,GAAAA,WAAA;AAEK,MAAMM,sBAAsB,GAAIC,KAAoC,IAAK;EAC5E,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,iBAAiB,EAAEnB,UAAU,CAAC;AACnE,CAAC;AAACiB,OAAA,CAAAC,sBAAA,GAAAA,sBAAA;AAEK,MAAMG,gBAAgB,GAAIF,KAAoC,IAAK;EACtE,OAAO,IAAAG,2BAAoB,EAACH,KAAK,EAAE,iBAAiB,EAAEnB,UAAU,CAAC;AACrE,CAAC;AAACiB,OAAA,CAAAI,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
-
import { DataMigrationContext } from "@webiny/data-migration";
|
|
3
|
-
export declare class AdminUsers_5_35_0_003 {
|
|
4
|
-
private readonly newUserEntity;
|
|
5
|
-
private readonly legacyUserEntity;
|
|
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,92 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.AdminUsers_5_35_0_003 = void 0;
|
|
7
|
-
var _dataMigration = require("@webiny/data-migration");
|
|
8
|
-
var _utils = require("../../../utils");
|
|
9
|
-
var _createTenantEntity = require("./createTenantEntity");
|
|
10
|
-
var _createUserEntity = require("./createUserEntity");
|
|
11
|
-
var _ioc = require("@webiny/ioc");
|
|
12
|
-
var _utils2 = require("@webiny/utils");
|
|
13
|
-
class AdminUsers_5_35_0_003 {
|
|
14
|
-
constructor(table) {
|
|
15
|
-
this.newUserEntity = (0, _createUserEntity.createUserEntity)(table);
|
|
16
|
-
this.legacyUserEntity = (0, _createUserEntity.createLegacyUserEntity)(table);
|
|
17
|
-
this.tenantEntity = (0, _createTenantEntity.createTenantEntity)(table);
|
|
18
|
-
}
|
|
19
|
-
getId() {
|
|
20
|
-
return "5.35.0-003";
|
|
21
|
-
}
|
|
22
|
-
getDescription() {
|
|
23
|
-
return "Move admin users attributes to a `data` envelope.";
|
|
24
|
-
}
|
|
25
|
-
async shouldExecute({
|
|
26
|
-
logger
|
|
27
|
-
}) {
|
|
28
|
-
const user = await (0, _utils.queryOne)({
|
|
29
|
-
entity: this.newUserEntity,
|
|
30
|
-
partitionKey: `T#root#ADMIN_USERS`,
|
|
31
|
-
options: {
|
|
32
|
-
index: "GSI1",
|
|
33
|
-
gt: " "
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
if (!user) {
|
|
37
|
-
logger.info(`No users were found; skipping migration.`);
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
if (user.data) {
|
|
41
|
-
logger.info(`User records seems to be in order; skipping migration.`);
|
|
42
|
-
return false;
|
|
43
|
-
}
|
|
44
|
-
return true;
|
|
45
|
-
}
|
|
46
|
-
async execute({
|
|
47
|
-
logger
|
|
48
|
-
}) {
|
|
49
|
-
const tenants = await (0, _utils.queryAll)({
|
|
50
|
-
entity: this.tenantEntity,
|
|
51
|
-
partitionKey: "TENANTS",
|
|
52
|
-
options: {
|
|
53
|
-
index: "GSI1",
|
|
54
|
-
gt: " "
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
for (const tenant of tenants) {
|
|
58
|
-
const users = await (0, _utils.queryAll)({
|
|
59
|
-
entity: this.legacyUserEntity,
|
|
60
|
-
partitionKey: `T#${tenant.id}#ADMIN_USERS`,
|
|
61
|
-
options: {
|
|
62
|
-
index: "GSI1",
|
|
63
|
-
gt: " "
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
if (users.length === 0) {
|
|
67
|
-
logger.info(`No users found on tenant "${tenant.id}".`);
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
70
|
-
const newUsers = users.filter(user => !user.data).map(user => {
|
|
71
|
-
return this.newUserEntity.putBatch({
|
|
72
|
-
PK: `T#${tenant.id}#ADMIN_USER#${user.id}`,
|
|
73
|
-
SK: "A",
|
|
74
|
-
GSI1_PK: `T#${tenant.id}#ADMIN_USERS`,
|
|
75
|
-
GSI1_SK: user.email,
|
|
76
|
-
TYPE: "adminUsers.user",
|
|
77
|
-
...(0, _createUserEntity.getUserData)(user),
|
|
78
|
-
// Move all data to a `data` envelope
|
|
79
|
-
data: (0, _createUserEntity.getUserData)(user)
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
await (0, _utils2.executeWithRetry)(() => (0, _utils.batchWriteAll)({
|
|
83
|
-
table: this.newUserEntity.table,
|
|
84
|
-
items: newUsers
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
exports.AdminUsers_5_35_0_003 = AdminUsers_5_35_0_003;
|
|
90
|
-
(0, _ioc.makeInjectable)(AdminUsers_5_35_0_003, [(0, _ioc.inject)(_dataMigration.PrimaryDynamoTableSymbol)]);
|
|
91
|
-
|
|
92
|
-
//# sourceMappingURL=index.js.map
|