@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 CHANGED
File without changes
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.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.ultimoRetorno();
382
- console.log("Checking result: ", result, " Error message: ", errorMessage);
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.nome);
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
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@projetoacbr/acbrlib-base-node",
3
- "version": "1.0.6",
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 && npm link"
13
+ "local-release": "npm run build && npx yalc publish"
14
14
  },
15
15
  "repository": {
16
16
  "type": "git",