Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Waku integration #287

Draft
wants to merge 134 commits into
base: release
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
134 commits
Select commit Hold shift + click to select a range
0e645c6
refactor: update to rsc-compatible packages
pmelab Jun 27, 2024
9bf7d78
fix: allow anonymous users to access website settings
pmelab Jun 27, 2024
bfadd73
refactor: load translatable strings directly from drupal
pmelab Jun 27, 2024
1fe1145
refactor: expose page listing from drupal api
pmelab Jun 27, 2024
f8dbde4
refactor: replace gatsby with waku
pmelab Jun 27, 2024
d88d5a1
ci: lagoon test environment for waku
pmelab Jun 27, 2024
6eba226
chore: add react-server-dom-webpack as a dependency
pmelab Jun 27, 2024
cf84240
chore: update schema tests
pmelab Jun 27, 2024
eddb6c6
test: disable broken tests for now
pmelab Jun 27, 2024
222d801
chore: lockfile update
pmelab Jun 27, 2024
bb72b96
WIP
pmelab Jun 27, 2024
499791d
Merge branch 'release' into lagoon-waku
pmelab Jul 3, 2024
027594a
chore: lockfile update
pmelab Jul 3, 2024
dcad444
test: skip decap integration tests
pmelab Jul 3, 2024
0120920
fix: scope tests to website dependencies
pmelab Jul 15, 2024
38f1cde
test: re-enable decap tests
pmelab Jul 15, 2024
9c5c7a8
Merge branch 'release' into lagoon-waku
pmelab Jul 16, 2024
0c67e91
chore(SLB-436): metatags
chindris Jul 4, 2024
61e8b60
chore(SLB-436): prettier fix
chindris Jul 15, 2024
49914a7
chore(SLB-436): enable partially the metatags tests
chindris Jul 16, 2024
444bb40
chore(SLB-436): set the html lang attribute in the useEffect hook
chindris Jul 16, 2024
5260398
chore(SLB-436): add the x-forwarded-* heders and rename the NETLIFY_U…
chindris Jul 17, 2024
d9769bc
chore(SLB-435): redirects
chindris Jul 4, 2024
d3faf86
chore(SLB-435): update the graphql_directives module
chindris Jul 4, 2024
3e45fd5
chore(SLB-435): eslint fixes
chindris Jul 4, 2024
cb99364
chore(SLB-435): redirects command rename
chindris Jul 15, 2024
523ebf6
chore(SLB-435): enable redirects related tests
chindris Jul 17, 2024
4bc1a34
chore(SLB-435): prettier fix
chindris Jul 17, 2024
abb104f
chore(SLB-435): out the redirects to _redirects instead of netlify.toml
chindris Jul 17, 2024
a31ab41
Merge branch 'lagoon-waku' of github.com:AmazeeLabs/silverback-templa…
chindris Jul 18, 2024
90b8f79
chore: move tsx from dev dependencies to dependencies
chindris Jul 18, 2024
71399de
Merge branch 'release' into lagoon-waku
pmelab Jul 25, 2024
2bc4dbd
fix: dumb merge error
pmelab Jul 27, 2024
91448ff
test(SLB-437): re-enable tests
pmelab Jul 27, 2024
0680041
chore: upgrade graphql directives
pmelab Jul 27, 2024
57d575a
Merge branch 'release' into lagoon-waku
pmelab Jul 30, 2024
0a70661
chore: upgrade bridge-storybook to allow custom handlers
pmelab Jul 31, 2024
c412446
chore: remove gatsby directive autoloader
pmelab Jul 31, 2024
188c03a
chore: remove directives only used by gatsby
pmelab Jul 31, 2024
5dcc164
chore: upgrade schema dependencies
pmelab Jul 31, 2024
a78828f
refactor: remove Decap/Drupal separation in schema
pmelab Jul 31, 2024
bc7faa3
feat: add resolver type generation
pmelab Jul 31, 2024
e6222de
refactor: add in-memory graphql api to decap
pmelab Jul 31, 2024
8fb87b8
feat: expose operation executor from cms package
pmelab Jul 31, 2024
f7d36ab
refactor: adjust preview to use executor exposed by the cms package
pmelab Jul 31, 2024
c686b54
fix: use symlink to load assets into waku
pmelab Jul 31, 2024
7023203
refactor: use executors exposed by cms and decap packages
pmelab Jul 31, 2024
15def92
refactor: load pages from all sources
pmelab Jul 31, 2024
a883764
refactor: load translations from all sources
pmelab Jul 31, 2024
aa8245c
chore: lockfile update
pmelab Jul 31, 2024
93a4377
chore(SLB-436): enable the open graph metatag module
chindris Aug 5, 2024
2023179
chore: handle the 404 page on local dev environments
chindris Aug 5, 2024
e7bb6ce
chore: update the 404 path in the strangler function
chindris Aug 5, 2024
faa5343
chore: update the included files for the strangler function in netlif…
chindris Aug 7, 2024
1e1d255
test: check if decap admin available
Leksat Aug 13, 2024
dd5e106
fix(SLB-445): link decap admin into waku
pmelab Aug 14, 2024
55fca99
fix: ignore decap build in eslint
pmelab Aug 14, 2024
d31d93f
refactor(SLB-445): typing nitpick
pmelab Aug 14, 2024
7e9b34e
refactor(SLB-445): rename GRAPHQL_ENDPOINT to DRUPAL_URL in preview
pmelab Aug 14, 2024
b496212
refactor(SLB-445): improve error handling in drupal executor
pmelab Aug 14, 2024
d68f010
refactor(SLB-445): more elegant typing
pmelab Aug 14, 2024
b42b992
chore: safer global var injection
Leksat Aug 15, 2024
cc87404
chore: safer error handling
Leksat Aug 15, 2024
85a4082
refactor(SLB-445): remove leftover files
pmelab Aug 16, 2024
2687ea5
refactor(SLB-445): improve decap preview error handling
pmelab Aug 16, 2024
5de3d47
Merge pull request #296 from AmazeeLabs/SLB-445-waku-decap
pmelab Sep 3, 2024
596f77e
Merge branch 'release' into lagoon-waku
pmelab Sep 3, 2024
8fcf1d7
fix: use resolver types in decap page resolvers to avoid typing issue
pmelab Sep 4, 2024
7f80686
fix: regression in conditional block integration test
pmelab Sep 4, 2024
c5b9737
fix: missing og-attributes in schema tests
pmelab Sep 4, 2024
d6b5404
fix: more specific targeting of title form
pmelab Sep 4, 2024
1ecb761
feat(SLB-354): change the image "source" field to a simple "url"
pmelab Sep 5, 2024
a504360
refactor(SLB-354): change story data to use url's instead of source f…
pmelab Sep 5, 2024
eb9b7eb
feat(SLB-354): add @amazeelabs/image as a dependency
pmelab Sep 5, 2024
0078752
feat(SLB-354): make all components use the new image component
pmelab Sep 5, 2024
9022b63
feat(SLB-354): allow frameworks to alter image urls while rendering
pmelab Sep 5, 2024
b0e5624
fix(SLB-354): ensure images are loaded from backend url on build and …
pmelab Sep 5, 2024
924e1f8
fix(SLB-354): do not bundle sharp and image-dimensions
pmelab Sep 5, 2024
d4a75f6
perf(SLB-354): render page displays on the server and verify images a…
pmelab Sep 5, 2024
c8a13c6
chore(SLB-354): upgrade @amazeelabs/image
pmelab Sep 5, 2024
fcb29fc
chore(SLB-354): upgrade @amazeelabs/image package
pmelab Sep 6, 2024
548effe
fix: load fonts in waku
pmelab Sep 8, 2024
f5271a9
fix: prep preview for cms
pmelab Sep 8, 2024
e9e003c
fix: always prep all packages
pmelab Sep 8, 2024
bd7f3ea
fix: don't attempt to bundle fs in waku
pmelab Sep 8, 2024
98bca43
fix: alias "fs" to "node:fs" to make vite not break
pmelab Sep 10, 2024
bf447b1
fix: prettier
pmelab Sep 10, 2024
1678420
fix: raw-import schema and operations
pmelab Sep 10, 2024
6139e95
fix: build preview before integration tests
pmelab Sep 10, 2024
be36141
test: move gitkeep into public folder
pmelab Sep 10, 2024
e771555
fix: use direct symlinks for static
pmelab Sep 10, 2024
7e491a0
Merge branch 'lagoon-waku' into SLB-354-rsc-images
pmelab Sep 11, 2024
5d9ee44
chore(SLB-354): upgrade @amazeelabs/image
pmelab Sep 11, 2024
58cbb3a
fix(SLB-354): content hub image aspect ratio
pmelab Sep 11, 2024
5500d30
chore(SLB-354): upgrade @amazeelabs/image
pmelab Sep 11, 2024
c328bbf
refactor(SLB-354): pass all image settings
pmelab Sep 11, 2024
01bb0a0
Merge pull request #335 from AmazeeLabs/SLB-354-rsc-images
pmelab Sep 11, 2024
b018812
fix: always use frontend url for graphql requests
pmelab Sep 12, 2024
2241312
feat: add static image directory and favicon
pmelab Sep 12, 2024
570b086
Merge branch 'release' into lagoon-waku
pmelab Sep 12, 2024
2f8a451
chore: upgrade to the latest version of waku and react
pmelab Sep 12, 2024
ad7a009
chore: upgrade waku bridge for compatibility to 0.21.1
pmelab Sep 12, 2024
7d80600
Merge pull request #340 from AmazeeLabs/waku-0.21.1-react-rc-upgrade
pmelab Sep 12, 2024
f0b2fe5
Merge branch 'release' into lagoon-waku
pmelab Sep 12, 2024
f58eb34
test: disabled failing test
pmelab Sep 13, 2024
a4f77ca
Merge branch 'release' into lagoon-waku
pmelab Sep 16, 2024
3dc8015
feat(SLB-385): simple local focalpoint
pmelab Sep 17, 2024
abd1dd3
chore: upgrade @amazeelabs/image for simple focalpoint typing
pmelab Sep 17, 2024
90810f7
feat(SLB-385): pass focalpoint into hero image
pmelab Sep 17, 2024
fccf7c0
fix(SLB-285): integration test case should expect 2 hero images now
pmelab Sep 17, 2024
3342876
Merge pull request #344 from AmazeeLabs/SLB-385-focalpoint-waku
pmelab Sep 17, 2024
07c4eb6
fix: allow empty focal point return values
pmelab Sep 17, 2024
c97739c
fix: check if crop is installed
pmelab Sep 17, 2024
15ad34e
fix(SLB-385): correctly show/hide hero images
pmelab Sep 17, 2024
298c345
Merge branch 'release' into lagoon-waku
pmelab Oct 3, 2024
a5bab57
fix: missing string translation in schema test
pmelab Oct 3, 2024
fecf356
fix: missing dependency to start-server-and-test
pmelab Oct 3, 2024
081b032
fix: make ContentEditLink a client component
pmelab Oct 3, 2024
e7de6c2
fix: prettier!
pmelab Oct 3, 2024
bcb009c
fix: merge regression
pmelab Oct 3, 2024
1431c32
feat(SLB-469): create redirect entries for RSC files
pmelab Oct 3, 2024
7e7ee6c
feat(SLB-469): handle RSC requests in strangler
pmelab Oct 3, 2024
8763635
chore: upgrade strangler package
pmelab Oct 3, 2024
fd3d20a
fix: make home links respect the current language
pmelab Oct 3, 2024
08e79d5
fix: display home icon in breadcrumbs for all languages
pmelab Oct 4, 2024
23349ff
docs: inline explanations
pmelab Oct 4, 2024
5abb49f
fix: set "true" as a build command to stop netlify from guessing one
pmelab Oct 25, 2024
d2dab4f
Merge branch 'lagoon-waku' into SLB-469-redirects
pmelab Oct 25, 2024
874667e
test: await networkidle after changing languages
pmelab Oct 25, 2024
44409ac
Merge branch 'release' into lagoon-waku
pmelab Oct 26, 2024
29bd1e2
Merge branch 'lagoon-waku' into SLB-469-redirects
pmelab Oct 26, 2024
37c3f59
Merge pull request #354 from AmazeeLabs/SLB-469-redirects
pmelab Oct 26, 2024
4422a08
Merge branch 'release' into lagoon-waku
pmelab Dec 6, 2024
eb3af2e
Merge pull request #384 from AmazeeLabs/waku-starter-upgrade-2024-06-12
pmelab Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .lagoon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,16 @@ environments:
schedule: '*/15 * * * *'
command: drush cron
service: cli
lagoon-waku:
routes:
- nginx:
- waku.cms.amazeelabs.dev
- build:
- waku.build.amazeelabs.dev
- preview:
- waku.preview.amazeelabs.dev
cronjobs:
- name: drush cron
schedule: '*/15 * * * *'
command: drush cron
service: cli
28 changes: 28 additions & 0 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function readPackage(pkg) {
const versions = {
react: '19.0.0-rc.0',
'react-dom': '19.0.0-rc.0',
'@types/react': '18.3.3',
'@types/react-dom': '18.3.0',
'react-server-dom-webpack': '19.0.0-rc.0',
typescript: '5.4.5',
graphql: '16.8.1',
waku: '0.21.0-alpha.2',
sharp: '0.33.1',
'vite-imagetools': '6.2.9',
};
for (const type of ['dependencies', 'devDependencies', 'peerDependencies']) {
for (const [name, version] of Object.entries(versions)) {
if (pkg[type] && Object.keys(pkg[type]).includes(name)) {
pkg[type][name] = version;
}
}
}
return pkg;
}

module.exports = {
hooks: {
readPackage,
},
};
7 changes: 7 additions & 0 deletions apps/cms/.lagoon.env.lagoon-waku
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PROJECT_NAME=example
PUBLISHER_URL="https://waku.build.amazeelabs.dev"
NETLIFY_URL="https://waku.amazeelabs.dev"
PREVIEW_URL="https://waku.preview.amazeelabs.dev"

# Used to set the original client secret.
PUBLISHER_OAUTH2_CLIENT_SECRET=REPLACE_ME
2 changes: 2 additions & 0 deletions apps/cms/config/sync/user.role.anonymous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ langcode: en
status: true
dependencies:
module:
- config_pages
- graphql
- media
- system
Expand All @@ -16,3 +17,4 @@ permissions:
- 'access content'
- 'execute main persisted graphql requests'
- 'view media'
- 'view website_settings config page entity'
2 changes: 2 additions & 0 deletions apps/cms/config/sync/user.role.authenticated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dependencies:
config:
- filter.format.webform_default
module:
- config_pages
- file
- filter
- graphql
Expand All @@ -28,3 +29,4 @@ permissions:
- userprotect.mail.edit
- userprotect.pass.edit
- 'view media'
- 'view website_settings config page entity'
215 changes: 215 additions & 0 deletions apps/cms/config/sync/views.view.ssg_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,215 @@
uuid: e82d71cc-9fd3-4548-acbb-14da815b76fb
langcode: en
status: true
dependencies:
module:
- node
- user
id: ssg_pages
label: 'SSG: Pages'
module: views
description: 'Pages to be created during static site generation.'
tag: ''
base_table: node_field_data
base_field: nid
display:
default:
id: default
display_title: Default
display_plugin: default
position: 0
display_options:
fields:
title:
id: title
table: node_field_data
field: title
relationship: none
group_type: group
admin_label: ''
entity_type: node
entity_field: title
plugin_id: field
label: ''
exclude: false
alter:
alter_text: false
make_link: false
absolute: false
word_boundary: false
ellipsis: false
strip_tags: false
trim: false
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: string
settings:
link_to_entity: true
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
pager:
type: mini
options:
offset: 0
items_per_page: 10
total_pages: null
id: 0
tags:
next: ››
previous: ‹‹
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
access:
type: perm
options:
perm: 'access content'
cache:
type: tag
options: { }
empty: { }
sorts:
created:
id: created
table: node_field_data
field: created
relationship: none
group_type: group
admin_label: ''
entity_type: node
entity_field: created
plugin_id: date
order: DESC
expose:
label: ''
field_identifier: ''
exposed: false
granularity: second
arguments: { }
filters:
status:
id: status
table: node_field_data
field: status
entity_type: node
entity_field: status
plugin_id: boolean
value: '1'
group: 1
expose:
operator: ''
type:
id: type
table: node_field_data
field: type
relationship: none
group_type: group
admin_label: ''
entity_type: node
entity_field: type
plugin_id: bundle
operator: in
value: { }
group: 1
exposed: true
expose:
operator_id: type_op
label: 'Content type'
description: ''
use_operator: false
operator: type_op
operator_limit_selection: false
operator_list: { }
identifier: type
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
anonymous: '0'
super_admin: '0'
administrator: '0'
gatsby_build: '0'
editor: '0'
reduce: false
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
style:
type: default
options:
grouping: { }
row_class: ''
default_row_class: true
uses_fields: false
row:
type: 'entity:node'
options:
relationship: none
view_mode: default
query:
type: views_query
options:
query_comment: ''
disable_sql_rewrite: false
distinct: false
replica: false
query_tags: { }
relationships: { }
header: { }
footer: { }
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
- 'user.node_grants:view'
- user.permissions
tags: { }
36 changes: 0 additions & 36 deletions apps/cms/gatsby-config.mjs

This file was deleted.

58 changes: 0 additions & 58 deletions apps/cms/gatsby-node.mjs

This file was deleted.

Loading
Loading