From 6aa91882943227de1a093b487665c5e453190467 Mon Sep 17 00:00:00 2001 From: Ashish Padhy <100484401+Shurtu-gal@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:08:11 +0530 Subject: [PATCH 1/6] feat: implement basic netlify function utilising blobs for sharing --- .gitignore | 4 +- apps/studio-next/netlify.toml | 14 + apps/studio-next/package.json | 22 +- .../netlify/edge-functions/share-retreive.ts | 27 ++ .../src/netlify/edge-functions/share-store.ts | 26 ++ pnpm-lock.yaml | 244 ++++++------------ 6 files changed, 158 insertions(+), 179 deletions(-) create mode 100644 apps/studio-next/netlify.toml create mode 100644 apps/studio-next/src/netlify/edge-functions/share-retreive.ts create mode 100644 apps/studio-next/src/netlify/edge-functions/share-store.ts diff --git a/.gitignore b/.gitignore index e9cabfb15..40ee65be2 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,6 @@ build dist .turbo .env -apps/design-system/src/styles/tailwind.output.css \ No newline at end of file +apps/design-system/src/styles/tailwind.output.css +# Local Netlify folder for testing purposes +.netlify diff --git a/apps/studio-next/netlify.toml b/apps/studio-next/netlify.toml new file mode 100644 index 000000000..297673d58 --- /dev/null +++ b/apps/studio-next/netlify.toml @@ -0,0 +1,14 @@ +[devs] + edge_functions = "apps/studio-next/src/netlify/edge-functions" + targetPort = 3001 + +[build] + edge_functions = "apps/studio-next/src/netlify/edge-functions" + +[[edge_functions]] + path = "/share" + function = "share-store" + +[[edge_functions]] + path = "/share/*" + function = "share-retreive" \ No newline at end of file diff --git a/apps/studio-next/package.json b/apps/studio-next/package.json index 08e9b6ffc..d1b98ed66 100644 --- a/apps/studio-next/package.json +++ b/apps/studio-next/package.json @@ -16,31 +16,33 @@ "@asyncapi/protobuf-schema-parser": "^3.2.8", "@asyncapi/react-component": "^1.2.2", "@asyncapi/specs": "^6.5.4", + "@codemirror/view": "^6.26.3", "@ebay/nice-modal-react": "^1.2.10", "@headlessui/react": "^1.7.4", "@hookstate/core": "^4.0.0-rc21", "@monaco-editor/react": "^4.4.6", - "@tippyjs/react": "^4.2.6", - "js-base64": "^3.7.3", - "js-file-download": "^0.4.12", - "js-yaml": "^4.1.0", - "monaco-editor": "0.34.1", - "monaco-yaml": "4.0.2", - "react-hot-toast": "2.4.0", - "react-icons": "^4.6.0", - "reactflow": "^11.2.0", + "@netlify/blobs": "^8.0.1", + "@netlify/edge-functions": "^2.10.0", "@stoplight/yaml": "^4.3.0", - "@codemirror/view": "^6.26.3", + "@tippyjs/react": "^4.2.6", "@types/node": "20.4.6", "@types/react": "18.2.18", "@types/react-dom": "18.2.7", "autoprefixer": "10.4.14", "codemirror": "^6.0.1", "eslint-config-next": "13.4.12", + "js-base64": "^3.7.3", + "js-file-download": "^0.4.12", + "js-yaml": "^4.1.0", + "monaco-editor": "0.34.1", + "monaco-yaml": "4.0.2", "next": "14.2.3", "postcss": "8.4.31", "react": "18.2.0", "react-dom": "18.2.0", + "react-hot-toast": "2.4.0", + "react-icons": "^4.6.0", + "reactflow": "^11.2.0", "tailwindcss": "3.3.3", "tippy.js": "^6.3.7", "typescript": "5.1.6", diff --git a/apps/studio-next/src/netlify/edge-functions/share-retreive.ts b/apps/studio-next/src/netlify/edge-functions/share-retreive.ts new file mode 100644 index 000000000..c28be32f4 --- /dev/null +++ b/apps/studio-next/src/netlify/edge-functions/share-retreive.ts @@ -0,0 +1,27 @@ +import { Config, Context } from "@netlify/edge-functions"; +import { getStore } from "@netlify/blobs"; + +export default async (req: Request, context: Context) => { + const share = getStore("share"); + const shareId = req.url.split("/").pop(); + + if (!shareId) { + return new Response("Not found", { status: 404 }); + } + + const shareData = await share.get(shareId); + + if (!shareData) { + return new Response("Not found", { status: 404 }); + } + + return new Response(shareData, { + headers: { + "content-type": "application/json", + }, + }); +} + +export const config: Config = { + path: "/share/*", +}; \ No newline at end of file diff --git a/apps/studio-next/src/netlify/edge-functions/share-store.ts b/apps/studio-next/src/netlify/edge-functions/share-store.ts new file mode 100644 index 000000000..e06aaab00 --- /dev/null +++ b/apps/studio-next/src/netlify/edge-functions/share-store.ts @@ -0,0 +1,26 @@ +import { getStore } from "@netlify/blobs"; +import type { Config, Context } from "@netlify/edge-functions"; +import { randomUUID } from "crypto"; + +export default async (req: Request, context: Context) => { + const share = getStore("share"); + const shareId = randomUUID(); + + const state = await req.json(); + + await share.set(shareId, JSON.stringify({ + URL: context.site.url + "?share=" + shareId, + ...state, + created: Date.now(), + })) + + return new Response(shareId, { + headers: { + "content-type": "text/plain", + }, + }); +}; + +export const config: Config = { + path: "/share", +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7c1b5b57..9b1d728c5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -105,7 +105,7 @@ importers: version: 7.6.19(@types/react-dom@18.2.7)(@types/react@18.2.18)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@storybook/preset-create-react-app': specifier: ^7.6.18 - version: 7.6.19(@babel/core@7.24.5)(react-refresh@0.14.2)(react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/babel__core@7.20.5)(esbuild@0.18.20)(eslint@8.57.0)(react@18.2.0)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6))(type-fest@2.19.0)(typescript@5.1.6)(webpack-hot-middleware@2.26.1))(type-fest@2.19.0)(typescript@5.1.6)(webpack-dev-server@4.15.2(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)))(webpack-hot-middleware@2.26.1)(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) + version: 7.6.19(@babel/core@7.24.5)(react-refresh@0.14.2)(react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/babel__core@7.20.5)(esbuild@0.18.20)(eslint@8.57.0)(react@18.2.0)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6))(type-fest@2.19.0)(typescript@5.1.6)(webpack-hot-middleware@2.26.1))(type-fest@2.19.0)(typescript@5.1.6)(webpack-dev-server@4.15.2(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)))(webpack-hot-middleware@2.26.1)(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) '@storybook/react': specifier: ^7.6.18 version: 7.6.19(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(typescript@5.1.6) @@ -114,7 +114,7 @@ importers: version: 7.6.19(@babel/core@7.24.5)(@swc/core@1.5.7(@swc/helpers@0.5.5))(@swc/helpers@0.5.5)(esbuild@0.18.20)(react-dom@18.2.0(react@18.2.0))(react@18.2.0)(type-fest@2.19.0)(typescript@5.1.6)(webpack-dev-server@4.15.2(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)))(webpack-hot-middleware@2.26.1) '@storybook/test': specifier: ^7.6.18 - version: 7.6.19(@types/jest@29.5.12) + version: 7.6.19(@jest/globals@27.5.1)(@types/jest@29.5.12)(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6))) '@storybook/theming': specifier: ^7.6.18 version: 7.6.19(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -153,7 +153,7 @@ importers: version: link:../../packages/tailwind-config tailwindcss: specifier: ^3.4.3 - version: 3.4.3(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)) + version: 3.4.3(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) ts-loader: specifier: ^9.4.3 version: 9.5.1(typescript@5.1.6)(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) @@ -431,6 +431,12 @@ importers: '@monaco-editor/react': specifier: ^4.4.6 version: 4.6.0(monaco-editor@0.34.1)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@netlify/blobs': + specifier: ^8.0.1 + version: 8.0.1 + '@netlify/edge-functions': + specifier: ^2.10.0 + version: 2.10.0 '@stoplight/yaml': specifier: ^4.3.0 version: 4.3.0 @@ -472,7 +478,7 @@ importers: version: 4.0.2(monaco-editor@0.34.1) next: specifier: 14.2.3 - version: 14.2.3(@babel/core@7.24.5)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 14.2.3(@babel/core@7.12.9)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) postcss: specifier: 8.4.31 version: 8.4.31 @@ -633,7 +639,7 @@ importers: devDependencies: tailwindcss: specifier: ^3.2.4 - version: 3.3.3(ts-node@10.9.2(typescript@5.1.6)) + version: 3.3.3(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) packages/tsconfig: {} @@ -702,7 +708,7 @@ importers: version: link:../tsconfig tsup: specifier: ^8.0.2 - version: 8.0.2(@swc/core@1.5.7)(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7)(typescript@4.9.5))(typescript@4.9.5) + version: 8.0.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@4.9.5))(typescript@4.9.5) typescript: specifier: ^4.9.4 version: 4.9.5 @@ -718,7 +724,7 @@ importers: devDependencies: tsup: specifier: ^8.0.2 - version: 8.0.2(@swc/core@1.5.7)(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.5.7)(typescript@5.1.6))(typescript@5.1.6) + version: 8.0.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@4.9.5))(typescript@4.9.5) packages: @@ -2350,6 +2356,13 @@ packages: '@ndelangen/get-tarball@3.0.9': resolution: {integrity: sha512-9JKTEik4vq+yGosHYhZ1tiH/3WpUS0Nh0kej4Agndhox8pAdWhEx5knFVRcb/ya9knCRCs1rPxNrSXTDdfVqpA==} + '@netlify/blobs@8.0.1': + resolution: {integrity: sha512-IrZHVqillU0x12eDbsap4Ba6poi+4IdVCYjZa+tA0eD95TaSbSqfw1zNkO27MiKw0pOjPB6+RXFK4pdfOs/qUQ==} + engines: {node: ^14.16.0 || >=16.0.0} + + '@netlify/edge-functions@2.10.0': + resolution: {integrity: sha512-toDBus02KyXTeErqXh9mFjH5ocGwSDO8w9q1TkSincqExtm8TMITg3iXr4/SPKE17nKt+olsEuIry5hyM8OJBQ==} + '@next/env@14.2.3': resolution: {integrity: sha512-W7fd7IbkfmeeY2gXrzJYDx8D2lWKbVoTIj1o1ScPHNzvp30s1AuoEFSdr39bC5sjxJaxTtq3OTCZboNp0lNWHA==} @@ -13332,7 +13345,7 @@ snapshots: - ts-node - utf-8-validate - '@jest/core@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6))': + '@jest/core@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6))': dependencies: '@jest/console': 27.5.1 '@jest/reporters': 27.5.1 @@ -13346,7 +13359,7 @@ snapshots: exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 27.5.1 - jest-config: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)) + jest-config: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) jest-haste-map: 27.5.1 jest-message-util: 27.5.1 jest-regex-util: 27.5.1 @@ -13627,6 +13640,10 @@ snapshots: pump: 3.0.0 tar-fs: 2.1.1 + '@netlify/blobs@8.0.1': {} + + '@netlify/edge-functions@2.10.0': {} + '@next/env@14.2.3': {} '@next/eslint-plugin-next@13.4.12': @@ -15075,7 +15092,7 @@ snapshots: '@storybook/postinstall@7.6.19': {} - '@storybook/preset-create-react-app@7.6.19(@babel/core@7.24.5)(react-refresh@0.14.2)(react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/babel__core@7.20.5)(esbuild@0.18.20)(eslint@8.57.0)(react@18.2.0)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6))(type-fest@2.19.0)(typescript@5.1.6)(webpack-hot-middleware@2.26.1))(type-fest@2.19.0)(typescript@5.1.6)(webpack-dev-server@4.15.2(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)))(webpack-hot-middleware@2.26.1)(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20))': + '@storybook/preset-create-react-app@7.6.19(@babel/core@7.24.5)(react-refresh@0.14.2)(react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/babel__core@7.20.5)(esbuild@0.18.20)(eslint@8.57.0)(react@18.2.0)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6))(type-fest@2.19.0)(typescript@5.1.6)(webpack-hot-middleware@2.26.1))(type-fest@2.19.0)(typescript@5.1.6)(webpack-dev-server@4.15.2(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)))(webpack-hot-middleware@2.26.1)(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20))': dependencies: '@babel/core': 7.24.5 '@pmmmwh/react-refresh-webpack-plugin': 0.5.13(react-refresh@0.14.2)(type-fest@2.19.0)(webpack-dev-server@4.15.2(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)))(webpack-hot-middleware@2.26.1)(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) @@ -15084,7 +15101,7 @@ snapshots: '@types/babel__core': 7.20.5 '@types/semver': 7.5.8 pnp-webpack-plugin: 1.7.0(typescript@5.1.6) - react-scripts: 5.0.1(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/babel__core@7.20.5)(esbuild@0.18.20)(eslint@8.57.0)(react@18.2.0)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6))(type-fest@2.19.0)(typescript@5.1.6)(webpack-hot-middleware@2.26.1) + react-scripts: 5.0.1(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/babel__core@7.20.5)(esbuild@0.18.20)(eslint@8.57.0)(react@18.2.0)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6))(type-fest@2.19.0)(typescript@5.1.6)(webpack-hot-middleware@2.26.1) semver: 7.6.2 transitivePeerDependencies: - '@types/webpack' @@ -15252,14 +15269,14 @@ snapshots: - encoding - supports-color - '@storybook/test@7.6.19(@types/jest@29.5.12)': + '@storybook/test@7.6.19(@jest/globals@27.5.1)(@types/jest@29.5.12)(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)))': dependencies: '@storybook/client-logger': 7.6.19 '@storybook/core-events': 7.6.19 '@storybook/instrumenter': 7.6.19 '@storybook/preview-api': 7.6.19 '@testing-library/dom': 9.3.4 - '@testing-library/jest-dom': 6.4.5(@types/jest@29.5.12) + '@testing-library/jest-dom': 6.4.5(@jest/globals@27.5.1)(@types/jest@29.5.12)(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6))) '@testing-library/user-event': 14.3.0(@testing-library/dom@9.3.4) '@types/chai': 4.3.16 '@vitest/expect': 0.34.7 @@ -15497,7 +15514,7 @@ snapshots: lodash: 4.17.21 redent: 3.0.0 - '@testing-library/jest-dom@6.4.5(@types/jest@29.5.12)': + '@testing-library/jest-dom@6.4.5(@jest/globals@27.5.1)(@types/jest@29.5.12)(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)))': dependencies: '@adobe/css-tools': 4.3.3 '@babel/runtime': 7.24.5 @@ -15508,7 +15525,9 @@ snapshots: lodash: 4.17.21 redent: 3.0.0 optionalDependencies: + '@jest/globals': 27.5.1 '@types/jest': 29.5.12 + jest: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) '@testing-library/react@12.1.5(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: @@ -18130,7 +18149,7 @@ snapshots: - jest - supports-color - eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(eslint@8.57.0)(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)))(typescript@5.1.6): + eslint-config-react-app@7.0.1(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(eslint@8.57.0)(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)))(typescript@5.1.6): dependencies: '@babel/core': 7.24.5 '@babel/eslint-parser': 7.24.5(@babel/core@7.24.5)(eslint@8.57.0) @@ -18142,7 +18161,7 @@ snapshots: eslint: 8.57.0 eslint-plugin-flowtype: 8.0.3(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(eslint@8.57.0) eslint-plugin-import: 2.29.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0) - eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0)(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)))(typescript@5.1.6) + eslint-plugin-jest: 25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0)(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)))(typescript@5.1.6) eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) eslint-plugin-react: 7.28.0(eslint@8.57.0) eslint-plugin-react-hooks: 4.6.2(eslint@8.57.0) @@ -18208,6 +18227,16 @@ snapshots: transitivePeerDependencies: - supports-color + eslint-module-utils@2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): + dependencies: + debug: 3.2.7 + optionalDependencies: + '@typescript-eslint/parser': 5.62.0(eslint@8.57.0)(typescript@5.1.6) + eslint: 8.57.0 + eslint-import-resolver-node: 0.3.9 + transitivePeerDependencies: + - supports-color + eslint-module-utils@2.8.1(@typescript-eslint/parser@7.9.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0): dependencies: debug: 3.2.7 @@ -18263,7 +18292,7 @@ snapshots: doctrine: 2.1.0 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.0))(eslint@8.57.0) + eslint-module-utils: 2.8.1(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.1.6))(eslint-import-resolver-node@0.3.9)(eslint@8.57.0) hasown: 2.0.2 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -18318,13 +18347,13 @@ snapshots: - supports-color - typescript - eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0)(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)))(typescript@5.1.6): + eslint-plugin-jest@25.7.0(@typescript-eslint/eslint-plugin@5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0)(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)))(typescript@5.1.6): dependencies: '@typescript-eslint/experimental-utils': 5.62.0(eslint@8.57.0)(typescript@5.1.6) eslint: 8.57.0 optionalDependencies: '@typescript-eslint/eslint-plugin': 5.62.0(@typescript-eslint/parser@5.62.0(eslint@8.57.0)(typescript@5.1.6))(eslint@8.57.0)(typescript@5.1.6) - jest: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)) + jest: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) transitivePeerDependencies: - supports-color - typescript @@ -19676,16 +19705,16 @@ snapshots: - ts-node - utf-8-validate - jest-cli@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)): + jest-cli@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)): dependencies: - '@jest/core': 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)) + '@jest/core': 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 import-local: 3.1.0 - jest-config: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)) + jest-config: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) jest-util: 27.5.1 jest-validate: 27.5.1 prompts: 2.4.2 @@ -19731,7 +19760,7 @@ snapshots: - supports-color - utf-8-validate - jest-config@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)): + jest-config@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)): dependencies: '@babel/core': 7.24.5 '@jest/test-sequencer': 27.5.1 @@ -20100,11 +20129,11 @@ snapshots: string-length: 5.0.1 strip-ansi: 7.1.0 - jest-watch-typeahead@1.1.0(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6))): + jest-watch-typeahead@1.1.0(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6))): dependencies: ansi-escapes: 4.3.2 chalk: 4.1.2 - jest: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)) + jest: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) jest-regex-util: 28.0.2 jest-watcher: 28.1.3 slash: 4.0.0 @@ -20169,11 +20198,11 @@ snapshots: - ts-node - utf-8-validate - jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)): + jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)): dependencies: - '@jest/core': 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)) + '@jest/core': 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) import-local: 3.1.0 - jest-cli: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)) + jest-cli: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) transitivePeerDependencies: - bufferutil - canvas @@ -21058,7 +21087,7 @@ snapshots: neo-async@2.6.2: {} - next@14.2.3(@babel/core@7.24.5)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + next@14.2.3(@babel/core@7.12.9)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: '@next/env': 14.2.3 '@swc/helpers': 0.5.5 @@ -21068,7 +21097,7 @@ snapshots: postcss: 8.4.31 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) - styled-jsx: 5.1.1(@babel/core@7.24.5)(react@18.2.0) + styled-jsx: 5.1.1(@babel/core@7.12.9)(react@18.2.0) optionalDependencies: '@next/swc-darwin-arm64': 14.2.3 '@next/swc-darwin-x64': 14.2.3 @@ -21623,31 +21652,15 @@ snapshots: postcss: 8.4.31 ts-node: 10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@18.19.33)(typescript@4.9.5) - postcss-load-config@4.0.2(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)): - dependencies: - lilconfig: 3.1.1 - yaml: 2.4.2 - optionalDependencies: - postcss: 8.4.31 - ts-node: 10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6) - - postcss-load-config@4.0.2(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)): + postcss-load-config@4.0.2(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@4.9.5)): dependencies: lilconfig: 3.1.1 yaml: 2.4.2 optionalDependencies: postcss: 8.4.31 - ts-node: 10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6) + ts-node: 10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@4.9.5) - postcss-load-config@4.0.2(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7)(typescript@4.9.5)): - dependencies: - lilconfig: 3.1.1 - yaml: 2.4.2 - optionalDependencies: - postcss: 8.4.31 - ts-node: 10.9.2(@swc/core@1.5.7)(typescript@4.9.5) - - postcss-load-config@4.0.2(postcss@8.4.31)(ts-node@10.9.2(typescript@5.1.6)): + postcss-load-config@4.0.2(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)): dependencies: lilconfig: 3.1.1 yaml: 2.4.2 @@ -21655,14 +21668,6 @@ snapshots: postcss: 8.4.31 ts-node: 10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6) - postcss-load-config@4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.5.7)(typescript@5.1.6)): - dependencies: - lilconfig: 3.1.1 - yaml: 2.4.2 - optionalDependencies: - postcss: 8.4.38 - ts-node: 10.9.2(@swc/core@1.5.7)(typescript@5.1.6) - postcss-loader@6.2.1(postcss@8.4.31)(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)): dependencies: cosmiconfig: 7.1.0 @@ -22420,7 +22425,7 @@ snapshots: - webpack-hot-middleware - webpack-plugin-serve - react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/babel__core@7.20.5)(esbuild@0.18.20)(eslint@8.57.0)(react@18.2.0)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6))(type-fest@2.19.0)(typescript@5.1.6)(webpack-hot-middleware@2.26.1): + react-scripts@5.0.1(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/babel__core@7.20.5)(esbuild@0.18.20)(eslint@8.57.0)(react@18.2.0)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6))(type-fest@2.19.0)(typescript@5.1.6)(webpack-hot-middleware@2.26.1): dependencies: '@babel/core': 7.24.5 '@pmmmwh/react-refresh-webpack-plugin': 0.5.13(react-refresh@0.11.0)(type-fest@2.19.0)(webpack-dev-server@4.15.2(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)))(webpack-hot-middleware@2.26.1)(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) @@ -22438,15 +22443,15 @@ snapshots: dotenv: 10.0.0 dotenv-expand: 5.1.0 eslint: 8.57.0 - eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(eslint@8.57.0)(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)))(typescript@5.1.6) + eslint-config-react-app: 7.0.1(@babel/plugin-syntax-flow@7.24.1(@babel/core@7.24.5))(@babel/plugin-transform-react-jsx@7.23.4(@babel/core@7.24.5))(eslint@8.57.0)(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)))(typescript@5.1.6) eslint-webpack-plugin: 3.2.0(eslint@8.57.0)(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) file-loader: 6.2.0(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) fs-extra: 10.1.0 html-webpack-plugin: 5.6.0(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) identity-obj-proxy: 3.0.0 - jest: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)) + jest: 27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) jest-resolve: 27.5.1 - jest-watch-typeahead: 1.1.0(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6))) + jest-watch-typeahead: 1.1.0(jest@27.5.1(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6))) mini-css-extract-plugin: 2.9.0(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) postcss: 8.4.31 postcss-flexbugs-fixes: 5.0.2(postcss@8.4.31) @@ -22464,7 +22469,7 @@ snapshots: semver: 7.6.2 source-map-loader: 3.0.2(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) style-loader: 3.3.4(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) - tailwindcss: 3.3.3(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)) + tailwindcss: 3.3.3(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) terser-webpack-plugin: 5.3.10(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) webpack: 5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20) webpack-dev-server: 4.15.2(webpack@5.91.0(@swc/core@1.5.7(@swc/helpers@0.5.5))(esbuild@0.18.20)) @@ -23272,12 +23277,12 @@ snapshots: style-mod@4.1.2: {} - styled-jsx@5.1.1(@babel/core@7.24.5)(react@18.2.0): + styled-jsx@5.1.1(@babel/core@7.12.9)(react@18.2.0): dependencies: client-only: 0.0.1 react: 18.2.0 optionalDependencies: - '@babel/core': 7.24.5 + '@babel/core': 7.12.9 stylehacks@5.1.1(postcss@8.4.31): dependencies: @@ -23416,61 +23421,7 @@ snapshots: transitivePeerDependencies: - ts-node - tailwindcss@3.3.3(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)): - dependencies: - '@alloc/quick-lru': 5.2.0 - arg: 5.0.2 - chokidar: 3.6.0 - didyoumean: 1.2.2 - dlv: 1.1.3 - fast-glob: 3.3.2 - glob-parent: 6.0.2 - is-glob: 4.0.3 - jiti: 1.21.0 - lilconfig: 2.1.0 - micromatch: 4.0.5 - normalize-path: 3.0.0 - object-hash: 3.0.0 - picocolors: 1.0.1 - postcss: 8.4.31 - postcss-import: 15.1.0(postcss@8.4.31) - postcss-js: 4.0.1(postcss@8.4.31) - postcss-load-config: 4.0.2(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)) - postcss-nested: 6.0.1(postcss@8.4.31) - postcss-selector-parser: 6.0.16 - resolve: 1.22.8 - sucrase: 3.35.0 - transitivePeerDependencies: - - ts-node - - tailwindcss@3.3.3(ts-node@10.9.2(typescript@5.1.6)): - dependencies: - '@alloc/quick-lru': 5.2.0 - arg: 5.0.2 - chokidar: 3.6.0 - didyoumean: 1.2.2 - dlv: 1.1.3 - fast-glob: 3.3.2 - glob-parent: 6.0.2 - is-glob: 4.0.3 - jiti: 1.21.0 - lilconfig: 2.1.0 - micromatch: 4.0.5 - normalize-path: 3.0.0 - object-hash: 3.0.0 - picocolors: 1.0.1 - postcss: 8.4.31 - postcss-import: 15.1.0(postcss@8.4.31) - postcss-js: 4.0.1(postcss@8.4.31) - postcss-load-config: 4.0.2(postcss@8.4.31)(ts-node@10.9.2(typescript@5.1.6)) - postcss-nested: 6.0.1(postcss@8.4.31) - postcss-selector-parser: 6.0.16 - resolve: 1.22.8 - sucrase: 3.35.0 - transitivePeerDependencies: - - ts-node - - tailwindcss@3.4.3(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)): + tailwindcss@3.4.3(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -23489,7 +23440,7 @@ snapshots: postcss: 8.4.31 postcss-import: 15.1.0(postcss@8.4.31) postcss-js: 4.0.1(postcss@8.4.31) - postcss-load-config: 4.0.2(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(typescript@5.1.6)) + postcss-load-config: 4.0.2(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6)) postcss-nested: 6.0.1(postcss@8.4.31) postcss-selector-parser: 6.0.16 resolve: 1.22.8 @@ -23735,7 +23686,7 @@ snapshots: optionalDependencies: '@swc/core': 1.5.7(@swc/helpers@0.5.5) - ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6): + ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@4.9.5): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 @@ -23749,25 +23700,6 @@ snapshots: create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.1.6 - v8-compile-cache-lib: 3.0.1 - yn: 3.1.1 - optionalDependencies: - '@swc/core': 1.5.7(@swc/helpers@0.5.5) - - ts-node@10.9.2(@swc/core@1.5.7)(typescript@4.9.5): - dependencies: - '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 - '@tsconfig/node12': 1.0.11 - '@tsconfig/node14': 1.0.3 - '@tsconfig/node16': 1.0.4 - acorn: 8.11.3 - acorn-walk: 8.3.2 - arg: 4.1.3 - create-require: 1.1.1 - diff: 4.0.2 - make-error: 1.3.6 typescript: 4.9.5 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 @@ -23775,13 +23707,14 @@ snapshots: '@swc/core': 1.5.7(@swc/helpers@0.5.5) optional: true - ts-node@10.9.2(@swc/core@1.5.7)(typescript@5.1.6): + ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@5.1.6): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 + '@types/node': 20.4.6 acorn: 8.11.3 acorn-walk: 8.3.2 arg: 4.1.3 @@ -23793,7 +23726,6 @@ snapshots: yn: 3.1.1 optionalDependencies: '@swc/core': 1.5.7(@swc/helpers@0.5.5) - optional: true ts-pnp@1.2.0(typescript@5.1.6): optionalDependencies: @@ -23810,7 +23742,7 @@ snapshots: tslib@2.6.2: {} - tsup@8.0.2(@swc/core@1.5.7)(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7)(typescript@4.9.5))(typescript@4.9.5): + tsup@8.0.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@4.9.5))(typescript@4.9.5): dependencies: bundle-require: 4.1.0(esbuild@0.19.12) cac: 6.7.14 @@ -23820,7 +23752,7 @@ snapshots: execa: 5.1.1 globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 4.0.2(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7)(typescript@4.9.5)) + postcss-load-config: 4.0.2(postcss@8.4.31)(ts-node@10.9.2(@swc/core@1.5.7(@swc/helpers@0.5.5))(@types/node@20.4.6)(typescript@4.9.5)) resolve-from: 5.0.0 rollup: 4.17.2 source-map: 0.8.0-beta.0 @@ -23834,30 +23766,6 @@ snapshots: - supports-color - ts-node - tsup@8.0.2(@swc/core@1.5.7)(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.5.7)(typescript@5.1.6))(typescript@5.1.6): - dependencies: - bundle-require: 4.1.0(esbuild@0.19.12) - cac: 6.7.14 - chokidar: 3.6.0 - debug: 4.3.4 - esbuild: 0.19.12 - execa: 5.1.1 - globby: 11.1.0 - joycon: 3.1.1 - postcss-load-config: 4.0.2(postcss@8.4.38)(ts-node@10.9.2(@swc/core@1.5.7)(typescript@5.1.6)) - resolve-from: 5.0.0 - rollup: 4.17.2 - source-map: 0.8.0-beta.0 - sucrase: 3.35.0 - tree-kill: 1.2.2 - optionalDependencies: - '@swc/core': 1.5.7(@swc/helpers@0.5.5) - postcss: 8.4.38 - typescript: 5.1.6 - transitivePeerDependencies: - - supports-color - - ts-node - tsutils@3.21.0(typescript@4.9.5): dependencies: tslib: 1.14.1 From 1b02833c557473df86c8ef5903cc25d7ed90b700 Mon Sep 17 00:00:00 2001 From: Ashish Padhy <100484401+Shurtu-gal@users.noreply.github.com> Date: Mon, 16 Sep 2024 14:47:04 +0530 Subject: [PATCH 2/6] chore: pivot from edge functions to normal ones --- apps/studio-next/netlify.toml | 12 ++----- apps/studio-next/package.json | 2 +- .../share-retreive.ts | 6 ++-- .../share-store.ts | 2 +- pnpm-lock.yaml | 35 +++++++++++++++---- 5 files changed, 36 insertions(+), 21 deletions(-) rename apps/studio-next/src/netlify/{edge-functions => functions}/share-retreive.ts (79%) rename apps/studio-next/src/netlify/{edge-functions => functions}/share-store.ts (89%) diff --git a/apps/studio-next/netlify.toml b/apps/studio-next/netlify.toml index 297673d58..44143e1a6 100644 --- a/apps/studio-next/netlify.toml +++ b/apps/studio-next/netlify.toml @@ -1,14 +1,6 @@ [devs] - edge_functions = "apps/studio-next/src/netlify/edge-functions" + functions = "apps/studio-next/src/netlify/functions" targetPort = 3001 [build] - edge_functions = "apps/studio-next/src/netlify/edge-functions" - -[[edge_functions]] - path = "/share" - function = "share-store" - -[[edge_functions]] - path = "/share/*" - function = "share-retreive" \ No newline at end of file + functions = "apps/studio-next/src/netlify/functions" \ No newline at end of file diff --git a/apps/studio-next/package.json b/apps/studio-next/package.json index d1b98ed66..1cdb6e686 100644 --- a/apps/studio-next/package.json +++ b/apps/studio-next/package.json @@ -22,7 +22,7 @@ "@hookstate/core": "^4.0.0-rc21", "@monaco-editor/react": "^4.4.6", "@netlify/blobs": "^8.0.1", - "@netlify/edge-functions": "^2.10.0", + "@netlify/functions": "^2.8.1", "@stoplight/yaml": "^4.3.0", "@tippyjs/react": "^4.2.6", "@types/node": "20.4.6", diff --git a/apps/studio-next/src/netlify/edge-functions/share-retreive.ts b/apps/studio-next/src/netlify/functions/share-retreive.ts similarity index 79% rename from apps/studio-next/src/netlify/edge-functions/share-retreive.ts rename to apps/studio-next/src/netlify/functions/share-retreive.ts index c28be32f4..69f0ee661 100644 --- a/apps/studio-next/src/netlify/edge-functions/share-retreive.ts +++ b/apps/studio-next/src/netlify/functions/share-retreive.ts @@ -1,9 +1,9 @@ -import { Config, Context } from "@netlify/edge-functions"; import { getStore } from "@netlify/blobs"; +import type { Config, Context } from "@netlify/functions"; export default async (req: Request, context: Context) => { const share = getStore("share"); - const shareId = req.url.split("/").pop(); + const { shareId } = context.params; if (!shareId) { return new Response("Not found", { status: 404 }); @@ -23,5 +23,5 @@ export default async (req: Request, context: Context) => { } export const config: Config = { - path: "/share/*", + path: "/share/:shareId", }; \ No newline at end of file diff --git a/apps/studio-next/src/netlify/edge-functions/share-store.ts b/apps/studio-next/src/netlify/functions/share-store.ts similarity index 89% rename from apps/studio-next/src/netlify/edge-functions/share-store.ts rename to apps/studio-next/src/netlify/functions/share-store.ts index e06aaab00..7e08119c9 100644 --- a/apps/studio-next/src/netlify/edge-functions/share-store.ts +++ b/apps/studio-next/src/netlify/functions/share-store.ts @@ -1,5 +1,5 @@ import { getStore } from "@netlify/blobs"; -import type { Config, Context } from "@netlify/edge-functions"; +import type { Config, Context } from "@netlify/functions"; import { randomUUID } from "crypto"; export default async (req: Request, context: Context) => { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b1d728c5..c5a6500d0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -434,9 +434,9 @@ importers: '@netlify/blobs': specifier: ^8.0.1 version: 8.0.1 - '@netlify/edge-functions': - specifier: ^2.10.0 - version: 2.10.0 + '@netlify/functions': + specifier: ^2.8.1 + version: 2.8.1 '@stoplight/yaml': specifier: ^4.3.0 version: 4.3.0 @@ -2360,8 +2360,17 @@ packages: resolution: {integrity: sha512-IrZHVqillU0x12eDbsap4Ba6poi+4IdVCYjZa+tA0eD95TaSbSqfw1zNkO27MiKw0pOjPB6+RXFK4pdfOs/qUQ==} engines: {node: ^14.16.0 || >=16.0.0} - '@netlify/edge-functions@2.10.0': - resolution: {integrity: sha512-toDBus02KyXTeErqXh9mFjH5ocGwSDO8w9q1TkSincqExtm8TMITg3iXr4/SPKE17nKt+olsEuIry5hyM8OJBQ==} + '@netlify/functions@2.8.1': + resolution: {integrity: sha512-+6wtYdoz0yE06dSa9XkP47tw5zm6g13QMeCwM3MmHx1vn8hzwFa51JtmfraprdkL7amvb7gaNM+OOhQU1h6T8A==} + engines: {node: '>=14.0.0'} + + '@netlify/node-cookies@0.1.0': + resolution: {integrity: sha512-OAs1xG+FfLX0LoRASpqzVntVV/RpYkgpI0VrUnw2u0Q1qiZUzcPffxRK8HF3gc4GjuhG5ahOEMJ9bswBiZPq0g==} + engines: {node: ^14.16.0 || >=16.0.0} + + '@netlify/serverless-functions-api@1.19.1': + resolution: {integrity: sha512-2KYkyluThg1AKfd0JWI7FzpS4A/fzVVGYIf6AM4ydWyNj8eI/86GQVLeRgDoH7CNOxt243R5tutWlmHpVq0/Ew==} + engines: {node: '>=18.0.0'} '@next/env@14.2.3': resolution: {integrity: sha512-W7fd7IbkfmeeY2gXrzJYDx8D2lWKbVoTIj1o1ScPHNzvp30s1AuoEFSdr39bC5sjxJaxTtq3OTCZboNp0lNWHA==} @@ -10242,6 +10251,9 @@ packages: url@0.11.3: resolution: {integrity: sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==} + urlpattern-polyfill@8.0.2: + resolution: {integrity: sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ==} + use-callback-ref@1.3.2: resolution: {integrity: sha512-elOQwe6Q8gqZgDA8mrh44qRTQqpIHDcZ3hXTLjBe1i4ph8XpNJnO+aQf3NaG+lriLopI4HMx9VjQLfPQ6vhnoA==} engines: {node: '>=10'} @@ -13642,7 +13654,16 @@ snapshots: '@netlify/blobs@8.0.1': {} - '@netlify/edge-functions@2.10.0': {} + '@netlify/functions@2.8.1': + dependencies: + '@netlify/serverless-functions-api': 1.19.1 + + '@netlify/node-cookies@0.1.0': {} + + '@netlify/serverless-functions-api@1.19.1': + dependencies: + '@netlify/node-cookies': 0.1.0 + urlpattern-polyfill: 8.0.2 '@next/env@14.2.3': {} @@ -24043,6 +24064,8 @@ snapshots: punycode: 1.4.1 qs: 6.12.1 + urlpattern-polyfill@8.0.2: {} + use-callback-ref@1.3.2(@types/react@18.2.18)(react@18.2.0): dependencies: react: 18.2.0 From 156c5e980e621e4ca307ae20f39325dfd660a596 Mon Sep 17 00:00:00 2001 From: Ashish Padhy <100484401+Shurtu-gal@users.noreply.github.com> Date: Mon, 16 Sep 2024 15:59:17 +0530 Subject: [PATCH 3/6] feat: add share functionality to website --- .../src/components/Editor/EditorDropdown.tsx | 45 +++++++++++++++ .../src/components/Editor/ShareButton.tsx | 7 +-- .../src/components/Modals/ImportUUIDModal.tsx | 57 +++++++++++++++++++ .../src/components/Modals/index.tsx | 1 + apps/studio-next/src/services/app.service.ts | 22 ++++--- .../src/services/editor.service.tsx | 39 +++++++++++++ .../src/services/navigation.service.ts | 1 + apps/studio-next/src/state/files.state.ts | 2 +- 8 files changed, 159 insertions(+), 15 deletions(-) create mode 100644 apps/studio-next/src/components/Modals/ImportUUIDModal.tsx diff --git a/apps/studio-next/src/components/Editor/EditorDropdown.tsx b/apps/studio-next/src/components/Editor/EditorDropdown.tsx index 51b0a1a5d..cc3506984 100644 --- a/apps/studio-next/src/components/Editor/EditorDropdown.tsx +++ b/apps/studio-next/src/components/Editor/EditorDropdown.tsx @@ -8,6 +8,7 @@ import { ImportBase64Modal, GeneratorModal, ConvertModal, + ImportUUIDModal, } from '../Modals'; import { Dropdown } from '../common'; @@ -34,6 +35,17 @@ export const EditorDropdown: React.FunctionComponent = () = ); + const importShareIdButton = ( + + ); + const importFileButton = (