@webship.co/workspace-drupal-modules 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.
package/README.md CHANGED
@@ -1,3 +1,30 @@
1
- # Temporary Holding Version
1
+ # @webship.co/workspace-drupal-modules
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 **Drupal modules** workspace of the [Webship Workspace](https://github.com/webship/workspace) dashboard:
4
+ the `modules/` folder (type `code`), its settings file (`core/config/workspace.modules.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-drupal-modules
12
+ bash core/scripts/plugins.sh --activate drupal-modules # puts `modules` on the workspaces list of settings.yml
13
+ bash core/scripts/plugins.sh --install drupal-modules # 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-tool-backup-module.sh` |
24
+ | `cmd-tool-git-change-filemode-to-false.sh` |
25
+ | `cmd-tool-git-clone-all-modules.sh` |
26
+ | `cmd-tools-checks.sh` |
27
+ | `cmd-tools-gitlab-ci-local.sh` |
28
+ | `cmd-tools-reclaim.sh` |
29
+
30
+ The bash functions these commands call live in the dashboard's `core/scripts/functions`.
@@ -0,0 +1,20 @@
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.modules.settings.yml);
10
+
11
+ ARGPARSE_DESCRIPTION="Backup a module"
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 ;
@@ -0,0 +1,17 @@
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.modules.settings.yml);
10
+
11
+ for dir_name in *; do
12
+ if [[ -d "$dir_name" && ! -L "$dir_name" ]]; then
13
+ if [ -f "${WORKSPACE_ROOT}/${doc_name}/${dir_name}/.git/config" ]; then
14
+ sed -i -e 's/filemode = true/filemode = false/g' ${WORKSPACE_ROOT}/${doc_name}/${dir_name}/.git/config
15
+ fi
16
+ fi
17
+ done
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Clone every module named in workspace.modules.settings.yml from git.drupal.org.
4
+ #
5
+ # Fills an empty modules/ folder in one go: each name in the `modules:` list is cloned over SSH,
6
+ # so it needs a drupal.org account with a key on it. An existing folder is left as it is.
7
+
8
+ echo "*-----------------------------------------------------------*";
9
+ echo "| GIT clone all modules in |";
10
+ echo "*-----------------------------------------------------------*";
11
+ echo "| ${WORKSPACE_CONFIG}/workspace.modules.settings.yml";
12
+ echo "*-----------------------------------------------------------*"
13
+
14
+ current_path=$(pwd);
15
+
16
+ # Bootstrap.
17
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
18
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
19
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
20
+
21
+ # Load workspace settings and extra lists.
22
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.modules.settings.yml);
23
+
24
+ cd ${WORKSPACE_ROOT}/modules/ ;
25
+
26
+ # Delete modules.
27
+ for module_name in "${modules[@]}"
28
+ do
29
+ sudo rm -rf ${WORKSPACE_ROOT}/modules/${module_name};
30
+ done
31
+
32
+ # GIT clone modules.
33
+ for module_name in "${modules[@]}"
34
+ do
35
+ git clone git@git.drupal.org:project/${module_name}.git ;
36
+ echo "*-----------------------------------------------------------*";
37
+ done
@@ -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.modules.settings.yml);
14
+
15
+ ARGPARSE_DESCRIPTION="Run the code-quality checks a modules item already declares"
16
+ source ${WORKSPACE_SCRIPTS}/args/arg-checks.sh || exit 1 ;
17
+
18
+ shift $#;
19
+
20
+ checks_command ;
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Run a project's GitLab CI pipeline locally with gitlab-ci-local — the Webship
4
+ # green-gate before any push to git.drupalcode.org. Wires the
5
+ # drupal/gitlab_templates remote variables through the drupal-ci-local wrapper
6
+ # (installed on first run), checks Docker and SSH, and reports GREEN/RED.
7
+
8
+ # Bootstrap.
9
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
10
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
11
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
12
+
13
+ # Load workspace settings and extra lists.
14
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.modules.settings.yml);
15
+
16
+ ARGPARSE_DESCRIPTION="Run a modules project's GitLab CI pipeline locally (the green-gate)"
17
+ source ${WORKSPACE_SCRIPTS}/args/arg-gitlab-ci-local.sh || exit 1 ;
18
+
19
+ shift $#;
20
+
21
+ if [ "${DOCTOR}" == 'yes' ] ; then
22
+ gitlab_ci_local_doctor && echo "Everything a green-gate run needs is in place." ;
23
+ else
24
+ gitlab_ci_local_run ;
25
+ fi
@@ -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.modules.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,159 @@
1
+ doc:
2
+ name: modules
3
+ modules:
4
+ - ace_editor
5
+ - adminimal_admin_toolbar
6
+ - admin_toolbar
7
+ - advanced_text_formatter
8
+ - anchor_link
9
+ - autocomplete_deluxe
10
+ - better_exposed_filters
11
+ - betterlogin
12
+ - better_normalizers
13
+ - blazy
14
+ - block_class
15
+ - bootstrap_layouts
16
+ - captcha
17
+ - charts
18
+ - checklistapi
19
+ - ckeditor_bidi
20
+ - ckeditor_media_embed
21
+ - coffee
22
+ - color_field
23
+ - config_filter
24
+ - config_ignore
25
+ - config_perms
26
+ - config_update
27
+ - consumers
28
+ - content_lock
29
+ - crop
30
+ - ctools
31
+ - default_content
32
+ - devel
33
+ - diff
34
+ - drd_agent
35
+ - dropzonejs
36
+ - ds
37
+ - embed
38
+ - entity
39
+ - entity_browser
40
+ - entity_browser_enhanced
41
+ - entity_clone
42
+ - entity_embed
43
+ - entityqueue
44
+ - entityqueue_form_widget
45
+ - entity_reference_revisions
46
+ - events_log_track
47
+ - extlink
48
+ - fast_404
49
+ - features
50
+ - field_group
51
+ - file_mdm
52
+ - focal_point
53
+ - genpass
54
+ - google_analytics
55
+ - google_analytics_reports
56
+ - honeypot
57
+ - imageapi_optimize
58
+ - imagemagick
59
+ - image_resize_filter
60
+ - inline_entity_form
61
+ - jsonapi_extras
62
+ - l10n_client
63
+ - layout_builder_restrictions
64
+ - length_indicator
65
+ - libraries
66
+ - libraries_ui
67
+ - link_attributes
68
+ - linkit
69
+ - login_destination
70
+ - mail_edit
71
+ - mailsystem
72
+ - masonry
73
+ - masquerade
74
+ - maxlength
75
+ - media_entity_instagram
76
+ - media_entity_twitter
77
+ - menu_admin_per_menu
78
+ - menu_block
79
+ - menu_position
80
+ - metatag
81
+ - node_edit_protection
82
+ - openapi
83
+ - openapi_ui
84
+ - openapi_ui_redoc
85
+ - openapi_ui_swagger
86
+ - page_manager
87
+ - panels
88
+ - paragraphs
89
+ - paragraphs_asymmetric_translation_widgets
90
+ - paragraphs_edit
91
+ - paragraphs_features
92
+ - paragraphs_previewer
93
+ - password_policy
94
+ - pathauto
95
+ - pathologic
96
+ - persistent_login
97
+ - rabbit_hole
98
+ - recaptcha
99
+ - redirect
100
+ - responsive_preview
101
+ - restui
102
+ - revision_log_default
103
+ - roleassign
104
+ - schema_metatag
105
+ - schemata
106
+ - search_api
107
+ - seckit
108
+ - security_review
109
+ - shield
110
+ - simple_oauth
111
+ - simple_sitemap
112
+ - slick
113
+ - slick_media
114
+ - slick_views
115
+ - smart_trim
116
+ - smtp
117
+ - social_api
118
+ - social_auth
119
+ - social_auth_facebook
120
+ - social_auth_google
121
+ - social_auth_linkedin
122
+ - social_auth_twitter
123
+ - styleguide
124
+ - swiftmailer
125
+ - taxonomy_access_fix
126
+ - taxonomy_menu
127
+ - token
128
+ - total_control
129
+ - tour_builder
130
+ - tour_ui
131
+ - ultimate_cron
132
+ - update_helper
133
+ - username_enumeration_prevention
134
+ - userprotect
135
+ - views_bootstrap
136
+ - views_bulk_edit
137
+ - views_bulk_operations
138
+ - views_infinite_scroll
139
+ - viewsreference
140
+ - vmi
141
+ - webform
142
+ - webform_analysis
143
+ - webform_views
144
+ - yoast_seo
145
+
146
+ # What this folder's items ARE, which decides what the dashboard offers on each row:
147
+ # sites — real projects with a DDEV environment: build, start, back up, graph, index
148
+ # code — repositories checked out to work on, without a site of their own
149
+ # files — markdown documents, edited in place
150
+ # ai-items — agents, skills and prompts, installable into ~/.claude
151
+ # media — recordings and images
152
+ type: code
153
+
154
+ # What the COMPOSER menu may do here: full | manifest.
155
+ composer: manifest
156
+
157
+ assistant:
158
+ name: default
159
+ placeholder: default
@@ -0,0 +1,11 @@
1
+ /**
2
+ * The Drupal modules workspace for Webship Workspace: the `modules/` 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 = "modules";
11
+ export declare function register(api: PluginApi): void;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ /**
3
+ * The Drupal modules workspace for Webship Workspace: the `modules/` 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 = 'modules';
14
+ function register(api) {
15
+ api.addAssistantContext(() => `The modules/ workspace is the Drupal modules workspace (a plugin, @webship.co/workspace-drupal-modules); 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,SAAS,CAAC;AAEvC,SAAgB,QAAQ,CAAC,GAAc;IACrC,GAAG,CAAC,mBAAmB,CAAC,GAAG,EAAE,CAAC,gKAAgK,CAAC,CAAC;AAClM,CAAC"}
package/docs/AGENTS.md ADDED
@@ -0,0 +1,34 @@
1
+ # Modules
2
+
3
+ Contrib and private modules, checked out to work on.
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-tool-backup-module.sh # Bootstrap.
26
+ bash cmd-tool-git-change-filemode-to-false.sh # Bootstrap.
27
+ bash cmd-tool-git-clone-all-modules.sh
28
+ bash cmd-tools-graphify.sh # Map a project in this workspace into a queryable knowledge graph with
29
+ bash cmd-tools-obsidian.sh # Turn a project graph into an Obsidian vault
30
+ bash cmd-tools-ragify.sh # Index a project in this workspace into the Milvus vector database
31
+ ```
32
+
33
+ Every one locates the workspace from its own path, so there is nothing to export and nothing to
34
+ install. `--help` on any of them lists its arguments.
package/docs/CLAUDE.md ADDED
@@ -0,0 +1,7 @@
1
+ # Modules — workspace context
2
+
3
+ You are inside the **modules** 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
+ # Modules
2
+ --
3
+
4
+ * You could place your custom modules
5
+ * You could place contrib modules. so that you could patch them.
@@ -0,0 +1,13 @@
1
+ Feature: The Drupal modules workspace plugin
2
+ Once the plugin is activated and installed, the modules 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 "/modules"
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 "Drupal modules"
13
+ And I should see "@webship.co/workspace-drupal-modules"
package/package.json CHANGED
@@ -1,6 +1,58 @@
1
1
  {
2
2
  "name": "@webship.co/workspace-drupal-modules",
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 Drupal modules workspace for Webship Workspace: the `modules/` folder (type code), its settings file, its 6 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-drupal-modules.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": "drupal-modules",
28
+ "label": "Drupal modules",
29
+ "workspace": {
30
+ "key": "modules",
31
+ "settingsTemplate": "config/workspace.modules.settings.yml",
32
+ "files": [
33
+ "commands/cmd-tool-backup-module.sh",
34
+ "commands/cmd-tool-git-change-filemode-to-false.sh",
35
+ "commands/cmd-tool-git-clone-all-modules.sh",
36
+ "commands/cmd-tools-checks.sh",
37
+ "commands/cmd-tools-gitlab-ci-local.sh",
38
+ "commands/cmd-tools-reclaim.sh"
39
+ ],
40
+ "docs": [
41
+ "docs/AGENTS.md",
42
+ "docs/CLAUDE.md",
43
+ "docs/README.md"
44
+ ]
45
+ },
46
+ "features": [
47
+ "features/drupal-modules.feature"
48
+ ]
49
+ },
50
+ "devDependencies": {
51
+ "@types/node": "^24.0.0",
52
+ "@webship.co/workspace-plugin-api": "^1.0.0-beta1",
53
+ "typescript": "^5.9.0"
54
+ },
55
+ "publishConfig": {
56
+ "access": "public"
57
+ }
58
+ }