update sublime packages
This commit is contained in:
parent
0dbcb07327
commit
6c8947e087
99 changed files with 7356 additions and 7 deletions
|
|
@ -48,7 +48,7 @@ class SetLineEndingWindowCommand(sublime_plugin.TextCommand):
|
|||
sublime.active_window().focus_view(active_view);
|
||||
|
||||
def is_enabled(self):
|
||||
return len(sublime.active_window().views())
|
||||
return len(sublime.active_window().views()) > 0
|
||||
|
||||
class ConvertIndentationWindowCommand(sublime_plugin.TextCommand):
|
||||
|
||||
|
|
@ -64,4 +64,4 @@ class ConvertIndentationWindowCommand(sublime_plugin.TextCommand):
|
|||
|
||||
|
||||
def is_enabled(self):
|
||||
return len(sublime.active_window().views())
|
||||
return len(sublime.active_window().views()) > 0
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{"url": "https://github.com/SublimeText/LineEndings", "version": "2013.02.23.18.50.15", "description": "On statusbar and on command palete."}
|
||||
{"url": "https://github.com/SublimeText/LineEndings", "version": "2013.03.16.11.27.12", "description": "On statusbar and on command palete."}
|
||||
|
|
@ -22,4 +22,5 @@ Install this repository via "Package Control" http://wbond.net/sublime_packages/
|
|||
|
||||
# Contributors
|
||||
|
||||
* polyvertex
|
||||
* polyvertex
|
||||
* Nicholas Buse
|
||||
34
sublime/Packages/SFTP/Context.sublime-menu
Normal file
34
sublime/Packages/SFTP/Context.sublime-menu
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[
|
||||
{ "caption": "-" },
|
||||
{
|
||||
"caption": "SFTP/FTP",
|
||||
"children":
|
||||
[
|
||||
{ "caption": "Upload File", "command": "sftp_upload_file" },
|
||||
{ "caption": "Upload Open Files", "command": "sftp_upload_open_files" },
|
||||
{ "caption": "Download File", "command": "sftp_download_file" },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Upload Folder", "command": "sftp_upload_folder" },
|
||||
{ "caption": "Download Folder", "command": "sftp_download_folder" },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Diff Remote File", "command": "sftp_diff_remote_file" },
|
||||
{ "caption": "Rename Local and Remote Files", "command": "sftp_rename_local_and_remote_paths" },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Delete Local and Remote Files", "command": "sftp_delete_local_and_remote_paths" },
|
||||
{ "caption": "Delete Remote File", "command": "sftp_delete_remote_path" },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Sync Local -> Remote…", "command": "sftp_sync_up" },
|
||||
{ "caption": "Sync Remote -> Local…", "command": "sftp_sync_down" },
|
||||
{ "caption": "Sync Both Directions…", "command": "sftp_sync_both" },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Monitor File (Upload on External Save)", "command": "sftp_monitor_file" },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Browse Remote…", "command": "sftp_browse" },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Map to Remote…", "command": "sftp_create_config" },
|
||||
{ "caption": "Edit Remote Mapping…", "command": "sftp_edit_config" },
|
||||
{ "caption": "Add Alternate Remote Mapping…", "command": "sftp_create_alt_config" },
|
||||
{ "caption": "Switch Remote Mapping…", "command": "sftp_switch_config" }
|
||||
]
|
||||
}
|
||||
]
|
||||
26
sublime/Packages/SFTP/Default (Linux).sublime-keymap
Normal file
26
sublime/Packages/SFTP/Default (Linux).sublime-keymap
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
[
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+f"], "command": "sftp_upload_file" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+r"], "command": "sftp_upload_folder" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+y"], "command": "sftp_sync_up" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+n"], "command": "sftp_upload_open_files" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+m"], "command": "sftp_monitor_file" },
|
||||
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+o"], "command": "sftp_download_file" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+e"], "command": "sftp_download_folder" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+d"], "command": "sftp_sync_down" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+i"], "command": "sftp_diff_remote_file" },
|
||||
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+b"], "command": "sftp_sync_both" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+c"], "command": "sftp_vcs_changed_files" },
|
||||
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+w"], "command": "sftp_browse" },
|
||||
|
||||
{ "keys": ["ctrl+alt+r","ctrl+alt+s"], "command": "sftp_create_server" },
|
||||
{ "keys": ["ctrl+alt+r","ctrl+alt+b"], "command": "sftp_browse_server" },
|
||||
{ "keys": ["ctrl+alt+r","ctrl+alt+n"], "command": "sftp_last_server" },
|
||||
{ "keys": ["ctrl+alt+r","ctrl+alt+e"], "command": "sftp_edit_server" },
|
||||
{ "keys": ["ctrl+alt+r","ctrl+alt+d"], "command": "sftp_delete_server" },
|
||||
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+s"], "command": "sftp_show_panel" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+x"], "command": "sftp_cancel_upload" }
|
||||
]
|
||||
26
sublime/Packages/SFTP/Default (OSX).sublime-keymap
Normal file
26
sublime/Packages/SFTP/Default (OSX).sublime-keymap
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
[
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+f"], "command": "sftp_upload_file" },
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+r"], "command": "sftp_upload_folder" },
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+y"], "command": "sftp_sync_up" },
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+n"], "command": "sftp_upload_open_files" },
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+m"], "command": "sftp_monitor_file" },
|
||||
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+o"], "command": "sftp_download_file" },
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+e"], "command": "sftp_download_folder" },
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+d"], "command": "sftp_sync_down" },
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+i"], "command": "sftp_diff_remote_file" },
|
||||
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+b"], "command": "sftp_sync_both" },
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+c"], "command": "sftp_vcs_changed_files" },
|
||||
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+w"], "command": "sftp_browse" },
|
||||
|
||||
{ "keys": ["super+ctrl+r","super+ctrl+s"], "command": "sftp_create_server" },
|
||||
{ "keys": ["super+ctrl+r","super+ctrl+b"], "command": "sftp_browse_server" },
|
||||
{ "keys": ["super+ctrl+r","super+ctrl+n"], "command": "sftp_last_server" },
|
||||
{ "keys": ["super+ctrl+r","super+ctrl+e"], "command": "sftp_edit_server" },
|
||||
{ "keys": ["super+ctrl+r","super+ctrl+d"], "command": "sftp_delete_server" },
|
||||
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+s"], "command": "sftp_show_panel" },
|
||||
{ "keys": ["super+ctrl+u","super+ctrl+x"], "command": "sftp_cancel_upload" }
|
||||
]
|
||||
26
sublime/Packages/SFTP/Default (Windows).sublime-keymap
Normal file
26
sublime/Packages/SFTP/Default (Windows).sublime-keymap
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
[
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+f"], "command": "sftp_upload_file" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+r"], "command": "sftp_upload_folder" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+y"], "command": "sftp_sync_up" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+n"], "command": "sftp_upload_open_files" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+m"], "command": "sftp_monitor_file" },
|
||||
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+o"], "command": "sftp_download_file" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+e"], "command": "sftp_download_folder" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+d"], "command": "sftp_sync_down" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+i"], "command": "sftp_diff_remote_file" },
|
||||
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+b"], "command": "sftp_sync_both" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+c"], "command": "sftp_vcs_changed_files" },
|
||||
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+w"], "command": "sftp_browse" },
|
||||
|
||||
{ "keys": ["ctrl+alt+r","ctrl+alt+s"], "command": "sftp_create_server" },
|
||||
{ "keys": ["ctrl+alt+r","ctrl+alt+b"], "command": "sftp_browse_server" },
|
||||
{ "keys": ["ctrl+alt+r","ctrl+alt+n"], "command": "sftp_last_server" },
|
||||
{ "keys": ["ctrl+alt+r","ctrl+alt+e"], "command": "sftp_edit_server" },
|
||||
{ "keys": ["ctrl+alt+r","ctrl+alt+d"], "command": "sftp_delete_server" },
|
||||
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+s"], "command": "sftp_show_panel" },
|
||||
{ "keys": ["ctrl+alt+u","ctrl+alt+x"], "command": "sftp_cancel_upload" }
|
||||
]
|
||||
132
sublime/Packages/SFTP/Default.sublime-commands
Normal file
132
sublime/Packages/SFTP/Default.sublime-commands
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
[
|
||||
{
|
||||
"caption": "SFTP: Upload File",
|
||||
"command": "sftp_upload_file"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Upload Open Files",
|
||||
"command": "sftp_upload_open_files"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Download File",
|
||||
"command": "sftp_download_file"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Upload Folder",
|
||||
"command": "sftp_upload_folder"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Download Folder",
|
||||
"command": "sftp_download_folder"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Diff Remote File",
|
||||
"command": "sftp_diff_remote_file"
|
||||
},
|
||||
{
|
||||
"caption": "Rename Local and Remote Files",
|
||||
"command": "sftp_rename_local_and_remote_paths"
|
||||
},
|
||||
{
|
||||
"caption": "Delete Local and Remote Files",
|
||||
"command": "sftp_delete_local_and_remote_paths"
|
||||
},
|
||||
{
|
||||
"caption": "Delete Remote File",
|
||||
"command": "sftp_delete_remote_path"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Sync Local -> Remote…",
|
||||
"command": "sftp_sync_up"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Sync Remote -> Local…",
|
||||
"command": "sftp_sync_down"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Sync Both Directions…",
|
||||
"command": "sftp_sync_both"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Monitor File (Upload on External Save)",
|
||||
"command": "sftp_monitor_file"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Upload VCS Changed Files",
|
||||
"command": "sftp_vcs_changed_files"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Browse Remote…",
|
||||
"command": "sftp_browse"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Setup Server…",
|
||||
"command": "sftp_create_server"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Browse Server…",
|
||||
"command": "sftp_browse_server"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Edit Server…",
|
||||
"command": "sftp_edit_server"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Delete Server…",
|
||||
"command": "sftp_delete_server"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Map to Remote…",
|
||||
"command": "sftp_create_config"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Edit Remote Mapping…",
|
||||
"command": "sftp_edit_config"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Add Alternate Remote Mapping…",
|
||||
"command": "sftp_create_alt_config"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Switch Remote Mapping…",
|
||||
"command": "sftp_switch_config"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Show Panel",
|
||||
"command": "sftp_show_panel"
|
||||
},
|
||||
{
|
||||
"caption": "SFTP: Cancel Upload",
|
||||
"command": "sftp_cancel_upload"
|
||||
},
|
||||
{
|
||||
"caption": "Preferences: SFTP Settings",
|
||||
"command": "open_file", "args":
|
||||
{
|
||||
"file": "${packages}/SFTP/SFTP.sublime-settings"}
|
||||
},
|
||||
{
|
||||
"caption": "Preferences: SFTP Key Bindings",
|
||||
"command": "open_file", "args":
|
||||
{
|
||||
"file": "${packages}/SFTP/Default (Windows).sublime-keymap",
|
||||
"platform": "Windows"
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "Preferences: SFTP Key Bindings",
|
||||
"command": "open_file", "args":
|
||||
{
|
||||
"file": "${packages}/SFTP/Default (OSX).sublime-keymap",
|
||||
"platform": "OSX"
|
||||
}
|
||||
},
|
||||
{
|
||||
"caption": "Preferences: SFTP Key Bindings",
|
||||
"command": "open_file", "args":
|
||||
{
|
||||
"file": "${packages}/SFTP/Default (Linux).sublime-keymap",
|
||||
"platform": "Linux"
|
||||
}
|
||||
}
|
||||
]
|
||||
93
sublime/Packages/SFTP/Main.sublime-menu
Normal file
93
sublime/Packages/SFTP/Main.sublime-menu
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
[
|
||||
{
|
||||
"id": "file",
|
||||
"children":
|
||||
[
|
||||
{
|
||||
"caption": "SFTP/FTP",
|
||||
"mnemonic": "b",
|
||||
"children":
|
||||
[
|
||||
{ "command": "sftp_create_server", "caption": "Setup Server…" },
|
||||
{ "command": "sftp_browse_server", "caption": "Browse Server…" },
|
||||
{ "command": "sftp_edit_server", "caption": "Edit Server…" },
|
||||
{ "command": "sftp_delete_server", "caption": "Delete Server…" }
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"caption": "Preferences",
|
||||
"mnemonic": "n",
|
||||
"id": "preferences",
|
||||
"children":
|
||||
[
|
||||
{
|
||||
"caption": "Package Settings",
|
||||
"mnemonic": "P",
|
||||
"id": "package-settings",
|
||||
"children":
|
||||
[
|
||||
{
|
||||
"caption": "SFTP",
|
||||
"children":
|
||||
[
|
||||
{ "command": "open_file", "args": {"file": "${packages}/SFTP/SFTP.sublime-settings"}, "caption": "Settings – Default" },
|
||||
{ "command": "open_file", "args": {"file": "${packages}/User/SFTP.sublime-settings"}, "caption": "Settings – User" },
|
||||
{ "caption": "-" },
|
||||
{
|
||||
"command": "open_file", "args":
|
||||
{
|
||||
"file": "${packages}/SFTP/Default (Windows).sublime-keymap",
|
||||
"platform": "Windows"
|
||||
},
|
||||
"caption": "Key Bindings – Default"
|
||||
},
|
||||
{
|
||||
"command": "open_file", "args":
|
||||
{
|
||||
"file": "${packages}/SFTP/Default (OSX).sublime-keymap",
|
||||
"platform": "OSX"
|
||||
},
|
||||
"caption": "Key Bindings – Default"
|
||||
},
|
||||
{
|
||||
"command": "open_file", "args":
|
||||
{
|
||||
"file": "${packages}/SFTP/Default (Linux).sublime-keymap",
|
||||
"platform": "Linux"
|
||||
},
|
||||
"caption": "Key Bindings – Default"
|
||||
},
|
||||
{
|
||||
"command": "open_file", "args":
|
||||
{
|
||||
"file": "${packages}/User/Default (Windows).sublime-keymap",
|
||||
"platform": "Windows"
|
||||
},
|
||||
"caption": "Key Bindings – User"
|
||||
},
|
||||
{
|
||||
"command": "open_file", "args":
|
||||
{
|
||||
"file": "${packages}/User/Default (OSX).sublime-keymap",
|
||||
"platform": "OSX"
|
||||
},
|
||||
"caption": "Key Bindings – User"
|
||||
},
|
||||
{
|
||||
"command": "open_file", "args":
|
||||
{
|
||||
"file": "${packages}/User/Default (Linux).sublime-keymap",
|
||||
"platform": "Linux"
|
||||
},
|
||||
"caption": "Key Bindings – User"
|
||||
},
|
||||
{ "caption": "-" }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
42
sublime/Packages/SFTP/SFTP.default-config
Normal file
42
sublime/Packages/SFTP/SFTP.default-config
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
// The tab key will cycle through the settings when first created
|
||||
// Visit http://wbond.net/sublime_packages/sftp/settings for help
|
||||
|
||||
// sftp, ftp or ftps
|
||||
"type": "${1:sftp}",
|
||||
|
||||
"save_before_upload": ${2:true},
|
||||
"upload_on_save": ${3:false},
|
||||
"sync_down_on_open": ${4:false},
|
||||
"sync_skip_deletes": ${5:false},
|
||||
"confirm_downloads": ${6:false},
|
||||
"confirm_sync": ${7:true},
|
||||
"confirm_overwrite_newer": ${8:false},
|
||||
|
||||
"host": "${9:example.com}",
|
||||
"user": "${10:username}",
|
||||
${11://}"password": "${12:password}",
|
||||
${13://}"port": "${14:22}",
|
||||
|
||||
"remote_path": "${15:/example/path/}",
|
||||
"ignore_regexes": [${16:
|
||||
"\\\.sublime-(project|workspace)", "sftp-config(-alt\\\d?)?\\\.json",
|
||||
"sftp-settings\\\.json", "/venv/", "\\\.svn", "\\\.hg", "\\\.git",
|
||||
"\\\.bzr", "_darcs", "CVS", "\\\.DS_Store", "Thumbs\\\.db", "desktop\\\.ini"
|
||||
}],
|
||||
${17://}"file_permissions": "${18:664}",
|
||||
${19://}"dir_permissions": "${20:775}",
|
||||
|
||||
${21://}"extra_list_connections": ${22:0},
|
||||
|
||||
"connect_timeout": ${23:30},
|
||||
${24://}"keepalive": ${25:120},
|
||||
${26://}"ftp_passive_mode": ${27:true},
|
||||
${28://}"ssh_key_file": "${29:~/.ssh/id_rsa}",
|
||||
${30://}"sftp_flags": [${31:"-F", "/path/to/ssh_config"}],
|
||||
|
||||
${32://}"preserve_modification_times": ${33:false},
|
||||
${34://}"remote_time_offset_in_hours": ${35:0},
|
||||
${36://}"remote_encoding": "${37:utf-8}",
|
||||
${38://}"remote_locale": "${39:C}",
|
||||
}
|
||||
184
sublime/Packages/SFTP/SFTP.py
Normal file
184
sublime/Packages/SFTP/SFTP.py
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
import sublime
|
||||
import traceback
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
import imp
|
||||
import re
|
||||
|
||||
settings = sublime.load_settings('SFTP.sublime-settings')
|
||||
|
||||
if sublime.platform() == 'linux' and settings.get('linux_enable_ssl'):
|
||||
print 'SFTP: enabling custom linux ssl module'
|
||||
arch_lib_path = os.path.join(sublime.packages_path(), 'SFTP', 'lib',
|
||||
'linux-' + sublime.arch())
|
||||
for ssl_ver in ['0.9.8', '1.0.0', '10']:
|
||||
lib_path = os.path.join(arch_lib_path, 'libssl-' + ssl_ver)
|
||||
try:
|
||||
m_info = imp.find_module('_ssl', [lib_path])
|
||||
m = imp.load_module('_ssl', *m_info)
|
||||
print 'SFTP: successfully loaded _ssl module for libssl.so.%s' % ssl_ver
|
||||
break
|
||||
except (ImportError) as (e):
|
||||
print 'SFTP: _ssl module import error - ' + str(e)
|
||||
if '_ssl' in sys.modules:
|
||||
plat_lib_path = os.path.join(sublime.packages_path(), 'SFTP', 'lib',
|
||||
'linux')
|
||||
try:
|
||||
m_info = imp.find_module('ssl', [plat_lib_path])
|
||||
m = imp.load_module('ssl', *m_info)
|
||||
except (ImportError) as (e):
|
||||
print 'SFTP: ssl module import error - ' + str(e)
|
||||
|
||||
reloading = {
|
||||
'happening': False,
|
||||
'shown': False
|
||||
}
|
||||
|
||||
reload_mods = []
|
||||
for mod in sys.modules:
|
||||
if (mod[0:5] == 'sftp.' or mod == 'sftp') and sys.modules[mod] != None:
|
||||
reload_mods.append(mod)
|
||||
reloading['happening'] = True
|
||||
|
||||
# Prevent popups during reload, saving the callbacks for re-adding later
|
||||
if reload_mods:
|
||||
old_callbacks = {}
|
||||
hook_match = re.search("<class '(\w+).ExcepthookChain'>", str(sys.excepthook))
|
||||
if hook_match:
|
||||
_temp = __import__(hook_match.group(1), globals(), locals(),
|
||||
['ExcepthookChain'], -1)
|
||||
ExcepthookChain = _temp.ExcepthookChain
|
||||
old_callbacks = ExcepthookChain.names
|
||||
sys.excepthook = sys.__excepthook__
|
||||
|
||||
mods_load_order = [
|
||||
'sftp',
|
||||
'sftp.times',
|
||||
'sftp.views',
|
||||
'sftp.paths',
|
||||
'sftp.debug',
|
||||
'sftp.errors',
|
||||
'sftp.threads',
|
||||
'sftp.secure_input',
|
||||
'sftp.proc',
|
||||
'sftp.vcs',
|
||||
'sftp.config',
|
||||
'sftp.panel_printer',
|
||||
'sftp.file_transfer',
|
||||
'sftp.ftplib2',
|
||||
'sftp.ftp_transport',
|
||||
'sftp.ftps_transport',
|
||||
'sftp.sftp_transport',
|
||||
'sftp.commands',
|
||||
'sftp.listeners'
|
||||
]
|
||||
|
||||
for mod in mods_load_order:
|
||||
if mod in reload_mods:
|
||||
reload(sys.modules[mod])
|
||||
|
||||
from sftp.commands import (SftpShowPanelCommand, SftpCreateServerCommand,
|
||||
SftpBrowseServerCommand, SftpLastServerCommand, SftpEditServerCommand,
|
||||
SftpDeleteServerCommand, SftpBrowseCommand, SftpUploadFileCommand,
|
||||
SftpMonitorFileCommand, SftpUploadOpenFilesCommand,
|
||||
SftpDiffRemoteFileCommand, SftpRenameLocalAndRemotePathsCommand,
|
||||
SftpDeleteRemotePathCommand, SftpDownloadFileCommand,
|
||||
SftpUploadFolderCommand, SftpSyncUpCommand, SftpSyncDownCommand,
|
||||
SftpSyncBothCommand, SftpDownloadFolderCommand, SftpVcsChangedFilesCommand,
|
||||
SftpCancelUploadCommand, SftpEditConfigCommand, SftpCreateConfigCommand,
|
||||
SftpCreateSubConfigCommand, SftpThread,
|
||||
SftpDeleteLocalAndRemotePathsCommand, SftpSwitchConfigCommand,
|
||||
SftpCreateAltConfigCommand)
|
||||
from sftp.listeners import (SftpCloseListener, SftpLoadListener,
|
||||
SftpFocusListener, SftpAutoUploadListener, SftpAutoConnectListener)
|
||||
|
||||
import sftp.debug
|
||||
import sftp.paths
|
||||
import sftp.times
|
||||
|
||||
sftp.debug.set_debug(settings.get('debug', False))
|
||||
|
||||
|
||||
hook_match = re.search("<class '(\w+).ExcepthookChain'>", str(sys.excepthook))
|
||||
|
||||
if not hook_match:
|
||||
class ExcepthookChain(object):
|
||||
callbacks = []
|
||||
names = {}
|
||||
|
||||
@classmethod
|
||||
def add(cls, name, callback):
|
||||
if name == 'sys.excepthook':
|
||||
if name in cls.names:
|
||||
return
|
||||
cls.callbacks.append(callback)
|
||||
else:
|
||||
if name in cls.names:
|
||||
cls.callbacks.remove(cls.names[name])
|
||||
cls.callbacks.insert(0, callback)
|
||||
cls.names[name] = callback
|
||||
|
||||
@classmethod
|
||||
def hook(cls, type, value, tb):
|
||||
for callback in cls.callbacks:
|
||||
callback(type, value, tb)
|
||||
|
||||
@classmethod
|
||||
def remove(cls, name):
|
||||
if name not in cls.names:
|
||||
return
|
||||
callback = cls.names[name]
|
||||
del cls.names[name]
|
||||
cls.callbacks.remove(callback)
|
||||
else:
|
||||
_temp = __import__(hook_match.group(1), globals(), locals(),
|
||||
['ExcepthookChain'], -1)
|
||||
ExcepthookChain = _temp.ExcepthookChain
|
||||
|
||||
|
||||
# Override default uncaught exception handler
|
||||
def sftp_uncaught_except(type, value, tb):
|
||||
message = ''.join(traceback.format_exception(type, value, tb))
|
||||
|
||||
if message.find('/sftp/') != -1 or message.find('\\sftp\\') != -1:
|
||||
def append_log():
|
||||
log_file_path = os.path.join(sublime.packages_path(), 'User',
|
||||
'SFTP.errors.log')
|
||||
send_log_path = log_file_path
|
||||
timestamp = sftp.times.timestamp_to_string(time.time(),
|
||||
'%Y-%m-%d %H:%M:%S\n')
|
||||
with open(log_file_path, 'a') as f:
|
||||
f.write(timestamp)
|
||||
f.write(message)
|
||||
if sftp.debug.get_debug() and sftp.debug.get_debug_log_file():
|
||||
send_log_path = sftp.debug.get_debug_log_file()
|
||||
sftp.debug.debug_print(message)
|
||||
sublime.error_message(('%s: An unexpected error occurred, ' +
|
||||
'please send the file %s to support@wbond.net') % ('SFTP',
|
||||
send_log_path))
|
||||
sublime.active_window().run_command('open_file',
|
||||
{'file': sftp.paths.fix_windows_path(send_log_path)})
|
||||
if reloading['happening']:
|
||||
if not reloading['shown']:
|
||||
sublime.error_message('SFTP: Sublime SFTP was just upgraded' +
|
||||
', please restart Sublime to finish the upgrade')
|
||||
reloading['shown'] = True
|
||||
else:
|
||||
sublime.set_timeout(append_log, 10)
|
||||
|
||||
if reload_mods and old_callbacks:
|
||||
for name in old_callbacks:
|
||||
ExcepthookChain.add(name, old_callbacks[name])
|
||||
|
||||
ExcepthookChain.add('sys.excepthook', sys.__excepthook__)
|
||||
ExcepthookChain.add('sftp_uncaught_except', sftp_uncaught_except)
|
||||
|
||||
if sys.excepthook != ExcepthookChain.hook:
|
||||
sys.excepthook = ExcepthookChain.hook
|
||||
|
||||
|
||||
def unload_handler():
|
||||
SftpThread.cleanup()
|
||||
|
||||
ExcepthookChain.remove('sftp_uncaught_except')
|
||||
61
sublime/Packages/SFTP/SFTP.sublime-settings
Normal file
61
sublime/Packages/SFTP/SFTP.sublime-settings
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
// Hide the output panel:
|
||||
// - false = never
|
||||
// - number = seconds after completion
|
||||
// - true = always
|
||||
"hide_output_panel": 1,
|
||||
|
||||
// Frequency in milliseconds that sftp_monitor_file command checks
|
||||
// modification time of file. This uses lstat, so it is not an I/O
|
||||
// intensive operation, especially since the OS has a filesystem cache
|
||||
"monitoring_frequency": 200,
|
||||
|
||||
// Number of milliseconds to wait after a file change is detected before
|
||||
// starting the upload. This can help if the old version of a file is
|
||||
// being uploaded.
|
||||
"monitoring_upload_delay": 500,
|
||||
|
||||
// If you want to use ftps on Linux you need the ssl module, which does
|
||||
// not come included with Sublime due to compatiblity issues. I've compiled
|
||||
// different ssl modules for both 32bit and 64bit and included them.
|
||||
// You can try enabling this, but if Sublime starts crashing, you know
|
||||
// what to disable. Sublime must be restarted after changing this setting.
|
||||
"linux_enable_ssl": false,
|
||||
|
||||
// If the temp folder created for diff operations should be deleted when
|
||||
// the diff completes. If this is set to false, the user is responsible
|
||||
// for cleaning up temp folders. This only applies to situations when
|
||||
// diff_command is set.
|
||||
"delete_temp_diff_folder": true,
|
||||
|
||||
// If debug output should be printed to the console
|
||||
// True or 1 outputs FTP/SFTP commands, 2 is more verbose
|
||||
"debug": false
|
||||
//,"debug_log_file": "C:\\Users\\Username\\Desktop\\sublime_sftp_debug.txt"
|
||||
//,"debug_log_file": "/Users/username/Desktop/sublime_sftp_debug.txt"
|
||||
//,"debug_log_file": "/home/username/Desktop/sublime_sftp_debug.txt"
|
||||
|
||||
// The command line arguments to open an external diff tool. The local file
|
||||
// path will replace any parameter equal to %1$s and the file path of the
|
||||
// local temp file representing the remote file will replace any parameter
|
||||
// equal to %2$s
|
||||
//,"diff_command": ["/usr/bin/meld", "%1$s", "%2$s"]
|
||||
//,"diff_command": ["C:\\Program Files (x86)\\WinMerge\\WinMergeU.exe", "%1$s", "%2$s"]
|
||||
//,"diff_command": ["/usr/bin/opendiff", "%1$s", "%2$s"]
|
||||
|
||||
// On Windows machines, git and hg are often not in the path and if they
|
||||
// are not in one of the default install locations, their path must be
|
||||
// specified here for the VCS-based commands to work
|
||||
//,"git_binary_path": "C:\\Program Files\\Msysgit\\bin\\git.exe"
|
||||
//,"hg_binary_path": "C:\\Program Files\\Mercurial\\hg.exe"
|
||||
//,"svn_binary_path": "/usr/bin/svn"
|
||||
|
||||
// On OS X, tabs don't instantly get rendered when opening a file, which
|
||||
// can have the side effect of the sync_down_on_open setting not properly
|
||||
// detecting a file open. SFTP uses a slight delay before checking to see
|
||||
// if a file has been completely opened before syncing down. Depending on
|
||||
// the machine, it may be necessary to tweak this value if sometimes files
|
||||
// do not sync down on open. The number of milliseconds to wait after a
|
||||
// file load event is triggered before checking if the file has a tab.
|
||||
//,"osx_sync_down_on_open_delay": 500
|
||||
}
|
||||
36
sublime/Packages/SFTP/Side Bar.sublime-menu
Normal file
36
sublime/Packages/SFTP/Side Bar.sublime-menu
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
[
|
||||
{ "caption": "-" },
|
||||
{
|
||||
"caption": "SFTP/FTP",
|
||||
"children":
|
||||
[
|
||||
{ "caption": "Upload File", "command": "sftp_upload_file", "args": {"paths": []} },
|
||||
{ "caption": "Download File", "command": "sftp_download_file", "args": {"paths": []} },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Upload Folder", "command": "sftp_upload_folder", "args": {"paths": []} },
|
||||
{ "caption": "Download Folder", "command": "sftp_download_folder", "args": {"paths": []} },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Diff Remote File", "command": "sftp_diff_remote_file", "args": {"paths": []} },
|
||||
{ "caption": "Rename Local and Remote Files", "command": "sftp_rename_local_and_remote_paths", "args": {"files": []} },
|
||||
{ "caption": "Rename Local and Remote Folders", "command": "sftp_rename_local_and_remote_paths", "args": {"dirs": []} },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Delete Local and Remote Files", "command": "sftp_delete_local_and_remote_paths", "args": {"files": []} },
|
||||
{ "caption": "Delete Local and Remote Folders", "command": "sftp_delete_local_and_remote_paths", "args": {"dirs": []} },
|
||||
{ "caption": "Delete Remote File", "command": "sftp_delete_remote_path", "args": {"files": []} },
|
||||
{ "caption": "Delete Remote Folder", "command": "sftp_delete_remote_path", "args": {"dirs": []} },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Sync Local -> Remote…", "command": "sftp_sync_up", "args": {"paths": []} },
|
||||
{ "caption": "Sync Remote -> Local…", "command": "sftp_sync_down", "args": {"paths": []} },
|
||||
{ "caption": "Sync Both Directions…", "command": "sftp_sync_both", "args": {"paths": []} },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Monitor File (Upload on External Save)", "command": "sftp_monitor_file", "args": {"paths": []} },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Browse Remote…", "command": "sftp_browse", "args": {"paths": []} },
|
||||
{ "caption": "-" },
|
||||
{ "caption": "Map to Remote…", "command": "sftp_create_config", "args": {"paths": []} },
|
||||
{ "caption": "Edit Remote Mapping…", "command": "sftp_edit_config", "args": {"paths": []} },
|
||||
{ "caption": "Add Alternate Remote Mapping…", "command": "sftp_create_alt_config", "args": {"paths": []} },
|
||||
{ "caption": "Switch Remote Mapping…", "command": "sftp_switch_config", "args": {"paths": []} }
|
||||
]
|
||||
}
|
||||
]
|
||||
5
sublime/Packages/SFTP/Tab Context.sublime-menu
Normal file
5
sublime/Packages/SFTP/Tab Context.sublime-menu
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[
|
||||
{ "caption": "-" },
|
||||
{ "command": "sftp_upload_file", "args": { "group": -1, "index": -1 }, "caption": "Upload File" },
|
||||
{ "command": "sftp_upload_open_files", "caption": "Upload Open Files" }
|
||||
]
|
||||
32
sublime/Packages/SFTP/lang/clock.json
Normal file
32
sublime/Packages/SFTP/lang/clock.json
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"C": {"am": 0, "pm": 12},
|
||||
"af_ZA": {"vm": 0, "nm": 12},
|
||||
"am_ET": {"\u1321\u12cb\u1275": 0, "\u12a8\u1230\u12d3\u1275": 12},
|
||||
"bn_BD": {"\u09aa\u09c2\u09b0\u09cd\u09ac\u09be\u09b9\u09cd\u09a3": 0, "\u0985\u09aa\u09b0\u09be\u09b9\u09cd\u09a3": 12},
|
||||
"bn_IN": {"\u09aa\u09c2\u09b0\u09cd\u09ac\u09be\u09b9\u09cd\u09a3": 0, "\u0985\u09aa\u09b0\u09be\u09b9\u09cd\u09a3": 12},
|
||||
"el_GR": {"\u03c0\u03bc": 0, "\u03bc\u03bc": 12},
|
||||
"en_AU": {"am": 0, "pm": 12},
|
||||
"en_CA": {"am": 0, "pm": 12},
|
||||
"en_GB": {"am": 0, "pm": 12},
|
||||
"en_NZ": {"am": 0, "pm": 12},
|
||||
"en_US": {"am": 0, "pm": 12},
|
||||
"es_CO": {"am": 0, "pm": 12},
|
||||
"es_CR": {"am": 0, "pm": 12},
|
||||
"es_NI": {"am": 0, "pm": 12},
|
||||
"es_PE": {"am": 0, "pm": 12},
|
||||
"es_VE": {"am": 0, "pm": 12},
|
||||
"he_IL": {"am": 0, "pm": 12},
|
||||
"ja_JP": {"\u5348\u524d": 0, "\u5348\u5f8c": 12},
|
||||
"km_KH": {"\u1796\u17d2\u179a\u17b9\u1780": 0, "\u179b\u17d2\u1784\u17b6\u1785": 12},
|
||||
"ko_KR": {"\uc624\uc804": 0, "\uc624\ud6c4": 12},
|
||||
"my_MM": {"\u1014\u1036\u1014\u1000\u103a": 0, "\u100a\u1014\u1031": 12},
|
||||
"si_LK": {"\u0db4\u0dd9.\u0dc0": 0, "\u0db4.\u0dc0": 12},
|
||||
"sq_AL": {"pd": 0, "md": 12},
|
||||
"ta_IN": {"\u0b95\u0bbe\u0bb2\u0bc8": 0, "\u0bae\u0bbe\u0bb2\u0bc8": 12},
|
||||
"th_TH": {"am": 0, "pm": 12},
|
||||
"ur_PK": {"\u0635": 0, "\u0634": 12},
|
||||
"vi_VN": {"am": 0, "pm": 12},
|
||||
"zh_CN": {"\u4e0a\u5348": 0, "\u4e0b\u5348": 12},
|
||||
"zh_HK": {"\u4e0a\u5348": 0, "\u4e0b\u5348": 12},
|
||||
"zh_TW": {"\u4e0a\u5348": 0, "\u4e0b\u5348": 12}
|
||||
}
|
||||
86
sublime/Packages/SFTP/lang/months.json
Normal file
86
sublime/Packages/SFTP/lang/months.json
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
{
|
||||
"C": {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "may": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "oct": 10, "nov": 11, "dec": 12},
|
||||
"af_ZA": {"jan": 1, "feb": 2, "mrt": 3, "apr": 4, "mei": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "des": 12},
|
||||
"am_ET": {"\u1303\u1295\u12e9": 1, "\u134c\u1265\u1229": 2, "\u121b\u122d\u127d": 3, "\u12a4\u1355\u1228": 4, "\u121c\u12ed": 5, "\u1301\u1295": 6, "\u1301\u120b\u12ed": 7, "\u12a6\u1308\u1235": 8, "\u1234\u1355\u1274": 9, "\u12a6\u12ad\u1270": 10, "\u1296\u126c\u121d": 11, "\u12f2\u1234\u121d": 12},
|
||||
"ast_ES": {"xin": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "xun": 6, "xnt": 7, "ago": 8, "set": 9, "och": 10, "pay": 11, "avi": 12},
|
||||
"bg_BG": {"\u044f\u043d\u0443": 1, "\u0444\u0435\u0432": 2, "\u043c\u0430\u0440": 3, "\u0430\u043f\u0440": 4, "\u043c\u0430\u0439": 5, "\u044e\u043d\u0438": 6, "\u044e\u043b\u0438": 7, "\u0430\u0432\u0433": 8, "\u0441\u0435\u043f": 9, "\u043e\u043a\u0442": 10, "\u043d\u043e\u0435": 11, "\u0434\u0435\u043a": 12},
|
||||
"bn_BD": {"\u099c\u09be\u09a8\u09c1": 1, "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1": 2, "\u09ae\u09be\u09b0\u09cd\u099a": 3, "\u098f\u09aa\u09cd\u09b0\u09bf": 4, "\u09ae\u09c7": 5, "\u099c\u09c1\u09a8": 6, "\u099c\u09c1\u09b2": 7, "\u0986\u0997": 8, "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7": 9, "\u0985\u0995\u09cd\u099f\u09cb": 10, "\u09a8\u09ad\u09c7": 11, "\u09a1\u09bf\u09b8\u09c7": 12},
|
||||
"bn_IN": {"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf": 1, "\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf": 2, "\u09ae\u09be\u09b0\u09cd\u099a": 3, "\u098f\u09aa\u09cd\u09b0\u09bf\u09b2": 4, "\u09ae\u09c7": 5, "\u099c\u09c1\u09a8": 6, "\u099c\u09c1\u09b2\u09be\u0987": 7, "\u0986\u0997\u09b8\u09cd\u099f": 8, "\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0": 9, "\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0": 10, "\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0": 11, "\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0": 12},
|
||||
"ca_ES": {"gen": 1, "feb": 2, "mar": 3, "abr": 4, "mai": 5, "jun": 6, "jul": 7, "ago": 8, "set": 9, "oct": 10, "nov": 11, "des": 12},
|
||||
"cs_CZ": {"led": 1, "\u00fano": 2, "b\u0159e": 3, "dub": 4, "kv\u011b": 5, "\u010den": 6, "\u010dec": 7, "srp": 8, "z\u00e1\u0159": 9, "\u0159\u00edj": 10, "lis": 11, "pro": 12},
|
||||
"cs_CZ2": {"led": 1, "\u00fano": 2, "b\u0159e": 3, "dub": 4, "kv\u011b": 5, "\u010drn": 6, "\u010drc": 7, "srp": 8, "z\u00e1\u0159": 9, "\u0159\u00edj": 10, "lis": 11, "pro": 12},
|
||||
"da_DK": {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "maj": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "dec": 12},
|
||||
"de_AT": {"j\u00e4n": 1, "feb": 2, "m\u00e4r": 3, "apr": 4, "mai": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "dez": 12},
|
||||
"de_CH": {"jan": 1, "feb": 2, "m\u00e4r": 3, "apr": 4, "mai": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "dez": 12},
|
||||
"de_DE": {"jan": 1, "feb": 2, "m\u00e4r": 3, "apr": 4, "mai": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "dez": 12},
|
||||
"el_GR": {"\u0399\u03b1\u03bd": 1, "\u03a6\u03b5\u03b2": 2, "\u039c\u03ac\u03c1": 3, "\u0391\u03c0\u03c1": 4, "\u039c\u03ac\u03b9": 5, "\u0399\u03bf\u03cd\u03bd": 6, "\u0399\u03bf\u03cd\u03bb": 7, "\u0391\u03cd\u03b3": 8, "\u03a3\u03b5\u03c0": 9, "\u039f\u03ba\u03c4": 10, "\u039d\u03bf\u03ad": 11, "\u0394\u03b5\u03ba": 12},
|
||||
"en_AU": {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "may": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "oct": 10, "nov": 11, "dec": 12},
|
||||
"en_CA": {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "may": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "oct": 10, "nov": 11, "dec": 12},
|
||||
"en_GB": {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "may": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "oct": 10, "nov": 11, "dec": 12},
|
||||
"en_NZ": {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "may": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "oct": 10, "nov": 11, "dec": 12},
|
||||
"en_US": {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "may": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "oct": 10, "nov": 11, "dec": 12},
|
||||
"es_AR": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_CL": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_CO": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_CR": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_DO": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_EC": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_ES": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_GT": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_HN": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_MX": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_NI": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_PA": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_PE": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_PR": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_SV": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_UY": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"es_VE": {"ene": 1, "feb": 2, "mar": 3, "abr": 4, "may": 5, "jun": 6, "jul": 7, "ago": 8, "sep": 9, "oct": 10, "nov": 11, "dic": 12},
|
||||
"et_EE": {"jaan": 1, "veebr": 2, "m\u00e4rts": 3, "apr": 4, "mai": 5, "juuni": 6, "juuli": 7, "aug": 8, "sept": 9, "okt": 10, "nov": 11, "dets": 12},
|
||||
"eu_ES": {"urt": 1, "ots": 2, "mar": 3, "api": 4, "mai": 5, "eka": 6, "uzt": 7, "abu": 8, "ira": 9, "urr": 10, "aza": 11, "abe": 12},
|
||||
"fa_IR": {"\u0698\u0627\u0646\u0648\u06cc\u0647": 1, "\u0641\u0648\u0631\u06cc\u0647": 2, "\u0645\u0627\u0631\u0633": 3, "\u0622\u0648\u0631\u06cc\u0644": 4, "\u0645\u0647": 5, "\u0698\u0648\u0626\u0646": 6, "\u0698\u0648\u0626\u06cc\u0647": 7, "\u0627\u0648\u062a": 8, "\u0633\u067e\u062a\u0627\u0645\u0628\u0631": 9, "\u0627\u0643\u062a\u0628\u0631": 10, "\u0646\u0648\u0627\u0645\u0628\u0631": 11, "\u062f\u0633\u0627\u0645\u0628\u0631": 12},
|
||||
"fi_FI": {"tammi\u00a0": 1, "helmi\u00a0": 2, "maalis": 3, "huhti\u00a0": 4, "touko\u00a0": 5, "kes\u00e4\u00a0\u00a0": 6, "hein\u00e4\u00a0": 7, "elo\u00a0\u00a0\u00a0": 8, "syys\u00a0\u00a0": 9, "loka\u00a0\u00a0": 10, "marras": 11, "joulu\u00a0": 12},
|
||||
"fr_BE": {"jan": 1, "f\u00e9v": 2, "mar": 3, "avr": 4, "mai": 5, "jun": 6, "jui": 7, "ao\u00fb": 8, "sep": 9, "oct": 10, "nov": 11, "d\u00e9c": 12},
|
||||
"fr_CA": {"jan": 1, "f\u00e9v": 2, "mar": 3, "avr": 4, "mai": 5, "jun": 6, "jui": 7, "ao\u00fb": 8, "sep": 9, "oct": 10, "nov": 11, "d\u00e9c": 12},
|
||||
"fr_CH": {"jan": 1, "f\u00e9v": 2, "mar": 3, "avr": 4, "mai": 5, "jun": 6, "jui": 7, "ao\u00fb": 8, "sep": 9, "oct": 10, "nov": 11, "d\u00e9c": 12},
|
||||
"fr_FR": {"janv": 1, "f\u00e9vr": 2, "mars": 3, "avril": 4, "mai": 5, "juin": 6, "juil": 7, "ao\u00fbt": 8, "sept": 9, "oct": 10, "nov": 11, "d\u00e9c": 12},
|
||||
"gl_ES": {"xan": 1, "feb": 2, "mar": 3, "abr": 4, "mai": 5, "xu\u00f1": 6, "xul": 7, "ago": 8, "set": 9, "out": 10, "nov": 11, "dec": 12},
|
||||
"he_IL": {"\u05d9\u05e0\u05d5": 1, "\u05e4\u05d1\u05e8": 2, "\u05de\u05e8\u05e5": 3, "\u05d0\u05e4\u05e8": 4, "\u05de\u05d0\u05d9": 5, "\u05d9\u05d5\u05e0": 6, "\u05d9\u05d5\u05dc": 7, "\u05d0\u05d5\u05d2": 8, "\u05e1\u05e4\u05d8": 9, "\u05d0\u05d5\u05e7": 10, "\u05e0\u05d5\u05d1": 11, "\u05d3\u05e6\u05de": 12},
|
||||
"hr_HR": {"sij": 1, "vel": 2, "o\u017eu": 3, "tra": 4, "svi": 5, "lip": 6, "srp": 7, "kol": 8, "ruj": 9, "lis": 10, "stu": 11, "pro": 12},
|
||||
"hu_HU": {"jan": 1, "febr": 2, "m\u00e1rc": 3, "\u00e1pr": 4, "m\u00e1j": 5, "j\u00fan": 6, "j\u00fal": 7, "aug": 8, "szept": 9, "okt": 10, "nov": 11, "dec": 12},
|
||||
"id_ID": {"jan": 1, "peb": 2, "mar": 3, "apr": 4, "mei": 5, "jun": 6, "jul": 7, "agu": 8, "sep": 9, "okt": 10, "nov": 11, "des": 12},
|
||||
"it_CH": {"gen": 1, "feb": 2, "mar": 3, "apr": 4, "mag": 5, "giu": 6, "lug": 7, "ago": 8, "set": 9, "ott": 10, "nov": 11, "dic": 12},
|
||||
"it_IT": {"gen": 1, "feb": 2, "mar": 3, "apr": 4, "mag": 5, "giu": 6, "lug": 7, "ago": 8, "set": 9, "ott": 10, "nov": 11, "dic": 12},
|
||||
"ja_JP": {"1\u6708": 1, "2\u6708": 2, "3\u6708": 3, "4\u6708": 4, "5\u6708": 5, "6\u6708": 6, "7\u6708": 7, "8\u6708": 8, "9\u6708": 9, "10\u6708": 10, "11\u6708": 11, "12\u6708": 12},
|
||||
"km_KH": {"\u17e1": 1, "\u17e2": 2, "\u17e3": 3, "\u17e4": 4, "\u17e5": 5, "\u17e6": 6, "\u17e7": 7, "\u17e8": 8, "\u17e9": 9, "\u17e1\u17e0": 10, "\u17e1\u17e1": 11, "\u17e1\u17e2": 12},
|
||||
"ko_KR": {"1\uc6d4": 1, "2\uc6d4": 2, "3\uc6d4": 3, "4\uc6d4": 4, "5\uc6d4": 5, "6\uc6d4": 6, "7\uc6d4": 7, "8\uc6d4": 8, "9\uc6d4": 9, "10\uc6d4": 10, "11\uc6d4": 11, "12\uc6d4": 12},
|
||||
"lt_LT": {"sau": 1, "vas": 2, "kov": 3, "bal": 4, "geg": 5, "bir": 6, "lie": 7, "rgp": 8, "rgs": 9, "spa": 10, "lap": 11, "grd": 12},
|
||||
"lv_LV": {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "mai": 5, "j\u016bn": 6, "j\u016bl": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "dec": 12},
|
||||
"mk_MK": {"\u0458\u0430\u043d": 1, "\u0444\u0435\u0432": 2, "\u043c\u0430\u0440": 3, "\u0430\u043f\u0440": 4, "\u043c\u0430\u0458": 5, "\u0458\u0443\u043d": 6, "\u0458\u0443\u043b": 7, "\u0430\u0432\u0433": 8, "\u0441\u0435\u043f": 9, "\u043e\u043a\u0442": 10, "\u043d\u043e\u0435": 11, "\u0434\u0435\u043a": 12},
|
||||
"ms_MY": {"jan": 1, "feb": 2, "mac": 3, "apr": 4, "mei": 5, "jun": 6, "jul": 7, "ogos": 8, "sep": 9, "okt": 10, "nov": 11, "dis": 12},
|
||||
"my_MM": {"\u1007\u1014\u103a": 1, "\u1016\u1031": 2, "\u1019\u1010\u103a": 3, "\u1027\u1015\u103c\u102e": 4, "\u1019\u1031": 5, "\u1007\u103d\u1014\u103a": 6, "\u1007\u1030": 7, "\u1029": 8, "\u1005\u1000\u103a": 9, "\u1021\u1031\u102c\u1000\u103a": 10, "\u1014\u102d\u102f": 11, "\u1012\u102e": 12},
|
||||
"nb_NO": {"jan": 1, "feb": 2, "mars": 3, "april": 4, "mai": 5, "juni": 6, "juli": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "des": 12},
|
||||
"nds_DE": {"jan": 1, "feb": 2, "m\u00e4r": 3, "apr": 4, "mai": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "dez": 12},
|
||||
"nl_BE": {"jan": 1, "feb": 2, "mrt": 3, "apr": 4, "mei": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "dec": 12},
|
||||
"nl_NL": {"jan": 1, "feb": 2, "mrt": 3, "apr": 4, "mei": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "dec": 12},
|
||||
"nn_NO": {"jan": 1, "feb": 2, "mars": 3, "april": 4, "mai": 5, "juni": 6, "juli": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "des": 12},
|
||||
"pl_PL": {"sty": 1, "lut": 2, "mar": 3, "kwi": 4, "maj": 5, "cze": 6, "lip": 7, "sie": 8, "wrz": 9, "pa\u017a": 10, "lis": 11, "gru": 12},
|
||||
"pt_BR": {"jan": 1, "fev": 2, "mar": 3, "abr": 4, "mai": 5, "jun": 6, "jul": 7, "ago": 8, "set": 9, "out": 10, "nov": 11, "dez": 12},
|
||||
"pt_PT": {"jan": 1, "fev": 2, "mar": 3, "abr": 4, "mai": 5, "jun": 6, "jul": 7, "ago": 8, "set": 9, "out": 10, "nov": 11, "dez": 12},
|
||||
"ro_RO": {"ian": 1, "feb": 2, "mar": 3, "apr": 4, "mai": 5, "iun": 6, "iul": 7, "aug": 8, "sep": 9, "oct": 10, "nov": 11, "dec": 12},
|
||||
"ru_RU": {"\u044f\u043d\u0432": 1, "\u0444\u0435\u0432\u0440": 2, "\u043c\u0430\u0440\u0442\u0430": 3, "\u0430\u043f\u0440": 4, "\u043c\u0430\u044f": 5, "\u0438\u044e\u043d\u044f": 6, "\u0438\u044e\u043b\u044f": 7, "\u0430\u0432\u0433": 8, "\u0441\u0435\u043d\u0442": 9, "\u043e\u043a\u0442": 10, "\u043d\u043e\u044f\u0431": 11, "\u0434\u0435\u043a": 12},
|
||||
"si_LK": {"\u0da2\u0db1": 1, "\u0db4\u0dd9\u0db6": 2, "\u0db8\u0dcf\u0dbb\u0dca": 3, "\u0d85\u0db4\u0dca\u200d\u0dbb\u0dd2": 4, "\u0db8\u0dd0\u0dba\u0dd2": 5, "\u0da2\u0dd6\u0db1\u0dd2": 6, "\u0da2\u0dd6\u0dbd\u0dd2": 7, "\u0d85\u0d9c\u0ddd": 8, "\u0dc3\u0dd0\u0db4\u0dca": 9, "\u0d94\u0d9a\u0dca": 10, "\u0db1\u0dd9\u0dc0\u0dd0": 11, "\u0daf\u0dd9\u0dc3\u0dd0": 12},
|
||||
"sk_SK": {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "m\u00e1j": 5, "j\u00fan": 6, "j\u00fal": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "dec": 12},
|
||||
"sl_SI": {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "maj": 5, "jun": 6, "jul": 7, "avg": 8, "sep": 9, "okt": 10, "nov": 11, "dec": 12},
|
||||
"sq_AL": {"jan": 1, "shk": 2, "mar": 3, "pri": 4, "maj": 5, "qer": 6, "kor": 7, "gsh": 8, "sht": 9, "tet": 10, "n\u00ebn": 11, "dhj": 12},
|
||||
"sr_RS": {"\u0458\u0430\u043d": 1, "\u0444\u0435\u0431": 2, "\u043c\u0430\u0440": 3, "\u0430\u043f\u0440": 4, "\u043c\u0430\u0458": 5, "\u0458\u0443\u043d": 6, "\u0458\u0443\u043b": 7, "\u0430\u0432\u0433": 8, "\u0441\u0435\u043f": 9, "\u043e\u043a\u0442": 10, "\u043d\u043e\u0432": 11, "\u0434\u0435\u0446": 12},
|
||||
"sv_SE": {"jan": 1, "feb": 2, "mar": 3, "apr": 4, "maj": 5, "jun": 6, "jul": 7, "aug": 8, "sep": 9, "okt": 10, "nov": 11, "dec": 12},
|
||||
"ta_IN": {"\u0b9c\u0ba9": 1, "\u0baa\u0bbf\u0baa\u0bcd": 2, "\u0bae\u0bbe\u0bb0\u0bcd": 3, "\u0b8f\u0baa\u0bcd": 4, "\u0bae\u0bc7": 5, "\u0b9c\u0bc2\u0ba9\u0bcd": 6, "\u0b9c\u0bc2\u0bb2\u0bc8": 7, "\u0b86\u0b95": 8, "\u0b9a\u0bc6\u0baa\u0bcd": 9, "\u0b85\u0b95\u0bcd": 10, "\u0ba8\u0bb5": 11, "\u0b9f\u0bbf\u0b9a": 12},
|
||||
"th_TH": {"\u0e21.\u0e04": 1, "\u0e01.\u0e1e": 2, "\u0e21\u0e35.\u0e04": 3, "\u0e40\u0e21.\u0e22": 4, "\u0e1e.\u0e04": 5, "\u0e21\u0e34.\u0e22": 6, "\u0e01.\u0e04": 7, "\u0e2a.\u0e04": 8, "\u0e01.\u0e22": 9, "\u0e15.\u0e04": 10, "\u0e1e.\u0e22": 11, "\u0e18.\u0e04": 12},
|
||||
"uk_UA": {"\u0441\u0456\u0447": 1, "\u043b\u044e\u0442": 2, "\u0431\u0435\u0440": 3, "\u043a\u0432\u0456": 4, "\u0442\u0440\u0430": 5, "\u0447\u0435\u0440": 6, "\u043b\u0438\u043f": 7, "\u0441\u0435\u0440": 8, "\u0432\u0435\u0440": 9, "\u0436\u043e\u0432": 10, "\u043b\u0438\u0441": 11, "\u0433\u0440\u0443": 12},
|
||||
"ur_PK": {"\u062c\u0646\u0648\u0631\u064a": 1, "\u0641\u0631\u0648\u0631\u064a": 2, "\u0645\u0627\u0631\u0686": 3, "\u0627\u067e\u0631\u064a\u0644": 4, "\u0645\u0653\u06cc": 5, "\u062c\u0648\u0646": 6, "\u062c\u0648\u0644\u0627\u064a": 7, "\u0627\u06af\u0633\u062a": 8, "\u0633\u062a\u0645\u0628\u0631": 9, "\u0627\u0643\u062a\u0648\u0628\u0631": 10, "\u0646\u0648\u0645\u0628\u0631": 11, "\u062f\u0633\u0645\u0628\u0631": 12},
|
||||
"vi_VN": {"th01": 1, "th02": 2, "th03": 3, "th04": 4, "th05": 5, "th06": 6, "th07": 7, "th08": 8, "th09": 9, "th10": 10, "th11": 11, "th12": 12},
|
||||
"zh_CN": {"1\u6708": 1, "2\u6708": 2, "3\u6708": 3, "4\u6708": 4, "5\u6708": 5, "6\u6708": 6, "7\u6708": 7, "8\u6708": 8, "9\u6708": 9, "10\u6708": 10, "11\u6708": 11, "12\u6708": 12},
|
||||
"zh_HK": {"1\u6708": 1, "2\u6708": 2, "3\u6708": 3, "4\u6708": 4, "5\u6708": 5, "6\u6708": 6, "7\u6708": 7, "8\u6708": 8, "9\u6708": 9, "10\u6708": 10, "11\u6708": 11, "12\u6708": 12},
|
||||
"zh_TW": {"1\u6708": 1, "2\u6708": 2, "3\u6708": 3, "4\u6708": 4, "5\u6708": 5, "6\u6708": 6, "7\u6708": 7, "8\u6708": 8, "9\u6708": 9, "10\u6708": 10, "11\u6708": 11, "12\u6708": 12}
|
||||
}
|
||||
BIN
sublime/Packages/SFTP/lib/linux-x32/libssl-0.9.8/_ssl.so
vendored
Normal file
BIN
sublime/Packages/SFTP/lib/linux-x32/libssl-0.9.8/_ssl.so
vendored
Normal file
Binary file not shown.
BIN
sublime/Packages/SFTP/lib/linux-x32/libssl-1.0.0/_ssl.so
vendored
Normal file
BIN
sublime/Packages/SFTP/lib/linux-x32/libssl-1.0.0/_ssl.so
vendored
Normal file
Binary file not shown.
BIN
sublime/Packages/SFTP/lib/linux-x32/libssl-10/_ssl.so
Normal file
BIN
sublime/Packages/SFTP/lib/linux-x32/libssl-10/_ssl.so
Normal file
Binary file not shown.
BIN
sublime/Packages/SFTP/lib/linux-x64/libssl-0.9.8/_ssl.so
vendored
Normal file
BIN
sublime/Packages/SFTP/lib/linux-x64/libssl-0.9.8/_ssl.so
vendored
Normal file
Binary file not shown.
BIN
sublime/Packages/SFTP/lib/linux-x64/libssl-1.0.0/_ssl.so
vendored
Normal file
BIN
sublime/Packages/SFTP/lib/linux-x64/libssl-1.0.0/_ssl.so
vendored
Normal file
Binary file not shown.
BIN
sublime/Packages/SFTP/lib/linux-x64/libssl-10/_ssl.so
Normal file
BIN
sublime/Packages/SFTP/lib/linux-x64/libssl-10/_ssl.so
Normal file
Binary file not shown.
437
sublime/Packages/SFTP/lib/linux/ssl.py
Normal file
437
sublime/Packages/SFTP/lib/linux/ssl.py
Normal file
|
|
@ -0,0 +1,437 @@
|
|||
# Wrapper module for _ssl, providing some additional facilities
|
||||
# implemented in Python. Written by Bill Janssen.
|
||||
|
||||
"""\
|
||||
This module provides some more Pythonic support for SSL.
|
||||
|
||||
Object types:
|
||||
|
||||
SSLSocket -- subtype of socket.socket which does SSL over the socket
|
||||
|
||||
Exceptions:
|
||||
|
||||
SSLError -- exception raised for I/O errors
|
||||
|
||||
Functions:
|
||||
|
||||
cert_time_to_seconds -- convert time string used for certificate
|
||||
notBefore and notAfter functions to integer
|
||||
seconds past the Epoch (the time values
|
||||
returned from time.time())
|
||||
|
||||
fetch_server_certificate (HOST, PORT) -- fetch the certificate provided
|
||||
by the server running on HOST at port PORT. No
|
||||
validation of the certificate is performed.
|
||||
|
||||
Integer constants:
|
||||
|
||||
SSL_ERROR_ZERO_RETURN
|
||||
SSL_ERROR_WANT_READ
|
||||
SSL_ERROR_WANT_WRITE
|
||||
SSL_ERROR_WANT_X509_LOOKUP
|
||||
SSL_ERROR_SYSCALL
|
||||
SSL_ERROR_SSL
|
||||
SSL_ERROR_WANT_CONNECT
|
||||
|
||||
SSL_ERROR_EOF
|
||||
SSL_ERROR_INVALID_ERROR_CODE
|
||||
|
||||
The following group define certificate requirements that one side is
|
||||
allowing/requiring from the other side:
|
||||
|
||||
CERT_NONE - no certificates from the other side are required (or will
|
||||
be looked at if provided)
|
||||
CERT_OPTIONAL - certificates are not required, but if provided will be
|
||||
validated, and if validation fails, the connection will
|
||||
also fail
|
||||
CERT_REQUIRED - certificates are required, and will be validated, and
|
||||
if validation fails, the connection will also fail
|
||||
|
||||
The following constants identify various SSL protocol variants:
|
||||
|
||||
PROTOCOL_SSLv2
|
||||
PROTOCOL_SSLv3
|
||||
PROTOCOL_SSLv23
|
||||
PROTOCOL_TLSv1
|
||||
"""
|
||||
|
||||
import textwrap
|
||||
|
||||
import _ssl # if we can't import it, let the error propagate
|
||||
|
||||
from _ssl import SSLError
|
||||
from _ssl import CERT_NONE, CERT_OPTIONAL, CERT_REQUIRED
|
||||
from _ssl import PROTOCOL_SSLv3, PROTOCOL_SSLv23, PROTOCOL_TLSv1
|
||||
from _ssl import RAND_status, RAND_egd, RAND_add
|
||||
from _ssl import \
|
||||
SSL_ERROR_ZERO_RETURN, \
|
||||
SSL_ERROR_WANT_READ, \
|
||||
SSL_ERROR_WANT_WRITE, \
|
||||
SSL_ERROR_WANT_X509_LOOKUP, \
|
||||
SSL_ERROR_SYSCALL, \
|
||||
SSL_ERROR_SSL, \
|
||||
SSL_ERROR_WANT_CONNECT, \
|
||||
SSL_ERROR_EOF, \
|
||||
SSL_ERROR_INVALID_ERROR_CODE
|
||||
|
||||
from socket import socket, _fileobject, _delegate_methods
|
||||
from socket import error as socket_error
|
||||
from socket import getnameinfo as _getnameinfo
|
||||
import base64 # for DER-to-PEM translation
|
||||
import errno
|
||||
|
||||
class SSLSocket(socket):
|
||||
|
||||
"""This class implements a subtype of socket.socket that wraps
|
||||
the underlying OS socket in an SSL context when necessary, and
|
||||
provides read and write methods over that channel."""
|
||||
|
||||
def __init__(self, sock, keyfile=None, certfile=None,
|
||||
server_side=False, cert_reqs=CERT_NONE,
|
||||
ssl_version=PROTOCOL_SSLv23, ca_certs=None,
|
||||
do_handshake_on_connect=True,
|
||||
suppress_ragged_eofs=True):
|
||||
socket.__init__(self, _sock=sock._sock)
|
||||
# The initializer for socket overrides the methods send(), recv(), etc.
|
||||
# in the instancce, which we don't need -- but we want to provide the
|
||||
# methods defined in SSLSocket.
|
||||
for attr in _delegate_methods:
|
||||
try:
|
||||
delattr(self, attr)
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
if certfile and not keyfile:
|
||||
keyfile = certfile
|
||||
# see if it's connected
|
||||
try:
|
||||
socket.getpeername(self)
|
||||
except socket_error, e:
|
||||
if e.errno != errno.ENOTCONN:
|
||||
raise
|
||||
# no, no connection yet
|
||||
self._sslobj = None
|
||||
else:
|
||||
# yes, create the SSL object
|
||||
self._sslobj = _ssl.sslwrap(self._sock, server_side,
|
||||
keyfile, certfile,
|
||||
cert_reqs, ssl_version, ca_certs)
|
||||
if do_handshake_on_connect:
|
||||
self.do_handshake()
|
||||
self.keyfile = keyfile
|
||||
self.certfile = certfile
|
||||
self.cert_reqs = cert_reqs
|
||||
self.ssl_version = ssl_version
|
||||
self.ca_certs = ca_certs
|
||||
self.do_handshake_on_connect = do_handshake_on_connect
|
||||
self.suppress_ragged_eofs = suppress_ragged_eofs
|
||||
self._makefile_refs = 0
|
||||
|
||||
def read(self, len=1024):
|
||||
|
||||
"""Read up to LEN bytes and return them.
|
||||
Return zero-length string on EOF."""
|
||||
|
||||
try:
|
||||
return self._sslobj.read(len)
|
||||
except SSLError, x:
|
||||
if x.args[0] == SSL_ERROR_EOF and self.suppress_ragged_eofs:
|
||||
return ''
|
||||
else:
|
||||
raise
|
||||
|
||||
def write(self, data):
|
||||
|
||||
"""Write DATA to the underlying SSL channel. Returns
|
||||
number of bytes of DATA actually transmitted."""
|
||||
|
||||
return self._sslobj.write(data)
|
||||
|
||||
def getpeercert(self, binary_form=False):
|
||||
|
||||
"""Returns a formatted version of the data in the
|
||||
certificate provided by the other end of the SSL channel.
|
||||
Return None if no certificate was provided, {} if a
|
||||
certificate was provided, but not validated."""
|
||||
|
||||
return self._sslobj.peer_certificate(binary_form)
|
||||
|
||||
def cipher(self):
|
||||
|
||||
if not self._sslobj:
|
||||
return None
|
||||
else:
|
||||
return self._sslobj.cipher()
|
||||
|
||||
def send(self, data, flags=0):
|
||||
if self._sslobj:
|
||||
if flags != 0:
|
||||
raise ValueError(
|
||||
"non-zero flags not allowed in calls to send() on %s" %
|
||||
self.__class__)
|
||||
while True:
|
||||
try:
|
||||
v = self._sslobj.write(data)
|
||||
except SSLError, x:
|
||||
if x.args[0] == SSL_ERROR_WANT_READ:
|
||||
return 0
|
||||
elif x.args[0] == SSL_ERROR_WANT_WRITE:
|
||||
return 0
|
||||
else:
|
||||
raise
|
||||
else:
|
||||
return v
|
||||
else:
|
||||
return socket.send(self, data, flags)
|
||||
|
||||
def sendto(self, data, addr, flags=0):
|
||||
if self._sslobj:
|
||||
raise ValueError("sendto not allowed on instances of %s" %
|
||||
self.__class__)
|
||||
else:
|
||||
return socket.sendto(self, data, addr, flags)
|
||||
|
||||
def sendall(self, data, flags=0):
|
||||
if self._sslobj:
|
||||
if flags != 0:
|
||||
raise ValueError(
|
||||
"non-zero flags not allowed in calls to sendall() on %s" %
|
||||
self.__class__)
|
||||
amount = len(data)
|
||||
count = 0
|
||||
while (count < amount):
|
||||
v = self.send(data[count:])
|
||||
count += v
|
||||
return amount
|
||||
else:
|
||||
return socket.sendall(self, data, flags)
|
||||
|
||||
def recv(self, buflen=1024, flags=0):
|
||||
if self._sslobj:
|
||||
if flags != 0:
|
||||
raise ValueError(
|
||||
"non-zero flags not allowed in calls to recv() on %s" %
|
||||
self.__class__)
|
||||
return self.read(buflen)
|
||||
else:
|
||||
return socket.recv(self, buflen, flags)
|
||||
|
||||
def recv_into(self, buffer, nbytes=None, flags=0):
|
||||
if buffer and (nbytes is None):
|
||||
nbytes = len(buffer)
|
||||
elif nbytes is None:
|
||||
nbytes = 1024
|
||||
if self._sslobj:
|
||||
if flags != 0:
|
||||
raise ValueError(
|
||||
"non-zero flags not allowed in calls to recv_into() on %s" %
|
||||
self.__class__)
|
||||
tmp_buffer = self.read(nbytes)
|
||||
v = len(tmp_buffer)
|
||||
buffer[:v] = tmp_buffer
|
||||
return v
|
||||
else:
|
||||
return socket.recv_into(self, buffer, nbytes, flags)
|
||||
|
||||
def recvfrom(self, addr, buflen=1024, flags=0):
|
||||
if self._sslobj:
|
||||
raise ValueError("recvfrom not allowed on instances of %s" %
|
||||
self.__class__)
|
||||
else:
|
||||
return socket.recvfrom(self, addr, buflen, flags)
|
||||
|
||||
def recvfrom_into(self, buffer, nbytes=None, flags=0):
|
||||
if self._sslobj:
|
||||
raise ValueError("recvfrom_into not allowed on instances of %s" %
|
||||
self.__class__)
|
||||
else:
|
||||
return socket.recvfrom_into(self, buffer, nbytes, flags)
|
||||
|
||||
def pending(self):
|
||||
if self._sslobj:
|
||||
return self._sslobj.pending()
|
||||
else:
|
||||
return 0
|
||||
|
||||
def unwrap(self):
|
||||
if self._sslobj:
|
||||
s = self._sslobj.shutdown()
|
||||
self._sslobj = None
|
||||
return s
|
||||
else:
|
||||
raise ValueError("No SSL wrapper around " + str(self))
|
||||
|
||||
def shutdown(self, how):
|
||||
self._sslobj = None
|
||||
socket.shutdown(self, how)
|
||||
|
||||
def close(self):
|
||||
if self._makefile_refs < 1:
|
||||
self._sslobj = None
|
||||
socket.close(self)
|
||||
else:
|
||||
self._makefile_refs -= 1
|
||||
|
||||
def do_handshake(self):
|
||||
|
||||
"""Perform a TLS/SSL handshake."""
|
||||
|
||||
self._sslobj.do_handshake()
|
||||
|
||||
def connect(self, addr):
|
||||
|
||||
"""Connects to remote ADDR, and then wraps the connection in
|
||||
an SSL channel."""
|
||||
|
||||
# Here we assume that the socket is client-side, and not
|
||||
# connected at the time of the call. We connect it, then wrap it.
|
||||
if self._sslobj:
|
||||
raise ValueError("attempt to connect already-connected SSLSocket!")
|
||||
socket.connect(self, addr)
|
||||
self._sslobj = _ssl.sslwrap(self._sock, False, self.keyfile, self.certfile,
|
||||
self.cert_reqs, self.ssl_version,
|
||||
self.ca_certs)
|
||||
if self.do_handshake_on_connect:
|
||||
self.do_handshake()
|
||||
|
||||
def accept(self):
|
||||
|
||||
"""Accepts a new connection from a remote client, and returns
|
||||
a tuple containing that new connection wrapped with a server-side
|
||||
SSL channel, and the address of the remote client."""
|
||||
|
||||
newsock, addr = socket.accept(self)
|
||||
return (SSLSocket(newsock,
|
||||
keyfile=self.keyfile,
|
||||
certfile=self.certfile,
|
||||
server_side=True,
|
||||
cert_reqs=self.cert_reqs,
|
||||
ssl_version=self.ssl_version,
|
||||
ca_certs=self.ca_certs,
|
||||
do_handshake_on_connect=self.do_handshake_on_connect,
|
||||
suppress_ragged_eofs=self.suppress_ragged_eofs),
|
||||
addr)
|
||||
|
||||
def makefile(self, mode='r', bufsize=-1):
|
||||
|
||||
"""Make and return a file-like object that
|
||||
works with the SSL connection. Just use the code
|
||||
from the socket module."""
|
||||
|
||||
self._makefile_refs += 1
|
||||
# close=True so as to decrement the reference count when done with
|
||||
# the file-like object.
|
||||
return _fileobject(self, mode, bufsize, close=True)
|
||||
|
||||
|
||||
|
||||
def wrap_socket(sock, keyfile=None, certfile=None,
|
||||
server_side=False, cert_reqs=CERT_NONE,
|
||||
ssl_version=PROTOCOL_SSLv23, ca_certs=None,
|
||||
do_handshake_on_connect=True,
|
||||
suppress_ragged_eofs=True):
|
||||
|
||||
return SSLSocket(sock, keyfile=keyfile, certfile=certfile,
|
||||
server_side=server_side, cert_reqs=cert_reqs,
|
||||
ssl_version=ssl_version, ca_certs=ca_certs,
|
||||
do_handshake_on_connect=do_handshake_on_connect,
|
||||
suppress_ragged_eofs=suppress_ragged_eofs)
|
||||
|
||||
|
||||
# some utility functions
|
||||
|
||||
def cert_time_to_seconds(cert_time):
|
||||
|
||||
"""Takes a date-time string in standard ASN1_print form
|
||||
("MON DAY 24HOUR:MINUTE:SEC YEAR TIMEZONE") and return
|
||||
a Python time value in seconds past the epoch."""
|
||||
|
||||
import time
|
||||
return time.mktime(time.strptime(cert_time, "%b %d %H:%M:%S %Y GMT"))
|
||||
|
||||
PEM_HEADER = "-----BEGIN CERTIFICATE-----"
|
||||
PEM_FOOTER = "-----END CERTIFICATE-----"
|
||||
|
||||
def DER_cert_to_PEM_cert(der_cert_bytes):
|
||||
|
||||
"""Takes a certificate in binary DER format and returns the
|
||||
PEM version of it as a string."""
|
||||
|
||||
if hasattr(base64, 'standard_b64encode'):
|
||||
# preferred because older API gets line-length wrong
|
||||
f = base64.standard_b64encode(der_cert_bytes)
|
||||
return (PEM_HEADER + '\n' +
|
||||
textwrap.fill(f, 64) + '\n' +
|
||||
PEM_FOOTER + '\n')
|
||||
else:
|
||||
return (PEM_HEADER + '\n' +
|
||||
base64.encodestring(der_cert_bytes) +
|
||||
PEM_FOOTER + '\n')
|
||||
|
||||
def PEM_cert_to_DER_cert(pem_cert_string):
|
||||
|
||||
"""Takes a certificate in ASCII PEM format and returns the
|
||||
DER-encoded version of it as a byte sequence"""
|
||||
|
||||
if not pem_cert_string.startswith(PEM_HEADER):
|
||||
raise ValueError("Invalid PEM encoding; must start with %s"
|
||||
% PEM_HEADER)
|
||||
if not pem_cert_string.strip().endswith(PEM_FOOTER):
|
||||
raise ValueError("Invalid PEM encoding; must end with %s"
|
||||
% PEM_FOOTER)
|
||||
d = pem_cert_string.strip()[len(PEM_HEADER):-len(PEM_FOOTER)]
|
||||
return base64.decodestring(d)
|
||||
|
||||
def get_server_certificate(addr, ssl_version=PROTOCOL_SSLv3, ca_certs=None):
|
||||
|
||||
"""Retrieve the certificate from the server at the specified address,
|
||||
and return it as a PEM-encoded string.
|
||||
If 'ca_certs' is specified, validate the server cert against it.
|
||||
If 'ssl_version' is specified, use it in the connection attempt."""
|
||||
|
||||
host, port = addr
|
||||
if (ca_certs is not None):
|
||||
cert_reqs = CERT_REQUIRED
|
||||
else:
|
||||
cert_reqs = CERT_NONE
|
||||
s = wrap_socket(socket(), ssl_version=ssl_version,
|
||||
cert_reqs=cert_reqs, ca_certs=ca_certs)
|
||||
s.connect(addr)
|
||||
dercert = s.getpeercert(True)
|
||||
s.close()
|
||||
return DER_cert_to_PEM_cert(dercert)
|
||||
|
||||
def get_protocol_name(protocol_code):
|
||||
if protocol_code == PROTOCOL_TLSv1:
|
||||
return "TLSv1"
|
||||
elif protocol_code == PROTOCOL_SSLv23:
|
||||
return "SSLv23"
|
||||
elif protocol_code == PROTOCOL_SSLv3:
|
||||
return "SSLv3"
|
||||
else:
|
||||
return "<unknown>"
|
||||
|
||||
|
||||
# a replacement for the old socket.ssl function
|
||||
|
||||
def sslwrap_simple(sock, keyfile=None, certfile=None):
|
||||
|
||||
"""A replacement for the old socket.ssl function. Designed
|
||||
for compability with Python 2.5 and earlier. Will disappear in
|
||||
Python 3.0."""
|
||||
|
||||
if hasattr(sock, "_sock"):
|
||||
sock = sock._sock
|
||||
|
||||
ssl_sock = _ssl.sslwrap(sock, 0, keyfile, certfile, CERT_NONE,
|
||||
PROTOCOL_SSLv23, None)
|
||||
try:
|
||||
sock.getpeername()
|
||||
except:
|
||||
# no, no connection yet
|
||||
pass
|
||||
else:
|
||||
# yes, do the handshake
|
||||
ssl_sock.do_handshake()
|
||||
|
||||
return ssl_sock
|
||||
33
sublime/Packages/SFTP/license.txt
Normal file
33
sublime/Packages/SFTP/license.txt
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
Software contained in the "bin" directory is subject to the licenses in the
|
||||
"licenses" subdirectory. "sftp/ftplib2.pyc" is subject to the
|
||||
"python_license.txt" in this directory. All other files are subject to the
|
||||
following copyright.
|
||||
|
||||
--------
|
||||
|
||||
Sublime SFTP
|
||||
Copyright (c) 2011-2012 William Bond <will@wbond.net>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software to use it for an evaluation period for the purpose of
|
||||
testing prior to purchase.
|
||||
|
||||
Extended use of Sublime SFTP requires a license, which can be purchased from
|
||||
http://sublime.wbond.net. Any person who has purchased a license from William
|
||||
Bond and enters the provided product key is granted use of Sublime SFTP on
|
||||
any number of computers, of any supported operating system. Licences are
|
||||
valid for only a single person, and are valid for all upgrades to the
|
||||
major version purchased. For example, purchasing a license for version 1.1 will
|
||||
allow for free upgrades until version 2.0.
|
||||
|
||||
Redistribution, modification, merging, publication, distribution, sublicensing,
|
||||
and/or selling copies of Sublime SFTP is prohibited. Please contact
|
||||
support@wbond.net with any questions.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
11
sublime/Packages/SFTP/messages.json
Normal file
11
sublime/Packages/SFTP/messages.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"install": "messages/install.txt",
|
||||
"1.10.0": "messages/1.10.0.txt",
|
||||
"1.9.0": "messages/1.9.0.txt",
|
||||
"1.8.0": "messages/1.8.0.txt",
|
||||
"1.7.0": "messages/1.7.0.txt",
|
||||
"1.6.0": "messages/1.6.0.txt",
|
||||
"1.5.0": "messages/1.5.0.txt",
|
||||
"1.4.0": "messages/1.4.0.txt",
|
||||
"1.3.0": "messages/1.3.0.txt"
|
||||
}
|
||||
86
sublime/Packages/SFTP/messages/1.10.0.txt
Normal file
86
sublime/Packages/SFTP/messages/1.10.0.txt
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
Sublime SFTP 1.10.0 Changelog:
|
||||
|
||||
New Features
|
||||
|
||||
- Added the "extra_list_connections" setting which allows spawning multiple
|
||||
connections to the server for vastly improved performance when determining
|
||||
files to be synced.
|
||||
|
||||
This setting is set to the number of additional connections to open, and is
|
||||
ONLY used for the list operation that is perfomed when determining what files
|
||||
should be synced.
|
||||
|
||||
- The "Chmod" operation is now available for files and folders when browsing a
|
||||
remote
|
||||
|
||||
- Added the "keepalive" setting for users who experience frequent disconnects.
|
||||
|
||||
This will send a command to the server every specified number of seconds in
|
||||
an effort to keep the connection open.
|
||||
|
||||
- File ignoring is now slightly simpler - the "ignore_regex" setting has been
|
||||
deprecated, and replaced with "ignore_regexes", which is a list of smaller
|
||||
regular expressions. This should make adding file and folder paths easier.
|
||||
|
||||
- Sync commands now perform file operations in a specific order for users that
|
||||
perform deployments via sync:
|
||||
|
||||
1. Upload/download new files
|
||||
2. Upload/download existing files
|
||||
3. Remove old files
|
||||
|
||||
- Added a new version of psftp.exe on Windows that supports the -s flag via
|
||||
"sftp_flags" to allow a custom subsystem to be specified
|
||||
|
||||
- Changed SFTP connections on OS X and Linux to use compression by default for
|
||||
better performance
|
||||
|
||||
- The ignore regex patterns are now checked against both Linux/OS X and
|
||||
Windows style file and folder paths so users may more easily write ignore
|
||||
rules that must work across different operating systems
|
||||
|
||||
|
||||
Bug Fixes
|
||||
|
||||
- Added multiple new file listing formats, including support for IIS FTP v7.5
|
||||
and IIS servers that respond with four digit years
|
||||
|
||||
- Tweaked the delay of performing the "sync_down_on_open" feature on OS X in
|
||||
order to ensure that it happens. Also added a new editor-wide setting
|
||||
called "osx_sync_down_on_open_delay" that allows tweaking the delay for
|
||||
users still experiencing issues.
|
||||
|
||||
- Fixed an issue where in specific situations the root folder of a sync would
|
||||
be listed twice when using the FTP protocol
|
||||
|
||||
- Added error handling for encoding errors
|
||||
|
||||
- Fixed an issue on OS X where an sftp-config.json file in a folder with a
|
||||
non-ASCII character would cause mapping to be broken, and the remote path
|
||||
to be the same as the local path
|
||||
|
||||
- Added error handling for errors when checking symlinks on certain FTP servers
|
||||
|
||||
- Added trapping for multiple errors related to re-opening Sublime with a
|
||||
remote file after the local operating system and wiped the temp directory
|
||||
|
||||
- Added checks for remote files that were opened on a copy of Sublime Text
|
||||
that has been synced between two different machines (such as via Dropbox)
|
||||
where temp folders are incompatible (e.g. Windows vs Linux/OS X)
|
||||
|
||||
- Fixed a bug with NotFoundErrors when trying to reset the local working
|
||||
directory after a remote operation
|
||||
|
||||
- Fixed an error with downloading a symlinked file when
|
||||
"preserve_modiciation_times" is set to true
|
||||
|
||||
- Added another FTP passive mode error handler condition
|
||||
|
||||
- Resolved a working directory (pwd) error caused by the Tornado-vxWorks fix
|
||||
from v1.9.7
|
||||
|
||||
- Added a check for disk full messages
|
||||
|
||||
- Added support for a new (previously unreported) FTP password prompt
|
||||
|
||||
- The "sftp_flags" setting now accepts a list by default instead of a string
|
||||
21
sublime/Packages/SFTP/messages/1.3.0.txt
Normal file
21
sublime/Packages/SFTP/messages/1.3.0.txt
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
Sublime SFTP 1.3.0 Changelog:
|
||||
|
||||
** Backwards Compatibility Breaks **
|
||||
- Changed OS X key bindings to use Ctrl+Cmd instead of Cmd+Alt
|
||||
- The commands sftp_file and sftp_file_context were merged into a new command
|
||||
sftp_upload_file. Custom key bindings will need to be updated to reference
|
||||
this new command name.
|
||||
|
||||
New Features
|
||||
- Added the ability to download individual files
|
||||
- Added the ability to diff a file with the remote version
|
||||
- Diffs are generated and viewed in ST2 by default, but the diff_command
|
||||
setting may be used for an external diff viewer
|
||||
- Ignores .DS_Store, Thumbs.db, sftp-settings.json and desktop.ini by default
|
||||
|
||||
Bug Fixes
|
||||
- Added support for SSH keys with passphrases on Windows when the key file is
|
||||
specified via the ssh_key_file setting
|
||||
- Improved Cancel command to work consistently, even if triggered in between
|
||||
two files being uploaded during a directory upload
|
||||
- Fixed a number of small errors that showed on the console
|
||||
14
sublime/Packages/SFTP/messages/1.4.0.txt
Normal file
14
sublime/Packages/SFTP/messages/1.4.0.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Sublime SFTP 1.4.0 Changelog:
|
||||
|
||||
New Features
|
||||
- Added FTP protocol support
|
||||
- Updated the plugin to automatically retry operations when a
|
||||
disconnection occurs
|
||||
|
||||
Bug Fixes
|
||||
- Fixed handling of diffs on Windows for files not in the
|
||||
root of the remote
|
||||
- Made SFTP remote folder list parsing more robust when Sublime
|
||||
is run on a machine with a different locale than the server
|
||||
- Fixed issue with connecting to an SFTP server for the
|
||||
first time on Windows
|
||||
21
sublime/Packages/SFTP/messages/1.5.0.txt
Normal file
21
sublime/Packages/SFTP/messages/1.5.0.txt
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
Sublime SFTP 1.5.0 Changelog:
|
||||
|
||||
Please be sure to restart Sublime Text 2 to start using this new version.
|
||||
|
||||
** Backwards Compatibility Breaks **
|
||||
- Global "timeout" setting was moved to sftp-settings.json and renamed to
|
||||
"connect_timeout"
|
||||
- Global "save_before_upload" setting was moved to sftp-settings.json
|
||||
|
||||
New Features
|
||||
- Added sync functionality - see side bar and context menus
|
||||
- Rewrote FTP backend to be faster and use one connection instead of two
|
||||
- Changed initial remote configuration into a snippet, allowing for navigation
|
||||
between settings via the tab key
|
||||
- Added timestamps to debug messages
|
||||
|
||||
Bug Fixes
|
||||
- Fixed handling of idle timeouts for FTP on all platforms and SFTP on Windows
|
||||
- Fixed display of connection timeouts for Windows SFTP connections
|
||||
- Fixed a bug with Save All not uploading all documents when upload_on_save
|
||||
is set to true
|
||||
13
sublime/Packages/SFTP/messages/1.6.0.txt
Normal file
13
sublime/Packages/SFTP/messages/1.6.0.txt
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
Sublime SFTP 1.6.0 Changelog:
|
||||
|
||||
Please be sure to restart Sublime Text 2 to start using this new version.
|
||||
|
||||
New Features
|
||||
- Added remote browsing functionality - see File menu for standalone browsing,
|
||||
or use the context menus for existing local projects. Open
|
||||
Preferences > Package Settings > SFTP > Key Bindings - Default to see
|
||||
the new key bindings.
|
||||
|
||||
Bug Fixes
|
||||
- More idle timeout fixes for FTP
|
||||
- Fixed download of 0-byte files via FTP
|
||||
89
sublime/Packages/SFTP/messages/1.7.0.txt
Normal file
89
sublime/Packages/SFTP/messages/1.7.0.txt
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
Sublime SFTP 1.7.0 Changelog:
|
||||
|
||||
Please be sure to restart Sublime Text 2 to start using this new version.
|
||||
|
||||
** Backwards Compatibility Breaks **
|
||||
|
||||
- Newly created remote configs will be called sftp-config.json instead of
|
||||
sftp-settings.json. You may need to update your VCS ignore settings.
|
||||
Existing sftp-settings.json files will continue to function.
|
||||
|
||||
- The sftp_remotes folder in the Packages/User/ folder has been renamed to
|
||||
sftp_servers. You may need to update your VCS ignore settings.
|
||||
|
||||
- The following commands were renamed:
|
||||
sftp_browse_remote -> sftp_browse_server
|
||||
sftp_edit_remote -> sftp_edit_server
|
||||
sftp_delete_remote -> sftp_delete_server
|
||||
Custom key bindings may need to be updated.
|
||||
|
||||
New Features
|
||||
|
||||
- Added sync_down_on_open setting that will prompt to download the remote
|
||||
version of a file when opening a file, if the remote version is newer.
|
||||
|
||||
- Added confirm_overwrite_newer setting that will prompt if the file being
|
||||
uploaded is older than the file on the server. This only affects single
|
||||
file uploads and causes uploads to be a little slower since a remote
|
||||
file listing is required on each upload.
|
||||
|
||||
- Added Monitor File command that will periodically check file modification
|
||||
time and upload the file if it changes. This is intended to work with
|
||||
programs such as CodeKit and CSS compilers that will modify a
|
||||
file externally to Sublime. Frequency of checks can be controlled via
|
||||
SFTP settings.
|
||||
|
||||
- Added preserve_modification_times setting to preserve the modification time
|
||||
of files when uploading and downloading. This does not work on all servers.
|
||||
The plugin will notify if a server is incompatible. Can be set to
|
||||
"download_only" if remote/server does not support it.
|
||||
|
||||
- Added password prompting with asterisk password hiding, eliminating the
|
||||
requirement of saving passwords
|
||||
|
||||
- Added context menu entry to delete the remote version of a file
|
||||
|
||||
- Added context menu entry to rename the local and remote versions of a file
|
||||
|
||||
- Default remote/server configuration can now be edited by copying the file
|
||||
Packages/SFTP/SFTP.default-config to Packages/User/ and customizing
|
||||
|
||||
- Restructured the menus to have a single entry labelled SFTP/FTP in
|
||||
the file menu, side bar content menu and editor context menu
|
||||
|
||||
- Changed Windows to use Sublime Text interface for SSH key passphrase
|
||||
entry instead of Pageant
|
||||
|
||||
- Improved performance of reconnecting after a disconnect when the
|
||||
remote_time_offset_in_hours setting is not set
|
||||
|
||||
- Added uncaught exception handling to help debugging unreported errors
|
||||
|
||||
Bug Fixes
|
||||
|
||||
- Added checks for required configuration information to prevent
|
||||
silent failures
|
||||
|
||||
- Fixed a bug with deleting remote folders that would cause a not found error
|
||||
|
||||
- Added a missing Upload Folder entry to the side bar context menu
|
||||
|
||||
- Now properly parses MS FTP server file listings that include file
|
||||
names with spaces
|
||||
|
||||
- Fixed a crash on some OS X machines when using upload_on_save or
|
||||
editing remote files
|
||||
|
||||
- Changed passphrase prompting on Windows to not disappear after one second
|
||||
|
||||
- Activity indicator in status area is properly cleared after uploading a
|
||||
file via its preview
|
||||
|
||||
- Fixed sync commands to function properly when syncing a single file and
|
||||
perform only a single file listing when syncing a single file
|
||||
|
||||
- Fixed a bug with sync operations disconnecting while listing local files
|
||||
for SFTP remote with short idle timeout and many local folders
|
||||
|
||||
- Updated plugin to ignore .DS_Store, desktop.ini and Thumbs.db files in
|
||||
the Packages/User/sftp_servers folder to prevent parsing errors
|
||||
26
sublime/Packages/SFTP/messages/1.8.0.txt
Normal file
26
sublime/Packages/SFTP/messages/1.8.0.txt
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
Sublime SFTP 1.8.0 Changelog:
|
||||
|
||||
New Features
|
||||
|
||||
- Added FTPS support
|
||||
|
||||
Sublime Text does not include SSL support for Linux builds due to the
|
||||
different versions of OpenSSL. Linux users may enable experimental ftps
|
||||
support by opening Preferences > Package Settings > SFTP > Settings - User
|
||||
and setting "linux_enable_ssl": true.
|
||||
|
||||
Once Sublime Text is restarted, Sublime SFTP will attempt to load one of
|
||||
several pre-compiled _ssl modules. The console will contain debug
|
||||
information. If for some reason Sublime is unstable with this enabled,
|
||||
please set "linux_enable_ssl": false and contact support@wbond.net for
|
||||
help in compiling a custom _ssl.so for Python 2.6.6.
|
||||
|
||||
|
||||
Bug Fixes
|
||||
|
||||
- Fixed the SFTP > Map to Remote... menu entry in the editor context menu
|
||||
|
||||
- Fixed parsing of directory listings with users or group names containing
|
||||
a space character
|
||||
|
||||
- Improved compatibility with Filezilla Server
|
||||
41
sublime/Packages/SFTP/messages/1.9.0.txt
Normal file
41
sublime/Packages/SFTP/messages/1.9.0.txt
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
Sublime SFTP 1.9.0 Changelog:
|
||||
|
||||
New Features
|
||||
|
||||
- Added support for multiple remote configurations and switching them
|
||||
|
||||
New menu items were added to the side bar and editor context menus and the
|
||||
command palette to Add Alternate Remote Mapping... and Switch Remote
|
||||
Mapping...
|
||||
|
||||
This functionality is intended for users who need to upload from the same
|
||||
local folder to multiple remote environments. It is not possible, however,
|
||||
to upload to multiple environments simultaneously - the remote mapping must
|
||||
be switched and the files/folders uploaded to each in turn.
|
||||
|
||||
- Added the Delete Local and Remote Files/Folders menu entries to the side bar
|
||||
and editor context menus and the command palette
|
||||
|
||||
- Added confirm_downloads option to sftp-config.json files
|
||||
|
||||
|
||||
Bug Fixes
|
||||
|
||||
- Fixed the sync_down_on_open setting to obey the ignore_regex setting
|
||||
|
||||
- Fixed a bug with FTP disconnections sometimes causing crashes on OS X
|
||||
|
||||
- Added the cs_CZ2 remote_locale for servers using slightly different Czech
|
||||
month name abbreviations
|
||||
|
||||
- Fixed handling of files and folder names that consist only of a space, or
|
||||
that end with a space
|
||||
|
||||
- Corrected a bug where a connection error while performing a sync would
|
||||
causes an error popup
|
||||
|
||||
- Removed some debugging information that was being printed to the console
|
||||
when connecting to MS FTP servers
|
||||
|
||||
- Fixed FTPS connections to fallback to cleartext mode for data transfers when
|
||||
the remote server rejects the encrypted mode command
|
||||
48
sublime/Packages/SFTP/messages/install.txt
Normal file
48
sublime/Packages/SFTP/messages/install.txt
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
Thanks for installing Sublime SFTP! Below are some quick notes to get you
|
||||
started with the plugin. Please see http://wbond.net/sublime_packages/sftp for
|
||||
the full documentation.
|
||||
|
||||
|
||||
There are two major modes of operation:
|
||||
1. Mapping a local folder to a remote folder
|
||||
2. Working off of a server
|
||||
|
||||
|
||||
Mapping a Local Folder to a Remote Folder
|
||||
----
|
||||
|
||||
To map a local folder to a remote folder, right-click on it in the side bar
|
||||
and select the SFTP/SFTP > Map to Remote... You will enter your connection
|
||||
parameters and a new file will be created named sftp-config.json.
|
||||
|
||||
Once this file has been saved, all files in that folder and all subfolders
|
||||
will have various operations available via the side bar context menu, editor
|
||||
context menu and command palette.
|
||||
|
||||
|
||||
Working off of a Server
|
||||
----
|
||||
|
||||
To work off of a server, use the File menu and select SFTP/FTP > Setup Server...
|
||||
You will enter your connection parameters and options then save the file with
|
||||
the name you want to give the connection.
|
||||
|
||||
Once the server config is saved, you will be automatically connected to the
|
||||
server and you can browse and perform actions via the quick panel.
|
||||
|
||||
Unfortunely due to limitations of the Sublime Text 2 API, it is not possible
|
||||
to present the remote filesystem in the side bar. There are, however, key
|
||||
bindings for connecting to servers to help reduce the amount of time remote
|
||||
file operations take.
|
||||
|
||||
|
||||
Support
|
||||
----
|
||||
|
||||
To learn more about the features and settings, please visit
|
||||
http://wbond.net/sublime_packages/sftp.
|
||||
|
||||
If you are having trouble, please contact me at support@wbond.net. The Support
|
||||
page, http://wbond.net/sublime_packages/sftp/support, includes instructions
|
||||
for capturing a debug log that will be useful if you believe you are
|
||||
experiencing a bug.
|
||||
1
sublime/Packages/SFTP/package-metadata.json
Normal file
1
sublime/Packages/SFTP/package-metadata.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"url": "http://wbond.net/sublime_packages/sftp", "version": "1.10.2", "description": "Commercial SFTP/FTP plugin - upload, sync, browse, remote edit, diff and vcs integration"}
|
||||
58
sublime/Packages/SFTP/python_license.txt
Normal file
58
sublime/Packages/SFTP/python_license.txt
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
ftplib2.pyc is subject to the following license. Modifications have been made
|
||||
from the original ftplib that is included with the Python programming language
|
||||
in order to provide a better way to handle debugging messages.
|
||||
|
||||
Specifically, the set_debuglevel() method of the ftplib.FTP class accepts a
|
||||
second optional parameter, "callback", that can specific a callback that will
|
||||
recieve all debug messages. This callback should accept a single parameter,
|
||||
the debug message.
|
||||
|
||||
--------
|
||||
|
||||
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
|
||||
--------------------------------------------
|
||||
|
||||
1. This LICENSE AGREEMENT is between the Python Software Foundation
|
||||
("PSF"), and the Individual or Organization ("Licensee") accessing and
|
||||
otherwise using this software ("Python") in source or binary form and
|
||||
its associated documentation.
|
||||
|
||||
2. Subject to the terms and conditions of this License Agreement, PSF hereby
|
||||
grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce,
|
||||
analyze, test, perform and/or display publicly, prepare derivative works,
|
||||
distribute, and otherwise use Python alone or in any derivative version,
|
||||
provided, however, that PSF's License Agreement and PSF's notice of copyright,
|
||||
i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||
Python Software Foundation; All Rights Reserved" are retained in Python alone or
|
||||
in any derivative version prepared by Licensee.
|
||||
|
||||
3. In the event Licensee prepares a derivative work that is based on
|
||||
or incorporates Python or any part thereof, and wants to make
|
||||
the derivative work available to others as provided herein, then
|
||||
Licensee hereby agrees to include in any such work a brief summary of
|
||||
the changes made to Python.
|
||||
|
||||
4. PSF is making Python available to Licensee on an "AS IS"
|
||||
basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR
|
||||
IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND
|
||||
DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS
|
||||
FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT
|
||||
INFRINGE ANY THIRD PARTY RIGHTS.
|
||||
|
||||
5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON
|
||||
FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS
|
||||
A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON,
|
||||
OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF.
|
||||
|
||||
6. This License Agreement will automatically terminate upon a material
|
||||
breach of its terms and conditions.
|
||||
|
||||
7. Nothing in this License Agreement shall be deemed to create any
|
||||
relationship of agency, partnership, or joint venture between PSF and
|
||||
Licensee. This License Agreement does not grant permission to use PSF
|
||||
trademarks or trade name in a trademark sense to endorse or promote
|
||||
products or services of Licensee, or any third party.
|
||||
|
||||
8. By copying, installing or otherwise using Python, Licensee
|
||||
agrees to be bound by the terms and conditions of this License
|
||||
Agreement.
|
||||
101
sublime/Packages/SFTP/schemes/All Hallow's Eve.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/All Hallow's Eve.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#000000</string>
|
||||
<key>foreground</key>
|
||||
<string>#FFFFFF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#66CC33</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#C83730</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#AAAAAA</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#9933CC</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#555555</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#3387CC</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#434242</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Amy.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Amy.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#200020</string>
|
||||
<key>foreground</key>
|
||||
<string>#D0D0FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#70E0A0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#A00050</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#A080FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#BFBFBF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#805080</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#80A0FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#999999</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Blackboard.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Blackboard.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#0C1021</string>
|
||||
<key>foreground</key>
|
||||
<string>#F8F8F8</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#61CE3C</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#AB2A1D</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#D5E0F3</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#AEAEAE</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#7F90AA</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#8DA6CE</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#7F90AA</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Cobalt.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Cobalt.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#002240</string>
|
||||
<key>foreground</key>
|
||||
<string>#FFFFFF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#3AD900</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FF1E00</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#C8E4FD</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FFDD00</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#73817D</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#0088FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#8996A8</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
102
sublime/Packages/SFTP/schemes/Custom Output.hidden-tmLanguage
Normal file
102
sublime/Packages/SFTP/schemes/Custom Output.hidden-tmLanguage
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>sftp-out</string>
|
||||
</array>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~S</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output Panel - Custom</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>( Yes|No)\n</string>
|
||||
<key>name</key>
|
||||
<string>support.constant.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string> \.+</string>
|
||||
<key>name</key>
|
||||
<string>comment.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\bfailure\b)</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\bsuccess\b)</string>
|
||||
<key>name</key>
|
||||
<string>constant.language.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.sftp</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.sftp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(")[^"#]*(")</string>
|
||||
<key>name</key>
|
||||
<string>string.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>datediff.begin.sftp</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>datediff.end.sftp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(\()(\d+|same age)[^\)]*(\))</string>
|
||||
<key>name</key>
|
||||
<string>constant.numeric.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>date.begin.sftp</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>date.end.sftp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(\[)(\d+|same age)[^\]]*(\])</string>
|
||||
<key>name</key>
|
||||
<string>comment.sftp</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>output.sftp</string>
|
||||
<key>uuid</key>
|
||||
<string>E3A415F0-3F50-11E0-9207-0800200C9A68</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Dawn.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Dawn.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#F9F9F9</string>
|
||||
<key>foreground</key>
|
||||
<string>#080808</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#0B6125</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#B4371F</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#5A525F</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#691C97</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#808080</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#234A97</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#808080</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Eiffel.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Eiffel.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#FFFFFF</string>
|
||||
<key>foreground</key>
|
||||
<string>#000000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#26B31A</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#D80800</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#6D79DE</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#B90690</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#BFBFBF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#0206FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#BFBFBF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Espresso Libre.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Espresso Libre.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#2A211C</string>
|
||||
<key>foreground</key>
|
||||
<string>#BDAE9D</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#44AA43</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#990000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#BFBFBF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FF9358</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#8F7E65</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#0066FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#8F7E65</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/IDLE.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/IDLE.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#FFFFFF</string>
|
||||
<key>foreground</key>
|
||||
<string>#000000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#00A33F</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#990000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#21439C</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#A535AE</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#BFBFBF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FF5600</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#BFBFBF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/LAZY.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/LAZY.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#FFFFFF</string>
|
||||
<key>foreground</key>
|
||||
<string>#000000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#409B1C</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#D62A28</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#3B5BB5</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#671EBB</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#7C7C7C</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FF7800</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#B6B6B6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Mac Classic.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Mac Classic.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#FFFFFF</string>
|
||||
<key>foreground</key>
|
||||
<string>#000000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#036A07</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#C5060B</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#3C4C72</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#585CF6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#888888</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#B90690</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#888888</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
103
sublime/Packages/SFTP/schemes/MagicWB (Amiga).sftpTheme
Normal file
103
sublime/Packages/SFTP/schemes/MagicWB (Amiga).sftpTheme
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#969696</string>
|
||||
<key>foreground</key>
|
||||
<string>#000000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#3A68A3</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FF38FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FFFFFF</string>
|
||||
<key>background</key>
|
||||
<string>#FF000033</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FFA995</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#4D4E60</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#0000FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#4D4E60</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Monokai Bright.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Monokai Bright.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#272822</string>
|
||||
<key>foreground</key>
|
||||
<string>#F8F8F2</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#A6E22E</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#F92672</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#E6DB74</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#AE81FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#75715E</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#66D9EF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#75715E</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Monokai.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Monokai.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#272822</string>
|
||||
<key>foreground</key>
|
||||
<string>#F8F8F2</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#A6E22E</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#F92672</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#E6DB74</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#AE81FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#75715E</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#66D9EF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#75715E</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
108
sublime/Packages/SFTP/schemes/Output.hidden-tmLanguage
Normal file
108
sublime/Packages/SFTP/schemes/Output.hidden-tmLanguage
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>sftp-out</string>
|
||||
</array>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~S</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output Panel</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>( Yes|No)\n</string>
|
||||
<key>name</key>
|
||||
<string>response.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string> \.+</string>
|
||||
<key>name</key>
|
||||
<string>dots.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\bfailure\b)</string>
|
||||
<key>name</key>
|
||||
<string>failure.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\bsuccess\b)</string>
|
||||
<key>name</key>
|
||||
<string>success.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>^UNREGISTERED: Please visit http://sublime.wbond.net/sftp</string>
|
||||
<key>name</key>
|
||||
<string>failure.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.sftp</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.sftp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(")[^"#]*(")</string>
|
||||
<key>name</key>
|
||||
<string>string.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>datediff.begin.sftp</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>datediff.end.sftp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(\()(\d+|same age)[^\)]*(\))</string>
|
||||
<key>name</key>
|
||||
<string>datediff.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>date.begin.sftp</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>date.end.sftp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(\[)(\d+|same age)[^\]]*(\])</string>
|
||||
<key>name</key>
|
||||
<string>date.sftp</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>output.sftp</string>
|
||||
<key>uuid</key>
|
||||
<string>E3A415F0-3F50-11E0-9207-0800200C9A67</string>
|
||||
</dict>
|
||||
</plist>
|
||||
108
sublime/Packages/SFTP/schemes/Output.tmLanguage
Normal file
108
sublime/Packages/SFTP/schemes/Output.tmLanguage
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>fileTypes</key>
|
||||
<array>
|
||||
<string>sftp-out</string>
|
||||
</array>
|
||||
<key>keyEquivalent</key>
|
||||
<string>^~S</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output Panel</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>( Yes|No)\n</string>
|
||||
<key>name</key>
|
||||
<string>response.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string> \.+</string>
|
||||
<key>name</key>
|
||||
<string>dots.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\bfailure\b)</string>
|
||||
<key>name</key>
|
||||
<string>failure.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>(?i:\bsuccess\b)</string>
|
||||
<key>name</key>
|
||||
<string>success.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>^UNREGISTERED: Please visit http://sublime.wbond.net/sftp</string>
|
||||
<key>name</key>
|
||||
<string>failure.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.begin.sftp</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>punctuation.definition.string.end.sftp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(")[^"#]*(")</string>
|
||||
<key>name</key>
|
||||
<string>string.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>datediff.begin.sftp</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>datediff.end.sftp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(\()(\d+|same age)[^\)]*(\))</string>
|
||||
<key>name</key>
|
||||
<string>datediff.sftp</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>date.begin.sftp</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>date.end.sftp</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>(\[)(\d+|same age)[^\]]*(\])</string>
|
||||
<key>name</key>
|
||||
<string>date.sftp</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>output.sftp</string>
|
||||
<key>uuid</key>
|
||||
<string>E3A415F0-3F50-11E0-9207-0800200C9A67</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Pastels on Dark.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Pastels on Dark.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#211E1E</string>
|
||||
<key>foreground</key>
|
||||
<string>#DADADA</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#B8CD06</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#C82255</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#AD9361</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#6969FA</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#909090</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#47B8D6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#777777</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Slush & Poppies.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Slush & Poppies.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#F1F1F1</string>
|
||||
<key>foreground</key>
|
||||
<string>#000000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#008080</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#C03030</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#2060A0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#0080FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#999999</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#8000C0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#666666</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Solarized (Dark).sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Solarized (Dark).sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#042029</string>
|
||||
<key>foreground</key>
|
||||
<string>#839496</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#748B00</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#B81D1C</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#2AA198</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#B58900</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#536871</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#5A74CF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#536871</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Solarized (Light).sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Solarized (Light).sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#FDF6E3</string>
|
||||
<key>foreground</key>
|
||||
<string>#586E75</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#738A05</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#BB3700</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#2AA198</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#5A74CF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#819090</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#268BD2</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#B58900</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/SpaceCadet.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/SpaceCadet.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#0D0D0D</string>
|
||||
<key>foreground</key>
|
||||
<string>#DDE6CF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#9EBF60</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#7F005D</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#805978</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#A8885A</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#999999</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#6078BF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#596380</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Sunburst.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Sunburst.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#000000</string>
|
||||
<key>foreground</key>
|
||||
<string>#F8F8F8</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#99CF50</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#DD7B3B</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#89BDFF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#8693A5</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#AEAEAE</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#CF7D34</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#676767</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Twilight.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Twilight.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#141414</string>
|
||||
<key>foreground</key>
|
||||
<string>#F8F8F8</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#8F9D6A</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#CF6A4C</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#C5AF75</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#9B703F</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#9B859D</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#7587A6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#5F5A60</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/Zenburnesque.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/Zenburnesque.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#404040</string>
|
||||
<key>foreground</key>
|
||||
<string>#DEDEDE</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#709070</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FF2020</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#A8A8A8</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FFFFA0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#A0A0C0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#6080FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#676767</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
101
sublime/Packages/SFTP/schemes/iPlastic.sftpTheme
Normal file
101
sublime/Packages/SFTP/schemes/iPlastic.sftpTheme
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>author</key>
|
||||
<string>Will Bond</string>
|
||||
<key>name</key>
|
||||
<string>SFTP Output</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#EEEEEE</string>
|
||||
<key>foreground</key>
|
||||
<string>#000000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Success</string>
|
||||
<key>scope</key>
|
||||
<string>success</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#009933</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Failure</string>
|
||||
<key>scope</key>
|
||||
<string>failure</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FF0000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#0066FF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>datediff</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#9700CC</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Date</string>
|
||||
<key>scope</key>
|
||||
<string>date</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#666666</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Response</string>
|
||||
<key>scope</key>
|
||||
<string>response</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FF8000</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>dots</string>
|
||||
<key>scope</key>
|
||||
<string>dots</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#999999</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>766026CB-703D-4610-B070-8DE07D967C5F</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1 +1 @@
|
|||
1363369577
|
||||
1370390066
|
||||
|
|
@ -5,6 +5,8 @@
|
|||
"AAAPackageDev",
|
||||
"LESS",
|
||||
"LineEndings",
|
||||
"Package Control"
|
||||
"Package Control",
|
||||
"SFTP",
|
||||
"Web Inspector"
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@
|
|||
"highlight_modified_tabs": true,
|
||||
"ignored_packages":
|
||||
[
|
||||
"Vintage"
|
||||
"Vintage",
|
||||
"SFTP"
|
||||
],
|
||||
"indent_to_bracket": true,
|
||||
"open_files_in_new_window": true,
|
||||
|
|
|
|||
31
sublime/Packages/User/sftp_servers/dev.tapfortap.com
Normal file
31
sublime/Packages/User/sftp_servers/dev.tapfortap.com
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
// The tab key will cycle through the settings when first created
|
||||
// Visit http://wbond.net/sublime_packages/sftp/settings for help
|
||||
|
||||
// sftp, ftp or ftps
|
||||
"type": "sftp",
|
||||
|
||||
"sync_down_on_open": true,
|
||||
|
||||
"host": "dev.tapfortap.com",
|
||||
"user": "sjs",
|
||||
//"password": "password",
|
||||
//"port": "22",
|
||||
|
||||
"remote_path": "/home/sjs/Dropbox/tapfortap/server-v2",
|
||||
//"file_permissions": "664",
|
||||
//"dir_permissions": "775",
|
||||
|
||||
//"extra_list_connections": 0,
|
||||
|
||||
"connect_timeout": 30,
|
||||
//"keepalive": 120,
|
||||
//"ftp_passive_mode": true,
|
||||
"ssh_key_file": "~/.ssh/id_rsa",
|
||||
//"sftp_flags": ["-F", "/path/to/ssh_config"],
|
||||
|
||||
//"preserve_modification_times": false,
|
||||
//"remote_time_offset_in_hours": 0,
|
||||
//"remote_encoding": "utf-8",
|
||||
//"remote_locale": "C",
|
||||
}
|
||||
5
sublime/Packages/User/swi.sublime-settings
Normal file
5
sublime/Packages/User/swi.sublime-settings
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"breaks":
|
||||
{
|
||||
}
|
||||
}
|
||||
1
sublime/Packages/Web Inspector/.gitignore
vendored
Normal file
1
sublime/Packages/Web Inspector/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
*.pyc
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[
|
||||
{"keys": ["ctrl+shift+r"], "command": "swi_debug" }
|
||||
]
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[
|
||||
{"keys": ["super+shift+r"], "command": "swi_debug" }
|
||||
]
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
[
|
||||
{"keys": ["ctrl+shift+r"], "command": "swi_debug" }
|
||||
]
|
||||
6
sublime/Packages/Web Inspector/Default.sublime-commands
Normal file
6
sublime/Packages/Web Inspector/Default.sublime-commands
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[
|
||||
{
|
||||
"caption": "Web Inspector",
|
||||
"command": "swi_debug"
|
||||
}
|
||||
]
|
||||
85
sublime/Packages/Web Inspector/Main.sublime-menu
Normal file
85
sublime/Packages/Web Inspector/Main.sublime-menu
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
[
|
||||
{
|
||||
"caption": "Preferences",
|
||||
"mnemonic": "n",
|
||||
"id": "preferences",
|
||||
"children":
|
||||
[
|
||||
{
|
||||
"caption": "Package Settings",
|
||||
"mnemonic": "P",
|
||||
"id": "package-settings",
|
||||
"children":
|
||||
[
|
||||
{
|
||||
"caption": "Web Inspector",
|
||||
"children":
|
||||
[
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {
|
||||
"file": "${packages}/Web Inspector/Default (OSX).sublime-keymap",
|
||||
"platform": "OSX"
|
||||
},
|
||||
"caption": "Key Bindings – Default"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {
|
||||
"file": "${packages}/Web Inspector/Default (Linux).sublime-keymap",
|
||||
"platform": "Linux"
|
||||
},
|
||||
"caption": "Key Bindings – Default"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {
|
||||
"file": "${packages}/Web Inspector/Default (Windows).sublime-keymap",
|
||||
"platform": "Windows"
|
||||
},
|
||||
"caption": "Key Bindings – Default"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {
|
||||
"file": "${packages}/User/Default (OSX).sublime-keymap",
|
||||
"platform": "OSX"
|
||||
},
|
||||
"caption": "Key Bindings – User"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {
|
||||
"file": "${packages}/User/Default (Linux).sublime-keymap",
|
||||
"platform": "Linux"
|
||||
},
|
||||
"caption": "Key Bindings – User"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {
|
||||
"file": "${packages}/User/Default (Windows).sublime-keymap",
|
||||
"platform": "Windows"
|
||||
},
|
||||
"caption": "Key Bindings – User"
|
||||
},
|
||||
{ "caption": "-" },
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {"file": "${packages}/Web Inspector/swi.sublime-settings"},
|
||||
"caption": "Settings – Default"
|
||||
},
|
||||
{
|
||||
"command": "open_file",
|
||||
"args": {"file": "${packages}/User/swi.sublime-settings"},
|
||||
"caption": "Settings – User"
|
||||
},
|
||||
{ "caption": "-" }
|
||||
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
51
sublime/Packages/Web Inspector/README.markdown
Normal file
51
sublime/Packages/Web Inspector/README.markdown
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
# Sublime Web Inpsector (SWI)
|
||||
|
||||
Sublime Web Inspector works on top of WebInspectorProtocol. All information is displayed in console and text files. You can click on objects from console or stack trace to evaluate them. You can click on file name to goto file and line instantly. All clickable zone have borders to simply vizualize them.
|
||||
|
||||
All feature request and bugs you can add to https://github.com/sokolovstas/SublimeWebInspector/issues
|
||||
|
||||
*Thanks XDebug Authors for inspiration*
|
||||
|
||||
## Instalation
|
||||
Do in your Packages folder:
|
||||
```git clone git://github.com/sokolovstas/SublimeWebInspector.git Web\ Inpsector```
|
||||
|
||||
I prepare plugin to Package Manager after some testing
|
||||
|
||||
## Features
|
||||
|
||||
- Breakpoints for project stored in user settings with absolute paths.
|
||||
- Console.
|
||||
- Debugger steps and breakpoints.
|
||||
- Stack trace.
|
||||
- You can see object properties and values in console and stack trace.
|
||||
|
||||
## Commands
|
||||
|
||||
All commands you can find in "Sublime Web Inspector" command. And here a complete list:
|
||||
|
||||
### Command for controlling debugger
|
||||
- swi\_debug\_resume
|
||||
- swi\_debug\_step\_into
|
||||
- swi\_debug\_step\_out
|
||||
- swi\_debug\_step\_over
|
||||
|
||||
### Breakpoints
|
||||
- swi\_debug\_breakpoint
|
||||
|
||||
### Page
|
||||
- swi\_debug\_reload
|
||||
|
||||
### Start-stop
|
||||
- swi\_debug\_start
|
||||
- swi\_debug\_stop
|
||||
|
||||
### Utils
|
||||
- swi\_debug\_start\_chrome
|
||||
|
||||
## Settings
|
||||
|
||||
In settings you can change layouts for debugger, some color and path to Google Chrome
|
||||
|
||||
## PS
|
||||
*Close Google Chrome befor run it in remote debugger mode.*
|
||||
BIN
sublime/Packages/Web Inspector/icons/breakpoint_active.png
Normal file
BIN
sublime/Packages/Web Inspector/icons/breakpoint_active.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
BIN
sublime/Packages/Web Inspector/icons/breakpoint_active.psd
Normal file
BIN
sublime/Packages/Web Inspector/icons/breakpoint_active.psd
Normal file
Binary file not shown.
BIN
sublime/Packages/Web Inspector/icons/breakpoint_current.png
Normal file
BIN
sublime/Packages/Web Inspector/icons/breakpoint_current.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
BIN
sublime/Packages/Web Inspector/icons/breakpoint_inactive.png
Normal file
BIN
sublime/Packages/Web Inspector/icons/breakpoint_inactive.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.8 KiB |
4
sublime/Packages/Web Inspector/messages.json
Normal file
4
sublime/Packages/Web Inspector/messages.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"install": "messages/install.txt",
|
||||
"1.2.1": "messages/1.2.1.txt"
|
||||
}
|
||||
4
sublime/Packages/Web Inspector/messages/1.2.1.txt
Normal file
4
sublime/Packages/Web Inspector/messages/1.2.1.txt
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Added stack trace to console
|
||||
Fix message displaying in console
|
||||
|
||||
Moved to custom packages.json
|
||||
3
sublime/Packages/Web Inspector/messages/1.4.txt
Normal file
3
sublime/Packages/Web Inspector/messages/1.4.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Moved to packages.json
|
||||
Fixes some bugs
|
||||
Fix fall out on resume
|
||||
3
sublime/Packages/Web Inspector/messages/install.txt
Normal file
3
sublime/Packages/Web Inspector/messages/install.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Use Web Inspector command.
|
||||
|
||||
More details http://sokolovstas.github.com/SublimeWebInspector/
|
||||
1
sublime/Packages/Web Inspector/package-metadata.json
Normal file
1
sublime/Packages/Web Inspector/package-metadata.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"url": "http://sokolovstas.github.com/SublimeWebInspector", "version": "1.4", "description": "JavaScript debbuging in Sublime Text"}
|
||||
20
sublime/Packages/Web Inspector/packages.json
Normal file
20
sublime/Packages/Web Inspector/packages.json
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"schema_version": "1.2",
|
||||
"packages": [
|
||||
{
|
||||
"name": "Web Inspector",
|
||||
"description": "JavaScript debbuging in Sublime Text",
|
||||
"author": "Stanislav Sokolov",
|
||||
"homepage": "http://sokolovstas.github.com/SublimeWebInspector",
|
||||
"last_modified": "2012-02-28 00:00:00",
|
||||
"platforms": {
|
||||
"*": [
|
||||
{
|
||||
"version": "1.4",
|
||||
"url": "https://nodeload.github.com/sokolovstas/SublimeWebInspector/zip/1.4"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
1264
sublime/Packages/Web Inspector/swi.py
Normal file
1264
sublime/Packages/Web Inspector/swi.py
Normal file
File diff suppressed because it is too large
Load diff
26
sublime/Packages/Web Inspector/swi.sublime-settings
Normal file
26
sublime/Packages/Web Inspector/swi.sublime-settings
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"chrome_path": {
|
||||
"osx": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
|
||||
"windows": "C:\\Program Files\\Google\\Chrome\\chrome.exe",
|
||||
"linux": "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
|
||||
},
|
||||
"chrome_remote_port": "9222",
|
||||
"breakpoint_scope": "swi.breakpoint",
|
||||
"current_line_scope": "swi.current",
|
||||
"interactive_scope": "mcol_0088CCFF.settings",
|
||||
"stack_layout": {
|
||||
"cols": [0.0, 0.6, 1.0],
|
||||
"rows": [0.0, 0.7, 1.0],
|
||||
"cells": [[0, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2]]
|
||||
},
|
||||
"console_layout": {
|
||||
"cols": [0.0, 0.6, 1.0],
|
||||
"rows": [0.0, 0.7, 1.0],
|
||||
"cells": [[0, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2]]
|
||||
},
|
||||
"reload_on_start": true,
|
||||
"reload_on_save": true,
|
||||
"set_script_source": false,
|
||||
"open_stack_current_in_new_tab": false,
|
||||
"breaks": {}
|
||||
}
|
||||
115
sublime/Packages/Web Inspector/swi_log.JSON-tmLanguage
Normal file
115
sublime/Packages/Web Inspector/swi_log.JSON-tmLanguage
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
{
|
||||
"name": "Web Inspector (Log)",
|
||||
"scopeName": "jsd.log",
|
||||
"patterns": [
|
||||
{
|
||||
"match": "^(\\[D\\])\\s(.*?):(\\d+)\\s",
|
||||
"name": "jsd.log.debug",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "mcol_339900FF.settings"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.type.settings"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.parameter.settings"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "^(\\[E\\])\\s(.*?):(\\d+)\\s",
|
||||
"name": "jsd.log.error",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "mcol_CC0000FF.settings"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.type.settings"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.parameter.settings"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "^(\\[W\\])\\s(.*?):(\\d+)\\s",
|
||||
"name": "jsd.log.warn",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "mcol_F93F07FF.settings"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.type.settings"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.parameter.settings"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "^(\\[L\\])\\s(.*?):(\\d+)\\s",
|
||||
"name": "jsd.log.log",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "mcol_0088CCFF.settings"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.type.settings"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.parameter.settings"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "^(\\[T\\])\\s(.*?):(\\d+)\\s",
|
||||
"name": "jsd.log.tip",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "mcol_800080FF.settings"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.type.settings"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.parameter.settings"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "^\\t(.+)\\s(.*?):(\\d+)",
|
||||
"name": "jsd.log.object",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "mcol_CC0000FF.settings"
|
||||
},
|
||||
"2": {
|
||||
"name": "support.type.settings"
|
||||
},
|
||||
"3": {
|
||||
"name": "variable.parameter.settings"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "^(.*?:)\\s(.*?)$",
|
||||
"name": "jsd.log.property",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "variable.parameter.settings"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"match": "^(.*?)$",
|
||||
"name": "jsd.log.property_object_name",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "entity.name.function"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"uuid": "ca03e751-04ef-4330-9a6b-9b99aae1c418"
|
||||
}
|
||||
187
sublime/Packages/Web Inspector/swi_log.tmLanguage
Normal file
187
sublime/Packages/Web Inspector/swi_log.tmLanguage
Normal file
|
|
@ -0,0 +1,187 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Web Inspector (Log)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>mcol_339900FF.settings</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.type.settings</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.settings</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^(\[D\])\s(.*?):(\d+)\s</string>
|
||||
<key>name</key>
|
||||
<string>jsd.log.debug</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>mcol_CC0000FF.settings</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.type.settings</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.settings</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^(\[E\])\s(.*?):(\d+)\s</string>
|
||||
<key>name</key>
|
||||
<string>jsd.log.error</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>mcol_F93F07FF.settings</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.type.settings</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.settings</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^(\[W\])\s(.*?):(\d+)\s</string>
|
||||
<key>name</key>
|
||||
<string>jsd.log.warn</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>mcol_0088CCFF.settings</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.type.settings</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.settings</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^(\[L\])\s(.*?):(\d+)\s</string>
|
||||
<key>name</key>
|
||||
<string>jsd.log.log</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>mcol_800080FF.settings</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.type.settings</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.settings</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^(\[T\])\s(.*?):(\d+)\s</string>
|
||||
<key>name</key>
|
||||
<string>jsd.log.tip</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>mcol_CC0000FF.settings</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.type.settings</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.settings</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^\t(.+)\s(.*?):(\d+)</string>
|
||||
<key>name</key>
|
||||
<string>jsd.log.object</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.settings</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^(.*?:)\s(.*?)$</string>
|
||||
<key>name</key>
|
||||
<string>jsd.log.property</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^(.*?)$</string>
|
||||
<key>name</key>
|
||||
<string>jsd.log.property_object_name</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>jsd.log</string>
|
||||
<key>uuid</key>
|
||||
<string>ca03e751-04ef-4330-9a6b-9b99aae1c418</string>
|
||||
</dict>
|
||||
</plist>
|
||||
17
sublime/Packages/Web Inspector/swi_stack.JSON-tmLanguage
Normal file
17
sublime/Packages/Web Inspector/swi_stack.JSON-tmLanguage
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ "name": "Web Inspector (Stack)",
|
||||
"scopeName": "jsd.stack",
|
||||
"patterns": [
|
||||
{ "match": "^(.*?):(\\d+)(.*?)$",
|
||||
"name": "jsd.log.debug",
|
||||
"captures": {
|
||||
"1": { "name": "support.type.settings" },
|
||||
"2": { "name": "variable.parameter.settings" },
|
||||
"3": { "name": "entity.name.function" }
|
||||
}
|
||||
},
|
||||
{ "match": "local|global|closure",
|
||||
"name": "keyword"
|
||||
}
|
||||
],
|
||||
"uuid": "ca03e751-04ef-4330-9a6b-9b99aae1c418"
|
||||
}
|
||||
45
sublime/Packages/Web Inspector/swi_stack.tmLanguage
Normal file
45
sublime/Packages/Web Inspector/swi_stack.tmLanguage
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Web Inspector (Stack)</string>
|
||||
<key>patterns</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>captures</key>
|
||||
<dict>
|
||||
<key>1</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>support.type.settings</string>
|
||||
</dict>
|
||||
<key>2</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>variable.parameter.settings</string>
|
||||
</dict>
|
||||
<key>3</key>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>entity.name.function</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>match</key>
|
||||
<string>^(.*?):(\d+)(.*?)$</string>
|
||||
<key>name</key>
|
||||
<string>jsd.log.debug</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>match</key>
|
||||
<string>local|global|closure</string>
|
||||
<key>name</key>
|
||||
<string>keyword</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>scopeName</key>
|
||||
<string>jsd.stack</string>
|
||||
<key>uuid</key>
|
||||
<string>ca03e751-04ef-4330-9a6b-9b99aae1c418</string>
|
||||
</dict>
|
||||
</plist>
|
||||
742
sublime/Packages/Web Inspector/websocket.py
Normal file
742
sublime/Packages/Web Inspector/websocket.py
Normal file
|
|
@ -0,0 +1,742 @@
|
|||
"""
|
||||
websocket - WebSocket client library for Python
|
||||
|
||||
Copyright (C) 2010 Hiroki Ohtani(liris)
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
"""
|
||||
|
||||
|
||||
import socket
|
||||
from urlparse import urlparse
|
||||
import os
|
||||
import struct
|
||||
import uuid
|
||||
import sha
|
||||
import base64
|
||||
import logging
|
||||
|
||||
"""
|
||||
websocket python client.
|
||||
=========================
|
||||
|
||||
This version support only hybi-13.
|
||||
Please see http://tools.ietf.org/html/rfc6455 for protocol.
|
||||
"""
|
||||
|
||||
|
||||
# websocket supported version.
|
||||
VERSION = 13
|
||||
|
||||
# closing frame status codes.
|
||||
STATUS_NORMAL = 1000
|
||||
STATUS_GOING_AWAY = 1001
|
||||
STATUS_PROTOCOL_ERROR = 1002
|
||||
STATUS_UNSUPPORTED_DATA_TYPE = 1003
|
||||
STATUS_STATUS_NOT_AVAILABLE = 1005
|
||||
STATUS_ABNORMAL_CLOSED = 1006
|
||||
STATUS_INVALID_PAYLOAD = 1007
|
||||
STATUS_POLICY_VIOLATION = 1008
|
||||
STATUS_MESSAGE_TOO_BIG = 1009
|
||||
STATUS_INVALID_EXTENSION = 1010
|
||||
STATUS_UNEXPECTED_CONDITION = 1011
|
||||
STATUS_TLS_HANDSHAKE_ERROR = 1015
|
||||
|
||||
logger = logging.getLogger()
|
||||
|
||||
class WebSocketException(Exception):
|
||||
"""
|
||||
websocket exeception class.
|
||||
"""
|
||||
pass
|
||||
|
||||
default_timeout = None
|
||||
traceEnabled = False
|
||||
|
||||
def enableTrace(tracable):
|
||||
"""
|
||||
turn on/off the tracability.
|
||||
|
||||
tracable: boolean value. if set True, tracability is enabled.
|
||||
"""
|
||||
global traceEnabled
|
||||
traceEnabled = tracable
|
||||
if tracable:
|
||||
if not logger.handlers:
|
||||
logger.addHandler(logging.StreamHandler())
|
||||
logger.setLevel(logging.DEBUG)
|
||||
|
||||
def setdefaulttimeout(timeout):
|
||||
"""
|
||||
Set the global timeout setting to connect.
|
||||
|
||||
timeout: default socket timeout time. This value is second.
|
||||
"""
|
||||
global default_timeout
|
||||
default_timeout = timeout
|
||||
|
||||
def getdefaulttimeout():
|
||||
"""
|
||||
Return the global timeout setting(second) to connect.
|
||||
"""
|
||||
return default_timeout
|
||||
|
||||
def _parse_url(url):
|
||||
"""
|
||||
parse url and the result is tuple of
|
||||
(hostname, port, resource path and the flag of secure mode)
|
||||
|
||||
url: url string.
|
||||
"""
|
||||
if ":" not in url:
|
||||
raise ValueError("url is invalid")
|
||||
|
||||
scheme, url = url.split(":", 1)
|
||||
url = url.rstrip("/")
|
||||
|
||||
parsed = urlparse(url, scheme="http")
|
||||
if parsed.hostname:
|
||||
hostname = parsed.hostname
|
||||
else:
|
||||
raise ValueError("hostname is invalid")
|
||||
port = 0
|
||||
if parsed.port:
|
||||
port = parsed.port
|
||||
|
||||
is_secure = False
|
||||
if scheme == "ws":
|
||||
if not port:
|
||||
port = 80
|
||||
elif scheme == "wss":
|
||||
is_secure = True
|
||||
if not port:
|
||||
port = 443
|
||||
else:
|
||||
raise ValueError("scheme %s is invalid" % scheme)
|
||||
|
||||
if parsed.path:
|
||||
resource = parsed.path
|
||||
else:
|
||||
resource = "/"
|
||||
|
||||
return (hostname, port, resource, is_secure)
|
||||
|
||||
def create_connection(url, timeout=None, **options):
|
||||
"""
|
||||
connect to url and return websocket object.
|
||||
|
||||
Connect to url and return the WebSocket object.
|
||||
Passing optional timeout parameter will set the timeout on the socket.
|
||||
If no timeout is supplied, the global default timeout setting returned by getdefauttimeout() is used.
|
||||
You can customize using 'options'.
|
||||
If you set "headers" dict object, you can set your own custom header.
|
||||
|
||||
>>> conn = create_connection("ws://echo.websocket.org/",
|
||||
... headers={"User-Agent": "MyProgram"})
|
||||
|
||||
timeout: socket timeout time. This value is integer.
|
||||
if you set None for this value, it means "use default_timeout value"
|
||||
|
||||
options: current support option is only "header".
|
||||
if you set header as dict value, the custom HTTP headers are added.
|
||||
"""
|
||||
websock = WebSocket()
|
||||
websock.settimeout(timeout != None and timeout or default_timeout)
|
||||
websock.connect(url, **options)
|
||||
return websock
|
||||
|
||||
_MAX_INTEGER = (1 << 32) -1
|
||||
_AVAILABLE_KEY_CHARS = range(0x21, 0x2f + 1) + range(0x3a, 0x7e + 1)
|
||||
_MAX_CHAR_BYTE = (1<<8) -1
|
||||
|
||||
# ref. Websocket gets an update, and it breaks stuff.
|
||||
# http://axod.blogspot.com/2010/06/websocket-gets-update-and-it-breaks.html
|
||||
|
||||
def _create_sec_websocket_key():
|
||||
uid = uuid.uuid4()
|
||||
return base64.encodestring(uid.bytes).strip()
|
||||
|
||||
_HEADERS_TO_CHECK = {
|
||||
"upgrade": "websocket",
|
||||
"connection": "upgrade",
|
||||
}
|
||||
|
||||
class _SSLSocketWrapper(object):
|
||||
def __init__(self, sock):
|
||||
self.ssl = socket.ssl(sock)
|
||||
|
||||
def recv(self, bufsize):
|
||||
return self.ssl.read(bufsize)
|
||||
|
||||
def send(self, payload):
|
||||
return self.ssl.write(payload)
|
||||
|
||||
_BOOL_VALUES = (0, 1)
|
||||
def _is_bool(*values):
|
||||
for v in values:
|
||||
if v not in _BOOL_VALUES:
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
class ABNF(object):
|
||||
"""
|
||||
ABNF frame class.
|
||||
see http://tools.ietf.org/html/rfc5234
|
||||
and http://tools.ietf.org/html/rfc6455#section-5.2
|
||||
"""
|
||||
|
||||
# operation code values.
|
||||
OPCODE_TEXT = 0x1
|
||||
OPCODE_BINARY = 0x2
|
||||
OPCODE_CLOSE = 0x8
|
||||
OPCODE_PING = 0x9
|
||||
OPCODE_PONG = 0xa
|
||||
|
||||
# available operation code value tuple
|
||||
OPCODES = (OPCODE_TEXT, OPCODE_BINARY, OPCODE_CLOSE,
|
||||
OPCODE_PING, OPCODE_PONG)
|
||||
|
||||
# opcode human readable string
|
||||
OPCODE_MAP = {
|
||||
OPCODE_TEXT: "text",
|
||||
OPCODE_BINARY: "binary",
|
||||
OPCODE_CLOSE: "close",
|
||||
OPCODE_PING: "ping",
|
||||
OPCODE_PONG: "pong"
|
||||
}
|
||||
|
||||
# data length threashold.
|
||||
LENGTH_7 = 0x7d
|
||||
LENGTH_16 = 1 << 16
|
||||
LENGTH_63 = 1 << 63
|
||||
|
||||
def __init__(self, fin = 0, rsv1 = 0, rsv2 = 0, rsv3 = 0,
|
||||
opcode = OPCODE_TEXT, mask = 1, data = ""):
|
||||
"""
|
||||
Constructor for ABNF.
|
||||
please check RFC for arguments.
|
||||
"""
|
||||
self.fin = fin
|
||||
self.rsv1 = rsv1
|
||||
self.rsv2 = rsv2
|
||||
self.rsv3 = rsv3
|
||||
self.opcode = opcode
|
||||
self.mask = mask
|
||||
self.data = data
|
||||
self.get_mask_key = os.urandom
|
||||
|
||||
@staticmethod
|
||||
def create_frame(data, opcode):
|
||||
"""
|
||||
create frame to send text, binary and other data.
|
||||
|
||||
data: data to send. This is string value(byte array).
|
||||
if opcode is OPCODE_TEXT and this value is uniocde,
|
||||
data value is conveted into unicode string, automatically.
|
||||
|
||||
opcode: operation code. please see OPCODE_XXX.
|
||||
"""
|
||||
if opcode == ABNF.OPCODE_TEXT and isinstance(data, unicode):
|
||||
data = data.encode("utf-8")
|
||||
# mask must be set if send data from client
|
||||
return ABNF(1, 0, 0, 0, opcode, 1, data)
|
||||
|
||||
def format(self):
|
||||
"""
|
||||
format this object to string(byte array) to send data to server.
|
||||
"""
|
||||
if not _is_bool(self.fin, self.rsv1, self.rsv2, self.rsv3):
|
||||
raise ValueError("not 0 or 1")
|
||||
if self.opcode not in ABNF.OPCODES:
|
||||
raise ValueError("Invalid OPCODE")
|
||||
length = len(self.data)
|
||||
if length >= ABNF.LENGTH_63:
|
||||
raise ValueError("data is too long")
|
||||
|
||||
frame_header = chr(self.fin << 7
|
||||
| self.rsv1 << 6 | self.rsv2 << 5 | self.rsv3 << 4
|
||||
| self.opcode)
|
||||
if length < ABNF.LENGTH_7:
|
||||
frame_header += chr(self.mask << 7 | length)
|
||||
elif length < ABNF.LENGTH_16:
|
||||
frame_header += chr(self.mask << 7 | 0x7e)
|
||||
frame_header += struct.pack("!H", length)
|
||||
else:
|
||||
frame_header += chr(self.mask << 7 | 0x7f)
|
||||
frame_header += struct.pack("!Q", length)
|
||||
|
||||
if not self.mask:
|
||||
return frame_header + self.data
|
||||
else:
|
||||
mask_key = self.get_mask_key(4)
|
||||
return frame_header + self._get_masked(mask_key)
|
||||
|
||||
def _get_masked(self, mask_key):
|
||||
s = ABNF.mask(mask_key, self.data)
|
||||
return mask_key + "".join(s)
|
||||
|
||||
@staticmethod
|
||||
def mask(mask_key, data):
|
||||
"""
|
||||
mask or unmask data. Just do xor for each byte
|
||||
|
||||
mask_key: 4 byte string(byte).
|
||||
|
||||
data: data to mask/unmask.
|
||||
"""
|
||||
_m = map(ord, mask_key)
|
||||
_d = map(ord, data)
|
||||
for i in range(len(_d)):
|
||||
_d[i] ^= _m[i % 4]
|
||||
s = map(chr, _d)
|
||||
return "".join(s)
|
||||
|
||||
class WebSocket(object):
|
||||
"""
|
||||
Low level WebSocket interface.
|
||||
This class is based on
|
||||
The WebSocket protocol draft-hixie-thewebsocketprotocol-76
|
||||
http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76
|
||||
|
||||
We can connect to the websocket server and send/recieve data.
|
||||
The following example is a echo client.
|
||||
|
||||
>>> import websocket
|
||||
>>> ws = websocket.WebSocket()
|
||||
>>> ws.connect("ws://echo.websocket.org")
|
||||
>>> ws.send("Hello, Server")
|
||||
>>> ws.recv()
|
||||
'Hello, Server'
|
||||
>>> ws.close()
|
||||
|
||||
get_mask_key: a callable to produce new mask keys, see the set_mask_key
|
||||
function's docstring for more details
|
||||
"""
|
||||
def __init__(self, get_mask_key = None):
|
||||
"""
|
||||
Initalize WebSocket object.
|
||||
"""
|
||||
self.connected = False
|
||||
self.io_sock = self.sock = socket.socket()
|
||||
self.get_mask_key = get_mask_key
|
||||
|
||||
def set_mask_key(self, func):
|
||||
"""
|
||||
set function to create musk key. You can custumize mask key generator.
|
||||
Mainly, this is for testing purpose.
|
||||
|
||||
func: callable object. the fuct must 1 argument as integer.
|
||||
The argument means length of mask key.
|
||||
This func must be return string(byte array),
|
||||
which length is argument specified.
|
||||
"""
|
||||
self.get_mask_key = func
|
||||
|
||||
def settimeout(self, timeout):
|
||||
"""
|
||||
Set the timeout to the websocket.
|
||||
|
||||
timeout: timeout time(second).
|
||||
"""
|
||||
self.sock.settimeout(timeout)
|
||||
|
||||
def gettimeout(self):
|
||||
"""
|
||||
Get the websocket timeout(second).
|
||||
"""
|
||||
return self.sock.gettimeout()
|
||||
|
||||
def connect(self, url, **options):
|
||||
"""
|
||||
Connect to url. url is websocket url scheme. ie. ws://host:port/resource
|
||||
You can customize using 'options'.
|
||||
If you set "headers" dict object, you can set your own custom header.
|
||||
|
||||
>>> ws = WebSocket()
|
||||
>>> ws.connect("ws://echo.websocket.org/",
|
||||
... headers={"User-Agent": "MyProgram"})
|
||||
|
||||
timeout: socket timeout time. This value is integer.
|
||||
if you set None for this value,
|
||||
it means "use default_timeout value"
|
||||
|
||||
options: current support option is only "header".
|
||||
if you set header as dict value,
|
||||
the custom HTTP headers are added.
|
||||
|
||||
"""
|
||||
hostname, port, resource, is_secure = _parse_url(url)
|
||||
# TODO: we need to support proxy
|
||||
self.sock.connect((hostname, port))
|
||||
if is_secure:
|
||||
self.io_sock = _SSLSocketWrapper(self.sock)
|
||||
self._handshake(hostname, port, resource, **options)
|
||||
|
||||
def _handshake(self, host, port, resource, **options):
|
||||
sock = self.io_sock
|
||||
headers = []
|
||||
headers.append("GET %s HTTP/1.1" % resource)
|
||||
headers.append("Upgrade: websocket")
|
||||
headers.append("Connection: Upgrade")
|
||||
if port == 80:
|
||||
hostport = host
|
||||
else:
|
||||
hostport = "%s:%d" % (host, port)
|
||||
headers.append("Host: %s" % hostport)
|
||||
headers.append("Origin: %s" % hostport)
|
||||
|
||||
key = _create_sec_websocket_key()
|
||||
headers.append("Sec-WebSocket-Key: %s" % key)
|
||||
headers.append("Sec-WebSocket-Protocol: chat, superchat")
|
||||
headers.append("Sec-WebSocket-Version: %s" % VERSION)
|
||||
if "header" in options:
|
||||
headers.extend(options["header"])
|
||||
|
||||
headers.append("")
|
||||
headers.append("")
|
||||
|
||||
header_str = "\r\n".join(headers)
|
||||
sock.send(header_str)
|
||||
if traceEnabled:
|
||||
logger.debug( "--- request header ---")
|
||||
logger.debug( header_str)
|
||||
logger.debug("-----------------------")
|
||||
|
||||
status, resp_headers = self._read_headers()
|
||||
if status != 101:
|
||||
self.close()
|
||||
raise WebSocketException("Handshake Status %d" % status)
|
||||
|
||||
success = self._validate_header(resp_headers, key)
|
||||
if not success:
|
||||
self.close()
|
||||
raise WebSocketException("Invalid WebSocket Header")
|
||||
|
||||
self.connected = True
|
||||
|
||||
def _validate_header(self, headers, key):
|
||||
for k, v in _HEADERS_TO_CHECK.iteritems():
|
||||
r = headers.get(k, None)
|
||||
if not r:
|
||||
return False
|
||||
r = r.lower()
|
||||
if v != r:
|
||||
return False
|
||||
|
||||
result = headers.get("sec-websocket-accept", None)
|
||||
if not result:
|
||||
return False
|
||||
result = result.lower()
|
||||
|
||||
value = key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
|
||||
hashed = base64.encodestring(sha.sha(value).digest()).strip().lower()
|
||||
return hashed == result
|
||||
|
||||
def _read_headers(self):
|
||||
status = None
|
||||
headers = {}
|
||||
if traceEnabled:
|
||||
logger.debug("--- response header ---")
|
||||
|
||||
while True:
|
||||
line = self._recv_line()
|
||||
if line == "\r\n":
|
||||
break
|
||||
line = line.strip()
|
||||
if traceEnabled:
|
||||
logger.debug(line)
|
||||
if not status:
|
||||
status_info = line.split(" ", 2)
|
||||
status = int(status_info[1])
|
||||
else:
|
||||
kv = line.split(":", 1)
|
||||
if len(kv) == 2:
|
||||
key, value = kv
|
||||
headers[key.lower()] = value.strip().lower()
|
||||
else:
|
||||
raise WebSocketException("Invalid header")
|
||||
|
||||
if traceEnabled:
|
||||
logger.debug("-----------------------")
|
||||
|
||||
return status, headers
|
||||
|
||||
def send(self, payload, opcode = ABNF.OPCODE_TEXT):
|
||||
"""
|
||||
Send the data as string.
|
||||
|
||||
payload: Payload must be utf-8 string or unicoce,
|
||||
if the opcode is OPCODE_TEXT.
|
||||
Otherwise, it must be string(byte array)
|
||||
|
||||
opcode: operation code to send. Please see OPCODE_XXX.
|
||||
"""
|
||||
frame = ABNF.create_frame(payload, opcode)
|
||||
if self.get_mask_key:
|
||||
frame.get_mask_key = self.get_mask_key
|
||||
data = frame.format()
|
||||
self.io_sock.send(data)
|
||||
if traceEnabled:
|
||||
logger.debug("send: " + repr(data))
|
||||
|
||||
def ping(self, payload = ""):
|
||||
"""
|
||||
send ping data.
|
||||
|
||||
payload: data payload to send server.
|
||||
"""
|
||||
self.send(payload, ABNF.OPCODE_PING)
|
||||
|
||||
def pong(self, payload):
|
||||
"""
|
||||
send pong data.
|
||||
|
||||
payload: data payload to send server.
|
||||
"""
|
||||
self.send(payload, ABNF.OPCODE_PONG)
|
||||
|
||||
def recv(self):
|
||||
"""
|
||||
Receive string data(byte array) from the server.
|
||||
|
||||
return value: string(byte array) value.
|
||||
"""
|
||||
opcode, data = self.recv_data()
|
||||
return data
|
||||
|
||||
def recv_data(self):
|
||||
"""
|
||||
Recieve data with operation code.
|
||||
|
||||
return value: tuple of operation code and string(byte array) value.
|
||||
"""
|
||||
while True:
|
||||
frame = self.recv_frame()
|
||||
if not frame:
|
||||
# handle error:
|
||||
# 'NoneType' object has no attribute 'opcode'
|
||||
raise WebSocketException("Not a valid frame %s" % frame)
|
||||
elif frame.opcode in (ABNF.OPCODE_TEXT, ABNF.OPCODE_BINARY):
|
||||
return (frame.opcode, frame.data)
|
||||
elif frame.opcode == ABNF.OPCODE_CLOSE:
|
||||
self.send_close()
|
||||
return (frame.opcode, None)
|
||||
elif frame.opcode == ABNF.OPCODE_PING:
|
||||
self.pong("Hi!")
|
||||
|
||||
|
||||
def recv_frame(self):
|
||||
"""
|
||||
recieve data as frame from server.
|
||||
|
||||
return value: ABNF frame object.
|
||||
"""
|
||||
header_bytes = self._recv(2)
|
||||
if not header_bytes:
|
||||
return None
|
||||
b1 = ord(header_bytes[0])
|
||||
fin = b1 >> 7 & 1
|
||||
rsv1 = b1 >> 6 & 1
|
||||
rsv2 = b1 >> 5 & 1
|
||||
rsv3 = b1 >> 4 & 1
|
||||
opcode = b1 & 0xf
|
||||
b2 = ord(header_bytes[1])
|
||||
mask = b2 >> 7 & 1
|
||||
length = b2 & 0x7f
|
||||
|
||||
length_data = ""
|
||||
if length == 0x7e:
|
||||
length_data = self._recv(2)
|
||||
length = struct.unpack("!H", length_data)[0]
|
||||
elif length == 0x7f:
|
||||
length_data = self._recv(8)
|
||||
length = struct.unpack("!Q", length_data)[0]
|
||||
|
||||
mask_key = ""
|
||||
if mask:
|
||||
mask_key = self._recv(4)
|
||||
data = self._recv_strict(length)
|
||||
if traceEnabled:
|
||||
recieved = header_bytes + length_data + mask_key + data
|
||||
logger.debug("recv: " + repr(recieved))
|
||||
|
||||
if mask:
|
||||
data = ABNF.mask(mask_key, data)
|
||||
|
||||
frame = ABNF(fin, rsv1, rsv2, rsv3, opcode, mask, data)
|
||||
return frame
|
||||
|
||||
def send_close(self, status = STATUS_NORMAL, reason = ""):
|
||||
"""
|
||||
send close data to the server.
|
||||
|
||||
status: status code to send. see STATUS_XXX.
|
||||
|
||||
reason: the reason to close. This must be string.
|
||||
"""
|
||||
if status < 0 or status >= ABNF.LENGTH_16:
|
||||
raise ValueError("code is invalid range")
|
||||
self.send(struct.pack('!H', status) + reason, ABNF.OPCODE_CLOSE)
|
||||
|
||||
|
||||
|
||||
def close(self, status = STATUS_NORMAL, reason = ""):
|
||||
"""
|
||||
Close Websocket object
|
||||
|
||||
status: status code to send. see STATUS_XXX.
|
||||
|
||||
reason: the reason to close. This must be string.
|
||||
"""
|
||||
if self.connected:
|
||||
if status < 0 or status >= ABNF.LENGTH_16:
|
||||
raise ValueError("code is invalid range")
|
||||
|
||||
try:
|
||||
self.send(struct.pack('!H', status) + reason, ABNF.OPCODE_CLOSE)
|
||||
timeout = self.sock.gettimeout()
|
||||
self.sock.settimeout(3)
|
||||
try:
|
||||
frame = self.recv_frame()
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.error("close status: " + repr(frame.data))
|
||||
except:
|
||||
pass
|
||||
self.sock.settimeout(timeout)
|
||||
self.sock.shutdown(socket.SHUT_RDWR)
|
||||
except:
|
||||
pass
|
||||
self._closeInternal()
|
||||
|
||||
def _closeInternal(self):
|
||||
self.connected = False
|
||||
self.sock.close()
|
||||
self.io_sock = self.sock
|
||||
|
||||
def _recv(self, bufsize):
|
||||
bytes = self.io_sock.recv(bufsize)
|
||||
return bytes
|
||||
|
||||
def _recv_strict(self, bufsize):
|
||||
remaining = bufsize
|
||||
bytes = ""
|
||||
while remaining:
|
||||
bytes += self._recv(remaining)
|
||||
remaining = bufsize - len(bytes)
|
||||
|
||||
return bytes
|
||||
|
||||
def _recv_line(self):
|
||||
line = []
|
||||
while True:
|
||||
c = self._recv(1)
|
||||
line.append(c)
|
||||
if c == "\n":
|
||||
break
|
||||
return "".join(line)
|
||||
|
||||
class WebSocketApp(object):
|
||||
"""
|
||||
Higher level of APIs are provided.
|
||||
The interface is like JavaScript WebSocket object.
|
||||
"""
|
||||
def __init__(self, url,
|
||||
on_open = None, on_message = None, on_error = None,
|
||||
on_close = None, keep_running = True, get_mask_key = None):
|
||||
"""
|
||||
url: websocket url.
|
||||
on_open: callable object which is called at opening websocket.
|
||||
this function has one argument. The arugment is this class object.
|
||||
on_message: callbale object which is called when recieved data.
|
||||
on_message has 2 arguments.
|
||||
The 1st arugment is this class object.
|
||||
The passing 2nd arugment is utf-8 string which we get from the server.
|
||||
on_error: callable object which is called when we get error.
|
||||
on_error has 2 arguments.
|
||||
The 1st arugment is this class object.
|
||||
The passing 2nd arugment is exception object.
|
||||
on_close: callable object which is called when closed the connection.
|
||||
this function has one argument. The arugment is this class object.
|
||||
keep_running: a boolean flag indicating whether the app's main loop should
|
||||
keep running, defaults to True
|
||||
get_mask_key: a callable to produce new mask keys, see the WebSocket.set_mask_key's
|
||||
docstring for more information
|
||||
"""
|
||||
self.url = url
|
||||
self.on_open = on_open
|
||||
self.on_message = on_message
|
||||
self.on_error = on_error
|
||||
self.on_close = on_close
|
||||
self.keep_running = keep_running
|
||||
self.get_mask_key = get_mask_key
|
||||
self.sock = None
|
||||
|
||||
def send(self, data):
|
||||
"""
|
||||
send message. data must be utf-8 string or unicode.
|
||||
"""
|
||||
self.sock.send(data)
|
||||
|
||||
def close(self):
|
||||
"""
|
||||
close websocket connection.
|
||||
"""
|
||||
self.keep_running = False
|
||||
self.sock.close()
|
||||
|
||||
def run_forever(self):
|
||||
"""
|
||||
run event loop for WebSocket framework.
|
||||
This loop is infinite loop and is alive during websocket is available.
|
||||
"""
|
||||
if self.sock:
|
||||
raise WebSocketException("socket is already opened")
|
||||
try:
|
||||
self.sock = WebSocket(self.get_mask_key)
|
||||
self.sock.connect(self.url)
|
||||
self._run_with_no_err(self.on_open)
|
||||
while self.keep_running:
|
||||
data = self.sock.recv()
|
||||
if data is None:
|
||||
break
|
||||
self._run_with_no_err(self.on_message, data)
|
||||
except Exception, e:
|
||||
self._run_with_no_err(self.on_error, e)
|
||||
finally:
|
||||
self.sock.close()
|
||||
self._run_with_no_err(self.on_close)
|
||||
self.sock = None
|
||||
|
||||
def _run_with_no_err(self, callback, *args):
|
||||
if callback:
|
||||
try:
|
||||
callback(self, *args)
|
||||
except Exception, e:
|
||||
if logger.isEnabledFor(logging.DEBUG):
|
||||
logger.error(e)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
enableTrace(True)
|
||||
ws = create_connection("ws://echo.websocket.org/")
|
||||
print "Sending 'Hello, World'..."
|
||||
ws.send("Hello, World")
|
||||
print "Sent"
|
||||
print "Receiving..."
|
||||
result = ws.recv()
|
||||
print "Received '%s'" % result
|
||||
ws.close()
|
||||
77
sublime/Packages/Web Inspector/wip/Console.py
Normal file
77
sublime/Packages/Web Inspector/wip/Console.py
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
from utils import Command, Notification, WIPObject
|
||||
from Runtime import RemoteObject
|
||||
from Network import RequestId
|
||||
|
||||
|
||||
### Console.clearMessages
|
||||
def clearMessages():
|
||||
command = Command('Console.clearMessages')
|
||||
return command
|
||||
|
||||
|
||||
### Console.disable
|
||||
def disable():
|
||||
command = Command('Console.disable')
|
||||
return command
|
||||
|
||||
|
||||
### Console.enable
|
||||
def enable():
|
||||
command = Command('Console.enable')
|
||||
return command
|
||||
|
||||
|
||||
### Console.messageAdded
|
||||
def messageAdded():
|
||||
notification = Notification('Console.messageAdded')
|
||||
return notification
|
||||
|
||||
|
||||
def messageAdded_parser(params):
|
||||
result = ConsoleMessage(params['message'])
|
||||
return result
|
||||
|
||||
|
||||
### Console.messageRepeatCountUpdated
|
||||
def messageRepeatCountUpdated():
|
||||
notification = Notification('Console.messageRepeatCountUpdated')
|
||||
return notification
|
||||
|
||||
|
||||
def messageRepeatCountUpdate_parser(params):
|
||||
return params['count']
|
||||
|
||||
|
||||
### Console.messagesCleared
|
||||
def messagesCleared():
|
||||
notification = Notification('Console.messagesCleared')
|
||||
return notification
|
||||
|
||||
|
||||
class CallFrame(WIPObject):
|
||||
def __init__(self, value):
|
||||
self.set(value, 'columnNumber')
|
||||
self.set(value, 'functionName')
|
||||
self.set(value, 'lineNumber')
|
||||
self.set(value, 'url')
|
||||
|
||||
|
||||
class ConsoleMessage(WIPObject):
|
||||
def __init__(self, value):
|
||||
self.set(value, 'level')
|
||||
self.set(value, 'line')
|
||||
self.set_class(value, 'networkRequestId', RequestId)
|
||||
self.parameters = []
|
||||
if 'parameters' in value:
|
||||
for param in value['parameters']:
|
||||
self.parameters.append(RemoteObject(param))
|
||||
self.set(value, 'repeatCount', 1)
|
||||
self.set_class(value, 'stackTrace', StackTrace)
|
||||
self.set(value, 'text')
|
||||
self.set(value, 'url')
|
||||
|
||||
|
||||
class StackTrace(list):
|
||||
def __init__(self, value):
|
||||
for callFrame in value:
|
||||
self.append(CallFrame(callFrame))
|
||||
1
sublime/Packages/Web Inspector/wip/DOM.py
Normal file
1
sublime/Packages/Web Inspector/wip/DOM.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
# not implemented now
|
||||
1
sublime/Packages/Web Inspector/wip/DOMDebugger.py
Normal file
1
sublime/Packages/Web Inspector/wip/DOMDebugger.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
# not implemented now
|
||||
219
sublime/Packages/Web Inspector/wip/Debugger.py
Normal file
219
sublime/Packages/Web Inspector/wip/Debugger.py
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
from utils import Command, Notification, WIPObject
|
||||
from Runtime import RemoteObject
|
||||
import json
|
||||
|
||||
|
||||
### Console.clearMessages
|
||||
def canSetScriptSource():
|
||||
command = Command('Debugger.canSetScriptSource', {})
|
||||
return command
|
||||
|
||||
|
||||
def enable():
|
||||
command = Command('Debugger.enable', {})
|
||||
return command
|
||||
|
||||
|
||||
def evaluateOnCallFrame(callFrameId, expression):
|
||||
params = {}
|
||||
params['callFrameId'] = callFrameId()
|
||||
params['expression'] = expression
|
||||
command = Command('Debugger.evaluateOnCallFrame', params)
|
||||
return command
|
||||
|
||||
|
||||
def evaluateOnCallFrame_parser(result):
|
||||
data = RemoteObject(result['result'])
|
||||
return data
|
||||
|
||||
|
||||
def disable():
|
||||
command = Command('Debugger.disable', {})
|
||||
return command
|
||||
|
||||
|
||||
def resume():
|
||||
command = Command('Debugger.resume', {})
|
||||
return command
|
||||
|
||||
|
||||
def stepInto():
|
||||
command = Command('Debugger.stepInto', {})
|
||||
return command
|
||||
|
||||
|
||||
def stepOut():
|
||||
command = Command('Debugger.stepOut', {})
|
||||
return command
|
||||
|
||||
|
||||
def stepOver():
|
||||
command = Command('Debugger.stepOver', {})
|
||||
return command
|
||||
|
||||
|
||||
def removeBreakpoint(breakpointId):
|
||||
params = {}
|
||||
params['breakpointId'] = breakpointId
|
||||
command = Command('Debugger.removeBreakpoint', params)
|
||||
return command
|
||||
|
||||
|
||||
def setBreakpoint(location, condition=None):
|
||||
params = {}
|
||||
params['location'] = location()
|
||||
|
||||
if condition:
|
||||
params['condition'] = condition
|
||||
|
||||
command = Command('Debugger.setBreakpoint', params)
|
||||
return command
|
||||
|
||||
|
||||
def setBreakpoint_parser(result):
|
||||
data = {}
|
||||
data['breakpointId'] = BreakpointId(result['breakpointId'])
|
||||
data['actualLocation'] = Location(result['actualLocation'])
|
||||
return data
|
||||
|
||||
|
||||
def setScriptSource(scriptId, scriptSource):
|
||||
params = {}
|
||||
params['scriptId'] = scriptId
|
||||
params['scriptSource'] = scriptSource
|
||||
|
||||
command = Command('Debugger.setScriptSource', params)
|
||||
return command
|
||||
|
||||
|
||||
def setScriptSource_parser(result):
|
||||
data = {}
|
||||
data['callFrames'] = []
|
||||
for callFrame in result['callFrames']:
|
||||
data['callFrames'].append(CallFrame(callFrame))
|
||||
return data
|
||||
|
||||
|
||||
def setBreakpointByUrl(lineNumber, url=None, urlRegex=None, columnNumber=None, condition=None):
|
||||
params = {}
|
||||
params['lineNumber'] = lineNumber
|
||||
if url:
|
||||
params['url'] = url
|
||||
|
||||
if urlRegex:
|
||||
params['urlRegex'] = urlRegex
|
||||
|
||||
if columnNumber:
|
||||
params['columnNumber'] = columnNumber
|
||||
|
||||
if condition:
|
||||
params['condition'] = condition
|
||||
|
||||
command = Command('Debugger.setBreakpointByUrl', params)
|
||||
return command
|
||||
|
||||
|
||||
def setBreakpointByUrl_parser(result):
|
||||
data = {}
|
||||
data['breakpointId'] = BreakpointId(result['breakpointId'])
|
||||
data['locations'] = []
|
||||
for location in result['locations']:
|
||||
data['locations'].append(Location(location))
|
||||
return data
|
||||
|
||||
|
||||
def scriptParsed():
|
||||
notification = Notification('Debugger.scriptParsed')
|
||||
return notification
|
||||
|
||||
|
||||
def scriptParsed_parser(params):
|
||||
return {'scriptId': ScriptId(params['scriptId']), 'url': params['url']}
|
||||
|
||||
|
||||
def paused():
|
||||
notification = Notification('Debugger.paused')
|
||||
return notification
|
||||
|
||||
|
||||
def paused_parser(params):
|
||||
data = {}
|
||||
data['callFrames'] = []
|
||||
for callFrame in params['callFrames']:
|
||||
data['callFrames'].append(CallFrame(callFrame))
|
||||
data['reason'] = params['reason']
|
||||
return data
|
||||
|
||||
|
||||
def resumed():
|
||||
notification = Notification('Debugger.resumed')
|
||||
return notification
|
||||
|
||||
|
||||
class BreakpointId(WIPObject):
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
|
||||
def __str__(self):
|
||||
return self.value
|
||||
|
||||
def __call__(self):
|
||||
return self.value
|
||||
|
||||
|
||||
class CallFrameId(WIPObject):
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
|
||||
def __str__(self):
|
||||
return self.value
|
||||
|
||||
def __call__(self):
|
||||
return self.value
|
||||
|
||||
|
||||
class ScriptId(WIPObject):
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
|
||||
def __str__(self):
|
||||
return self.value
|
||||
|
||||
def __call__(self):
|
||||
return self.value
|
||||
|
||||
|
||||
class Scope(WIPObject):
|
||||
def __init__(self, value):
|
||||
self.set_class(value, 'object', RemoteObject)
|
||||
self.set(value, 'type')
|
||||
|
||||
|
||||
class Location(WIPObject):
|
||||
def __init__(self, value):
|
||||
self.set(value, 'columnNumber')
|
||||
self.set(value, 'lineNumber')
|
||||
self.set_class(value, 'scriptId', ScriptId)
|
||||
|
||||
def __call__(self):
|
||||
obj = {}
|
||||
if self.columnNumber:
|
||||
obj['columnNumber'] = self.columnNumber
|
||||
obj['lineNumber'] = self.lineNumber
|
||||
obj['scriptId'] = self.scriptId()
|
||||
return obj
|
||||
|
||||
|
||||
class CallFrame(WIPObject):
|
||||
def __init__(self, value):
|
||||
self.set_class(value, 'callFrameId', CallFrameId)
|
||||
self.set(value, 'functionName')
|
||||
self.set_class(value, 'location', Location)
|
||||
self.scopeChain = []
|
||||
if 'scopeChain' in value:
|
||||
for scope in value['scopeChain']:
|
||||
self.scopeChain.append(Scope(scope))
|
||||
self.set_class(value, 'this', RemoteObject)
|
||||
|
||||
def __str__(self):
|
||||
return "%s:%d %s" % (self.location.scriptId, self.location.lineNumber, self.functionName)
|
||||
27
sublime/Packages/Web Inspector/wip/Network.py
Normal file
27
sublime/Packages/Web Inspector/wip/Network.py
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
from utils import WIPObject, Command
|
||||
|
||||
|
||||
def clearBrowserCache():
|
||||
command = Command('Network.clearBrowserCache', {})
|
||||
return command
|
||||
|
||||
|
||||
def canClearBrowserCache():
|
||||
command = Command('Network.canClearBrowserCache', {})
|
||||
return command
|
||||
|
||||
|
||||
def setCacheDisabled(value):
|
||||
command = Command('Network.setCacheDisabled', {'cacheDisabled': value})
|
||||
return command
|
||||
|
||||
|
||||
class RequestId(WIPObject):
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
|
||||
def __str__(self):
|
||||
return self.value
|
||||
|
||||
def __repr__(self):
|
||||
return self.value
|
||||
6
sublime/Packages/Web Inspector/wip/Page.py
Normal file
6
sublime/Packages/Web Inspector/wip/Page.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
from utils import Command
|
||||
|
||||
|
||||
def reload():
|
||||
command = Command('Page.reload', {})
|
||||
return command
|
||||
100
sublime/Packages/Web Inspector/wip/Runtime.py
Normal file
100
sublime/Packages/Web Inspector/wip/Runtime.py
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
import json
|
||||
from utils import WIPObject, Command
|
||||
|
||||
|
||||
def evaluate(expression, objectGroup=None, returnByValue=None):
|
||||
params = {}
|
||||
|
||||
params['expression'] = expression
|
||||
|
||||
if(objectGroup):
|
||||
params['objectGroup'] = objectGroup
|
||||
|
||||
if(returnByValue):
|
||||
params['returnByValue'] = returnByValue
|
||||
|
||||
command = Command('Runtime.evaluate', params)
|
||||
return command
|
||||
|
||||
|
||||
def getProperties(objectId, ownProperties=False):
|
||||
params = {}
|
||||
|
||||
params['objectId'] = str(objectId)
|
||||
params['ownProperties'] = ownProperties
|
||||
|
||||
command = Command('Runtime.getProperties', params)
|
||||
return command
|
||||
|
||||
|
||||
def getProperties_parser(result):
|
||||
data = []
|
||||
for propertyDescriptor in result['result']:
|
||||
data.append(PropertyDescriptor(propertyDescriptor))
|
||||
return data
|
||||
|
||||
|
||||
class RemoteObject(WIPObject):
|
||||
def __init__(self, value):
|
||||
self.set(value, 'className')
|
||||
self.set(value, 'description')
|
||||
self.set_class(value, 'objectId', RemoteObjectId)
|
||||
self.set(value, 'subtype')
|
||||
self.set(value, 'type')
|
||||
self.set(value, 'value')
|
||||
|
||||
def __str__(self):
|
||||
if self.type == 'boolean':
|
||||
return str(self.value)
|
||||
if self.type == 'string':
|
||||
return str(self.value)
|
||||
if self.type == 'undefined':
|
||||
return 'undefined'
|
||||
if self.type == 'number':
|
||||
return str(self.value)
|
||||
if self.type == 'object':
|
||||
if not self.objectId():
|
||||
return 'null'
|
||||
else:
|
||||
if self.className:
|
||||
return self.className
|
||||
if self.description:
|
||||
return self.description
|
||||
return '{ ... }'
|
||||
if self.type == 'function':
|
||||
return self.description.split('\n')[0]
|
||||
|
||||
|
||||
class PropertyDescriptor(WIPObject):
|
||||
def __init__(self, _value):
|
||||
self.set(_value, 'configurable')
|
||||
self.set(_value, 'enumerable')
|
||||
#self.set_class(_value, 'get', RemoteObject)
|
||||
#self.set_class(_value, 'set', RemoteObject)
|
||||
self.set(_value, 'name')
|
||||
self.set_class(_value, 'value', RemoteObject)
|
||||
self.set(_value, 'wasThrown')
|
||||
self.set(_value, 'writable')
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
class RemoteObjectId(WIPObject):
|
||||
def __init__(self, value):
|
||||
self.value = value
|
||||
|
||||
def __str__(self):
|
||||
return self.value
|
||||
|
||||
def __call__(self):
|
||||
return self.value
|
||||
|
||||
def dumps(self):
|
||||
objid = json.loads(self.value)
|
||||
return "Object_%d_%d" % (objid['injectedScriptId'], objid['id'])
|
||||
|
||||
def loads(self, text):
|
||||
parts = text.split('_')
|
||||
self.value = '{"injectedScriptId":%s,"id":%s}' % (parts[1], parts[2])
|
||||
return self.value
|
||||
5
sublime/Packages/Web Inspector/wip/__init__.py
Normal file
5
sublime/Packages/Web Inspector/wip/__init__.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
"""
|
||||
WIP Protocol - WebInspectorProtocol implementation for python
|
||||
|
||||
Copyright (C) 2013 Sokolov Stansilav
|
||||
"""
|
||||
66
sublime/Packages/Web Inspector/wip/utils.py
Normal file
66
sublime/Packages/Web Inspector/wip/utils.py
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
class WIPObject(object):
|
||||
def set(self, obj, name, default=None):
|
||||
setattr(self, name, obj.get(name, default))
|
||||
|
||||
def set_class(self, obj, name, classObject):
|
||||
if name in obj:
|
||||
setattr(self, name, classObject(obj[name]))
|
||||
else:
|
||||
setattr(self, name, None)
|
||||
|
||||
def parse_to_class(self, obj, name, classObject):
|
||||
if name in obj:
|
||||
setattr(self, name, classObject.parse(obj[name]))
|
||||
else:
|
||||
setattr(self, name, None)
|
||||
|
||||
|
||||
class Notification(object):
|
||||
def __init__(self, notification_name):
|
||||
self.name = notification_name
|
||||
try:
|
||||
self.parser = eval('wip.' + notification_name + '_parser', {'wip': __import__('wip')})
|
||||
except:
|
||||
self.parser = Notification.default_parser
|
||||
self.lastResponse = None
|
||||
self.callback = None
|
||||
|
||||
@staticmethod
|
||||
def default_parser(params):
|
||||
print params
|
||||
return params
|
||||
|
||||
|
||||
class Command(object):
|
||||
def __init__(self, method_name, params={}):
|
||||
self.request = {'id': 0, 'method': '', 'params': params}
|
||||
self.method = method_name
|
||||
try:
|
||||
self.parser = eval('wip.' + method_name + '_parser', {'wip': __import__('wip')})
|
||||
except:
|
||||
self.parser = Command.default_parser
|
||||
self.params = params
|
||||
self.options = None
|
||||
self.callback = None
|
||||
self.response = None
|
||||
self.error = None
|
||||
self.data = None
|
||||
|
||||
def get_id(self):
|
||||
return self.request['id']
|
||||
|
||||
def set_id(self, value):
|
||||
self.request['id'] = value
|
||||
|
||||
def get_method(self):
|
||||
return self.request['method']
|
||||
|
||||
def set_method(self, value):
|
||||
self.request['method'] = value
|
||||
|
||||
id = property(get_id, set_id)
|
||||
method = property(get_method, set_method)
|
||||
|
||||
@staticmethod
|
||||
def default_parser(params):
|
||||
return params
|
||||
Loading…
Reference in a new issue