Skip to content
Merged
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
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@
"@objectql/protocol-graphql": "workspace:*",
"@objectql/protocol-json-rpc": "workspace:*",
"@objectql/protocol-odata-v4": "workspace:*",
"@objectstack/cli": "2.0.1",
"@objectstack/core": "2.0.1",
"@objectstack/plugin-hono-server": "^2.0.1",
"@objectstack/cli": "2.0.3",
"@objectstack/core": "2.0.3",
"@objectstack/plugin-hono-server": "^2.0.3",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.10.0",
"@types/supertest": "^6.0.3",
Expand All @@ -59,7 +59,7 @@
"version": "4.0.5",
"dependencies": {
"@objectql/protocol-json-rpc": "workspace:*",
"@objectstack/studio": "^2.0.2",
"@objectstack/studio": "^2.0.3",
"build": "^0.1.4"
}
}
4 changes: 2 additions & 2 deletions packages/drivers/excel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
"dependencies": {
"@objectql/driver-memory": "workspace:*",
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"@objectstack/spec": "^2.0.3",
"exceljs": "^4.4.0",
"zod": "^3.24.1"
"zod": "^4.3.6"
},
"devDependencies": {
"@types/node": "^20.10.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/drivers/fs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"dependencies": {
"@objectql/driver-memory": "workspace:*",
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"zod": "^3.24.1"
"@objectstack/spec": "^2.0.3",
"zod": "^4.3.6"
},
"devDependencies": {
"@types/node": "^20.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/drivers/memory/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
},
"dependencies": {
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"@objectstack/spec": "^2.0.3",
"mingo": "^7.1.1",
"zod": "^3.24.1"
"zod": "^4.3.6"
},
"devDependencies": {
"typescript": "^5.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/drivers/mongo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
},
"dependencies": {
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"@objectstack/spec": "^2.0.3",
"mongodb": "^5.9.2"
},
"devDependencies": {
"mongodb-memory-server": "^11.0.1",
"zod": "^3.24.1"
"zod": "^4.3.6"
}
}
4 changes: 2 additions & 2 deletions packages/drivers/pg-wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
"@electric-sql/pglite": "^0.1.5",
"@objectql/driver-sql": "workspace:*",
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"@objectstack/spec": "^2.0.3",
"knex": "^3.1.0",
"nanoid": "^3.3.11",
"zod": "^3.24.1"
"zod": "^4.3.6"
},
"devDependencies": {
"@types/node": "^20.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/drivers/redis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@
},
"dependencies": {
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"@objectstack/spec": "^2.0.3",
"redis": "^4.6.0",
"zod": "^3.24.1"
"zod": "^4.3.6"
},
"devDependencies": {
"@objectql/driver-tck": "workspace:*",
Expand Down
4 changes: 2 additions & 2 deletions packages/drivers/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
},
"dependencies": {
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"zod": "^3.24.1"
"@objectstack/spec": "^2.0.3",
"zod": "^4.3.6"
},
"devDependencies": {
"typescript": "^5.3.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/drivers/sql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
},
"dependencies": {
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"@objectstack/spec": "^2.0.3",
"knex": "^3.1.0",
"nanoid": "^3.3.11",
"zod": "^3.24.1"
"zod": "^4.3.6"
},
"devDependencies": {
"sqlite3": "^5.1.7"
Expand Down
4 changes: 2 additions & 2 deletions packages/drivers/sqlite-wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
"dependencies": {
"@objectql/driver-sql": "workspace:*",
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"@objectstack/spec": "^2.0.3",
"knex": "^3.1.0",
"nanoid": "^3.3.11",
"wa-sqlite": "^1.0.0",
"zod": "^3.24.1"
"zod": "^4.3.6"
},
"devDependencies": {
"@types/node": "^20.0.0",
Expand Down
10 changes: 5 additions & 5 deletions packages/foundation/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
"@objectql/plugin-formula": "workspace:*",
"@objectql/plugin-validator": "workspace:*",
"@objectql/types": "workspace:*",
"@objectstack/core": "^2.0.1",
"@objectstack/objectql": "^2.0.1",
"@objectstack/runtime": "^2.0.1",
"@objectstack/spec": "^2.0.1",
"@objectstack/core": "^2.0.3",
"@objectstack/objectql": "^2.0.3",
"@objectstack/runtime": "^2.0.3",
"@objectstack/spec": "^2.0.3",
"js-yaml": "^4.1.0",
"zod": "^3.23.8"
"zod": "^4.3.6"
},
"devDependencies": {
"@types/js-yaml": "^4.0.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/foundation/platform-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"dependencies": {
"@objectql/core": "workspace:*",
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"@objectstack/spec": "^2.0.3",
"fast-glob": "^3.3.2",
"js-yaml": "^4.1.1"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/foundation/plugin-formula/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
},
"dependencies": {
"@objectql/types": "workspace:*",
"@objectstack/core": "^2.0.1",
"@objectstack/spec": "^2.0.1",
"zod": "^3.23.8"
"@objectstack/core": "^2.0.3",
"@objectstack/spec": "^2.0.3",
"zod": "^4.3.6"
},
"devDependencies": {
"typescript": "^5.3.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/foundation/plugin-multitenancy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
},
"dependencies": {
"@objectql/types": "workspace:*",
"@objectstack/core": "^2.0.1",
"@objectstack/spec": "^2.0.1",
"zod": "^3.23.8"
"@objectstack/core": "^2.0.3",
"@objectstack/spec": "^2.0.3",
"zod": "^4.3.6"
},
"devDependencies": {
"typescript": "^5.3.0"
Expand Down
5 changes: 1 addition & 4 deletions packages/foundation/plugin-multitenancy/src/config.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ export const MultiTenancyPluginConfigSchema = z.object({
* Tenant resolver function to get current tenant from context
* If not provided, falls back to context.user.tenantId or context.tenantId
*/
tenantResolver: z.function()
.args(z.any())
.returns(z.union([z.string(), z.promise(z.string())]))
.optional(),
tenantResolver: z.any().optional(),
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tenantResolver is documented as a function but the schema now accepts any value (z.any()), so invalid configs (e.g., string/number) will pass validation and then crash at runtime when TenantResolver calls it. Please keep runtime validation by constraining this field to a function (and ideally validating the return type is a string or Promise).

Suggested change
tenantResolver: z.any().optional(),
tenantResolver: z
.function()
.args(z.any())
.returns(z.union([z.string(), z.promise(z.string())]))
.optional(),

Copilot uses AI. Check for mistakes.

/**
* Schema isolation mode
Expand Down
6 changes: 3 additions & 3 deletions packages/foundation/plugin-security/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
},
"dependencies": {
"@objectql/types": "workspace:*",
"@objectstack/core": "^2.0.1",
"@objectstack/spec": "^2.0.1",
"zod": "^3.23.8"
"@objectstack/core": "^2.0.3",
"@objectstack/spec": "^2.0.3",
"zod": "^4.3.6"
},
"devDependencies": {
"typescript": "^5.3.0"
Expand Down
2 changes: 2 additions & 0 deletions packages/foundation/plugin-security/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ export class ObjectQLSecurityPlugin implements RuntimePlugin {
const registerHook = (name: string, handler: any) => {
if (typeof ctx.hook === 'function') {
ctx.hook(name, handler);
} else if (typeof (kernel as any).use === 'function') {
(kernel as any).use(name, handler);
} else if (typeof (kernel as any).hooks?.register === 'function') {
(kernel as any).hooks.register(name, handler);
} else {
Expand Down
6 changes: 3 additions & 3 deletions packages/foundation/plugin-validator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
},
"dependencies": {
"@objectql/types": "workspace:*",
"@objectstack/core": "^2.0.1",
"@objectstack/spec": "^2.0.1",
"zod": "^3.23.8"
"@objectstack/core": "^2.0.3",
"@objectstack/spec": "^2.0.3",
"zod": "^4.3.6"
},
"devDependencies": {
"typescript": "^5.3.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/foundation/plugin-workflow/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
},
"dependencies": {
"@objectql/types": "workspace:*",
"@objectstack/core": "^2.0.1",
"@objectstack/spec": "^2.0.1",
"zod": "^3.23.8"
"@objectstack/core": "^2.0.3",
"@objectstack/spec": "^2.0.3",
"zod": "^4.3.6"
},
"devDependencies": {
"typescript": "^5.3.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/foundation/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
},
"dependencies": {},
"devDependencies": {
"@objectstack/spec": "^2.0.1",
"@objectstack/spec": "^2.0.3",
"ts-json-schema-generator": "^2.4.0",
"zod": "^3.23.8"
"zod": "^4.3.6"
}
}
6 changes: 3 additions & 3 deletions packages/protocols/graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@as-integrations/express4": "^1.1.2",
"@graphql-tools/schema": "^10.0.2",
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"@objectstack/spec": "^2.0.3",
"cors": "^2.8.5",
"dataloader": "^2.2.2",
"express": "^4.18.2",
Expand All @@ -32,12 +32,12 @@
"graphql-tag": "^2.12.6",
"graphql-ws": "^5.14.0",
"ws": "^8.14.0",
"zod": "^3.23.8"
"zod": "^4.3.6"
},
"devDependencies": {
"@objectql/driver-memory": "workspace:*",
"@objectql/protocol-tck": "workspace:*",
"@objectstack/core": "^2.0.1",
"@objectstack/core": "^2.0.3",
"@types/cors": "^2.8.17",
"@types/express": "^4.17.21",
"@types/ws": "^8.5.10",
Expand Down
10 changes: 5 additions & 5 deletions packages/protocols/graphql/src/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export function validateGraphQLInput<T>(
return schema.parse(input);
} catch (error) {
if (error instanceof z.ZodError) {
const details: ValidationErrorDetails[] = error.errors.map(err => ({
const details: ValidationErrorDetails[] = error.issues.map((err: z.ZodIssue) => ({
field: err.path.join('.'),
message: err.message,
code: err.code
Expand Down Expand Up @@ -183,7 +183,7 @@ export const PaginationInputSchema = z.object({
/**
* Filter input base schema
*/
export const FilterInputSchema = z.record(z.any());
export const FilterInputSchema = z.record(z.string(), z.any());

/**
* Sort order enum
Expand All @@ -195,22 +195,22 @@ export const SortOrderSchema = z.enum(['ASC', 'DESC']);
*/
export const QueryInputSchema = z.object({
filters: FilterInputSchema.optional(),
sort: z.record(SortOrderSchema).optional(),
sort: z.record(z.string(), SortOrderSchema).optional(),
limit: z.number().int().positive().max(1000).optional(),
offset: z.number().int().nonnegative().optional()
});

/**
* Create input validation schema
*/
export const CreateInputSchema = z.record(z.any());
export const CreateInputSchema = z.record(z.string(), z.any());

/**
* Update input validation schema
*/
export const UpdateInputSchema = z.object({
id: z.string().min(1, 'ID is required'),
data: z.record(z.any())
data: z.record(z.string(), z.any())
});

/**
Expand Down
6 changes: 3 additions & 3 deletions packages/protocols/json-rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
},
"dependencies": {
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"zod": "^3.23.8"
"@objectstack/spec": "^2.0.3",
"zod": "^4.3.6"
},
"devDependencies": {
"@objectql/driver-memory": "workspace:*",
"@objectql/protocol-tck": "workspace:*",
"@objectstack/core": "^2.0.1",
"@objectstack/core": "^2.0.3",
"typescript": "^5.3.3",
"vitest": "^1.0.4"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/protocols/json-rpc/src/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export enum JSONRPCErrorCode {
export const JSONRPCRequestSchema = z.object({
jsonrpc: z.literal(JSONRPC_VERSION),
method: z.string().min(1, 'Method name cannot be empty'),
params: z.union([z.array(z.any()), z.record(z.any())]).optional(),
params: z.union([z.array(z.any()), z.record(z.string(), z.any())]).optional(),
id: z.union([z.string(), z.number(), z.null()]).optional()
});

Expand Down Expand Up @@ -108,7 +108,7 @@ export function validateRequest(request: unknown): z.infer<typeof JSONRPCRequest
JSONRPCErrorCode.INVALID_REQUEST,
'Invalid JSON-RPC request format',
{
validationErrors: error.errors.map(err => ({
validationErrors: error.issues.map((err: z.ZodIssue) => ({
path: err.path.join('.'),
message: err.message
}))
Expand All @@ -131,7 +131,7 @@ export function validateBatchRequest(request: unknown): z.infer<typeof JSONRPCBa
JSONRPCErrorCode.INVALID_REQUEST,
'Invalid JSON-RPC batch request format',
{
validationErrors: error.errors.map(err => ({
validationErrors: error.issues.map((err: z.ZodIssue) => ({
path: err.path.join('.'),
message: err.message
}))
Expand Down Expand Up @@ -188,7 +188,7 @@ export function validateMethodParams<T>(
JSONRPCErrorCode.INVALID_PARAMS,
`Invalid parameters for method '${methodName}'`,
{
validationErrors: error.errors.map(err => ({
validationErrors: error.issues.map((err: z.ZodIssue) => ({
path: err.path.join('.'),
message: err.message
}))
Expand Down
6 changes: 3 additions & 3 deletions packages/protocols/odata-v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
},
"dependencies": {
"@objectql/types": "workspace:*",
"@objectstack/spec": "^2.0.1",
"zod": "^3.23.8"
"@objectstack/spec": "^2.0.3",
"zod": "^4.3.6"
},
"devDependencies": {
"@objectql/driver-memory": "workspace:*",
"@objectql/protocol-tck": "workspace:*",
"@objectstack/core": "^2.0.1",
"@objectstack/core": "^2.0.3",
"typescript": "^5.3.3",
"vitest": "^1.0.4"
},
Expand Down
Loading
Loading