@projetoacbr/acbrlib-base-node 1.0.6 → 1.0.7

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 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() {
@@ -235,6 +238,9 @@ class ACBrLibBaseMT {
235
238
  ultimoRetorno() {
236
239
  const env_3 = { stack: [], error: void 0, hasError: false };
237
240
  try {
241
+ if (!this.#isInitialized()) {
242
+ return "";
243
+ }
238
244
  const acbrBuffer = __addDisposableResource(env_3, new ACBrBuffer_2.default(ACBrBuffer_1.TAMANHO_PADRAO), false);
239
245
  this.LIB_UltimoRetorno(this.getHandle(), acbrBuffer.getBuffer(), acbrBuffer.getRefTamanhoBuffer());
240
246
  return this._processaResult(acbrBuffer);
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.7",
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",