@zipbul/result 0.1.4 → 0.1.6

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 (3) hide show
  1. package/README.ko.md +0 -29
  2. package/README.md +0 -29
  3. package/package.json +10 -1
package/README.ko.md CHANGED
@@ -426,35 +426,6 @@ Bun.serve({
426
426
 
427
427
  </details>
428
428
 
429
- <details>
430
- <summary><b>@zipbul/cors와 함께</b></summary>
431
-
432
- ```typescript
433
- import { Cors, CorsAction } from '@zipbul/cors';
434
- import { isErr } from '@zipbul/result';
435
-
436
- const corsResult = Cors.create({
437
- origin: 'https://app.example.com',
438
- credentials: true,
439
- });
440
-
441
- // Cors.create()는 Result<Cors, CorsError>를 반환합니다
442
- if (isErr(corsResult)) {
443
- throw new Error(`CORS 설정 에러: ${corsResult.data.message}`);
444
- }
445
-
446
- const cors = corsResult;
447
-
448
- // cors.handle()는 Promise<Result<CorsResult, CorsError>>를 반환합니다
449
- const result = await cors.handle(request);
450
-
451
- if (isErr(result)) {
452
- return new Response('Internal Error', { status: 500 });
453
- }
454
- ```
455
-
456
- </details>
457
-
458
429
  <br>
459
430
 
460
431
  ## 📄 라이선스
package/README.md CHANGED
@@ -426,35 +426,6 @@ Bun.serve({
426
426
 
427
427
  </details>
428
428
 
429
- <details>
430
- <summary><b>With @zipbul/cors</b></summary>
431
-
432
- ```typescript
433
- import { Cors, CorsAction } from '@zipbul/cors';
434
- import { isErr } from '@zipbul/result';
435
-
436
- const corsResult = Cors.create({
437
- origin: 'https://app.example.com',
438
- credentials: true,
439
- });
440
-
441
- // Cors.create() returns Result<Cors, CorsError>
442
- if (isErr(corsResult)) {
443
- throw new Error(`CORS config error: ${corsResult.data.message}`);
444
- }
445
-
446
- const cors = corsResult;
447
-
448
- // cors.handle() returns Promise<Result<CorsResult, CorsError>>
449
- const result = await cors.handle(request);
450
-
451
- if (isErr(result)) {
452
- return new Response('Internal Error', { status: 500 });
453
- }
454
- ```
455
-
456
- </details>
457
-
458
429
  <br>
459
430
 
460
431
  ## 📄 License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zipbul/result",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "Lightweight Result type for error handling without exceptions",
5
5
  "license": "MIT",
6
6
  "author": "Junhyung Park (https://github.com/parkrevil)",
@@ -13,8 +13,13 @@
13
13
  "homepage": "https://github.com/zipbul/toolkit/tree/main/packages/result#readme",
14
14
  "keywords": [
15
15
  "result",
16
+ "result-type",
17
+ "error-handling",
16
18
  "error",
17
19
  "either",
20
+ "functional",
21
+ "no-exceptions",
22
+ "bun",
18
23
  "typescript",
19
24
  "zipbul"
20
25
  ],
@@ -33,6 +38,10 @@
33
38
  "files": [
34
39
  "dist"
35
40
  ],
41
+ "sideEffects": false,
42
+ "publishConfig": {
43
+ "provenance": true
44
+ },
36
45
  "scripts": {
37
46
  "build": "bun build index.ts --outdir dist --target bun --format esm --production --sourcemap=linked && tsc -p tsconfig.build.json",
38
47
  "typecheck": "tsc --noEmit",