Compare commits

..

19 Commits

Author SHA1 Message Date
292e558d51 1.1.1 2024-12-30 21:05:18 +01:00
c2c50583f0 fix(dependencies): Added missing xmlbuilder2 dependency and relevant exports 2024-12-30 21:05:18 +01:00
403f9c5757 1.1.0 2024-12-30 20:57:27 +01:00
3ca651bc9a feat(core): Upgrade dependencies and enhance XML parsing and building 2024-12-30 20:57:27 +01:00
431d97c4b1 update description 2024-05-29 14:17:17 +02:00
c9d6ffe7ab update tsconfig 2024-04-14 18:35:03 +02:00
3d375ad00d update tsconfig 2024-04-01 21:42:20 +02:00
a4da0a7dd7 update npmextra.json: githost 2024-04-01 20:00:07 +02:00
19c2128c2a update npmextra.json: githost 2024-03-30 21:49:07 +01:00
e72bdd1dcf 1.0.8 2023-10-20 17:39:49 +02:00
39e38d516b fix(core): update 2023-10-20 17:39:48 +02:00
bf92c2ccb3 1.0.7 2023-10-20 17:38:45 +02:00
77c2433edc fix(core): update 2023-10-20 17:38:44 +02:00
5481831711 1.0.6 2020-10-26 00:44:27 +00:00
fb606e734b fix(core): update 2020-10-26 00:44:26 +00:00
e75a939214 1.0.5 2020-10-25 22:19:44 +00:00
deda012e03 fix(core): update 2020-10-25 22:19:44 +00:00
933a5e0a45 1.0.4 2020-10-24 21:03:51 +00:00
bb339b8c85 fix(core): update 2020-10-24 21:03:51 +00:00
17 changed files with 10128 additions and 11256 deletions

View File

@ -0,0 +1,66 @@
name: Default (not tags)
on:
push:
tags-ignore:
- '**'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Install pnpm and npmci
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
- name: Run npm prepare
run: npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build

View File

@ -0,0 +1,124 @@
name: Default (tags)
on:
push:
tags:
- '*'
env:
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
jobs:
security:
runs-on: ubuntu-latest
continue-on-error: true
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Audit production dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --prod
continue-on-error: true
- name: Audit development dependencies
run: |
npmci command npm config set registry https://registry.npmjs.org
npmci command pnpm audit --audit-level=high --dev
continue-on-error: true
test:
if: ${{ always() }}
needs: security
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Test stable
run: |
npmci node install stable
npmci npm install
npmci npm test
- name: Test build
run: |
npmci node install stable
npmci npm install
npmci npm build
release:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Release
run: |
npmci node install stable
npmci npm publish
metadata:
needs: test
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
container:
image: ${{ env.IMAGE }}
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
pnpm install -g pnpm
pnpm install -g @shipzone/npmci
npmci npm prepare
- name: Code quality
run: |
npmci command npm install -g typescript
npmci npm install
- name: Trigger
run: npmci trigger
- name: Build docs and upload artifacts
run: |
npmci node install stable
npmci npm install
pnpm install -g @git.zone/tsdoc
npmci command tsdoc
continue-on-error: true

View File

@ -1,137 +0,0 @@
# gitzone ci_default
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
cache:
paths:
- .npmci_cache/
key: '$CI_BUILD_STAGE'
stages:
- security
- test
- release
- metadata
# ====================
# security stage
# ====================
mirror:
stage: security
script:
- npmci git mirror
only:
- tags
tags:
- lossless
- docker
- notpriv
auditProductionDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --production --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
stage: security
script:
- npmci npm prepare
- npmci command npm install --ignore-scripts
- npmci command npm config set registry https://registry.npmjs.org
- npmci command npm audit --audit-level=high --only=dev
tags:
- docker
allow_failure: true
# ====================
# test stage
# ====================
testStable:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
testBuild:
stage: test
script:
- npmci npm prepare
- npmci node install stable
- npmci npm install
- npmci command npm run build
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
release:
stage: release
script:
- npmci node install stable
- npmci npm publish
only:
- tags
tags:
- lossless
- docker
- notpriv
# ====================
# metadata stage
# ====================
codequality:
stage: metadata
allow_failure: true
only:
- tags
script:
- npmci command npm install -g tslint typescript
- npmci npm prepare
- npmci npm install
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
tags:
- lossless
- docker
- priv
trigger:
stage: metadata
script:
- npmci trigger
only:
- tags
tags:
- lossless
- docker
- notpriv
pages:
stage: metadata
script:
- npmci node install lts
- npmci command npm install -g @gitzone/tsdoc
- npmci npm prepare
- npmci npm install
- npmci command tsdoc
tags:
- lossless
- docker
- notpriv
only:
- tags
artifacts:
expire_in: 1 week
paths:
- public
allow_failure: true

24
.vscode/launch.json vendored
View File

@ -2,28 +2,10 @@
"version": "0.2.0",
"configurations": [
{
"name": "current file",
"type": "node",
"command": "npm test",
"name": "Run npm test",
"request": "launch",
"args": [
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
"type": "node-terminal"
}
]
}

34
changelog.md Normal file
View File

@ -0,0 +1,34 @@
# Changelog
## 2024-12-30 - 1.1.1 - fix(dependencies)
Added missing xmlbuilder2 dependency and relevant exports
- Added xmlbuilder2 to dependencies in package.json
- Export xmlbuilder2 functionality from smartxml.plugins.ts and ts/index.ts
## 2024-12-30 - 1.1.0 - feat(core)
Upgrade dependencies and enhance XML parsing and building
- Updated fast-xml-parser dependency to version ^4.5.1
- Enhanced XML parsing to preserve order and handle attributes
- Refactored createXmlFromObject method with a new XMLBuilder implementation
- Improved test coverage for XML string creation and parsing
## 2024-05-29 - 1.0.8 - Various Updates
Minor updates and improvements to configuration and documentation.
- Updated project description
- Modified `tsconfig` file
- Updated `npmextra.json`: githost
## 2023-10-20 - 1.0.6 to 1.0.8 - Core Fixes and Updates
Maintenance and core updates with improvements in project configuration.
- Core functionality fixes and updates
- Configuration updates
- Preparation for versioning to 1.0.8
## 2020-10-24 - 1.0.1 to 1.0.6 - Core Fixes
Multiple fixes and enhancements in core components.
- Series of core updates to improve stability and performance

View File

@ -2,17 +2,28 @@
"gitzone": {
"projectType": "npm",
"module": {
"githost": "gitlab.com",
"gitscope": "pushrocks",
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartxml",
"shortDescription": "a package for creating and parsing xml formated files",
"npmPackagename": "@pushrocks/smartxml",
"description": "A package for creating and parsing XML formatted files.",
"npmPackagename": "@push.rocks/smartxml",
"license": "MIT",
"projectDomain": "push.rocks"
"projectDomain": "push.rocks",
"keywords": [
"XML",
"parsing",
"XML creation",
"fast-xml-parser",
"TypeScript",
"data serialization"
]
}
},
"npmci": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
}
}

11025
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +1,28 @@
{
"name": "@pushrocks/smartxml",
"version": "1.0.3",
"name": "@push.rocks/smartxml",
"version": "1.1.1",
"private": false,
"description": "a package for creating and parsing xml formated files",
"description": "A package for creating and parsing XML formatted files.",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"author": "Lossless GmbH",
"license": "MIT",
"scripts": {
"test": "(tstest test/ --web)",
"build": "(tsbuild --web)"
"build": "(tsbuild --web && tsbundle npm)",
"buildDocs": "tsdoc"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.25",
"@gitzone/tsbundle": "^1.0.78",
"@gitzone/tstest": "^1.0.44",
"@pushrocks/tapbundle": "^3.2.9",
"@types/node": "^14.11.2",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0"
"@git.zone/tsbuild": "^2.2.0",
"@git.zone/tsbundle": "^2.1.0",
"@git.zone/tsrun": "^1.3.3",
"@git.zone/tstest": "^1.0.90",
"@push.rocks/tapbundle": "^5.5.4",
"@types/node": "^22.10.2"
},
"dependencies": {
"fast-xml-parser": "^3.17.4"
"fast-xml-parser": "^4.5.1",
"xmlbuilder2": "^3.1.1"
},
"browserslist": [
"last 1 chrome versions"
@ -37,5 +38,22 @@
"cli.js",
"npmextra.json",
"readme.md"
],
"repository": {
"type": "git",
"url": "https://code.foss.global/push.rocks/smartxml.git"
},
"bugs": {
"url": "https://gitlab.com/push.rocks/smartxml/issues"
},
"homepage": "https://code.foss.global/push.rocks/smartxml",
"type": "module",
"keywords": [
"XML",
"parsing",
"XML creation",
"fast-xml-parser",
"TypeScript",
"data serialization"
]
}

9684
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

1
readme.hints.md Normal file
View File

@ -0,0 +1 @@

137
readme.md
View File

@ -1,39 +1,120 @@
# @pushrocks/smartxml
a package for creating and parsing xml formated files
# @push.rocks/smartxml
a package for creating and parsing XML formatted files
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartxml)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartxml)
* [github.com (source mirror)](https://github.com/pushrocks/smartxml)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartxml/)
## Install
## Status for master
To start using @push.rocks/smartxml in your project, you'll first need to install it. This package is distributed via npm, so you can install it by running the following command in your project's root directory:
Status Category | Status Badge
-- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartxml/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartxml/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartxml)](https://lossless.cloud)
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartxml)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartxml)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartxml)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartxml)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
```sh
npm install @push.rocks/smartxml --save
```
## Usage
Use TypeScript for best in class intellisense
### Getting Started
## Contribution
First, ensure that your project is set up to use TypeScript and ESM syntax. Then, you can import `SmartXml` from @push.rocks/smartxml as follows:
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
```typescript
import { SmartXml } from '@push.rocks/smartxml';
```
For further information read the linked docs at the top of this readme.
`SmartXml` provides two main functionalities: parsing XML formatted strings into JavaScript objects and vice versa, creating XML formatted strings from JavaScript objects.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
### Parsing XML String to Object
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)
To parse an XML string to a JavaScript object, you can use the `parseXmlToObject` method. This method takes an XML string as its argument and returns a JavaScript object.
Here's a simple example:
```typescript
const xmlString = `
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
`;
const smartXml = new SmartXml();
const resultObject = smartXml.parseXmlToObject(xmlString);
console.log(resultObject);
```
### Creating XML String from Object
Conversely, if you have a JavaScript object that you want to convert into an XML formatted string, you can use the `createXmlFromObject` method. This method accepts a JavaScript object and returns a string containing the XML representation of the object.
Here's an example:
```typescript
const noteObject = {
note: {
to: 'Tove',
from: 'Jani',
heading: 'Reminder',
body: 'Don\'t forget me this weekend!'
}
};
const smartXml = new SmartXml();
const xmlString = smartXml.createXmlFromObject(noteObject);
console.log(xmlString);
```
### Advanced Usage
The `SmartXml` class is built on top of the `fast-xml-parser` library, which provides a lot of flexibility for both parsing and creation. For example, when creating XML from objects, you can control attributes, formatting, and more.
Let's look at a more complex example that includes XML attributes:
```typescript
const complexObject = {
note: {
"@_id": "12345",
"@_priority": "high",
to: 'Tove',
from: { "@_domain": "personal", "#text": 'Jani' },
heading: {
"@_style": "bold",
"#text": 'Reminder'
},
body: 'This is a special note for the weekend.'
}
};
const smartXml = new SmartXml();
const complexXmlString = smartXml.createXmlFromObject(complexObject, {
format: true
});
console.log(complexXmlString);
```
This example demonstrates how to add attributes (using `"@_attributeName": "value"`) and mixed content (using `"#text": "text value"`) to your objects before converting them to XML.
### Conclusion
The `@push.rocks/smartxml` package offers a straightforward and powerful means to work with XML in your JavaScript or TypeScript projects. By integrating it, you can easily convert between XML strings and JavaScript objects, allowing for efficient data processing and transmission in scenarios where XML is the preferred format. Whether you're building web services, APIs, or need to handle configuration files in XML, `SmartXml` offers the necessary tools to get the job done with minimal hassle.
## License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
### Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
### Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.

View File

@ -1,19 +1,31 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartxml from '../ts/index';
import { expect, tap } from '@push.rocks/tapbundle';
import * as smartxml from '../ts/index.js';
let testSmartxml: smartxml.SmartXml;
let testXml = '';
tap.test('should create ', async () => {
tap.test('should create an instance', async () => {
testSmartxml = new smartxml.SmartXml();
});
tap.test('should create an xml string', async () => {
const xmlResult = testSmartxml.createXmlFromObject({
hello: {
wow: 'test'
"@_xlmns:teststring": "hellothere",
"@_xlmns:testnumber": 10,
wow: 'test',
url: [{loc: 3},{loc: 3}]
}
});
console.log(xmlResult);
testXml = xmlResult;
});
tap.test('should parse an yml file', async () => {
const jsObject = testSmartxml.parseXmlToObject(testXml);
// console.log(JSON.stringify(jsObject, null, 2));
expect(typeof jsObject).toEqual('object');
expect(jsObject).arrayItem(1).property('hello').arrayItem(0).property('wow').arrayItem(0).property('#text').toEqual('test');
});

8
ts/00_commitinfo_data.ts Normal file
View File

@ -0,0 +1,8 @@
/**
* autocreated commitinfo by @push.rocks/commitinfo
*/
export const commitinfo = {
name: '@push.rocks/smartxml',
version: '1.1.1',
description: 'A package for creating and parsing XML formatted files.'
}

View File

@ -1,16 +1,30 @@
import * as plugins from './smartxml.plugins';
import * as plugins from './smartxml.plugins.js';
export class SmartXml {
constructor() {}
public create = plugins.xmlbuilder2.create;
public parseXmlToObject<T = any>(xmlStringArg: string): T {
const jsonObject = plugins.fastXmlParser.convertToJson(xmlStringArg);
return jsonObject;
const parser = new plugins.fastXmlParser.XMLParser({
preserveOrder: true,
ignoreAttributes: false,
parseTagValue: true,
parseAttributeValue: true,
// ignoreDeclaration: true
});
const jsonObject = parser.parse(xmlStringArg);
return jsonObject as T;
}
public createXmlFromObject(jsObject: any): string {
const jsToXmlParser = new plugins.fastXmlParser.j2xParser({});
const xml = jsToXmlParser.parse(jsObject);
return xml;
const builder = new plugins.fastXmlParser.XMLBuilder({
ignoreAttributes: false,
attributeNamePrefix: '@_',
format: true,
indentBy: ' '
});
const xml = builder.build(jsObject);
return '<?xml version="1.0" encoding="UTF-8"?>\n' + xml;
}
}

View File

@ -1,5 +1,7 @@
import * as fastXmlParser from 'fast-xml-parser';
import * as xmlbuilder2 from 'xmlbuilder2';
export {
fastXmlParser
fastXmlParser,
xmlbuilder2,
};

14
tsconfig.json Normal file
View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}

View File

@ -1,17 +0,0 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}