Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: storing postman collections as directories + newman enhancements #3159

Open
wants to merge 25 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7804629
feat: support collections as local directories
knutties Jul 29, 2023
18649a0
feat: support collections as local directories
knutties Jul 31, 2023
76fd92d
fix: fix top level formatting
knutties Aug 11, 2023
ba07027
feat: add export-import-test command + fixes
knutties Aug 12, 2023
9c0a41e
feat: support event ordering
knutties Aug 12, 2023
a34f272
feat: support new test addition
knutties Aug 13, 2023
bf77f3b
feat: support test removal
knutties Aug 14, 2023
72d511e
fix: fix existing tests
knutties Aug 21, 2023
7b776a7
fix: fix integration/library test executions
knutties Aug 22, 2023
91d14bf
fix: format raw request json for easier editing
knutties Aug 22, 2023
8ad4a68
fix: handle raw body parse errors gracefully
knutties Aug 23, 2023
8af8bf2
build: remove raw body from exported collection
knutties Aug 23, 2023
230ae42
doc: add rationale documentation for dir-* commands
knutties Aug 26, 2023
327ea92
feat: add dir-create/dir-add-folder/dir-remove-folder commands
knutties Aug 27, 2023
347e03a
fix: handle errors gracefully when executing dir-run
knutties Aug 29, 2023
0d4ece2
fix: handle top level event js files
knutties Aug 30, 2023
5332cea
fix: handle body lang type for json formatting
knutties Aug 30, 2023
2e35272
ci: fix json payload in template for add test
knutties Sep 13, 2023
7106e19
refactor: rename test to request across
knutties Oct 6, 2023
74a3901
doc: Update DIR_COMMANDS.md
knutties Oct 6, 2023
d706aa8
ci: Update DIR_COMMANDS.md
knutties Oct 6, 2023
1376f35
refactor: rename test to request across
knutties Oct 7, 2023
297601e
refactor: rename dir-export-import-test to dir-export-import-check
knutties Oct 7, 2023
f71f965
fix: fix lint issues
knutties Oct 7, 2023
7bdb306
test: address test coverage
knutties Oct 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
build: remove raw body from exported collection
knutties committed Sep 17, 2023
commit 8af8bf228da8ca0a8c68f945157df500ff33c1dc
5 changes: 1 addition & 4 deletions lib/commands/dir-utils.js
Original file line number Diff line number Diff line change
@@ -172,6 +172,7 @@ const os = require('os'),
// add raw post body as formatted JSON, will be removed in the import
try {
thing.request.body.raw_json_formatted = JSON.parse(thing.request.body.raw);
delete thing.request.body.raw;
} catch(e) {
console.warn(`Unable to parse raw body for ${name}`);
}
@@ -224,7 +225,6 @@ const os = require('os'),
if (matches && topLevelFileKeys[matches[1]]) {
let item = matches[1];

// console.log(`@@@ reading item ${path}`);
result[item] = JSON.parse(fs.readFileSync(path))[item];

return result;
@@ -255,11 +255,8 @@ const os = require('os'),
eventMatches = name.match(/^event\.([^.]+)\.js$/);

if (eventMatches) {
// console.log(`@@@@ eventMatches ${eventMatches[1]}`);
let fileContent = fs.readFileSync(path).toString();

// console.log(`@@@@ typeof fileContent is ${typeof fileContent}`);
// console.log(`@@@@ fileContent is ${fileContent}`);
result = {
listen: eventMatches[1],
script: {