This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.emoran</groupId> | |
<artifactId>yucelmoran-azure-pipeline</artifactId> | |
<version>1.0.0-SNAPSHOT</version> | |
<packaging>mule-application</packaging> | |
<name>yucelmoran-azure-pipeline</name> | |
<properties> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> | |
<servers> | |
<server> | |
<id>yucelmoran-azure-pipeline</id> | |
<username>yucelmorans</username> | |
<!-- Treat this auth token like a password. Do not share it with anyone, including Microsoft support. --> | |
<!-- The generated token expires on or before 17/11/2019 --> | |
<password>${azure.password}</password> | |
</server> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%dw 2.0 | |
import try, fail from dw::Runtime | |
output application/java | |
fun isDate(value: Any): Boolean = try(() -> value as Date).success | |
fun getDate(value: Any): Date | Null | Any = ( if ( isDate(value) ) value | |
as Date as String else value ) | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(payload.fields filter ($."type" != "LOCATION") map { | |
fieldName : $.name | |
}).fieldName joinBy "," |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%dw 2.0 | |
input payload application/java | |
output application/java | |
fun validateField(field) = if ( (field == "REFERENCE") | |
or (field == "ID") or | |
(field == "PICKLIST") or | |
(field == "TEXTAREA") or | |
(field == "ADDRESS")or | |
(field == "EMAIL")or | |
(field == "PHONE") or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
payload.sobjects filter ( $.queryable == true and | |
$.replicateable == true and | |
$.retrieveable == true and | |
$.searchable == true and | |
$.triggerable == true and | |
($.name == "Account" or | |
$.name == "Contact" or | |
$.name =="Project__c")) map $ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%dw 2.0 | |
import try, fail from dw::Runtime | |
output application/java | |
fun isDate(value: Any): Boolean = try(() -> value as Date).success | |
fun getDate(value: Any): Date | Null | Any = ( if ( isDate(value) ) value | |
as Date as String else value ) | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%dw 2.0 | |
output application/json | |
--- | |
flatten (dw::core::Objects::entrySet (payload) map ($[1].payload)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%dw 1.0 | |
%input payload application/json | |
%output application/json | |
%var pRegex = /^[^.][a-zA-Z0-9.!#$%&’*+\/=?^_`{|}~-]+@[a-zA-Z0-9-](?!.*?\.\.)[^_ ; ,<>\/\\]+(?:\.[a-zA-Z0-9-]+)[^.]*$/ | |
--- | |
payload filter ($.email != "" and $.email != null and ($.email matches pRegex)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for file in "/tmp"/file*; do | |
sudo mv -- "$file" "/tmp/todelete"; | |
done |