primitive 0.2.17__py3-none-any.whl → 0.2.20__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.
primitive/__about__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2024-present Dylan Stein <dylan@primitive.tech>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.2.17"
4
+ __version__ = "0.2.20"
@@ -16,29 +16,35 @@ HOME_DIRECTORY = Path.home()
16
16
  class Daemons:
17
17
  def __init__(self, primitive) -> None:
18
18
  self.primitive: Primitive = primitive
19
+ command_flags = ""
20
+
21
+ if primitive.HOST != "api.primitive.tech":
22
+ command_flags += f"--host {primitive.HOST} "
23
+ if primitive.DEBUG:
24
+ command_flags += "--debug "
19
25
  self.os_family = platform.system()
20
26
 
21
27
  match self.os_family:
22
28
  case "Darwin":
23
29
  self.daemons: Dict[str, Daemon] = {
24
30
  "agent": LaunchAgent(
25
- "tech.primitive.agent",
26
- command="--debug agent",
31
+ label="tech.primitive.agent",
32
+ command=f"{command_flags} agent",
27
33
  ),
28
34
  "monitor": LaunchAgent(
29
- "tech.primitive.monitor",
30
- command="--debug monitor",
35
+ label="tech.primitive.monitor",
36
+ command=f"{command_flags} monitor",
31
37
  ),
32
38
  }
33
39
  case "Linux":
34
40
  self.daemons: Dict[str, Daemon] = {
35
41
  "agent": LaunchService(
36
- "tech.primitive.agent",
37
- command="--debug agent",
42
+ label="tech.primitive.agent",
43
+ command=f"{command_flags} agent",
38
44
  ),
39
45
  "monitor": LaunchService(
40
- "tech.primitive.monitor",
41
- command="--debug monitor",
46
+ label="tech.primitive.monitor",
47
+ command=f"{command_flags} monitor",
42
48
  ),
43
49
  }
44
50
  case _:
@@ -188,8 +188,8 @@ class LaunchAgent(Daemon):
188
188
  [
189
189
  self.stop(),
190
190
  self.unload(),
191
- self.populate(),
192
191
  self.create_stdout_file(),
192
+ self.populate(),
193
193
  self.load(),
194
194
  self.start(load=False),
195
195
  ]
@@ -194,8 +194,8 @@ class LaunchService(Daemon):
194
194
  [
195
195
  self.stop(),
196
196
  self.disable(),
197
- self.populate(),
198
197
  self.create_stdout_file(),
198
+ self.populate(),
199
199
  self.enable(),
200
200
  self.start(),
201
201
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: primitive
3
- Version: 0.2.17
3
+ Version: 0.2.20
4
4
  Project-URL: Documentation, https://github.com//primitivecorp/primitive-cli#readme
5
5
  Project-URL: Issues, https://github.com//primitivecorp/primitive-cli/issues
6
6
  Project-URL: Source, https://github.com//primitivecorp/primitive-cli
@@ -1,4 +1,4 @@
1
- primitive/__about__.py,sha256=7h3S_fyrblrEjxFc0qcWxiNiEvkzKDNdS-Xn5G9baOg,130
1
+ primitive/__about__.py,sha256=wAq0SpsEgXk_EgOoZ7Utj86OIktIfJABOnCne-sAyXY,130
2
2
  primitive/__init__.py,sha256=bwKdgggKNVssJFVPfKSxqFMz4IxSr54WWbmiZqTMPNI,106
3
3
  primitive/cli.py,sha256=g7EtHI9MATAB0qQu5w-WzbXtxz_8zu8z5E7sETmMkKU,2509
4
4
  primitive/client.py,sha256=h8WZVnQylVe0vbpuyC8YZHl2JyITSPC-1HbUcmrE5pc,3623
@@ -13,10 +13,10 @@ primitive/auth/commands.py,sha256=2z5u5xX64n0yILucx9emtWh3uQXLvs2QQQQIldZGr94,23
13
13
  primitive/auth/graphql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  primitive/auth/graphql/queries.py,sha256=jhrr_VFzHIn8vcVprMIzUx7V4kkWYdR6CKMKPoVFv60,180
15
15
  primitive/daemons/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- primitive/daemons/actions.py,sha256=NWBPOn2l5pTYlocFYhYHxmsIiwF-ItroJygaD3UqJkI,2466
16
+ primitive/daemons/actions.py,sha256=FwnR4aWOprWmmesMQxKoK-YuCMaPmRTHWCzWRZSgfHY,2730
17
17
  primitive/daemons/commands.py,sha256=Xt4qFymNrDLdHJhRnEH_4Re-2xX6w1OT-chV9k7dFCs,2670
18
- primitive/daemons/launch_agents.py,sha256=3IzfUXmdcGoNVzOhKhbDjZmZq8XT6UM38-438BcTKVg,7740
19
- primitive/daemons/launch_service.py,sha256=vQlmh8kR1GZdKyTkMAhiIFaWjNDizoTiXcMHTtqTyPg,7907
18
+ primitive/daemons/launch_agents.py,sha256=5MFDacs_IZd6PCm4VRNq9dPEYIDivkydBzqex1ggkFY,7740
19
+ primitive/daemons/launch_service.py,sha256=iuklHeuEqadlf8U1n9xFg4ZG1EKdK2jyaPI-VTlpJ4I,7907
20
20
  primitive/daemons/ui.py,sha256=Af3OJWJ0jdGlb1nfA5yaGYdhBEqqpM8zP2U2vUQdCbw,1236
21
21
  primitive/db/base.py,sha256=mH7f2d_jiyxJSSx9Gk53QBXRa3LiKBsBjkFgvmtH1WA,83
22
22
  primitive/db/models.py,sha256=GfnJdAq4Tb68CI4BKAuJDZVqioGavveaAHbCPeLNngw,2840
@@ -96,8 +96,8 @@ primitive/utils/memory_size.py,sha256=4xfha21kW82nFvOTtDFx9Jk2ZQoEhkfXii-PGNTpIU
96
96
  primitive/utils/printer.py,sha256=f1XUpqi5dkTL3GWvYRUGlSwtj2IxU1q745T4Fxo7Tn4,370
97
97
  primitive/utils/shell.py,sha256=jWzb7ky7p987dJas6ZvarK3IJNZ5cwBXcryRWb9Uh6U,2072
98
98
  primitive/utils/text.py,sha256=XiESMnlhjQ534xE2hMNf08WehE1SKaYFRNih0MmnK0k,829
99
- primitive-0.2.17.dist-info/METADATA,sha256=-PHPccgNwo1ypTIksFavN__Ktd7AaIaPtMDY2V6kOTc,3733
100
- primitive-0.2.17.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
101
- primitive-0.2.17.dist-info/entry_points.txt,sha256=p1K8DMCWka5FqLlqP1sPek5Uovy9jq8u51gUsP-z334,48
102
- primitive-0.2.17.dist-info/licenses/LICENSE.txt,sha256=B8kmQMJ2sxYygjCLBk770uacaMci4mPSoJJ8WoDBY_c,1098
103
- primitive-0.2.17.dist-info/RECORD,,
99
+ primitive-0.2.20.dist-info/METADATA,sha256=VEeM1yeZTwRlhDrSMKh4piih3oPWFm0qo36JqbclCNc,3733
100
+ primitive-0.2.20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
101
+ primitive-0.2.20.dist-info/entry_points.txt,sha256=p1K8DMCWka5FqLlqP1sPek5Uovy9jq8u51gUsP-z334,48
102
+ primitive-0.2.20.dist-info/licenses/LICENSE.txt,sha256=B8kmQMJ2sxYygjCLBk770uacaMci4mPSoJJ8WoDBY_c,1098
103
+ primitive-0.2.20.dist-info/RECORD,,