@codenotch/codenotch.cli 1.0.41 → 1.0.42

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.
Files changed (50) hide show
  1. package/README.md +78 -28
  2. package/dist/commands/generate/dbcontext.js +2 -2
  3. package/dist/commands/generate/dbcontext.js.map +1 -1
  4. package/dist/commands/generate/index.js +1 -1
  5. package/dist/commands/project/deploy.js +9 -2
  6. package/dist/commands/project/deploy.js.map +1 -1
  7. package/dist/commands/project/inspect.js +65 -1
  8. package/dist/commands/project/inspect.js.map +1 -1
  9. package/dist/commands/system/docs.d.ts +2 -0
  10. package/dist/commands/system/docs.js +57 -0
  11. package/dist/commands/system/docs.js.map +1 -0
  12. package/dist/commands/system/index.js +2 -0
  13. package/dist/commands/system/index.js.map +1 -1
  14. package/dist/commands/system/read.js +2 -1
  15. package/dist/commands/system/read.js.map +1 -1
  16. package/dist/commands/validation/files/ScriptValidator.js +9 -8
  17. package/dist/commands/validation/files/ScriptValidator.js.map +1 -1
  18. package/dist/index.js +12 -2
  19. package/dist/index.js.map +1 -1
  20. package/dist/utils/DbSchemaUtils.d.ts +16 -10
  21. package/dist/utils/DbSchemaUtils.js +82 -30
  22. package/dist/utils/DbSchemaUtils.js.map +1 -1
  23. package/dist/utils/DocsUtils.d.ts +34 -0
  24. package/dist/utils/DocsUtils.js +76 -0
  25. package/dist/utils/DocsUtils.js.map +1 -0
  26. package/dist/utils/ProcessBundlerUtils.d.ts +103 -0
  27. package/dist/utils/ProcessBundlerUtils.js +336 -0
  28. package/dist/utils/ProcessBundlerUtils.js.map +1 -0
  29. package/dist/utils/ProjectCompilationUtils.d.ts +14 -2
  30. package/dist/utils/ProjectCompilationUtils.js +75 -3
  31. package/dist/utils/ProjectCompilationUtils.js.map +1 -1
  32. package/dist/utils/ProjectGeneratorUtils.d.ts +2 -1
  33. package/dist/utils/ProjectGeneratorUtils.js +21 -14
  34. package/dist/utils/ProjectGeneratorUtils.js.map +1 -1
  35. package/dist/utils/ProjectTemplates.d.ts +2 -2
  36. package/dist/utils/ProjectTemplates.js +12 -6
  37. package/dist/utils/ProjectTemplates.js.map +1 -1
  38. package/dist/utils/ProjectUtils.d.ts +18 -1
  39. package/dist/utils/ProjectUtils.js +33 -28
  40. package/dist/utils/ProjectUtils.js.map +1 -1
  41. package/dist/utils/TemplateUtils.d.ts +28 -0
  42. package/dist/utils/TemplateUtils.js +95 -3
  43. package/dist/utils/TemplateUtils.js.map +1 -1
  44. package/package.json +78 -71
  45. package/resources/docs/apps.md +109 -0
  46. package/resources/docs/i18n.md +51 -0
  47. package/resources/docs/processes.md +87 -0
  48. package/resources/docs/project.md +101 -0
  49. package/resources/docs/queries.md +54 -0
  50. package/resources/docs/tables.md +97 -0
@@ -36,9 +36,10 @@ const ELEMENT_BY_BUILDER = {
36
36
  /** Modifiers making a column non nullable */
37
37
  const REQUIRED_MODIFIERS = ['notNull', 'required', 'primary'];
38
38
  /**
39
- * Builds the two files describing the database of a project out of its 'defineEntity' declarations:
40
- * 'db-schema.xml', read by the runtime to migrate the database, and 'db-schema.ts', the typed
41
- * context the processes use through `ctx.tables`.
39
+ * Builds the two files describing the database of a project out of its 'defineEntity' and
40
+ * 'defineDocument' declarations: 'db-schema.xml', read by the runtime to migrate the database,
41
+ * and 'db-schema.d.ts', which augments the 'ProjectTables' and 'ProjectDocs' interfaces of
42
+ * '@codenotch/process' so that `ctx.tables.<name>` is typed in the processes.
42
43
  */
43
44
  class DbSchemaUtils {
44
45
  /**
@@ -145,25 +146,39 @@ class DbSchemaUtils {
145
146
  return [` <${element} ${attributes.join(' ')}/>`];
146
147
  }
147
148
  /**
148
- * 'db-schema.ts', the typed database context of the project
149
+ * 'db-schema.d.ts', the declaration merging file typing `ctx.tables` and the documents:
150
+ * it augments '@codenotch/process' with one typed handle per table and per document.
151
+ *
152
+ * The file must stay a module (have a top level import) for the `declare module` block to be
153
+ * an augmentation: as a plain script it would *declare* '@codenotch/process' instead of
154
+ * merging into it. It also only applies to files of the same TypeScript program, hence the
155
+ * tsconfig of the project has to include it.
149
156
  *
150
157
  * @param tables tables of the project, see ProjectUtils.discoverTableFiles
151
- * @param projectName name of the project, used for the interface name
152
- * @param imports import line of each table type, keyed by table name
158
+ * @param documents documents of the project, see ProjectUtils.discoverDocumentFiles
159
+ * @param tableImports import line of each table row type, keyed by table name
160
+ * @param documentImports import line of each document type, keyed by document name
153
161
  */
154
- static generateTs(tables, projectName, imports) {
162
+ static generateDts(tables, documents, tableImports, documentImports) {
155
163
  const warnings = [];
156
164
  // Types coming from the same file share one import statement, as a developer would write it
157
165
  const typesBySpecifier = new Map();
158
- const properties = [];
166
+ const collectImport = (importLine) => {
167
+ const typeNames = typesBySpecifier.get(importLine.specifier) ?? [];
168
+ if (!typeNames.includes(importLine.typeName)) {
169
+ typesBySpecifier.set(importLine.specifier, [...typeNames, importLine.typeName]);
170
+ }
171
+ };
172
+ // ProjectTables: one handle per table, under its collection name
173
+ const tableProperties = [];
159
174
  const collectionNames = new Map();
160
175
  for (const table of this.sortByName(tables)) {
161
176
  if (table.name === undefined) {
162
177
  continue; // already reported by generateXml
163
178
  }
164
- const importLine = this.parseImport(imports.get(table.name));
179
+ const importLine = this.parseImport(tableImports.get(table.name));
165
180
  if (table.typeName === undefined || importLine === undefined) {
166
- warnings.push(`The table '${table.name}' has no exported row type ('export type I${table.name} = InferEntity<typeof ${table.variableName ?? table.name}>'), it is left out of the context.`);
181
+ warnings.push(`The table '${table.name}' has no exported row type ('export type I${table.name} = InferEntity<typeof ${table.variableName ?? table.name}>'), it is left out of 'ProjectTables'.`);
167
182
  continue;
168
183
  }
169
184
  const collectionName = this.toCollectionName(table.name);
@@ -173,40 +188,77 @@ class DbSchemaUtils {
173
188
  continue;
174
189
  }
175
190
  collectionNames.set(collectionName, table.name);
176
- typesBySpecifier.set(importLine.specifier, [...(typesBySpecifier.get(importLine.specifier) ?? []), importLine.typeName]);
177
- properties.push(` ${collectionName}: ITable<${table.typeName}>`);
191
+ collectImport(importLine);
192
+ tableProperties.push(` ${collectionName}: TableHandle<${table.typeName}>;`);
193
+ }
194
+ // ProjectDocs: one handle per document, under its lowercased name (documents are not pluralized)
195
+ const documentProperties = [];
196
+ const documentKeys = new Map();
197
+ for (const document of this.sortByName(documents)) {
198
+ if (document.name === undefined) {
199
+ warnings.push(`A document declared at ${document.filePath}:${document.line} has no literal name, it is left out of 'ProjectDocs'.`);
200
+ continue;
201
+ }
202
+ const importLine = this.parseImport(documentImports.get(document.name));
203
+ if (document.typeName === undefined || importLine === undefined) {
204
+ warnings.push(`The document '${document.name}' has no exported type ('export type I${document.name} = InferDocument<typeof ${document.variableName ?? document.name}>'), it is left out of 'ProjectDocs'.`);
205
+ continue;
206
+ }
207
+ const key = document.name.toLowerCase();
208
+ const takenBy = documentKeys.get(key);
209
+ if (takenBy !== undefined) {
210
+ warnings.push(`The documents '${takenBy}' and '${document.name}' both map to '${key}', only the first one is kept.`);
211
+ continue;
212
+ }
213
+ documentKeys.set(key, document.name);
214
+ collectImport(importLine);
215
+ documentProperties.push(` ${key}: DocStoreHandle<${document.typeName}>;`);
216
+ }
217
+ const handles = [
218
+ ...(tableProperties.length > 0 ? ['TableHandle'] : []),
219
+ ...(documentProperties.length > 0 ? ['DocStoreHandle'] : [])
220
+ ];
221
+ const header = [
222
+ `// Generated by 'cn generate dbcontext', do not edit.`,
223
+ `// Augments the 'ProjectTables' and 'ProjectDocs' interfaces of '@codenotch/process' with the`,
224
+ `// tables and documents of this project, so 'ctx.tables.<name>' autocompletes with its row type.`
225
+ ];
226
+ // Nothing usable: an empty 'declare module' with no import would be an ambient declaration
227
+ // shadowing the real package, so the file is written inert instead
228
+ if (handles.length === 0) {
229
+ return { content: [...header, `export {};`, ``].join('\n'), warnings };
230
+ }
231
+ const blocks = [];
232
+ if (tableProperties.length > 0) {
233
+ blocks.push(` interface ProjectTables {`, ...tableProperties, ` }`);
234
+ }
235
+ if (documentProperties.length > 0) {
236
+ if (blocks.length > 0) {
237
+ blocks.push(``);
238
+ }
239
+ blocks.push(` interface ProjectDocs {`, ...documentProperties, ` }`);
178
240
  }
179
- const importLines = [...typesBySpecifier.entries()]
180
- .map(([specifier, typeNames]) => `import { ${typeNames.join(', ')} } from '${specifier}';`);
181
241
  const content = [
182
- `import { ITable, IDbSchema } from '@codenotch/orm'`,
183
- ...importLines,
242
+ ...header,
243
+ `import type { ${handles.join(', ')} } from '@codenotch/process';`,
244
+ ...[...typesBySpecifier.entries()]
245
+ .map(([specifier, typeNames]) => `import type { ${typeNames.join(', ')} } from '${specifier}';`),
184
246
  ``,
185
- `export default interface ${this.toInterfaceName(projectName)} extends IDbSchema {`,
186
- ...properties,
247
+ `declare module '@codenotch/process' {`,
248
+ ...blocks,
187
249
  `}`,
188
250
  ``
189
251
  ].join('\n');
190
252
  return { content, warnings };
191
253
  }
192
- /** 'my project' and 'my-project' both give 'MyProjectDbSchema' */
193
- static toInterfaceName(projectName) {
194
- const name = projectName
195
- .split(/[^A-Za-z0-9$]+/)
196
- .filter(word => word !== '')
197
- .map(word => word.charAt(0).toUpperCase() + word.slice(1))
198
- .join('');
199
- // An interface cannot start with a digit, and an empty name would produce 'DbSchema' alone
200
- return `${/^[A-Za-z_$]/.test(name) ? name : `Project${name}`}DbSchema`;
201
- }
202
254
  /** Splits an import statement back into the type it brings and the file it comes from */
203
255
  static parseImport(statement) {
204
256
  const match = statement?.match(/^import \{\s*([^}\s]+)\s*\} from '([^']+)';?$/);
205
257
  return match === null || match === undefined ? undefined : { typeName: match[1], specifier: match[2] };
206
258
  }
207
- static sortByName(tables) {
259
+ static sortByName(declarations) {
208
260
  // Sorted so that regenerating an unchanged project produces an unchanged file
209
- return [...tables].sort((left, right) => (left.name ?? '').localeCompare(right.name ?? ''));
261
+ return [...declarations].sort((left, right) => (left.name ?? '').localeCompare(right.name ?? ''));
210
262
  }
211
263
  static getDescription(properties) {
212
264
  return typeof properties['description'] === 'string' ? properties['description'] : '';
@@ -1 +1 @@
1
- {"version":3,"file":"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ipped with the CLI */
2
+ export interface IDocTopic {
3
+ /** Name the topic is asked by, e.g. 'tables' for 'tables.md' */
4
+ name: string;
5
+ /** Absolute path of its markdown file */
6
+ filePath: string;
7
+ /** One line summary, taken from the first paragraph of the file */
8
+ summary: string;
9
+ }
10
+ /**
11
+ * The reference documentation shipped with the CLI ('resources/docs' of the package), served by
12
+ * 'cn docs'. Written for coding agents as much as for developers: the AGENTS.md of a generated
13
+ * project points here instead of embedding the reference, so the documentation always matches
14
+ * the installed CLI instead of the CLI that once created the project.
15
+ */
16
+ export default abstract class DocsUtils {
17
+ /**
18
+ * 'resources/docs' of the package, resolved from both 'src/utils' (tsx) and 'dist/utils'
19
+ * (build), which sit at the same depth
20
+ */
21
+ static getDocsFolder(): string;
22
+ /**
23
+ * Every topic of the docs folder, preferred ones first. Empty when the folder is missing,
24
+ * which only happens on a broken installation.
25
+ */
26
+ static listTopics(): IDocTopic[];
27
+ /**
28
+ * Content of one topic, undefined when the name is not a listed topic. Only listed names are
29
+ * read, so the argument cannot address a file outside the docs folder.
30
+ */
31
+ static readTopic(name: string): string | undefined;
32
+ /** First non-empty line after the '# ' title of the file, empty when there is none */
33
+ private static readSummary;
34
+ }
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const fs_1 = require("fs");
4
+ const path_1 = require("path");
5
+ /** Topics listed first, in this order; a file that is not here is appended alphabetically */
6
+ const PREFERRED_ORDER = ['project', 'tables', 'processes', 'queries', 'apps', 'i18n'];
7
+ /**
8
+ * The reference documentation shipped with the CLI ('resources/docs' of the package), served by
9
+ * 'cn docs'. Written for coding agents as much as for developers: the AGENTS.md of a generated
10
+ * project points here instead of embedding the reference, so the documentation always matches
11
+ * the installed CLI instead of the CLI that once created the project.
12
+ */
13
+ class DocsUtils {
14
+ /**
15
+ * 'resources/docs' of the package, resolved from both 'src/utils' (tsx) and 'dist/utils'
16
+ * (build), which sit at the same depth
17
+ */
18
+ static getDocsFolder() {
19
+ return (0, path_1.join)(__dirname, '../../resources/docs');
20
+ }
21
+ /**
22
+ * Every topic of the docs folder, preferred ones first. Empty when the folder is missing,
23
+ * which only happens on a broken installation.
24
+ */
25
+ static listTopics() {
26
+ let files;
27
+ try {
28
+ files = (0, fs_1.readdirSync)(this.getDocsFolder()).filter(file => file.endsWith('.md'));
29
+ }
30
+ catch {
31
+ return [];
32
+ }
33
+ const topics = files.map(file => {
34
+ const filePath = (0, path_1.join)(this.getDocsFolder(), file);
35
+ return {
36
+ name: file.slice(0, -'.md'.length),
37
+ filePath,
38
+ summary: this.readSummary(filePath)
39
+ };
40
+ });
41
+ const rank = (topic) => {
42
+ const index = PREFERRED_ORDER.indexOf(topic.name);
43
+ return index === -1 ? PREFERRED_ORDER.length : index;
44
+ };
45
+ return topics.sort((a, b) => rank(a) - rank(b) || a.name.localeCompare(b.name));
46
+ }
47
+ /**
48
+ * Content of one topic, undefined when the name is not a listed topic. Only listed names are
49
+ * read, so the argument cannot address a file outside the docs folder.
50
+ */
51
+ static readTopic(name) {
52
+ const topic = this.listTopics().find(candidate => candidate.name === name);
53
+ if (topic === undefined) {
54
+ return undefined;
55
+ }
56
+ try {
57
+ return (0, fs_1.readFileSync)(topic.filePath, 'utf8');
58
+ }
59
+ catch {
60
+ return undefined;
61
+ }
62
+ }
63
+ /** First non-empty line after the '# ' title of the file, empty when there is none */
64
+ static readSummary(filePath) {
65
+ try {
66
+ const lines = (0, fs_1.readFileSync)(filePath, 'utf8').split(/\r?\n/);
67
+ const titleIndex = lines.findIndex(line => line.startsWith('# '));
68
+ return lines.slice(titleIndex + 1).find(line => line.trim() !== '')?.trim() ?? '';
69
+ }
70
+ catch {
71
+ return '';
72
+ }
73
+ }
74
+ }
75
+ exports.default = DocsUtils;
76
+ //# sourceMappingURL=DocsUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DocsUtils.js","sourceRoot":"","sources":["../../src/utils/DocsUtils.ts"],"names":[],"mappings":";;AAAA,2BAA+C;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';
2
+ import { IJsonSchema } from './TypeSchemaUtils';
3
+ /** One entry of 'compiled/processes.json': everything the runtime needs to route and execute a process */
4
+ export interface IProcessArtifact {
5
+ id: string;
6
+ /** Path of the bundle, relative to the root of the package, posix separators, e.g. 'compiled/CreateBook.js' */
7
+ file: string;
8
+ /** Content hash of the bundle, 'sha256:<hex>', meant as the key of the V8 code cache of the runtime */
9
+ hash: string;
10
+ /** Declaration site, relative to the root of the package, e.g. 'processes/products.ts:5' */
11
+ source: string;
12
+ /** How the process is started, undefined when it is only reachable through ctx.call */
13
+ trigger?: IProcessTrigger;
14
+ auth?: {
15
+ scope: string;
16
+ };
17
+ description?: string;
18
+ /** True when 'run' declares an input parameter */
19
+ takesInput: boolean;
20
+ /** Schema of the input of 'run', when its parameter carries a type annotation */
21
+ input?: IJsonSchema;
22
+ /** Schema of the return type of 'run', Promise unwrapped, when it carries one */
23
+ output?: IJsonSchema;
24
+ }
25
+ export interface IProcessBundleResult {
26
+ /** One artifact per bundled process, sorted by id so the index is deterministic */
27
+ artifacts: IProcessArtifact[];
28
+ /** Path of the written 'processes.json', undefined when the bundling failed before writing it */
29
+ indexPath?: string;
30
+ /** Skipped declarations and bundler warnings, already worded for the console */
31
+ warnings: string[];
32
+ /** Bundling failures. When non-empty the artifacts list is empty */
33
+ errors: string[];
34
+ }
35
+ /**
36
+ * Bundles every process of a project into its own self-contained .js artifact, executable by the
37
+ * C# runtime in a bare V8 engine (ClearScript). The full contract between these artifacts and the
38
+ * runtime is documented in docs/PROCESS-RUNTIME-CONTRACT.md — keep both in sync.
39
+ *
40
+ * In short, one artifact:
41
+ * - is an IIFE with no import left: the code of the process and every workspace file or npm
42
+ * package it reaches are inlined (each artifact is independent, duplication is accepted);
43
+ * - reads the '@codenotch/*' modules from `globalThis.__codenotch.modules`, injected by the
44
+ * runtime before the script is evaluated — they are never bundled;
45
+ * - registers itself into `globalThis.__cn_processes[id] = { id, run }`, where `run(ctx, input)`
46
+ * returns a Promise. Registration makes the artifacts host-agnostic: one engine per process
47
+ * and one shared engine per service both work.
48
+ *
49
+ * Next to the artifacts, 'processes.json' indexes them with their trigger, auth and input/output
50
+ * schemas, so the runtime routes and validates without ever reading TypeScript.
51
+ *
52
+ * esbuild only strips the types, it does not check them: typechecking is the job of the caller
53
+ * (see ProjectCompilationUtils.compileProject, which validates the scripts first).
54
+ */
55
+ export default abstract class ProcessBundlerUtils {
56
+ /** Folder of the artifacts, relative to the root of the package */
57
+ static readonly OUTPUT_FOLDER_NAME = "compiled";
58
+ /** Name of the index written next to the artifacts */
59
+ static readonly INDEX_FILE_NAME = "processes.json";
60
+ /** Global the runtime fills with the '@codenotch/*' implementations before evaluating an artifact */
61
+ private static readonly MODULES_GLOBAL;
62
+ /** Global registry an artifact writes itself into when evaluated */
63
+ private static readonly REGISTRY_GLOBAL;
64
+ /** Bare specifiers of the Node standard library, which does not exist in the V8 of the runtime */
65
+ private static readonly NODE_BUILTINS;
66
+ /**
67
+ * Discovers the processes of `projectPath` and bundles each of them into
68
+ * `outDir` (default: '<projectPath>/compiled'), plus a 'processes.json' index.
69
+ *
70
+ * A declaration that cannot be bundled (id missing or built at runtime, variable not
71
+ * exported, duplicated id) is skipped with a warning rather than failing the build.
72
+ * Nothing is thrown for bundling failures either: they are returned as errors.
73
+ *
74
+ * @param projectPath root of the project, where the sources and 'node_modules' live
75
+ * @param outDir where the artifacts are written; its previous content is replaced when it
76
+ * looks like an earlier compilation output (empty, or holding the index)
77
+ */
78
+ static bundleProcesses(projectPath: string, outDir?: string): Promise<IProcessBundleResult>;
79
+ /** Keeps the declarations that can become an artifact, one warning per skipped one */
80
+ private static selectBundlable;
81
+ /**
82
+ * One output file name per process id. Ids are sanitized for the file system and deduplicated
83
+ * case-insensitively (Windows), so the index 'file' field is the only reliable mapping.
84
+ */
85
+ private static assignFileNames;
86
+ /** The three resolution rules of a bundle: synthetic entries, runtime-provided modules, no Node builtin */
87
+ private static createPlugin;
88
+ /** Source of the synthetic entry module of one process */
89
+ private static createEntrySource;
90
+ /** Source of the stand-in module of a runtime-provided '@codenotch/*' package */
91
+ private static createRuntimeModuleSource;
92
+ /** Index entries of the written bundles, hashing each artifact for the code cache of the runtime */
93
+ private static createArtifacts;
94
+ /**
95
+ * Empties the previous output, but refuses to wipe a folder that does not look like an
96
+ * earlier compilation (no index): losing user files is worse than a stale artifact.
97
+ */
98
+ private static prepareOutputFolder;
99
+ /** 'processes/products.ts:5' — declaration site relative to the project, for messages and the index */
100
+ private static formatSource;
101
+ /** One console line out of an esbuild diagnostic, with its location when it has one */
102
+ private static formatEsbuildMessage;
103
+ }