-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
46 changed files
with
320 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,27 @@ | ||
r←{appendPort}ListRegistries type;data | ||
r←{appendPort}ListRegistries type;data;RI | ||
⍝ List all registries defined in the Client's config file.\\ | ||
⍝ Returns a matrix with these columns: | ||
⍝ * [;1] URL | ||
⍝ * [;2] Alias | ||
⍝ * [;3] Priority\\ | ||
⍝ * [;4] API-key (optionally) | ||
⍝ * [;1] Alias | ||
⍝ * [;2] URL | ||
⍝ * [;3] ID | ||
⍝ * [;4] Port | ||
⍝ * [;5] Priority | ||
⍝ * [;6] NoCaching | ||
⍝ * [;7] Proxy | ||
⍝ * [;8] API-key (optionally)\\ | ||
⍝ "type" must be either 0 or 1 or empty:\\ | ||
⍝ * 1 means all data is listed | ||
⍝ * Everything else means just the alias, the uri and the priority are listed\\ | ||
⍝ * Everything else means the API key is not listed\\ | ||
⍝ If ⍺ is 1 (default is 0) then the second column carries the uri plus the port | ||
⍝ in case the port is neither 80 nor 443. | ||
appendPort←{0<⎕NC ⍵:⍎⍵ ⋄ 0}'appendPort' | ||
r←(0,(2+3×1≡type))⍴'' | ||
RI←RegistryIndices | ||
r←(0,((-1≢type)+≢RI.AllIndices))⍴'' | ||
'"type" (⍵) must be a Boolean or empty'Assert(⊂type)∊0 1 ''⍬ | ||
:If 0<≢data←MyUserSettings.registries | ||
:If 1≡type | ||
r←↑data.(alias uri port priority api_key) | ||
r←r[⍒r[;4];] | ||
:Else | ||
r←↑data.(uri alias port priority) | ||
r←r[⍒r[;4];] | ||
:EndIf | ||
r←(-1≢type)↓⍤1↑data.(alias uri id port priority noCaching proxy api_key) | ||
r←r[⍒r[;RI.priority];] | ||
:EndIf | ||
:If 0<≢r | ||
:AndIf appendPort | ||
r[;1]←BindProtocolWithPort¨↓r[;1 3] | ||
:If appendPort∧0<≢r | ||
r[;RI.url]←BindProtocolWithPort¨↓r[;RI.(url port)] | ||
:EndIf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
:Class RegistryIndices | ||
⍝ Holds indices useful to index the array returned by `ListRegistries` | ||
|
||
:Field Public Shared ReadOnly alias←1 | ||
:Field Public Shared ReadOnly url←2 | ||
:Field Public Shared ReadOnly id←3 | ||
:Field Public Shared ReadOnly port←4 | ||
:Field Public Shared ReadOnly priority←5 | ||
:Field Public Shared ReadOnly noCaching←6 | ||
:Field Public Shared ReadOnly proxy←7 | ||
:Field Public Shared ReadOnly apiKey←8 | ||
|
||
∇ r←AllIndices | ||
:Access Public Shared | ||
r←alias,url,id,port,priority,noCaching,proxy,apiKey | ||
∇ | ||
|
||
∇ r←AllNames | ||
:Access Public Shared | ||
r←'Alias' 'URL' 'ID' 'Port' 'Priority' 'No-Caching' 'Proxy' 'API-key' | ||
∇ | ||
|
||
∇ r←IndicesAndNames | ||
:Access Public Shared | ||
r←⍉↑AllIndices AllNames | ||
∇ | ||
|
||
:EndClass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
r←{loop}Base64_Encode data | ||
⍝ Base64-encodes "data". Tries to do it in one go but falls back to a loop if that causes a WS FULL | ||
⍝ `loop` defaults to 0, meaning that we first try to encode the data in one go but fall back to a loop in case of a WS FULL. | ||
⍝ You may specify a 1 as left argument in order to enforce the loop | ||
loop←{0<⎕NC ⍵:⍎⍵ ⋄ 0}'loop' | ||
:If 0=loop | ||
:Trap 1 ⍝ WS FULL | ||
r←1 Base64_ data | ||
:Else | ||
→∆Loop | ||
:EndTrap | ||
:Return | ||
:EndIf | ||
⍝ ------------------------------- | ||
∆Loop: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
r←Version | ||
⍝ See also `History` | ||
r←'Tatin' '0.103.3+1740' '2024-01-17' | ||
r←'Tatin' '0.104.0+1754' '2024-01-22' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.