musora-content-services 2.158.0 → 2.158.1
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/.coderabbit.yaml +0 -0
- package/.editorconfig +0 -0
- package/.github/pull_request_template.md +0 -0
- package/.github/workflows/conventional-commits.yaml +0 -0
- package/.prettierignore +0 -0
- package/.prettierrc +0 -0
- package/CHANGELOG.md +10 -0
- package/CLAUDE.md +0 -0
- package/README.md +0 -0
- package/babel.config.cjs +0 -0
- package/package.json +1 -1
- package/src/constants/award-assets.js +0 -0
- package/src/constants/membership-permissions.ts +0 -0
- package/src/contentMetaData.js +0 -0
- package/src/filterBuilder.js +0 -0
- package/src/infrastructure/http/HttpClient.ts +0 -0
- package/src/infrastructure/http/executors/FetchRequestExecutor.ts +0 -0
- package/src/infrastructure/http/index.ts +0 -0
- package/src/infrastructure/http/interfaces/HeaderProvider.ts +0 -0
- package/src/infrastructure/http/interfaces/HttpError.ts +0 -0
- package/src/infrastructure/http/interfaces/NetworkError.ts +0 -0
- package/src/infrastructure/http/interfaces/RequestExecutor.ts +0 -0
- package/src/infrastructure/http/interfaces/RequestOptions.ts +0 -0
- package/src/infrastructure/http/providers/DefaultHeaderProvider.ts +0 -0
- package/src/lib/ads/monoid.ts +0 -0
- package/src/lib/ads/semigroup.ts +0 -0
- package/src/lib/brands.ts +0 -0
- package/src/lib/lastUpdated.js +0 -0
- package/src/lib/sanity/field-access.ts +0 -0
- package/src/lib/sanity/query.ts +0 -0
- package/src/services/api/types.js +0 -0
- package/src/services/api/types.ts +0 -0
- package/src/services/awards/award-callbacks.js +0 -0
- package/src/services/awards/award-query.js +0 -0
- package/src/services/awards/internal/.indexignore +0 -0
- package/src/services/awards/internal/award-definitions.js +0 -0
- package/src/services/awards/internal/award-events.js +0 -0
- package/src/services/awards/internal/award-manager.js +0 -0
- package/src/services/awards/internal/certificate-builder.js +0 -0
- package/src/services/awards/internal/completion-data-generator.js +0 -0
- package/src/services/awards/internal/content-progress-observer.js +0 -0
- package/src/services/awards/internal/image-utils.js +0 -0
- package/src/services/awards/internal/message-generator.js +0 -0
- package/src/services/awards/internal/types.js +0 -0
- package/src/services/awards/types.d.ts +0 -0
- package/src/services/awards/types.js +0 -0
- package/src/services/config.js +0 -0
- package/src/services/content/artist.ts +0 -0
- package/src/services/content/content.ts +0 -0
- package/src/services/content/genre.ts +0 -0
- package/src/services/content/instructor.ts +0 -0
- package/src/services/content-org/content-org.js +0 -0
- package/src/services/content-org/playlists-types.js +0 -0
- package/src/services/content-org/playlists.js +0 -0
- package/src/services/contentAggregator.js +2 -1
- package/src/services/contentLikes.js +0 -0
- package/src/services/dataContext.js +0 -0
- package/src/services/dateUtils.js +0 -0
- package/src/services/eventsAPI.js +0 -0
- package/src/services/forums/categories.ts +0 -0
- package/src/services/forums/forums.ts +0 -0
- package/src/services/forums/posts.ts +0 -0
- package/src/services/forums/types.ts +0 -0
- package/src/services/gamification/awards.ts +0 -0
- package/src/services/gamification/gamification.js +0 -0
- package/src/services/imageSRCBuilder.js +0 -0
- package/src/services/imageSRCVerify.js +0 -0
- package/src/services/liveTesting.ts +0 -0
- package/src/services/permissions/PermissionsAdapterFactory.ts +0 -0
- package/src/services/permissions/README.md +0 -0
- package/src/services/progress-events.js +0 -0
- package/src/services/progress-row/base.js +0 -0
- package/src/services/progress-row/rows/.indexignore +0 -0
- package/src/services/progress-row/rows/content-card.js +0 -0
- package/src/services/progress-row/rows/playlist-card.js +0 -0
- package/src/services/railcontent.js +0 -0
- package/src/services/reporting/README.md +0 -0
- package/src/services/reporting/types.ts +0 -0
- package/src/services/sanity.js +2 -2
- package/src/services/sentry/.indexignore +0 -0
- package/src/services/sentry/index.ts +0 -0
- package/src/services/state.ts +0 -0
- package/src/services/sync/.indexignore +0 -0
- package/src/services/sync/adapters/factory.ts +0 -0
- package/src/services/sync/adapters/sqlite.ts +0 -0
- package/src/services/sync/context/providers/base.ts +0 -0
- package/src/services/sync/context/providers/connectivity.ts +0 -0
- package/src/services/sync/context/providers/durability.ts +0 -0
- package/src/services/sync/context/providers/index.ts +0 -0
- package/src/services/sync/context/providers/session.ts +0 -0
- package/src/services/sync/context/providers/tabs.ts +0 -0
- package/src/services/sync/context/providers/visibility.ts +0 -0
- package/src/services/sync/database/factory.ts +0 -0
- package/src/services/sync/debug.ts +0 -0
- package/src/services/sync/effects/index.ts +0 -0
- package/src/services/sync/effects/logout-warning.ts +0 -0
- package/src/services/sync/errors/boundary.ts +0 -0
- package/src/services/sync/errors/index.ts +0 -0
- package/src/services/sync/errors/validators.ts +0 -0
- package/src/services/sync/fetch.ts +0 -0
- package/src/services/sync/index.ts +0 -0
- package/src/services/sync/manager.ts +0 -0
- package/src/services/sync/models/Base.ts +0 -0
- package/src/services/sync/models/ContentLike.ts +0 -0
- package/src/services/sync/models/ContentProgress.ts +0 -0
- package/src/services/sync/models/Practice.ts +0 -0
- package/src/services/sync/models/PracticeDayNote.ts +0 -0
- package/src/services/sync/models/UserAwardProgress.ts +0 -0
- package/src/services/sync/models/index.ts +0 -0
- package/src/services/sync/repositories/content-likes.ts +0 -0
- package/src/services/sync/repositories/content-progress.ts +0 -0
- package/src/services/sync/repositories/index.ts +0 -0
- package/src/services/sync/repositories/practice-day-notes.ts +0 -0
- package/src/services/sync/repositories/practices.ts +0 -0
- package/src/services/sync/repositories/user-award-progress.ts +0 -0
- package/src/services/sync/repository-proxy.ts +0 -0
- package/src/services/sync/resolver.ts +1 -9
- package/src/services/sync/run-scope.ts +0 -0
- package/src/services/sync/schema/index.ts +0 -0
- package/src/services/sync/serializers/index.ts +0 -0
- package/src/services/sync/serializers/model.ts +0 -0
- package/src/services/sync/serializers/raw.ts +0 -0
- package/src/services/sync/store/index.ts +1 -7
- package/src/services/sync/store-configs.ts +0 -0
- package/src/services/sync/strategies/base.ts +0 -0
- package/src/services/sync/strategies/index.ts +0 -0
- package/src/services/sync/strategies/initial.ts +0 -0
- package/src/services/sync/strategies/polling.ts +0 -0
- package/src/services/sync/telemetry/flood-prevention.ts +0 -0
- package/src/services/sync/telemetry/sampling.ts +0 -0
- package/src/services/sync/utils/event-emitter.ts +0 -0
- package/src/services/sync/utils/index.ts +0 -0
- package/src/services/sync/utils/throttle.ts +0 -0
- package/src/services/sync/utils/timers.ts +0 -0
- package/src/services/types.js +0 -0
- package/src/services/user/account.ts +0 -0
- package/src/services/user/chat.js +0 -0
- package/src/services/user/interests.js +0 -0
- package/src/services/user/management.js +0 -0
- package/src/services/user/memberships.ts +0 -0
- package/src/services/user/notifications.js +0 -0
- package/src/services/user/payments.ts +0 -0
- package/src/services/user/sessions.js +0 -0
- package/src/services/user/streakCalculator.ts +0 -0
- package/src/services/user/types.js +0 -0
- package/src/services/user/user-management-system.js +0 -0
- package/test/SKIPPED_TESTS.md +0 -0
- package/test/initializeTests.js +0 -0
- package/test/integration/content.test.js +0 -0
- package/test/integration/contentProgress.test.js +0 -0
- package/test/integration/forum.test.js +0 -0
- package/test/integration/sanityQueryService.test.js +0 -0
- package/test/localStorageMock.js +0 -0
- package/test/log.js +0 -0
- package/test/mockData/award-definitions.js +0 -0
- package/test/mockData/mockData_fetchByRailContentIds_one_content.json +0 -0
- package/test/mockData/mockData_progress_content.json +0 -0
- package/test/mockData/mockData_sanity_progress_content.json +0 -0
- package/test/mockData/mockData_user_practices.json +0 -0
- package/test/setupConsole.js +0 -0
- package/test/setupNetworkGuard.js +0 -0
- package/test/unit/lib/__snapshots__/filter.test.ts.snap +0 -0
- package/test/unit/lib/query.test.ts +0 -0
- package/test/unit/sync/resolver.test.ts +6 -9
- package/.claude/settings.local.json +0 -22
package/.coderabbit.yaml
CHANGED
|
File without changes
|
package/.editorconfig
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/.prettierignore
CHANGED
|
File without changes
|
package/.prettierrc
CHANGED
|
File without changes
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.158.1](https://github.com/railroadmedia/musora-content-services/compare/v2.158.0...v2.158.1) (2026-05-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* increment sanity url version ([#953](https://github.com/railroadmedia/musora-content-services/issues/953)) ([61c36c9](https://github.com/railroadmedia/musora-content-services/commit/61c36c962473294e6dfe67d3d688105649e3d79f))
|
|
11
|
+
* pass collection to getProgressDataByIds ([#957](https://github.com/railroadmedia/musora-content-services/issues/957)) ([2ad1620](https://github.com/railroadmedia/musora-content-services/commit/2ad162085f45b35f617c0ba4d2cc32e7be4a3708))
|
|
12
|
+
* Revert "add resolver condition to ensure seen records always get marked sync" ([#956](https://github.com/railroadmedia/musora-content-services/issues/956)) ([56741d3](https://github.com/railroadmedia/musora-content-services/commit/56741d3f49c97e4034e7841deb4aef1f938168c5))
|
|
13
|
+
* update sanity url to v4 ([c567d22](https://github.com/railroadmedia/musora-content-services/commit/c567d227a4f3bdb9f2f1c95364d423e67b1b214f))
|
|
14
|
+
|
|
5
15
|
## [2.158.0](https://github.com/railroadmedia/musora-content-services/compare/v2.153.0...v2.158.0) (2026-05-05)
|
|
6
16
|
|
|
7
17
|
|
package/CLAUDE.md
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
File without changes
|
package/babel.config.cjs
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
package/src/contentMetaData.js
CHANGED
|
File without changes
|
package/src/filterBuilder.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/lib/ads/monoid.ts
CHANGED
|
File without changes
|
package/src/lib/ads/semigroup.ts
CHANGED
|
File without changes
|
package/src/lib/brands.ts
CHANGED
|
File without changes
|
package/src/lib/lastUpdated.js
CHANGED
|
File without changes
|
|
File without changes
|
package/src/lib/sanity/query.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/services/config.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -65,6 +65,7 @@ export async function addContextToContent(dataPromise, ...dataArgs) {
|
|
|
65
65
|
|
|
66
66
|
// todo: merge addProgressData with addResumeTimeSeconds to one watermelon call
|
|
67
67
|
const {
|
|
68
|
+
collection = null, // MA/FE still use this function for LP lessons, so we need this here.
|
|
68
69
|
dataField = null,
|
|
69
70
|
dataField_includeParent = false,
|
|
70
71
|
addProgressPercentage = false,
|
|
@@ -98,7 +99,7 @@ export async function addContextToContent(dataPromise, ...dataArgs) {
|
|
|
98
99
|
awards,
|
|
99
100
|
] = await Promise.all([
|
|
100
101
|
addProgressPercentage || addProgressStatus || addProgressTimestamp
|
|
101
|
-
? getProgressDataByIds(ids) : Promise.resolve(null),
|
|
102
|
+
? getProgressDataByIds(ids, collection) : Promise.resolve(null),
|
|
102
103
|
addIsLiked ? isContentLikedByIds(ids) : Promise.resolve(null),
|
|
103
104
|
addResumeTimeSeconds ? getResumeTimeSecondsByIds(ids) : Promise.resolve(null),
|
|
104
105
|
addNavigateTo ? getNavigateTo(items) : Promise.resolve(null),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/services/sanity.js
CHANGED
|
@@ -1148,7 +1148,7 @@ export async function fetchRelatedLessons(railContentId) {
|
|
|
1148
1148
|
const defaultFilterFields = `_type==^._type && brand == ^.brand && railcontent_id != ${railContentId}`
|
|
1149
1149
|
const params = {
|
|
1150
1150
|
showMembershipRestrictedContent: true,
|
|
1151
|
-
availableContentStatuses: ['published']
|
|
1151
|
+
availableContentStatuses: ['published'],
|
|
1152
1152
|
}
|
|
1153
1153
|
const filterSameArtist = await new FilterBuilder(
|
|
1154
1154
|
`${defaultFilterFields} && references(^.artist->_id)`,
|
|
@@ -1589,7 +1589,7 @@ export async function fetchSanity(
|
|
|
1589
1589
|
}
|
|
1590
1590
|
const perspective = globalConfig.sanityConfig.perspective ?? 'published'
|
|
1591
1591
|
const api = globalConfig.sanityConfig.useCachedAPI ? 'apicdn' : 'api'
|
|
1592
|
-
const baseUrl = `https://sanity.musora.com/${globalConfig.sanityConfig.projectId}/${api}/v${globalConfig.sanityConfig.version}/${globalConfig.sanityConfig.dataset}/
|
|
1592
|
+
const baseUrl = `https://sanity.musora.com/${globalConfig.sanityConfig.projectId}/${api}/v${globalConfig.sanityConfig.version}/${globalConfig.sanityConfig.dataset}/v4?perspective=${perspective}`
|
|
1593
1593
|
|
|
1594
1594
|
try {
|
|
1595
1595
|
const encodedQuery = encodeURIComponent(query)
|
|
File without changes
|
|
File without changes
|
package/src/services/state.ts
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,7 +7,6 @@ export type SyncResolution = {
|
|
|
7
7
|
tuplesForUpdate: [BaseModel, SyncEntry][]
|
|
8
8
|
tuplesForRestore: [BaseModel, SyncEntry][]
|
|
9
9
|
idsForDestroy: RecordId[]
|
|
10
|
-
recordsForSynced: BaseModel[]
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
export type SyncResolverComparator<T extends BaseModel = BaseModel> = (serverEntry: SyncEntryNonDeleted<T>, localModel: T) => 'SERVER' | 'LOCAL'
|
|
@@ -25,8 +24,7 @@ export default class SyncResolver {
|
|
|
25
24
|
entriesForCreate: [],
|
|
26
25
|
tuplesForUpdate: [],
|
|
27
26
|
tuplesForRestore: [],
|
|
28
|
-
idsForDestroy: []
|
|
29
|
-
recordsForSynced: []
|
|
27
|
+
idsForDestroy: []
|
|
30
28
|
}
|
|
31
29
|
}
|
|
32
30
|
|
|
@@ -60,9 +58,6 @@ export default class SyncResolver {
|
|
|
60
58
|
} else if (this.comparator(server as SyncEntryNonDeleted<BaseModel>, local) !== 'LOCAL') {
|
|
61
59
|
// local is older, so update it with server's
|
|
62
60
|
this.resolution.tuplesForUpdate.push([local, server])
|
|
63
|
-
} else {
|
|
64
|
-
// server is older - can happen with clock skew - just mark as synced
|
|
65
|
-
this.resolution.recordsForSynced.push(local)
|
|
66
61
|
}
|
|
67
62
|
}
|
|
68
63
|
|
|
@@ -74,9 +69,6 @@ export default class SyncResolver {
|
|
|
74
69
|
} else if (this.comparator(server as SyncEntryNonDeleted<BaseModel>, local) !== 'LOCAL') {
|
|
75
70
|
// local is older, so update it with server's
|
|
76
71
|
this.resolution.tuplesForUpdate.push([local, server])
|
|
77
|
-
} else {
|
|
78
|
-
// server is older - can happen with clock skew - just mark as synced
|
|
79
|
-
this.resolution.recordsForSynced.push(local)
|
|
80
72
|
}
|
|
81
73
|
}
|
|
82
74
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -958,15 +958,9 @@ export default class SyncStore<TModel extends BaseModel = BaseModel> {
|
|
|
958
958
|
r._raw._changed = ''
|
|
959
959
|
})
|
|
960
960
|
})
|
|
961
|
-
const syncedBuilds = result.recordsForSynced.map((record) => {
|
|
962
|
-
return record.prepareUpdate((r) => {
|
|
963
|
-
r._raw._status = 'synced'
|
|
964
|
-
r._raw._changed = ''
|
|
965
|
-
})
|
|
966
|
-
})
|
|
967
961
|
|
|
968
962
|
return [
|
|
969
|
-
[...destroyedBuilds, ...createdBuilds, ...updatedBuilds, ...restoreDestroyBuilds
|
|
963
|
+
[...destroyedBuilds, ...createdBuilds, ...updatedBuilds, ...restoreDestroyBuilds],
|
|
970
964
|
[...restoreCreateBuilds],
|
|
971
965
|
]
|
|
972
966
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/services/types.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/SKIPPED_TESTS.md
CHANGED
|
File without changes
|
package/test/initializeTests.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/localStorageMock.js
CHANGED
|
File without changes
|
package/test/log.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/test/setupConsole.js
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -65,11 +65,10 @@ describe('againstNone', () => {
|
|
|
65
65
|
const resolver = new SyncResolver()
|
|
66
66
|
resolver.againstNone(makeEntry('rec-1', { deletedAt: T }))
|
|
67
67
|
|
|
68
|
-
const { entriesForCreate, tuplesForUpdate, idsForDestroy
|
|
68
|
+
const { entriesForCreate, tuplesForUpdate, idsForDestroy } = resolver.result
|
|
69
69
|
expect(entriesForCreate).toHaveLength(0)
|
|
70
70
|
expect(tuplesForUpdate).toHaveLength(0)
|
|
71
71
|
expect(idsForDestroy).toHaveLength(0)
|
|
72
|
-
expect(recordsForSynced).toHaveLength(0)
|
|
73
72
|
})
|
|
74
73
|
})
|
|
75
74
|
|
|
@@ -101,10 +100,9 @@ describe('againstSynced', () => {
|
|
|
101
100
|
const resolver = new SyncResolver()
|
|
102
101
|
resolver.againstSynced(makeLocal('rec-1', T + 1), makeEntry('rec-1', { updatedAt: T }))
|
|
103
102
|
|
|
104
|
-
const { tuplesForUpdate, idsForDestroy
|
|
103
|
+
const { tuplesForUpdate, idsForDestroy } = resolver.result
|
|
105
104
|
expect(tuplesForUpdate).toHaveLength(0)
|
|
106
105
|
expect(idsForDestroy).toHaveLength(0)
|
|
107
|
-
expect(recordsForSynced).toHaveLength(0)
|
|
108
106
|
})
|
|
109
107
|
})
|
|
110
108
|
|
|
@@ -129,14 +127,14 @@ describe('againstCreated', () => {
|
|
|
129
127
|
expect(resolver.result.tuplesForUpdate[0][1]).toBe(server)
|
|
130
128
|
})
|
|
131
129
|
|
|
132
|
-
test('server older (clock skew) →
|
|
130
|
+
test('server older (clock skew) → no action (record stays dirty)', () => {
|
|
133
131
|
const resolver = new SyncResolver()
|
|
134
132
|
const local = makeLocal('rec-1', T + 1)
|
|
135
133
|
|
|
136
134
|
resolver.againstCreated(local, makeEntry('rec-1', { updatedAt: T }))
|
|
137
135
|
|
|
138
|
-
expect(resolver.result.recordsForSynced).toContain(local)
|
|
139
136
|
expect(resolver.result.tuplesForUpdate).toHaveLength(0)
|
|
137
|
+
expect(resolver.result.idsForDestroy).toHaveLength(0)
|
|
140
138
|
})
|
|
141
139
|
})
|
|
142
140
|
|
|
@@ -160,14 +158,14 @@ describe('againstUpdated', () => {
|
|
|
160
158
|
expect(resolver.result.tuplesForUpdate).toHaveLength(1)
|
|
161
159
|
})
|
|
162
160
|
|
|
163
|
-
test('server older (clock skew) →
|
|
161
|
+
test('server older (clock skew) → no action (record stays dirty)', () => {
|
|
164
162
|
const resolver = new SyncResolver()
|
|
165
163
|
const local = makeLocal('rec-1', T + 1)
|
|
166
164
|
|
|
167
165
|
resolver.againstUpdated(local, makeEntry('rec-1', { updatedAt: T }))
|
|
168
166
|
|
|
169
|
-
expect(resolver.result.recordsForSynced).toContain(local)
|
|
170
167
|
expect(resolver.result.tuplesForUpdate).toHaveLength(0)
|
|
168
|
+
expect(resolver.result.idsForDestroy).toHaveLength(0)
|
|
171
169
|
})
|
|
172
170
|
})
|
|
173
171
|
|
|
@@ -214,7 +212,6 @@ describe('custom comparator', () => {
|
|
|
214
212
|
resolver.againstSynced(local, server)
|
|
215
213
|
|
|
216
214
|
expect(resolver.result.tuplesForUpdate).toHaveLength(0)
|
|
217
|
-
expect(resolver.result.recordsForSynced).toHaveLength(0)
|
|
218
215
|
expect(resolver.result.idsForDestroy).toHaveLength(0)
|
|
219
216
|
})
|
|
220
217
|
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"permissions": {
|
|
3
|
-
"allow": [
|
|
4
|
-
"Bash(tree:*)",
|
|
5
|
-
"Bash(find:*)",
|
|
6
|
-
"Bash(docker exec:*)",
|
|
7
|
-
"Bash(node:*)",
|
|
8
|
-
"Bash(npm run build-index:*)",
|
|
9
|
-
"Bash(npm run link_mcs:*)",
|
|
10
|
-
"Bash(./link_mcs.sh:*)",
|
|
11
|
-
"Bash(curl:*)",
|
|
12
|
-
"Bash(php artisan:*)",
|
|
13
|
-
"Bash(git checkout:*)",
|
|
14
|
-
"Bash(source .env)",
|
|
15
|
-
"Bash(echo:*)",
|
|
16
|
-
"Bash(grep:*)",
|
|
17
|
-
"Bash(gh api repos/railroadmedia/musora-platform-backend/commits/1f9878a5e681bf1e2233c0d59a618d477b118c49 --jq '.commit.message' 2>/dev/null || echo \"no access\")",
|
|
18
|
-
"WebFetch(domain:github.com)",
|
|
19
|
-
"Read(//app/**)"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
}
|