@zyphe-sdk/core 0.1.8 → 0.1.9

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.
@@ -9,14 +9,9 @@
9
9
  CLI Using tsup config: /Users/mtumiati/dev/zyphe/zyphe-sdk/packages/core/tsup.config.ts
10
10
  CLI Target: es2023
11
11
  ESM Build start
12
- CJS Build start
13
- CJS dist/index.cjs 6.12 KB
14
- CJS dist/index.cjs.map 9.89 KB
15
- CJS ⚡️ Build success in 12ms
16
12
  ESM dist/index.js 4.31 KB
17
13
  ESM dist/index.js.map 9.62 KB
18
- ESM ⚡️ Build success in 12ms
14
+ ESM ⚡️ Build success in 27ms
19
15
  DTS Build start
20
- DTS ⚡️ Build success in 898ms
21
- DTS dist/index.d.ts 62.09 KB
22
- DTS dist/index.d.cts 62.09 KB
16
+ DTS ⚡️ Build success in 883ms
17
+ DTS dist/index.d.ts 62.09 KB
package/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Zyphe SDK – Core
2
2
 
3
+ > **⚠️ This package is now [ESM-only](https://nodejs.org/api/esm.html).**
4
+ >
5
+ > - You must use `import` syntax, not `require()`.
6
+ > - Node.js v16.17+ or v18+ is recommended.
7
+ > - CommonJS (`require()`) is **not supported**.
8
+
3
9
  This is the core SDK package for Zyphe. It contains utilities to interact with the Zyphe platform, including webhook signature verification and verification session management.
4
10
 
5
11
  ## Installing package
@@ -10,6 +16,16 @@ If you want to use the core SDK outside of this monorepo, you can install it dir
10
16
  pnpm install @zyphe-sdk/core
11
17
  ```
12
18
 
19
+ **ESM-only usage:**
20
+
21
+ ```ts
22
+ // Correct: ESM import
23
+ import { createVerificationSession, verifyWebhookSignature } from "@zyphe-sdk/core";
24
+
25
+ // ❌ Not supported:
26
+ // const sdk = require("@zyphe-sdk/core");
27
+ ```
28
+
13
29
  Then import and use the package in your project as described in the Usage section.
14
30
 
15
31
  ---
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@zyphe-sdk/core",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Simplifies interaction with the Zyphe platform for creating and managing digital identities and digital onboarding flows with ease",
5
5
  "author": "Zyphe",
6
6
  "license": "MIT",
7
7
  "type": "module",
8
8
  "sideEffects": false,
9
9
  "main": "dist/index.js",
10
+ "module": "dist/index.js",
10
11
  "exports": {
11
12
  ".": {
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.cjs"
13
+ "import": "./dist/index.js"
14
14
  },
15
15
  "./openapi": {
16
16
  "types": "./dist/openapi.d.ts",
package/tsup.config.ts CHANGED
@@ -2,7 +2,7 @@ import { defineConfig } from "tsup";
2
2
 
3
3
  export default defineConfig({
4
4
  dts: true,
5
- format: ["esm", "cjs"],
5
+ format: ["esm"],
6
6
  sourcemap: true,
7
7
  outDir: "dist",
8
8
  entry: ["src/index.ts"],