@basictech/cli 0.0.2
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.
- package/bin/basic-cli +0 -0
- package/dist/artifacts.json +1 -0
- package/dist/basic-cli_0.0.2-SNAPSHOT-f228b56_checksums.txt +8 -0
- package/dist/basic-cli_Darwin_arm64.tar.gz +0 -0
- package/dist/basic-cli_Darwin_x86_64.tar.gz +0 -0
- package/dist/basic-cli_Linux_arm64.tar.gz +0 -0
- package/dist/basic-cli_Linux_i386.tar.gz +0 -0
- package/dist/basic-cli_Linux_x86_64.tar.gz +0 -0
- package/dist/basic-cli_Windows_arm64.zip +0 -0
- package/dist/basic-cli_Windows_i386.zip +0 -0
- package/dist/basic-cli_Windows_x86_64.zip +0 -0
- package/dist/basic-cli_darwin_amd64_v1/basic-cli +0 -0
- package/dist/basic-cli_darwin_arm64/basic-cli +0 -0
- package/dist/basic-cli_linux_386/basic-cli +0 -0
- package/dist/basic-cli_linux_amd64_v1/basic-cli +0 -0
- package/dist/basic-cli_linux_arm64/basic-cli +0 -0
- package/dist/basic-cli_windows_386/basic-cli.exe +0 -0
- package/dist/basic-cli_windows_amd64_v1/basic-cli.exe +0 -0
- package/dist/basic-cli_windows_arm64/basic-cli.exe +0 -0
- package/dist/config.yaml +130 -0
- package/dist/metadata.json +1 -0
- package/index.js +49 -0
- package/package.json +20 -0
- package/readme.md +43 -0
package/bin/basic-cli
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"name":"metadata.json","path":"dist/metadata.json","internal_type":30,"type":"Metadata"},{"name":"basic-cli.exe","path":"dist/basic-cli_windows_386/basic-cli.exe","goos":"windows","goarch":"386","internal_type":4,"type":"Binary","extra":{"Binary":"basic-cli","Ext":".exe","ID":"basic-cli"}},{"name":"basic-cli","path":"dist/basic-cli_darwin_arm64/basic-cli","goos":"darwin","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"basic-cli","Ext":"","ID":"basic-cli"}},{"name":"basic-cli.exe","path":"dist/basic-cli_windows_arm64/basic-cli.exe","goos":"windows","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"basic-cli","Ext":".exe","ID":"basic-cli"}},{"name":"basic-cli","path":"dist/basic-cli_linux_386/basic-cli","goos":"linux","goarch":"386","internal_type":4,"type":"Binary","extra":{"Binary":"basic-cli","Ext":"","ID":"basic-cli"}},{"name":"basic-cli","path":"dist/basic-cli_linux_arm64/basic-cli","goos":"linux","goarch":"arm64","internal_type":4,"type":"Binary","extra":{"Binary":"basic-cli","Ext":"","ID":"basic-cli"}},{"name":"basic-cli.exe","path":"dist/basic-cli_windows_amd64_v1/basic-cli.exe","goos":"windows","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"basic-cli","Ext":".exe","ID":"basic-cli"}},{"name":"basic-cli","path":"dist/basic-cli_linux_amd64_v1/basic-cli","goos":"linux","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"basic-cli","Ext":"","ID":"basic-cli"}},{"name":"basic-cli","path":"dist/basic-cli_darwin_amd64_v1/basic-cli","goos":"darwin","goarch":"amd64","goamd64":"v1","internal_type":4,"type":"Binary","extra":{"Binary":"basic-cli","Ext":"","ID":"basic-cli"}},{"name":"basic-cli_Windows_i386.zip","path":"dist/basic-cli_Windows_i386.zip","goos":"windows","goarch":"386","internal_type":1,"type":"Archive","extra":{"Binaries":["basic-cli.exe"],"Checksum":"sha256:d3d11dce713eb86d59c24563cad486e9f86d69f1d2b797351e7c77d04ef8524b","Format":"zip","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"basic-cli_Linux_i386.tar.gz","path":"dist/basic-cli_Linux_i386.tar.gz","goos":"linux","goarch":"386","internal_type":1,"type":"Archive","extra":{"Binaries":["basic-cli"],"Checksum":"sha256:9f301ef9ef02acc3464c517121469ad1f0b0dd582206903f9d9e906468b1b914","Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"basic-cli_Windows_arm64.zip","path":"dist/basic-cli_Windows_arm64.zip","goos":"windows","goarch":"arm64","internal_type":1,"type":"Archive","extra":{"Binaries":["basic-cli.exe"],"Checksum":"sha256:bcb1bb656fb06a80236e489647bf9f33b75cf62423cfdb37728e7ebdd050dcde","Format":"zip","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"basic-cli_Darwin_x86_64.tar.gz","path":"dist/basic-cli_Darwin_x86_64.tar.gz","goos":"darwin","goarch":"amd64","goamd64":"v1","internal_type":1,"type":"Archive","extra":{"Binaries":["basic-cli"],"Checksum":"sha256:9d66be11ca2ec0dece07ab559d5456a315661714027b585c88d78a72b5c595f6","Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"basic-cli_Windows_x86_64.zip","path":"dist/basic-cli_Windows_x86_64.zip","goos":"windows","goarch":"amd64","goamd64":"v1","internal_type":1,"type":"Archive","extra":{"Binaries":["basic-cli.exe"],"Checksum":"sha256:333c7b884155cccc96eebc03d74a8eec73ca9f5c93878dfda043a3f21ac99471","Format":"zip","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"basic-cli_Darwin_arm64.tar.gz","path":"dist/basic-cli_Darwin_arm64.tar.gz","goos":"darwin","goarch":"arm64","internal_type":1,"type":"Archive","extra":{"Binaries":["basic-cli"],"Checksum":"sha256:9c5aa2100d40493bb923151ac3dc388525495b9d0c499a28f7436f991cd62069","Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"basic-cli_Linux_arm64.tar.gz","path":"dist/basic-cli_Linux_arm64.tar.gz","goos":"linux","goarch":"arm64","internal_type":1,"type":"Archive","extra":{"Binaries":["basic-cli"],"Checksum":"sha256:2ed4db393b0ddbe89d7ae664e8ca4c6e33366d5c5aff0762a1de905ea192e1a3","Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"basic-cli_Linux_x86_64.tar.gz","path":"dist/basic-cli_Linux_x86_64.tar.gz","goos":"linux","goarch":"amd64","goamd64":"v1","internal_type":1,"type":"Archive","extra":{"Binaries":["basic-cli"],"Checksum":"sha256:6782ca0047b215ae7a02e212ee43897a086f5f0e8ce6b3ade419b8dc3c4baded","Format":"tar.gz","ID":"default","Replaces":null,"WrappedIn":""}},{"name":"basic-cli_0.0.2-SNAPSHOT-f228b56_checksums.txt","path":"dist/basic-cli_0.0.2-SNAPSHOT-f228b56_checksums.txt","internal_type":12,"type":"Checksum","extra":{}}]
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
9c5aa2100d40493bb923151ac3dc388525495b9d0c499a28f7436f991cd62069 basic-cli_Darwin_arm64.tar.gz
|
|
2
|
+
9d66be11ca2ec0dece07ab559d5456a315661714027b585c88d78a72b5c595f6 basic-cli_Darwin_x86_64.tar.gz
|
|
3
|
+
2ed4db393b0ddbe89d7ae664e8ca4c6e33366d5c5aff0762a1de905ea192e1a3 basic-cli_Linux_arm64.tar.gz
|
|
4
|
+
9f301ef9ef02acc3464c517121469ad1f0b0dd582206903f9d9e906468b1b914 basic-cli_Linux_i386.tar.gz
|
|
5
|
+
6782ca0047b215ae7a02e212ee43897a086f5f0e8ce6b3ade419b8dc3c4baded basic-cli_Linux_x86_64.tar.gz
|
|
6
|
+
bcb1bb656fb06a80236e489647bf9f33b75cf62423cfdb37728e7ebdd050dcde basic-cli_Windows_arm64.zip
|
|
7
|
+
d3d11dce713eb86d59c24563cad486e9f86d69f1d2b797351e7c77d04ef8524b basic-cli_Windows_i386.zip
|
|
8
|
+
333c7b884155cccc96eebc03d74a8eec73ca9f5c93878dfda043a3f21ac99471 basic-cli_Windows_x86_64.zip
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/config.yaml
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
project_name: basic-cli
|
|
3
|
+
release:
|
|
4
|
+
github:
|
|
5
|
+
owner: basicdb
|
|
6
|
+
name: basic-cli
|
|
7
|
+
name_template: '{{.Tag}}'
|
|
8
|
+
builds:
|
|
9
|
+
- id: basic-cli
|
|
10
|
+
goos:
|
|
11
|
+
- linux
|
|
12
|
+
- windows
|
|
13
|
+
- darwin
|
|
14
|
+
goarch:
|
|
15
|
+
- amd64
|
|
16
|
+
- arm64
|
|
17
|
+
- "386"
|
|
18
|
+
goarm:
|
|
19
|
+
- "6"
|
|
20
|
+
gomips:
|
|
21
|
+
- hardfloat
|
|
22
|
+
goamd64:
|
|
23
|
+
- v1
|
|
24
|
+
targets:
|
|
25
|
+
- linux_amd64_v1
|
|
26
|
+
- linux_arm64
|
|
27
|
+
- linux_386
|
|
28
|
+
- windows_amd64_v1
|
|
29
|
+
- windows_arm64
|
|
30
|
+
- windows_386
|
|
31
|
+
- darwin_amd64_v1
|
|
32
|
+
- darwin_arm64
|
|
33
|
+
dir: ./src
|
|
34
|
+
main: .
|
|
35
|
+
binary: basic-cli
|
|
36
|
+
builder: go
|
|
37
|
+
gobinary: go
|
|
38
|
+
command: build
|
|
39
|
+
ldflags:
|
|
40
|
+
- -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser
|
|
41
|
+
env:
|
|
42
|
+
- CGO_ENABLED=0
|
|
43
|
+
archives:
|
|
44
|
+
- id: default
|
|
45
|
+
name_template: '{{ .ProjectName }}_ {{- title .Os }}_ {{- if eq .Arch "amd64" }}x86_64 {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }} {{- if .Arm }}v{{ .Arm }}{{ end }}'
|
|
46
|
+
format: tar.gz
|
|
47
|
+
format_overrides:
|
|
48
|
+
- goos: windows
|
|
49
|
+
format: zip
|
|
50
|
+
files:
|
|
51
|
+
- src: license*
|
|
52
|
+
- src: LICENSE*
|
|
53
|
+
- src: readme*
|
|
54
|
+
- src: README*
|
|
55
|
+
- src: changelog*
|
|
56
|
+
- src: CHANGELOG*
|
|
57
|
+
snapshot:
|
|
58
|
+
version_template: '{{ .Version }}-SNAPSHOT-{{ .ShortCommit }}'
|
|
59
|
+
checksum:
|
|
60
|
+
name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt'
|
|
61
|
+
algorithm: sha256
|
|
62
|
+
changelog:
|
|
63
|
+
filters:
|
|
64
|
+
exclude:
|
|
65
|
+
- '^docs:'
|
|
66
|
+
- '^test:'
|
|
67
|
+
sort: asc
|
|
68
|
+
format: '{{ .SHA }}: {{ .Message }} ({{ with .AuthorUsername }}@{{ . }}{{ else }}{{ .AuthorName }} <{{ .AuthorEmail }}>{{ end }})'
|
|
69
|
+
dist: dist
|
|
70
|
+
env_files:
|
|
71
|
+
github_token: ~/.config/goreleaser/github_token
|
|
72
|
+
gitlab_token: ~/.config/goreleaser/gitlab_token
|
|
73
|
+
gitea_token: ~/.config/goreleaser/gitea_token
|
|
74
|
+
before:
|
|
75
|
+
hooks:
|
|
76
|
+
- go mod tidy
|
|
77
|
+
- go generate ./...
|
|
78
|
+
source:
|
|
79
|
+
name_template: '{{ .ProjectName }}-{{ .Version }}'
|
|
80
|
+
format: tar.gz
|
|
81
|
+
gomod:
|
|
82
|
+
gobinary: go
|
|
83
|
+
announce:
|
|
84
|
+
twitter:
|
|
85
|
+
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
|
86
|
+
mastodon:
|
|
87
|
+
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
|
88
|
+
server: ""
|
|
89
|
+
reddit:
|
|
90
|
+
title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
|
|
91
|
+
url_template: '{{ .ReleaseURL }}'
|
|
92
|
+
slack:
|
|
93
|
+
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
|
94
|
+
username: GoReleaser
|
|
95
|
+
discord:
|
|
96
|
+
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
|
97
|
+
author: GoReleaser
|
|
98
|
+
color: "3888754"
|
|
99
|
+
icon_url: https://goreleaser.com/static/avatar.png
|
|
100
|
+
teams:
|
|
101
|
+
title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
|
|
102
|
+
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
|
103
|
+
color: '#2D313E'
|
|
104
|
+
icon_url: https://goreleaser.com/static/avatar.png
|
|
105
|
+
smtp:
|
|
106
|
+
subject_template: '{{ .ProjectName }} {{ .Tag }} is out!'
|
|
107
|
+
body_template: 'You can view details from: {{ .ReleaseURL }}'
|
|
108
|
+
mattermost:
|
|
109
|
+
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
|
110
|
+
title_template: '{{ .ProjectName }} {{ .Tag }} is out!'
|
|
111
|
+
username: GoReleaser
|
|
112
|
+
linkedin:
|
|
113
|
+
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
|
114
|
+
telegram:
|
|
115
|
+
message_template: '{{ mdv2escape .ProjectName }} {{ mdv2escape .Tag }} is out{{ mdv2escape "!" }} Check it out at {{ mdv2escape .ReleaseURL }}'
|
|
116
|
+
parse_mode: MarkdownV2
|
|
117
|
+
webhook:
|
|
118
|
+
message_template: '{ "message": "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}"}'
|
|
119
|
+
content_type: application/json; charset=utf-8
|
|
120
|
+
opencollective:
|
|
121
|
+
title_template: '{{ .Tag }}'
|
|
122
|
+
message_template: '{{ .ProjectName }} {{ .Tag }} is out!<br/>Check it out at <a href="{{ .ReleaseURL }}">{{ .ReleaseURL }}</a>'
|
|
123
|
+
bluesky:
|
|
124
|
+
message_template: '{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}'
|
|
125
|
+
git:
|
|
126
|
+
tag_sort: -version:refname
|
|
127
|
+
github_urls:
|
|
128
|
+
download: https://github.com
|
|
129
|
+
gitlab_urls:
|
|
130
|
+
download: https://gitlab.com
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"project_name":"basic-cli","tag":"v0.0.2","previous_tag":"v0.0.1","version":"0.0.2-SNAPSHOT-f228b56","commit":"f228b56243f8b72d52a98879ed821dc3d3939b69","date":"2024-10-18T18:05:37.988165-07:00","runtime":{"goos":"darwin","goarch":"arm64"}}
|
package/index.js
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { execFile, execSync } = require('child_process');
|
|
4
|
+
const os = require('os');
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
|
|
7
|
+
let binary;
|
|
8
|
+
|
|
9
|
+
let arch = os.arch() == 'x64' ? 'amd64_v1' : os.arch();
|
|
10
|
+
let platform = os.platform() == 'win32' ? 'windows' : os.platform();
|
|
11
|
+
let folderName = 'basic-cli' + '_' + platform + '_' + arch;
|
|
12
|
+
|
|
13
|
+
switch (os.platform()) {
|
|
14
|
+
case 'win32':
|
|
15
|
+
binary = path.join(__dirname, 'dist', folderName, 'basic-cli.exe');
|
|
16
|
+
break;
|
|
17
|
+
case 'darwin':
|
|
18
|
+
binary = path.join(__dirname, 'dist', folderName, 'basic-cli');
|
|
19
|
+
break;
|
|
20
|
+
case 'linux':
|
|
21
|
+
binary = path.join(__dirname, 'dist', folderName, 'basic-cli');
|
|
22
|
+
break;
|
|
23
|
+
default:
|
|
24
|
+
console.error('Unsupported OS');
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (!fs.existsSync(binary)) {
|
|
29
|
+
console.error(`Binary not found: ${binary}`);
|
|
30
|
+
process.exit(1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
const sourcePath = binary
|
|
35
|
+
const destPath = path.join(__dirname, 'bin', 'basic-cli');
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
// Ensure the bin directory exists
|
|
39
|
+
fs.mkdirSync(path.dirname(destPath), { recursive: true });
|
|
40
|
+
|
|
41
|
+
fs.copyFileSync(sourcePath, destPath);
|
|
42
|
+
if (os.platform() !== 'win32') {
|
|
43
|
+
execSync(`chmod +x ${destPath}`);
|
|
44
|
+
}
|
|
45
|
+
console.log(`Installed the ${os.platform()} binary.`);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
console.error('Error during post-install script:', error);
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@basictech/cli",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "basictech cli for creating & managing your projects",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist",
|
|
8
|
+
"index.js"
|
|
9
|
+
],
|
|
10
|
+
"bin": {
|
|
11
|
+
"basic": "./bin/basic-cli"
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"postinstall": "node ./index.js",
|
|
15
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
16
|
+
},
|
|
17
|
+
"author": "raz@basic.tech",
|
|
18
|
+
"license": "ISC",
|
|
19
|
+
"dependencies": {}
|
|
20
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Basic CLI
|
|
2
|
+
|
|
3
|
+
A command-line interface for interacting with the Basic API.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
## Available Commands
|
|
8
|
+
|
|
9
|
+
1. **account**
|
|
10
|
+
- Description: Show account information
|
|
11
|
+
- Usage: `basic account`
|
|
12
|
+
|
|
13
|
+
2. **login**
|
|
14
|
+
- Description: Log in to the Basic API
|
|
15
|
+
- Usage: `basic login`
|
|
16
|
+
|
|
17
|
+
3. **logout**
|
|
18
|
+
- Description: Log out of the Basic API
|
|
19
|
+
- Usage: `basic logout`
|
|
20
|
+
|
|
21
|
+
4. **status**
|
|
22
|
+
- Description: Show login statuss
|
|
23
|
+
- Usage: `basic status`
|
|
24
|
+
|
|
25
|
+
5. **projects**
|
|
26
|
+
- Description: Show projects
|
|
27
|
+
- Usage: `basic projects`
|
|
28
|
+
|
|
29
|
+
6. **init**
|
|
30
|
+
- Description: Create a new project
|
|
31
|
+
- Usage: `basic init`
|
|
32
|
+
|
|
33
|
+
7. **help**
|
|
34
|
+
- Description: Show help information
|
|
35
|
+
- Usage: `basic help`
|
|
36
|
+
|
|
37
|
+
## Examples
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## Notes
|
|
41
|
+
|
|
42
|
+
- Make sure you're logged in using the `login` command before using commands that require authentication.
|
|
43
|
+
- Use the `help` command to see this list of available commands in the CLI.
|