Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release' into dev
Browse files Browse the repository at this point in the history
# Conflicts:
#       packages/schema/package.json
#       pnpm-lock.yaml
  • Loading branch information
Leksat committed Jul 4, 2024
2 parents e473601 + 1d2e7db commit 87f7f88
Show file tree
Hide file tree
Showing 16 changed files with 174 additions and 242 deletions.
5 changes: 2 additions & 3 deletions apps/cms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
"description": "Drupal based content management system.",
"sideEffects": false,
"scripts": {
"prep:composer": "if command -v composer; then composer install; else echo 'Skipping composer install.'; fi",
"prep:composer": "if command -v composer; then COMPOSER_ALLOW_SUPERUSER=1 composer install; else echo 'Skipping composer install.'; fi",
"prep:database": "./prep-database.sh",
"prep:schema": "pnpm drush silverback-gatsby:schema-export ../../../tests/schema || true",
"fix-premissions": "chmod +w web/sites/default/files/.htaccess && chmod +w web/sites/default/files/private/.htaccess",
"ensure-working-db": "pnpm drush sqlq 'select * from node'",
"drush": "SB_ENVIRONMENT=1 SIMPLETEST_DB=sqlite://localhost/sites/default/files/.sqlite DRUSH_OPTIONS_URI=http://127.0.0.1:8888 vendor/bin/drush",
"silverback": "SB_ENVIRONMENT=1 SIMPLETEST_DB=sqlite://localhost/sites/default/files/.sqlite SB_ADMIN_USER=admin SB_ADMIN_PASS=admin vendor/bin/silverback",
"drupal-install": "SB_SETUP=1 pnpm silverback setup --profile minimal && pnpm content:import && pnpm drush php-eval 'node_access_rebuild();' && rm -rf install-cache.zip && pnpm fix-premissions && pnpm ensure-working-db",
"drupal-install": "SB_SETUP=1 pnpm silverback setup --profile minimal && pnpm content:import && pnpm drush php-eval 'node_access_rebuild();' && rm -rf install-cache.zip && pnpm fix-premissions",
"export-webforms": "pnpm turbo --filter '@custom-tests/e2e' webform-snapshots",
"start": "cd web; SB_ENVIRONMENT=1 SIMPLETEST_DB=sqlite://localhost/sites/default/files/.sqlite DRUSH_OPTIONS_URI=http://127.0.0.1:8888 php -S 0.0.0.0:8888 .ht.router.php # no drush to avoid the drush server timeout",
"dev": "pnpm start",
Expand Down
4 changes: 2 additions & 2 deletions apps/cms/turbo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["//"],
"pipeline": {
"tasks": {
"prep": {
"dependsOn": ["prep:schema"]
},
Expand All @@ -27,7 +27,7 @@
"outputs": [
"drush/**",
"vendor/**",
"!**/.git/**",
"!*/**/.git/**",
"web/**",
"!web/modules/custom/**",
"!web/themes/custom/**",
Expand Down
10 changes: 4 additions & 6 deletions apps/decap/src/helpers/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { buildResponsiveImage } from '@amazeelabs/cloudinary-responsive-image';
import { createResolveConfig } from '@amazeelabs/graphql-directives';
import {
AnyOperationId,
ImageSource,
OperationId,
OperationResult,
OperationVariables,
} from '@custom/schema';
Expand Down Expand Up @@ -51,7 +51,7 @@ const responsiveImage: GraphQLFieldResolver<
) as ImageSource;
};

export async function query<TOperation extends OperationId<any, any>>(
export async function query<TOperation extends AnyOperationId>(
operation: TOperation,
rootValue: any,
variables: OperationVariables<TOperation> = {},
Expand Down Expand Up @@ -84,7 +84,7 @@ export async function query<TOperation extends OperationId<any, any>>(
return result.data;
}

export function useQuery<TOperation extends OperationId<any, any>>(
export function useQuery<TOperation extends AnyOperationId>(
operation: TOperation,
rootValue: any,
variables: OperationVariables<TOperation> = {},
Expand Down Expand Up @@ -114,9 +114,7 @@ export function useQuery<TOperation extends OperationId<any, any>>(

export type useQueryType = typeof useQuery;

export function createPreview<
TOperation extends OperationId<{ preview?: any }, any>,
>(
export function createPreview<TOperation extends AnyOperationId>(
query: TOperation,
schema: ZodType<any, ZodTypeDef, unknown>,
Component: React.FC<{
Expand Down
2 changes: 1 addition & 1 deletion apps/decap/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://turborepo.org/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"prep:vite": {
"dependsOn": ["^prep"],
"inputs": ["src/**", "vite.config.ts", "index.html"],
Expand Down
2 changes: 1 addition & 1 deletion apps/preview/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ declare global {
}
}

const updates$ = webSocket({
const updates$ = webSocket<any>({
url: `${window.location.origin.replace('http', 'ws')}/__preview`,
}).pipe(
retry({
Expand Down
2 changes: 1 addition & 1 deletion apps/preview/turbo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["//"],
"pipeline": {
"tasks": {
"prep": {
"dependsOn": ["prep:app", "prep:server"]
},
Expand Down
2 changes: 1 addition & 1 deletion apps/website/turbo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["//"],
"pipeline": {
"tasks": {
"dev": {
"persistent": true,
"dependsOn": ["prep", "^prep"]
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"node": "^18.19.0",
"pnpm": "8.6.12"
},
"packageManager": "[email protected]",
"scripts": {
"postinstall": "husky install || true",
"commit": "git-cz",
Expand All @@ -16,11 +17,11 @@
"test:format:root": "pnpm prettier --ignore-unknown '**/**'",
"test:format:workspaces": "pnpm --workspace-concurrency=1 -r exec prettier --ignore-unknown '**/**'",
"turbo:local": "if [ -z $CI ]; then echo $(date)$RANDOM > apps/cms/turbo-seed.txt; fi",
"turbo:test": "pnpm turbo:local && pnpm tb test:unit --no-daemon --go-fallback --output-logs=new-only && pnpm tb test:integration --no-daemon --go-fallback --output-logs=new-only --concurrency=1",
"turbo:test:force": "pnpm tb test:unit --no-daemon --go-fallback --output-logs=new-only --force && pnpm tb test:integration --no-daemon --go-fallback --output-logs=new-only --concurrency=1 --force",
"turbo:test:quick": "pnpm turbo:local && pnpm tb test:unit --no-daemon --go-fallback --output-logs=new-only",
"turbo:prep": "pnpm turbo:local && pnpm tb prep --no-daemon --go-fallback --output-logs=new-only",
"turbo:prep:force": "rm -f apps/cms/web/sites/default/files/.sqlite && pnpm tb prep --no-daemon --go-fallback --force",
"turbo:test": "pnpm turbo:local && pnpm turbo test:unit --output-logs=new-only && pnpm turbo test:integration --output-logs=new-only --concurrency=1",
"turbo:test:force": "pnpm turbo test:unit --output-logs=new-only --force && pnpm turbo test:integration --output-logs=new-only --concurrency=1 --force",
"turbo:test:quick": "pnpm turbo:local && pnpm turbo test:unit --output-logs=new-only",
"turbo:prep": "pnpm turbo:local && pnpm turbo prep --output-logs=new-only",
"turbo:prep:force": "rm -f apps/cms/web/sites/default/files/.sqlite && pnpm turbo prep --force",
"gutenberg:generate": "pnpm run --filter \"@custom/gutenberg_blocks\" gutenberg:generate"
},
"private": true,
Expand All @@ -39,7 +40,7 @@
"eslint-plugin-simple-import-sort": "^10.0.0",
"husky": "^8.0.3",
"prettier": "^3.2.5",
"turbo": "^1.11.2",
"turbo": "^2.0.6",
"typescript": "^5.3.3",
"vitest": "^1.1.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/drupal/gutenberg_blocks/turbo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": ["//"],
"pipeline": {
"tasks": {
"test:static": {
"inputs": ["src/**"]
},
Expand Down
2 changes: 1 addition & 1 deletion packages/schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@amazeelabs/executors": "^3.0.2",
"@amazeelabs/executors": "^3.0.3",
"@amazeelabs/gatsby-silverback-cloudinary": "^1.2.7",
"@amazeelabs/gatsby-source-silverback": "^1.14.0",
"@amazeelabs/scalars": "^1.6.13",
Expand Down
2 changes: 1 addition & 1 deletion packages/schema/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://turborepo.org/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"prep:directives": {
"dependsOn": ["@custom/cms#prep:composer"],
"inputs": ["package.json"],
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://turborepo.org/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"prep:fonts": {
"inputs": ["static/public/fonts/preload/**"],
"outputs": ["build/preloaded-fonts.json"]
Expand Down
Loading

0 comments on commit 87f7f88

Please sign in to comment.