@webiny/stdlib 0.0.5 → 0.0.6

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/README.md CHANGED
@@ -30,6 +30,7 @@ The package is ESM-only and ships three subpath exports. Because each is a separ
30
30
  | `immutableGet` / `immutableSet` / `immutableDelete` / `mutableSet` / `mutableDelete` | Dot-notation get/set/delete on nested objects — [docs](src/common/utils/dotProp/README.md) |
31
31
  | `toBoolean` / `isTruthy` / `isFalsy` | Semantic boolean coercion — [docs](src/common/utils/boolean/README.md) |
32
32
  | `uuid` | RFC 4122 v4 UUID generator (native + fallback) — [docs](src/common/utils/uuid/README.md) |
33
+ | `mdbid` | MongoDB-compatible ObjectId generator — [docs](src/common/utils/mdbid/README.md) |
33
34
 
34
35
  ---
35
36
 
package/dist/README.md CHANGED
@@ -30,6 +30,7 @@ The package is ESM-only and ships three subpath exports. Because each is a separ
30
30
  | `immutableGet` / `immutableSet` / `immutableDelete` / `mutableSet` / `mutableDelete` | Dot-notation get/set/delete on nested objects — [docs](src/common/utils/dotProp/README.md) |
31
31
  | `toBoolean` / `isTruthy` / `isFalsy` | Semantic boolean coercion — [docs](src/common/utils/boolean/README.md) |
32
32
  | `uuid` | RFC 4122 v4 UUID generator (native + fallback) — [docs](src/common/utils/uuid/README.md) |
33
+ | `mdbid` | MongoDB-compatible ObjectId generator — [docs](src/common/utils/mdbid/README.md) |
33
34
 
34
35
  ---
35
36
 
@@ -9,4 +9,5 @@ export type { ICache, IAsyncCache } from "./features/Cache/index.js";
9
9
  export { toBoolean, isTruthy, isFalsy } from "./utils/boolean/index.js";
10
10
  export { immutableDelete, immutableGet, mutableDelete, mutableSet, immutableSet } from "./utils/dotProp/index.js";
11
11
  export { uuid } from "./utils/uuid/index.js";
12
+ export { mdbid } from "./utils/mdbid/index.js";
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common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nE,OAAO,EACH,KAAK,EACL,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,uBAAuB,EAC1B,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EACH,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC"}
@@ -7,4 +7,5 @@ export { Cache, AsyncCache, CacheError, MemoryCacheFeature, AsyncMemoryCacheFeat
7
7
  export { toBoolean, isTruthy, isFalsy } from "./utils/boolean/index.js";
8
8
  export { immutableDelete, immutableGet, mutableDelete, mutableSet, immutableSet } from "./utils/dotProp/index.js";
9
9
  export { uuid } from "./utils/uuid/index.js";
10
+ export { mdbid } from "./utils/mdbid/index.js";
10
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEnG,OAAO,EAAE,MAAM,EAAgB,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EACH,KAAK,EACL,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,uBAAuB,EAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EACH,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEnG,OAAO,EAAE,MAAM,EAAgB,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EACH,KAAK,EACL,UAAU,EACV,UAAU,EACV,kBAAkB,EAClB,uBAAuB,EAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EACH,eAAe,EACf,YAAY,EACZ,aAAa,EACb,UAAU,EACV,YAAY,EACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { mdbid } from "./mdbid.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/utils/mdbid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { mdbid } from "./mdbid.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/utils/mdbid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Generates a MongoDB-compatible ObjectId as a 24-character lowercase hex string.
3
+ * Uses `bson-objectid` which produces time-sortable, globally unique identifiers
4
+ * matching MongoDB's native ObjectId format.
5
+ */
6
+ export declare function mdbid(): string;
7
+ //# sourceMappingURL=mdbid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mdbid.d.ts","sourceRoot":"","sources":["../../../../src/common/utils/mdbid/mdbid.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,wBAAgB,KAAK,IAAI,MAAM,CAE9B"}
@@ -0,0 +1,12 @@
1
+ import _ObjectID from "bson-objectid";
2
+ /** CJS interop: tsgo resolves the default as the module namespace, not the callable. */
3
+ const ObjectID = _ObjectID;
4
+ /**
5
+ * Generates a MongoDB-compatible ObjectId as a 24-character lowercase hex string.
6
+ * Uses `bson-objectid` which produces time-sortable, globally unique identifiers
7
+ * matching MongoDB's native ObjectId format.
8
+ */
9
+ export function mdbid() {
10
+ return ObjectID().toHexString();
11
+ }
12
+ //# sourceMappingURL=mdbid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mdbid.js","sourceRoot":"","sources":["../../../../src/common/utils/mdbid/mdbid.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,eAAe,CAAC;AAMtC,wFAAwF;AACxF,MAAM,QAAQ,GAAG,SAA8C,CAAC;AAEhE;;;;GAIG;AACH,MAAM,UAAU,KAAK;IACjB,OAAO,QAAQ,EAAE,CAAC,WAAW,EAAE,CAAC;AACpC,CAAC"}
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/stdlib",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "type": "module",
5
5
  "description": "Standard library for Webiny — platform-agnostic, Node.js, and browser utilities",
6
6
  "license": "MIT",
@@ -22,6 +22,7 @@
22
22
  "types": "./index.d.ts",
23
23
  "dependencies": {
24
24
  "@webiny/di": "^1.0.1",
25
+ "bson-objectid": "^2.0.4",
25
26
  "dot-prop": "^10.1.0",
26
27
  "fast-glob": "^3.3.3",
27
28
  "pino": "^10.3.1",
@@ -31,8 +32,8 @@
31
32
  },
32
33
  "devDependencies": {
33
34
  "@changesets/cli": "^2.31.0",
34
- "@types/node": ">=24",
35
- "@typescript/native-preview": "^7.0.0-dev.20260603.1",
35
+ "@types/node": "^25.9.1",
36
+ "@typescript/native-preview": "^7.0.0-dev.20260605.1",
36
37
  "@vitest/coverage-v8": "^4.1.8",
37
38
  "adio": "^3.0.1",
38
39
  "happy-dom": "^20.10.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/stdlib",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "type": "module",
5
5
  "description": "Standard library for Webiny — platform-agnostic, Node.js, and browser utilities",
6
6
  "license": "MIT",
@@ -25,6 +25,7 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "@webiny/di": "^1.0.1",
28
+ "bson-objectid": "^2.0.4",
28
29
  "dot-prop": "^10.1.0",
29
30
  "fast-glob": "^3.3.3",
30
31
  "pino": "^10.3.1",
@@ -34,8 +35,8 @@
34
35
  },
35
36
  "devDependencies": {
36
37
  "@changesets/cli": "^2.31.0",
37
- "@types/node": ">=24",
38
- "@typescript/native-preview": "^7.0.0-dev.20260603.1",
38
+ "@types/node": "^25.9.1",
39
+ "@typescript/native-preview": "^7.0.0-dev.20260605.1",
39
40
  "@vitest/coverage-v8": "^4.1.8",
40
41
  "adio": "^3.0.1",
41
42
  "happy-dom": "^20.10.1",