@openreceive/node 0.2.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/LICENSE +21 -0
- package/README.md +7 -0
- package/bin/openreceive.mjs +22 -0
- package/dist/chunk-6HALOJYF.js +1482 -0
- package/dist/cli.d.ts +63 -0
- package/dist/cli.js +1009 -0
- package/dist/index.d.ts +774 -0
- package/dist/index.js +2510 -0
- package/package.json +62 -0
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
declare const OPENRECEIVE_ORMS: readonly ["prisma", "drizzle", "typeorm", "sequelize", "knex"];
|
|
2
|
+
type Orm = (typeof OPENRECEIVE_ORMS)[number];
|
|
3
|
+
declare const OPENRECEIVE_DIALECTS: readonly ["postgres", "sqlite"];
|
|
4
|
+
type Dialect = (typeof OPENRECEIVE_DIALECTS)[number];
|
|
5
|
+
interface ScaffoldPaymentsOptions {
|
|
6
|
+
readonly orm: Orm;
|
|
7
|
+
readonly dialect: Dialect;
|
|
8
|
+
readonly tableName: string;
|
|
9
|
+
readonly metaTableName: string;
|
|
10
|
+
readonly outDir: string;
|
|
11
|
+
readonly force: boolean;
|
|
12
|
+
}
|
|
13
|
+
interface ScaffoldFile {
|
|
14
|
+
readonly path: string;
|
|
15
|
+
readonly contents: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface ParsedScaffoldArgv {
|
|
19
|
+
readonly help: boolean;
|
|
20
|
+
readonly interactive: boolean;
|
|
21
|
+
readonly partial: Partial<ScaffoldPaymentsOptions> & {
|
|
22
|
+
readonly force: boolean;
|
|
23
|
+
readonly outDir: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
declare function parseScaffoldPaymentsArgv(argv: readonly string[]): ParsedScaffoldArgv;
|
|
27
|
+
declare function finalizeScaffoldOptions(partial: ParsedScaffoldArgv["partial"]): ScaffoldPaymentsOptions;
|
|
28
|
+
|
|
29
|
+
type ScaffoldPrompt = (question: string) => Promise<string>;
|
|
30
|
+
|
|
31
|
+
declare function renderScaffoldPaymentsFiles(options: ScaffoldPaymentsOptions): ScaffoldFile[];
|
|
32
|
+
|
|
33
|
+
interface RunScaffoldPaymentsInput {
|
|
34
|
+
readonly argv: readonly string[];
|
|
35
|
+
readonly cwd: string;
|
|
36
|
+
readonly stdout: {
|
|
37
|
+
write(message: string): void;
|
|
38
|
+
};
|
|
39
|
+
readonly stderr: {
|
|
40
|
+
write(message: string): void;
|
|
41
|
+
};
|
|
42
|
+
readonly stdin?: NodeJS.ReadableStream;
|
|
43
|
+
readonly isTTY?: boolean;
|
|
44
|
+
readonly prompt?: ScaffoldPrompt;
|
|
45
|
+
}
|
|
46
|
+
declare function runScaffoldPayments(input: RunScaffoldPaymentsInput): Promise<number>;
|
|
47
|
+
|
|
48
|
+
interface CliIo {
|
|
49
|
+
write(message: string): void;
|
|
50
|
+
}
|
|
51
|
+
interface CliOptions {
|
|
52
|
+
readonly argv: readonly string[];
|
|
53
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
54
|
+
readonly cwd?: string;
|
|
55
|
+
readonly stdout?: CliIo;
|
|
56
|
+
readonly stderr?: CliIo;
|
|
57
|
+
readonly stdin?: NodeJS.ReadableStream;
|
|
58
|
+
readonly isTTY?: boolean;
|
|
59
|
+
readonly prompt?: (question: string) => Promise<string>;
|
|
60
|
+
}
|
|
61
|
+
declare function runCli(options: CliOptions): Promise<number>;
|
|
62
|
+
|
|
63
|
+
export { type CliIo, type CliOptions, finalizeScaffoldOptions, parseScaffoldPaymentsArgv, renderScaffoldPaymentsFiles, runCli, runScaffoldPayments };
|