Merge branch 'launch' into launch

This commit is contained in:
Frikky
2022-07-14 13:28:36 +02:00
committed by GitHub
11 changed files with 473 additions and 273 deletions
+21 -3
View File
@@ -117,6 +117,22 @@ def as_object(a):
def ast(a):
return ast.literal_eval(str(a))
@shuffle_filters.register
def escape_string(a):
a = str(a)
return a.replace("\\\'", "\'", -1).replace("\\\"", "\"", -1).replace("'", "\\\'", -1).replace("\"", "\\\"", -1)
@shuffle_filters.register
def json_escape(a):
a = str(a)
return a.replace("\\\'", "\'", -1).replace("\\\"", "\"", -1).replace("'", "\\\\\'", -1).replace("\"", "\\\\\"", -1)
# By default using json escape to add all backslashes
@shuffle_filters.register
def escape(a):
a = str(a)
return json_escape(a)
#print(standard_filter_manager.filters)
#print(shuffle_filters.filters)
#print(Liquid("{{ '10' | plus: 1}}", filters=shuffle_filters.filters).render())
@@ -2025,7 +2041,6 @@ class AppBase:
errors = False
error_msg = ""
try:
#self.logger.info("In liquid")
if len(template) > 10000000:
self.logger.info("[DEBUG] Skipping liquid - size too big (%d)" % len(template))
return template
@@ -2094,6 +2109,9 @@ class AppBase:
error = True
error_msg = e
if "fmt" in error_msg and "liquid_date" in error_msg:
return template
self.logger.info("Done in liquid")
if error == True:
self.action_result["status"] = "FAILURE"
@@ -2102,6 +2120,7 @@ class AppBase:
"reason": f"Failed to parse LiquidPy: {error_msg}",
"input": template,
}
try:
self.action_result["result"] = json.dumps(data)
except Exception as e:
@@ -2240,7 +2259,6 @@ class AppBase:
#self.logger.info("STATIC PARSED: %s" % actualitem)
#self.logger.info("[INFO] Done with regex matching")
if len(actualitem) > 0:
#self.logger.info("[DEBUG] Matches: ", actualitem)
for replace in actualitem:
try:
to_be_replaced = replace[0]
@@ -2798,7 +2816,7 @@ class AppBase:
}))
if parameter["name"] == "body":
self.logger.info("[INFO] Should debug field with liquid and other checks as it's BODY: %s" % value)
self.logger.info(f"[INFO] Should debug field with liquid and other checks as it's BODY: {value}")
# Custom format for ${name[0,1,2,...]}$
#submatch = "([${]{2}([0-9a-zA-Z_-]+)(\[.*\])[}$]{2})"
+1 -1
View File
@@ -2,7 +2,7 @@
### DEFAULT
NAME=shuffle-app_sdk
VERSION=1.0.4
VERSION=1.0.5
docker rmi docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION --force
docker build . -f Dockerfile -t frikky/shuffle:app_sdk -t frikky/$NAME:$VERSION -t docker.pkg.github.com/frikky/shuffle/$NAME:$VERSION -t ghcr.io/frikky/$NAME:$VERSION -t ghcr.io/frikky/$NAME:nightly
+1 -1
View File
@@ -1,7 +1,7 @@
urllib3==1.26.5
requests==2.25.1
MarkupSafe==2.0.1
liquidpy==0.7.3
liquidpy==0.7.5
flask[async]==2.0.2
waitress==2.1.0
#flask==1.1.2
+1
View File
@@ -559,6 +559,7 @@ func runWorkflowExecutionTransaction(ctx context.Context, attempts int64, workfl
}
//log.Printf("BASE LENGTH: %d", len(workflowExecution.Results))
workflowExecution, dbSave, err := shuffle.ParsedExecutionResult(ctx, *workflowExecution, actionResult, false, 0)
if err != nil {
b, suberr := json.Marshal(actionResult)