@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 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 './config/env-config';
13
- export { extractAllCodeBlocks, extractCodeBlock, extractFunctionDefinition, extractJSON, } from './shared/code/extraction';
14
- export { isSafeCode, type ValidationOptions, type ValidationResult, validateCode, } from './shared/code/validation';
15
- export * from './shared/logger';
16
- export * from './shared/types';
17
- export * from './shared/universal';
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
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,cAAc,qBAAqB,CAAC;AAEpC,OAAO,EACL,oBAAoB,EACpB,gBAAgB,EAChB,yBAAyB,EACzB,WAAW,GACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,YAAY,GACb,MAAM,0BAA0B,CAAC;AAElC,cAAc,iBAAiB,CAAC;AAEhC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,oBAAoB,CAAC;AAEnC,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,OAAO,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 './cli/index';
2
- export * from './config/env-config';
3
- export * from './shared/index';
4
- export * from './web';
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,OAAO,CAAC;AAEtB,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,OAAO,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 './extraction';
12
- export { createSandbox, type ExecuteOptions, executeCode, executeCodeAsync, executeInSandbox, executeInSandboxAsync, type SandboxOptions, } from './sandbox';
13
- export { isSafeCode, type ValidationOptions, type ValidationResult, validateCode, } from './validation';
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,cAAc,CAAC;AAGtB,OAAO,EACL,aAAa,EACb,KAAK,cAAc,EACnB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,qBAAqB,EACrB,KAAK,cAAc,GACpB,MAAM,WAAW,CAAC;AAGnB,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,YAAY,GACb,MAAM,cAAc,CAAC"}
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"}
@@ -1,5 +1,5 @@
1
- export * from './code';
2
- export * from './logger';
3
- export * from './types';
4
- export * from './universal';
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,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,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"}
@@ -1,4 +1,10 @@
1
- import { Logger } from './types';
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,SAAS,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
+ {"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 { default as pluralize } from 'pluralize';
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
@@ -15,6 +15,7 @@
15
15
  "externalHappyVertical": [],
16
16
  "external": [
17
17
  "@paralleldrive/cuid2",
18
+ "@types/pluralize",
18
19
  "date-fns",
19
20
  "pluralize",
20
21
  "uuid"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/utils",
3
- "version": "0.101.3",
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",