@webship.co/workspace 1.0.2 → 1.0.3

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.
@@ -1,6 +1,6 @@
1
1
  # Releases
2
2
 
3
- Every package is versioned together: `@webship.co/workspace` (the core) and every `@webship.co/workspace-<name>`. Versions so far: 1.0.0-alpha1 (the first publish), 1.0.0-beta1, 1.0.0-beta2, 1.0.0-rc1, 1.0.0, 1.0.1 (the core and the git, ide and graph plugins only), 1.0.2.
3
+ Every package is versioned together: `@webship.co/workspace` (the core) and every `@webship.co/workspace-<name>`. Versions so far: 1.0.0-alpha1 (the first publish), 1.0.0-beta1, 1.0.0-beta2, 1.0.0-rc1, 1.0.0, 1.0.1 (the core and the git, ide and graph plugins only), 1.0.2, 1.0.3 (the core only).
4
4
 
5
5
  ## How a change lands
6
6
 
@@ -117,15 +117,6 @@ function build_distribution() {
117
117
  fi
118
118
  fi
119
119
 
120
- # A failed create-project (an upstream patch that no longer applies, a yanked tag) has to stop
121
- # the build here. Every step below assumes a real vendor/autoload.php, so carrying on used to
122
- # mean "installing" nothing and then announcing success.
123
- if ! ddev composer create-project ${distribution_project_template}:${site_version} . --no-interaction ; then
124
- echo "composer create-project failed for ${distribution_project_template}:${site_version} — aborting, nothing was installed." ;
125
- cd ${WORKSPACE_ROOT}/${doc_name};
126
- return 1 ;
127
- fi
128
-
129
120
  # Some project templates ship their own .ddev config that
130
121
  # changes the docroot/database/webimage packages after our initial ddev
131
122
  # config. Re-align: keep the database type we already provisioned, drop
@@ -55,6 +55,10 @@ function webships_create_project() {
55
55
  # Keep the API site templates as recipes, the way the project template does:
56
56
  # the installer finds them in recipes/ without Composer unpacking them.
57
57
  ddev composer config --json --merge extra.drupal-recipe-unpack.ignore '["drupal/webships_starter", "drupal/webapi_starter"]' ;
58
+ # The project template ships its own .ddev/config.yaml, which pins an older Node.js:
59
+ # re-align to the workspace's Node.js (24, like Drupal core) and restart on it.
60
+ ddev config --nodejs-version=$(ddev_nodejs_version) --webimage-extra-packages="" ;
61
+ ddev restart ;
58
62
  }
59
63
 
60
64
  # The shared steps after a successful install.
@@ -14,7 +14,8 @@ function set_default_settings() {
14
14
 
15
15
  if [ -f "${settings_file}" ]; then
16
16
  # Fixed, not a setting: it has to match the config/sync created above.
17
- if ! grep -q "config_sync_directory" "${settings_file}" ; then
17
+ # An active assignment only: default.settings.php carries the same line commented out.
18
+ if ! grep -qE "^[[:space:]]*\\\$settings\['config_sync_directory'\]" "${settings_file}" ; then
18
19
  # Defaulted here rather than asked for in the settings: ../config/sync is the Drupal
19
20
  # convention and the folder created just above. Setting config_sync_directory in
20
21
  # settings.yml still overrides it.
@@ -62,12 +62,16 @@ function testing_write_browser_libs_build() {
62
62
  # they survive `ddev restart` — installed by the workspace testing tooling.
63
63
  # Playwright resolves the package names for this Debian release itself; the apt
64
64
  # list is the fallback for a build with no network access to npm.
65
- RUN npx --yes playwright@1.56 install-deps chromium || \
65
+ # The third-party PHP repository of the web image is set aside while apt runs: an expired key
66
+ # there would fail the whole image build, and chromium's libraries are Debian's own.
67
+ RUN mkdir -p /tmp/apt-off && (mv /etc/apt/sources.list.d/php.list /tmp/apt-off/ 2>/dev/null || true) && \
68
+ (npx --yes playwright@1.56 install-deps chromium || \
66
69
  (apt-get update && apt-get install -y --no-install-recommends \
67
70
  libnspr4 libnss3 libdbus-1-3 libatk1.0-0t64 libatk-bridge2.0-0t64 libcups2t64 \
68
71
  libdrm2 libatspi2.0-0t64 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 \
69
- libgbm1 libxkbcommon0 libasound2t64 libpango-1.0-0 libcairo2 fonts-liberation \
70
- && rm -rf /var/lib/apt/lists/*)
72
+ libgbm1 libxkbcommon0 libasound2t64 libpango-1.0-0 libcairo2 fonts-liberation)) ; \
73
+ status=$? ; (mv /tmp/apt-off/php.list /etc/apt/sources.list.d/ 2>/dev/null || true) ; \
74
+ rm -rf /var/lib/apt/lists/* ; exit $status
71
75
  DOCKERFILE
72
76
  }
73
77
 
@@ -179,7 +183,6 @@ function testing_configure() {
179
183
  echo "";
180
184
  echo "Installing the JS dependencies and the chromium browser.";
181
185
  ddev ${runner} install || true ;
182
- testing_write_browser_libs_build "${project_path}" ;
183
186
  testing_ensure_browser_libs "${project_path}" || true ;
184
187
  testing_install_browsers || true ;
185
188
  fi
@@ -255,6 +258,7 @@ function testing_run() {
255
258
  [ "${HEADED}" == 'yes' ] && env_prefix="${env_prefix} HEADLESS=false";
256
259
  local cucumber="node ./node_modules/@cucumber/cucumber/bin/cucumber.js --config cucumber.js";
257
260
  local filter="";
261
+ local run_log; run_log=$(mktemp);
258
262
  # Narrowing to one feature is an ENV var here, not a positional argument: these projects'
259
263
  # cucumber.js sets `paths: [process.env.FEATURES || 'tests/features/**/*.feature']`, and a config
260
264
  # `paths` wins over the path you type — passing it positionally silently ran all 275 scenarios.
@@ -262,7 +266,7 @@ function testing_run() {
262
266
  if [ ! "${TESTING_PATH}" == '_none_' ] ; then
263
267
  local features="${TESTING_PATH}";
264
268
  case "${features}" in
265
- *.feature|*'*'*) : ;;
269
+ *.feature|*.feature:[0-9]*|*'*'*) : ;;
266
270
  *) features="${features%/}/**/*.feature" ;;
267
271
  esac
268
272
  env_prefix="${env_prefix} FEATURES=\"${features}\"";
@@ -277,8 +281,14 @@ function testing_run() {
277
281
 
278
282
  if [ -n "${filter}" ] ; then
279
283
  echo " ddev exec ${env_prefix} ${cucumber} ${filter}";
280
- ddev exec "${env_prefix} ${cucumber} ${filter}" ;
281
- status=$? ;
284
+ ddev exec "${env_prefix} ${cucumber} ${filter}" 2>&1 | tee "${run_log}" ;
285
+ status=${PIPESTATUS[0]} ;
286
+ # A run that matched nothing exits 0 too: a wrong --path or tag expression must not read as green.
287
+ if grep -qE '^0 scenarios' "${run_log}" ; then
288
+ echo " No scenario ran: check the --path or --tags you gave." ;
289
+ status=3 ;
290
+ fi
291
+ rm -f "${run_log}" ;
282
292
  else
283
293
  script="test:${BROWSER}";
284
294
  echo " ddev ${runner} run ${script}";
@@ -320,10 +330,10 @@ function testing_run() {
320
330
  function testing_command() {
321
331
  # --configure is the default, so it is only meaningful as a word — except together with --run,
322
332
  # where "set it up and then run it" is a real thing to ask for and used to lose the setup half.
323
- if [ "${CONFIGURE}" == 'yes' ] || [ ! "${RUN}" == 'yes' ] ; then
333
+ if [ "${CONFIGURE}" == 'yes' ] || { [ ! "${RUN}" == 'yes' ] && [ ! "${DRY_RUN}" == 'yes' ] ; } ; then
324
334
  testing_configure || return 1 ;
325
335
  fi
326
- if [ "${RUN}" == 'yes' ] ; then
336
+ if [ "${RUN}" == 'yes' ] || [ "${DRY_RUN}" == 'yes' ] ; then
327
337
  testing_run ;
328
338
  fi
329
339
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "workspace-dashboard",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "The Webship Workspace dashboard: a lean core (workspaces, builders, settings, the assistant shell, the plugin system) that every feature joins as a @webship.co/workspace-<name> plugin — required with npm, then activated, installed and configured.",
5
5
  "license": "ISC",
6
6
  "main": "server.js",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webship.co/workspace",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Webship Workspace: a container-based development workspace with a web dashboard. The core ships empty; workspace folders, hosting providers, git forges, container runtimes and features are @webship.co/workspace-<name> plugins you add one at a time.",
5
5
  "license": "GPL-2.0-or-later",
6
6
  "repository": {