@arch-cadre/two-factor-email 1.0.13 → 1.0.15

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/dist/index.cjs CHANGED
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
 
7
7
  var _server = require("@arch-cadre/core/server");
8
- var _drizzleOrm = require("drizzle-orm");
9
8
  var _manifest = _interopRequireDefault(require("../manifest.json"));
10
9
  var _actions = require("./actions.cjs");
11
10
  var _routes = require("./routes.cjs");
@@ -42,14 +41,6 @@ const twoFactorEmailModule = {
42
41
  },
43
42
  onDisable: async () => {
44
43
  console.log("[Module:2FA-Email] onDisable: Dropping all tables physically...");
45
- try {
46
- const tables = ["two_factor_settings", "two_factor_tokens"];
47
- for (const table of tables) {
48
- await _server.db.execute(_drizzleOrm.sql.raw(`DROP TABLE IF EXISTS ${table} CASCADE`));
49
- }
50
- } catch (e) {
51
- console.error("[Module:2FA-Email] onDisable Error:", e);
52
- }
53
44
  },
54
45
  extensions: [{
55
46
  id: "2fa-settings-section",
package/dist/index.mjs CHANGED
@@ -1,5 +1,4 @@
1
- import { db, registerAuthValidator } from "@arch-cadre/core/server";
2
- import { sql } from "drizzle-orm";
1
+ import { registerAuthValidator } from "@arch-cadre/core/server";
3
2
  import manifest from "../manifest.json";
4
3
  import { generateAndSendCode, is2FAEnabled } from "./actions.mjs";
5
4
  import { publicRoutes } from "./routes.mjs";
@@ -42,14 +41,6 @@ const twoFactorEmailModule = {
42
41
  console.log(
43
42
  "[Module:2FA-Email] onDisable: Dropping all tables physically..."
44
43
  );
45
- try {
46
- const tables = ["two_factor_settings", "two_factor_tokens"];
47
- for (const table of tables) {
48
- await db.execute(sql.raw(`DROP TABLE IF EXISTS ${table} CASCADE`));
49
- }
50
- } catch (e) {
51
- console.error("[Module:2FA-Email] onDisable Error:", e);
52
- }
53
44
  },
54
45
  extensions: [
55
46
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arch-cadre/two-factor-email",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
4
4
  "description": "Email-based two-factor authentication module for Kryo framework",
5
5
  "type": "module",
6
6
  "exports": {
@@ -27,8 +27,8 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@hookform/resolvers": "^3.10.0",
30
- "@arch-cadre/ui": "^0.0.57",
31
- "@arch-cadre/modules": "^0.0.83",
30
+ "@arch-cadre/ui": "^0.0.59",
31
+ "@arch-cadre/modules": "^0.0.85",
32
32
  "lucide-react": "^0.475.0",
33
33
  "react-hook-form": "^7.54.2",
34
34
  "sonner": "^2.0.7",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/pg": "^8.16.0",
39
- "@arch-cadre/core": "^0.0.57",
39
+ "@arch-cadre/core": "^0.0.59",
40
40
  "@types/react": "^19",
41
41
  "next": "16.1.1",
42
42
  "react": "^19.0.0",
@@ -44,9 +44,9 @@
44
44
  "unbuild": "^3.6.1"
45
45
  },
46
46
  "peerDependencies": {
47
- "@arch-cadre/core": "^0.0.57",
48
- "@arch-cadre/intl": "^0.0.57",
49
- "@arch-cadre/ui": "^0.0.57",
47
+ "@arch-cadre/core": "^0.0.59",
48
+ "@arch-cadre/intl": "^0.0.59",
49
+ "@arch-cadre/ui": "^0.0.59",
50
50
  "pg": "^8.16.3",
51
51
  "drizzle-orm": "1.0.0-beta.6-4414a19",
52
52
  "next": ">=13.0.0",
package/src/index.ts CHANGED
@@ -56,14 +56,14 @@ const twoFactorEmailModule: IModule = {
56
56
  "[Module:2FA-Email] onDisable: Dropping all tables physically...",
57
57
  );
58
58
 
59
- try {
60
- const tables = ["two_factor_settings", "two_factor_tokens"];
61
- for (const table of tables) {
62
- await db.execute(sql.raw(`DROP TABLE IF EXISTS ${table} CASCADE`));
63
- }
64
- } catch (e) {
65
- console.error("[Module:2FA-Email] onDisable Error:", e);
66
- }
59
+ // try {
60
+ // const tables = ["two_factor_settings", "two_factor_tokens"];
61
+ // for (const table of tables) {
62
+ // await db.execute(sql.raw(`DROP TABLE IF EXISTS ${table} CASCADE`));
63
+ // }
64
+ // } catch (e) {
65
+ // console.error("[Module:2FA-Email] onDisable Error:", e);
66
+ // }
67
67
  },
68
68
 
69
69
  extensions: [