@stjoseph/prumo 0.4.2 → 0.4.3

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/README.md CHANGED
@@ -54,17 +54,18 @@ A project cannot be named `api`, `web`, `mobile` or `site`: those are the names
54
54
  a workspace.
55
55
 
56
56
  Every question also has a flag, which is how CI runs it without a terminal. Outside an interactive
57
- terminal a missing answer is an error rather than a default, so nothing important gets decided by
58
- silence:
57
+ terminal every question that applies needs its flag, the layout of a single type included: a missing
58
+ answer is an error rather than a default, so nothing important gets decided by silence:
59
59
 
60
60
  ```sh
61
61
  npx @stjoseph/prumo new my-app --types api,web --single-tenant --no-mcp --email --no-social
62
+ npx @stjoseph/prumo new my-api --types api --alone --single-tenant --email
62
63
  ```
63
64
 
64
65
  | Flag | What it answers |
65
66
  |---|---|
66
67
  | `--types api,web,mobile,site` | What the project contains. More than one type makes a workspace |
67
- | `--alone` or `--monorepo` | How a single type is laid out |
68
+ | `--alone` or `--monorepo` | How a single type is laid out, so one type needs one of them. Several types always make a workspace and refuse `--alone` |
68
69
  | `--multi-tenant` or `--single-tenant` | Whether the application serves several tenants. Multi-tenant ships the `multi-tenancy` conventions; the generated code itself is not tenant-aware yet |
69
70
  | `--mcp` or `--no-mcp` | With an api and a web: whether AI assistants reach the API through MCP, signed in as the user |
70
71
  | `--email` or `--no-email` | With an api: email verification and password reset, by a 6-digit code sent through the `Mailer` port, which writes to the log until you give it a provider |
package/dist/commands.js CHANGED
@@ -9,7 +9,10 @@ export const COMMANDS = [
9
9
  summary: 'Generate a project and the .prumo/ context it follows; `.` generates into this empty directory',
10
10
  options: [
11
11
  { flag: '--types <list>', description: 'Comma-separated: api, web, mobile, site' },
12
- { flag: '--alone', description: 'One project of one type' },
12
+ {
13
+ flag: '--alone',
14
+ description: 'One project of one type; without a terminal, one type needs this or --monorepo',
15
+ },
13
16
  { flag: '--monorepo', description: 'A workspace, even for a single type' },
14
17
  {
15
18
  flag: '--multi-tenant',
package/dist/questions.js CHANGED
@@ -69,19 +69,22 @@ export async function resolveAnswers(flags, asker, cwd = process.cwd()) {
69
69
  else {
70
70
  missing('--types');
71
71
  }
72
- let architecture = 'alone';
72
+ let architecture;
73
73
  if (types.length > 1) {
74
74
  if (flags.alone) {
75
75
  throw new CliError('invalid_input', '--alone holds a single type; several types make a workspace.');
76
76
  }
77
77
  architecture = 'monorepo';
78
78
  }
79
- else if (flags.monorepo) {
80
- architecture = 'monorepo';
79
+ else if (flags.alone || flags.monorepo) {
80
+ architecture = flags.monorepo ? 'monorepo' : 'alone';
81
81
  }
82
- else if (!flags.alone && asker !== undefined) {
82
+ else if (asker !== undefined) {
83
83
  architecture = await asker.architecture();
84
84
  }
85
+ else {
86
+ missing('--alone or --monorepo');
87
+ }
85
88
  let multiTenant = false;
86
89
  if (!types.some((type) => TENANT_AWARE.includes(type))) {
87
90
  if (flags.multiTenant) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stjoseph/prumo",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Scaffolds a TypeScript project and ships it the conventions it follows, in a .prumo/ folder any AI assistant reads.",
5
5
  "keywords": [
6
6
  "scaffolding",