@wrongstack/plugins 0.272.2 → 0.273.0

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/cron.js CHANGED
@@ -1,4 +1,5 @@
1
1
  // src/cron/index.ts
2
+ var COORDINATION_CRON_CAPABILITY = "coordination.cron";
2
3
  var API_VERSION = "^0.1.10";
3
4
  var state = {
4
5
  jobs: /* @__PURE__ */ new Map(),
@@ -35,7 +36,7 @@ var plugin = {
35
36
  const maxConcurrent = api.config.extensions?.["cron"]?.["maxConcurrentJobs"] ?? 5;
36
37
  function scheduleNextRun(name) {
37
38
  const job = state.jobs.get(name);
38
- if (!job || !job.enabled) return;
39
+ if (!job?.enabled) return;
39
40
  const existing = state.timers.get(name);
40
41
  if (existing) clearTimeout(existing);
41
42
  const delay = Math.max(0, new Date(job.nextRun).getTime() - Date.now());
@@ -119,6 +120,7 @@ var plugin = {
119
120
  },
120
121
  permission: "confirm",
121
122
  mutating: false,
123
+ capabilities: [COORDINATION_CRON_CAPABILITY],
122
124
  async execute(input) {
123
125
  const name = input["name"];
124
126
  const intervalMs = Math.max(1e3, Number(input["intervalMs"]));
@@ -163,6 +165,7 @@ var plugin = {
163
165
  inputSchema: { type: "object", properties: {} },
164
166
  permission: "auto",
165
167
  mutating: false,
168
+ capabilities: [COORDINATION_CRON_CAPABILITY],
166
169
  async execute() {
167
170
  const jobs = Array.from(state.jobs.values()).map((j) => ({
168
171
  name: j.name,
@@ -194,6 +197,7 @@ var plugin = {
194
197
  },
195
198
  permission: "auto",
196
199
  mutating: false,
200
+ capabilities: [COORDINATION_CRON_CAPABILITY],
197
201
  async execute(input) {
198
202
  const name = input["name"];
199
203
  if (!state.jobs.has(name)) {
package/dist/index.js CHANGED
@@ -1901,6 +1901,7 @@ var plugin7 = {
1901
1901
  var json_path_default = plugin7;
1902
1902
 
1903
1903
  // src/cron/index.ts
1904
+ var COORDINATION_CRON_CAPABILITY = "coordination.cron";
1904
1905
  var API_VERSION7 = "^0.1.10";
1905
1906
  var state = {
1906
1907
  jobs: /* @__PURE__ */ new Map(),
@@ -1937,7 +1938,7 @@ var plugin8 = {
1937
1938
  const maxConcurrent = api.config.extensions?.["cron"]?.["maxConcurrentJobs"] ?? 5;
1938
1939
  function scheduleNextRun(name) {
1939
1940
  const job = state.jobs.get(name);
1940
- if (!job || !job.enabled) return;
1941
+ if (!job?.enabled) return;
1941
1942
  const existing = state.timers.get(name);
1942
1943
  if (existing) clearTimeout(existing);
1943
1944
  const delay = Math.max(0, new Date(job.nextRun).getTime() - Date.now());
@@ -2021,6 +2022,7 @@ var plugin8 = {
2021
2022
  },
2022
2023
  permission: "confirm",
2023
2024
  mutating: false,
2025
+ capabilities: [COORDINATION_CRON_CAPABILITY],
2024
2026
  async execute(input) {
2025
2027
  const name = input["name"];
2026
2028
  const intervalMs = Math.max(1e3, Number(input["intervalMs"]));
@@ -2065,6 +2067,7 @@ var plugin8 = {
2065
2067
  inputSchema: { type: "object", properties: {} },
2066
2068
  permission: "auto",
2067
2069
  mutating: false,
2070
+ capabilities: [COORDINATION_CRON_CAPABILITY],
2068
2071
  async execute() {
2069
2072
  const jobs = Array.from(state.jobs.values()).map((j) => ({
2070
2073
  name: j.name,
@@ -2096,6 +2099,7 @@ var plugin8 = {
2096
2099
  },
2097
2100
  permission: "auto",
2098
2101
  mutating: false,
2102
+ capabilities: [COORDINATION_CRON_CAPABILITY],
2099
2103
  async execute(input) {
2100
2104
  const name = input["name"];
2101
2105
  if (!state.jobs.has(name)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/plugins",
3
- "version": "0.272.2",
3
+ "version": "0.273.0",
4
4
  "description": "Official WrongStack plugin collection — auto-doc, git-autocommit, shell-check, cost-tracker, file-watcher, web-search, json-path, cron, template-engine, semver-bump",
5
5
  "license": "MIT",
6
6
  "author": "ECOSTACK TECHNOLOGY OÜ",
@@ -63,7 +63,7 @@
63
63
  "vitest": "^4.1.8"
64
64
  },
65
65
  "dependencies": {
66
- "@wrongstack/core": "0.272.2"
66
+ "@wrongstack/core": "0.273.0"
67
67
  },
68
68
  "scripts": {
69
69
  "build": "tsup",