sarangai-cli 1.0.0 → 1.0.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.
Files changed (2) hide show
  1. package/dist/index.cjs +9 -8
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -35,23 +35,24 @@ var import_path2 = __toESM(require("path"));
35
35
  var import_fs = __toESM(require("fs"));
36
36
  var import_path = __toESM(require("path"));
37
37
  var import_os = __toESM(require("os"));
38
- var CONFIG_PATH = import_path.default.join(import_os.default.homedir(), ".sarangairc");
38
+ var CONFIG_FILE = import_path.default.join(import_os.default.homedir(), ".sarangairc");
39
39
  function getConfig() {
40
40
  try {
41
- if (import_fs.default.existsSync(CONFIG_PATH)) {
42
- return JSON.parse(import_fs.default.readFileSync(CONFIG_PATH, "utf-8"));
41
+ if (import_fs.default.existsSync(CONFIG_FILE)) {
42
+ const raw = import_fs.default.readFileSync(CONFIG_FILE, "utf-8");
43
+ return JSON.parse(raw);
43
44
  }
44
45
  } catch {
45
46
  }
46
47
  return {
47
- baseUrl: "https://panel.idshop.or.id",
48
- defaultModel: "openai/gpt-5-pro"
48
+ baseUrl: "https://idshop.or.id",
49
+ defaultModel: "minimax/minimax-m2.7"
49
50
  };
50
51
  }
51
- function saveConfig(cfg) {
52
+ function saveConfig(newConfig) {
52
53
  const current = getConfig();
53
- const next = { ...current, ...cfg };
54
- import_fs.default.writeFileSync(CONFIG_PATH, JSON.stringify(next, null, 2), "utf-8");
54
+ const merged = { ...current, ...newConfig };
55
+ import_fs.default.writeFileSync(CONFIG_FILE, JSON.stringify(merged, null, 2), "utf-8");
55
56
  }
56
57
 
57
58
  // src/index.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sarangai-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "CLI resmi SarangAI — Gateway multi-model AI langsung dari terminal Anda",
5
5
  "main": "dist/index.cjs",
6
6
  "bin": {