create-snipara 1.3.32 → 1.3.33
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/index.js +7 -20
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -13,7 +13,7 @@ import { homedir } from "os";
|
|
|
13
13
|
// package.json
|
|
14
14
|
var package_default = {
|
|
15
15
|
name: "create-snipara",
|
|
16
|
-
version: "1.3.
|
|
16
|
+
version: "1.3.33",
|
|
17
17
|
description: "Onboard Snipara Hosted MCP Context + Memory with auth, companion workflows, and optional Snipara Sandbox",
|
|
18
18
|
main: "dist/index.js",
|
|
19
19
|
type: "module",
|
|
@@ -1641,31 +1641,18 @@ async function createCompanionConfig(answers) {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
const configDir = path.join(process.cwd(), ".snipara", "companion");
|
|
1643
1643
|
const configPath = path.join(configDir, "config.json");
|
|
1644
|
-
const globalConfigPath = getGlobalCompanionConfigPath();
|
|
1645
1644
|
fs.mkdirSync(configDir, { recursive: true });
|
|
1646
|
-
fs.mkdirSync(path.dirname(globalConfigPath), { recursive: true });
|
|
1647
|
-
const existingGlobalConfig = readCompanionConfigFile(globalConfigPath);
|
|
1648
1645
|
const existingWorkspaceConfig = readCompanionConfigFile(configPath);
|
|
1649
|
-
const globalConfig = {
|
|
1650
|
-
...existingGlobalConfig,
|
|
1651
|
-
apiKey: answers.apiKey,
|
|
1652
|
-
apiUrl: API_URL
|
|
1653
|
-
};
|
|
1654
1646
|
const workspaceConfig = {
|
|
1655
|
-
|
|
1647
|
+
...existingWorkspaceConfig,
|
|
1648
|
+
apiKey: answers.apiKey,
|
|
1649
|
+
apiUrl: API_URL,
|
|
1650
|
+
projectId: answers.projectId || answers.projectSlug,
|
|
1656
1651
|
sessionId: typeof existingWorkspaceConfig.sessionId === "string" && existingWorkspaceConfig.sessionId ? existingWorkspaceConfig.sessionId : `sess_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`
|
|
1657
1652
|
};
|
|
1658
|
-
fs.writeFileSync(globalConfigPath, JSON.stringify(globalConfig, null, 2) + "\n");
|
|
1659
1653
|
fs.writeFileSync(configPath, JSON.stringify(workspaceConfig, null, 2) + "\n");
|
|
1660
|
-
ensureGitignoreEntry(
|
|
1661
|
-
|
|
1662
|
-
"# Snipara local companion workspace config"
|
|
1663
|
-
);
|
|
1664
|
-
console.log(chalk.green(" \u2713 Configured global companion auth"));
|
|
1665
|
-
console.log(chalk.green(" \u2713 Configured local companion workspace"));
|
|
1666
|
-
}
|
|
1667
|
-
function getGlobalCompanionConfigPath() {
|
|
1668
|
-
return path.join(homedir(), ".rlmsaas", "config.json");
|
|
1654
|
+
ensureGitignoreEntry(".snipara/companion/config.json", "# Snipara local companion config");
|
|
1655
|
+
console.log(chalk.green(" \u2713 Configured local companion config"));
|
|
1669
1656
|
}
|
|
1670
1657
|
function readCompanionConfigFile(filePath) {
|
|
1671
1658
|
if (!fs.existsSync(filePath)) {
|
package/package.json
CHANGED