@js-utils-kit/types 1.3.0 → 1.4.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.
package/dist/index.d.cts CHANGED
@@ -163,6 +163,143 @@ type HttpStatusCode = 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205
163
163
  */
164
164
  type MinuteOrSecond = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59;
165
165
  //#endregion
166
+ //#region src/utils/DeepPartial.d.ts
167
+ type DeepPartial<T> = T extends ((...args: unknown[]) => unknown) ? T : T extends readonly (infer U)[] ? readonly DeepPartial<U>[] : T extends object ? { [P in keyof T]?: DeepPartial<T[P]> } : T;
168
+ //#endregion
169
+ //#region src/PackageJson.d.ts
170
+ type Person = string | {
171
+ name: string;
172
+ email: string;
173
+ url: string;
174
+ };
175
+ type Repository = string | {
176
+ type: string;
177
+ url: string;
178
+ directory: string;
179
+ };
180
+ type Bugs = string | {
181
+ url: string;
182
+ email: string;
183
+ };
184
+ type FundingItem = string | {
185
+ url: string;
186
+ type: string;
187
+ };
188
+ type Funding = FundingItem | FundingItem[];
189
+ type LicenseItem = {
190
+ type: string;
191
+ url: string;
192
+ };
193
+ type DevEngineItem = {
194
+ name: string;
195
+ version: string;
196
+ onFail: 'ignore' | 'warn' | 'error' | 'download';
197
+ };
198
+ type DevEngineField = DevEngineItem | DevEngineItem[];
199
+ type DevEngines = {
200
+ os: DevEngineField;
201
+ cpu: DevEngineField;
202
+ libc: DevEngineField;
203
+ runtime: DevEngineField;
204
+ packageManager: DevEngineField;
205
+ };
206
+ type PackageJson = DeepPartial<{
207
+ name: string;
208
+ displayName: string;
209
+ version: string;
210
+ description: string;
211
+ keywords: string[];
212
+ private: boolean | 'true' | 'false';
213
+ homepage: string;
214
+ repository: Repository;
215
+ bugs: Bugs;
216
+ license: string;
217
+ licenses: LicenseItem[];
218
+ author: Person;
219
+ contributors: Person[];
220
+ maintainers: Person[];
221
+ funding: Funding;
222
+ files: string[];
223
+ main: string;
224
+ module: string;
225
+ types: string;
226
+ typings: string;
227
+ exports: unknown;
228
+ imports: Record<string, unknown>;
229
+ bin: string | Record<string, string>;
230
+ man: string | string[];
231
+ type: 'commonjs' | 'module';
232
+ directories: {
233
+ bin: string;
234
+ doc: string;
235
+ example: string;
236
+ lib: string;
237
+ man: string;
238
+ test: string;
239
+ };
240
+ scripts: Record<string, string>;
241
+ config: Record<string, unknown>;
242
+ dependencies: Record<string, string>;
243
+ devDependencies: Record<string, string>;
244
+ optionalDependencies: Record<string, string>;
245
+ peerDependencies: Record<string, string>;
246
+ peerDependenciesMeta: Record<string, {
247
+ optional: boolean;
248
+ }>;
249
+ bundleDependencies: boolean | string[];
250
+ bundledDependencies: boolean | string[];
251
+ engines: Record<string, string>;
252
+ engineStrict: boolean;
253
+ os: string[];
254
+ cpu: string[];
255
+ devEngines: DevEngines;
256
+ preferGlobal: boolean;
257
+ publishConfig: {
258
+ access: 'public' | 'restricted';
259
+ tag: string;
260
+ registry: string;
261
+ provenance: boolean;
262
+ };
263
+ dist: {
264
+ shasum: string;
265
+ tarball: string;
266
+ };
267
+ readme: string;
268
+ esnext: string | {
269
+ main: string;
270
+ browser: string;
271
+ };
272
+ workspaces: string[] | {
273
+ packages: string[];
274
+ nohoist: string[];
275
+ };
276
+ resolutions: Record<string, unknown>;
277
+ overrides: Record<string, unknown>;
278
+ packageManager: string;
279
+ typesVersions: Record<string, Record<string, string[]>>;
280
+ volta: {
281
+ extends: string;
282
+ node: string;
283
+ npm: string;
284
+ pnpm: string;
285
+ yarn: string;
286
+ };
287
+ pnpm: Record<string, unknown>;
288
+ eslintConfig: Record<string, unknown>;
289
+ prettier: Record<string, unknown>;
290
+ stylelint: Record<string, unknown>;
291
+ ava: Record<string, unknown>;
292
+ release: Record<string, unknown>;
293
+ jscpd: Record<string, unknown>;
294
+ stackblitz: {
295
+ installDependencies: boolean;
296
+ startCommand: string | boolean;
297
+ compileTrigger: 'auto' | 'keystroke' | 'save';
298
+ env: Record<string, string>;
299
+ };
300
+ [key: string]: unknown;
301
+ }>;
302
+ //#endregion
166
303
  //#region src/Trim.d.ts
167
304
  /**
168
305
  * Trims whitespace from a string with methods for leading and trailing and normalizing whitespace.
@@ -198,4 +335,4 @@ interface Trim {
198
335
  normalizeWhitespace(str: string): string;
199
336
  }
200
337
  //#endregion
201
- export { ArchiveFormat, ArchiverOptions, CommitTypeMeta, CreateArchiveOptions, Environment, Falsy, Hour, HttpStatusCode, MinuteOrSecond, Trim };
338
+ export { ArchiveFormat, ArchiverOptions, CommitTypeMeta, CreateArchiveOptions, Environment, Falsy, Hour, HttpStatusCode, MinuteOrSecond, PackageJson, Trim };
package/dist/index.d.mts CHANGED
@@ -163,6 +163,143 @@ type HttpStatusCode = 100 | 101 | 102 | 103 | 200 | 201 | 202 | 203 | 204 | 205
163
163
  */
164
164
  type MinuteOrSecond = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59;
165
165
  //#endregion
166
+ //#region src/utils/DeepPartial.d.ts
167
+ type DeepPartial<T> = T extends ((...args: unknown[]) => unknown) ? T : T extends readonly (infer U)[] ? readonly DeepPartial<U>[] : T extends object ? { [P in keyof T]?: DeepPartial<T[P]> } : T;
168
+ //#endregion
169
+ //#region src/PackageJson.d.ts
170
+ type Person = string | {
171
+ name: string;
172
+ email: string;
173
+ url: string;
174
+ };
175
+ type Repository = string | {
176
+ type: string;
177
+ url: string;
178
+ directory: string;
179
+ };
180
+ type Bugs = string | {
181
+ url: string;
182
+ email: string;
183
+ };
184
+ type FundingItem = string | {
185
+ url: string;
186
+ type: string;
187
+ };
188
+ type Funding = FundingItem | FundingItem[];
189
+ type LicenseItem = {
190
+ type: string;
191
+ url: string;
192
+ };
193
+ type DevEngineItem = {
194
+ name: string;
195
+ version: string;
196
+ onFail: 'ignore' | 'warn' | 'error' | 'download';
197
+ };
198
+ type DevEngineField = DevEngineItem | DevEngineItem[];
199
+ type DevEngines = {
200
+ os: DevEngineField;
201
+ cpu: DevEngineField;
202
+ libc: DevEngineField;
203
+ runtime: DevEngineField;
204
+ packageManager: DevEngineField;
205
+ };
206
+ type PackageJson = DeepPartial<{
207
+ name: string;
208
+ displayName: string;
209
+ version: string;
210
+ description: string;
211
+ keywords: string[];
212
+ private: boolean | 'true' | 'false';
213
+ homepage: string;
214
+ repository: Repository;
215
+ bugs: Bugs;
216
+ license: string;
217
+ licenses: LicenseItem[];
218
+ author: Person;
219
+ contributors: Person[];
220
+ maintainers: Person[];
221
+ funding: Funding;
222
+ files: string[];
223
+ main: string;
224
+ module: string;
225
+ types: string;
226
+ typings: string;
227
+ exports: unknown;
228
+ imports: Record<string, unknown>;
229
+ bin: string | Record<string, string>;
230
+ man: string | string[];
231
+ type: 'commonjs' | 'module';
232
+ directories: {
233
+ bin: string;
234
+ doc: string;
235
+ example: string;
236
+ lib: string;
237
+ man: string;
238
+ test: string;
239
+ };
240
+ scripts: Record<string, string>;
241
+ config: Record<string, unknown>;
242
+ dependencies: Record<string, string>;
243
+ devDependencies: Record<string, string>;
244
+ optionalDependencies: Record<string, string>;
245
+ peerDependencies: Record<string, string>;
246
+ peerDependenciesMeta: Record<string, {
247
+ optional: boolean;
248
+ }>;
249
+ bundleDependencies: boolean | string[];
250
+ bundledDependencies: boolean | string[];
251
+ engines: Record<string, string>;
252
+ engineStrict: boolean;
253
+ os: string[];
254
+ cpu: string[];
255
+ devEngines: DevEngines;
256
+ preferGlobal: boolean;
257
+ publishConfig: {
258
+ access: 'public' | 'restricted';
259
+ tag: string;
260
+ registry: string;
261
+ provenance: boolean;
262
+ };
263
+ dist: {
264
+ shasum: string;
265
+ tarball: string;
266
+ };
267
+ readme: string;
268
+ esnext: string | {
269
+ main: string;
270
+ browser: string;
271
+ };
272
+ workspaces: string[] | {
273
+ packages: string[];
274
+ nohoist: string[];
275
+ };
276
+ resolutions: Record<string, unknown>;
277
+ overrides: Record<string, unknown>;
278
+ packageManager: string;
279
+ typesVersions: Record<string, Record<string, string[]>>;
280
+ volta: {
281
+ extends: string;
282
+ node: string;
283
+ npm: string;
284
+ pnpm: string;
285
+ yarn: string;
286
+ };
287
+ pnpm: Record<string, unknown>;
288
+ eslintConfig: Record<string, unknown>;
289
+ prettier: Record<string, unknown>;
290
+ stylelint: Record<string, unknown>;
291
+ ava: Record<string, unknown>;
292
+ release: Record<string, unknown>;
293
+ jscpd: Record<string, unknown>;
294
+ stackblitz: {
295
+ installDependencies: boolean;
296
+ startCommand: string | boolean;
297
+ compileTrigger: 'auto' | 'keystroke' | 'save';
298
+ env: Record<string, string>;
299
+ };
300
+ [key: string]: unknown;
301
+ }>;
302
+ //#endregion
166
303
  //#region src/Trim.d.ts
167
304
  /**
168
305
  * Trims whitespace from a string with methods for leading and trailing and normalizing whitespace.
@@ -198,4 +335,4 @@ interface Trim {
198
335
  normalizeWhitespace(str: string): string;
199
336
  }
200
337
  //#endregion
201
- export { ArchiveFormat, ArchiverOptions, CommitTypeMeta, CreateArchiveOptions, Environment, Falsy, Hour, HttpStatusCode, MinuteOrSecond, Trim };
338
+ export { ArchiveFormat, ArchiverOptions, CommitTypeMeta, CreateArchiveOptions, Environment, Falsy, Hour, HttpStatusCode, MinuteOrSecond, PackageJson, Trim };