@silexlabs/silex-dashboard 1.0.41 → 1.0.45

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 (95) hide show
  1. package/.gitmodules +2 -2
  2. package/11ty/eleventy.config.mjs +62 -0
  3. package/README.md +8 -2
  4. package/_site/css/connectors-61bd21c2345101e48cc530cacf3afc0156ce7e089fcef3a34f853a537f0c55f2.css +1 -0
  5. package/_site/css/websites-4b9b2b0a0a907b33eca109d50c2a3eee97f1955c742cef487110d21a0bbf8f50.css +1 -0
  6. package/_site/en/connectors/index.html +176 -181
  7. package/_site/en/index.html +59 -470
  8. package/_site/fr/connectors/index.html +176 -181
  9. package/_site/fr/index.html +59 -470
  10. package/_site/js/main.js +362 -0
  11. package/_site/js/main.js.LICENSE.txt +38 -0
  12. package/_site/js/vue.cjs.js +89 -0
  13. package/_site/js/vue.cjs.prod.js +75 -0
  14. package/_site/js/vue.d.mts +7 -0
  15. package/_site/js/vue.d.ts +7 -0
  16. package/_site/js/vue.esm-browser.js +16740 -0
  17. package/_site/js/vue.esm-browser.prod.js +12 -0
  18. package/_site/js/vue.esm-bundler.js +80 -0
  19. package/_site/js/vue.global.js +16725 -0
  20. package/_site/js/vue.global.prod.js +12 -0
  21. package/_site/js/vue.runtime.esm-browser.js +11155 -0
  22. package/_site/js/vue.runtime.esm-browser.prod.js +12 -0
  23. package/_site/js/vue.runtime.esm-bundler.js +26 -0
  24. package/_site/js/vue.runtime.global.js +11302 -0
  25. package/_site/js/vue.runtime.global.prod.js +12 -0
  26. package/collections/connectors/en.md +70 -0
  27. package/collections/connectors/fr.md +72 -0
  28. package/collections/home/en.md +57 -0
  29. package/{pages/fr/index.md → collections/home/fr.md} +20 -21
  30. package/collections/languages/en.json +5 -0
  31. package/collections/languages/fr.json +5 -0
  32. package/collections/settings/en.json +127 -0
  33. package/collections/settings/fr.json +131 -0
  34. package/package.json +17 -8
  35. package/silex/client-config.js +24 -0
  36. package/{.silex.js → silex/server-config.js} +8 -18
  37. package/templates/connectors-en.11tydata.mjs +56 -0
  38. package/templates/connectors-en.html +440 -0
  39. package/templates/connectors-fr.11tydata.mjs +56 -0
  40. package/templates/connectors-fr.html +440 -0
  41. package/templates/css/connectors-61bd21c2345101e48cc530cacf3afc0156ce7e089fcef3a34f853a537f0c55f2.css +1 -0
  42. package/templates/css/websites-4b9b2b0a0a907b33eca109d50c2a3eee97f1955c742cef487110d21a0bbf8f50.css +1 -0
  43. package/templates/websites-en.11tydata.mjs +108 -0
  44. package/templates/websites-en.html +478 -0
  45. package/templates/websites-fr.11tydata.mjs +108 -0
  46. package/templates/websites-fr.html +478 -0
  47. package/tina/config.ts +258 -0
  48. package/tina/tina-lock.json +1 -0
  49. package/.eleventy.js +0 -11
  50. package/.silex-client.js +0 -22
  51. package/_data/languages.json +0 -7
  52. package/_includes/api-connectors.js.html +0 -96
  53. package/_includes/api-websites.js.html +0 -189
  54. package/_includes/connectors.html +0 -253
  55. package/_includes/websites.html +0 -548
  56. package/_silex/old/assets/alex-hoyau.jpg +0 -0
  57. package/_silex/old/assets/alex-small.jpg +0 -0
  58. package/_silex/old/assets/empty-projects.gif +0 -0
  59. package/_silex/old/assets/gitlab.svg +0 -13
  60. package/_silex/old/assets/picto-silex.png +0 -0
  61. package/_silex/old/assets/silex-icon-2018@200px.png +0 -0
  62. package/_silex/old/meta.json +0 -1
  63. package/_silex/old/website.json +0 -1
  64. package/_site/assets/alex-small.jpg +0 -0
  65. package/_site/assets/gitlab.svg +0 -13
  66. package/_site/assets/silex-dashboard.png +0 -0
  67. package/_site/assets/silex-icon-2018@200px.png +0 -0
  68. package/_site/css/connectors.css +0 -1
  69. package/_site/css/websites.css +0 -1
  70. package/assets/alex-small.jpg +0 -0
  71. package/assets/bg-purpel-silex.webp +0 -0
  72. package/assets/bg-silex-purpel.webp +0 -0
  73. package/assets/empty-projects-sos.gif +0 -0
  74. package/assets/gitlab.svg +0 -13
  75. package/assets/logo-silex.svg +0 -1
  76. package/assets/picto-silex@3x.png +0 -0
  77. package/assets/silex-dashboard.png +0 -0
  78. package/assets/silex-icon-2018@200px.png +0 -0
  79. package/pages/connectors.css.liquid +0 -4
  80. package/pages/en/connectors.md +0 -4
  81. package/pages/en/en.json +0 -72
  82. package/pages/en/index.md +0 -28
  83. package/pages/fr/connectors.md +0 -5
  84. package/pages/fr/fr.json +0 -72
  85. package/pages/pages.11tydata.js +0 -5
  86. package/pages/websites.css.liquid +0 -4
  87. /package/{_data → 11ty/_data}/api-translations.json +0 -0
  88. /package/{_data → 11ty/_data}/site.js +0 -0
  89. /package/{_includes → 11ty/_includes}/alternate.liquid +0 -0
  90. /package/{_silex/old → templates}/assets/bg-purpel-silex.webp +0 -0
  91. /package/{_silex/old → templates}/assets/bg-silex-purpel.webp +0 -0
  92. /package/{_silex/old → templates}/assets/empty-projects-sos.gif +0 -0
  93. /package/{assets → templates/assets}/favicon-32x32.png +0 -0
  94. /package/{_silex/old → templates}/assets/logo-silex.svg +0 -0
  95. /package/{_silex/old → templates}/assets/picto-silex@3x.png +0 -0
@@ -0,0 +1,127 @@
1
+ {
2
+ "lang": "en",
3
+ "nav": [
4
+ {
5
+ "label": "Sites",
6
+ "url": "/"
7
+ },
8
+ {
9
+ "label": "Docs",
10
+ "url": "http://docs.silex.me/",
11
+ "target": "_blank"
12
+ },
13
+ {
14
+ "label": "About",
15
+ "url": "https://www.silex.me/",
16
+ "target": "_blank"
17
+ },
18
+ {
19
+ "label": "Community",
20
+ "url": "https://community.silex.me/",
21
+ "target": "_blank"
22
+ },
23
+ {
24
+ "label": "News",
25
+ "url": "https://mail-list.silexlabs.org/subscription/cemnfkaVrK?locale=en-US&source=silex-dashboard",
26
+ "target": "_blank"
27
+ }
28
+ ],
29
+ "footer_links": [
30
+ {
31
+ "title": "Social & community",
32
+ "columns": [
33
+ {
34
+ "label": "About Silex, official website",
35
+ "url": "https://www.silex.me/",
36
+ "target": "_blank"
37
+ },
38
+ {
39
+ "label": "Email the team",
40
+ "url": "mailto:contact+silex-dashboard-footer@silex.me"
41
+ },
42
+ {
43
+ "label": "Sponsors",
44
+ "url": "https://short.silex.me/sponsors"
45
+ },
46
+ {
47
+ "label": "Donate",
48
+ "url": "https://short.silex.me/donate"
49
+ },
50
+ {
51
+ "label": "Community forum",
52
+ "url": "https://short.silex.me/community",
53
+ "target": "_blank"
54
+ },
55
+ {
56
+ "label": "Newsletter",
57
+ "url": "https://news.silex.me/forms/nfrm_weLJnLY5",
58
+ "target": "_blank"
59
+ },
60
+ {
61
+ "label": "Meetups/ Events",
62
+ "url": "https://events.silex.me/",
63
+ "target": "_blank"
64
+ },
65
+ {
66
+ "label": "Mastodon",
67
+ "url": "https://short.silex.me/mastodon",
68
+ "target": "_blank"
69
+ },
70
+ {
71
+ "label": "Chat",
72
+ "url": "https://short.silex.me/chat"
73
+ }
74
+ ]
75
+ },
76
+ {
77
+ "title": "Resources",
78
+ "columns": [
79
+ {
80
+ "label": "Source code",
81
+ "url": "https://short.silex.me/code",
82
+ "target": "_blank"
83
+ },
84
+ {
85
+ "label": "Documentation",
86
+ "url": "http://docs.silex.me/",
87
+ "target": "_blank"
88
+ },
89
+ {
90
+ "label": "Videos",
91
+ "url": "https://video.silex.me/my-library/video-playlists",
92
+ "target": "_blank"
93
+ },
94
+ {
95
+ "label": "Roadmap",
96
+ "url": "https://short.silex.me/roadmap",
97
+ "target": "_blank"
98
+ },
99
+ {
100
+ "label": "Contribute",
101
+ "url": "https://short.silex.me/contribute",
102
+ "target": "_blank"
103
+ }
104
+ ]
105
+ },
106
+ {
107
+ "title": "Articles and reviews",
108
+ "columns": [
109
+ {
110
+ "label": "Silex alternatives",
111
+ "url": "https://short.silex.me/alternatives",
112
+ "target": "_blank"
113
+ },
114
+ {
115
+ "label": "Silex reviews",
116
+ "url": "https://short.silex.me/reviews",
117
+ "target": "_blank"
118
+ },
119
+ {
120
+ "label": "Silex in the press",
121
+ "url": "https://short.silex.me/press",
122
+ "target": "_blank"
123
+ }
124
+ ]
125
+ }
126
+ ]
127
+ }
@@ -0,0 +1,131 @@
1
+ {
2
+ "lang": "fr",
3
+ "nav": [
4
+ {
5
+ "label": "Sites",
6
+ "url": "/"
7
+ },
8
+ {
9
+ "label": "Docs",
10
+ "url": "http://docs.silex.me/",
11
+ "target": "_blank"
12
+ },
13
+ {
14
+ "label": "A propos",
15
+ "url": "https://www.silex.me/",
16
+ "target": "_blank"
17
+ },
18
+ {
19
+ "label": "Communauté",
20
+ "url": "https://community.silex.me/",
21
+ "target": "_blank"
22
+ },
23
+ {
24
+ "label": "News",
25
+ "url": "https://mail-list.silexlabs.org/subscription/cemnfkaVrK?locale=fr-FR&source=silex-dashboard",
26
+ "target": "_blank"
27
+ }
28
+ ],
29
+ "footer_links": [
30
+ {
31
+ "title": "Social & communauté",
32
+ "columns": [
33
+ {
34
+ "label": "A propos de Silex, site officiel",
35
+ "url": "https://www.silex.me/",
36
+ "target": "_blank"
37
+ },
38
+ {
39
+ "label": "Email l'équipe",
40
+ "url": "mailto:contact+silex-dashboard-footer@silex.me",
41
+ "target": "_blank"
42
+ },
43
+ {
44
+ "label": "Sponsors",
45
+ "url": "https://short.silex.me/sponsors",
46
+ "target": "_blank"
47
+ },
48
+ {
49
+ "label": "Faire un don",
50
+ "url": "https://short.silex.me/donate",
51
+ "target": "_blank"
52
+ },
53
+ {
54
+ "label": "Forum de la communauté",
55
+ "url": "https://short.silex.me/community",
56
+ "target": "_blank"
57
+ },
58
+ {
59
+ "label": "Newsletter",
60
+ "url": "https://news.silex.me/forms/nfrm_weLJnLY5",
61
+ "target": "_blank"
62
+ },
63
+ {
64
+ "label": "Meetups/ Evénements",
65
+ "url": "https://events.silex.me/",
66
+ "target": "_blank"
67
+ },
68
+ {
69
+ "label": "Mastodon",
70
+ "url": "https://short.silex.me/mastodon",
71
+ "target": "_blank"
72
+ },
73
+ {
74
+ "label": "Chat",
75
+ "url": "https://short.silex.me/chat",
76
+ "target": "_blank"
77
+ }
78
+ ]
79
+ },
80
+ {
81
+ "title": "Ressources",
82
+ "columns": [
83
+ {
84
+ "label": "Code source",
85
+ "url": "https://short.silex.me/code",
86
+ "target": "_blank"
87
+ },
88
+ {
89
+ "label": "Documentation",
90
+ "url": "http://docs.silex.me/",
91
+ "target": "_blank"
92
+ },
93
+ {
94
+ "label": "Vidéos",
95
+ "url": "https://video.silex.me/my-library/video-playlists",
96
+ "target": "_blank"
97
+ },
98
+ {
99
+ "label": "Feuille de route",
100
+ "url": "https://short.silex.me/roadmap",
101
+ "target": "_blank"
102
+ },
103
+ {
104
+ "label": "Contribuer",
105
+ "url": "https://short.silex.me/contribute",
106
+ "target": "_blank"
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "title": "Articles et revues",
112
+ "columns": [
113
+ {
114
+ "label": "Alternatives à Silex",
115
+ "url": "https://short.silex.me/alternatives_fr",
116
+ "target": "_blank"
117
+ },
118
+ {
119
+ "label": "Revues de Silex",
120
+ "url": "https://short.silex.me/reviews_fr",
121
+ "target": "_blank"
122
+ },
123
+ {
124
+ "label": "Silex dans la presse",
125
+ "url": "https://short.silex.me/press_fr",
126
+ "target": "_blank"
127
+ }
128
+ ]
129
+ }
130
+ ]
131
+ }
package/package.json CHANGED
@@ -1,12 +1,16 @@
1
1
  {
2
2
  "name": "@silexlabs/silex-dashboard",
3
- "version": "1.0.41",
3
+ "version": "1.0.45",
4
4
  "description": "Dashboard for Silex v3",
5
- "main": ".silex.js",
5
+ "main": "silex/server-config.js",
6
6
  "scripts": {
7
- "start": "silex --server-config `pwd`/.silex.js --cors-url * --fs-root `pwd`/_silex --client-config `pwd`/.silex-client.js --debug",
8
- "build": "eleventy",
9
- "serve": "eleventy --serve"
7
+ "start": "concurrently --kill-others \"$npm_execpath run silex:dev\" \"$npm_execpath run 11ty:dev\" \"$npm_execpath run tina:dev\"",
8
+ "build": "start-server-and-test tina:dev http://localhost:4001 11ty:build",
9
+ "silex:dev": "silex --cors-url * --fs-root `pwd`/silex/websites --fs-hosting-root `pwd`/templates --server-config `pwd`/silex/server-config.js --client-config `pwd`/silex/client-config.js --debug",
10
+ "11ty:dev": "npm run 11ty:build -- --serve",
11
+ "11ty:build": "eleventy --config=./11ty/eleventy.config.mjs",
12
+ "tina:dev": "tinacms dev",
13
+ "tina:build": "tinacms build"
10
14
  },
11
15
  "repository": {
12
16
  "type": "git",
@@ -23,13 +27,18 @@
23
27
  },
24
28
  "homepage": "https://github.com/silexlabs/silex-dashboard#readme",
25
29
  "devDependencies": {
26
- "@11ty/eleventy": "^2.0.1",
27
- "@silexlabs/silex": "^3.0.0-alpha.122"
30
+ "@11ty/eleventy": "^3.0.0-alpha.5",
31
+ "@silexlabs/silex": "^3.0.0-alpha.151",
32
+ "@silexlabs/silex-cms": "^0.0.112",
33
+ "@tinacms/cli": "^1.5.43",
34
+ "@types/node": "^20.12.7",
35
+ "concurrently": "^8.2.2",
36
+ "start-server-and-test": "^2.0.3"
28
37
  },
29
38
  "dependencies": {
30
39
  "locale": "^0.1.0",
31
40
  "node_modules-path": "^2.0.7",
32
41
  "serve-static": "^1.15.0",
33
- "vue": "^3.3.7"
42
+ "vue": "^3.4.23"
34
43
  }
35
44
  }
@@ -0,0 +1,24 @@
1
+ import SilexCms from './js/silex-cms/client.js'
2
+
3
+ export default async function (config, options) {
4
+ // Defaults
5
+ const opts = {
6
+ ...options,
7
+ }
8
+ config.addPlugin(SilexCms, {
9
+ dataSources: [{
10
+ id: 'tina',
11
+ type: 'graphql',
12
+ name: 'Tina (Local Files)',
13
+ url: 'http://localhost:4001/graphql',
14
+ method: 'POST',
15
+ headers: {
16
+ 'Content-Type': 'application/json',
17
+ },
18
+ }],
19
+ imagePlugin: false,
20
+ i18nPlugin: true,
21
+ cacheBuster: false,
22
+ fetchPlugin: false,
23
+ })
24
+ }
@@ -26,12 +26,6 @@ module.exports = async function(config, options) {
26
26
  ...options,
27
27
  }
28
28
 
29
- config.setHostingConnectors([
30
- new FsHosting(config, {
31
- path: process.env.SILEX_FS_ROOT,
32
- }),
33
- ])
34
-
35
29
  //config.addStorageConnector([
36
30
  // //new FsStorage(config, {
37
31
  // // path: process.env.SILEX_FS_ROOT,
@@ -48,19 +42,17 @@ module.exports = async function(config, options) {
48
42
  // Serve vue from node_modules
49
43
  config.addPlugin(StaticPlugin, {
50
44
  routes: [{
51
- path: nodeModules('vue') + '/vue/dist',
52
- route: '/js',
53
- }, {
54
- path: nodeModules('@silexlabs/silex') + '/@silexlabs/silex/dist/plugins/client/plugins/client/',
55
- route: '/js',
56
- }, {
57
- path: nodeModules('lit-html') + '/lit-html/',
58
- route: '/js/lit-html/',
45
+ route: '/js/silex-cms/',
46
+ path: node_modules('@silexlabs/silex-cms') + '/@silexlabs/silex-cms/dist/',
59
47
  }],
60
48
  })
61
49
 
62
50
  // Detect language from browser
63
- const languages = JSON.parse(await fs.readFile(join(__dirname, '_data/languages.json')))
51
+ // List of languages from collections/languages/*.json
52
+ const languages = []
53
+ for (const file of await fs.readdir(join(__dirname, '..', 'collections/languages'))) {
54
+ languages.push(JSON.parse(await fs.readFile(join(__dirname, '..', 'collections/languages', file))))
55
+ }
64
56
 
65
57
  // Serve the dashboard and the editor
66
58
  config.on(ServerEvent.STARTUP_START, ({app}) => {
@@ -77,9 +69,7 @@ module.exports = async function(config, options) {
77
69
  router.use('/', serveStatic(opts.rootPath))
78
70
 
79
71
  // Serve scripts
80
- //router.use('/js/vue/', express.static(node_modules('vue') + '/vue'))
81
- //router.use('/js/@silexlabs/silex/', express.static(node_modules('@silexlabs/silex') + '/@silexlabs/silex'))
82
- router.use('/', express.static(join(__dirname, 'public')))
72
+ router.use('/', express.static(join(__dirname, '..', '_site')))
83
73
 
84
74
  // Serve the editor when the ?id param is present in the URL
85
75
  const editorRouter = express.Router()
@@ -0,0 +1,56 @@
1
+
2
+
3
+ export default async function (configData) {
4
+ const data = {
5
+ ...configData,
6
+ lang: 'en',
7
+ }
8
+ const result = {}
9
+ try {
10
+ result['tina'] = (await (await fetch(`http://localhost:4001/graphql`, {
11
+
12
+ headers: {
13
+ 'Content-Type': `application/json`,
14
+ },
15
+ method: 'POST',
16
+ body: JSON.stringify({
17
+ query: `query {
18
+ __typename
19
+ connectorsConnection {
20
+ __typename
21
+ edges {
22
+ __typename
23
+ node {
24
+ __typename
25
+ subtitle
26
+ help
27
+ recommended
28
+ advanced_users
29
+ connectors {
30
+ __typename
31
+ background_color
32
+ color
33
+ auth_url
34
+ description
35
+ icon
36
+ text
37
+
38
+ }
39
+ lang
40
+
41
+ }
42
+
43
+ }
44
+
45
+ }
46
+
47
+ }`,
48
+ })
49
+ })).json()).data
50
+ } catch (e) {
51
+ console.error('11ty plugin for Silex: error fetching graphql data', e, 'tina', 'http://localhost:4001/graphql')
52
+ throw e
53
+ }
54
+ return result
55
+ }
56
+