@silexlabs/silex 3.0.1-alpha.0 → 3.0.1
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/.env.default +20 -0
- package/.silex.js +67 -8
- package/LICENSE +661 -203
- package/README.md +37 -35
- package/dist/client/client/api.d.ts +90 -0
- package/dist/client/client/assetUrl.d.ts +54 -0
- package/dist/client/client/config.d.ts +102 -0
- package/dist/client/client/events.d.ts +23 -0
- package/dist/client/client/expose.d.ts +8 -0
- package/dist/client/client/grapesjs/LoginDialog.d.ts +15 -0
- package/dist/client/client/grapesjs/PublicationManager.d.ts +73 -0
- package/dist/client/client/grapesjs/PublicationUi.d.ts +59 -0
- package/dist/client/client/grapesjs/blocks.d.ts +1 -0
- package/dist/client/client/grapesjs/breadcrumbs.d.ts +1 -0
- package/dist/client/client/grapesjs/css-props.d.ts +6 -0
- package/dist/client/client/grapesjs/footer.d.ts +2 -0
- package/dist/client/client/grapesjs/img.d.ts +6 -0
- package/dist/client/client/grapesjs/index.d.ts +9 -0
- package/dist/client/client/grapesjs/internal-links.d.ts +1 -0
- package/dist/client/client/grapesjs/keymaps.d.ts +123 -0
- package/dist/client/client/grapesjs/new-page-dialog.d.ts +2 -0
- package/dist/client/client/grapesjs/openImport.d.ts +9 -0
- package/dist/client/client/grapesjs/page-panel.d.ts +9 -0
- package/dist/client/client/grapesjs/project-bar.d.ts +21 -0
- package/dist/client/client/grapesjs/resize-panel.d.ts +1 -0
- package/dist/client/client/grapesjs/rich-text.d.ts +4 -0
- package/dist/client/client/grapesjs/semantic.d.ts +1 -0
- package/dist/client/client/grapesjs/settings-sections.d.ts +16 -0
- package/dist/client/client/grapesjs/settings.d.ts +4 -0
- package/dist/client/client/grapesjs/storage.d.ts +2 -0
- package/dist/client/client/grapesjs/symbolDialogs.d.ts +3 -0
- package/dist/client/client/grapesjs/view-buttons.d.ts +1 -0
- package/dist/client/client/index.d.ts +10 -0
- package/dist/client/client/publication-transformers.d.ts +42 -0
- package/dist/client/client/publish-custom-code-block.d.ts +4 -0
- package/dist/client/client/publish-fonts.d.ts +4 -0
- package/dist/client/client/utils.d.ts +22 -0
- package/dist/client/constants.d.ts +32 -0
- package/dist/client/css/admin.css +1114 -328
- package/dist/client/css/admin.css.map +1 -0
- package/dist/client/grapesjs-filter-styles/dist/index.d.ts +4 -0
- package/dist/client/grapesjs-fonts/dist/index.d.ts +4 -0
- package/dist/client/grapesjs-fonts/src/commands.d.ts +3 -0
- package/dist/client/grapesjs-fonts/src/fonts.d.ts +4 -0
- package/dist/client/grapesjs-storage-rate-limit/dist/index.d.ts +4 -0
- package/dist/client/grapesjs-ui-suggest-classes/dist/index.d.ts +4 -0
- package/dist/client/index.html +3 -2
- package/dist/client/js/main.js +356 -131
- package/dist/client/js/main.js.LICENSE.txt +15 -1
- package/dist/client/page.d.ts +2 -0
- package/dist/client/silex-lib/src/ts/client/api.d.ts +90 -0
- package/dist/client/silex-lib/src/ts/client/assetUrl.d.ts +54 -0
- package/dist/client/silex-lib/src/ts/client/config.d.ts +102 -0
- package/dist/client/silex-lib/src/ts/client/events.d.ts +23 -0
- package/dist/client/silex-lib/src/ts/client/expose.d.ts +8 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/LoginDialog.d.ts +15 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/PublicationManager.d.ts +73 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/PublicationUi.d.ts +59 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/blocks.d.ts +1 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/breadcrumbs.d.ts +1 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/css-props.d.ts +6 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/footer.d.ts +2 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/img.d.ts +6 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/index.d.ts +9 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/internal-links.d.ts +1 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/keymaps.d.ts +123 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/new-page-dialog.d.ts +2 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/openImport.d.ts +9 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/page-panel.d.ts +9 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/project-bar.d.ts +21 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/resize-panel.d.ts +1 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/rich-text.d.ts +4 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/semantic.d.ts +1 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/settings-sections.d.ts +16 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/settings.d.ts +4 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/storage.d.ts +2 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/symbolDialogs.d.ts +3 -0
- package/dist/client/silex-lib/src/ts/client/grapesjs/view-buttons.d.ts +1 -0
- package/dist/client/silex-lib/src/ts/client/index.d.ts +10 -0
- package/dist/client/silex-lib/src/ts/client/publication-transformers.d.ts +42 -0
- package/dist/client/silex-lib/src/ts/client/publish-custom-code-block.d.ts +4 -0
- package/dist/client/silex-lib/src/ts/client/publish-fonts.d.ts +4 -0
- package/dist/client/silex-lib/src/ts/client/utils.d.ts +22 -0
- package/dist/client/silex-lib/src/ts/constants.d.ts +32 -0
- package/dist/client/silex-lib/src/ts/page.d.ts +2 -0
- package/dist/client/silex-lib/src/ts/types.d.ts +339 -0
- package/dist/client/types.d.ts +339 -0
- package/dist/plugins/client/client/events.d.ts +23 -0
- package/dist/plugins/client/client/events.js +43 -0
- package/dist/plugins/client/client/events.js.map +1 -0
- package/dist/plugins/client/plugins/client/template.d.ts +2 -0
- package/dist/plugins/client/plugins/client/template.js +234 -0
- package/dist/plugins/client/plugins/client/template.js.map +1 -0
- package/dist/plugins/client/plugins/client/website-info.d.ts +1 -0
- package/dist/plugins/client/plugins/client/website-info.js +72 -0
- package/dist/plugins/client/plugins/client/website-info.js.map +1 -0
- package/dist/plugins/client/types.d.ts +339 -0
- package/dist/plugins/client/types.js +80 -0
- package/dist/plugins/client/types.js.map +1 -0
- package/dist/plugins/server/constants.d.ts +32 -0
- package/dist/plugins/server/constants.js +76 -0
- package/dist/plugins/server/constants.js.map +1 -0
- package/dist/plugins/server/plugins/server/Cache.d.ts +2 -0
- package/dist/plugins/server/plugins/server/Cache.js +36 -0
- package/dist/plugins/server/plugins/server/Cache.js.map +1 -0
- package/dist/plugins/server/plugins/server/DownloadConnector.d.ts +29 -0
- package/dist/plugins/server/plugins/server/DownloadConnector.js +127 -0
- package/dist/plugins/server/plugins/server/DownloadConnector.js.map +1 -0
- package/dist/plugins/server/plugins/server/FtpConnector.d.ts +86 -0
- package/dist/plugins/server/plugins/server/FtpConnector.js +536 -0
- package/dist/plugins/server/plugins/server/FtpConnector.js.map +1 -0
- package/dist/plugins/server/plugins/server/GitlabConnector.d.ts +135 -0
- package/dist/plugins/server/plugins/server/GitlabConnector.js +649 -0
- package/dist/plugins/server/plugins/server/GitlabConnector.js.map +1 -0
- package/dist/plugins/server/plugins/server/GitlabHostingConnector.d.ts +16 -0
- package/dist/plugins/server/plugins/server/GitlabHostingConnector.js +209 -0
- package/dist/plugins/server/plugins/server/GitlabHostingConnector.js.map +1 -0
- package/dist/plugins/server/plugins/server/PublicationOptimizer.d.ts +0 -0
- package/dist/plugins/server/plugins/server/PublicationOptimizer.js +14 -0
- package/dist/plugins/server/plugins/server/PublicationOptimizer.js.map +1 -0
- package/dist/plugins/server/plugins/server/SslPlugin.d.ts +1 -0
- package/dist/plugins/server/plugins/server/SslPlugin.js +86 -0
- package/dist/plugins/server/plugins/server/SslPlugin.js.map +1 -0
- package/dist/plugins/server/plugins/server/StaticPlugin.d.ts +8 -0
- package/dist/plugins/server/plugins/server/StaticPlugin.js +45 -0
- package/dist/plugins/server/plugins/server/StaticPlugin.js.map +1 -0
- package/dist/plugins/server/server/config.d.ts +59 -0
- package/dist/plugins/server/server/config.js +181 -0
- package/dist/plugins/server/server/config.js.map +1 -0
- package/dist/plugins/server/server/connectors/FsHosting.d.ts +14 -0
- package/dist/plugins/server/server/connectors/FsHosting.js +66 -0
- package/dist/plugins/server/server/connectors/FsHosting.js.map +1 -0
- package/dist/plugins/server/server/connectors/FsStorage.d.ts +44 -0
- package/dist/plugins/server/server/connectors/FsStorage.js +261 -0
- package/dist/plugins/server/server/connectors/FsStorage.js.map +1 -0
- package/dist/plugins/server/server/connectors/connectors.d.ts +86 -0
- package/dist/plugins/server/server/connectors/connectors.js +126 -0
- package/dist/plugins/server/server/connectors/connectors.js.map +1 -0
- package/dist/plugins/server/server/events.d.ts +26 -0
- package/dist/plugins/server/server/events.js +31 -0
- package/dist/plugins/server/server/events.js.map +1 -0
- package/dist/plugins/server/server/jobs.d.ts +12 -0
- package/dist/plugins/server/server/jobs.js +79 -0
- package/dist/plugins/server/server/jobs.js.map +1 -0
- package/dist/plugins/server/server/utils/validation.d.ts +7 -0
- package/dist/plugins/server/server/utils/validation.js +37 -0
- package/dist/plugins/server/server/utils/validation.js.map +1 -0
- package/dist/plugins/server/types.d.ts +339 -0
- package/dist/plugins/server/types.js +84 -0
- package/dist/plugins/server/types.js.map +1 -0
- package/dist/server/constants.js +55 -0
- package/dist/server/plugins/server/Cache.js +19 -0
- package/dist/server/server/api/api.js +20 -0
- package/dist/server/server/api/connectorApi.js +334 -0
- package/dist/server/server/api/publicationApi.js +106 -0
- package/dist/server/server/api/websiteApi.js +315 -0
- package/dist/server/server/cli.js +71 -0
- package/dist/server/server/config.js +120 -0
- package/dist/server/server/connectors/FsHosting.js +47 -0
- package/dist/server/server/connectors/FsStorage.js +228 -0
- package/dist/server/server/connectors/connectors.js +88 -0
- package/dist/server/server/events.js +14 -0
- package/dist/server/server/expose.js +27 -0
- package/dist/server/server/express.js +46 -0
- package/dist/server/server/index.js +94 -0
- package/dist/server/server/jobs.js +50 -0
- package/dist/server/server/utils/validation.js +14 -0
- package/dist/server/types.js +40 -0
- package/package.json +99 -49
- package/public/assets/download.png +0 -0
- package/public/assets/favicon.ico +0 -0
- package/public/assets/favicon.png +0 -0
- package/public/assets/ftp.png +0 -0
- package/public/assets/gitlab.png +0 -0
- package/public/assets/gitlab2.png +0 -0
- package/public/assets/laptop.png +0 -0
- package/public/assets/logo-silex-small.png +0 -0
- package/public/silex.js +22 -23
- package/src/css/_variables.scss +24 -20
- package/src/css/dialog.scss +35 -2
- package/src/css/fonts.scss +31 -0
- package/src/css/footer.scss +12 -0
- package/src/css/grapesjs-light.scss +180 -0
- package/src/css/grapesjs-plugins.scss +227 -0
- package/src/css/grapesjs.scss +159 -1
- package/src/css/index.scss +12 -1
- package/src/css/light.scss +7 -0
- package/src/css/loader.scss +2 -0
- package/src/css/project-bar.scss +32 -16
- package/src/css/silex.scss +79 -5
- package/src/css/website-info.scss +14 -0
- package/src/html/index.pug +3 -3
- package/src/html/templates/includes.pug +0 -1
- package/src/ts/client/api.ts +156 -0
- package/src/ts/client/assetUrl.test.ts +164 -0
- package/src/ts/client/assetUrl.ts +254 -0
- package/src/ts/client/config.ts +175 -13
- package/src/ts/client/events.ts +43 -0
- package/src/ts/client/expose.ts +27 -1
- package/src/ts/client/grapesjs/LoginDialog.ts +204 -0
- package/src/ts/client/grapesjs/PublicationManager.ts +433 -0
- package/src/ts/client/grapesjs/PublicationUi.ts +366 -0
- package/src/ts/client/grapesjs/blocks.ts +17 -0
- package/src/ts/client/grapesjs/breadcrumbs.ts +79 -0
- package/src/ts/client/grapesjs/css-props.ts +910 -0
- package/src/ts/client/grapesjs/eleventy.ts +30 -7
- package/src/ts/client/grapesjs/footer.ts +42 -0
- package/src/ts/client/grapesjs/img.ts +147 -0
- package/src/ts/client/grapesjs/index.ts +311 -122
- package/src/ts/client/grapesjs/internal-links.test.ts +19 -1
- package/src/ts/client/grapesjs/internal-links.ts +31 -7
- package/src/ts/client/grapesjs/keymaps.ts +207 -0
- package/src/ts/client/grapesjs/new-page-dialog.ts +19 -3
- package/src/ts/client/grapesjs/openImport.ts +22 -0
- package/src/ts/client/grapesjs/page-panel.ts +109 -7
- package/src/ts/client/grapesjs/project-bar.ts +133 -72
- package/src/ts/client/grapesjs/resize-panel.ts +20 -0
- package/src/ts/client/grapesjs/rich-text.ts +38 -13
- package/src/ts/client/grapesjs/semantic.ts +20 -3
- package/src/ts/client/grapesjs/settings-sections.ts +117 -0
- package/src/ts/client/grapesjs/settings.ts +191 -96
- package/src/ts/client/grapesjs/storage.ts +187 -0
- package/src/ts/client/grapesjs/symbolDialogs.ts +21 -5
- package/src/ts/client/grapesjs/view-buttons.ts +42 -0
- package/src/ts/client/index.ts +80 -21
- package/src/ts/client/publication-transformers.test.ts +207 -0
- package/src/ts/client/publication-transformers.ts +280 -0
- package/src/ts/client/publish-custom-code-block.ts +31 -0
- package/src/ts/client/publish-fonts.ts +36 -0
- package/src/ts/client/utils.ts +70 -1
- package/src/ts/constants.ts +78 -0
- package/src/ts/externs.ts +17 -0
- package/src/ts/page.ts +20 -3
- package/src/ts/plugins/client/template.ts +246 -0
- package/src/ts/plugins/client/website-info.ts +84 -0
- package/src/ts/plugins/server/Cache.ts +32 -0
- package/src/ts/plugins/server/DownloadConnector.ts +146 -0
- package/src/ts/plugins/server/FtpConnector.test.ts +82 -0
- package/src/ts/plugins/server/FtpConnector.ts +621 -0
- package/src/ts/plugins/server/GitlabConnector.ts +749 -0
- package/src/ts/plugins/server/GitlabHostingConnector.ts +215 -0
- package/src/ts/plugins/server/PublicationOptimizer.ts +14 -0
- package/src/ts/plugins/server/SslPlugin.ts +84 -0
- package/src/ts/plugins/server/StaticPlugin.ts +45 -0
- package/src/ts/server/api/api.ts +19 -0
- package/src/ts/server/api/connectorApi.ts +464 -0
- package/src/ts/server/api/publicationApi.ts +159 -0
- package/src/ts/server/api/websiteApi.ts +462 -0
- package/src/ts/server/cli.ts +48 -14
- package/src/ts/server/config.ts +158 -60
- package/src/ts/server/connectors/FsHosting.ts +66 -0
- package/src/ts/server/connectors/FsStorage.test.ts +51 -0
- package/src/ts/server/connectors/FsStorage.ts +290 -0
- package/src/ts/server/connectors/connectors.ts +203 -0
- package/src/ts/server/events.ts +37 -0
- package/src/ts/server/expose.ts +19 -0
- package/src/ts/server/express.ts +57 -5
- package/src/ts/server/index.ts +79 -16
- package/src/ts/server/jobs.test.ts +75 -0
- package/src/ts/server/jobs.ts +89 -0
- package/src/ts/server/utils/BackwardCompat.ts +546 -528
- package/src/ts/server/utils/validation.ts +34 -0
- package/src/ts/types.ts +295 -85
- package/.dockerignore +0 -5
- package/.editorconfig +0 -14
- package/.eslintrc.json +0 -43
- package/.github/FUNDING.yml +0 -13
- package/.github/workflows/docker-hub-publish.yml +0 -36
- package/.github/workflows/npm-publish.yml +0 -19
- package/.github/workflows/test.yml +0 -26
- package/.nvmrc +0 -1
- package/.silex/default/.silex.data.json +0 -1
- package/CODE_OF_CONDUCT.md +0 -128
- package/CONTRIBUTING.md +0 -131
- package/Dockerfile +0 -15
- package/directus.silex.js +0 -7
- package/dist/constants.js +0 -4
- package/dist/events.js +0 -5
- package/dist/page.js +0 -15
- package/dist/server/cli.js +0 -43
- package/dist/server/config.js +0 -70
- package/dist/server/express.js +0 -18
- package/dist/server/index.js +0 -58
- package/dist/types.js +0 -34
- package/jest.config.js +0 -10
- package/logos/logo_by_ceubri/silex-icon-2018@200px.png +0 -0
- package/logos/logo_by_ceubri/silex-icon-2018@4x.png +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018-white-transp.pdf +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018-white.jpg +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018-white.pdf +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018-white.png +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018-white@0.5x.png +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018-white@0.75x.png +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018-white@4x.jpg +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018-white@4x.png +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018.ai +5 -2521
- package/logos/logo_by_ceubri/silex-logo-2018.jpg +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018.pdf +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018.png +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018@0.5x.png +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018@0.75x.png +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018@4x.jpg +0 -0
- package/logos/logo_by_ceubri/silex-logo-2018@4x.png +0 -0
- package/logos/silexlabs.png +0 -0
- package/src/example-client-config.js +0 -47
- 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/SslPlugin.js +0 -66
- package/src/plugins/StaticPlugin.js +0 -48
- package/src/plugins/WebsitePlugin.js +0 -207
- package/src/ts/client/grapesjs/publish.ts +0 -386
- package/src/ts/client/grapesjs/template.ts +0 -166
- package/src/ts/events.ts +0 -2
- package/tsconfig-server-debug.json +0 -19
- package/tsconfig-server-release.json +0 -19
- package/tsconfig.jest.json +0 -9
- package/tsconfig.json +0 -26
- package/webpack.config.js +0 -28
- package/webpack.debug.config.js +0 -8
package/CODE_OF_CONDUCT.md
DELETED
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
|
2
|
-
|
|
3
|
-
## Our Pledge
|
|
4
|
-
|
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
-
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
-
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
-
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
-
nationality, personal appearance, race, religion, or sexual identity
|
|
10
|
-
and orientation.
|
|
11
|
-
|
|
12
|
-
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
-
diverse, inclusive, and healthy community.
|
|
14
|
-
|
|
15
|
-
## Our Standards
|
|
16
|
-
|
|
17
|
-
Examples of behavior that contributes to a positive environment for our
|
|
18
|
-
community include:
|
|
19
|
-
|
|
20
|
-
* Demonstrating empathy and kindness toward other people
|
|
21
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
-
* Giving and gracefully accepting constructive feedback
|
|
23
|
-
* Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
-
and learning from the experience
|
|
25
|
-
* Focusing on what is best not just for us as individuals, but for the
|
|
26
|
-
overall community
|
|
27
|
-
|
|
28
|
-
Examples of unacceptable behavior include:
|
|
29
|
-
|
|
30
|
-
* The use of sexualized language or imagery, and sexual attention or
|
|
31
|
-
advances of any kind
|
|
32
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
-
* Public or private harassment
|
|
34
|
-
* Publishing others' private information, such as a physical or email
|
|
35
|
-
address, without their explicit permission
|
|
36
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
-
professional setting
|
|
38
|
-
|
|
39
|
-
## Enforcement Responsibilities
|
|
40
|
-
|
|
41
|
-
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
-
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
-
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
-
or harmful.
|
|
45
|
-
|
|
46
|
-
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
-
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
-
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
-
decisions when appropriate.
|
|
50
|
-
|
|
51
|
-
## Scope
|
|
52
|
-
|
|
53
|
-
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
-
an individual is officially representing the community in public spaces.
|
|
55
|
-
Examples of representing our community include using an official e-mail address,
|
|
56
|
-
posting via an official social media account, or acting as an appointed
|
|
57
|
-
representative at an online or offline event.
|
|
58
|
-
|
|
59
|
-
## Enforcement
|
|
60
|
-
|
|
61
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
-
reported to the community leaders responsible for enforcement at
|
|
63
|
-
contact [at] silex.me.
|
|
64
|
-
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
-
|
|
66
|
-
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
-
reporter of any incident.
|
|
68
|
-
|
|
69
|
-
## Enforcement Guidelines
|
|
70
|
-
|
|
71
|
-
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
-
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
-
|
|
74
|
-
### 1. Correction
|
|
75
|
-
|
|
76
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
-
unprofessional or unwelcome in the community.
|
|
78
|
-
|
|
79
|
-
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
-
clarity around the nature of the violation and an explanation of why the
|
|
81
|
-
behavior was inappropriate. A public apology may be requested.
|
|
82
|
-
|
|
83
|
-
### 2. Warning
|
|
84
|
-
|
|
85
|
-
**Community Impact**: A violation through a single incident or series
|
|
86
|
-
of actions.
|
|
87
|
-
|
|
88
|
-
**Consequence**: A warning with consequences for continued behavior. No
|
|
89
|
-
interaction with the people involved, including unsolicited interaction with
|
|
90
|
-
those enforcing the Code of Conduct, for a specified period of time. This
|
|
91
|
-
includes avoiding interactions in community spaces as well as external channels
|
|
92
|
-
like social media. Violating these terms may lead to a temporary or
|
|
93
|
-
permanent ban.
|
|
94
|
-
|
|
95
|
-
### 3. Temporary Ban
|
|
96
|
-
|
|
97
|
-
**Community Impact**: A serious violation of community standards, including
|
|
98
|
-
sustained inappropriate behavior.
|
|
99
|
-
|
|
100
|
-
**Consequence**: A temporary ban from any sort of interaction or public
|
|
101
|
-
communication with the community for a specified period of time. No public or
|
|
102
|
-
private interaction with the people involved, including unsolicited interaction
|
|
103
|
-
with those enforcing the Code of Conduct, is allowed during this period.
|
|
104
|
-
Violating these terms may lead to a permanent ban.
|
|
105
|
-
|
|
106
|
-
### 4. Permanent Ban
|
|
107
|
-
|
|
108
|
-
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
-
standards, including sustained inappropriate behavior, harassment of an
|
|
110
|
-
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
|
-
|
|
112
|
-
**Consequence**: A permanent ban from any sort of public interaction within
|
|
113
|
-
the community.
|
|
114
|
-
|
|
115
|
-
## Attribution
|
|
116
|
-
|
|
117
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
118
|
-
version 2.0, available at
|
|
119
|
-
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
|
120
|
-
|
|
121
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
|
122
|
-
enforcement ladder](https://github.com/mozilla/diversity).
|
|
123
|
-
|
|
124
|
-
[homepage]: https://www.contributor-covenant.org
|
|
125
|
-
|
|
126
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
|
127
|
-
https://www.contributor-covenant.org/faq. Translations are available at
|
|
128
|
-
https://www.contributor-covenant.org/translations.
|
package/CONTRIBUTING.md
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
### Overview
|
|
2
|
-
|
|
3
|
-
This page is about contributing code, but other types of contribution are welcome, [let's chat](https://github.com/silexlabs/Silex/discussions)!
|
|
4
|
-
|
|
5
|
-
Useful links
|
|
6
|
-
|
|
7
|
-
* [Silex meta repository](https://github.com/silexlabs/silex-meta)
|
|
8
|
-
* [Open positions, join the team](https://github.com/silexlabs/Silex/issues?q=is%3Aissue+is%3Aopen+label%3A%22open+position%22)
|
|
9
|
-
* [Become a core contributor with these issues to get started](https://github.com/silexlabs/Silex/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
|
|
10
|
-
* [Testers, docs and other help wanted annoucements](https://github.com/silexlabs/Silex/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)
|
|
11
|
-
|
|
12
|
-
To contribute code (features, bug fixes, design changes etc.) to the Silex code base, you'll need to complete a few steps to get a local working copy of our repository. Below are the steps you'll need to fork, clone, branch, and create a pull request.
|
|
13
|
-
|
|
14
|
-
Please be sure to conform to the coding standards used throughout our project and bear in mind that, by contributing to this project, you agree to our [Code of Conduct](https://github.com/silexlabs/Silex/wiki/Silex-Code-of-Conduct).
|
|
15
|
-
|
|
16
|
-
## Code base overview
|
|
17
|
-
|
|
18
|
-
The Silex API is primarily divided into two parts: the client-side and the server-side.
|
|
19
|
-
|
|
20
|
-
### Client-side
|
|
21
|
-
|
|
22
|
-
The client-side is primarily handled by the files in the `src/ts/client` directory. The main entry point is defined in `index.ts`, which initializes the Silex application. The `config.ts` file contains the `SilexConfig` class that holds the configuration for the client-side application, including the GrapesJS editor configuration and the client config URL. The `grapesjs` directory contains the GrapesJS editor configuration and plugins. The `utils.ts` file contains utility functions.
|
|
23
|
-
|
|
24
|
-
### Server-side
|
|
25
|
-
|
|
26
|
-
The server-side is primarily handled by the files in the `src/ts/server` directory. The main entry point is defined in `index.ts`, which initializes the server-side application. The `config.ts` file contains the `ServerConfig` class that holds the configuration for the server-side application. The `express.ts` file sets up the Express.js application and starts the server. The `cli.ts` file handles the command-line interface for the server, parsing command-line arguments and setting environment variables accordingly. The `events.ts` file defines events for the startup process.
|
|
27
|
-
|
|
28
|
-
## Code contribution process
|
|
29
|
-
|
|
30
|
-
### Steps
|
|
31
|
-
|
|
32
|
-
If you don't have a GitHub account, start [here](https://github.com/join).
|
|
33
|
-
|
|
34
|
-
1. **Fork the project**
|
|
35
|
-
|
|
36
|
-
Open the [Silex Project](https://github.com/silexlabs/Silex/) in GitHub. Click `Fork` in the upper right corner of the window. This adds a copy of the Silex repository to your GitHub account.
|
|
37
|
-
|
|
38
|
-
2. **Clone the fork**
|
|
39
|
-
|
|
40
|
-
Now you'll make a local copy of the repository. From the command line:
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
# Open command line terminal
|
|
44
|
-
# Navigate to your desired working directory
|
|
45
|
-
cd <your-desired-working-directory>
|
|
46
|
-
git clone https://github.com/<your-username>/Silex.git
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
3. **Set the upstream repository**
|
|
50
|
-
|
|
51
|
-
Assign Silex as the upstream repository. Setting the upstream repository tells Git where to pull from when you use the pull command (which you'll do in the next step).
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
cd Silex
|
|
55
|
-
git remote add upstream https://github.com/silexlabs/Silex.git
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
4. **Pull the latest upstream changes**
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
git pull upstream main
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
5. **Create a new branch** (Recommended)
|
|
65
|
-
|
|
66
|
-
Though you can work directly in the default dev branch, it is best practice to keep that branch synced with Silex and create a new working branch for your changes. Name the new branch whatever you'd like.
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
git checkout -b <new-branch-name>
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
You'll need to set the upstream branch so git knows where to point your new branch's pull and push commands. Below you set your local dev branch as the upstream branch to your new branch.
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
git branch --set-upstream-to=dev <new-branch-name>
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
**Notes on branch management:**
|
|
79
|
-
You can easily see a list of all of the branches in the local repository. The branch with [*] is the current working branch.
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
git branch
|
|
83
|
-
```
|
|
84
|
-
You can switch between local branches using this command:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
git checkout <branch to which you wish to switch>
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
6. **Make your changes**
|
|
91
|
-
Once changes are complete, use one of the following commands to stage the changes to be committed.
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
# Add all changes to commit
|
|
95
|
-
git add .
|
|
96
|
-
|
|
97
|
-
# Add changes from one file to commit
|
|
98
|
-
git add <file-name>
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
**Note on change management:**
|
|
102
|
-
You can always use this command to see which changes are staged for commit and which aren't.
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
git status
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
7. **Prepare to commit your changes**
|
|
109
|
-
Once your changes are ready and all files you wish to commit have been added (step #5), you'll create your commit.
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
git commit -m "This is a short message about the change made in this commit"
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
**Note on commiting:** If you have multiple commits or wish to change your commit message, you can use [interactive rebase](https://help.github.com/articles/about-git-rebase) to clean up and consolidate your commits before making your pull request.
|
|
116
|
-
|
|
117
|
-
8. **Rebase the upstream branch** into your local branch(es)
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
git pull [--rebase] upstream dev
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
9. **Push your local branch** up to your fork
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
git push origin <branch-name>
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
10. **Create a pull request**
|
|
130
|
-
|
|
131
|
-
[Create your request](https://help.github.com/articles/creating-a-pull-request/), making sure the title is as clear and descriptive as possible.
|
package/Dockerfile
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
FROM node:18
|
|
2
|
-
|
|
3
|
-
# see doc about env vars here: https://github.com/silexlabs/Silex/wiki/How-to-Host-An-Instance-of-Silex#environment-variables
|
|
4
|
-
# these can be overriden using the `-e` option in docker run
|
|
5
|
-
# FS_ROOT=/repo.git/
|
|
6
|
-
ENV DIRECTUS_URL=
|
|
7
|
-
|
|
8
|
-
COPY . /silex
|
|
9
|
-
WORKDIR /silex
|
|
10
|
-
RUN apt-get update
|
|
11
|
-
RUN npm install
|
|
12
|
-
# RUN npm run build
|
|
13
|
-
|
|
14
|
-
EXPOSE 6805
|
|
15
|
-
CMD ["npm", "start"]
|
package/directus.silex.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
module.exports = function (silexConfig) {
|
|
2
|
-
// Add plugins
|
|
3
|
-
silexConfig.addPlugin(__dirname + '/src/plugins/AuthPlugin', {
|
|
4
|
-
directusUrl: process.env.DIRECTUS_SERVER_TO_SERVER_URL || process.env.DIRECTUS_URL,
|
|
5
|
-
directusToken: process.env.DIRECTUS_TOKEN, // In case no token is passed in the request body
|
|
6
|
-
})
|
|
7
|
-
}
|
package/dist/constants.js
DELETED
package/dist/events.js
DELETED
package/dist/page.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPageLink = exports.getPageSlug = void 0;
|
|
4
|
-
function getPageSlug(pageName = 'index') {
|
|
5
|
-
return pageName
|
|
6
|
-
.toLowerCase()
|
|
7
|
-
.replace(/[^a-z0-9 -]/g, '')
|
|
8
|
-
.replace(/\s+/g, '-')
|
|
9
|
-
.replace(/-+/g, '-');
|
|
10
|
-
}
|
|
11
|
-
exports.getPageSlug = getPageSlug;
|
|
12
|
-
function getPageLink(pageName = 'index') {
|
|
13
|
-
return `./${getPageSlug(pageName)}.html`;
|
|
14
|
-
}
|
|
15
|
-
exports.getPageLink = getPageLink;
|
package/dist/server/cli.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
debug: [false, 'Debug mode, with live reload, source maps etc.', 'boolean'],
|
|
9
|
-
'ssl-port': [false, 'Port to listen to for SSL/HTTPS', 'int'],
|
|
10
|
-
'force-https': [false, 'Force HTTPS', 'boolean'],
|
|
11
|
-
'ssl-private-key': [false, 'Path to private key for SSL', 'file'],
|
|
12
|
-
'ssl-certificate': [false, 'Path to SSL certificate', 'file'],
|
|
13
|
-
'force-https-trust-xfp-header': [false, 'Sets the trustXFPHeader param of the express module "cookie-session". Use only with --force-https', 'boolean'],
|
|
14
|
-
'session-secret': ['s', 'Session secret', 'string'],
|
|
15
|
-
'cors-url': ['', 'Enable CORS for URL (can be "*")', 'string'],
|
|
16
|
-
'client-config': ['', 'Path to client config file to be served on .silex-client.js', 'string'],
|
|
17
|
-
'fs-root': ['', 'Path to the root folder where to store websites. Used by the default backend (fs).', 'string'],
|
|
18
|
-
}, {});
|
|
19
|
-
if (options.config)
|
|
20
|
-
process.env.CONFIG = options.config;
|
|
21
|
-
if (options.port)
|
|
22
|
-
process.env.PORT = options.port;
|
|
23
|
-
if (options.debug)
|
|
24
|
-
process.env.SILEX_DEBUG = options.debug;
|
|
25
|
-
if (options['ssl-port'])
|
|
26
|
-
process.env.SSL_PORT = options['ssl-port'];
|
|
27
|
-
if (options['force-https'])
|
|
28
|
-
process.env.SILEX_FORCE_HTTPS = options['force-https'];
|
|
29
|
-
if (options['ssl-private-key'])
|
|
30
|
-
process.env.SILEX_SSL_PRIVATE_KEY = options['ssl-private-key'];
|
|
31
|
-
if (options['ssl-certificate'])
|
|
32
|
-
process.env.SILEX_SSL_CERTIFICATE = options['ssl-certificate'];
|
|
33
|
-
if (options['force-https-trust-xfp-header'])
|
|
34
|
-
process.env.SILEX_FORCE_HTTPS_TRUST_XFP_HEADER = options['force-https-trust-xfp-header'];
|
|
35
|
-
if (options['session-secret'])
|
|
36
|
-
process.env.SILEX_SESSION_SECRET = options['session-secret'];
|
|
37
|
-
if (options['cors-url'])
|
|
38
|
-
process.env.SILEX_CORS_URL = options['cors-url'];
|
|
39
|
-
if (options['client-config'])
|
|
40
|
-
process.env.SILEX_CLIENT_CONFIG = options['client-config'];
|
|
41
|
-
if (options['fs-root'])
|
|
42
|
-
process.env.FS_ROOT = options['fs-root'];
|
|
43
|
-
require("./index");
|
package/dist/server/config.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServerConfig = void 0;
|
|
4
|
-
const silex_plugins_1 = require("@silexlabs/silex-plugins");
|
|
5
|
-
const path_1 = require("path");
|
|
6
|
-
const constants_1 = require("../constants");
|
|
7
|
-
const express_1 = require("express");
|
|
8
|
-
const promises_1 = require("fs/promises");
|
|
9
|
-
const events_1 = require("../events");
|
|
10
|
-
class ServerConfig extends silex_plugins_1.Config {
|
|
11
|
-
url;
|
|
12
|
-
debug;
|
|
13
|
-
port;
|
|
14
|
-
apiPath;
|
|
15
|
-
constructor(url, debug, port, apiPath) {
|
|
16
|
-
super();
|
|
17
|
-
this.url = url;
|
|
18
|
-
this.debug = debug;
|
|
19
|
-
this.port = port;
|
|
20
|
-
this.apiPath = apiPath;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
exports.ServerConfig = ServerConfig;
|
|
24
|
-
async function default_1() {
|
|
25
|
-
const port = process.env.PORT || '6805';
|
|
26
|
-
const debug = process.env.SILEX_DEBUG === 'true';
|
|
27
|
-
const clientConfigPath = process.env.SILEX_CLIENT_CONFIG;
|
|
28
|
-
const url = process.env.SERVER_URL || `http://localhost:${port}`;
|
|
29
|
-
const config = new ServerConfig(url, debug, port, '/api');
|
|
30
|
-
if (clientConfigPath) {
|
|
31
|
-
config.on(events_1.EVENT_STARTUP_START, async ({ app }) => {
|
|
32
|
-
console.log(`> Serving client side config ${clientConfigPath} at ${constants_1.CLIENT_CONFIG_FILE_NAME}`);
|
|
33
|
-
const router = (0, express_1.Router)();
|
|
34
|
-
app.use(router);
|
|
35
|
-
let clientConfig = (await (0, promises_1.readFile)(clientConfigPath)).toString();
|
|
36
|
-
router.get(`/${constants_1.CLIENT_CONFIG_FILE_NAME}`, async (res, req, next) => {
|
|
37
|
-
if (config.debug) {
|
|
38
|
-
console.log('[Debug mode] Reloading config file', clientConfigPath);
|
|
39
|
-
clientConfig = (await (0, promises_1.readFile)(clientConfigPath)).toString();
|
|
40
|
-
}
|
|
41
|
-
req.header('Content-Type', 'application/javascript').send(clientConfig);
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
if (process.env.CONFIG) {
|
|
46
|
-
const userConfigPath = process.env.CONFIG;
|
|
47
|
-
console.log('> Loading user config', userConfigPath);
|
|
48
|
-
try {
|
|
49
|
-
await config.addPlugin(userConfigPath, {});
|
|
50
|
-
}
|
|
51
|
-
catch (e) {
|
|
52
|
-
throw new Error(`User config file ${userConfigPath} error: ${e.message}`);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
const configFilePath = (0, path_1.resolve)(__dirname, '../../.silex.js');
|
|
56
|
-
console.log('> Loading config', configFilePath);
|
|
57
|
-
try {
|
|
58
|
-
await config.addPlugin(configFilePath, {});
|
|
59
|
-
}
|
|
60
|
-
catch (e) {
|
|
61
|
-
if (e.code === 'MODULE_NOT_FOUND') {
|
|
62
|
-
console.info('No config found', configFilePath);
|
|
63
|
-
}
|
|
64
|
-
else {
|
|
65
|
-
throw new Error(`Error in config file ${configFilePath}: ${e.message}`);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return config;
|
|
69
|
-
}
|
|
70
|
-
exports.default = default_1;
|
package/dist/server/express.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const express_1 = __importDefault(require("express"));
|
|
7
|
-
const events_1 = require("../events");
|
|
8
|
-
async function default_1(config) {
|
|
9
|
-
const app = (0, express_1.default)();
|
|
10
|
-
await config.emit(events_1.EVENT_STARTUP_START, { app });
|
|
11
|
-
return new Promise((resolve, reject) => {
|
|
12
|
-
app.listen(config.port, () => {
|
|
13
|
-
config.emit(events_1.EVENT_STARTUP_END, { app });
|
|
14
|
-
resolve(app);
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
exports.default = default_1;
|
package/dist/server/index.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const config_1 = __importDefault(require("./config"));
|
|
30
|
-
const express_1 = __importDefault(require("./express"));
|
|
31
|
-
const config = __importStar(require("./config"));
|
|
32
|
-
const types = __importStar(require("../types"));
|
|
33
|
-
const events = __importStar(require("../events"));
|
|
34
|
-
const constants = __importStar(require("../constants"));
|
|
35
|
-
const page = __importStar(require("../page"));
|
|
36
|
-
exports.default = { config, types, events, constants, page };
|
|
37
|
-
async function main() {
|
|
38
|
-
const config = await (0, config_1.default)();
|
|
39
|
-
const app = await (0, express_1.default)(config);
|
|
40
|
-
console.info(`
|
|
41
|
-
I'm ready, listening to port ${config.port}
|
|
42
|
-
`);
|
|
43
|
-
if (config.debug) {
|
|
44
|
-
startLiverReload();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
main();
|
|
48
|
-
async function startLiverReload() {
|
|
49
|
-
const { createServer } = await Promise.resolve().then(() => __importStar(require('livereload')));
|
|
50
|
-
const { resolve } = await Promise.resolve().then(() => __importStar(require('path')));
|
|
51
|
-
const dist = resolve(__dirname, '../client');
|
|
52
|
-
const server = createServer({
|
|
53
|
-
delay: 0,
|
|
54
|
-
}, () => {
|
|
55
|
-
console.info(`\n> Debug mode\n> Live reload server is running.\n> Watching ${dist}`);
|
|
56
|
-
});
|
|
57
|
-
server.watch(dist);
|
|
58
|
-
}
|
package/dist/types.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Unit = exports.defaultSite = exports.defaultPublicationSettings = void 0;
|
|
4
|
-
exports.defaultPublicationSettings = {
|
|
5
|
-
path: 'publication',
|
|
6
|
-
url: '',
|
|
7
|
-
autoHomePage: true,
|
|
8
|
-
assets: { path: 'assets', url: '/assets' },
|
|
9
|
-
html: { path: '' },
|
|
10
|
-
css: { path: 'css', url: '/css' },
|
|
11
|
-
};
|
|
12
|
-
exports.defaultSite = {
|
|
13
|
-
pages: [{ name: 'Main', id: 'main', frames: [{ component: { type: 'text', stylable: [] }, components: [] }] }],
|
|
14
|
-
assets: [],
|
|
15
|
-
styles: [],
|
|
16
|
-
name: 'New website',
|
|
17
|
-
settings: {
|
|
18
|
-
description: '',
|
|
19
|
-
title: '',
|
|
20
|
-
head: '',
|
|
21
|
-
lang: '',
|
|
22
|
-
favicon: '',
|
|
23
|
-
'og:title': '',
|
|
24
|
-
'og:description': '',
|
|
25
|
-
'og:image': '',
|
|
26
|
-
},
|
|
27
|
-
fonts: [],
|
|
28
|
-
symbols: [],
|
|
29
|
-
publication: exports.defaultPublicationSettings,
|
|
30
|
-
};
|
|
31
|
-
var Unit;
|
|
32
|
-
(function (Unit) {
|
|
33
|
-
Unit["PX"] = "px";
|
|
34
|
-
})(Unit || (exports.Unit = Unit = {}));
|
package/jest.config.js
DELETED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|