@siteoshq/cli 1.9.0 → 1.10.0
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/README.md +10 -1
- package/dist/cli.js +24 -3
- package/dist/cli.js.map +1 -1
- package/package.json +18 -20
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# SiteOS CLI
|
|
2
2
|
|
|
3
3
|
`@siteoshq/cli` exposes one `siteos` binary for Auth, common Projects, Pulse, Cookie, Forms,
|
|
4
|
-
Search, Trace, SEO and Integrations. This source prepares version 1.
|
|
4
|
+
Search, Trace, SEO and Integrations. This source prepares version 1.10.0; publishing is a separate release.
|
|
5
5
|
Node.js 22 or newer is required.
|
|
6
6
|
|
|
7
7
|
## Install and authenticate
|
|
@@ -96,6 +96,15 @@ the bound Pulse resource and current URL; local tests use this URL unless explic
|
|
|
96
96
|
`siteos.config.json` remains the tracked Playwright check configuration. Deployment and enabling
|
|
97
97
|
monitoring are explicit operations. `deploy --dry-run` builds locally without uploading.
|
|
98
98
|
|
|
99
|
+
CLI 1.10.0 adds an optional `environmentVariables` array to each Check, for
|
|
100
|
+
example `"environmentVariables": ["TEST_EMAIL", "TEST_INBOX_TOKEN"]`. Declare names only, and set
|
|
101
|
+
values in Pulse Settings for the selected Environment. The runner exposes declared values through
|
|
102
|
+
`process.env.NAME`; `pulse sync --check --json` suggests names found in imported source, while
|
|
103
|
+
computed names need explicit declarations. `PLAYWRIGHT_BASE_URL` remains a system value.
|
|
104
|
+
Use the CLI build containing this support together with the matching application/runner release;
|
|
105
|
+
earlier published versions do not preserve these declarations. See
|
|
106
|
+
[Pulse variables operations](../../docs/operations/pulse-variables.md) for storage and diagnostics.
|
|
107
|
+
|
|
99
108
|
### Forms and Search
|
|
100
109
|
|
|
101
110
|
```sh
|
package/dist/cli.js
CHANGED
|
@@ -1918,6 +1918,26 @@ var ScheduledConfigSchema = z6.object({
|
|
|
1918
1918
|
});
|
|
1919
1919
|
var ManualConfigSchema = z6.object({ mode: z6.literal("manual") });
|
|
1920
1920
|
var CheckConfigSchema = z6.object({
|
|
1921
|
+
environmentVariables: z6.array(
|
|
1922
|
+
z6.string().regex(/^[A-Z][A-Z0-9_]{0,63}$/).refine(
|
|
1923
|
+
(name) => !/^(?:SITEOS_|PLAYWRIGHT_|DOCKER_|NODE_|NPM_|PNPM_|LD_|DYLD_)/.test(
|
|
1924
|
+
name
|
|
1925
|
+
) && ![
|
|
1926
|
+
"PATH",
|
|
1927
|
+
"HOME",
|
|
1928
|
+
"TMPDIR",
|
|
1929
|
+
"TMP",
|
|
1930
|
+
"TEMP",
|
|
1931
|
+
"CI",
|
|
1932
|
+
"DATABASE_URL",
|
|
1933
|
+
"RUNNER_SHARED_SECRET"
|
|
1934
|
+
].includes(name) && !name.endsWith("_DATABASE_URL") && !name.endsWith("_R2_ACCESS_KEY_ID") && !name.endsWith("_R2_SECRET_ACCESS_KEY"),
|
|
1935
|
+
"This name is reserved by Pulse."
|
|
1936
|
+
)
|
|
1937
|
+
).max(50).refine(
|
|
1938
|
+
(names) => new Set(names).size === names.length,
|
|
1939
|
+
"Variable names must be unique."
|
|
1940
|
+
).optional(),
|
|
1921
1941
|
slug,
|
|
1922
1942
|
name: displayName,
|
|
1923
1943
|
include: z6.array(safeRelativePath).min(1).max(100),
|
|
@@ -6146,7 +6166,7 @@ var BUILTINS = /* @__PURE__ */ new Set([
|
|
|
6146
6166
|
...builtinModules,
|
|
6147
6167
|
...builtinModules.map((name) => `node:${name}`)
|
|
6148
6168
|
]);
|
|
6149
|
-
var ENVIRONMENT_PATTERN = /\bprocess\.env
|
|
6169
|
+
var ENVIRONMENT_PATTERN = /\bprocess\.env(?:\.([A-Z][A-Z0-9_]*)\b|\[\s*["']([A-Z][A-Z0-9_]*)["']\s*\])/g;
|
|
6150
6170
|
function packageName(importPath) {
|
|
6151
6171
|
if (importPath.startsWith("@"))
|
|
6152
6172
|
return importPath.split("/").slice(0, 2).join("/");
|
|
@@ -6227,8 +6247,9 @@ async function analyzeTestImports(input) {
|
|
|
6227
6247
|
() => ""
|
|
6228
6248
|
);
|
|
6229
6249
|
for (const match of source.matchAll(ENVIRONMENT_PATTERN)) {
|
|
6230
|
-
|
|
6231
|
-
|
|
6250
|
+
const name = match[1] ?? match[2];
|
|
6251
|
+
if (name && name !== "PLAYWRIGHT_BASE_URL") {
|
|
6252
|
+
environmentVariables.add(name);
|
|
6232
6253
|
}
|
|
6233
6254
|
}
|
|
6234
6255
|
if (/playwright\.config\.[^.]+$/.test(file) && /\bwebServer\s*:/.test(source)) {
|