bizydraft 0.2.51__py3-none-any.whl → 0.2.53__py3-none-any.whl

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.

Potentially problematic release.


This version of bizydraft might be problematic. Click here for more details.

@@ -519,20 +519,31 @@ app.registerExtension({
519
519
  }, '*');
520
520
  return graph.workflow;
521
521
  },
522
+ getWorkflowNotSave: async function () {
523
+ const graph = await app.graphToPrompt();
524
+ // 规范化工作流,移除不影响逻辑的视觉字段,避免颜色等样式变化影响校验
525
+ const normalizeWorkflow = (workflow) => {
526
+ const json = JSON.stringify(workflow, (key, value) => {
527
+ if (key === 'color' || key === 'bgcolor' || key === 'extra') return undefined;
528
+ return value;
529
+ });
530
+ return JSON.parse(json);
531
+ };
532
+ const normalized = normalizeWorkflow(graph.workflow);
533
+ window.parent.postMessage({
534
+ type: 'functionResult',
535
+ method: 'getWorkflowNotSave',
536
+ result: normalized
537
+ }, '*');
538
+ return normalized;
539
+ },
522
540
  // 新增:获取 workflow 和 output
523
541
  getWorkflowWithOutput: async function () {
524
542
  const graph = await app.graphToPrompt();
525
- graph.workflow.nodes.forEach(node => {
526
- for (const key in graph.output) {
527
- if (graph.output[key].class_type === node.type) {
528
- if (!graph.output[key]._meta) {
529
- graph.output[key]._meta = {};
530
- }
531
- graph.output[key]._meta.id = node.id;
532
- break; // 找到匹配的就跳出循环
533
- }
534
- }
535
- });
543
+ for (const key in graph.output) {
544
+ graph.output[key]._meta.id = Number(key);
545
+ graph.output[key]._meta.class_type =graph.output[key].class_type
546
+ }
536
547
  window.parent.postMessage({
537
548
  type: 'functionResult',
538
549
  method: 'getWorkflowWithOutput',
@@ -612,18 +623,10 @@ app.registerExtension({
612
623
  }
613
624
 
614
625
  if (Object.keys(resPromptJson.node_errors).length) return
615
- graph.workflow.nodes.forEach(node => {
616
- for (const key in graph.output) {
617
- if (graph.output[key].class_type === node.type) {
618
- if (!graph.output[key]._meta) {
619
- graph.output[key]._meta = {};
620
- }
621
- graph.output[key]._meta.id = node.id;
622
- break; // 找到匹配的就跳出循环
623
- }
624
- }
625
- });
626
-
626
+ for (const key in graph.output) {
627
+ graph.output[key]._meta.id = Number(key);
628
+ graph.output[key]._meta.class_type = graph.output[key].class_type;
629
+ }
627
630
  for (let i in graph.output) {
628
631
  if (graph.output[i].class_type == 'LoadImage') {
629
632
  graph.output[i].inputs.image = graph.output[i].inputs.image.replace('pasted/http', 'http')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bizydraft
3
- Version: 0.2.51
3
+ Version: 0.2.53
4
4
  Summary: bizydraft
5
5
  Requires-Dist: loguru
6
6
  Requires-Dist: aiohttp
@@ -18,11 +18,11 @@ bizydraft/static/js/hookLoadModel.js,sha256=ovNvz4FRYNcOKJTueotugzIeGQDYAivYB5EQ
18
18
  bizydraft/static/js/main.js,sha256=oEsVEUZSo8ipx93oqs2WFQSRgp46XQ_D-Xao-wen2S8,121
19
19
  bizydraft/static/js/nodeFocusHandler.js,sha256=24xXbS4Q-GjJdRqf11i-1pBo8MkOJ24F7MHFV44EG6Q,4683
20
20
  bizydraft/static/js/nodeParamsFilter.js,sha256=H7lBB0G8HNqoGhOCH1hNXqPU-rPlrFyTxg_f_JgLEMk,4168
21
- bizydraft/static/js/postEvent.js,sha256=7DMjaizHSPCAMjvyzEfBH7_9rsvEnTmBwQ3PR-cdBB0,39009
21
+ bizydraft/static/js/postEvent.js,sha256=met19YcUlC8ttKQl9tHJ66NnfltBeOeq28TZBmIGhlM,39249
22
22
  bizydraft/static/js/socket.js,sha256=VE3fTAgEfM0FZhL526Skt7OCRokOa3mzTCAjAomI_tE,2432
23
23
  bizydraft/static/js/tool.js,sha256=VupamUuh7tYiDnBTrL5Z_yLmhJinskhzRXwE3zfsKZM,2901
24
24
  bizydraft/static/js/uploadFile.js,sha256=WvglKzHMeOzDhOH3P-fLcPHxCLbKOJpo4DntoRxeJtI,4908
25
- bizydraft-0.2.51.dist-info/METADATA,sha256=vLrTojkU0456eleBdt6Db8xYXVcJ3sEm5NKPLvILWgI,162
26
- bizydraft-0.2.51.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
- bizydraft-0.2.51.dist-info/top_level.txt,sha256=XtoBq6hjZhXIM7aas4GtPDtAiKo8FdLzMABXW8qqQ8M,10
28
- bizydraft-0.2.51.dist-info/RECORD,,
25
+ bizydraft-0.2.53.dist-info/METADATA,sha256=-ZSjsUBtmMEJL52o9Io5S_MO8kcwqhjZBxKGyy36rjw,162
26
+ bizydraft-0.2.53.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
27
+ bizydraft-0.2.53.dist-info/top_level.txt,sha256=XtoBq6hjZhXIM7aas4GtPDtAiKo8FdLzMABXW8qqQ8M,10
28
+ bizydraft-0.2.53.dist-info/RECORD,,