@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 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_dataMigration","require","_utils","_createTenantEntity","_createUserEntity","_ioc","_utils2","AdminUsers_5_35_0_003","constructor","table","newUserEntity","createUserEntity","legacyUserEntity","createLegacyUserEntity","tenantEntity","createTenantEntity","getId","getDescription","shouldExecute","logger","user","queryOne","entity","partitionKey","options","index","gt","info","data","execute","tenants","queryAll","tenant","users","id","length","newUsers","filter","map","putBatch","PK","SK","GSI1_PK","GSI1_SK","email","TYPE","getUserData","executeWithRetry","batchWriteAll","items","exports","makeInjectable","inject","PrimaryDynamoTableSymbol"],"sources":["index.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { DataMigrationContext, PrimaryDynamoTableSymbol } from \"@webiny/data-migration\";\nimport { queryOne, queryAll, batchWriteAll } from \"~/utils\";\nimport { createTenantEntity } from \"./createTenantEntity\";\nimport { createLegacyUserEntity, createUserEntity, getUserData } from \"./createUserEntity\";\nimport { makeInjectable, inject } from \"@webiny/ioc\";\nimport { executeWithRetry } from \"@webiny/utils\";\n\nexport class AdminUsers_5_35_0_003 {\n private readonly newUserEntity: ReturnType<typeof createUserEntity>;\n private readonly legacyUserEntity: ReturnType<typeof createLegacyUserEntity>;\n private readonly tenantEntity: ReturnType<typeof createTenantEntity>;\n\n constructor(table: Table<string, string, string>) {\n this.newUserEntity = createUserEntity(table);\n this.legacyUserEntity = createLegacyUserEntity(table);\n this.tenantEntity = createTenantEntity(table);\n }\n\n getId() {\n return \"5.35.0-003\";\n }\n\n getDescription() {\n return \"Move admin users attributes to a `data` envelope.\";\n }\n\n async shouldExecute({ logger }: DataMigrationContext): Promise<boolean> {\n const user = await queryOne<{ data: any }>({\n entity: this.newUserEntity,\n partitionKey: `T#root#ADMIN_USERS`,\n options: {\n index: \"GSI1\",\n gt: \" \"\n }\n });\n\n if (!user) {\n logger.info(`No users were found; skipping migration.`);\n return false;\n }\n\n if (user.data) {\n logger.info(`User records seems to be in order; skipping migration.`);\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 users = await queryAll<{ id: string; email: string; data?: any }>({\n entity: this.legacyUserEntity,\n partitionKey: `T#${tenant.id}#ADMIN_USERS`,\n options: {\n index: \"GSI1\",\n gt: \" \"\n }\n });\n\n if (users.length === 0) {\n logger.info(`No users found on tenant \"${tenant.id}\".`);\n continue;\n }\n\n const newUsers = users\n .filter(user => !user.data)\n .map(user => {\n return this.newUserEntity.putBatch({\n PK: `T#${tenant.id}#ADMIN_USER#${user.id}`,\n SK: \"A\",\n GSI1_PK: `T#${tenant.id}#ADMIN_USERS`,\n GSI1_SK: user.email,\n TYPE: \"adminUsers.user\",\n ...getUserData(user),\n // Move all data to a `data` envelope\n data: getUserData(user)\n });\n });\n\n await executeWithRetry(() =>\n batchWriteAll({ table: this.newUserEntity.table, items: newUsers })\n );\n }\n }\n}\n\nmakeInjectable(AdminUsers_5_35_0_003, [inject(PrimaryDynamoTableSymbol)]);\n"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,IAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAEO,MAAMM,qBAAqB,CAAC;EAK/BC,WAAWA,CAACC,KAAoC,EAAE;IAC9C,IAAI,CAACC,aAAa,GAAG,IAAAC,kCAAgB,EAACF,KAAK,CAAC;IAC5C,IAAI,CAACG,gBAAgB,GAAG,IAAAC,wCAAsB,EAACJ,KAAK,CAAC;IACrD,IAAI,CAACK,YAAY,GAAG,IAAAC,sCAAkB,EAACN,KAAK,CAAC;EACjD;EAEAO,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,IAAI,GAAG,MAAM,IAAAC,eAAQ,EAAgB;MACvCC,MAAM,EAAE,IAAI,CAACZ,aAAa;MAC1Ba,YAAY,EAAG,oBAAmB;MAClCC,OAAO,EAAE;QACLC,KAAK,EAAE,MAAM;QACbC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,IAAI,CAACN,IAAI,EAAE;MACPD,MAAM,CAACQ,IAAI,CAAE,0CAAyC,CAAC;MACvD,OAAO,KAAK;IAChB;IAEA,IAAIP,IAAI,CAACQ,IAAI,EAAE;MACXT,MAAM,CAACQ,IAAI,CAAE,wDAAuD,CAAC;MACrE,OAAO,KAAK;IAChB;IAEA,OAAO,IAAI;EACf;EAEA,MAAME,OAAOA,CAAC;IAAEV;EAA6B,CAAC,EAAiB;IAC3D,MAAMW,OAAO,GAAG,MAAM,IAAAC,eAAQ,EAA+B;MACzDT,MAAM,EAAE,IAAI,CAACR,YAAY;MACzBS,YAAY,EAAE,SAAS;MACvBC,OAAO,EAAE;QACLC,KAAK,EAAE,MAAM;QACbC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,KAAK,MAAMM,MAAM,IAAIF,OAAO,EAAE;MAC1B,MAAMG,KAAK,GAAG,MAAM,IAAAF,eAAQ,EAA4C;QACpET,MAAM,EAAE,IAAI,CAACV,gBAAgB;QAC7BW,YAAY,EAAG,KAAIS,MAAM,CAACE,EAAG,cAAa;QAC1CV,OAAO,EAAE;UACLC,KAAK,EAAE,MAAM;UACbC,EAAE,EAAE;QACR;MACJ,CAAC,CAAC;MAEF,IAAIO,KAAK,CAACE,MAAM,KAAK,CAAC,EAAE;QACpBhB,MAAM,CAACQ,IAAI,CAAE,6BAA4BK,MAAM,CAACE,EAAG,IAAG,CAAC;QACvD;MACJ;MAEA,MAAME,QAAQ,GAAGH,KAAK,CACjBI,MAAM,CAACjB,IAAI,IAAI,CAACA,IAAI,CAACQ,IAAI,CAAC,CAC1BU,GAAG,CAAClB,IAAI,IAAI;QACT,OAAO,IAAI,CAACV,aAAa,CAAC6B,QAAQ,CAAC;UAC/BC,EAAE,EAAG,KAAIR,MAAM,CAACE,EAAG,eAAcd,IAAI,CAACc,EAAG,EAAC;UAC1CO,EAAE,EAAE,GAAG;UACPC,OAAO,EAAG,KAAIV,MAAM,CAACE,EAAG,cAAa;UACrCS,OAAO,EAAEvB,IAAI,CAACwB,KAAK;UACnBC,IAAI,EAAE,iBAAiB;UACvB,GAAG,IAAAC,6BAAW,EAAC1B,IAAI,CAAC;UACpB;UACAQ,IAAI,EAAE,IAAAkB,6BAAW,EAAC1B,IAAI;QAC1B,CAAC,CAAC;MACN,CAAC,CAAC;MAEN,MAAM,IAAA2B,wBAAgB,EAAC,MACnB,IAAAC,oBAAa,EAAC;QAAEvC,KAAK,EAAE,IAAI,CAACC,aAAa,CAACD,KAAK;QAAEwC,KAAK,EAAEb;MAAS,CAAC,CACtE,CAAC;IACL;EACJ;AACJ;AAACc,OAAA,CAAA3C,qBAAA,GAAAA,qBAAA;AAED,IAAA4C,mBAAc,EAAC5C,qBAAqB,EAAE,CAAC,IAAA6C,WAAM,EAACC,uCAAwB,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
-
export declare const getTenantData: (tenant: any) => Pick<any, string>;
|
|
3
|
-
export declare const createLegacyTenantEntity: (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 createNewTenantEntity: (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,57 +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.getTenantData = exports.createNewTenantEntity = exports.createLegacyTenantEntity = void 0;
|
|
8
|
-
var _pick = _interopRequireDefault(require("lodash/pick"));
|
|
9
|
-
var _utils = require("../../../utils");
|
|
10
|
-
const attributes = {
|
|
11
|
-
id: {
|
|
12
|
-
type: "string"
|
|
13
|
-
},
|
|
14
|
-
name: {
|
|
15
|
-
type: "string"
|
|
16
|
-
},
|
|
17
|
-
description: {
|
|
18
|
-
type: "string"
|
|
19
|
-
},
|
|
20
|
-
status: {
|
|
21
|
-
type: "string",
|
|
22
|
-
default: "active"
|
|
23
|
-
},
|
|
24
|
-
createdOn: {
|
|
25
|
-
type: "string"
|
|
26
|
-
},
|
|
27
|
-
savedOn: {
|
|
28
|
-
type: "string"
|
|
29
|
-
},
|
|
30
|
-
createdBy: {
|
|
31
|
-
type: "map"
|
|
32
|
-
},
|
|
33
|
-
parent: {
|
|
34
|
-
type: "string"
|
|
35
|
-
},
|
|
36
|
-
webinyVersion: {
|
|
37
|
-
type: "string"
|
|
38
|
-
},
|
|
39
|
-
settings: {
|
|
40
|
-
type: "map",
|
|
41
|
-
default: {}
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
const getTenantData = tenant => {
|
|
45
|
-
return (0, _pick.default)(tenant, Object.keys(attributes));
|
|
46
|
-
};
|
|
47
|
-
exports.getTenantData = getTenantData;
|
|
48
|
-
const createLegacyTenantEntity = table => {
|
|
49
|
-
return (0, _utils.createLegacyEntity)(table, "TenancyTenant", attributes);
|
|
50
|
-
};
|
|
51
|
-
exports.createLegacyTenantEntity = createLegacyTenantEntity;
|
|
52
|
-
const createNewTenantEntity = table => {
|
|
53
|
-
return (0, _utils.createStandardEntity)(table, "TenancyTenant", attributes);
|
|
54
|
-
};
|
|
55
|
-
exports.createNewTenantEntity = createNewTenantEntity;
|
|
56
|
-
|
|
57
|
-
//# sourceMappingURL=createTenantEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_pick","_interopRequireDefault","require","_utils","attributes","id","type","name","description","status","default","createdOn","savedOn","createdBy","parent","webinyVersion","settings","getTenantData","tenant","pick","Object","keys","exports","createLegacyTenantEntity","table","createLegacyEntity","createNewTenantEntity","createStandardEntity"],"sources":["createTenantEntity.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 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\nexport const getTenantData = (tenant: any) => {\n return pick(tenant, Object.keys(attributes));\n};\n\nexport const createLegacyTenantEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"TenancyTenant\", attributes);\n};\n\nexport const createNewTenantEntity = (table: Table<string, string, string>) => {\n return createStandardEntity(table, \"TenancyTenant\", 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,IAAI,EAAE;IACFD,IAAI,EAAE;EACV,CAAC;EACDE,WAAW,EAAE;IACTF,IAAI,EAAE;EACV,CAAC;EACDG,MAAM,EAAE;IACJH,IAAI,EAAE,QAAQ;IACdI,OAAO,EAAE;EACb,CAAC;EACDC,SAAS,EAAE;IACPL,IAAI,EAAE;EACV,CAAC;EACDM,OAAO,EAAE;IACLN,IAAI,EAAE;EACV,CAAC;EACDO,SAAS,EAAE;IACPP,IAAI,EAAE;EACV,CAAC;EACDQ,MAAM,EAAE;IACJR,IAAI,EAAE;EACV,CAAC;EACDS,aAAa,EAAE;IACXT,IAAI,EAAE;EACV,CAAC;EACDU,QAAQ,EAAE;IACNV,IAAI,EAAE,KAAK;IACXI,OAAO,EAAE,CAAC;EACd;AACJ,CAAC;AAEM,MAAMO,aAAa,GAAIC,MAAW,IAAK;EAC1C,OAAO,IAAAC,aAAI,EAACD,MAAM,EAAEE,MAAM,CAACC,IAAI,CAACjB,UAAU,CAAC,CAAC;AAChD,CAAC;AAACkB,OAAA,CAAAL,aAAA,GAAAA,aAAA;AAEK,MAAMM,wBAAwB,GAAIC,KAAoC,IAAK;EAC9E,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,eAAe,EAAEpB,UAAU,CAAC;AACjE,CAAC;AAACkB,OAAA,CAAAC,wBAAA,GAAAA,wBAAA;AAEK,MAAMG,qBAAqB,GAAIF,KAAoC,IAAK;EAC3E,OAAO,IAAAG,2BAAoB,EAACH,KAAK,EAAE,eAAe,EAAEpB,UAAU,CAAC;AACnE,CAAC;AAACkB,OAAA,CAAAI,qBAAA,GAAAA,qBAAA","ignoreList":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
-
import { DataMigrationContext } from "@webiny/data-migration";
|
|
3
|
-
export declare class Tenancy_5_35_0_004 {
|
|
4
|
-
private readonly legacyTenantEntity;
|
|
5
|
-
private readonly newTenantEntity;
|
|
6
|
-
constructor(table: Table<string, string, string>);
|
|
7
|
-
getId(): string;
|
|
8
|
-
getDescription(): string;
|
|
9
|
-
shouldExecute({ logger }: DataMigrationContext): Promise<boolean>;
|
|
10
|
-
execute({ logger }: DataMigrationContext): Promise<void>;
|
|
11
|
-
}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Tenancy_5_35_0_004 = void 0;
|
|
7
|
-
var _ioc = require("@webiny/ioc");
|
|
8
|
-
var _dataMigration = require("@webiny/data-migration");
|
|
9
|
-
var _utils = require("../../../utils");
|
|
10
|
-
var _createTenantEntity = require("./createTenantEntity");
|
|
11
|
-
var _dbDynamodb = require("@webiny/db-dynamodb");
|
|
12
|
-
class Tenancy_5_35_0_004 {
|
|
13
|
-
constructor(table) {
|
|
14
|
-
this.legacyTenantEntity = (0, _createTenantEntity.createLegacyTenantEntity)(table);
|
|
15
|
-
this.newTenantEntity = (0, _createTenantEntity.createNewTenantEntity)(table);
|
|
16
|
-
}
|
|
17
|
-
getId() {
|
|
18
|
-
return "5.35.0-004";
|
|
19
|
-
}
|
|
20
|
-
getDescription() {
|
|
21
|
-
return "Move tenant attributes to a `data` envelope.";
|
|
22
|
-
}
|
|
23
|
-
async shouldExecute({
|
|
24
|
-
logger
|
|
25
|
-
}) {
|
|
26
|
-
const tenant = await (0, _utils.queryOne)({
|
|
27
|
-
entity: this.legacyTenantEntity,
|
|
28
|
-
partitionKey: `TENANTS`,
|
|
29
|
-
options: {
|
|
30
|
-
index: "GSI1",
|
|
31
|
-
gt: " "
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
if (!tenant) {
|
|
35
|
-
logger.info(`No tenants were found; skipping migration.`);
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
if (tenant.data) {
|
|
39
|
-
logger.info(`Tenant records seems to be in order; skipping migration.`);
|
|
40
|
-
return false;
|
|
41
|
-
}
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
async execute({
|
|
45
|
-
logger
|
|
46
|
-
}) {
|
|
47
|
-
const tenants = await (0, _utils.queryAll)({
|
|
48
|
-
entity: this.legacyTenantEntity,
|
|
49
|
-
partitionKey: "TENANTS",
|
|
50
|
-
options: {
|
|
51
|
-
index: "GSI1",
|
|
52
|
-
gt: " "
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
for (const tenant of tenants) {
|
|
56
|
-
logger.info(`Updating tenant ${tenant.name} (${tenant.id}).`);
|
|
57
|
-
await (0, _dbDynamodb.put)({
|
|
58
|
-
entity: this.newTenantEntity,
|
|
59
|
-
item: {
|
|
60
|
-
PK: `T#${tenant.id}`,
|
|
61
|
-
SK: "A",
|
|
62
|
-
GSI1_PK: tenant.GSI1_PK,
|
|
63
|
-
GSI1_SK: tenant.GSI1_SK,
|
|
64
|
-
TYPE: tenant.TYPE,
|
|
65
|
-
...(0, _createTenantEntity.getTenantData)(tenant),
|
|
66
|
-
// Move all data to a `data` envelope
|
|
67
|
-
data: {
|
|
68
|
-
...(0, _createTenantEntity.getTenantData)(tenant),
|
|
69
|
-
// While we're here, add a `tags` attribute to tenants
|
|
70
|
-
tags: []
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
exports.Tenancy_5_35_0_004 = Tenancy_5_35_0_004;
|
|
78
|
-
(0, _ioc.makeInjectable)(Tenancy_5_35_0_004, [(0, _ioc.inject)(_dataMigration.PrimaryDynamoTableSymbol)]);
|
|
79
|
-
|
|
80
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_ioc","require","_dataMigration","_utils","_createTenantEntity","_dbDynamodb","Tenancy_5_35_0_004","constructor","table","legacyTenantEntity","createLegacyTenantEntity","newTenantEntity","createNewTenantEntity","getId","getDescription","shouldExecute","logger","tenant","queryOne","entity","partitionKey","options","index","gt","info","data","execute","tenants","queryAll","name","id","put","item","PK","SK","GSI1_PK","GSI1_SK","TYPE","getTenantData","tags","exports","makeInjectable","inject","PrimaryDynamoTableSymbol"],"sources":["index.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { inject, makeInjectable } from \"@webiny/ioc\";\nimport { DataMigrationContext, PrimaryDynamoTableSymbol } from \"@webiny/data-migration\";\nimport { queryAll, queryOne } from \"~/utils\";\nimport {\n createLegacyTenantEntity,\n createNewTenantEntity,\n getTenantData\n} from \"./createTenantEntity\";\nimport { put } from \"@webiny/db-dynamodb\";\n\nexport class Tenancy_5_35_0_004 {\n private readonly legacyTenantEntity: ReturnType<typeof createLegacyTenantEntity>;\n private readonly newTenantEntity: ReturnType<typeof createNewTenantEntity>;\n\n constructor(table: Table<string, string, string>) {\n this.legacyTenantEntity = createLegacyTenantEntity(table);\n this.newTenantEntity = createNewTenantEntity(table);\n }\n\n getId() {\n return \"5.35.0-004\";\n }\n\n getDescription() {\n return \"Move tenant attributes to a `data` envelope.\";\n }\n\n async shouldExecute({ logger }: DataMigrationContext): Promise<boolean> {\n const tenant = await queryOne<{ data: any }>({\n entity: this.legacyTenantEntity,\n partitionKey: `TENANTS`,\n options: {\n index: \"GSI1\",\n gt: \" \"\n }\n });\n\n if (!tenant) {\n logger.info(`No tenants were found; skipping migration.`);\n return false;\n }\n\n if (tenant.data) {\n logger.info(`Tenant records seems to be in order; skipping migration.`);\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.legacyTenantEntity,\n partitionKey: \"TENANTS\",\n options: {\n index: \"GSI1\",\n gt: \" \"\n }\n });\n\n for (const tenant of tenants) {\n logger.info(`Updating tenant ${tenant.name} (${tenant.id}).`);\n await put({\n entity: this.newTenantEntity,\n item: {\n PK: `T#${tenant.id}`,\n SK: \"A\",\n GSI1_PK: tenant.GSI1_PK,\n GSI1_SK: tenant.GSI1_SK,\n TYPE: tenant.TYPE,\n ...getTenantData(tenant),\n // Move all data to a `data` envelope\n data: {\n ...getTenantData(tenant),\n // While we're here, add a `tags` attribute to tenants\n tags: []\n }\n }\n });\n }\n }\n}\n\nmakeInjectable(Tenancy_5_35_0_004, [inject(PrimaryDynamoTableSymbol)]);\n"],"mappings":";;;;;;AACA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,mBAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAEO,MAAMK,kBAAkB,CAAC;EAI5BC,WAAWA,CAACC,KAAoC,EAAE;IAC9C,IAAI,CAACC,kBAAkB,GAAG,IAAAC,4CAAwB,EAACF,KAAK,CAAC;IACzD,IAAI,CAACG,eAAe,GAAG,IAAAC,yCAAqB,EAACJ,KAAK,CAAC;EACvD;EAEAK,KAAKA,CAAA,EAAG;IACJ,OAAO,YAAY;EACvB;EAEAC,cAAcA,CAAA,EAAG;IACb,OAAO,8CAA8C;EACzD;EAEA,MAAMC,aAAaA,CAAC;IAAEC;EAA6B,CAAC,EAAoB;IACpE,MAAMC,MAAM,GAAG,MAAM,IAAAC,eAAQ,EAAgB;MACzCC,MAAM,EAAE,IAAI,CAACV,kBAAkB;MAC/BW,YAAY,EAAG,SAAQ;MACvBC,OAAO,EAAE;QACLC,KAAK,EAAE,MAAM;QACbC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,IAAI,CAACN,MAAM,EAAE;MACTD,MAAM,CAACQ,IAAI,CAAE,4CAA2C,CAAC;MACzD,OAAO,KAAK;IAChB;IAEA,IAAIP,MAAM,CAACQ,IAAI,EAAE;MACbT,MAAM,CAACQ,IAAI,CAAE,0DAAyD,CAAC;MACvE,OAAO,KAAK;IAChB;IAEA,OAAO,IAAI;EACf;EAEA,MAAME,OAAOA,CAAC;IAAEV;EAA6B,CAAC,EAAiB;IAC3D,MAAMW,OAAO,GAAG,MAAM,IAAAC,eAAQ,EAA+B;MACzDT,MAAM,EAAE,IAAI,CAACV,kBAAkB;MAC/BW,YAAY,EAAE,SAAS;MACvBC,OAAO,EAAE;QACLC,KAAK,EAAE,MAAM;QACbC,EAAE,EAAE;MACR;IACJ,CAAC,CAAC;IAEF,KAAK,MAAMN,MAAM,IAAIU,OAAO,EAAE;MAC1BX,MAAM,CAACQ,IAAI,CAAE,mBAAkBP,MAAM,CAACY,IAAK,KAAIZ,MAAM,CAACa,EAAG,IAAG,CAAC;MAC7D,MAAM,IAAAC,eAAG,EAAC;QACNZ,MAAM,EAAE,IAAI,CAACR,eAAe;QAC5BqB,IAAI,EAAE;UACFC,EAAE,EAAG,KAAIhB,MAAM,CAACa,EAAG,EAAC;UACpBI,EAAE,EAAE,GAAG;UACPC,OAAO,EAAElB,MAAM,CAACkB,OAAO;UACvBC,OAAO,EAAEnB,MAAM,CAACmB,OAAO;UACvBC,IAAI,EAAEpB,MAAM,CAACoB,IAAI;UACjB,GAAG,IAAAC,iCAAa,EAACrB,MAAM,CAAC;UACxB;UACAQ,IAAI,EAAE;YACF,GAAG,IAAAa,iCAAa,EAACrB,MAAM,CAAC;YACxB;YACAsB,IAAI,EAAE;UACV;QACJ;MACJ,CAAC,CAAC;IACN;EACJ;AACJ;AAACC,OAAA,CAAAlC,kBAAA,GAAAA,kBAAA;AAED,IAAAmC,mBAAc,EAACnC,kBAAkB,EAAE,CAAC,IAAAoC,WAAM,EAACC,uCAAwB,CAAC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
-
export declare const createLocaleEntity: (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,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createLocaleEntity = void 0;
|
|
7
|
-
var _utils = require("../../../utils");
|
|
8
|
-
const createLocaleEntity = table => {
|
|
9
|
-
return (0, _utils.createLegacyEntity)(table, "I18NLocale", {
|
|
10
|
-
createdOn: {
|
|
11
|
-
type: "string"
|
|
12
|
-
},
|
|
13
|
-
createdBy: {
|
|
14
|
-
type: "map"
|
|
15
|
-
},
|
|
16
|
-
code: {
|
|
17
|
-
type: "string"
|
|
18
|
-
},
|
|
19
|
-
default: {
|
|
20
|
-
type: "boolean"
|
|
21
|
-
},
|
|
22
|
-
webinyVersion: {
|
|
23
|
-
type: "string"
|
|
24
|
-
},
|
|
25
|
-
tenant: {
|
|
26
|
-
type: "string"
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
exports.createLocaleEntity = createLocaleEntity;
|
|
31
|
-
|
|
32
|
-
//# sourceMappingURL=createLocaleEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_utils","require","createLocaleEntity","table","createLegacyEntity","createdOn","type","createdBy","code","default","webinyVersion","tenant","exports"],"sources":["createLocaleEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { createLegacyEntity } from \"~/utils\";\n\nexport const createLocaleEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"I18NLocale\", {\n createdOn: {\n type: \"string\"\n },\n createdBy: {\n type: \"map\"\n },\n code: {\n type: \"string\"\n },\n default: {\n type: \"boolean\"\n },\n webinyVersion: {\n type: \"string\"\n },\n tenant: {\n type: \"string\"\n }\n });\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,kBAAkB,GAAIC,KAAoC,IAAK;EACxE,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,YAAY,EAAE;IAC3CE,SAAS,EAAE;MACPC,IAAI,EAAE;IACV,CAAC;IACDC,SAAS,EAAE;MACPD,IAAI,EAAE;IACV,CAAC;IACDE,IAAI,EAAE;MACFF,IAAI,EAAE;IACV,CAAC;IACDG,OAAO,EAAE;MACLH,IAAI,EAAE;IACV,CAAC;IACDI,aAAa,EAAE;MACXJ,IAAI,EAAE;IACV,CAAC;IACDK,MAAM,EAAE;MACJL,IAAI,EAAE;IACV;EACJ,CAAC,CAAC;AACN,CAAC;AAACM,OAAA,CAAAV,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
-
export declare const createModelEntity: (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,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.createModelEntity = void 0;
|
|
7
|
-
var _utils = require("../../../utils");
|
|
8
|
-
const attributes = {
|
|
9
|
-
PK: {
|
|
10
|
-
partitionKey: true
|
|
11
|
-
},
|
|
12
|
-
SK: {
|
|
13
|
-
sortKey: true
|
|
14
|
-
},
|
|
15
|
-
TYPE: {
|
|
16
|
-
type: "string",
|
|
17
|
-
required: true
|
|
18
|
-
},
|
|
19
|
-
webinyVersion: {
|
|
20
|
-
type: "string",
|
|
21
|
-
required: true
|
|
22
|
-
},
|
|
23
|
-
name: {
|
|
24
|
-
type: "string",
|
|
25
|
-
required: true
|
|
26
|
-
},
|
|
27
|
-
modelId: {
|
|
28
|
-
type: "string",
|
|
29
|
-
required: true
|
|
30
|
-
},
|
|
31
|
-
singularApiName: {
|
|
32
|
-
type: "string",
|
|
33
|
-
required: true
|
|
34
|
-
},
|
|
35
|
-
pluralApiName: {
|
|
36
|
-
type: "string",
|
|
37
|
-
required: true
|
|
38
|
-
},
|
|
39
|
-
locale: {
|
|
40
|
-
type: "string",
|
|
41
|
-
required: true
|
|
42
|
-
},
|
|
43
|
-
group: {
|
|
44
|
-
type: "map",
|
|
45
|
-
required: true
|
|
46
|
-
},
|
|
47
|
-
icon: {
|
|
48
|
-
type: "string"
|
|
49
|
-
},
|
|
50
|
-
description: {
|
|
51
|
-
type: "string"
|
|
52
|
-
},
|
|
53
|
-
createdOn: {
|
|
54
|
-
type: "string",
|
|
55
|
-
required: true
|
|
56
|
-
},
|
|
57
|
-
savedOn: {
|
|
58
|
-
type: "string",
|
|
59
|
-
required: true
|
|
60
|
-
},
|
|
61
|
-
createdBy: {
|
|
62
|
-
type: "map",
|
|
63
|
-
required: true
|
|
64
|
-
},
|
|
65
|
-
fields: {
|
|
66
|
-
type: "list",
|
|
67
|
-
required: true
|
|
68
|
-
},
|
|
69
|
-
layout: {
|
|
70
|
-
type: "list",
|
|
71
|
-
required: true
|
|
72
|
-
},
|
|
73
|
-
tags: {
|
|
74
|
-
type: "list",
|
|
75
|
-
required: false,
|
|
76
|
-
default: []
|
|
77
|
-
},
|
|
78
|
-
lockedFields: {
|
|
79
|
-
type: "list",
|
|
80
|
-
required: true
|
|
81
|
-
},
|
|
82
|
-
titleFieldId: {
|
|
83
|
-
type: "string"
|
|
84
|
-
},
|
|
85
|
-
descriptionFieldId: {
|
|
86
|
-
type: "string"
|
|
87
|
-
},
|
|
88
|
-
imageFieldId: {
|
|
89
|
-
type: "string"
|
|
90
|
-
},
|
|
91
|
-
tenant: {
|
|
92
|
-
type: "string",
|
|
93
|
-
required: true
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
const createModelEntity = table => {
|
|
97
|
-
return (0, _utils.createLegacyEntity)(table, "CmsModels", attributes);
|
|
98
|
-
};
|
|
99
|
-
exports.createModelEntity = createModelEntity;
|
|
100
|
-
|
|
101
|
-
//# sourceMappingURL=createModelEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_utils","require","attributes","PK","partitionKey","SK","sortKey","TYPE","type","required","webinyVersion","name","modelId","singularApiName","pluralApiName","locale","group","icon","description","createdOn","savedOn","createdBy","fields","layout","tags","default","lockedFields","titleFieldId","descriptionFieldId","imageFieldId","tenant","createModelEntity","table","createLegacyEntity","exports"],"sources":["createModelEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { createLegacyEntity } from \"~/utils\";\n\nconst attributes: Parameters<typeof createLegacyEntity>[2] = {\n PK: {\n partitionKey: true\n },\n SK: {\n sortKey: true\n },\n TYPE: {\n type: \"string\",\n required: true\n },\n webinyVersion: {\n type: \"string\",\n required: true\n },\n name: {\n type: \"string\",\n required: true\n },\n modelId: {\n type: \"string\",\n required: true\n },\n singularApiName: {\n type: \"string\",\n required: true\n },\n pluralApiName: {\n type: \"string\",\n required: true\n },\n locale: {\n type: \"string\",\n required: true\n },\n group: {\n type: \"map\",\n required: true\n },\n icon: {\n type: \"string\"\n },\n description: {\n type: \"string\"\n },\n createdOn: {\n type: \"string\",\n required: true\n },\n savedOn: {\n type: \"string\",\n required: true\n },\n createdBy: {\n type: \"map\",\n required: true\n },\n fields: {\n type: \"list\",\n required: true\n },\n layout: {\n type: \"list\",\n required: true\n },\n tags: {\n type: \"list\",\n required: false,\n default: []\n },\n lockedFields: {\n type: \"list\",\n required: true\n },\n titleFieldId: {\n type: \"string\"\n },\n descriptionFieldId: {\n type: \"string\"\n },\n imageFieldId: {\n type: \"string\"\n },\n tenant: {\n type: \"string\",\n required: true\n }\n};\n\nexport const createModelEntity = (table: Table<string, string, string>) => {\n return createLegacyEntity(table, \"CmsModels\", attributes);\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEA,MAAMC,UAAoD,GAAG;EACzDC,EAAE,EAAE;IACAC,YAAY,EAAE;EAClB,CAAC;EACDC,EAAE,EAAE;IACAC,OAAO,EAAE;EACb,CAAC;EACDC,IAAI,EAAE;IACFC,IAAI,EAAE,QAAQ;IACdC,QAAQ,EAAE;EACd,CAAC;EACDC,aAAa,EAAE;IACXF,IAAI,EAAE,QAAQ;IACdC,QAAQ,EAAE;EACd,CAAC;EACDE,IAAI,EAAE;IACFH,IAAI,EAAE,QAAQ;IACdC,QAAQ,EAAE;EACd,CAAC;EACDG,OAAO,EAAE;IACLJ,IAAI,EAAE,QAAQ;IACdC,QAAQ,EAAE;EACd,CAAC;EACDI,eAAe,EAAE;IACbL,IAAI,EAAE,QAAQ;IACdC,QAAQ,EAAE;EACd,CAAC;EACDK,aAAa,EAAE;IACXN,IAAI,EAAE,QAAQ;IACdC,QAAQ,EAAE;EACd,CAAC;EACDM,MAAM,EAAE;IACJP,IAAI,EAAE,QAAQ;IACdC,QAAQ,EAAE;EACd,CAAC;EACDO,KAAK,EAAE;IACHR,IAAI,EAAE,KAAK;IACXC,QAAQ,EAAE;EACd,CAAC;EACDQ,IAAI,EAAE;IACFT,IAAI,EAAE;EACV,CAAC;EACDU,WAAW,EAAE;IACTV,IAAI,EAAE;EACV,CAAC;EACDW,SAAS,EAAE;IACPX,IAAI,EAAE,QAAQ;IACdC,QAAQ,EAAE;EACd,CAAC;EACDW,OAAO,EAAE;IACLZ,IAAI,EAAE,QAAQ;IACdC,QAAQ,EAAE;EACd,CAAC;EACDY,SAAS,EAAE;IACPb,IAAI,EAAE,KAAK;IACXC,QAAQ,EAAE;EACd,CAAC;EACDa,MAAM,EAAE;IACJd,IAAI,EAAE,MAAM;IACZC,QAAQ,EAAE;EACd,CAAC;EACDc,MAAM,EAAE;IACJf,IAAI,EAAE,MAAM;IACZC,QAAQ,EAAE;EACd,CAAC;EACDe,IAAI,EAAE;IACFhB,IAAI,EAAE,MAAM;IACZC,QAAQ,EAAE,KAAK;IACfgB,OAAO,EAAE;EACb,CAAC;EACDC,YAAY,EAAE;IACVlB,IAAI,EAAE,MAAM;IACZC,QAAQ,EAAE;EACd,CAAC;EACDkB,YAAY,EAAE;IACVnB,IAAI,EAAE;EACV,CAAC;EACDoB,kBAAkB,EAAE;IAChBpB,IAAI,EAAE;EACV,CAAC;EACDqB,YAAY,EAAE;IACVrB,IAAI,EAAE;EACV,CAAC;EACDsB,MAAM,EAAE;IACJtB,IAAI,EAAE,QAAQ;IACdC,QAAQ,EAAE;EACd;AACJ,CAAC;AAEM,MAAMsB,iBAAiB,GAAIC,KAAoC,IAAK;EACvE,OAAO,IAAAC,yBAAkB,EAACD,KAAK,EAAE,WAAW,EAAE9B,UAAU,CAAC;AAC7D,CAAC;AAACgC,OAAA,CAAAH,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -1,48 +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
|
-
data: {
|
|
19
|
-
type: "map";
|
|
20
|
-
};
|
|
21
|
-
}, {
|
|
22
|
-
PK: {
|
|
23
|
-
partitionKey: true;
|
|
24
|
-
};
|
|
25
|
-
SK: {
|
|
26
|
-
sortKey: true;
|
|
27
|
-
};
|
|
28
|
-
GSI1_PK: {
|
|
29
|
-
type: "string";
|
|
30
|
-
};
|
|
31
|
-
GSI1_SK: {
|
|
32
|
-
type: "string";
|
|
33
|
-
};
|
|
34
|
-
TYPE: {
|
|
35
|
-
type: "string";
|
|
36
|
-
};
|
|
37
|
-
data: {
|
|
38
|
-
type: "map";
|
|
39
|
-
};
|
|
40
|
-
}, import("dynamodb-toolbox/dist/cjs/classes/Entity").ParsedAttributes<import("ts-toolbelt/out/Any/Key").Key>, any, {
|
|
41
|
-
[x: string]: any;
|
|
42
|
-
[x: number]: any;
|
|
43
|
-
[x: symbol]: any;
|
|
44
|
-
}, {
|
|
45
|
-
[x: string]: any;
|
|
46
|
-
[x: number]: any;
|
|
47
|
-
[x: symbol]: any;
|
|
48
|
-
}>;
|
|
@@ -1,13 +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.createStandardEntity)(table, "TenancyTenant");
|
|
10
|
-
};
|
|
11
|
-
exports.createTenantEntity = createTenantEntity;
|
|
12
|
-
|
|
13
|
-
//# sourceMappingURL=createTenantEntity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_utils","require","createTenantEntity","table","createStandardEntity","exports"],"sources":["createTenantEntity.ts"],"sourcesContent":["import { Table } from \"@webiny/db-dynamodb/toolbox\";\nimport { createStandardEntity } from \"~/utils\";\n\nexport const createTenantEntity = (table: Table<string, string, string>) => {\n return createStandardEntity(table, \"TenancyTenant\");\n};\n"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAEO,MAAMC,kBAAkB,GAAIC,KAAoC,IAAK;EACxE,OAAO,IAAAC,2BAAoB,EAACD,KAAK,EAAE,eAAe,CAAC;AACvD,CAAC;AAACE,OAAA,CAAAH,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Table } from "@webiny/db-dynamodb/toolbox";
|
|
2
|
-
import { DataMigrationContext } from "@webiny/data-migration";
|
|
3
|
-
export declare class CmsModels_5_35_0_005 {
|
|
4
|
-
private readonly modelEntity;
|
|
5
|
-
private readonly tenantEntity;
|
|
6
|
-
private readonly localeEntity;
|
|
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
|
-
private listTenants;
|
|
13
|
-
private listLocales;
|
|
14
|
-
private listModels;
|
|
15
|
-
}
|