@silexlabs/silex 3.0.0-alpha.78 → 3.0.0-alpha.79
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/dist/client/js/main.js +1 -1
- package/dist/plugins/server/server/connectors/FsHosting.d.ts +0 -1
- package/dist/plugins/server/server/connectors/FsHosting.js +2 -2
- package/dist/plugins/server/server/connectors/FsHosting.js.map +1 -1
- package/dist/server/server/connectors/FsHosting.js +1 -2
- package/package.json +1 -1
- package/src/ts/server/connectors/FsHosting.ts +2 -2
- package/src/ts/server/connectors/FsStorage.ts +0 -1
package/dist/client/js/main.js
CHANGED
|
@@ -97,7 +97,7 @@ var silex;(()=>{var t={357:function(t){var e;"undefined"!=typeof globalThis?glob
|
|
|
97
97
|
><span>${e.text}</span></div>
|
|
98
98
|
`))}
|
|
99
99
|
</header>
|
|
100
|
-
`,r),document.body.appendChild(r),t.on("load",(()=>{n.view.el.appendChild(r)}))),"string"==typeof e.command&&t.Commands.add(e.command,{run(){e.attributes.containerClassName&&(n.set("visible",!0),r.classList.remove("gjs-hidden"),t.Canvas.getFrameEl().classList.add("silex-squeeze-left"))},stop(){e.attributes.containerClassName&&(n.set("visible",!1),r.classList.add("gjs-hidden"),t.Canvas.getFrameEl().classList.remove("silex-squeeze-left"))}})})),t.on("load device:select page",(()=>{!function(){const e=n.view.el,r=t.Canvas.getFrameEl();r.classList.remove("enable-squeeze"),setTimeout((()=>{const t=r.getClientRects()[0]?.left,n=e.getClientRects()[0]?.right;t<n||!n?r.classList.add("enable-squeeze"):r.classList.remove("enable-squeeze")}),400),n.get("visible")?r.classList.add("silex-squeeze-left"):r.classList.remove("silex-squeeze-left")}()}))},In=document.createElement("div");let Dn;const $n="open-settings";let Rn="v3";const Hn=nt.plugins.add("settings-dialog",((t,e)=>{try{Rn="3.0.0-alpha.
|
|
100
|
+
`,r),document.body.appendChild(r),t.on("load",(()=>{n.view.el.appendChild(r)}))),"string"==typeof e.command&&t.Commands.add(e.command,{run(){e.attributes.containerClassName&&(n.set("visible",!0),r.classList.remove("gjs-hidden"),t.Canvas.getFrameEl().classList.add("silex-squeeze-left"))},stop(){e.attributes.containerClassName&&(n.set("visible",!1),r.classList.add("gjs-hidden"),t.Canvas.getFrameEl().classList.remove("silex-squeeze-left"))}})})),t.on("load device:select page",(()=>{!function(){const e=n.view.el,r=t.Canvas.getFrameEl();r.classList.remove("enable-squeeze"),setTimeout((()=>{const t=r.getClientRects()[0]?.left,n=e.getClientRects()[0]?.right;t<n||!n?r.classList.add("enable-squeeze"):r.classList.remove("enable-squeeze")}),400),n.get("visible")?r.classList.add("silex-squeeze-left"):r.classList.remove("silex-squeeze-left")}()}))},In=document.createElement("div");let Dn;const $n="open-settings";let Rn="v3";const Hn=nt.plugins.add("settings-dialog",((t,e)=>{try{Rn="3.0.0-alpha.79"}catch(t){}console.info("Silex version:",Rn),t.Commands.add($n,{run:(e,n,{page:r})=>{Dn=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{n.set("active",0),t.stopCommand($n)})),function(t,e,n=t.getModel()){const r=n.get("settings")||{};n.set("settings",r),we(ne`
|
|
101
101
|
<p>The page settings will override site settings, <a href="https://github.com/silexlabs/Silex/wiki/Settings" target="_blank">more info about settings here</a>.</p>
|
|
102
102
|
<form class="silex-form">
|
|
103
103
|
<h2>General settings</h2>
|
|
@@ -6,7 +6,6 @@ type FsSession = ConnectorSession;
|
|
|
6
6
|
export declare class FsHosting extends FsStorage implements HostingConnector<FsSession> {
|
|
7
7
|
connectorId: string;
|
|
8
8
|
displayName: string;
|
|
9
|
-
icon: string;
|
|
10
9
|
connectorType: ConnectorType;
|
|
11
10
|
publish(session: FsSession, id: WebsiteId, files: ConnectorFile[], { startJob, jobSuccess, jobError }: JobManager): Promise<JobData>;
|
|
12
11
|
getUrl(session: FsSession, id: WebsiteId): Promise<string>;
|
|
@@ -23,13 +23,13 @@ const types_1 = require("../../types");
|
|
|
23
23
|
class FsHosting extends FsStorage_1.FsStorage {
|
|
24
24
|
connectorId = 'fs-hosting';
|
|
25
25
|
displayName = 'File system hosting';
|
|
26
|
-
icon = 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%202L6%2022%2018%2022%2018%207%2012%202%206%202Z%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M18%202L12%202%2012%208%2018%208%2018%202Z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E';
|
|
27
26
|
connectorType = types_1.ConnectorType.HOSTING;
|
|
28
27
|
async publish(session, id, files, { startJob, jobSuccess, jobError }) {
|
|
29
28
|
const job = startJob(`Publishing to ${this.displayName}`);
|
|
30
29
|
job.logs = [[`Publishing to ${this.displayName}`]];
|
|
31
30
|
job.errors = [[]];
|
|
32
|
-
|
|
31
|
+
// Call write without id or folder so that it goes in / (path will be modified by publication transformers)
|
|
32
|
+
this.write(session, '', files, '', async ({ status, message }) => {
|
|
33
33
|
// Update the job status
|
|
34
34
|
job.status = status;
|
|
35
35
|
job.message = message;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FsHosting.js","sourceRoot":"","sources":["../../../../../src/ts/server/connectors/FsHosting.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;;;AAGH,+BAA2B;AAC3B,2CAAuC;AACvC,uCAA8F;AAS9F,MAAa,SAAU,SAAQ,qBAAS;IACtC,WAAW,GAAG,YAAY,CAAA;IAC1B,WAAW,GAAG,qBAAqB,CAAA;IACnC,
|
|
1
|
+
{"version":3,"file":"FsHosting.js","sourceRoot":"","sources":["../../../../../src/ts/server/connectors/FsHosting.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;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Z,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAkB,EAAE,EAAa;QAC5C,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,CAAC,CAAA;QAC1D,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAA;QAC5C,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAA;IAC3B,CAAC;CACF;AA9BD,8BA8BC"}
|
|
@@ -7,13 +7,12 @@ const types_1 = require("../../types");
|
|
|
7
7
|
class FsHosting extends FsStorage_1.FsStorage {
|
|
8
8
|
connectorId = 'fs-hosting';
|
|
9
9
|
displayName = 'File system hosting';
|
|
10
|
-
icon = 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%202L6%2022%2018%2022%2018%207%2012%202%206%202Z%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M18%202L12%202%2012%208%2018%208%2018%202Z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E';
|
|
11
10
|
connectorType = types_1.ConnectorType.HOSTING;
|
|
12
11
|
async publish(session, id, files, { startJob, jobSuccess, jobError }) {
|
|
13
12
|
const job = startJob(`Publishing to ${this.displayName}`);
|
|
14
13
|
job.logs = [[`Publishing to ${this.displayName}`]];
|
|
15
14
|
job.errors = [[]];
|
|
16
|
-
this.write(session,
|
|
15
|
+
this.write(session, '', files, '', async ({ status, message }) => {
|
|
17
16
|
job.status = status;
|
|
18
17
|
job.message = message;
|
|
19
18
|
job.logs[0].push(message);
|
package/package.json
CHANGED
|
@@ -30,14 +30,14 @@ interface FsOptions {
|
|
|
30
30
|
export class FsHosting extends FsStorage implements HostingConnector<FsSession> {
|
|
31
31
|
connectorId = 'fs-hosting'
|
|
32
32
|
displayName = 'File system hosting'
|
|
33
|
-
icon = 'data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%202L6%2022%2018%2022%2018%207%2012%202%206%202Z%22%3E%3C%2Fpath%3E%3Cpath%20d%3D%22M18%202L12%202%2012%208%2018%208%2018%202Z%22%3E%3C%2Fpath%3E%3C%2Fsvg%3E'
|
|
34
33
|
connectorType = ConnectorType.HOSTING
|
|
35
34
|
|
|
36
35
|
async publish(session: FsSession, id: WebsiteId, files: ConnectorFile[], {startJob, jobSuccess, jobError}: JobManager): Promise<JobData> {
|
|
37
36
|
const job = startJob(`Publishing to ${this.displayName}`) as PublicationJobData
|
|
38
37
|
job.logs = [[`Publishing to ${this.displayName}`]]
|
|
39
38
|
job.errors = [[]]
|
|
40
|
-
|
|
39
|
+
// Call write without id or folder so that it goes in / (path will be modified by publication transformers)
|
|
40
|
+
this.write(session, '', files, '', async ({status, message}) => {
|
|
41
41
|
// Update the job status
|
|
42
42
|
job.status = status
|
|
43
43
|
job.message = message
|