@tgsnake/skema 2.1.0-browser.0 → 2.1.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.
@@ -9,9 +9,8 @@
9
9
  */
10
10
  export { BytesIO } from '@tgsnake/bytesio';
11
11
  export { Logger } from '@tgsnake/log';
12
- export { gzipSync, gunzipSync } from 'browserify-zlib';
13
- export { Buffer } from 'buffer';
14
- import { inspect as nodeInspect } from 'util';
12
+ export { gzipSync, gunzipSync } from 'node:zlib';
13
+ export { Buffer } from 'node:buffer';
15
14
  import bigInt from 'big-integer';
16
15
  /**
17
16
  * Identifies the runtime platform environment.
@@ -25,5 +24,5 @@ export declare const platform: string;
25
24
  *
26
25
  * @type {typeof nodeInspect}
27
26
  */
28
- export declare const inspect: typeof nodeInspect;
27
+ export declare const inspect: any;
29
28
  export { bigInt };
package/dist/src/deps.js CHANGED
@@ -9,9 +9,9 @@
9
9
  */
10
10
  export { BytesIO } from '@tgsnake/bytesio';
11
11
  export { Logger } from '@tgsnake/log';
12
- export { gzipSync, gunzipSync } from 'browserify-zlib';
13
- export { Buffer } from 'buffer';
14
- import { inspect as nodeInspect } from 'util';
12
+ export { gzipSync, gunzipSync } from 'node:zlib';
13
+ export { Buffer } from 'node:buffer';
14
+ import { inspect as nodeInspect } from 'node:util';
15
15
  import bigInt from 'big-integer';
16
16
  // Other platform compatibility
17
17
  // After this line, we will provide some compatibility for Deno, Bun, and Browser so that the same code can run in both environments without modification.
@@ -30,5 +30,5 @@ export const platform = isDeno ? 'Deno' : isBun ? 'Bun' : isBrowser ? 'Browser'
30
30
  *
31
31
  * @type {typeof nodeInspect}
32
32
  */
33
- export const inspect = nodeInspect;
33
+ export const inspect = (isDeno ? globalThis.Deno.inspect : nodeInspect);
34
34
  export { bigInt };
package/package.json CHANGED
@@ -1,54 +1,52 @@
1
- {
2
- "name": "@tgsnake/skema",
3
- "version": "2.1.0-browser.0",
4
- "description": "A compiled Telegram TL Schema and Telegram errors Schema into usable JavaScript classes with full TypeScript support",
5
- "main": "dist/mod.js",
6
- "types": "dist/mod.d.ts",
7
- "type": "module",
8
- "packageManager": "yarn@4.9.2",
9
- "homepage": "https://tgsnake.js.org",
10
- "keywords": [
11
- "tgsnake",
12
- "mtproto",
13
- "telegram"
14
- ],
15
- "bugs": "https://github.com/tgsnake/skema/issues",
16
- "repository": "https://github.com/tgsnake/skema",
17
- "author": "butthx",
18
- "files": [
19
- "dist/**/**"
20
- ],
21
- "license": "MIT",
22
- "engineStrict": true,
23
- "engines": {
24
- "node": ">=22.0.0",
25
- "npm": ">=6.0.0",
26
- "yarn": ">=1.0.0",
27
- "deno": ">=1.0.0",
28
- "bun": ">=1.0.0"
29
- },
30
- "scripts": {
31
- "build": "tsc",
32
- "build:api": "node ./generator/api",
33
- "build:sync": "node ./generator/sync-tl",
34
- "build:error": "node ./generator/error",
35
- "build:jsr": "node ./generator/jsr_version/index.js",
36
- "build:docs": "typedoc --tsconfig tsconfig.json --out docs src/index.ts",
37
- "prepare": "yarn build",
38
- "prettier": "NODE_OPTIONS=--max_old_space_size=4096 prettier -w ."
39
- },
40
- "devDependencies": {
41
- "@types/bun": "^1.3.14",
42
- "@types/node": "^25.9.3",
43
- "prettier": "^3.8.4",
44
- "typedoc": "^0.28.19",
45
- "typescript": "^6.0.3"
46
- },
47
- "dependencies": {
48
- "@tgsnake/bytesio": "browser",
49
- "@tgsnake/log": "browser",
50
- "big-integer": "^1.6.52",
51
- "browserify-zlib": "^0.2.0",
52
- "buffer": "^6.0.3"
53
- }
54
- }
1
+ {
2
+ "name": "@tgsnake/skema",
3
+ "version": "2.1.0",
4
+ "description": "A compiled Telegram TL Schema and Telegram errors Schema into usable JavaScript classes with full TypeScript support",
5
+ "main": "dist/mod.js",
6
+ "types": "dist/mod.d.ts",
7
+ "type": "module",
8
+ "packageManager": "yarn@4.9.2",
9
+ "homepage": "https://tgsnake.js.org",
10
+ "keywords": [
11
+ "tgsnake",
12
+ "mtproto",
13
+ "telegram"
14
+ ],
15
+ "bugs": "https://github.com/tgsnake/skema/issues",
16
+ "repository": "https://github.com/tgsnake/skema",
17
+ "author": "butthx",
18
+ "files": [
19
+ "dist/**/**"
20
+ ],
21
+ "license": "MIT",
22
+ "engineStrict": true,
23
+ "engines": {
24
+ "node": ">=22.0.0",
25
+ "npm": ">=6.0.0",
26
+ "yarn": ">=1.0.0",
27
+ "deno": ">=1.0.0",
28
+ "bun": ">=1.0.0"
29
+ },
30
+ "scripts": {
31
+ "build": "tsc",
32
+ "build:api": "node ./generator/api",
33
+ "build:sync": "node ./generator/sync-tl",
34
+ "build:error": "node ./generator/error",
35
+ "build:jsr": "node ./generator/jsr_version/index.js",
36
+ "build:docs": "typedoc --tsconfig tsconfig.json --out docs src/index.ts",
37
+ "prepare": "yarn build",
38
+ "prettier": "NODE_OPTIONS=--max_old_space_size=4096 prettier -w ."
39
+ },
40
+ "devDependencies": {
41
+ "@types/bun": "^1.3.14",
42
+ "@types/node": "^25.9.3",
43
+ "prettier": "^3.8.4",
44
+ "typedoc": "^0.28.19",
45
+ "typescript": "^6.0.3"
46
+ },
47
+ "dependencies": {
48
+ "@tgsnake/bytesio": "^2.0.1",
49
+ "@tgsnake/log": "^2.0.1",
50
+ "big-integer": "^1.6.52"
51
+ }
52
+ }