@lilaquadrat/studio 10.0.0-beta.40 → 10.0.0-beta.42
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/lib/models.d.ts +2 -4
- package/lib/models.js +2 -4
- package/lib/models.js.map +1 -1
- package/lib/services.d.ts +2 -1
- package/lib/services.js +2 -1
- package/lib/services.js.map +1 -1
- package/lib/src/models/design.model.d.ts +4 -0
- package/lib/src/models/design.model.js +58 -0
- package/lib/src/models/design.model.js.map +1 -0
- package/lib/src/services/conf.service.js +2 -1
- package/lib/src/services/conf.service.js.map +1 -1
- package/lib/src/services/designs.service.d.ts +7 -0
- package/lib/src/services/designs.service.js +10 -0
- package/lib/src/services/designs.service.js.map +1 -0
- package/lib/src/services/publish.service.js +1 -2
- package/lib/src/services/publish.service.js.map +1 -1
- package/package.json +3 -3
- package/lib/src/models/certificate-action.model.d.ts +0 -5
- package/lib/src/models/certificate-action.model.js +0 -229
- package/lib/src/models/certificate-action.model.js.map +0 -1
- package/lib/src/models/certificate.model.d.ts +0 -4
- package/lib/src/models/certificate.model.js +0 -96
- package/lib/src/models/certificate.model.js.map +0 -1
- package/lib/src/models/editorBase.model.d.ts +0 -4
- package/lib/src/models/editorBase.model.js +0 -39
- package/lib/src/models/editorBase.model.js.map +0 -1
- package/lib/src/services/certificates.service.d.ts +0 -0
- package/lib/src/services/certificates.service.js +0 -199
- package/lib/src/services/certificates.service.js.map +0 -1
- package/lib/src/services/certificatesAction.service.d.ts +0 -0
- package/lib/src/services/certificatesAction.service.js +0 -237
- package/lib/src/services/certificatesAction.service.js.map +0 -1
- package/lib/src/services/editorBase.service.d.ts +0 -0
- package/lib/src/services/editorBase.service.js +0 -185
- package/lib/src/services/editorBase.service.js.map +0 -1
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
// import Immutable from '../Immutable.class.js';
|
|
2
|
-
// import { EditorBaseModel } from '../../models.js';
|
|
3
|
-
// import { logger, ShareClientFactory } from '../../main.js';
|
|
4
|
-
// import { HandleFileService } from '../../services.js';
|
|
5
|
-
// import { AvailableStorageTypes, EditorBase, ShareClientInterface } from '@lilaquadrat/interfaces';
|
|
6
|
-
// class EditorBaseService extends Immutable<EditorBase> {
|
|
7
|
-
// model = EditorBaseModel;
|
|
8
|
-
// get shareClient(): ShareClientInterface {
|
|
9
|
-
// const shareClient = ShareClientFactory(
|
|
10
|
-
// process.env.STORAGE_TYPE as AvailableStorageTypes,
|
|
11
|
-
// {
|
|
12
|
-
// endpoint: process.env.STORAGE_ENDPOINT as string,
|
|
13
|
-
// accessKey: process.env.STORAGE_ACCESSKEY as string,
|
|
14
|
-
// secretKey: process.env.STORAGE_SECRETKEY as string,
|
|
15
|
-
// container: 'customers',
|
|
16
|
-
// },
|
|
17
|
-
// );
|
|
18
|
-
// return shareClient;
|
|
19
|
-
// }
|
|
20
|
-
// /**
|
|
21
|
-
// * creates basic CDN folders for this project
|
|
22
|
-
// *
|
|
23
|
-
// * @param {string} project
|
|
24
|
-
// * @param {string} customer
|
|
25
|
-
// * @returns
|
|
26
|
-
// * @memberof ProjectClass
|
|
27
|
-
// */
|
|
28
|
-
// createBase(company: string, project: string) {
|
|
29
|
-
// const { shareClient } = this;
|
|
30
|
-
// /**
|
|
31
|
-
// * create the project folder for the customer
|
|
32
|
-
// */
|
|
33
|
-
// return shareClient
|
|
34
|
-
// .createFolder(company, project)
|
|
35
|
-
// .then(() => shareClient.createFolder(`${company}/${project}`, 'editor'))
|
|
36
|
-
// .then(() => shareClient.createFolder(`${company}/${project}`, 'upload'));
|
|
37
|
-
// }
|
|
38
|
-
// /** copy basic editor setup into the project */
|
|
39
|
-
// async copyBase(
|
|
40
|
-
// company: string,
|
|
41
|
-
// project: string,
|
|
42
|
-
// type: 'app' | 'server',
|
|
43
|
-
// path: string = 'lilaquadrat/base/editorBase',
|
|
44
|
-
// user: string,
|
|
45
|
-
// app: string,
|
|
46
|
-
// ) {
|
|
47
|
-
// const base = await this.single('lilaquadrat', 'base', type);
|
|
48
|
-
// if (!base) throw new Error('BASE_NOT_FOUND');
|
|
49
|
-
// console.log('base', base);
|
|
50
|
-
// if (base.version === '3') {
|
|
51
|
-
// await this.copyEditorBasev3(company, project, type, path);
|
|
52
|
-
// } else {
|
|
53
|
-
// await this.copyEditorBase(company, project, type, path);
|
|
54
|
-
// }
|
|
55
|
-
// return this.upsertType(company, project, type, base.version, false, user, app);
|
|
56
|
-
// }
|
|
57
|
-
// copyEditorBase(
|
|
58
|
-
// company: string,
|
|
59
|
-
// project: string,
|
|
60
|
-
// type: 'app' | 'server',
|
|
61
|
-
// path: string = 'lilaquadrat/base/editorBase',
|
|
62
|
-
// ) {
|
|
63
|
-
// const filter = type === 'app' ? /(.(js|css|woff)|index\.html)$/i : /.(json|server\.html)$/i;
|
|
64
|
-
// return this.shareClient
|
|
65
|
-
// .list(path, filter)
|
|
66
|
-
// .then((foundFiles) => {
|
|
67
|
-
// logger.info(`projects.create.${company}.${project}.files.copy`);
|
|
68
|
-
// logger.info(`projects.create.${company}.${project}.files.copy.${foundFiles.length}`);
|
|
69
|
-
// logger.debug(path);
|
|
70
|
-
// logger.debug(`${company}/${project}/editor`);
|
|
71
|
-
// return this.shareClient.copy(
|
|
72
|
-
// foundFiles,
|
|
73
|
-
// path,
|
|
74
|
-
// `${company}/${project}/editor`,
|
|
75
|
-
// );
|
|
76
|
-
// });
|
|
77
|
-
// }
|
|
78
|
-
// async copyEditorBasev3(
|
|
79
|
-
// company: string,
|
|
80
|
-
// project: string,
|
|
81
|
-
// type: 'app' | 'server',
|
|
82
|
-
// path: string = 'lilaquadrat/base/editorBase',
|
|
83
|
-
// ) {
|
|
84
|
-
// let files: string[];
|
|
85
|
-
// let assets: string[];
|
|
86
|
-
// const targetFolder: string = `${company}/${project}/editor`;
|
|
87
|
-
// logger.info(`projects.create.${company}.${project}.files.copy`);
|
|
88
|
-
// if (type === 'server') {
|
|
89
|
-
// logger.info(`projects.create.v3.${company}.${project}.files.copy.server`);
|
|
90
|
-
// await this.shareClient.copy(['index.server.html', 'index.mail.html', 'server-entry.js', 'ssr-manifest.json'], `${path}/server`, targetFolder);
|
|
91
|
-
// }
|
|
92
|
-
// if (type === 'app') {
|
|
93
|
-
// assets = await this.shareClient.list(`${path}/app`, /(.(js|css|woff|png|map|webmanifest))$/i);
|
|
94
|
-
// logger.info(`projects.create.v3.${company}.${project}.files.copy.app.${assets.length}`);
|
|
95
|
-
// await this.shareClient.copy(assets, `${path}/app`, targetFolder);
|
|
96
|
-
// logger.info(`projects.create.v3.${company}.${project}.files.copy.index`);
|
|
97
|
-
// await this.shareClient.copy(['index.html'], `${path}/app`, targetFolder);
|
|
98
|
-
// }
|
|
99
|
-
// return true;
|
|
100
|
-
// }
|
|
101
|
-
// single(company: string, project: string, type: 'app' | 'server') {
|
|
102
|
-
// return this.model.db.findOne({ company, project, type });
|
|
103
|
-
// }
|
|
104
|
-
// /**
|
|
105
|
-
// * updates/adds new entry at editorBase to make update process possible
|
|
106
|
-
// */
|
|
107
|
-
// upsertType(company: string, project: string, type: 'app' | 'server', version: string, custom: boolean, user: string, app: string) {
|
|
108
|
-
// return this.immutableUpsert(
|
|
109
|
-
// { company, project, type },
|
|
110
|
-
// {
|
|
111
|
-
// company,
|
|
112
|
-
// project,
|
|
113
|
-
// type,
|
|
114
|
-
// date: new Date(),
|
|
115
|
-
// custom,
|
|
116
|
-
// version,
|
|
117
|
-
// },
|
|
118
|
-
// user,
|
|
119
|
-
// 'change',
|
|
120
|
-
// app,
|
|
121
|
-
// );
|
|
122
|
-
// }
|
|
123
|
-
// async updateFiles(file: Buffer, type: 'app' | 'server', version: string, options: { company: string, project: string, user: string, app: string, isBase?: boolean }) {
|
|
124
|
-
// let targetFolder: string = 'editor';
|
|
125
|
-
// let cleanFolder: string = 'editor';
|
|
126
|
-
// if (options.isBase) {
|
|
127
|
-
// if (type === 'app') {
|
|
128
|
-
// targetFolder = 'editorBase/app';
|
|
129
|
-
// cleanFolder = 'editorBase/app';
|
|
130
|
-
// }
|
|
131
|
-
// if (type === 'server') {
|
|
132
|
-
// targetFolder = 'editorBase/server';
|
|
133
|
-
// cleanFolder = 'editorBase/server';
|
|
134
|
-
// }
|
|
135
|
-
// } else {
|
|
136
|
-
// if (version === '3') {
|
|
137
|
-
// targetFolder = 'editor';
|
|
138
|
-
// } else {
|
|
139
|
-
// targetFolder = 'editor';
|
|
140
|
-
// cleanFolder = 'editor';
|
|
141
|
-
// }
|
|
142
|
-
// }
|
|
143
|
-
// if (type === 'app') await HandleFileService.clean(options.company, options.project, cleanFolder);
|
|
144
|
-
// return HandleFileService.add(options.company, options.project, file, targetFolder)
|
|
145
|
-
// .then(() => this.upsertType(options.company, options.project, type, version, !options.isBase, options.user, options.app));
|
|
146
|
-
// }
|
|
147
|
-
// syncFiles(company: string, project: string, user: string, app: string, isBase = false) {
|
|
148
|
-
// return this.syncFilesType(company, project, 'app', user, app, isBase)
|
|
149
|
-
// .then(() => this.syncFilesType(company, project, 'server', user, app, isBase));
|
|
150
|
-
// }
|
|
151
|
-
// async syncFilesType(
|
|
152
|
-
// company: string,
|
|
153
|
-
// project: string,
|
|
154
|
-
// type: 'app' | 'server',
|
|
155
|
-
// user: string,
|
|
156
|
-
// app: string,
|
|
157
|
-
// isBase = false,
|
|
158
|
-
// reset?: boolean,
|
|
159
|
-
// ) {
|
|
160
|
-
// /**
|
|
161
|
-
// if its not a reset to the standard renderer, we need to check if that the target is NOT a custom renderer
|
|
162
|
-
// */
|
|
163
|
-
// if (!reset) {
|
|
164
|
-
// const target = await this.single(company, project, type);
|
|
165
|
-
// if (target?.custom) throw new Error('CANT_SYNC_CUSTOM_RENDERER');
|
|
166
|
-
// }
|
|
167
|
-
// const base = await this.single('lilaquadrat', 'base', type);
|
|
168
|
-
// if (!base) throw new Error('BASE_NOT_FOUND');
|
|
169
|
-
// if (type === 'app') await HandleFileService.clean(company, project, isBase ? 'editorBase' : 'editor');
|
|
170
|
-
// return this.copyBase(company, project, type, 'lilaquadrat/base/editorBase', user, app)
|
|
171
|
-
// .then(() => this.upsertType(company, project, type, base.version, false, user, app));
|
|
172
|
-
// }
|
|
173
|
-
// async updateAvailable(company: string, project: string, type: 'app' | 'server') {
|
|
174
|
-
// const companyBase = await this.model.db.findOne({ company, project, type });
|
|
175
|
-
// const systemBase = await this.model.db.findOne({ company: 'lilaquadrat', project: 'base', type });
|
|
176
|
-
// if (!systemBase) return false;
|
|
177
|
-
// if (!companyBase) return true;
|
|
178
|
-
// // if the used base is a customized, dont show an available update
|
|
179
|
-
// if (companyBase.custom) return false;
|
|
180
|
-
// if (companyBase.date < systemBase.date) return true;
|
|
181
|
-
// return false;
|
|
182
|
-
// }
|
|
183
|
-
// }
|
|
184
|
-
// export default new EditorBaseService();
|
|
185
|
-
//# sourceMappingURL=editorBase.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editorBase.service.js","sourceRoot":"","sources":["../../../src/services/editorBase.service.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,qDAAqD;AACrD,8DAA8D;AAC9D,yDAAyD;AACzD,qGAAqG;AAErG,0DAA0D;AAE1D,6BAA6B;AAE7B,8CAA8C;AAE9C,8CAA8C;AAC9C,2DAA2D;AAC3D,UAAU;AACV,4DAA4D;AAC5D,8DAA8D;AAC9D,8DAA8D;AAC9D,kCAAkC;AAClC,WAAW;AACX,SAAS;AAET,0BAA0B;AAE1B,MAAM;AAEN,QAAQ;AACR,kDAAkD;AAClD,OAAO;AACP,+BAA+B;AAC/B,gCAAgC;AAChC,gBAAgB;AAChB,8BAA8B;AAC9B,QAAQ;AACR,mDAAmD;AAEnD,oCAAoC;AAEpC,UAAU;AACV,sDAAsD;AACtD,YAAY;AACZ,yBAAyB;AACzB,wCAAwC;AACxC,iFAAiF;AACjF,kFAAkF;AAElF,MAAM;AAEN,oDAAoD;AACpD,oBAAoB;AACpB,uBAAuB;AACvB,uBAAuB;AACvB,8BAA8B;AAC9B,oDAAoD;AACpD,oBAAoB;AACp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