@brandboostinggmbh/observable-workflows 0.20.2-beta.1 → 0.20.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1419,7 +1419,10 @@ const createLogAccessor = (context) => {
|
|
|
1419
1419
|
offset
|
|
1420
1420
|
]));
|
|
1421
1421
|
const result = await retryD1Operation(() => context.D1.prepare(sql).bind(...bindings, limit, offset).all(), context.retryConfig);
|
|
1422
|
-
if (options?.debugLogs)
|
|
1422
|
+
if (options?.debugLogs) {
|
|
1423
|
+
console.log(`listWorkflows SQL Query executed in ${Date.now() - debugStartTime}ms, rows: ${result.results?.length ?? 0}`);
|
|
1424
|
+
if (result.meta) console.log("listWorkflows D1 meta:", JSON.stringify(result.meta));
|
|
1425
|
+
}
|
|
1423
1426
|
if (result.results) {
|
|
1424
1427
|
const deserializeStart = options?.debugLogs ? Date.now() : 0;
|
|
1425
1428
|
const workflows = await Promise.all(result.results.map((row) => workflowTableRowToWorkflowRun({
|
|
@@ -1670,10 +1673,9 @@ const createLogAccessor = (context) => {
|
|
|
1670
1673
|
return step;
|
|
1671
1674
|
};
|
|
1672
1675
|
const getPropertiesKeys = async (instanceId) => {
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
`).bind(context.tenantId, instanceId ?? null, instanceId ?? null).all(), context.retryConfig);
|
|
1676
|
+
let result;
|
|
1677
|
+
if (instanceId) result = await retryD1Operation(() => context.D1.prepare(`SELECT DISTINCT key, valueType FROM WorkflowProperties WHERE instanceId = ?`).bind(instanceId).all(), context.retryConfig);
|
|
1678
|
+
else result = await retryD1Operation(() => context.D1.prepare(`SELECT DISTINCT key, valueType FROM WorkflowProperties WHERE tenantId = ?`).bind(context.tenantId).all(), context.retryConfig);
|
|
1677
1679
|
console.log(`debug getPropertiesKeys: ${JSON.stringify(result)}`);
|
|
1678
1680
|
if (!result.results) return [];
|
|
1679
1681
|
return result.results.map((row) => ({
|