struct-fakerator 2.1.2 → 2.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "struct-fakerator",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -13,6 +13,7 @@
13
13
  },
14
14
  "scripts": {
15
15
  "build": "tsup src/index.ts --format cjs,esm --dts",
16
+ "publish": "pnpm build && pnpm publish --access public",
16
17
  "test": "vitest src"
17
18
  },
18
19
  "keywords": [],
@@ -72,7 +72,7 @@ export const createSelectionGenerator = <T extends SelectionConfig<unknown>>(
72
72
  const _createObjectGenerator = <T extends ObjectConfig<unknown>>(
73
73
  config: T,
74
74
  path: string,
75
- customTypeMatch?: (config: unknown, path?: string) => ValueConfig<unknown>,
75
+ customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>,
76
76
  ): (() => Result<T>) => {
77
77
  try {
78
78
  objConfigScheme.parse(config);
@@ -104,7 +104,7 @@ export const createObjectGenerator = <T extends ObjectConfig<unknown>>(
104
104
  const _createArrayGenerator = <T extends ArrayConfig<unknown>>(
105
105
  config: T,
106
106
  path: string,
107
- customTypeMatch?: (config: unknown, path?: string) => ValueConfig<unknown>,
107
+ customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>,
108
108
  ): (() => Result<T>) => {
109
109
  try {
110
110
  arrayConfigScheme.parse(config);
@@ -165,7 +165,7 @@ export const createTupleGenerator = <
165
165
  | TupleConfig<unknown>,
166
166
  >(
167
167
  config: T,
168
- customTypeMatch?: (config: unknown, path?: string) => ValueConfig<unknown>,
168
+ customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>,
169
169
  ): (() => Result<T>) => _createTupleGenerator(config, "*", customTypeMatch);
170
170
 
171
171
  // =================== generator fn ====================
@@ -204,7 +204,7 @@ export const createBoundedSeriesGenerator = <T extends BoundedSeriesConfig>(
204
204
  const _createGeneratorByType = <T extends AllConfig<unknown>>(
205
205
  config: T,
206
206
  path: string,
207
- customTypeMatch?: (config: unknown, path?: string) => ValueConfig<unknown>,
207
+ customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>,
208
208
  ): (() => Result<T>) => {
209
209
  switch (config.type) {
210
210
  case "obj":
@@ -242,5 +242,5 @@ const _createGeneratorByType = <T extends AllConfig<unknown>>(
242
242
 
243
243
  export const createGeneratorByType = <T extends AllConfig<unknown>>(
244
244
  config: T,
245
- customTypeMatch?: (config: unknown, path?: string) => ValueConfig<unknown>,
245
+ customTypeMatch?: (config: unknown, path: string) => ValueConfig<unknown>,
246
246
  ): (() => Result<T>) => _createGeneratorByType(config, "*", customTypeMatch);