@meridianjs/meridian 0.1.0 → 0.1.2
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/api/auth/setup/route.d.ts +8 -0
- package/dist/api/auth/setup/route.d.ts.map +1 -0
- package/dist/api/auth/setup/route.js +17 -0
- package/dist/api/auth/setup/route.js.map +1 -0
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -3
- package/dist/index.js.map +1 -1
- package/package.json +9 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Response } from "express";
|
|
2
|
+
/**
|
|
3
|
+
* GET /auth/setup
|
|
4
|
+
* Public endpoint — no auth required.
|
|
5
|
+
* Returns whether the app needs first-time setup (no users registered yet).
|
|
6
|
+
*/
|
|
7
|
+
export declare const GET: (req: any, res: Response) => Promise<void>;
|
|
8
|
+
//# sourceMappingURL=route.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../src/api/auth/setup/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEhD;;;;GAIG;AACH,eAAO,MAAM,GAAG,GAAU,KAAK,GAAG,EAAE,KAAK,QAAQ,kBAShD,CAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GET /auth/setup
|
|
3
|
+
* Public endpoint — no auth required.
|
|
4
|
+
* Returns whether the app needs first-time setup (no users registered yet).
|
|
5
|
+
*/
|
|
6
|
+
export const GET = async (req, res) => {
|
|
7
|
+
try {
|
|
8
|
+
const userService = req.scope.resolve("userModuleService");
|
|
9
|
+
const count = await userService.countUsers();
|
|
10
|
+
res.json({ needsSetup: count === 0 });
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
// userModuleService not configured — assume setup not needed
|
|
14
|
+
res.json({ needsSetup: false });
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=route.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../src/api/auth/setup/route.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,EAAE,GAAQ,EAAE,GAAa,EAAE,EAAE;IACnD,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAmB,CAAQ,CAAA;QACjE,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,UAAU,EAAE,CAAA;QAC5C,GAAG,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,KAAK,KAAK,CAAC,EAAE,CAAC,CAAA;IACvC,CAAC;IAAC,MAAM,CAAC;QACP,6DAA6D;QAC7D,GAAG,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAA;IACjC,CAAC;AACH,CAAC,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
+
import type { PluginRegistrationContext } from "@meridianjs/types";
|
|
1
2
|
/**
|
|
2
3
|
* Tells the Meridian plugin loader where to find this package's
|
|
3
4
|
* api/, links/, subscribers/, and jobs/ directories.
|
|
4
|
-
*
|
|
5
|
-
* Points to the package root so the loader can probe dist/ (production)
|
|
6
|
-
* or src/ (tsx dev mode) automatically.
|
|
7
5
|
*/
|
|
8
6
|
export declare const pluginRoot: string;
|
|
7
|
+
export default function register(ctx: PluginRegistrationContext): Promise<void>;
|
|
9
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAIlE;;;GAGG;AACH,eAAO,MAAM,UAAU,QAAgC,CAAA;AAyBvD,wBAA8B,QAAQ,CAAC,GAAG,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIpF"}
|
package/dist/index.js
CHANGED
|
@@ -4,9 +4,33 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
4
4
|
/**
|
|
5
5
|
* Tells the Meridian plugin loader where to find this package's
|
|
6
6
|
* api/, links/, subscribers/, and jobs/ directories.
|
|
7
|
-
*
|
|
8
|
-
* Points to the package root so the loader can probe dist/ (production)
|
|
9
|
-
* or src/ (tsx dev mode) automatically.
|
|
10
7
|
*/
|
|
11
8
|
export const pluginRoot = path.resolve(__dirname, "..");
|
|
9
|
+
/**
|
|
10
|
+
* Core modules that every Meridian application requires.
|
|
11
|
+
* Auto-loaded when @meridianjs/meridian is registered as a plugin,
|
|
12
|
+
* so users don't need to list them individually in meridian.config.ts.
|
|
13
|
+
*
|
|
14
|
+
* Only truly optional modules (event bus, job queue, custom modules)
|
|
15
|
+
* belong in config.modules[].
|
|
16
|
+
*/
|
|
17
|
+
const CORE_MODULES = [
|
|
18
|
+
"@meridianjs/user",
|
|
19
|
+
"@meridianjs/workspace",
|
|
20
|
+
"@meridianjs/auth",
|
|
21
|
+
"@meridianjs/project",
|
|
22
|
+
"@meridianjs/issue",
|
|
23
|
+
"@meridianjs/sprint",
|
|
24
|
+
"@meridianjs/activity",
|
|
25
|
+
"@meridianjs/notification",
|
|
26
|
+
"@meridianjs/invitation",
|
|
27
|
+
"@meridianjs/workspace-member",
|
|
28
|
+
"@meridianjs/team-member",
|
|
29
|
+
"@meridianjs/project-member",
|
|
30
|
+
];
|
|
31
|
+
export default async function register(ctx) {
|
|
32
|
+
for (const resolve of CORE_MODULES) {
|
|
33
|
+
await ctx.addModule({ resolve });
|
|
34
|
+
}
|
|
35
|
+
}
|
|
12
36
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,IAAI,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,IAAI,MAAM,WAAW,CAAA;AAG5B,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;AAEvD;;;;;;;GAOG;AACH,MAAM,YAAY,GAAG;IACnB,kBAAkB;IAClB,uBAAuB;IACvB,kBAAkB;IAClB,qBAAqB;IACrB,mBAAmB;IACnB,oBAAoB;IACpB,sBAAsB;IACtB,0BAA0B;IAC1B,wBAAwB;IACxB,8BAA8B;IAC9B,yBAAyB;IACzB,4BAA4B;CAC7B,CAAA;AAED,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,QAAQ,CAAC,GAA8B;IACnE,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;QACnC,MAAM,GAAG,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;IAClC,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meridianjs/meridian",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Default API routes, workflows, links, and subscribers for Meridian applications",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -23,10 +23,18 @@
|
|
|
23
23
|
"@meridianjs/framework-utils": "^0.1.0",
|
|
24
24
|
"@meridianjs/workflow-engine": "^0.1.0",
|
|
25
25
|
"@meridianjs/types": "^0.1.1",
|
|
26
|
+
"@meridianjs/user": "^0.1.0",
|
|
26
27
|
"@meridianjs/workspace": "^0.1.0",
|
|
28
|
+
"@meridianjs/auth": "^0.1.0",
|
|
27
29
|
"@meridianjs/project": "^0.1.0",
|
|
28
30
|
"@meridianjs/issue": "^0.1.0",
|
|
29
31
|
"@meridianjs/sprint": "^0.1.0",
|
|
32
|
+
"@meridianjs/activity": "^0.1.0",
|
|
33
|
+
"@meridianjs/notification": "^0.1.0",
|
|
34
|
+
"@meridianjs/invitation": "^0.1.0",
|
|
35
|
+
"@meridianjs/workspace-member": "^0.1.0",
|
|
36
|
+
"@meridianjs/team-member": "^0.1.0",
|
|
37
|
+
"@meridianjs/project-member": "^0.1.0",
|
|
30
38
|
"multer": "^1.4.5-lts.1",
|
|
31
39
|
"zod": "^3.24.0"
|
|
32
40
|
},
|