@silexlabs/silex 3.0.0-alpha.67 → 3.0.0-alpha.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/css/admin.css +1 -3
- package/dist/client/js/main.js +3 -3
- package/dist/plugins/client/client/api.js +3 -1
- package/dist/plugins/client/client/api.js.map +1 -1
- package/dist/plugins/client/client/assetUrl.js +4 -4
- package/dist/plugins/client/client/assetUrl.js.map +1 -1
- package/dist/plugins/client/client/grapesjs/PublicationManager.js +2 -5
- package/dist/plugins/client/client/grapesjs/PublicationManager.js.map +1 -1
- package/dist/plugins/client/client/grapesjs/index.js +12 -7
- package/dist/plugins/client/client/grapesjs/index.js.map +1 -1
- package/dist/plugins/client/client/grapesjs/project-bar.js +2 -4
- package/dist/plugins/client/client/grapesjs/project-bar.js.map +1 -1
- package/dist/plugins/client/client/grapesjs/storage.js +4 -1
- package/dist/plugins/client/client/grapesjs/storage.js.map +1 -1
- package/dist/plugins/client/plugins/client/publicationRenderer.js +1 -1
- package/dist/plugins/client/plugins/client/template.js +4 -2
- package/dist/plugins/client/plugins/client/template.js.map +1 -1
- package/dist/plugins/server/plugins/server/StaticPlugin.js +5 -2
- package/dist/plugins/server/plugins/server/StaticPlugin.js.map +1 -1
- package/dist/server/server/api/connectorApi.js +7 -3
- package/package.json +1 -1
- package/src/css/website-info.scss +1 -3
- package/src/ts/client/api.ts +6 -1
- package/src/ts/client/assetUrl.ts +4 -4
- package/src/ts/client/grapesjs/PublicationManager.ts +2 -5
- package/src/ts/client/grapesjs/index.ts +12 -7
- package/src/ts/client/grapesjs/project-bar.ts +2 -4
- package/src/ts/client/grapesjs/storage.ts +4 -1
- package/src/ts/plugins/client/publicationRenderer.ts +1 -1
- package/src/ts/plugins/client/template.ts +4 -2
- package/src/ts/plugins/server/StaticPlugin.ts +5 -2
- package/src/ts/server/api/connectorApi.ts +7 -3
|
@@ -34,9 +34,11 @@ const templateKey = 'template'
|
|
|
34
34
|
|
|
35
35
|
export default async (config, opts: any = {}) => {
|
|
36
36
|
// @ts-ignore
|
|
37
|
-
const { html, render } = await import('/
|
|
37
|
+
const { html, render } = await import('https://unpkg.com/lit-html/lit-html.js')
|
|
38
|
+
//const { html, render } = await import('/node_modules/lit-html/lit-html.js')
|
|
38
39
|
// @ts-ignore
|
|
39
|
-
const { styleMap } = await import('/
|
|
40
|
+
const { styleMap } = await import('https://unpkg.com/lit-html/directives/style-map.js')
|
|
41
|
+
//const { styleMap } = await import('/node_modules/lit-html/directives/style-map.js')
|
|
40
42
|
|
|
41
43
|
config.on(ClientEvent.GRAPESJS_END, () => {
|
|
42
44
|
const editor = silex.getEditor()
|
|
@@ -43,8 +43,11 @@ export default async function(config, opts = {}) {
|
|
|
43
43
|
route: '/webfonts/',
|
|
44
44
|
path: nodeModules('@fortawesome/fontawesome-free') + '/@fortawesome/fontawesome-free/webfonts/',
|
|
45
45
|
}, {
|
|
46
|
-
route: '/
|
|
47
|
-
path: nodeModules(),
|
|
46
|
+
route: '/css/files/',
|
|
47
|
+
path: nodeModules('@fontsource/ubuntu') + '/@fontsource/ubuntu/files/',
|
|
48
|
+
//}, {
|
|
49
|
+
// route: '/node_modules/',
|
|
50
|
+
// path: nodeModules(),
|
|
48
51
|
}, {
|
|
49
52
|
route: '/',
|
|
50
53
|
path: join(__dirname, '../../../../..', 'dist', 'client'),
|
|
@@ -49,14 +49,18 @@ export default function(config: ServerConfig) {
|
|
|
49
49
|
* Method to validate HTTP status codes
|
|
50
50
|
* Returns a suitable error code if it is not valid
|
|
51
51
|
*/
|
|
52
|
-
function validateStatus(status: number,
|
|
52
|
+
function validateStatus(status: number, _default = 500): number {
|
|
53
|
+
if(!status) {
|
|
54
|
+
console.warn(`Status code is undefined, returning default ${_default}`)
|
|
55
|
+
return _default
|
|
56
|
+
}
|
|
53
57
|
// Make sure it is a string
|
|
54
58
|
status = parseInt(status.toString())
|
|
55
59
|
// Check the status code
|
|
56
60
|
if (status >= 100 && status < 600) return status
|
|
57
61
|
// Invalid status code
|
|
58
|
-
console.warn(`Invalid status code ${status}, returning default ${
|
|
59
|
-
return
|
|
62
|
+
console.warn(`Invalid status code ${status}, returning default ${_default}}`)
|
|
63
|
+
return _default
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
/**
|