Compare commits

...

No commits in common. "principale" and "gleam" have entirely different histories.

1627 changed files with 225798 additions and 27478 deletions

View file

@ -0,0 +1,13 @@
name: ddev-vite-sidecar
repository: s2b/ddev-vite-sidecar
version: 1.1.0
install_date: "2024-10-02T19:02:43+02:00"
project_files:
- commands/web/vite
- apache/vite.conf
- nginx_full/vite.conf
- vite/vite-server-not-running.html
- config.vite.yaml
- web-build/Dockerfile.vite
global_files: []
removal_actions: []

View file

@ -0,0 +1,10 @@
name: phpmyadmin
repository: ddev/ddev-phpmyadmin
version: v0.3.9
install_date: "2024-11-15T17:27:23+01:00"
project_files:
- docker-compose.phpmyadmin.yaml
- docker-compose.phpmyadmin_norouter.yaml
- commands/host/phpmyadmin
global_files: []
removal_actions: []

View file

@ -0,0 +1,19 @@
name: redis
repository: ddev/ddev-redis-7
version: v2.7.1
install_date: "2024-11-14T13:56:41+01:00"
project_files:
- commands/redis/redis
- commands/redis/redis-flush
- redis/redis.conf
- redis/advanced.conf
- redis/append.conf
- redis/general.conf
- redis/io.conf
- redis/memory.conf
- redis/network.conf
- redis/security.conf
- redis/snapshots.conf
- docker-compose.redis.yaml
global_files: []
removal_actions: []

30
.ddev/apache/vite.conf Executable file
View file

@ -0,0 +1,30 @@
#ddev-generated
<VirtualHost *:80>
ServerName vite.haikuatelier.fr.ddev.site
DocumentRoot /mnt/ddev_config/vite/
ErrorDocument 503 "/vite-server-not-running.html"
# Proxy development server
ProxyPass / http://localhost:5173/
ProxyPassReverse / http://localhost:5173/
# Proxy websockets
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://localhost:5173/$1" [P,L]
# Do not proxy files in /vite to display the static 503 error message
<Location "/vite-server-not-running.html">
ProxyPass !
</Location>
<Directory "/mnt/ddev_config/vite/">
Require all granted
</Directory>
ErrorLog /dev/stdout
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias "/phpstatus" "/var/www/phpstatus.php"
</VirtualHost>

19
.ddev/commands/host/phpmyadmin Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
## #ddev-generated: If you want to edit and own this file, remove this line.
## Description: Launch a browser with PhpMyAdmin
## Usage: phpmyadmin
## Example: "ddev phpmyadmin"
DDEV_PHPMYADMIN_PORT=8036
DDEV_PHPMYADMIN_HTTPS_PORT=8037
if [ ${DDEV_PRIMARY_URL%://*} = "http" ] || [ -n "${GITPOD_WORKSPACE_ID:-}" ] || [ "${CODESPACES:-}" = "true" ]; then
# Gitpod: "gp preview" opens a blank page for PhpMyAdmin, use "xdg-open" instead
if [ "${OSTYPE:-}" = "linux-gnu" ] && [ -n "${GITPOD_WORKSPACE_ID:-}" ] && [ -z "${DDEV_DEBUG:-}" ]; then
xdg-open "$(DDEV_DEBUG=true ddev launch :$DDEV_PHPMYADMIN_PORT | grep "FULLURL" | awk '{print $2}')"
else
ddev launch :$DDEV_PHPMYADMIN_PORT
fi
else
ddev launch :$DDEV_PHPMYADMIN_HTTPS_PORT
fi

7
.ddev/commands/redis/redis Executable file
View file

@ -0,0 +1,7 @@
#!/bin/sh
#ddev-generated
## Description: Run redis-cli inside the redis container
## Usage: redis [flags] [args]
## Example: "redis KEYS *" or "ddev redis-cli INFO" or "ddev redis-cli --version"
redis-cli -p 6379 -h redis -a redis --no-auth-warning "$@"

7
.ddev/commands/redis/redis-cli Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
#ddev-generated
## Description: Run redis-cli inside the redis container
## Usage: redis-cli [flags] [args]
## Example: "ddev redis-cli KEYS *" or "ddev redis-cli INFO" or "ddev redis-cli --version"
redis-cli -p 6379 -h redis $@

View file

@ -0,0 +1,7 @@
#!/bin/sh
#ddev-generated
## Description: Run redis-cli inside the redis container
## Usage: redis-flush
## Example: "redis-flush"
redis-cli -a redis --no-auth-warning FLUSHALL ASYNC

49
.ddev/commands/web/vite Executable file
View file

@ -0,0 +1,49 @@
#!/bin/bash
#ddev-generated
## Description: Run vite inside the web container. Servers started by vite (dev, preview) are proxied and made available at https://vite.$PROJECTNAME.ddev.site
## Usage: vite dev|serve|build|optimize|preview [flags] [args]
## Example: "ddev vite" or "ddev vite build" or "ddev vite build --outDir path/to/output/"
## ExecRaw: true
## HostWorkingDir: true
## AutocompleteTerms: ["dev","serve","build","optimize","preview"]
# Preferred package manager can be specified via VITE_PACKAGE_MANAGER environment variable in config.vite.yaml
PACKAGE_MANAGER="${VITE_PACKAGE_MANAGER:-npm}"
COMMAND="${1:-dev}"
OPTIONS=$@
case $PACKAGE_MANAGER in
npm | npx)
PACKAGE_MANAGER_COMMAND="npx vite"
;;
yarn)
PACKAGE_MANAGER_COMMAND="yarn exec vite --"
;;
pnpm)
PACKAGE_MANAGER_COMMAND="pnpm exec vite"
;;
bun)
PACKAGE_MANAGER_COMMAND="bun vite"
;;
*)
echo "Invalid node package manager specified: $PACKAGE_MANAGER"
exit 1
;;
esac
if [[ "${COMMAND:0:1}" == "-" ]]; then
COMMAND="dev"
else
OPTIONS="${@:2}"
fi
echo "Using $PACKAGE_MANAGER to run vite..."
if [[ $COMMAND == "dev" ]] || [[ $COMMAND == "serve" ]] || [[ $COMMAND == "preview" ]]; then
$PACKAGE_MANAGER_COMMAND $COMMAND --host --port 5173 --strictPort $OPTIONS
else
$PACKAGE_MANAGER_COMMAND $COMMAND $OPTIONS
fi

16
.ddev/config.vite.yaml Executable file
View file

@ -0,0 +1,16 @@
# ddev-generated
additional_hostnames:
- vite.haikuatelier.fr
web_environment:
- VITE_SERVER_URI=https://vite.haikuatelier.fr.ddev.site
- VITE_PACKAGE_MANAGER=pnpm
# Enable these lines if you want to expose the vite port to the host system
# Note that this means that only one ddev project with vite can be run at a time
# as the different processes might interfere with each other
#
# web_extra_exposed_ports:
# - name: vite
# container_port: 5173
# http_port: 5172
# https_port: 5173

286
.ddev/config.yaml Executable file
View file

@ -0,0 +1,286 @@
name: haikuatelier.fr
type: wordpress
docroot: web
php_version: "8.4"
webserver_type: nginx-fpm
xdebug_enabled: false
additional_hostnames:
- vite.haikuatelier.fr
additional_fqdns: []
database:
type: mariadb
version: "11.4"
use_dns_when_possible: true
composer_version: "2"
web_environment:
- VITE_SERVER_URI=https://vite.haikuatelier.fr.ddev.site
- VITE_PACKAGE_MANAGER=pnpm
corepack_enable: true
# Key features of DDEV's config.yaml:
# name: <projectname> # Name of the project, automatically provides
# http://projectname.ddev.site and https://projectname.ddev.site
# type: <projecttype> # backdrop, cakephp, craftcms, drupal, drupal6, drupal7, drupal8, drupal9, drupal10, drupal11, laravel, magento, magento2, php, shopware6, silverstripe, symfony, typo3, wordpress
# See https://ddev.readthedocs.io/en/stable/users/quickstart/ for more
# information on the different project types
# docroot: <relative_path> # Relative path to the directory containing index.php.
# php_version: "8.3" # PHP version to use, "5.6" through "8.4"
# You can explicitly specify the webimage but this
# is not recommended, as the images are often closely tied to DDEV's' behavior,
# so this can break upgrades.
# webimage: <docker_image> # nginx/php docker image.
# database:
# type: <dbtype> # mysql, mariadb, postgres
# version: <version> # database version, like "10.11" or "8.0"
# MariaDB versions can be 5.5-10.8, 10.11, and 11.4.
# MySQL versions can be 5.5-8.0.
# PostgreSQL versions can be 9-17.
# router_http_port: <port> # Port to be used for http (defaults to global configuration, usually 80)
# router_https_port: <port> # Port for https (defaults to global configuration, usually 443)
# xdebug_enabled: false # Set to true to enable Xdebug and "ddev start" or "ddev restart"
# Note that for most people the commands
# "ddev xdebug" to enable Xdebug and "ddev xdebug off" to disable it work better,
# as leaving Xdebug enabled all the time is a big performance hit.
# xhprof_enabled: false # Set to true to enable Xhprof and "ddev start" or "ddev restart"
# Note that for most people the commands
# "ddev xhprof" to enable Xhprof and "ddev xhprof off" to disable it work better,
# as leaving Xhprof enabled all the time is a big performance hit.
# webserver_type: nginx-fpm or apache-fpm
# timezone: Europe/Berlin
# If timezone is unset, DDEV will attempt to derive it from the host system timezone
# using the $TZ environment variable or the /etc/localtime symlink.
# This is the timezone used in the containers and by PHP;
# it can be set to any valid timezone,
# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# For example Europe/Dublin or MST7MDT
# composer_root: <relative_path>
# Relative path to the Composer root directory from the project root. This is
# the directory which contains the composer.json and where all Composer related
# commands are executed.
# composer_version: "2"
# You can set it to "" or "2" (default) for Composer v2 or "1" for Composer v1
# to use the latest major version available at the time your container is built.
# It is also possible to use each other Composer version channel. This includes:
# - 2.2 (latest Composer LTS version)
# - stable
# - preview
# - snapshot
# Alternatively, an explicit Composer version may be specified, for example "2.2.18".
# To reinstall Composer after the image was built, run "ddev debug rebuild".
# nodejs_version: "22"
# change from the default system Node.js version to any other version.
# See https://ddev.readthedocs.io/en/stable/users/configuration/config/#nodejs_version for more information
# and https://www.npmjs.com/package/n#specifying-nodejs-versions for the full documentation,
# Note that using of 'ddev nvm' is discouraged because "nodejs_version" is much easier to use,
# can specify any version, and is more robust than using 'nvm'.
# corepack_enable: false
# Change to 'true' to 'corepack enable' and gain access to latest versions of yarn/pnpm
# additional_hostnames:
# - somename
# - someothername
# would provide http and https URLs for "somename.ddev.site"
# and "someothername.ddev.site".
# additional_fqdns:
# - example.com
# - sub1.example.com
# would provide http and https URLs for "example.com" and "sub1.example.com"
# Please take care with this because it can cause great confusion.
# upload_dirs: "custom/upload/dir"
#
# upload_dirs:
# - custom/upload/dir
# - ../private
#
# would set the destination paths for ddev import-files to <docroot>/custom/upload/dir
# When Mutagen is enabled this path is bind-mounted so that all the files
# in the upload_dirs don't have to be synced into Mutagen.
# disable_upload_dirs_warning: false
# If true, turns off the normal warning that says
# "You have Mutagen enabled and your 'php' project type doesn't have upload_dirs set"
# ddev_version_constraint: ""
# Example:
# ddev_version_constraint: ">= 1.22.4"
# This will enforce that the running ddev version is within this constraint.
# See https://github.com/Masterminds/semver#checking-version-constraints for
# supported constraint formats
# working_dir:
# web: /var/www/html
# db: /home
# would set the default working directory for the web and db services.
# These values specify the destination directory for ddev ssh and the
# directory in which commands passed into ddev exec are run.
# omit_containers: [db, ddev-ssh-agent]
# Currently only these containers are supported. Some containers can also be
# omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit
# the "db" container, several standard features of DDEV that access the
# database container will be unusable. In the global configuration it is also
# possible to omit ddev-router, but not here.
# performance_mode: "global"
# DDEV offers performance optimization strategies to improve the filesystem
# performance depending on your host system. Should be configured globally.
#
# If set, will override the global config. Possible values are:
# - "global": uses the value from the global config.
# - "none": disables performance optimization for this project.
# - "mutagen": enables Mutagen for this project.
# - "nfs": enables NFS for this project.
#
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#nfs
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen
# fail_on_hook_fail: False
# Decide whether 'ddev start' should be interrupted by a failing hook
# host_https_port: "59002"
# The host port binding for https can be explicitly specified. It is
# dynamic unless otherwise specified.
# This is not used by most people, most people use the *router* instead
# of the localhost port.
# host_webserver_port: "59001"
# The host port binding for the ddev-webserver can be explicitly specified. It is
# dynamic unless otherwise specified.
# This is not used by most people, most people use the *router* instead
# of the localhost port.
# host_db_port: "59002"
# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
# unless explicitly specified.
# mailpit_http_port: "8025"
# mailpit_https_port: "8026"
# The Mailpit ports can be changed from the default 8025 and 8026
# host_mailpit_port: "8025"
# The mailpit port is not normally bound on the host at all, instead being routed
# through ddev-router, but it can be bound directly to localhost if specified here.
# webimage_extra_packages: [php7.4-tidy, php-bcmath]
# Extra Debian packages that are needed in the webimage can be added here
# dbimage_extra_packages: [telnet,netcat]
# Extra Debian packages that are needed in the dbimage can be added here
# use_dns_when_possible: true
# If the host has internet access and the domain configured can
# successfully be looked up, DNS will be used for hostname resolution
# instead of editing /etc/hosts
# Defaults to true
# project_tld: ddev.site
# The top-level domain used for project URLs
# The default "ddev.site" allows DNS lookup via a wildcard
# If you prefer you can change this to "ddev.local" to preserve
# pre-v1.9 behavior.
# ngrok_args: --basic-auth username:pass1234
# Provide extra flags to the "ngrok http" command, see
# https://ngrok.com/docs/ngrok-agent/config or run "ngrok http -h"
# disable_settings_management: false
# If true, DDEV will not create CMS-specific settings files like
# Drupal's settings.php/settings.ddev.php or TYPO3's additional.php
# In this case the user must provide all such settings.
# You can inject environment variables into the web container with:
# web_environment:
# - SOMEENV=somevalue
# - SOMEOTHERENV=someothervalue
# no_project_mount: false
# (Experimental) If true, DDEV will not mount the project into the web container;
# the user is responsible for mounting it manually or via a script.
# This is to enable experimentation with alternate file mounting strategies.
# For advanced users only!
# bind_all_interfaces: false
# If true, host ports will be bound on all network interfaces,
# not the localhost interface only. This means that ports
# will be available on the local network if the host firewall
# allows it.
# default_container_timeout: 120
# The default time that DDEV waits for all containers to become ready can be increased from
# the default 120. This helps in importing huge databases, for example.
# web_extra_exposed_ports:
# - name: nodejs
# container_port: 3000
# http_port: 2999
# https_port: 3000
# - name: something
# container_port: 4000
# https_port: 4000
# http_port: 3999
# Allows a set of extra ports to be exposed via ddev-router
# Fill in all three fields even if you dont intend to use the https_port!
# If you dont add https_port, then it defaults to 0 and ddev-router will fail to start.
#
# The port behavior on the ddev-webserver must be arranged separately, for example
# using web_extra_daemons.
# For example, with a web app on port 3000 inside the container, this config would
# expose that web app on https://<project>.ddev.site:9999 and http://<project>.ddev.site:9998
# web_extra_exposed_ports:
# - name: myapp
# container_port: 3000
# http_port: 9998
# https_port: 9999
# web_extra_daemons:
# - name: "http-1"
# command: "/var/www/html/node_modules/.bin/http-server -p 3000"
# directory: /var/www/html
# - name: "http-2"
# command: "/var/www/html/node_modules/.bin/http-server /var/www/html/sub -p 3000"
# directory: /var/www/html
# override_config: false
# By default, config.*.yaml files are *merged* into the configuration
# But this means that some things can't be overridden
# For example, if you have 'use_dns_when_possible: true'' you can't override it with a merge
# and you can't erase existing hooks or all environment variables.
# However, with "override_config: true" in a particular config.*.yaml file,
# 'use_dns_when_possible: false' can override the existing values, and
# hooks:
# post-start: []
# or
# web_environment: []
# or
# additional_hostnames: []
# can have their intended affect. 'override_config' affects only behavior of the
# config.*.yaml file it exists in.
# Many DDEV commands can be extended to run tasks before or after the
# DDEV command is executed, for example "post-start", "post-import-db",
# "pre-composer", "post-composer"
# See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more
# information on the commands that can be extended and the tasks you can define
# for them. Example:
# hooks:
# Un-comment to emit the WP CLI version after ddev start.
# post-start:
# - exec: wp cli version

View file

@ -0,0 +1,30 @@
# ddev-generated
services:
phpmyadmin:
container_name: ddev-${DDEV_SITENAME}-phpmyadmin
image: phpmyadmin:5.2.0
working_dir: "/root"
restart: "no"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT
volumes:
- ".:/mnt/ddev_config"
- "ddev-global-cache:/mnt/ddev-global-cache"
expose:
- "80"
environment:
- PMA_USER=root
- PMA_PASSWORD=root
- PMA_HOST=db
- PMA_PORT=3306
- VIRTUAL_HOST=$DDEV_HOSTNAME
- UPLOAD_LIMIT=4000M
- HTTP_EXPOSE=8036:80
- HTTPS_EXPOSE=8037:80
healthcheck:
interval: 120s
timeout: 2s
retries: 1
depends_on:
- db

View file

@ -0,0 +1,4 @@
# ddev-generated
# If omit_containers[ddev-router] then this file will be replaced
# with another with a `ports` statement to directly expose port 80 to 8036
services: {}

34
.ddev/docker-compose.redis.yaml Executable file
View file

@ -0,0 +1,34 @@
# ddev-generated
volumes:
redis:
name: ddev-${DDEV_SITENAME}-redis
labels:
com.ddev.site-name: ${DDEV_SITENAME}
services:
redis:
container_name: ddev-${DDEV_SITENAME}-redis
hostname: ddev-${DDEV_SITENAME}-minio
image: redis:7.2-alpine
command: /etc/redis/conf/redis.conf
volumes:
- ".:/mnt/ddev_config"
- "ddev-global-cache:/mnt/ddev-global-cache"
- "./redis:/etc/redis/conf"
- "redis:/data"
expose:
- 6379
networks:
- default
deploy:
resources:
limits:
cpus: "2.5"
memory: "768M"
reservations:
cpus: "1.5"
memory: "512M"
restart: "no"
labels:
com.ddev.site-name: ${DDEV_SITENAME}
com.ddev.approot: $DDEV_APPROOT

33
.ddev/nginx_full/vite.conf Executable file
View file

@ -0,0 +1,33 @@
#ddev-generated
server {
server_name vite.haikuatelier.fr.ddev.site;
listen 80;
listen 443 ssl;
ssl_certificate /etc/ssl/certs/master.crt;
ssl_certificate_key /etc/ssl/certs/master.key;
include /etc/nginx/monitoring.conf;
# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
sendfile off;
error_log /dev/stdout info;
access_log off;
location /vite-server-not-running.html {
root /mnt/ddev_config/vite/;
}
location / {
proxy_pass http://localhost:5173;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
proxy_set_header X-Forwarded-Host $http_x_forwarded_host;
error_page 502 /vite-server-not-running.html;
}
}

341
.ddev/redis/advanced.conf Executable file
View file

@ -0,0 +1,341 @@
# #ddev-generated
############################### ADVANCED CONFIG ###############################
# Hashes are encoded using a memory efficient data structure when they have a
# small number of entries, and the biggest entry does not exceed a given
# threshold. These thresholds can be configured using the following directives.
hash-max-ziplist-entries 512
hash-max-ziplist-value 64
# Lists are also encoded in a special way to save a lot of space.
# The number of entries allowed per internal list node can be specified
# as a fixed maximum size or a maximum number of elements.
# For a fixed maximum size, use -5 through -1, meaning:
# -5: max size: 64 Kb <-- not recommended for normal workloads
# -4: max size: 32 Kb <-- not recommended
# -3: max size: 16 Kb <-- probably not recommended
# -2: max size: 8 Kb <-- good
# -1: max size: 4 Kb <-- good
# Positive numbers mean store up to _exactly_ that number of elements
# per list node.
# The highest performing option is usually -2 (8 Kb size) or -1 (4 Kb size),
# but if your use case is unique, adjust the settings as necessary.
list-max-ziplist-size -2
# Lists may also be compressed.
# Compress depth is the number of quicklist ziplist nodes from *each* side of
# the list to *exclude* from compression. The head and tail of the list
# are always uncompressed for fast push/pop operations. Settings are:
# 0: disable all list compression
# 1: depth 1 means "don't start compressing until after 1 node into the list,
# going from either the head or tail"
# So: [head]->node->node->...->node->[tail]
# [head], [tail] will always be uncompressed; inner nodes will compress.
# 2: [head]->[next]->node->node->...->node->[prev]->[tail]
# 2 here means: don't compress head or head->next or tail->prev or tail,
# but compress all nodes between them.
# 3: [head]->[next]->[next]->node->node->...->node->[prev]->[prev]->[tail]
# etc.
list-compress-depth 0
# Sets have a special encoding in just one case: when a set is composed
# of just strings that happen to be integers in radix 10 in the range
# of 64 bit signed integers.
# The following configuration setting sets the limit in the size of the
# set in order to use this special memory saving encoding.
set-max-intset-entries 512
# Similarly to hashes and lists, sorted sets are also specially encoded in
# order to save a lot of space. This encoding is only used when the length and
# elements of a sorted set are below the following limits:
zset-max-ziplist-entries 128
zset-max-ziplist-value 64
# HyperLogLog sparse representation bytes limit. The limit includes the
# 16 bytes header. When an HyperLogLog using the sparse representation crosses
# this limit, it is converted into the dense representation.
#
# A value greater than 16000 is totally useless, since at that point the
# dense representation is more memory efficient.
#
# The suggested value is ~ 3000 in order to have the benefits of
# the space efficient encoding without slowing down too much PFADD,
# which is O(N) with the sparse encoding. The value can be raised to
# ~ 10000 when CPU is not a concern, but space is, and the data set is
# composed of many HyperLogLogs with cardinality in the 0 - 15000 range.
hll-sparse-max-bytes 3000
# Streams macro node max size / items. The stream data structure is a radix
# tree of big nodes that encode multiple items inside. Using this configuration
# it is possible to configure how big a single node can be in bytes, and the
# maximum number of items it may contain before switching to a new node when
# appending new stream entries. If any of the following settings are set to
# zero, the limit is ignored, so for instance it is possible to set just a
# max entires limit by setting max-bytes to 0 and max-entries to the desired
# value.
stream-node-max-bytes 4096
stream-node-max-entries 100
# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in
# order to help rehashing the main Redis hash table (the one mapping top-level
# keys to values). The hash table implementation Redis uses (see dict.c)
# performs a lazy rehashing: the more operation you run into a hash table
# that is rehashing, the more rehashing "steps" are performed, so if the
# server is idle the rehashing is never complete and some more memory is used
# by the hash table.
#
# The default is to use this millisecond 10 times every second in order to
# actively rehash the main dictionaries, freeing memory when possible.
#
# If unsure:
# use "activerehashing no" if you have hard latency requirements and it is
# not a good thing in your environment that Redis can reply from time to time
# to queries with 2 milliseconds delay.
#
# use "activerehashing yes" if you don't have such hard requirements but
# want to free memory asap when possible.
activerehashing yes
# The client output buffer limits can be used to force disconnection of clients
# that are not reading data from the server fast enough for some reason (a
# common reason is that a Pub/Sub client can't consume messages as fast as the
# publisher can produce them).
#
# The limit can be set differently for the three different classes of clients:
#
# normal -> normal clients including MONITOR clients
# replica -> replica clients
# pubsub -> clients subscribed to at least one pubsub channel or pattern
#
# The syntax of every client-output-buffer-limit directive is the following:
#
# client-output-buffer-limit <class> <hard limit> <soft limit> <soft seconds>
#
# A client is immediately disconnected once the hard limit is reached, or if
# the soft limit is reached and remains reached for the specified number of
# seconds (continuously).
# So for instance if the hard limit is 32 megabytes and the soft limit is
# 16 megabytes / 10 seconds, the client will get disconnected immediately
# if the size of the output buffers reach 32 megabytes, but will also get
# disconnected if the client reaches 16 megabytes and continuously overcomes
# the limit for 10 seconds.
#
# By default normal clients are not limited because they don't receive data
# without asking (in a push way), but just after a request, so only
# asynchronous clients may create a scenario where data is requested faster
# than it can read.
#
# Instead there is a default limit for pubsub and replica clients, since
# subscribers and replicas receive data in a push fashion.
#
# Both the hard or the soft limit can be disabled by setting them to zero.
client-output-buffer-limit normal 0 0 0
client-output-buffer-limit replica 256mb 64mb 60
client-output-buffer-limit pubsub 32mb 8mb 60
# Client query buffers accumulate new commands. They are limited to a fixed
# amount by default in order to avoid that a protocol desynchronization (for
# instance due to a bug in the client) will lead to unbound memory usage in
# the query buffer. However you can configure it here if you have very special
# needs, such us huge multi/exec requests or alike.
#
# client-query-buffer-limit 1gb
# In the Redis protocol, bulk requests, that are, elements representing single
# strings, are normally limited to 512 mb. However you can change this limit
# here, but must be 1mb or greater
#
# proto-max-bulk-len 512mb
# Redis calls an internal function to perform many background tasks, like
# closing connections of clients in timeout, purging expired keys that are
# never requested, and so forth.
#
# Not all tasks are performed with the same frequency, but Redis checks for
# tasks to perform according to the specified "hz" value.
#
# By default "hz" is set to 10. Raising the value will use more CPU when
# Redis is idle, but at the same time will make Redis more responsive when
# there are many keys expiring at the same time, and timeouts may be
# handled with more precision.
#
# The range is between 1 and 500, however a value over 100 is usually not
# a good idea. Most users should use the default of 10 and raise this up to
# 100 only in environments where very low latency is required.
hz 10
# Normally it is useful to have an HZ value which is proportional to the
# number of clients connected. This is useful in order, for instance, to
# avoid too many clients are processed for each background task invocation
# in order to avoid latency spikes.
#
# Since the default HZ value by default is conservatively set to 10, Redis
# offers, and enables by default, the ability to use an adaptive HZ value
# which will temporarily raise when there are many connected clients.
#
# When dynamic HZ is enabled, the actual configured HZ will be used
# as a baseline, but multiples of the configured HZ value will be actually
# used as needed once more clients are connected. In this way an idle
# instance will use very little CPU time while a busy instance will be
# more responsive.
dynamic-hz yes
# When a child rewrites the AOF file, if the following option is enabled
# the file will be fsync-ed every 32 MB of data generated. This is useful
# in order to commit the file to the disk more incrementally and avoid
# big latency spikes.
aof-rewrite-incremental-fsync yes
# When redis saves RDB file, if the following option is enabled
# the file will be fsync-ed every 32 MB of data generated. This is useful
# in order to commit the file to the disk more incrementally and avoid
# big latency spikes.
rdb-save-incremental-fsync yes
# Redis LFU eviction (see maxmemory setting) can be tuned. However it is a good
# idea to start with the default settings and only change them after investigating
# how to improve the performances and how the keys LFU change over time, which
# is possible to inspect via the OBJECT FREQ command.
#
# There are two tunable parameters in the Redis LFU implementation: the
# counter logarithm factor and the counter decay time. It is important to
# understand what the two parameters mean before changing them.
#
# The LFU counter is just 8 bits per key, it's maximum value is 255, so Redis
# uses a probabilistic increment with logarithmic behavior. Given the value
# of the old counter, when a key is accessed, the counter is incremented in
# this way:
#
# 1. A random number R between 0 and 1 is extracted.
# 2. A probability P is calculated as 1/(old_value*lfu_log_factor+1).
# 3. The counter is incremented only if R < P.
#
# The default lfu-log-factor is 10. This is a table of how the frequency
# counter changes with a different number of accesses with different
# logarithmic factors:
#
# +--------+------------+------------+------------+------------+------------+
# | factor | 100 hits | 1000 hits | 100K hits | 1M hits | 10M hits |
# +--------+------------+------------+------------+------------+------------+
# | 0 | 104 | 255 | 255 | 255 | 255 |
# +--------+------------+------------+------------+------------+------------+
# | 1 | 18 | 49 | 255 | 255 | 255 |
# +--------+------------+------------+------------+------------+------------+
# | 10 | 10 | 18 | 142 | 255 | 255 |
# +--------+------------+------------+------------+------------+------------+
# | 100 | 8 | 11 | 49 | 143 | 255 |
# +--------+------------+------------+------------+------------+------------+
#
# NOTE: The above table was obtained by running the following commands:
#
# redis-benchmark -n 1000000 incr foo
# redis-cli object freq foo
#
# NOTE 2: The counter initial value is 5 in order to give new objects a chance
# to accumulate hits.
#
# The counter decay time is the time, in minutes, that must elapse in order
# for the key counter to be divided by two (or decremented if it has a value
# less <= 10).
#
# The default value for the lfu-decay-time is 1. A special value of 0 means to
# decay the counter every time it happens to be scanned.
#
# lfu-log-factor 10
# lfu-decay-time 1
############################## DEBUG COMMAND #############################
enable-debug-command yes
########################### ACTIVE DEFRAGMENTATION #######################
#
# What is active defragmentation?
# -------------------------------
#
# Active (online) defragmentation allows a Redis server to compact the
# spaces left between small allocations and deallocations of data in memory,
# thus allowing to reclaim back memory.
#
# Fragmentation is a natural process that happens with every allocator (but
# less so with Jemalloc, fortunately) and certain workloads. Normally a server
# restart is needed in order to lower the fragmentation, or at least to flush
# away all the data and create it again. However thanks to this feature
# implemented by Oran Agra for Redis 4.0 this process can happen at runtime
# in a "hot" way, while the server is running.
#
# Basically when the fragmentation is over a certain level (see the
# configuration options below) Redis will start to create new copies of the
# values in contiguous memory regions by exploiting certain specific Jemalloc
# features (in order to understand if an allocation is causing fragmentation
# and to allocate it in a better place), and at the same time, will release the
# old copies of the data. This process, repeated incrementally for all the keys
# will cause the fragmentation to drop back to normal values.
#
# Important things to understand:
#
# 1. This feature is disabled by default, and only works if you compiled Redis
# to use the copy of Jemalloc we ship with the source code of Redis.
# This is the default with Linux builds.
#
# 2. You never need to enable this feature if you don't have fragmentation
# issues.
#
# 3. Once you experience fragmentation, you can enable this feature when
# needed with the command "CONFIG SET activedefrag yes".
#
# The configuration parameters are able to fine tune the behavior of the
# defragmentation process. If you are not sure about what they mean it is
# a good idea to leave the defaults untouched.
# Enabled active defragmentation
# activedefrag no
# Minimum amount of fragmentation waste to start active defrag
# active-defrag-ignore-bytes 100mb
# Minimum percentage of fragmentation to start active defrag
# active-defrag-threshold-lower 10
# Maximum percentage of fragmentation at which we use maximum effort
# active-defrag-threshold-upper 100
# Minimal effort for defrag in CPU percentage, to be used when the lower
# threshold is reached
# active-defrag-cycle-min 1
# Maximal effort for defrag in CPU percentage, to be used when the upper
# threshold is reached
# active-defrag-cycle-max 25
# Maximum number of set/hash/zset/list fields that will be processed from
# the main dictionary scan
# active-defrag-max-scan-fields 1000
# Jemalloc background thread for purging will be enabled by default
jemalloc-bg-thread yes
# It is possible to pin different threads and processes of Redis to specific
# CPUs in your system, in order to maximize the performances of the server.
# This is useful both in order to pin different Redis threads in different
# CPUs, but also in order to make sure that multiple Redis instances running
# in the same host will be pinned to different CPUs.
#
# Normally you can do this using the "taskset" command, however it is also
# possible to this via Redis configuration directly, both in Linux and FreeBSD.
#
# You can pin the server/IO threads, bio threads, aof rewrite child process, and
# the bgsave child process. The syntax to specify the cpu list is the same as
# the taskset command:
#
# Set redis server/io threads to cpu affinity 0,2,4,6:
# server_cpulist 0-7:2
#
# Set bio threads to cpu affinity 1,3:
# bio_cpulist 1,3
#
# Set aof rewrite child process to cpu affinity 8,9,10,11:
# aof_rewrite_cpulist 8-11
#
# Set bgsave child process to cpu affinity 1,10,11
# bgsave_cpulist 1,10-11

133
.ddev/redis/append.conf Executable file
View file

@ -0,0 +1,133 @@
# #ddev-generated
############################## APPEND ONLY MODE ###############################
# By default Redis asynchronously dumps the dataset on disk. This mode is
# good enough in many applications, but an issue with the Redis process or
# a power outage may result into a few minutes of writes lost (depending on
# the configured save points).
#
# The Append Only File is an alternative persistence mode that provides
# much better durability. For instance using the default data fsync policy
# (see later in the config file) Redis can lose just one second of writes in a
# dramatic event like a server power outage, or a single write if something
# wrong with the Redis process itself happens, but the operating system is
# still running correctly.
#
# AOF and RDB persistence can be enabled at the same time without problems.
# If the AOF is enabled on startup Redis will load the AOF, that is the file
# with the better durability guarantees.
#
# Please check http://redis.io/topics/persistence for more information.
appendonly yes
# The name of the append only file (default: "appendonly.aof")
appendfilename "appendonly.aof"
# For convenience, Redis stores all persistent append-only files in a dedicated
# directory. The name of the directory is determined by the appenddirname
# configuration parameter.
appenddirname "append"
# The fsync() call tells the Operating System to actually write data on disk
# instead of waiting for more data in the output buffer. Some OS will really flush
# data on disk, some other OS will just try to do it ASAP.
#
# Redis supports three different modes:
#
# no: don't fsync, just let the OS flush the data when it wants. Faster.
# always: fsync after every write to the append only log. Slow, Safest.
# everysec: fsync only one time every second. Compromise.
#
# The default is "everysec", as that's usually the right compromise between
# speed and data safety. It's up to you to understand if you can relax this to
# "no" that will let the operating system flush the output buffer when
# it wants, for better performances (but if you can live with the idea of
# some data loss consider the default persistence mode that's snapshotting),
# or on the contrary, use "always" that's very slow but a bit safer than
# everysec.
#
# More details please check the following article:
# http://antirez.com/post/redis-persistence-demystified.html
#
# If unsure, use "everysec".
appendfsync no
# When the AOF fsync policy is set to always or everysec, and a background
# saving process (a background save or AOF log background rewriting) is
# performing a lot of I/O against the disk, in some Linux configurations
# Redis may block too long on the fsync() call. Note that there is no fix for
# this currently, as even performing fsync in a different thread will block
# our synchronous write(2) call.
#
# In order to mitigate this problem it's possible to use the following option
# that will prevent fsync() from being called in the main process while a
# BGSAVE or BGREWRITEAOF is in progress.
#
# This means that while another child is saving, the durability of Redis is
# the same as "appendfsync none". In practical terms, this means that it is
# possible to lose up to 30 seconds of log in the worst scenario (with the
# default Linux settings).
#
# If you have latency problems turn this to "yes". Otherwise leave it as
# "no" that is the safest pick from the point of view of durability.
no-appendfsync-on-rewrite no
# Automatic rewrite of the append only file.
# Redis is able to automatically rewrite the log file implicitly calling
# BGREWRITEAOF when the AOF log size grows by the specified percentage.
#
# This is how it works: Redis remembers the size of the AOF file after the
# latest rewrite (if no rewrite has happened since the restart, the size of
# the AOF at startup is used).
#
# This base size is compared to the current size. If the current size is
# bigger than the specified percentage, the rewrite is triggered. Also
# you need to specify a minimal size for the AOF file to be rewritten, this
# is useful to avoid rewriting the AOF file even if the percentage increase
# is reached but it is still pretty small.
#
# Specify a percentage of zero in order to disable the automatic AOF
# rewrite feature.
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
# An AOF file may be found to be truncated at the end during the Redis
# startup process, when the AOF data gets loaded back into memory.
# This may happen when the system where Redis is running
# crashes, especially when an ext4 filesystem is mounted without the
# data=ordered option (however this can't happen when Redis itself
# crashes or aborts but the operating system still works correctly).
#
# Redis can either exit with an error when this happens, or load as much
# data as possible (the default now) and start if the AOF file is found
# to be truncated at the end. The following option controls this behavior.
#
# If aof-load-truncated is set to yes, a truncated AOF file is loaded and
# the Redis server starts emitting a log to inform the user of the event.
# Otherwise if the option is set to no, the server aborts with an error
# and refuses to start. When the option is set to no, the user requires
# to fix the AOF file using the "redis-check-aof" utility before to restart
# the server.
#
# Note that if the AOF file will be found to be corrupted in the middle
# the server will still exit with an error. This option only applies when
# Redis will try to read more data from the AOF file but not enough bytes
# will be found.
aof-load-truncated yes
# When rewriting the AOF file, Redis is able to use an RDB preamble in the
# AOF file for faster rewrites and recoveries. When this option is turned
# on the rewritten AOF file is composed of two different stanzas:
#
# [RDB file][AOF tail]
#
# When loading, Redis recognizes that the AOF file starts with the "REDIS"
# string and loads the prefixed RDB file, then continues loading the AOF
# tail.
aof-use-rdb-preamble yes

44
.ddev/redis/general.conf Executable file
View file

@ -0,0 +1,44 @@
# #ddev-generated
################################# GENERAL #####################################
# By default Redis does not run as a daemon. Use 'yes' if you need it.
# Note that Redis will write a pid file in /var/run/redis.pid when daemonized.
daemonize no
# If you run Redis from upstart or systemd, Redis can interact with your
# supervision tree. Options:
# supervised no - no supervision interaction
# supervised upstart - signal upstart by putting Redis into SIGSTOP mode
# requires "expect stop" in your upstart job config
# supervised systemd - signal systemd by writing READY=1 to $NOTIFY_SOCKET
# supervised auto - detect upstart or systemd method based on
# UPSTART_JOB or NOTIFY_SOCKET environment variables
# Note: these supervision methods only signal "process is ready."
# They do not enable continuous pings back to your supervisor.
supervised no
# Specify the server verbosity level.
# This can be one of:
# debug (a lot of information, useful for development/testing)
# verbose (many rarely useful info, but not a mess like the debug level)
# notice (moderately verbose, what you want in production probably)
# warning (only very important / critical messages are logged)
loglevel notice
# Specify the log file name. Also the empty string can be used to force
# Redis to log on the standard output. Note that if you use standard
# output for logging but daemonize, logs will be sent to /dev/null
logfile ""
# Set the number of databases. The default database is DB 0, you can select
# a different one on a per-connection basis using SELECT <dbid> where
# dbid is a number between 0 and 'databases'-1
databases 4
# By default Redis shows an ASCII art logo only when started to log to the
# standard output and if the standard output is a TTY. Basically this means
# that normally a logo is displayed only in interactive sessions.
#
# However it is possible to force the pre-4.0 behavior and always show a
# ASCII art logo in startup logs by setting the following option to yes.
always-show-logo yes

98
.ddev/redis/io.conf Executable file
View file

@ -0,0 +1,98 @@
# #ddev-generated
################################ THREADED I/O #################################
# Redis is mostly single threaded, however there are certain threaded
# operations such as UNLINK, slow I/O accesses and other things that are
# performed on side threads.
#
# Now it is also possible to handle Redis clients socket reads and writes
# in different I/O threads. Since especially writing is so slow, normally
# Redis users use pipelining in order to speed up the Redis performances per
# core, and spawn multiple instances in order to scale more. Using I/O
# threads it is possible to easily speedup two times Redis without resorting
# to pipelining nor sharding of the instance.
#
# By default threading is disabled, we suggest enabling it only in machines
# that have at least 4 or more cores, leaving at least one spare core.
# Using more than 8 threads is unlikely to help much. We also recommend using
# threaded I/O only if you actually have performance problems, with Redis
# instances being able to use a quite big percentage of CPU time, otherwise
# there is no point in using this feature.
#
# So for instance if you have a four cores boxes, try to use 2 or 3 I/O
# threads, if you have a 8 cores, try to use 6 threads. In order to
# enable I/O threads use the following configuration directive:
#
io-threads 1
#
# Setting io-threads to 1 will just use the main thread as usual.
# When I/O threads are enabled, we only use threads for writes, that is
# to thread the write(2) syscall and transfer the client buffers to the
# socket. However it is also possible to enable threading of reads and
# protocol parsing using the following configuration directive, by setting
# it to yes:
#
io-threads-do-reads no
#
# Usually threading reads doesn't help much.
#
# NOTE 1: This configuration directive cannot be changed at runtime via
# CONFIG SET. Aso this feature currently does not work when SSL is
# enabled.
#
# NOTE 2: If you want to test the Redis speedup using redis-benchmark, make
# sure you also run the benchmark itself in threaded mode, using the
# --threads option to match the number of Redis threads, otherwise you'll not
# be able to notice the improvements.
############################ KERNEL OOM CONTROL ##############################
# On Linux, it is possible to hint the kernel OOM killer on what processes
# should be killed first when out of memory.
#
# Enabling this feature makes Redis actively control the oom_score_adj value
# for all its processes, depending on their role. The default scores will
# attempt to have background child processes killed before all others, and
# replicas killed before masters.
oom-score-adj no
# When oom-score-adj is used, this directive controls the specific values used
# for master, replica and background child processes. Values range -1000 to
# 1000 (higher means more likely to be killed).
#
# Unprivileged processes (not root, and without CAP_SYS_RESOURCE capabilities)
# can freely increase their value, but not decrease it below its initial
# settings.
#
# Values are used relative to the initial value of oom_score_adj when the server
# starts. Because typically the initial value is 0, they will often match the
# absolute values.
oom-score-adj-values 0 200 800
################################## SLOW LOG ###################################
# The Redis Slow Log is a system to log queries that exceeded a specified
# execution time. The execution time does not include the I/O operations
# like talking with the client, sending the reply and so forth,
# but just the time needed to actually execute the command (this is the only
# stage of command execution where the thread is blocked and can not serve
# other requests in the meantime).
#
# You can configure the slow log with two parameters: one tells Redis
# what is the execution time, in microseconds, to exceed in order for the
# command to get logged, and the other parameter is the length of the
# slow log. When a new command is logged the oldest one is removed from the
# queue of logged commands.
# The following time is expressed in microseconds, so 1000000 is equivalent
# to one second. Note that a negative number disables the slow log, while
# a value of zero forces the logging of every command.
slowlog-log-slower-than 10000
# There is no limit to this length. Just be aware that it will consume memory.
# You can reclaim memory used by the slow log with SLOWLOG RESET.
slowlog-max-len 128

142
.ddev/redis/memory.conf Executable file
View file

@ -0,0 +1,142 @@
# #ddev-generated
############################## MEMORY MANAGEMENT ################################
# Set a memory usage limit to the specified amount of bytes.
# When the memory limit is reached Redis will try to remove keys
# according to the eviction policy selected (see maxmemory-policy).
#
# If Redis can't remove keys according to the policy, or if the policy is
# set to 'noeviction', Redis will start to reply with errors to commands
# that would use more memory, like SET, LPUSH, and so on, and will continue
# to reply to read-only commands like GET.
#
# This option is usually useful when using Redis as an LRU or LFU cache, or to
# set a hard memory limit for an instance (using the 'noeviction' policy).
#
# WARNING: If you have replicas attached to an instance with maxmemory on,
# the size of the output buffers needed to feed the replicas are subtracted
# from the used memory count, so that network problems / resyncs will
# not trigger a loop where keys are evicted, and in turn the output
# buffer of replicas is full with DELs of keys evicted triggering the deletion
# of more keys, and so forth until the database is completely emptied.
#
# In short... if you have replicas attached it is suggested that you set a lower
# limit for maxmemory so that there is some free RAM on the system for replica
# output buffers (but this is not needed if the policy is 'noeviction').
#
maxmemory 512mb
# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
# is reached. You can select one from the following behaviors:
#
# volatile-lru -> Evict using approximated LRU, only keys with an expire set.
# allkeys-lru -> Evict any key using approximated LRU.
# volatile-lfu -> Evict using approximated LFU, only keys with an expire set.
# allkeys-lfu -> Evict any key using approximated LFU.
# volatile-random -> Remove a random key having an expire set.
# allkeys-random -> Remove a random key, any key.
# volatile-ttl -> Remove the key with the nearest expire time (minor TTL)
# noeviction -> Don't evict anything, just return an error on write operations.
#
# LRU means Least Recently Used
# LFU means Least Frequently Used
#
# Both LRU, LFU and volatile-ttl are implemented using approximated
# randomized algorithms.
#
# Note: with any of the above policies, Redis will return an error on write
# operations, when there are no suitable keys for eviction.
#
# At the date of writing these commands are: set setnx setex append
# incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
# sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
# zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
# getset mset msetnx exec sort
#
# The default is:
#
maxmemory-policy allkeys-lru
# LRU, LFU and minimal TTL algorithms are not precise algorithms but approximated
# algorithms (in order to save memory), so you can tune it for speed or
# accuracy. By default Redis will check five keys and pick the one that was
# used least recently, you can change the sample size using the following
# configuration directive.
#
# The default of 5 produces good enough results. 10 Approximates very closely
# true LRU but costs more CPU. 3 is faster but not very accurate.
#
maxmemory-samples 4
# Redis reclaims expired keys in two ways: upon access when those keys are
# found to be expired, and also in background, in what is called the
# "active expire key". The key space is slowly and interactively scanned
# looking for expired keys to reclaim, so that it is possible to free memory
# of keys that are expired and will never be accessed again in a short time.
#
# The default effort of the expire cycle will try to avoid having more than
# ten percent of expired keys still in memory, and will try to avoid consuming
# more than 25% of total memory and to add latency to the system. However
# it is possible to increase the expire "effort" that is normally set to
# "1", to a greater value, up to the value "10". At its maximum value the
# system will use more CPU, longer cycles (and technically may introduce
# more latency), and will tolerate less already expired keys still present
# in the system. It's a tradeoff between memory, CPU and latency.
#
active-expire-effort 2
############################# LAZY FREEING ####################################
# Redis has two primitives to delete keys. One is called DEL and is a blocking
# deletion of the object. It means that the server stops processing new commands
# in order to reclaim all the memory associated with an object in a synchronous
# way. If the key deleted is associated with a small object, the time needed
# in order to execute the DEL command is very small and comparable to most other
# O(1) or O(log_N) commands in Redis. However if the key is associated with an
# aggregated value containing millions of elements, the server can block for
# a long time (even seconds) in order to complete the operation.
#
# For the above reasons Redis also offers non blocking deletion primitives
# such as UNLINK (non blocking DEL) and the ASYNC option of FLUSHALL and
# FLUSHDB commands, in order to reclaim memory in background. Those commands
# are executed in constant time. Another thread will incrementally free the
# object in the background as fast as possible.
#
# DEL, UNLINK and ASYNC option of FLUSHALL and FLUSHDB are user-controlled.
# It's up to the design of the application to understand when it is a good
# idea to use one or the other. However the Redis server sometimes has to
# delete keys or flush the whole database as a side effect of other operations.
# Specifically Redis deletes objects independently of a user call in the
# following scenarios:
#
# 1) On eviction, because of the maxmemory and maxmemory policy configurations,
# in order to make room for new data, without going over the specified
# memory limit.
# 2) Because of expire: when a key with an associated time to live (see the
# EXPIRE command) must be deleted from memory.
# 3) Because of a side effect of a command that stores data on a key that may
# already exist. For example the RENAME command may delete the old key
# content when it is replaced with another one. Similarly SUNIONSTORE
# or SORT with STORE option may delete existing keys. The SET command
# itself removes any old content of the specified key in order to replace
# it with the specified string.
# 4) During replication, when a replica performs a full resynchronization with
# its master, the content of the whole database is removed in order to
# load the RDB file just transferred.
#
# In all the above cases the default is to delete objects in a blocking way,
# like if DEL was called. However you can configure each case specifically
# in order to instead release memory in a non-blocking way like if UNLINK
# was called, using the following configuration directives.
lazyfree-lazy-eviction no
lazyfree-lazy-expire no
lazyfree-lazy-server-del no
replica-lazy-flush no
# It is also possible, for the case when to replace the user code DEL calls
# with UNLINK calls is not easy, to modify the default behavior of the DEL
# command to act exactly like UNLINK, using the following configuration
# directive:
lazyfree-lazy-user-del no

85
.ddev/redis/network.conf Executable file
View file

@ -0,0 +1,85 @@
# #ddev-generated
################################## NETWORK #####################################
# By default, if no "bind" configuration directive is specified, Redis listens
# for connections from all available network interfaces on the host machine.
# It is possible to listen to just one or multiple selected interfaces using
# the "bind" configuration directive, followed by one or more IP addresses.
#
# Examples:
#
# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1 ::1
#
# ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the
# internet, binding to all the interfaces is dangerous and will expose the
# instance to everybody on the internet. So by default we uncomment the
# following bind directive, that will force Redis to listen only on the
# IPv4 loopback interface address (this means Redis will only be able to
# accept client connections from the same host that it is running on).
#
# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
# JUST COMMENT OUT THE FOLLOWING LINE.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bind 0.0.0.0
# Protected mode is a layer of security protection, in order to avoid that
# Redis instances left open on the internet are accessed and exploited.
#
# When protected mode is on and if:
#
# 1) The server is not binding explicitly to a set of addresses using the
# "bind" directive.
# 2) No password is configured.
#
# The server only accepts connections from clients connecting from the
# IPv4 and IPv6 loopback addresses 127.0.0.1 and ::1, and from Unix domain
# sockets.
#
# By default protected mode is enabled. You should disable it only if
# you are sure you want clients from other hosts to connect to Redis
# even if no authentication is configured, nor a specific set of interfaces
# are explicitly listed using the "bind" directive.
protected-mode yes
# Accept connections on the specified port, default is 6379 (IANA #815344).
# If port 0 is specified Redis will not listen on a TCP socket.
port 6379
# TCP listen() backlog.
#
# In high requests-per-second environments you need a high backlog in order
# to avoid slow clients connection issues. Note that the Linux kernel
# will silently truncate it to the value of /proc/sys/net/core/somaxconn so
# make sure to raise both the value of somaxconn and tcp_max_syn_backlog
# in order to get the desired effect.
tcp-backlog 4096
# Unix socket.
#
# Specify the path for the Unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
#
# unixsocket /tmp/redis.sock
# unixsocketperm 700
# Close the connection after a client is idle for N seconds (0 to disable)
timeout 0
# TCP keepalive.
#
# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence
# of communication. This is useful for two reasons:
#
# 1) Detect dead peers.
# 2) Force network equipment in the middle to consider the connection to be
# alive.
#
# On Linux, the specified value (in seconds) is the period used to send ACKs.
# Note that to close the connection the double of the time is needed.
# On other kernels the period depends on the kernel configuration.
#
# A reasonable value for this option is 300 seconds, which is the new
# Redis default starting with Redis 3.2.1.
tcp-keepalive 0

26
.ddev/redis/redis.conf Executable file
View file

@ -0,0 +1,26 @@
# #ddev-generated
################################## INCLUDES ###################################
# Network
include /etc/redis/conf/network.conf
# General
include /etc/redis/conf/general.conf
# Snapshots
include /etc/redis/conf/snapshots.conf
# Security
include /etc/redis/conf/security.conf
# Memory management
include /etc/redis/conf/memory.conf
# CPU management
include /etc/redis/conf/io.conf
# Append mode
include /etc/redis/conf/append.conf
# Advanced config
include /etc/redis/conf/advanced.conf

12
.ddev/redis/security.conf Executable file
View file

@ -0,0 +1,12 @@
# #ddev-generated
################################## SECURITY ###################################
# Warning: since Redis is pretty fast, an outside user can try up to
# 1 million passwords per second against a modern box. This means that you
# should use very strong passwords, otherwise they will be very easy to break.
# Note that because the password is really a shared secret between the client
# and the server, and should not be memorized by any human, the password
# can be easily a long string from /dev/urandom or whatever, so by using a
# long and unguessable password no brute force attack will be possible.
user default ~* &* +@all on >redis
user redis ~* &* +@all on >redis

66
.ddev/redis/snapshots.conf Executable file
View file

@ -0,0 +1,66 @@
# #ddev-generated
################################ SNAPSHOTTING ################################
#
# Save the DB on disk:
#
# save <seconds> <changes>
#
# Will save the DB if both the given number of seconds and the given
# number of write operations against the DB occurred.
#
# In the example below the behavior will be to save:
# after 300 sec (5 min) if at least 1 key changed
# after 150 sec (2.5 min) if at least 10 keys changed
# after 30 sec if at least 10000 keys changed
#
# Note: you can disable saving completely by commenting out all "save" lines.
#
# It is also possible to remove all the previously configured save
# points by adding a save directive with a single empty string argument
# like in the following example:
#
# save ""
save 3600 1 300 100 60 10000
# By default Redis will stop accepting writes if RDB snapshots are enabled
# (at least one save point) and the latest background save failed.
# This will make the user aware (in a hard way) that data is not persisting
# on disk properly, otherwise chances are that no one will notice and some
# disaster will happen.
#
# If the background saving process will start working again Redis will
# automatically allow writes again.
#
# However if you have setup your proper monitoring of the Redis server
# and persistence, you may want to disable this feature so that Redis will
# continue to work as usual even if there are problems with disk,
# permissions, and so forth.
stop-writes-on-bgsave-error yes
# Compress string objects using LZF when dump .rdb databases?
# By default compression is enabled as it's almost always a win.
# If you want to save some CPU in the saving child set it to 'no' but
# the dataset will likely be bigger if you have compressible values or keys.
rdbcompression no
# Since version 5 of RDB a CRC64 checksum is placed at the end of the file.
# This makes the format more resistant to corruption but there is a performance
# hit to pay (around 10%) when saving and loading RDB files, so you can disable it
# for maximum performances.
#
# RDB files created with checksum disabled have a checksum of zero that will
# tell the loading code to skip the check.
rdbchecksum no
# The filename where to dump the DB
dbfilename haikuatelier.fr.rdb
# The working directory.
#
# The DB will be written inside this directory, with the filename specified
# above using the 'dbfilename' configuration directive.
#
# The Append Only File will also be created inside this directory.
#
# Note that you must specify a directory here, not a file name.
dir /data

View file

@ -0,0 +1,68 @@
<!doctype html>
<html lang="en">
<head>
<!-- #ddev-generated -->
<meta charset="UTF-8">
<meta
name="viewport"
content="width=device-width, initial-scale=1.0"
>
<title>vite not running</title>
<style>
html, body {
height: 100%;
margin: 0;
font-family:
-apple-system,
BlinkMacSystemFont,
avenir next,
avenir,
segoe ui,
helvetica neue,
helvetica,
Cantarell,
Ubuntu,
roboto,
noto,
arial,
sans-serif;
}
body {
background: #ddd;
display: grid;
align-items: center;
justify-items: center;
}
h1 {
margin-top: 0;
}
main {
max-width: 36rem;
background: #fff;
padding: 1.5rem;
border: 1px #999 solid;
}
code {
font-family: Menlo, Consolas, Monaco, Liberation Mono, Lucida Console, monospace;
font-size: 180%;
color: #9499ff;
font-weight: bold;
}
</style>
</head>
<body>
<main>
<h1>vite not running</h1>
<p>
Apparently, you tried to access resources from the vite development server. However, the server is currently not
running.
</p>
<p>You can start the server by running the following command in your terminal:</p>
<code>ddev vite</code>
</main>
</body>
</html>

View file

@ -0,0 +1,2 @@
#ddev-generated
RUN a2enmod proxy_http

8
.gitignore vendored
View file

@ -5,8 +5,6 @@ web/app/mu-plugins/*/
web/app/themes/twentytwentyfour/
web/app/upgrade
web/app/cache/*
web/app/languages/plugins/
web/app/object-cache.php
# WordPress
web/wp
@ -50,9 +48,3 @@ devenv.local.nix
# Gleam
build/
# Playwright
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/

View file

@ -10,7 +10,19 @@
"style": "warn",
"suspicious": "error"
},
"plugins": ["jsdoc", "promise", "unicorn", "jsdoc", "oxc", "promise", "typescript", "unicorn"],
"plugins": [
"eslint-plugin-jsdoc",
"eslint-plugin-promise",
"eslint-plugin-unicorn",
"jsdoc",
"oxc",
"oxc-security",
"promise",
"security",
"typescript",
"typescript-eslint",
"unicorn"
],
"rules": {
"import/export": "error",
"no-array-for-each": "off",

15
.vscode/launch.json vendored Executable file
View file

@ -0,0 +1,15 @@
{
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"hostname": "0.0.0.0",
"port": 9003,
"pathMappings": { "/var/www/html": "${workspaceFolder}" },
"preLaunchTask": "DDEV: Enable Xdebug",
"postDebugTask": "DDEV: Disable Xdebug",
"skipFiles": ["**/vendor/**/*.php", "**/wp-admin/**/*.php", "**/wp-includes/**/*.php", "**/wp-blog-header.php"]
}
]
}

96
.vscode/settings.json vendored Executable file
View file

@ -0,0 +1,96 @@
{
"cSpell.words": [
"backorder",
"backordered",
"backorders",
"chaine",
"cliquée",
"controle",
"controles",
"coordonnee",
"cout",
"COUT",
"couts",
"Crell",
"defaut",
"defini",
"deplie",
"DERNIERE",
"echec",
"Ecoute",
"Ecouteurs",
"Eles",
"emet",
"Emetteurs",
"ENTETE",
"epingle",
"Epingle",
"EPINGLE",
"EPINGLES",
"etat",
"etats",
"ETATS",
"etendu",
"Evenements",
"exts",
"Fenetre",
"FENETRE",
"formatte",
"generique",
"geometricprecision",
"gere",
"glitchtip",
"GLITCHTIP",
"haikuabout",
"haikuatelier",
"idempotency",
"leve",
"methode",
"methodes",
"mobily",
"multiformats",
"paypal",
"phpstan",
"Planifiee",
"prenom",
"presentes",
"problemes",
"Proprietes",
"rafraichissement",
"rapprochee",
"recalcul",
"reinitialise",
"renseignables",
"reponse",
"requete",
"resultat",
"selecteur",
"selecteurs",
"Selectionne",
"Selectionnee",
"Separees",
"Simplifiee",
"souleve",
"specifiques",
"succes",
"Surchargement",
"tabpanel",
"tete",
"tseslint",
"Vali",
"VALIDEE",
"validite",
"Visibilite"
],
"djlint.pythonPath": "/home/gcch/.local/share/pipxu/venvs/8/bin/python",
"djlint.useVenv": false,
"stylelint.enable": true,
"stylelint.packageManager": "pnpm",
"twiggy.autoInsertSpaces": true,
"twiggy.framework": "ignore",
"twiggy.inlayHints.block": true,
"twiggy.inlayHints.macro": true,
"twiggy.inlayHints.macroArguments": true,
"typescript.tsdk": "node_modules/typescript/lib",
"terminal.integrated.env.osx": {}
}

17
.vscode/tasks.json vendored Executable file
View file

@ -0,0 +1,17 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "DDEV: Enable Xdebug",
"type": "shell",
"command": "ddev xdebug on",
"presentation": { "reveal": "silent", "close": true }
},
{
"label": "DDEV: Disable Xdebug",
"type": "shell",
"command": "ddev xdebug off",
"presentation": { "reveal": "silent", "close": true }
}
]
}

View file

View file

@ -1,5 +1,18 @@
I'll see you soup
- Thèmes
- LS_COLORS (Vivid ?)
- bat
- eza (?)
- fdfind
- fish
- gitui
- helix
- wezterm
- yazi
- zed
- zellij
Google API
AIzaSyDGe62r-bDxvNuDCP6HIfWIJAMvelFxU1s
402628219773-hl8niqniiiklf15f9biou8g06pbm9sac.apps.googleusercontent.com
@ -26,6 +39,14 @@ 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
}
}
---
Stripe
pk_live_51D0BbTIKBol0AhpghF9b6lJ4ZjPXWaNRzBgxtcUTdbV8OC2OpHxSbkMoEEgCHEPSs6E6NISfdMv92t9OnKqKh0sH00N6tgi6HW
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
---
- Chargement de la page
- Récupération des informations à la génération de la page
- Panier

View file

@ -12,23 +12,10 @@
- Champs
- Utiliser un polyfill pour BroadcastChannel
- PAGE SHOP
- [ ] Faire apparaître le menu des catégories de Produits quand on scroll vers le haut
- PAGE PANIER
- Erreur lorsque l'on ajoute deux variations d'un même produit et que l'on essaie d'en supprimer une.
- Il semblerait que supprimer une variation supprime toutes les entrées du même produit.
- MÉTHODES DE LIVRAISON
- [ ] Proposer la livraison à domicile en Belgique et en France pour le coût unique de 8 euros, quel que soit le montant de la commande
- [ ] Proposer la livraison aux États-Unis.
- PAGE PRODUIT
- PIED DE PAGE
- TOUTES LES PAGES
- Trouver la source des bordures superflues.
- Sur Chromium : box-shadow sur <article> ?
- MODE VACANCES
- Pour l'été, superposer à la page SHOP un calque gris sur lequel défile une animation d'un texte indiquant que la boutique est en vacances.
- La page doit rester défilable.
- MODE NO JS
- Laisser la page normalement défilable avec les images les une après les autres quand _JavaScript_ n'est pas présent.
---
@ -36,7 +23,7 @@
Un bouton « Retour en haut » permet pour un Utilisateur de rapidement revenir au sommet d'une page fournie en contenu.
Ne pas proposer ce bouton pour des pages faibles en contenus. Hoa Loranger recommande ainsi d'utiliser le seuil de **plus de quatre pages** de contenu (une page correspond à ce qui traversé avec l'appui sur la touche Espace dans le navigateur).
Ne pas proposer ce bouton pour des pages faibles en contenus. Hoa Loranger recommende ainsi d'utiliser le seuil de **plus de quatre pages** de contenu (une page correspond à ce qui traversé avec l'appui sur la touche Espace dans le navigateur).
### Apparence et contenu

View file

@ -1,15 +1,8 @@
{
"$schema": "https://biomejs.dev/schemas/2.0.4/schema.json",
"assist": { "enabled": false },
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"css": { "formatter": { "enabled": false }, "linter": { "enabled": true } },
"files": {
"experimentalScannerIgnores": [
"*.min.js",
"vendor",
"web/app/plugins",
"web/app/themes/haiku-atelier-2024/assets",
"web/wp"
],
"ignore": ["*.min.js", "vendor", "web/app/plugins", "web/app/themes/haiku-atelier-2024/assets", "web/wp"],
"ignoreUnknown": true,
"maxSize": 100000000
},
@ -17,7 +10,7 @@
"graphql": { "formatter": { "enabled": false }, "linter": { "enabled": true } },
"json": { "formatter": { "enabled": false }, "linter": { "enabled": true } },
"linter": {
"enabled": false,
"enabled": true,
"rules": {
"complexity": { "noForEach": "off" },
"nursery": {
@ -28,21 +21,9 @@
"options": { "attributes": ["class"], "functions": [""] }
}
},
"style": {
"recommended": true,
"noNonNullAssertion": "off",
"noParameterAssign": "error",
"useAsConstAssertion": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useSelfClosingElements": "error",
"useSingleVarDeclarator": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"noUselessElse": "error"
},
"style": { "recommended": true, "noNonNullAssertion": "off" },
"recommended": true
}
}
},
"organizeImports": { "enabled": false }
}

879
bun.lock

File diff suppressed because it is too large Load diff

View file

@ -20,8 +20,8 @@
"php": ">=8.2",
"composer/installers": "^2.3",
"crell/fp": "^1.0",
"htmlburger/carbon-fields": "^3.6",
"illuminate/support": "^12.18",
"htmlburger/carbon-fields": "^3.6.5",
"illuminate/support": "^11.34.2",
"laravel/helpers": "^1.7.1",
"log1x/wp-smtp": "^1.0.2",
"lstrojny/functional-php": "^1.17",
@ -31,8 +31,9 @@
"ramsey/uuid": "^4.7.6",
"roots/bedrock-autoloader": "^1.0.4",
"roots/bedrock-disallow-indexing": "^2.0",
"roots/wordpress": "^6.8.1",
"roots/wordpress": "^6.7.1",
"roots/wp-config": "^1.0",
"roots/wp-password-bcrypt": "^1.2",
"stripe/stripe-php": "^16.3",
"symfony/uid": "^7.2.0",
"timber/timber": "^2.3",

601
composer.lock generated Normal file → Executable file

File diff suppressed because it is too large Load diff

View file

@ -1,4 +0,0 @@
{
"dictionaries": ["fr-fr", "en-gb"],
"words": ["GLITCHTIP", "Vali", "fdir", "mobily", "oxlint", "valibot", "zstandard", "Eles", "logtape"]
}

File diff suppressed because one or more lines are too long

View file

@ -1,59 +0,0 @@
# Journal de développement
## 2025-06-13
### Informations produit sous forme de grille
- L'idée est de réimplémenter les informations essentiels du produit (nom, prix), le sélecteur de variation, les textes de détail, de conditions et d'entretien, et le bouton d'ajout au Panier.
- Plutôt qu'un encart flottant, contenant tout, il n'y aurait qu'une barre pleine longueur comprenant nom, prix et sélecteur de variation (`.essentiel-produit`).
- Il flotterait en bas de l'écran jusqu'à ce se poser à la fin des photos.
- Une nouvelle section, statique elle et faisant suite à la fois aux photos et à la barre, s'afficherait en pleine longueur sous forme d'accordéon, avec les anciens onglets comme sections.
- Par défaut, la section « Détails » serait développée.
- `<details>` et `<summary>` sont aujourd'hui pris en charge par les navigateurs (niveau _Baseline_), mais l'attribut `name` permettant l'ouverture exclusive d'une section par accordéon (p. ex. le développement d'une ferme toutes les autres) n'a que récemment été implémentée (2024 pour _Firefox_).
- Une implémentation en _JavaScript_ est donc pour l'instant nécessaire.
### Remaniement du défilement des photos de la page Produit
- Les flèches de défilement sont supprimées.
- À la place, les photos ne s'affichent plus en pleine longueur.
- Elles le sont à ~93%, pour que l'on perçoive sur les bords la photo précédente/suivante et signale à l'Utilisateur qu'il est possible de défiler.
## 2025-06-30
- Test de _LogTape_ comme librairie de journalisation.
## 2025-07-03
- Création d'une animation SVG avec des `<text>` défilants sur un `<path>`.
- Le redimensionnement dynamique du conteneur de l'animation se fait via JavaScript.
- Le script récupère la longueur d'une image au redimensionnement de la vue.
- Il injecte un attribut CSS `inline-size` dans le HTML de la page correspondant à cette nouvelle longueur.
- Il n'est pas encore possible de mettre en pause l'animation au survol de la souris, qui est une bonne pratique pour ce style d'éléments visuels.
- Le `<svg>` doit être d'une longueur supérieure au conteneur (ici `120%`) pour que le texte disparaisse de façon progressive, qu'il ne soit pas « coupé » brutalement aux extrémités.
- Début de l'implémentation d'une classe `no-js` pour un affichage adapté en cas d'absence de JavaScript.
- Développement d'un script `fish` qui lance un onglet Cromite en mode sans-tête avec profile Invité sur le site Haiku Atelier.
- Il est possible, en utilisant le débogueur à distance Chromium, de rafraîchir un onglet via le terminal en passant par `fx` et `websocat` pour l'interface _WebSocket_.
- Cela offre une forme primitive de « hot reload » (rechargement à chaud) pour éviter d'avoir manuellement taper F5 à chaque changement.
## 2025-07-04
- Problème de l'animation SVG s'affichant mal sur iOS.
- Ce serait du à un bogue de rendu du moteur _WebKit_.
- Pour le contourner, appliquer un `transform: translate3d` ou `transform: matrix` sur les éléments SVG.
- Installation d'un [débogueur distant pour iOS](https://git.gay/besties/ios-safari-remote-debug).
- Compilation de [ios-webkit-debug-proxy](https://github.com/google/ios-webkit-debug-proxy).
- Ensuite, avec un câble reliant l'iPhone à l'ordinateur :
- S'assurer que le démon `usbmuxd` tourne ;
- Ouvrir un onglet sur Safari et activer le _Web Inspector_ dans les préférences avancées ;
- Lancer `ios_webkit_debug_proxy` dans le terminal ;
- Compiler `ios-safari-remote-debug` (`./ios-safari-remote-debug build -t releases/Apple/Safari-17.5-macOS-14.5`) ;
- Lancer le serveur `ios-safari-remote-debug` (`./ios-safari-remote-debug serve`) ;
- Naviguer à son adresse, ouvrir les outils de développements normalement proposés.
- Cela devrait pouvoir faciliter la résolution du soucis de l'animation sur l'accueil pour Safari iOS.
- **Le fin de mot de l'histoire ?**
- Pour _iOS_, on ne peut pas (encore) spécifier de valeurs relatives en pourcentages pour les dimensions des _SVG_. Il faut utiliser des `vw`/`vi`.
- Pour les `<text>` au sein de SVG, le rendu de `font-size` peut différer de celui de Chromium/FF. Question de _PPI_ ?
- `IntersectionObserver` émettait un événement où `intersectionRatio` n'était pas 1, mais ~0.99874784. Vu que le script utilisait une valeur de 1 pour décider qu'un élément soit caché ou non, l'animation était cachée au chargement de la page.
- Utiliser un ratio supérieur à 0.9 corrige le soucisS.
- Journalisation avec _LogTape_.
- Différenciation primaire du niveau minimum de journal en utilisant la variable d'environnement `VITE_ENV`.

View file

@ -12,7 +12,7 @@
"cacheKey": "1",
"commands": [
{ "command": "prettier --ignore-unknown --write --stdin-filepath {{file_path}}", "exts": ["php", "xml"] },
{ "command": "just --dump", "fileNames": ["justfile"], "stdin": true }
{ "command": "just --dump", "fileNames": ["justfile"], "stdin": false }
],
"cwd": "${originConfigDir}",
"indentWidth": 2,
@ -76,13 +76,13 @@
},
"newLineKind": "lf",
"plugins": [
"https://plugins.dprint.dev/typescript-0.95.8.wasm",
"https://plugins.dprint.dev/json-0.20.0.wasm",
"https://plugins.dprint.dev/markdown-0.19.0.wasm",
"https://plugins.dprint.dev/toml-0.7.0.wasm",
"https://plugins.dprint.dev/g-plane/malva-v0.12.1.wasm",
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.22.0.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm",
"https://plugins.dprint.dev/typescript-0.93.3.wasm",
"https://plugins.dprint.dev/json-0.19.4.wasm",
"https://plugins.dprint.dev/markdown-0.17.8.wasm",
"https://plugins.dprint.dev/toml-0.6.4.wasm",
"https://plugins.dprint.dev/g-plane/malva-v0.11.1.wasm",
"https://plugins.dprint.dev/g-plane/markup_fmt-v0.18.0.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm",
"https://plugins.dprint.dev/exec-0.5.1.json@492414e39dea4dccc07b4af796d2f4efdb89e84bae2bd4e1e924c0cc050855bf"
],
"toml": {

View file

@ -46,8 +46,12 @@ export default tseslint.config(
"@typescript-eslint/no-misused-promises": "off",
/* Cette règle empêche l'usage de génériques précisant les types de retour de fonctions. */
"@typescript-eslint/no-unnecessary-type-parameters": "off",
// Pour utiliser LogTape.
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-unused-expressions": [
"error",
{
allowTernary: true,
},
],
/* Cette règle est doublon avec les règles noUnused* de TypeScript. */
"@typescript-eslint/no-unused-vars": "off",
/* Cette règle empêche de lever des erreurs génériques (p.ex. `E extends Error`). */

122
justfile
View file

@ -1,30 +1,31 @@
set shell := ["fish", "-c"]
set unstable := true
cacheFolder := ".cache"
eslintCacheFile := "eslintcache"
prettierCacheFile := "prettiercache"
stylelintCacheFile := "stylelintcache"
# Recette par défaut.
default: dev
# Liste toutes les recettes
list:
@just --list --list-heading 'Recettes disponibles :'\n'' --unsorted
# Met à jour les dépendances composer et npm.
[group('js')]
[group('php')]
# Démarre le conteneur ddev
start:
ddev start
# Arrête le conteneur ddev
stop:
ddev stop
# Met à jour les dépendances composer et npm
update:
composer update
bun update
pnpm update --latest
# Formatte avec Prettier et dprint.
[group('qualité')]
# Formatte avec Prettier et dprint
format:
@echo "Formatage de l'ensemble du code avec Prettier et dprint."
bunx prettier \
pnpm prettier \
--cache \
--cache-location "{{ cacheFolder }}/{{ prettierCacheFile }}" \
--ignore-unknown \
@ -32,114 +33,77 @@ format:
.
dprint fmt
# Compile, minifie et optimise Sass vers CSS.
[group('css')]
# Compile, minifie et optimise Sass vers CSS
build-css:
@bunx sass \
pnpm sass \
--update \
"web/app/themes/haiku-atelier-2024/src/sass":"web/app/themes/haiku-atelier-2024/assets/css"
@bunx lightningcss \
pnpm lightningcss \
--bundle \
--minify \
--output-file "web/app/themes/haiku-atelier-2024/assets/css/main.min.css" \
-- "web/app/themes/haiku-atelier-2024/assets/css/main.css"
@bunx lightningcss \
pnpm lightningcss \
--bundle \
--minify \
--output-file "web/app/themes/haiku-atelier-2024/assets/css/pages/page-panier.min.css" \
-- "web/app/themes/haiku-atelier-2024/assets/css/pages/page-panier.css"
@bunx lightningcss \
pnpm lightningcss \
--bundle \
--minify \
--output-file "web/app/themes/haiku-atelier-2024/assets/css/pages/page-accueil.min.css" \
-- "web/app/themes/haiku-atelier-2024/assets/css/pages/page-accueil.css"
@bunx lightningcss \
pnpm lightningcss \
--bundle \
--minify \
--output-file "web/app/themes/haiku-atelier-2024/assets/css/pages/page-boutique.min.css" \
-- "web/app/themes/haiku-atelier-2024/assets/css/pages/page-boutique.css"
@bunx lightningcss \
pnpm lightningcss \
--bundle \
--minify \
--output-file "web/app/themes/haiku-atelier-2024/assets/css/pages/page-a-propos.min.css" \
-- "web/app/themes/haiku-atelier-2024/assets/css/pages/page-a-propos.css"
@bunx lightningcss \
pnpm lightningcss \
--bundle \
--minify \
--output-file "web/app/themes/haiku-atelier-2024/assets/css/pages/page-modele-simple.min.css" \
-- "web/app/themes/haiku-atelier-2024/assets/css/pages/page-modele-simple.css"
@bunx lightningcss \
--bundle \
--minify \
--output-file "web/app/themes/haiku-atelier-2024/assets/css/pages/page-succes-commande.min.css" \
-- "web/app/themes/haiku-atelier-2024/assets/css/pages/page-succes-commande.css"
pnpm lightningcss \
--bundle \
--minify \
--output-file "web/app/themes/haiku-atelier-2024/assets/css/pages/page-succes-commande.min.css" \
-- "web/app/themes/haiku-atelier-2024/assets/css/pages/page-succes-commande.css"
# Compile le CSS à chaque changement de fichier.
[group('css')]
# Compile le CSS à chaque changement de fichier
watch-css:
@just dev
@watchexec -w "web/app/themes/haiku-atelier-2024/src/sass" -- just build-css reload-tab
pnpm sass \
--update \
--watch \
"web/app/themes/haiku-atelier-2024/src/sass":"web/app/themes/haiku-atelier-2024/assets/css"
# Compile TypeScript en JavaScript.
[group('js')]
# Compile TypeScript en JavaScript
build-js:
@bunx vite build
pnpm vite build
# Compile tout.
[group('css')]
[group('js')]
# Compile tout
build-all:
@just build-css
@just build-js
@just format
just build-css
just build-js
# Compile TypeScript à chaque changement de fichier.
[group('js')]
# Compile TypeScript à chaque changement de fichier
watch-js:
bunx vite build --watch
pnpm vite build --watch
# Vérifie le code TypeScript avec des analyseurs statiques.
[group('js')]
[group('qualité')]
# Vérifie le code TypeScript avec des analyseurs statiques
lint-js:
-bunx eslint "web/app/themes/haiku-atelier-2024/src/scripts"
-bunx biome check --reporter=summary "web/app/themes/haiku-atelier-2024/src/scripts"
-bunx oxlint "web/app/themes/haiku-atelier-2024/src/scripts"
# Vérifie le code Sass avec Stylelint.
[group('css')]
[group('qualité')]
lint-css:
-bunx stylelint "web/app/themes/haiku-atelier-2024/src/sass/" --fix
-pnpm eslint "web/app/themes/haiku-atelier-2024/src/scripts"
-pnpm biome check --reporter=summary "web/app/themes/haiku-atelier-2024/src/scripts"
-pnpm oxlint "web/app/themes/haiku-atelier-2024/src/scripts"
# Vérifie le code TypeScript mort avec knip
[group('js')]
[group('qualité')]
lint-code-mort:
-bunx knip
-pnpm knip
# Fusionne tous les changements actuels dans le commit précédent et pousse sur le répertoire distant avec Jujetsu.
[group('vcs')]
# Avec Jujetsu, fusionne tous les changements actuels dans le commit précédent et pousse sur le répertoire distant
squash-and-push:
-jj squash --ignore-immutable && jj bookmark set principale -r @- --allow-backwards && jj git push
# Analyse statiquement, compile et formate le CSS
[group('css')]
[group('qualité')]
lint-build-format-css:
-just lint-css
-just build-css
-just format
# Lance un navigateur de développement.
[group('développement')]
dev:
@/opt/cromite/chrome --remote-debugging-address=127.0.0.1 --remote-debugging-port=9222 --profile-directory=Guest "https://haikuatelier.gcch.local" &
# Recharge le premier onglet du navigateur de développement.
[group('développement')]
reload-tab:
#!/usr/bin/fish
set -f WSURL (curl -s http://127.1:9222/json | fx '.[0].webSocketDebuggerUrl')
set -f REQUEST '{ "id": 2, "method": "Page.reload", "params": { "ignoreCache": true, "scriptToEvaluateOnLoad": "" } }'
echo $REQUEST | websocat $WSURL

View file

@ -5,66 +5,64 @@
"description": "",
"author": "",
"license": "ISC",
"packageManager": "pnpm@9.14.4",
"main": "index.js",
"keywords": [],
"scripts": { "knip": "knip" },
"scripts": {
"knip": "knip",
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@logtape/logtape": "^1.0.2",
"@mobily/ts-belt": "v4.0.0-rc.5",
"@sentry/browser": "^9.34.0",
"a11y-dialog": "^8.1.4",
"@mobily/ts-belt": "3.13.1",
"@sentry/browser": "9.14.0",
"@swan-io/boxed": "^3.2.0",
"a11y-dialog": "^8.1.3",
"chalk": "^5.4.1",
"lit-html": "^3.3.0",
"loglevel": "^1.9.2",
"loglevel-plugin-prefix": "^0.8.4",
"optics-ts": "^2.4.1",
"purify-ts": "2.1.2",
"ts-pattern": "^5.7.1",
"valibot": "1.1.0"
"purify-ts": "^2.1.1",
"ts-pattern": "^5.7.0",
"valibot": "1.0.0"
},
"devDependencies": {
"@biomejs/biome": "^2.0.6",
"@cspell/dict-fr-fr": "^2.3.0",
"@eslint/js": "^9.30.1",
"@playwright/test": "^1.53.2",
"@biomejs/biome": "^1.9.4",
"@eslint/js": "^9.25.1",
"@prettier/plugin-php": "^0.22.4",
"@prettier/plugin-xml": "^3.4.1",
"@sentry/core": "^9.34.0",
"@swc/cli": "0.7.7",
"@types/eslint__js": "^9.14.0",
"@types/node": "^24.0.10",
"@vitejs/plugin-legacy": "^7.0.0",
"@sentry/core": "^9.14.0",
"@swc/cli": "0.7.3",
"@types/node": "^22.14.1",
"@vitejs/plugin-legacy": "^6.1.0",
"better-typescript-lib": "^2.11.0",
"browserslist": "^4.25.1",
"eslint": "^9.30.1",
"eslint-plugin-oxlint": "^1.5.0",
"eslint-plugin-perfectionist": "^4.15.0",
"fdir": "^6.4.6",
"globals": "^16.3.0",
"knip": "^5.61.3",
"lightningcss-cli": "^1.30.1",
"oxlint": "^1.5.0",
"browserslist": "^4.24.4",
"eslint": "^9.25.1",
"eslint-plugin-oxlint": "^0.16.7",
"eslint-plugin-perfectionist": "^4.12.1",
"fdir": "^6.4.4",
"globals": "^16.0.0",
"knip": "^5.50.5",
"oxlint": "^0.16.7",
"picomatch": "^4.0.2",
"playwright": "^1.53.2",
"prettier": "^3.6.2",
"prettier-plugin-pkg": "^0.21.1",
"prettier-plugin-sh": "^0.18.0",
"sass-embedded": "^1.89.2",
"stylelint": "^16.21.1",
"prettier": "^3.5.3",
"prettier-plugin-pkg": "^0.19.0",
"prettier-plugin-sh": "^0.17.2",
"sass-embedded": "^1.87.0",
"stylelint": "^16.19.0",
"stylelint-config-clean-order": "^7.0.0",
"stylelint-config-sass-guidelines": "^12.1.0",
"stylelint-config-standard-scss": "^15.0.1",
"stylelint-config-standard-scss": "^14.0.0",
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
"stylelint-plugin-logical-css": "^1.2.3",
"typescript": "5.8.3",
"typescript-eslint": "^8.35.1",
"vite": "^7.0.2",
"vite-plugin-compression2": "^2.2.0",
"typescript-eslint": "^8.31.0",
"vite": "^6.3.2",
"vite-plugin-manifest-sri": "^0.2.0",
"vite-plugin-node-polyfills": "^0.23.0",
"vite-plugin-valibot-env": "^1.0.1",
"vite-plugin-valibot-env": "^0.10.0",
"vite-tsconfig-paths": "^5.1.4",
"wp-types": "^4.68.1"
"wp-types": "^4.68.0"
},
"browserslist": [
"chrome >0 and last 3 years",
@ -76,8 +74,18 @@
"ios >0 and last 3 years"
],
"knip": {
"entry": ["web/app/themes/haiku-atelier-2024/src/scripts/*.ts"],
"project": ["web/app/themes/haiku-atelier-2024/src/scripts/**/*.{js,ts,d.ts}"]
"entry": [
"web/app/themes/haiku-atelier-2024/src/scripts/*.ts"
],
"project": [
"web/app/themes/haiku-atelier-2024/src/scripts/**/*.{js,ts,d.ts}"
]
},
"trustedDependencies": ["@biomejs/biome", "@parcel/watcher", "@swc/core", "core-js", "esbuild", "lightningcss-cli"]
"trustedDependencies": [
"@biomejs/biome",
"@parcel/watcher",
"@swc/core",
"core-js",
"esbuild"
]
}

View file

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" ?>
<ruleset name="Roots">
<description>Roots Coding Standards</description>

View file

@ -1,92 +0,0 @@
import { defineConfig, devices } from "@playwright/test";
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// import dotenv from 'dotenv';
// import path from 'path';
// dotenv.config({ path: path.resolve(__dirname, '.env') });
/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: "list",
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://localhost:3000',
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: "on-first-retry",
clientCertificates: [
{
origin: "https://haikuatelier.gcch.local",
certPath: "../certs/_wildcard.gcch.local.pem",
keyPath: "../certs/_wildcard.gcch.local-key.pem",
},
],
ignoreHTTPSErrors: true,
},
/* Configure projects for major browsers */
projects: [
{
name: "desktop-chromium-1920",
use: { ...devices["Desktop Chrome"], viewport: { width: 1920, height: 1080 } },
},
{
name: "desktop-chromium-1536",
use: { ...devices["Desktop Chrome"], viewport: { width: 1536, height: 864 } },
},
{
name: "desktop-chromium-1366",
use: { ...devices["Desktop Chrome"], viewport: { width: 1366, height: 768 } },
},
{
name: "desktop-firefox-1920",
use: { ...devices["Desktop Firefox"], viewport: { width: 1920, height: 1080 } },
},
{
name: "desktop-firefox-1536",
use: { ...devices["Desktop Firefox"], viewport: { width: 1536, height: 864 } },
},
{
name: "desktop-firefox-1366",
use: { ...devices["Desktop Firefox"], viewport: { width: 1366, height: 768 } },
},
{
name: "tablet-chromium-portrait",
use: { ...devices["Galaxy Tab S9"] },
},
{
name: "tablet-chromium-landscape",
use: { ...devices["Galaxy Tab S9 landscape"] },
},
{
name: "mobile-chromium-portrait",
use: { ...devices["Pixel 7"] },
},
{
name: "mobile-chromium-landscape",
use: { ...devices["Pixel 7 landscape"] },
},
],
/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// url: 'http://localhost:3000',
// reuseExistingServer: !process.env.CI,
// },
});

7229
pnpm-lock.yaml generated Executable file

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0" ?>
<psalm
xmlns="https://getpsalm.org/schema/config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@ -9,17 +9,17 @@
findUnusedCode="true"
resolveFromConfigFile="true"
>
<projectFiles>
<directory name="config" />
<directory name="web" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<plugins>
<pluginClass class="PsalmWordPress\Plugin">
<useDefaultStubs value="false" />
</pluginClass>
</plugins>
<projectFiles>
<directory name="config" />
<directory name="web" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>
<plugins>
<pluginClass class="PsalmWordPress\Plugin">
<useDefaultStubs value="false" />
</pluginClass>
</plugins>
</psalm>

Some files were not shown because too many files have changed in this diff Show more