jvcli 2.0.11__py3-none-any.whl → 2.0.13__py3-none-any.whl

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.
jvcli/__init__.py CHANGED
@@ -4,5 +4,5 @@ jvcli package initialization.
4
4
  This package provides the CLI tool for Jivas Package Repository.
5
5
  """
6
6
 
7
- __version__ = "2.0.11"
7
+ __version__ = "2.0.13"
8
8
  __supported__jivas__versions__ = ["2.0.0"]
@@ -23,6 +23,7 @@ def startproject(project_name: str, version: str) -> None:
23
23
  Usage:
24
24
  jvcli startproject <project_name> [--version <jivas_version>]
25
25
  """
26
+
26
27
  template_path = os.path.join(TEMPLATES_DIR, version, "project")
27
28
 
28
29
  if not os.path.exists(template_path):
@@ -61,9 +62,22 @@ def startproject(project_name: str, version: str) -> None:
61
62
  with open(template_file_path, "r") as template_file:
62
63
  contents = template_file.read()
63
64
 
64
- # Write `.env` instead of `env.example`
65
+ if file_name == "gitignore.example":
66
+ # Write `.gitignore`
67
+ target_file_path_gitignore = os.path.join(target_dir, ".gitignore")
68
+ with open(target_file_path_gitignore, "w") as gitignore_file:
69
+ gitignore_file.write(contents)
70
+
65
71
  if file_name == "env.example":
66
- target_file_path = os.path.join(target_dir, ".env")
72
+ # Write `.env`
73
+ target_file_path_env = os.path.join(target_dir, ".env")
74
+ with open(target_file_path_env, "w") as env_file:
75
+ env_file.write(contents)
76
+
77
+ # Write `env.example`
78
+ target_file_path_example = os.path.join(target_dir, "env.example")
79
+ with open(target_file_path_example, "w") as example_file:
80
+ example_file.write(contents)
67
81
 
68
82
  with open(target_file_path, "w") as project_file:
69
83
  project_file.write(contents)
@@ -0,0 +1,53 @@
1
+ # Python #
2
+ *.pyc
3
+ __pycache__
4
+ venv
5
+ .pytest_cache
6
+ __jac_gen__
7
+
8
+ # Distribution / packaging
9
+ .Python
10
+ play/
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib64/
18
+ parts/
19
+ sdist/
20
+ var/
21
+ wheels/
22
+ share/python-wheels/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ MANIFEST
27
+ test_source/
28
+
29
+ # Others #
30
+ .coverage
31
+ .session
32
+ *.session.db
33
+ mydatabase/
34
+ actions/jivas/
35
+ .DS_Store
36
+ .vscode
37
+ build
38
+ *Zone.Identifier
39
+ .DS_Store
40
+ parser.out
41
+ codegen_output*
42
+ .qodo
43
+ .files
44
+ *.rdb
45
+ node_modules
46
+ out.dot
47
+ out.txt
48
+ .jvdata
49
+ .env
50
+
51
+ # Mypy files #
52
+ .mypy_cache*
53
+ .jac_mypy_cache*
@@ -2,8 +2,8 @@
2
2
 
3
3
  # Export env vars
4
4
  set -o allexport
5
- if [ -f .env ]; then
6
- source .env
5
+ if [ -f ./.env ]; then
6
+ source ./.env
7
7
  else
8
8
  echo ".env file not found"
9
9
  exit 1
@@ -10,22 +10,22 @@ fi
10
10
  DAF_NAME="$1"
11
11
 
12
12
  # Export env vars
13
- source sh/exportenv.sh
13
+ source ./sh/exportenv.sh
14
14
 
15
15
  # Init the user token
16
- source sh/inituser.sh
16
+ source ./sh/inituser.sh
17
17
 
18
18
  # Wait until JIVAS_TOKEN is set
19
19
  while [ -z "$JIVAS_TOKEN" ]; do
20
20
  echo "Waiting for JIVAS_TOKEN to be initialized..."
21
21
  sleep 1
22
- source sh/inituser.sh
22
+ source ./sh/inituser.sh
23
23
  done
24
24
 
25
25
  # Check if JIVAS_TOKEN is set
26
26
  if [ -n "$JIVAS_TOKEN" ]; then
27
27
 
28
- echo -e "\n\nImporting demo agent...\n"
28
+ echo -e "\n\nImporting agent...\n"
29
29
  # Import the agent
30
30
  AGENT_ID=$(curl --silent --show-error --no-progress-meter \
31
31
  --request POST \
@@ -2,10 +2,10 @@
2
2
  # Script to authenticate and initialize jivas agents
3
3
 
4
4
  # Export env vars
5
- source sh/exportenv.sh
5
+ source ./sh/exportenv.sh
6
6
 
7
7
  # Init the user token
8
- source sh/inituser.sh
8
+ source ./sh/inituser.sh
9
9
 
10
10
  # Check if JIVAS_TOKEN is set
11
11
  if [ -n "$JIVAS_TOKEN" ]; then
@@ -7,7 +7,7 @@ if [ -z "$JIVAS_PORT" ] || [ -z "$JIVAS_PASSWORD" ] || [ -z "$JIVAS_USER" ]; the
7
7
  exit 1
8
8
  fi
9
9
 
10
- if lsof -i :$JIVAS_PORT >/dev/null; then
10
+ if lsof -i :$JIVAS_PORT >/dev/null || netstat -an | grep -q ":$JIVAS_PORT .*LISTEN"; then
11
11
 
12
12
  # Try to login first
13
13
  JIVAS_TOKEN=$(curl --silent --show-error --no-progress-meter \
@@ -1,7 +1,7 @@
1
1
  #!/bin/bash
2
2
  # Script to serve jivas app
3
3
 
4
- source sh/exportenv.sh
4
+ source ./sh/exportenv.sh
5
5
 
6
6
  # serve jivas app
7
7
  jac jvserve main.jac
@@ -1,7 +1,7 @@
1
1
  #!/bin/bash
2
2
  # Script to serve jivas client app
3
3
 
4
- source sh/exportenv.sh
4
+ source ./sh/exportenv.sh
5
5
 
6
6
  # launch jivas client app
7
7
  jvcli client launch
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jvcli
3
- Version: 2.0.11
3
+ Version: 2.0.13
4
4
  Summary: CLI tool for Jivas Package Repository
5
5
  Home-page: https://github.com/TrueSelph/jvcli
6
6
  Author: TrueSelph Inc.
@@ -1,4 +1,4 @@
1
- jvcli/__init__.py,sha256=XE8Hgf8iI1ybAxt2ZOiX2eGjQ76CyuLAuqYqb6D2n0c,171
1
+ jvcli/__init__.py,sha256=iP0a4m_Caa6fevXHBBUuG0B34jHhQlSABgEgRRknw7o,171
2
2
  jvcli/api.py,sha256=gd-EP1e75e7HijyrP-EF6i_jjCo6YUeSbm1l5daKLfQ,10352
3
3
  jvcli/auth.py,sha256=p04T02ufqbENx_93oDPg3xsq7sv-Nabeq3YR1kLXfSg,1215
4
4
  jvcli/cli.py,sha256=VM_QGPiYfSdqOZ4n0YLZbrOwXm0d5lHmzv47MqTyBMc,1060
@@ -21,7 +21,7 @@ jvcli/commands/create.py,sha256=-9Lcng3Ef6AMZwBcuXDgvJCuvWxB_dB_fQF5-OBCkqA,1339
21
21
  jvcli/commands/download.py,sha256=AT6SFiJ9ysqNMDCdKsZ6CMUx96qpyzgraOk6EuNL2Qs,3417
22
22
  jvcli/commands/info.py,sha256=NyIDpR_AGMMSFPE0tFZv4dIuv_gwqrfd589zQAA_Q3s,2685
23
23
  jvcli/commands/publish.py,sha256=q1ihoL42GmEsU5ggHN3bcg8QD26kjRUZGfQpRzI2GMo,6630
24
- jvcli/commands/startproject.py,sha256=W7TzL8HALYd_Lzt3gLFFCZkBXZTR1jwUgZgLP6hETzI,2444
24
+ jvcli/commands/startproject.py,sha256=WMYHdKq3EUMwTPmW9E9VZl1Fbt5UO9kpHlIM-Fab8Lg,3128
25
25
  jvcli/commands/studio.py,sha256=avD5M3Ss7R6AtUMN3Mk6AmTyPJ7LnXcmwQ0mbRzivrQ,8192
26
26
  jvcli/commands/update.py,sha256=LwCLg-W1b8WSdFkiiJ8WwTit2HJXTLpM5OQ4WBTe9C4,1997
27
27
  jvcli/studio/index.html,sha256=LGhVhKwe1FF_9r_PAG7J2ZPrRLFTwFH3PpCN_KdA-10,474
@@ -45,20 +45,21 @@ jvcli/templates/2.0.0/agent_knowledge.yaml,sha256=hI0ifr0ICiZGce-oUFovBOmDWxGU1Z
45
45
  jvcli/templates/2.0.0/agent_memory.yaml,sha256=_MBgObZcW1UzwWuYQVJiPZ_7TvYbGrDgd-xMuzJEkVo,9
46
46
  jvcli/templates/2.0.0/project/README.md,sha256=cr6yHG1qEzO7xDFchEDpl8tKawVvF0tsUVTrWyxjiG4,1077
47
47
  jvcli/templates/2.0.0/project/env.example,sha256=aB3Wp-0fJV1o9WlFLjxjdA5fKMg2zBV-y8-nBm9Q-bk,396
48
+ jvcli/templates/2.0.0/project/gitignore.example,sha256=W-TIjt_iOIV0zI9bisMeJ4mvsD2Ko13jXnNKG2GlXIg,518
48
49
  jvcli/templates/2.0.0/project/globals.jac,sha256=CEt7L25wEZfE6TupqpM1ilHbtJMQQWExDQ5GJlkHPts,56
49
50
  jvcli/templates/2.0.0/project/main.jac,sha256=r37jsaGq-85YvDbHP3bQvBXk0u8w0rtRTZTNxZOjTW0,48
50
51
  jvcli/templates/2.0.0/project/actions/README.md,sha256=TU1t-rOBH5WQP_HUWaEBLq5BbPv4jejtjIrwTW4hZwM,1742
51
52
  jvcli/templates/2.0.0/project/daf/README.md,sha256=M2_BLO6vFlsnUbYHPQMIrcoboe91MO9H9RR8yP9-tF8,1683
52
- jvcli/templates/2.0.0/project/sh/exportenv.sh,sha256=UXH0DkHJnVz75YvAU8tw9bqfa2atniUITd7f_3FDBfk,160
53
- jvcli/templates/2.0.0/project/sh/importagent.sh,sha256=7Fsh_B761sIsS9eYWYGxvhOZXf_MXPZO_TFfm1QpBcU,1173
54
- jvcli/templates/2.0.0/project/sh/initagents.sh,sha256=WmMshuxLw_dXnm23uhTZjr6Eyc9pAbktlo2R_0tXK6M,923
55
- jvcli/templates/2.0.0/project/sh/inituser.sh,sha256=vpVmmx6EBkIIQ7TUlEJdEFsiGoEE_e4Iy7yI-g1Zstc,1844
56
- jvcli/templates/2.0.0/project/sh/serve.sh,sha256=S64Pmza1Zh5uf6bDA7aXS282AQsN3jJW4RAyfi7NCrU,103
57
- jvcli/templates/2.0.0/project/sh/startclient.sh,sha256=w_oW5DZ9NHRD4HR16lVQsvq8HPtiRNUKFuG2nUrKWlQ,117
53
+ jvcli/templates/2.0.0/project/sh/exportenv.sh,sha256=keFEu6HAROE8F9cOa5FxdIb2pryd22fED66rhaAvAuU,164
54
+ jvcli/templates/2.0.0/project/sh/importagent.sh,sha256=isDMHR8ZEJEuwAAfJRc0xWhw8xHWetQNMeUqxCDOqx8,1174
55
+ jvcli/templates/2.0.0/project/sh/initagents.sh,sha256=zFYlpt9G8kvYwGlBc-hJdz2TRQoLNY5Nq2Z_Vvto-NU,927
56
+ jvcli/templates/2.0.0/project/sh/inituser.sh,sha256=BYvLfFZdL0n7AGmjmoTQQcb236f5wG68RMeVJiUyhFQ,1893
57
+ jvcli/templates/2.0.0/project/sh/serve.sh,sha256=EsXOqszYD5xa8fjAEwyYCz8mSTX-v5VfiTZeKUpOKYw,105
58
+ jvcli/templates/2.0.0/project/sh/startclient.sh,sha256=3GbJtTxycLBUJGfX2_b3cfQoAPFzhvcJpWRtS2sSsRM,119
58
59
  jvcli/templates/2.0.0/project/tests/README.md,sha256=-1ZXkxuUKa6tMw_jlF3rpCvUFq8ijW2L-nSuAkbCANo,917
59
- jvcli-2.0.11.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
60
- jvcli-2.0.11.dist-info/METADATA,sha256=4LjBRwepBPT9g14FjfjeJ1hPgk1023nRrDjWTSc_qv8,4202
61
- jvcli-2.0.11.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
62
- jvcli-2.0.11.dist-info/entry_points.txt,sha256=XunGcL0LWmIMIytaUckUA27czEf8M2Y4aTOfYIpOgrQ,42
63
- jvcli-2.0.11.dist-info/top_level.txt,sha256=akZnN9Zy1dFT93N0ms-C8ZXUn-xlhq37nO3jSRp0Y6o,6
64
- jvcli-2.0.11.dist-info/RECORD,,
60
+ jvcli-2.0.13.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
61
+ jvcli-2.0.13.dist-info/METADATA,sha256=5sZydra7NeSynQK9z7YRSisg2eE1rEYe9OAj_-hiK_M,4202
62
+ jvcli-2.0.13.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
63
+ jvcli-2.0.13.dist-info/entry_points.txt,sha256=XunGcL0LWmIMIytaUckUA27czEf8M2Y4aTOfYIpOgrQ,42
64
+ jvcli-2.0.13.dist-info/top_level.txt,sha256=akZnN9Zy1dFT93N0ms-C8ZXUn-xlhq37nO3jSRp0Y6o,6
65
+ jvcli-2.0.13.dist-info/RECORD,,
File without changes