@silexlabs/silex 3.0.0-alpha.39 → 3.0.0-alpha.41
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/.silex.js +38 -8
- package/dist/client/client/config.d.ts +11 -41
- package/dist/client/client/grapesjs/LoginDialog.d.ts +13 -0
- package/dist/client/client/grapesjs/PublicationManager.d.ts +69 -0
- package/dist/client/client/grapesjs/PublicationUi.d.ts +58 -0
- package/dist/client/client/grapesjs/index.d.ts +18 -44
- package/dist/client/client/grapesjs/storage.d.ts +1 -0
- package/dist/client/client/services.d.ts +35 -0
- package/dist/client/constants.d.ts +17 -0
- package/dist/client/css/admin.css +86 -3
- package/dist/client/js/main.js +201 -90
- package/dist/client/js/main.js.LICENSE.txt +6 -0
- package/dist/client/types.d.ts +200 -29
- package/dist/constants.d.ts +21 -0
- package/dist/constants.js +38 -1
- package/dist/constants.js.map +1 -0
- package/dist/events.d.ts +2 -0
- package/dist/events.js +17 -0
- package/dist/events.js.map +1 -0
- package/dist/plugins/AuthPlugin.d.ts +1 -0
- package/dist/plugins/AuthPlugin.js +38 -0
- package/dist/plugins/AuthPlugin.js.map +1 -0
- package/dist/plugins/Cache.d.ts +2 -0
- package/dist/plugins/Cache.js +32 -0
- package/dist/plugins/Cache.js.map +1 -0
- package/dist/plugins/FtpBackend.d.ts +92 -0
- package/dist/plugins/FtpBackend.js +604 -0
- package/dist/plugins/FtpBackend.js.map +1 -0
- package/dist/plugins/HooksPlugin.d.ts +7 -0
- package/dist/plugins/HooksPlugin.js +76 -0
- package/dist/plugins/HooksPlugin.js.map +1 -0
- package/dist/plugins/PublicationPlugin.d.ts +17 -0
- package/dist/plugins/PublicationPlugin.js +170 -0
- package/dist/plugins/PublicationPlugin.js.map +1 -0
- package/dist/plugins/SslPlugin.d.ts +1 -0
- package/dist/plugins/SslPlugin.js +86 -0
- package/dist/plugins/SslPlugin.js.map +1 -0
- package/dist/plugins/StaticPlugin.d.ts +1 -0
- package/dist/plugins/StaticPlugin.js +66 -0
- package/dist/plugins/StaticPlugin.js.map +1 -0
- package/dist/plugins/WebsitePlugin.d.ts +14 -0
- package/dist/plugins/WebsitePlugin.js +302 -0
- package/dist/plugins/WebsitePlugin.js.map +1 -0
- package/dist/server/backends/FsBackend.d.ts +42 -0
- package/dist/server/backends/FsBackend.js +269 -0
- package/dist/server/backends/FsBackend.js.map +1 -0
- package/dist/server/backends/index.d.ts +95 -0
- package/dist/server/backends/index.js +255 -0
- package/dist/server/backends/index.js.map +1 -0
- package/dist/server/cli.js +0 -1
- package/dist/server/config.d.ts +58 -0
- package/dist/server/config.js +128 -24
- package/dist/server/config.js.map +1 -0
- package/dist/server/express.js +31 -3
- package/dist/server/index.js +9 -20
- package/dist/server/jobs.d.ts +6 -0
- package/dist/server/jobs.js +75 -0
- package/dist/server/jobs.js.map +1 -0
- package/dist/server/utils/validation.d.ts +7 -0
- package/dist/server/utils/validation.js +37 -0
- package/dist/server/utils/validation.js.map +1 -0
- package/dist/types.d.ts +270 -0
- package/dist/types.js +35 -28
- package/dist/types.js.map +1 -0
- package/package.json +19 -8
- package/public/silex.js +17 -0
- package/src/css/dialog.scss +9 -2
- package/src/css/grapesjs.scss +79 -0
- package/src/css/project-bar.scss +2 -2
- package/src/example-client-config.js +17 -0
- package/src/html/templates/includes.pug +0 -1
- package/src/ts/client/config.ts +7 -6
- package/src/ts/client/grapesjs/LoginDialog.ts +190 -0
- package/src/ts/client/grapesjs/PublicationManager.ts +333 -0
- package/src/ts/client/grapesjs/PublicationUi.ts +320 -0
- package/src/ts/client/grapesjs/index.ts +88 -85
- package/src/ts/client/grapesjs/storage.ts +110 -0
- package/src/ts/client/index.ts +5 -7
- package/src/ts/client/services.ts +129 -0
- package/src/ts/constants.ts +21 -0
- package/src/ts/plugins/AuthPlugin.ts +38 -0
- package/src/ts/plugins/Cache.ts +28 -0
- package/src/ts/plugins/FtpBackend.ts +689 -0
- package/src/ts/plugins/HooksPlugin.ts +79 -0
- package/src/ts/plugins/PublicationPlugin.ts +170 -0
- package/src/{plugins/SslPlugin.js → ts/plugins/SslPlugin.ts} +24 -6
- package/src/ts/plugins/StaticPlugin.ts +68 -0
- package/src/ts/plugins/WebsitePlugin.ts +318 -0
- package/src/ts/server/backends/FsBackend.ts +266 -0
- package/src/ts/server/backends/index.ts +309 -0
- package/src/ts/server/cli.ts +0 -2
- package/src/ts/server/config.ts +103 -33
- package/src/ts/server/express.ts +37 -3
- package/src/ts/server/index.ts +24 -14
- package/src/ts/server/jobs.test.ts +74 -0
- package/src/ts/server/jobs.ts +77 -0
- package/src/ts/server/utils/validation.ts +33 -0
- package/src/ts/types.ts +167 -59
- package/dist/client/client/grapesjs/publish.d.ts +0 -18
- package/dist/page.js +0 -15
- package/src/plugins/AuthPlugin.js +0 -21
- package/src/plugins/Cache.js +0 -11
- package/src/plugins/DefaultBackend.js +0 -149
- package/src/plugins/ExpressPlugin.js +0 -39
- package/src/plugins/HooksPlugin.js +0 -58
- package/src/plugins/PublishPlugin.js +0 -69
- package/src/plugins/StaticPlugin.js +0 -48
- package/src/plugins/WebsitePlugin.js +0 -207
- package/src/ts/client/grapesjs/publish.ts +0 -403
- /package/.silex/default/{.silex.data.json → website.json} +0 -0
|
@@ -0,0 +1,604 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Silex website builder, free/libre no-code tool for makers.
|
|
4
|
+
* Copyright (c) 2023 lexoyo and Silex Labs foundation
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU Affero General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or any later version.
|
|
9
|
+
*
|
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
* GNU Affero General Public License for more details.
|
|
14
|
+
*
|
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
|
16
|
+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
|
+
*/
|
|
18
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
19
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
20
|
+
};
|
|
21
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22
|
+
const jsftp_1 = __importDefault(require("jsftp"));
|
|
23
|
+
const stream_1 = require("stream");
|
|
24
|
+
const express_1 = __importDefault(require("express"));
|
|
25
|
+
const backends_1 = require("../server/backends");
|
|
26
|
+
const validation_1 = require("../server/utils/validation");
|
|
27
|
+
const constants_1 = require("../constants");
|
|
28
|
+
const types_1 = require("../types");
|
|
29
|
+
const events_1 = require("../events");
|
|
30
|
+
const jobs_1 = require("../server/jobs");
|
|
31
|
+
const path_1 = require("path");
|
|
32
|
+
// **
|
|
33
|
+
// Utils methos
|
|
34
|
+
function updateStatus(filesStatuses, status, statusCbk) {
|
|
35
|
+
statusCbk && statusCbk({
|
|
36
|
+
message: `Writing files:<ul><li>${filesStatuses.map(({ file, message }) => `${file.path}: ${message}`).join('</li><li>')}</li></ul>`,
|
|
37
|
+
status,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function initStatus(files) {
|
|
41
|
+
return files.map(file => ({
|
|
42
|
+
file,
|
|
43
|
+
message: 'Waiting',
|
|
44
|
+
status: types_1.JobStatus.IN_PROGRESS,
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
function handleInitError(err) {
|
|
48
|
+
if (err.code !== 550) {
|
|
49
|
+
console.error('Error creating folder', err);
|
|
50
|
+
throw err;
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
console.log('Folder already exists', err.message);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function formHtml(type, { host, user, pass, port, secure, storageRootPath, publicationPath, websiteUrl }, err = '') {
|
|
57
|
+
return `
|
|
58
|
+
${err && `<div class="error">${err || ''}</div>`}
|
|
59
|
+
<form method="post">
|
|
60
|
+
<label for="host">Host</label>
|
|
61
|
+
<input placeholder="ftp.example.com" type="text" name="host" value="${host || ''}" />
|
|
62
|
+
<label for="user">User</label>
|
|
63
|
+
<input placeholder="user" type="text" name="user" value="${user || ''}" />
|
|
64
|
+
<label for="pass">Pass</label>
|
|
65
|
+
<input placeholder="****" type="password" name="pass" value="${pass || ''}" />
|
|
66
|
+
<label for="port">Port</label>
|
|
67
|
+
<input placeholder="21" type="number" name="port" value="${port || '21'}" />
|
|
68
|
+
<div class="checkbox-container">
|
|
69
|
+
<input class="checkbox" type="checkbox" name="secure" value="true" ${secure ? 'checked' : ''} />
|
|
70
|
+
<label for="secure">Secure</label>
|
|
71
|
+
</div>
|
|
72
|
+
${type === types_1.BackendType.STORAGE ? `
|
|
73
|
+
<details>
|
|
74
|
+
<summary>Storage options</summary>
|
|
75
|
+
<p>If you are not sure, don't change this</p>
|
|
76
|
+
<label for="storageRootPath">Root path where to store the website files</label>
|
|
77
|
+
<input placeholder="/silex/" type="text" name="storageRootPath" value="${storageRootPath || '/silex/'}" />
|
|
78
|
+
</details>
|
|
79
|
+
` : ''}
|
|
80
|
+
${type === types_1.BackendType.HOSTING ? `
|
|
81
|
+
<fieldset>
|
|
82
|
+
<legend>Publication options</legend>
|
|
83
|
+
<label for="publicationPath">Path where to publish</label>
|
|
84
|
+
<input placeholder="/public_html/" type="text" name="publicationPath" value="${publicationPath || ''}" />
|
|
85
|
+
<label for="websiteUrl">URL where to the site will be accessible</label>
|
|
86
|
+
<input placeholder="https://mysite.com/" type="text" name="websiteUrl" value="${websiteUrl || ''}" />
|
|
87
|
+
</fieldset>
|
|
88
|
+
` : ''}
|
|
89
|
+
<div class="button-container">
|
|
90
|
+
<button type="submit" class="primary-button">Login</button>
|
|
91
|
+
<button type="button" class="secondary-button">Cancel</button>
|
|
92
|
+
</div>
|
|
93
|
+
</form>
|
|
94
|
+
`;
|
|
95
|
+
}
|
|
96
|
+
const formCss = `
|
|
97
|
+
/* Reset default form styles */
|
|
98
|
+
form {
|
|
99
|
+
margin: 0;
|
|
100
|
+
padding: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Center the form */
|
|
104
|
+
body {
|
|
105
|
+
display: flex;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
align-items: center;
|
|
108
|
+
height: 100vh;
|
|
109
|
+
background-color: #f5f5f5;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* Style form container */
|
|
113
|
+
form {
|
|
114
|
+
width: 400px;
|
|
115
|
+
padding: 20px;
|
|
116
|
+
border-radius: 4px;
|
|
117
|
+
background-color: white;
|
|
118
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Style form labels */
|
|
122
|
+
label {
|
|
123
|
+
font-weight: bold;
|
|
124
|
+
margin-bottom: 5px;
|
|
125
|
+
color: #333;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* Style form inputs */
|
|
129
|
+
input {
|
|
130
|
+
width: 100%;
|
|
131
|
+
padding: 8px;
|
|
132
|
+
margin-bottom: 10px;
|
|
133
|
+
border: 1px solid #ccc;
|
|
134
|
+
border-radius: 4px;
|
|
135
|
+
}
|
|
136
|
+
input.checkbox {
|
|
137
|
+
width: 20px;
|
|
138
|
+
height: 20px;
|
|
139
|
+
}
|
|
140
|
+
fieldset {
|
|
141
|
+
padding: 20px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* Style form buttons */
|
|
145
|
+
.button-container {
|
|
146
|
+
display: flex;
|
|
147
|
+
justify-content: space-between;
|
|
148
|
+
margin-top: 20px;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.primary-button,
|
|
152
|
+
.secondary-button {
|
|
153
|
+
width: 48%;
|
|
154
|
+
padding: 10px;
|
|
155
|
+
border: none;
|
|
156
|
+
border-radius: 4px;
|
|
157
|
+
cursor: pointer;
|
|
158
|
+
transition: background-color 0.3s ease;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.primary-button {
|
|
162
|
+
background-color: #4caf50;
|
|
163
|
+
color: white;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.secondary-button {
|
|
167
|
+
background-color: #e0e0e0;
|
|
168
|
+
color: #333;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.primary-button:hover,
|
|
172
|
+
.secondary-button:hover {
|
|
173
|
+
background-color: #388e3c;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/* Style form checkbox */
|
|
177
|
+
.checkbox-container {
|
|
178
|
+
display: flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
margin-bottom: 10px;
|
|
181
|
+
margin: 20px 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.checkbox-container label {
|
|
185
|
+
margin-left: 5px;
|
|
186
|
+
color: #333;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* Style details and summary elements */
|
|
190
|
+
details {
|
|
191
|
+
margin-top: 20px;
|
|
192
|
+
color: #333;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
summary {
|
|
196
|
+
font-weight: bold;
|
|
197
|
+
cursor: pointer;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
details > p {
|
|
201
|
+
margin-top: 10px;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
`;
|
|
205
|
+
/**
|
|
206
|
+
* @class FtpBackend
|
|
207
|
+
* @implements {HostingProvider}
|
|
208
|
+
* @implements {StorageProvider}
|
|
209
|
+
*/
|
|
210
|
+
class FtpBackend {
|
|
211
|
+
id = 'ftp';
|
|
212
|
+
displayName = 'Ftp';
|
|
213
|
+
icon = 'ftp';
|
|
214
|
+
options;
|
|
215
|
+
type;
|
|
216
|
+
constructor(config, opts) {
|
|
217
|
+
this.options = {
|
|
218
|
+
rootPath: '',
|
|
219
|
+
authorizeUrl: '/api/authorize/ftp/',
|
|
220
|
+
authorizePath: '/api/authorize/ftp/',
|
|
221
|
+
...opts,
|
|
222
|
+
};
|
|
223
|
+
this.type = this.options.type;
|
|
224
|
+
config.on(events_1.EVENT_STARTUP_START, ({ app }) => {
|
|
225
|
+
const router = express_1.default.Router();
|
|
226
|
+
app.use(router);
|
|
227
|
+
router.post(this.options.authorizePath, express_1.default.urlencoded(), async (req, res, next) => {
|
|
228
|
+
if (req.query.type !== this.options.type) {
|
|
229
|
+
next();
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
try {
|
|
233
|
+
const session = req['session'];
|
|
234
|
+
req['session'] = {
|
|
235
|
+
...session,
|
|
236
|
+
...await this.authorize(session, req.body),
|
|
237
|
+
};
|
|
238
|
+
res.redirect(`/${constants_1.API_BACKEND_LOGIN_CALLBACK}?backendId=${encodeURIComponent(this.id)}&type=${encodeURIComponent(this.type)}`);
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
console.error('FTP auth failed', err);
|
|
242
|
+
res
|
|
243
|
+
.status(403)
|
|
244
|
+
.redirect(`/${constants_1.API_BACKEND_LOGIN_CALLBACK}?error=${encodeURIComponent(err.message)}&type=${encodeURIComponent(this.type)}`);
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
router.get(this.options.authorizePath, async (req, res, next) => {
|
|
248
|
+
if (req.query.type !== this.options.type) {
|
|
249
|
+
next();
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
const session = req['session'];
|
|
253
|
+
// Check if the user is already logged in
|
|
254
|
+
const { host, user, pass, port, secure } = this.sessionData(session);
|
|
255
|
+
if (host && user && pass && port && secure) {
|
|
256
|
+
try {
|
|
257
|
+
await this.checkAuth({ host, user, pass, port, secure });
|
|
258
|
+
res.redirect(constants_1.API_BACKEND_LOGIN_CALLBACK + '?backendId=' + encodeURIComponent(this.id));
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
catch (err) {
|
|
262
|
+
// TODO: check if the error is a 401
|
|
263
|
+
console.log('User not logged in yet, let\'s display the login form', err.message);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
// If not, display the login form
|
|
267
|
+
res.send(await this.authorizeForm(session, req.query));
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
sessionData(session) {
|
|
272
|
+
return session[this.options.type] ?? {};
|
|
273
|
+
}
|
|
274
|
+
storageRootPath(session) {
|
|
275
|
+
return this.type === types_1.BackendType.STORAGE ? (0, validation_1.requiredParam)(this.sessionData(session).storageRootPath, 'storage root path') : (0, validation_1.requiredParam)(this.sessionData(session).publicationPath, 'publication path');
|
|
276
|
+
}
|
|
277
|
+
// **
|
|
278
|
+
// Ftp specific methods
|
|
279
|
+
async checkAuth({ host, user, pass, port, secure }) {
|
|
280
|
+
const ftp = await this.getClient({ host, user, pass, port, secure });
|
|
281
|
+
}
|
|
282
|
+
async authorizeForm(session, query) {
|
|
283
|
+
const { host, user, pass, port, secure, publicationPath, storageRootPath, websiteUrl } = this.sessionData(session);
|
|
284
|
+
const { error, type } = query;
|
|
285
|
+
(0, validation_1.requiredParam)(type, 'backend type');
|
|
286
|
+
return `
|
|
287
|
+
<html>
|
|
288
|
+
<head>
|
|
289
|
+
<title>FTP auth</title>
|
|
290
|
+
<style>
|
|
291
|
+
${formCss}
|
|
292
|
+
</style>
|
|
293
|
+
</head>
|
|
294
|
+
<body>
|
|
295
|
+
${formHtml((0, backends_1.toBackendEnum)(type), { host, user, pass, port, secure, publicationPath, storageRootPath, websiteUrl }, error)}
|
|
296
|
+
</body>
|
|
297
|
+
</html>
|
|
298
|
+
`;
|
|
299
|
+
}
|
|
300
|
+
async getClient({ host, user, pass, port, secure }) {
|
|
301
|
+
return new Promise((resolve, reject) => {
|
|
302
|
+
const ftp = new jsftp_1.default({
|
|
303
|
+
host,
|
|
304
|
+
port,
|
|
305
|
+
user,
|
|
306
|
+
pass,
|
|
307
|
+
});
|
|
308
|
+
ftp['on']('close', (err) => {
|
|
309
|
+
console.error('FTP CONNEXION close', err);
|
|
310
|
+
});
|
|
311
|
+
ftp['on']('error', (err) => {
|
|
312
|
+
console.error('FTP CONNEXION error', err);
|
|
313
|
+
reject(err);
|
|
314
|
+
});
|
|
315
|
+
ftp['on']('connect', () => {
|
|
316
|
+
ftp.auth(user, pass, (err) => {
|
|
317
|
+
if (err) {
|
|
318
|
+
console.error('FTP AUTH error', err);
|
|
319
|
+
reject(err);
|
|
320
|
+
}
|
|
321
|
+
else {
|
|
322
|
+
resolve(ftp);
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
// **
|
|
329
|
+
// Backend interface
|
|
330
|
+
// **
|
|
331
|
+
async authorize(session, body) {
|
|
332
|
+
const { host, user, pass, port, secure = false, publicationPath, storageRootPath, websiteUrl } = body;
|
|
333
|
+
(0, validation_1.requiredParam)(session, 'session');
|
|
334
|
+
(0, validation_1.requiredParam)(host, 'host');
|
|
335
|
+
(0, validation_1.requiredParam)(user, 'user');
|
|
336
|
+
(0, validation_1.requiredParam)(pass, 'pass');
|
|
337
|
+
(0, validation_1.requiredParam)(port, 'port');
|
|
338
|
+
await this.checkAuth({ host, user, pass, port, secure });
|
|
339
|
+
return {
|
|
340
|
+
[this.options.type]: { host, user, pass, port, secure, publicationPath, storageRootPath, websiteUrl },
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
async getUserData(session) {
|
|
344
|
+
return {
|
|
345
|
+
name: this.sessionData(session).user,
|
|
346
|
+
picture: this.icon,
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
async getSiteMeta(session, id) {
|
|
350
|
+
try {
|
|
351
|
+
const websiteId = (0, validation_1.requiredParam)(id, 'website id');
|
|
352
|
+
const files = await this.listDir(session, websiteId, '/');
|
|
353
|
+
const file = files.find(f => f.name === constants_1.WEBSITE_DATA_FILE_NAME);
|
|
354
|
+
if (!file) {
|
|
355
|
+
const storageRootPath = this.storageRootPath(session);
|
|
356
|
+
const dirPath = (0, path_1.join)(this.options.rootPath, storageRootPath, websiteId, '/');
|
|
357
|
+
console.error('Website data file not found', { websiteId, WEBSITE_DATA_FILE_NAME: constants_1.WEBSITE_DATA_FILE_NAME, dirPath, storageRootPath }, this.options);
|
|
358
|
+
throw new Error(`Website data file not found: ${constants_1.WEBSITE_DATA_FILE_NAME} in ${dirPath}`);
|
|
359
|
+
}
|
|
360
|
+
return {
|
|
361
|
+
websiteId,
|
|
362
|
+
//url: await this.getFileUrl(session, websiteId, WEBSITE_DATA_FILE_NAME),
|
|
363
|
+
createdAt: file.createdAt,
|
|
364
|
+
updatedAt: file.updatedAt,
|
|
365
|
+
metadata: file.metadata,
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
catch (err) {
|
|
369
|
+
console.error(err);
|
|
370
|
+
throw err;
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
async isLoggedIn(session) {
|
|
374
|
+
try {
|
|
375
|
+
if (!session[this.options.type]) {
|
|
376
|
+
return false;
|
|
377
|
+
}
|
|
378
|
+
//await this.checkAuth(this.sessionData(session))
|
|
379
|
+
}
|
|
380
|
+
catch (err) {
|
|
381
|
+
return false;
|
|
382
|
+
}
|
|
383
|
+
return true;
|
|
384
|
+
}
|
|
385
|
+
async getAuthorizeURL(session) {
|
|
386
|
+
return `${this.options.authorizeUrl}?type=${this.type}`;
|
|
387
|
+
}
|
|
388
|
+
//async login(session: FtpSession, userData): Promise<void> {
|
|
389
|
+
// await this.checkAuth(userData)
|
|
390
|
+
// session[this.options.sessionKey] = userData
|
|
391
|
+
// console.log('login success', userData, this.sessionData(session))
|
|
392
|
+
//}
|
|
393
|
+
async logout(session) {
|
|
394
|
+
delete session[this.options.type];
|
|
395
|
+
}
|
|
396
|
+
async getAdminUrl(session, id) {
|
|
397
|
+
return null;
|
|
398
|
+
}
|
|
399
|
+
// **
|
|
400
|
+
// Storage interface
|
|
401
|
+
/**
|
|
402
|
+
* Create necessary folders
|
|
403
|
+
* Assets and root folders
|
|
404
|
+
*/
|
|
405
|
+
async init(session, id) {
|
|
406
|
+
// create root folder
|
|
407
|
+
const ftp = await this.getClient(this.sessionData(session));
|
|
408
|
+
try {
|
|
409
|
+
await this.createDir(session, id, '/');
|
|
410
|
+
}
|
|
411
|
+
catch (err) {
|
|
412
|
+
handleInitError(err);
|
|
413
|
+
}
|
|
414
|
+
try {
|
|
415
|
+
await this.createDir(session, id, '/assets');
|
|
416
|
+
}
|
|
417
|
+
catch (err) {
|
|
418
|
+
handleInitError(err);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
async readFile(session, id, path) {
|
|
422
|
+
return new Promise((resolve, reject) => {
|
|
423
|
+
if (!this.sessionData(session))
|
|
424
|
+
throw new Error('Not logged in');
|
|
425
|
+
const storageRootPath = this.storageRootPath(session);
|
|
426
|
+
this.getClient(this.sessionData(session))
|
|
427
|
+
.then(ftp => {
|
|
428
|
+
const dirPath = (0, path_1.join)(this.options.rootPath, storageRootPath, id, path);
|
|
429
|
+
ftp.get(dirPath, (err, socket) => {
|
|
430
|
+
if (err) {
|
|
431
|
+
return reject(err);
|
|
432
|
+
}
|
|
433
|
+
resolve({
|
|
434
|
+
path,
|
|
435
|
+
content: stream_1.Readable.from(socket),
|
|
436
|
+
});
|
|
437
|
+
socket.resume();
|
|
438
|
+
});
|
|
439
|
+
})
|
|
440
|
+
.catch(err => {
|
|
441
|
+
console.error(`Error reading file ${path}: ${err.message}`);
|
|
442
|
+
reject(err);
|
|
443
|
+
});
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
async writeFiles(session, id, files, statusCbk) {
|
|
447
|
+
statusCbk && statusCbk({
|
|
448
|
+
message: 'Connecting to FTP server',
|
|
449
|
+
status: types_1.JobStatus.IN_PROGRESS,
|
|
450
|
+
});
|
|
451
|
+
const ftp = await this.getClient(this.sessionData(session));
|
|
452
|
+
const filesStatuses = initStatus(files);
|
|
453
|
+
const storageRootPath = this.storageRootPath(session);
|
|
454
|
+
return Promise.all(filesStatuses.map((fileStatus) => {
|
|
455
|
+
const { file } = fileStatus;
|
|
456
|
+
return new Promise((resolve, reject) => {
|
|
457
|
+
fileStatus.message = 'Upload started';
|
|
458
|
+
updateStatus(filesStatuses, types_1.JobStatus.IN_PROGRESS, statusCbk);
|
|
459
|
+
const content = typeof file.content === 'string' ? Buffer.from(file.content) : file.content;
|
|
460
|
+
const dstPath = (0, path_1.join)(this.options.rootPath, storageRootPath, id, file.path);
|
|
461
|
+
ftp.put(content, dstPath, (err) => {
|
|
462
|
+
if (err) {
|
|
463
|
+
const errMsg = `Error writing file ${dstPath}: ${err.message}`;
|
|
464
|
+
console.error(errMsg);
|
|
465
|
+
//fileStatus.message = `Error ${err.message}`
|
|
466
|
+
//updateStatus(filesStatuses, JobStatus.ERROR, statusCbk)
|
|
467
|
+
statusCbk && statusCbk({
|
|
468
|
+
message: errMsg,
|
|
469
|
+
status: types_1.JobStatus.ERROR,
|
|
470
|
+
});
|
|
471
|
+
return reject(new Error(errMsg));
|
|
472
|
+
}
|
|
473
|
+
fileStatus.message = 'Upload complete';
|
|
474
|
+
updateStatus(filesStatuses, types_1.JobStatus.IN_PROGRESS, statusCbk);
|
|
475
|
+
resolve(dstPath);
|
|
476
|
+
});
|
|
477
|
+
});
|
|
478
|
+
}))
|
|
479
|
+
.catch((err) => {
|
|
480
|
+
// Not sure why it never gets here
|
|
481
|
+
console.error(err);
|
|
482
|
+
statusCbk && statusCbk({
|
|
483
|
+
message: err.message,
|
|
484
|
+
status: types_1.JobStatus.ERROR,
|
|
485
|
+
});
|
|
486
|
+
return [];
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
async deleteFiles(session, id, paths) {
|
|
490
|
+
const storageRootPath = this.storageRootPath(session);
|
|
491
|
+
const ftp = await this.getClient(this.sessionData(session));
|
|
492
|
+
await Promise.all(paths.map((path) => new Promise((resolve, reject) => {
|
|
493
|
+
const dstPath = (0, path_1.join)(this.options.rootPath, storageRootPath, id, path);
|
|
494
|
+
ftp.raw('dele', dstPath, (err) => {
|
|
495
|
+
if (err) {
|
|
496
|
+
console.error(`Error deleting file ${dstPath}: ${err.message}`);
|
|
497
|
+
return reject(err);
|
|
498
|
+
}
|
|
499
|
+
resolve();
|
|
500
|
+
});
|
|
501
|
+
})));
|
|
502
|
+
}
|
|
503
|
+
async listWebsites(session) {
|
|
504
|
+
const storageRootPath = this.storageRootPath(session);
|
|
505
|
+
const ftp = await this.getClient(this.sessionData(session));
|
|
506
|
+
return new Promise((resolve, reject) => {
|
|
507
|
+
ftp.ls((0, path_1.join)(this.options.rootPath, storageRootPath), (err, res) => {
|
|
508
|
+
if (err) {
|
|
509
|
+
console.error(`Error listing websites: ${err.message}`);
|
|
510
|
+
return reject(err);
|
|
511
|
+
}
|
|
512
|
+
resolve(res.map((file) => ({
|
|
513
|
+
websiteId: file.name,
|
|
514
|
+
createdAt: new Date(file.time),
|
|
515
|
+
updatedAt: new Date(file.time),
|
|
516
|
+
metadata: {
|
|
517
|
+
...file,
|
|
518
|
+
},
|
|
519
|
+
})));
|
|
520
|
+
});
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
async listDir(session, id, path) {
|
|
524
|
+
const ftp = await this.getClient(this.sessionData(session));
|
|
525
|
+
const storageRootPath = this.storageRootPath(session);
|
|
526
|
+
return new Promise((resolve, reject) => {
|
|
527
|
+
const dstPath = (0, path_1.join)(this.options.rootPath, storageRootPath, id, path);
|
|
528
|
+
ftp.ls(dstPath, (err, res) => {
|
|
529
|
+
if (err) {
|
|
530
|
+
console.error(`Error listing folder ${dstPath}: ${err.message}`);
|
|
531
|
+
return reject(err);
|
|
532
|
+
}
|
|
533
|
+
resolve(res.map((file) => ({
|
|
534
|
+
name: file.name,
|
|
535
|
+
isDir: file.type === 1,
|
|
536
|
+
size: file.size,
|
|
537
|
+
createdAt: new Date(file.time),
|
|
538
|
+
updatedAt: new Date(file.time),
|
|
539
|
+
metaData: {
|
|
540
|
+
size: file.size,
|
|
541
|
+
},
|
|
542
|
+
})));
|
|
543
|
+
});
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
async createDir(session, id, path) {
|
|
547
|
+
const storageRootPath = this.storageRootPath(session);
|
|
548
|
+
const ftp = await this.getClient(this.sessionData(session));
|
|
549
|
+
return new Promise((resolve, reject) => {
|
|
550
|
+
const dirPath = (0, path_1.join)(this.options.rootPath, storageRootPath, id, path);
|
|
551
|
+
ftp.raw('mkd', dirPath, (err) => {
|
|
552
|
+
if (err) {
|
|
553
|
+
console.error(`Error creating folder ${dirPath}: ${err.message}`);
|
|
554
|
+
return reject(err);
|
|
555
|
+
}
|
|
556
|
+
resolve();
|
|
557
|
+
});
|
|
558
|
+
});
|
|
559
|
+
}
|
|
560
|
+
async deleteDir(session, id, path) {
|
|
561
|
+
const storageRootPath = this.storageRootPath(session);
|
|
562
|
+
const ftp = await this.getClient(this.sessionData(session));
|
|
563
|
+
return new Promise((resolve, reject) => {
|
|
564
|
+
const dirPath = (0, path_1.join)(this.options.rootPath, storageRootPath, id, path);
|
|
565
|
+
ftp.raw('rmd', dirPath, (err) => {
|
|
566
|
+
if (err) {
|
|
567
|
+
console.error(`Error deleting folder ${dirPath}: ${err.message}`);
|
|
568
|
+
return reject(err);
|
|
569
|
+
}
|
|
570
|
+
resolve();
|
|
571
|
+
});
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
// **
|
|
575
|
+
// Hosting interface
|
|
576
|
+
async getWebsiteUrl(session, id) {
|
|
577
|
+
// FIXME: do not store websiteUrl in the session, but in the website data
|
|
578
|
+
console.warn('FIXME: do not store websiteUrl in the session, but in the website data');
|
|
579
|
+
return this.sessionData(session).websiteUrl ?? '';
|
|
580
|
+
}
|
|
581
|
+
async publish(session, id, backendData, files) {
|
|
582
|
+
const job = (0, jobs_1.startJob)(`Publishing to ${this.displayName}`);
|
|
583
|
+
job.logs = [[`Publishing to ${this.displayName}`]];
|
|
584
|
+
job.errors = [[]];
|
|
585
|
+
this.writeFiles(session, '', files, async ({ status, message }) => {
|
|
586
|
+
// Update the job status
|
|
587
|
+
job.status = status;
|
|
588
|
+
job.message = message;
|
|
589
|
+
job.logs[0].push(message);
|
|
590
|
+
// Add the website url
|
|
591
|
+
job.url = await this.getWebsiteUrl(session, id);
|
|
592
|
+
if (status === types_1.JobStatus.SUCCESS) {
|
|
593
|
+
(0, jobs_1.jobSuccess)(job.jobId, message);
|
|
594
|
+
}
|
|
595
|
+
else if (status === types_1.JobStatus.ERROR) {
|
|
596
|
+
job.errors[0].push(message);
|
|
597
|
+
(0, jobs_1.jobError)(job.jobId, message);
|
|
598
|
+
}
|
|
599
|
+
});
|
|
600
|
+
return job;
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
exports.default = FtpBackend;
|
|
604
|
+
//# sourceMappingURL=FtpBackend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FtpBackend.js","sourceRoot":"","sources":["../../src/ts/plugins/FtpBackend.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;;;AAEH,kDAAyB;AACzB,mCAAiC;AACjC,sDAA8C;AAC9C,iDAAyG;AACzG,2DAA0D;AAC1D,4CAAiF;AACjF,oCAA0I;AAC1I,sCAA+C;AAC/C,yCAA+D;AAE/D,+BAA2B;AAkD3B,KAAK;AACL,eAAe;AACf,SAAS,YAAY,CAAC,aAA2B,EAAE,MAAiB,EAAE,SAAiF;IACrJ,SAAS,IAAI,SAAS,CAAC;QACrB,OAAO,EAAE,yBAAyB,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY;QACpI,MAAM;KACP,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,KAAK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