Fix types

This commit is contained in:
Gregory Schier
2024-09-22 11:09:18 -07:00
parent 1a4e6de1f4
commit 035d7927f9
21 changed files with 54 additions and 55 deletions

View File

@@ -8,7 +8,7 @@
"name": "exporter-curl",
"version": "0.0.1",
"dependencies": {
"@yaakapp/api": "^0.2.5"
"@yaakapp/api": "^0.2.7"
},
"devDependencies": {
"@types/node": "^20.14.9",
@@ -702,9 +702,9 @@
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.5.tgz",
"integrity": "sha512-UXD4Vvm4IVGNqKQuORnlbZ/RSOqA3AkkvaBqcipqGCodkx/4kM1602fBFfBZMdiouq0RyyQ65ByWvJWVre/adg==",
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.7.tgz",
"integrity": "sha512-vU9KtEwe5a+6VpDtV5+GSV+BpZETer/M9TtZ+oDZovvFMO0d55KqPfs7S6PuMru6e8Yxky8mO1TjL4Vsylh2Gg==",
"dependencies": {
"@types/node": "^22.5.4"
}

View File

@@ -6,7 +6,7 @@
"build": "yaakcli build ./src/index.js"
},
"dependencies": {
"@yaakapp/api": "^0.2.5"
"@yaakapp/api": "^0.2.7"
},
"devDependencies": {
"@types/node": "^20.14.9",

View File

@@ -8,7 +8,7 @@
"name": "filter-jsonpath",
"version": "0.0.1",
"dependencies": {
"@yaakapp/api": "^0.2.5",
"@yaakapp/api": "^0.2.7",
"jsonpath-plus": "^9.0.0"
},
"devDependencies": {
@@ -49,9 +49,9 @@
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.5.tgz",
"integrity": "sha512-UXD4Vvm4IVGNqKQuORnlbZ/RSOqA3AkkvaBqcipqGCodkx/4kM1602fBFfBZMdiouq0RyyQ65ByWvJWVre/adg==",
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.7.tgz",
"integrity": "sha512-vU9KtEwe5a+6VpDtV5+GSV+BpZETer/M9TtZ+oDZovvFMO0d55KqPfs7S6PuMru6e8Yxky8mO1TjL4Vsylh2Gg==",
"dependencies": {
"@types/node": "^22.5.4"
}

View File

@@ -7,7 +7,7 @@
},
"dependencies": {
"jsonpath-plus": "^9.0.0",
"@yaakapp/api": "^0.2.5"
"@yaakapp/api": "^0.2.7"
},
"devDependencies": {
"@yaakapp/cli": "^0.0.42",

View File

@@ -9,7 +9,7 @@
"version": "0.0.1",
"dependencies": {
"@xmldom/xmldom": "^0.8.10",
"@yaakapp/api": "^0.2.5",
"@yaakapp/api": "^0.2.7",
"xpath": "^0.0.34"
},
"devDependencies": {
@@ -36,9 +36,9 @@
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.5.tgz",
"integrity": "sha512-UXD4Vvm4IVGNqKQuORnlbZ/RSOqA3AkkvaBqcipqGCodkx/4kM1602fBFfBZMdiouq0RyyQ65ByWvJWVre/adg==",
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.7.tgz",
"integrity": "sha512-vU9KtEwe5a+6VpDtV5+GSV+BpZETer/M9TtZ+oDZovvFMO0d55KqPfs7S6PuMru6e8Yxky8mO1TjL4Vsylh2Gg==",
"dependencies": {
"@types/node": "^22.5.4"
}

View File

@@ -6,7 +6,7 @@
"build": "yaakcli build ./src/index.js"
},
"dependencies": {
"@yaakapp/api": "^0.2.5",
"@yaakapp/api": "^0.2.7",
"@xmldom/xmldom": "^0.8.10",
"xpath": "^0.0.34"
},

View File

@@ -8,7 +8,7 @@
"name": "importer-curl",
"version": "0.0.1",
"dependencies": {
"@yaakapp/api": "^0.2.5",
"@yaakapp/api": "^0.2.7",
"shell-quote": "^1.8.1"
},
"devDependencies": {
@@ -710,9 +710,9 @@
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.5.tgz",
"integrity": "sha512-UXD4Vvm4IVGNqKQuORnlbZ/RSOqA3AkkvaBqcipqGCodkx/4kM1602fBFfBZMdiouq0RyyQ65ByWvJWVre/adg==",
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.7.tgz",
"integrity": "sha512-vU9KtEwe5a+6VpDtV5+GSV+BpZETer/M9TtZ+oDZovvFMO0d55KqPfs7S6PuMru6e8Yxky8mO1TjL4Vsylh2Gg==",
"dependencies": {
"@types/node": "^22.5.4"
}

View File

@@ -6,7 +6,7 @@
"build": "yaakcli build ./src/index.js"
},
"dependencies": {
"@yaakapp/api": "^0.2.5",
"@yaakapp/api": "^0.2.7",
"shell-quote": "^1.8.1"
},
"devDependencies": {

View File

@@ -1,4 +1,4 @@
import { Environment, Folder, HttpRequest, HttpUrlParameter, Model, Workspace, Context } from '@yaakapp/api';
import { Context, Environment, Folder, HttpRequest, HttpUrlParameter, Workspace } from '@yaakapp/api';
import { ControlOperator, parse, ParseEntry } from 'shell-quote';
type AtLeast<T, K extends keyof T> = Partial<T> & Pick<T, K>;
@@ -405,9 +405,9 @@ function splitOnce(str: string, sep: string): string[] {
return [str];
}
const idCount: Partial<Record<Model['model'], number>> = {};
const idCount: Partial<Record<string, number>> = {};
function generateId(model: Model['model']): string {
function generateId(model: string): string {
idCount[model] = (idCount[model] ?? -1) + 1;
return `GENERATE_ID::${model.toUpperCase()}_${idCount[model]}`;
}

View File

@@ -1,4 +1,4 @@
import { Context, HttpRequest, Model, Workspace } from '@yaakapp/api';
import { Context, HttpRequest, Workspace } from '@yaakapp/api';
import { describe, expect, test } from 'vitest';
import { pluginHookImport } from '../src';
@@ -307,7 +307,7 @@ describe('importer-curl', () => {
});
});
const idCount: Partial<Record<Model['model'], number>> = {};
const idCount: Partial<Record<string, number>> = {};
function baseRequest(mergeWith: Partial<HttpRequest>) {
idCount.http_request = (idCount.http_request ?? -1) + 1;

View File

@@ -8,7 +8,7 @@
"name": "importer-insomnia",
"version": "0.0.1",
"dependencies": {
"@yaakapp/api": "^0.2.5",
"@yaakapp/api": "^0.2.7",
"yaml": "^2.4.2"
},
"devDependencies": {
@@ -27,9 +27,9 @@
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.5.tgz",
"integrity": "sha512-UXD4Vvm4IVGNqKQuORnlbZ/RSOqA3AkkvaBqcipqGCodkx/4kM1602fBFfBZMdiouq0RyyQ65ByWvJWVre/adg==",
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.7.tgz",
"integrity": "sha512-vU9KtEwe5a+6VpDtV5+GSV+BpZETer/M9TtZ+oDZovvFMO0d55KqPfs7S6PuMru6e8Yxky8mO1TjL4Vsylh2Gg==",
"dependencies": {
"@types/node": "^22.5.4"
}

View File

@@ -6,7 +6,7 @@
"build": "yaakcli build ./src/index.js"
},
"dependencies": {
"@yaakapp/api": "^0.2.5",
"@yaakapp/api": "^0.2.7",
"yaml": "^2.4.2"
},
"devDependencies": {

View File

@@ -8,7 +8,7 @@
"name": "importer-openapi",
"version": "0.0.1",
"dependencies": {
"@yaakapp/api": "^0.2.5",
"@yaakapp/api": "^0.2.7",
"openapi-to-postmanv2": "^4.23.1",
"yaml": "^2.4.2"
},
@@ -57,9 +57,9 @@
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.5.tgz",
"integrity": "sha512-UXD4Vvm4IVGNqKQuORnlbZ/RSOqA3AkkvaBqcipqGCodkx/4kM1602fBFfBZMdiouq0RyyQ65ByWvJWVre/adg==",
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.7.tgz",
"integrity": "sha512-vU9KtEwe5a+6VpDtV5+GSV+BpZETer/M9TtZ+oDZovvFMO0d55KqPfs7S6PuMru6e8Yxky8mO1TjL4Vsylh2Gg==",
"dependencies": {
"@types/node": "^22.5.4"
}

View File

@@ -6,7 +6,7 @@
"build": "yaakcli build ./src/index.js"
},
"dependencies": {
"@yaakapp/api": "^0.2.5",
"@yaakapp/api": "^0.2.7",
"openapi-to-postmanv2": "^4.23.1",
"yaml": "^2.4.2"
},

View File

@@ -8,7 +8,7 @@
"name": "importer-postman",
"version": "0.0.1",
"dependencies": {
"@yaakapp/api": "^0.2.5"
"@yaakapp/api": "^0.2.7"
},
"devDependencies": {
"@types/node": "^20.14.9",
@@ -664,9 +664,9 @@
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.5.tgz",
"integrity": "sha512-UXD4Vvm4IVGNqKQuORnlbZ/RSOqA3AkkvaBqcipqGCodkx/4kM1602fBFfBZMdiouq0RyyQ65ByWvJWVre/adg==",
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.7.tgz",
"integrity": "sha512-vU9KtEwe5a+6VpDtV5+GSV+BpZETer/M9TtZ+oDZovvFMO0d55KqPfs7S6PuMru6e8Yxky8mO1TjL4Vsylh2Gg==",
"dependencies": {
"@types/node": "^22.5.4"
}

View File

@@ -7,7 +7,7 @@
"build": "yaakcli build ./src/index.js"
},
"dependencies": {
"@yaakapp/api": "^0.2.5"
"@yaakapp/api": "^0.2.7"
},
"devDependencies": {
"@yaakapp/cli": "^0.0.42",

View File

@@ -1,12 +1,11 @@
import {
Context,
Environment,
Folder,
HttpRequest,
HttpRequestHeader,
Model,
Workspace,
Context,
HttpUrlParameter,
Workspace,
} from '@yaakapp/api';
const POSTMAN_2_1_0_SCHEMA = 'https://schema.getpostman.com/json/collection/v2.1.0/collection.json';
@@ -327,9 +326,9 @@ function convertTemplateSyntax<T>(obj: T): T {
}
}
const idCount: Partial<Record<Model['model'], number>> = {};
const idCount: Partial<Record<string, number>> = {};
function generateId(model: Model['model']): string {
function generateId(model: string): string {
idCount[model] = (idCount[model] ?? -1) + 1;
return `GENERATE_ID::${model.toUpperCase()}_${idCount[model]}`;
}

View File

@@ -8,7 +8,7 @@
"name": "importer-yaak",
"version": "0.0.1",
"dependencies": {
"@yaakapp/api": "^0.2.5"
"@yaakapp/api": "^0.2.7"
},
"devDependencies": {
"@types/node": "^20.14.9",
@@ -395,9 +395,9 @@
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.5.tgz",
"integrity": "sha512-UXD4Vvm4IVGNqKQuORnlbZ/RSOqA3AkkvaBqcipqGCodkx/4kM1602fBFfBZMdiouq0RyyQ65ByWvJWVre/adg==",
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.7.tgz",
"integrity": "sha512-vU9KtEwe5a+6VpDtV5+GSV+BpZETer/M9TtZ+oDZovvFMO0d55KqPfs7S6PuMru6e8Yxky8mO1TjL4Vsylh2Gg==",
"dependencies": {
"@types/node": "^22.5.4"
}

View File

@@ -6,7 +6,7 @@
"build": "yaakcli build ./src/index.js"
},
"dependencies": {
"@yaakapp/api": "^0.2.5"
"@yaakapp/api": "^0.2.7"
},
"devDependencies": {
"@yaakapp/cli": "^0.0.42",

View File

@@ -9,7 +9,7 @@
"version": "0.0.1",
"dependencies": {
"@xmldom/xmldom": "^0.8.10",
"@yaakapp/api": "^0.2.5",
"@yaakapp/api": "^0.2.7",
"jsonpath-plus": "^9.0.0",
"xpath": "^0.0.34"
},
@@ -742,9 +742,9 @@
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.5.tgz",
"integrity": "sha512-UXD4Vvm4IVGNqKQuORnlbZ/RSOqA3AkkvaBqcipqGCodkx/4kM1602fBFfBZMdiouq0RyyQ65ByWvJWVre/adg==",
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.7.tgz",
"integrity": "sha512-vU9KtEwe5a+6VpDtV5+GSV+BpZETer/M9TtZ+oDZovvFMO0d55KqPfs7S6PuMru6e8Yxky8mO1TjL4Vsylh2Gg==",
"dependencies": {
"@types/node": "^22.5.4"
}

View File

@@ -6,7 +6,7 @@
"build": "yaakcli build ./src/index.ts"
},
"dependencies": {
"@yaakapp/api": "^0.2.5",
"@yaakapp/api": "^0.2.7",
"jsonpath-plus": "^9.0.0",
"xpath": "^0.0.34",
"@xmldom/xmldom": "^0.8.10"