@sdods/core 0.16.0 → 0.18.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/dist/.tsbuildinfo +1 -1
- package/dist/config/resolve.js +6 -1
- package/dist/config/workspace.js +3 -3
- package/package.json +9 -9
package/dist/config/resolve.js
CHANGED
|
@@ -2,7 +2,7 @@ import { existsSync, readFileSync } from 'node:fs';
|
|
|
2
2
|
import { basename, join, resolve as resolvePath } from 'node:path';
|
|
3
3
|
import { parse as parseYaml } from 'yaml';
|
|
4
4
|
import { ZodError } from 'zod';
|
|
5
|
-
import { EnvConfigSchema, ProjectConfigSchema, newRunId, } from '@sdods/contracts';
|
|
5
|
+
import { EnvConfigSchema, ProjectConfigSchema, isRunId, newRunId, } from '@sdods/contracts';
|
|
6
6
|
import { SdodsConfigError } from '../errors.js';
|
|
7
7
|
import { DEFAULT_ARTIFACTS_DIR, ENV_TO_CONFIG_PATH, FRAMEWORK_DEFAULTS, PROJECT_FILE, } from './defaults.js';
|
|
8
8
|
import { loadDotEnvLayer } from './env-files.js';
|
|
@@ -146,6 +146,11 @@ export function resolveConfig(opts) {
|
|
|
146
146
|
// runtime finalisation
|
|
147
147
|
const rt = interpolated.runtime;
|
|
148
148
|
rt.runId = rt.runId || newRunId();
|
|
149
|
+
// runDir is `<artifactsDir>/<runId>`; a `..` id would point it (and its cleanup) elsewhere.
|
|
150
|
+
if (!isRunId(rt.runId))
|
|
151
|
+
throw new SdodsConfigError(`Invalid run id "${rt.runId}".`, {
|
|
152
|
+
hint: 'Use letters, digits, ".", "_" or "-", not starting with ".".',
|
|
153
|
+
});
|
|
149
154
|
rt.retries = rt.retries ?? (rt.ci ? projectMerged.retries.ci : projectMerged.retries.local);
|
|
150
155
|
rt.harMode = rt.harMode ?? 'off';
|
|
151
156
|
rt.artifactsDir = resolvePath(opts.rootDir, rt.artifactsDir || DEFAULT_ARTIFACTS_DIR);
|
package/dist/config/workspace.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolve as resolvePath } from 'node:path';
|
|
2
|
+
import { isWithin } from '@sdods/contracts/paths';
|
|
2
3
|
import { SdodsError } from '../errors.js';
|
|
3
4
|
/** Directory (absolute) of a module's features. */
|
|
4
5
|
export function moduleDir(projectRoot, mod) {
|
|
@@ -10,8 +11,7 @@ export function moduleForFeature(project, featureFile) {
|
|
|
10
11
|
let best;
|
|
11
12
|
for (const mod of project.modules) {
|
|
12
13
|
const dir = moduleDir(project.root, mod);
|
|
13
|
-
|
|
14
|
-
if (rel === '' || rel.startsWith('..'))
|
|
14
|
+
if (!isWithin(dir, abs))
|
|
15
15
|
continue;
|
|
16
16
|
const depth = dir.split(/[\\/]/).length;
|
|
17
17
|
if (!best || depth > best.depth)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdods/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "SDODS runtime: configuration, project registry, fixtures, step libraries, data providers, screenshot narratives and self-healing locators.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"funding": "https://sdods.com/sponsor/",
|
|
@@ -46,25 +46,25 @@
|
|
|
46
46
|
"playwright-bdd": ">=9"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@sdods/contracts": "0.
|
|
50
|
-
"@cucumber/cucumber-expressions": "19.0.
|
|
49
|
+
"@sdods/contracts": "0.18.0",
|
|
50
|
+
"@cucumber/cucumber-expressions": "19.0.1",
|
|
51
51
|
"@cucumber/gherkin": "^42.0.1",
|
|
52
52
|
"@cucumber/messages": "^34.2.1",
|
|
53
53
|
"@faker-js/faker": "^10.6.0",
|
|
54
|
-
"@scalar/openapi-parser": "^0.29.
|
|
54
|
+
"@scalar/openapi-parser": "^0.29.16",
|
|
55
55
|
"ajv": "^8.20.0",
|
|
56
56
|
"ajv-formats": "^3.0.1",
|
|
57
57
|
"csv-parse": "^7.0.3",
|
|
58
58
|
"@cucumber/tag-expressions": "^11.0.1",
|
|
59
|
-
"dotenv": "^18.0.
|
|
60
|
-
"execa": "^10.1
|
|
61
|
-
"jsonpath-plus": "^11.2.
|
|
59
|
+
"dotenv": "^18.0.9",
|
|
60
|
+
"execa": "^10.2.1",
|
|
61
|
+
"jsonpath-plus": "^11.2.1",
|
|
62
62
|
"picocolors": "^1.1.1",
|
|
63
63
|
"ts-morph": "^28.0.0",
|
|
64
64
|
"tsx": "^4.23.15",
|
|
65
65
|
"yaml": "^2.9.1",
|
|
66
|
-
"zod": "^4.6.
|
|
67
|
-
"@sdods/db": "0.
|
|
66
|
+
"zod": "^4.6.7",
|
|
67
|
+
"@sdods/db": "0.18.0"
|
|
68
68
|
},
|
|
69
69
|
"homepage": "https://sdods.com",
|
|
70
70
|
"bugs": {
|