Skip to content

Commit c8f3960

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/eslint-plugin-n-17.16.2
2 parents e91461e + 8b13d02 commit c8f3960

File tree

65 files changed

+2021
-562
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+2021
-562
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
# Script to check if files from specific pattern groups have changed in a PR
6+
# Groups: backend, postgres, ui
7+
8+
if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
9+
echo "Running on main branch, comparing with previous commit"
10+
changed_files=$(git diff --name-only HEAD^ HEAD)
11+
else
12+
echo "Running on non-default branch, comparing with $GITHUB_BASE_REF branch"
13+
changed_files=$(git diff --name-only origin/$GITHUB_BASE_REF...HEAD)
14+
fi
15+
16+
17+
if [ -z "$changed_files" ]; then
18+
echo "No files changed in this PR compared to $GITHUB_BASE_REF branch."
19+
echo "backend_changed=false" >> $GITHUB_OUTPUT
20+
echo "postgres_changed=false" >> $GITHUB_OUTPUT
21+
echo "ui_changed=false" >> $GITHUB_OUTPUT
22+
exit 0
23+
fi
24+
25+
backend_changed=false
26+
postgres_changed=false
27+
ui_changed=false
28+
29+
for file in $changed_files; do
30+
if [[ $file == forge/* ||
31+
$file == test/unit/* ||
32+
$file == test/system/* ||
33+
$file == frontend/* ||
34+
$file == test/e2e/frontend/* ||
35+
$file == test/unit/frontend/* ||
36+
$file == package.json ||
37+
$file == package-lock.json ||
38+
$file == .eslintrc ]]; then
39+
backend_changed=true
40+
fi
41+
42+
if [[ $file == forge/* ||
43+
$file == test/unit/* ||
44+
$file == test/system/* ||
45+
$file == package.json ||
46+
$file == package-lock.json ]]; then
47+
postgres_changed=true
48+
fi
49+
50+
if [[ $file == forge/* ||
51+
$file == test/unit/* ||
52+
$file == test/system/* ||
53+
$file == frontend/* ||
54+
$file == test/e2e/frontend/* ||
55+
$file == test/unit/frontend/* ||
56+
$file == package.json ||
57+
$file == package-lock.json ||
58+
$file == .eslintrc ]]; then
59+
ui_changed=true
60+
fi
61+
62+
if $backend_changed && $postgres_changed && $ui_changed; then
63+
break
64+
fi
65+
done
66+
67+
echo "Changed groups:"
68+
echo " Backend: $backend_changed"
69+
echo " postgres: $postgres_changed"
70+
echo " UI: $ui_changed"
71+
72+
echo "backend_changed=$backend_changed" >> $GITHUB_OUTPUT
73+
echo "postgres_changed=$postgres_changed" >> $GITHUB_OUTPUT
74+
echo "ui_changed=$ui_changed" >> $GITHUB_OUTPUT
75+
76+
exit 0

.github/workflows/release-publish.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,3 @@ jobs:
2121
- uses: JS-DevTools/npm-publish@v3
2222
with:
2323
token: ${{ secrets.NPM_PUBLISH_TOKEN }}
24-
- name: Resync Maintenance
25-
if: ${{ endsWith(github.ref, '.0') }}
26-
run: |
27-
git checkout maintenance
28-
git reset --hard origin/main
29-
git push --force origin maintenance

.github/workflows/tests.yml

Lines changed: 13 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -16,53 +16,19 @@ jobs:
1616
name: Verify changes
1717
runs-on: ubuntu-latest
1818
outputs:
19-
run_backend_tests: ${{ steps.set-outputs.outputs.backend_tests }}
20-
run_postgres_tests: ${{ steps.set-outputs.outputs.postgres_tests }}
21-
run_ui_tests: ${{ steps.set-outputs.outputs.ui_tests }}
19+
run_backend_tests: ${{ steps.changed-files.outputs.backend_changed }}
20+
run_postgres_tests: ${{ steps.changed-files.outputs.postgres_changed }}
21+
run_ui_tests: ${{ steps.changed-files.outputs.ui_changed }}
2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 0
27-
- name: Get changed files
27+
- name: Find changed files
2828
id: changed-files
29-
uses: tj-actions/changed-files@v45
30-
with:
31-
files_yaml: |
32-
backend:
33-
- 'forge/**'
34-
- 'test/unit/**'
35-
- 'test/system/**'
36-
- 'frontend/**'
37-
- 'test/e2e/frontend/**'
38-
- 'test/unit/frontend/**'
39-
- 'package.json'
40-
- 'package-lock.json'
41-
- '.eslintrc'
42-
postgres:
43-
- 'forge/**'
44-
- 'test/unit/**'
45-
- 'test/system/**'
46-
- 'package.json'
47-
- 'package-lock.json'
48-
ui:
49-
- 'forge/**'
50-
- 'test/unit/**'
51-
- 'test/system/**'
52-
- 'frontend/**'
53-
- 'test/e2e/frontend/**'
54-
- 'test/unit/frontend/**'
55-
- 'package.json'
56-
- 'package-lock.json'
57-
- '.eslintrc'
58-
- name: Set outputs
59-
id: set-outputs
60-
shell: bash
6129
run: |
62-
echo "backend_tests=${{ steps.changed-files.outputs.backend_any_changed }}" >> "$GITHUB_OUTPUT"
63-
echo "postgres_tests=${{ steps.changed-files.outputs.postgres_any_changed }}" >> "$GITHUB_OUTPUT"
64-
echo "ui_tests=${{ steps.changed-files.outputs.ui_any_changed }}" >> "$GITHUB_OUTPUT"
65-
30+
./.github/scripts/detect_changed_files.sh
31+
6632
backend-tests:
6733
if: ${{ needs.check-changes.outputs.run_backend_tests == 'true' }}
6834
name: Backend tests
@@ -220,14 +186,15 @@ jobs:
220186
echo "SUMMARY_ICON=no_entry" >> $GITHUB_ENV
221187
echo "SUMMARY_MESSAGE= Deployment to FFC environments will not happen until this issue is resolved." >> $GITHUB_ENV
222188
echo "LAST_COMMIT_SHA=${{ github.sha}}" >> $GITHUB_ENV
189+
echo "PR_LINK=*Branch:* ${{ github.ref_name }}" >> $GITHUB_ENV
223190
else
224191
echo "HEADER_MESSAGE=Tests failed against ${{ github.event.number }} pull request" >> $GITHUB_ENV
225192
echo "SUMMARY_ICON=warning" >> $GITHUB_ENV
226193
echo "SUMMARY_MESSAGE= Please resolve the problem before merging your changes into the main branch." >> $GITHUB_ENV
227194
echo "LAST_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
195+
echo "PR_LINK=*Pull request:* <https://github.com/FlowFuse/flowfuse/pull/${{ github.event.pull_request.number }}|${{ github.event.pull_request.number }}>" >> $GITHUB_ENV
228196
fi
229197
230-
231198
- name: Send notification
232199
uses: slackapi/slack-github-action@v2.0.0
233200
with:
@@ -279,13 +246,17 @@ jobs:
279246
"type": "mrkdwn",
280247
"text": "*Author:* <@${{ steps.map-actor-to-slack.outputs.actor-mapping }}>"
281248
},
249+
{
250+
"type": "mrkdwn",
251+
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View failed workflow>"
252+
},
282253
{
283254
"type": "mrkdwn",
284255
"text": "*Last commit:* <${{ github.server_url }}/${{ github.repository }}/commit/${{ env.LAST_COMMIT_SHA }}|${{ env.LAST_COMMIT_SHA }}>"
285256
},
286257
{
287258
"type": "mrkdwn",
288-
"text": "<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow run>"
259+
"text": "${{ env.PR_LINK }}"
289260
}
290261
]
291262
}

CHANGELOG.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,71 @@
1+
#### 2.15.0: Release
2+
3+
- Sort instance table by date desc by default (#5311) @Steve-Mcl
4+
- Fix UNS exit route guard (#5244) @cstns
5+
- Add topic "Delete" button to Broker Schema (#5305) @Steve-Mcl
6+
- Fix mqtt protocol version not remembered (#5306) @Steve-Mcl
7+
- Bump axios from 1.7.4 to 1.8.3 (#5303) @app/dependabot
8+
- Remove `Resync Maintenance` step from the release pipeline (#5302) @ppawlowski
9+
- Add filter to snapshot views (#5288) @Steve-Mcl
10+
- Fix generated API doc for external MQTT Broker API (#5296) @hardillb
11+
- Pass npmrc and catalogue to instance/device (#5212) @hardillb
12+
- Add `npm` to the restricted project name list (#5281) @hardillb
13+
- Restore "Set Target Snapshot" option when creating Snapshot (#5273) @joepavitt
14+
- Support Multiple Device Groups in pipeline - backend (#5259) @Steve-Mcl
15+
- Allow a trial team to downgrade to freemium (#5262) @knolleary
16+
- Add option to disable billing requirement for a team type (#5237) @knolleary
17+
- Allow MQTT Schema agent on Docker (#5118) @hardillb
18+
- Changed Bill Of Materials instance link to instance palette settings. (#5250) @78wesley
19+
- Expose schema objects suggestions (#5226) @cstns
20+
- Add the external url in the UI (#5247) @cstns
21+
- Prevent duplicate tour, and don't show the "standard" welcome tour for Free Tier (#5242) @joepavitt
22+
- Add externalUrl column on the FlowTemplate table (#5180) @cstns
23+
- Broker docs schema metadata (#5207) @cstns
24+
- Improve the labelling of a Pipeline for improved navigation (#5234) @joepavitt
25+
- Onboarding: Improve clarification in the "Add Remote Instance" dialog (#5239) @joepavitt
26+
- Fix invalid template conditional in dynamic component that was causing the device timeline to crash (#5236) @cstns
27+
- Add the ability to pass down vue components to the global dialog modal (#5225) @cstns
28+
- Styling: Make it clearer that Pipeline header is interactive (#5233) @joepavitt
29+
- Docs: Add video walkthrough for FlowFuse Device agent (#5231) @gstout52
30+
- Add API endpoint for private npm registry catalogue (#5173) @hardillb
31+
- Add deviceLastSeen and remote broker counts to telemetry (#5220) @knolleary
32+
- docs: Add suggested hardware requirements for self-hosted deployments (#5224) @ppawlowski
33+
- Add topic suggestions (#5195) @cstns
34+
- Ensure schema buttons are always shown (#5221) @knolleary
35+
- Interactive device timeline events (#5205) @cstns
36+
- Add a device snapshot created audit log event (#5176) @cstns
37+
- Device timeline quick fixes (#5175) @cstns
38+
- Update device doc references to new nomenclature (#5152) @cstns
39+
- Add a device snapshot deployed audit log event (#5170) @cstns
40+
- Add a device.project.deployed event to track device state changes from the device perspective (#5155) @cstns
41+
- Add a device.pipeline.deployed event to track device state changes from the device perspective (#5149) @cstns
42+
- Add new "Broker Error" component which details issues with connecting to 3rd party broker (#5218) @joepavitt
43+
- Fix Team trial billing prompt after team creation (#5219) @cstns
44+
- Add feature details on the "Delete Team" dialog (#5217) @joepavitt
45+
- Ensure free tour shows when new Free Tier members sign up (#5215) @joepavitt
46+
- Bump @aws-sdk/client-ses from 3.621.0 to 3.750.0 (#5174) @app/dependabot
47+
- Fix missing prop on the template settings environment component (#5210) @cstns
48+
- Fix incorrect status code in broker api (#5209) @knolleary
49+
- Update device agent install information and fix ffox copy text utility (#5168) @cstns
50+
- Split the brokers page into components pt2 (#5197) @cstns
51+
- Split the brokers hierarchy into manageable chunks (#5188) @cstns
52+
- Fix position of Team Broker settings in TeamType edit dialog (#5198) @knolleary
53+
- Ensure non-node modules are included in snapshot package.json (#5196) @knolleary
54+
- Fix Sentry Bug - MQTT client may be null (#5181) @hardillb
55+
- Allow team suspend when subscription has expired (#5172) @knolleary
56+
- Test for undefinded/null not true/false in ff-listbox (#5163) @hardillb
57+
- Extend invitation expiration date when resending it (#5159) @cstns
58+
- Show the user's email for external invitations in the action dialogs (#5158) @joepavitt
59+
- Resend team invitations (#5151) @cstns
60+
- Device docs installation (#5147) @joepavitt
61+
- Improve the instructions for the Device Agent onboarding (#5145) @joepavitt
62+
- Replace the application activity instance selector, and FormRow dropdown with the listbox component (#4591) @cstns
63+
- Reset store state on logout (#5120) @cstns
64+
- Add a team link component to simplify routing (#4942) @cstns
65+
- docs: First iteration of FlowFuse on OpenShift (#5138) @ppawlowski
66+
- Add a new start tour button in the main dropdown menu that restarts the product tour (#5140) @cstns
67+
- Filter topic hierarchy list (#5144) @cstns
68+
169
#### 2.14.1: Release
270

371
- BUG: display the refresh button for the team-broker (#5137) @cstns

docs/user/custom-npm-packages.md

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
---
2+
navTitle: Custom Node Packages
3+
---
4+
5+
# Custom Node Packages
6+
7+
FlowFuse has access to the wide range of Node-RED nodes listed in the
8+
[public catalogue](https://flows.nodered.org). But occasionally there
9+
will be the need for a custom node for a situation that is specific
10+
to your Team.
11+
12+
If you decide to [develop](https://nodered.org/docs/creating-nodes/) your
13+
own nodes, you will need somewhere to host both the node and a Node-RED
14+
catalogue file. FlowFuse has two solutions for this:
15+
16+
1. FlowFuse Hosted Nodes - Use the private NPM registry hosted by FlowFuse to store and manage your custom npm packages.
17+
2. Third-Party NPM Registries - If you already have a private npm registry, you can enable access to these in your Instance's settings.
18+
19+
## FlowFuse Hosted Nodes
20+
21+
If you want to create a Node-RED node for private use by Instances in your
22+
FlowFuse Team then you can publish them to the FlowFuse Custom Node Registry
23+
(available to Teams and Enterprise level teams on FlowFuse Cloud).
24+
25+
### Publishing Nodes
26+
27+
After developing your node you can publish it to your Teams Custom Nodes
28+
registry with the following steps
29+
30+
#### Authenticating
31+
32+
Before publishing to the registry you need to authenticate. This step should
33+
only need to be done once.
34+
35+
The credentials can be found by navigating to the "Custom Nodes" tab under
36+
the Team Library and clicking on the "Publish" button.
37+
38+
![Publish Custom Package](./images/publish-custom-package.png){data-zoomable}{style="max-width: 600px;"}
39+
_Screenshot fo the "Publish Custom Package" dialog shown in the FlowFuse UI_
40+
41+
```
42+
npm login --registry=https://registry.flowfuse.cloud
43+
```
44+
45+
#### Packaging
46+
47+
There are steps required to ensure your node is correctly packaged for the
48+
FlowFuse Custom Nodes registry
49+
50+
1. Make sure the package name contains the correct scope prefix e.g.
51+
`@flowfuse-[team id]/node-name`. The correct prefix will be shown on the in
52+
the FlowFuse application
53+
2. Add a `publishConfig` section with a `registry` entry
54+
55+
56+
e.g. for a Team with ID `6Rag1kQj4k`
57+
```json
58+
{
59+
"name": "@flowfuse-6Rag1kQj4k/bar",
60+
"version": "0.0.1",
61+
"description": "...",
62+
"publishConfig": {
63+
"registry": "https://registry.flowfuse.cloud"
64+
},
65+
...
66+
}
67+
```
68+
69+
#### Publishing
70+
71+
In the same directory as the `package.json` file run the following command
72+
73+
```
74+
npm publish
75+
```
76+
77+
Once published you should see the Node listed in the "Custom Nodes" section
78+
of the Team Library.
79+
80+
![Screenshot of the "Custom Nodes" view in the Team Library](./images/custom-node-library.png){data-zoomable}{style="max-width: 850px;"}
81+
_Screenshot of the "Custom Nodes" view in the Team Library_
82+
83+
### Installing Nodes
84+
85+
Any packages uploaded to the Team Library will be published to your Instances
86+
under a custom catalogue with the name "FlowFuse Team [team name] Catalogue"
87+
88+
![Node-RED Custom Catalogue](./images/custom-catalogue.png){data-zoomable}{style="max-width: 600px;"}
89+
_Screenshot of the contents of a FlowFUse catalogue appearing in the "install" tab of the Node-RED Palette Manager_
90+
91+
## 3rd Party NPM Registries or Private npmjs.org packages
92+
93+
The following features are available to Team and Enterprise users of FlowFuse
94+
Cloud.
95+
96+
### NPM Registries
97+
98+
If you have already published packages to an existing NPM Registry then you
99+
can enable access to this by adding the required values to a `.npmrc" file
100+
in the Instance Settings.
101+
102+
This can include authentication tokens to access private packages.
103+
104+
![.npmrc file](./images/instance-settings-npmrc.png){data-zoomable}{style="max-width: 600px;"}
105+
_Screenshot from the FlowFuse platform, showing the input for defining an .npmrc file_
106+
107+
### Node-RED Catalogues
108+
109+
In order to be able to install packages in the Node-RED editor they need to
110+
in a Node-RED Catalogue file that is loaded from a HTTPS URL. You can
111+
supply a list of Catalogue URLs in the Instance Settings.
112+
113+
![Node Catalogues](./images/instance-settings-catalogues.png){data-zoomable}{style="max-width: 600px;"}
114+
_Screenshot of the listed Node Catalogues configured on an Instance_
87.6 KB
Loading
391 KB
Loading
30.8 KB
Loading
12.1 KB
Loading
190 KB
Loading

0 commit comments

Comments
 (0)