@fire-spark/core 0.15.1 → 0.15.2

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.
Files changed (2) hide show
  1. package/dist/index.js +18 -6
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -9069,12 +9069,24 @@ const windowMinutes = (condition) => {
9069
9069
  };
9070
9070
  //#endregion
9071
9071
  //#region src/rules/recurringDateCron.ts
9072
- import_dayjs_min.default.extend(utc);
9073
- import_dayjs_min.default.extend(timezone);
9074
- import_dayjs_min.default.extend(isBetween);
9075
- import_dayjs_min.default.extend(isSameOrAfter);
9076
- import_dayjs_min.default.extend(weekOfYear);
9077
- import_dayjs_min.default.extend(advancedFormat);
9072
+ const ensureDayjsPlugin = (plugin, ready) => {
9073
+ if (ready) return;
9074
+ const fn = plugin;
9075
+ fn.$i = false;
9076
+ import_dayjs_min.default.extend(fn);
9077
+ };
9078
+ const hasUtc = typeof import_dayjs_min.default.utc === "function";
9079
+ const hasTz = typeof import_dayjs_min.default.tz === "function";
9080
+ const hasBetween = typeof (0, import_dayjs_min.default)().isBetween === "function";
9081
+ const hasSame = typeof (0, import_dayjs_min.default)().isSameOrAfter === "function";
9082
+ const hasWeek = typeof (0, import_dayjs_min.default)().week === "function";
9083
+ const hasAdvanced = (0, import_dayjs_min.default)("2026-08-23").format("Do") === "23rd";
9084
+ ensureDayjsPlugin(utc, hasUtc);
9085
+ ensureDayjsPlugin(timezone, hasTz);
9086
+ ensureDayjsPlugin(isBetween, hasBetween);
9087
+ ensureDayjsPlugin(isSameOrAfter, hasSame);
9088
+ ensureDayjsPlugin(weekOfYear, hasWeek);
9089
+ ensureDayjsPlugin(advancedFormat, hasAdvanced);
9078
9090
  var RecurringDateCron = class {
9079
9091
  startDate;
9080
9092
  endDate;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fire-spark/core",
3
- "version": "0.15.1",
3
+ "version": "0.15.2",
4
4
  "description": "Fire Spark headless SDK",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -20,8 +20,8 @@
20
20
  "big.js": "6.2.1",
21
21
  "dayjs": "1.11.9",
22
22
  "@types/big.js": "6.2.2",
23
- "@fire-spark/payments": "^0.15.1",
24
- "@fire-spark/types": "^0.15.1"
23
+ "@fire-spark/payments": "^0.15.2",
24
+ "@fire-spark/types": "^0.15.2"
25
25
  },
26
26
  "devDependencies": {
27
27
  "tsdown": "^0.22.14",