@percher/shared 0.1.1 → 0.1.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/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { MAX_LOG_SEARCH_LENGTH } from "./logs";
1
2
  export { DEFAULT_NODE_VERSION_LABEL, DEFAULT_NODE_VERSION_MAJOR } from "./runtime";
2
3
  export { TIMEOUTS, type TimeoutKey } from "./timeouts";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export { MAX_LOG_SEARCH_LENGTH } from "./logs";
1
2
  export { DEFAULT_NODE_VERSION_LABEL, DEFAULT_NODE_VERSION_MAJOR } from "./runtime";
2
3
  export { TIMEOUTS } from "./timeouts";
3
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAmB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,QAAQ,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACnF,OAAO,EAAE,QAAQ,EAAmB,MAAM,YAAY,CAAC"}
package/dist/logs.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Maximum length of the `search` query parameter accepted by the log
3
+ * endpoints. Bounded so an authenticated caller cannot post a
4
+ * megabyte-sized substring and force pathological allocs on every
5
+ * emitted line (the SSE stream is unbounded in time, so the cost
6
+ * accumulates). 256 chars is more than enough for any real "grep for
7
+ * this exception" use case; longer inputs are almost certainly buggy
8
+ * clients or abuse.
9
+ *
10
+ * Single source of truth for both:
11
+ * - server-side enforcement: packages/api/src/routes/logs.ts
12
+ * - client-side schema validation: packages/core/src/commands/logs.ts
13
+ *
14
+ * Codex P3 follow-up on bd8d01e: previously duplicated as a magic
15
+ * number, drift would have produced inconsistent 400s vs schema
16
+ * rejections if the cap was bumped on only one side.
17
+ */
18
+ export declare const MAX_LOG_SEARCH_LENGTH = 256;
19
+ //# sourceMappingURL=logs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.d.ts","sourceRoot":"","sources":["../src/logs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC"}
package/dist/logs.js ADDED
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Maximum length of the `search` query parameter accepted by the log
3
+ * endpoints. Bounded so an authenticated caller cannot post a
4
+ * megabyte-sized substring and force pathological allocs on every
5
+ * emitted line (the SSE stream is unbounded in time, so the cost
6
+ * accumulates). 256 chars is more than enough for any real "grep for
7
+ * this exception" use case; longer inputs are almost certainly buggy
8
+ * clients or abuse.
9
+ *
10
+ * Single source of truth for both:
11
+ * - server-side enforcement: packages/api/src/routes/logs.ts
12
+ * - client-side schema validation: packages/core/src/commands/logs.ts
13
+ *
14
+ * Codex P3 follow-up on bd8d01e: previously duplicated as a magic
15
+ * number, drift would have produced inconsistent 400s vs schema
16
+ * rejections if the cap was bumped on only one side.
17
+ */
18
+ export const MAX_LOG_SEARCH_LENGTH = 256;
19
+ //# sourceMappingURL=logs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logs.js","sourceRoot":"","sources":["../src/logs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@percher/shared",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Shared constants and contracts (timeouts, etc.) used across the Percher CLI, API, MCP, and worker. Internal — values change in lockstep across packages.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,9 @@
22
22
  "default": "./dist/runtime.js"
23
23
  }
24
24
  },
25
- "files": ["dist"],
25
+ "files": [
26
+ "dist"
27
+ ],
26
28
  "scripts": {
27
29
  "build": "tsc -p tsconfig.json",
28
30
  "test": "bun test",