@meridianjs/meridian 0.1.3 → 0.1.4

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.
@@ -0,0 +1,4 @@
1
+ import type { Response } from "express";
2
+ export declare const GET: (req: any, res: Response) => Promise<void>;
3
+ export declare const PUT: (req: any, res: Response) => Promise<void>;
4
+ //# sourceMappingURL=route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../../../../src/api/admin/workspaces/[id]/route.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAEvC,eAAO,MAAM,GAAG,GAAU,KAAK,GAAG,EAAE,KAAK,QAAQ,kBAIhD,CAAA;AAED,eAAO,MAAM,GAAG,GAAU,KAAK,GAAG,EAAE,KAAK,QAAQ,kBAQhD,CAAA"}
@@ -0,0 +1,15 @@
1
+ export const GET = async (req, res) => {
2
+ const workspaceService = req.scope.resolve("workspaceModuleService");
3
+ const workspace = await workspaceService.retrieveWorkspace(req.params.id);
4
+ res.json({ workspace });
5
+ };
6
+ export const PUT = async (req, res) => {
7
+ const workspaceService = req.scope.resolve("workspaceModuleService");
8
+ const { name } = req.body;
9
+ const updates = {};
10
+ if (name !== undefined)
11
+ updates.name = name.trim();
12
+ const workspace = await workspaceService.updateWorkspace(req.params.id, updates);
13
+ res.json({ workspace });
14
+ };
15
+ //# sourceMappingURL=route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.js","sourceRoot":"","sources":["../../../../../src/api/admin/workspaces/[id]/route.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,EAAE,GAAQ,EAAE,GAAa,EAAE,EAAE;IACnD,MAAM,gBAAgB,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,wBAAwB,CAAQ,CAAA;IAC3E,MAAM,SAAS,GAAG,MAAM,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAA;IACzE,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAA;AACzB,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,GAAG,GAAG,KAAK,EAAE,GAAQ,EAAE,GAAa,EAAE,EAAE;IACnD,MAAM,gBAAgB,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,wBAAwB,CAAQ,CAAA;IAC3E,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,CAAC,IAAI,CAAA;IACzB,MAAM,OAAO,GAA4B,EAAE,CAAA;IAC3C,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAA;IAElD,MAAM,SAAS,GAAG,MAAM,gBAAgB,CAAC,eAAe,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;IAChF,GAAG,CAAC,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,CAAA;AACzB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meridianjs/meridian",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
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",
@@ -17,7 +17,7 @@
17
17
  "dev": "tsc --outDir dist --watch",
18
18
  "typecheck": "tsc --noEmit",
19
19
  "clean": "rm -rf dist",
20
- "prepublishOnly": "npm run build"
20
+ "prepublishOnly": "cd ../.. && npm run check:routes && cd packages/meridian && npm run build"
21
21
  },
22
22
  "dependencies": {
23
23
  "@meridianjs/framework-utils": "^0.1.0",