Merge remote-tracking branch 'origin/main'

This commit is contained in:
Gregory Schier
2024-10-08 14:49:37 -07:00
29 changed files with 412 additions and 7160 deletions

View File

@@ -12,6 +12,9 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Install @yaakapp/cli
run: npm install -g @yaakapp/cli
- name: Install Dependencies
run: npm install

156
package-lock.json generated
View File

@@ -9,7 +9,7 @@
"plugins/*"
],
"dependencies": {
"@yaakapp/api": "^0.2.9"
"@yaakapp/api": "^0.2.15"
},
"devDependencies": {
"@types/node": "^22.7.4",
@@ -885,6 +885,33 @@
"dev": true,
"license": "MIT"
},
"node_modules/@types/openapi-to-postmanv2": {
"version": "3.2.4",
"resolved": "https://registry.npmjs.org/@types/openapi-to-postmanv2/-/openapi-to-postmanv2-3.2.4.tgz",
"integrity": "sha512-5SMU3TY2gmQRs6Ri7WRlI7tF2QEK0K4GfL50ghAPOUv4NkxhG37Aq2qystytm9fcmUgHDfyrkwZyprRgp85mxg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/postman-collection": "*"
}
},
"node_modules/@types/postman-collection": {
"version": "3.5.10",
"resolved": "https://registry.npmjs.org/@types/postman-collection/-/postman-collection-3.5.10.tgz",
"integrity": "sha512-l8xAUZNW9MzKWyeWuPgQlnyvpX8beeLqXYZTixr55Figae8/0gFb5l5GcU1y+3yeDmbXdY57cGxdvu+4OGbMdg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@types/node": "*"
}
},
"node_modules/@types/shell-quote": {
"version": "1.7.5",
"resolved": "https://registry.npmjs.org/@types/shell-quote/-/shell-quote-1.7.5.tgz",
"integrity": "sha512-+UE8GAGRPbJVQDdxi16dgadcBfQ+KG2vgZhV1+3A1XmHbmwcdwhCUwIdy+d3pAGrbvgRoVSjeI9vOWyq376Yzw==",
"dev": true,
"license": "MIT"
},
"node_modules/@vitest/expect": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.4.tgz",
@@ -976,13 +1003,61 @@
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.9",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.9.tgz",
"integrity": "sha512-0l6kfLWDqf0eKFeGE/8xKtqDNH/30YUPL9QW4ZvIB+daVqfhrJ/5V0JMR+g1atU+EXBe2E/WViaQmcK5lgBOng==",
"version": "0.2.15",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.15.tgz",
"integrity": "sha512-SW5S3Ca00Qo8Z/IhzCWrSQU0CZHHHCZwuDZtJkjTbfVL5Lv0DAaZsORNEIaeHyuqeQU9xRoi+Wr/WHoA3bG6+A==",
"dependencies": {
"@types/node": "^22.5.4"
}
},
"node_modules/@yaakapp/exporter-curl": {
"resolved": "plugins/exporter-curl",
"link": true
},
"node_modules/@yaakapp/filter-jsonpath": {
"resolved": "plugins/filter-jsonpath",
"link": true
},
"node_modules/@yaakapp/filter-xpath": {
"resolved": "plugins/filter-xpath",
"link": true
},
"node_modules/@yaakapp/importer-curl": {
"resolved": "plugins/importer-curl",
"link": true
},
"node_modules/@yaakapp/importer-insomnia": {
"resolved": "plugins/importer-insomnia",
"link": true
},
"node_modules/@yaakapp/importer-openapi": {
"resolved": "plugins/importer-openapi",
"link": true
},
"node_modules/@yaakapp/importer-postman": {
"resolved": "plugins/importer-postman",
"link": true
},
"node_modules/@yaakapp/importer-yaak": {
"resolved": "plugins/importer-yaak",
"link": true
},
"node_modules/@yaakapp/template-function-file": {
"resolved": "plugins/template-function-file",
"link": true
},
"node_modules/@yaakapp/template-function-hash": {
"resolved": "plugins/template-function-hash",
"link": true
},
"node_modules/@yaakapp/template-function-prompt": {
"resolved": "plugins/template-function-prompt",
"link": true
},
"node_modules/@yaakapp/template-function-request": {
"resolved": "plugins/template-function-request",
"link": true
},
"node_modules/aggregate-error": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
@@ -2237,10 +2312,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/exporter-curl": {
"resolved": "plugins/exporter-curl",
"link": true
},
"node_modules/extend-shallow": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
@@ -2508,14 +2579,6 @@
"node": ">=8"
}
},
"node_modules/filter-jsonpath": {
"resolved": "plugins/filter-jsonpath",
"link": true
},
"node_modules/filter-xpath": {
"resolved": "plugins/filter-xpath",
"link": true
},
"node_modules/find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
@@ -3069,26 +3132,6 @@
"node": ">= 4"
}
},
"node_modules/importer-curl": {
"resolved": "plugins/importer-curl",
"link": true
},
"node_modules/importer-insomnia": {
"resolved": "plugins/importer-insomnia",
"link": true
},
"node_modules/importer-openapi": {
"resolved": "plugins/importer-openapi",
"link": true
},
"node_modules/importer-postman": {
"resolved": "plugins/importer-postman",
"link": true
},
"node_modules/importer-yaak": {
"resolved": "plugins/importer-yaak",
"link": true
},
"node_modules/indent-string": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
@@ -5771,10 +5814,6 @@
"array-includes": "^3.0.3"
}
},
"node_modules/template-function-request": {
"resolved": "plugins/template-function-request",
"link": true
},
"node_modules/template-function-response": {
"resolved": "plugins/template-function-response",
"link": true
@@ -6604,9 +6643,11 @@
}
},
"plugins/exporter-curl": {
"name": "@yaakapp/exporter-curl",
"version": "0.0.1"
},
"plugins/filter-jsonpath": {
"name": "@yaakapp/filter-jsonpath",
"version": "0.0.1",
"dependencies": {
"jsonpath-plus": "^9.0.0"
@@ -6616,6 +6657,7 @@
}
},
"plugins/filter-xpath": {
"name": "@yaakapp/filter-xpath",
"version": "0.0.1",
"dependencies": {
"@xmldom/xmldom": "^0.8.10",
@@ -6623,40 +6665,56 @@
}
},
"plugins/importer-curl": {
"name": "@yaakapp/importer-curl",
"version": "0.0.1",
"dependencies": {
"shell-quote": "^1.8.1"
},
"devDependencies": {
"@types/shell-quote": "^1.7.5"
}
},
"plugins/importer-insomnia": {
"name": "@yaakapp/importer-insomnia",
"version": "0.0.1",
"dependencies": {
"yaml": "^2.4.2"
}
},
"plugins/importer-openapi": {
"name": "@yaakapp/importer-openapi",
"version": "0.0.1",
"dependencies": {
"openapi-to-postmanv2": "^4.23.1",
"yaml": "^2.4.2"
},
"devDependencies": {
"@types/openapi-to-postmanv2": "^3.2.4"
}
},
"plugins/importer-postman": {
"name": "@yaakapp/importer-postman",
"version": "0.0.1"
},
"plugins/importer-yaak": {
"name": "@yaakapp/importer-yaak",
"version": "0.0.1"
},
"plugins/template-function-file": {
"name": "@yaakapp/template-function-file",
"version": "0.0.1"
},
"plugins/template-function-hash": {
"name": "@yaakapp/template-function-hash",
"version": "0.0.1"
},
"plugins/template-function-prompt": {
"name": "@yaakapp/template-function-prompt",
"version": "0.0.1"
},
"plugins/template-function-request": {
"version": "0.0.1",
"dependencies": {
"@xmldom/xmldom": "^0.8.10",
"jsonpath-plus": "^9.0.0",
"xpath": "^0.0.34"
},
"devDependencies": {
"@types/jsonpath": "^0.2.4"
}
"name": "@yaakapp/template-function-request",
"version": "0.0.1"
},
"plugins/template-function-response": {
"version": "0.0.1",

View File

@@ -19,6 +19,6 @@
"workspaces-run": "^1.0.2"
},
"dependencies": {
"@yaakapp/api": "^0.2.9"
"@yaakapp/api": "^0.2.15"
}
}

View File

@@ -1,5 +1,5 @@
{
"name": "exporter-curl",
"name": "@yaakapp/exporter-curl",
"private": true,
"version": "0.0.1",
"scripts": {

View File

@@ -1,175 +0,0 @@
{
"name": "filter-jsonpath",
"version": "0.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "filter-jsonpath",
"version": "0.0.1",
"dependencies": {
"@yaakapp/api": "^0.2.9",
"jsonpath-plus": "^9.0.0"
},
"devDependencies": {
"@types/node": "^20.14.9",
"@yaakapp/cli": "^0.0.42",
"typescript": "^5.5.2"
}
},
"node_modules/@jsep-plugin/assignment": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@jsep-plugin/assignment/-/assignment-1.2.1.tgz",
"integrity": "sha512-gaHqbubTi29aZpVbBlECRpmdia+L5/lh2BwtIJTmtxdbecEyyX/ejAOg7eQDGNvGOUmPY7Z2Yxdy9ioyH/VJeA==",
"engines": {
"node": ">= 10.16.0"
},
"peerDependencies": {
"jsep": "^0.4.0||^1.0.0"
}
},
"node_modules/@jsep-plugin/regex": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/@jsep-plugin/regex/-/regex-1.0.3.tgz",
"integrity": "sha512-XfZgry4DwEZvSFtS/6Y+R48D7qJYJK6R9/yJFyUFHCIUMEEHuJ4X95TDgJp5QkmzfLYvapMPzskV5HpIDrREug==",
"engines": {
"node": ">= 10.16.0"
},
"peerDependencies": {
"jsep": "^0.4.0||^1.0.0"
}
},
"node_modules/@types/node": {
"version": "20.14.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.9.tgz",
"integrity": "sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.8.tgz",
"integrity": "sha512-m+6xHIH/X8uTP65oeaSGmz90UOhl7sW5E2rNKix5MEKSFg0BzBupXMjBIT6EXtrxcCvUdOPtSP3ARriWsiZixQ==",
"dependencies": {
"@types/node": "^22.5.4"
}
},
"node_modules/@yaakapp/api/node_modules/@types/node": {
"version": "22.5.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz",
"integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==",
"license": "MIT",
"dependencies": {
"undici-types": "~6.19.2"
}
},
"node_modules/@yaakapp/api/node_modules/undici-types": {
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"license": "MIT"
},
"node_modules/@yaakapp/cli": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli/-/cli-0.0.42.tgz",
"integrity": "sha512-HFkg49sksZNQQpnOgZGfyh8pmHbxtkgSNCeEMlaSFezq42YZPHxOPlqTEGxk3JqX6Asz0YO2xJDfUADQCyKNYA==",
"dev": true,
"hasInstallScript": true,
"bin": {
"yaakcli": "bin/cli.js"
},
"optionalDependencies": {
"@yaakapp/cli-darwin-arm64": "0.0.42",
"@yaakapp/cli-darwin-x64": "0.0.42",
"@yaakapp/cli-linux-x64": "0.0.42",
"@yaakapp/cli-win32-x64": "0.0.42"
}
},
"node_modules/@yaakapp/cli-darwin-arm64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-darwin-arm64/-/cli-darwin-arm64-0.0.42.tgz",
"integrity": "sha512-l8+N/9jwvAYlMQBPfGzNkVoQsYeBtwM3/7ix5b6mT+3zcwrNIDW9HQTEZ2ZTNdo1H548U1F6ppvhAyOdOtIyLg==",
"dev": true,
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@yaakapp/cli-darwin-x64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-darwin-x64/-/cli-darwin-x64-0.0.42.tgz",
"integrity": "sha512-grm9UOVCNIpHO3XsEzvvoic43cYCxmuvrUFP/8MZLQgZeQ5L6EBTAlCTtXD2hUGW60+kNNwcgPrDVVrP7Wn2YQ==",
"dev": true,
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@yaakapp/cli-linux-x64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-linux-x64/-/cli-linux-x64-0.0.42.tgz",
"integrity": "sha512-O4ly25zR0BVIN0KxUcc7hmmcdNiRq4tQACuYNMIQ2ppFJYCguSMmGFdeJuyCfvcC/SwJIK6/Kzkr8EAmaTjDOA==",
"dev": true,
"optional": true,
"os": [
"linux"
]
},
"node_modules/@yaakapp/cli-win32-x64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-win32-x64/-/cli-win32-x64-0.0.42.tgz",
"integrity": "sha512-40BTVcOBIP8VYwD1wfrr6tXG6NQuGz+XDA/ean4AWQWHi1P7BWHC9/uqHlMTLhFvbjcHjtwAl7bzVrXr37E0YQ==",
"dev": true,
"optional": true,
"os": [
"win32"
]
},
"node_modules/jsep": {
"version": "1.3.9",
"resolved": "https://registry.npmjs.org/jsep/-/jsep-1.3.9.tgz",
"integrity": "sha512-i1rBX5N7VPl0eYb6+mHNp52sEuaS2Wi8CDYx1X5sn9naevL78+265XJqy1qENEk7mRKwS06NHpUqiBwR7qeodw==",
"engines": {
"node": ">= 10.16.0"
}
},
"node_modules/jsonpath-plus": {
"version": "9.0.0",
"resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-9.0.0.tgz",
"integrity": "sha512-bqE77VIDStrOTV/czspZhTn+o27Xx9ZJRGVkdVShEtPoqsIx5yALv3lWVU6y+PqYvWPJNWE7ORCQheQkEe0DDA==",
"dependencies": {
"@jsep-plugin/assignment": "^1.2.1",
"@jsep-plugin/regex": "^1.0.3",
"jsep": "^1.3.8"
},
"bin": {
"jsonpath": "bin/jsonpath-cli.js",
"jsonpath-plus": "bin/jsonpath-cli.js"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/typescript": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
"integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
}
}
}

View File

@@ -1,5 +1,5 @@
{
"name": "filter-jsonpath",
"name": "@yaakapp/filter-jsonpath",
"private": true,
"version": "0.0.1",
"scripts": {

View File

@@ -1,145 +0,0 @@
{
"name": "filter-xpath",
"version": "0.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "filter-xpath",
"version": "0.0.1",
"dependencies": {
"@xmldom/xmldom": "^0.8.10",
"@yaakapp/api": "^0.2.9",
"xpath": "^0.0.34"
},
"devDependencies": {
"@types/node": "^20.14.9",
"@yaakapp/cli": "^0.0.42",
"typescript": "^5.5.2"
}
},
"node_modules/@types/node": {
"version": "20.14.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.9.tgz",
"integrity": "sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/@xmldom/xmldom": {
"version": "0.8.10",
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz",
"integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==",
"engines": {
"node": ">=10.0.0"
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.8.tgz",
"integrity": "sha512-m+6xHIH/X8uTP65oeaSGmz90UOhl7sW5E2rNKix5MEKSFg0BzBupXMjBIT6EXtrxcCvUdOPtSP3ARriWsiZixQ==",
"dependencies": {
"@types/node": "^22.5.4"
}
},
"node_modules/@yaakapp/api/node_modules/@types/node": {
"version": "22.5.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz",
"integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==",
"license": "MIT",
"dependencies": {
"undici-types": "~6.19.2"
}
},
"node_modules/@yaakapp/api/node_modules/undici-types": {
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"license": "MIT"
},
"node_modules/@yaakapp/cli": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli/-/cli-0.0.42.tgz",
"integrity": "sha512-HFkg49sksZNQQpnOgZGfyh8pmHbxtkgSNCeEMlaSFezq42YZPHxOPlqTEGxk3JqX6Asz0YO2xJDfUADQCyKNYA==",
"dev": true,
"hasInstallScript": true,
"bin": {
"yaakcli": "bin/cli.js"
},
"optionalDependencies": {
"@yaakapp/cli-darwin-arm64": "0.0.42",
"@yaakapp/cli-darwin-x64": "0.0.42",
"@yaakapp/cli-linux-x64": "0.0.42",
"@yaakapp/cli-win32-x64": "0.0.42"
}
},
"node_modules/@yaakapp/cli-darwin-arm64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-darwin-arm64/-/cli-darwin-arm64-0.0.42.tgz",
"integrity": "sha512-l8+N/9jwvAYlMQBPfGzNkVoQsYeBtwM3/7ix5b6mT+3zcwrNIDW9HQTEZ2ZTNdo1H548U1F6ppvhAyOdOtIyLg==",
"dev": true,
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@yaakapp/cli-darwin-x64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-darwin-x64/-/cli-darwin-x64-0.0.42.tgz",
"integrity": "sha512-grm9UOVCNIpHO3XsEzvvoic43cYCxmuvrUFP/8MZLQgZeQ5L6EBTAlCTtXD2hUGW60+kNNwcgPrDVVrP7Wn2YQ==",
"dev": true,
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@yaakapp/cli-linux-x64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-linux-x64/-/cli-linux-x64-0.0.42.tgz",
"integrity": "sha512-O4ly25zR0BVIN0KxUcc7hmmcdNiRq4tQACuYNMIQ2ppFJYCguSMmGFdeJuyCfvcC/SwJIK6/Kzkr8EAmaTjDOA==",
"dev": true,
"optional": true,
"os": [
"linux"
]
},
"node_modules/@yaakapp/cli-win32-x64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-win32-x64/-/cli-win32-x64-0.0.42.tgz",
"integrity": "sha512-40BTVcOBIP8VYwD1wfrr6tXG6NQuGz+XDA/ean4AWQWHi1P7BWHC9/uqHlMTLhFvbjcHjtwAl7bzVrXr37E0YQ==",
"dev": true,
"optional": true,
"os": [
"win32"
]
},
"node_modules/typescript": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
"integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
},
"node_modules/xpath": {
"version": "0.0.34",
"resolved": "https://registry.npmjs.org/xpath/-/xpath-0.0.34.tgz",
"integrity": "sha512-FxF6+rkr1rNSQrhUNYrAFJpRXNzlDoMxeXN5qI84939ylEv3qqPFKa85Oxr6tDaJKqwW6KKyo2v26TSv3k6LeA==",
"engines": {
"node": ">=0.6.0"
}
}
}
}

View File

@@ -1,5 +1,5 @@
{
"name": "filter-xpath",
"name": "@yaakapp/filter-xpath",
"private": true,
"version": "0.0.1",
"scripts": {

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
{
"name": "importer-curl",
"name": "@yaakapp/importer-curl",
"private": true,
"version": "0.0.1",
"scripts": {
@@ -8,5 +8,8 @@
},
"dependencies": {
"shell-quote": "^1.8.1"
},
"devDependencies": {
"@types/shell-quote": "^1.7.5"
}
}

View File

@@ -1,139 +0,0 @@
{
"name": "importer-insomnia",
"version": "0.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "importer-insomnia",
"version": "0.0.1",
"dependencies": {
"@yaakapp/api": "^0.2.9",
"yaml": "^2.4.2"
},
"devDependencies": {
"@types/node": "^20.14.9",
"@yaakapp/cli": "^0.0.42",
"typescript": "^5.5.2"
}
},
"node_modules/@types/node": {
"version": "20.14.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.9.tgz",
"integrity": "sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/@yaakapp/api": {
"version": "0.2.8",
"resolved": "https://registry.npmjs.org/@yaakapp/api/-/api-0.2.8.tgz",
"integrity": "sha512-m+6xHIH/X8uTP65oeaSGmz90UOhl7sW5E2rNKix5MEKSFg0BzBupXMjBIT6EXtrxcCvUdOPtSP3ARriWsiZixQ==",
"dependencies": {
"@types/node": "^22.5.4"
}
},
"node_modules/@yaakapp/api/node_modules/@types/node": {
"version": "22.5.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz",
"integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==",
"license": "MIT",
"dependencies": {
"undici-types": "~6.19.2"
}
},
"node_modules/@yaakapp/api/node_modules/undici-types": {
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"license": "MIT"
},
"node_modules/@yaakapp/cli": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli/-/cli-0.0.42.tgz",
"integrity": "sha512-HFkg49sksZNQQpnOgZGfyh8pmHbxtkgSNCeEMlaSFezq42YZPHxOPlqTEGxk3JqX6Asz0YO2xJDfUADQCyKNYA==",
"dev": true,
"hasInstallScript": true,
"bin": {
"yaakcli": "bin/cli.js"
},
"optionalDependencies": {
"@yaakapp/cli-darwin-arm64": "0.0.42",
"@yaakapp/cli-darwin-x64": "0.0.42",
"@yaakapp/cli-linux-x64": "0.0.42",
"@yaakapp/cli-win32-x64": "0.0.42"
}
},
"node_modules/@yaakapp/cli-darwin-arm64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-darwin-arm64/-/cli-darwin-arm64-0.0.42.tgz",
"integrity": "sha512-l8+N/9jwvAYlMQBPfGzNkVoQsYeBtwM3/7ix5b6mT+3zcwrNIDW9HQTEZ2ZTNdo1H548U1F6ppvhAyOdOtIyLg==",
"dev": true,
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@yaakapp/cli-darwin-x64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-darwin-x64/-/cli-darwin-x64-0.0.42.tgz",
"integrity": "sha512-grm9UOVCNIpHO3XsEzvvoic43cYCxmuvrUFP/8MZLQgZeQ5L6EBTAlCTtXD2hUGW60+kNNwcgPrDVVrP7Wn2YQ==",
"dev": true,
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@yaakapp/cli-linux-x64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-linux-x64/-/cli-linux-x64-0.0.42.tgz",
"integrity": "sha512-O4ly25zR0BVIN0KxUcc7hmmcdNiRq4tQACuYNMIQ2ppFJYCguSMmGFdeJuyCfvcC/SwJIK6/Kzkr8EAmaTjDOA==",
"dev": true,
"optional": true,
"os": [
"linux"
]
},
"node_modules/@yaakapp/cli-win32-x64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-win32-x64/-/cli-win32-x64-0.0.42.tgz",
"integrity": "sha512-40BTVcOBIP8VYwD1wfrr6tXG6NQuGz+XDA/ean4AWQWHi1P7BWHC9/uqHlMTLhFvbjcHjtwAl7bzVrXr37E0YQ==",
"dev": true,
"optional": true,
"os": [
"win32"
]
},
"node_modules/typescript": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
"integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
},
"node_modules/yaml": {
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.2.tgz",
"integrity": "sha512-B3VqDZ+JAg1nZpaEmWtTXUlBneoGx6CPM9b0TENK6aoSu5t73dItudwdgmi6tHlIZZId4dZ9skcAQ2UbcyAeVA==",
"bin": {
"yaml": "bin.mjs"
},
"engines": {
"node": ">= 14"
}
}
}
}

View File

@@ -1,5 +1,5 @@
{
"name": "importer-insomnia",
"name": "@yaakapp/importer-insomnia",
"private": true,
"version": "0.0.1",
"scripts": {

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
{
"name": "importer-openapi",
"name": "@yaakapp/importer-openapi",
"private": true,
"version": "0.0.1",
"scripts": {
@@ -9,5 +9,8 @@
"dependencies": {
"openapi-to-postmanv2": "^4.23.1",
"yaml": "^2.4.2"
},
"devDependencies": {
"@types/openapi-to-postmanv2": "^3.2.4"
}
}

View File

@@ -1,7 +1,7 @@
import { Context } from '@yaakapp/api';
import { convert } from 'openapi-to-postmanv2';
import { pluginHookImport as pluginHookImportPostman } from '../../importer-postman/src/index';
import { Folder, HttpRequest, Workspace, Environment } from '../../../types/models';
import { Folder, HttpRequest, Workspace, Environment } from '@yaakapp/api';
type AtLeast<T, K extends keyof T> = Partial<T> & Pick<T, K>;

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,5 @@
{
"name": "importer-postman",
"name": "@yaakapp/importer-postman",
"private": true,
"version": "0.0.1",
"main": "./build/index.js",

View File

@@ -1,534 +0,0 @@
{
"name": "importer-yaak",
"version": "0.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "importer-yaak",
"version": "0.0.1",
"dependencies": {
"@yaakapp/api": "^0.2.9"
},
"devDependencies": {
"@types/node": "^20.14.9",
"@yaakapp/cli": "^0.0.42",
"esbuild": "^0.21.5",
"typescript": "^5.5.2"
}
},
"node_modules/@esbuild/aix-ppc64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz",
"integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==",
"cpu": [
"ppc64"
],
"dev": true,
"optional": true,
"os": [
"aix"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/android-arm": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz",
"integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/android-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz",
"integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/android-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz",
"integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"android"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/darwin-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz",
"integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/darwin-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz",
"integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/freebsd-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz",
"integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/freebsd-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz",
"integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-arm": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz",
"integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==",
"cpu": [
"arm"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz",
"integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-ia32": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz",
"integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-loong64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz",
"integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==",
"cpu": [
"loong64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-mips64el": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz",
"integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==",
"cpu": [
"mips64el"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-ppc64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz",
"integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==",
"cpu": [
"ppc64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-riscv64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz",
"integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==",
"cpu": [
"riscv64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-s390x": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz",
"integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==",
"cpu": [
"s390x"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/linux-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz",
"integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/netbsd-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz",
"integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"netbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/openbsd-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz",
"integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"openbsd"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/sunos-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz",
"integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"sunos"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/win32-arm64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz",
"integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==",
"cpu": [
"arm64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/win32-ia32": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz",
"integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==",
"cpu": [
"ia32"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@esbuild/win32-x64": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz",
"integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==",
"cpu": [
"x64"
],
"dev": true,
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=12"
}
},
"node_modules/@types/node": {
"version": "20.14.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.9.tgz",
"integrity": "sha512-06OCtnTXtWOZBJlRApleWndH4JsRVs1pDCc8dLSQp+7PpUpX3ePdHyeNSFTeSe7FtKyQkrlPvHwJOW3SLd8Oyg==",
"dev": true,
"dependencies": {
"undici-types": "~5.26.4"
}
},
"node_modules/@yaakapp/api": {
"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"
}
},
"node_modules/@yaakapp/api/node_modules/@types/node": {
"version": "22.5.5",
"resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz",
"integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==",
"license": "MIT",
"dependencies": {
"undici-types": "~6.19.2"
}
},
"node_modules/@yaakapp/api/node_modules/undici-types": {
"version": "6.19.8",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",
"integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",
"license": "MIT"
},
"node_modules/@yaakapp/cli": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli/-/cli-0.0.42.tgz",
"integrity": "sha512-HFkg49sksZNQQpnOgZGfyh8pmHbxtkgSNCeEMlaSFezq42YZPHxOPlqTEGxk3JqX6Asz0YO2xJDfUADQCyKNYA==",
"dev": true,
"hasInstallScript": true,
"bin": {
"yaakcli": "bin/cli.js"
},
"optionalDependencies": {
"@yaakapp/cli-darwin-arm64": "0.0.42",
"@yaakapp/cli-darwin-x64": "0.0.42",
"@yaakapp/cli-linux-x64": "0.0.42",
"@yaakapp/cli-win32-x64": "0.0.42"
}
},
"node_modules/@yaakapp/cli-darwin-arm64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-darwin-arm64/-/cli-darwin-arm64-0.0.42.tgz",
"integrity": "sha512-l8+N/9jwvAYlMQBPfGzNkVoQsYeBtwM3/7ix5b6mT+3zcwrNIDW9HQTEZ2ZTNdo1H548U1F6ppvhAyOdOtIyLg==",
"dev": true,
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@yaakapp/cli-darwin-x64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-darwin-x64/-/cli-darwin-x64-0.0.42.tgz",
"integrity": "sha512-grm9UOVCNIpHO3XsEzvvoic43cYCxmuvrUFP/8MZLQgZeQ5L6EBTAlCTtXD2hUGW60+kNNwcgPrDVVrP7Wn2YQ==",
"dev": true,
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@yaakapp/cli-linux-x64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-linux-x64/-/cli-linux-x64-0.0.42.tgz",
"integrity": "sha512-O4ly25zR0BVIN0KxUcc7hmmcdNiRq4tQACuYNMIQ2ppFJYCguSMmGFdeJuyCfvcC/SwJIK6/Kzkr8EAmaTjDOA==",
"dev": true,
"optional": true,
"os": [
"linux"
]
},
"node_modules/@yaakapp/cli-win32-x64": {
"version": "0.0.42",
"resolved": "https://registry.npmjs.org/@yaakapp/cli-win32-x64/-/cli-win32-x64-0.0.42.tgz",
"integrity": "sha512-40BTVcOBIP8VYwD1wfrr6tXG6NQuGz+XDA/ean4AWQWHi1P7BWHC9/uqHlMTLhFvbjcHjtwAl7bzVrXr37E0YQ==",
"dev": true,
"optional": true,
"os": [
"win32"
]
},
"node_modules/esbuild": {
"version": "0.21.5",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz",
"integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==",
"dev": true,
"hasInstallScript": true,
"bin": {
"esbuild": "bin/esbuild"
},
"engines": {
"node": ">=12"
},
"optionalDependencies": {
"@esbuild/aix-ppc64": "0.21.5",
"@esbuild/android-arm": "0.21.5",
"@esbuild/android-arm64": "0.21.5",
"@esbuild/android-x64": "0.21.5",
"@esbuild/darwin-arm64": "0.21.5",
"@esbuild/darwin-x64": "0.21.5",
"@esbuild/freebsd-arm64": "0.21.5",
"@esbuild/freebsd-x64": "0.21.5",
"@esbuild/linux-arm": "0.21.5",
"@esbuild/linux-arm64": "0.21.5",
"@esbuild/linux-ia32": "0.21.5",
"@esbuild/linux-loong64": "0.21.5",
"@esbuild/linux-mips64el": "0.21.5",
"@esbuild/linux-ppc64": "0.21.5",
"@esbuild/linux-riscv64": "0.21.5",
"@esbuild/linux-s390x": "0.21.5",
"@esbuild/linux-x64": "0.21.5",
"@esbuild/netbsd-x64": "0.21.5",
"@esbuild/openbsd-x64": "0.21.5",
"@esbuild/sunos-x64": "0.21.5",
"@esbuild/win32-arm64": "0.21.5",
"@esbuild/win32-ia32": "0.21.5",
"@esbuild/win32-x64": "0.21.5"
}
},
"node_modules/typescript": {
"version": "5.5.2",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.2.tgz",
"integrity": "sha512-NcRtPEOsPFFWjobJEtfihkLCZCXZt/os3zf8nTxjVH3RvTSxjrCamJpbExGvYOF+tFHc3pA65qpdwPbzjohhew==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=14.17"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
"dev": true
}
}
}

View File

@@ -1,5 +1,5 @@
{
"name": "importer-yaak",
"name": "@yaakapp/importer-yaak",
"private": true,
"version": "0.0.1",
"scripts": {

View File

@@ -0,0 +1,9 @@
{
"name": "@yaakapp/template-function-file",
"private": true,
"version": "0.0.1",
"scripts": {
"build": "yaakcli build ./src/index.ts",
"dev": "yaakcli dev ./src/index.js"
}
}

View File

@@ -0,0 +1,18 @@
import { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api';
import fs from 'node:fs';
export const plugin: PluginDefinition = {
templateFunctions: [{
name: 'fs.readFile',
args: [{ title: 'Select File', type: 'file', name: 'path', label: 'File' }],
async onRender(_ctx: Context, args: CallTemplateFunctionArgs): Promise<string | null> {
if (!args.values.path) return null;
try {
return fs.promises.readFile(args.values.path, 'utf-8');
} catch (err) {
return null;
}
},
}],
};

View File

@@ -0,0 +1,9 @@
{
"name": "@yaakapp/template-function-hash",
"private": true,
"version": "0.0.1",
"scripts": {
"build": "yaakcli build ./src/index.ts",
"dev": "yaakcli dev ./src/index.js"
}
}

View File

@@ -0,0 +1,24 @@
import { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api';
import { createHash } from 'node:crypto';
const algorithms = ['md5', 'sha1', 'sha256', 'sha512'];
export const plugin: PluginDefinition = {
templateFunctions: algorithms.map(algorithm => ({
name: `hash.${algorithm}`,
args: [
{
name: 'input',
label: 'Input',
placeholder: 'input text',
type: 'text',
},
],
async onRender(_ctx: Context, args: CallTemplateFunctionArgs): Promise<string | null> {
if (!args.values.input) return '';
return createHash(algorithm)
.update(args.values.input, 'utf-8')
.digest('hex');
},
})),
};

View File

@@ -0,0 +1,9 @@
{
"name": "@yaakapp/template-function-prompt",
"private": true,
"version": "0.0.1",
"scripts": {
"build": "yaakcli build ./src/index.ts",
"dev": "yaakcli dev ./src/index.js"
}
}

View File

@@ -0,0 +1,24 @@
import { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api';
export const plugin: PluginDefinition = {
templateFunctions: [{
name: 'prompt.text',
args: [
{ type: 'text', name: 'title', label: 'Title' },
{ type: 'text', name: 'label', label: 'Label', optional: true },
{ type: 'text', name: 'defaultValue', label: 'Default Value', optional: true },
{ type: 'text', name: 'placeholder', label: 'Placeholder', optional: true },
],
async onRender(ctx: Context, args: CallTemplateFunctionArgs): Promise<string | null> {
if (args.purpose !== 'send') return null;
return await ctx.prompt.text({
id: `prompt-${args.values.label}`,
label: args.values.label ?? '',
title: args.values.title ?? '',
defaultValue: args.values.defaultValue,
placeholder: args.values.placeholder,
});
},
}],
};

View File

@@ -0,0 +1,9 @@
{
"name": "@yaakapp/template-function-request",
"private": true,
"version": "0.0.1",
"scripts": {
"build": "yaakcli build ./src/index.ts",
"dev": "yaakcli dev ./src/index.js"
}
}

View File

@@ -0,0 +1,45 @@
import { CallTemplateFunctionArgs, Context, PluginDefinition } from '@yaakapp/api';
export const plugin: PluginDefinition = {
templateFunctions: [
{
name: 'request.body',
args: [{
name: 'requestId',
label: 'Http Request',
type: 'http_request',
}],
async onRender(ctx: Context, args: CallTemplateFunctionArgs): Promise<string | null> {
const httpRequest = await ctx.httpRequest.getById({ id: args.values.requestId ?? 'n/a' });
if (httpRequest == null) return null;
return String(await ctx.templates.render({
data: httpRequest.body?.text ?? '',
purpose: args.purpose,
}));
},
},
{
name: 'request.header',
args: [
{
name: 'requestId',
label: 'Http Request',
type: 'http_request',
},
{
name: 'header',
label: 'Header Name',
type: 'text',
}],
async onRender(ctx: Context, args: CallTemplateFunctionArgs): Promise<string | null> {
const httpRequest = await ctx.httpRequest.getById({ id: args.values.requestId ?? 'n/a' });
if (httpRequest == null) return null;
const header = httpRequest.headers.find(h => h.name.toLowerCase() === args.values.header?.toLowerCase());
return String(await ctx.templates.render({
data: header?.value ?? '',
purpose: args.purpose,
}));
},
},
],
};

File diff suppressed because it is too large Load Diff

View File

@@ -1,96 +1,114 @@
import { DOMParser } from '@xmldom/xmldom';
import { CallTemplateFunctionArgs, Context, HttpResponse, PluginDefinition } from '@yaakapp/api';
import {
CallTemplateFunctionArgs,
Context,
HttpResponse,
PluginDefinition,
RenderPurpose,
TemplateFunctionArg,
} from '@yaakapp/api';
import { JSONPath } from 'jsonpath-plus';
import { readFileSync } from 'node:fs';
import xpath from 'xpath';
const behaviorArg: TemplateFunctionArg = {
type: 'select',
name: 'behavior',
label: 'Sending Behavior',
defaultValue: 'smart',
options: [
{ label: 'When no responses', value: 'smart' },
{ label: 'Always', value: 'always' },
],
};
const requestArg: TemplateFunctionArg =
{
type: 'http_request',
name: 'request',
label: 'Request',
};
export const plugin: PluginDefinition = {
templateFunctions: [{
name: 'response',
args: [
{
type: 'http_request',
name: 'request',
label: 'Request',
templateFunctions: [
{
name: 'response.header',
args: [
requestArg,
{
type: 'text',
name: 'header',
label: 'Header Name',
placeholder: 'Content-Type',
},
behaviorArg,
],
async onRender(ctx: Context, args: CallTemplateFunctionArgs): Promise<string | null> {
if (!args.values.request || !args.values.header) return null;
const response = await getResponse(ctx, {
requestId: args.values.request,
purpose: args.purpose,
behavior: args.values.behavior ?? null,
});
if (response == null) return null;
const header = response.headers.find(
h => h.name.toLowerCase() === String(args.values.header ?? '').toLowerCase(),
);
return header?.value ?? null;
},
{
type: 'text',
name: 'path',
label: 'JSONPath or XPath',
placeholder: '$.books[0].id or /books[0]/id',
},
{
type: 'select',
name: 'behavior',
label: 'Sending Behavior',
defaultValue: 'smart',
options: [
{ name: 'When no responses', value: 'smart' },
{ name: 'Always', value: 'always' },
],
},
],
async onRender(ctx: Context, args: CallTemplateFunctionArgs): Promise<string | null> {
if (!args.values.request || !args.values.path) {
return null;
}
const httpRequest = await ctx.httpRequest.getById({ id: args.values.request ?? 'n/a' });
if (httpRequest == null) {
return null;
}
const responses = await ctx.httpResponse.find({ requestId: httpRequest.id, limit: 1 });
if (args.values.behavior === 'never' && responses.length === 0) {
return null;
}
let response: HttpResponse | null = responses[0] ?? null;
// Previews happen a ton, and we don't want to send too many times on "always," so treat
// it as "smart" during preview.
let behavior = (args.values.behavior === 'always' && args.purpose === 'preview')
? 'smart'
: args.values.behavior;
// Send if no responses and "smart," or "always"
if ((behavior === 'smart' && response == null) || behavior === 'always') {
// NOTE: Render inside this conditional, or we'll get infinite recursion (render->render->...)
const renderedHttpRequest = await ctx.httpRequest.render({ httpRequest, purpose: args.purpose });
response = await ctx.httpRequest.send({ httpRequest: renderedHttpRequest });
}
if (response == null) {
return null;
}
if (response.bodyPath == null) {
return null;
}
let body;
try {
body = readFileSync(response.bodyPath, 'utf-8');
} catch (_) {
return null;
}
try {
return filterJSONPath(body, args.values.path);
} catch (err) {
// Probably not JSON, try XPath
}
try {
return filterXPath(body, args.values.path);
} catch (err) {
// Probably not XML
}
return null; // Bail out
},
}],
{
name: 'response.body.path',
aliases: ['response'],
args: [
requestArg,
{
type: 'text',
name: 'path',
label: 'JSONPath or XPath',
placeholder: '$.books[0].id or /books[0]/id',
},
behaviorArg,
],
async onRender(ctx: Context, args: CallTemplateFunctionArgs): Promise<string | null> {
if (!args.values.request || !args.values.path) return null;
const response = await getResponse(ctx, {
requestId: args.values.request,
purpose: args.purpose,
behavior: args.values.behavior ?? null,
});
if (response == null) return null;
if (response.bodyPath == null) {
return null;
}
let body;
try {
body = readFileSync(response.bodyPath, 'utf-8');
} catch (_) {
return null;
}
try {
return filterJSONPath(body, args.values.path);
} catch (err) {
// Probably not JSON, try XPath
}
try {
return filterXPath(body, args.values.path);
} catch (err) {
// Probably not XML
}
return null; // Bail out
},
},
],
};
function filterJSONPath(body: string, path: string): string {
@@ -121,3 +139,39 @@ function filterXPath(body: string, path: string): string {
return String(items);
}
}
async function getResponse(ctx: Context, { requestId, behavior, purpose }: {
requestId: string,
behavior: string | null,
purpose: RenderPurpose,
}): Promise<HttpResponse | null> {
if (!requestId) return null;
const httpRequest = await ctx.httpRequest.getById({ id: requestId ?? 'n/a' });
if (httpRequest == null) {
return null;
}
const responses = await ctx.httpResponse.find({ requestId: httpRequest.id, limit: 1 });
if (behavior === 'never' && responses.length === 0) {
return null;
}
let response: HttpResponse | null = responses[0] ?? null;
// Previews happen a ton, and we don't want to send too many times on "always," so treat
// it as "smart" during preview.
let finalBehavior = (behavior === 'always' && purpose === 'preview')
? 'smart'
: behavior;
// Send if no responses and "smart," or "always"
if ((finalBehavior === 'smart' && response == null) || finalBehavior === 'always') {
// NOTE: Render inside this conditional, or we'll get infinite recursion (render->render->...)
const renderedHttpRequest = await ctx.httpRequest.render({ httpRequest, purpose });
response = await ctx.httpRequest.send({ httpRequest: renderedHttpRequest });
}
return response;
}