-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* running tests from dist folder * refactor * fix: test script * remove auto fill * fix filter arguments * fix test * fix: readme * fix: then test and readme example * fix auto fill env variables * fix export * update version
- Loading branch information
Showing
131 changed files
with
1,114 additions
and
2,781 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
UPSTASH_REDIS_REST_URL= | ||
UPSTASH_REDIS_REST_TOKEN= | ||
UPSTASH_REDIS_EDGE_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import dotenv from 'dotenv'; | ||
import upstash from '@upstash/redis'; | ||
|
||
dotenv.config(); | ||
|
||
const redis = upstash.default({ | ||
url: process.env.UPSTASH_REDIS_REST_URL, | ||
token: process.env.UPSTASH_REDIS_REST_TOKEN, | ||
edgeUrl: process.env.UPSTASH_REDIS_EDGE_URL, | ||
}); | ||
|
||
(async function run() { | ||
const res1 = await redis.set('node', '23'); | ||
console.log(res1); | ||
|
||
const res2 = await redis.get('node'); | ||
console.log(res2); | ||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"name": "nodejs", | ||
"version": "1.0.0", | ||
"type": "module", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@upstash/redis": "../../", | ||
"dotenv": "^10.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
"@upstash/redis@../../": | ||
version "0.1.22" | ||
dependencies: | ||
isomorphic-unfetch "^3.1.0" | ||
|
||
dotenv@^10.0.0: | ||
version "10.0.0" | ||
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" | ||
integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== | ||
|
||
isomorphic-unfetch@^3.1.0: | ||
version "3.1.0" | ||
resolved "https://registry.yarnpkg.com/isomorphic-unfetch/-/isomorphic-unfetch-3.1.0.tgz#87341d5f4f7b63843d468438128cb087b7c3e98f" | ||
integrity sha512-geDJjpoZ8N0kWexiwkX8F9NkTsXhetLPVbZFQ+JTW239QNOwvB0gniuR1Wc6f0AMTn7/mFGyXvHTifrCp/GH8Q== | ||
dependencies: | ||
node-fetch "^2.6.1" | ||
unfetch "^4.2.0" | ||
|
||
node-fetch@^2.6.1: | ||
version "2.6.6" | ||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.6.tgz#1751a7c01834e8e1697758732e9efb6eeadfaf89" | ||
integrity sha512-Z8/6vRlTUChSdIgMa51jxQ4lrw/Jy5SOW10ObaA47/RElsAN2c5Pn8bTgFGWn/ibwzXTE8qwr1Yzx28vsecXEA== | ||
dependencies: | ||
whatwg-url "^5.0.0" | ||
|
||
tr46@~0.0.3: | ||
version "0.0.3" | ||
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" | ||
integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= | ||
|
||
unfetch@^4.2.0: | ||
version "4.2.0" | ||
resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.2.0.tgz#7e21b0ef7d363d8d9af0fb929a5555f6ef97a3be" | ||
integrity sha512-F9p7yYCn6cIW9El1zi0HI6vqpeIvBsr3dSuRO6Xuppb1u5rXpCPmMvLSyECLhybr9isec8Ohl0hPekMVrEinDA== | ||
|
||
webidl-conversions@^3.0.0: | ||
version "3.0.1" | ||
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" | ||
integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= | ||
|
||
whatwg-url@^5.0.0: | ||
version "5.0.0" | ||
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" | ||
integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= | ||
dependencies: | ||
tr46 "~0.0.3" | ||
webidl-conversions "^3.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"name": "@upstash/redis", | ||
"version": "0.1.22", | ||
"version": "0.1.3", | ||
"description": "An HTTP/REST based Redis client built on top of Upstash REST API.", | ||
"author": "Adem ilter <[email protected]>", | ||
"license": "MIT", | ||
"main": "dist/main/src/index.js", | ||
"types": "dist/main/src/index.d.ts", | ||
"module": "dist/module/src/index.js", | ||
"main": "dist/main/index.js", | ||
"types": "dist/main/index.d.ts", | ||
"module": "dist/module/index.js", | ||
"jsdelivr": "dist/umd/upstash-redis.js", | ||
"unpkg": "dist/umd/upstash-redis.js", | ||
"scripts": { | ||
|
@@ -41,16 +41,16 @@ | |
}, | ||
"size-limit": [ | ||
{ | ||
"path": "dist/main/src/index.js", | ||
"limit": "6 KB" | ||
"path": "dist/main/index.js", | ||
"limit": "5 KB" | ||
}, | ||
{ | ||
"path": "dist/module/src/index.js", | ||
"limit": "6 KB" | ||
"path": "dist/module/index.js", | ||
"limit": "5 KB" | ||
}, | ||
{ | ||
"path": "dist/umd/upstash-redis.js", | ||
"limit": "6 KB" | ||
"limit": "5 KB" | ||
} | ||
], | ||
"prettier": { | ||
|
Oops, something went wrong.