pepr 0.51.4-nightly.0 → 0.51.4-nightly.1
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/cli/init/templates.d.ts +10 -6
- package/dist/cli/init/templates.d.ts.map +1 -1
- package/dist/cli.js +4 -1
- package/dist/controller.js +1 -1
- package/dist/lib.d.ts +2 -1
- package/dist/lib.d.ts.map +1 -1
- package/dist/lib.js +4 -2
- package/dist/lib.js.map +2 -2
- package/package.json +22 -17
- package/src/cli/init/templates.ts +3 -0
- package/src/lib/telemetry/webhookTimeouts.ts +2 -2
- package/src/lib.ts +2 -0
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"!dist/**/*.test.d.ts*",
|
|
18
18
|
"!src/cli/docs/**"
|
|
19
19
|
],
|
|
20
|
-
"version": "0.51.4-nightly.
|
|
20
|
+
"version": "0.51.4-nightly.1",
|
|
21
21
|
"main": "dist/lib.js",
|
|
22
22
|
"types": "dist/lib.d.ts",
|
|
23
23
|
"scripts": {
|
|
@@ -29,24 +29,29 @@
|
|
|
29
29
|
"build:image:unicorn": "npm run build && docker buildx build --output type=docker --tag pepr/private:dev $(node scripts/read-unicorn-build-args.mjs) .",
|
|
30
30
|
"set:version": "node scripts/set-version.js",
|
|
31
31
|
"test": "npm run test:unit && npm run test:journey && npm run test:journey-wasm",
|
|
32
|
-
"test:artifacts": "npm run build &&
|
|
33
|
-
"test:docs": "
|
|
32
|
+
"test:artifacts": "npm run build && vitest run src/build-artifact.test.ts",
|
|
33
|
+
"test:docs": "vitest run --config=vitest.config.ts src/cli/docs/*.test.ts",
|
|
34
34
|
"test:integration": "npm run test:integration:prep && npm run test:integration:run",
|
|
35
35
|
"test:integration:prep": "./integration/prep.sh",
|
|
36
|
-
"test:integration:run": "
|
|
36
|
+
"test:integration:run": "vitest run --config=integration/vitest.config.ts integration",
|
|
37
37
|
"test:journey": "npm run test:journey:k3d && npm run build && npm run test:journey:image && npm run test:journey:run",
|
|
38
38
|
"test:journey-wasm": "npm run test:journey:k3d && npm run build && npm run test:journey:image && npm run test:journey:run-wasm",
|
|
39
39
|
"test:journey-wasm:unicorn": "npm run test:journey:k3d && npm run build && npm run test:journey:image:unicorn && npm run test:journey:run-wasm",
|
|
40
40
|
"test:journey:image": "docker buildx build --output type=docker --tag pepr:dev . && k3d image import pepr:dev -c pepr-dev",
|
|
41
41
|
"test:journey:image:unicorn": "npm run build && docker buildx build --output type=docker --tag pepr/private:dev $(node scripts/read-unicorn-build-args.mjs) . && k3d image import pepr/private:dev -c pepr-dev",
|
|
42
42
|
"test:journey:k3d": "k3d cluster delete pepr-dev && k3d cluster create pepr-dev --k3s-arg '--debug@server:0' --wait && kubectl rollout status deployment -n kube-system",
|
|
43
|
-
"test:journey:run": "
|
|
44
|
-
"test:journey:run-wasm": "
|
|
43
|
+
"test:journey:run": "vitest run --config=journey/vitest.config.ts journey/entrypoint.test.ts && npm run test:journey:upgrade",
|
|
44
|
+
"test:journey:run-wasm": "vitest run --config=journey/vitest.config.ts journey/entrypoint-wasm.test.ts",
|
|
45
45
|
"test:journey:unicorn": "npm run test:journey:k3d && npm run test:journey:image:unicorn && npm run test:journey:run",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"format:
|
|
49
|
-
"format:
|
|
46
|
+
"format:check": "npm run format:src && npm run format:tests && npm run format:markdown && npm run format:integration && npm run format:prettier -- --check",
|
|
47
|
+
"format:fix": "npm run format:src -- --fix && npm run format:markdown -- --fix && npm run format:integration -- --fix && npm run format:prettier -- --write",
|
|
48
|
+
"format:integration": "eslint --config integration/eslint.config.mjs integration/cli integration/helpers",
|
|
49
|
+
"format:markdown": "npx -y markdownlint-cli --ignore adr --ignore integration/testroot --ignore pepr-test-module --ignore pepr-upgrade-test --ignore node_modules \"**/*.md\"",
|
|
50
|
+
"format:prettier": "prettier --config .prettierrc src integration/cli/**/*.ts integration/helpers/**/*.ts",
|
|
51
|
+
"format:src": "eslint 'src/**/*.ts' --ignore-pattern '**/*.test.ts' --ignore-pattern src/templates/eslint.config.mjs",
|
|
52
|
+
"format:tests": "eslint --config eslint.test.config.mjs 'src/**/*.test.ts'",
|
|
53
|
+
"test:journey:upgrade": "npm run test:journey:k3d && npm run test:journey:image && vitest run --config=journey/vitest.config.ts journey/pepr-upgrade.test.ts",
|
|
54
|
+
"test:unit": "npm run gen-data-json && vitest run --coverage",
|
|
50
55
|
"prepare": "if [ \"$NODE_ENV\" != 'production' ]; then husky; fi"
|
|
51
56
|
},
|
|
52
57
|
"dependencies": {
|
|
@@ -68,25 +73,25 @@
|
|
|
68
73
|
"devDependencies": {
|
|
69
74
|
"@commitlint/cli": "19.8.1",
|
|
70
75
|
"@commitlint/config-conventional": "19.8.1",
|
|
71
|
-
"@fast-check/
|
|
72
|
-
"@jest/globals": "29.7.0",
|
|
76
|
+
"@fast-check/vitest": "^0.2.1",
|
|
73
77
|
"@types/eslint": "9.6.1",
|
|
74
78
|
"@types/express": "5.0.3",
|
|
75
79
|
"@types/json-pointer": "^1.0.34",
|
|
76
|
-
"@types/node": "
|
|
80
|
+
"@types/node": "24.x.x",
|
|
77
81
|
"@types/node-forge": "1.3.11",
|
|
78
82
|
"@types/uuid": "10.0.0",
|
|
83
|
+
"@vitest/coverage-v8": "^3.2.3",
|
|
79
84
|
"fast-check": "^4.0.0",
|
|
80
85
|
"globals": "^16.0.0",
|
|
81
86
|
"husky": "^9.1.6",
|
|
82
|
-
"jest": "29.7.0",
|
|
83
87
|
"js-yaml": "^4.1.0",
|
|
84
88
|
"shellcheck": "^3.0.0",
|
|
85
|
-
"
|
|
86
|
-
"
|
|
89
|
+
"undici": "^7.0.1",
|
|
90
|
+
"vitest": "^3.2.3"
|
|
87
91
|
},
|
|
88
92
|
"overrides": {
|
|
89
|
-
"glob": "^9.0.0"
|
|
93
|
+
"glob": "^9.0.0",
|
|
94
|
+
"brace-expansion": "1.1.11"
|
|
90
95
|
},
|
|
91
96
|
"peerDependencies": {
|
|
92
97
|
"@types/prompts": "2.4.9",
|
|
@@ -18,7 +18,7 @@ export class MeasureWebhookTimeout {
|
|
|
18
18
|
start(timeout: number = 10): void {
|
|
19
19
|
this.#startTime = getNow();
|
|
20
20
|
this.timeout = timeout;
|
|
21
|
-
Log.
|
|
21
|
+
Log.debug(`Starting timer at ${this.#startTime}`);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
stop(): void {
|
|
@@ -27,7 +27,7 @@ export class MeasureWebhookTimeout {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
const elapsedTime = getNow() - this.#startTime;
|
|
30
|
-
Log.
|
|
30
|
+
Log.debug(`Webhook ${this.#startTime} took ${elapsedTime}ms`);
|
|
31
31
|
this.#startTime = null;
|
|
32
32
|
|
|
33
33
|
if (elapsedTime > this.timeout) {
|
package/src/lib.ts
CHANGED
|
@@ -8,8 +8,10 @@ import { PeprMutateRequest } from "./lib/mutate-request";
|
|
|
8
8
|
import * as PeprUtils from "./lib/utils";
|
|
9
9
|
import { PeprValidateRequest } from "./lib/validate-request";
|
|
10
10
|
import * as sdk from "./sdk/sdk";
|
|
11
|
+
import { metricsCollector } from "./lib/telemetry/metrics";
|
|
11
12
|
|
|
12
13
|
export {
|
|
14
|
+
metricsCollector,
|
|
13
15
|
Capability,
|
|
14
16
|
K8s,
|
|
15
17
|
Log,
|