wirejs-deploy-amplify-basic 0.1.171 → 0.1.172

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.
@@ -236,11 +236,15 @@ for (const resource of generated) {
236
236
  */
237
237
  function cronExpressionToSchedule(expression: string): Schedule {
238
238
  const [minute, hour, dayOfMonth, month, dayOfWeek] = expression.trim().split(/\s+/);
239
- // EventBridge requires exactly one of day-of-month or day-of-week to be '?'.
240
- // If neither is wildcarded, prefer keeping day-of-month and set weekday to '?'.
241
- const ebDayOfMonth = dayOfWeek !== '*' && dayOfWeek !== '?' ? '?' : dayOfMonth;
242
- const ebDayOfWeek = ebDayOfMonth === '?' ? dayOfWeek : '?';
243
- return Schedule.cron({ minute, hour, day: ebDayOfMonth, month, weekDay: ebDayOfWeek });
239
+ // CDK's Schedule.cron() does not accept both `day` and `weekDay` simultaneously.
240
+ // If dayOfWeek is specified (not '*' or '?'), use it; otherwise use dayOfMonth.
241
+ const useWeekDay = dayOfWeek !== '*' && dayOfWeek !== '?';
242
+ return Schedule.cron({
243
+ minute,
244
+ hour,
245
+ month,
246
+ ...(useWeekDay ? { weekDay: dayOfWeek } : { day: dayOfMonth }),
247
+ });
244
248
  }
245
249
 
246
250
  /**
@@ -3,6 +3,6 @@
3
3
  "dependencies": {
4
4
  "jsdom": "^25.0.1",
5
5
  "wirejs-dom": "^1.0.44",
6
- "wirejs-resources": "^0.1.171"
6
+ "wirejs-resources": "^0.1.172"
7
7
  }
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wirejs-deploy-amplify-basic",
3
- "version": "0.1.171",
3
+ "version": "0.1.172",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -44,7 +44,7 @@
44
44
  "recursive-copy": "^2.0.14",
45
45
  "rimraf": "^6.0.1",
46
46
  "wirejs-dom": "^1.0.44",
47
- "wirejs-resources": "^0.1.171"
47
+ "wirejs-resources": "^0.1.172"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@aws-amplify/backend": "^1.14.0",