create-snipara 1.3.23 → 1.3.25
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 +21 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
|
-
import { Command } from "commander";
|
|
4
|
+
import { Command, Option } from "commander";
|
|
5
5
|
import prompts from "prompts";
|
|
6
6
|
import chalk from "chalk";
|
|
7
7
|
import ora from "ora";
|
|
@@ -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.25",
|
|
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",
|
|
@@ -170,7 +170,7 @@ function buildProgram() {
|
|
|
170
170
|
program.command("init").description("Install and configure Snipara for this project").option("--api-key <key>", "Snipara API key").option("--slug <slug>", "Project slug").option("--project-id <id>", "Project ID").option("--advanced", "Show advanced profile, project id, hooks, GitHub, and sandbox prompts").option(
|
|
171
171
|
"--profile <profile>",
|
|
172
172
|
"Install profile: hosted-only, hosted-companion, full-stack, runtime-only"
|
|
173
|
-
).option("--skip-companion", "Skip local companion CLI installation").option("--skip-mcp", "Skip local snipara-mcp package installation").option("--skip-runtime", "Skip snipara-sandbox installation").option("--skip-hooks", "Skip hook generation").option("--skip-test", "Skip hosted connection test").option("--with-orchestrator", "Install optional snipara-orchestrator package").option("--github", "Open GitHub repository automation setup when a git remote is detected").option("--skip-github", "Skip the GitHub automation prompt").option("--github-path <path>", "Optional GitHub path filter for the initial repository sync").option("--runtime-only", "Install only Snipara Sandbox").option("-y, --yes", "Accept defaults without prompting").action(async (options) => {
|
|
173
|
+
).option("--skip-companion", "Skip local companion CLI installation").option("--skip-mcp", "Skip local snipara-mcp package installation").option("--skip-runtime", "Skip snipara-sandbox installation").option("--skip-hooks", "Skip hook generation").option("--skip-test", "Skip hosted connection test").option("--with-orchestrator", "Install optional snipara-orchestrator package").option("--github", "Open GitHub repository automation setup when a git remote is detected").option("--skip-github", "Skip the GitHub automation prompt").option("--github-path <path>", "Optional GitHub path filter for the initial repository sync").option("--runtime-only", "Install only Snipara Sandbox").addOption(new Option("--full", "Legacy alias for --profile full-stack").hideHelp()).option("-y, --yes", "Accept defaults without prompting").action(async (options) => {
|
|
174
174
|
printBanner();
|
|
175
175
|
await runInit(options);
|
|
176
176
|
});
|
|
@@ -204,12 +204,20 @@ function addSharedRootOptions(program) {
|
|
|
204
204
|
program.option("--api-key <key>", "Snipara API key").option("--slug <slug>", "Project slug").option("--project-id <id>", "Project ID").option("--advanced", "Show advanced profile, project id, hooks, GitHub, and sandbox prompts").option(
|
|
205
205
|
"--profile <profile>",
|
|
206
206
|
"Install profile: hosted-only, hosted-companion, full-stack, runtime-only"
|
|
207
|
-
).option("--skip-companion", "Skip local companion CLI installation").option("--skip-mcp", "Skip local snipara-mcp package installation").option("--skip-runtime", "Skip snipara-sandbox installation").option("--skip-hooks", "Skip hook generation").option("--skip-test", "Skip hosted connection test").option("--with-orchestrator", "Install optional snipara-orchestrator package").option("--github", "Open GitHub repository automation setup when a git remote is detected").option("--skip-github", "Skip the GitHub automation prompt").option("--github-path <path>", "Optional GitHub path filter for the initial repository sync").option("--runtime-only", "Install only Snipara Sandbox").option("-y, --yes", "Accept defaults without prompting");
|
|
207
|
+
).option("--skip-companion", "Skip local companion CLI installation").option("--skip-mcp", "Skip local snipara-mcp package installation").option("--skip-runtime", "Skip snipara-sandbox installation").option("--skip-hooks", "Skip hook generation").option("--skip-test", "Skip hosted connection test").option("--with-orchestrator", "Install optional snipara-orchestrator package").option("--github", "Open GitHub repository automation setup when a git remote is detected").option("--skip-github", "Skip the GitHub automation prompt").option("--github-path <path>", "Optional GitHub path filter for the initial repository sync").option("--runtime-only", "Install only Snipara Sandbox").addOption(new Option("--full", "Legacy alias for --profile full-stack").hideHelp()).option("-y, --yes", "Accept defaults without prompting");
|
|
208
208
|
}
|
|
209
209
|
async function main() {
|
|
210
210
|
const program = buildProgram();
|
|
211
|
+
normalizeLegacyArgAliases(process.argv);
|
|
211
212
|
await program.parseAsync(process.argv);
|
|
212
213
|
}
|
|
214
|
+
function normalizeLegacyArgAliases(argv) {
|
|
215
|
+
for (let index = 2; index < argv.length; index += 1) {
|
|
216
|
+
if (argv[index] === "--Full") {
|
|
217
|
+
argv[index] = "--full";
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
213
221
|
function normalizeInitOptions(options) {
|
|
214
222
|
const parsed = parseInitOptionsFromArgv(process.argv.slice(2));
|
|
215
223
|
const normalized = { ...parsed };
|
|
@@ -238,6 +246,8 @@ function parseInitOptionsFromArgv(args) {
|
|
|
238
246
|
"--skip-test": "skipTest",
|
|
239
247
|
"--with-orchestrator": "withOrchestrator",
|
|
240
248
|
"--runtime-only": "runtimeOnly",
|
|
249
|
+
"--full": "full",
|
|
250
|
+
"--Full": "full",
|
|
241
251
|
"--github": "github",
|
|
242
252
|
"--skip-github": "skipGithub",
|
|
243
253
|
"--yes": "yes",
|
|
@@ -457,7 +467,9 @@ async function gatherConfiguration(options) {
|
|
|
457
467
|
skipRuntime: !!options.skipRuntime,
|
|
458
468
|
withOrchestrator: !!options.withOrchestrator,
|
|
459
469
|
skipHooks: !!options.skipHooks,
|
|
460
|
-
configureGitHub: Boolean(
|
|
470
|
+
configureGitHub: Boolean(
|
|
471
|
+
(options.github || options.githubPath) && detectedGitRepo && !options.skipGithub
|
|
472
|
+
),
|
|
461
473
|
githubRepo: detectedGitRepo || void 0,
|
|
462
474
|
githubPath: options.githubPath
|
|
463
475
|
});
|
|
@@ -574,7 +586,7 @@ async function gatherConfiguration(options) {
|
|
|
574
586
|
withOrchestrator: Boolean(options.withOrchestrator || response.installOrchestrator),
|
|
575
587
|
skipHooks: !!options.skipHooks || !response.installHooks,
|
|
576
588
|
configureGitHub: Boolean(
|
|
577
|
-
(response.configureGitHub || options.github) && detectedGitRepo && !options.skipGithub
|
|
589
|
+
(response.configureGitHub || options.github || options.githubPath) && detectedGitRepo && !options.skipGithub
|
|
578
590
|
),
|
|
579
591
|
githubRepo: detectedGitRepo || void 0,
|
|
580
592
|
githubPath: response.githubPath || options.githubPath
|
|
@@ -634,6 +646,9 @@ function resolveRequestedProfile(options) {
|
|
|
634
646
|
if ("runtimeOnly" in options && options.runtimeOnly) {
|
|
635
647
|
return "runtime-only";
|
|
636
648
|
}
|
|
649
|
+
if ("full" in options && options.full) {
|
|
650
|
+
return "full-stack";
|
|
651
|
+
}
|
|
637
652
|
if (options.profile && isInstallProfile(options.profile)) {
|
|
638
653
|
return options.profile;
|
|
639
654
|
}
|
package/package.json
CHANGED