blendsdk 5.33.0 → 5.34.0

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/README.md +13 -15
  2. package/package.json +13 -13
package/README.md CHANGED
@@ -35,12 +35,15 @@ npm install blendsdk
35
35
  ### Web API with Express 5
36
36
 
37
37
  ```typescript
38
- import { Application, RouteBuilder } from "blendsdk/webafx";
38
+ import { WebApplication, RouteBuilder } from "blendsdk/webafx";
39
39
 
40
- const app = new Application({ port: 3000 });
40
+ const app = new WebApplication({
41
+ port: 3000,
42
+ name: "my-api",
43
+ });
41
44
 
42
- app.addRoute(
43
- RouteBuilder.get("/hello", (req, res) => {
45
+ app.route(
46
+ RouteBuilder.get("/hello").handler((_req, res) => {
44
47
  res.json({ message: "Hello from BlendSDK!" });
45
48
  })
46
49
  );
@@ -48,11 +51,10 @@ app.addRoute(
48
51
  await app.start();
49
52
  ```
50
53
 
51
- ### SQL Query Building
54
+ ### SQL Expression Building
52
55
 
53
56
  ```typescript
54
57
  import { query } from "blendsdk/expression";
55
- import { SelectStatement } from "blendsdk/dbcore";
56
58
 
57
59
  // Build a type-safe WHERE clause
58
60
  const filter = query()
@@ -62,24 +64,20 @@ const filter = query()
62
64
  .field("age")
63
65
  .gte(18);
64
66
 
65
- // Use it in a SELECT statement
66
- const stmt = new SelectStatement("users")
67
- .columns("id", "name", "email")
68
- .where(filter);
69
-
70
- const { sql, parameters } = stmt.compile();
71
- // sql: SELECT id, name, email FROM users WHERE status = $1 AND age >= $2
67
+ // Compile to parameterized SQL
68
+ const { sql, parameters } = filter.compile();
69
+ // sql: "status" = $1 AND "age" >= $2
72
70
  // parameters: ["active", 18]
73
71
  ```
74
72
 
75
73
  ### Utilities
76
74
 
77
75
  ```typescript
78
- import { isNullOrUndefined, isString } from "blendsdk/stdlib";
76
+ import { isNullOrUndef, isString } from "blendsdk/stdlib";
79
77
 
80
78
  const value: unknown = getUserInput();
81
79
 
82
- if (!isNullOrUndefined(value) && isString(value)) {
80
+ if (!isNullOrUndef(value) && isString(value)) {
83
81
  console.log("Got a string:", value);
84
82
  }
85
83
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "blendsdk",
3
- "version": "5.33.0",
3
+ "version": "5.34.0",
4
4
  "description": "Enterprise-grade TypeScript SDK for web applications, database operations, caching, pub/sub, email, i18n, and code generation",
5
5
  "type": "module",
6
6
  "engines": {
@@ -77,18 +77,18 @@
77
77
  "zod": "^4.0.0"
78
78
  },
79
79
  "devDependencies": {
80
- "@blendsdk/stdlib": "5.33.0",
81
- "@blendsdk/cmdline": "5.33.0",
82
- "@blendsdk/expression": "5.33.0",
83
- "@blendsdk/dbcore": "5.33.0",
84
- "@blendsdk/postgresql": "5.33.0",
85
- "@blendsdk/webafx": "5.33.0",
86
- "@blendsdk/webafx-cache": "5.33.0",
87
- "@blendsdk/webafx-mailer": "5.33.0",
88
- "@blendsdk/webafx-auth": "5.33.0",
89
- "@blendsdk/i18n": "5.33.0",
90
- "@blendsdk/webafx-i18n": "5.33.0",
91
- "@blendsdk/codegen": "5.33.0"
80
+ "@blendsdk/stdlib": "5.34.0",
81
+ "@blendsdk/cmdline": "5.34.0",
82
+ "@blendsdk/expression": "5.34.0",
83
+ "@blendsdk/dbcore": "5.34.0",
84
+ "@blendsdk/postgresql": "5.34.0",
85
+ "@blendsdk/webafx": "5.34.0",
86
+ "@blendsdk/webafx-cache": "5.34.0",
87
+ "@blendsdk/webafx-mailer": "5.34.0",
88
+ "@blendsdk/webafx-auth": "5.34.0",
89
+ "@blendsdk/i18n": "5.34.0",
90
+ "@blendsdk/webafx-i18n": "5.34.0",
91
+ "@blendsdk/codegen": "5.34.0"
92
92
  },
93
93
  "peerDependencies": {
94
94
  "typescript": "^5.6.0",