create-monolayer-app 0.2.0 → 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/package.json
CHANGED
|
@@ -4,7 +4,7 @@ import path from "node:path";
|
|
|
4
4
|
const MIGRATION_NAME_PATTERN = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u;
|
|
5
5
|
|
|
6
6
|
const migrationSource = `// oxlint-disable typescript/no-explicit-any
|
|
7
|
-
import type { DSQLKysely } from "
|
|
7
|
+
import type { DSQLKysely } from "../../../vendor/kysely-dsql/dsql/dsql-kysely";
|
|
8
8
|
|
|
9
9
|
export async function up(db: DSQLKysely<any>): Promise<void> {
|
|
10
10
|
// Add the forward schema change.
|
|
@@ -51,11 +51,11 @@ export interface CreateMigrationFileOptions {
|
|
|
51
51
|
* ```
|
|
52
52
|
*/
|
|
53
53
|
export async function createMigrationFile(
|
|
54
|
-
options: CreateMigrationFileOptions
|
|
54
|
+
options: CreateMigrationFileOptions,
|
|
55
55
|
): Promise<string> {
|
|
56
56
|
if (!MIGRATION_NAME_PATTERN.test(options.name)) {
|
|
57
57
|
throw new Error(
|
|
58
|
-
"Migration name must use lowercase letters, digits, and single hyphens."
|
|
58
|
+
"Migration name must use lowercase letters, digits, and single hyphens.",
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -63,7 +63,7 @@ export async function createMigrationFile(
|
|
|
63
63
|
const migrationDirectory = path.resolve(options.migrationDirectory);
|
|
64
64
|
const filePath = path.join(
|
|
65
65
|
migrationDirectory,
|
|
66
|
-
`${timestamp}_${options.name}.ts
|
|
66
|
+
`${timestamp}_${options.name}.ts`,
|
|
67
67
|
);
|
|
68
68
|
|
|
69
69
|
await mkdir(migrationDirectory, { recursive: true });
|