@openfn/language-common
Advanced tools
+9
-9
@@ -116,3 +116,3 @@ var __create = Object.create; | ||
| var import_undici2 = require("undici"); | ||
| var import_date_fns2 = __toESM(require("date-fns"), 1); | ||
| var dateFns = __toESM(require("date-fns"), 1); | ||
| var import_lodash3 = __toESM(require("lodash"), 1); | ||
@@ -357,3 +357,3 @@ | ||
| } else if (baseUrl) { | ||
| fullUrl = new URL(import_node_path.default.join(baseUrl, pathOrUrl)); | ||
| fullUrl = new URL(import_node_path.default.posix.join(baseUrl, pathOrUrl)); | ||
| } else { | ||
@@ -900,3 +900,3 @@ new URL(pathOrUrl); | ||
| return (state) => { | ||
| const { format: format2, ...optionsWithoutFormat } = options2; | ||
| const { format: format3, ...optionsWithoutFormat } = options2; | ||
| const [resolvedValue, resolvedOptions] = expandReferences( | ||
@@ -921,4 +921,4 @@ state, | ||
| if (date instanceof Date && date.toString !== "Invalid Date") { | ||
| state[cursorKey] = (format2 == null ? void 0 : format2(date)) ?? date.toISOString(); | ||
| const formatted = format2 ? state[cursorKey] : import_date_fns2.default.format(date, "HH:mm d MMM yyyy (OOO)"); | ||
| state[cursorKey] = (format3 == null ? void 0 : format3(date)) ?? date.toISOString(); | ||
| const formatted = format3 ? state[cursorKey] : dateFns.format(date, "HH:mm d MMM yyyy (OOO)"); | ||
| console.log(`Setting ${cursorKey} "${cursor2}" to: ${formatted}`); | ||
@@ -928,3 +928,3 @@ return state; | ||
| } | ||
| state[cursorKey] = (format2 == null ? void 0 : format2(cursor2)) ?? cursor2; | ||
| state[cursorKey] = (format3 == null ? void 0 : format3(cursor2)) ?? cursor2; | ||
| console.log(`Setting ${cursorKey} to:`, state[cursorKey]); | ||
@@ -1076,6 +1076,6 @@ return state; | ||
| __export(dateFns_exports, { | ||
| format: () => import_date_fns3.format, | ||
| parse: () => import_date_fns3.parse | ||
| format: () => import_date_fns2.format, | ||
| parse: () => import_date_fns2.parse | ||
| }); | ||
| var import_date_fns3 = require("date-fns"); | ||
| var import_date_fns2 = require("date-fns"); | ||
@@ -1082,0 +1082,0 @@ // src/index.js |
+8
-8
@@ -51,3 +51,3 @@ var __defProp = Object.defineProperty; | ||
| import { request as request2 } from "undici"; | ||
| import dateFns from "date-fns"; | ||
| import * as dateFns from "date-fns"; | ||
| import _3 from "lodash"; | ||
@@ -292,3 +292,3 @@ | ||
| } else if (baseUrl) { | ||
| fullUrl = new URL(path.join(baseUrl, pathOrUrl)); | ||
| fullUrl = new URL(path.posix.join(baseUrl, pathOrUrl)); | ||
| } else { | ||
@@ -835,3 +835,3 @@ new URL(pathOrUrl); | ||
| return (state) => { | ||
| const { format: format2, ...optionsWithoutFormat } = options2; | ||
| const { format: format3, ...optionsWithoutFormat } = options2; | ||
| const [resolvedValue, resolvedOptions] = expandReferences( | ||
@@ -856,4 +856,4 @@ state, | ||
| if (date instanceof Date && date.toString !== "Invalid Date") { | ||
| state[cursorKey] = (format2 == null ? void 0 : format2(date)) ?? date.toISOString(); | ||
| const formatted = format2 ? state[cursorKey] : dateFns.format(date, "HH:mm d MMM yyyy (OOO)"); | ||
| state[cursorKey] = (format3 == null ? void 0 : format3(date)) ?? date.toISOString(); | ||
| const formatted = format3 ? state[cursorKey] : dateFns.format(date, "HH:mm d MMM yyyy (OOO)"); | ||
| console.log(`Setting ${cursorKey} "${cursor2}" to: ${formatted}`); | ||
@@ -863,3 +863,3 @@ return state; | ||
| } | ||
| state[cursorKey] = (format2 == null ? void 0 : format2(cursor2)) ?? cursor2; | ||
| state[cursorKey] = (format3 == null ? void 0 : format3(cursor2)) ?? cursor2; | ||
| console.log(`Setting ${cursorKey} to:`, state[cursorKey]); | ||
@@ -1011,3 +1011,3 @@ return state; | ||
| __export(dateFns_exports, { | ||
| format: () => format, | ||
| format: () => format2, | ||
| parse: () => parse2 | ||
@@ -1017,3 +1017,3 @@ }); | ||
| parse as parse2, | ||
| format | ||
| format as format2 | ||
| } from "date-fns"; | ||
@@ -1020,0 +1020,0 @@ |
+1
-1
@@ -263,3 +263,3 @@ var __create = Object.create; | ||
| } else if (baseUrl) { | ||
| fullUrl = new URL(import_node_path.default.join(baseUrl, pathOrUrl)); | ||
| fullUrl = new URL(import_node_path.default.posix.join(baseUrl, pathOrUrl)); | ||
| } else { | ||
@@ -266,0 +266,0 @@ new URL(pathOrUrl); |
+1
-1
@@ -213,3 +213,3 @@ // src/util/http.js | ||
| } else if (baseUrl) { | ||
| fullUrl = new URL(path.join(baseUrl, pathOrUrl)); | ||
| fullUrl = new URL(path.posix.join(baseUrl, pathOrUrl)); | ||
| } else { | ||
@@ -216,0 +216,0 @@ new URL(pathOrUrl); |
+3
-3
| { | ||
| "name": "@openfn/language-common", | ||
| "label": "Common", | ||
| "version": "3.2.1", | ||
| "version": "3.2.2", | ||
| "description": "Common Expressions for OpenFn", | ||
@@ -40,7 +40,7 @@ "homepage": "https://docs.openfn.org", | ||
| "csv-parse": "^5.4.0", | ||
| "csvtojson": "^2.0.10", | ||
| "csvtojson": "^2.0.13", | ||
| "date-fns": "^2.25.0", | ||
| "http-status-codes": "^2.3.0", | ||
| "jsonpath-plus": "^10.3.0", | ||
| "lodash": "^4.17.21", | ||
| "lodash": "^4.17.23", | ||
| "undici": "^7.15.0" | ||
@@ -47,0 +47,0 @@ }, |
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
220503
0.01%Updated
Updated