2021-08-07 05:49:51 +00:00
|
|
|
//
|
|
|
|
// Copyright © 2020 Anticrm Platform Contributors.
|
|
|
|
//
|
|
|
|
// Licensed under the Eclipse Public License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License. You may
|
|
|
|
// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
//
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
2022-01-24 18:30:13 +00:00
|
|
|
import core, { Data, Version } from '@anticrm/core'
|
2022-02-08 09:06:06 +00:00
|
|
|
import jsonVersion from './version.json'
|
|
|
|
|
2021-08-07 05:49:51 +00:00
|
|
|
import { Builder } from '@anticrm/model'
|
2022-01-24 18:30:13 +00:00
|
|
|
import { createModel as activityModel } from '@anticrm/model-activity'
|
2021-12-06 10:07:08 +00:00
|
|
|
import { createModel as attachmentModel } from '@anticrm/model-attachment'
|
2022-01-24 18:30:13 +00:00
|
|
|
import { createModel as chunterModel } from '@anticrm/model-chunter'
|
|
|
|
import { createModel as contactModel } from '@anticrm/model-contact'
|
|
|
|
import { createModel as coreModel } from '@anticrm/model-core'
|
|
|
|
import { createDemo } from '@anticrm/model-demo'
|
2021-12-30 09:13:16 +00:00
|
|
|
import { createModel as gmailModel } from '@anticrm/model-gmail'
|
2022-01-14 09:20:31 +00:00
|
|
|
import { createModel as inventoryModel } from '@anticrm/model-inventory'
|
2022-01-24 18:30:13 +00:00
|
|
|
import { createModel as leadModel } from '@anticrm/model-lead'
|
2022-01-21 09:05:55 +00:00
|
|
|
import { createModel as presentationModel } from '@anticrm/model-presentation'
|
2022-01-24 18:30:13 +00:00
|
|
|
import { createModel as recruitModel } from '@anticrm/model-recruit'
|
|
|
|
import { createModel as serverAttachmentModel } from '@anticrm/model-server-attachment'
|
|
|
|
import { createModel as serverContactModel } from '@anticrm/model-server-contact'
|
2022-02-11 09:18:55 +00:00
|
|
|
import { createModel as serverNotificationModel } from '@anticrm/model-server-notification'
|
2022-01-24 18:30:13 +00:00
|
|
|
import { createModel as serverCoreModel } from '@anticrm/model-server-core'
|
|
|
|
import { createModel as settingModel } from '@anticrm/model-setting'
|
|
|
|
import { createModel as taskModel } from '@anticrm/model-task'
|
|
|
|
import { createModel as telegramModel } from '@anticrm/model-telegram'
|
2022-01-24 09:35:58 +00:00
|
|
|
import { createModel as templatesModel } from '@anticrm/model-templates'
|
|
|
|
import { createModel as textEditorModel } from '@anticrm/model-text-editor'
|
2022-01-24 18:30:13 +00:00
|
|
|
import { createModel as viewModel } from '@anticrm/model-view'
|
|
|
|
import { createModel as workbenchModel } from '@anticrm/model-workbench'
|
2022-02-07 09:03:14 +00:00
|
|
|
import { createModel as notificationModel } from '@anticrm/model-notification'
|
2022-02-16 09:02:31 +00:00
|
|
|
import { createModel as tagsModel } from '@anticrm/model-tags'
|
2021-08-07 05:49:51 +00:00
|
|
|
|
2022-02-08 09:06:06 +00:00
|
|
|
export const version: Data<Version> = jsonVersion as Data<Version>
|
|
|
|
|
2022-01-24 18:30:13 +00:00
|
|
|
const builder = new Builder()
|
2021-08-07 21:35:49 +00:00
|
|
|
|
2022-01-24 18:30:13 +00:00
|
|
|
const builders = [
|
|
|
|
coreModel,
|
|
|
|
activityModel,
|
|
|
|
attachmentModel,
|
|
|
|
viewModel,
|
|
|
|
workbenchModel,
|
|
|
|
contactModel,
|
|
|
|
chunterModel,
|
|
|
|
taskModel,
|
|
|
|
recruitModel,
|
|
|
|
settingModel,
|
|
|
|
telegramModel,
|
|
|
|
leadModel,
|
|
|
|
gmailModel,
|
|
|
|
inventoryModel,
|
|
|
|
presentationModel,
|
|
|
|
templatesModel,
|
|
|
|
textEditorModel,
|
2022-02-07 09:03:14 +00:00
|
|
|
notificationModel,
|
2022-01-24 18:30:13 +00:00
|
|
|
serverCoreModel,
|
|
|
|
serverAttachmentModel,
|
|
|
|
serverContactModel,
|
2022-02-11 09:18:55 +00:00
|
|
|
serverNotificationModel,
|
2022-02-16 09:02:31 +00:00
|
|
|
tagsModel,
|
|
|
|
|
2022-01-24 18:30:13 +00:00
|
|
|
createDemo
|
|
|
|
]
|
2021-08-07 05:49:51 +00:00
|
|
|
|
2022-01-24 18:30:13 +00:00
|
|
|
for (const b of builders) {
|
|
|
|
b(builder)
|
|
|
|
}
|
2021-08-07 21:35:49 +00:00
|
|
|
|
2022-01-24 18:30:13 +00:00
|
|
|
builder.createDoc(core.class.Version, core.space.Model, version, core.version.Model)
|
2021-08-07 05:49:51 +00:00
|
|
|
export default builder
|
2021-12-07 18:45:11 +00:00
|
|
|
|
|
|
|
// Export upgrade procedures
|
2021-12-22 09:04:07 +00:00
|
|
|
export { createDeps } from './creation'
|
2022-01-24 18:30:13 +00:00
|
|
|
export { migrateOperations } from './migration'
|