gibson-cli 0.1.0__tar.gz → 0.1.2__tar.gz
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.
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/.gitignore +1 -0
- {gibson_cli-0.1.0/gibson_cli.egg-info → gibson_cli-0.1.2}/PKG-INFO +19 -6
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/README.md +14 -5
- gibson_cli-0.1.2/command/Version.py +8 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/auth/Login.py +4 -1
- gibson_cli-0.1.2/conf/Version.py +5 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/core/CommandRouter.py +3 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/core/Conversation.py +2 -2
- {gibson_cli-0.1.0 → gibson_cli-0.1.2/gibson_cli.egg-info}/PKG-INFO +19 -6
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/gibson_cli.egg-info/SOURCES.txt +1 -0
- gibson_cli-0.1.2/pyproject.toml +39 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/services/auth/Server.py +8 -18
- gibson_cli-0.1.0/conf/Version.py +0 -2
- gibson_cli-0.1.0/pyproject.toml +0 -41
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/.pre-commit-config.yaml +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/api/BaseApi.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/api/Cli.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/bin/gibson.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Api.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Base.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/BaseCommand.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Build.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Code.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Conf.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Count.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Dev.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Forget.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Import.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/List.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Merge.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Model.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Models.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Modify.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Module.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/New.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/OpenApi.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Question.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Remove.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Rename.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Rewrite.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Schema.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Schemas.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Show.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Test.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Tests.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/Tree.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/WarGames.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/auth/Auth.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/auth/Logout.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/tests/test_command_BaseCommand.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/command/tests/test_command_Conf.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/Api.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/Code.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/Custom.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/Datastore.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/Dependencies.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/Dev.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/Frameworks.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/Modeler.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/Paths.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/Platform.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/Project.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/dev/Api.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/dev/Base.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/dev/Model.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/dev/Schema.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/tests/test_conf_Dependencies.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/conf/tests/test_conf_Platform.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/core/Configuration.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/core/Env.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/core/Memory.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/core/TimeKeeper.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/core/utils.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/data/default-ref-table.tmpl +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/data/default-table.tmpl +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/db/TableExceptions.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/db/tests/test_db_TableExceptions.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/dev/Dev.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/display/Header.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/display/WorkspaceFooter.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/display/WorkspaceHeader.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/display/tests/test_display_Header.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/display/tests/test_display_WorkspaceFooter.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/display/tests/test_display_WorkspaceHeader.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/gibson_cli.egg-info/dependency_links.txt +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/gibson_cli.egg-info/entry_points.txt +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/gibson_cli.egg-info/top_level.txt +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/lang/Python.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/lang/tests/test_lang_Python.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/requirements.txt +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/services/code/context/schema/DataDictionary.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/services/code/context/schema/EntityKeys.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/services/code/context/schema/Manager.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/services/code/context/schema/tests/test_code_context_schema_DataDictionary.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/services/code/context/schema/tests/test_code_context_schema_EntityKeys.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/services/code/context/schema/tests/test_code_context_schema_Manager.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/services/code/customization/Authenticator.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/services/code/customization/BaseCustomization.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/services/code/customization/CustomizationManager.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/services/code/customization/tests/test_code_customization_Authenticator.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/services/code/customization/tests/test_code_customization_BaseCustomization.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/setup.cfg +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/structure/Entity.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/structure/constraints/ReferenceConstraint.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/structure/keys/ForeignKey.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/structure/keys/Index.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/structure/keys/IndexAttribute.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/structure/keys/tests/test_ForeignKey.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/structure/keys/tests/test_Index.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/structure/keys/tests/test_IndexAttribute.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/structure/testing.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/structure/tests/test_Entity.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/tests/test_Env.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/tests/test_Memory.py +0 -0
- {gibson_cli-0.1.0 → gibson_cli-0.1.2}/tests/test_utils.py +0 -0
@@ -1,9 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: gibson-cli
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: Gibson Command Line Interface
|
5
5
|
Author-email: GibsonAI <noc@gibsonai.com>
|
6
6
|
Project-URL: Homepage, https://gibsonai.com/
|
7
|
+
Project-URL: Documentation, https://docs.gibsonai.com/
|
8
|
+
Project-URL: Repository, https://github.com/gibsonai/cli
|
9
|
+
Project-URL: Issues, https://github.com/gibsonai/cli/issues
|
10
|
+
Project-URL: Changelog, https://github.com/gibsonai/cli/releases
|
7
11
|
Classifier: Operating System :: OS Independent
|
8
12
|
Classifier: Development Status :: 4 - Beta
|
9
13
|
Classifier: Intended Audience :: Developers
|
@@ -11,9 +15,14 @@ Classifier: Programming Language :: Python :: 3.9
|
|
11
15
|
Requires-Python: >=3.9
|
12
16
|
Description-Content-Type: text/markdown
|
13
17
|
|
18
|
+
|
19
|
+
[](https://gibsonai.com/)
|
20
|
+
|
14
21
|
# Gibson CLI
|
15
22
|
|
16
|
-
|
23
|
+
[](https://pypi.org/project/gibson-cli/)
|
24
|
+

|
25
|
+
[](https://docs.gibsonai.com)
|
17
26
|
|
18
27
|
## Prerequisites
|
19
28
|
|
@@ -23,10 +32,9 @@ Portions of the Gibson backend code are written by Gibson. So far, versus a hum
|
|
23
32
|
|
24
33
|
## Installation
|
25
34
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
- Add the `bin/` directory to your `PATH`
|
35
|
+
```sh
|
36
|
+
pip3 install gibson-cli
|
37
|
+
```
|
30
38
|
|
31
39
|
## Key Terms
|
32
40
|
|
@@ -304,3 +312,8 @@ At the moment, just refer to the base-level schema directly.
|
|
304
312
|
- e.g. `gibson ? add nickname to sql://user`
|
305
313
|
- `gibson model`
|
306
314
|
- Important note, `gibson ?` may cause your shell to incorrectly interpret the question mark. If it does, you can use `gibson q` instead (just replace the question mark with the letter `q`).
|
315
|
+
|
316
|
+
## Contributing
|
317
|
+
|
318
|
+
- Clone this repository somewhere in your file system
|
319
|
+
- `pip3 install [path to this repository]`
|
@@ -1,6 +1,11 @@
|
|
1
|
+
|
2
|
+
[](https://gibsonai.com/)
|
3
|
+
|
1
4
|
# Gibson CLI
|
2
5
|
|
3
|
-
|
6
|
+
[](https://pypi.org/project/gibson-cli/)
|
7
|
+

|
8
|
+
[](https://docs.gibsonai.com)
|
4
9
|
|
5
10
|
## Prerequisites
|
6
11
|
|
@@ -10,10 +15,9 @@ Portions of the Gibson backend code are written by Gibson. So far, versus a hum
|
|
10
15
|
|
11
16
|
## Installation
|
12
17
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
- Add the `bin/` directory to your `PATH`
|
18
|
+
```sh
|
19
|
+
pip3 install gibson-cli
|
20
|
+
```
|
17
21
|
|
18
22
|
## Key Terms
|
19
23
|
|
@@ -291,3 +295,8 @@ At the moment, just refer to the base-level schema directly.
|
|
291
295
|
- e.g. `gibson ? add nickname to sql://user`
|
292
296
|
- `gibson model`
|
293
297
|
- Important note, `gibson ?` may cause your shell to incorrectly interpret the question mark. If it does, you can use `gibson q` instead (just replace the question mark with the letter `q`).
|
298
|
+
|
299
|
+
## Contributing
|
300
|
+
|
301
|
+
- Clone this repository somewhere in your file system
|
302
|
+
- `pip3 install [path to this repository]`
|
@@ -9,7 +9,10 @@ class Login(BaseCommand):
|
|
9
9
|
token = cli.login()
|
10
10
|
|
11
11
|
if token is None:
|
12
|
-
self.conversation.
|
12
|
+
self.conversation.newline()
|
13
|
+
self.conversation.type(
|
14
|
+
"Login failed, please try again with `gibson auth login`."
|
15
|
+
)
|
13
16
|
else:
|
14
17
|
self.configuration.set_access_token(token)
|
15
18
|
self.conversation.type(f"Welcome! You are now logged in.")
|
@@ -28,6 +28,7 @@ from command.Show import Show
|
|
28
28
|
from command.Test import Test
|
29
29
|
from command.Tests import Tests
|
30
30
|
from command.Tree import Tree
|
31
|
+
from command.Version import Version
|
31
32
|
from command.WarGames import WarGames
|
32
33
|
from .Configuration import Configuration
|
33
34
|
from .Conversation import Conversation
|
@@ -242,6 +243,8 @@ class CommandRouter:
|
|
242
243
|
command = Tree(self.configuration)
|
243
244
|
elif sys.argv[1] in ["?", "q"]:
|
244
245
|
command = Question(self.configuration)
|
246
|
+
elif sys.argv[1] in ["--version", "-v"]:
|
247
|
+
command = Version(self.configuration)
|
245
248
|
else:
|
246
249
|
command = WarGames(self.configuration)
|
247
250
|
|
@@ -132,7 +132,7 @@ class Conversation:
|
|
132
132
|
def message_welcome(self):
|
133
133
|
self.newline()
|
134
134
|
print(pyfiglet.figlet_format("GibsonAI", font="big").rstrip(), end="")
|
135
|
-
print(f" ...CLI v{Version.
|
135
|
+
print(f" ...CLI v{Version.num}...")
|
136
136
|
self.newline()
|
137
137
|
self.pause()
|
138
138
|
self.type("Welcome!\n\n")
|
@@ -162,7 +162,7 @@ class Conversation:
|
|
162
162
|
def new_project(self, configuration):
|
163
163
|
self.newline()
|
164
164
|
print(pyfiglet.figlet_format("GibsonAI", font="big").rstrip(), end="")
|
165
|
-
print(f" ...CLI v{Version.
|
165
|
+
print(f" ...CLI v{Version.num}...")
|
166
166
|
self.newline()
|
167
167
|
|
168
168
|
if len(configuration.settings.keys()) <= 1:
|
@@ -1,9 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: gibson-cli
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.2
|
4
4
|
Summary: Gibson Command Line Interface
|
5
5
|
Author-email: GibsonAI <noc@gibsonai.com>
|
6
6
|
Project-URL: Homepage, https://gibsonai.com/
|
7
|
+
Project-URL: Documentation, https://docs.gibsonai.com/
|
8
|
+
Project-URL: Repository, https://github.com/gibsonai/cli
|
9
|
+
Project-URL: Issues, https://github.com/gibsonai/cli/issues
|
10
|
+
Project-URL: Changelog, https://github.com/gibsonai/cli/releases
|
7
11
|
Classifier: Operating System :: OS Independent
|
8
12
|
Classifier: Development Status :: 4 - Beta
|
9
13
|
Classifier: Intended Audience :: Developers
|
@@ -11,9 +15,14 @@ Classifier: Programming Language :: Python :: 3.9
|
|
11
15
|
Requires-Python: >=3.9
|
12
16
|
Description-Content-Type: text/markdown
|
13
17
|
|
18
|
+
|
19
|
+
[](https://gibsonai.com/)
|
20
|
+
|
14
21
|
# Gibson CLI
|
15
22
|
|
16
|
-
|
23
|
+
[](https://pypi.org/project/gibson-cli/)
|
24
|
+

|
25
|
+
[](https://docs.gibsonai.com)
|
17
26
|
|
18
27
|
## Prerequisites
|
19
28
|
|
@@ -23,10 +32,9 @@ Portions of the Gibson backend code are written by Gibson. So far, versus a hum
|
|
23
32
|
|
24
33
|
## Installation
|
25
34
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
- Add the `bin/` directory to your `PATH`
|
35
|
+
```sh
|
36
|
+
pip3 install gibson-cli
|
37
|
+
```
|
30
38
|
|
31
39
|
## Key Terms
|
32
40
|
|
@@ -304,3 +312,8 @@ At the moment, just refer to the base-level schema directly.
|
|
304
312
|
- e.g. `gibson ? add nickname to sql://user`
|
305
313
|
- `gibson model`
|
306
314
|
- Important note, `gibson ?` may cause your shell to incorrectly interpret the question mark. If it does, you can use `gibson q` instead (just replace the question mark with the letter `q`).
|
315
|
+
|
316
|
+
## Contributing
|
317
|
+
|
318
|
+
- Clone this repository somewhere in your file system
|
319
|
+
- `pip3 install [path to this repository]`
|
@@ -0,0 +1,39 @@
|
|
1
|
+
[build-system]
|
2
|
+
requires = ["setuptools>=60", "setuptools_scm[toml]>=7", "wheel"]
|
3
|
+
build-backend = "setuptools.build_meta"
|
4
|
+
|
5
|
+
[project]
|
6
|
+
name = "gibson-cli"
|
7
|
+
authors = [{ name = "GibsonAI", email = "noc@gibsonai.com" }]
|
8
|
+
description = "Gibson Command Line Interface"
|
9
|
+
readme = "README.md"
|
10
|
+
requires-python = ">=3.9"
|
11
|
+
classifiers = [
|
12
|
+
"Operating System :: OS Independent",
|
13
|
+
"Development Status :: 4 - Beta",
|
14
|
+
"Intended Audience :: Developers",
|
15
|
+
"Programming Language :: Python :: 3.9",
|
16
|
+
]
|
17
|
+
version = "0.1.2"
|
18
|
+
|
19
|
+
[tool.setuptools.packages.find]
|
20
|
+
where = ["."]
|
21
|
+
include = ["*"]
|
22
|
+
exclude = ["test*"]
|
23
|
+
|
24
|
+
[project.urls]
|
25
|
+
Homepage = "https://gibsonai.com/"
|
26
|
+
Documentation = "https://docs.gibsonai.com/"
|
27
|
+
Repository = "https://github.com/gibsonai/cli"
|
28
|
+
Issues = "https://github.com/gibsonai/cli/issues"
|
29
|
+
Changelog = "https://github.com/gibsonai/cli/releases"
|
30
|
+
|
31
|
+
[project.scripts]
|
32
|
+
gibson = "bin.gibson:main"
|
33
|
+
|
34
|
+
[tool.black]
|
35
|
+
line-length = 88
|
36
|
+
target-version = ['py39']
|
37
|
+
|
38
|
+
[tool.isort]
|
39
|
+
profile = "black"
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import webbrowser
|
2
|
-
|
3
2
|
import time
|
4
3
|
from http.server import HTTPServer, BaseHTTPRequestHandler
|
5
4
|
from threading import Thread
|
@@ -15,29 +14,17 @@ class Handler(BaseHTTPRequestHandler):
|
|
15
14
|
token = params.get("token", [""])[0]
|
16
15
|
|
17
16
|
if token:
|
18
|
-
self.respond(200, "OK")
|
19
17
|
self.server.token = token
|
20
|
-
else:
|
21
|
-
self.respond(400, "Bad Request")
|
22
18
|
|
19
|
+
self.send_response(302)
|
20
|
+
self.send_header("Location", f"{self.server.app_domain}/chat")
|
21
|
+
self.end_headers()
|
23
22
|
self.server._stop()
|
24
23
|
|
25
24
|
# Suppress logging
|
26
25
|
def log_message(self, format, *args):
|
27
26
|
pass
|
28
27
|
|
29
|
-
# Format the response
|
30
|
-
def respond(self, code, message):
|
31
|
-
self.send_response(code)
|
32
|
-
self.send_header("Content-type", "text")
|
33
|
-
self.send_header("Access-Control-Allow-Origin", "*")
|
34
|
-
self.send_header(
|
35
|
-
"Access-Control-Allow-Headers",
|
36
|
-
"Origin, X-Requested-With, Content-Type, Accept",
|
37
|
-
)
|
38
|
-
self.end_headers()
|
39
|
-
self.wfile.write(message.encode("utf8"))
|
40
|
-
|
41
28
|
|
42
29
|
# Temporary HTTP server to handle the login process
|
43
30
|
class Server(HTTPServer):
|
@@ -57,8 +44,11 @@ class Server(HTTPServer):
|
|
57
44
|
self._start()
|
58
45
|
self._open_browser()
|
59
46
|
|
60
|
-
|
61
|
-
|
47
|
+
try:
|
48
|
+
while self.thread is not None:
|
49
|
+
time.sleep(1)
|
50
|
+
except KeyboardInterrupt:
|
51
|
+
self._stop()
|
62
52
|
|
63
53
|
return self.token
|
64
54
|
|
gibson_cli-0.1.0/conf/Version.py
DELETED
gibson_cli-0.1.0/pyproject.toml
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
[build-system]
|
2
|
-
requires = [
|
3
|
-
"setuptools>=60",
|
4
|
-
"setuptools_scm[toml]>=7",
|
5
|
-
"wheel"
|
6
|
-
]
|
7
|
-
build-backend = "setuptools.build_meta"
|
8
|
-
|
9
|
-
[project]
|
10
|
-
name = "gibson-cli"
|
11
|
-
authors = [
|
12
|
-
{ name="GibsonAI", email="noc@gibsonai.com" },
|
13
|
-
]
|
14
|
-
description = "Gibson Command Line Interface"
|
15
|
-
readme = "README.md"
|
16
|
-
requires-python = ">=3.9"
|
17
|
-
classifiers = [
|
18
|
-
"Operating System :: OS Independent",
|
19
|
-
"Development Status :: 4 - Beta",
|
20
|
-
"Intended Audience :: Developers",
|
21
|
-
"Programming Language :: Python :: 3.9",
|
22
|
-
]
|
23
|
-
version = "0.1.0"
|
24
|
-
|
25
|
-
[tool.setuptools.packages.find]
|
26
|
-
where = ["."]
|
27
|
-
include = ["*"]
|
28
|
-
exclude = ["test*"]
|
29
|
-
|
30
|
-
[project.urls]
|
31
|
-
"Homepage" = "https://gibsonai.com/"
|
32
|
-
|
33
|
-
[project.scripts]
|
34
|
-
gibson = "bin.gibson:main"
|
35
|
-
|
36
|
-
[tool.black]
|
37
|
-
line-length=88
|
38
|
-
target-version = ['py39']
|
39
|
-
|
40
|
-
[tool.isort]
|
41
|
-
profile = "black"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|