Latest versions have some issues with fetch
:
deno upgrade --version=1.9.0
Here are my Deno scripts:
- chromedriver-check
- dep-check
- file-edit
- flow
- git
- go-lint
- info
- jira
- shell-completion
- shell-proxy
- url-diff
In your Deno code you may use my lib
direactory.
Check that chromedriver has the same version with browser.
Check dependencies in your architecture.
Supported languages:
- Golang.
- Kotlin.
Ussage:
- Create
dep-check.json
for your app:{ "layers": { "ddd": [ [ "app/src/http", "app/src/cli" ], "app/src/service", [ "app/src/domain", "app/src/utils" ] ] } }
- Check dependencies:
deno run --allow-read \ https://raw.githubusercontent.com/zored/deno/v0.0.72/src/dep-check.ts \ $PWD \ $PWD/dep-check.json
Some simple edits for your file.
- Rename file by cursor word.
- Paste file name as word.
- Paste new lines between Golang functions.
Connects git and jira. Retrieves recent branches for issues.
Useful git actions.
- Recent branches.
- Increment and push tag version.
Example (increments minor version with prefix v
):
deno run --allow-run --allow-read \
https://raw.githubusercontent.com/zored/deno/v0.0.72/src/git.ts \
incVer
Example: build commit message:
deno install \
--allow-run --allow-write --allow-read \
-f --name zored-git \
https://raw.githubusercontent.com/zored/deno/v0.0.72/src/git.ts
zored-git message add 'create repo'
zored-git message add 'create service'
zored-git message flush | git commit -aF -
# Results with commit message:
# - create repo
# - create service
Lint Golang according to some advanced rules:
- Multiline errors.
Example:
deno run --allow-read \
https://raw.githubusercontent.com/zored/deno/v0.0.72/src/go-lint.ts \
$PWD
Retrieve info from one files into another.
Example:
- Create source
some.xml
:<description>new text</description>
- Create
README.md
:# Description <!-- info.ts.textFromXml(`some.xml`, `//description[1]`) { --> old text <!-- } -->
- Run:
deno run --allow-read --allow-write \ https://raw.githubusercontent.com/zored/deno/v0.0.72/src/info.ts \ README.md
Some Jira actions.
- Cache and retrieve Jira issue names.
- Jira API via browser cache.
Autocomplete commands in SH.
Example:
deno install -f https://raw.githubusercontent.com/zored/deno/v0.0.72/src/shell-completion.ts
eval "$(shell-completion completion --name=shell-completion)"
# Now completion works:
shell-completion sa<tab>
shell-completion sample ba<tab>
# ...
Do you have several SSH-terminals with Dockers with Mongo inside of them? Now you can easily access them all.
sp -e -- /ssh/docker-mongo/mongo 'db.people.count()'
sp -e -- db1 'db.people.count()'
-
Configure global config with proxies
~/shell-proxy.json
:[ { "globalAlias": "dev", "pathAlias": "dev", "type": "ssh", "sshAlias": "dev", "children": [ { "type": "docker", "image": "mongo:4.2.0", "children": { "globalAlias": "my-db", "pathAlias": "my-db", "type": "mongo", "uri": "mongodb://localhost:12345/dbname", "slave": true, "flags": { "authenticationDatabase": "admin" } } } ] } ]
-
Create alias for
~/.bash_profile
and restart terminal:# Alias: alias sp='deno run \ --allow-run --allow-env --allow-read --quiet --unstable \ https://raw.githubusercontent.com/zored/deno/v0.0.72/src/shell-proxy.ts \ --config $HOME/shell-proxy.json ' # Autocomplete: eval "$(sp completion)"
-
Use it:
sp