@ominduanjane/qr-gen 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of @ominduanjane/qr-gen might be problematic. Click here for more details.
- package/.cache/replit/nix/env.json +1 -0
- package/.config/configstore/update-notifier-npm.json +4 -0
- package/.replit +86 -0
- package/.upm/store.json +1 -0
- package/index.js +37 -0
- package/package.json +21 -0
- package/replit.nix +8 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"entries":{"replit.nix":{"env":{"AR":"ar","AS":"as","CC":"gcc","CONFIG_SHELL":"/nix/store/iffl6dlplhv22i2xy7n1w51a5r631kmi-bash-5.1-p16/bin/bash","CXX":"g++","HOST_PATH":"/nix/store/amm5j0ag985nh49n096a78q1dfs2xsfn-nodejs-16.15.0/bin:/nix/store/0d0fnk7ya8pfcsvbilwf017qpypylicx-typescript-language-server-0.9.6/bin:/nix/store/lccjrdddvk1bvd8zl29bd09df2z7d5p3-yarn-1.22.18/bin:/nix/store/j6p7ac79q2r8pmgv5j8yzp29rmbqm31n-jest-cli-23.6.0/bin:/nix/store/7jr7pr4c6yb85xpzay5xafs5zlcadkhz-coreutils-9.0/bin:/nix/store/140f6s4nwiawrr3xyxarmcv2mk62m62y-findutils-4.9.0/bin:/nix/store/35swvg68q1j3m9fbhcdnqwk9mlm8plvn-diffutils-3.8/bin:/nix/store/lgvd2fh4cndlv8mnyy49jp1nplpml3xp-gnused-4.8/bin:/nix/store/qd9jxc0q00cr7fp30y6jbbww20gj33lg-gnugrep-3.7/bin:/nix/store/w3p77mkdy3pigg12iyha8y9dqakhjsxn-gawk-5.1.1/bin:/nix/store/jm7czg4lgfhiphkyjwn1k1i8liqqizgi-gnutar-1.34/bin:/nix/store/vqpkbr3isafl4867app44w636zrkr9wp-gzip-1.12/bin:/nix/store/fkwcqfw3gcspmpmxqxqnxjja74sg207g-bzip2-1.0.6.0.2-bin/bin:/nix/store/4gkcrzpn31sb12fnzclyfzhpd8xh8l6x-gnumake-4.3/bin:/nix/store/iffl6dlplhv22i2xy7n1w51a5r631kmi-bash-5.1-p16/bin:/nix/store/c0hmdlwdd85gzmilafg4gzzdb2vpg176-patch-2.7.6/bin:/nix/store/kyg5qxx0nl5hfjx0kgw120b85i4l6i8y-xz-5.2.5-bin/bin","LD":"ld","LOCALE_ARCHIVE":"/usr/lib/locale/locale-archive","NIX_BINTOOLS":"/nix/store/wp7kc5y840ldi5sd8j81fj4dabccff2d-binutils-wrapper-2.38","NIX_BINTOOLS_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu":"1","NIX_BUILD_CORES":"16","NIX_BUILD_TOP":"/tmp","NIX_CC":"/nix/store/ag2bpk0lzjvj409znklrz5krkpc5imzs-gcc-wrapper-11.3.0","NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu":"1","NIX_CFLAGS_COMPILE":" -frandom-seed=7ajlbkkxdf -isystem /nix/store/amm5j0ag985nh49n096a78q1dfs2xsfn-nodejs-16.15.0/include -isystem /nix/store/amm5j0ag985nh49n096a78q1dfs2xsfn-nodejs-16.15.0/include","NIX_ENFORCE_NO_NATIVE":"1","NIX_HARDENING_ENABLE":"fortify stackprotector pic strictoverflow format relro bindnow","NIX_INDENT_MAKE":"1","NIX_LDFLAGS":"-rpath /nix/store/7ajlbkkxdf27km1lxx2qg0c7kj000k9j-nix-shell/lib64 -rpath /nix/store/7ajlbkkxdf27km1lxx2qg0c7kj000k9j-nix-shell/lib ","NIX_STORE":"/nix/store","NM":"nm","NODE_PATH":"/nix/store/amm5j0ag985nh49n096a78q1dfs2xsfn-nodejs-16.15.0/lib/node_modules:/nix/store/0d0fnk7ya8pfcsvbilwf017qpypylicx-typescript-language-server-0.9.6/lib/node_modules:/nix/store/j6p7ac79q2r8pmgv5j8yzp29rmbqm31n-jest-cli-23.6.0/lib/node_modules","OBJCOPY":"objcopy","OBJDUMP":"objdump","PATH":"/nix/store/v48s6iddb518j9lc1pk3rcn3x8c2ff0j-bash-interactive-5.1-p16/bin:/nix/store/knssayvl4p7gfapib4wcfhzy14169kva-patchelf-0.14.5/bin:/nix/store/ag2bpk0lzjvj409znklrz5krkpc5imzs-gcc-wrapper-11.3.0/bin:/nix/store/as1xzrm2921pnxx4jvxj39jn4v88wdy1-gcc-11.3.0/bin:/nix/store/h0cnbmfcn93xm5dg2x27ixhag1cwndga-glibc-2.34-210-bin/bin:/nix/store/7jr7pr4c6yb85xpzay5xafs5zlcadkhz-coreutils-9.0/bin:/nix/store/wp7kc5y840ldi5sd8j81fj4dabccff2d-binutils-wrapper-2.38/bin:/nix/store/rq6bh3qfrqnyqwik0w3q6w180zg3w2pa-binutils-2.38/bin:/nix/store/amm5j0ag985nh49n096a78q1dfs2xsfn-nodejs-16.15.0/bin:/nix/store/0d0fnk7ya8pfcsvbilwf017qpypylicx-typescript-language-server-0.9.6/bin:/nix/store/lccjrdddvk1bvd8zl29bd09df2z7d5p3-yarn-1.22.18/bin:/nix/store/j6p7ac79q2r8pmgv5j8yzp29rmbqm31n-jest-cli-23.6.0/bin:/nix/store/7jr7pr4c6yb85xpzay5xafs5zlcadkhz-coreutils-9.0/bin:/nix/store/140f6s4nwiawrr3xyxarmcv2mk62m62y-findutils-4.9.0/bin:/nix/store/35swvg68q1j3m9fbhcdnqwk9mlm8plvn-diffutils-3.8/bin:/nix/store/lgvd2fh4cndlv8mnyy49jp1nplpml3xp-gnused-4.8/bin:/nix/store/qd9jxc0q00cr7fp30y6jbbww20gj33lg-gnugrep-3.7/bin:/nix/store/w3p77mkdy3pigg12iyha8y9dqakhjsxn-gawk-5.1.1/bin:/nix/store/jm7czg4lgfhiphkyjwn1k1i8liqqizgi-gnutar-1.34/bin:/nix/store/vqpkbr3isafl4867app44w636zrkr9wp-gzip-1.12/bin:/nix/store/fkwcqfw3gcspmpmxqxqnxjja74sg207g-bzip2-1.0.6.0.2-bin/bin:/nix/store/4gkcrzpn31sb12fnzclyfzhpd8xh8l6x-gnumake-4.3/bin:/nix/store/iffl6dlplhv22i2xy7n1w51a5r631kmi-bash-5.1-p16/bin:/nix/store/c0hmdlwdd85gzmilafg4gzzdb2vpg176-patch-2.7.6/bin:/nix/store/kyg5qxx0nl5hfjx0kgw120b85i4l6i8y-xz-5.2.5-bin/bin","RANLIB":"ranlib","READELF":"readelf","SIZE":"size","SOURCE_DATE_EPOCH":"315532800","STRINGS":"strings","STRIP":"strip","XDG_DATA_DIRS":"/nix/store/knssayvl4p7gfapib4wcfhzy14169kva-patchelf-0.14.5/share","_":"/nix/store/7jr7pr4c6yb85xpzay5xafs5zlcadkhz-coreutils-9.0/bin/env","__ETC_PROFILE_SOURCED":"1","buildInputs":"/nix/store/amm5j0ag985nh49n096a78q1dfs2xsfn-nodejs-16.15.0 /nix/store/0d0fnk7ya8pfcsvbilwf017qpypylicx-typescript-language-server-0.9.6 /nix/store/lccjrdddvk1bvd8zl29bd09df2z7d5p3-yarn-1.22.18 /nix/store/j6p7ac79q2r8pmgv5j8yzp29rmbqm31n-jest-cli-23.6.0","buildPhase":"echo \"------------------------------------------------------------\" \u003e\u003e$out\necho \" WARNING: the existence of this path is not guaranteed.\" \u003e\u003e$out\necho \" It is an internal implementation detail for pkgs.mkShell.\" \u003e\u003e$out\necho \"------------------------------------------------------------\" \u003e\u003e$out\necho \u003e\u003e $out\n# Record all build inputs as runtime dependencies\nexport \u003e\u003e $out\n","builder":"/nix/store/iffl6dlplhv22i2xy7n1w51a5r631kmi-bash-5.1-p16/bin/bash","configureFlags":"","depsBuildBuild":"","depsBuildBuildPropagated":"","depsBuildTarget":"","depsBuildTargetPropagated":"","depsHostHost":"","depsHostHostPropagated":"","depsTargetTarget":"","depsTargetTargetPropagated":"","doCheck":"","doInstallCheck":"","name":"nix-shell","nativeBuildInputs":"","out":"/nix/store/7ajlbkkxdf27km1lxx2qg0c7kj000k9j-nix-shell","outputs":"out","patches":"","phases":"buildPhase","propagatedBuildInputs":"","propagatedNativeBuildInputs":"","shell":"/nix/store/iffl6dlplhv22i2xy7n1w51a5r631kmi-bash-5.1-p16/bin/bash","shellHook":"","stdenv":"/nix/store/w4yyp4pm2czqhr0078c0wwlx2dk2dzqw-stdenv-linux","strictDeps":"","system":"x86_64-linux"},"dependencies":[{"path":"replit.nix","mod_time":"2022-07-11T17:56:01.937870067Z"}],"channel":"stable-22_05","channel_nix_path":"/nix/store/208ihsjqymwbprs1rwg56v5cdzpa87p0-nixpkgs-stable-22_05-22.05.tar.gz/nixpkgs-stable-22_05"}}}
|
package/.replit
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
entrypoint = "index.js"
|
2
|
+
|
3
|
+
hidden = [".config"]
|
4
|
+
|
5
|
+
[interpreter]
|
6
|
+
command = [
|
7
|
+
"prybar-nodejs",
|
8
|
+
"-q",
|
9
|
+
"--ps1",
|
10
|
+
"\u0001\u001b[33m\u0002\u0001\u001b[00m\u0002 ",
|
11
|
+
"-i"
|
12
|
+
]
|
13
|
+
|
14
|
+
[[hints]]
|
15
|
+
regex = "Error \\[ERR_REQUIRE_ESM\\]"
|
16
|
+
message = "We see that you are using require(...) inside your code. We currently do not support this syntax. Please use 'import' instead when using external modules. (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)"
|
17
|
+
|
18
|
+
[nix]
|
19
|
+
channel = "stable-22_05"
|
20
|
+
|
21
|
+
[env]
|
22
|
+
XDG_CONFIG_HOME = "/home/runner/.config"
|
23
|
+
PATH = "/home/runner/$REPL_SLUG/.config/npm/node_global/bin:/home/runner/$REPL_SLUG/node_modules/.bin"
|
24
|
+
npm_config_prefix = "/home/runner/$REPL_SLUG/.config/npm/node_global"
|
25
|
+
|
26
|
+
[gitHubImport]
|
27
|
+
requiredFiles = [".replit", "replit.nix", ".config"]
|
28
|
+
|
29
|
+
[packager]
|
30
|
+
language = "nodejs"
|
31
|
+
|
32
|
+
[packager.features]
|
33
|
+
packageSearch = true
|
34
|
+
guessImports = true
|
35
|
+
enabledForHosting = false
|
36
|
+
|
37
|
+
[unitTest]
|
38
|
+
language = "nodejs"
|
39
|
+
|
40
|
+
[debugger]
|
41
|
+
support = true
|
42
|
+
|
43
|
+
[debugger.interactive]
|
44
|
+
transport = "localhost:0"
|
45
|
+
startCommand = [ "dap-node" ]
|
46
|
+
|
47
|
+
[debugger.interactive.initializeMessage]
|
48
|
+
command = "initialize"
|
49
|
+
type = "request"
|
50
|
+
|
51
|
+
[debugger.interactive.initializeMessage.arguments]
|
52
|
+
clientID = "replit"
|
53
|
+
clientName = "replit.com"
|
54
|
+
columnsStartAt1 = true
|
55
|
+
linesStartAt1 = true
|
56
|
+
locale = "en-us"
|
57
|
+
pathFormat = "path"
|
58
|
+
supportsInvalidatedEvent = true
|
59
|
+
supportsProgressReporting = true
|
60
|
+
supportsRunInTerminalRequest = true
|
61
|
+
supportsVariablePaging = true
|
62
|
+
supportsVariableType = true
|
63
|
+
|
64
|
+
[debugger.interactive.launchMessage]
|
65
|
+
command = "launch"
|
66
|
+
type = "request"
|
67
|
+
|
68
|
+
[debugger.interactive.launchMessage.arguments]
|
69
|
+
args = []
|
70
|
+
console = "externalTerminal"
|
71
|
+
cwd = "."
|
72
|
+
environment = []
|
73
|
+
pauseForSourceMap = false
|
74
|
+
program = "./index.js"
|
75
|
+
request = "launch"
|
76
|
+
sourceMaps = true
|
77
|
+
stopOnEntry = false
|
78
|
+
type = "pwa-node"
|
79
|
+
|
80
|
+
[languages]
|
81
|
+
|
82
|
+
[languages.javascript]
|
83
|
+
pattern = "**/{*.js,*.jsx,*.ts,*.tsx}"
|
84
|
+
|
85
|
+
[languages.javascript.languageServer]
|
86
|
+
start = "typescript-language-server --stdio"
|
package/.upm/store.json
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":2,"languages":{"nodejs-npm":{"specfileHash":"e0b0fdd686a099f98e4a96d331cfbd2d","lockfileHash":"620b1ab4e6df5578a9553d36a24c17f5","guessedImports":["qrcode-terminal","pino","@adiwajshing/baileys"],"guessedImportsHash":"bc378872aab6eba27368202623ef9b63"}}}
|
package/index.js
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
const makeWASocket = require("@adiwajshing/baileys").default
|
2
|
+
const qrcode = require("qrcode-terminal")
|
3
|
+
const fs = require('fs')
|
4
|
+
const pino = require('pino')
|
5
|
+
const { delay , useSingleFileAuthState } = require("@adiwajshing/baileys")
|
6
|
+
const { state, saveState } = useSingleFileAuthState('./session.rawana.json')
|
7
|
+
|
8
|
+
function qr() {
|
9
|
+
//------------------------------------------------------
|
10
|
+
let version = [3,3234,9]
|
11
|
+
const session = makeWASocket({
|
12
|
+
logger: pino({ level: 'silent' }),
|
13
|
+
printQRInTerminal: true,
|
14
|
+
browser: ['King-Rawana','opera','1.0.0'],
|
15
|
+
auth: state,
|
16
|
+
version
|
17
|
+
})
|
18
|
+
//------------------------------------------------------
|
19
|
+
session.ev.on("connection.update",async (s) => {
|
20
|
+
const { connection, lastDisconnect } = s
|
21
|
+
if (connection == "open") {
|
22
|
+
await delay(1000 * 10)
|
23
|
+
process.exit(0)
|
24
|
+
}
|
25
|
+
if (
|
26
|
+
connection === "close" &&
|
27
|
+
lastDisconnect &&
|
28
|
+
lastDisconnect.error &&
|
29
|
+
lastDisconnect.error.output.statusCode != 401
|
30
|
+
) {
|
31
|
+
qr()
|
32
|
+
}
|
33
|
+
})
|
34
|
+
session.ev.on('creds.update', saveState)
|
35
|
+
session.ev.on("messages.upsert", () => { })
|
36
|
+
}
|
37
|
+
qr()
|
package/package.json
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
{
|
2
|
+
"name": "@ominduanjane/qr-gen",
|
3
|
+
"version": "1.1.2",
|
4
|
+
"description": "qr gen node modules",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
8
|
+
},
|
9
|
+
"keywords": [],
|
10
|
+
"author": "Omindu Anjana",
|
11
|
+
"license": "MIT",
|
12
|
+
"dependencies": {
|
13
|
+
"@adiwajshing/baileys": "^4.4.0",
|
14
|
+
"@ominduanjane/whatsapp-web-api": "^1.0.0",
|
15
|
+
"@types/node": "^18.0.6",
|
16
|
+
"node-fetch": "^3.2.6",
|
17
|
+
"pino": "^8.6.1",
|
18
|
+
"qrcode-terminal": "^0.12.0"
|
19
|
+
},
|
20
|
+
"devDependencies": {}
|
21
|
+
}
|