nfets 0.0.2 → 0.0.10
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/LICENSE +21 -0
- package/build/Release/xml_validator.node +0 -0
- package/dist/chunk-Z2TLKKAE.mjs +2 -0
- package/dist/index.cjs +261 -0
- package/dist/index.d.cts +681 -0
- package/dist/index.d.ts +681 -0
- package/dist/index.mjs +259 -0
- package/dist/src-QBEIGHGM.mjs +8 -0
- package/package.json +61 -18
- package/README.md +0 -0
- package/dist/core/src/index.js +0 -28
- package/dist/nfe/src/index.js +0 -9
package/package.json
CHANGED
|
@@ -1,41 +1,84 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nfets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "typescript libraries for Brazilian's SEFAZ standards",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"pnpm": ">=9",
|
|
17
|
+
"node": ">=22",
|
|
18
|
+
"yarn": "use pnpm!",
|
|
19
|
+
"npm": "use pnpm!"
|
|
20
|
+
},
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/nfets/nfets.git"
|
|
12
25
|
},
|
|
13
|
-
"license": "ISC",
|
|
14
|
-
"workspaces": [
|
|
15
|
-
"packages/*"
|
|
16
|
-
],
|
|
17
26
|
"files": [
|
|
18
|
-
"dist"
|
|
27
|
+
"dist",
|
|
28
|
+
"build/Release/xml_validator.node"
|
|
19
29
|
],
|
|
20
30
|
"publishConfig": {
|
|
21
31
|
"access": "public"
|
|
22
32
|
},
|
|
33
|
+
"keywords": [
|
|
34
|
+
"sefaz",
|
|
35
|
+
"nfse",
|
|
36
|
+
"nfs-e",
|
|
37
|
+
"nfe",
|
|
38
|
+
"nf-e",
|
|
39
|
+
"nfce",
|
|
40
|
+
"nfc-e"
|
|
41
|
+
],
|
|
23
42
|
"dependencies": {
|
|
24
|
-
"
|
|
43
|
+
"class-transformer": "^0.5.1",
|
|
44
|
+
"class-validator": "^0.14.1",
|
|
45
|
+
"dayjs": "^1.11.18",
|
|
46
|
+
"dotenv": "^17.2.2",
|
|
47
|
+
"reflect-metadata": "^0.2.2",
|
|
48
|
+
"rimraf": "^6.0.1",
|
|
49
|
+
"@nfets/core": "0.0.1",
|
|
50
|
+
"@nfets/nfe": "0.0.1"
|
|
25
51
|
},
|
|
26
52
|
"devDependencies": {
|
|
27
53
|
"@eslint/js": "^9.18.0",
|
|
28
|
-
"@
|
|
29
|
-
"@types/
|
|
30
|
-
"@types/
|
|
54
|
+
"@swc/core": "^1.15.0",
|
|
55
|
+
"@types/fs-extra": "^11.0.4",
|
|
56
|
+
"@types/jest": "^30.0.0",
|
|
57
|
+
"@types/node": "^24.5.2",
|
|
31
58
|
"@typescript-eslint/parser": "^8.21.0",
|
|
59
|
+
"axios": "^1.7.9",
|
|
60
|
+
"eslint": "^9.19.0",
|
|
32
61
|
"eslint-plugin-prettier": "^5.2.3",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
62
|
+
"fs-extra": "^11.3.0",
|
|
63
|
+
"globals": "^16.0.0",
|
|
64
|
+
"jest": "^30.2.0",
|
|
65
|
+
"node-gyp": "^11.1.0",
|
|
66
|
+
"ts-jest": "^29.2.5",
|
|
67
|
+
"ts-node": "^10.9.2",
|
|
35
68
|
"tsc-alias": "^1.8.10",
|
|
69
|
+
"tsup": "^8.5.0",
|
|
70
|
+
"tsx": "^4.19.2",
|
|
36
71
|
"typescript-eslint": "^8.21.0"
|
|
37
72
|
},
|
|
38
73
|
"peerDependencies": {
|
|
39
74
|
"typescript": "^5.0.0"
|
|
75
|
+
},
|
|
76
|
+
"scripts": {
|
|
77
|
+
"install": "node-gyp rebuild && make build",
|
|
78
|
+
"build:nfets": "tsup --config tsup.config.ts",
|
|
79
|
+
"build": "pnpm --filter @nfets/core build && pnpm --filter !@nfets/core build",
|
|
80
|
+
"test": "pnpm --filter @nfets/* test",
|
|
81
|
+
"typecheck": "pnpm --filter @nfets/* typecheck",
|
|
82
|
+
"test:coverage": "pnpm --filter @nfets/* test:coverage --coverageReporters=\"json-summary\""
|
|
40
83
|
}
|
|
41
|
-
}
|
|
84
|
+
}
|
package/README.md
DELETED
|
File without changes
|
package/dist/core/src/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// packages/core/src/infrastructure/decimaljs.ts
|
|
2
|
-
import { Decimal as DecimalJs } from "decimal.js";
|
|
3
|
-
|
|
4
|
-
class Decimal extends DecimalJs {
|
|
5
|
-
}
|
|
6
|
-
// packages/core/src/infrastructure/xml2js-builder.ts
|
|
7
|
-
import * as Xml2js from "xml2js";
|
|
8
|
-
import {
|
|
9
|
-
defaultParserOptions
|
|
10
|
-
} from "src/domain/entities/xml-builder";
|
|
11
|
-
|
|
12
|
-
class Xml2JsBuilder {
|
|
13
|
-
xml2js;
|
|
14
|
-
constructor(xml2js = Xml2js) {
|
|
15
|
-
this.xml2js = xml2js;
|
|
16
|
-
}
|
|
17
|
-
parse(xml, options) {
|
|
18
|
-
options ??= defaultParserOptions;
|
|
19
|
-
return new Promise((resolve, reject) => new this.xml2js.Parser(options).parseString(xml, (err, result) => err ? reject(err) : resolve(result)));
|
|
20
|
-
}
|
|
21
|
-
build(object, options) {
|
|
22
|
-
return Promise.resolve(new this.xml2js.Builder(options).buildObject(object));
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
Xml2JsBuilder,
|
|
27
|
-
Decimal
|
|
28
|
-
};
|