From 38755bf3e3c9b075fd4ca023008d8ea5fd12ca7f Mon Sep 17 00:00:00 2001 From: Andrew Bastin Date: Wed, 24 Nov 2021 01:20:07 +0530 Subject: [PATCH] refactor: separate out data structures into hoppscotch-data --- .../components/collections/SaveRequest.vue | 3 +- .../components/collections/graphql/Add.vue | 2 +- .../collections/graphql/EditRequest.vue | 2 +- .../collections/graphql/Request.vue | 2 +- .../components/collections/my/Request.vue | 2 +- .../components/collections/teams/Request.vue | 2 +- .../components/graphql/RequestOptions.vue | 2 +- .../components/graphql/Sidebar.vue | 2 +- .../components/history/graphql/Card.vue | 2 +- .../components/http/Authorization.vue | 2 +- .../components/http/BodyParameters.vue | 2 +- .../components/http/Headers.vue | 2 +- .../components/http/ImportCurl.vue | 6 +- .../components/http/OAuth2Authorization.vue | 2 +- .../components/http/Parameters.vue | 2 +- .../components/lenses/HeadersRenderer.vue | 2 +- .../hoppscotch-app/helpers/GQLConnection.ts | 2 +- .../helpers/RESTExtURLParams.ts | 2 +- .../hoppscotch-app/helpers/RequestRunner.ts | 2 +- .../helpers/backend/mutations/Shortcode.ts | 2 +- .../hoppscotch-app/helpers/codegen/codegen.ts | 2 +- packages/hoppscotch-app/helpers/fb/history.ts | 2 +- packages/hoppscotch-app/helpers/fb/request.ts | 5 +- .../helpers/teams/TeamCollectionAdapter.ts | 2 +- .../helpers/teams/TeamRequest.ts | 2 +- .../helpers/types/HoppRESTResponse.ts | 2 +- .../helpers/utils/EffectiveURL.ts | 2 +- .../helpers/utils/contenttypes.ts | 8 +- .../hoppscotch-app/newstore/GQLSession.ts | 6 +- .../hoppscotch-app/newstore/RESTSession.ts | 8 +- .../hoppscotch-app/newstore/collections.ts | 12 +- packages/hoppscotch-app/newstore/history.ts | 8 +- .../newstore/localpersistence.ts | 2 +- packages/hoppscotch-app/package.json | 1 + packages/hoppscotch-app/pages/index.vue | 3 +- packages/hoppscotch-app/pages/r/_id.vue | 2 +- packages/hoppscotch-data/package-lock.json | 356 ++++++++++++++++++ packages/hoppscotch-data/package.json | 32 ++ packages/hoppscotch-data/rollup.config.js | 36 ++ .../src/graphql/index.ts} | 2 +- packages/hoppscotch-data/src/index.ts | 2 + .../src/rest}/HoppRESTAuth.ts | 2 +- .../hoppscotch-data/src/rest/content-types.ts | 13 + .../src/rest/index.ts} | 5 +- packages/hoppscotch-data/tsconfig.json | 12 + packages/hoppscotch-data/tsup.config.ts | 18 + pnpm-lock.yaml | 304 ++++++++++++++- 47 files changed, 820 insertions(+), 74 deletions(-) create mode 100644 packages/hoppscotch-data/package-lock.json create mode 100644 packages/hoppscotch-data/package.json create mode 100644 packages/hoppscotch-data/rollup.config.js rename packages/{hoppscotch-app/helpers/types/HoppGQLRequest.ts => hoppscotch-data/src/graphql/index.ts} (99%) create mode 100644 packages/hoppscotch-data/src/index.ts rename packages/{hoppscotch-app/helpers/types => hoppscotch-data/src/rest}/HoppRESTAuth.ts (99%) create mode 100644 packages/hoppscotch-data/src/rest/content-types.ts rename packages/{hoppscotch-app/helpers/types/HoppRESTRequest.ts => hoppscotch-data/src/rest/index.ts} (96%) create mode 100644 packages/hoppscotch-data/tsconfig.json create mode 100644 packages/hoppscotch-data/tsup.config.ts diff --git a/packages/hoppscotch-app/components/collections/SaveRequest.vue b/packages/hoppscotch-app/components/collections/SaveRequest.vue index 5094f71ae..1575bd4b3 100644 --- a/packages/hoppscotch-app/components/collections/SaveRequest.vue +++ b/packages/hoppscotch-app/components/collections/SaveRequest.vue @@ -59,7 +59,7 @@