create-terreno-app 57.4.0

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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Flourish Health, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # create-terreno-app
2
+
3
+ Generates a full-stack Terreno application scaffold (backend, frontend, CI, MCP
4
+ config, consumer Dockerfile, and env examples).
5
+
6
+ ## Install
7
+
8
+ ```bash
9
+ bunx create-terreno-app my-app --display-name "My App"
10
+ ```
11
+
12
+ npm equivalent:
13
+
14
+ ```bash
15
+ npm create terreno-app my-app -- --display-name "My App"
16
+ ```
17
+
18
+ Docs: [Create a Terreno app](https://github.com/FlourishHealth/terreno/blob/master/docs/how-to/create-a-terreno-app.md)
19
+ and [CLI reference](https://github.com/FlourishHealth/terreno/blob/master/docs/reference/create-terreno-app.md).
20
+
21
+ ## CLI
22
+
23
+ | Flag | Required | Default |
24
+ | --- | --- | --- |
25
+ | `appName` (positional) | yes | kebab-case directory and package name |
26
+ | `--display-name` | unless `--yes` | derived from `appName` when `--yes` |
27
+ | `--description` | no | empty |
28
+ | `--mcp-server-url` | no | hosted Terreno MCP URL |
29
+ | `--yes` | no | off |
30
+
31
+ The CLI writes `<cwd>/<appName>/` and refuses to overwrite a target that already
32
+ contains anything other than `.git` or `.gitignore`. It does not run
33
+ `bun install` or seed scripts.
34
+
35
+ ## Library exports
36
+
37
+ - `generateAllFiles` — returns the scaffold file list
38
+ - `writeScaffold` — writes the scaffold to disk (used by the CLI)
package/dist/cli.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env node
2
+ export interface RunCliOptions {
3
+ argv?: string[];
4
+ cwd?: string;
5
+ write?: (line: string) => void;
6
+ writeError?: (line: string) => void;
7
+ }
8
+ export interface RunCliResult {
9
+ exitCode: number;
10
+ nextSteps: string[];
11
+ success: boolean;
12
+ targetPath?: string;
13
+ error?: string;
14
+ }
15
+ export declare const runCli: (options?: RunCliOptions) => RunCliResult;
16
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAMA,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,MAAM,GAAI,UAAS,aAAkB,KAAG,YA6DpD,CAAC"}
package/dist/cli.js ADDED
@@ -0,0 +1,63 @@
1
+ #!/usr/bin/env node
2
+ import { pathToFileURL } from "node:url";
3
+ import { parseCliArgs, writeScaffold } from "./writeScaffold.js";
4
+ export const runCli = (options = {}) => {
5
+ const argv = options.argv ?? process.argv.slice(2);
6
+ const write = options.write ??
7
+ ((line) => {
8
+ process.stdout.write(`${line}\n`);
9
+ });
10
+ const writeError = options.writeError ??
11
+ ((line) => {
12
+ process.stderr.write(`${line}\n`);
13
+ });
14
+ const cwd = options.cwd ?? process.cwd();
15
+ const parsed = parseCliArgs(argv);
16
+ if (parsed.errors.length > 0) {
17
+ for (const error of parsed.errors) {
18
+ writeError(error);
19
+ }
20
+ return {
21
+ error: parsed.errors.join("; "),
22
+ exitCode: 1,
23
+ nextSteps: [],
24
+ success: false,
25
+ };
26
+ }
27
+ const scaffoldResult = writeScaffold({
28
+ appDisplayName: parsed.displayName,
29
+ appName: parsed.appName,
30
+ description: parsed.description,
31
+ mcpServerUrl: parsed.mcpServerUrl,
32
+ parentDir: cwd,
33
+ });
34
+ if (!scaffoldResult.success) {
35
+ if (scaffoldResult.error) {
36
+ writeError(scaffoldResult.error);
37
+ }
38
+ return {
39
+ error: scaffoldResult.error,
40
+ exitCode: scaffoldResult.exitCode,
41
+ nextSteps: [],
42
+ success: false,
43
+ targetPath: scaffoldResult.targetPath,
44
+ };
45
+ }
46
+ write(`Created ${scaffoldResult.targetPath}`);
47
+ write("");
48
+ write("Next steps:");
49
+ for (const step of scaffoldResult.nextSteps) {
50
+ write(step);
51
+ }
52
+ return {
53
+ exitCode: 0,
54
+ nextSteps: scaffoldResult.nextSteps,
55
+ success: true,
56
+ targetPath: scaffoldResult.targetPath,
57
+ };
58
+ };
59
+ const isMainModule = process.argv[1] !== undefined && import.meta.url === pathToFileURL(process.argv[1]).href;
60
+ if (isMainModule) {
61
+ process.exit(runCli().exitCode);
62
+ }
63
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AAEvC,OAAO,EAAC,YAAY,EAAE,aAAa,EAAC,MAAM,oBAAoB,CAAC;AAiB/D,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,UAAyB,EAAE,EAAgB,EAAE;IAClE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACnD,MAAM,KAAK,GACT,OAAO,CAAC,KAAK;QACb,CAAC,CAAC,IAAY,EAAQ,EAAE;YACtB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,MAAM,UAAU,GACd,OAAO,CAAC,UAAU;QAClB,CAAC,CAAC,IAAY,EAAQ,EAAE;YACtB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAEzC,MAAM,MAAM,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC7B,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAClC,UAAU,CAAC,KAAK,CAAC,CAAC;QACpB,CAAC;QACD,OAAO;YACL,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;YAC/B,QAAQ,EAAE,CAAC;YACX,SAAS,EAAE,EAAE;YACb,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AAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,20 @@
1
+ /** Pinned so `npx -y` does not resolve a moving `@latest` target in generated MCP configs. */
2
+ export declare const PLAYWRIGHT_MCP_PACKAGE_VERSION = "0.0.76";
3
+ /** Bun-safe Mongo stack — caret ranges resolve to mongoose 9.10 / mongodb 7.6 / bson 7.3 and crash Bun. */
4
+ export declare const MONGOOSE_VERSION = "9.7.4";
5
+ export declare const MONGODB_VERSION = "7.2.0";
6
+ export declare const BSON_VERSION = "7.2.0";
7
+ export declare const PACKAGE_VERSION: string;
8
+ export interface BootstrapArgs {
9
+ appName: string;
10
+ appDisplayName: string;
11
+ description?: string;
12
+ mcpServerUrl?: string;
13
+ }
14
+ export interface GeneratedFile {
15
+ path: string;
16
+ content: string;
17
+ }
18
+ export declare const getFenceLanguage: (filePath: string) => string;
19
+ export declare const generateAllFiles: (args: BootstrapArgs) => GeneratedFile[];
20
+ //# sourceMappingURL=generate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../src/generate.ts"],"names":[],"mappings":"AAEA,8FAA8F;AAC9F,eAAO,MAAM,8BAA8B,WAAW,CAAC;AAEvD,2GAA2G;AAC3G,eAAO,MAAM,gBAAgB,UAAU,CAAC;AACxC,eAAO,MAAM,eAAe,UAAU,CAAC;AACvC,eAAO,MAAM,YAAY,UAAU,CAAC;AAEpC,eAAO,MAAM,eAAe,QAAsB,CAAC;AAGnD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAkrFD,eAAO,MAAM,gBAAgB,GAAI,UAAU,MAAM,KAAG,MAcnD,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,MAAM,aAAa,KAAG,aAAa,EAwFnE,CAAC"}