Merge branch 'newstate/collections' of https://github.com/AndrewBastin/hoppscotch into newstate/collections
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v1.12.0](https://github.com/hoppscotch/hoppscotch/tree/v1.12.0) (2020-05-27)
|
||||||
|
|
||||||
|
[Full Changelog](https://github.com/hoppscotch/hoppscotch/compare/v1.10.0...v1.12.0)
|
||||||
|
|
||||||
## [v1.10.0](https://github.com/hoppscotch/hoppscotch/tree/v1.10.0) (2020-04-10)
|
## [v1.10.0](https://github.com/hoppscotch/hoppscotch/tree/v1.10.0) (2020-04-10)
|
||||||
|
|
||||||
[Full Changelog](https://github.com/hoppscotch/hoppscotch/compare/v1.9.9...v1.10.0)
|
[Full Changelog](https://github.com/hoppscotch/hoppscotch/compare/v1.9.9...v1.10.0)
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ ADD . /app/
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN npm run generate
|
|
||||||
|
|
||||||
ENV HOST 0.0.0.0
|
ENV HOST 0.0.0.0
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
RUN mv .env.example .env
|
||||||
|
|
||||||
CMD ["npm", "run", "dev"]
|
CMD ["npm", "run", "dev"]
|
||||||
|
|||||||
@@ -148,7 +148,10 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from "vue"
|
import Vue from "vue"
|
||||||
import { removeGraphqlCollection } from "~/newstore/collections"
|
import {
|
||||||
|
removeGraphqlCollection,
|
||||||
|
moveGraphqlRequest,
|
||||||
|
} from "~/newstore/collections"
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: {
|
props: {
|
||||||
@@ -203,25 +206,10 @@ export default Vue.extend({
|
|||||||
dropEvent({ dataTransfer }: any) {
|
dropEvent({ dataTransfer }: any) {
|
||||||
this.dragging = !this.dragging
|
this.dragging = !this.dragging
|
||||||
|
|
||||||
// TODO: Fix this
|
const folderPath = dataTransfer.getData("folderPath")
|
||||||
|
|
||||||
const oldCollectionIndex = dataTransfer.getData("oldCollectionIndex")
|
|
||||||
const oldFolderIndex = dataTransfer.getData("oldFolderIndex")
|
|
||||||
const oldFolderName = dataTransfer.getData("oldFolderName")
|
|
||||||
const requestIndex = dataTransfer.getData("requestIndex")
|
const requestIndex = dataTransfer.getData("requestIndex")
|
||||||
const flag = "graphql"
|
|
||||||
|
|
||||||
this.$store.commit("postwoman/moveRequest", {
|
moveGraphqlRequest(folderPath, requestIndex, `${this.collectionIndex}`)
|
||||||
oldCollectionIndex,
|
|
||||||
newCollectionIndex: this.$props.collectionIndex,
|
|
||||||
newFolderIndex: -1,
|
|
||||||
newFolderName: this.$props.collection.name,
|
|
||||||
oldFolderIndex,
|
|
||||||
oldFolderName,
|
|
||||||
requestIndex,
|
|
||||||
flag,
|
|
||||||
})
|
|
||||||
// this.syncCollections()
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -97,6 +97,7 @@
|
|||||||
:request="request"
|
:request="request"
|
||||||
:collection-index="collectionIndex"
|
:collection-index="collectionIndex"
|
||||||
:folder-index="folderIndex"
|
:folder-index="folderIndex"
|
||||||
|
:folder-path="folderPath"
|
||||||
:folder-name="folder.name"
|
:folder-name="folder.name"
|
||||||
:request-index="index"
|
:request-index="index"
|
||||||
:doc="doc"
|
:doc="doc"
|
||||||
@@ -132,7 +133,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from "vue"
|
import Vue from "vue"
|
||||||
import { removeGraphqlFolder } from "~/newstore/collections"
|
import { removeGraphqlFolder, moveGraphqlRequest } from "~/newstore/collections"
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
name: "Folder",
|
name: "Folder",
|
||||||
@@ -187,25 +188,10 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
dropEvent({ dataTransfer }: any) {
|
dropEvent({ dataTransfer }: any) {
|
||||||
this.dragging = !this.dragging
|
this.dragging = !this.dragging
|
||||||
const oldCollectionIndex = dataTransfer.getData("oldCollectionIndex")
|
const folderPath = dataTransfer.getData("folderPath")
|
||||||
const oldFolderIndex = dataTransfer.getData("oldFolderIndex")
|
|
||||||
const oldFolderName = dataTransfer.getData("oldFolderName")
|
|
||||||
const requestIndex = dataTransfer.getData("requestIndex")
|
const requestIndex = dataTransfer.getData("requestIndex")
|
||||||
const flag = "graphql"
|
|
||||||
|
|
||||||
// TODO: Discuss
|
moveGraphqlRequest(folderPath, requestIndex, this.folderPath)
|
||||||
|
|
||||||
this.$store.commit("postwoman/moveRequest", {
|
|
||||||
oldCollectionIndex,
|
|
||||||
newCollectionIndex: this.$props.collectionIndex,
|
|
||||||
newFolderIndex: this.$props.folderIndex,
|
|
||||||
newFolderName: this.$props.folder.name,
|
|
||||||
oldFolderIndex,
|
|
||||||
oldFolderName,
|
|
||||||
requestIndex,
|
|
||||||
flag,
|
|
||||||
})
|
|
||||||
// this.syncCollections()
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -117,11 +117,9 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
dragStart({ dataTransfer }: any) {
|
dragStart({ dataTransfer }: any) {
|
||||||
this.dragging = !this.dragging
|
this.dragging = !this.dragging
|
||||||
// TODO: Discuss
|
|
||||||
dataTransfer.setData("oldCollectionIndex", this.$props.collectionIndex)
|
dataTransfer.setData("folderPath", this.folderPath)
|
||||||
dataTransfer.setData("oldFolderIndex", this.$props.folderIndex)
|
dataTransfer.setData("requestIndex", this.requestIndex)
|
||||||
dataTransfer.setData("oldFolderName", this.$props.folderName)
|
|
||||||
dataTransfer.setData("requestIndex", this.$props.requestIndex)
|
|
||||||
},
|
},
|
||||||
removeRequest() {
|
removeRequest() {
|
||||||
removeGraphqlRequest(this.folderPath, this.requestIndex)
|
removeGraphqlRequest(this.folderPath, this.requestIndex)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ describe("debounce", () => {
|
|||||||
jest.runAllTimers()
|
jest.runAllTimers()
|
||||||
|
|
||||||
expect(fn).toHaveBeenCalled()
|
expect(fn).toHaveBeenCalled()
|
||||||
expect(setTimeout).toHaveBeenCalledWith(expect.any(Function), 100)
|
// expect(setTimeout).toHaveBeenCalledWith(expect.any(Function), 100)
|
||||||
})
|
})
|
||||||
|
|
||||||
test("calls the function only one time within the timeframe", () => {
|
test("calls the function only one time within the timeframe", () => {
|
||||||
|
|||||||
@@ -19,4 +19,5 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
testURL: "http://localhost/",
|
testURL: "http://localhost/",
|
||||||
preset: "ts-jest/presets/js-with-babel",
|
preset: "ts-jest/presets/js-with-babel",
|
||||||
|
testEnvironment: "jsdom",
|
||||||
}
|
}
|
||||||
|
|||||||
7796
package-lock.json
generated
7796
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
22
package.json
22
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "hoppscotch",
|
"name": "hoppscotch",
|
||||||
"version": "1.10.0",
|
"version": "1.12.0",
|
||||||
"description": "Open source API development ecosystem",
|
"description": "Open source API development ecosystem",
|
||||||
"author": "Hoppscotch (support@hoppscotch.io)",
|
"author": "Hoppscotch (support@hoppscotch.io)",
|
||||||
"private": true,
|
"private": true,
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apollo/client": "^3.3.19",
|
"@apollo/client": "^3.3.19",
|
||||||
"@nuxtjs/axios": "^5.13.4",
|
"@nuxtjs/axios": "^5.13.5",
|
||||||
"@nuxtjs/gtm": "^2.4.0",
|
"@nuxtjs/gtm": "^2.4.0",
|
||||||
"@nuxtjs/robots": "^2.5.0",
|
"@nuxtjs/robots": "^2.5.0",
|
||||||
"@nuxtjs/sitemap": "^2.4.0",
|
"@nuxtjs/sitemap": "^2.4.0",
|
||||||
@@ -33,9 +33,9 @@
|
|||||||
"acorn": "^8.2.4",
|
"acorn": "^8.2.4",
|
||||||
"acorn-walk": "^8.1.0",
|
"acorn-walk": "^8.1.0",
|
||||||
"esprima": "^4.0.1",
|
"esprima": "^4.0.1",
|
||||||
"firebase": "^8.6.2",
|
"firebase": "^8.6.3",
|
||||||
"graphql": "^15.5.0",
|
"graphql": "^15.5.0",
|
||||||
"graphql-language-service-interface": "^2.8.3",
|
"graphql-language-service-interface": "^2.8.4",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mustache": "^4.2.0",
|
"mustache": "^4.2.0",
|
||||||
"node-interval-tree": "^1.3.3",
|
"node-interval-tree": "^1.3.3",
|
||||||
@@ -56,12 +56,12 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.14.3",
|
"@babel/core": "^7.14.3",
|
||||||
"@babel/preset-env": "^7.14.2",
|
"@babel/preset-env": "^7.14.4",
|
||||||
"@nuxt/types": "^2.15.6",
|
"@nuxt/types": "^2.15.6",
|
||||||
"@nuxt/typescript-build": "^2.1.0",
|
"@nuxt/typescript-build": "^2.1.0",
|
||||||
"@nuxtjs/color-mode": "^2.0.8",
|
"@nuxtjs/color-mode": "^2.0.9",
|
||||||
"@nuxtjs/dotenv": "^1.4.1",
|
"@nuxtjs/dotenv": "^1.4.1",
|
||||||
"@nuxtjs/eslint-config-typescript": "^6.0.0",
|
"@nuxtjs/eslint-config-typescript": "^6.0.1",
|
||||||
"@nuxtjs/eslint-module": "^3.0.2",
|
"@nuxtjs/eslint-module": "^3.0.2",
|
||||||
"@nuxtjs/google-analytics": "^2.4.0",
|
"@nuxtjs/google-analytics": "^2.4.0",
|
||||||
"@nuxtjs/google-fonts": "^1.3.0",
|
"@nuxtjs/google-fonts": "^1.3.0",
|
||||||
@@ -72,14 +72,14 @@
|
|||||||
"@types/lodash": "^4.14.170",
|
"@types/lodash": "^4.14.170",
|
||||||
"@vue/test-utils": "^1.2.0",
|
"@vue/test-utils": "^1.2.0",
|
||||||
"babel-core": "^7.0.0-bridge.0",
|
"babel-core": "^7.0.0-bridge.0",
|
||||||
"babel-jest": "^26.6.3",
|
"babel-jest": "^27.0.2",
|
||||||
"eslint": "^7.27.0",
|
"eslint": "^7.27.0",
|
||||||
"eslint-config-prettier": "^8.1.0",
|
"eslint-config-prettier": "^8.1.0",
|
||||||
"eslint-plugin-nuxt": ">=2.0.0",
|
"eslint-plugin-nuxt": ">=2.0.0",
|
||||||
"eslint-plugin-prettier": "^3.3.1",
|
"eslint-plugin-prettier": "^3.3.1",
|
||||||
"eslint-plugin-vue": "^7.9.0",
|
"eslint-plugin-vue": "^7.10.0",
|
||||||
"husky": "^6.0.0",
|
"husky": "^6.0.0",
|
||||||
"jest": "^26.6.3",
|
"jest": "^27.0.3",
|
||||||
"jest-serializer-vue": "^2.0.2",
|
"jest-serializer-vue": "^2.0.2",
|
||||||
"lint-staged": "^11.0.0",
|
"lint-staged": "^11.0.0",
|
||||||
"postcss": "^8.3.0",
|
"postcss": "^8.3.0",
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
"stylelint": "^13.12.0",
|
"stylelint": "^13.12.0",
|
||||||
"stylelint-config-prettier": "^8.0.2",
|
"stylelint-config-prettier": "^8.0.2",
|
||||||
"stylelint-config-standard": "^22.0.0",
|
"stylelint-config-standard": "^22.0.0",
|
||||||
"ts-jest": "^26.5.6",
|
"ts-jest": "^27.0.1",
|
||||||
"vue-jest": "^3.0.7",
|
"vue-jest": "^3.0.7",
|
||||||
"worker-loader": "^3.0.8"
|
"worker-loader": "^3.0.8"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user