๐Ÿ“ฆโž”๐Ÿฆ‹ Store and retrieve files on the Atmosphere
35
fork

Configure Feed

Select the types of activity you want to include in your feed.

remove _ENABLE_HIDDEN_COMMANDS envvar

Ducky 845514b1 6c2bb515

+16 -50
+16 -50
atfile.sh
··· 833 833 fi 834 834 } 835 835 836 - function atfile.util.print_hidden_command_warning() { 837 - envvar="$1" 838 - echo -e "โš ๏ธ Hidden command ($_command)\n If you know what you're doing, enable with ${_envvar_prefix}_ENABLE_HIDDEN_COMMANDS=1" 839 - } 840 - 841 836 # HACK: We don't normally atfile.say() in the atfile.util.* namespace, but 842 837 # atfile.until.override_actor() is in this namespace and it would be nice 843 838 # to have a debug output for it when called in the main command case ··· 1383 1378 โ†ณ UAS: $(atfile.util.get_uas) 1384 1379 Variables 1385 1380 $(atfile.invoke.debug.print_envvar "DEBUG" $_debug_default) 1386 - $(atfile.invoke.debug.print_envvar "ENABLE_HIDDEN_COMMANDS" $_enable_hidden_commands_default) 1387 1381 $(atfile.invoke.debug.print_envvar "ENDPOINT_PDS") 1388 1382 $(atfile.invoke.debug.print_envvar "ENDPOINT_PLC_DIRECTORY" $_endpoint_plc_directory_default) 1389 1383 $(atfile.invoke.debug.print_envvar "ENDPOINT_RESOLVE_HANDLE" $_endpoint_resolve_handle_default) ··· 2372 2366 2373 2367 ๐Ÿ˜Ž Stay updated with \`$_prog update\` 2374 2368 2375 - Commands (General) 2369 + Commands 2376 2370 $usage_commands 2377 2371 2378 2372 Commands (Tools) ··· 2422 2416 #### Defaults 2423 2417 2424 2418 _debug_default=0 2425 - _enable_hidden_commands_default=0 2426 2419 _endpoint_jetstream_default="wss://jetstream.atproto.tools" 2427 2420 _endpoint_resolve_handle_default="https://zio.blue" # lol wtf is bsky.social 2428 2421 _endpoint_plc_directory_default="https://plc.zio.blue" ··· 2444 2437 #### Set 2445 2438 2446 2439 _debug="$(atfile.util.get_envvar "${_envvar_prefix}_DEBUG" $_debug_default)" 2447 - _enable_hidden_commands="$(atfile.util.get_envvar "${_envvar_prefix}_ENABLE_HIDDEN_COMMANDS" "$_enable_hidden_commands_default")" 2448 2440 _fmt_blob_url="$(atfile.util.get_envvar "${_envvar_prefix}_FMT_BLOB_URL" "$_fmt_blob_url_default")" 2449 2441 _fmt_out_file="$(atfile.util.get_envvar "${_envvar_prefix}_FMT_OUT_FILE" "$_fmt_out_file_default")" 2450 2442 _include_fingerprint="$(atfile.util.get_envvar "${_envvar_prefix}_INCLUDE_FINGERPRINT" "$_include_fingerprint_default")" ··· 2474 2466 2475 2467 if [[ "$0" != "$BASH_SOURCE" ]]; then 2476 2468 _debug=0 2477 - _enable_hidden_commands=1 2478 2469 _is_sourced=1 2479 2470 _output_json=1 2480 2471 fi ··· 2626 2617 2627 2618 case "$_command" in 2628 2619 "blob") 2629 - if [[ "$_enable_hidden_commands" == 1 ]]; then 2630 - case "$2" in 2631 - "list"|"ls"|"l") atfile.invoke.list_blobs "$3" ;; 2632 - "upload"|"u") atfile.invoke.upload_blob "$3" ;; 2633 - *) atfile.die.unknown_command "$(echo "$_command $2" | xargs)" ;; 2634 - esac 2635 - else 2636 - atfile.util.print_hidden_command_warning 2637 - exit 1 2638 - fi 2620 + case "$2" in 2621 + "list"|"ls"|"l") atfile.invoke.list_blobs "$3" ;; 2622 + "upload"|"u") atfile.invoke.upload_blob "$3" ;; 2623 + *) atfile.die.unknown_command "$(echo "$_command $2" | xargs)" ;; 2624 + esac 2639 2625 ;; 2640 2626 "cat") 2641 2627 [[ -z "$2" ]] && atfile.die "<key> not set" ··· 2670 2656 atfile.invoke.download "$2" 1 2671 2657 ;; 2672 2658 "handle") 2673 - if [[ "$_enable_hidden_commands" == 1 ]]; then 2674 - atfile.invoke.handle "$2" 2675 - else 2676 - atfile.util.print_hidden_command_warning 2677 - exit 1 2678 - fi 2659 + atfile.invoke.handle "$2" 2679 2660 ;; 2680 2661 "info") 2681 2662 [[ -z "$2" ]] && atfile.die "<key> not set" ··· 2712 2693 ;; 2713 2694 "record") 2714 2695 # NOTE: Performs no validation (apart from JSON)! Here be dragons 2715 - if [[ "$_enable_hidden_commands" == 1 ]]; then 2716 - case "$2" in 2717 - "add"|"create"|"c") atfile.invoke.manage_record "create" "$3" "$4" ;; 2718 - "get"|"g") atfile.invoke.manage_record "get" "$3" "$4" "$5" ;; 2719 - "put"|"update"|"u") atfile.invoke.manage_record "put" "$3" "$4" ;; 2720 - "rm"|"delete"|"d") atfile.invoke.manage_record "delete" "$3" "$4" ;; 2721 - *) atfile.die.unknown_command "$(echo "$_command $2" | xargs)" ;; 2722 - esac 2723 - else 2724 - atfile.util.print_hidden_command_warning 2725 - exit 1 2726 - fi 2696 + case "$2" in 2697 + "add"|"create"|"c") atfile.invoke.manage_record "create" "$3" "$4" ;; 2698 + "get"|"g") atfile.invoke.manage_record "get" "$3" "$4" "$5" ;; 2699 + "put"|"update"|"u") atfile.invoke.manage_record "put" "$3" "$4" ;; 2700 + "rm"|"delete"|"d") atfile.invoke.manage_record "delete" "$3" "$4" ;; 2701 + *) atfile.die.unknown_command "$(echo "$_command $2" | xargs)" ;; 2702 + esac 2727 2703 ;; 2728 2704 "resolve") 2729 - if [[ "$_enable_hidden_commands" == 1 ]]; then 2730 - atfile.invoke.resolve "$2" 2731 - else 2732 - atfile.util.print_hidden_command_warning 2733 - exit 1 2734 - fi 2705 + atfile.invoke.resolve "$2" 2735 2706 ;; 2736 2707 "something-broke") 2737 2708 atfile.invoke.debug 2738 2709 ;; 2739 2710 "stream") 2740 - if [[ "$_enable_hidden_commands" == 1 ]]; then 2741 - atfile.invoke.stream "$2" 2742 - else 2743 - atfile.util.print_hidden_command_warning 2744 - exit 1 2745 - fi 2711 + atfile.invoke.stream "$2" 2746 2712 ;; 2747 2713 "upload") 2748 2714 atfile.util.check_prog_optional_metadata