@naturalcycles/nodejs-lib 15.75.0 → 15.76.0

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,6 +1,11 @@
1
1
  import type { Set2 } from '@naturalcycles/js-lib/object';
2
2
  import { type AnyObject, type BaseDBEntity, type IANATimezone, type Inclusiveness, type IsoDate, type IsoDateTime, type IsoMonth, type NumberEnum, type StringEnum, type StringMap, type UnixTimestamp, type UnixTimestampMillis } from '@naturalcycles/js-lib/types';
3
3
  export declare const j: {
4
+ /**
5
+ * Matches literally any value - equivalent to TypeScript's `any` type.
6
+ * Use sparingly, as it bypasses type validation entirely.
7
+ */
8
+ any(): JsonSchemaAnyBuilder<any, any, false>;
4
9
  string(): JsonSchemaStringBuilder<string, string, false>;
5
10
  number(): JsonSchemaNumberBuilder<number, number, false>;
6
11
  boolean(): JsonSchemaBooleanBuilder<boolean, boolean, false>;
@@ -9,6 +9,13 @@ import { BASE64URL_REGEX, COUNTRY_CODE_REGEX, CURRENCY_REGEX, IPV4_REGEX, IPV6_R
9
9
  import { TIMEZONES } from '../timezones.js';
10
10
  import { isEveryItemNumber, isEveryItemPrimitive, isEveryItemString, JSON_SCHEMA_ORDER, mergeJsonSchemaObjects, } from './jsonSchemaBuilder.util.js';
11
11
  export const j = {
12
+ /**
13
+ * Matches literally any value - equivalent to TypeScript's `any` type.
14
+ * Use sparingly, as it bypasses type validation entirely.
15
+ */
16
+ any() {
17
+ return new JsonSchemaAnyBuilder({});
18
+ },
12
19
  string() {
13
20
  return new JsonSchemaStringBuilder();
14
21
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@naturalcycles/nodejs-lib",
3
3
  "type": "module",
4
- "version": "15.75.0",
4
+ "version": "15.76.0",
5
5
  "dependencies": {
6
6
  "@naturalcycles/js-lib": "^15",
7
7
  "@types/js-yaml": "^4",
@@ -49,6 +49,14 @@ import {
49
49
  } from './jsonSchemaBuilder.util.js'
50
50
 
51
51
  export const j = {
52
+ /**
53
+ * Matches literally any value - equivalent to TypeScript's `any` type.
54
+ * Use sparingly, as it bypasses type validation entirely.
55
+ */
56
+ any(): JsonSchemaAnyBuilder<any, any, false> {
57
+ return new JsonSchemaAnyBuilder({})
58
+ },
59
+
52
60
  string(): JsonSchemaStringBuilder<string, string, false> {
53
61
  return new JsonSchemaStringBuilder()
54
62
  },