diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index a8f39a873..d9e6ac435 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -59,6 +59,8 @@ jobs:
storybookBaseDir: packages/ui
onlyChanged: true
exitOnceUploaded: true
+ externals: |
+ static/stories/webforms/**
if: ${{ steps.chromatic-check.outputs.available == 'true' }}
- name: Deploy storybook to netlify
diff --git a/.github/workflows/test_without_turbo_cache.yml b/.github/workflows/test_without_turbo_cache.yml
index 837d24c68..c247a595e 100644
--- a/.github/workflows/test_without_turbo_cache.yml
+++ b/.github/workflows/test_without_turbo_cache.yml
@@ -3,11 +3,14 @@ on:
workflow_dispatch:
jobs:
-
test:
name: Test
runs-on: ubuntu-20.04
steps:
+ - name: Init check
+ if: ${{ github.repository != 'AmazeeLabs/silverback-template'}}
+ run: echo 'Please run the INIT script. See the root README.md for instructions.' && false
+
- name: Checkout
uses: actions/checkout@v3
with:
@@ -16,8 +19,18 @@ jobs:
- name: Setup
uses: ./.github/actions/setup
+ - name: TurboRepo local server
+ uses: felixmosh/turborepo-gh-artifacts@v2
+ with:
+ server-token: 'local'
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+
- name: Test
- run: pnpm turbo:test
+ run: pnpm turbo:test:force
+ env:
+ TURBO_API: 'http://127.0.0.1:9080'
+ TURBO_TOKEN: 'local'
+ TURBO_TEAM: 'local'
- name: Upload Playwright report
uses: actions/upload-artifact@v3
diff --git a/.lagoon.yml b/.lagoon.yml
index 8261b6b63..22179218c 100644
--- a/.lagoon.yml
+++ b/.lagoon.yml
@@ -36,6 +36,8 @@ environments:
- example.cms.amazeelabs.dev
- build:
- example.build.amazeelabs.dev
+ - preview:
+ - example.preview.amazeelabs.dev
cronjobs:
- name: drush cron
schedule: '*/15 * * * *'
@@ -47,6 +49,8 @@ environments:
- stage-example.cms.amazeelabs.dev
- build:
- stage-example.build.amazeelabs.dev
+ - preview:
+ - stage-example.preview.amazeelabs.dev
cronjobs:
- name: drush cron
schedule: '*/15 * * * *'
@@ -58,6 +62,8 @@ environments:
- dev-example.cms.amazeelabs.dev
- build:
- dev-example.build.amazeelabs.dev
+ - preview:
+ - dev-example.preview.amazeelabs.dev
cronjobs:
- name: drush cron
schedule: '*/15 * * * *'
diff --git a/.lagoon/Dockerfile b/.lagoon/Dockerfile
index f81105156..214c1fdbb 100644
--- a/.lagoon/Dockerfile
+++ b/.lagoon/Dockerfile
@@ -15,7 +15,7 @@ RUN npm install -g pnpm@8.6.12 && pnpm config set store-dir /tmp/cache/pnpm
# Copy pnpm lockfile and install dependencies.
COPY pnpm-lock.yaml .npmrc /app/
-#COPY patches /app/patches
+# COPY patches /app/patches
RUN --mount=type=cache,target=/tmp/cache pnpm fetch && \
# There is a bug in pnpm: `pnpm fetch` creates _some_ node_modules folders
# with _some_ packages. This can lead to an incomplete package installation.
@@ -47,6 +47,7 @@ RUN --mount=type=cache,target=/tmp/cache pnpm i && \
# Deploy apps.
RUN --mount=type=cache,target=/tmp/cache pnpm deploy --filter "@custom/cms" /tmp/.deploy/cms --prod
RUN --mount=type=cache,target=/tmp/cache pnpm deploy --filter "@custom/website" /tmp/.deploy/website --prod
+RUN --mount=type=cache,target=/tmp/cache pnpm deploy --filter "@custom/preview" /tmp/.deploy/preview --prod
# ====================================================================================================
# CLI IMAGE
@@ -82,11 +83,22 @@ FROM uselagoon/nginx-drupal as nginx
COPY --from=cli /app /app
RUN cd /app/web && cp ../node_modules/@custom/ui/build/gutenberg.css .
+RUN cd /app/web && cp ../node_modules/@custom/ui/build/iframe.css .
COPY .lagoon/nginx-conf/redirects-map.conf /etc/nginx/redirects-map.conf
WORKDIR /app
ENV WEBROOT=web
+# ====================================================================================================
+# PREVIEW IMAGE
+# ====================================================================================================
+
+FROM uselagoon/node-18:23.12.0 as preview
+
+RUN npm install -g pnpm@8.6.0
+COPY --from=builder /tmp/.deploy/preview /app
+CMD pnpm start
+
# ====================================================================================================
# PUBLISHER IMAGE
# ====================================================================================================
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 4929af1d2..df21dac26 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -31,5 +31,7 @@
"*.profile": "php"
},
"graphql-config.load.filePath": ".graphqlrc.json",
- "graphql-config.load.rootDir": "packages/schema"
+ "graphql-config.load.rootDir": "packages/schema",
+ "phpsab.executablePathCBF": "./apps/cms/vendor/bin/phpcbf",
+ "phpsab.executablePathCS": "./apps/cms/vendor/bin/phpcs"
}
diff --git a/apps/cms/.idea/.gitignore b/apps/cms/.idea/.gitignore
new file mode 100644
index 000000000..13566b81b
--- /dev/null
+++ b/apps/cms/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/apps/cms/.idea/cms.iml b/apps/cms/.idea/cms.iml
new file mode 100644
index 000000000..41df93773
--- /dev/null
+++ b/apps/cms/.idea/cms.iml
@@ -0,0 +1,273 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/cms/.idea/codeStyles/Project.xml b/apps/cms/.idea/codeStyles/Project.xml
new file mode 100644
index 000000000..a1863d2ed
--- /dev/null
+++ b/apps/cms/.idea/codeStyles/Project.xml
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/cms/.idea/codeStyles/codeStyleConfig.xml b/apps/cms/.idea/codeStyles/codeStyleConfig.xml
new file mode 100644
index 000000000..79ee123c2
--- /dev/null
+++ b/apps/cms/.idea/codeStyles/codeStyleConfig.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/apps/cms/.idea/commandlinetools/Drush_4_12_24__2_49_PM.xml b/apps/cms/.idea/commandlinetools/Drush_4_12_24__2_49_PM.xml
new file mode 100644
index 000000000..0f81233af
--- /dev/null
+++ b/apps/cms/.idea/commandlinetools/Drush_4_12_24__2_49_PM.xml
@@ -0,0 +1,784 @@
+
+
+
+ _complete
+ Internal command to provide shell completion suggestions No arguments Options: shell The shell type ("bash", "fish", "zsh")input An array of input tokens (e.g. COMP_WORDS or argv)current The index of the "input" array that the cursor is in (e.g. COMP_CWORD)api-version The API version of the completion scriptsymfony deprecatedhelp Display help for the given command. When no command is given display help for the list commandquiet Do not output any messageverbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debugversion Display this application versionansi Force (or disable --no-ansi) ANSI outputno-ansi Negate the "--ansi" optionno-interaction Do not ask any interactive questionyes Auto-accept the default for all user prompts. Equivalent to --no-interaction.no Cancels at any confirmation prompt.root The Drupal root for this site.uri A base URL for building links and selecting a multi-site. Defaults to https://default .simulate Run in simulated mode (show what would have happened).define Define a configuration item value.