@marcoappio/marco-config 2.0.247 → 2.0.249

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.
@@ -1 +1 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/schemas/string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,eAAO,MAAM,MAAM;;mBAGF,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;qBAEpB,MAAM;;;;;;CAexB,CAAA"}
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/schemas/string.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAI5B,eAAO,MAAM,MAAM;;mBAGF,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;qBAEpB,MAAM;;;;;;CAcxB,CAAA"}
@@ -1,11 +1,20 @@
1
1
  import { describe, expect, it } from 'bun:test';
2
2
  import * as v from 'valibot';
3
3
  import { string } from '../schemas/string';
4
- describe('string.shortUUID', () => {
5
- const testUUID = '123e4567-e89b-12d3-a456-426614174000';
6
- const testShortUUID = '3fEgj34VWmVufdDCYA2MKE';
7
- it('should correctly validate a short UUID', () => {
8
- expect(v.safeParse(string.shortUUID(), testShortUUID).success).toBe(true);
9
- expect(v.safeParse(string.shortUUID(), testUUID).success).toBe(false);
4
+ import { shortUUID } from '../utils';
5
+ describe('string', () => {
6
+ const uuid = shortUUID.createUUID();
7
+ const uuidShort = shortUUID.fromUUID(uuid);
8
+ describe('shortUUID', () => {
9
+ it('should correctly validate a short UUID', () => {
10
+ expect(v.safeParse(string.shortUUID(), uuidShort).success).toBe(true);
11
+ expect(v.safeParse(string.shortUUID(), uuid).success).toBe(false);
12
+ });
13
+ });
14
+ describe('uuid', () => {
15
+ it('should correctly validate a UUID', () => {
16
+ expect(v.safeParse(string.uuid(), uuid).success).toBe(true);
17
+ expect(v.safeParse(string.uuid(), uuidShort).success).toBe(false);
18
+ });
10
19
  });
11
20
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@marcoappio/marco-config",
3
3
  "packageManager": "bun@1.2.0",
4
- "version": "2.0.247",
4
+ "version": "2.0.249",
5
5
  "author": "team@marcoapp.io",
6
6
  "main": "dist/index.js",
7
7
  "repository": "git@github.com:marcoappio/marco-config.git",