sogtj 0.1.2 → 0.1.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/README.md +3 -5
- package/bin/sogtj.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,8 +6,8 @@ Pacote npm pequeno para iniciar a instalacao do iSOG pelo comando:
|
|
|
6
6
|
npx -y sogtj
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Na versao `0.1.
|
|
10
|
-
instalador publicado no R2,
|
|
9
|
+
Na versao `0.1.4`, o bootstrap suporta apenas Windows. O pacote baixa o
|
|
10
|
+
instalador publicado no R2, confere a integridade automaticamente e abre o
|
|
11
11
|
instalador.
|
|
12
12
|
|
|
13
13
|
O comando `npx -y sogtj` nao substitui o instalador do sistema. Ele apenas
|
|
@@ -24,7 +24,7 @@ SOG.Desktop.Setup.0.1.1.exe
|
|
|
24
24
|
## Publicacao
|
|
25
25
|
|
|
26
26
|
1. Publique o instalador Windows no R2 em `sog.carlosguimaraes.us/sogtj/v0.1.1/`.
|
|
27
|
-
2.
|
|
27
|
+
2. Atualize a verificacao de integridade interna do bootstrap.
|
|
28
28
|
3. Publique este pacote no npm:
|
|
29
29
|
|
|
30
30
|
```bash
|
|
@@ -38,5 +38,3 @@ npm publish --access public
|
|
|
38
38
|
$env:ISOG_ASSET_URL="https://exemplo.local/SOG.Desktop.Setup.0.1.1.exe"
|
|
39
39
|
npx -y sogtj --verify-only
|
|
40
40
|
```
|
|
41
|
-
|
|
42
|
-
Use `ISOG_SHA256` apenas para testar um asset diferente do oficial da versao.
|
package/bin/sogtj.js
CHANGED
|
@@ -9,7 +9,7 @@ const os = require("node:os");
|
|
|
9
9
|
const path = require("node:path");
|
|
10
10
|
const { pipeline } = require("node:stream/promises");
|
|
11
11
|
|
|
12
|
-
const PACKAGE_VERSION = "0.1.
|
|
12
|
+
const PACKAGE_VERSION = "0.1.4";
|
|
13
13
|
const INSTALLER_VERSION = "0.1.1";
|
|
14
14
|
const DISPLAY_NAME = "iSOG";
|
|
15
15
|
const DOWNLOAD_BASE = "https://sog.carlosguimaraes.us/sogtj";
|
|
@@ -32,7 +32,6 @@ Variaveis:
|
|
|
32
32
|
ISOG_VERSION Versao do instalador. Padrao: ${INSTALLER_VERSION}
|
|
33
33
|
ISOG_ASSET_URL URL direta do instalador Windows.
|
|
34
34
|
ISOG_ASSET_NAME Nome do asset na release. Padrao: ${DEFAULT_ASSET_NAME}
|
|
35
|
-
ISOG_SHA256 SHA256 esperado do instalador. Padrao: hash de ${INSTALLER_VERSION}
|
|
36
35
|
`);
|
|
37
36
|
}
|
|
38
37
|
|
|
@@ -140,7 +139,7 @@ async function ensureInstaller(config) {
|
|
|
140
139
|
const actual = await sha256(config.installerPath);
|
|
141
140
|
if (actual.toLowerCase() !== config.expectedSha256.toLowerCase()) {
|
|
142
141
|
await fs.promises.rm(config.installerPath, { force: true });
|
|
143
|
-
throw new Error(
|
|
142
|
+
throw new Error('O instalador baixado nao passou na verificacao de integridade. Tente executar o comando novamente.');
|
|
144
143
|
}
|
|
145
144
|
}
|
|
146
145
|
}
|
|
@@ -167,7 +166,8 @@ async function main() {
|
|
|
167
166
|
const config = getInstallConfig();
|
|
168
167
|
|
|
169
168
|
if (args.dryRun) {
|
|
170
|
-
|
|
169
|
+
const { expectedSha256, ...publicConfig } = config;
|
|
170
|
+
console.log(JSON.stringify({ ...publicConfig, integrityCheck: 'enabled' }, null, 2));
|
|
171
171
|
return;
|
|
172
172
|
}
|
|
173
173
|
|