@ecmaos/types 0.6.0 → 0.6.1
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +23 -0
- package/dist/intervals.d.ts +35 -0
- package/dist/intervals.d.ts.map +1 -1
- package/intervals.ts +39 -0
- package/package.json +1 -1
package/.turbo/turbo-build.log
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @ecmaos/types
|
|
2
2
|
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d43d304: New Features:
|
|
8
|
+
|
|
9
|
+
- Cron/crontab system: Added scheduling system with crontab parsing and execution
|
|
10
|
+
- Web browser coreutil: New 'web' command for browsing functionality
|
|
11
|
+
- View coreutil: New 'view' command for multimedia viewing
|
|
12
|
+
- Coreutils migration: Migrated 'play' and 'video' commands from kernel to coreutils
|
|
13
|
+
|
|
14
|
+
Fixes:
|
|
15
|
+
|
|
16
|
+
- Shell command substitution parsing improvements
|
|
17
|
+
- Tar parsing improvements
|
|
18
|
+
- Web coreutil now loads credentialless
|
|
19
|
+
|
|
20
|
+
Maintenance:
|
|
21
|
+
|
|
22
|
+
- Updated documentation and types across various kernel components
|
|
23
|
+
- Enhanced coreutils and shell scripts
|
|
24
|
+
- Added 'open' and 'man' commands to coreutils
|
|
25
|
+
|
|
3
26
|
## 0.6.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/dist/intervals.d.ts
CHANGED
|
@@ -5,6 +5,17 @@
|
|
|
5
5
|
* Type for mapping interval names to their timer IDs
|
|
6
6
|
*/
|
|
7
7
|
export type IntervalMap = Map<string, ReturnType<typeof setInterval>>;
|
|
8
|
+
/**
|
|
9
|
+
* Timer handle interface matching cron-schedule's ITimerHandle
|
|
10
|
+
* This matches the return type of TimerBasedCronScheduler.setInterval
|
|
11
|
+
*/
|
|
12
|
+
export interface ITimerHandle {
|
|
13
|
+
clear(): void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Type for mapping cron job names to their timer handles
|
|
17
|
+
*/
|
|
18
|
+
export type CronMap = Map<string, ITimerHandle>;
|
|
8
19
|
/**
|
|
9
20
|
* Interface for interval management functionality
|
|
10
21
|
*/
|
|
@@ -26,5 +37,29 @@ export interface Intervals {
|
|
|
26
37
|
* @param name - Name of the interval to clear
|
|
27
38
|
*/
|
|
28
39
|
clear(name: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Get a cron job by name
|
|
42
|
+
* @param name - Name of the cron job
|
|
43
|
+
*/
|
|
44
|
+
getCron(name: string): ITimerHandle | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Set a new cron job
|
|
47
|
+
* @param name - Name for the cron job
|
|
48
|
+
* @param cronExpression - Cron expression (e.g., "0 5 * * *" for every 5 minutes past the hour)
|
|
49
|
+
* @param callback - Function to execute
|
|
50
|
+
* @param opts - Optional error handler
|
|
51
|
+
*/
|
|
52
|
+
setCron(name: string, cronExpression: string, callback: () => void, opts?: {
|
|
53
|
+
errorHandler?: (err: unknown) => unknown;
|
|
54
|
+
}): ITimerHandle;
|
|
55
|
+
/**
|
|
56
|
+
* Clear a cron job by name
|
|
57
|
+
* @param name - Name of the cron job to clear
|
|
58
|
+
*/
|
|
59
|
+
clearCron(name: string): void;
|
|
60
|
+
/**
|
|
61
|
+
* List all active cron job names
|
|
62
|
+
*/
|
|
63
|
+
listCrons(): string[];
|
|
29
64
|
}
|
|
30
65
|
//# sourceMappingURL=intervals.d.ts.map
|
package/dist/intervals.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intervals.d.ts","sourceRoot":"","sources":["../intervals.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,WAAW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E,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,EAAE,IAAI,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAA;KAAE,GAAG,YAAY,CAAA;IAEtI;;;OAGG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAE7B;;OAEG;IACH,SAAS,IAAI,MAAM,EAAE,CAAA;CACtB"}
|
package/intervals.ts
CHANGED
|
@@ -7,6 +7,19 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export type IntervalMap = Map<string, ReturnType<typeof setInterval>>
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* Timer handle interface matching cron-schedule's ITimerHandle
|
|
12
|
+
* This matches the return type of TimerBasedCronScheduler.setInterval
|
|
13
|
+
*/
|
|
14
|
+
export interface ITimerHandle {
|
|
15
|
+
clear(): void
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Type for mapping cron job names to their timer handles
|
|
20
|
+
*/
|
|
21
|
+
export type CronMap = Map<string, ITimerHandle>
|
|
22
|
+
|
|
10
23
|
/**
|
|
11
24
|
* Interface for interval management functionality
|
|
12
25
|
*/
|
|
@@ -30,4 +43,30 @@ export interface Intervals {
|
|
|
30
43
|
* @param name - Name of the interval to clear
|
|
31
44
|
*/
|
|
32
45
|
clear(name: string): void
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Get a cron job by name
|
|
49
|
+
* @param name - Name of the cron job
|
|
50
|
+
*/
|
|
51
|
+
getCron(name: string): ITimerHandle | undefined
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Set a new cron job
|
|
55
|
+
* @param name - Name for the cron job
|
|
56
|
+
* @param cronExpression - Cron expression (e.g., "0 5 * * *" for every 5 minutes past the hour)
|
|
57
|
+
* @param callback - Function to execute
|
|
58
|
+
* @param opts - Optional error handler
|
|
59
|
+
*/
|
|
60
|
+
setCron(name: string, cronExpression: string, callback: () => void, opts?: { errorHandler?: (err: unknown) => unknown }): ITimerHandle
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Clear a cron job by name
|
|
64
|
+
* @param name - Name of the cron job to clear
|
|
65
|
+
*/
|
|
66
|
+
clearCron(name: string): void
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* List all active cron job names
|
|
70
|
+
*/
|
|
71
|
+
listCrons(): string[]
|
|
33
72
|
}
|