samvyo-js-sdk 2.0.30 → 2.0.34-test.1

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.
package/index.js CHANGED
@@ -1,3 +1,3 @@
1
- import samvyo from "./dest/samvyo-js-sdk.js";
2
-
3
- export default samvyo;
1
+ // Re-export from the built ES module to avoid exposing source code
2
+ export * from "./dest/samvyo-js-sdk.esm.js";
3
+ export { default } from "./dest/samvyo-js-sdk.esm.js";
package/package.json CHANGED
@@ -1,16 +1,34 @@
1
1
  {
2
2
  "name": "samvyo-js-sdk",
3
- "version": "2.0.30",
3
+ "version": "2.0.34-test.1",
4
4
  "description": "This is the client js sdk for cutting-edge Samvyo real-time voice/video cloud.",
5
5
  "repository": "git@github.com:sauravkp/VidScale-client-js.git",
6
6
  "author": "sauravkp <saurav.codes@gmail.com>",
7
7
  "license": "Unlicensed",
8
+ "type": "module",
8
9
  "main": "./index.js",
10
+ "module": "./dest/samvyo-js-sdk.esm.js",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./index.js",
14
+ "require": "./dest/samvyo-js-sdk.js",
15
+ "default": "./index.js"
16
+ },
17
+ "./umd": "./dest/samvyo-js-sdk.js",
18
+ "./esm": "./dest/samvyo-js-sdk.esm.js"
19
+ },
20
+ "files": [
21
+ "index.js",
22
+ "dest",
23
+ "package.json",
24
+ "README.md"
25
+ ],
9
26
  "build": "./build.js",
10
27
  "scripts": {
11
- "build": "vite build",
28
+ "build": "vite build && node scripts/minify-esm.js",
12
29
  "dev": "vite build --watch",
13
- "preview": "vite preview"
30
+ "preview": "vite preview",
31
+ "prepublishOnly": "npm run build"
14
32
  },
15
33
  "keywords": [
16
34
  "Samvyo",
@@ -61,6 +79,7 @@
61
79
  "nib": "^1.1.2",
62
80
  "rollup-plugin-polyfill-node": "^0.13.0",
63
81
  "supports-color": "^7.1.0",
82
+ "terser": "^5.46.0",
64
83
  "vite": "^7.1.4"
65
84
  },
66
85
  "dev-version": "null.null.2"
@@ -1 +0,0 @@
1
- 1.1.18
@@ -1 +0,0 @@
1
- 1.1.19
package/vite.config.js DELETED
@@ -1,53 +0,0 @@
1
- import { defineConfig } from 'vite'
2
- import { readFileSync } from 'fs'
3
-
4
- const pkg = JSON.parse(readFileSync('./package.json', 'utf8'))
5
- const banner = readFileSync('./banner.txt', 'utf8')
6
- .replace('<%= pkg.name %>', pkg.name)
7
- .replace('<%= pkg.version %>', pkg.version)
8
- .replace('<%= pkg.description %>', pkg.description)
9
- .replace('<%= pkg.author %>', pkg.author)
10
- .replace('<%= pkg.license %>', pkg.license)
11
- .replace('<%= currentYear %>', new Date().getFullYear())
12
-
13
- export default defineConfig({
14
- build: {
15
- lib: {
16
- entry: './build.js',
17
- name: 'samvyo',
18
- fileName: () => 'samvyo-js-sdk.js',
19
- formats: ['umd']
20
- },
21
- rollupOptions: {
22
- output: {
23
- banner: banner,
24
- format: 'umd',
25
- name: 'samvyo'
26
- }
27
- },
28
- commonjsOptions: {
29
- include: [/node_modules/],
30
- transformMixedEsModules: true,
31
- requireReturnsDefault: 'auto'
32
- },
33
- outDir: 'dest',
34
- emptyOutDir: true,
35
- sourcemap: process.env.NODE_ENV === 'development',
36
- minify: process.env.NODE_ENV === 'production' ? 'terser' : false,
37
- terserOptions: process.env.NODE_ENV === 'production' ? {
38
- compress: {
39
- drop_console: true,
40
- drop_debugger: true
41
- }
42
- } : undefined
43
- },
44
- define: {
45
- global: 'globalThis',
46
- 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'production'),
47
- 'process.env.PUBLIC_URL': JSON.stringify(process.env.PUBLIC_URL || '')
48
- },
49
- optimizeDeps: {
50
- include: ['debug', 'events']
51
- },
52
- mode: process.env.NODE_ENV || 'production'
53
- })