nfets 0.0.16 → 0.0.18
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/dist/chunk-5KI5OGAA.mjs +7 -0
- package/dist/chunk-I4KZJHBR.mjs +0 -0
- package/dist/chunk-PEB34YMB.mjs +259 -0
- package/dist/core/index.cjs +58 -58
- package/dist/core/index.d.cts +18 -355
- package/dist/core/index.d.ts +18 -355
- package/dist/core/index.mjs +1 -1
- package/dist/index.cjs +78 -78
- package/dist/index.d.cts +2 -64
- package/dist/index.d.ts +2 -64
- package/dist/index.mjs +1 -1
- package/dist/nfe/index.cjs +248 -11
- package/dist/nfe/index.d.cts +147 -201
- package/dist/nfe/index.d.ts +147 -201
- package/dist/nfe/index.mjs +1 -1
- package/dist/types-BVhE6D84.d.cts +405 -0
- package/dist/types-BVhE6D84.d.ts +405 -0
- package/package.json +4 -8
- package/dist/chunk-3WPW27WV.mjs +0 -24
- package/dist/chunk-H4DRLHOC.mjs +0 -238
- package/dist/chunk-MOAUKJKC.mjs +0 -7
- package/dist/either-CdHd_Yt7.d.cts +0 -20
- package/dist/either-CdHd_Yt7.d.ts +0 -20
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
import { X509Certificate, KeyObject } from 'node:crypto';
|
|
2
|
+
|
|
3
|
+
type DecimalRounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
|
|
4
|
+
type DecimalValue = string | number | bigint;
|
|
5
|
+
interface Decimal {
|
|
6
|
+
d: number[];
|
|
7
|
+
e: number;
|
|
8
|
+
s: number;
|
|
9
|
+
abs(): Decimal;
|
|
10
|
+
ceil(): Decimal;
|
|
11
|
+
comparedTo(n: DecimalValue | Decimal): number;
|
|
12
|
+
cmp(n: DecimalValue | Decimal): number;
|
|
13
|
+
decimalPlaces(): number;
|
|
14
|
+
dp(): number;
|
|
15
|
+
div(n: DecimalValue | Decimal): Decimal;
|
|
16
|
+
divToInt(n: DecimalValue | Decimal): Decimal;
|
|
17
|
+
equals(n: DecimalValue | Decimal): boolean;
|
|
18
|
+
floor(): Decimal;
|
|
19
|
+
greaterThan(n: DecimalValue | Decimal): boolean;
|
|
20
|
+
gt(n: DecimalValue | Decimal): boolean;
|
|
21
|
+
greaterThanOrEqualTo(n: DecimalValue | Decimal): boolean;
|
|
22
|
+
gte(n: DecimalValue | Decimal): boolean;
|
|
23
|
+
isFinite(): boolean;
|
|
24
|
+
isInteger(): boolean;
|
|
25
|
+
isInt(): boolean;
|
|
26
|
+
isNaN(): boolean;
|
|
27
|
+
isNegative(): boolean;
|
|
28
|
+
isPositive(): boolean;
|
|
29
|
+
isZero(): boolean;
|
|
30
|
+
lessThan(n: DecimalValue | Decimal): boolean;
|
|
31
|
+
lt(n: DecimalValue | Decimal): boolean;
|
|
32
|
+
lessThanOrEqualTo(n: DecimalValue | Decimal): boolean;
|
|
33
|
+
lte(n: DecimalValue | Decimal): boolean;
|
|
34
|
+
sub(n: DecimalValue | Decimal): Decimal;
|
|
35
|
+
mod(n: DecimalValue | Decimal): Decimal;
|
|
36
|
+
naturalExponential(): Decimal;
|
|
37
|
+
exp(): Decimal;
|
|
38
|
+
negated(): Decimal;
|
|
39
|
+
neg(): Decimal;
|
|
40
|
+
add(n: DecimalValue | Decimal): Decimal;
|
|
41
|
+
precision(includeZeros?: boolean): number;
|
|
42
|
+
sd(includeZeros?: boolean): number;
|
|
43
|
+
round(): Decimal;
|
|
44
|
+
sqrt(): Decimal;
|
|
45
|
+
times(n: DecimalValue | Decimal): Decimal;
|
|
46
|
+
mul(n: DecimalValue | Decimal): Decimal;
|
|
47
|
+
toExponential(decimalPlaces?: number, rounding?: DecimalRounding): string;
|
|
48
|
+
toExponential(decimalPlaces: number, rounding: DecimalRounding): string;
|
|
49
|
+
toFixed(decimalPlaces?: number, rounding?: DecimalRounding): string;
|
|
50
|
+
toFixed(decimalPlaces: number, rounding: DecimalRounding): string;
|
|
51
|
+
toFraction(max_denominator?: DecimalValue | Decimal): Decimal[];
|
|
52
|
+
toJSON(): string;
|
|
53
|
+
toNumber(): number;
|
|
54
|
+
pow(n: DecimalValue | Decimal): Decimal;
|
|
55
|
+
toPrecision(significantDigits?: number, rounding?: DecimalRounding): string;
|
|
56
|
+
toDecimalPlaces(decimalPlaces?: number, rounding?: DecimalRounding): Decimal;
|
|
57
|
+
toString(): string;
|
|
58
|
+
trunc(): Decimal;
|
|
59
|
+
valueOf(): string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface ReadCertificateRequest {
|
|
63
|
+
pfxPathOrBase64: string;
|
|
64
|
+
password: string;
|
|
65
|
+
}
|
|
66
|
+
interface ReadCertificateResponse {
|
|
67
|
+
password: string;
|
|
68
|
+
ca: X509Certificate[];
|
|
69
|
+
certificate: X509Certificate;
|
|
70
|
+
privateKey: KeyObject;
|
|
71
|
+
}
|
|
72
|
+
interface CertificateInfo {
|
|
73
|
+
CNPJ?: string;
|
|
74
|
+
CPF?: string;
|
|
75
|
+
O?: string;
|
|
76
|
+
C?: string;
|
|
77
|
+
ST?: string;
|
|
78
|
+
L?: string;
|
|
79
|
+
CN?: string;
|
|
80
|
+
OU?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
declare const SignatureNamespace: "http://www.w3.org/2000/09/xmldsig#";
|
|
84
|
+
declare const CanonicalizationMethod$1: "http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
|
|
85
|
+
declare enum SignatureMethod$1 {
|
|
86
|
+
RSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1",
|
|
87
|
+
RSA_SHA256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
|
|
88
|
+
}
|
|
89
|
+
declare enum SignatureAlgorithm {
|
|
90
|
+
SHA1 = "sha1",
|
|
91
|
+
SHA256 = "sha256"
|
|
92
|
+
}
|
|
93
|
+
declare enum DigestAlgorithm {
|
|
94
|
+
SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1",
|
|
95
|
+
SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256"
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
declare const StateCodes: {
|
|
99
|
+
readonly AC: "12";
|
|
100
|
+
readonly AL: "27";
|
|
101
|
+
readonly AM: "13";
|
|
102
|
+
readonly AP: "16";
|
|
103
|
+
readonly BA: "29";
|
|
104
|
+
readonly CE: "23";
|
|
105
|
+
readonly DF: "53";
|
|
106
|
+
readonly ES: "32";
|
|
107
|
+
readonly GO: "52";
|
|
108
|
+
readonly MA: "21";
|
|
109
|
+
readonly MG: "31";
|
|
110
|
+
readonly MS: "50";
|
|
111
|
+
readonly MT: "51";
|
|
112
|
+
readonly PA: "15";
|
|
113
|
+
readonly PB: "25";
|
|
114
|
+
readonly PE: "26";
|
|
115
|
+
readonly PI: "22";
|
|
116
|
+
readonly PR: "41";
|
|
117
|
+
readonly RJ: "33";
|
|
118
|
+
readonly RN: "24";
|
|
119
|
+
readonly RO: "11";
|
|
120
|
+
readonly RR: "14";
|
|
121
|
+
readonly RS: "43";
|
|
122
|
+
readonly SC: "42";
|
|
123
|
+
readonly SE: "28";
|
|
124
|
+
readonly SP: "35";
|
|
125
|
+
readonly TO: "17";
|
|
126
|
+
};
|
|
127
|
+
declare const StateAcronyms: StateAcronym[];
|
|
128
|
+
type StateCode = (typeof StateCodes)[keyof typeof StateCodes];
|
|
129
|
+
type StateAcronym = keyof typeof StateCodes;
|
|
130
|
+
|
|
131
|
+
declare const Environment: {
|
|
132
|
+
readonly Production: "1";
|
|
133
|
+
readonly Homolog: "2";
|
|
134
|
+
};
|
|
135
|
+
type EnvironmentCode = (typeof Environment)[keyof typeof Environment];
|
|
136
|
+
|
|
137
|
+
type Namespaced<T extends object = object> = T & {
|
|
138
|
+
$?: {
|
|
139
|
+
xmlns: string;
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
interface SignedInfo {
|
|
143
|
+
CanonicalizationMethod: CanonicalizationMethod;
|
|
144
|
+
SignatureMethod: SignatureMethod;
|
|
145
|
+
Reference: Reference;
|
|
146
|
+
}
|
|
147
|
+
interface CanonicalizationMethod {
|
|
148
|
+
$: {
|
|
149
|
+
Algorithm: 'http://www.w3.org/TR/2001/REC-xml-c14n-20010315';
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
interface SignatureMethod {
|
|
153
|
+
$: {
|
|
154
|
+
Algorithm: `${SignatureMethod$1}`;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
interface Reference {
|
|
158
|
+
Transforms: Transforms;
|
|
159
|
+
DigestMethod: DigestMethod;
|
|
160
|
+
DigestValue: string;
|
|
161
|
+
$: {
|
|
162
|
+
URI: string;
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
interface Transforms {
|
|
166
|
+
Transform: [
|
|
167
|
+
Transform<'http://www.w3.org/2000/09/xmldsig#enveloped-signature'>,
|
|
168
|
+
Transform<'http://www.w3.org/TR/2001/REC-xml-c14n-20010315'>
|
|
169
|
+
];
|
|
170
|
+
}
|
|
171
|
+
interface Transform<T extends string> {
|
|
172
|
+
$: {
|
|
173
|
+
Algorithm: T;
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
interface DigestMethod {
|
|
177
|
+
$: {
|
|
178
|
+
Algorithm: `${DigestAlgorithm}`;
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
interface KeyInfo {
|
|
182
|
+
X509Data: X509Data;
|
|
183
|
+
}
|
|
184
|
+
interface X509Data {
|
|
185
|
+
X509Certificate: string;
|
|
186
|
+
}
|
|
187
|
+
interface Signature {
|
|
188
|
+
$: {
|
|
189
|
+
xmlns: typeof SignatureNamespace;
|
|
190
|
+
};
|
|
191
|
+
SignedInfo: SignedInfo;
|
|
192
|
+
SignatureValue: string;
|
|
193
|
+
KeyInfo: KeyInfo;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
type HeaderValue = string | string[] | number | boolean | null;
|
|
197
|
+
type HttpClientHeaders = Record<string, HeaderValue>;
|
|
198
|
+
type ResponseType = 'arraybuffer' | 'json';
|
|
199
|
+
interface RequestConfig {
|
|
200
|
+
headers?: HttpClientHeaders;
|
|
201
|
+
responseType?: ResponseType;
|
|
202
|
+
}
|
|
203
|
+
interface HttpResponse<T = unknown> {
|
|
204
|
+
data: T;
|
|
205
|
+
status: number;
|
|
206
|
+
statusText: string;
|
|
207
|
+
headers: HttpClientHeaders;
|
|
208
|
+
}
|
|
209
|
+
interface HttpClient {
|
|
210
|
+
get<T = unknown, R = HttpResponse<T>>(url: string, config?: RequestConfig): Promise<R>;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
type Client = Record<string, (args: any, opt?: RequestConfig) => Promise<any>>;
|
|
214
|
+
type KnownKeys<T> = keyof {
|
|
215
|
+
[K in keyof T as {} extends Record<K, 1> ? never : K]: T[K];
|
|
216
|
+
};
|
|
217
|
+
type SendTransmissionPayload<C extends Client> = {
|
|
218
|
+
[M in KnownKeys<C> & string]: {
|
|
219
|
+
url: string;
|
|
220
|
+
method: M;
|
|
221
|
+
root: string;
|
|
222
|
+
xsd: string;
|
|
223
|
+
payload: Parameters<C[M]>[0];
|
|
224
|
+
};
|
|
225
|
+
}[KnownKeys<C> & string];
|
|
226
|
+
type ExtractReturnType<C extends Client, P extends SendTransmissionPayload<C>> = P extends {
|
|
227
|
+
method: infer M extends keyof C;
|
|
228
|
+
} ? Awaited<ReturnType<C[M]>> : never;
|
|
229
|
+
|
|
230
|
+
interface TransmitterOptions {
|
|
231
|
+
certificate?: ReadCertificateResponse;
|
|
232
|
+
}
|
|
233
|
+
interface Transmitter<C extends Client> {
|
|
234
|
+
configure(options: TransmitterOptions): Transmitter<C>;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
declare const defaultCanonicalizeOptions: CanonicalizeOptions;
|
|
238
|
+
interface CanonicalizeOptions {
|
|
239
|
+
includeComments: boolean;
|
|
240
|
+
exclusive: boolean;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
declare const defaultBuilderOptions: BuilderOptions;
|
|
244
|
+
interface XmlDeclarationAttributes {
|
|
245
|
+
version: string;
|
|
246
|
+
encoding?: string | undefined;
|
|
247
|
+
standalone?: boolean | undefined;
|
|
248
|
+
}
|
|
249
|
+
interface RenderOptions {
|
|
250
|
+
pretty?: boolean | undefined;
|
|
251
|
+
indent?: string | undefined;
|
|
252
|
+
newline?: string | undefined;
|
|
253
|
+
}
|
|
254
|
+
interface BuilderOptions {
|
|
255
|
+
attrkey?: string | undefined;
|
|
256
|
+
charkey?: string | undefined;
|
|
257
|
+
rootName?: string | undefined;
|
|
258
|
+
renderOpts?: RenderOptions | undefined;
|
|
259
|
+
xmldec?: XmlDeclarationAttributes | undefined;
|
|
260
|
+
doctype?: 'xml';
|
|
261
|
+
headless?: boolean | undefined;
|
|
262
|
+
allowSurrogateChars?: boolean | undefined;
|
|
263
|
+
cdata?: boolean | undefined;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
declare const defaultParserOptions: ParserOptions;
|
|
267
|
+
interface ParserOptions {
|
|
268
|
+
trim?: boolean;
|
|
269
|
+
normalizeTags?: boolean;
|
|
270
|
+
normalize?: boolean;
|
|
271
|
+
explicitRoot?: boolean;
|
|
272
|
+
xmlns?: boolean;
|
|
273
|
+
explicitArray?: boolean;
|
|
274
|
+
preserveChildrenOrder?: boolean;
|
|
275
|
+
strict?: boolean;
|
|
276
|
+
chunkSize?: number;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
declare class NFeTsError extends Error {
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
type Either<L, R> = Left<L> | Right<R>;
|
|
283
|
+
declare class Left<L> {
|
|
284
|
+
readonly value: L;
|
|
285
|
+
constructor(value: L);
|
|
286
|
+
isLeft(): this is Left<L>;
|
|
287
|
+
isRight(): this is never;
|
|
288
|
+
}
|
|
289
|
+
declare class Right<R> {
|
|
290
|
+
readonly value: R;
|
|
291
|
+
constructor(value: R);
|
|
292
|
+
isLeft(): this is never;
|
|
293
|
+
isRight(): this is Right<R>;
|
|
294
|
+
}
|
|
295
|
+
declare const left: <L = never>(l: L) => Left<L>;
|
|
296
|
+
declare const right: <R = never>(a?: R) => Right<R>;
|
|
297
|
+
|
|
298
|
+
interface XmlToolkit {
|
|
299
|
+
parse<T>(xml: string, options?: ParserOptions): Promise<T>;
|
|
300
|
+
build(object: object, options?: BuilderOptions): Promise<string>;
|
|
301
|
+
validate(xml: string, xsd: string): Promise<Either<NFeTsError, void>>;
|
|
302
|
+
canonicalize(xml: string, options?: CanonicalizeOptions): string;
|
|
303
|
+
digest(xml: string, algorithm: SignatureAlgorithm, options?: CanonicalizeOptions): string;
|
|
304
|
+
getNode(xml: string, tag: string): string | null;
|
|
305
|
+
getFirstNode(xml: string): string | null;
|
|
306
|
+
getAttribute(xml: string, tag: string): string | null;
|
|
307
|
+
appendNode(xml: string, node: string): string;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
interface CacheAdapter {
|
|
311
|
+
get<T>(key: string): Promise<T | null>;
|
|
312
|
+
has(key: string): Promise<boolean>;
|
|
313
|
+
set(key: string, value: unknown): Promise<boolean>;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
interface CertificateRepository {
|
|
317
|
+
read(request: ReadCertificateRequest): Promise<Either<NFeTsError, ReadCertificateResponse>>;
|
|
318
|
+
sign(content: string, privateKey: KeyObject, algorithm: SignatureAlgorithm): Promise<Either<NFeTsError, string>>;
|
|
319
|
+
getStringCertificate(certificate: X509Certificate): string;
|
|
320
|
+
getStringPrivateKey(privateKey: KeyObject): string;
|
|
321
|
+
getCertificateInfo(certificate: X509Certificate): CertificateInfo;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
interface RemoteTransmissionRepository<C extends Client> {
|
|
325
|
+
setCertificate(certificate: ReadCertificateResponse): RemoteTransmissionRepository<C>;
|
|
326
|
+
send<P extends SendTransmissionPayload<C>>(params: P): Promise<Either<NFeTsError, ExtractReturnType<C, P>>>;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
interface SignerOptions<T = string> {
|
|
330
|
+
tag: T;
|
|
331
|
+
mark: string;
|
|
332
|
+
}
|
|
333
|
+
type SignedEntity<T extends object> = T & {
|
|
334
|
+
Signature: Signature;
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
declare abstract class Signer {
|
|
338
|
+
protected readonly toolkit: XmlToolkit;
|
|
339
|
+
protected readonly certificateRepository: CertificateRepository;
|
|
340
|
+
protected readonly algorithm: SignatureAlgorithm;
|
|
341
|
+
protected readonly canonical: CanonicalizeOptions;
|
|
342
|
+
constructor(toolkit: XmlToolkit, certificateRepository: CertificateRepository, algorithm?: SignatureAlgorithm, canonical?: CanonicalizeOptions);
|
|
343
|
+
protected assemble(SignedInfo: SignedInfo, SignatureValue: string, certificate: X509Certificate): {
|
|
344
|
+
$: {
|
|
345
|
+
xmlns: "http://www.w3.org/2000/09/xmldsig#";
|
|
346
|
+
};
|
|
347
|
+
SignedInfo: SignedInfo;
|
|
348
|
+
SignatureValue: string;
|
|
349
|
+
KeyInfo: {
|
|
350
|
+
X509Data: {
|
|
351
|
+
X509Certificate: string;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
protected signedInfo(node: string, mark: string): {
|
|
356
|
+
CanonicalizationMethod: {
|
|
357
|
+
$: {
|
|
358
|
+
Algorithm: "http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
|
|
359
|
+
};
|
|
360
|
+
};
|
|
361
|
+
SignatureMethod: {
|
|
362
|
+
$: {
|
|
363
|
+
Algorithm: SignatureMethod$1;
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
Reference: {
|
|
367
|
+
$: {
|
|
368
|
+
URI: string;
|
|
369
|
+
};
|
|
370
|
+
Transforms: {
|
|
371
|
+
Transform: [{
|
|
372
|
+
$: {
|
|
373
|
+
Algorithm: "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
|
|
374
|
+
};
|
|
375
|
+
}, {
|
|
376
|
+
$: {
|
|
377
|
+
Algorithm: "http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
|
|
378
|
+
};
|
|
379
|
+
}];
|
|
380
|
+
};
|
|
381
|
+
DigestMethod: {
|
|
382
|
+
$: {
|
|
383
|
+
Algorithm: DigestAlgorithm;
|
|
384
|
+
};
|
|
385
|
+
};
|
|
386
|
+
DigestValue: string;
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
private digest;
|
|
390
|
+
protected signOrLeft(signedInfo: SignedInfo, privateKey: KeyObject): Promise<Either<NFeTsError, string>>;
|
|
391
|
+
private get transforms();
|
|
392
|
+
private get digestAlgorithm();
|
|
393
|
+
private get signatureMethod();
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
declare class EntitySigner extends Signer {
|
|
397
|
+
sign<T extends object, K extends keyof T = keyof T>(content: T, options: SignerOptions<K>, cert: ReadCertificateResponse): Promise<Either<NFeTsError, SignedEntity<T>>>;
|
|
398
|
+
private ns;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
type DeepPartial<T> = {
|
|
402
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
export { type DeepPartial as $, type HttpClientHeaders as A, type BuilderOptions as B, type CertificateInfo as C, type DecimalValue as D, Environment as E, type ResponseType as F, type RequestConfig as G, type HeaderValue as H, type HttpResponse as I, type HttpClient as J, type KnownKeys as K, type RemoteTransmissionRepository as L, type SignerOptions as M, type Namespaced as N, type SignedEntity as O, type ParserOptions as P, Signer as Q, type ReadCertificateRequest as R, SignatureNamespace as S, type Transforms as T, EntitySigner as U, type Either as V, Left as W, type XmlDeclarationAttributes as X, Right as Y, left as Z, right as _, type ReadCertificateResponse as a, type Decimal as a0, CanonicalizationMethod$1 as b, SignatureMethod$1 as c, SignatureAlgorithm as d, DigestAlgorithm as e, StateCodes as f, StateAcronyms as g, type StateCode as h, type StateAcronym as i, type EnvironmentCode as j, type SignedInfo as k, type Signature as l, type Client as m, type SendTransmissionPayload as n, type ExtractReturnType as o, type TransmitterOptions as p, type Transmitter as q, defaultCanonicalizeOptions as r, type CanonicalizeOptions as s, defaultBuilderOptions as t, type RenderOptions as u, defaultParserOptions as v, type XmlToolkit as w, NFeTsError as x, type CacheAdapter as y, type CertificateRepository as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nfets",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"description": "typescript libraries for Brazilian's SEFAZ standards",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
@@ -57,9 +57,7 @@
|
|
|
57
57
|
"dotenv": "^17.2.2",
|
|
58
58
|
"pdfkit": "^0.17.2",
|
|
59
59
|
"reflect-metadata": "^0.2.2",
|
|
60
|
-
"rimraf": "^6.0.1"
|
|
61
|
-
"@nfets/core": "0.0.1",
|
|
62
|
-
"@nfets/nfe": "0.0.1"
|
|
60
|
+
"rimraf": "^6.0.1"
|
|
63
61
|
},
|
|
64
62
|
"devDependencies": {
|
|
65
63
|
"@eslint/js": "^9.18.0",
|
|
@@ -75,7 +73,7 @@
|
|
|
75
73
|
"fs-extra": "^11.3.0",
|
|
76
74
|
"globals": "^16.0.0",
|
|
77
75
|
"jest": "^30.2.0",
|
|
78
|
-
"node-gyp": "^
|
|
76
|
+
"node-gyp": "^12.1.0",
|
|
79
77
|
"pdf-parse": "^2.4.5",
|
|
80
78
|
"ts-jest": "^29.2.5",
|
|
81
79
|
"ts-node": "^10.9.2",
|
|
@@ -88,9 +86,7 @@
|
|
|
88
86
|
"typescript": "^5.0.0"
|
|
89
87
|
},
|
|
90
88
|
"scripts": {
|
|
91
|
-
"
|
|
92
|
-
"build:nfets": "tsup --config tsup.config.ts",
|
|
93
|
-
"build": "pnpm --filter @nfets/core build && pnpm --filter !@nfets/core build",
|
|
89
|
+
"build": "node-gyp rebuild && pnpm --filter !@nfets/test build && tsup --config tsup.config.ts",
|
|
94
90
|
"test": "pnpm --filter @nfets/* test",
|
|
95
91
|
"typecheck": "pnpm --filter @nfets/* typecheck",
|
|
96
92
|
"test:coverage": "pnpm --filter @nfets/* test:coverage --coverageReporters=\"json-summary\""
|