@silexlabs/silex 3.0.0-alpha.32 → 3.0.0-alpha.36

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.
Files changed (103) hide show
  1. package/LICENSE +661 -203
  2. package/README.md +4 -2
  3. package/dist/client/client/config.d.ts +258 -0
  4. package/dist/client/client/expose.d.ts +3 -0
  5. package/dist/client/client/grapesjs/blocks.d.ts +1 -0
  6. package/dist/client/client/grapesjs/eleventy.d.ts +1 -0
  7. package/dist/client/client/grapesjs/index.d.ts +237 -0
  8. package/dist/client/client/grapesjs/internal-links.d.ts +1 -0
  9. package/dist/client/client/grapesjs/new-page-dialog.d.ts +2 -0
  10. package/dist/client/client/grapesjs/openImport.d.ts +4 -0
  11. package/dist/client/client/grapesjs/page-panel.d.ts +3 -0
  12. package/dist/client/client/grapesjs/project-bar.d.ts +1 -0
  13. package/dist/client/client/grapesjs/publish.d.ts +18 -0
  14. package/dist/client/client/grapesjs/rich-text.d.ts +1 -0
  15. package/dist/client/client/grapesjs/semantic.d.ts +1 -0
  16. package/dist/client/client/grapesjs/settings.d.ts +2 -0
  17. package/dist/client/client/grapesjs/symbolDialogs.d.ts +3 -0
  18. package/dist/client/client/grapesjs/template.d.ts +1 -0
  19. package/dist/client/client/index.d.ts +4 -0
  20. package/dist/client/client/utils.d.ts +1 -0
  21. package/dist/client/constants.d.ts +4 -0
  22. package/dist/client/events.d.ts +2 -0
  23. package/dist/client/js/main.js +53 -53
  24. package/dist/client/js/main.js.LICENSE.txt +2 -24
  25. package/dist/client/page.d.ts +2 -0
  26. package/dist/client/types.d.ts +99 -0
  27. package/dist/server/index.js +12 -2
  28. package/dist/types.js +1 -1
  29. package/package.json +42 -35
  30. package/src/plugins/DefaultBackend.js +29 -8
  31. package/src/ts/client/config.ts +17 -0
  32. package/src/ts/client/expose.ts +17 -1
  33. package/src/ts/client/grapesjs/blocks.ts +17 -0
  34. package/src/ts/client/grapesjs/eleventy.ts +17 -0
  35. package/src/ts/client/grapesjs/index.ts +44 -18
  36. package/src/ts/client/grapesjs/internal-links.test.ts +17 -0
  37. package/src/ts/client/grapesjs/internal-links.ts +17 -0
  38. package/src/ts/client/grapesjs/new-page-dialog.ts +17 -0
  39. package/src/ts/client/grapesjs/openImport.ts +17 -0
  40. package/src/ts/client/grapesjs/page-panel.ts +17 -0
  41. package/src/ts/client/grapesjs/project-bar.ts +17 -0
  42. package/src/ts/client/grapesjs/publish.ts +17 -0
  43. package/src/ts/client/grapesjs/rich-text.ts +17 -0
  44. package/src/ts/client/grapesjs/semantic.ts +17 -0
  45. package/src/ts/client/grapesjs/settings.ts +17 -0
  46. package/src/ts/client/grapesjs/symbolDialogs.ts +18 -1
  47. package/src/ts/client/grapesjs/template.ts +17 -0
  48. package/src/ts/client/index.ts +18 -0
  49. package/src/ts/client/utils.ts +17 -0
  50. package/src/ts/constants.ts +17 -0
  51. package/src/ts/events.ts +17 -0
  52. package/src/ts/externs.ts +17 -0
  53. package/src/ts/page.ts +17 -0
  54. package/src/ts/server/cli.ts +18 -0
  55. package/src/ts/server/config.ts +17 -0
  56. package/src/ts/server/express.ts +17 -0
  57. package/src/ts/server/index.ts +24 -3
  58. package/src/ts/server/utils/BackwardCompat.ts +17 -0
  59. package/src/ts/types.ts +17 -0
  60. package/.dockerignore +0 -5
  61. package/.editorconfig +0 -14
  62. package/.eslintrc.json +0 -43
  63. package/.github/FUNDING.yml +0 -13
  64. package/.github/workflows/docker-hub-publish.yml +0 -36
  65. package/.github/workflows/npm-publish.yml +0 -19
  66. package/.github/workflows/test.yml +0 -26
  67. package/.nvmrc +0 -1
  68. package/.silex.js +0 -12
  69. package/CODE_OF_CONDUCT.md +0 -128
  70. package/CONTRIBUTING.md +0 -131
  71. package/Dockerfile +0 -15
  72. package/directus.silex.js +0 -7
  73. package/jest.config.js +0 -10
  74. package/logos/logo_by_ceubri/silex-icon-2018@200px.png +0 -0
  75. package/logos/logo_by_ceubri/silex-icon-2018@4x.png +0 -0
  76. package/logos/logo_by_ceubri/silex-logo-2018-white-transp.pdf +0 -0
  77. package/logos/logo_by_ceubri/silex-logo-2018-white.jpg +0 -0
  78. package/logos/logo_by_ceubri/silex-logo-2018-white.pdf +0 -0
  79. package/logos/logo_by_ceubri/silex-logo-2018-white.png +0 -0
  80. package/logos/logo_by_ceubri/silex-logo-2018-white@0.5x.png +0 -0
  81. package/logos/logo_by_ceubri/silex-logo-2018-white@0.75x.png +0 -0
  82. package/logos/logo_by_ceubri/silex-logo-2018-white@4x.jpg +0 -0
  83. package/logos/logo_by_ceubri/silex-logo-2018-white@4x.png +0 -0
  84. package/logos/logo_by_ceubri/silex-logo-2018.ai +5 -2521
  85. package/logos/logo_by_ceubri/silex-logo-2018.jpg +0 -0
  86. package/logos/logo_by_ceubri/silex-logo-2018.pdf +0 -0
  87. package/logos/logo_by_ceubri/silex-logo-2018.png +0 -0
  88. package/logos/logo_by_ceubri/silex-logo-2018@0.5x.png +0 -0
  89. package/logos/logo_by_ceubri/silex-logo-2018@0.75x.png +0 -0
  90. package/logos/logo_by_ceubri/silex-logo-2018@4x.jpg +0 -0
  91. package/logos/logo_by_ceubri/silex-logo-2018@4x.png +0 -0
  92. package/logos/silexlabs.png +0 -0
  93. package/public/assets/container.png +0 -0
  94. package/public/assets/favicon.png +0 -0
  95. package/public/assets/logo-silex-small.png +0 -0
  96. package/public/robots.txt +0 -2
  97. package/public/silex.js +0 -25
  98. package/tsconfig-server-debug.json +0 -20
  99. package/tsconfig-server-release.json +0 -20
  100. package/tsconfig.jest.json +0 -9
  101. package/tsconfig.json +0 -27
  102. package/webpack.config.js +0 -28
  103. package/webpack.debug.config.js +0 -8
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  import {html, render} from 'lit-html'
2
19
 
3
20
  const panelId = 'project-bar-panel'
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  import {html, render} from 'lit-html'
2
19
  import {map} from 'lit-html/directives/map.js'
3
20
  import grapesjs from 'grapesjs/dist/grapes.min.js'
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  import * as grapesjs from 'grapesjs/dist/grapes.min.js'
2
19
 
3
20
  const pluginName = 'richText'
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  import {html, render} from 'lit-html'
2
19
  import {map} from 'lit-html/directives/map.js'
3
20
  import grapesjs from 'grapesjs/dist/grapes.min.js'
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  import {html, render} from 'lit-html'
2
19
  import {live} from 'lit-html/directives/live.js'
3
20
  import * as grapesjs from 'grapesjs/dist/grapes.min.js'
@@ -1,5 +1,22 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  import * as grapesjs from 'grapesjs/dist/grapes.min.js'
2
- import { cmdAddSymbol } from '@silexlabs/grapesjs-symbols/src'
19
+ import { cmdAddSymbol } from '@silexlabs/grapesjs-symbols'
3
20
 
4
21
  export const cmdPromptAddSymbol = 'symbol-prompt-add'
5
22
 
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  import {html, render} from 'lit-html'
2
19
  import {styleMap} from 'lit-html/directives/style-map.js'
3
20
  import grapesjs from 'grapesjs/dist/grapes.min.js'
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  /**
2
19
  * @fileoverview
3
20
  * Defines the entry point of Silex client side application
@@ -36,6 +53,7 @@ export async function start(options = {}) {
36
53
  initEditor(config.editor, config.grapesJsPlugins)
37
54
  } catch(e) {
38
55
  console.error('Error starting Silex', e)
56
+ throw e
39
57
  }
40
58
 
41
59
  // Init internationalization module
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
 
2
19
  // Browse all elements of all pages
3
20
  export function onAll(editor, cbk) {
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  /**
2
19
  * @fileoverview define constants for Silex client and server
3
20
  */
package/src/ts/events.ts CHANGED
@@ -1,2 +1,19 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  export const EVENT_STARTUP_START = 'silex:startup:start'
2
19
  export const EVENT_STARTUP_END = 'silex:startup:end'
package/src/ts/externs.ts CHANGED
@@ -1 +1,18 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
 
package/src/ts/page.ts CHANGED
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  // Page related functions
2
19
  // This is used on the client and the server
3
20
  export function getPageSlug(pageName = 'index') {
@@ -1,5 +1,23 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ /*
4
+ * Silex website builder, free/libre no-code tool for makers.
5
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
6
+ *
7
+ * This program is free software: you can redistribute it and/or modify
8
+ * it under the terms of the GNU Affero General Public License as published by
9
+ * the Free Software Foundation, either version 3 of the License, or any later version.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU Affero General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU Affero General Public License
17
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
18
+ */
19
+
20
+
3
21
  import { parse } from 'cli'
4
22
 
5
23
  const options = parse({
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  /**
2
19
  * @fileoverview This is where the default config is defined. Also use this object as an event emitter to listen to Silex events
3
20
  * The values can be overriden with env vars or before passing the config to Silex
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  import express, { Application } from 'express'
2
19
 
3
20
  import { ServerConfig } from './config'
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  import getConfig from './config'
2
19
  import start from './express'
3
20
 
@@ -6,10 +23,11 @@ import * as types from '../types'
6
23
  import * as events from '../events'
7
24
  import * as constants from '../constants'
8
25
  import * as page from '../page'
9
- export default { config, types, events, constants, page }
26
+
27
+ export { config, types, events, constants, page, start, getConfig }
10
28
 
11
29
  // Main app
12
- async function main() {
30
+ export default async function main() {
13
31
  // Get the default config object
14
32
  const config = await getConfig()
15
33
 
@@ -26,7 +44,6 @@ I'm ready, listening to port ${config.port}
26
44
  startLiverReload()
27
45
  }
28
46
  }
29
- main()
30
47
 
31
48
  // livereload
32
49
  async function startLiverReload() {
@@ -41,3 +58,7 @@ async function startLiverReload() {
41
58
  })
42
59
  server.watch(dist)
43
60
  }
61
+
62
+ if (require.main === module) {
63
+ main()
64
+ }
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  /**
2
19
  * @fileoverview Handle backward compatibility when a user opens a site for edition
3
20
  *
package/src/ts/types.ts CHANGED
@@ -1,3 +1,20 @@
1
+ /*
2
+ * Silex website builder, free/libre no-code tool for makers.
3
+ * Copyright (c) 2023 lexoyo and Silex Labs foundation
4
+ *
5
+ * This program is free software: you can redistribute it and/or modify
6
+ * it under the terms of the GNU Affero General Public License as published by
7
+ * the Free Software Foundation, either version 3 of the License, or any later version.
8
+ *
9
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU Affero General Public License for more details.
13
+ *
14
+ * You should have received a copy of the GNU Affero General Public License
15
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
16
+ */
17
+
1
18
  /**
2
19
  * @fileoverview define types for Silex client and server
3
20
  */
package/.dockerignore DELETED
@@ -1,5 +0,0 @@
1
- .git
2
- .gitmodules
3
- docs
4
- node_modules
5
- Dockerfile
package/.editorconfig DELETED
@@ -1,14 +0,0 @@
1
- # EditorConfig defines and maintains consistent coding styles between different
2
- # editors and IDEs: http://EditorConfig.org/
3
-
4
- # Top-most EditorConfig file
5
- root = true
6
-
7
- # All files
8
- [*]
9
- charset = utf-8
10
- end_of_line = lf
11
- insert_final_newline = true
12
- indent_style = space
13
- indent_size = 2
14
- trim_trailing_whitespace = true
package/.eslintrc.json DELETED
@@ -1,43 +0,0 @@
1
- {
2
- "ignorePatterns": [ "dist/" ],
3
- "env": {
4
- "browser": true,
5
- "es2021": true,
6
- "node": true
7
- },
8
- "extends": [
9
- "eslint:recommended",
10
- "plugin:@typescript-eslint/recommended"
11
- ],
12
- "overrides": [
13
- ],
14
- "parser": "@typescript-eslint/parser",
15
- "parserOptions": {
16
- "ecmaVersion": "latest",
17
- "sourceType": "module"
18
- },
19
- "plugins": [
20
- "@typescript-eslint"
21
- ],
22
- "rules": {
23
- "indent": [
24
- "error",
25
- 2
26
- ],
27
- "linebreak-style": [
28
- "error",
29
- "unix"
30
- ],
31
- "quotes": [
32
- "error",
33
- "single"
34
- ],
35
- "semi": [
36
- "error",
37
- "never"
38
- ],
39
- "no-case-declarations": [0],
40
- "@typescript-eslint/no-unused-vars": [0],
41
- "@typescript-eslint/no-explicit-any": [0]
42
- }
43
- }
@@ -1,13 +0,0 @@
1
- # These are supported funding model platforms
2
-
3
- # github: [lexoyo]
4
- # patreon: lexoyo
5
- open_collective: silex
6
-
7
- # ko_fi: # Replace with a single Ko-fi username
8
- # tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
9
- # community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
10
- # liberapay: # Replace with a single Liberapay username
11
- # issuehunt: # Replace with a single IssueHunt username
12
- # otechie: # Replace with a single Otechie username
13
- # custom: # Replace with a single custom sponsorship URL
@@ -1,36 +0,0 @@
1
- name: Publish DockerHub image
2
- # from https://itsmetommy.com/2021/07/05/push-to-docker-hub-using-github-actions/
3
-
4
- on:
5
- push:
6
- tags:
7
- - '*'
8
-
9
- jobs:
10
- build-container:
11
- runs-on: ubuntu-latest
12
- steps:
13
- - name: Checkout code
14
- uses: actions/checkout@v2
15
-
16
- - name: Login to DockerHub
17
- uses: docker/login-action@v1
18
- with:
19
- username: ${{ secrets.DOCKER_USERNAME }}
20
- password: ${{ secrets.DOCKER_PASSWORD }}
21
-
22
- - name: Extract metadata (tags, labels) for Docker
23
- id: meta
24
- uses: docker/metadata-action@v3
25
- with:
26
- images: silexlabs/silex
27
-
28
- - name: Build and push
29
- uses: docker/build-push-action@v2
30
- with:
31
- context: .
32
- push: true
33
- tags: ${{ steps.meta.outputs.tags }}
34
- labels: ${{ steps.meta.outputs.labels }}
35
-
36
-
@@ -1,19 +0,0 @@
1
- name: Publish on npm
2
- on:
3
- push:
4
- tags:
5
- - '*'
6
- jobs:
7
- build:
8
- runs-on: ubuntu-latest
9
- steps:
10
- - uses: actions/checkout@v2
11
- # Setup .npmrc file to publish to npm
12
- - uses: actions/setup-node@v1
13
- with:
14
- node-version: '18.x'
15
- registry-url: 'https://registry.npmjs.org'
16
- - run: npm install
17
- - run: npm publish --access=public
18
- env:
19
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -1,26 +0,0 @@
1
- name: Run tests
2
-
3
- on: [push]
4
-
5
- jobs:
6
- build:
7
-
8
- runs-on: ${{ matrix.os }}
9
-
10
- strategy:
11
- matrix:
12
- node-version: [16.x, 18.x]
13
- os: [ubuntu-latest]
14
-
15
- steps:
16
- - uses: actions/checkout@v2
17
- - name: Use Node.js ${{ matrix.node-version }}
18
- uses: actions/setup-node@v1
19
- with:
20
- node-version: ${{ matrix.node-version }}
21
- - run: npm install
22
- - run: npm run build
23
- - run: npm test
24
- env:
25
- CI: true
26
- - run: npm run lint
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- 18.13.0
package/.silex.js DELETED
@@ -1,12 +0,0 @@
1
- module.exports = function (silexConfig, options) {
2
- silexConfig.addPlugin([
3
- __dirname + '/src/plugins/ExpressPlugin.js',
4
- __dirname + '/src/plugins/SslPlugin.js',
5
- __dirname + '/src/plugins/StaticPlugin.js',
6
- __dirname + '/src/plugins/WebsitePlugin.js',
7
- __dirname + '/src/plugins/PublishPlugin.js',
8
- ])
9
-
10
- // Return an object to be merged with Silex config
11
- return {}
12
- }