Files
workouts/Shared/Model/ULID.swift
T
rzen 1f2df491db Migrate the sync file layer onto the IndieSync package
Replaces the app-local copies of the extracted storage core with the
IndieSync 0.1.0 package (pinned from the new tag): ICloudFileManager ->
DocumentFileStore + TombstoneStore, ICloudFileMonitor ->
MetadataObserver (batched events with the content-date churn gate),
and the shared ULID / DocumentCoder / Tombstone / VersionedDocument
pieces. SyncEngine stays app-specific and is rewired onto the package
types; documents rename currentSchema -> currentSchemaVersion to adopt
the package protocol. ULID.make() remains as a shim minting the string
form the app keys on.

Behavior-preserving: identical JSON bytes (same coder config), same
stub wire format (kind encodes as the same strings), same soft-delete
ordering, same 30-day prune. WorkoutDocument keeps its local-calendar
month bucketing rather than adopting TimeBucketedLayout's UTC paths --
changing derivation would strand existing files. The watch target
links the package too (ULID + DocumentCoder via Shared); iOS, watchOS,
and widget targets all build.
2026-07-05 08:04:29 -04:00

12 lines
439 B
Swift

import Foundation
import IndieSync
// The ULID implementation lives in the IndieSync package. Workouts' documents
// and cache entities key on the 26-char string form, so this shim keeps the
// app-wide `ULID.make()` minting entry point unchanged.
extension ULID {
/// Mints a fresh ULID for the current instant, as its canonical
/// 26-character Crockford base32 string.
static func make() -> String { ULID().stringValue }
}