sqlui 0.1.78 → 0.1.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.release-version +1 -1
- data/app/github/tree_client.rb +2 -2
- data/app/server.rb +10 -7
- data/client/resources/sqlui.js +0 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2748bb417cefe4c4a644ed39d186bffc5c4d2a17efa301abcd94562a5ae3b4ce
|
4
|
+
data.tar.gz: 319aa2fa1d11cd2fde367dda908ea3ef9c452661abc40c6c6b5c44871bf76034
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7192e72ea59c7b1b2f8877600844209598821dc6ded228e959b8d72f0d716403439c84197b097d5ff1a6fecb6452a6520ece7d4c1bac1b9b9b3bdd2f43be7e9
|
7
|
+
data.tar.gz: 4f0689ecaea729efe24bc219a987c33b47c1da356dedacaedc553715f4b17b4578948ce4de4c7fd9d5343c3884d1e32e69c921b71649bcbb206fc5c96be822f5
|
data/.release-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.80
|
data/app/github/tree_client.rb
CHANGED
@@ -18,7 +18,7 @@ module Github
|
|
18
18
|
class TreeClient
|
19
19
|
include Checks
|
20
20
|
|
21
|
-
@thread_pool = Concurrent::FixedThreadPool.new(
|
21
|
+
@thread_pool = Concurrent::FixedThreadPool.new(3)
|
22
22
|
|
23
23
|
class << self
|
24
24
|
attr_reader :thread_pool
|
@@ -60,7 +60,7 @@ module Github
|
|
60
60
|
end
|
61
61
|
end
|
62
62
|
|
63
|
-
latch.await(timeout:
|
63
|
+
latch.await(timeout: 10 + tree_size)
|
64
64
|
raise 'failed to load saved files' unless response['tree'].all? { |blob| blob['content'] }
|
65
65
|
|
66
66
|
Tree.for(owner: owner, repo: repo, ref: ref, tree_response: response)
|
data/app/server.rb
CHANGED
@@ -115,19 +115,22 @@ class Server < Sinatra::Base
|
|
115
115
|
|
116
116
|
github_cache = create_github_cache
|
117
117
|
config.database_configs.each do |database|
|
118
|
-
# Prefetch all trees on startup. This should happen before the health endpoint is available.
|
119
118
|
if (saved_config = database.saved_config)
|
120
119
|
tree_client = Github::TreeClient.new(
|
121
120
|
access_token: database.saved_config.token,
|
122
121
|
cache: github_cache,
|
123
122
|
logger: Sqlui.logger
|
124
123
|
)
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
124
|
+
# Prefetch all trees on startup. This should happen before the health endpoint is available.
|
125
|
+
unless ENV.fetch('DISABLE_PREFETCH', '0') == '1'
|
126
|
+
Sqlui.logger.info 'prefetch'
|
127
|
+
tree_client.get_tree(
|
128
|
+
owner: saved_config.owner,
|
129
|
+
repo: saved_config.repo,
|
130
|
+
ref: saved_config.branch,
|
131
|
+
regex: saved_config.regex
|
132
|
+
)
|
133
|
+
end
|
131
134
|
end
|
132
135
|
|
133
136
|
get "#{config.base_url_path}/#{database.url_path}/?" do
|
data/client/resources/sqlui.js
CHANGED
@@ -24239,15 +24239,6 @@
|
|
24239
24239
|
quoted: `${quotedQualifiedTableName} \`${alias}\``,
|
24240
24240
|
unquoted: `${qualifiedTableName} ${alias}`
|
24241
24241
|
});
|
24242
|
-
// Add a completion which only inserts the alias for use with "select" or "where" or "on".
|
24243
|
-
tables.push({
|
24244
|
-
label: `${qualifiedTableName} ${alias}`,
|
24245
|
-
boost: boost + 1,
|
24246
|
-
type: 'constant',
|
24247
|
-
completion_types: ['alias_only'],
|
24248
|
-
quoted: '`' + alias + '`',
|
24249
|
-
unquoted: alias
|
24250
|
-
});
|
24251
24242
|
tables.push({
|
24252
24243
|
label: alias,
|
24253
24244
|
boost: boost + 1,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqlui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.80
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Dower
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-07-
|
11
|
+
date: 2023-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|