@webship.co/workspace-nextcloud 0.0.0-stage → 1.0.0

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.
@@ -0,0 +1,102 @@
1
+ ---
2
+ name: nextcloud-scenarios
3
+ description: Write webship-js scenarios for a Nextcloud file and collaboration server of the Webship Workspace from phrases that exist — the Nextcloud step pack's steps by area (the session and the forgotten password, the header and the dashboard, Files, sharing and public links, the viewers, the unified search, notifications, the activity stream, the personal settings and the accounts page), the handles of the users registry, the test-data steps that take away what they make, the traps found on a real server, and three features that pass on a site built with the default accounts. Use when writing or fixing a scenario for the file server, choosing a step for one of its apps, or turning a manual check of the server into a feature.
4
+ ---
5
+
6
+ # nextcloud-scenarios
7
+
8
+ Scenarios for a site built with the Nextcloud plugin (`bash cmd-nextcloud-project.sh <site> --install --add-users`)
9
+ in a container-based workspace (DDEV by default), tested with webship-js and `@webship-js/nextcloud-steps` once
10
+ `bash cmd-tools-testing.sh <site>` set the project up. Every phrase below exists in the pack or in webship-js; a
11
+ scenario names no platform.
12
+
13
+ ## Accounts and test data
14
+
15
+ - `Given I am a logged in user with the "user" user`: `administrator` (in the admin group), `editor`, `user` (each
16
+ an account of its own). `Given I am not logged in` for a visitor; `Given I am on the login page` for the form.
17
+ - `Given "user" has the file "meeting-notes.md"` (`… in the folder "Project files"`), `Given "user" has the folder
18
+ "Project files/Reports"`, `Given "user" has shared the file "team-photo.png" with "editor"`, `Given "user" has the
19
+ notification "Quarterly review is due"` (`… saying "…"`): made through the server's own APIs, taken away after the
20
+ scenario.
21
+ - The pack's own files: `meeting-notes.md`, `budget.txt`, `team-photo.png`, `annual-report.pdf` (two pages, the first
22
+ says "Annual report 2026"). A file of the project goes in `tests/assets/`.
23
+ - What a scenario adds or changes on screen is taken back after it: its files and folders, its shares, its
24
+ notifications, a field of the profile, the theme, the status, the layout of the dashboard, a password.
25
+
26
+ ## Phrases by area
27
+
28
+ | Area | Steps |
29
+ | --- | --- |
30
+ | Session | `I am on the login page`, `I go to the login page`, `I log in as "user" with the login form`, `I log in with the username "…" and the password "…"`, `the login should be refused with "Wrong login or password."`, `I log out`, `I should be logged in`, `I should be logged in as "user"`, `I should not be logged in`, `I should be on the login page` |
31
+ | Forgotten password | `I ask for a password reset link for "user"`, `an email about "password reset" should be sent to "user"`, `no email should be sent to "nobody@example.com"`, `I open the password reset link of the email to "user"`, `I choose the new password "…"` |
32
+ | Header | `I open the "Files" app`, `I should be in the "Files" app`, `the apps menu should list "Activity"` (`should not list`), `the user menu should offer "Accounts"` (`should not offer`), `I choose "Settings" in the user menu`, `I set my status to "Away"`, `my status should be "Away"`, `I should see the error page "Access forbidden"` |
33
+ | Dashboard | `I go to the dashboard`, `the dashboard should greet "User"`, `the dashboard should show the "Recommended files" widget` (`should not show`), `I add the "Favorite files" widget to the dashboard`, `I remove the "…" widget from the dashboard`, `the "Favorite files" widget should list "…"`, `the "Favorite files" widget should say "No favorites"` |
34
+ | Files | `I go to the files`, `I go to the folder "Project files/Reports"`, `I open the folder "Project files"`, `I open the "Favorites" files view` ("Shared with you", "Recent", "Deleted files"…), `I go to the deleted files`, `the file list should show "…"` (`should not show`), `the file list should be empty`, `I upload the file "meeting-notes.md"`, `I create the folder "…"`, `I rename "…" to "…"`, `I move "…" to the folder "…"`, `I copy "…" to the folder "…"`, `I delete "…"`, `the deleted files should list "…"` (`should not list`), `I restore "…" from the deleted files`, `I add "…" to the favorites`, `I remove "…" from the favorites`, `"…" should be marked as a favorite` (`should not be`), `a message "Delete file: done" should pop up` |
35
+ | Details | `I open the details of "…"`, `the details should show "User"`, `I open the "Activity" tab of the details`, `the details tab should show "You created meeting-notes.md"`, `I close the details` |
36
+ | Sharing | `I share "…" with "editor"` (`… as "View only"`), `"…" should be shared with "editor"` (`… as "View only"`, `should not be shared`), `I create a public link for "…"`, `I protect the public link of "…" with the password "…"`, `I set the public link of "…" to expire in 30 days`, `the public link of "…" should expire in 30 days`, `I open the public link of "…" as a visitor`, `I should be asked for the password of the share`, `I enter the share password "…"`, `the share password should be refused`, `the shared file "…" should be shown` |
37
+ | Viewers | `I open the file "…"`, `the viewer should show the image "…"`, `the viewer should show the PDF "…"`, `the PDF should have 2 pages`, `the PDF should show "…"`, `the viewer should show the text "…"`, `I close the viewer` |
38
+ | Search | `I search for "team" in the unified search`, `the unified search should find "team-photo.png" in "Files"` (`should not find`, `in "Apps"`), `the unified search should find nothing`, `I open the search result "…"` |
39
+ | Notifications | `I open the notifications`, `the notifications should show "…"` (`should not show`), `I dismiss the notification "…"`, `I dismiss all notifications`, `I should have no notifications` |
40
+ | Activity | `I go to the activity stream`, `I filter the activity stream by "File changes"`, `the newest activity should be "You created meeting-notes.md"`, `the activity stream should show "…"` (`should not show`) |
41
+ | Personal settings | `I go to the personal settings`, `I open the "Security" section of the personal settings`, `I set my "Headline" to "…"`, `my "Headline" should be "…"`, `I change my password to "…"`, `I change my password with the wrong current password "…"`, `I choose the "Dark theme" appearance`, `the "Dark theme" appearance should be in use` |
42
+ | Accounts page | `I go to the accounts page`, `the account list should show "editor"` (`should not show`), `the account "administrator" should be in the group "admin"` (`should not be`), `I search the accounts for "edit"`, `I open the "Admins" account list`, `I try to create the account "editor"`, `the new account should be refused with "User already exists"` |
43
+
44
+ ## A scenario, start to end
45
+
46
+ A public link with a password and an end date, opened by a visitor in a browser of its own:
47
+
48
+ ```gherkin
49
+ Feature: Public links
50
+ Scenario: A visitor needs the password of the link
51
+ Given "user" has the file "team-photo.png"
52
+ And I am a logged in user with the "user" user
53
+ When I go to the files
54
+ And I create a public link for "team-photo.png"
55
+ And I protect the public link of "team-photo.png" with the password "Webship-Share-2026"
56
+ And I set the public link of "team-photo.png" to expire in 30 days
57
+ Then the public link of "team-photo.png" should expire in 30 days
58
+ When I open the public link of "team-photo.png" as a visitor
59
+ Then I should be asked for the password of the share
60
+ When I enter the share password "Wrong-password-1"
61
+ Then the share password should be refused
62
+ When I enter the share password "Webship-Share-2026"
63
+ Then the shared file "team-photo.png" should be shown
64
+ ```
65
+
66
+ Three whole features that pass on a site built with `--install --add-users`: `examples/files.feature`,
67
+ `examples/sharing.feature` and `examples/account.feature`. Copy one into `tests/features/` and run it with
68
+ `bash cmd-tools-testing.sh <site> --run --path tests/features/<name>.feature`.
69
+
70
+ ## Traps found on a real server
71
+
72
+ - Each app (Files, Activity, Settings, the dashboard) is a single-page app: the steps wait for its own loading icon
73
+ and its own requests (a WebDAV PROPFIND for a folder), never for the clock. The activity stream keeps a "Loading
74
+ more activities" icon at its foot while more can load: that one is no work in progress.
75
+ - The Sharing tab of the details is a custom element whose `shadowRoot` is the element itself: a Playwright locator
76
+ that pierces shadow roots (role, text or CSS) can run into it without end. The pack's sharing steps use XPath and
77
+ the page's DOM there; a scenario of your own uses the pack's sharing steps, not generic clicks, in that tab.
78
+ - A message that pops up ("Delete file: done", "Wrong password") lives about seven seconds: check it in the step right
79
+ after the action.
80
+ - The activity stream keeps every run's history: assert the newest activity, not one that any earlier run also made.
81
+ - A file a scenario uploads must not be in the folder yet (the upload would ask what to do with it): the clean-up
82
+ takes away what every scenario adds, and `bash cmd-tools-nextcloud-occ.sh <site> --empty-files` clears what an
83
+ interrupted run left.
84
+ - Error pages and refusals (403, 404, a taken account name) make the browser log the refused request: tag those
85
+ scenarios `@js-off`.
86
+
87
+ ## The book
88
+
89
+ For any automated functional testing in this work (a Gherkin feature, a step definition, choosing a
90
+ step, a test run and its failures), read the book *Automated Functional Testing Recipes* first.
91
+
92
+ - **Where.** Use the first that exists: `.claude/automated-functional-testing-recipes/` in the project,
93
+ `~/.claude/automated-functional-testing-recipes/` (installed by webship/webship-js-ai-agent,
94
+ webship/webship-js-skills or webship/ai-agents), or
95
+ https://github.com/webship/webship-js-ai-agent/tree/2.0.x/automated-functional-testing-recipes
96
+ - **How.** Its `README.md` first, then the chapter that matches the task (one file per chapter,
97
+ named by its subject), not the single complete file.
98
+ - **Which wins.** The installed webship-js package and the step pack are the source of truth for
99
+ step phrasing. When they differ from the book, follow them and say so.
100
+ - **For the file server.** Start with `ch10-authentication-authorization.md` (logins, sessions and refusals),
101
+ `ch07-waiting-dynamic-content.md` and `ch27-testing-spa.md` (each app is a single-page app: wait on its own
102
+ signals), and `ch20-design-patterns-for-tests.md` (test data a scenario makes and takes away).
@@ -0,0 +1,32 @@
1
+ @account
2
+ Feature: The account's own pages
3
+ Notifications, the unified search, the profile and the activity of an account, and the refusal of the accounts page.
4
+
5
+ Scenario: A notification is read and dismissed
6
+ Given "user" has the notification "Quarterly review is due"
7
+ And I am a logged in user with the "user" user
8
+ When I open the notifications
9
+ Then the notifications should show "Quarterly review is due"
10
+ When I dismiss the notification "Quarterly review is due"
11
+ Then I should have no notifications
12
+
13
+ Scenario: The unified search finds a file and the activity names it
14
+ Given "user" has the file "team-photo.png"
15
+ And I am a logged in user with the "user" user
16
+ When I search for "team" in the unified search
17
+ Then the unified search should find "team-photo.png" in "Files"
18
+ When I go to the activity stream
19
+ Then the newest activity should be "You created team-photo.png"
20
+
21
+ Scenario: A field of the profile is saved
22
+ Given I am a logged in user with the "user" user
23
+ When I go to the personal settings
24
+ And I set my "Organisation" to "Webship"
25
+ Then my "Organisation" should be "Webship"
26
+
27
+ # The browser logs the refused request (403).
28
+ @js-off
29
+ Scenario: The accounts page is the administrator's
30
+ Given I am a logged in user with the "user" user
31
+ When I go to the accounts page
32
+ Then I should see the error page "Access forbidden"
@@ -0,0 +1,33 @@
1
+ @files
2
+ Feature: Files of an account
3
+ Upload, a folder, a move, the deleted files and a favorite, with the files the step pack ships.
4
+
5
+ Scenario: A file is uploaded into a new folder
6
+ Given I am a logged in user with the "user" user
7
+ When I go to the files
8
+ And I create the folder "Project files"
9
+ And I open the folder "Project files"
10
+ Then the file list should be empty
11
+ When I upload the file "meeting-notes.md"
12
+ Then the file list should show "meeting-notes.md"
13
+
14
+ Scenario: A deleted file comes back from the deleted files
15
+ Given "user" has the file "budget.txt"
16
+ And I am a logged in user with the "user" user
17
+ When I go to the files
18
+ And I delete "budget.txt"
19
+ And I go to the deleted files
20
+ Then the deleted files should list "budget.txt"
21
+ When I restore "budget.txt" from the deleted files
22
+ And I go to the files
23
+ Then the file list should show "budget.txt"
24
+
25
+ Scenario: A favorite, and the PDF viewer
26
+ Given "user" has the file "annual-report.pdf"
27
+ And I am a logged in user with the "user" user
28
+ When I go to the files
29
+ And I add "annual-report.pdf" to the favorites
30
+ Then "annual-report.pdf" should be marked as a favorite
31
+ When I open the file "annual-report.pdf"
32
+ Then the viewer should show the PDF "annual-report.pdf"
33
+ And the PDF should have 2 pages
@@ -0,0 +1,25 @@
1
+ @sharing
2
+ Feature: Sharing with an account and with a public link
3
+ A share made on screen and found by the other account, and a public link with a password opened by a visitor.
4
+
5
+ Scenario: The other account finds the file shared with it
6
+ Given "user" has the file "meeting-notes.md"
7
+ And I am a logged in user with the "user" user
8
+ When I go to the files
9
+ And I share "meeting-notes.md" with "editor" as "View only"
10
+ Then "meeting-notes.md" should be shared with "editor" as "View only"
11
+ Given I am a logged in user with the "editor" user
12
+ When I open the "Shared with you" files view
13
+ Then the file list should show "meeting-notes.md"
14
+
15
+ Scenario: A visitor needs the password of the link
16
+ Given "user" has the file "team-photo.png"
17
+ And I am a logged in user with the "user" user
18
+ When I go to the files
19
+ And I create a public link for "team-photo.png"
20
+ And I protect the public link of "team-photo.png" with the password "Webship-Share-2026"
21
+ And I set the public link of "team-photo.png" to expire in 7 days
22
+ And I open the public link of "team-photo.png" as a visitor
23
+ Then I should be asked for the password of the share
24
+ When I enter the share password "Webship-Share-2026"
25
+ Then the shared file "team-photo.png" should be shown
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # workspace-name: Nextcloud (a file and collaboration server)
4
+
5
+ # Installed by the Nextcloud plugin (plugins.sh --install nextcloud); __WORKSPACE__ is the workspace it was installed into.
6
+ #
7
+ # Build a Nextcloud server in a container: the release tarball (its SHA-256 sum checked) unpacked in nextcloud/, the
8
+ # docroot of a PHP project served by Apache, with its data folder data/ beside it. With --install it is installed
9
+ # with its own installer on the project's database, the workspace account as its administrator, and set up for
10
+ # testing; with --add-users it also gets the default accounts.
11
+
12
+ # Bootstrap.
13
+ # Find the workspace tooling from this script, so a fresh clone needs no setup.
14
+ WORKSPACE_SCRIPTS="${WORKSPACE_SCRIPTS:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../core/scripts" && pwd)}";
15
+ source ${WORKSPACE_SCRIPTS}/bootstrap.sh || exit 1 ;
16
+
17
+ # Load workspace settings.
18
+ eval $(parse_yaml ${WORKSPACE_CONFIG}/workspace.__WORKSPACE__.settings.yml);
19
+
20
+ # Distribution.
21
+ distribution_name="nextcloud";
22
+ distribution_title="Nextcloud";
23
+ distribution_webroot="nextcloud";
24
+
25
+ ARGPARSE_DESCRIPTION="Build a ${distribution_title} project in __WORKSPACE__"
26
+ # The args file comes with the plugin: core/scripts/plugins/nextcloud/ is where plugins.sh --install puts it.
27
+ source ${WORKSPACE_SCRIPTS}/plugins/nextcloud/args/arg-nextcloud.sh || exit 1 ;
28
+
29
+ shift $#;
30
+
31
+ nextcloud_build ;
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Installed by the Nextcloud plugin (plugins.sh --install nextcloud); __WORKSPACE__ is the workspace it was installed into.
4
+ #
5
+ # The command-line tool (occ) of one Nextcloud site of this workspace, in the project's web container: say what the
6
+ # server is, run an occ command, add or cancel the default accounts, take away their files. Nothing here runs on the
7
+ # host.
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.__WORKSPACE__.settings.yml);
16
+
17
+ # Distribution.
18
+ distribution_name="nextcloud";
19
+
20
+ ARGPARSE_DESCRIPTION="Run the command-line tool (occ) of a Nextcloud site of __WORKSPACE__: status, an occ command, the default accounts"
21
+ # The args file comes with the plugin: core/scripts/plugins/nextcloud/ is where plugins.sh --install puts it.
22
+ source ${WORKSPACE_SCRIPTS}/plugins/nextcloud/args/arg-nextcloud-occ.sh || exit 1 ;
23
+
24
+ shift $#;
25
+
26
+ nextcloud_occ_tool ;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Nextcloud for Webship Workspace: a platform plugin.
3
+ *
4
+ * What the package carries is placed by the installer from the manifest: the builder and the server's command-line
5
+ * tool (occ) in the sites folders, their functions and argparse under core/scripts/plugins/nextcloud/ (with
6
+ * nextcloud-site.sh, which the builder and the tool run in the web container with the server's own occ), and its AI
7
+ * items (ai/ in this package) in the folder of their kind: the agents in AI Agents, the skill in AI Skills, the
8
+ * command in AI Commands, the prompts in AI Prompts. The dashboard needs nothing drawn for it: the builder is in the
9
+ * Build list because it is a cmd-*-project.sh, the row menus are the core's, the AI items are listed like any other.
10
+ * What register() adds is what the assistant is told.
11
+ *
12
+ * Everything the dashboard is asked for goes through `api`; this package requires nothing from the dashboard's own
13
+ * files, so it can be installed from npm and removed without a trace.
14
+ */
15
+ import type { PluginApi } from '@webship.co/workspace-plugin-api';
16
+ /** The plugin's name. A Nextcloud site is a DDEV project of type php: the plugin knows it by .ddev/config.nextcloud.yaml. */
17
+ export declare const PLATFORM = "nextcloud";
18
+ /** The commands the installer places in every sites folder. */
19
+ export declare const COMMANDS: string[];
20
+ /** The agents the installer places in the AI Agents folder. */
21
+ export declare const AGENTS: string[];
22
+ /** The skill the installer places in the AI Skills folder (a folder each, with its SKILL.md). */
23
+ export declare const SKILLS: string[];
24
+ /** The slash command the installer places in the AI Commands folder. */
25
+ export declare const AI_COMMANDS: string[];
26
+ /** The prompts the installer places in the AI Prompts folder: each a whole launch command for a new session. */
27
+ export declare const PROMPTS: string[];
28
+ /** What the assistant is told about Nextcloud in this workspace. */
29
+ export declare function assistantContext(): string;
30
+ export declare function register(api: PluginApi): void;
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ /**
3
+ * Nextcloud for Webship Workspace: a platform plugin.
4
+ *
5
+ * What the package carries is placed by the installer from the manifest: the builder and the server's command-line
6
+ * tool (occ) in the sites folders, their functions and argparse under core/scripts/plugins/nextcloud/ (with
7
+ * nextcloud-site.sh, which the builder and the tool run in the web container with the server's own occ), and its AI
8
+ * items (ai/ in this package) in the folder of their kind: the agents in AI Agents, the skill in AI Skills, the
9
+ * command in AI Commands, the prompts in AI Prompts. The dashboard needs nothing drawn for it: the builder is in the
10
+ * Build list because it is a cmd-*-project.sh, the row menus are the core's, the AI items are listed like any other.
11
+ * What register() adds is what the assistant is told.
12
+ *
13
+ * Everything the dashboard is asked for goes through `api`; this package requires nothing from the dashboard's own
14
+ * files, so it can be installed from npm and removed without a trace.
15
+ */
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.PROMPTS = exports.AI_COMMANDS = exports.SKILLS = exports.AGENTS = exports.COMMANDS = exports.PLATFORM = void 0;
18
+ exports.assistantContext = assistantContext;
19
+ exports.register = register;
20
+ /** The plugin's name. A Nextcloud site is a DDEV project of type php: the plugin knows it by .ddev/config.nextcloud.yaml. */
21
+ exports.PLATFORM = 'nextcloud';
22
+ /** The commands the installer places in every sites folder. */
23
+ exports.COMMANDS = ['cmd-nextcloud-project.sh', 'cmd-tools-nextcloud-occ.sh'];
24
+ /** The agents the installer places in the AI Agents folder. */
25
+ exports.AGENTS = ['nextcloud-site-builder', 'nextcloud-tester'];
26
+ /** The skill the installer places in the AI Skills folder (a folder each, with its SKILL.md). */
27
+ exports.SKILLS = ['nextcloud-scenarios'];
28
+ /** The slash command the installer places in the AI Commands folder. */
29
+ exports.AI_COMMANDS = ['nextcloud-test'];
30
+ /** The prompts the installer places in the AI Prompts folder: each a whole launch command for a new session. */
31
+ exports.PROMPTS = ['nextcloud-build-and-test', 'nextcloud-scenarios-for-an-area'];
32
+ /** What the assistant is told about Nextcloud in this workspace. */
33
+ function assistantContext() {
34
+ return [
35
+ 'Nextcloud (a plugin, @webship.co/workspace-nextcloud): a file and collaboration server is built with',
36
+ '`bash cmd-nextcloud-project.sh <name> --install --add-users` from a sites folder (dev, test, sandboxes, demos):',
37
+ 'a DDEV project of type php served by Apache, the release tarball from download.nextcloud.com (its SHA-256 sum checked) unpacked in nextcloud/ (the docroot) with its data folder data/ beside it,',
38
+ 'installed with its own installer (occ maintenance:install) on the project\'s database, at https://<name>.ddev.site, its mail to the project\'s mail catcher (https://<name>.ddev.site:8026), background jobs by cron;',
39
+ '`--install` makes the workspace account the administrator and sets the site up for testing (only the apps the release bundles, no app store, no first-run wizard, new accounts with no files, no connection to the internet),',
40
+ '`--add-users` adds the default accounts (administrator, in the admin group; editor; user), `--nextcloud-version` takes a release (35.0.3 by default, or a major line such as 34), `--php-version` the PHP of the container.',
41
+ '`bash cmd-tools-nextcloud-occ.sh <name>` says what the server is; `--occ "<command>"` runs the server\'s own command-line tool (occ) in the web container,',
42
+ '`--add-users` and `--cancel-users` manage the default accounts, `--empty-files` takes away the files of the default accounts.',
43
+ 'The row\'s Users menu does not apply to a Nextcloud site (its project type is php): use the occ tool for the accounts.',
44
+ '`bash cmd-tools-testing.sh <name>` sets up webship-js with the Nextcloud step pack; `--run` runs the suite.',
45
+ `For Nextcloud work, hand over to the agents ${exports.AGENTS.map((a) => `\`${a}\``).join(' and ')}.`,
46
+ `The plugin also places the skill ${exports.SKILLS.map((a) => `\`${a}\``).join(', ')} (the step pack's phrases, by area) in ai-skills/,`,
47
+ `the command ${exports.AI_COMMANDS.map((a) => `\`/${a} <site>\``).join(', ')} in ai-commands/ and the prompts ${exports.PROMPTS.map((a) => `\`${a}\``).join(' and ')} in ai-prompts/.`,
48
+ 'Never run occ or PHP on the host for a project; removing the project removes its database and its files.',
49
+ ].join(' ');
50
+ }
51
+ function register(api) {
52
+ api.addAssistantContext(assistantContext);
53
+ }
54
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAuBH,4CAiBC;AAED,4BAEC;AAxCD,6HAA6H;AAChH,QAAA,QAAQ,GAAG,WAAW,CAAC;AAEpC,+DAA+D;AAClD,QAAA,QAAQ,GAAG,CAAC,0BAA0B,EAAE,4BAA4B,CAAC,CAAC;AAEnF,+DAA+D;AAClD,QAAA,MAAM,GAAG,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAAC;AAErE,iGAAiG;AACpF,QAAA,MAAM,GAAG,CAAC,qBAAqB,CAAC,CAAC;AAE9C,wEAAwE;AAC3D,QAAA,WAAW,GAAG,CAAC,gBAAgB,CAAC,CAAC;AAE9C,gHAAgH;AACnG,QAAA,OAAO,GAAG,CAAC,0BAA0B,EAAE,iCAAiC,CAAC,CAAC;AAEvF,oEAAoE;AACpE,SAAgB,gBAAgB;IAC9B,OAAO;QACL,sGAAsG;QACtG,iHAAiH;QACjH,mMAAmM;QACnM,uNAAuN;QACvN,+NAA+N;QAC/N,6NAA6N;QAC7N,4JAA4J;QAC5J,+HAA+H;QAC/H,wHAAwH;QACxH,6GAA6G;QAC7G,+CAA+C,cAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG;QAC7F,oCAAoC,cAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,oDAAoD;QAChI,eAAe,mBAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,oCAAoC,eAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,kBAAkB;QACtK,0GAA0G;KAC3G,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;AAED,SAAgB,QAAQ,CAAC,GAAc;IACrC,GAAG,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,36 @@
1
+ Feature: The Nextcloud plugin on the dashboard
2
+ Once the plugin is activated and installed, the sites folders offer the Nextcloud builder, each
3
+ AI folder lists the items of its kind the plugin ships, and the Plugins page lists the plugin
4
+ with its steps.
5
+
6
+ # Settings lists every plugin that was added; the package and what the plugin ships are on its own page.
7
+ Scenario: Settings lists the plugin, and its own page names its package and what it ships
8
+ Given I am on "/settings"
9
+ Then I should see "Nextcloud"
10
+ When I go to "/settings/plugin/nextcloud"
11
+ Then I should see "@webship.co/workspace-nextcloud"
12
+ And I should see "cmd-nextcloud-project.sh"
13
+ And I should see "nextcloud-site-builder"
14
+
15
+ Scenario: A sites folder offers the Nextcloud builder
16
+ Given I am on "/dev"
17
+ Then "option[value='cmd-nextcloud-project.sh']" should be attached
18
+
19
+ # The AI folders are searched by name: with every plugin on, a folder lists more than one page of items.
20
+ Scenario: The AI Agents folder lists the agents the plugin ships
21
+ Given I am on "/ai-agents?q=nextcloud-"
22
+ Then I should see "nextcloud-site-builder"
23
+ And I should see "nextcloud-tester"
24
+
25
+ Scenario: The AI Skills folder lists the skill the plugin ships
26
+ Given I am on "/ai-skills?q=nextcloud-scenarios"
27
+ Then I should see "nextcloud-scenarios"
28
+
29
+ Scenario: The AI Commands folder lists the command the plugin ships
30
+ Given I am on "/ai-commands?q=nextcloud-test"
31
+ Then I should see "nextcloud-test"
32
+
33
+ Scenario: The AI Prompts folder lists the prompts the plugin ships
34
+ Given I am on "/ai-prompts?q=nextcloud-"
35
+ Then I should see "nextcloud-build-and-test"
36
+ And I should see "nextcloud-scenarios-for-an-area"
package/package.json CHANGED
@@ -1,6 +1,98 @@
1
1
  {
2
2
  "name": "@webship.co/workspace-nextcloud",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "description": "Nextcloud for Webship Workspace: the builder (`cmd-nextcloud-project.sh`, a file and collaboration server from its release tarball, installed with its own installer on the project's database) and the server's command-line tool (occ) in every sites folder, the default accounts, the Nextcloud step pack wired into the testing setup, and its AI items in their folders: two agents, a skill, a command and two prompts.",
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-nextcloud.git"
11
+ },
12
+ "files": [
13
+ "dist/src",
14
+ "ai",
15
+ "commands",
16
+ "features",
17
+ "scripts",
18
+ "testing",
19
+ "README.md"
20
+ ],
21
+ "scripts": {
22
+ "build": "tsc -p tsconfig.json",
23
+ "prepare": "npm run build",
24
+ "test": "npm run build && node --test dist/tests/*.test.js",
25
+ "lint": "tsc -p tsconfig.json --noEmit"
26
+ },
27
+ "workspacePlugin": {
28
+ "name": "nextcloud",
29
+ "label": "Nextcloud",
30
+ "needs": [
31
+ [
32
+ "dev",
33
+ "test",
34
+ "sandboxes",
35
+ "demos"
36
+ ],
37
+ "ai-agents",
38
+ "ai-skills",
39
+ "ai-commands",
40
+ "ai-prompts"
41
+ ],
42
+ "commands": {
43
+ "types": [
44
+ "sites"
45
+ ],
46
+ "workspaces": [
47
+ "dev",
48
+ "test",
49
+ "sandboxes",
50
+ "demos"
51
+ ],
52
+ "files": [
53
+ "commands/cmd-nextcloud-project.sh",
54
+ "commands/cmd-tools-nextcloud-occ.sh"
55
+ ]
56
+ },
57
+ "scripts": {
58
+ "functions": [
59
+ "scripts/functions/fun-nextcloud.sh"
60
+ ],
61
+ "args": [
62
+ "scripts/args/arg-nextcloud.sh",
63
+ "scripts/args/arg-nextcloud-occ.sh"
64
+ ],
65
+ "machine": [
66
+ "scripts/nextcloud-site.sh",
67
+ "testing/site.feature"
68
+ ]
69
+ },
70
+ "ai": {
71
+ "agents": [
72
+ "ai/agents/nextcloud-site-builder.md",
73
+ "ai/agents/nextcloud-tester.md"
74
+ ],
75
+ "skills": [
76
+ "ai/skills/nextcloud-scenarios"
77
+ ],
78
+ "commands": [
79
+ "ai/commands/nextcloud-test.md"
80
+ ],
81
+ "prompts": [
82
+ "ai/prompts/nextcloud-build-and-test.md",
83
+ "ai/prompts/nextcloud-scenarios-for-an-area.md"
84
+ ]
85
+ },
86
+ "features": [
87
+ "features/nextcloud.feature"
88
+ ]
89
+ },
90
+ "devDependencies": {
91
+ "@types/node": "^24.0.0",
92
+ "@webship.co/workspace-plugin-api": "^1.0.11",
93
+ "typescript": "^5.9.0"
94
+ },
95
+ "publishConfig": {
96
+ "access": "public"
97
+ }
98
+ }
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env bash
2
+
3
+ argparse "$@" <<ARGEOF || exit 1
4
+ parser.add_argument('PROJECT_NAME',
5
+ help='The Nextcloud project in this workspace.')
6
+ parser.add_argument('-o', '--occ',
7
+ default="_none_",
8
+ help='A command of the server\'s command-line tool (occ), with its arguments, run in the web container. Example: --occ "user:list"')
9
+ parser.add_argument('-a', '--add-users',
10
+ action='store_true',
11
+ default=False,
12
+ help='Add the default accounts. An account that is already there gets its password, email, display name and groups back.')
13
+ parser.add_argument('-c', '--cancel-users',
14
+ action='store_true',
15
+ default=False,
16
+ help='Delete the default accounts (never the workspace account, the administrator the installer made).')
17
+ parser.add_argument('-e', '--empty-files',
18
+ action='store_true',
19
+ default=False,
20
+ help='Take away every file and folder of the default accounts, with their deleted files and versions (what an interrupted test run left).')
21
+ ARGEOF
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env bash
2
+
3
+ argparse "$@" <<ARGEOF || exit 1
4
+ parser.add_argument('PROJECT_NAME',
5
+ help='The name of the project: its folder, its DDEV project and its host name.')
6
+ parser.add_argument('-i', '--install',
7
+ action='store_true',
8
+ default=False,
9
+ help='Install the server with its own installer, the workspace account as its administrator, and set it up for testing.')
10
+ parser.add_argument('-a', '--add-users',
11
+ action='store_true',
12
+ default=False,
13
+ help='With --install, add the default accounts (administrator, editor, user): the ones the test scenarios log in as.')
14
+ parser.add_argument('-v', '--nextcloud-version',
15
+ default="",
16
+ help='The release of the server: 35.0.3 by default, or a major line for its newest release. Example: --nextcloud-version 34')
17
+ parser.add_argument('-p', '--php-version',
18
+ default="",
19
+ help='The PHP of the web container: 8.4 by default (the release takes 8.3 to 8.5). Example: --php-version 8.3')
20
+ parser.add_argument('-l', '--launch',
21
+ action='store_true',
22
+ default=False,
23
+ help='Open the site in a browser when it is ready.')
24
+ ARGEOF