Skip to content

Commit

Permalink
Add 'rol' to private claims
Browse files Browse the repository at this point in the history
  • Loading branch information
zubairaziz committed Jul 9, 2024
1 parent c11ce76 commit 272f2f6
Show file tree
Hide file tree
Showing 11 changed files with 864 additions and 1,343 deletions.
6 changes: 3 additions & 3 deletions examples/react-native-expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"dependencies": {
"@expo/vector-icons": "14.0.0",
"@quiltt/react-native": "3.6.9",
"@quiltt/react-native": "3.6.10",
"@react-navigation/native": "6.0.2",
"base-64": "1.0.0",
"expo": "~51.0.7",
Expand All @@ -41,7 +41,7 @@
"react-native-screens": "3.31.1",
"react-native-url-polyfill": "2.0.0",
"react-native-web": "0.19.10",
"react-native-webview": "13.8.6"
"react-native-webview": "13.10.2"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand All @@ -51,7 +51,7 @@
"jest": "^29.4.0",
"jest-expo": "51.0.1",
"react-test-renderer": "18.2.0",
"typescript": "5.3.3"
"typescript": "5.5.3"
},
"packageManager": "[email protected]"
}
83 changes: 32 additions & 51 deletions examples/react-native-expo/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1561,31 +1561,34 @@
resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33"
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==

"@quiltt/[email protected].9":
version "3.6.9"
resolved "https://registry.yarnpkg.com/@quiltt/core/-/core-3.6.9.tgz#585b2988ec53e02d2c9d52f3a6c8b9e82bb19355"
integrity sha512-zVgA9PjrwdzHyVcjwgsMn3NKyGWWk1Tx22v3vNFQ5QPLb2csnqGNiTQMMQs361RwRPuG57aV9PzvW+8YruhfYg==
"@quiltt/[email protected].10":
version "3.6.10"
resolved "https://registry.yarnpkg.com/@quiltt/core/-/core-3.6.10.tgz#04ee61f0f2329af25d2b958345c8f0ee94599d66"
integrity sha512-MuWovJdCuf26oJReL0zLfj1s5JKmjw67RlBSkC9j0TKL5ZT2/bp/zdrlZbQgtKgRHwlKuROA3KgkY00bm9rOuw==
dependencies:
"@apollo/client" "^3.9.9"
cross-fetch "^4.0.0"
graphql "^16.8.1"
graphql-ruby-client "^1.13.3"

"@quiltt/[email protected].9":
version "3.6.9"
resolved "https://registry.yarnpkg.com/@quiltt/react-native/-/react-native-3.6.9.tgz#6532acd43af054f8a7eabce5033bb00ada455e3c"
integrity sha512-v39wmGa4x8lebXSTyiU9IepOcJ+EkS4LgSZG1coZH/3tQCexU1Waz/cXdKjQhuAbUAno7G2jPzXsc7SDSuvcag==
"@quiltt/[email protected].10":
version "3.6.10"
resolved "https://registry.yarnpkg.com/@quiltt/react-native/-/react-native-3.6.10.tgz#ec9ad4e670fb14f49fc11e587900b4121e4b647c"
integrity sha512-KEuaA197EIx1ZUSSbO9gyspDGMnOEyHDcLNhUWDd1aBfE5pC1FgyiIQZEu5+dT0wX9f7t8hZH9mk2bFOV+PoJA==
dependencies:
"@honeybadger-io/core" "6.6.0"
"@quiltt/core" "3.6.9"
"@quiltt/react" "3.6.9"
"@quiltt/core" "3.6.10"
"@quiltt/react" "3.6.10"
base-64 "1.0.0"
react-native-url-polyfill "2.0.0"
react-native-webview "13.10.2"

"@quiltt/[email protected].9":
version "3.6.9"
resolved "https://registry.yarnpkg.com/@quiltt/react/-/react-3.6.9.tgz#f417b1e5709e92a2a9971e73e0a4332df453b198"
integrity sha512-AWNx66zh8jL3eAxay6Fm7IBWgqmtFsYaXsPC98xs2iu3avzLw6czUYQnLmrwc9Boxxn3bcu0GZFcfphSQj3c9A==
"@quiltt/[email protected].10":
version "3.6.10"
resolved "https://registry.yarnpkg.com/@quiltt/react/-/react-3.6.10.tgz#37b1947b4d8ed1800edb38bd3b44d88c115f3dd2"
integrity sha512-MngrCOHxM13VBZdrxRVMbOvjUD/1FU6WCUPx9kiyvTTJ7g4/osUjua4rt71qDHG5v17qgeLNrt27O3xFmCUGqQ==
dependencies:
"@quiltt/core" "3.6.9"
"@quiltt/core" "3.6.10"

"@radix-ui/[email protected]":
version "1.0.0"
Expand Down Expand Up @@ -6880,10 +6883,10 @@ [email protected]:
postcss-value-parser "^4.2.0"
styleq "^0.1.3"

react-native-webview@13.8.6:
version "13.8.6"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.8.6.tgz#5d4a62cb311d5ef8d910a8e112b3f1f2807bcd18"
integrity sha512-jtZ9OgB2AN6rhDwto6dNL3PtOtl/SI4VN93pZEPbMLvRjqHfxiUrilGllL5fKAXq5Ry5FJyfUi82A4Ii8olZ7A==
react-native-webview@13.10.2:
version "13.10.2"
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.10.2.tgz#0f9b84ab38cca022d5b1c4e77c100f4d9591e7af"
integrity sha512-rjrTuPBtpHbI3owoyvSR+bRJqHfsdo5V3nVfU+G65CotkSLewEcGfA9cq7Qv3nzm5t0KEDIt0G/n7hQFjsXihQ==
dependencies:
escape-string-regexp "2.0.0"
invariant "2.2.4"
Expand Down Expand Up @@ -7615,16 +7618,8 @@ string-length@^5.0.1:
char-regex "^2.0.0"
strip-ansi "^7.0.1"

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
name string-width-cjs
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -7684,7 +7679,8 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
name strip-ansi-cjs
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand All @@ -7698,13 +7694,6 @@ strip-ansi@^5.0.0, strip-ansi@^5.2.0:
dependencies:
ansi-regex "^4.1.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.1:
version "7.1.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
Expand Down Expand Up @@ -8100,10 +8089,10 @@ typedarray.prototype.slice@^1.0.3:
typed-array-buffer "^1.0.2"
typed-array-byte-offset "^1.0.2"

typescript@5.3.3:
version "5.3.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==
typescript@5.5.3:
version "5.5.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.3.tgz#e1b0a3c394190838a0b168e771b0ad56a0af0faa"
integrity sha512-/hreyEujaB0w76zKo6717l3L0o/qEUtRgdvUBvlkhoWeOVMjMuHNHk0BRBzikzuGDqNmPQbg5ifMEqsHLiIUcQ==

ua-parser-js@^1.0.35:
version "1.0.37"
Expand Down Expand Up @@ -8449,7 +8438,8 @@ wonka@^6.3.2:
resolved "https://registry.yarnpkg.com/wonka/-/wonka-6.3.4.tgz#76eb9316e3d67d7febf4945202b5bdb2db534594"
integrity sha512-CjpbqNtBGNAeyNS/9W6q3kSkKE52+FjIj7AkFlLr11s/VWGUu6a2CdYSdGxocIhIVjaW/zchesBQUKPVU69Cqg==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
name wrap-ansi-cjs
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -8467,15 +8457,6 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down
6 changes: 1 addition & 5 deletions examples/react-nextjs/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@

body {
color: rgb(var(--foreground-rgb));
background: linear-gradient(
to bottom,
transparent,
rgb(var(--background-end-rgb))
)
background: linear-gradient(to bottom, transparent, rgb(var(--background-end-rgb)))
rgb(var(--background-start-rgb));
}
8 changes: 4 additions & 4 deletions examples/react-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
"react-dom": "18.2.0"
},
"devDependencies": {
"@biomejs/biome": "1.8.1",
"@types/node": "20.14.5",
"@types/react": "18.2.73",
"@biomejs/biome": "1.8.3",
"@types/node": "20.14.10",
"@types/react": "18.3.3",
"@types/react-dom": "18.2.6",
"autoprefixer": "10.4.14",
"cypress": "12.16.0",
"encoding": "0.1.13",
"postcss": "8.4.31",
"tailwindcss": "3.3.2",
"typescript": "5.4.3"
"typescript": "5.5.3"
},
"publishConfig": {
"access": "restricted"
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@
"postversion": "pnpm exec pnpm install --filter=./packages/** "
},
"devDependencies": {
"@biomejs/biome": "1.8.1",
"@biomejs/biome": "1.8.3",
"@changesets/changelog-github": "0.5.0",
"@changesets/cli": "2.27.1",
"@changesets/cli": "2.27.7",
"@testing-library/react": "15.0.5",
"@testing-library/react-native": "12.4.5",
"@types/node": "20.14.5",
"@types/node": "20.14.10",
"@vitejs/plugin-react": "4.2.1",
"@vitest/coverage-v8": "1.5.2",
"@vitest/coverage-v8": "1.6.0",
"check-dependency-version-consistency": "4.1.0",
"genversion": "3.2.0",
"happy-dom": "14.7.1",
"turbo": "2.0.4",
"vite": "5.2.10",
"turbo": "2.0.6",
"vite": "5.3.3",
"vite-tsconfig-paths": "4.3.2",
"vitest": "1.5.2",
"vitest": "1.6.0",
"vitest-react-native": "0.1.5"
},
"packageManager": "[email protected]"
Expand Down
32 changes: 11 additions & 21 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,15 @@
"name": "@quiltt/core",
"version": "3.6.10",
"description": "Javascript API client and utilities for Quiltt",
"keywords": [
"quiltt",
"typescript"
],
"keywords": ["quiltt", "typescript"],
"homepage": "https://github.com/quiltt/quiltt-js/tree/main/packages/core#readme",
"repository": {
"type": "git",
"url": "https://github.com/quiltt/quiltt-js.git",
"directory": "packages/core"
},
"license": "MIT",
"sideEffects": [
"./src/Storage/Local.ts",
"./src/api/graphql/links/SubscriptionLink.ts"
],
"sideEffects": ["./src/Storage/Local.ts", "./src/api/graphql/links/SubscriptionLink.ts"],
"type": "module",
"exports": {
".": {
Expand All @@ -27,11 +21,7 @@
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist/**",
"src/**",
"CHANGELOG.md"
],
"files": ["dist/**", "src/**", "CHANGELOG.md"],
"scripts": {
"build": "bunchee",
"clean": "rimraf .turbo dist",
Expand All @@ -42,16 +32,16 @@
"dependencies": {
"@apollo/client": "^3.9.9",
"cross-fetch": "^4.0.0",
"graphql": "^16.8.1",
"graphql-ruby-client": "^1.13.3"
"graphql": "^16.9.0",
"graphql-ruby-client": "^1.14.0"
},
"devDependencies": {
"@biomejs/biome": "1.8.1",
"@types/node": "20.14.5",
"@types/react": "18.2.73",
"bunchee": "4.4.8",
"rimraf": "5.0.5",
"typescript": "5.4.3"
"@biomejs/biome": "1.8.3",
"@types/node": "20.14.10",
"@types/react": "18.3.3",
"bunchee": "5.2.2",
"rimraf": "6.0.0",
"typescript": "5.5.3"
},
"publishConfig": {
"access": "public"
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/JsonWebToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export type PrivateClaims = {
cid: string // Client ID
aid: string // Administrator ID
ver: number // Session Token Version
rol: string // Administrator Role
}

export type QuilttJWT = JsonWebToken<PrivateClaims>
Expand Down
18 changes: 7 additions & 11 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist/**",
"src/**",
"CHANGELOG.md"
],
"files": ["dist/**", "src/**", "CHANGELOG.md"],
"scripts": {
"addApiKey": "node scripts/addApiKey.js",
"addVersion": "genversion --esm -f src/version.ts",
Expand All @@ -44,15 +40,15 @@
},
"devDependencies": {
"@apollo/client": "3.9.9",
"@biomejs/biome": "1.8.1",
"@biomejs/biome": "1.8.3",
"@types/base-64": "1.0.2",
"@types/node": "20.14.5",
"@types/react": "18.2.73",
"@types/node": "20.14.10",
"@types/react": "18.3.3",
"@types/react-native": "0.72.5",
"bunchee": "4.4.8",
"bunchee": "5.2.2",
"react": "18.2.0",
"rimraf": "5.0.5",
"typescript": "5.4.3"
"rimraf": "6.0.0",
"typescript": "5.5.3"
},
"peerDependencies": {
"base-64": "*",
Expand Down
25 changes: 8 additions & 17 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@
"name": "@quiltt/react",
"version": "3.6.10",
"description": "React components and hooks for Quiltt Connector",
"keywords": [
"quiltt",
"quiltt-connector",
"react",
"typescript"
],
"keywords": ["quiltt", "quiltt-connector", "react", "typescript"],
"homepage": "https://github.com/quiltt/quiltt-js/tree/main/packages/react#readme",
"repository": {
"type": "git",
Expand All @@ -31,11 +26,7 @@
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"dist/**",
"src/**",
"CHANGELOG.md"
],
"files": ["dist/**", "src/**", "CHANGELOG.md"],
"scripts": {
"addVersion": "genversion --esm -f src/version.ts",
"build": "pnpm run addVersion && bunchee",
Expand All @@ -49,15 +40,15 @@
},
"devDependencies": {
"@apollo/client": "3.9.9",
"@biomejs/biome": "1.8.1",
"@types/node": "20.14.5",
"@types/react": "18.2.73",
"@biomejs/biome": "1.8.3",
"@types/node": "20.14.10",
"@types/react": "18.3.3",
"@types/react-dom": "18.2.6",
"bunchee": "4.4.8",
"bunchee": "5.2.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"rimraf": "5.0.5",
"typescript": "5.4.3"
"rimraf": "6.0.0",
"typescript": "5.5.3"
},
"peerDependencies": {
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
Expand Down
Loading

0 comments on commit 272f2f6

Please sign in to comment.