From 0470a3168cb79a0d626cbe34460996f45a3a2088 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 16 Jul 2023 17:48:13 +0100 Subject: [PATCH] Chore: cleanup --- Assets/WebsiteAssets/templates/plans.mustache | 3 +++ packages/app-mobile/ios/Podfile.lock | 8 ++++---- packages/lib/uuid.ts | 3 +++ packages/utils/index.ts | 1 + packages/utils/package.json | 1 + yarn.lock | 1 + 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Assets/WebsiteAssets/templates/plans.mustache b/Assets/WebsiteAssets/templates/plans.mustache index 3d0ff7755..a1c5a56aa 100644 --- a/Assets/WebsiteAssets/templates/plans.mustache +++ b/Assets/WebsiteAssets/templates/plans.mustache @@ -96,6 +96,8 @@ console.info('Creating Stripe session for price:', priceId, 'Promotion code:', promotionCode); + const source = localStorage.getItem('source'); + return fetch("{{{stripeConfig.webhookBaseUrl}}}/stripe/createCheckoutSession", { method: "POST", headers: { @@ -105,6 +107,7 @@ priceId, promotionCode, email: checkoutSessionUser ? checkoutSessionUser.email : '', + source, }) }).then(async function(result) { if (!result.ok) { diff --git a/packages/app-mobile/ios/Podfile.lock b/packages/app-mobile/ios/Podfile.lock index da457c5e0..483d1a10b 100644 --- a/packages/app-mobile/ios/Podfile.lock +++ b/packages/app-mobile/ios/Podfile.lock @@ -782,9 +782,9 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/yoga" SPEC CHECKSUMS: - boost: 57d2868c099736d80fcd648bf211b4431e51a558 + boost: a7c83b31436843459a1961bfd74b96033dc77234 CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 - DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 + DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 FBLazyVector: ddb55c55295ea51ed98aa7e2e08add2f826309d5 FBReactNativeSpec: 90fc1a90b4b7a171e0a7c20ea426c1bf6ce4399c Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0 @@ -797,13 +797,13 @@ SPEC CHECKSUMS: Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541 FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b + glog: 5337263514dd6f09803962437687240c5dc39aa4 hermes-engine: d27603b55a48402501ad1928c05411dae9cd6b85 JoplinCommonShareExtension: a8b60b02704d85a7305627912c0240e94af78db7 JoplinRNShareExtension: 485f3e6dad83b7b77f1572eabc249f869ee55c02 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c - RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 + RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda RCTRequired: 8ef706f91e2b643cd32c26a57700b5f24fab0585 RCTTypeSafety: 5fbddd8eb9242b91ac0d901c01da3673f358b1b7 React: e5d2d559e89d256a1d6da64d51adaecda9c8ddae diff --git a/packages/lib/uuid.ts b/packages/lib/uuid.ts index 024719684..663d3f5d8 100644 --- a/packages/lib/uuid.ts +++ b/packages/lib/uuid.ts @@ -15,4 +15,7 @@ export default { createNano: function(): string { return nanoid(); }, + createNanoForInboxEmail: (): string => { + return customAlphabet('0123456789abcdefghijklmnopqrstuvwxyz', 8)(); + }, }; diff --git a/packages/utils/index.ts b/packages/utils/index.ts index 3f33cc819..d9468134f 100644 --- a/packages/utils/index.ts +++ b/packages/utils/index.ts @@ -6,6 +6,7 @@ import { pathExists } from 'fs-extra'; let rootDir_ = ''; + const getRootDir = async () => { if (rootDir_) return rootDir_; diff --git a/packages/utils/package.json b/packages/utils/package.json index 0d0639901..c622e6833 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -24,6 +24,7 @@ "node-fetch": "2.6.7" }, "devDependencies": { + "@types/fs-extra": "11.0.1", "@types/jest": "29.5.1", "@types/node-fetch": "2.6.3", "jest": "29.5.0", diff --git a/yarn.lock b/yarn.lock index 9a6393900..8a4a64d15 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5021,6 +5021,7 @@ __metadata: version: 0.0.0-use.local resolution: "@joplin/utils@workspace:packages/utils" dependencies: + "@types/fs-extra": 11.0.1 "@types/jest": 29.5.1 "@types/node-fetch": 2.6.3 execa: 5.1.1