-$fail = false; $retained = Static_Site_Importer_Figma_Import::website_artifact_from_input( $input + array( 'retain_workspace' => true ) ); $evidence = $retained['provenance']['artifact_workspace'] ?? array(); if ( is_wp_error( $retained ) || ! is_dir( $evidence['path'] ?? '' ) || empty( $evidence['expires_at'] ) || 'retained' !== ( $evidence['cleanup']['status'] ?? '' ) ) { throw new RuntimeException( 'retained Figma staging must expose expiry and cleanup evidence' ); } $workspace = new Static_Site_Importer_Artifact_Run_Workspace( sys_get_temp_dir(), substr( basename( $evidence['path'] ), strlen( '.ssi-artifact-run-' ) ) ); if ( 'purged' !== $workspace->purge()['status'] ) { throw new RuntimeException( 'retained Figma workspace must support explicit purge' ); }
0 commit comments