pingera-cli 0.1.7__tar.gz → 0.1.9__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.
- {pingera_cli-0.1.7/pingera_cli.egg-info → pingera_cli-0.1.9}/PKG-INFO +1 -1
- pingera_cli-0.1.9/docs/example-web-check.json +23 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/__init__.py +1 -1
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/commands/checks.py +5 -1
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/commands/on_demand_checks.py +12 -5
- {pingera_cli-0.1.7 → pingera_cli-0.1.9/pingera_cli.egg-info}/PKG-INFO +1 -1
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli.egg-info/SOURCES.txt +1 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/.gitignore +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/.replit +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/LICENSE +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/README.md +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/assert +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/docs/cli-commands.md +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/docs/example-check.yaml +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/docs/example-synthetic-screenshot.json +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/__main__.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/commands/__init__.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/commands/auth.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/commands/base.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/commands/check_groups.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/commands/check_secrets.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/commands/secrets.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/formatters/__init__.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/formatters/base_formatter.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/formatters/generic_formatter.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/formatters/multistep_formatter.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/formatters/registry.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/formatters/ssl_formatter.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/formatters/synthetic_formatter.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/formatters/web_formatter.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/main.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/utils/__init__.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/utils/config.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli/utils/console.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli.egg-info/dependency_links.txt +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli.egg-info/entry_points.txt +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli.egg-info/requires.txt +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pingera_cli.egg-info/top_level.txt +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/pyproject.toml +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/replit.md +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/run_tests.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/setup.cfg +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/setup.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/tests/__init__.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/tests/conftest.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/tests/requirements.txt +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/tests/test_auth.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/tests/test_checks.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/tests/test_config.py +0 -0
- {pingera_cli-0.1.7 → pingera_cli-0.1.9}/tests/test_on_demand_checks.py +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
{
|
|
3
|
+
"name": "Example Web Check",
|
|
4
|
+
"type": "web",
|
|
5
|
+
"url": "https://example.com",
|
|
6
|
+
"interval": 300,
|
|
7
|
+
"timeout": 30,
|
|
8
|
+
"parameters": {
|
|
9
|
+
"regions": ["RU, Moscow", "EU, West"],
|
|
10
|
+
"search_text": "Welcome",
|
|
11
|
+
"http_request": {
|
|
12
|
+
"method": "GET",
|
|
13
|
+
"headers": {
|
|
14
|
+
"User-Agent": "PingeraCLI/1.0"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"marketplace": {
|
|
19
|
+
"tags": ["web", "basic"],
|
|
20
|
+
"name": "Simple website check with string search",
|
|
21
|
+
"description": "Queries website URL and searches for a string in the response"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -444,7 +444,7 @@ class ChecksCommand(BaseCommand):
|
|
|
444
444
|
|
|
445
445
|
# Filter only SDK-recognized fields from file data
|
|
446
446
|
# This ignores marketplace-specific fields and other extensions
|
|
447
|
-
sdk_fields = ["name", "type", "url", "host", "port", "interval", "timeout", "parameters", "active"]
|
|
447
|
+
sdk_fields = ["name", "type", "url", "host", "port", "interval", "timeout", "parameters", "active", "secrets"]
|
|
448
448
|
filtered_file_data = {k: v for k, v in file_data.items() if k in sdk_fields}
|
|
449
449
|
|
|
450
450
|
# Command line options take precedence over file data
|
|
@@ -489,6 +489,10 @@ class ChecksCommand(BaseCommand):
|
|
|
489
489
|
# Use file parameters if no command line parameters
|
|
490
490
|
parameters = json.dumps(file_parameters) if isinstance(file_parameters, dict) else file_parameters
|
|
491
491
|
|
|
492
|
+
# Handle secrets from file
|
|
493
|
+
if filtered_file_data.get("secrets"):
|
|
494
|
+
check_data["secrets"] = filtered_file_data["secrets"]
|
|
495
|
+
|
|
492
496
|
# Handle pw_script_file from file (this is CLI-specific, not sent to SDK)
|
|
493
497
|
if pw_script_file is None and file_data.get("pw_script_file"):
|
|
494
498
|
pw_script_file = file_data["pw_script_file"]
|
|
@@ -106,7 +106,7 @@ class OnDemandChecksCommand(BaseCommand):
|
|
|
106
106
|
|
|
107
107
|
# Filter only SDK-recognized fields from file data
|
|
108
108
|
# This ignores marketplace-specific fields and other extensions
|
|
109
|
-
sdk_fields = ["name", "type", "url", "host", "port", "timeout", "parameters"]
|
|
109
|
+
sdk_fields = ["name", "type", "url", "host", "port", "timeout", "parameters", "secrets"]
|
|
110
110
|
filtered_file_data = {k: v for k, v in file_data.items() if k in sdk_fields}
|
|
111
111
|
|
|
112
112
|
# Command line options take precedence over file data
|
|
@@ -150,6 +150,10 @@ class OnDemandChecksCommand(BaseCommand):
|
|
|
150
150
|
# Use file parameters if no command line parameters
|
|
151
151
|
parameters = json.dumps(file_parameters) if isinstance(file_parameters, dict) else file_parameters
|
|
152
152
|
|
|
153
|
+
# Handle secrets from file
|
|
154
|
+
if filtered_file_data.get("secrets"):
|
|
155
|
+
check_data["secrets"] = filtered_file_data["secrets"]
|
|
156
|
+
|
|
153
157
|
# Handle pw_script_file from file (this is CLI-specific, not sent to SDK)
|
|
154
158
|
if pw_script_file is None and file_data.get("pw_script_file"):
|
|
155
159
|
pw_script_file = file_data["pw_script_file"]
|
|
@@ -240,8 +244,9 @@ class OnDemandChecksCommand(BaseCommand):
|
|
|
240
244
|
response = checks_api.v1_checks_execute_post(check_request)
|
|
241
245
|
job_id = response.job_id
|
|
242
246
|
|
|
243
|
-
# Build success message
|
|
244
|
-
|
|
247
|
+
# Build success message - use the actual type from check_data
|
|
248
|
+
actual_check_type = check_data.get("type", check_type)
|
|
249
|
+
success_details = [f"Job ID: {job_id}", f"Type: {actual_check_type}"]
|
|
245
250
|
if url:
|
|
246
251
|
success_details.append(f"URL: {url}")
|
|
247
252
|
if host:
|
|
@@ -256,13 +261,15 @@ class OnDemandChecksCommand(BaseCommand):
|
|
|
256
261
|
self._wait_and_show_result(job_id, success_details)
|
|
257
262
|
else:
|
|
258
263
|
if self.output_format in ['json', 'yaml']:
|
|
264
|
+
actual_check_type = check_data.get("type", check_type)
|
|
265
|
+
actual_name = check_data.get("name", name)
|
|
259
266
|
self.output_data({
|
|
260
267
|
"job_id": job_id,
|
|
261
|
-
"check_type":
|
|
268
|
+
"check_type": actual_check_type,
|
|
262
269
|
"url": url,
|
|
263
270
|
"host": host,
|
|
264
271
|
"port": port,
|
|
265
|
-
"name":
|
|
272
|
+
"name": actual_name,
|
|
266
273
|
"status": "queued"
|
|
267
274
|
})
|
|
268
275
|
else:
|
|
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
|