@assemora/cli 0.1.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 +202 -0
- package/README.md +272 -0
- package/bin.mjs +31 -0
- package/dist/args.d.ts +35 -0
- package/dist/args.d.ts.map +1 -0
- package/dist/args.js +104 -0
- package/dist/args.js.map +1 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +11 -0
- package/dist/bin.js.map +1 -0
- package/dist/commands/agents.d.ts +50 -0
- package/dist/commands/agents.d.ts.map +1 -0
- package/dist/commands/agents.js +169 -0
- package/dist/commands/agents.js.map +1 -0
- package/dist/commands/artifacts.d.ts +5 -0
- package/dist/commands/artifacts.d.ts.map +1 -0
- package/dist/commands/artifacts.js +126 -0
- package/dist/commands/artifacts.js.map +1 -0
- package/dist/commands/console.d.ts +25 -0
- package/dist/commands/console.d.ts.map +1 -0
- package/dist/commands/console.js +99 -0
- package/dist/commands/console.js.map +1 -0
- package/dist/commands/db.d.ts +48 -0
- package/dist/commands/db.d.ts.map +1 -0
- package/dist/commands/db.js +585 -0
- package/dist/commands/db.js.map +1 -0
- package/dist/commands/index.d.ts +21 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +21 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/inspect.d.ts +8 -0
- package/dist/commands/inspect.d.ts.map +1 -0
- package/dist/commands/inspect.js +280 -0
- package/dist/commands/inspect.js.map +1 -0
- package/dist/commands/make.d.ts +29 -0
- package/dist/commands/make.d.ts.map +1 -0
- package/dist/commands/make.js +393 -0
- package/dist/commands/make.js.map +1 -0
- package/dist/commands/mcp.d.ts +19 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +116 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/new.d.ts +20 -0
- package/dist/commands/new.d.ts.map +1 -0
- package/dist/commands/new.js +83 -0
- package/dist/commands/new.js.map +1 -0
- package/dist/commands/run.d.ts +20 -0
- package/dist/commands/run.d.ts.map +1 -0
- package/dist/commands/run.js +355 -0
- package/dist/commands/run.js.map +1 -0
- package/dist/commands/watchdog.d.ts +2 -0
- package/dist/commands/watchdog.d.ts.map +1 -0
- package/dist/commands/watchdog.js +74 -0
- package/dist/commands/watchdog.js.map +1 -0
- package/dist/config.d.ts +89 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +156 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +133 -0
- package/dist/index.js.map +1 -0
- package/dist/output.d.ts +96 -0
- package/dist/output.d.ts.map +1 -0
- package/dist/output.js +181 -0
- package/dist/output.js.map +1 -0
- package/dist/project.d.ts +44 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +102 -0
- package/dist/project.js.map +1 -0
- package/dist/registry.d.ts +48 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +74 -0
- package/dist/registry.js.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,UAAU,CAAA;AACjB,OAAO,UAAU,CAAA;AACjB,OAAO,SAAS,CAAA;AAChB,OAAO,cAAc,CAAA;AACrB,OAAO,gBAAgB,CAAA;AACvB,OAAO,aAAa,CAAA;AACpB,OAAO,cAAc,CAAA;AACrB,OAAO,UAAU,CAAA;AAEjB,OAAO,WAAW,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const Routes: import("../registry.js").CliCommand;
|
|
2
|
+
export declare const Models: import("../registry.js").CliCommand;
|
|
3
|
+
export declare const Resources: import("../registry.js").CliCommand;
|
|
4
|
+
export declare const Blocks: import("../registry.js").CliCommand;
|
|
5
|
+
export declare const Agents: import("../registry.js").CliCommand;
|
|
6
|
+
/** In the order SPEC.md §77 lists them, which is the order the help prints them in. */
|
|
7
|
+
export declare const inspectCommands: readonly [import("../registry.js").CliCommand, import("../registry.js").CliCommand, import("../registry.js").CliCommand, import("../registry.js").CliCommand, import("../registry.js").CliCommand];
|
|
8
|
+
//# sourceMappingURL=inspect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspect.d.ts","sourceRoot":"","sources":["../../src/commands/inspect.ts"],"names":[],"mappings":"AA8JA,eAAO,MAAM,MAAM,qCAWjB,CAAA;AAEF,eAAO,MAAM,MAAM,qCAWjB,CAAA;AAEF,eAAO,MAAM,SAAS,qCAWpB,CAAA;AAEF,eAAO,MAAM,MAAM,qCAWjB,CAAA;AA6DF,eAAO,MAAM,MAAM,qCAoFjB,CAAA;AAEF,uFAAuF;AACvF,eAAO,MAAM,eAAe,oMAAuD,CAAA"}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `assemora routes | models | resources | blocks | agents` (SPEC.md §77).
|
|
3
|
+
*
|
|
4
|
+
* Four of these read the Schema Registry, and by the time the CLI sees it, it is
|
|
5
|
+
* plain data: `describe()` hands back entries typed as a name and nothing more,
|
|
6
|
+
* because `@assemora/cli` cannot import the packages that declare what a route or a
|
|
7
|
+
* block *is* (ADR-0021). Every column below therefore reads a field it has checked
|
|
8
|
+
* for itself, and a descriptor missing one prints an empty cell rather than taking
|
|
9
|
+
* the whole listing down.
|
|
10
|
+
*
|
|
11
|
+
* `agents` is the odd one, and the reason is worth stating: an agent identity is
|
|
12
|
+
* data, not a declaration. It comes through the Query Bus, so listing agents is
|
|
13
|
+
* validated, authorized and audited exactly as it is from Studio or from an agent
|
|
14
|
+
* asking about itself (SPEC.md §72, §76).
|
|
15
|
+
*/
|
|
16
|
+
import { AssemoraError } from '@assemora/core';
|
|
17
|
+
import { bool, flag } from '../args.js';
|
|
18
|
+
import { loadConfig } from '../config.js';
|
|
19
|
+
import { detail, fail, json, line, table } from '../output.js';
|
|
20
|
+
import { loadApplication } from '../project.js';
|
|
21
|
+
import { defineCommand, register } from '../registry.js';
|
|
22
|
+
const isEntry = (value) => typeof value === 'object' && value !== null;
|
|
23
|
+
const sectionsOf = (app) => app.registry.describe();
|
|
24
|
+
/** A string field, or an empty cell where the descriptor carries none. */
|
|
25
|
+
const text = (entry, key) => {
|
|
26
|
+
const value = entry[key];
|
|
27
|
+
return typeof value === 'string' ? value : '';
|
|
28
|
+
};
|
|
29
|
+
const strings = (value) => Array.isArray(value) ? value.filter((item) => typeof item === 'string') : [];
|
|
30
|
+
/** The `name` of every member of a list of descriptors — fields, relations, columns. */
|
|
31
|
+
const namesIn = (value) => (Array.isArray(value) ? value.filter(isEntry) : []).map((entry) => text(entry, 'name')).join(', ');
|
|
32
|
+
const countIn = (value) => String(Array.isArray(value) ? value.length : 0);
|
|
33
|
+
const byName = (left, right) => text(left, 'name').localeCompare(text(right, 'name'));
|
|
34
|
+
const routeColumns = [
|
|
35
|
+
{ header: 'Method', value: (entry) => text(entry, 'method').toUpperCase() },
|
|
36
|
+
{ header: 'Path', value: (entry) => text(entry, 'path') },
|
|
37
|
+
{ header: 'Summary', value: (entry) => text(entry, 'description') },
|
|
38
|
+
{
|
|
39
|
+
// Tags are what a route was filed under; the module is where it was declared.
|
|
40
|
+
// Both answer "where did this come from", and the tags are the more specific
|
|
41
|
+
// answer, so a route carrying them is described by them.
|
|
42
|
+
header: 'From',
|
|
43
|
+
value: (entry) => {
|
|
44
|
+
const tags = strings(entry.tags);
|
|
45
|
+
return tags.length === 0 ? text(entry, 'module') : tags.join(', ');
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
];
|
|
49
|
+
/**
|
|
50
|
+
* Routes read by path rather than in the order they were mounted.
|
|
51
|
+
*
|
|
52
|
+
* Mount order is an accident of module order, and somebody running this is looking
|
|
53
|
+
* for one URL — which puts every method on it next to each other.
|
|
54
|
+
*/
|
|
55
|
+
const byPath = (left, right) => text(left, 'path').localeCompare(text(right, 'path')) ||
|
|
56
|
+
text(left, 'method').localeCompare(text(right, 'method'));
|
|
57
|
+
const tableOf = (entry) => (isEntry(entry.table) ? entry.table : {});
|
|
58
|
+
/** `author (belongsTo), comments (hasMany)` — the kind says which side holds the key. */
|
|
59
|
+
const relationsOf = (entry) => {
|
|
60
|
+
const declared = tableOf(entry).relations;
|
|
61
|
+
return (Array.isArray(declared) ? declared.filter(isEntry) : [])
|
|
62
|
+
.map((relation) => `${text(relation, 'name')} (${text(relation, 'kind')})`)
|
|
63
|
+
.join(', ');
|
|
64
|
+
};
|
|
65
|
+
const modelColumns = [
|
|
66
|
+
{ header: 'Model', value: (entry) => text(entry, 'name') },
|
|
67
|
+
{ header: 'Table', value: (entry) => text(tableOf(entry), 'name') },
|
|
68
|
+
{ header: 'Columns', value: (entry) => countIn(tableOf(entry).columns), align: 'right' },
|
|
69
|
+
{ header: 'Relations', value: relationsOf },
|
|
70
|
+
];
|
|
71
|
+
const resourceColumns = [
|
|
72
|
+
{ header: 'Resource', value: (entry) => text(entry, 'name') },
|
|
73
|
+
{ header: 'Model', value: (entry) => text(entry, 'model') },
|
|
74
|
+
// A hidden field is listed here. This is a developer reading their own
|
|
75
|
+
// declarations, and what SPEC.md §85 keeps out of a published document is the
|
|
76
|
+
// value — no value is read by any of these commands.
|
|
77
|
+
{ header: 'Fields', value: (entry) => namesIn(entry.fields) },
|
|
78
|
+
];
|
|
79
|
+
/**
|
|
80
|
+
* `no`, `any`, or the block types it will take.
|
|
81
|
+
*
|
|
82
|
+
* "Whether it accepts children" is the question; naming what it accepts answers that
|
|
83
|
+
* and says more, at no cost in width for the blocks that accept nothing.
|
|
84
|
+
*/
|
|
85
|
+
const childrenOf = (entry) => {
|
|
86
|
+
if (entry.acceptsChildren !== true)
|
|
87
|
+
return 'no';
|
|
88
|
+
const allowed = strings(entry.allowedChildren);
|
|
89
|
+
return allowed.length === 0 ? 'any' : allowed.join(', ');
|
|
90
|
+
};
|
|
91
|
+
const blockColumns = [
|
|
92
|
+
{ header: 'Block', value: (entry) => text(entry, 'name') },
|
|
93
|
+
{ header: 'Fields', value: (entry) => namesIn(entry.fields) },
|
|
94
|
+
{ header: 'Children', value: childrenOf },
|
|
95
|
+
];
|
|
96
|
+
/**
|
|
97
|
+
* The shape all four registry listings share.
|
|
98
|
+
*
|
|
99
|
+
* `--json` prints the section exactly as the registry holds it, fields the table
|
|
100
|
+
* leaves out included: the next thing anybody does with a listing is pipe it, and a
|
|
101
|
+
* pipe wants the data rather than the layout (ADR-0021).
|
|
102
|
+
*/
|
|
103
|
+
const registryListing = (options) => {
|
|
104
|
+
return async ({ args, cwd }) => {
|
|
105
|
+
const app = await loadApplication(await loadConfig(cwd));
|
|
106
|
+
const entries = sectionsOf(app)[options.section] ?? [];
|
|
107
|
+
if (bool(args, 'json')) {
|
|
108
|
+
json(entries);
|
|
109
|
+
return 0;
|
|
110
|
+
}
|
|
111
|
+
// A grid with a header and no rows says less than one sentence does.
|
|
112
|
+
if (entries.length === 0) {
|
|
113
|
+
line(options.empty);
|
|
114
|
+
return 0;
|
|
115
|
+
}
|
|
116
|
+
table([...entries].sort(options.order), options.columns);
|
|
117
|
+
return 0;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
export const Routes = defineCommand({
|
|
121
|
+
name: 'routes',
|
|
122
|
+
group: 'inspect',
|
|
123
|
+
summary: 'the HTTP routes this application registers',
|
|
124
|
+
usage: 'assemora routes [--json]',
|
|
125
|
+
handler: registryListing({
|
|
126
|
+
section: 'routes',
|
|
127
|
+
columns: routeColumns,
|
|
128
|
+
order: byPath,
|
|
129
|
+
empty: 'No routes are registered.',
|
|
130
|
+
}),
|
|
131
|
+
});
|
|
132
|
+
export const Models = defineCommand({
|
|
133
|
+
name: 'models',
|
|
134
|
+
group: 'inspect',
|
|
135
|
+
summary: 'the models it declares, with their tables and relations',
|
|
136
|
+
usage: 'assemora models [--json]',
|
|
137
|
+
handler: registryListing({
|
|
138
|
+
section: 'models',
|
|
139
|
+
columns: modelColumns,
|
|
140
|
+
order: byName,
|
|
141
|
+
empty: 'No models are declared.',
|
|
142
|
+
}),
|
|
143
|
+
});
|
|
144
|
+
export const Resources = defineCommand({
|
|
145
|
+
name: 'resources',
|
|
146
|
+
group: 'inspect',
|
|
147
|
+
summary: 'the resources it declares, and the models behind them',
|
|
148
|
+
usage: 'assemora resources [--json]',
|
|
149
|
+
handler: registryListing({
|
|
150
|
+
section: 'resources',
|
|
151
|
+
columns: resourceColumns,
|
|
152
|
+
order: byName,
|
|
153
|
+
empty: 'No resources are declared.',
|
|
154
|
+
}),
|
|
155
|
+
});
|
|
156
|
+
export const Blocks = defineCommand({
|
|
157
|
+
name: 'blocks',
|
|
158
|
+
group: 'inspect',
|
|
159
|
+
summary: 'the block types a page can be assembled from',
|
|
160
|
+
usage: 'assemora blocks [--json]',
|
|
161
|
+
handler: registryListing({
|
|
162
|
+
section: 'blocks',
|
|
163
|
+
columns: blockColumns,
|
|
164
|
+
order: byName,
|
|
165
|
+
empty: 'No block types are declared.',
|
|
166
|
+
}),
|
|
167
|
+
});
|
|
168
|
+
/** The query `@assemora/auth` registers, named rather than imported (ADR-0021). */
|
|
169
|
+
const AGENTS_QUERY = 'auth.agents.list';
|
|
170
|
+
const agentColumns = [
|
|
171
|
+
{ header: 'Agent', value: (entry) => text(entry, 'name') },
|
|
172
|
+
{ header: 'Enabled', value: (entry) => (entry.enabled === true ? 'yes' : 'no') },
|
|
173
|
+
{ header: 'Permissions', value: (entry) => strings(entry.permissions).join(', ') },
|
|
174
|
+
];
|
|
175
|
+
/**
|
|
176
|
+
* A count typed on the command line.
|
|
177
|
+
*
|
|
178
|
+
* `--page two` is a wrong invocation rather than a command that failed, and those are
|
|
179
|
+
* different exit codes (SPEC.md §77), so this reports the refusal instead of throwing
|
|
180
|
+
* and letting `run()` call it a failure.
|
|
181
|
+
*/
|
|
182
|
+
const countOf = (args, name) => {
|
|
183
|
+
const written = flag(args, name);
|
|
184
|
+
if (written === undefined)
|
|
185
|
+
return { ok: true, value: undefined };
|
|
186
|
+
const value = Number(written);
|
|
187
|
+
return Number.isInteger(value) && value >= 1 ? { ok: true, value } : { ok: false };
|
|
188
|
+
};
|
|
189
|
+
const numberIn = (value, key) => {
|
|
190
|
+
const found = isEntry(value) ? value[key] : undefined;
|
|
191
|
+
return typeof found === 'number' ? found : undefined;
|
|
192
|
+
};
|
|
193
|
+
const rowsIn = (answer) => {
|
|
194
|
+
const data = isEntry(answer) ? answer.data : undefined;
|
|
195
|
+
return Array.isArray(data) ? data.filter(isEntry) : [];
|
|
196
|
+
};
|
|
197
|
+
/** What the authorizer raises, whichever package registered it (SPEC.md §83). */
|
|
198
|
+
const isRefusal = (error) => error instanceof AssemoraError && error.code === 'FORBIDDEN';
|
|
199
|
+
/**
|
|
200
|
+
* The one sentence a refused listing is missing.
|
|
201
|
+
*
|
|
202
|
+
* The authorizer names the subject and the action, because that is all it knows — it
|
|
203
|
+
* has never heard of a command line. Running as nobody is the commonest way to meet
|
|
204
|
+
* it, and `--actor` is the thing to type next, so the CLI says so rather than leaving
|
|
205
|
+
* a reader to find it in the guide.
|
|
206
|
+
*/
|
|
207
|
+
const refusalHint = (actorId) => actorId === undefined
|
|
208
|
+
? 'Reading agent identities is authorized like every other query, and no actor was named. ' +
|
|
209
|
+
'Pass --actor <user id> — a user allowed to read auth.agents.'
|
|
210
|
+
: `${actorId} is not allowed to read auth.agents. Pass --actor with a user who holds that ` +
|
|
211
|
+
'permission, or grant it to this one.';
|
|
212
|
+
export const Agents = defineCommand({
|
|
213
|
+
name: 'agents',
|
|
214
|
+
group: 'inspect',
|
|
215
|
+
summary: 'the agent identities this application knows',
|
|
216
|
+
usage: 'assemora agents [--actor <id>] [--page <n>] [--per-page <n>] [--json]',
|
|
217
|
+
handler: async ({ args, cwd }) => {
|
|
218
|
+
const app = await loadApplication(await loadConfig(cwd));
|
|
219
|
+
// An application built without `@assemora/auth` has no agents at all, which is a
|
|
220
|
+
// truthful answer and a more useful one than the unknown-query error it would
|
|
221
|
+
// otherwise throw. It is still a failure: the question could not be asked, which
|
|
222
|
+
// is not the same as it being answered with nothing.
|
|
223
|
+
if (!app.queries.has(AGENTS_QUERY)) {
|
|
224
|
+
fail(`This application registers no "${AGENTS_QUERY}", so it knows no agent identities. ` +
|
|
225
|
+
'They come with @assemora/auth (SPEC.md §72).');
|
|
226
|
+
return 1;
|
|
227
|
+
}
|
|
228
|
+
const page = countOf(args, 'page');
|
|
229
|
+
const perPage = countOf(args, 'per-page');
|
|
230
|
+
if (!page.ok || !perPage.ok) {
|
|
231
|
+
fail('--page and --per-page each take a whole number of 1 or more.');
|
|
232
|
+
return 2;
|
|
233
|
+
}
|
|
234
|
+
const named = flag(args, 'actor');
|
|
235
|
+
const actor = named === undefined ? undefined : { type: 'user', id: named };
|
|
236
|
+
// `cli` is a source of its own so the audit log can tell a terminal from Studio
|
|
237
|
+
// (SPEC.md §12). No actor means no permissions: running as nobody is refused, and
|
|
238
|
+
// that refusal is the correct answer rather than a fault in this command.
|
|
239
|
+
const context = { source: 'cli', ...(actor === undefined ? {} : { actor }) };
|
|
240
|
+
let answer;
|
|
241
|
+
try {
|
|
242
|
+
answer = await app.run(context, () => app.queries.execute(AGENTS_QUERY, {
|
|
243
|
+
...(page.value === undefined ? {} : { page: page.value }),
|
|
244
|
+
...(perPage.value === undefined ? {} : { perPage: perPage.value }),
|
|
245
|
+
}));
|
|
246
|
+
}
|
|
247
|
+
catch (error) {
|
|
248
|
+
// Everything else is `run()`'s to report: a query that could not run is a
|
|
249
|
+
// failure of the application, and only the refusal has a next step to offer.
|
|
250
|
+
if (!isRefusal(error))
|
|
251
|
+
throw error;
|
|
252
|
+
fail(error instanceof Error ? error.message : String(error));
|
|
253
|
+
detail(refusalHint(named));
|
|
254
|
+
return 1;
|
|
255
|
+
}
|
|
256
|
+
// The whole answer, not just its rows: a page carries the total and where in it
|
|
257
|
+
// this page sits, and a pipe that asked for JSON wants to know both.
|
|
258
|
+
if (bool(args, 'json')) {
|
|
259
|
+
json(answer);
|
|
260
|
+
return 0;
|
|
261
|
+
}
|
|
262
|
+
const rows = rowsIn(answer);
|
|
263
|
+
if (rows.length === 0) {
|
|
264
|
+
line('No agent identities exist.');
|
|
265
|
+
return 0;
|
|
266
|
+
}
|
|
267
|
+
table(rows, agentColumns);
|
|
268
|
+
const total = numberIn(answer, 'total');
|
|
269
|
+
// A page of twenty that says nothing about the other eighty is a lie a listing
|
|
270
|
+
// can tell in silence, so it does not.
|
|
271
|
+
if (total !== undefined && total > rows.length) {
|
|
272
|
+
detail(`Showing ${rows.length} of ${total}. Pass --page to see the rest.`);
|
|
273
|
+
}
|
|
274
|
+
return 0;
|
|
275
|
+
},
|
|
276
|
+
});
|
|
277
|
+
/** In the order SPEC.md §77 lists them, which is the order the help prints them in. */
|
|
278
|
+
export const inspectCommands = [Routes, Models, Resources, Blocks, Agents];
|
|
279
|
+
register(...inspectCommands);
|
|
280
|
+
//# sourceMappingURL=inspect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspect.js","sourceRoot":"","sources":["../../src/commands/inspect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAgC,aAAa,EAAoB,MAAM,gBAAgB,CAAA;AAE9F,OAAO,EAAE,IAAI,EAAE,IAAI,EAAmB,MAAM,YAAY,CAAA;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAe,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAuB,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAK7E,MAAM,OAAO,GAAG,CAAC,KAAc,EAAkB,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAA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,EAAE,OAAO,CAAC,CAAA;QAEvC,+EAA+E;QAC/E,uCAAuC;QACvC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;YAC/C,MAAM,CAAC,WAAW,IAAI,CAAC,MAAM,OAAO,KAAK,gCAAgC,CAAC,CAAA;QAC5E,CAAC;QAED,OAAO,CAAC,CAAA;IACV,CAAC;CACF,CAAC,CAAA;AAEF,uFAAuF;AACvF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAU,CAAA;AAEnF,QAAQ,CAAC,GAAG,eAAe,CAAC,CAAA"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type CliCommand } from '../registry.js';
|
|
2
|
+
/** `blog_post` → `BlogPost`. */
|
|
3
|
+
export declare const pascalCase: (name: string) => string;
|
|
4
|
+
/** `blog_post` → `blogPost`. */
|
|
5
|
+
export declare const camelCase: (name: string) => string;
|
|
6
|
+
/** `BlogPost` → `blog-post`. The form every generated file name takes. */
|
|
7
|
+
export declare const kebabCase: (name: string) => string;
|
|
8
|
+
/** `BlogPost` → `blog_post`. The form every generated table name takes. */
|
|
9
|
+
export declare const snakeCase: (name: string) => string;
|
|
10
|
+
/** `blog_post` → `Blog post`. What a label and a description read like. */
|
|
11
|
+
export declare const sentenceCase: (name: string) => string;
|
|
12
|
+
/**
|
|
13
|
+
* The plural of one lower-case word.
|
|
14
|
+
*
|
|
15
|
+
* Four ordinary English rules, plus one that leaves a word already ending in `s`
|
|
16
|
+
* alone so that `make:policy posts` is not a policy about `postses`. A genuine
|
|
17
|
+
* singular ending in `s` is caught by the first rule, which is why `status` becomes
|
|
18
|
+
* `statuses` rather than staying put.
|
|
19
|
+
*
|
|
20
|
+
* Nothing here knows that a person is people. An irregular plural is one word to fix
|
|
21
|
+
* in the generated file, and a dictionary of English exceptions inside a CLI is a
|
|
22
|
+
* promise it cannot keep — `model('people', …)` is the honest answer.
|
|
23
|
+
*/
|
|
24
|
+
export declare const pluralOf: (word: string) => string;
|
|
25
|
+
/** The inverse, to the same standard: it decides a file name, never a table name. */
|
|
26
|
+
export declare const singularOf: (word: string) => string;
|
|
27
|
+
/** Registered in the order SPEC.md §77 lists them, which is the order they print in. */
|
|
28
|
+
export declare const makeCommands: readonly CliCommand[];
|
|
29
|
+
//# sourceMappingURL=make.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"make.d.ts","sourceRoot":"","sources":["../../src/commands/make.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,KAAK,UAAU,EAA2B,MAAM,gBAAgB,CAAA;AAsBzE,gCAAgC;AAChC,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,MAAiD,CAAA;AAE3F,gCAAgC;AAChC,eAAO,MAAM,SAAS,SAAU,MAAM,KAAG,MAG5B,CAAA;AAEb,0EAA0E;AAC1E,eAAO,MAAM,SAAS,SAAU,MAAM,KAAG,MAAiC,CAAA;AAE1E,2EAA2E;AAC3E,eAAO,MAAM,SAAS,SAAU,MAAM,KAAG,MAAiC,CAAA;AAE1E,2EAA2E;AAC3E,eAAO,MAAM,YAAY,SAAU,MAAM,KAAG,MAA8C,CAAA;AAE1F;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,QAAQ,SAAU,MAAM,KAAG,MAOvC,CAAA;AAED,qFAAqF;AACrF,eAAO,MAAM,UAAU,SAAU,MAAM,KAAG,MAQzC,CAAA;AA+TD,wFAAwF;AACxF,eAAO,MAAM,YAAY,EAAE,SAAS,UAAU,EA2C7C,CAAA"}
|