myCollections.ts (hoppscotch-2.2.1) | : | myCollections.ts (hoppscotch-3.0.0) | ||
---|---|---|---|---|
import IconUser from "~icons/lucide/user" | ||||
import * as TE from "fp-ts/TaskEither" | import * as TE from "fp-ts/TaskEither" | |||
import * as A from "fp-ts/Array" | import * as A from "fp-ts/Array" | |||
import { pipe } from "fp-ts/function" | import { pipe } from "fp-ts/function" | |||
import { step } from "../steps" | import { step } from "../steps" | |||
import { defineImporter } from "." | import { defineImporter } from "." | |||
import { getRESTCollection } from "~/newstore/collections" | import { getRESTCollection } from "~/newstore/collections" | |||
export default defineImporter({ | export default defineImporter({ | |||
id: "myCollections", | ||||
name: "import.from_my_collections", | name: "import.from_my_collections", | |||
icon: "user", | icon: IconUser, | |||
applicableTo: ["team-collections"], | applicableTo: ["team-collections"], | |||
steps: [ | steps: [ | |||
step({ | step({ | |||
stepName: "TARGET_MY_COLLECTION", | stepName: "TARGET_MY_COLLECTION", | |||
metadata: { | metadata: { | |||
caption: "import.from_my_collections_description", | caption: "import.from_my_collections_description", | |||
}, | }, | |||
}), | }), | |||
] as const, | ] as const, | |||
importer: ([content]) => pipe(content, getRESTCollection, A.of, TE.of), | importer: ([content]) => pipe(content, getRESTCollection, A.of, TE.of), | |||
End of changes. 3 change blocks. | ||||
1 lines changed or deleted | 3 lines changed or added |