@silexlabs/silex 3.0.0-alpha.25 → 3.0.0-alpha.26

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.
@@ -89,7 +89,7 @@ var silex;(()=>{var t={357:function(t){var e;"undefined"!=typeof globalThis?glob
89
89
  ><span>${e.text}</span></div>
90
90
  `))}
91
91
  </header>
92
- `,r),document.body.appendChild(r),t.on("load",(()=>{n.view.el.appendChild(r)}))),t.Commands.add(e.command,{run(){e.link&&window.open(e.link),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")}()}))},te=document.createElement("div");let ee;const ne="open-settings";let re="v3";const oe=f.plugins.add("settings-dialog",((t,e)=>{try{re="3.0.0-alpha.25"}catch(t){}console.log("Silex version:",re),t.Commands.add(ne,{run:(e,n,{page:r})=>{ee=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{t.stopCommand(ne)})),function(t,e,n=t.getModel()){const r=n.get("settings")||{};n.set("settings",r),Ct(it`
92
+ `,r),document.body.appendChild(r),t.on("load",(()=>{n.view.el.appendChild(r)}))),t.Commands.add(e.command,{run(){e.link&&window.open(e.link),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")}()}))},te=document.createElement("div");let ee;const ne="open-settings";let re="v3";const oe=f.plugins.add("settings-dialog",((t,e)=>{try{re="3.0.0-alpha.26"}catch(t){}console.log("Silex version:",re),t.Commands.add(ne,{run:(e,n,{page:r})=>{ee=t.Modal.open({title:r?"Page settings":"Site Settings",content:"",attributes:{class:"settings-dialog"}}).onceClose((()=>{t.stopCommand(ne)})),function(t,e,n=t.getModel()){const r=n.get("settings")||{};n.set("settings",r),Ct(it`
93
93
  <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>
94
94
  <form class="silex-form">
95
95
  <h2>General settings</h2>
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const cli_1 = require("cli");
5
+ const options = (0, cli_1.parse)({
6
+ config: ['c', 'Path for the server side config file to load at startup', 'file'],
7
+ port: ['p', 'Port to listen to', 'int'],
8
+ 'ssl-port': [false, 'Port to listen to for SSL/HTTPS', 'int'],
9
+ 'force-https': [false, 'Force HTTPS', 'true'],
10
+ 'ssl-private-key': [false, 'Path to private key for SSL', 'file'],
11
+ 'ssl-certificate': [false, 'Path to SSL certificate', 'file'],
12
+ 'force-https-trust-xfp-header': [false, 'Sets the trustXFPHeader param of the express module "cookie-session". Use only with --force-https', 'true'],
13
+ 'session-secret': ['s', 'Session secret', 'string'],
14
+ }, {});
15
+ if (options.config)
16
+ process.env.CONFIG = options.config;
17
+ if (options.port)
18
+ process.env.PORT = options.port;
19
+ if (options['ssl-port'])
20
+ process.env.SSL_PORT = options['ssl-port'];
21
+ if (options['force-https'])
22
+ process.env.SILEX_FORCE_HTTPS = options['force-https'];
23
+ if (options['ssl-private-key'])
24
+ process.env.SILEX_SSL_PRIVATE_KEY = options['ssl-private-key'];
25
+ if (options['ssl-certificate'])
26
+ process.env.SILEX_SSL_CERTIFICATE = options['ssl-certificate'];
27
+ if (options['force-https-trust-xfp-header'])
28
+ process.env.SILEX_FORCE_HTTPS_TRUST_XFP_HEADER = options['force-https-trust-xfp-header'];
29
+ if (options['session-secret'])
30
+ process.env.SILEX_SESSION_SECRET = options['session-secret'];
31
+ require("./index");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@silexlabs/silex",
3
3
  "description": "Free and easy website builder for everyone.",
4
- "version": "3.0.0-alpha.25",
4
+ "version": "3.0.0-alpha.26",
5
5
  "version:backwardcompat": "3.0.0",
6
6
  "author": {
7
7
  "name": "Alex Hoyau",