@antonytm/mcp-sitecore-server 0.8.0 → 0.8.1-bundle

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 (137) hide show
  1. package/dist/bundle.js +6510 -0
  2. package/dist/bundle.js.map +7 -0
  3. package/package.json +13 -14
  4. package/dist/app.js +0 -3
  5. package/dist/app.js.map +0 -1
  6. package/dist/config.js +0 -63
  7. package/dist/config.js.map +0 -1
  8. package/dist/const.js +0 -2
  9. package/dist/const.js.map +0 -1
  10. package/dist/helper.js +0 -19
  11. package/dist/helper.js.map +0 -1
  12. package/dist/index.js +0 -12
  13. package/dist/index.js.map +0 -1
  14. package/dist/run.js +0 -7
  15. package/dist/run.js.map +0 -1
  16. package/dist/server.js +0 -67
  17. package/dist/server.js.map +0 -1
  18. package/dist/sse.js +0 -31
  19. package/dist/sse.js.map +0 -1
  20. package/dist/stdio.js +0 -8
  21. package/dist/stdio.js.map +0 -1
  22. package/dist/tools/graphql/generic/introspection.js +0 -34
  23. package/dist/tools/graphql/generic/introspection.js.map +0 -1
  24. package/dist/tools/graphql/generic/query.js +0 -37
  25. package/dist/tools/graphql/generic/query.js.map +0 -1
  26. package/dist/tools/graphql/register-graphql.js +0 -24
  27. package/dist/tools/graphql/register-graphql.js.map +0 -1
  28. package/dist/tools/item-service/client.js +0 -428
  29. package/dist/tools/item-service/client.js.map +0 -1
  30. package/dist/tools/item-service/composite/get-item-descendants.js +0 -30
  31. package/dist/tools/item-service/composite/get-item-descendants.js.map +0 -1
  32. package/dist/tools/item-service/composite/get-languages.js +0 -19
  33. package/dist/tools/item-service/composite/get-languages.js.map +0 -1
  34. package/dist/tools/item-service/register-item-service.js +0 -156
  35. package/dist/tools/item-service/register-item-service.js.map +0 -1
  36. package/dist/tools/item-service/simple/create-item.js +0 -17
  37. package/dist/tools/item-service/simple/create-item.js.map +0 -1
  38. package/dist/tools/item-service/simple/delete-item.js +0 -23
  39. package/dist/tools/item-service/simple/delete-item.js.map +0 -1
  40. package/dist/tools/item-service/simple/edit-item.js +0 -23
  41. package/dist/tools/item-service/simple/edit-item.js.map +0 -1
  42. package/dist/tools/item-service/simple/get-item-by-path.js +0 -17
  43. package/dist/tools/item-service/simple/get-item-by-path.js.map +0 -1
  44. package/dist/tools/item-service/simple/get-item-children.js +0 -17
  45. package/dist/tools/item-service/simple/get-item-children.js.map +0 -1
  46. package/dist/tools/item-service/simple/get-item.js +0 -18
  47. package/dist/tools/item-service/simple/get-item.js.map +0 -1
  48. package/dist/tools/item-service/simple/run-stored-query.js +0 -24
  49. package/dist/tools/item-service/simple/run-stored-query.js.map +0 -1
  50. package/dist/tools/item-service/simple/run-stored-search.js +0 -24
  51. package/dist/tools/item-service/simple/run-stored-search.js.map +0 -1
  52. package/dist/tools/item-service/simple/search-items.js +0 -17
  53. package/dist/tools/item-service/simple/search-items.js.map +0 -1
  54. package/dist/tools/powershell/client.js +0 -58
  55. package/dist/tools/powershell/client.js.map +0 -1
  56. package/dist/tools/powershell/composite/register-composite-powershell.js +0 -5
  57. package/dist/tools/powershell/composite/register-composite-powershell.js.map +0 -1
  58. package/dist/tools/powershell/composite/security/register-security-powershell.js +0 -5
  59. package/dist/tools/powershell/composite/security/register-security-powershell.js.map +0 -1
  60. package/dist/tools/powershell/composite/security/register-set-item-acl.js +0 -59
  61. package/dist/tools/powershell/composite/security/register-set-item-acl.js.map +0 -1
  62. package/dist/tools/powershell/output.js +0 -8
  63. package/dist/tools/powershell/output.js.map +0 -1
  64. package/dist/tools/powershell/register-powershell.js +0 -7
  65. package/dist/tools/powershell/register-powershell.js.map +0 -1
  66. package/dist/tools/powershell/simple/generic.js +0 -27
  67. package/dist/tools/powershell/simple/generic.js.map +0 -1
  68. package/dist/tools/powershell/simple/indexing/register-get-search-index.js +0 -28
  69. package/dist/tools/powershell/simple/indexing/register-get-search-index.js.map +0 -1
  70. package/dist/tools/powershell/simple/indexing/register-indexing-powershell.js +0 -7
  71. package/dist/tools/powershell/simple/indexing/register-indexing-powershell.js.map +0 -1
  72. package/dist/tools/powershell/simple/indexing/register-initialize-search-index.js +0 -24
  73. package/dist/tools/powershell/simple/indexing/register-initialize-search-index.js.map +0 -1
  74. package/dist/tools/powershell/simple/provider/register-get-item.js +0 -118
  75. package/dist/tools/powershell/simple/provider/register-get-item.js.map +0 -1
  76. package/dist/tools/powershell/simple/provider/register-provider-powershell.js +0 -5
  77. package/dist/tools/powershell/simple/provider/register-provider-powershell.js.map +0 -1
  78. package/dist/tools/powershell/simple/register-simple-powershell.js +0 -9
  79. package/dist/tools/powershell/simple/register-simple-powershell.js.map +0 -1
  80. package/dist/tools/powershell/simple/security/access-rights.js +0 -33
  81. package/dist/tools/powershell/simple/security/access-rights.js.map +0 -1
  82. package/dist/tools/powershell/simple/security/register-add-item-acl.js +0 -66
  83. package/dist/tools/powershell/simple/security/register-add-item-acl.js.map +0 -1
  84. package/dist/tools/powershell/simple/security/register-add-role-member.js +0 -19
  85. package/dist/tools/powershell/simple/security/register-add-role-member.js.map +0 -1
  86. package/dist/tools/powershell/simple/security/register-clear-item-acl.js +0 -46
  87. package/dist/tools/powershell/simple/security/register-clear-item-acl.js.map +0 -1
  88. package/dist/tools/powershell/simple/security/register-disable-user.js +0 -15
  89. package/dist/tools/powershell/simple/security/register-disable-user.js.map +0 -1
  90. package/dist/tools/powershell/simple/security/register-enable-user.js +0 -15
  91. package/dist/tools/powershell/simple/security/register-enable-user.js.map +0 -1
  92. package/dist/tools/powershell/simple/security/register-get-domain.js +0 -20
  93. package/dist/tools/powershell/simple/security/register-get-domain.js.map +0 -1
  94. package/dist/tools/powershell/simple/security/register-get-item-acl.js +0 -56
  95. package/dist/tools/powershell/simple/security/register-get-item-acl.js.map +0 -1
  96. package/dist/tools/powershell/simple/security/register-get-role-member.js +0 -31
  97. package/dist/tools/powershell/simple/security/register-get-role-member.js.map +0 -1
  98. package/dist/tools/powershell/simple/security/register-get-role.js +0 -24
  99. package/dist/tools/powershell/simple/security/register-get-role.js.map +0 -1
  100. package/dist/tools/powershell/simple/security/register-get-user.js +0 -31
  101. package/dist/tools/powershell/simple/security/register-get-user.js.map +0 -1
  102. package/dist/tools/powershell/simple/security/register-lock-item.js +0 -56
  103. package/dist/tools/powershell/simple/security/register-lock-item.js.map +0 -1
  104. package/dist/tools/powershell/simple/security/register-new-domain.js +0 -15
  105. package/dist/tools/powershell/simple/security/register-new-domain.js.map +0 -1
  106. package/dist/tools/powershell/simple/security/register-new-role.js +0 -16
  107. package/dist/tools/powershell/simple/security/register-new-role.js.map +0 -1
  108. package/dist/tools/powershell/simple/security/register-new-user.js +0 -43
  109. package/dist/tools/powershell/simple/security/register-new-user.js.map +0 -1
  110. package/dist/tools/powershell/simple/security/register-protect-item.js +0 -46
  111. package/dist/tools/powershell/simple/security/register-protect-item.js.map +0 -1
  112. package/dist/tools/powershell/simple/security/register-remove-domain.js +0 -16
  113. package/dist/tools/powershell/simple/security/register-remove-domain.js.map +0 -1
  114. package/dist/tools/powershell/simple/security/register-remove-role.js +0 -16
  115. package/dist/tools/powershell/simple/security/register-remove-role.js.map +0 -1
  116. package/dist/tools/powershell/simple/security/register-remove-rolemember.js +0 -19
  117. package/dist/tools/powershell/simple/security/register-remove-rolemember.js.map +0 -1
  118. package/dist/tools/powershell/simple/security/register-remove-user.js +0 -15
  119. package/dist/tools/powershell/simple/security/register-remove-user.js.map +0 -1
  120. package/dist/tools/powershell/simple/security/register-security-powershell.js +0 -55
  121. package/dist/tools/powershell/simple/security/register-security-powershell.js.map +0 -1
  122. package/dist/tools/powershell/simple/security/register-set-user-password.js +0 -29
  123. package/dist/tools/powershell/simple/security/register-set-user-password.js.map +0 -1
  124. package/dist/tools/powershell/simple/security/register-set-user.js +0 -66
  125. package/dist/tools/powershell/simple/security/register-set-user.js.map +0 -1
  126. package/dist/tools/powershell/simple/security/register-test-account.js +0 -21
  127. package/dist/tools/powershell/simple/security/register-test-account.js.map +0 -1
  128. package/dist/tools/powershell/simple/security/register-test-item-acl.js +0 -59
  129. package/dist/tools/powershell/simple/security/register-test-item-acl.js.map +0 -1
  130. package/dist/tools/powershell/simple/security/register-unlock-item.js +0 -52
  131. package/dist/tools/powershell/simple/security/register-unlock-item.js.map +0 -1
  132. package/dist/tools/powershell/simple/security/register-unlock-user.js +0 -16
  133. package/dist/tools/powershell/simple/security/register-unlock-user.js.map +0 -1
  134. package/dist/tools/powershell/simple/security/register-unprotect-item.js +0 -46
  135. package/dist/tools/powershell/simple/security/register-unprotect-item.js.map +0 -1
  136. package/dist/tools/powershell/utils.js +0 -18
  137. package/dist/tools/powershell/utils.js.map +0 -1
@@ -1,56 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerLockItemPowerShell(server, config) {
5
- server.tool("security-lock-item-by-path", "Lock a Sitecore item by its path.", {
6
- path: z.string()
7
- .describe("The path of the item to lock (e.g. /sitecore/content/Home)"),
8
- force: z.boolean()
9
- .optional().describe("If set to true, will force the lock even if the item is locked by another user"),
10
- passThru: z.boolean().optional()
11
- .describe("If set to true, passes the processed object back to the pipeline"),
12
- database: z.string().optional()
13
- .describe("The database containing the item (defaults to the context database)")
14
- }, async (params) => {
15
- const command = `Lock-Item`;
16
- const options = {
17
- "Path": params.path,
18
- };
19
- if (params.force) {
20
- options["Force"] = "";
21
- }
22
- if (params.passThru) {
23
- options["PassThru"] = "";
24
- }
25
- if (params.database) {
26
- options["Database"] = params.database;
27
- }
28
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
29
- });
30
- server.tool("security-lock-item-by-id", "Lock a Sitecore item by its ID.", {
31
- id: z.string()
32
- .describe("The ID of the item to lock"),
33
- force: z.boolean().optional()
34
- .describe("If set to true, will force the lock even if the item is locked by another user"),
35
- passThru: z.boolean().optional()
36
- .describe("If set to true, passes the processed object back to the pipeline"),
37
- database: z.string().optional()
38
- .describe("The database containing the item (defaults to the context database)")
39
- }, async (params) => {
40
- const command = `Lock-Item`;
41
- const options = {
42
- "Id": params.id,
43
- };
44
- if (params.force) {
45
- options["Force"] = "";
46
- }
47
- if (params.passThru) {
48
- options["PassThru"] = "";
49
- }
50
- if (params.database) {
51
- options["Database"] = params.database;
52
- }
53
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
54
- });
55
- }
56
- //# sourceMappingURL=register-lock-item.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-lock-item.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-lock-item.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,0BAA0B,CAAC,MAAiB,EAAE,MAAc;IACxE,MAAM,CAAC,IAAI,CACP,4BAA4B,EAC5B,mCAAmC,EACnC;QACI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;aACX,QAAQ,CAAC,4DAA4D,CAAC;QAC3E,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE;aACb,QAAQ,EAAE,CAAC,QAAQ,CAAC,gFAAgF,CAAC;QAC1G,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;aAC3B,QAAQ,CAAC,kEAAkE,CAAC;QACjF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC1B,QAAQ,CAAC,qEAAqE,CAAC;KACvF,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,WAAW,CAAC;QAC5B,MAAM,OAAO,GAAwB;YACjC,MAAM,EAAE,MAAM,CAAC,IAAI;SACtB,CAAC;QAEF,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QAC1B,CAAC;QAED,IAAI,MAAM,CAAC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A2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,15 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerNewDomainPowerShell(server, config) {
5
- server.tool("security-new-domain", "Creates a new Sitecore domain.", {
6
- name: z.string().describe("The name of the domain to create"),
7
- }, async (params) => {
8
- const command = `New-Domain`;
9
- const options = {
10
- "Name": params.name,
11
- };
12
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
13
- });
14
- }
15
- //# sourceMappingURL=register-new-domain.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-new-domain.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-new-domain.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,2BAA2B,CAAC,MAAiB,EAAE,MAAc;IACzE,MAAM,CAAC,IAAI,CACP,qBAAqB,EACrB,gCAAgC,EAChC;QACI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;KAChE,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,YAAY,CAAC;QAC7B,MAAM,OAAO,GAAwB;YACjC,MAAM,EAAE,MAAM,CAAC,IAAI;SACtB,CAAC;QAEF,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,16 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerNewRolePowerShell(server, config) {
5
- server.tool("security-new-role", "Creates a new Sitecore role.", {
6
- identity: z.string()
7
- .describe("The identity of the role to create (e.g. 'CustomRole' or full path 'sitecore\\CustomRole')"),
8
- }, async (params) => {
9
- const command = `New-Role`;
10
- const options = {
11
- "Identity": params.identity,
12
- };
13
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
14
- });
15
- }
16
- //# sourceMappingURL=register-new-role.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-new-role.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-new-role.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,yBAAyB,CAAC,MAAiB,EAAE,MAAc;IACvE,MAAM,CAAC,IAAI,CACP,mBAAmB,EACnB,8BAA8B,EAC9B;QACI,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;aACf,QAAQ,CAAC,4FAA4F,CAAC;KAC1G,EACL,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,UAAU,CAAC;QAC3B,MAAM,OAAO,GAAwB;YACjC,UAAU,EAAE,MAAM,CAAC,QAAQ;SAC9B,CAAC;QAEF,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,43 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerNewUserPowerShell(server, config) {
5
- server.tool("security-new-user", "Creates a new Sitecore user.", {
6
- identity: z.string(),
7
- password: z.string().optional(),
8
- email: z.string().optional(),
9
- fullName: z.string().optional(),
10
- comment: z.string().optional(),
11
- portrait: z.string().optional(),
12
- enabled: z.boolean().optional(),
13
- profileItemId: z.string().optional(),
14
- }, async (params) => {
15
- const command = `New-User`;
16
- const options = {
17
- "Identity": params.identity,
18
- };
19
- if (params.password) {
20
- options["Password"] = params.password;
21
- }
22
- if (params.email) {
23
- options["Email"] = params.email;
24
- }
25
- if (params.fullName) {
26
- options["FullName"] = params.fullName;
27
- }
28
- if (params.comment) {
29
- options["Comment"] = params.comment;
30
- }
31
- if (params.portrait) {
32
- options["Portrait"] = params.portrait;
33
- }
34
- if (params.enabled) {
35
- options["Enabled"] = "";
36
- }
37
- if (params.profileItemId) {
38
- options["ProfileItemId"] = params.profileItemId;
39
- }
40
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
41
- });
42
- }
43
- //# sourceMappingURL=register-new-user.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-new-user.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-new-user.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,yBAAyB,CAAC,MAAiB,EAAE,MAAc;IACvE,MAAM,CAAC,IAAI,CACP,mBAAmB,EACnB,8BAA8B,EAC9B;QACI,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;QACpB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC5B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC/B,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAC9B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,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
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerProtectItemPowerShell(server, config) {
5
- server.tool("security-protect-item-by-path", "Protect a Sitecore item by its path.", {
6
- path: z.string()
7
- .describe("The path of the item to protect (e.g. /sitecore/content/Home)"),
8
- passThru: z.boolean().optional()
9
- .describe("If set to true, passes the processed object back to the pipeline"),
10
- database: z.string().optional()
11
- .describe("The database containing the item (defaults to the context database)")
12
- }, async (params) => {
13
- const command = `Protect-Item`;
14
- const options = {
15
- "Path": params.path,
16
- };
17
- if (params.passThru) {
18
- options["PassThru"] = "";
19
- }
20
- if (params.database) {
21
- options["Database"] = params.database;
22
- }
23
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
24
- });
25
- server.tool("security-protect-item-by-id", "Protect a Sitecore item by its ID.", {
26
- id: z.string()
27
- .describe("The ID of the item to protect"),
28
- passThru: z.boolean().optional()
29
- .describe("If set to true, passes the processed object back to the pipeline"),
30
- database: z.string().optional()
31
- .describe("The database containing the item (defaults to the context database)")
32
- }, async (params) => {
33
- const command = `Protect-Item`;
34
- const options = {
35
- "Id": params.id,
36
- };
37
- if (params.passThru) {
38
- options["PassThru"] = "";
39
- }
40
- if (params.database) {
41
- options["Database"] = params.database;
42
- }
43
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
44
- });
45
- }
46
- //# sourceMappingURL=register-protect-item.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-protect-item.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-protect-item.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,6BAA6B,CAAC,MAAiB,EAAE,MAAc;IAC3E,MAAM,CAAC,IAAI,CACP,+BA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CAAC,EAAE;SAClB,CAAC;QAEF,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC;QAC7B,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,16 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerRemoveDomainPowerShell(server, config) {
5
- server.tool("security-remove-domain", "Removes a Sitecore domain.", {
6
- name: z.string()
7
- .describe("The name of the domain to remove"),
8
- }, async (params) => {
9
- const command = `Remove-Domain`;
10
- const options = {
11
- "Name": params.name,
12
- };
13
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
14
- });
15
- }
16
- //# sourceMappingURL=register-remove-domain.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-remove-domain.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-remove-domain.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,8BAA8B,CAAC,MAAiB,EAAE,MAAc;IAC5E,MAAM,CAAC,IAAI,CACP,wBAAwB,EACxB,4BAA4B,EAC5B;QACI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;aACX,QAAQ,CAAC,kCAAkC,CAAC;KACpD,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,eAAe,CAAC;QAChC,MAAM,OAAO,GAAwB;YACjC,MAAM,EAAE,MAAM,CAAC,IAAI;SACtB,CAAC;QAEF,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,16 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerRemoveRolePowerShell(server, config) {
5
- server.tool("security-remove-role", "Removes a Sitecore role.", {
6
- identity: z.string()
7
- .describe("The identity of the role to remove (e.g. 'CustomRole' or full path 'sitecore\\CustomRole')"),
8
- }, async (params) => {
9
- const command = `Remove-Role`;
10
- const options = {
11
- "Identity": params.identity,
12
- };
13
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
14
- });
15
- }
16
- //# sourceMappingURL=register-remove-role.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-remove-role.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-remove-role.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,4BAA4B,CAAC,MAAiB,EAAE,MAAc;IAC1E,MAAM,CAAC,IAAI,CACP,sBAAsB,EACtB,0BAA0B,EAC1B;QACI,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;aACf,QAAQ,CAAC,4FAA4F,CAAC;KAC9G,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,aAAa,CAAC;QAC9B,MAAM,OAAO,GAAwB;YACjC,UAAU,EAAE,MAAM,CAAC,QAAQ;SAC9B,CAAC;QAEF,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,19 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerRemoveRoleMemberPowerShell(server, config) {
5
- server.tool("security-remove-role-member", "Removes members from a Sitecore role.", {
6
- identity: z.string()
7
- .describe("The identity of the role to remove members from (e.g. 'CustomRole' or full path 'sitecore\\CustomRole')"),
8
- members: z.string()
9
- .describe("The members to remove from the role (comma-separated list of users or roles, e.g. 'sitecore\\user1,sitecore\\user2')"),
10
- }, async (params) => {
11
- const command = `Remove-RoleMember`;
12
- const options = {
13
- "Identity": params.identity,
14
- "Members": params.members.split(',').map(member => member.trim()).join('","'),
15
- };
16
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
17
- });
18
- }
19
- //# sourceMappingURL=register-remove-rolemember.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-remove-rolemember.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-remove-rolemember.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,kCAAkC,CAAC,MAAiB,EAAE,MAAc;IAChF,MAAM,CAAC,IAAI,CACP,6BAA6B,EAC7B,uCAAuC,EACvC;QACI,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;aACf,QAAQ,CAAC,yGAAyG,CAAC;QACxH,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;aACd,QAAQ,CAAC,sHAAsH,CAAC;KACxI,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,mBAAmB,CAAC;QACpC,MAAM,OAAO,GAAwB;YACjC,UAAU,EAAE,MAAM,CAAC,QAAQ;YAC3B,SAAS,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;SAChF,CAAC;QAEF,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,15 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerRemoveUserPowerShell(server, config) {
5
- server.tool("security-remove-user", "Removes the Sitecore user.", {
6
- identity: z.string(),
7
- }, async (params) => {
8
- const command = `Remove-User`;
9
- const options = {
10
- "Identity": params.identity,
11
- };
12
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
13
- });
14
- }
15
- //# sourceMappingURL=register-remove-user.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-remove-user.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-remove-user.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,4BAA4B,CAAC,MAAiB,EAAE,MAAc;IAC1E,MAAM,CAAC,IAAI,CACP,sBAAsB,EACtB,4BAA4B,EAC5B;QACI,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;KACvB,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,aAAa,CAAC;QAC9B,MAAM,OAAO,GAAuB;YAChC,UAAU,EAAE,MAAM,CAAC,QAAQ;SAC9B,CAAC;QAEF,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,55 +0,0 @@
1
- import { registerGetUserPowerShell } from "./register-get-user.js";
2
- import { registerNewUserPowerShell } from "./register-new-user.js";
3
- import { registerRemoveUserPowerShell } from "./register-remove-user.js";
4
- import { registerDisableUserPowerShell } from "./register-disable-user.js";
5
- import { registerEnableUserPowerShell } from "./register-enable-user.js";
6
- import { registerUnlockUserPowerShell } from "./register-unlock-user.js";
7
- import { registerSetUserPowerShell } from "./register-set-user.js";
8
- import { registerSetUserPasswordPowerShell } from "./register-set-user-password.js";
9
- import { registerGetDomainPowerShell } from "./register-get-domain.js";
10
- import { registerGetRolePowerShell } from "./register-get-role.js";
11
- import { registerGetRoleMemberPowerShell } from "./register-get-role-member.js";
12
- import { registerAddRoleMemberPowerShell } from "./register-add-role-member.js";
13
- import { registerRemoveRoleMemberPowerShell } from "./register-remove-rolemember.js";
14
- import { registerLockItemPowerShell } from "./register-lock-item.js";
15
- import { registerUnlockItemPowerShell } from "./register-unlock-item.js";
16
- import { registerProtectItemPowerShell } from "./register-protect-item.js";
17
- import { registerUnprotectItemPowerShell } from "./register-unprotect-item.js";
18
- import { registerNewRolePowerShell } from "./register-new-role.js";
19
- import { registerRemoveRolePowerShell } from "./register-remove-role.js";
20
- import { registerNewDomainPowerShell } from "./register-new-domain.js";
21
- import { registerRemoveDomainPowerShell } from "./register-remove-domain.js";
22
- import { registerTestAccountPowerShell } from "./register-test-account.js";
23
- import { registerGetItemAclPowerShell } from "./register-get-item-acl.js";
24
- import { registerTestItemAclPowerShell } from "./register-test-item-acl.js";
25
- import { registerAddItemAclPowerShell } from "./register-add-item-acl.js";
26
- import { registerClearItemAclPowerShell } from "./register-clear-item-acl.js";
27
- export function registerSecurityPowerShell(server, config) {
28
- registerGetUserPowerShell(server, config);
29
- registerNewUserPowerShell(server, config);
30
- registerRemoveUserPowerShell(server, config);
31
- registerDisableUserPowerShell(server, config);
32
- registerEnableUserPowerShell(server, config);
33
- registerUnlockUserPowerShell(server, config);
34
- registerSetUserPowerShell(server, config);
35
- registerSetUserPasswordPowerShell(server, config);
36
- registerGetDomainPowerShell(server, config);
37
- registerGetRolePowerShell(server, config);
38
- registerGetRoleMemberPowerShell(server, config);
39
- registerAddRoleMemberPowerShell(server, config);
40
- registerRemoveRoleMemberPowerShell(server, config);
41
- registerLockItemPowerShell(server, config);
42
- registerUnlockItemPowerShell(server, config);
43
- registerProtectItemPowerShell(server, config);
44
- registerUnprotectItemPowerShell(server, config);
45
- registerNewRolePowerShell(server, config);
46
- registerRemoveRolePowerShell(server, config);
47
- registerNewDomainPowerShell(server, config);
48
- registerRemoveDomainPowerShell(server, config);
49
- registerTestAccountPowerShell(server, config);
50
- registerGetItemAclPowerShell(server, config);
51
- registerTestItemAclPowerShell(server, config);
52
- registerAddItemAclPowerShell(server, config);
53
- registerClearItemAclPowerShell(server, config);
54
- }
55
- //# sourceMappingURL=register-security-powershell.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-security-powershell.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-security-powershell.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAA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AC;IAC7C,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,yBAAyB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,iCAAiC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClD,2BAA2B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,yBAAyB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,+BAA+B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,+BAA+B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,kCAAkC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnD,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3C,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,6BAA6B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,+BAA+B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,yBAAyB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,2BAA2B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,8BAA8B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,6BAA6B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,6BAA6B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,4BAA4B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,8BAA8B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AACnD,CAAC"}
@@ -1,29 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerSetUserPasswordPowerShell(server, config) {
5
- server.tool("security-set-user-password", "Sets a new password for a Sitecore user.", {
6
- identity: z.string()
7
- .describe("The identity of the user to update the password for (e.g. 'admin' or full path 'sitecore\\admin')"),
8
- newPassword: z.string()
9
- .describe("The new password for the user"),
10
- resetPassword: z.boolean().optional()
11
- .describe("If true, the user will be required to change password on next login"),
12
- oldPassword: z.string().optional()
13
- .describe("The old password. If provided, it will be validated before setting the new password"),
14
- }, async (params) => {
15
- const command = `Set-UserPassword`;
16
- const options = {
17
- "Identity": params.identity,
18
- "NewPassword": params.newPassword,
19
- };
20
- if (params.resetPassword) {
21
- options["Reset"] = "";
22
- }
23
- if (params.oldPassword) {
24
- options["OldPassword"] = params.oldPassword;
25
- }
26
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
27
- });
28
- }
29
- //# sourceMappingURL=register-set-user-password.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-set-user-password.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-set-user-password.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,iCAAiC,CAAC,MAAiB,EAAE,MAAc;IAC/E,MAAM,CAAC,IAAI,CACP,4BAA4B,EAC5B,0CAA0C,EAC1C;QACI,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;aACf,QAAQ,CAAC,mGAAmG,CAAC;QAClH,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;aAClB,QAAQ,CAAC,+BAA+B,CAAC;QAC9C,aAAa,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;aAChC,QAAQ,CAAC,qEAAqE,CAAC;QACpF,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC7B,QAAQ,CAAC,qFAAqF,CAAC;KACvG,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,kBAAkB,CAAC;QACnC,MAAM,OAAO,GAAwB;YACjC,UAAU,EAAE,MAAM,CAAC,QAAQ;YAC3B,aAAa,EAAE,MAAM,CAAC,WAAW;SACpC,CAAC;QAEF,IAAI,MAAM,CAAC,aAAa,EAAE,CAAC;YACvB,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QAC1B,CAAC;QAED,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC;QAChD,CAAC;QAED,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,66 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerSetUserPowerShell(server, config) {
5
- server.tool("security-set-user", "Updates properties of a Sitecore user account.", {
6
- identity: z.string()
7
- .describe("The identity of the user to update (e.g. 'admin' or full path 'sitecore\\admin')"),
8
- isAdministrator: z.boolean().optional()
9
- .describe("Set the user as an administrator"),
10
- password: z.string().optional()
11
- .describe("The new password for the user"),
12
- comment: z.string().optional()
13
- .describe("Comment for the user"),
14
- email: z.string().optional()
15
- .describe("Email for the user"),
16
- fullName: z.string().optional()
17
- .describe("Full name of the user"),
18
- portrait: z.string().optional()
19
- .describe("Portrait for the user"),
20
- profileItemId: z.string().optional()
21
- .describe("Profile item ID for the user"),
22
- startUrl: z.string().optional()
23
- .describe("Start URL for the user"),
24
- clientLanguage: z.string().optional()
25
- .describe("Client language for the user"),
26
- enabled: z.boolean().optional()
27
- .describe("Enable or disable the user"),
28
- }, async (params) => {
29
- const command = `Set-User`;
30
- const options = {
31
- "Identity": params.identity,
32
- };
33
- if (params.password) {
34
- options["Password"] = params.password;
35
- }
36
- if (params.comment) {
37
- options["Comment"] = params.comment;
38
- }
39
- if (params.email) {
40
- options["Email"] = params.email;
41
- }
42
- if (params.fullName) {
43
- options["FullName"] = params.fullName;
44
- }
45
- if (params.portrait) {
46
- options["Portrait"] = params.portrait;
47
- }
48
- if (params.startUrl) {
49
- options["StartUrl"] = params.startUrl;
50
- }
51
- if (params.clientLanguage) {
52
- options["ClientLanguage"] = params.clientLanguage;
53
- }
54
- if (params.profileItemId) {
55
- options["ProfileItemId"] = params.profileItemId;
56
- }
57
- if (params.isAdministrator) {
58
- options["IsAdministrator"] = params.isAdministrator;
59
- }
60
- if (params.enabled) {
61
- options["Enabled"] = params.enabled;
62
- }
63
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
64
- });
65
- }
66
- //# sourceMappingURL=register-set-user.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-set-user.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-set-user.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,yBAAyB,CAAC,MAAiB,EAAE,MAAc;IACvE,MAAM,CAAC,IAAI,CACP,mBAAmB,EACnB,gDAAgD,EAChD;QACI,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;aACf,QAAQ,CAAC,kFAAkF,CAAC;QACjG,eAAe,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;aAClC,QAAQ,CAAC,kCAAkC,CAAC;QACjD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC1B,QAAQ,CAAC,+BAA+B,CAAC;QAC9C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aACzB,QAAQ,CAAC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YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,IAAI,MAAM,CAAC,cAAc,EAAE,CAAC;YACxB,OAAO,CAAC,gBAAgB,CAAC,GAAG,MAAM,CAAC,cAAc,CAAC;QACtD,CAAC;QAED,IAAI,MAAM,CAAC,aAAa,EAAE,CAAC;YACvB,OAAO,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,aAAa,CAAC;QACpD,CAAC;QAED,IAAI,MAAM,CAAC,eAAe,EAAE,CAAC;YACzB,OAAO,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC,eAAe,CAAC;QACxD,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;QACxC,CAAC;QAGD,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,21 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerTestAccountPowerShell(server, config) {
5
- server.tool("security-test-account", "Tests if a Sitecore user exists and has specific properties.", {
6
- identity: z.string()
7
- .describe("The identity of the user to test (e.g. 'admin' or full path 'sitecore\\admin')"),
8
- accountType: z.enum(["All", "User", "Role"]).optional()
9
- .describe("The type of account to test (defaults to 'All')"),
10
- }, async (params) => {
11
- const command = `Test-Account`;
12
- const options = {
13
- "Identity": params.identity
14
- };
15
- if (params.accountType) {
16
- options["AccountType"] = params.accountType;
17
- }
18
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
19
- });
20
- }
21
- //# sourceMappingURL=register-test-account.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-test-account.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-test-account.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,6BAA6B,CAAC,MAAiB,EAAE,MAAc;IAC3E,MAAM,CAAC,IAAI,CACP,uBAAuB,EACvB,8DAA8D,EAC9D;QACI,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;aACf,QAAQ,CAAC,gFAAgF,CAAC;QAC/F,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE;aAClD,QAAQ,CAAC,iDAAiD,CAAC;KACnE,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,cAAc,CAAC;QAC/B,MAAM,OAAO,GAAwB;YACjC,UAAU,EAAE,MAAM,CAAC,QAAQ;SAC9B,CAAC;QAEF,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YACrB,OAAO,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,WAAW,CAAC;QAChD,CAAC;QAEF,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IACjF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,59 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- import { AccessRights } from "./access-rights.js";
5
- export function registerTestItemAclPowerShell(server, config) {
6
- server.tool("security-test-item-acl-by-id", "Tests whether a user or role has specific access rights to a Sitecore item by its ID.", {
7
- id: z.string()
8
- .describe("The ID of the item to test access rights on"),
9
- identity: z.string()
10
- .describe("The identity of the user or role to test (e.g. 'sitecore\\admin')"),
11
- accessRight: z.enum(AccessRights)
12
- .describe("The access right to test (e.g. 'item:read', 'item:write')"),
13
- propType: z.enum(["Descendants", "Children", "Entity"]).optional()
14
- .describe("The propagation type for the access right"),
15
- database: z.string().optional()
16
- .describe("The database containing the item (defaults to the context database)")
17
- }, async (params) => {
18
- const command = `Test-ItemAcl`;
19
- const options = {
20
- "ID": params.id,
21
- "Identity": params.identity,
22
- "AccessRight": params.accessRight,
23
- };
24
- if (params.propType) {
25
- options["PropType"] = params.propType;
26
- }
27
- if (params.database) {
28
- options["Database"] = params.database;
29
- }
30
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
31
- });
32
- server.tool("security-test-item-acl-by-path", "Tests whether a user or role has specific access rights to a Sitecore item by its path.", {
33
- path: z.string()
34
- .describe("The path of the item to test access rights on (e.g. /sitecore/content/Home)"),
35
- identity: z.string()
36
- .describe("The identity of the user or role to test (e.g. 'sitecore\\admin')"),
37
- accessRight: z.string()
38
- .describe("The access right to test (e.g. 'item:read', 'item:write')"),
39
- propType: z.enum(["Descendants", "Children", "Entity"]).optional()
40
- .describe("The propagation type for the access right"),
41
- database: z.string().optional()
42
- .describe("The database containing the item (defaults to the context database)")
43
- }, async (params) => {
44
- const command = `Test-ItemAcl`;
45
- const options = {
46
- "Path": params.path,
47
- "Identity": params.identity,
48
- "AccessRight": params.accessRight,
49
- };
50
- if (params.propType) {
51
- options["PropType"] = params.propType;
52
- }
53
- if (params.database) {
54
- options["Database"] = params.database;
55
- }
56
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
57
- });
58
- }
59
- //# sourceMappingURL=register-test-item-acl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"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2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -1,52 +0,0 @@
1
- import { z } from "zod";
2
- import { safeMcpResponse } from "../../../../helper.js";
3
- import { runGenericPowershellCommand } from "../generic.js";
4
- export function registerUnlockItemPowerShell(server, config) {
5
- server.tool("security-unlock-item-by-id", "Unlocks a Sitecore item by its ID.", {
6
- id: z.string().describe("The ID of the item to unlock"),
7
- force: z.boolean().optional().describe("When specified the item is unlocked regardless of the owner"),
8
- passThru: z.boolean().optional().describe("When specified returns the item to the pipeline"),
9
- database: z.string().optional().describe("The database containing the item"),
10
- }, async (params) => {
11
- const command = `Unlock-Item`;
12
- const options = {
13
- "ID": params.id,
14
- };
15
- if (params.force) {
16
- options["Force"] = "";
17
- }
18
- if (params.passThru) {
19
- options["PassThru"] = "";
20
- }
21
- if (params.database) {
22
- options["Database"] = params.database;
23
- }
24
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
25
- });
26
- server.tool("security-unlock-item-by-path", "Unlocks a Sitecore item by its path.", {
27
- path: z.string()
28
- .describe("The path to the item to unlock"),
29
- force: z.boolean().optional()
30
- .describe("When specified the item is unlocked regardless of the owner"),
31
- passThru: z.boolean().optional()
32
- .describe("When specified returns the item to the pipeline"),
33
- database: z.string().optional()
34
- .describe("The database containing the item"),
35
- }, async (params) => {
36
- const command = `Unlock-Item`;
37
- const options = {
38
- "Path": params.path,
39
- };
40
- if (params.force) {
41
- options["Force"] = "";
42
- }
43
- if (params.passThru) {
44
- options["PassThru"] = "";
45
- }
46
- if (params.database) {
47
- options["Database"] = params.database;
48
- }
49
- return safeMcpResponse(runGenericPowershellCommand(config, command, options));
50
- });
51
- }
52
- //# sourceMappingURL=register-unlock-item.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-unlock-item.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/security/register-unlock-item.ts"],"names":[],"mappings":"AA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