@atlastodo/shared 0.1.11-rc.9 → 0.1.11

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 +8 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -18200,9 +18200,11 @@ function parseTodoistDate(raw, now, timeZone) {
18200
18200
  return date ? { dueAt: instant(date, split.time) } : { unsupported: "date" };
18201
18201
  }
18202
18202
  let start = today;
18203
- const starting = / (?:starting(?: on)?|from) (.+)$/.exec(phrase);
18204
- if (starting) {
18205
- const date = parseCivilDate(starting[1], today);
18203
+ const starting = / (?:starting(?: on)?|from) /.exec(phrase);
18204
+ const startText = starting ? phrase.slice(starting.index + starting[0].length) : "";
18205
+ if (starting && startText && !startText.includes(`
18206
+ `)) {
18207
+ const date = parseCivilDate(startText, today);
18206
18208
  if (!date)
18207
18209
  return { unsupported: "recurrence" };
18208
18210
  start = date;
@@ -20776,6 +20778,7 @@ function presetTarget(id, now, timeZone) {
20776
20778
  }
20777
20779
  }
20778
20780
  // src/vault.ts
20781
+ import { trimTrailing } from "@atlastodo/client-core";
20779
20782
  var VAULT_ITEM_TYPES = [
20780
20783
  "login",
20781
20784
  "note",
@@ -20952,7 +20955,8 @@ function fieldValue(name, kind, value) {
20952
20955
  const t = value.trim();
20953
20956
  if (t.slice(0, 10).replace(/[A-Z]/g, (c) => c.toLowerCase()) === "otpauth://")
20954
20957
  return t;
20955
- const seed = t.replace(/\s/g, "").replace(/[a-z]/g, (c) => c.toUpperCase()).replace(/=+$/, "");
20958
+ const unpadded = t.replace(/\s/g, "").replace(/[a-z]/g, (c) => c.toUpperCase());
20959
+ const seed = trimTrailing(unpadded, "=");
20956
20960
  if (!seed || !/^[A-Z2-7]+$/.test(seed)) {
20957
20961
  throw bad(`the totp field "${name}" needs an otpauth:// URI or a base32 secret`);
20958
20962
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlastodo/shared",
3
- "version": "0.1.11-rc.9",
3
+ "version": "0.1.11",
4
4
  "description": "Atlas shared logic: the portable task rules, recurrence, quick add, filters, i18n and theme used by every Atlas client",
5
5
  "license": "AGPL-3.0-only",
6
6
  "homepage": "https://github.com/atlastodo/atlas/tree/main/packages/shared",
@@ -46,7 +46,7 @@
46
46
  "test": "vitest run"
47
47
  },
48
48
  "dependencies": {
49
- "@atlastodo/client-core": "0.1.11-rc.9",
49
+ "@atlastodo/client-core": "0.1.11",
50
50
  "@noble/hashes": "^2.4.0",
51
51
  "fflate": "^0.8.3"
52
52
  },