@geekmidas/cloud 9.2.0 → 9.3.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/README.md CHANGED
@@ -96,11 +96,11 @@ settings while custom authorizers require a `handler`.
96
96
  ### Cron
97
97
 
98
98
  Wraps `sst.aws.CronV2` (`sst.aws.Cron` is deprecated). `processor` is a
99
- `Function` (or anything with an `arn`); `schedule` is a typed `rate(…)` /
100
- `cron(…)` / `at(…)`.
99
+ `Function` (or anything with an `arn`); `schedule` is a typed `cron(…)` /
100
+ `at(…)`.
101
101
 
102
102
  ```ts
103
- const cron = new Cron(stack, 'Nightly', { processor: fn, schedule: 'rate(1 day)' });
103
+ const cron = new Cron(stack, 'Nightly', { processor: fn, schedule: 'cron(0 0 * * ? *)' });
104
104
  ```
105
105
 
106
106
  ### From a `gkm build` manifest
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geekmidas/cloud",
3
- "version": "9.2.0",
3
+ "version": "9.3.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -39,8 +39,8 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "lodash.snakecase": "~4.1.1",
42
- "@geekmidas/envkit": "9.2.0",
43
- "@geekmidas/manifest": "9.2.0"
42
+ "@geekmidas/envkit": "9.3.0",
43
+ "@geekmidas/manifest": "9.3.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/lodash.get": "~4.4.9",
package/src/sst/Cron.ts CHANGED
@@ -24,16 +24,9 @@ export type CronExpressionDay =
24
24
  export type CronString =
25
25
  `${CronExpressionValue} ${CronExpressionValue} ${CronExpressionValue} ${CronExpressionValue} ${CronExpressionDay} ${CronExpressionValue}`;
26
26
  export type CronExpression = `cron(${CronString})`;
27
- export type CronRate = `rate(${number} ${
28
- | 'minute'
29
- | 'minutes'
30
- | 'hour'
31
- | 'hours'
32
- | 'day'
33
- | 'days'})`;
34
27
  /** One-time `at(…)` schedule (e.g. `at(2025-06-01T10:00:00)`). */
35
28
  export type CronAt = `at(${string})`;
36
- export type CronSchedule = CronExpression | CronRate | CronAt;
29
+ export type CronSchedule = CronExpression | CronAt;
37
30
 
38
31
  /**
39
32
  * `Cron` — wraps `sst.aws.CronV2` to invoke a `Function` on a schedule.
@@ -108,6 +101,6 @@ export interface CronProps
108
101
  extends Omit<sst.aws.CronV2Args, 'function' | 'schedule'> {
109
102
  /** The function invoked on schedule — a `Function` (or anything with an `arn`). */
110
103
  processor: Function | { arn: $util.Input<string> };
111
- /** Cron `rate(…)`, `cron(…)`, or `at(…)` schedule, fully type-checked. */
104
+ /** Cron `cron(…)` or `at(…)` schedule, fully type-checked. */
112
105
  schedule: CronSchedule;
113
106
  }
@@ -36,7 +36,11 @@ const manifest = {
36
36
  { name: 'worker', handler: 'worker.handler', environment: ['DB_URL'] },
37
37
  ],
38
38
  crons: [
39
- { name: 'nightly', handler: 'nightly.handler', schedule: 'rate(1 day)' },
39
+ {
40
+ name: 'nightly',
41
+ handler: 'nightly.handler',
42
+ schedule: 'cron(0 0 * * ? *)',
43
+ },
40
44
  ],
41
45
  } as const satisfies Manifest;
42
46
 
package/src/sst/index.ts CHANGED
@@ -12,7 +12,6 @@ export {
12
12
  Cron,
13
13
  type CronExpression,
14
14
  type CronProps,
15
- type CronRate,
16
15
  type CronSchedule,
17
16
  } from './Cron';
18
17
  export { Function, type FunctionProps } from './Function';