Template response plugin

This commit is contained in:
Gregory Schier
2024-08-19 19:11:36 -07:00
parent 54efb6ae4e
commit d1871b19ee
30 changed files with 2272 additions and 329 deletions

View File

@@ -8,7 +8,7 @@
"name": "importer-insomnia",
"version": "0.0.1",
"dependencies": {
"@yaakapp/api": "^0.1.6",
"@yaakapp/api": "^0.1.9",
"yaml": "^2.4.2"
},
"devDependencies": {
@@ -26,9 +26,9 @@
}
},
"node_modules/@yaakapp/api": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.1.6.tgz",
"integrity": "sha512-5lYXKcOVmLzVUrkfU4JOCbz+CBV5Dm/cALoZvfbelvZWOVu3sTrBxS9cbNVQQq2B6WwLInSevk7pMq58GqIj5Q==",
"version": "0.1.9",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.1.9.tgz",
"integrity": "sha512-5mgBoNplXUnNIUpLgGPCjcf6p/BcsU485cH3/MnIzcXIaMfFpZVVwHq5vf9cm+NDcr5hwYmPyIbwmBf9uVoV2Q==",
"dependencies": {
"@types/node": "^22.0.0"
}

View File

@@ -1,11 +1,12 @@
{
"name": "importer-insomnia",
"private": true,
"version": "0.0.1",
"scripts": {
"build": "yaakcli ./src/index.js"
},
"dependencies": {
"@yaakapp/api": "^0.1.6",
"@yaakapp/api": "^0.1.9",
"yaml": "^2.4.2"
},
"devDependencies": {

View File

@@ -1,4 +1,4 @@
import { Environment, Folder, GrpcRequest, HttpRequest, Workspace, YaakContext } from '@yaakapp/api';
import { Environment, Folder, GrpcRequest, HttpRequest, Workspace, Context } from '@yaakapp/api';
import YAML from 'yaml';
type AtLeast<T, K extends keyof T> = Partial<T> & Pick<T, K>;
@@ -11,7 +11,7 @@ export interface ExportResources {
folders: AtLeast<Folder, 'name' | 'id' | 'model' | 'workspaceId'>[];
}
export function pluginHookImport(ctx: YaakContext, contents: string) {
export function pluginHookImport(ctx: Context, contents: string) {
let parsed: any;
try {