sst 2.1.0 → 2.1.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.
@@ -2,7 +2,7 @@ import { Kysely } from "kysely";
2
2
  import { DataApiDialect } from "kysely-data-api";
3
3
  import RDSDataService from "aws-sdk/clients/rdsdataservice.js";
4
4
  import * as fs from "fs/promises";
5
- import { DatabaseMetadata, EnumCollection, PostgresDialect, Serializer, Transformer, } from "kysely-codegen";
5
+ import { DatabaseMetadata, EnumCollection, PostgresDialect, MysqlDialect, Serializer, Transformer, } from "kysely-codegen";
6
6
  import { Context } from "../../../context/context.js";
7
7
  import { useBus } from "../../../bus.js";
8
8
  import { useProject } from "../../../project.js";
@@ -53,8 +53,11 @@ export const useKyselyTypeGenerator = Context.memo(async () => {
53
53
  })),
54
54
  }));
55
55
  const transformer = new Transformer();
56
+ const Dialect = db.engine.includes("postgres")
57
+ ? new PostgresDialect()
58
+ : new MysqlDialect();
56
59
  const nodes = transformer.transform({
57
- dialect: new PostgresDialect(),
60
+ dialect: Dialect,
58
61
  camelCase: db.types.camelCase === true,
59
62
  metadata: new DatabaseMetadata(metadata, new EnumCollection()),
60
63
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sst",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "bin": {
5
5
  "sst": "cli/sst.js"
6
6
  },
package/sst.mjs CHANGED
@@ -6235,6 +6235,7 @@ import {
6235
6235
  DatabaseMetadata,
6236
6236
  EnumCollection,
6237
6237
  PostgresDialect,
6238
+ MysqlDialect,
6238
6239
  Serializer,
6239
6240
  Transformer
6240
6241
  } from "kysely-codegen";
@@ -6290,8 +6291,9 @@ var init_kysely = __esm({
6290
6291
  }))
6291
6292
  }));
6292
6293
  const transformer = new Transformer();
6294
+ const Dialect = db.engine.includes("postgres") ? new PostgresDialect() : new MysqlDialect();
6293
6295
  const nodes = transformer.transform({
6294
- dialect: new PostgresDialect(),
6296
+ dialect: Dialect,
6295
6297
  camelCase: db.types.camelCase === true,
6296
6298
  metadata: new DatabaseMetadata(metadata3, new EnumCollection())
6297
6299
  });