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

Add jsonata on all node #31

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The nodes and functions provided are:
* fs-ops-mktmpdir - Make a new directory with a random unique name


Parameters such as path and filename can be sourced from strings, or message, flow, or global property. Likewise, results can be stored in a message, flow or global property.
Parameters such as path and filename can be sourced from strings, or message, flow, jsonata or global property. Likewise, results can be stored in a message, flow or global property.

fs-ops-dir can be used to extract a llist of files using a filter,and then pass that list to other fs-ops nodes to perform
bulk operations.
Expand Down
66 changes: 33 additions & 33 deletions fs-ops.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}
$("#node-input-sourcePath").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-sourcePathType")
});

Expand All @@ -35,7 +35,7 @@
}
$("#node-input-sourceFilename").typedInput({
default: 'msg',
types: ['str','msg','flow','global'],
types: ['str','msg','flow','global','jsonata'],
typeField: $("#node-input-sourceFilenameType")
});

Expand All @@ -44,7 +44,7 @@
}
$("#node-input-destPath").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-destPathType")
});

Expand All @@ -53,7 +53,7 @@
}
$("#node-input-destFilename").typedInput({
default: 'msg',
types: ['str','msg','flow','global'],
types: ['str','msg','flow','global','jsonata'],
typeField: $("#node-input-destFilenameType")
});

Expand Down Expand Up @@ -162,7 +162,7 @@ <h3>Details</h3>
}
$("#node-input-sourcePath").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-sourcePathType")
});

Expand All @@ -171,7 +171,7 @@ <h3>Details</h3>
}
$("#node-input-sourceFilename").typedInput({
default: 'msg',
types: ['str','msg','flow','global'],
types: ['str','msg','flow','global','jsonata'],
typeField: $("#node-input-sourceFilenameType")
});

Expand All @@ -180,7 +180,7 @@ <h3>Details</h3>
}
$("#node-input-destPath").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-destPathType")
});

Expand All @@ -189,7 +189,7 @@ <h3>Details</h3>
}
$("#node-input-destFilename").typedInput({
default: 'msg',
types: ['str','msg','flow','global'],
types: ['str','msg','flow','global','jsonata'],
typeField: $("#node-input-destFilenameType")
});

Expand Down Expand Up @@ -295,7 +295,7 @@ <h3>Details</h3>
}
$("#node-input-path").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-pathType")
});

Expand All @@ -304,7 +304,7 @@ <h3>Details</h3>
}
$("#node-input-filename").typedInput({
default: 'msg',
types: ['str','msg','flow','global'],
types: ['str','msg','flow','global','jsonata'],
typeField: $("#node-input-filenameType")
});

Expand Down Expand Up @@ -386,7 +386,7 @@ <h3>Details</h3>
}
$("#node-input-path").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-pathType")
});

Expand All @@ -395,7 +395,7 @@ <h3>Details</h3>
}
$("#node-input-filename").typedInput({
default: 'msg',
types: ['str','msg','flow','global'],
types: ['str','msg','flow','global','jsonata'],
typeField: $("#node-input-filenameType")
});

Expand Down Expand Up @@ -492,7 +492,7 @@ <h3>Details</h3>
}
$("#node-input-path").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-pathType")
});

Expand All @@ -501,7 +501,7 @@ <h3>Details</h3>
}
$("#node-input-filename").typedInput({
default: 'msg',
types: ['str','msg','flow','global'],
types: ['str','msg','flow','global','jsonata'],
typeField: $("#node-input-filenameType")
});

Expand All @@ -510,7 +510,7 @@ <h3>Details</h3>
}
$("#node-input-size").typedInput({
default: 'msg',
types: ['msg','flow','global'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-sizeType")
});

Expand Down Expand Up @@ -596,7 +596,7 @@ <h3>Details</h3>
}
$("#node-input-path").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-pathType")
});

Expand All @@ -605,7 +605,7 @@ <h3>Details</h3>
}
$("#node-input-filename").typedInput({
default: 'msg',
types: ['str','msg','flow','global'],
types: ['str','msg','flow','global','jsonata','str'],
typeField: $("#node-input-filenameType")
});

Expand All @@ -614,7 +614,7 @@ <h3>Details</h3>
}
$("#node-input-stats").typedInput({
default: 'msg',
types: ['msg','flow','global'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-statsType")
});

Expand Down Expand Up @@ -701,7 +701,7 @@ <h3>Details</h3>
}
$("#node-input-path").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-pathType")
});

Expand All @@ -710,7 +710,7 @@ <h3>Details</h3>
}
$("#node-input-filename").typedInput({
default: 'msg',
types: ['str','msg','flow','global'],
types: ['str','msg','flow','global','str','jsonata'],
typeField: $("#node-input-filenameType")
});

Expand All @@ -719,7 +719,7 @@ <h3>Details</h3>
}
$("#node-input-link").typedInput({
default: 'msg',
types: ['msg','flow','global'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-linkType")
});

Expand Down Expand Up @@ -806,7 +806,7 @@ <h3>Details</h3>
}
$("#node-input-path").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-pathType")
});

Expand All @@ -815,7 +815,7 @@ <h3>Details</h3>
}
$("#node-input-filename").typedInput({
default: 'msg',
types: ['str','msg','flow','global'],
types: ['str','msg','flow','global','jsonata'],
typeField: $("#node-input-filenameType")
});

Expand All @@ -824,7 +824,7 @@ <h3>Details</h3>
}
$("#node-input-type").typedInput({
default: 'msg',
types: ['msg','flow','global'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-typeType")
});

Expand Down Expand Up @@ -919,7 +919,7 @@ <h3>Details</h3>
}
$("#node-input-path").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-pathType")
});

Expand All @@ -928,7 +928,7 @@ <h3>Details</h3>
}
$("#node-input-filter").typedInput({
default: 'msg',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-filterType")
});

Expand All @@ -937,7 +937,7 @@ <h3>Details</h3>
}
$("#node-input-dir").typedInput({
default: 'msg',
types: ['msg','flow','global'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-dirType")
});

Expand Down Expand Up @@ -1025,7 +1025,7 @@ <h3>Details</h3>
}
$("#node-input-path").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-pathType")
});

Expand All @@ -1034,7 +1034,7 @@ <h3>Details</h3>
}
$("#node-input-dirname").typedInput({
default: 'msg',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-dirnameType")
});

Expand All @@ -1043,7 +1043,7 @@ <h3>Details</h3>
}
$("#node-input-fullpath").typedInput({
default: 'msg',
types: ['msg','flow','global'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-fullpathType")
});

Expand Down Expand Up @@ -1139,7 +1139,7 @@ <h3>Details</h3>
}
$("#node-input-path").typedInput({
default: 'str',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-pathType")
});

Expand All @@ -1148,7 +1148,7 @@ <h3>Details</h3>
}
$("#node-input-prefix").typedInput({
default: 'msg',
types: ['str','msg','flow','global','env'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-prefixType")
});

Expand All @@ -1157,7 +1157,7 @@ <h3>Details</h3>
}
$("#node-input-fullpath").typedInput({
default: 'msg',
types: ['msg','flow','global'],
types: ['msg','flow','global','str','jsonata'],
typeField: $("#node-input-fullpathType")
});

Expand Down
3 changes: 2 additions & 1 deletion fs-ops.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* SOFTWARE.
**/

// eslint-disable-next-line no-unused-vars
const util = require('util');
const fs = require('fs');
const path = require('path');
Expand Down Expand Up @@ -300,7 +301,7 @@ module.exports = function(RED) {
error = true;
}
}
}
};


if (Array.isArray(filename)) {
Expand Down