@radheim/util 0.0.0-stage → 2.4.3

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.
Files changed (98) hide show
  1. package/dist/abort.d.ts +1 -0
  2. package/dist/abort.js +8 -0
  3. package/dist/activity-calendar.d.ts +21 -0
  4. package/dist/activity-calendar.js +42 -0
  5. package/dist/artifact.d.ts +4 -0
  6. package/dist/artifact.js +85 -0
  7. package/dist/base64.d.ts +4 -0
  8. package/dist/base64.js +24 -0
  9. package/dist/binary.d.ts +7 -0
  10. package/dist/binary.js +34 -0
  11. package/dist/bom.d.ts +22 -0
  12. package/dist/bom.js +36 -0
  13. package/dist/cross-spawn-spawner.d.ts +9 -0
  14. package/dist/cross-spawn-spawner.js +548 -0
  15. package/dist/duration.d.ts +2 -0
  16. package/dist/duration.js +22 -0
  17. package/dist/effect/app-node-platform.d.ts +13 -0
  18. package/dist/effect/app-node-platform.js +29 -0
  19. package/dist/effect/app-node.d.ts +16 -0
  20. package/dist/effect/app-node.js +8 -0
  21. package/dist/effect/layer-node.d.ts +178 -0
  22. package/dist/effect/layer-node.js +248 -0
  23. package/dist/effect-flock.d.ts +31 -0
  24. package/dist/effect-flock.js +186 -0
  25. package/dist/encode.d.ts +4 -0
  26. package/dist/encode.js +38 -0
  27. package/dist/execute-output.d.ts +10 -0
  28. package/dist/execute-output.js +22 -0
  29. package/dist/flock.d.ts +28 -0
  30. package/dist/flock.js +267 -0
  31. package/dist/fs-util.d.ts +54 -0
  32. package/dist/fs-util.js +200 -0
  33. package/dist/glob.d.ts +18 -0
  34. package/dist/glob.js +29 -0
  35. package/dist/global-roots.d.ts +8 -0
  36. package/dist/global-roots.js +17 -0
  37. package/dist/global-roots.workerd.d.ts +7 -0
  38. package/dist/global-roots.workerd.js +15 -0
  39. package/dist/global.d.ts +30 -0
  40. package/dist/global.js +54 -0
  41. package/dist/hash.d.ts +4 -0
  42. package/dist/hash.js +12 -0
  43. package/dist/heap-snapshot.d.ts +19 -0
  44. package/dist/heap-snapshot.js +38 -0
  45. package/dist/no-timeout-fetch.d.ts +1 -0
  46. package/dist/no-timeout-fetch.js +4 -0
  47. package/dist/npm-config.d.ts +4 -0
  48. package/dist/npm-config.js +34 -0
  49. package/dist/npm.d.ts +45 -0
  50. package/dist/npm.js +441 -0
  51. package/dist/observability/logging.d.ts +14 -0
  52. package/dist/observability/logging.js +151 -0
  53. package/dist/observability/otlp.d.ts +19 -0
  54. package/dist/observability/otlp.js +63 -0
  55. package/dist/observability/shared.d.ts +1 -0
  56. package/dist/observability/shared.js +7 -0
  57. package/dist/observability/tracing.d.ts +2 -0
  58. package/dist/observability/tracing.js +3 -0
  59. package/dist/observability.d.ts +13 -0
  60. package/dist/observability.js +37 -0
  61. package/dist/open.d.ts +2 -0
  62. package/dist/open.js +10 -0
  63. package/dist/patch.d.ts +43 -0
  64. package/dist/patch.js +332 -0
  65. package/dist/path.d.ts +20 -0
  66. package/dist/path.js +134 -0
  67. package/dist/process-signal.d.ts +5 -0
  68. package/dist/process-signal.js +22 -0
  69. package/dist/process.d.ts +54 -0
  70. package/dist/process.js +167 -0
  71. package/dist/qr.d.ts +15 -0
  72. package/dist/qr.js +295 -0
  73. package/dist/record.d.ts +2 -0
  74. package/dist/record.js +2 -0
  75. package/dist/retry.d.ts +8 -0
  76. package/dist/retry.js +45 -0
  77. package/dist/runtime/import.bun.d.ts +2 -0
  78. package/dist/runtime/import.bun.js +8 -0
  79. package/dist/runtime/import.node.d.ts +2 -0
  80. package/dist/runtime/import.node.js +62 -0
  81. package/dist/runtime/import.workerd.d.ts +2 -0
  82. package/dist/runtime/import.workerd.js +7 -0
  83. package/dist/runtime-import.d.ts +1 -0
  84. package/dist/runtime-import.js +1 -0
  85. package/dist/session-mention.d.ts +11 -0
  86. package/dist/session-mention.js +18 -0
  87. package/dist/session-title-fallback.d.ts +16 -0
  88. package/dist/session-title-fallback.js +23 -0
  89. package/dist/session-turn.d.ts +37 -0
  90. package/dist/session-turn.js +56 -0
  91. package/dist/teardown.d.ts +8 -0
  92. package/dist/teardown.js +16 -0
  93. package/dist/text-boundary.d.ts +11 -0
  94. package/dist/text-boundary.js +22 -0
  95. package/dist/uuid.d.ts +1 -0
  96. package/dist/uuid.js +14 -0
  97. package/package.json +71 -4
  98. package/README.md +0 -3
@@ -0,0 +1,11 @@
1
+ export * as TextBoundary from "./text-boundary.js";
2
+ /**
3
+ * Clip text to a budget without ending or starting on half a character. `head` and `tail` count UTF-16 code units,
4
+ * like `.length`. The result can be shorter than the budget by the part of the character at the cut, and
5
+ * `head("😀", 1)` is empty. Boundaries are code points, not graphemes, and malformed input is kept as it is everywhere
6
+ * except at the cut.
7
+ */
8
+ /** The first `limit` code units of `text`, without a high surrogate whose pair the limit cut off. */
9
+ export declare function head(text: string, limit: number): string;
10
+ /** The last `limit` code units of `text`, without a low surrogate whose pair the limit cut off. */
11
+ export declare function tail(text: string, limit: number): string;
@@ -0,0 +1,22 @@
1
+ export * as TextBoundary from "./text-boundary.js";
2
+ /**
3
+ * Clip text to a budget without ending or starting on half a character. `head` and `tail` count UTF-16 code units,
4
+ * like `.length`. The result can be shorter than the budget by the part of the character at the cut, and
5
+ * `head("😀", 1)` is empty. Boundaries are code points, not graphemes, and malformed input is kept as it is everywhere
6
+ * except at the cut.
7
+ */
8
+ /** The first `limit` code units of `text`, without a high surrogate whose pair the limit cut off. */
9
+ export function head(text, limit) {
10
+ if (text.length <= limit)
11
+ return text;
12
+ const code = text.charCodeAt(limit - 1);
13
+ return text.slice(0, code >= 0xd800 && code <= 0xdbff ? limit - 1 : limit);
14
+ }
15
+ /** The last `limit` code units of `text`, without a low surrogate whose pair the limit cut off. */
16
+ export function tail(text, limit) {
17
+ if (text.length <= limit)
18
+ return text;
19
+ const start = text.length - limit;
20
+ const code = text.charCodeAt(start);
21
+ return text.slice(code >= 0xdc00 && code <= 0xdfff ? start + 1 : start);
22
+ }
package/dist/uuid.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function uuid(): string;
package/dist/uuid.js ADDED
@@ -0,0 +1,14 @@
1
+ const fallback = () => Math.random().toString(16).slice(2);
2
+ export function uuid() {
3
+ const c = globalThis.crypto;
4
+ if (!c || typeof c.randomUUID !== "function")
5
+ return fallback();
6
+ if (typeof globalThis.isSecureContext === "boolean" && !globalThis.isSecureContext)
7
+ return fallback();
8
+ try {
9
+ return c.randomUUID();
10
+ }
11
+ catch {
12
+ return fallback();
13
+ }
14
+ }
package/package.json CHANGED
@@ -1,6 +1,73 @@
1
1
  {
2
+ "$schema": "https://json.schemastore.org/package.json",
2
3
  "name": "@radheim/util",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
4
+ "version": "2.4.3",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/anomalyco/opencode.git",
10
+ "directory": "packages/util"
11
+ },
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "exports": {
19
+ "./effect/layer-node": {
20
+ "types": "./dist/effect/layer-node.d.ts",
21
+ "import": "./dist/effect/layer-node.js"
22
+ },
23
+ "./*": {
24
+ "types": "./dist/*.d.ts",
25
+ "import": "./dist/*.js"
26
+ }
27
+ },
28
+ "imports": {
29
+ "#global-roots": {
30
+ "workerd": "./dist/global-roots.workerd.js",
31
+ "default": "./dist/global-roots.js"
32
+ },
33
+ "#runtime-import": {
34
+ "workerd": "./dist/runtime/import.workerd.js",
35
+ "bun": "./dist/runtime/import.bun.js",
36
+ "node": "./dist/runtime/import.node.js",
37
+ "default": "./dist/runtime/import.bun.js"
38
+ }
39
+ },
40
+ "scripts": {
41
+ "build": "bun run script/build.ts",
42
+ "pack": "bun run script/pack.ts",
43
+ "test": "bun test --only-failures",
44
+ "typecheck": "bun check --no-script",
45
+ "typecheck:tsc": "tsc --noEmit",
46
+ "typecheck:dist": "bun run build && bun typecheck --project tsconfig.dist.json"
47
+ },
48
+ "dependencies": {
49
+ "@effect/platform-node": "4.1.0",
50
+ "@effect/platform-node-shared": "4.1.0",
51
+ "@npmcli/arborist": "9.4.0",
52
+ "@npmcli/config": "10.8.1",
53
+ "cross-spawn": "7.0.6",
54
+ "effect": "4.1.0",
55
+ "glob": "13.0.5",
56
+ "mime-types": "3.0.2",
57
+ "minimatch": "10.2.5",
58
+ "npm-package-arg": "13.0.2",
59
+ "open": "11.0.4",
60
+ "pacote": "21.5.1"
61
+ },
62
+ "devDependencies": {
63
+ "@tsconfig/bun": "1.0.9",
64
+ "@types/bun": "1.4.3",
65
+ "@types/cross-spawn": "6.0.6",
66
+ "@types/node": "24.12.2",
67
+ "@types/npm-package-arg": "6.1.4",
68
+ "@types/npmcli__arborist": "6.3.3",
69
+ "@types/pacote": "11.1.8",
70
+ "@typescript/native": "npm:typescript@7.1.0-beta",
71
+ "jsqr": "1.4.0"
72
+ }
73
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.