@gxp-dev/tools 2.0.50 → 2.0.52

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.
@@ -12,9 +12,23 @@ const { exportCmd } = require("../constants");
12
12
  const { findProjectRoot, resolveGxPaths } = require("../utils");
13
13
 
14
14
  /**
15
- * Get the plugin name from package.json
15
+ * Get the plugin name from app-manifest.json (preferred) or package.json
16
16
  */
17
17
  function getPluginName(projectPath) {
18
+ // Check app-manifest.json first
19
+ try {
20
+ const manifestPath = path.join(projectPath, "app-manifest.json");
21
+ if (fs.existsSync(manifestPath)) {
22
+ const manifest = JSON.parse(fs.readFileSync(manifestPath, "utf-8"));
23
+ if (manifest.name) {
24
+ return manifest.name.replace(/[^a-zA-Z0-9-_]/g, "-");
25
+ }
26
+ }
27
+ } catch (error) {
28
+ console.warn("Could not read app-manifest.json, falling back to package.json");
29
+ }
30
+
31
+ // Fall back to package.json
18
32
  try {
19
33
  const packageJsonPath = path.join(projectPath, "package.json");
20
34
  if (fs.existsSync(packageJsonPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gxp-dev/tools",
3
- "version": "2.0.50",
3
+ "version": "2.0.52",
4
4
  "description": "Dev tools to create platform plugins",
5
5
  "type": "commonjs",
6
6
  "publishConfig": {
@@ -208,6 +208,14 @@ export default defineConfig(({ mode }) => {
208
208
  name: "request-logger-cors",
209
209
  configureServer(server) {
210
210
  server.middlewares.use((req, res, next) => {
211
+ // Health check route
212
+ if (req.url === "/__health") {
213
+ res.statusCode = 200;
214
+ res.setHeader("Content-Type", "application/json");
215
+ res.end(JSON.stringify({ status: "ok" }));
216
+ return;
217
+ }
218
+
211
219
  const start = Date.now();
212
220
  const originalEnd = res.end;
213
221