@arch-cadre/sample-module 1.0.14 → 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 +0 -10
- package/dist/index.mjs +0 -10
- package/package.json +7 -7
- package/src/index.ts +8 -8
package/dist/index.cjs
CHANGED
|
@@ -4,9 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var _server = require("@arch-cadre/core/server");
|
|
8
7
|
var _intl = require("@arch-cadre/intl");
|
|
9
|
-
var _drizzleOrm = require("drizzle-orm");
|
|
10
8
|
var _manifest = _interopRequireDefault(require("../manifest.json"));
|
|
11
9
|
var _routes = require("./routes.cjs");
|
|
12
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -15,14 +13,6 @@ const _module = {
|
|
|
15
13
|
onEnable: async () => {},
|
|
16
14
|
onDisable: async () => {
|
|
17
15
|
console.log("[Module:Sample] onDisable: Dropping all tables physically...");
|
|
18
|
-
try {
|
|
19
|
-
const tables = ["sample"];
|
|
20
|
-
for (const table of tables) {
|
|
21
|
-
await _server.db.execute(_drizzleOrm.sql.raw(`DROP TABLE IF EXISTS ${table} CASCADE`));
|
|
22
|
-
}
|
|
23
|
-
} catch (e) {
|
|
24
|
-
console.error("[Module:Sample] onDisable Error:", e);
|
|
25
|
-
}
|
|
26
16
|
},
|
|
27
17
|
routes: {
|
|
28
18
|
private: _routes.privateRoutes,
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { db } from "@arch-cadre/core/server";
|
|
2
1
|
import { i18n } from "@arch-cadre/intl";
|
|
3
|
-
import { sql } from "drizzle-orm";
|
|
4
2
|
import manifest from "../manifest.json";
|
|
5
3
|
import { apiRoutes, privateRoutes } from "./routes.mjs";
|
|
6
4
|
const module = {
|
|
@@ -9,14 +7,6 @@ const module = {
|
|
|
9
7
|
},
|
|
10
8
|
onDisable: async () => {
|
|
11
9
|
console.log("[Module:Sample] onDisable: Dropping all tables physically...");
|
|
12
|
-
try {
|
|
13
|
-
const tables = ["sample"];
|
|
14
|
-
for (const table of tables) {
|
|
15
|
-
await db.execute(sql.raw(`DROP TABLE IF EXISTS ${table} CASCADE`));
|
|
16
|
-
}
|
|
17
|
-
} catch (e) {
|
|
18
|
-
console.error("[Module:Sample] onDisable Error:", e);
|
|
19
|
-
}
|
|
20
10
|
},
|
|
21
11
|
routes: {
|
|
22
12
|
private: privateRoutes,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arch-cadre/sample-module",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Sample 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.
|
|
31
|
-
"@arch-cadre/modules": "^0.0.
|
|
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
|
"drizzle-orm": "1.0.0-beta.6-4414a19",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"zod": "^3.24.1"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@arch-cadre/core": "^0.0.
|
|
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.
|
|
48
|
-
"@arch-cadre/intl": "^0.0.
|
|
49
|
-
"@arch-cadre/ui": "^0.0.
|
|
47
|
+
"@arch-cadre/core": "^0.0.59",
|
|
48
|
+
"@arch-cadre/intl": "^0.0.59",
|
|
49
|
+
"@arch-cadre/ui": "^0.0.59",
|
|
50
50
|
"next": ">=13.0.0",
|
|
51
51
|
"react": "^19.0.0"
|
|
52
52
|
},
|
package/src/index.ts
CHANGED
|
@@ -12,14 +12,14 @@ const module: IModule = {
|
|
|
12
12
|
|
|
13
13
|
onDisable: async () => {
|
|
14
14
|
console.log("[Module:Sample] onDisable: Dropping all tables physically...");
|
|
15
|
-
try {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} catch (e) {
|
|
21
|
-
|
|
22
|
-
}
|
|
15
|
+
// try {
|
|
16
|
+
// const tables = ["sample"];
|
|
17
|
+
// for (const table of tables) {
|
|
18
|
+
// await db.execute(sql.raw(`DROP TABLE IF EXISTS ${table} CASCADE`));
|
|
19
|
+
// }
|
|
20
|
+
// } catch (e) {
|
|
21
|
+
// console.error("[Module:Sample] onDisable Error:", e);
|
|
22
|
+
// }
|
|
23
23
|
},
|
|
24
24
|
|
|
25
25
|
routes: {
|