@webship.co/workspace-sandboxes 0.0.0-stage → 1.0.0-beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +53 -2
  2. package/commands/cmd-cucumber11-0-x-project.sh +29 -0
  3. package/commands/cmd-drupal10-3-x-recommended-project.sh +29 -0
  4. package/commands/cmd-drupal10-recommended-project.sh +29 -0
  5. package/commands/cmd-drupal11-0-x-recommended-project.sh +29 -0
  6. package/commands/cmd-drupal11-4-0-recommended-project.sh +29 -0
  7. package/commands/cmd-drupal11-4-x-recommended-project.sh +29 -0
  8. package/commands/cmd-drupal11-recommended-project.sh +30 -0
  9. package/commands/cmd-drupal12-recommended-project.sh +41 -0
  10. package/commands/cmd-drupal9-recommended-project.sh +29 -0
  11. package/commands/cmd-drupalcms2-1-0-project.sh +29 -0
  12. package/commands/cmd-drupalcms2-x-project.sh +29 -0
  13. package/commands/cmd-odoo20-project.sh +21 -0
  14. package/commands/cmd-tools-add-users.sh +24 -0
  15. package/commands/cmd-tools-backup-sandboxes.sh +21 -0
  16. package/commands/cmd-tools-cancel-users.sh +24 -0
  17. package/commands/cmd-tools-checks.sh +20 -0
  18. package/commands/cmd-tools-clone.sh +27 -0
  19. package/commands/cmd-tools-hostnames.sh +39 -0
  20. package/commands/cmd-tools-reclaim.sh +24 -0
  21. package/commands/cmd-tools-remove.sh +46 -0
  22. package/commands/cmd-tools-screen.sh +21 -0
  23. package/commands/cmd-tools-testing.sh +22 -0
  24. package/commands/cmd-tools-update-all.sh +29 -0
  25. package/commands/cmd-webship11-0-0-project.sh +32 -0
  26. package/commands/cmd-webship11-0-x-project.sh +29 -0
  27. package/commands/cmd-webships2-0-0-project.sh +29 -0
  28. package/commands/cmd-webships2-0-x-project.sh +29 -0
  29. package/commands/cmd-webships3-0-x-project.sh +40 -0
  30. package/commands/cmd-wordpress-project.sh +21 -0
  31. package/commands/cmd-wpbedrock1-project.sh +21 -0
  32. package/config/workspace.sandboxes.settings.yml +17 -0
  33. package/dist/src/index.d.ts +11 -0
  34. package/dist/src/index.js +17 -0
  35. package/dist/src/index.js.map +1 -0
  36. package/docs/AGENTS.md +52 -0
  37. package/docs/CLAUDE.md +7 -0
  38. package/docs/README.md +5 -0
  39. package/features/sandboxes.feature +13 -0
  40. package/package.json +80 -4
package/README.md CHANGED
@@ -1,3 +1,54 @@
1
- # Temporary Holding Version
1
+ # @webship.co/workspace-sandboxes
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The **Sandboxes** workspace of the [Webship Workspace](https://github.com/webship/workspace) dashboard:
4
+ the `sandboxes/` folder (type `sites`), its settings file (`core/config/workspace.sandboxes.settings.yml`),
5
+ its commands and its docs, as a plugin.
6
+
7
+ ## Use it
8
+
9
+ ```bash
10
+ cd ~/workspace
11
+ bash core/scripts/plugins.sh --require github:webship/workspace-sandboxes
12
+ bash core/scripts/plugins.sh --activate sandboxes # puts `sandboxes` on the workspaces list of settings.yml
13
+ bash core/scripts/plugins.sh --install sandboxes # the folder, its settings file (once), its commands, its docs (once)
14
+ ```
15
+
16
+ The settings file and the docs are placed once and never overwritten: they hold what you put there.
17
+ `--deactivate` takes the workspace off the list; the folder and its content stay.
18
+
19
+ ## The commands
20
+
21
+ | Command |
22
+ | --- |
23
+ | `cmd-cucumber11-0-x-project.sh` |
24
+ | `cmd-drupal10-3-x-recommended-project.sh` |
25
+ | `cmd-drupal10-recommended-project.sh` |
26
+ | `cmd-drupal11-0-x-recommended-project.sh` |
27
+ | `cmd-drupal11-4-0-recommended-project.sh` |
28
+ | `cmd-drupal11-4-x-recommended-project.sh` |
29
+ | `cmd-drupal11-recommended-project.sh` |
30
+ | `cmd-drupal12-recommended-project.sh` |
31
+ | `cmd-drupal9-recommended-project.sh` |
32
+ | `cmd-drupalcms2-1-0-project.sh` |
33
+ | `cmd-drupalcms2-x-project.sh` |
34
+ | `cmd-odoo20-project.sh` |
35
+ | `cmd-tools-add-users.sh` |
36
+ | `cmd-tools-backup-sandboxes.sh` |
37
+ | `cmd-tools-cancel-users.sh` |
38
+ | `cmd-tools-checks.sh` |
39
+ | `cmd-tools-clone.sh` |
40
+ | `cmd-tools-hostnames.sh` |
41
+ | `cmd-tools-reclaim.sh` |
42
+ | `cmd-tools-remove.sh` |
43
+ | `cmd-tools-screen.sh` |
44
+ | `cmd-tools-testing.sh` |
45
+ | `cmd-tools-update-all.sh` |
46
+ | `cmd-webship11-0-0-project.sh` |
47
+ | `cmd-webship11-0-x-project.sh` |
48
+ | `cmd-webships2-0-0-project.sh` |
49
+ | `cmd-webships2-0-x-project.sh` |
50
+ | `cmd-webships3-0-x-project.sh` |
51
+ | `cmd-wordpress-project.sh` |
52
+ | `cmd-wpbedrock1-project.sh` |
53
+
54
+ The bash functions these commands call live in the dashboard's `core/scripts/functions`.
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Cucumber 11.0.x
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set the version.
14
+ site_version="11.0.x-dev";
15
+
16
+ # Distribution.
17
+ distribution_name="cucumber";
18
+ distribution_title="Cucumber";
19
+ distribution_webroot="web";
20
+ distribution_profile_repo="webship/cucumber";
21
+ distribution_project_template="webship/cucumber-project";
22
+
23
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
24
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
25
+
26
+ shift $#;
27
+
28
+ # Build the distribution.
29
+ build_distribution ;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Drupal 10.3.x (recommended project)
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="10.3.x-dev";
15
+
16
+ # Distribution.
17
+ distribution_name="drupal";
18
+ distribution_title="Drupal";
19
+ distribution_webroot="web";
20
+ distribution_profile_repo="drupal/core";
21
+ distribution_project_template="drupal/recommended-project";
22
+
23
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
24
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
25
+
26
+ shift $#;
27
+
28
+ # Build the distribution.
29
+ build_distribution ;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Drupal 10 (recommended project)
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="~10.0";
15
+
16
+ # Distribution.
17
+ distribution_name="drupal";
18
+ distribution_title="Drupal";
19
+ distribution_webroot="web";
20
+ distribution_profile_repo="drupal/core";
21
+ distribution_project_template="drupal/recommended-project";
22
+
23
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
24
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
25
+
26
+ shift $#;
27
+
28
+ # Build the distribution.
29
+ build_distribution ;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Drupal 11.0.x (recommended project)
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="11.0.x-dev";
15
+
16
+ # Distribution.
17
+ distribution_name="drupal";
18
+ distribution_title="Drupal";
19
+ distribution_webroot="web";
20
+ distribution_profile_repo="drupal/core";
21
+ distribution_project_template="drupal/recommended-project";
22
+
23
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
24
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
25
+
26
+ shift $#;
27
+
28
+ # Build the distribution.
29
+ build_distribution ;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Drupal 11.4.0 (recommended project)
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="~11.4.0";
15
+
16
+ # Distribution.
17
+ distribution_name="drupal";
18
+ distribution_title="Drupal";
19
+ distribution_webroot="web";
20
+ distribution_profile_repo="drupal/core";
21
+ distribution_project_template="drupal/recommended-project";
22
+
23
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
24
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
25
+
26
+ shift $#;
27
+
28
+ # Build the distribution.
29
+ build_distribution ;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Drupal 11.4.x (recommended project)
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="11.4.x-dev";
15
+
16
+ # Distribution.
17
+ distribution_name="drupal";
18
+ distribution_title="Drupal";
19
+ distribution_webroot="web";
20
+ distribution_profile_repo="drupal/core";
21
+ distribution_project_template="drupal/recommended-project";
22
+
23
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
24
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
25
+
26
+ shift $#;
27
+
28
+ # Build the distribution.
29
+ build_distribution ;
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Drupal 11 (latest)
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="^11";
15
+ site_version_dev="11.x-dev";
16
+
17
+ # Distribution.
18
+ distribution_name="drupal";
19
+ distribution_title="Drupal";
20
+ distribution_webroot="web";
21
+ distribution_profile_repo="drupal/core";
22
+ distribution_project_template="drupal/recommended-project";
23
+
24
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
25
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
26
+
27
+ shift $#;
28
+
29
+ # Build the distribution.
30
+ build_distribution ;
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Drupal 12 (latest)
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="^12";
15
+ site_version_dev="12.x-dev";
16
+ # Drupal 12 has no stable release yet, so the caret constraint above matches only a
17
+ # pre-release and composer's default `stable` minimum would resolve to nothing. This is
18
+ # the floor this builder accepts; composer still takes the highest match, so 12.0.0 wins
19
+ # the day it lands and this line can simply go.
20
+ site_version_stability="alpha";
21
+ # drupal/core 12 requires php >= 8.5.0, and DDEV's default is 8.4.
22
+ site_php_version="8.5";
23
+ # Core 12 requires guzzle 8. Every TAGGED Drush requires guzzle ^7 — 14.x is the first
24
+ # branch to allow 8 and it has no release yet, so the development branch is the only
25
+ # Drush that can sit beside Drupal 12 today. Swap this for `^14` when 14.0.0 is tagged.
26
+ site_drush_version="14.x-dev";
27
+
28
+ # Distribution.
29
+ distribution_name="drupal";
30
+ distribution_title="Drupal";
31
+ distribution_webroot="web";
32
+ distribution_profile_repo="drupal/core";
33
+ distribution_project_template="drupal/recommended-project";
34
+
35
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
36
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
37
+
38
+ shift $#;
39
+
40
+ # Build the distribution.
41
+ build_distribution ;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Drupal 9 (recommended project)
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="~9";
15
+
16
+ # Distribution.
17
+ distribution_name="drupal";
18
+ distribution_title="Drupal";
19
+ distribution_webroot="web";
20
+ distribution_profile_repo="drupal/core";
21
+ distribution_project_template="drupal/recommended-project";
22
+
23
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
24
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
25
+
26
+ shift $#;
27
+
28
+ # Build the distribution.
29
+ build_distribution ;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Drupal CMS 2.1.0
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="~2.1.0";
15
+
16
+ # Distribution.
17
+ distribution_name="drupal_cms";
18
+ distribution_title="Drupal CMS";
19
+ distribution_webroot="web";
20
+ distribution_profile_repo="drupal/cms";
21
+ distribution_project_template="drupal/cms";
22
+
23
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
24
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
25
+
26
+ shift $#;
27
+
28
+ # Build the distribution.
29
+ build_distribution ;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Drupal CMS 2.x
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="^2";
15
+
16
+ # Distribution.
17
+ distribution_name="drupal_cms";
18
+ distribution_title="Drupal CMS";
19
+ distribution_webroot="web";
20
+ distribution_profile_repo="drupal/cms";
21
+ distribution_project_template="drupal/cms";
22
+
23
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
24
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
25
+
26
+ shift $#;
27
+
28
+ # Build the distribution.
29
+ build_distribution ;
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Odoo 20 Community
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="20.0";
15
+
16
+ ARGPARSE_DESCRIPTION="Build an Odoo Community project, on PostgreSQL"
17
+ source ${WORKSPACE_SCRIPTS}/args/arg-odoo.sh || exit 1 ;
18
+
19
+ shift $#;
20
+
21
+ build_odoo ;
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Bootstrap.
4
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
5
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
6
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
7
+
8
+ # Load workspace settings and extra lists.
9
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
10
+
11
+ ARGPARSE_DESCRIPTION="Add users to a project"
12
+ argparse "$@" <<EOF || exit 1
13
+ parser.add_argument('PROJECT_NAME',
14
+ help='The name of the project.')
15
+ parser.add_argument('DISTRIBUTION_NAME',
16
+ help='The name of the user list for the profile.')
17
+ EOF
18
+
19
+ shift $#;
20
+ trim_project_name ; # "v11x00b1/" -> "v11x00b1" — see functions/fun-project-name.sh
21
+
22
+ distribution_name=${DISTRIBUTION_NAME};
23
+
24
+ add_users ${PROJECT_NAME} ${distribution_name};
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Bootstrap.
4
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
5
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
6
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
7
+
8
+ # Load workspace settings and extra lists.
9
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
10
+
11
+ ARGPARSE_DESCRIPTION="Backup a sandboxes project"
12
+ argparse "$@" <<EOF || exit 1
13
+ parser.add_argument('PROJECT_NAME',
14
+ help='The name of the project.')
15
+ EOF
16
+
17
+ shift $#;
18
+ trim_project_name ; # "v11x00b1/" -> "v11x00b1" — see functions/fun-project-name.sh
19
+
20
+ backup_workspace_item "${PROJECT_NAME}" || exit 1 ;
21
+ (cd ${PROJECT_NAME} && ddev export-db --file=${backups}/${doc_name}/${doc_name}---${PROJECT_NAME}--${BACKUP_TIME}-db.sql.gz) ;
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Bootstrap.
4
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
5
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
6
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
7
+
8
+ # Load workspace settings and extra lists.
9
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
10
+
11
+ ARGPARSE_DESCRIPTION="Cancle users from a project and delete their content"
12
+ argparse "$@" <<EOF || exit 1
13
+ parser.add_argument('PROJECT_NAME',
14
+ help='The name of the project.')
15
+ parser.add_argument('DISTRIBUTION_NAME',
16
+ help='The name of the user list for the profile.')
17
+ EOF
18
+
19
+ shift $#;
20
+ trim_project_name ; # "v11x00b1/" -> "v11x00b1" — see functions/fun-project-name.sh
21
+
22
+ distribution_name=${DISTRIBUTION_NAME};
23
+
24
+ cancel_users ${PROJECT_NAME} ${distribution_name};
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Run the code-quality checks a package in this workspace already declares in its package.json —
4
+ # lint:js, lint:css, lint:yaml, spellcheck, phpcs, and the browser suite — mapped onto one set of
5
+ # canonical names so the command means the same thing in every workspace.
6
+
7
+ # Bootstrap.
8
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
9
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
10
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
11
+
12
+ # Load workspace settings and extra lists.
13
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
14
+
15
+ ARGPARSE_DESCRIPTION="Run the code-quality checks a sandboxes item already declares"
16
+ source ${WORKSPACE_SCRIPTS}/args/arg-checks.sh || exit 1 ;
17
+
18
+ shift $#;
19
+
20
+ checks_command ;
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Clone a project — folder and database — into a new name, in this workspace or
4
+ # another one. The clone becomes an independent DDEV project with its own name,
5
+ # containers and database; the source is never modified.
6
+ #
7
+ # bash cmd-tools-clone.sh <project> --to <name>
8
+ # bash cmd-tools-clone.sh <project> --to <name> --target-workspace sandboxes
9
+ #
10
+ # When the project is a git checkout it can be cloned as a git WORKTREE instead:
11
+ # one shared .git and one history, a branch per folder, and still its own DDEV
12
+ # project at its own URL with its own database.
13
+ #
14
+ # bash cmd-tools-clone.sh <project> --to <name> --worktree
15
+ # bash cmd-tools-clone.sh <project> --to <name> --worktree --branch 3512345-the-fix
16
+
17
+ # Bootstrap.
18
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
19
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
20
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
21
+
22
+ ARGPARSE_DESCRIPTION="Clone a project (folder + database) into a new name, here or in another workspace"
23
+ source ${WORKSPACE_SCRIPTS}/args/arg-clone.sh || exit 1 ;
24
+
25
+ shift $#;
26
+
27
+ clone_project ;
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Hostnames (extra domains)
4
+ #
5
+ # What a project answers at, and how to give it another address.
6
+ #
7
+ # A DDEV project's URL comes from its NAME (`<name>.ddev.site`), and the dashboard
8
+ # hands out a second, hierarchical one (`<project>.sandboxes.workspace.ddev.site`).
9
+ # This adds a THIRD shape: a flat hostname of your choosing, so the same project
10
+ # name in two workspaces can be told apart —
11
+ # `test3-sandboxes.ddev.site` beside `test3-test.ddev.site`.
12
+ #
13
+ # It ADDS rather than renames. Renaming a DDEV project kills the old URL,
14
+ # recreates its containers and volumes, and leaves the project name no longer
15
+ # matching the folder — which is what makes a git worktree collide with its
16
+ # source. An extra hostname costs nothing and is reversible.
17
+ #
18
+ # bash cmd-tools-hostnames.sh # every project here
19
+ # bash cmd-tools-hostnames.sh myproject # just this one
20
+ # bash cmd-tools-hostnames.sh myproject --with-workspace --start
21
+ # bash cmd-tools-hostnames.sh myproject --add staging --start
22
+ # bash cmd-tools-hostnames.sh myproject --remove staging
23
+
24
+ # Bootstrap.
25
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
26
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
27
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
28
+
29
+ # Load workspace settings.
30
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
31
+
32
+ ARGPARSE_DESCRIPTION="What a project answers at, and how to add another address"
33
+ source ${WORKSPACE_SCRIPTS}/args/arg-hostnames.sh || exit 1 ;
34
+
35
+ shift $#;
36
+
37
+ cd ${WORKSPACE_ROOT}/${doc_name};
38
+
39
+ hostnames_command ;
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Reclaim the disk that REMOVED projects left behind — their DDEV databases, snapshots, built images
4
+ # and containers. A project whose folder is still on disk is never touched, stopped or not.
5
+ #
6
+ # The sweep is machine-wide wherever you run it: it takes no project name, reads WORKSPACE_ROOT, and
7
+ # protects every project folder in the tree — so this copy behaves identically to the one in any other
8
+ # workspace. It ships in each workspace that leans on DDEV, graphify or RAG for the same reason
9
+ # cmd-tools-graphify.sh does: the folder you are standing in is where you look for a cmd-tools-*.
10
+
11
+ # Bootstrap.
12
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
13
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
14
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
15
+
16
+ # Load workspace settings and extra lists.
17
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
18
+
19
+ ARGPARSE_DESCRIPTION="Reclaim disk from projects that no longer have a folder — dry run unless --apply"
20
+ source ${WORKSPACE_SCRIPTS}/args/arg-reclaim.sh || exit 1 ;
21
+
22
+ shift $#;
23
+
24
+ reclaim_command ;
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Bootstrap.
4
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
5
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
6
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
7
+
8
+ # Load workspace settings and extra lists.
9
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
10
+
11
+
12
+ ARGPARSE_DESCRIPTION="Remove a project"
13
+ argparse "$@" <<EOF || exit 1
14
+ parser.add_argument('PROJECT_NAME',
15
+ default='_none_',
16
+ nargs='?',
17
+ help='The name of the project.')
18
+ parser.add_argument('-o', '--orphans',
19
+ action='store_true',
20
+ default=False,
21
+ help='List DDEV entries whose project directory is gone, instead of removing anything.')
22
+ parser.add_argument('-f', '--force',
23
+ action='store_true',
24
+ default=False,
25
+ help='Remove even when the folder is the main git checkout other worktrees depend on, or holds commits and changes that are on no remote. Both are refused without it.')
26
+ parser.add_argument('-b', '--backup',
27
+ action='store_true',
28
+ default=False,
29
+ help='Export the database into backups/ before anything is deleted. Off by default: a remove is a remove.')
30
+ EOF
31
+
32
+ shift $#;
33
+ trim_project_name ; # "v11x00b1/" -> "v11x00b1" — see functions/fun-project-name.sh
34
+
35
+
36
+ # Change directory to the workspace for this full operation.
37
+ cd ${WORKSPACE_ROOT}/${doc_name};
38
+
39
+ if [ "${ORPHANS}" == 'yes' ] ; then
40
+ report_orphans ;
41
+ elif [ "${PROJECT_NAME}" == '_none_' ] ; then
42
+ echo "Name the project to remove, or pass --orphans to see DDEV entries with no directory." ;
43
+ exit 1 ;
44
+ else
45
+ remove_project "${PROJECT_NAME}" || exit 1 ;
46
+ fi
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Run anything in a detached screen session that survives terminal exits and
4
+ # dashboard restarts, with a log the dashboard's Screens modal can follow.
5
+ #
6
+ # bash cmd-tools-screen.sh --list
7
+ # bash cmd-tools-screen.sh build-demo1 --run "bash cmd-webship11-0-x-project.sh demo1 --install"
8
+ # bash cmd-tools-screen.sh build-demo1 --follow
9
+ # bash cmd-tools-screen.sh build-demo1 --stop
10
+
11
+ # Bootstrap.
12
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
13
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
14
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
15
+
16
+ ARGPARSE_DESCRIPTION="Run and manage detached screen sessions with dashboard-followable logs"
17
+ source ${WORKSPACE_SCRIPTS}/args/arg-screen.sh || exit 1 ;
18
+
19
+ shift $#;
20
+
21
+ screen_command ;
@@ -0,0 +1,22 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Set up the automated-testing environment on an existing project in this workspace, or run its
4
+ # suite. Both happen inside DDEV.
5
+ #
6
+ # Unlike test/cmd-automated-testing-*-project.sh, this never builds a site from nothing and never
7
+ # deletes anything: it applies the testing stack to a project that is already here.
8
+
9
+ # Bootstrap.
10
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
11
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
12
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
13
+
14
+ # Load workspace settings.
15
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
16
+
17
+ ARGPARSE_DESCRIPTION="Configure the automated-testing environment of a sandboxes project, or run its suite"
18
+ source ${WORKSPACE_SCRIPTS}/args/arg-testing.sh || exit 1 ;
19
+
20
+ shift $#;
21
+
22
+ testing_command ;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Bootstrap.
4
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
5
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
6
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
7
+
8
+ # Load workspace settings and extra lists.
9
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
10
+
11
+ cd ${WORKSPACE_ROOT}/${doc_name};
12
+ echo "=======================================================";
13
+ echo " Update all projects in ${WORKSPACE_ROOT}/${doc_name} ";
14
+ echo "=======================================================";
15
+ for project in *; do
16
+ if [ -d "$project" ]; then
17
+ echo " $project ";
18
+ fi;
19
+ done;
20
+ for project in *; do
21
+ if [ -d "$project" ]; then
22
+ echo "=======================================================";
23
+ echo " ${WORKSPACE_ROOT}/${doc_name}/${project}/ ";
24
+ echo "=======================================================";
25
+ cd ${WORKSPACE_ROOT}/${doc_name}/${project};
26
+ yes | composer update -v;
27
+ fi;
28
+ cd ${WORKSPACE_ROOT}/${doc_name}
29
+ done;
@@ -0,0 +1,32 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Webship 11.0.0
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set the version.
14
+ # The 11.0.0 line. Named down to the release candidate on purpose: rc1 is the only
15
+ # release published so far, and a constraint of "~11.0" cannot select it under stable
16
+ # stability — create-project fails outright. This picks up 11.0.0 as soon as it is tagged.
17
+ site_version="~11.0.0-rc1";
18
+
19
+ # Distribution.
20
+ distribution_name="webship";
21
+ distribution_title="Webship";
22
+ distribution_webroot="web";
23
+ distribution_profile_repo="drupal/webship";
24
+ distribution_project_template="drupal/webship_project";
25
+
26
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
27
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
28
+
29
+ shift $#;
30
+
31
+ # Build the distribution.
32
+ build_distribution ;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Webship 11.0.x
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set the version.
14
+ site_version="11.0.x-dev";
15
+
16
+ # Distribution.
17
+ distribution_name="webship";
18
+ distribution_title="Webship";
19
+ distribution_webroot="web";
20
+ distribution_profile_repo="drupal/webship";
21
+ distribution_project_template="drupal/webship_project";
22
+
23
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
24
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
25
+
26
+ shift $#;
27
+
28
+ # Build the distribution.
29
+ build_distribution ;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Webships 2.0.0
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set the version.
14
+ site_version="~2.0";
15
+
16
+ # Distribution.
17
+ distribution_name="webships";
18
+ distribution_title="Webships";
19
+ distribution_webroot="web";
20
+ distribution_profile_repo="webship/webships";
21
+ distribution_project_template="webship/webships-project";
22
+
23
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
24
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
25
+
26
+ shift $#;
27
+
28
+ # Build the distribution.
29
+ build_distribution ;
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Webships 2.0.x
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings and extra lists.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set the version.
14
+ site_version="2.0.x-dev";
15
+
16
+ # Distribution.
17
+ distribution_name="webships";
18
+ distribution_title="Webships";
19
+ distribution_webroot="web";
20
+ distribution_profile_repo="webship/webships";
21
+ distribution_project_template="webship/webships-project";
22
+
23
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} ${site_version} project"
24
+ source ${WORKSPACE_SCRIPTS}/args/arg-${distribution_name}.sh || exit 1 ;
25
+
26
+ shift $#;
27
+
28
+ # Build the distribution.
29
+ build_distribution ;
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Webships 3.0.x
4
+
5
+ # Build a Webships 3.0.x API site with DDEV: the Webships Project template, the
6
+ # Webships installer, and one API site template.
7
+ # https://www.drupal.org/project/webships
8
+ #
9
+ # bash cmd-webships3-0-x-project.sh myapi --install
10
+ # bash cmd-webships3-0-x-project.sh myapi --install --template webapi_starter --add-users
11
+ #
12
+ # The installer profile is on 3.0.x while the project template is on 1.0.x: the two
13
+ # lines are deliberately not in lockstep, so `site_version` below is the version of
14
+ # the PROJECT TEMPLATE, which is what `composer create-project` receives. The 3.0.x
15
+ # profile arrives through the template's own `webship/webships: ^3` constraint.
16
+
17
+ # Bootstrap.
18
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
19
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
20
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
21
+
22
+ # Load workspace settings and extra lists.
23
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
24
+
25
+ # Set the version of the project template.
26
+ site_version="1.0.x-dev";
27
+
28
+ # Distribution.
29
+ distribution_name="webships";
30
+ distribution_title="Webships";
31
+ distribution_webroot="web";
32
+ distribution_profile_repo="webship/webships";
33
+ distribution_project_template="drupal/webships_project";
34
+
35
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} 3.0.x API project, installed with the Webships installer"
36
+ source ${WORKSPACE_SCRIPTS}/args/arg-webships-project.sh || exit 1 ;
37
+
38
+ shift $#;
39
+
40
+ build_webships_project ;
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: WordPress (latest)
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="latest";
15
+ wordpress_shape="core";
16
+ ARGPARSE_DESCRIPTION="Build a WordPress project, the latest release"
17
+ source ${WORKSPACE_SCRIPTS}/args/arg-wordpress.sh || exit 1 ;
18
+
19
+ shift $#;
20
+
21
+ build_wordpress ;
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: WordPress on Composer (Bedrock ^1)
4
+
5
+ # Bootstrap.
6
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
7
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
8
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
9
+
10
+ # Load workspace settings.
11
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.sandboxes.settings.yml);
12
+
13
+ # Set site version.
14
+ site_version="^1";
15
+ wordpress_shape="bedrock";
16
+ ARGPARSE_DESCRIPTION="Build a WordPress project managed by Composer, on roots/bedrock"
17
+ source ${WORKSPACE_SCRIPTS}/args/arg-wordpress.sh || exit 1 ;
18
+
19
+ shift $#;
20
+
21
+ build_wordpress ;
@@ -0,0 +1,17 @@
1
+ doc:
2
+ name: sandboxes
3
+
4
+ # What this folder's projects are, and which actions their rows offer:
5
+ # sites | code | files | media | ai-items — see core/workspace-app/WORKSPACES.md.
6
+ type: sites
7
+
8
+ # What the COMPOSER menu may do here: full | manifest (the default). A site workspace is full:
9
+ # install, update, scripts and the rest, run in screens through ddev composer.
10
+ composer: full
11
+
12
+ # What the assistant is called on THIS workspace's page, and what its composer says when empty.
13
+ # `default` in either means "whatever settings.yml says" — the global value, so a rename there
14
+ # still reaches this page. Set a value here to override it for this workspace alone.
15
+ assistant:
16
+ name: default
17
+ placeholder: default
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The Sandboxes workspace for Webship Workspace: the `sandboxes/` folder as a plugin.
3
+ *
4
+ * What the package carries is placed by the installer from the manifest (the folder's settings file,
5
+ * its commands and its docs) and listed by --activate; the dashboard draws the workspace from the
6
+ * settings file like any other. Nothing to register at run time yet: this is where the folder's own
7
+ * rail buttons, row menus or assistant context would go.
8
+ */
9
+ import type { PluginApi } from '@webship.co/workspace-plugin-api';
10
+ export declare const WORKSPACE_KEY = "sandboxes";
11
+ export declare function register(api: PluginApi): void;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * The Sandboxes workspace for Webship Workspace: the `sandboxes/` folder as a plugin.
4
+ *
5
+ * What the package carries is placed by the installer from the manifest (the folder's settings file,
6
+ * its commands and its docs) and listed by --activate; the dashboard draws the workspace from the
7
+ * settings file like any other. Nothing to register at run time yet: this is where the folder's own
8
+ * rail buttons, row menus or assistant context would go.
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.WORKSPACE_KEY = void 0;
12
+ exports.register = register;
13
+ exports.WORKSPACE_KEY = 'sandboxes';
14
+ function register(api) {
15
+ api.addAssistantContext(() => `The sandboxes/ workspace is the Sandboxes workspace (a plugin, @webship.co/workspace-sandboxes); its commands are the cmd-*.sh scripts in that folder.`);
16
+ }
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AAMH,4BAEC;AAJY,QAAA,aAAa,GAAG,WAAW,CAAC;AAEzC,SAAgB,QAAQ,CAAC,GAAc;IACrC,GAAG,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,wJAAwJ,CAAC,CAAC;AAC1L,CAAC"}
package/docs/AGENTS.md ADDED
@@ -0,0 +1,52 @@
1
+ # Sandboxes
2
+
3
+ Throwaway experiments. Nothing here is expected to survive.
4
+
5
+ Part of the **Webship Workspace** (`~/workspace`), a DDEV-only harness. The rules in the root
6
+ `CLAUDE.md` apply here too; what follows is what is specific to this folder.
7
+
8
+ ## The rule that matters here
9
+
10
+ Everything goes through DDEV. Never a host `composer`, `drush` or `mysql`:
11
+
12
+ ```bash
13
+ ddev composer require drupal/something
14
+ ddev drush cr
15
+ ddev export-db --file=… # not mysqldump
16
+ ddev delete -y -O # not a dropped database
17
+ ```
18
+
19
+ `ddev start` takes `-y`; **`ddev stop` does not**. Never write a `$databases` block into
20
+ `settings.php` — DDEV's `settings.ddev.php` owns the connection.
21
+
22
+ ## Commands here
23
+
24
+ ```bash
25
+ bash cmd-cucumber11-0-x-project.sh # Cucumber 11.0.x
26
+ bash cmd-drupal10-3-x-recommended-project.sh # Drupal 10.3.x (recommended project)
27
+ bash cmd-drupal10-recommended-project.sh # Drupal 10 (recommended project)
28
+ bash cmd-drupal11-0-x-recommended-project.sh # Drupal 11.0.x (recommended project)
29
+ bash cmd-drupal11-4-0-recommended-project.sh # Drupal 11.4.0 (recommended project)
30
+ bash cmd-drupal11-4-x-recommended-project.sh # Drupal 11.4.x (recommended project)
31
+ bash cmd-drupal11-recommended-project.sh # Drupal 11 (recommended project)
32
+ bash cmd-drupal9-recommended-project.sh # Drupal 9 (recommended project)
33
+ bash cmd-drupalcms2-1-0-project.sh # Drupal CMS 2.1.0
34
+ bash cmd-drupalcms2-x-project.sh # Drupal CMS 2.x
35
+ bash cmd-tools-add-users.sh # Bootstrap.
36
+ bash cmd-tools-backup-sandboxes.sh # Bootstrap.
37
+ bash cmd-tools-cancel-users.sh # Bootstrap.
38
+ bash cmd-tools-git-change-filemode-to-false.sh # Bootstrap.
39
+ bash cmd-tools-graphify.sh # Map a project in this workspace into a queryable knowledge graph with
40
+ bash cmd-tools-obsidian.sh # Turn a project graph into an Obsidian vault
41
+ bash cmd-tools-ragify.sh # Index a project in this workspace into the Milvus vector database
42
+ bash cmd-tools-remove.sh # Bootstrap.
43
+ bash cmd-tools-testing.sh # Set up the automated-testing environment on an existing project in this workspace, or run its
44
+ bash cmd-tools-update-all.sh # Bootstrap.
45
+ bash cmd-webship11-0-0-project.sh # Webship 11.0.0
46
+ bash cmd-webship11-0-x-project.sh # Webship 11.0.x
47
+ bash cmd-webships2-0-0-project.sh # Webships 2.0.0
48
+ bash cmd-webships2-0-x-project.sh # Webships 2.0.x
49
+ ```
50
+
51
+ Every one locates the workspace from its own path, so there is nothing to export and nothing to
52
+ install. `--help` on any of them lists its arguments.
package/docs/CLAUDE.md ADDED
@@ -0,0 +1,7 @@
1
+ # Sandboxes — workspace context
2
+
3
+ You are inside the **sandboxes** workspace of the Webship Workspace (`~/workspace`).
4
+
5
+ @AGENTS.md
6
+
7
+ The rules in it apply to everything under this folder, however deep.
package/docs/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # Sandboxes
2
+
3
+ Where we do all sandbox templates, and private custom content work.
4
+
5
+
@@ -0,0 +1,13 @@
1
+ Feature: The Sandboxes workspace plugin
2
+ Once the plugin is activated and installed, the sandboxes workspace is on the dashboard, and the
3
+ Plugins page lists the plugin with its four steps.
4
+
5
+ Scenario: The workspace page is there
6
+ Given I am on "/sandboxes"
7
+ Then the element "h1" should be displayed
8
+ And the element "#webship-workspace-projects, .items-list, .workspace-page" should be attached
9
+
10
+ Scenario: The plugin is listed on the Plugins page
11
+ Given I am on "/settings/plugins"
12
+ Then I should see "Sandboxes"
13
+ And I should see "@webship.co/workspace-sandboxes"
package/package.json CHANGED
@@ -1,6 +1,82 @@
1
1
  {
2
2
  "name": "@webship.co/workspace-sandboxes",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0-beta1",
4
+ "description": "The Sandboxes workspace for Webship Workspace: the `sandboxes/` folder (type sites), its settings file, its 30 commands and its docs, activated as a plugin.",
5
+ "main": "dist/src/index.js",
6
+ "types": "dist/src/index.d.ts",
7
+ "license": "ISC",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "https://github.com/webship/workspace-sandboxes.git"
11
+ },
12
+ "files": [
13
+ "dist/src",
14
+ "commands",
15
+ "config",
16
+ "docs",
17
+ "features",
18
+ "README.md"
19
+ ],
20
+ "scripts": {
21
+ "build": "tsc -p tsconfig.json",
22
+ "prepare": "npm run build",
23
+ "test": "npm run build && node --test dist/tests/*.test.js",
24
+ "lint": "tsc -p tsconfig.json --noEmit"
25
+ },
26
+ "workspacePlugin": {
27
+ "name": "sandboxes",
28
+ "label": "Sandboxes",
29
+ "workspace": {
30
+ "key": "sandboxes",
31
+ "settingsTemplate": "config/workspace.sandboxes.settings.yml",
32
+ "files": [
33
+ "commands/cmd-cucumber11-0-x-project.sh",
34
+ "commands/cmd-drupal10-3-x-recommended-project.sh",
35
+ "commands/cmd-drupal10-recommended-project.sh",
36
+ "commands/cmd-drupal11-0-x-recommended-project.sh",
37
+ "commands/cmd-drupal11-4-0-recommended-project.sh",
38
+ "commands/cmd-drupal11-4-x-recommended-project.sh",
39
+ "commands/cmd-drupal11-recommended-project.sh",
40
+ "commands/cmd-drupal12-recommended-project.sh",
41
+ "commands/cmd-drupal9-recommended-project.sh",
42
+ "commands/cmd-drupalcms2-1-0-project.sh",
43
+ "commands/cmd-drupalcms2-x-project.sh",
44
+ "commands/cmd-odoo20-project.sh",
45
+ "commands/cmd-tools-add-users.sh",
46
+ "commands/cmd-tools-backup-sandboxes.sh",
47
+ "commands/cmd-tools-cancel-users.sh",
48
+ "commands/cmd-tools-checks.sh",
49
+ "commands/cmd-tools-clone.sh",
50
+ "commands/cmd-tools-hostnames.sh",
51
+ "commands/cmd-tools-reclaim.sh",
52
+ "commands/cmd-tools-remove.sh",
53
+ "commands/cmd-tools-screen.sh",
54
+ "commands/cmd-tools-testing.sh",
55
+ "commands/cmd-tools-update-all.sh",
56
+ "commands/cmd-webship11-0-0-project.sh",
57
+ "commands/cmd-webship11-0-x-project.sh",
58
+ "commands/cmd-webships2-0-0-project.sh",
59
+ "commands/cmd-webships2-0-x-project.sh",
60
+ "commands/cmd-webships3-0-x-project.sh",
61
+ "commands/cmd-wordpress-project.sh",
62
+ "commands/cmd-wpbedrock1-project.sh"
63
+ ],
64
+ "docs": [
65
+ "docs/AGENTS.md",
66
+ "docs/CLAUDE.md",
67
+ "docs/README.md"
68
+ ]
69
+ },
70
+ "features": [
71
+ "features/sandboxes.feature"
72
+ ]
73
+ },
74
+ "devDependencies": {
75
+ "@types/node": "^24.0.0",
76
+ "@webship.co/workspace-plugin-api": "^1.0.0-beta1",
77
+ "typescript": "^5.9.0"
78
+ },
79
+ "publishConfig": {
80
+ "access": "public"
81
+ }
82
+ }