create-yosr-seed 0.0.1 → 0.1.0-alpha.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # create-yosr-seed
2
+
3
+ ## 0.1.0-alpha.1
4
+
5
+ ### Patch Changes
6
+
7
+ - An interactive Yosr Seed run closes with the next command when the gate is green, and points at `.seed/report.md` when the project was still written. On a terminal, the written folder, git, and the gate stay inside the prompt rail. The published Yosr Seed package rewrites every bundled `@yosr-ai/engine` import.
8
+ - Generated Yosr Seed projects record the choices made at setup and ask before departing from them. Flat aliases and unit-test paths match the layout, the home page follows the database choice, and standalone output is only for the Docker image build.
9
+ - Generated Yosr Seed projects pass every `ts.typeDefinitions` setting. Flat layout names `src/lib/server/` as the server-infrastructure area, with one level for `db/` and `auth/`.
10
+ - The create command depends on Yosr Seed 0.1.0-alpha.1.
11
+
12
+ ## 0.1.0-alpha.0
13
+
14
+ ### Major Changes
15
+
16
+ - First alpha. Forwards to `yosr-seed create`.
package/README.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # create-yosr-seed
2
2
 
3
- Yosr Seed by Yosr AI. Name reserved, first release coming soon.
3
+ Creates a Yosr Seed project. Binary: `create-yosr-seed`. It forwards to `yosr-seed create`. License: MIT. Node.js: `>=24`.
4
4
 
5
- https://seed.yosr.ai
5
+ ```text
6
+ npx create-yosr-seed@alpha
7
+ ```
8
+
9
+ Commands and flags are in the [repository README](https://github.com/getyosr/yosr-seed#readme).
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ import { openPrompts, readOwnPackageVersion, runYosrSeed } from "yosr-seed";
3
+ import { createForwardArgs } from "./forward.js";
4
+ const prompts = openPrompts();
5
+ void runYosrSeed({
6
+ nodeVersion: process.versions.node,
7
+ args: createForwardArgs(process.argv.slice(2)),
8
+ version: readOwnPackageVersion(),
9
+ stdout: (line) => {
10
+ console.log(line);
11
+ },
12
+ stderr: (line) => {
13
+ console.error(line);
14
+ },
15
+ prompt: (question) => prompts.ask(question),
16
+ })
17
+ .then((code) => {
18
+ prompts.close();
19
+ process.exit(code);
20
+ })
21
+ .catch((error) => {
22
+ prompts.close();
23
+ console.error(error instanceof Error ? error.message : error);
24
+ process.exit(1);
25
+ });
26
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,OAAO,GAAG,WAAW,EAAE,CAAC;AAE9B,KAAK,WAAW,CAAC;IACf,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI;IAClC,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC9C,OAAO,EAAE,qBAAqB,EAAE;IAChC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACf,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IACD,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;CAC5C,CAAC;KACC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;IACb,OAAO,CAAC,KAAK,EAAE,CAAC;IAChB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC,CAAC;KACD,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IACxB,OAAO,CAAC,KAAK,EAAE,CAAC;IAChB,OAAO,CAAC,KAAK,CAAC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAC9D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ /** `create-yosr-seed` is `yosr-seed create`. */
2
+ export declare function createForwardArgs(argv: readonly string[]): string[];
@@ -0,0 +1,5 @@
1
+ /** `create-yosr-seed` is `yosr-seed create`. */
2
+ export function createForwardArgs(argv) {
3
+ return ["create", ...argv];
4
+ }
5
+ //# sourceMappingURL=forward.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forward.js","sourceRoot":"","sources":["../src/forward.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,MAAM,UAAU,iBAAiB,CAAC,IAAuB;IACvD,OAAO,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,CAAC;AAC7B,CAAC"}
package/dist/run.d.ts ADDED
@@ -0,0 +1,10 @@
1
+ export interface CreateIo {
2
+ nodeVersion: string;
3
+ args: readonly string[];
4
+ stderr: (line: string) => void;
5
+ forward: (args: readonly string[]) => number;
6
+ }
7
+ /** Returns the process exit code. Forwards to `yosr-seed create` when Node is new enough. */
8
+ export declare function runCreateYosrSeed(io: CreateIo): number;
9
+ export declare function yosrSeedCliPath(): string;
10
+ export declare function forwardToYosrSeed(args: readonly string[]): number;
package/dist/run.js ADDED
@@ -0,0 +1,25 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import { createRequire } from "node:module";
3
+ import path from "node:path";
4
+ import { nodeVersionMessage } from "yosr-seed";
5
+ /** Returns the process exit code. Forwards to `yosr-seed create` when Node is new enough. */
6
+ export function runCreateYosrSeed(io) {
7
+ const message = nodeVersionMessage(io.nodeVersion);
8
+ if (message !== undefined) {
9
+ io.stderr(message);
10
+ return 1;
11
+ }
12
+ return io.forward(["create", ...io.args]);
13
+ }
14
+ export function yosrSeedCliPath() {
15
+ const require = createRequire(import.meta.url);
16
+ const packageJson = require.resolve("yosr-seed/package.json");
17
+ return path.join(path.dirname(packageJson), "dist", "cli.js");
18
+ }
19
+ export function forwardToYosrSeed(args) {
20
+ const result = spawnSync(process.execPath, [yosrSeedCliPath(), ...args], {
21
+ stdio: "inherit",
22
+ });
23
+ return result.status ?? 1;
24
+ }
25
+ //# sourceMappingURL=run.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run.js","sourceRoot":"","sources":["../src/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAS/C,6FAA6F;AAC7F,MAAM,UAAU,iBAAiB,CAAC,EAAY;IAC5C,MAAM,OAAO,GAAG,kBAAkB,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC;IACnD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACnB,OAAO,CAAC,CAAC;IACX,CAAC;IACD,OAAO,EAAE,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,eAAe;IAC7B,MAAM,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC/C,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,wBAAwB,CAAC,CAAC;IAC9D,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAuB;IACvD,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,eAAe,EAAE,EAAE,GAAG,IAAI,CAAC,EAAE;QACvE,KAAK,EAAE,SAAS;KACjB,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,CAAC;AAC5B,CAAC"}
package/package.json CHANGED
@@ -1,9 +1,25 @@
1
1
  {
2
2
  "name": "create-yosr-seed",
3
- "version": "0.0.1",
4
- "description": "Yosr Seed by Yosr AI. Name reserved; first release coming soon. https://seed.yosr.ai",
5
- "homepage": "https://seed.yosr.ai",
6
- "license": "UNLICENSED",
7
- "author": "Yosr AI",
8
- "files": ["README.md"]
3
+ "version": "0.1.0-alpha.1",
4
+ "description": "Create a Yosr Seed project. Forwards to yosr-seed create.",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/getyosr/yosr-seed.git",
9
+ "directory": "packages/create-yosr-seed"
10
+ },
11
+ "type": "module",
12
+ "bin": {
13
+ "create-yosr-seed": "./dist/cli.js"
14
+ },
15
+ "files": [
16
+ "CHANGELOG.md",
17
+ "dist"
18
+ ],
19
+ "engines": {
20
+ "node": ">=24"
21
+ },
22
+ "dependencies": {
23
+ "yosr-seed": "0.1.0-alpha.1"
24
+ }
9
25
  }