@nodaro/shared 3.30.0 → 3.32.0
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/README.md +17 -0
- package/dist/chunk-2NIQO2J3.cjs +54 -0
- package/dist/chunk-2NIQO2J3.cjs.map +1 -0
- package/dist/chunk-2OJIVO7R.cjs +32 -0
- package/dist/chunk-2OJIVO7R.cjs.map +1 -0
- package/dist/chunk-2RF4Z7KG.cjs +803 -0
- package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
- package/dist/chunk-3CUFITU7.js +1905 -0
- package/dist/chunk-3CUFITU7.js.map +1 -0
- package/dist/chunk-3RYKIUAE.js +86 -0
- package/dist/chunk-3RYKIUAE.js.map +1 -0
- package/dist/chunk-44I73CQS.cjs +194 -0
- package/dist/chunk-44I73CQS.cjs.map +1 -0
- package/dist/chunk-5AUSSJIM.cjs +3372 -0
- package/dist/chunk-5AUSSJIM.cjs.map +1 -0
- package/dist/chunk-5PC6JBGJ.cjs +1419 -0
- package/dist/chunk-5PC6JBGJ.cjs.map +1 -0
- package/dist/chunk-5RU2HCW2.js +30 -0
- package/dist/chunk-5RU2HCW2.js.map +1 -0
- package/dist/chunk-5THUHJ3E.js +46 -0
- package/dist/chunk-5THUHJ3E.js.map +1 -0
- package/dist/chunk-5U7VLG43.js +141 -0
- package/dist/chunk-5U7VLG43.js.map +1 -0
- package/dist/chunk-6DAWSVX2.cjs +103 -0
- package/dist/chunk-6DAWSVX2.cjs.map +1 -0
- package/dist/chunk-6DKDOWBL.js +1567 -0
- package/dist/chunk-6DKDOWBL.js.map +1 -0
- package/dist/chunk-6IJOPRZP.cjs +197 -0
- package/dist/chunk-6IJOPRZP.cjs.map +1 -0
- package/dist/chunk-7G7G42KS.js +86 -0
- package/dist/chunk-7G7G42KS.js.map +1 -0
- package/dist/chunk-AINCI23X.js +2171 -0
- package/dist/chunk-AINCI23X.js.map +1 -0
- package/dist/chunk-AROWPFO2.js +773 -0
- package/dist/chunk-AROWPFO2.js.map +1 -0
- package/dist/chunk-AVQK77G6.cjs +2000 -0
- package/dist/chunk-AVQK77G6.cjs.map +1 -0
- package/dist/chunk-C57NEO3X.js +3327 -0
- package/dist/chunk-C57NEO3X.js.map +1 -0
- package/dist/chunk-CK3GK34R.js +1381 -0
- package/dist/chunk-CK3GK34R.js.map +1 -0
- package/dist/chunk-E2TGXG6X.cjs +1770 -0
- package/dist/chunk-E2TGXG6X.cjs.map +1 -0
- package/dist/chunk-EK362Q45.cjs +38 -0
- package/dist/chunk-EK362Q45.cjs.map +1 -0
- package/dist/chunk-FBV5DF6D.js +95 -0
- package/dist/chunk-FBV5DF6D.js.map +1 -0
- package/dist/chunk-FG4E7MTG.cjs +4 -0
- package/dist/chunk-FG4E7MTG.cjs.map +1 -0
- package/dist/chunk-G6IIVKMO.js +26 -0
- package/dist/chunk-G6IIVKMO.js.map +1 -0
- package/dist/chunk-HGC5JNVA.cjs +1503 -0
- package/dist/chunk-HGC5JNVA.cjs.map +1 -0
- package/dist/chunk-HSHCCBIV.js +255 -0
- package/dist/chunk-HSHCCBIV.js.map +1 -0
- package/dist/chunk-IEBZHTPE.js +254 -0
- package/dist/chunk-IEBZHTPE.js.map +1 -0
- package/dist/chunk-ISJDAFKS.js +1604 -0
- package/dist/chunk-ISJDAFKS.js.map +1 -0
- package/dist/chunk-J6KHW2E5.cjs +1963 -0
- package/dist/chunk-J6KHW2E5.cjs.map +1 -0
- package/dist/chunk-J7BMO73N.cjs +114 -0
- package/dist/chunk-J7BMO73N.cjs.map +1 -0
- package/dist/chunk-JL4C5VJ7.cjs +488 -0
- package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
- package/dist/chunk-JSGIEF6Z.cjs +1087 -0
- package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
- package/dist/chunk-JSNV5O2F.cjs +34 -0
- package/dist/chunk-JSNV5O2F.cjs.map +1 -0
- package/dist/chunk-JWA5SGCS.js +203 -0
- package/dist/chunk-JWA5SGCS.js.map +1 -0
- package/dist/chunk-JX5YZ4DH.cjs +430 -0
- package/dist/chunk-JX5YZ4DH.cjs.map +1 -0
- package/dist/chunk-KHCBJ7KD.js +42 -0
- package/dist/chunk-KHCBJ7KD.js.map +1 -0
- package/dist/chunk-KU6S7IYV.cjs +210 -0
- package/dist/chunk-KU6S7IYV.cjs.map +1 -0
- package/dist/chunk-LKAIXWK3.js +181 -0
- package/dist/chunk-LKAIXWK3.js.map +1 -0
- package/dist/chunk-LPW3XNC2.js +471 -0
- package/dist/chunk-LPW3XNC2.js.map +1 -0
- package/dist/chunk-M36G6SRP.js +447 -0
- package/dist/chunk-M36G6SRP.js.map +1 -0
- package/dist/chunk-MRXGWL42.cjs +4 -0
- package/dist/chunk-MRXGWL42.cjs.map +1 -0
- package/dist/chunk-NB72XWXQ.cjs +54 -0
- package/dist/chunk-NB72XWXQ.cjs.map +1 -0
- package/dist/chunk-NEJ2PV4C.cjs +211 -0
- package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
- package/dist/chunk-NT6IJH4L.cjs +273 -0
- package/dist/chunk-NT6IJH4L.cjs.map +1 -0
- package/dist/chunk-O5MP52U2.cjs +526 -0
- package/dist/chunk-O5MP52U2.cjs.map +1 -0
- package/dist/chunk-O7PUQLJ3.cjs +818 -0
- package/dist/chunk-O7PUQLJ3.cjs.map +1 -0
- package/dist/chunk-PQHS255G.js +1369 -0
- package/dist/chunk-PQHS255G.js.map +1 -0
- package/dist/chunk-PRYE7AZQ.cjs +1227 -0
- package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
- package/dist/chunk-Q4CDQ2KO.js +21 -0
- package/dist/chunk-Q4CDQ2KO.js.map +1 -0
- package/dist/chunk-QELDJGDK.cjs +1714 -0
- package/dist/chunk-QELDJGDK.cjs.map +1 -0
- package/dist/chunk-QJRP44ZO.js +769 -0
- package/dist/chunk-QJRP44ZO.js.map +1 -0
- package/dist/chunk-QNGNOU4Z.js +29 -0
- package/dist/chunk-QNGNOU4Z.js.map +1 -0
- package/dist/chunk-RJL7RCEM.cjs +159 -0
- package/dist/chunk-RJL7RCEM.cjs.map +1 -0
- package/dist/chunk-RN3RMBJZ.js +1164 -0
- package/dist/chunk-RN3RMBJZ.js.map +1 -0
- package/dist/chunk-S5DMKUWK.cjs +1273 -0
- package/dist/chunk-S5DMKUWK.cjs.map +1 -0
- package/dist/chunk-SES6GDBQ.cjs +624 -0
- package/dist/chunk-SES6GDBQ.cjs.map +1 -0
- package/dist/chunk-TNPDV7I4.cjs +2346 -0
- package/dist/chunk-TNPDV7I4.cjs.map +1 -0
- package/dist/chunk-TZBIY5C3.js +187 -0
- package/dist/chunk-TZBIY5C3.js.map +1 -0
- package/dist/chunk-TZE673G6.js +3 -0
- package/dist/chunk-TZE673G6.js.map +1 -0
- package/dist/chunk-ULXI7A6Q.cjs +1047 -0
- package/dist/chunk-ULXI7A6Q.cjs.map +1 -0
- package/dist/chunk-VIWSWVAW.js +1782 -0
- package/dist/chunk-VIWSWVAW.js.map +1 -0
- package/dist/chunk-VWGNPMJZ.cjs +19 -0
- package/dist/chunk-VWGNPMJZ.cjs.map +1 -0
- package/dist/chunk-WDIBOWAA.js +1054 -0
- package/dist/chunk-WDIBOWAA.js.map +1 -0
- package/dist/chunk-WNG7HRVA.cjs +25 -0
- package/dist/chunk-WNG7HRVA.cjs.map +1 -0
- package/dist/chunk-WNVQ3SMB.cjs +96 -0
- package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
- package/dist/chunk-WRSWH7US.cjs +285 -0
- package/dist/chunk-WRSWH7US.cjs.map +1 -0
- package/dist/chunk-XAMC4S53.js +17 -0
- package/dist/chunk-XAMC4S53.js.map +1 -0
- package/dist/chunk-XNISPHTZ.js +1039 -0
- package/dist/chunk-XNISPHTZ.js.map +1 -0
- package/dist/chunk-Y2PM3FFL.js +3 -0
- package/dist/chunk-Y2PM3FFL.js.map +1 -0
- package/dist/chunk-YBPBK5KI.js +1030 -0
- package/dist/chunk-YBPBK5KI.js.map +1 -0
- package/dist/chunk-YHRG7UOC.js +31 -0
- package/dist/chunk-YHRG7UOC.js.map +1 -0
- package/dist/chunk-YWNYGYI7.cjs +31 -0
- package/dist/chunk-YWNYGYI7.cjs.map +1 -0
- package/dist/chunk-YYV35XOS.js +122 -0
- package/dist/chunk-YYV35XOS.js.map +1 -0
- package/dist/chunk-Z2OL5AJD.cjs +133 -0
- package/dist/chunk-Z2OL5AJD.cjs.map +1 -0
- package/dist/chunk-Z4AZW6FY.js +920 -0
- package/dist/chunk-Z4AZW6FY.js.map +1 -0
- package/dist/chunk-ZDFHA2EC.js +572 -0
- package/dist/chunk-ZDFHA2EC.js.map +1 -0
- package/dist/chunk-ZNZDQAXN.js +175 -0
- package/dist/chunk-ZNZDQAXN.js.map +1 -0
- package/dist/chunk-ZRL2UFTH.cjs +1073 -0
- package/dist/chunk-ZRL2UFTH.cjs.map +1 -0
- package/dist/chunk-ZT77RY6R.js +404 -0
- package/dist/chunk-ZT77RY6R.js.map +1 -0
- package/dist/entries/apps.cjs +155 -0
- package/dist/entries/apps.cjs.map +1 -0
- package/dist/entries/apps.d.cts +283 -0
- package/dist/entries/apps.d.ts +283 -0
- package/dist/entries/apps.js +10 -0
- package/dist/entries/apps.js.map +1 -0
- package/dist/entries/captions.cjs +124 -0
- package/dist/entries/captions.cjs.map +1 -0
- package/dist/entries/captions.d.cts +354 -0
- package/dist/entries/captions.d.ts +354 -0
- package/dist/entries/captions.js +3 -0
- package/dist/entries/captions.js.map +1 -0
- package/dist/entries/catalogs.cjs +165 -0
- package/dist/entries/catalogs.cjs.map +1 -0
- package/dist/entries/catalogs.d.cts +385 -0
- package/dist/entries/catalogs.d.ts +385 -0
- package/dist/entries/catalogs.js +4 -0
- package/dist/entries/catalogs.js.map +1 -0
- package/dist/entries/credits.cjs +592 -0
- package/dist/entries/credits.cjs.map +1 -0
- package/dist/entries/credits.d.cts +1429 -0
- package/dist/entries/credits.d.ts +1429 -0
- package/dist/entries/credits.js +11 -0
- package/dist/entries/credits.js.map +1 -0
- package/dist/entries/edl.cjs +409 -0
- package/dist/entries/edl.cjs.map +1 -0
- package/dist/entries/edl.d.cts +1199 -0
- package/dist/entries/edl.d.ts +1199 -0
- package/dist/entries/edl.js +4 -0
- package/dist/entries/edl.js.map +1 -0
- package/dist/entries/entities.cjs +530 -0
- package/dist/entries/entities.cjs.map +1 -0
- package/dist/entries/entities.d.cts +1371 -0
- package/dist/entries/entities.d.ts +1371 -0
- package/dist/entries/entities.js +5 -0
- package/dist/entries/entities.js.map +1 -0
- package/dist/entries/i18n.cjs +48 -0
- package/dist/entries/i18n.cjs.map +1 -0
- package/dist/entries/i18n.d.cts +69 -0
- package/dist/entries/i18n.d.ts +69 -0
- package/dist/entries/i18n.js +3 -0
- package/dist/entries/i18n.js.map +1 -0
- package/dist/entries/llm-models.cjs +177 -0
- package/dist/entries/llm-models.cjs.map +1 -0
- package/dist/entries/llm-models.d.cts +435 -0
- package/dist/entries/llm-models.d.ts +435 -0
- package/dist/entries/llm-models.js +4 -0
- package/dist/entries/llm-models.js.map +1 -0
- package/dist/entries/media.cjs +335 -0
- package/dist/entries/media.cjs.map +1 -0
- package/dist/entries/media.d.cts +518 -0
- package/dist/entries/media.d.ts +518 -0
- package/dist/entries/media.js +6 -0
- package/dist/entries/media.js.map +1 -0
- package/dist/entries/model-catalog.cjs +247 -0
- package/dist/entries/model-catalog.cjs.map +1 -0
- package/dist/entries/model-catalog.d.cts +202 -0
- package/dist/entries/model-catalog.d.ts +202 -0
- package/dist/entries/model-catalog.js +6 -0
- package/dist/entries/model-catalog.js.map +1 -0
- package/dist/entries/models.cjs +833 -0
- package/dist/entries/models.cjs.map +1 -0
- package/dist/entries/models.d.cts +287 -0
- package/dist/entries/models.d.ts +287 -0
- package/dist/entries/models.js +8 -0
- package/dist/entries/models.js.map +1 -0
- package/dist/entries/nodes.cjs +789 -0
- package/dist/entries/nodes.cjs.map +1 -0
- package/dist/entries/nodes.d.cts +1600 -0
- package/dist/entries/nodes.d.ts +1600 -0
- package/dist/entries/nodes.js +16 -0
- package/dist/entries/nodes.js.map +1 -0
- package/dist/entries/organizations.cjs +80 -0
- package/dist/entries/organizations.cjs.map +1 -0
- package/dist/entries/organizations.d.cts +466 -0
- package/dist/entries/organizations.d.ts +466 -0
- package/dist/entries/organizations.js +3 -0
- package/dist/entries/organizations.js.map +1 -0
- package/dist/entries/pipeline.cjs +594 -0
- package/dist/entries/pipeline.cjs.map +1 -0
- package/dist/entries/pipeline.d.cts +2617 -0
- package/dist/entries/pipeline.d.ts +2617 -0
- package/dist/entries/pipeline.js +5 -0
- package/dist/entries/pipeline.js.map +1 -0
- package/dist/entries/scene3d.cjs +704 -0
- package/dist/entries/scene3d.cjs.map +1 -0
- package/dist/entries/scene3d.d.cts +4284 -0
- package/dist/entries/scene3d.d.ts +4284 -0
- package/dist/entries/scene3d.js +3 -0
- package/dist/entries/scene3d.js.map +1 -0
- package/dist/entries/social.cjs +714 -0
- package/dist/entries/social.cjs.map +1 -0
- package/dist/entries/social.d.cts +1366 -0
- package/dist/entries/social.d.ts +1366 -0
- package/dist/entries/social.js +5 -0
- package/dist/entries/social.js.map +1 -0
- package/dist/entries/types.cjs +13 -0
- package/dist/entries/types.cjs.map +1 -0
- package/dist/entries/types.d.cts +162 -0
- package/dist/entries/types.d.ts +162 -0
- package/dist/entries/types.js +4 -0
- package/dist/entries/types.js.map +1 -0
- package/dist/entries/ugc.cjs +279 -0
- package/dist/entries/ugc.cjs.map +1 -0
- package/dist/entries/ugc.d.cts +575 -0
- package/dist/entries/ugc.d.ts +575 -0
- package/dist/entries/ugc.js +6 -0
- package/dist/entries/ugc.js.map +1 -0
- package/dist/entries/video.cjs +549 -0
- package/dist/entries/video.cjs.map +1 -0
- package/dist/entries/video.d.cts +1791 -0
- package/dist/entries/video.d.ts +1791 -0
- package/dist/entries/video.js +8 -0
- package/dist/entries/video.js.map +1 -0
- package/dist/entries/workflow.cjs +574 -0
- package/dist/entries/workflow.cjs.map +1 -0
- package/dist/entries/workflow.d.cts +1733 -0
- package/dist/entries/workflow.d.ts +1733 -0
- package/dist/entries/workflow.js +5 -0
- package/dist/entries/workflow.js.map +1 -0
- package/dist/fan-out-meta-Bu6VyXcZ.d.cts +19 -0
- package/dist/fan-out-meta-Bu6VyXcZ.d.ts +19 -0
- package/dist/gemini-omni-voices-zeRXxSbZ.d.cts +174 -0
- package/dist/gemini-omni-voices-zeRXxSbZ.d.ts +174 -0
- package/dist/image-overlay-layers-CyBfRhxJ.d.cts +208 -0
- package/dist/image-overlay-layers-CyBfRhxJ.d.ts +208 -0
- package/dist/index.cjs +7731 -26444
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -23733
- package/dist/index.d.ts +32 -23733
- package/dist/index.js +40 -24641
- package/dist/index.js.map +1 -1
- package/dist/model-catalog-flJYaa-g.d.cts +561 -0
- package/dist/model-catalog-flJYaa-g.d.ts +561 -0
- package/dist/presentation-types-0ENOCjoj.d.cts +61 -0
- package/dist/presentation-types-0ENOCjoj.d.ts +61 -0
- package/dist/presentation-utils-BIqiCzSA.d.cts +90 -0
- package/dist/presentation-utils-BdiObtwq.d.ts +90 -0
- package/dist/scene-node-types-DjenYFLO.d.cts +1949 -0
- package/dist/scene-node-types-DjenYFLO.d.ts +1949 -0
- package/dist/supported-fonts-CRoF1gOy.d.cts +16 -0
- package/dist/supported-fonts-CRoF1gOy.d.ts +16 -0
- package/dist/types-BRlFPEru.d.cts +511 -0
- package/dist/types-BRlFPEru.d.ts +511 -0
- package/dist/types-DffyGSy5.d.cts +67 -0
- package/dist/types-DffyGSy5.d.ts +67 -0
- package/package.json +102 -1
- package/src/__tests__/add-captions-plan.test.ts +6 -2
- package/src/__tests__/caption-edge-dash.test.ts +23 -0
- package/src/__tests__/entity-image-handle.test.ts +61 -1
- package/src/__tests__/fixtures/root-exports.baseline.json +4625 -0
- package/src/__tests__/input-field-extra-keys.test.ts +1 -0
- package/src/__tests__/json-kinds.test.ts +10 -0
- package/src/__tests__/model-seed-capability.test.ts +34 -0
- package/src/__tests__/no-internal-imports.test.ts +1 -1
- package/src/__tests__/node-aspect-ratio.test.ts +25 -0
- package/src/__tests__/node-preset-extract.test.ts +8 -0
- package/src/__tests__/node-run-routes.test.ts +63 -0
- package/src/__tests__/node-runtime-keys.test.ts +70 -0
- package/src/__tests__/package-entries.test.ts +50 -0
- package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
- package/src/__tests__/presentation-utils.test.ts +14 -0
- package/src/__tests__/preview-gate-use-case.test.ts +151 -0
- package/src/__tests__/producer-types.test.ts +15 -0
- package/src/__tests__/run-continuation.test.ts +7 -1
- package/src/__tests__/seedance-draft.test.ts +74 -0
- package/src/__tests__/site-capture-node.test.ts +58 -0
- package/src/__tests__/ugc-clip-saved-list.test.ts +19 -0
- package/src/__tests__/ugc-lane-wires.test.ts +228 -0
- package/src/__tests__/ugc-node-wires.test.ts +606 -0
- package/src/__tests__/ugc-run-state.test.ts +85 -7
- package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
- package/src/__tests__/video-analysis-pricing.test.ts +6 -6
- package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
- package/src/__tests__/workflow-export-strip.test.ts +14 -0
- package/src/add-captions-plan.ts +9 -3
- package/src/caption-edge-dash.ts +33 -0
- package/src/credit-estimators/index.ts +22 -1
- package/src/credit-estimators/pitch-tempo.ts +15 -1
- package/src/credit-estimators/speech.ts +72 -4
- package/src/credit-estimators/unit-quote.ts +52 -0
- package/src/credit-estimators/video-sfx.ts +15 -0
- package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
- package/src/entity-image-handle.ts +50 -1
- package/src/entries/apps.ts +63 -0
- package/src/entries/captions.ts +34 -0
- package/src/entries/catalogs.ts +65 -0
- package/src/entries/credits.ts +104 -0
- package/src/entries/edl.ts +42 -0
- package/src/entries/entities.ts +144 -0
- package/src/entries/i18n.ts +31 -0
- package/src/entries/llm-models.ts +63 -0
- package/src/entries/media.ts +36 -0
- package/src/entries/model-catalog.ts +89 -0
- package/src/entries/models.ts +266 -0
- package/src/entries/nodes.ts +245 -0
- package/src/entries/organizations.ts +9 -0
- package/src/entries/pipeline.ts +43 -0
- package/src/entries/scene3d.ts +27 -0
- package/src/entries/social.ts +297 -0
- package/src/entries/types.ts +26 -0
- package/src/entries/ugc.ts +14 -0
- package/src/entries/video.ts +59 -0
- package/src/entries/workflow.ts +172 -0
- package/src/fan-out-rows.ts +2 -0
- package/src/index.ts +25 -1838
- package/src/json-kinds.ts +13 -0
- package/src/model-catalog.ts +97 -36
- package/src/model-constants.ts +3 -0
- package/src/node-mappable-fields.ts +1 -0
- package/src/node-preset-export.ts +2 -2
- package/src/node-preset-extract.ts +6 -4
- package/src/node-run-routes.ts +78 -0
- package/src/node-runtime-keys.ts +50 -1
- package/src/normalize-node-params.ts +30 -0
- package/src/presentation-utils.ts +8 -0
- package/src/preview-gate.ts +92 -14
- package/src/producer-types.ts +26 -2
- package/src/run-continuation.ts +21 -0
- package/src/seedance-draft.ts +64 -0
- package/src/site-capture-node.ts +82 -0
- package/src/social-post.ts +13 -0
- package/src/ugc-lane-wires.ts +246 -0
- package/src/ugc-node-wires.ts +653 -0
- package/src/ugc-run-state.ts +65 -8
- package/src/video-analysis-pricing.ts +31 -29
- package/src/workflow-export.ts +3 -1
|
@@ -6,6 +6,7 @@ import { INPUT_FIELD_EXTRA_KEYS, INPUT_FIELD_MAP, UGC_OVERRIDABLE_FIELDS, getInp
|
|
|
6
6
|
/** The keys the node actually reads (its data fields). PR B's UgcCreatorData must keep these names. */
|
|
7
7
|
const NODE_READS: Record<string, readonly string[]> = {
|
|
8
8
|
"ugc-creator": ["source", "gender", "photoUrl", "categoryOverride", "seed", "keepResult", "result"],
|
|
9
|
+
"ugc-script": ["targetDurationSec", "language", "keepResult", "result"],
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
describe("INPUT_FIELD_EXTRA_KEYS (spec §6.6)", () => {
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
jsonOutputKind,
|
|
10
10
|
declaredJsonOutput,
|
|
11
11
|
declaredJsonOutputRows,
|
|
12
|
+
UGC_PRIMARY_HANDLE,
|
|
12
13
|
type RenderNodeDescriptor,
|
|
13
14
|
} from "../index.js"
|
|
14
15
|
|
|
@@ -186,4 +187,13 @@ describe("declaredJsonOutput — every JSON pip is classified (decided 2026-10-0
|
|
|
186
187
|
expect(declaredJsonOutput(type, pip)).toBe(kind)
|
|
187
188
|
}
|
|
188
189
|
})
|
|
190
|
+
|
|
191
|
+
it("a UGC node's edge with no source pip reads the UGC wires' primary output, whose JSON is neither kind", () => {
|
|
192
|
+
for (const type of ["ugc-creator", "ugc-script", "ugc-clips", "ugc-cards"]) {
|
|
193
|
+
expect(declaredJsonOutput(type, undefined), type).toBe("other")
|
|
194
|
+
expect(declaredJsonOutput(type, UGC_PRIMARY_HANDLE[type]), type).toBe("other")
|
|
195
|
+
}
|
|
196
|
+
// UGC Clip's only pip is its video: no JSON row at all.
|
|
197
|
+
expect(declaredJsonOutput("ugc-clip", undefined)).toBeUndefined()
|
|
198
|
+
})
|
|
189
199
|
})
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import { MODEL_CATALOG, modelTakesSeed } from "../model-catalog.js"
|
|
3
|
+
|
|
4
|
+
// `noSeed` is the catalog's answer to "does a seed on this model do anything".
|
|
5
|
+
// The editor hides its Seed field off it; the backend's KIE `omitSeed` flags
|
|
6
|
+
// are pinned to it by backend/src/providers/kie/__tests__/seed-capability-parity.test.ts.
|
|
7
|
+
describe("modelTakesSeed", () => {
|
|
8
|
+
it("is false for Seedance 2.5 — the provider refuses a seed", () => {
|
|
9
|
+
expect(modelTakesSeed("seedance-2-5")).toBe(false)
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
it("is false for HappyHorse 1.1 (its schema dropped seed)", () => {
|
|
13
|
+
expect(modelTakesSeed("happyhorse")).toBe(false)
|
|
14
|
+
expect(modelTakesSeed("happyhorse-i2v")).toBe(false)
|
|
15
|
+
expect(modelTakesSeed("happyhorse-ref2v")).toBe(false)
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
it("is true for models that declare nothing", () => {
|
|
19
|
+
expect(modelTakesSeed("veo3")).toBe(true)
|
|
20
|
+
expect(modelTakesSeed("bytedance-lite")).toBe(true)
|
|
21
|
+
expect(modelTakesSeed("seedance-2")).toBe(true)
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
it("is true for an unknown or missing id — never hides a field it knows nothing about", () => {
|
|
25
|
+
expect(modelTakesSeed("not-a-model")).toBe(true)
|
|
26
|
+
expect(modelTakesSeed(undefined)).toBe(true)
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
it("agrees with the catalog flag for every entry", () => {
|
|
30
|
+
for (const m of Object.values(MODEL_CATALOG)) {
|
|
31
|
+
expect(modelTakesSeed(m.id), m.id).toBe(m.noSeed !== true)
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
})
|
|
@@ -19,7 +19,7 @@ function walk(dir: string): string[] {
|
|
|
19
19
|
describe("Apache boundary", () => {
|
|
20
20
|
it("no shared source file imports @nodaro/prompts", () => {
|
|
21
21
|
const offenders = walk(join(__dirname, ".."))
|
|
22
|
-
.filter((f) => /from\s+["']@nodaro\/prompts["']/.test(readFileSync(f, "utf8")))
|
|
22
|
+
.filter((f) => /from\s+["']@nodaro\/prompts(?:\/[\w-]+)?["']/.test(readFileSync(f, "utf8")))
|
|
23
23
|
expect(offenders).toEqual([])
|
|
24
24
|
})
|
|
25
25
|
})
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
import { nodeAspectRatio, PHOTO_AUTO_ASPECT_NODE_TYPES } from "../normalize-node-params.js"
|
|
3
|
+
|
|
4
|
+
describe("nodeAspectRatio — unset is Auto on the photo-Auto nodes", () => {
|
|
5
|
+
it("fills auto for an unset or blank ratio on Generate Image and Modify Image", () => {
|
|
6
|
+
for (const type of PHOTO_AUTO_ASPECT_NODE_TYPES) {
|
|
7
|
+
expect(nodeAspectRatio(type, undefined)).toBe("auto")
|
|
8
|
+
expect(nodeAspectRatio(type, "")).toBe("auto")
|
|
9
|
+
expect(nodeAspectRatio(type, " ")).toBe("auto")
|
|
10
|
+
expect(nodeAspectRatio(type, null)).toBe("auto")
|
|
11
|
+
}
|
|
12
|
+
})
|
|
13
|
+
|
|
14
|
+
it("returns a set ratio untouched", () => {
|
|
15
|
+
expect(nodeAspectRatio("modify-image", "3:4")).toBe("3:4")
|
|
16
|
+
expect(nodeAspectRatio("generate-image", "auto")).toBe("auto")
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
it("leaves every other node type alone", () => {
|
|
20
|
+
expect(nodeAspectRatio("image-to-image", undefined)).toBeUndefined()
|
|
21
|
+
expect(nodeAspectRatio("edit-image", undefined)).toBeUndefined()
|
|
22
|
+
expect(nodeAspectRatio(undefined, undefined)).toBeUndefined()
|
|
23
|
+
expect(nodeAspectRatio("image-to-image", "1:1")).toBe("1:1")
|
|
24
|
+
})
|
|
25
|
+
})
|
|
@@ -296,3 +296,11 @@ describe("caption lever group (applying a caption preset over another)", () => {
|
|
|
296
296
|
for (const k of PRESET_APPLY_CLEAR_KEYS) expect(PRESET_EXCLUDED_KEYS.has(k), k).toBe(true)
|
|
297
297
|
})
|
|
298
298
|
})
|
|
299
|
+
|
|
300
|
+
describe("extractPresetData — a type's own run results under generic names", () => {
|
|
301
|
+
it("drops them from that type's preset, and keeps another node's setting of the same name", () => {
|
|
302
|
+
expect(extractPresetData({ quote: { expected: 1 }, voiceId: "v" }, "ugc-clips")).toEqual({ voiceId: "v" })
|
|
303
|
+
expect(extractPresetData({ quote: "a quote to show" }, "some-future-node")).toEqual({ quote: "a quote to show" })
|
|
304
|
+
expect(extractPresetData({ quote: "a quote to show" })).toEqual({ quote: "a quote to show" })
|
|
305
|
+
})
|
|
306
|
+
})
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest"
|
|
2
|
+
import {
|
|
3
|
+
NODE_RUN_ROUTES,
|
|
4
|
+
NODE_TYPES_WITHOUT_RUN_ROUTE,
|
|
5
|
+
SOCIAL_POST_NODE_PLATFORM,
|
|
6
|
+
SOCIAL_POST_NODE_TYPES,
|
|
7
|
+
nodeRunRoute,
|
|
8
|
+
} from "../index.js"
|
|
9
|
+
|
|
10
|
+
describe("nodeRunRoute", () => {
|
|
11
|
+
it("is POST /v1/<type> for a node that follows the convention", () => {
|
|
12
|
+
expect(nodeRunRoute("generate-image")).toBe("/v1/generate-image")
|
|
13
|
+
expect(nodeRunRoute("pro-3d-render")).toBe("/v1/pro-3d-render")
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
it("names the nested route of a node that does not", () => {
|
|
17
|
+
expect(nodeRunRoute("llm-chat")).toBe("/v1/llm-chat/generate")
|
|
18
|
+
expect(nodeRunRoute("image-to-text")).toBe("/v1/image-to-text/describe")
|
|
19
|
+
expect(nodeRunRoute("video-composer")).toBe("/v1/scene-graph/generate")
|
|
20
|
+
expect(nodeRunRoute("generate-3d-scene")).toBe("/v1/3d-scene/generate")
|
|
21
|
+
expect(nodeRunRoute("suno-generate")).toBe("/v1/suno/generate")
|
|
22
|
+
expect(nodeRunRoute("suno-voice")).toBe("/v1/suno/voice/generate")
|
|
23
|
+
expect(nodeRunRoute("telegram-channel-feed")).toBe("/v1/telegram-channel/fetch")
|
|
24
|
+
expect(nodeRunRoute("ugc-creator")).toBe("/v1/ugc/creator")
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
it("sends every social post node to the one publish route", () => {
|
|
28
|
+
for (const type of SOCIAL_POST_NODE_TYPES) expect(nodeRunRoute(type)).toBe("/v1/social/publish")
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it("is null for a node with no route of its own", () => {
|
|
32
|
+
expect(nodeRunRoute("modify-image")).toBeNull()
|
|
33
|
+
expect(nodeRunRoute("paint-mask")).toBeNull()
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
it("escapes a type that is not a plain slug", () => {
|
|
37
|
+
expect(nodeRunRoute("a/b")).toBe("/v1/a%2Fb")
|
|
38
|
+
})
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
describe("the node route tables", () => {
|
|
42
|
+
it("list only routes that differ from the convention, under /v1/", () => {
|
|
43
|
+
for (const [type, route] of Object.entries(NODE_RUN_ROUTES)) {
|
|
44
|
+
expect(route.startsWith("/v1/"), type).toBe(true)
|
|
45
|
+
expect(route, type).not.toBe(`/v1/${type}`)
|
|
46
|
+
}
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
it("never list a type as both routed and route-less", () => {
|
|
50
|
+
expect(Object.keys(NODE_RUN_ROUTES).filter((t) => t in NODE_TYPES_WITHOUT_RUN_ROUTE)).toEqual([])
|
|
51
|
+
})
|
|
52
|
+
|
|
53
|
+
it("say what to run instead for every route-less type", () => {
|
|
54
|
+
for (const [type, hint] of Object.entries(NODE_TYPES_WITHOUT_RUN_ROUTE)) expect(hint.length, type).toBeGreaterThan(10)
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
it("give every per-platform social node its platform, and only those", () => {
|
|
58
|
+
const perPlatform = [...SOCIAL_POST_NODE_TYPES].filter((t) => t !== "publish-social").sort()
|
|
59
|
+
expect(Object.keys(SOCIAL_POST_NODE_PLATFORM).sort()).toEqual(perPlatform)
|
|
60
|
+
expect(SOCIAL_POST_NODE_PLATFORM["x-post"]).toBe("x")
|
|
61
|
+
expect(SOCIAL_POST_NODE_PLATFORM["youtube-upload"]).toBe("youtube")
|
|
62
|
+
})
|
|
63
|
+
})
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { describe, it, expect } from "vitest"
|
|
2
2
|
import {
|
|
3
3
|
EXECUTION_DATA_KEYS,
|
|
4
|
+
NODE_TYPE_EXECUTION_DATA_KEYS,
|
|
4
5
|
TRANSIENT_RUNTIME_KEYS,
|
|
6
|
+
UGC_CREATOR_CANDIDATES_KEY,
|
|
7
|
+
executionDataKeysOf,
|
|
8
|
+
isExecutionDataKey,
|
|
5
9
|
stripTransientRuntimeData,
|
|
6
10
|
} from "../index.js"
|
|
7
11
|
|
|
@@ -69,10 +73,76 @@ describe("TRANSIENT_RUNTIME_KEYS", () => {
|
|
|
69
73
|
})
|
|
70
74
|
})
|
|
71
75
|
|
|
76
|
+
describe("a use-case node's continuation", () => {
|
|
77
|
+
it("is one run's, never saved: a save strips it, so a saved one cannot turn a later run into a continuation", () => {
|
|
78
|
+
expect(EXECUTION_DATA_KEYS.has("useCaseContinue")).toBe(true)
|
|
79
|
+
expect(TRANSIENT_RUNTIME_KEYS.has("useCaseContinue")).toBe(true)
|
|
80
|
+
const [saved] = stripTransientRuntimeData([{ data: { useCaseContinue: { mode: "from-failed", jobId: "j1" }, captions: true } }])
|
|
81
|
+
expect(saved!.data).toEqual({ captions: true })
|
|
82
|
+
})
|
|
83
|
+
})
|
|
84
|
+
|
|
72
85
|
describe("EXECUTION_DATA_KEYS", () => {
|
|
73
86
|
it("files the clear-results watermark as runtime bookkeeping — never preset / template / copilot-visible config", () => {
|
|
74
87
|
expect(EXECUTION_DATA_KEYS.has("resultsClearedAt")).toBe(true)
|
|
75
88
|
})
|
|
89
|
+
|
|
90
|
+
it("files a UGC run's own fields as run results of the UGC types only: a run writing them is never an undo step, and they persist", () => {
|
|
91
|
+
// What the UGC lanes write beside the generic keys: the outputs a node hands on, UGC Creator's
|
|
92
|
+
// options of a draw and their note, UGC Clips' quote, UGC Clip's warnings, length and Re-render marks.
|
|
93
|
+
const own: Record<string, readonly string[]> = {
|
|
94
|
+
"ugc-creator": ["ugcOutputs", UGC_CREATOR_CANDIDATES_KEY, "optionFailed"],
|
|
95
|
+
"ugc-script": ["ugcOutputs"],
|
|
96
|
+
"ugc-clips": ["ugcOutputs", "quote"],
|
|
97
|
+
"ugc-clip": ["ugcOutputs", "clipWarnings", "durationSec", "rerenderPending"],
|
|
98
|
+
"ugc-cards": ["ugcOutputs"],
|
|
99
|
+
}
|
|
100
|
+
for (const [type, keys] of Object.entries(own)) {
|
|
101
|
+
for (const key of keys) {
|
|
102
|
+
expect(isExecutionDataKey(key, type), `${type}.${key}`).toBe(true)
|
|
103
|
+
expect(TRANSIENT_RUNTIME_KEYS.has(key), `${key} must stay persisted`).toBe(false)
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
// A fan-out's notes rows are every fan-out's, whatever the node.
|
|
107
|
+
expect(EXECUTION_DATA_KEYS.has("__listResultMeta")).toBe(true)
|
|
108
|
+
})
|
|
109
|
+
|
|
110
|
+
it("never files those generic names as run state of another node: a setting stored under one stays a setting", () => {
|
|
111
|
+
for (const key of ["ugcOutputs", UGC_CREATOR_CANDIDATES_KEY, "optionFailed", "quote", "clipWarnings", "durationSec", "rerenderPending"]) {
|
|
112
|
+
expect(EXECUTION_DATA_KEYS.has(key), `${key} must not be global`).toBe(false)
|
|
113
|
+
expect(isExecutionDataKey(key, "llm-chat"), key).toBe(false)
|
|
114
|
+
expect(isExecutionDataKey(key, "video-overlay"), key).toBe(false)
|
|
115
|
+
expect(isExecutionDataKey(key, undefined), key).toBe(false)
|
|
116
|
+
}
|
|
117
|
+
// Each type's list is its own: UGC Clips' quote is not UGC Script's.
|
|
118
|
+
expect(isExecutionDataKey("quote", "ugc-script")).toBe(false)
|
|
119
|
+
expect(isExecutionDataKey("candidates", "ugc-clip")).toBe(false)
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
it("files only UGC types' generic names: Video Overlay's results stay as every other surface reads them", () => {
|
|
123
|
+
// Presets capture them, Reset clears them, exports and the Copilot keep them — as on any node.
|
|
124
|
+
for (const key of ["durationSec", "width", "height", "warnings", "resultCompositionKey"]) {
|
|
125
|
+
expect(isExecutionDataKey(key, "video-overlay"), key).toBe(false)
|
|
126
|
+
}
|
|
127
|
+
expect(executionDataKeysOf("video-overlay")).toBe(EXECUTION_DATA_KEYS)
|
|
128
|
+
for (const type of Object.keys(NODE_TYPE_EXECUTION_DATA_KEYS)) expect(type, type).toMatch(/^ugc-/)
|
|
129
|
+
})
|
|
130
|
+
|
|
131
|
+
it("a type's own keys come with every global one, as a set", () => {
|
|
132
|
+
const ugcClip = executionDataKeysOf("ugc-clip")
|
|
133
|
+
for (const key of EXECUTION_DATA_KEYS) expect(ugcClip.has(key), key).toBe(true)
|
|
134
|
+
expect(ugcClip.has("clipWarnings")).toBe(true)
|
|
135
|
+
expect(executionDataKeysOf("llm-chat")).toBe(EXECUTION_DATA_KEYS)
|
|
136
|
+
expect(executionDataKeysOf(undefined)).toBe(EXECUTION_DATA_KEYS)
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
it("never files a UGC node's choices as run state: an edit of one stays undoable", () => {
|
|
140
|
+
for (const key of ["keepResult", "rerender", "voiceId", "source", "gender", "photoUrl", "categoryOverride", "seed", "targetDurationSec"]) {
|
|
141
|
+
for (const type of ["ugc-creator", "ugc-script", "ugc-clips", "ugc-clip", "ugc-cards"]) {
|
|
142
|
+
expect(isExecutionDataKey(key, type), `${type}.${key}`).toBe(false)
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
})
|
|
76
146
|
})
|
|
77
147
|
|
|
78
148
|
describe("stripTransientRuntimeData", () => {
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The subpath entries of @nodaro/shared (`@nodaro/shared/<entry>`, one per
|
|
3
|
+
* domain in src/entries/) — additive to the root, which stays the union of them.
|
|
4
|
+
*
|
|
5
|
+
* External consumers pin older versions and import only the root, so the root
|
|
6
|
+
* may only grow (baseline: fixtures/root-exports.baseline.json). Most checks
|
|
7
|
+
* read the BUILT dist, which is what consumers load — CI builds the packages
|
|
8
|
+
* before this suite runs; locally run `npm run build:packages` first.
|
|
9
|
+
*
|
|
10
|
+
* The checks live in tools/package-entries/entries-guard.mjs (shared with
|
|
11
|
+
* @nodaro/prompts); each returns the problems it found.
|
|
12
|
+
*/
|
|
13
|
+
import path from "node:path"
|
|
14
|
+
import { fileURLToPath } from "node:url"
|
|
15
|
+
import { describe, expect, it } from "vitest"
|
|
16
|
+
// @ts-expect-error — untyped .mjs tooling module
|
|
17
|
+
import * as guard from "../../../../tools/package-entries/entries-guard.mjs"
|
|
18
|
+
|
|
19
|
+
const PKG_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..", "..")
|
|
20
|
+
const PKG = "@nodaro/shared"
|
|
21
|
+
|
|
22
|
+
describe("@nodaro/shared subpath entries", () => {
|
|
23
|
+
it("src/index.ts only re-exports every entry in src/entries/", () => {
|
|
24
|
+
expect(guard.indexShapeErrors(PKG_DIR)).toEqual([])
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
it("package.json exports = the unchanged root + one subpath per entry", () => {
|
|
28
|
+
expect(guard.exportsMapErrors(PKG_DIR)).toEqual([])
|
|
29
|
+
})
|
|
30
|
+
|
|
31
|
+
it("every exports target is built", () => {
|
|
32
|
+
expect(guard.distFileErrors(PKG_DIR)).toEqual([])
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
it("the root still exports every baseline name (types d.ts + d.cts, values ESM + CJS)", async () => {
|
|
36
|
+
expect(await guard.rootAdditiveErrors(PKG_DIR)).toEqual([])
|
|
37
|
+
}, 60_000)
|
|
38
|
+
|
|
39
|
+
it("the root's names are exactly the union of the entries' names, each with one owner", () => {
|
|
40
|
+
expect(guard.unionErrors(PKG_DIR, {})).toEqual([])
|
|
41
|
+
}, 60_000)
|
|
42
|
+
|
|
43
|
+
it("each subpath's types resolve from a consumer (bundler + NodeNext)", () => {
|
|
44
|
+
expect(guard.typeResolutionErrors(PKG_DIR, PKG)).toEqual([])
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
it("each subpath loads ALONE by package name (fresh process, ESM + CJS) and shares the root's instances", async () => {
|
|
48
|
+
expect(await guard.consumerLoadErrors(PKG_DIR, PKG)).toEqual([])
|
|
49
|
+
}, 120_000)
|
|
50
|
+
})
|
|
@@ -60,3 +60,24 @@ describe("pitch-tempo pricing", () => {
|
|
|
60
60
|
expect(semitonesToPitchRatio(3)).toBeCloseTo(1.189207, 6)
|
|
61
61
|
})
|
|
62
62
|
})
|
|
63
|
+
|
|
64
|
+
// A quote before a run names the id the run reserves for a known length, and
|
|
65
|
+
// the most a run can be charged for an unknown one (decided 2026-10-13): the
|
|
66
|
+
// run measures the file before it reserves and refuses one it cannot measure.
|
|
67
|
+
describe("the quote of an input of unknown length", () => {
|
|
68
|
+
it("Pitch & Tempo: a known length's started minutes, else 30 minutes", async () => {
|
|
69
|
+
const { pitchTempoQuoteCreditId } = await import("../index.js")
|
|
70
|
+
expect(pitchTempoQuoteCreditId(190)).toBe("pitch-tempo:4m")
|
|
71
|
+
expect(pitchTempoQuoteCreditId(45)).toBe("pitch-tempo:1m")
|
|
72
|
+
for (const unknown of [undefined, null, 0, -3, Number.NaN]) expect(pitchTempoQuoteCreditId(unknown)).toBe("pitch-tempo:30m")
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
it("Video SFX: a known length's row, else the 300-second row", async () => {
|
|
76
|
+
const { videoSfxQuoteCreditId, videoSfxCreditId } = await import("../index.js")
|
|
77
|
+
expect(videoSfxQuoteCreditId(12)).toBe("replicate-mmaudio:15s")
|
|
78
|
+
expect(videoSfxQuoteCreditId(12)).toBe(videoSfxCreditId(12))
|
|
79
|
+
for (const unknown of [undefined, null, 0, Number.NaN]) expect(videoSfxQuoteCreditId(unknown)).toBe("replicate-mmaudio:300s")
|
|
80
|
+
// The charge of an unmeasurable clip stays the 8-second row — never above the quote.
|
|
81
|
+
expect(videoSfxCreditId(undefined)).toBe("replicate-mmaudio:8s")
|
|
82
|
+
})
|
|
83
|
+
})
|
|
@@ -1185,6 +1185,20 @@ describe("getOutputType — derived from the producer vocabularies", () => {
|
|
|
1185
1185
|
})
|
|
1186
1186
|
})
|
|
1187
1187
|
|
|
1188
|
+
describe("UGC Cards' Notes are its text output", () => {
|
|
1189
|
+
// A published app shows UGC Cards as its Notes card: a text card, never a JSON blob.
|
|
1190
|
+
it("types UGC Cards as text, and leaves the other UGC nodes as they were", () => {
|
|
1191
|
+
expect(getOutputType("ugc-cards")).toBe("text")
|
|
1192
|
+
expect(getOutputType("ugc-clip")).toBe("video")
|
|
1193
|
+
for (const t of ["ugc-creator", "ugc-script", "ugc-clips"]) expect([t, getOutputType(t)]).toEqual([t, "data"])
|
|
1194
|
+
})
|
|
1195
|
+
|
|
1196
|
+
it("reads the Notes the editor writes on the node (generatedText) as its text", () => {
|
|
1197
|
+
const data = { label: "UGC Cards", result: { layerPlan: "[]", captionPlan: "{}", report: "No issues." }, generatedText: "No issues." }
|
|
1198
|
+
expect(getNodeResult(data)).toEqual({ url: undefined, text: "No issues." })
|
|
1199
|
+
})
|
|
1200
|
+
})
|
|
1201
|
+
|
|
1188
1202
|
describe("published-app / API-token output mapping for 3D Render Pro", () => {
|
|
1189
1203
|
const proNode = mkNode("pro", "pro-3d-render", { presentationOutput: true, label: "Render" })
|
|
1190
1204
|
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { describe, it, expect } from "vitest"
|
|
2
|
+
// Through the package index: both engines and the editor read the hold from here.
|
|
3
|
+
import {
|
|
4
|
+
PREVIEW_RENDER_NODE_TYPES,
|
|
5
|
+
REVIEW_HOLDING_USE_CASE_TYPES,
|
|
6
|
+
isPreviewHoldingType,
|
|
7
|
+
previewStops,
|
|
8
|
+
rendersAsPreview,
|
|
9
|
+
withRunOverrides,
|
|
10
|
+
PREVIEW_REVIEW_REQUIRED,
|
|
11
|
+
PREVIEW_REVIEW_REQUIRED_REVIEW_ON,
|
|
12
|
+
PREVIEW_REVIEW_REQUIRED_MIXED,
|
|
13
|
+
PREVIEW_RENDER_NESTED,
|
|
14
|
+
PREVIEW_RENDER_NESTED_REVIEW_ON,
|
|
15
|
+
PREVIEW_RENDER_NESTED_MIXED,
|
|
16
|
+
isPreviewRefusalCode,
|
|
17
|
+
} from "../index.js"
|
|
18
|
+
|
|
19
|
+
const rec = { id: "rec", type: "upload-video", data: {} }
|
|
20
|
+
const t1 = (data: Record<string, unknown>) => ({ id: "t1", type: "tighten-episode", data })
|
|
21
|
+
const fmt = { id: "fmt", type: "social-media-format", data: {} }
|
|
22
|
+
const post = { id: "post", type: "webhook-output", data: {} }
|
|
23
|
+
const edges = [
|
|
24
|
+
{ source: "rec", target: "t1" },
|
|
25
|
+
{ source: "t1", target: "fmt", sourceHandle: "media" },
|
|
26
|
+
{ source: "fmt", target: "post" },
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
describe("a review-on use-case node holds what follows it until its Render final", () => {
|
|
30
|
+
it("is a preview-holding type without joining the render set", () => {
|
|
31
|
+
expect([...REVIEW_HOLDING_USE_CASE_TYPES]).toEqual(["tighten-episode"])
|
|
32
|
+
expect(isPreviewHoldingType("tighten-episode")).toBe(true)
|
|
33
|
+
expect(isPreviewHoldingType("apply-edl")).toBe(true)
|
|
34
|
+
expect(isPreviewHoldingType("speaker-view")).toBe(true)
|
|
35
|
+
expect(isPreviewHoldingType("social-media-format")).toBe(false)
|
|
36
|
+
expect(isPreviewHoldingType(undefined)).toBe(false)
|
|
37
|
+
expect(isPreviewHoldingType(null)).toBe(false)
|
|
38
|
+
expect(PREVIEW_RENDER_NODE_TYPES.has("tighten-episode")).toBe(false)
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
it("review on: holds its descendants when it executes", () => {
|
|
42
|
+
const stops = previewStops([rec, t1({ reviewBeforeRender: true }), fmt, post], edges)
|
|
43
|
+
expect(stops.previewRenderIds).toEqual(["t1"])
|
|
44
|
+
expect([...stops.gatedNodeIds].sort()).toEqual(["fmt", "post"])
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
it("review off: holds nothing", () => {
|
|
48
|
+
expect(previewStops([rec, t1({}), fmt, post], edges).gatedNodeIds.size).toBe(0)
|
|
49
|
+
expect(previewStops([rec, t1({ reviewBeforeRender: false }), fmt, post], edges).gatedNodeIds.size).toBe(0)
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
it("a quality field on the node does not decide it: review does", () => {
|
|
53
|
+
expect(rendersAsPreview(t1({ quality: "proxy" }))).toBe(false)
|
|
54
|
+
expect(rendersAsPreview(t1({ reviewBeforeRender: true, quality: "final" }))).toBe(true)
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
it("its Render final (a render-final continuation naming its run) releases them", () => {
|
|
58
|
+
const node = t1({ reviewBeforeRender: true, useCaseContinue: { mode: "render-final", jobId: "job-1" } })
|
|
59
|
+
expect(rendersAsPreview(node)).toBe(false)
|
|
60
|
+
expect(previewStops([rec, node, fmt, post], edges).gatedNodeIds.size).toBe(0)
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
it("the continuation set as a run override releases them too", () => {
|
|
64
|
+
const graph = withRunOverrides([rec, t1({ reviewBeforeRender: true }), fmt, post], {
|
|
65
|
+
t1: { useCaseContinue: { mode: "render-final", jobId: "job-1" } },
|
|
66
|
+
})
|
|
67
|
+
expect(previewStops(graph, edges).gatedNodeIds.size).toBe(0)
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
it("a continuation the node would not run as one still holds: no run named, or a continue from a failure", () => {
|
|
71
|
+
// The executor runs a fresh review-on run when the continuation names no
|
|
72
|
+
// run, so what follows would build on its preview.
|
|
73
|
+
expect(rendersAsPreview(t1({ reviewBeforeRender: true, useCaseContinue: { mode: "render-final" } }))).toBe(true)
|
|
74
|
+
expect(rendersAsPreview(t1({ reviewBeforeRender: true, useCaseContinue: { mode: "render-final", jobId: 7 } }))).toBe(true)
|
|
75
|
+
// A continue from a failure finishes the run it continues: a review-on run's preview.
|
|
76
|
+
expect(rendersAsPreview(t1({ reviewBeforeRender: true, useCaseContinue: { mode: "from-failed", jobId: "job-1" } }))).toBe(true)
|
|
77
|
+
})
|
|
78
|
+
|
|
79
|
+
it("not executing, a saved Preview take holds them (the run view, a continuation of something else)", () => {
|
|
80
|
+
const stops = previewStops([rec, t1({ reviewBeforeRender: true }), fmt, post], edges, {
|
|
81
|
+
executes: () => false,
|
|
82
|
+
savedRenders: {
|
|
83
|
+
output: (d) => ((d as { reviewBeforeRender?: boolean }).reviewBeforeRender ? { quality: "proxy" } : undefined),
|
|
84
|
+
batch: () => undefined,
|
|
85
|
+
},
|
|
86
|
+
})
|
|
87
|
+
expect(stops.savedPreviewRenderIds).toEqual(["t1"])
|
|
88
|
+
expect([...stops.gatedNodeIds].sort()).toEqual(["fmt", "post"])
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
it("not executing, a saved Final take holds nothing", () => {
|
|
92
|
+
const stops = previewStops([rec, t1({ reviewBeforeRender: true }), fmt, post], edges, {
|
|
93
|
+
executes: () => false,
|
|
94
|
+
savedRenders: { output: () => ({ quality: "final" }), batch: () => undefined },
|
|
95
|
+
})
|
|
96
|
+
expect(stops.gatedNodeIds.size).toBe(0)
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
describe("the preview refusal codes", () => {
|
|
101
|
+
it("six codes, one predicate: the render's two (and every older row's) plus a review-on and a mixed one of each", () => {
|
|
102
|
+
const codes = [
|
|
103
|
+
PREVIEW_REVIEW_REQUIRED,
|
|
104
|
+
PREVIEW_REVIEW_REQUIRED_REVIEW_ON,
|
|
105
|
+
PREVIEW_REVIEW_REQUIRED_MIXED,
|
|
106
|
+
PREVIEW_RENDER_NESTED,
|
|
107
|
+
PREVIEW_RENDER_NESTED_REVIEW_ON,
|
|
108
|
+
PREVIEW_RENDER_NESTED_MIXED,
|
|
109
|
+
]
|
|
110
|
+
expect(new Set(codes).size).toBe(6)
|
|
111
|
+
for (const code of codes) {
|
|
112
|
+
expect(code).toMatch(/^[a-z_]+$/)
|
|
113
|
+
expect(isPreviewRefusalCode(code)).toBe(true)
|
|
114
|
+
}
|
|
115
|
+
expect(PREVIEW_REVIEW_REQUIRED).toBe("preview_review_required")
|
|
116
|
+
expect(PREVIEW_RENDER_NESTED).toBe("preview_render_nested")
|
|
117
|
+
for (const other of ["continuation_not_found", "", undefined, null, 7]) expect(isPreviewRefusalCode(other)).toBe(false)
|
|
118
|
+
})
|
|
119
|
+
})
|
|
120
|
+
|
|
121
|
+
describe("a continuation saved on the graph is never a run's (the engine's rule, in the shared funnel)", () => {
|
|
122
|
+
const saved = (cont: Record<string, unknown>) => [rec, t1({ reviewBeforeRender: true, useCaseContinue: cont }), fmt, post]
|
|
123
|
+
|
|
124
|
+
it("a saved render-final naming a run, with no override: dropped — the node is a Preview and holds what follows", () => {
|
|
125
|
+
const graph = withRunOverrides(saved({ mode: "render-final", jobId: "job-old" }), undefined)
|
|
126
|
+
const node = graph.find((n) => n.id === "t1")!
|
|
127
|
+
expect(node.data).not.toHaveProperty("useCaseContinue")
|
|
128
|
+
expect(rendersAsPreview(node)).toBe(true)
|
|
129
|
+
expect([...previewStops(graph, edges).gatedNodeIds].sort()).toEqual(["fmt", "post"])
|
|
130
|
+
// Overrides for other nodes drop it too.
|
|
131
|
+
expect(withRunOverrides(saved({ mode: "render-final", jobId: "job-old" }), { fmt: { x: 1 } }).find((n) => n.id === "t1")!.data).not.toHaveProperty("useCaseContinue")
|
|
132
|
+
})
|
|
133
|
+
|
|
134
|
+
it("this run's own override still sets it, over a stale saved one", () => {
|
|
135
|
+
const graph = withRunOverrides(saved({ mode: "from-failed", jobId: "job-old" }), { t1: { useCaseContinue: { mode: "render-final", jobId: "job-1" } } })
|
|
136
|
+
const node = graph.find((n) => n.id === "t1")!
|
|
137
|
+
expect((node.data as Record<string, unknown>).useCaseContinue).toEqual({ mode: "render-final", jobId: "job-1" })
|
|
138
|
+
expect(rendersAsPreview(node)).toBe(false)
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
it("is applied once, to the saved graph: a second pass drops the continuation the first set", () => {
|
|
142
|
+
const once = withRunOverrides(saved({}), { t1: { useCaseContinue: { mode: "render-final", jobId: "job-1" } } })
|
|
143
|
+
expect(withRunOverrides(once, undefined).find((n) => n.id === "t1")!.data).not.toHaveProperty("useCaseContinue")
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
it("a node with neither an override nor a saved run-only field is returned as is", () => {
|
|
147
|
+
const nodes = [rec, t1({ reviewBeforeRender: true }), fmt]
|
|
148
|
+
const out = withRunOverrides(nodes, undefined)
|
|
149
|
+
out.forEach((n, i) => expect(n).toBe(nodes[i]))
|
|
150
|
+
})
|
|
151
|
+
})
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
listResultsServeHandle,
|
|
10
10
|
} from "../producer-types.js"
|
|
11
11
|
import { getOutputType } from "../presentation-utils.js"
|
|
12
|
+
import { UGC_PRIMARY_HANDLE } from "../ugc-node-wires.js"
|
|
12
13
|
|
|
13
14
|
/**
|
|
14
15
|
* Producer-set membership is what every downstream node's typed-handle
|
|
@@ -105,6 +106,10 @@ describe("producer-types", () => {
|
|
|
105
106
|
it("registers video-overlay as a video producer", () => {
|
|
106
107
|
expect(VIDEO_PRODUCER_TYPES.has("video-overlay")).toBe(true)
|
|
107
108
|
})
|
|
109
|
+
// UGC Clip renders one clip of a UGC video → emits a video URL on `video-out`.
|
|
110
|
+
it("registers ugc-clip as a video producer", () => {
|
|
111
|
+
expect(VIDEO_PRODUCER_TYPES.has("ugc-clip")).toBe(true)
|
|
112
|
+
})
|
|
108
113
|
})
|
|
109
114
|
|
|
110
115
|
// Per-handle "each" defaults (decided 2026-10-04): Camera Switch run once per
|
|
@@ -123,6 +128,16 @@ describe("defaultEdgeOutputMode / listResultsServeHandle", () => {
|
|
|
123
128
|
expect(defaultEdgeOutputMode("camera-switch", null)).toBe("each")
|
|
124
129
|
expect(defaultEdgeOutputMode("camera-switch", "transcript")).toBe("last")
|
|
125
130
|
})
|
|
131
|
+
it("UGC Clips: only the clips handle (and no handle = clips) is each; plan-out and transcript are one value", () => {
|
|
132
|
+
expect(FAN_OUT_EACH_HANDLES["ugc-clips"]).toEqual({ each: ["clips"], primary: "clips" })
|
|
133
|
+
// One source for the output an edge with no handle reads: the UGC wires' own.
|
|
134
|
+
expect(FAN_OUT_EACH_HANDLES["ugc-clips"]!.primary).toBe(UGC_PRIMARY_HANDLE["ugc-clips"])
|
|
135
|
+
expect(defaultEdgeOutputMode("ugc-clips", "clips")).toBe("each")
|
|
136
|
+
expect(defaultEdgeOutputMode("ugc-clips", undefined)).toBe("each")
|
|
137
|
+
expect(defaultEdgeOutputMode("ugc-clips", "plan-out")).toBe("last")
|
|
138
|
+
expect(defaultEdgeOutputMode("ugc-clips", "transcript")).toBe("last")
|
|
139
|
+
expect(listResultsServeHandle("ugc-clips", "plan-out")).toBe(false)
|
|
140
|
+
})
|
|
126
141
|
it("only the each handles read the per-iteration results", () => {
|
|
127
142
|
expect(listResultsServeHandle("camera-switch", "edl")).toBe(true)
|
|
128
143
|
expect(listResultsServeHandle("camera-switch", undefined)).toBe(true)
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { describe, expect, it } from "vitest"
|
|
2
2
|
import {
|
|
3
3
|
CONTINUATION_NOT_COMPLETED,
|
|
4
|
+
CONTINUATION_NOT_FAILED,
|
|
4
5
|
CONTINUATION_NOT_FOUND,
|
|
5
6
|
CONTINUATION_SUBSET_REQUIRED,
|
|
7
|
+
CONTINUATION_SUPERSEDED,
|
|
6
8
|
CONTINUATION_VERSION_MISMATCH,
|
|
7
9
|
CONTINUATION_WORKFLOW_MISMATCH,
|
|
8
10
|
RUN_CONTINUATION_CODES,
|
|
@@ -15,15 +17,19 @@ describe("run continuation refusal codes", () => {
|
|
|
15
17
|
expect(CONTINUATION_VERSION_MISMATCH).toBe("continuation_version_mismatch")
|
|
16
18
|
expect(CONTINUATION_NOT_COMPLETED).toBe("continuation_not_completed")
|
|
17
19
|
expect(CONTINUATION_SUBSET_REQUIRED).toBe("continuation_subset_required")
|
|
20
|
+
expect(CONTINUATION_NOT_FAILED).toBe("continuation_not_failed")
|
|
21
|
+
expect(CONTINUATION_SUPERSEDED).toBe("continuation_superseded")
|
|
18
22
|
})
|
|
19
23
|
|
|
20
24
|
it("lists every code once", () => {
|
|
21
|
-
expect(new Set(RUN_CONTINUATION_CODES).size).toBe(
|
|
25
|
+
expect(new Set(RUN_CONTINUATION_CODES).size).toBe(7)
|
|
22
26
|
expect([...RUN_CONTINUATION_CODES].sort()).toEqual(
|
|
23
27
|
[
|
|
24
28
|
CONTINUATION_NOT_COMPLETED,
|
|
29
|
+
CONTINUATION_NOT_FAILED,
|
|
25
30
|
CONTINUATION_NOT_FOUND,
|
|
26
31
|
CONTINUATION_SUBSET_REQUIRED,
|
|
32
|
+
CONTINUATION_SUPERSEDED,
|
|
27
33
|
CONTINUATION_VERSION_MISMATCH,
|
|
28
34
|
CONTINUATION_WORKFLOW_MISMATCH,
|
|
29
35
|
].sort(),
|