@pelatform/starter 0.2.13 → 0.2.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/extend.d.ts CHANGED
@@ -1,2 +1,8 @@
1
1
  export * from '@pelatform/starter.config';
2
2
  export * from '@pelatform/starter.utils';
3
+ import '@pelatform/starter.account';
4
+ import '@pelatform/starter.apikey';
5
+ import '@pelatform/starter.auth';
6
+ import '@pelatform/starter.hook';
7
+ import '@pelatform/starter.shared';
8
+ import '@pelatform/starter.workspace';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  export * from '@pelatform/starter.account';
2
- export * from '@pelatform/starter.admin';
3
2
  export * from '@pelatform/starter.apikey';
4
3
  export * from '@pelatform/starter.auth';
5
4
  export * from '@pelatform/starter.hook';
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  // src/index.ts
2
2
  export * from "@pelatform/starter.account";
3
- export * from "@pelatform/starter.admin";
4
3
  export * from "@pelatform/starter.apikey";
5
4
  export * from "@pelatform/starter.auth";
6
5
  export * from "@pelatform/starter.hook";
package/dist/server.js CHANGED
@@ -63,14 +63,17 @@ var createGuard = (
63
63
  const session = await getSession(auth);
64
64
  if (!session || !session.user) {
65
65
  return Response.json(
66
- { error: "Unauthorized", message: "Login required." },
66
+ { ok: false, error: { code: "UNAUTHORIZED", message: "Login required." } },
67
67
  { status: 401 }
68
68
  );
69
69
  }
70
70
  const result = await fn(session, req, ctx);
71
71
  if (result instanceof Response) return result;
72
72
  if (result !== true && !(typeof result === "object" && result.ok === true)) {
73
- return Response.json({ error: "Forbidden" }, { status: 403 });
73
+ return Response.json(
74
+ { ok: false, error: { code: "FORBIDDEN", message: "Forbidden" } },
75
+ { status: 403 }
76
+ );
74
77
  }
75
78
  const meta = typeof result === "object" && result.meta || {};
76
79
  const params = await ctx.params || {};
package/dist/style.css CHANGED
@@ -1,5 +1,4 @@
1
1
  @import "@pelatform/starter.account/css";
2
- @import "@pelatform/starter.admin/css";
3
2
  @import "@pelatform/starter.apikey/css";
4
3
  @import "@pelatform/starter.auth/css";
5
4
  @import "@pelatform/starter.shared/css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pelatform/starter",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "description": "A collection of SaaS starter kit components and utilities for Pelatform applications.",
5
5
  "author": "Pelatform",
6
6
  "license": "MIT",
@@ -14,10 +14,6 @@
14
14
  "types": "./dist/index.d.ts",
15
15
  "default": "./dist/index.js"
16
16
  },
17
- "./db": {
18
- "types": "./dist/db.d.ts",
19
- "default": "./dist/db.js"
20
- },
21
17
  "./extend": {
22
18
  "types": "./dist/extend.d.ts",
23
19
  "default": "./dist/extend.js"
@@ -45,15 +41,13 @@
45
41
  ],
46
42
  "dependencies": {
47
43
  "@pelatform/starter.account": "0.2.10",
48
- "@pelatform/starter.admin": "0.1.5",
49
- "@pelatform/starter.apikey": "0.2.9",
44
+ "@pelatform/starter.apikey": "0.2.10",
50
45
  "@pelatform/starter.auth": "0.2.8",
51
46
  "@pelatform/starter.config": "0.2.2",
52
- "@pelatform/starter.db": "0.1.0",
53
47
  "@pelatform/starter.hook": "0.2.4",
54
- "@pelatform/starter.shared": "0.2.12",
55
- "@pelatform/starter.utils": "0.2.7",
56
- "@pelatform/starter.workspace": "0.2.10"
48
+ "@pelatform/starter.shared": "0.2.13",
49
+ "@pelatform/starter.utils": "0.2.8",
50
+ "@pelatform/starter.workspace": "0.2.11"
57
51
  },
58
52
  "devDependencies": {
59
53
  "@pelatform/tsconfig": "^0.1.4",
package/dist/db.d.ts DELETED
@@ -1,10 +0,0 @@
1
- export * from '@pelatform/starter.db';
2
- import '@pelatform/starter.config';
3
- import '@pelatform/starter.utils';
4
- import '@pelatform/starter.account';
5
- import '@pelatform/starter.admin';
6
- import '@pelatform/starter.apikey';
7
- import '@pelatform/starter.auth';
8
- import '@pelatform/starter.hook';
9
- import '@pelatform/starter.shared';
10
- import '@pelatform/starter.workspace';
package/dist/db.js DELETED
@@ -1,2 +0,0 @@
1
- // src/db.ts
2
- export * from "@pelatform/starter.db";