@onify/flow-extensions 4.1.0 → 5.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.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,11 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ # 5.0.0
5
+
6
+ - Turn into module with exports for node
7
+ - Add type declaration
8
+
4
9
  # 4.1.0
5
10
 
6
11
  - Support sequence flow properties and take execution listener. Requires `bpmn-elements >= 9.2`
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  Onify Flow Extensions
2
2
  =====================
3
3
 
4
- [![Built latest](https://github.com/onify/flow-extensions/actions/workflows/build-latest.yaml/badge.svg)](https://github.com/onify/flow-extensions/actions/workflows/build-latest.yaml)
4
+ [![Built latest](https://github.com/onify/flow-extensions/actions/workflows/build-latest.yaml/badge.svg)](https://github.com/onify/flow-extensions/actions/workflows/build-latest.yaml)[![Coverage Status](https://coveralls.io/repos/github/onify/flow-extensions/badge.svg?branch=default)](https://coveralls.io/github/onify/flow-extensions?branch=default)
5
5
 
6
6
  # Api
7
7
 
package/dist/index.js CHANGED
@@ -11,9 +11,9 @@ Object.defineProperty(exports, "OnifySequenceFlow", {
11
11
  });
12
12
  exports.extendFn = extendFn;
13
13
  exports.extensions = extensions;
14
- var _OnifyProcessExtensions = require("./src/OnifyProcessExtensions.js");
15
- var _OnifyElementExtensions = require("./src/OnifyElementExtensions.js");
16
- var _OnifySequenceFlow = require("./src/OnifySequenceFlow.js");
14
+ var _OnifyProcessExtensions = require("./OnifyProcessExtensions.js");
15
+ var _OnifyElementExtensions = require("./OnifyElementExtensions.js");
16
+ var _OnifySequenceFlow = require("./OnifySequenceFlow.js");
17
17
  function extensions(element, context) {
18
18
  if (element.type === 'bpmn:Process') return new _OnifyProcessExtensions.OnifyProcessExtensions(element, context);
19
19
  return new _OnifyElementExtensions.OnifyElementExtensions(element, context);
package/index.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ declare module '@onify/flow-extensions' {
2
+ import { SequenceFlow, ElementBase, Context, IExtension } from 'bpmn-elements';
3
+ import { extendFn as extendFunction } from 'moddle-context-serializer';
4
+
5
+ export class OnifySequenceFlow extends SequenceFlow {}
6
+ export function extensions(element: ElementBase, context: Context): IExtension;
7
+ export const extendFn: extendFunction;
8
+ }
package/package.json CHANGED
@@ -1,20 +1,23 @@
1
1
  {
2
2
  "name": "@onify/flow-extensions",
3
- "version": "4.1.0",
3
+ "version": "5.0.0",
4
4
  "description": "Onify Flow extensions",
5
+ "type": "module",
5
6
  "module": "index.js",
6
7
  "main": "dist/index.js",
8
+ "types": "./index.d.ts",
7
9
  "sideEffects": false,
8
- "directories": {
9
- "test": "test"
10
+ "exports": {
11
+ "import": "./src/index.js",
12
+ "require": "./dist/index.js"
10
13
  },
11
14
  "scripts": {
12
- "test": "mocha",
13
- "posttest": "npm run dist && eslint . --cache",
15
+ "test": "mocha -R dot",
16
+ "posttest": "npm run lint && npm run dist",
17
+ "lint": "eslint . --cache",
14
18
  "prepare": "npm run dist",
15
- "predist": "node -e \"fs.rmdirSync('./dist/src', {recursive: true});\"",
16
- "dist": "babel index.js -d dist && babel src -d dist/src && babel test/helpers/FlowScripts.js -d dist/src",
17
- "test:lcov": "c8 mocha -R dot && c8 report --reporter lcov && npm run posttest",
19
+ "dist": "babel src -d dist && babel test/helpers/FlowScripts.js -d dist",
20
+ "test:lcov": "c8 -r lcov mocha && npm run lint",
18
21
  "cov:html": "c8 mocha -R dot && c8 report --reporter html"
19
22
  },
20
23
  "keywords": [
@@ -36,7 +39,7 @@
36
39
  "devDependencies": {
37
40
  "@aircall/expression-parser": "^1.0.4",
38
41
  "@babel/cli": "^7.21.5",
39
- "@babel/core": "^7.21.5",
42
+ "@babel/core": "^7.21.8",
40
43
  "@babel/preset-env": "^7.21.5",
41
44
  "@babel/register": "^7.21.0",
42
45
  "bpmn-elements-8-1": "npm:bpmn-elements@8.1",
@@ -58,16 +61,15 @@
58
61
  },
59
62
  "files": [
60
63
  "src",
61
- "index.js",
62
- "dist/src",
63
- "dist/index.js"
64
+ "dist",
65
+ "index.d.ts"
64
66
  ],
65
67
  "c8": {
66
68
  "exclude": [
67
69
  "dist",
68
70
  "test",
69
- ".mocharc.js",
70
- "babel.config.js"
71
+ ".mocharc.cjs",
72
+ "babel.config.cjs"
71
73
  ]
72
74
  }
73
75
  }
@@ -1,6 +1,6 @@
1
- import {OnifyProcessExtensions} from './src/OnifyProcessExtensions.js';
2
- import {OnifyElementExtensions} from './src/OnifyElementExtensions.js';
3
- import {OnifySequenceFlow} from './src/OnifySequenceFlow.js';
1
+ import {OnifyProcessExtensions} from './OnifyProcessExtensions.js';
2
+ import {OnifyElementExtensions} from './OnifyElementExtensions.js';
3
+ import {OnifySequenceFlow} from './OnifySequenceFlow.js';
4
4
 
5
5
  export {
6
6
  extensions,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes