@perforce-perfecto/scriptless-helpers 1.69.1 → 1.70.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/CLAUDE.md +50 -0
- package/package.json +2 -2
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# execution-helpers-public
|
|
2
|
+
|
|
3
|
+
> **PUBLISHED PACKAGE — treat every line as customer-visible.**
|
|
4
|
+
> This library is published to npm as `@perforce-perfecto/scriptless-helpers` (public access).
|
|
5
|
+
> - **No sensitive information**: no internal URLs, hostnames, credentials, environment variables, Jira references, feature flags, or implementation details that reveal internal infrastructure.
|
|
6
|
+
> - **No non-public library imports**: importing any `@perfectomobiledev/*` lib is strictly prohibited — those are internal-only and would break customer installs and leak proprietary code.
|
|
7
|
+
> Violations in either category are a security and IP risk. If you are unsure whether something is safe to include, put it in `libs/execution-helpers` (the private counterpart) instead.
|
|
8
|
+
>
|
|
9
|
+
> Full guide: [Execution Helpers Library Guide](https://perforce.atlassian.net/wiki/spaces/SCMENGINE/pages/2763030764/Execution+Helpers+Library+Guide) — also mirrored locally at [`../EXECUTION_HELPERS_GUIDE.md`](../EXECUTION_HELPERS_GUIDE.md).
|
|
10
|
+
|
|
11
|
+
The **public** helper library for user-authored Perfecto scriptless scripts. Published to npm as `@perforce-perfecto/scriptless-helpers` and bundled into the script runtime. Customers' generated scripts depend on this package, so everything here is part of the public API contract.
|
|
12
|
+
|
|
13
|
+
## Public API (`src/index.ts`)
|
|
14
|
+
~29 helper exports + types — covers device control, WebDriver sessions, screenshots, data tables, user-defined variables, secured variables, file transfer, HTTP requests, execution cache, action results, and graceful exit.
|
|
15
|
+
|
|
16
|
+
Notable exports:
|
|
17
|
+
- `webdriverSessionHelper`, `screenshotHelper`, `scriptHelper`, `actionResultHelper`
|
|
18
|
+
- `dataTableHelper`, `securedVariableHelper`, `userDefinedVariablesHelper`
|
|
19
|
+
- `perfectoExecuteScriptHelper`, `fileTransferHelper`, `executionCacheHelper`
|
|
20
|
+
- Types: `ActiveScriptFunctionData`, `ScriptlessHelper`, `Logger`, `DataTable`, `DeviceCapabilities`, `LoopIterationState`
|
|
21
|
+
|
|
22
|
+
## Pre-commit checklist
|
|
23
|
+
|
|
24
|
+
Before adding anything to this lib, verify every item:
|
|
25
|
+
|
|
26
|
+
- [ ] **No proprietary logic** — no algorithms, business rules, or implementation details
|
|
27
|
+
- [ ] **No internal URLs/endpoints** — no references to internal services, hostnames, or endpoints
|
|
28
|
+
- [ ] **No credentials/keys** — no hardcoded credentials, API keys, tokens, or secrets
|
|
29
|
+
- [ ] **No internal infrastructure** — no internal auth details, service names, RabbitMQ queue names, S3 bucket shapes, K8s job specs
|
|
30
|
+
- [ ] **No debug information** — no stack traces or paths that expose internal structure
|
|
31
|
+
- [ ] **No sensitive comments** — code comments must not contain internal architecture details
|
|
32
|
+
- [ ] **Public dependencies only** — see allowed list below; run `npm audit` on any new dep
|
|
33
|
+
- [ ] **No `@perfectomobiledev/*` imports** — these are internal-only and must never appear here
|
|
34
|
+
- [ ] **Generic naming** — no function, class, or variable names that reveal internal Perfecto/Perforce systems
|
|
35
|
+
|
|
36
|
+
## Conventions (READ BEFORE EDITING)
|
|
37
|
+
- **No `@perfectomobiledev/*` imports allowed.** This lib is published externally — internal libs would leak proprietary code or break customer installs. See [`../EXECUTION_HELPERS_GUIDE.md`](../EXECUTION_HELPERS_GUIDE.md) for the decision tree.
|
|
38
|
+
- **No internal URLs, hostnames, credentials, or feature flags.** Anything written here ships to customers.
|
|
39
|
+
- **Breaking changes are real breaking changes.** Customer scripts call these directly. Bump major and coordinate.
|
|
40
|
+
- **Anything telemetry-, logging-, or progress-related belongs in `execution-helpers` (private), not here.** The public lib stays thin.
|
|
41
|
+
- New helper added here? Also add a private wrapper in `execution-helpers` that adds telemetry + structured logging.
|
|
42
|
+
|
|
43
|
+
## Dependencies
|
|
44
|
+
- Internal: none (prohibited)
|
|
45
|
+
- External: `webdriverio` (v9), `lodash`, `axios`, `jsonpointer`, `file-type`, `adm-zip`, `uuid`
|
|
46
|
+
|
|
47
|
+
## Related
|
|
48
|
+
- [Execution Helpers Library Guide (Confluence)](https://perforce.atlassian.net/wiki/spaces/SCMENGINE/pages/2763030764/Execution+Helpers+Library+Guide) — canonical source with decision tree and examples
|
|
49
|
+
- [`../EXECUTION_HELPERS_GUIDE.md`](../EXECUTION_HELPERS_GUIDE.md) — local mirror of the above
|
|
50
|
+
- `libs/execution-helpers/` — internal wrappers around these helpers
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perforce-perfecto/scriptless-helpers",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.70.2",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "./src/index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"tslib": "^2.3.0",
|
|
9
9
|
"webdriverio": "^9.27.0",
|
|
10
10
|
"lodash": "^4.18.1",
|
|
11
|
-
"axios": "^1.
|
|
11
|
+
"axios": "^1.16.0",
|
|
12
12
|
"jsonpointer": "^5.0.1",
|
|
13
13
|
"file-type": "^21.0.0",
|
|
14
14
|
"adm-zip": "^0.5.12",
|