sf-compact-cli 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 +2 -2
- package/bin/sf-compact +1 -1
- package/install.js +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# sf-compact
|
|
2
2
|
|
|
3
|
-
Convert Salesforce metadata XML to AI-friendly compact formats. Semantically lossless roundtrip.
|
|
3
|
+
Convert Salesforce metadata XML to AI-friendly compact formats. Semantically lossless roundtrip for Salesforce metadata.
|
|
4
4
|
|
|
5
5
|
Salesforce metadata XML is extremely verbose — profiles, permission sets, flows, and objects can be 20,000–50,000+ lines of XML with 70–85% structural overhead. This burns tokens and money when AI tools (Claude Code, Codex, Cursor, etc.) read or edit your metadata.
|
|
6
6
|
|
|
@@ -236,7 +236,7 @@ sf-compact manifest
|
|
|
236
236
|
|
|
237
237
|
## Supported Metadata Types
|
|
238
238
|
|
|
239
|
-
|
|
239
|
+
76 file extensions mapping to Salesforce metadata types across 9 categories:
|
|
240
240
|
|
|
241
241
|
| Category | Types |
|
|
242
242
|
|----------|-------|
|
package/bin/sf-compact
CHANGED
|
@@ -5,7 +5,7 @@ const path = require("path");
|
|
|
5
5
|
const fs = require("fs");
|
|
6
6
|
|
|
7
7
|
const binDir = path.join(__dirname);
|
|
8
|
-
const binary = path.join(binDir, process.platform === "win32" ? "sf-compact.exe" : "sf-compact-bin");
|
|
8
|
+
const binary = path.join(binDir, process.platform === "win32" ? "sf-compact-bin.exe" : "sf-compact-bin");
|
|
9
9
|
|
|
10
10
|
if (!fs.existsSync(binary)) {
|
|
11
11
|
console.error("sf-compact binary not found. Try reinstalling: npm install -g sf-compact");
|
package/install.js
CHANGED
|
@@ -6,13 +6,14 @@ const path = require("path");
|
|
|
6
6
|
const https = require("https");
|
|
7
7
|
const http = require("http");
|
|
8
8
|
|
|
9
|
-
const VERSION = "0.1.
|
|
9
|
+
const VERSION = "0.1.4";
|
|
10
10
|
const REPO = "vradko/sf-compact";
|
|
11
11
|
|
|
12
12
|
const PLATFORMS = {
|
|
13
13
|
"darwin-arm64": `sf-compact-v${VERSION}-aarch64-apple-darwin.tar.gz`,
|
|
14
14
|
"darwin-x64": `sf-compact-v${VERSION}-x86_64-apple-darwin.tar.gz`,
|
|
15
15
|
"linux-x64": `sf-compact-v${VERSION}-x86_64-unknown-linux-musl.tar.gz`,
|
|
16
|
+
"win32-x64": `sf-compact-v${VERSION}-x86_64-pc-windows-msvc.zip`,
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
function getPlatformKey() {
|
|
@@ -49,8 +50,10 @@ async function main() {
|
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
const url = `https://github.com/${REPO}/releases/download/v${VERSION}/${filename}`;
|
|
53
|
+
const isWindows = process.platform === "win32";
|
|
52
54
|
const binDir = path.join(__dirname, "bin");
|
|
53
|
-
const
|
|
55
|
+
const binName = isWindows ? "sf-compact-bin.exe" : "sf-compact-bin";
|
|
56
|
+
const binPath = path.join(binDir, binName);
|
|
54
57
|
|
|
55
58
|
// Skip if already installed
|
|
56
59
|
if (fs.existsSync(binPath)) {
|
|
@@ -79,8 +82,9 @@ async function main() {
|
|
|
79
82
|
execSync(`unzip -o "${tmpFile}" -d "${tmpDir}"`, { stdio: "inherit" });
|
|
80
83
|
}
|
|
81
84
|
|
|
82
|
-
// Rename to sf-compact-bin to avoid collision with the JS wrapper
|
|
83
|
-
const
|
|
85
|
+
// Rename to sf-compact-bin (or .exe) to avoid collision with the JS wrapper
|
|
86
|
+
const extractedName = isWindows ? "sf-compact.exe" : "sf-compact";
|
|
87
|
+
const extracted = path.join(tmpDir, extractedName);
|
|
84
88
|
fs.renameSync(extracted, binPath);
|
|
85
89
|
fs.unlinkSync(tmpFile);
|
|
86
90
|
fs.rmSync(tmpDir, { recursive: true, force: true });
|