@mtcute/web 0.16.2 → 0.16.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.
package/README.md CHANGED
@@ -19,9 +19,8 @@ const tg = new TelegramClient({
19
19
  storage: 'my-account'
20
20
  })
21
21
 
22
- tg.run(async (user) => {
23
- console.log(`✨ logged in as ${user.displayName}`)
24
- })
22
+ const self = await tg.start()
23
+ console.log(`✨ logged in as ${self.displayName}`)
25
24
  ```
26
25
 
27
26
  ## Usage with workers
@@ -47,7 +46,6 @@ const worker = new Worker(new URL('./worker.ts', import.meta.url), { type: 'modu
47
46
  const port = new TelegramWorkerPort({ worker })
48
47
  const tg = new TelegramClient({ client: port })
49
48
 
50
- tg.run({}, async (user) => {
51
- console.log(`✨ logged in as ${user.displayName}`)
52
- })
49
+ const self = await tg.start()
50
+ console.log(`✨ logged in as ${user.displayName}`)
53
51
  ```
@@ -0,0 +1 @@
1
+ export * from '@mtcute/core/methods.js';
package/cjs/methods.js ADDED
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ if (typeof globalThis !== 'undefined' && !globalThis._MTCUTE_CJS_DEPRECATION_WARNED) {
3
+ globalThis._MTCUTE_CJS_DEPRECATION_WARNED = true
4
+ console.warn("[@mtcute/web] CommonJS support is deprecated and will be removed soon. Please consider switching to ESM, it's "+(new Date()).getFullYear()+" already.")
5
+ console.warn("[@mtcute/web] Learn more about switching to ESM: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c")
6
+ }
7
+ "use strict";
8
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
+ if (k2 === undefined) k2 = k;
10
+ var desc = Object.getOwnPropertyDescriptor(m, k);
11
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
+ desc = { enumerable: true, get: function() { return m[k]; } };
13
+ }
14
+ Object.defineProperty(o, k2, desc);
15
+ }) : (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ o[k2] = m[k];
18
+ }));
19
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
20
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
21
+ };
22
+ Object.defineProperty(exports, "__esModule", { value: true });
23
+ __exportStar(require("@mtcute/core/methods.js"), exports);
24
+ //# sourceMappingURL=methods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"methods.js","sourceRoot":"","sources":["../../src/methods.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0DAAuC","sourcesContent":["export * from '@mtcute/core/methods.js'\n"]}
@@ -0,0 +1 @@
1
+ export * from '@mtcute/core/methods.js';
package/esm/methods.js ADDED
@@ -0,0 +1,2 @@
1
+ export * from '@mtcute/core/methods.js';
2
+ //# sourceMappingURL=methods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"methods.js","sourceRoot":"","sources":["../../src/methods.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA","sourcesContent":["export * from '@mtcute/core/methods.js'\n"]}
package/methods.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/methods.js'
package/methods.js ADDED
@@ -0,0 +1 @@
1
+ export * from './esm/methods.js'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mtcute/web",
3
- "version": "0.16.2",
3
+ "version": "0.16.6",
4
4
  "description": "Meta-package for the web platform",
5
5
  "author": "alina sireneva <alina@tei.su>",
6
6
  "license": "MIT",
@@ -15,10 +15,14 @@
15
15
  "./utils.js": {
16
16
  "import": "./esm/utils.js",
17
17
  "require": "./cjs/utils.js"
18
+ },
19
+ "./methods.js": {
20
+ "import": "./esm/methods.js",
21
+ "require": "./cjs/methods.js"
18
22
  }
19
23
  },
20
24
  "dependencies": {
21
- "@mtcute/core": "^0.16.1",
25
+ "@mtcute/core": "^0.16.6",
22
26
  "@mtcute/wasm": "^0.16.0",
23
27
  "events": "3.2.0"
24
28
  },