@happyvertical/utils 0.101.3 → 0.102.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/AGENT.md +1 -1
- package/dist/browser.d.ts +6 -6
- package/dist/browser.d.ts.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/shared/code/index.d.ts +3 -3
- package/dist/shared/code/index.d.ts.map +1 -1
- package/dist/shared/index.d.ts +4 -4
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/logger.d.ts +7 -1
- package/dist/shared/logger.d.ts.map +1 -1
- package/dist/shared/universal.d.ts +4 -1
- package/metadata.json +1 -0
- package/package.json +2 -2
package/AGENT.md
CHANGED
|
@@ -27,6 +27,6 @@ pnpm --filter @happyvertical/utils clean
|
|
|
27
27
|
## Ecosystem Relationships
|
|
28
28
|
- Provides: Foundation utilities for ID generation, date parsing, URL handling, string conversion, error handling, and logging
|
|
29
29
|
- Implements: none
|
|
30
|
-
- Requires: @paralleldrive/cuid2, date-fns, pluralize, uuid
|
|
30
|
+
- Requires: @paralleldrive/cuid2, @types/pluralize, date-fns, pluralize, uuid
|
|
31
31
|
- Stability: stable (Primary package surface is described as implemented and production-oriented.)
|
|
32
32
|
<!-- END AGENT:GENERATED -->
|
package/dist/browser.d.ts
CHANGED
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*
|
|
10
10
|
* For Node.js environments, use the main entry point instead.
|
|
11
11
|
*/
|
|
12
|
-
export * from
|
|
13
|
-
export { extractAllCodeBlocks, extractCodeBlock, extractFunctionDefinition, extractJSON, } from
|
|
14
|
-
export { isSafeCode, type ValidationOptions, type ValidationResult, validateCode, } from
|
|
15
|
-
export * from
|
|
16
|
-
export * from
|
|
17
|
-
export * from
|
|
12
|
+
export * from "./config/env-config.js";
|
|
13
|
+
export { extractAllCodeBlocks, extractCodeBlock, extractFunctionDefinition, extractJSON, } from "./shared/code/extraction.js";
|
|
14
|
+
export { isSafeCode, type ValidationOptions, type ValidationResult, validateCode, } from "./shared/code/validation.js";
|
|
15
|
+
export * from "./shared/logger.js";
|
|
16
|
+
export * from "./shared/types.js";
|
|
17
|
+
export * from "./shared/universal.js";
|
|
18
18
|
/** @internal */
|
|
19
19
|
export declare const PACKAGE_VERSION_INITIALIZED = true;
|
|
20
20
|
//# sourceMappingURL=browser.d.ts.map
|
package/dist/browser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,cAAc,
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,cAAc,wBAAqB,CAAC;AAEpC,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,WAAW,GACZ,MAAM,6BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,YAAY,GACb,MAAM,6BAA0B,CAAC;AAElC,cAAc,oBAAiB,CAAC;AAEhC,cAAc,mBAAgB,CAAC;AAE/B,cAAc,uBAAoB,CAAC;AAEnC,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,OAAO,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./cli/index.js";
|
|
2
|
+
export * from "./config/env-config.js";
|
|
3
|
+
export * from "./shared/index.js";
|
|
4
|
+
export * from "./web.js";
|
|
5
5
|
/** @internal */
|
|
6
6
|
export declare const PACKAGE_VERSION_INITIALIZED = true;
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAa,CAAC;AAC5B,cAAc,wBAAqB,CAAC;AACpC,cAAc,mBAAgB,CAAC;AAC/B,cAAc,UAAO,CAAC;AAEtB,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,OAAO,CAAC"}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @module code
|
|
10
10
|
*/
|
|
11
|
-
export { extractAllCodeBlocks, extractCodeBlock, extractFunctionDefinition, extractJSON, } from
|
|
12
|
-
export { createSandbox, type ExecuteOptions, executeCode, executeCodeAsync, executeInSandbox, executeInSandboxAsync, type SandboxOptions, } from
|
|
13
|
-
export { isSafeCode, type ValidationOptions, type ValidationResult, validateCode, } from
|
|
11
|
+
export { extractAllCodeBlocks, extractCodeBlock, extractFunctionDefinition, extractJSON, } from "./extraction.js";
|
|
12
|
+
export { createSandbox, type ExecuteOptions, executeCode, executeCodeAsync, executeInSandbox, executeInSandboxAsync, type SandboxOptions, } from "./sandbox.js";
|
|
13
|
+
export { isSafeCode, type ValidationOptions, type ValidationResult, validateCode, } from "./validation.js";
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/code/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,WAAW,GACZ,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/shared/code/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,WAAW,GACZ,MAAM,iBAAc,CAAC;AAGtB,OAAO,EACL,aAAa,EACb,KAAK,cAAc,EACnB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,cAAc,GACpB,MAAM,cAAW,CAAC;AAGnB,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,YAAY,GACb,MAAM,iBAAc,CAAC"}
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
1
|
+
export * from "./code/index.js";
|
|
2
|
+
export * from "./logger.js";
|
|
3
|
+
export * from "./types.js";
|
|
4
|
+
export * from "./universal.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAQ,CAAC;AACvB,cAAc,aAAU,CAAC;AACzB,cAAc,YAAS,CAAC;AACxB,cAAc,gBAAa,CAAC"}
|
package/dist/shared/logger.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Universal logging utilities that work in both browser and Node.js
|
|
3
|
+
*
|
|
4
|
+
* Provides a configurable logging system with console and no-op implementations.
|
|
5
|
+
* The global logger can be swapped out for custom implementations as needed.
|
|
6
|
+
*/
|
|
7
|
+
import type { Logger } from "./types.js";
|
|
2
8
|
/**
|
|
3
9
|
* Replace the global logger with a custom implementation
|
|
4
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/shared/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/shared/logger.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAS,CAAC;AAwDtC;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GAAI,QAAQ,MAAM,KAAG,IAE1C,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,SAAS,QAAO,MAE5B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,QAAO,IAEjC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,QAAO,IAEhC,CAAC"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Universal utilities that work in both browser and Node.js environments
|
|
3
|
+
*/
|
|
1
4
|
import { createId as cuid2CreateId, isCuid } from '@paralleldrive/cuid2';
|
|
2
5
|
import { add } from 'date-fns/add';
|
|
3
6
|
import { isValid } from 'date-fns/isValid';
|
|
4
|
-
import
|
|
7
|
+
import pluralize from 'pluralize';
|
|
5
8
|
/**
|
|
6
9
|
* Generates a unique identifier using CUID2 (preferred) or UUID fallback
|
|
7
10
|
*
|
package/metadata.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.102.1",
|
|
4
4
|
"description": "Foundation utilities for ID generation, date parsing, URL handling, string conversion, error handling, and logging",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@paralleldrive/cuid2": "^3.3.0",
|
|
24
|
+
"@types/pluralize": "^0.0.33",
|
|
24
25
|
"date-fns": "^4.1.0",
|
|
25
26
|
"pluralize": "^8.0.0",
|
|
26
27
|
"uuid": "^13.0.0"
|
|
27
28
|
},
|
|
28
29
|
"devDependencies": {
|
|
29
30
|
"@types/node": "25.0.10",
|
|
30
|
-
"@types/pluralize": "^0.0.33",
|
|
31
31
|
"typescript": "5.9.3",
|
|
32
32
|
"vite": "8.1.4",
|
|
33
33
|
"vite-plugin-dts": "4.5.4",
|