Détail du package

asciidoctor-liquibase

uniqueck17MIT1.2.5

Asciidoctor.js extension to render liquibase changesets as entity relationship diagram

asciidoctor, asciidoctor.js, liquibase, antora

readme

Asciidoctor Liquibase Extension

Build JavaScript npm version

An extension for Asciidoctor.js to convert Liquibase changeset files to entity relationship diagrams!

Install

Node.js

Install the dependencies:

npm i asciidoctor asciidoctor-liquibase

Create a file named liquibase.js with following content and run it:

const asciidoctor = require('@asciidoctor/core')()
const liquibase = require('asciidoctor-liquibase')

const input = 'liquibase::db.changelog-master.yaml[]'

liquibase.register(asciidoctor.Extensions) // <1>
console.log(asciidoctor.convert(input, { safe: 'safe' }))

const registry = asciidoctor.Extensions.create()
liquibase.register(registry) // <2>
console.log(asciidoctor.convert(input, { safe: 'safe', extension_registry: registry }))

<1> Register the extension in the global registry
<2> Register the extension in a dedicated registry

Antora Integration

If you are using Antora, you can integrate Liquibase in your documentation site.

Install the extension in your playbook project:

   $ npm i asciidoctor-liquibase
  1. Register the extension in your playbook file:

     asciidoc:
       extensions:
         - asciidoctor-liquibase

    https://docs.antora.org/antora/2.3/playbook/configure-asciidoc/#extensions

Contributing

Setup

To build this project, you will need the latest active LTS of Node.js and npm (we recommend nvm to manage multiple active Node.js versions). This project use decision tables to generate code, so you need a license of https://lohrfink.de.

Building

  1. Install the dependencies:
npm i
  1. Generate a distribution:
npm run dist

When working on a new feature or when fixing a bug, make sure to run the linter and the tests suite:

npm run lint
npm run test

changelog

1.2.5 (2024-05-05)

Fix

  • Ignore all not supported changeset types (ec84abb)

1.2.4 (2023-09-14)

Fix

  • wrong keys for foreign key column and table (469688b)

1.2.3 (2023-09-10)

Fix

  • missing processing of foreignkey information's on addColumn / createTable changeset (fixes #15) (4b5d08d), closes #15

Test

  • add cucumber tests for extractor elements (ef6e72d)

1.2.2 (2023-08-19)

Fix

  • changeset extractor addPrimaryKey (fixes #12) (488efe8), closes #12

Test

  • add cucumber test for decision table liquibase-elements (4fc4eef)

1.2.1 (2023-07-05)

Chore

  • Fix eslint configuration and script (2929965)
  • Fix lint errors & warnings (76677f8)

Fix

  • read relative files via antora virtual file system (515902d)

1.2.0 (2023-06-16)

Build

  • add keywords and add changelog to node js package (c5e10b8)

Docs

  • remove duplicated changelog file in adoc format (3a65933)

Fix

  • extract columns of addColumn changeSet type correctly (161c14a)

Update

  • Ignore changeSet elements of type update (703e662)

1.1.0 (2023-06-16)

Build

  • Fix script in Github Workflow to call semantic release (d296549)
  • improve release process via semantic-release (8fefbd7)

New

  • handle modifyDataType changeSet type (a78afa6)