aem-mcp-server 1.0.3 → 1.0.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.
Files changed (3) hide show
  1. package/dist/cli.js +38 -0
  2. package/package.json +3 -2
  3. package/cli/cli.js +0 -21
package/dist/cli.js ADDED
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ var import_yargs = __toESM(require("yargs"), 1);
25
+ var import_helpers = require("yargs/helpers");
26
+ var import_index = require("./index.js");
27
+ const argv = (0, import_yargs.default)((0, import_helpers.hideBin)(process.argv)).options({
28
+ host: { type: "string", default: "http://localhost:4502" },
29
+ user: { type: "string", default: "admin" },
30
+ pass: { type: "string", default: "admin" },
31
+ mcpPort: { type: "number", default: 3e3 },
32
+ explorer: { type: "boolean", default: false }
33
+ }).help().alias("h", "help").parseSync();
34
+ if (argv.help) {
35
+ process.exit(0);
36
+ }
37
+ const { host, user, pass, mcpPort, explorer } = argv;
38
+ (0, import_index.startServer)({ host, user, pass, mcpPort, explorer });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aem-mcp-server",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "AEM Model Context Protocol (MCP) server",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -20,7 +20,7 @@
20
20
  ],
21
21
  "main": "./dist/index.js",
22
22
  "bin": {
23
- "aem-mcp": "./cli/cli.js"
23
+ "aem-mcp": "./dist/cli.js"
24
24
  },
25
25
  "files": [
26
26
  "cli/**/*.js",
@@ -51,6 +51,7 @@
51
51
  "@types/node": "^24.0.14",
52
52
  "@types/swagger-jsdoc": "^6.0.4",
53
53
  "@types/swagger-ui-express": "^4.1.8",
54
+ "@types/yargs": "^17.0.33",
54
55
  "esbuild": "^0.25.6",
55
56
  "ts-node-dev": "^2.0.0",
56
57
  "tsx": "^4.20.3",
package/cli/cli.js DELETED
@@ -1,21 +0,0 @@
1
- const yargs = require('yargs');
2
- const { hideBin } = require('yargs/helpers');
3
- const { startServer } = require('../dist/index.js');
4
-
5
- const argv = yargs(hideBin(process.argv)).options({
6
- host: { type: 'string', default: 'http://localhost:4502' },
7
- user: { type: 'string', default: 'admin' },
8
- pass: { type: 'string', default: 'admin' },
9
- mcpPort: { type: 'number', default: 3000 },
10
- explorer: { type: 'boolean', default: false },
11
- })
12
- .help()
13
- .alias('h', 'help')
14
- .argv;
15
-
16
- if (argv.help) {
17
- process.exit(0); // prevent startServer from running
18
- }
19
-
20
- const { host, user, pass, mcpPort, explorer } = argv;
21
- startServer({ host, user, pass, mcpPort, explorer });