{"_id":"@aqueduct/telegram-t","name":"@aqueduct/telegram-t","dist-tags":{"latest":"10.4.6"},"versions":{"10.4.6":{"name":"@aqueduct/telegram-t","version":"10.4.6","description":"This project won the first prize 🥇 at [Telegram Lightweight Client Contest](https://contest.com/javascript-web-3) and now is an official Telegram client available to anyone at [web.telegram.org/a](https://web.telegram.org/a).","main":"index.js","scripts":{"dev":"cross-env APP_ENV=development webpack serve --mode development","dev:mocked":"cross-env APP_ENV=test APP_MOCKED_CLIENT=1 webpack serve --mode development --port 1235","build:dev":"webpack --mode development && bash ./deploy/copy_to_dist.sh","build:staging":"cross-env APP_ENV=staging npm run build:dev","build:mocked":"cross-env APP_ENV=test APP_MOCKED_CLIENT=1 npm run build:dev","build:production":"webpack && bash ./deploy/copy_to_dist.sh","web:release:production":"npm i && npm run build:production && git add -A && git commit -a -m '[Build]' --no-verify && git push","electron:dev":"npm run electron:webpack && IS_PACKAGED_ELECTRON=true concurrently -n main,renderer,electron \"npm run electron:webpack -- --watch\" \"npm run dev\" \"electronmon dist/electron\"","electron:webpack":"cross-env APP_ENV=$ENV webpack --config ./webpack-electron.config.ts","electron:build":"IS_PACKAGED_ELECTRON=true npm run build:$ENV && electron-builder install-app-deps && electron-rebuild && ENV=$ENV npm run electron:webpack","electron:package":"npm run electron:build && npx rimraf dist-electron && electron-builder build --win --mac --linux --config src/electron/config.yml","electron:package:staging":"ENV=staging npm run electron:package -- -p never","electron:release:production":"ENV=production npm run electron:package -- -p always","telegraph:update_changelog":"node ./dev/telegraphChangelog.js","check":"tsc && stylelint \"**/*.{css,scss}\" && eslint . --ext .ts,.tsx,.js --ignore-pattern src/lib/gramjs","check:fix":"npm run check -- --fix","tl:rehash":"node ./dev/tlHash.js","gramjs:tl":"node ./src/lib/gramjs/tl/generateModules.js","gramjs:lint":"eslint src/lib/gramjs --ext .ts,.tsx,.js","gramjs:lint:fix":"npm run gramjs:lint -- --fix","icons:build":"fantasticon","test":"cross-env APP_ENV=test jest --verbose --silent --forceExit","test:playwright":"playwright test","test:record":"playwright codegen localhost:1235","statoscope:validate-diff":"statoscope validate --input input.json --reference reference.json","prepare":"husky install","postinstall":"(cd dev/eslint-multitab && npm i)","postversion":"echo $(node -p \"require('./package.json').version\") > public/version.txt && git commit --amend --no-verify --no-edit public/version.txt"},"engines":{"node":"^18 || ^20","npm":"^9 || ^10"},"husky":{"hooks":{"pre-commit":"tsc && lint-staged"}},"lint-staged":{"*.{ts,tsx,js}":"eslint --fix","*.{css,scss}":"stylelint --fix"},"electronmon":{"logLevel":"quiet"},"author":{"name":"Alexander Zinchuk","url":"alexander@zinchuk.com"},"license":"GPL-3.0-or-later","devDependencies":{"@babel/core":"^7.23.6","@babel/plugin-syntax-nullish-coalescing-operator":"^7.8.3","@babel/plugin-transform-class-properties":"^7.23.3","@babel/plugin-transform-logical-assignment-operators":"^7.23.4","@babel/preset-env":"^7.23.6","@babel/preset-react":"^7.23.3","@babel/preset-typescript":"^7.23.3","@babel/register":"^7.22.15","@electron/rebuild":"^3.4.1","@glen/jest-raw-loader":"^2.0.0","@playwright/test":"^1.40.1","@statoscope/cli":"5.28.2","@statoscope/webpack-plugin":"5.28.2","@testing-library/jest-dom":"^6.1.5","@twbs/fantasticon":"^2.7.1","@types/croppie":"^2.6.4","@types/hast":"^3.0.3","@types/jest":"^29.5.11","@types/react":"^18.2.43","@types/react-dom":"^18.2.17","@types/webpack":"^5.28.5","@typescript-eslint/eslint-plugin":"^6.13.2","@typescript-eslint/parser":"^6.13.2","@webpack-cli/serve":"^2.0.5","autoprefixer":"^10.4.16","babel-loader":"^9.1.3","babel-plugin-transform-import-meta":"^2.2.1","browserlist":"^1.0.1","buffer":"^6.0.3","concurrently":"^8.2.2","cross-env":"^7.0.3","css-loader":"^6.8.1","dotenv":"^16.3.1","electron":"^22.3.27","electron-builder":"^24.9.1","electron-context-menu":"^3.6.1","electron-store":"^8.1.0","electron-updater":"^6.1.7","electronmon":"^2.0.2","eslint":"^8.55.0","eslint-config-airbnb":"^19.0.4","eslint-config-airbnb-typescript":"^17.1.0","eslint-config-teact-app":"git+https://github.com/zubiden/eslint-config-teact-app.git#5968833968eb48fb799bab941af7f9c3ebb1a005","eslint-import-resolver-webpack":"^0.13.8","eslint-plugin-eslint-multitab-tt":"file:dev/eslint-multitab","eslint-plugin-flowtype":"^8.0.3","eslint-plugin-jsx-a11y":"^6.8.0","eslint-plugin-jsx-expressions":"^1.3.2","eslint-plugin-no-async-without-await":"^1.2.0","eslint-plugin-no-null":"^1.0.2","eslint-plugin-react":"^7.33.2","eslint-plugin-react-hooks":"^4.6.0","eslint-plugin-react-hooks-static-deps":"^1.0.7","eslint-plugin-simple-import-sort":"^10.0.0","eslint-plugin-teactn":"git+https://github.com/korenskoy/eslint-plugin-teactn.git#c2c39dd005d58c07c24c4361de804dce1c6261b5","git-revision-webpack-plugin":"^5.0.0","gitlog":"^4.0.8","html-webpack-plugin":"^5.5.4","husky":"^8.0.3","jest":"^29.7.0","jest-environment-jsdom":"^29.7.0","lint-staged":"^15.2.0","mini-css-extract-plugin":"^2.7.6","postcss-loader":"^7.3.3","postcss-modules":"^6.0.0","react":"^18.2.0","sass":"^1.69.5","sass-loader":"^13.3.2","script-loader":"^0.7.2","serve":"^14.2.1","style-loader":"^3.3.3","stylelint":"^15.11.0","stylelint-config-recommended-scss":"^13.1.0","stylelint-declaration-block-no-ignored-properties":"^2.7.0","stylelint-group-selectors":"^1.0.10","stylelint-high-performance-animation":"^1.9.0","stylelint-selector-tag-no-without-class":"^2.0.6","telegraph-node":"^1.0.4","typescript":"^5.3.3","webpack":"^5.89.0","webpack-dev-server":"^4.15.1"},"dependencies":{"@cryptography/aes":"^0.1.1","async-mutex":"^0.4.0","big-integer":"github:painor/BigInteger.js","croppie":"^2.6.5","emoji-data-ios":"git+https://github.com/korenskoy/emoji-data-ios.git#2886b318eae174527c4bc9fcd321940ef3a85527","idb-keyval":"^6.2.1","lowlight":"^2.9.0","mp4box":"^0.5.2","opus-recorder":"github:Ajaxy/opus-recorder","os-browserify":"^0.3.0","pako":"^2.1.0","path-browserify":"^1.0.1","qr-code-styling":"github:zubiden/qr-code-styling#dbbfed0","v8-compile-cache":"^2.4.0","dmg-license":"^1.0.11","fsevents":"2.3.3"},"optionalDependencies":{"dmg-license":"^1.0.11","fsevents":"2.3.3"},"gitHead":"5d02becc61cde6674b81cafa39d531fec59f089a","_id":"@aqueduct/telegram-t@10.4.6","_nodeVersion":"18.17.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-0Y3ZVlpBUzQEdUY+xHGI9v5mwXQqp5epixZJTuAmFWxq+lL4AfKUamIt5aKbXnEf9sB+zEqqk96SxxgIQqFwUg==","shasum":"26da5e68b011d54c3099c5fb6413cf9a592cd304","tarball":"https://registry.npmjs.org/@aqueduct/telegram-t/-/telegram-t-10.4.6.tgz","fileCount":12491,"unpackedSize":231740904,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHS79iZTiyMzd3x5gstTs9CxwUtColgIIxnBLRzKJNRgIgKitta72PP11/RuwAIpacloLHCS5Aq/voDjPw8UA3/sA="}]},"_npmUser":{"name":"joshkokatnur","email":"josh@aqueductfinance.com"},"directories":{},"maintainers":[{"name":"joshkokatnur","email":"josh@aqueductfinance.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/telegram-t_10.4.6_1709109862072_0.08085185964998765"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-28T08:44:21.685Z","10.4.6":"2024-02-28T08:44:23.894Z","modified":"2024-02-28T08:44:24.409Z"},"maintainers":[{"name":"joshkokatnur","email":"josh@aqueductfinance.com"}],"description":"This project won the first prize 🥇 at [Telegram Lightweight Client Contest](https://contest.com/javascript-web-3) and now is an official Telegram client available to anyone at [web.telegram.org/a](https://web.telegram.org/a).","author":{"name":"Alexander Zinchuk","url":"alexander@zinchuk.com"},"license":"GPL-3.0-or-later","readme":"# Telegram Web A\n\nThis project won the first prize 🥇 at [Telegram Lightweight Client Contest](https://contest.com/javascript-web-3) and now is an official Telegram client available to anyone at [web.telegram.org/a](https://web.telegram.org/a).\n\nAccording to the original contest rules, it has nearly zero dependencies and is fully based on its own [Teact](https://github.com/Ajaxy/teact) framework (which re-implements React paradigm). It also uses a custom version of [GramJS](https://github.com/gram-js/gramjs) as an MTProto implementation.\n\nThe project incorporates lots of technologically advanced features, modern Web APIs and techniques: WebSockets, Web Workers and WebAssembly, multi-level caching and PWA, voice recording and media streaming, cryptography and raw binary data operations, optimistic and progressive interfaces, complicated CSS/Canvas/SVG animations, reactive data streams, and so much more.\n\nFeel free to explore, provide feedback and contribute.\n\n## Local setup\n\n```sh\nmv .env.example .env\n\nnpm i\n```\n\nObtain API ID and API hash on [my.telegram.org](https://my.telegram.org) and populate the `.env` file.\n\n## Dev mode\n\n```sh\nnpm run dev\n```\n\n### Invoking API from console\n\nStart your dev server and locate GramJS worker in console context.\n\nAll constructors and functions available in global `GramJs` variable.\n\nRun `npm run gramjs:tl full` to get access to all available Telegram requests.\n\nExample usage:\n``` javascript\nawait invoke(new GramJs.help.GetAppConfig())\n```\n\n## Electron\n\nElectron allows building a native application that can be installed on Windows, macOS, and Linux.\n\n#### NPM scripts\n\n- `npm run dev:electron`\n\nRun Electron in development mode, concurrently starts 3 processes with watch for changes: main (main Electron process), renderer (FE code) and Webpack for Electron (compiles main Electron process from TypeScript).\n\n- `npm run electron:webpack`\n\nThe main process code for Electron, which includes preload functionality, is written in TypeScript and is compiled using the `webpack-electron.config.js` configuration to generate JavaScript code.\n\n- `npm run electron:build`\n\nPrepare renderer (FE code) build, compile Electron main process code, install and build native dependencies, is used before packaging or publishing.\n\n- `npm run electron:staging`\n\nCreate packages for macOS, Windows and Linux in `dist-electron` folders with `APP_ENV` as `staging` (allows to open DevTools, includes sourcemaps and does not minify built JavaScript code), can be used for manual distribution and testing packaged application.\n\n- `npm run electron:production`\n\nCreate packages for macOS, Windows and Linux in `dist-electron` folders with `APP_ENV` as `production` (disabled DevTools, minified built JavaScript code), can be used for manual distribution and testing packaged application.\n\n- `npm run deploy:electron`\n\nCreate packages for macOS, Windows and Linux in `dist-electron` folder and publish release to GitHub, which allows supporting autoupdates. See [GitHub release workflow](#github-release) for more info.\n\n#### Code signing on MacOS\n\nTo sign the code of your application, follow these steps:\n\n- Install certificates from `/certs` folder to `login` folder of your Keychain.\n- Download and install `Developer ID - G2` certificate from the [Apple PKI](https://www.apple.com/certificateauthority/) page.\n- Under the Keychain application, go to the private key associated with your developer certificate. Then do `key > Get Info > Access Control`. Down there, make sure your application (Xcode) is in the list `Always allow access by these applications` and make sure `Confirm before allowing access` is turned on.\n- A valid and appropriate identity from your keychain will be automatically used when you publish your application.\n\nMore info in the [official documentation](https://www.electronjs.org/docs/latest/tutorial/code-signing).\n\n#### Notarize on MacOS\n\nApplication notarization is done automatically in [electron-builder](https://github.com/electron-userland/electron-builder/) module, which requires `APPLE_ID` and `APPLE_APP_SPECIFIC_PASSWORD` environment variables to be passed.\n\nHow to obtain app-specific password:\n\n- Sign in to [appleid.apple.com](appleid.apple.com).\n- In the \"Sign-In and Security\" section, select \"App-Specific Passwords\".\n- Select \"Generate an app-specific password\" or select the Add button, then follow the steps on your screen.\n\n#### GitHub release\n\n##### GitHub access token\n\nIn order to publish new release, you need to add GitHub access token to `.env`. Generate a GitHub access token by going to https://github.com/settings/tokens/new. The access token should have the repo scope/permission. Once you have the token, assign it to an environment variable:\n\n```\n# .env\nGH_TOKEN=\"{YOUR_TOKEN_HERE}\"\n```\n\n##### Publish settings\n\nPublish configuration in `src/electron/config.yml` config file allows to set GitHub repository owner/name.\n\n##### Release workflow\n\n- Run `npm run electron:publish`, which will create new draft release and upload build artefacts to newly reated release. Version of created release will be the same as in `package.json`.\n- Once you are done, publish the release. GitHub will tag the latest commit.\n\n### Dependencies\n* [GramJS](https://github.com/gram-js/gramjs) ([MIT License](https://github.com/gram-js/gramjs/blob/master/LICENSE))\n* [pako](https://github.com/nodeca/pako) ([MIT License](https://github.com/nodeca/pako/blob/master/LICENSE))\n* [cryptography](https://github.com/spalt08/cryptography) ([Apache License 2.0](https://github.com/spalt08/cryptography/blob/master/LICENSE))\n* [emoji-data](https://github.com/iamcal/emoji-data) ([MIT License](https://github.com/iamcal/emoji-data/blob/master/LICENSE))\n* [twemoji-parser](https://github.com/twitter/twemoji-parser) ([MIT License](https://github.com/twitter/twemoji-parser/blob/master/LICENSE.md))\n* [rlottie](https://github.com/Samsung/rlottie) ([MIT License](https://github.com/Samsung/rlottie/blob/master/COPYING))\n* [opus-recorder](https://github.com/chris-rudmin/opus-recorder) ([Various Licenses](https://github.com/chris-rudmin/opus-recorder/blob/master/LICENSE.md))\n* [qr-code-styling](https://github.com/kozakdenys/qr-code-styling) ([MIT License](https://github.com/kozakdenys/qr-code-styling/blob/master/LICENSE))\n* [croppie](https://github.com/Foliotek/Croppie) ([MIT License](https://github.com/Foliotek/Croppie/blob/master/LICENSE))\n* [mp4box](https://github.com/gpac/mp4box.js) ([BSD-3-Clause license](https://github.com/gpac/mp4box.js/blob/master/LICENSE))\n* [music-metadata-browser](https://github.com/Borewit/music-metadata-browser) ([MIT License](https://github.com/Borewit/music-metadata-browser/blob/master/LICENSE.txt))\n* [lowlight](https://github.com/wooorm/lowlight) ([MIT License](https://github.com/wooorm/lowlight/blob/main/license))\n* [idb-keyval](https://github.com/jakearchibald/idb-keyval) ([Apache License 2.0](https://github.com/jakearchibald/idb-keyval/blob/main/LICENCE))\n* [fasttextweb](https://github.com/karmdesai/fastTextWeb)\n* webp-wasm\n* fastblur\n\n## Bug reports and Suggestions\nIf you find an issue with this app, let Telegram know using the [Suggestions Platform](https://bugs.telegram.org/c/4002).\n","readmeFilename":"README.md"}