@igness/blaze 0.3.2

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/LICENSE ADDED
@@ -0,0 +1,10 @@
1
+ Copyright (c) 2026 Igness AI / Takuma Ogura. All rights reserved.
2
+
3
+ Blaze CLI is proprietary software. Redistribution, modification, and reverse
4
+ engineering of the binary are prohibited without prior written permission from
5
+ the copyright holder. This npm package is a thin installer that downloads the
6
+ official binary from https://github.com/igness-ai/blaze-cli/releases for the
7
+ end user's personal or organizational use.
8
+
9
+ For commercial licensing or redistribution inquiries, contact
10
+ <ogura@igness.ai>.
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # @igness/blaze
2
+
3
+ Blaze CLI — Salesforce AI DevOps Agent.
4
+
5
+ A Claude Code-like interactive TUI for Salesforce development, written in Rust.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install -g @igness/blaze
11
+ ```
12
+
13
+ `postinstall` downloads the platform-specific binary from
14
+ [GitHub Releases](https://github.com/igness-ai/blaze-cli/releases) and places it
15
+ under the package's `bin/` directory. Integrity is verified via SHA-256.
16
+
17
+ ### Supported platforms
18
+
19
+ | OS | Arch |
20
+ |----|------|
21
+ | macOS | Apple Silicon (arm64) |
22
+ | Windows | x64 |
23
+
24
+ Other platforms: use the curl/iwr installer documented at
25
+ <https://github.com/igness-ai/blaze-cli>.
26
+
27
+ ### Skipping the download
28
+
29
+ Set `BLAZE_SKIP_INSTALL=1` to skip the postinstall step (useful in CI / Docker
30
+ build cache). The wrapper will then refuse to run until the binary is provided.
31
+
32
+ ## Usage
33
+
34
+ ```sh
35
+ blaze # launch the TUI
36
+ blaze login # authenticate
37
+ blaze "your task" # one-shot mode
38
+ ```
39
+
40
+ See <https://github.com/igness-ai/blaze-cli> for full documentation.
41
+
42
+ ## License
43
+
44
+ Proprietary. See [LICENSE](./LICENSE).
package/bin/blaze.js ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ // blaze npm wrapper bin entry — spawn the actual blaze binary that
3
+ // install.js placed in this same directory.
4
+
5
+ 'use strict';
6
+
7
+ const path = require('node:path');
8
+ const fs = require('node:fs');
9
+ const { spawnSync } = require('node:child_process');
10
+
11
+ const exe = process.platform === 'win32' ? '.exe' : '';
12
+ const binPath = path.join(__dirname, `blaze${exe}`);
13
+
14
+ if (!fs.existsSync(binPath)) {
15
+ console.error(
16
+ `[blaze] binary not found at ${binPath}. Re-run \`npm install -g @igness/blaze\` ` +
17
+ `or set BLAZE_SKIP_INSTALL=0.`
18
+ );
19
+ process.exit(1);
20
+ }
21
+
22
+ const result = spawnSync(binPath, process.argv.slice(2), { stdio: 'inherit' });
23
+ if (result.error) {
24
+ console.error(`[blaze] failed to spawn binary: ${result.error.message}`);
25
+ process.exit(1);
26
+ }
27
+ process.exit(result.status ?? 1);
package/install.js ADDED
@@ -0,0 +1,122 @@
1
+ #!/usr/bin/env node
2
+ // blaze npm postinstall — fetch the OS/arch-specific binary from GitHub
3
+ // Releases (igness-ai/blaze-cli, public) and place it under bin/.
4
+ //
5
+ // Skip with: BLAZE_SKIP_INSTALL=1 (useful in CI / Docker build cache).
6
+
7
+ 'use strict';
8
+
9
+ const fs = require('node:fs');
10
+ const os = require('node:os');
11
+ const path = require('node:path');
12
+ const https = require('node:https');
13
+ const crypto = require('node:crypto');
14
+ const { execFileSync } = require('node:child_process');
15
+
16
+ if (process.env.BLAZE_SKIP_INSTALL === '1') {
17
+ console.log('[blaze] BLAZE_SKIP_INSTALL=1, skipping binary download');
18
+ process.exit(0);
19
+ }
20
+
21
+ const REPO_OWNER = 'igness-ai';
22
+ const REPO_NAME = 'blaze-cli';
23
+ const PKG_VERSION = require('./package.json').version;
24
+ const TAG = `v${PKG_VERSION}`;
25
+ const BIN_DIR = path.join(__dirname, 'bin');
26
+
27
+ function detectTarget() {
28
+ const platform = process.platform;
29
+ const arch = process.arch;
30
+ // sfhistory と揃え、Apple Silicon Mac + Windows x64 をサポート。
31
+ // Intel Mac / Linux / Windows ARM は build target 自体は存在するが、
32
+ // 当面 npm では未対応 (curl installer / Standalone path で対応)。
33
+ if (platform === 'darwin' && arch === 'arm64') {
34
+ return { target: 'aarch64-apple-darwin', archive: 'tar.gz', exe: '' };
35
+ }
36
+ if (platform === 'win32' && arch === 'x64') {
37
+ return { target: 'x86_64-pc-windows-msvc', archive: 'zip', exe: '.exe' };
38
+ }
39
+ console.error(`[blaze] unsupported platform: ${platform}-${arch}`);
40
+ console.error('[blaze] npm install supports: darwin-arm64 (Apple Silicon Mac), win32-x64 (Windows x64)');
41
+ console.error('[blaze] Other platforms: see https://github.com/igness-ai/blaze-cli for the curl/iwr installer');
42
+ process.exit(1);
43
+ }
44
+
45
+ function download(url, destPath) {
46
+ return new Promise((resolve, reject) => {
47
+ function followRedirect(currentUrl, redirectsLeft) {
48
+ if (redirectsLeft <= 0) {
49
+ reject(new Error('too many redirects'));
50
+ return;
51
+ }
52
+ const req = https.get(
53
+ currentUrl,
54
+ { headers: { 'User-Agent': 'blaze-npm-installer', Accept: 'application/octet-stream' } },
55
+ (res) => {
56
+ if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
57
+ followRedirect(res.headers.location, redirectsLeft - 1);
58
+ return;
59
+ }
60
+ if (res.statusCode !== 200) {
61
+ reject(new Error(`download failed (HTTP ${res.statusCode}): ${currentUrl}`));
62
+ return;
63
+ }
64
+ const file = fs.createWriteStream(destPath);
65
+ res.pipe(file);
66
+ file.on('finish', () => file.close(() => resolve()));
67
+ file.on('error', reject);
68
+ }
69
+ );
70
+ req.on('error', reject);
71
+ req.setTimeout(60_000, () => req.destroy(new Error('download timeout (60s)')));
72
+ }
73
+ followRedirect(url, 5);
74
+ });
75
+ }
76
+
77
+ function sha256File(filePath) {
78
+ const hash = crypto.createHash('sha256');
79
+ hash.update(fs.readFileSync(filePath));
80
+ return hash.digest('hex');
81
+ }
82
+
83
+ async function main() {
84
+ const { target, archive, exe } = detectTarget();
85
+ const archiveName = `blaze-${TAG}-${target}.${archive}`;
86
+ const archiveUrl = `https://github.com/${REPO_OWNER}/${REPO_NAME}/releases/download/${TAG}/${archiveName}`;
87
+ const checksumUrl = `${archiveUrl}.sha256`;
88
+
89
+ fs.mkdirSync(BIN_DIR, { recursive: true });
90
+ const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'blaze-install-'));
91
+ const archivePath = path.join(tmpDir, archiveName);
92
+ const checksumPath = `${archivePath}.sha256`;
93
+
94
+ try {
95
+ console.log(`[blaze] downloading ${archiveName} (blaze ${TAG} for ${target})...`);
96
+ await download(archiveUrl, archivePath);
97
+ await download(checksumUrl, checksumPath);
98
+
99
+ const expected = fs.readFileSync(checksumPath, 'utf8').trim().split(/\s+/)[0].toLowerCase();
100
+ const actual = sha256File(archivePath);
101
+ if (expected !== actual) {
102
+ throw new Error(`checksum mismatch\n expected: ${expected}\n actual: ${actual}`);
103
+ }
104
+
105
+ // tar コマンドは Win10 1803+ / macOS / Linux に標準同梱。tar.gz / zip 両対応。
106
+ execFileSync('tar', ['xf', archivePath, '-C', tmpDir], { stdio: 'inherit' });
107
+
108
+ const binSrc = path.join(tmpDir, `blaze${exe}`);
109
+ const binDest = path.join(BIN_DIR, `blaze${exe}`);
110
+ fs.copyFileSync(binSrc, binDest);
111
+ fs.chmodSync(binDest, 0o755);
112
+
113
+ console.log(`[blaze] installed binary at ${binDest}`);
114
+ } finally {
115
+ fs.rmSync(tmpDir, { recursive: true, force: true });
116
+ }
117
+ }
118
+
119
+ main().catch((err) => {
120
+ console.error(`[blaze] install failed: ${err.message}`);
121
+ process.exit(1);
122
+ });
package/package.json ADDED
@@ -0,0 +1,46 @@
1
+ {
2
+ "name": "@igness/blaze",
3
+ "version": "0.3.2",
4
+ "description": "Blaze CLI — Salesforce AI DevOps Agent",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "author": "Takuma Ogura <ogura@igness.ai>",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/igness-ai/blaze-cli.git"
10
+ },
11
+ "homepage": "https://github.com/igness-ai/blaze-cli",
12
+ "bugs": {
13
+ "url": "https://github.com/igness-ai/blaze-cli/issues"
14
+ },
15
+ "bin": {
16
+ "blaze": "bin/blaze.js"
17
+ },
18
+ "scripts": {
19
+ "postinstall": "node install.js"
20
+ },
21
+ "files": [
22
+ "bin/",
23
+ "install.js",
24
+ "LICENSE",
25
+ "README.md"
26
+ ],
27
+ "engines": {
28
+ "node": ">=18"
29
+ },
30
+ "os": [
31
+ "darwin",
32
+ "win32"
33
+ ],
34
+ "cpu": [
35
+ "x64",
36
+ "arm64"
37
+ ],
38
+ "keywords": [
39
+ "salesforce",
40
+ "ai",
41
+ "cli",
42
+ "devops",
43
+ "agent",
44
+ "sfdx"
45
+ ]
46
+ }