@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.
- package/LICENSE +661 -203
- package/README.md +4 -2
- package/dist/client/client/config.d.ts +258 -0
- package/dist/client/client/expose.d.ts +3 -0
- package/dist/client/client/grapesjs/blocks.d.ts +1 -0
- package/dist/client/client/grapesjs/eleventy.d.ts +1 -0
- package/dist/client/client/grapesjs/index.d.ts +237 -0
- package/dist/client/client/grapesjs/internal-links.d.ts +1 -0
- package/dist/client/client/grapesjs/new-page-dialog.d.ts +2 -0
- package/dist/client/client/grapesjs/openImport.d.ts +4 -0
- package/dist/client/client/grapesjs/page-panel.d.ts +3 -0
- package/dist/client/client/grapesjs/project-bar.d.ts +1 -0
- package/dist/client/client/grapesjs/publish.d.ts +18 -0
- package/dist/client/client/grapesjs/rich-text.d.ts +1 -0
- package/dist/client/client/grapesjs/semantic.d.ts +1 -0
- package/dist/client/client/grapesjs/settings.d.ts +2 -0
- package/dist/client/client/grapesjs/symbolDialogs.d.ts +3 -0
- package/dist/client/client/grapesjs/template.d.ts +1 -0
- package/dist/client/client/index.d.ts +4 -0
- package/dist/client/client/utils.d.ts +1 -0
- package/dist/client/constants.d.ts +4 -0
- package/dist/client/events.d.ts +2 -0
- package/dist/client/js/main.js +53 -53
- package/dist/client/js/main.js.LICENSE.txt +2 -24
- package/dist/client/page.d.ts +2 -0
- package/dist/client/types.d.ts +99 -0
- package/dist/server/index.js +12 -2
- package/dist/types.js +1 -1
- package/package.json +42 -35
- package/src/plugins/DefaultBackend.js +29 -8
- package/src/ts/client/config.ts +17 -0
- package/src/ts/client/expose.ts +17 -1
- package/src/ts/client/grapesjs/blocks.ts +17 -0
- package/src/ts/client/grapesjs/eleventy.ts +17 -0
- package/src/ts/client/grapesjs/index.ts +44 -18
- package/src/ts/client/grapesjs/internal-links.test.ts +17 -0
- package/src/ts/client/grapesjs/internal-links.ts +17 -0
- package/src/ts/client/grapesjs/new-page-dialog.ts +17 -0
- package/src/ts/client/grapesjs/openImport.ts +17 -0
- package/src/ts/client/grapesjs/page-panel.ts +17 -0
- package/src/ts/client/grapesjs/project-bar.ts +17 -0
- package/src/ts/client/grapesjs/publish.ts +17 -0
- package/src/ts/client/grapesjs/rich-text.ts +17 -0
- package/src/ts/client/grapesjs/semantic.ts +17 -0
- package/src/ts/client/grapesjs/settings.ts +17 -0
- package/src/ts/client/grapesjs/symbolDialogs.ts +18 -1
- package/src/ts/client/grapesjs/template.ts +17 -0
- package/src/ts/client/index.ts +18 -0
- package/src/ts/client/utils.ts +17 -0
- package/src/ts/constants.ts +17 -0
- package/src/ts/events.ts +17 -0
- package/src/ts/externs.ts +17 -0
- package/src/ts/page.ts +17 -0
- package/src/ts/server/cli.ts +18 -0
- package/src/ts/server/config.ts +17 -0
- package/src/ts/server/express.ts +17 -0
- package/src/ts/server/index.ts +24 -3
- package/src/ts/server/utils/BackwardCompat.ts +17 -0
- package/src/ts/types.ts +17 -0
- 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.js +0 -12
- package/CODE_OF_CONDUCT.md +0 -128
- package/CONTRIBUTING.md +0 -131
- package/Dockerfile +0 -15
- package/directus.silex.js +0 -7
- 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/public/assets/container.png +0 -0
- package/public/assets/favicon.png +0 -0
- package/public/assets/logo-silex-small.png +0 -0
- package/public/robots.txt +0 -2
- package/public/silex.js +0 -25
- package/tsconfig-server-debug.json +0 -20
- package/tsconfig-server-release.json +0 -20
- package/tsconfig.jest.json +0 -9
- package/tsconfig.json +0 -27
- package/webpack.config.js +0 -28
- 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
|
|
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'
|
package/src/ts/client/index.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
|
|
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
|
package/src/ts/client/utils.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
|
// Browse all elements of all pages
|
|
3
20
|
export function onAll(editor, cbk) {
|
package/src/ts/constants.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 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') {
|
package/src/ts/server/cli.ts
CHANGED
|
@@ -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({
|
package/src/ts/server/config.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 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
|
package/src/ts/server/express.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
|
import express, { Application } from 'express'
|
|
2
19
|
|
|
3
20
|
import { ServerConfig } from './config'
|
package/src/ts/server/index.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
|
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
|
-
|
|
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
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
|
-
}
|
package/.github/FUNDING.yml
DELETED
|
@@ -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
|
-
}
|