@projetoacbr/acbrlib-base-node 1.0.6 → 1.0.8
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/README.md +0 -0
- package/dist/src/ACBrBuffer/index.d.ts +0 -0
- package/dist/src/ACBrBuffer/index.js +0 -0
- package/dist/src/exception/ACBrLibResultCodes.d.ts +0 -0
- package/dist/src/exception/ACBrLibResultCodes.js +0 -0
- package/dist/src/exception/index.d.ts +0 -0
- package/dist/src/exception/index.js +0 -0
- package/dist/src/index.d.ts +0 -0
- package/dist/src/index.js +6 -3
- package/dist/src/utils/index.d.ts +0 -0
- package/dist/src/utils/index.js +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/dist/src/index.d.ts
CHANGED
|
File without changes
|
package/dist/src/index.js
CHANGED
|
@@ -114,6 +114,9 @@ class ACBrLibBaseMT {
|
|
|
114
114
|
return this.acbrlib;
|
|
115
115
|
}
|
|
116
116
|
getHandle() {
|
|
117
|
+
if (!this.#isInitialized()) {
|
|
118
|
+
throw new exception_1.ACBrLibLibNaoInicializadaError(`Biblioteca ${this.constructor.name} não inicializada. Chame o método inicializar antes de usar outros métodos.`);
|
|
119
|
+
}
|
|
117
120
|
return koffi.decode(this.handle, 'void *');
|
|
118
121
|
}
|
|
119
122
|
#isInitialized() {
|
|
@@ -378,11 +381,11 @@ class ACBrLibBaseMT {
|
|
|
378
381
|
if (!this._isResultErrorCode(result)) {
|
|
379
382
|
return;
|
|
380
383
|
}
|
|
381
|
-
let errorMessage = this
|
|
382
|
-
|
|
384
|
+
let errorMessage = this.#isInitialized()
|
|
385
|
+
? this.ultimoRetorno() : "Biblioteca não inicializada";
|
|
383
386
|
switch (result) {
|
|
384
387
|
case ACBrLibResultCodes_1.ACBrLibResultCodes.ErrLibNaoInicializada:
|
|
385
|
-
throw new exception_1.ACBrLibLibNaoInicializadaError("Erro ao inicializar " + this.
|
|
388
|
+
throw new exception_1.ACBrLibLibNaoInicializadaError("Erro ao inicializar " + this.constructor.name);
|
|
386
389
|
break;
|
|
387
390
|
case ACBrLibResultCodes_1.ACBrLibResultCodes.ErrLibNaoFinalizada:
|
|
388
391
|
throw new exception_1.ACBrLibLibNaoFinalizadaError("Erro ao finalizar a biblioteca");
|
|
File without changes
|
package/dist/src/utils/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@projetoacbr/acbrlib-base-node",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"build": "npx tsc",
|
|
13
|
-
"local-release": "npm run build &&
|
|
13
|
+
"local-release": "npm run build && npx yalc publish"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|