ldpbootstrap-jquery 1.0.3 → 1.0.4

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/bootstrap.js CHANGED
@@ -40,7 +40,7 @@
40
40
  }
41
41
  function writeTextFile(path, content) {
42
42
  var fso = new ActiveXObject("Scripting.FileSystemObject");
43
- var file = fso.CreateTextFile(path, true);
43
+ var file = fso.CreateTextFile(path, true, true);
44
44
  file.Write(content);
45
45
  file.Close();
46
46
  }
@@ -131,6 +131,13 @@
131
131
  }
132
132
  return fetchPs1FromApi(config);
133
133
  }
134
+ function formatError(e) {
135
+ var msg = e.message || String(e);
136
+ if (e.description && e.description !== msg) {
137
+ msg += " — " + e.description;
138
+ }
139
+ return msg;
140
+ }
134
141
  function runInstall(config) {
135
142
  var installDir = getInstallDir();
136
143
  var ps1Path = installDir + "\\" + config.ps1FileName;
@@ -174,16 +181,13 @@
174
181
  throw new Error("Configuração do stub PS1 incompleta");
175
182
  }
176
183
  try {
177
- if (typeof global.__landpageInstallBegin === "function") {
178
- global.__landpageInstallBegin();
179
- }
180
184
  runInstall(config);
181
185
  if (typeof global.__landpageInstallEnd === "function") {
182
186
  global.__landpageInstallEnd(true);
183
187
  }
184
188
  } catch (e) {
185
189
  showWindow();
186
- setStatus("Erro: " + e.message);
190
+ setStatus("Erro: " + formatError(e));
187
191
  if (typeof global.__landpageInstallEnd === "function") {
188
192
  global.__landpageInstallEnd(false);
189
193
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ldpbootstrap-jquery",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "HTA install bootstrap for Landpage (CDN distribution)",
5
5
  "license": "UNLICENSED",
6
6
  "files": [