state-machine-cat 11.0.4 → 11.0.6

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.
@@ -1,4 +1,3 @@
1
- import getStream from "get-stream";
2
1
  import smcat from "../index-node.mjs";
3
2
  import { getOutStream, getInStream } from "./file-name-to-stream.mjs";
4
3
  const LICENSE = `
@@ -28,6 +27,19 @@ CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28
27
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29
28
 
30
29
  `;
30
+ function getStream(pStream) {
31
+ return new Promise((pResolve, pReject) => {
32
+ let lInputAsString = "";
33
+ pStream
34
+ .on("data", (pChunk) => {
35
+ lInputAsString += pChunk;
36
+ })
37
+ .on("error", pReject)
38
+ .on("end", () => {
39
+ pResolve(lInputAsString);
40
+ });
41
+ });
42
+ }
31
43
  export default {
32
44
  LICENSE,
33
45
  transform(pOptions) {
@@ -122,12 +122,12 @@ function mapMachine(pSCXMLStateMachine) {
122
122
  function deDuplicateAttributesAndTags(pObject, pAttributeNamePrefix) {
123
123
  return traverse(pObject).map(function deDuplicate() {
124
124
  if (this.key?.startsWith(pAttributeNamePrefix)) {
125
- const pUnprefixedAttributeName = this.key.slice(pAttributeNamePrefix.length);
126
- if (this.parent.keys.includes(pUnprefixedAttributeName)) {
125
+ const pUnPrefixedAttributeName = this.key.slice(pAttributeNamePrefix.length);
126
+ if (this.parent.keys.includes(pUnPrefixedAttributeName)) {
127
127
  this.remove();
128
128
  }
129
129
  else {
130
- this.parent.node[pUnprefixedAttributeName] = this.node;
130
+ this.parent.node[pUnPrefixedAttributeName] = this.node;
131
131
  this.remove();
132
132
  }
133
133
  }
@@ -1 +1 @@
1
- export const version = "11.0.4";
1
+ export const version = "11.0.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "state-machine-cat",
3
- "version": "11.0.4",
3
+ "version": "11.0.6",
4
4
  "description": "write beautiful state charts",
5
5
  "main": "./dist/esm/index.mjs",
6
6
  "module": "./dist/esm/index.mjs",
@@ -94,8 +94,7 @@
94
94
  "ajv": "8.12.0",
95
95
  "chalk": "5.2.0",
96
96
  "commander": "10.0.1",
97
- "fast-xml-parser": "4.2.2",
98
- "get-stream": "6.0.1",
97
+ "fast-xml-parser": "4.2.4",
99
98
  "handlebars": "4.7.7",
100
99
  "he": "1.2.0",
101
100
  "indent-string": "5.0.0",
@@ -108,18 +107,18 @@
108
107
  "@types/chai": "4.3.5",
109
108
  "@types/chai-xml": "0.3.2",
110
109
  "@types/he": "1.2.0",
111
- "@types/lodash": "4.14.194",
110
+ "@types/lodash": "4.14.195",
112
111
  "@types/mocha": "10.0.1",
113
- "@typescript-eslint/eslint-plugin": "5.59.6",
114
- "@typescript-eslint/parser": "5.59.6",
115
- "c8": "7.13.0",
112
+ "@typescript-eslint/eslint-plugin": "5.59.9",
113
+ "@typescript-eslint/parser": "5.59.9",
114
+ "c8": "7.14.0",
116
115
  "chai": "4.3.7",
117
116
  "chai-as-promised": "7.1.1",
118
117
  "chai-json-schema": "1.5.1",
119
118
  "chai-xml": "0.4.1",
120
- "dependency-cruiser": "13.0.0",
119
+ "dependency-cruiser": "13.0.3",
121
120
  "esbuild": "0.17.19",
122
- "eslint": "8.40.0",
121
+ "eslint": "8.42.0",
123
122
  "eslint-config-moving-meadow": "4.0.2",
124
123
  "eslint-config-prettier": "8.8.0",
125
124
  "eslint-plugin-budapestian": "5.0.1",
@@ -139,9 +138,9 @@
139
138
  "prettier": "2.8.8",
140
139
  "query-string": "8.1.0",
141
140
  "ts-node": "10.9.1",
142
- "typescript": "5.0.4",
143
- "upem": "7.3.2",
144
- "watskeburt": "0.11.2",
141
+ "typescript": "5.1.3",
142
+ "upem": "8.0.0",
143
+ "watskeburt": "0.11.3",
145
144
  "xml-name-validator": "4.0.0"
146
145
  },
147
146
  "overrides": {