@digipair/skill-cron 0.20.1 → 0.21.0
Sign up to get free protection for your applications and to get access to all the features.
- package/index.cjs.js +15 -10
- package/index.esm.js +15 -10
- package/package.json +4 -2
package/index.cjs.js
CHANGED
@@ -9999,15 +9999,17 @@ let CronService = class CronService {
|
|
9999
9999
|
this.jobs[id].stop();
|
10000
10000
|
}
|
10001
10001
|
async crons(params, _pinsSettingsList, context) {
|
10002
|
-
var
|
10003
|
-
|
10002
|
+
var _context_privates;
|
10003
|
+
var _context_privates_EDITOR_PATH;
|
10004
|
+
const { path = ((_context_privates_EDITOR_PATH = (_context_privates = context.privates) == null ? void 0 : _context_privates.EDITOR_PATH) != null ? _context_privates_EDITOR_PATH : process.env['DIGIPAIR_AGENTS_PATH']) ? `${process.env['DIGIPAIR_AGENTS_PATH']}/digipairs` : './factory/digipairs' } = params;
|
10004
10005
|
const text = await fs.promises.readFile(`${path}/planning.json`, 'utf8');
|
10005
10006
|
const crons = JSON.parse(`[${text}]`);
|
10006
10007
|
return crons;
|
10007
10008
|
}
|
10008
10009
|
async addCron(params, _pinsSettingsList, context) {
|
10009
|
-
var
|
10010
|
-
|
10010
|
+
var _context_privates;
|
10011
|
+
var _context_privates_EDITOR_PATH;
|
10012
|
+
const { path = ((_context_privates_EDITOR_PATH = (_context_privates = context.privates) == null ? void 0 : _context_privates.EDITOR_PATH) != null ? _context_privates_EDITOR_PATH : process.env['DIGIPAIR_AGENTS_PATH']) ? `${process.env['DIGIPAIR_AGENTS_PATH']}/digipairs` : './factory/digipairs', time, digipair, reasoning } = params;
|
10011
10013
|
const cron = {
|
10012
10014
|
id: v4(),
|
10013
10015
|
time,
|
@@ -10020,8 +10022,9 @@ let CronService = class CronService {
|
|
10020
10022
|
return cron;
|
10021
10023
|
}
|
10022
10024
|
async deleteCron(params, _pinsSettingsList, context) {
|
10023
|
-
var
|
10024
|
-
|
10025
|
+
var _context_privates;
|
10026
|
+
var _context_privates_EDITOR_PATH;
|
10027
|
+
const { path = ((_context_privates_EDITOR_PATH = (_context_privates = context.privates) == null ? void 0 : _context_privates.EDITOR_PATH) != null ? _context_privates_EDITOR_PATH : process.env['DIGIPAIR_AGENTS_PATH']) ? `${process.env['DIGIPAIR_AGENTS_PATH']}/digipairs` : './factory/digipairs', id } = params;
|
10025
10028
|
const text = await fs.promises.readFile(`${path}/planning.json`, 'utf8');
|
10026
10029
|
const crons = JSON.parse(`[${text}]`).filter((cron)=>cron.id !== id);
|
10027
10030
|
const ndjson = crons.map(JSON.stringify).join('\n');
|
@@ -10032,8 +10035,9 @@ let CronService = class CronService {
|
|
10032
10035
|
};
|
10033
10036
|
}
|
10034
10037
|
async enableCron(params, _pinsSettingsList, context) {
|
10035
|
-
var
|
10036
|
-
|
10038
|
+
var _context_privates;
|
10039
|
+
var _context_privates_EDITOR_PATH;
|
10040
|
+
const { path = ((_context_privates_EDITOR_PATH = (_context_privates = context.privates) == null ? void 0 : _context_privates.EDITOR_PATH) != null ? _context_privates_EDITOR_PATH : process.env['DIGIPAIR_AGENTS_PATH']) ? `${process.env['DIGIPAIR_AGENTS_PATH']}/digipairs` : './factory/digipairs', id } = params;
|
10037
10041
|
const text = await fs.promises.readFile(`${path}/planning.json`, 'utf8');
|
10038
10042
|
const crons = JSON.parse(`[${text}]`);
|
10039
10043
|
const cron = crons.find((cron)=>cron.id === id);
|
@@ -10044,8 +10048,9 @@ let CronService = class CronService {
|
|
10044
10048
|
return cron;
|
10045
10049
|
}
|
10046
10050
|
async disableCron(params, _pinsSettingsList, context) {
|
10047
|
-
var
|
10048
|
-
|
10051
|
+
var _context_privates;
|
10052
|
+
var _context_privates_EDITOR_PATH;
|
10053
|
+
const { path = ((_context_privates_EDITOR_PATH = (_context_privates = context.privates) == null ? void 0 : _context_privates.EDITOR_PATH) != null ? _context_privates_EDITOR_PATH : process.env['DIGIPAIR_AGENTS_PATH']) ? `${process.env['DIGIPAIR_AGENTS_PATH']}/digipairs` : './factory/digipairs', id } = params;
|
10049
10054
|
const text = await fs.promises.readFile(`${path}/planning.json`, 'utf8');
|
10050
10055
|
const crons = JSON.parse(`[${text}]`);
|
10051
10056
|
const cron = crons.find((cron)=>cron.id === id);
|
package/index.esm.js
CHANGED
@@ -9991,15 +9991,17 @@ let CronService = class CronService {
|
|
9991
9991
|
this.jobs[id].stop();
|
9992
9992
|
}
|
9993
9993
|
async crons(params, _pinsSettingsList, context) {
|
9994
|
-
var
|
9995
|
-
|
9994
|
+
var _context_privates;
|
9995
|
+
var _context_privates_EDITOR_PATH;
|
9996
|
+
const { path = ((_context_privates_EDITOR_PATH = (_context_privates = context.privates) == null ? void 0 : _context_privates.EDITOR_PATH) != null ? _context_privates_EDITOR_PATH : process.env['DIGIPAIR_AGENTS_PATH']) ? `${process.env['DIGIPAIR_AGENTS_PATH']}/digipairs` : './factory/digipairs' } = params;
|
9996
9997
|
const text = await promises.readFile(`${path}/planning.json`, 'utf8');
|
9997
9998
|
const crons = JSON.parse(`[${text}]`);
|
9998
9999
|
return crons;
|
9999
10000
|
}
|
10000
10001
|
async addCron(params, _pinsSettingsList, context) {
|
10001
|
-
var
|
10002
|
-
|
10002
|
+
var _context_privates;
|
10003
|
+
var _context_privates_EDITOR_PATH;
|
10004
|
+
const { path = ((_context_privates_EDITOR_PATH = (_context_privates = context.privates) == null ? void 0 : _context_privates.EDITOR_PATH) != null ? _context_privates_EDITOR_PATH : process.env['DIGIPAIR_AGENTS_PATH']) ? `${process.env['DIGIPAIR_AGENTS_PATH']}/digipairs` : './factory/digipairs', time, digipair, reasoning } = params;
|
10003
10005
|
const cron = {
|
10004
10006
|
id: v4(),
|
10005
10007
|
time,
|
@@ -10012,8 +10014,9 @@ let CronService = class CronService {
|
|
10012
10014
|
return cron;
|
10013
10015
|
}
|
10014
10016
|
async deleteCron(params, _pinsSettingsList, context) {
|
10015
|
-
var
|
10016
|
-
|
10017
|
+
var _context_privates;
|
10018
|
+
var _context_privates_EDITOR_PATH;
|
10019
|
+
const { path = ((_context_privates_EDITOR_PATH = (_context_privates = context.privates) == null ? void 0 : _context_privates.EDITOR_PATH) != null ? _context_privates_EDITOR_PATH : process.env['DIGIPAIR_AGENTS_PATH']) ? `${process.env['DIGIPAIR_AGENTS_PATH']}/digipairs` : './factory/digipairs', id } = params;
|
10017
10020
|
const text = await promises.readFile(`${path}/planning.json`, 'utf8');
|
10018
10021
|
const crons = JSON.parse(`[${text}]`).filter((cron)=>cron.id !== id);
|
10019
10022
|
const ndjson = crons.map(JSON.stringify).join('\n');
|
@@ -10024,8 +10027,9 @@ let CronService = class CronService {
|
|
10024
10027
|
};
|
10025
10028
|
}
|
10026
10029
|
async enableCron(params, _pinsSettingsList, context) {
|
10027
|
-
var
|
10028
|
-
|
10030
|
+
var _context_privates;
|
10031
|
+
var _context_privates_EDITOR_PATH;
|
10032
|
+
const { path = ((_context_privates_EDITOR_PATH = (_context_privates = context.privates) == null ? void 0 : _context_privates.EDITOR_PATH) != null ? _context_privates_EDITOR_PATH : process.env['DIGIPAIR_AGENTS_PATH']) ? `${process.env['DIGIPAIR_AGENTS_PATH']}/digipairs` : './factory/digipairs', id } = params;
|
10029
10033
|
const text = await promises.readFile(`${path}/planning.json`, 'utf8');
|
10030
10034
|
const crons = JSON.parse(`[${text}]`);
|
10031
10035
|
const cron = crons.find((cron)=>cron.id === id);
|
@@ -10036,8 +10040,9 @@ let CronService = class CronService {
|
|
10036
10040
|
return cron;
|
10037
10041
|
}
|
10038
10042
|
async disableCron(params, _pinsSettingsList, context) {
|
10039
|
-
var
|
10040
|
-
|
10043
|
+
var _context_privates;
|
10044
|
+
var _context_privates_EDITOR_PATH;
|
10045
|
+
const { path = ((_context_privates_EDITOR_PATH = (_context_privates = context.privates) == null ? void 0 : _context_privates.EDITOR_PATH) != null ? _context_privates_EDITOR_PATH : process.env['DIGIPAIR_AGENTS_PATH']) ? `${process.env['DIGIPAIR_AGENTS_PATH']}/digipairs` : './factory/digipairs', id } = params;
|
10041
10046
|
const text = await promises.readFile(`${path}/planning.json`, 'utf8');
|
10042
10047
|
const crons = JSON.parse(`[${text}]`);
|
10043
10048
|
const cron = crons.find((cron)=>cron.id === id);
|