Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
branches:
- main

permissions:
contents: write
id-token: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Create release
id: release
uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0

- name: Checkout
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1

- name: Use Node.js 24.x
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 #v7.0.0
with:
node-version: '24.x'

- name: Install dependencies
if: ${{ steps.release.outputs.release_created }}
run: npm ci

- name: Publish package
if: ${{ steps.release.outputs.release_created }}
run: npm publish --access public --provenance
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
An editor type plugin to update existing `LNodeType` elements
# SCL Template Update

> NOTE: Does only work with the `oscd-edit-v2` cubnstom event.
An OpenSCD editor plugin for updating existing `LNodeType` elements in an SCL
document from IEC 61850 NSD definitions.

## Features

- Compare an existing logical node type with its NSD definition.
- Add or remove data objects and update the logical node type description.
- Highlight missing mandatory fields and empty referenced data types.
- Update a logical node type in place or replace it using swap mode.
- Remove unused supporting types when updating or deleting a logical node type.

## Installation

```sh
npm install @compas-oscd/scl-template-update
```

Register the module as an editor plugin in an OpenSCD host.
The host must provide the loaded SCL document through the plugin's `doc`
property and support the `oscd-edit-v2` event emitted by the plugin.

## Development

```sh
npm install
npm start
```

Other useful commands:

```sh
npm test # Run the test suite with coverage
npm run lint # Check linting and formatting
npm run build # Create the distributable package in dist/
```

## License

Apache-2.0
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{
"name": "@com-pas/scl-template-update",
"description": "OpenSCD plugin for updating DataTypeTemplates",
"name": "@compas-oscd/scl-template-update",
"description": "OpenSCD plugin for updating LNodeType elements",
"license": "Apache-2.0",
"author": "CoMPAS",
"version": "0.0.0",
"repository": {
"type": "git",
"url": "git+https://github.com/com-pas/scl-template-update.git"
},
"type": "module",
"exports": {
".": "./dist/scl-template-update.js"
Expand Down
9 changes: 9 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "node",
"initial-version": "0.0.1"
}
}
}