diff --git a/public/assets/favicon.ico b/public/assets/favicon.ico new file mode 100644 index 000000000..f6c95f426 Binary files /dev/null and b/public/assets/favicon.ico differ diff --git a/src/ts/client/publication-transformers.ts b/src/ts/client/publication-transformers.ts index c7102bdfb..90ebdc134 100644 --- a/src/ts/client/publication-transformers.ts +++ b/src/ts/client/publication-transformers.ts @@ -68,13 +68,13 @@ export const publicationTransformerDefault: PublicationTransformer = { // Define files URLs transformPermalink(link: string, type: ClientSideFileType, initiator: Initiator): string { switch(initiator) { - case Initiator.HTML: - return link - case Initiator.CSS: - // In case of a link from a CSS file, we need to go up one level - return `../${link.replace(/^\//, '')}` - default: - throw new Error(`Unknown initiator ${initiator}`) + case Initiator.HTML: + return link + case Initiator.CSS: + // In case of a link from a CSS file, we need to go up one level + return `../${link.replace(/^\//, '')}` + default: + throw new Error(`Unknown initiator ${initiator}`) } }, // Define how files are named diff --git a/src/ts/constants.ts b/src/ts/constants.ts index 7632bd27f..b0fb8d261 100644 --- a/src/ts/constants.ts +++ b/src/ts/constants.ts @@ -45,6 +45,7 @@ export const API_WEBSITE_READ = '/' export const API_WEBSITE_WRITE = '/' export const API_WEBSITE_CREATE = '/' export const API_WEBSITE_DELETE = '/' +export const API_WEBSITE_DUPLICATE = '/duplicate' export const API_WEBSITE_LIST = '/' export const API_WEBSITE_ASSET_READ = '/assets' export const API_WEBSITE_ASSETS_WRITE = '/assets' diff --git a/src/ts/plugins/server/FtpConnector.ts b/src/ts/plugins/server/FtpConnector.ts index 2694a0cce..29eb3d232 100644 --- a/src/ts/plugins/server/FtpConnector.ts +++ b/src/ts/plugins/server/FtpConnector.ts @@ -23,9 +23,10 @@ import { WEBSITE_DATA_FILE, WEBSITE_META_DATA_FILE } from '../../constants' import { ConnectorType, ConnectorUser, WebsiteMeta, FileMeta, JobData, JobStatus, WebsiteId, PublicationJobData, WebsiteMetaFileContent, defaultWebsiteData, WebsiteData, ConnectorOptions } from '../../types' import { ServerConfig } from '../../server/config' import { join } from 'path' -import { type } from 'os' +import { tmpdir } from 'os' import { v4 as uuid } from 'uuid' import { JobManager } from '../../server/jobs' +import { mkdtemp } from 'fs/promises' /** * @fileoverview FTP connector for Silex @@ -338,7 +339,6 @@ export default class FtpConnector implements StorageConnector { async getLoginForm(session: FtpSession, redirectTo: string): Promise { const { host, user, pass, port, secure, publicationPath, storageRootPath, websiteUrl } = this.sessionData(session) - requiredParam(type, 'connector type') return `