Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .snyk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ignore:
'SNYK-JS-SIRV-12558119':
- '* > sirv@2.0.4':
reason: 'Transitive dependency in Docusaurus; not exploitable in static site serving context (dev-only asset handler)'
expires: '2026-07-28T00:00:00.000Z'
expires: '2027-01-31T00:00:00.000Z'
created: '2025-11-06T15:57:00.000Z'
'SNYK-JS-JSYAML-13961110':
- '* > js-yaml':
Expand Down Expand Up @@ -40,7 +40,7 @@ ignore:
'SNYK-JS-PNPMNPMCONF-14897556':
- '* > @pnpm/npm-conf@2.3.1':
reason: 'Transitive dependency in @docusaurus/core; not exploitable in current usage.'
expires: '2026-07-28T00:00:00.000Z'
expires: '2027-01-31T00:00:00.000Z'
created: '2026-01-08T11:04:00.000Z'
'SNYK-JS-UNDICI-14943963':
- '* > undici':
Expand Down Expand Up @@ -162,7 +162,7 @@ ignore:
'SNYK-JS-OPENTELEMETRYCORE-17373280':
- '* > @opentelemetry/core':
reason: 'The fix requires migrating the Azure Functions telemetry stack from OpenTelemetry 1.x to 2.8.0 or newer. The current Azure exporter and 0.57.x SDK packages require the 1.x API family; a forced major override is type-compatible at build time but leaves mixed SDK internals. Accepted temporarily while the existing OTEL 2.x migration is completed.'
expires: '2026-07-18T00:00:00.000Z'
expires: '2027-01-31T00:00:00.000Z'
created: '2026-06-18T00:00:00.000Z'
'SNYK-JS-BRACEEXPANSION-17706650':
- '* > brace-expansion@1.1.13':
Expand All @@ -174,3 +174,8 @@ ignore:
reason: 'The transitive dependency of @opentelemetry does not have a fixed upgrade path. Accepted temporarily until upgrade paths are made available.'
expires: '2026-07-18T00:00:00.000Z'
created: '2026-06-18T00:00:00.000Z'
'SNYK-JS-REACTROUTER-18313151':
- '* > react-router@7.18.0':
reason: 'react-router-dom 7.18.0 requires matching react-router 7.18.0. React Router 8 removes react-router-dom and requires a separate source migration.'
expires: '2027-01-31T00:00:00.000Z'
created: '2026-07-30T00:00:00.000Z'
12 changes: 6 additions & 6 deletions apps/server-mongodb-memory-mock/src/seed/seed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,30 @@ async function upsertSeedDocuments(connection: Connection, collectionName: strin
export async function seedDatabase(connection: Connection): Promise<void> {
const users = endUsers.map((u: EndUser) => ({
...u,
_id: toObjectId(u._id as string),
_id: toObjectId(String(u._id)),
}));
await upsertSeedDocuments(connection, 'users', users);
console.log(` Seeded ${users.length} users`);

const comms = communities.map((c: Community) => ({
...c,
_id: toObjectId(c._id as string),
_id: toObjectId(String(c._id)),
createdBy: toObjectId(String(c.createdBy)),
}));
await upsertSeedDocuments(connection, 'communities', comms);
console.log(` Seeded ${comms.length} communities`);

const roles = endUserRoles.map((r: EndUserRole) => ({
...r,
_id: toObjectId(r._id as string),
_id: toObjectId(String(r._id)),
community: toObjectId(String(r.community)),
}));
await upsertSeedDocuments(connection, 'roles', roles);
console.log(` Seeded ${roles.length} roles`);

const mems = members.map((m: Member) => ({
...m,
_id: toObjectId(m._id as string),
_id: toObjectId(String(m._id)),
community: toObjectId(String(m.community)),
role: m.role ? toObjectId(String(m.role)) : undefined,
accounts: m.accounts.map((a) => ({
Expand All @@ -70,7 +70,7 @@ export async function seedDatabase(connection: Connection): Promise<void> {

const props = properties.map((p: Property) => ({
...p,
_id: toObjectId(p._id as string),
_id: toObjectId(String(p._id)),
community: toObjectId(String(p.community)),
owner: p.owner ? toObjectId(String(p.owner)) : undefined,
}));
Expand All @@ -79,7 +79,7 @@ export async function seedDatabase(connection: Connection): Promise<void> {

const svcs = services.map((s: Service) => ({
...s,
_id: toObjectId(s._id as string),
_id: toObjectId(String(s._id)),
community: toObjectId(String(s.community)),
}));
await upsertSeedDocuments(connection, 'services', svcs);
Expand Down
4 changes: 2 additions & 2 deletions apps/server-mongodb-memory-mock/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"tags": ["mock"],
"tasks": {
"dev": {
"dependsOn": ["build"],
"dependsOn": ["^build"],
"persistent": true,
"interruptible": true,
"inputs": []
},
"dev:worktree": {
"dependsOn": ["build"],
"dependsOn": ["^build"],
"persistent": true,
"interruptible": true,
"inputs": []
Expand Down
4 changes: 2 additions & 2 deletions apps/server-oauth2-mock/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"inputs": ["$TURBO_EXTENDS$", "../**/mock-oidc*.json"]
},
"dev": {
"dependsOn": ["build"],
"dependsOn": ["^build"],
"interruptible": true,
"persistent": true,
"inputs": ["$TURBO_DEFAULT$", "../**/mock-oidc*.json"]
},
"dev:worktree": {
"dependsOn": ["build"],
"dependsOn": ["^build"],
"interruptible": true,
"persistent": true,
"inputs": ["$TURBO_DEFAULT$", "../**/mock-oidc*.json"]
Expand Down
2 changes: 1 addition & 1 deletion packages/cellix/serenity-framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
"@types/react": "^19.1.8",
"@vitest/coverage-istanbul": "catalog:",
"playwright": "catalog:",
"react": "^19.1.0",
"react": "catalog:",
"rimraf": "catalog:",
"typescript": "catalog:",
"vitest": "catalog:"
Expand Down
2 changes: 1 addition & 1 deletion packages/cellix/service-queue-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@azure/identity": "^4.13.1",
"@azure/storage-queue": "12.29.0",
"@azure/storage-queue": "catalog:",
"@opentelemetry/api": "1.9.0",
"ajv": "^8.12.0",
"ajv-formats": "^2.1.1",
Expand Down
2 changes: 2 additions & 0 deletions packages/cellix/ui-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
"@vitest/browser-playwright": "catalog:",
"@vitest/coverage-istanbul": "catalog:",
"jsdom": "catalog:",
"react": "catalog:",
"react-dom": "catalog:",
"react-oidc-context": "^3.3.0",
"react-router-dom": "catalog:",
"rimraf": "catalog:",
Expand Down
4 changes: 2 additions & 2 deletions packages/ocom-verification/acceptance-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@serenity-js/serenity-bdd": "catalog:",
"antd": "catalog:",
"graphql": "catalog:",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react": "catalog:",
"react-dom": "catalog:",
"react-oidc-context": "^3.3.0",
"react-router-dom": "catalog:",
"std-env": "^4.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/ocom-verification/e2e-tests/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": ["//"],
"tasks": {
"test:e2e": {
"dependsOn": ["^build"],
"dependsOn": ["^build", "@apps/api#build", "@apps/server-mongodb-memory-mock#build", "@apps/server-oauth2-mock#build", "@apps/ui-community#build", "@apps/ui-staff#build"],
"inputs": [
"src/**/*.ts",
"config/**",
Expand All @@ -16,7 +16,7 @@
"cache": false
},
"test:e2e:ci": {
"dependsOn": ["^build"],
"dependsOn": ["^build", "@apps/api#build", "@apps/server-mongodb-memory-mock#build", "@apps/server-oauth2-mock#build", "@apps/ui-community#build", "@apps/ui-staff#build"],
"inputs": ["src/**/*.ts", "cucumber.js", "package.json"],
"cache": false
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ test.for(feature, ({ Scenario, Background, BeforeEachScenario }) => {
};
Object.assign(ModelMock, {
findById: vi.fn((id: string) => ({
exec: vi.fn(() => (id === staffRoleDoc._id ? staffRoleDoc : null)),
exec: vi.fn(() => (id === String(staffRoleDoc._id) ? staffRoleDoc : null)),
})),
findOne: vi.fn((query: { roleName?: string; enterpriseAppRole?: string; isDefault?: boolean }) => ({
exec: vi.fn(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import type { MongooseSeedwork } from '@cellix/mongoose-seedwork';
import { type FilterQuery, type FlattenMaps, isValidObjectId, type Model, type PipelineStage, type QueryOptions, type Require_id } from 'mongoose';
import { type FilterQuery, isValidObjectId, type Model, type PipelineStage, type QueryOptions, type Require_id } from 'mongoose';

type LeanBase<T> = Readonly<Require_id<FlattenMaps<T>>>;
// FlattenMaps is unnecessary for these schemas and recursively transforms embedded
// Mongoose documents in ways that make lean results incompatible with converters.
type LeanBase<T> = Readonly<Require_id<T>>;
type Lean<T> = LeanBase<T> & { id: string };
type ObjectIdLike = { toHexString: () => string };

const hasToHexString = (value: unknown): value is ObjectIdLike => typeof value === 'object' && value !== null && 'toHexString' in value && typeof value.toHexString === 'function';

export type FindOptions = {
fields?: string[] | undefined;
Expand Down Expand Up @@ -49,9 +54,14 @@ export class MongoDataSourceImpl<TDoc extends MongooseSeedwork.Base> implements
}

private appendId(doc: LeanBase<TDoc>): Lean<TDoc> {
const id = doc._id;
const stringId = typeof id === 'string' ? id : hasToHexString(id) ? id.toHexString() : null;
if (stringId === null) {
throw new TypeError('MongoDB document is missing a string-compatible _id');
}
return {
...doc,
id: String(doc._id),
id: stringId,
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/ocom/service-queue-storage/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"outputs": ["src/**/*.schema.generated.ts"]
},
"build": {
"dependsOn": ["gen"],
"dependsOn": ["gen", "^build"],
"inputs": ["$TURBO_EXTENDS$"],
"outputs": ["$TURBO_EXTENDS$"]
}
Expand Down
Loading
Loading