@shopify/cli-kit 0.33.7 → 1.0.4
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/CHANGELOG.md +24 -0
- package/dist/{index-b4099f4f.js → index-75d3c335.js} +18366 -7408
- package/dist/index-75d3c335.js.map +1 -0
- package/dist/index.d.ts +2296 -551
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/{multipart-parser-3a1f9182.js → multipart-parser-440fedf2.js} +4 -3
- package/dist/multipart-parser-440fedf2.js.map +1 -0
- package/package.json +10 -8
- package/dist/index-b4099f4f.js.map +0 -1
- package/dist/multipart-parser-3a1f9182.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
import { Readable } from 'stream';
|
|
4
|
-
import {
|
|
4
|
+
import { ChildProcess } from 'node:child_process';
|
|
5
|
+
import { Readable as Readable$1, Writable } from 'node:stream';
|
|
5
6
|
import path$1 from 'path';
|
|
6
7
|
import * as fs from 'fs';
|
|
8
|
+
import { SpawnOptions } from 'child_process';
|
|
7
9
|
import { platform } from 'node:process';
|
|
8
10
|
import { RequestOptions } from 'http';
|
|
9
11
|
|
|
@@ -29,12 +31,12 @@ declare class Subscription implements SubscriptionLike {
|
|
|
29
31
|
closed: boolean;
|
|
30
32
|
private _parentage;
|
|
31
33
|
/**
|
|
32
|
-
* The list of registered
|
|
34
|
+
* The list of registered finalizers to execute upon unsubscription. Adding and removing from this
|
|
33
35
|
* list occurs in the {@link #add} and {@link #remove} methods.
|
|
34
36
|
*/
|
|
35
|
-
private
|
|
37
|
+
private _finalizers;
|
|
36
38
|
/**
|
|
37
|
-
* @param initialTeardown A function executed first as part of the
|
|
39
|
+
* @param initialTeardown A function executed first as part of the finalization
|
|
38
40
|
* process that is kicked off when {@link #unsubscribe} is called.
|
|
39
41
|
*/
|
|
40
42
|
constructor(initialTeardown?: (() => void) | undefined);
|
|
@@ -46,12 +48,12 @@ declare class Subscription implements SubscriptionLike {
|
|
|
46
48
|
*/
|
|
47
49
|
unsubscribe(): void;
|
|
48
50
|
/**
|
|
49
|
-
* Adds a
|
|
51
|
+
* Adds a finalizer to this subscription, so that finalization will be unsubscribed/called
|
|
50
52
|
* when this subscription is unsubscribed. If this subscription is already {@link #closed},
|
|
51
|
-
* because it has already been unsubscribed, then whatever
|
|
52
|
-
* will automatically be executed (unless the
|
|
53
|
+
* because it has already been unsubscribed, then whatever finalizer is passed to it
|
|
54
|
+
* will automatically be executed (unless the finalizer itself is also a closed subscription).
|
|
53
55
|
*
|
|
54
|
-
* Closed Subscriptions cannot be added as
|
|
56
|
+
* Closed Subscriptions cannot be added as finalizers to any subscription. Adding a closed
|
|
55
57
|
* subscription to a any subscription will result in no operation. (A noop).
|
|
56
58
|
*
|
|
57
59
|
* Adding a subscription to itself, or adding `null` or `undefined` will not perform any
|
|
@@ -61,7 +63,7 @@ declare class Subscription implements SubscriptionLike {
|
|
|
61
63
|
* if they are unsubscribed. Functions and {@link Unsubscribable} objects that you wish to remove
|
|
62
64
|
* will need to be removed manually with {@link #remove}
|
|
63
65
|
*
|
|
64
|
-
* @param teardown The
|
|
66
|
+
* @param teardown The finalization logic to add to this subscription.
|
|
65
67
|
*/
|
|
66
68
|
add(teardown: TeardownLogic): void;
|
|
67
69
|
/**
|
|
@@ -84,18 +86,18 @@ declare class Subscription implements SubscriptionLike {
|
|
|
84
86
|
*/
|
|
85
87
|
private _removeParent;
|
|
86
88
|
/**
|
|
87
|
-
* Removes a
|
|
89
|
+
* Removes a finalizer from this subscription that was previously added with the {@link #add} method.
|
|
88
90
|
*
|
|
89
91
|
* Note that `Subscription` instances, when unsubscribed, will automatically remove themselves
|
|
90
92
|
* from every other `Subscription` they have been added to. This means that using the `remove` method
|
|
91
93
|
* is not a common thing and should be used thoughtfully.
|
|
92
94
|
*
|
|
93
|
-
* If you add the same
|
|
95
|
+
* If you add the same finalizer instance of a function or an unsubscribable object to a `Subcription` instance
|
|
94
96
|
* more than once, you will need to call `remove` the same number of times to remove all instances.
|
|
95
97
|
*
|
|
96
|
-
* All
|
|
98
|
+
* All finalizer instances are removed to free up memory upon unsubscription.
|
|
97
99
|
*
|
|
98
|
-
* @param teardown The
|
|
100
|
+
* @param teardown The finalizer to remove from this subscription
|
|
99
101
|
*/
|
|
100
102
|
remove(teardown: Exclude<TeardownLogic, void>): void;
|
|
101
103
|
}
|
|
@@ -342,6 +344,7 @@ declare class Observable<T> implements Subscribable<T> {
|
|
|
342
344
|
*/
|
|
343
345
|
declare class Subject<T> extends Observable<T> implements SubscriptionLike {
|
|
344
346
|
closed: boolean;
|
|
347
|
+
private currentObservers;
|
|
345
348
|
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
|
|
346
349
|
observers: Observer<T>[];
|
|
347
350
|
/** @deprecated Internal implementation detail, do not use directly. Will be made internal in v8. */
|
|
@@ -1433,6 +1436,9 @@ declare class Fatal extends Error {
|
|
|
1433
1436
|
*/
|
|
1434
1437
|
declare class Abort extends Fatal {
|
|
1435
1438
|
}
|
|
1439
|
+
declare class AbortSilent extends Fatal {
|
|
1440
|
+
constructor();
|
|
1441
|
+
}
|
|
1436
1442
|
/**
|
|
1437
1443
|
* A bug error is an error that represents a bug and therefore should be reported.
|
|
1438
1444
|
*/
|
|
@@ -1449,6 +1455,8 @@ type error$1_Fatal = Fatal;
|
|
|
1449
1455
|
declare const error$1_Fatal: typeof Fatal;
|
|
1450
1456
|
type error$1_Abort = Abort;
|
|
1451
1457
|
declare const error$1_Abort: typeof Abort;
|
|
1458
|
+
type error$1_AbortSilent = AbortSilent;
|
|
1459
|
+
declare const error$1_AbortSilent: typeof AbortSilent;
|
|
1452
1460
|
type error$1_Bug = Bug;
|
|
1453
1461
|
declare const error$1_Bug: typeof Bug;
|
|
1454
1462
|
declare const error$1_handler: typeof handler;
|
|
@@ -1456,13 +1464,189 @@ declare namespace error$1 {
|
|
|
1456
1464
|
export {
|
|
1457
1465
|
error$1_Fatal as Fatal,
|
|
1458
1466
|
error$1_Abort as Abort,
|
|
1467
|
+
error$1_AbortSilent as AbortSilent,
|
|
1459
1468
|
error$1_Bug as Bug,
|
|
1460
1469
|
error$1_handler as handler,
|
|
1461
1470
|
};
|
|
1462
1471
|
}
|
|
1463
1472
|
|
|
1473
|
+
interface ExecaReturnBase<StdoutStderrType> {
|
|
1474
|
+
/**
|
|
1475
|
+
The file and arguments that were run, for logging purposes.
|
|
1476
|
+
|
|
1477
|
+
This is not escaped and should not be executed directly as a process, including using `execa()` or `execaCommand()`.
|
|
1478
|
+
*/
|
|
1479
|
+
command: string;
|
|
1480
|
+
|
|
1481
|
+
/**
|
|
1482
|
+
Same as `command` but escaped.
|
|
1483
|
+
|
|
1484
|
+
This is meant to be copy and pasted into a shell, for debugging purposes.
|
|
1485
|
+
Since the escaping is fairly basic, this should not be executed directly as a process, including using `execa()` or `execaCommand()`.
|
|
1486
|
+
*/
|
|
1487
|
+
escapedCommand: string;
|
|
1488
|
+
|
|
1489
|
+
/**
|
|
1490
|
+
The numeric exit code of the process that was run.
|
|
1491
|
+
*/
|
|
1492
|
+
exitCode: number;
|
|
1493
|
+
|
|
1494
|
+
/**
|
|
1495
|
+
The output of the process on stdout.
|
|
1496
|
+
*/
|
|
1497
|
+
stdout: StdoutStderrType;
|
|
1498
|
+
|
|
1499
|
+
/**
|
|
1500
|
+
The output of the process on stderr.
|
|
1501
|
+
*/
|
|
1502
|
+
stderr: StdoutStderrType;
|
|
1503
|
+
|
|
1504
|
+
/**
|
|
1505
|
+
Whether the process failed to run.
|
|
1506
|
+
*/
|
|
1507
|
+
failed: boolean;
|
|
1508
|
+
|
|
1509
|
+
/**
|
|
1510
|
+
Whether the process timed out.
|
|
1511
|
+
*/
|
|
1512
|
+
timedOut: boolean;
|
|
1513
|
+
|
|
1514
|
+
/**
|
|
1515
|
+
Whether the process was killed.
|
|
1516
|
+
*/
|
|
1517
|
+
killed: boolean;
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
The name of the signal that was used to terminate the process. For example, `SIGFPE`.
|
|
1521
|
+
|
|
1522
|
+
If a signal terminated the process, this property is defined and included in the error message. Otherwise it is `undefined`.
|
|
1523
|
+
*/
|
|
1524
|
+
signal?: string;
|
|
1525
|
+
|
|
1526
|
+
/**
|
|
1527
|
+
A human-friendly description of the signal that was used to terminate the process. For example, `Floating point arithmetic error`.
|
|
1528
|
+
|
|
1529
|
+
If a signal terminated the process, this property is defined and included in the error message. Otherwise it is `undefined`. It is also `undefined` when the signal is very uncommon which should seldomly happen.
|
|
1530
|
+
*/
|
|
1531
|
+
signalDescription?: string;
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
interface ExecaSyncReturnValue<StdoutErrorType = string>
|
|
1535
|
+
extends ExecaReturnBase<StdoutErrorType> {
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
/**
|
|
1539
|
+
Result of a child process execution. On success this is a plain object. On failure this is also an `Error` instance.
|
|
1540
|
+
|
|
1541
|
+
The child process fails when:
|
|
1542
|
+
- its exit code is not `0`
|
|
1543
|
+
- it was killed with a signal
|
|
1544
|
+
- timing out
|
|
1545
|
+
- being canceled
|
|
1546
|
+
- there's not enough memory or there are already too many child processes
|
|
1547
|
+
*/
|
|
1548
|
+
interface ExecaReturnValue<StdoutErrorType = string>
|
|
1549
|
+
extends ExecaSyncReturnValue<StdoutErrorType> {
|
|
1550
|
+
/**
|
|
1551
|
+
The output of the process with `stdout` and `stderr` interleaved.
|
|
1552
|
+
|
|
1553
|
+
This is `undefined` if either:
|
|
1554
|
+
- the `all` option is `false` (default value)
|
|
1555
|
+
- `execaSync()` was used
|
|
1556
|
+
*/
|
|
1557
|
+
all?: StdoutErrorType;
|
|
1558
|
+
|
|
1559
|
+
/**
|
|
1560
|
+
Whether the process was canceled.
|
|
1561
|
+
|
|
1562
|
+
You can cancel the spawned process using the [`signal`](https://github.com/sindresorhus/execa#signal-1) option.
|
|
1563
|
+
*/
|
|
1564
|
+
isCanceled: boolean;
|
|
1565
|
+
}
|
|
1566
|
+
|
|
1567
|
+
interface ExecaSyncError<StdoutErrorType = string>
|
|
1568
|
+
extends Error,
|
|
1569
|
+
ExecaReturnBase<StdoutErrorType> {
|
|
1570
|
+
/**
|
|
1571
|
+
Error message when the child process failed to run. In addition to the underlying error message, it also contains some information related to why the child process errored.
|
|
1572
|
+
|
|
1573
|
+
The child process stderr then stdout are appended to the end, separated with newlines and not interleaved.
|
|
1574
|
+
*/
|
|
1575
|
+
message: string;
|
|
1576
|
+
|
|
1577
|
+
/**
|
|
1578
|
+
This is the same as the `message` property except it does not include the child process stdout/stderr.
|
|
1579
|
+
*/
|
|
1580
|
+
shortMessage: string;
|
|
1581
|
+
|
|
1582
|
+
/**
|
|
1583
|
+
Original error message. This is the same as the `message` property except it includes neither the child process stdout/stderr nor some additional information added by Execa.
|
|
1584
|
+
|
|
1585
|
+
This is `undefined` unless the child process exited due to an `error` event or a timeout.
|
|
1586
|
+
*/
|
|
1587
|
+
originalMessage?: string;
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
interface ExecaError<StdoutErrorType = string>
|
|
1591
|
+
extends ExecaSyncError<StdoutErrorType> {
|
|
1592
|
+
/**
|
|
1593
|
+
The output of the process with `stdout` and `stderr` interleaved.
|
|
1594
|
+
|
|
1595
|
+
This is `undefined` if either:
|
|
1596
|
+
- the `all` option is `false` (default value)
|
|
1597
|
+
- `execaSync()` was used
|
|
1598
|
+
*/
|
|
1599
|
+
all?: StdoutErrorType;
|
|
1600
|
+
|
|
1601
|
+
/**
|
|
1602
|
+
Whether the process was canceled.
|
|
1603
|
+
*/
|
|
1604
|
+
isCanceled: boolean;
|
|
1605
|
+
}
|
|
1606
|
+
|
|
1607
|
+
interface KillOptions {
|
|
1608
|
+
/**
|
|
1609
|
+
Milliseconds to wait for the child process to terminate before sending `SIGKILL`.
|
|
1610
|
+
|
|
1611
|
+
Can be disabled with `false`.
|
|
1612
|
+
|
|
1613
|
+
@default 5000
|
|
1614
|
+
*/
|
|
1615
|
+
forceKillAfterTimeout?: number | false;
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
interface ExecaChildPromise<StdoutErrorType> {
|
|
1619
|
+
/**
|
|
1620
|
+
Stream combining/interleaving [`stdout`](https://nodejs.org/api/child_process.html#child_process_subprocess_stdout) and [`stderr`](https://nodejs.org/api/child_process.html#child_process_subprocess_stderr).
|
|
1621
|
+
|
|
1622
|
+
This is `undefined` if either:
|
|
1623
|
+
- the `all` option is `false` (the default value)
|
|
1624
|
+
- both `stdout` and `stderr` options are set to [`'inherit'`, `'ipc'`, `Stream` or `integer`](https://nodejs.org/dist/latest-v6.x/docs/api/child_process.html#child_process_options_stdio)
|
|
1625
|
+
*/
|
|
1626
|
+
all?: Readable$1;
|
|
1627
|
+
|
|
1628
|
+
catch<ResultType = never>(
|
|
1629
|
+
onRejected?: (reason: ExecaError<StdoutErrorType>) => ResultType | PromiseLike<ResultType>
|
|
1630
|
+
): Promise<ExecaReturnValue<StdoutErrorType> | ResultType>;
|
|
1631
|
+
|
|
1632
|
+
/**
|
|
1633
|
+
Same as the original [`child_process#kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal), except if `signal` is `SIGTERM` (the default value) and the child process is not terminated after 5 seconds, force it by sending `SIGKILL`.
|
|
1634
|
+
*/
|
|
1635
|
+
kill(signal?: string, options?: KillOptions): void;
|
|
1636
|
+
|
|
1637
|
+
/**
|
|
1638
|
+
Similar to [`childProcess.kill()`](https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal). This is preferred when cancelling the child process execution as the error is more descriptive and [`childProcessResult.isCanceled`](#iscanceled) is set to `true`.
|
|
1639
|
+
*/
|
|
1640
|
+
cancel(): void;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
type ExecaChildProcess<StdoutErrorType = string> = ChildProcess &
|
|
1644
|
+
ExecaChildPromise<StdoutErrorType> &
|
|
1645
|
+
Promise<ExecaReturnValue<StdoutErrorType>>;
|
|
1646
|
+
|
|
1464
1647
|
interface ExecOptions {
|
|
1465
1648
|
cwd?: string;
|
|
1649
|
+
env?: any;
|
|
1466
1650
|
stdout?: Writable;
|
|
1467
1651
|
stderr?: Writable;
|
|
1468
1652
|
}
|
|
@@ -1474,7 +1658,7 @@ declare const open: (url: string) => Promise<void>;
|
|
|
1474
1658
|
* @returns A promise that resolves with the aggregatted stdout of the command.
|
|
1475
1659
|
*/
|
|
1476
1660
|
declare const captureOutput: (command: string, args: string[]) => Promise<string>;
|
|
1477
|
-
declare const exec: (command: string, args: string[], options?: ExecOptions | undefined) =>
|
|
1661
|
+
declare const exec: (command: string, args: string[], options?: ExecOptions | undefined) => ExecaChildProcess<string>;
|
|
1478
1662
|
|
|
1479
1663
|
type system_ExecOptions = ExecOptions;
|
|
1480
1664
|
declare const system_open: typeof open;
|
|
@@ -1489,7 +1673,7 @@ declare namespace system {
|
|
|
1489
1673
|
};
|
|
1490
1674
|
}
|
|
1491
1675
|
|
|
1492
|
-
declare function create(templateContent: string): (data: object) => Promise<string>;
|
|
1676
|
+
declare function create$1(templateContent: string): (data: object) => Promise<string>;
|
|
1493
1677
|
/**
|
|
1494
1678
|
* Given a directory, it traverses the files and directories recursively
|
|
1495
1679
|
* and replaces variables in directory and file names, and files' content
|
|
@@ -1501,27 +1685,26 @@ declare function create(templateContent: string): (data: object) => Promise<stri
|
|
|
1501
1685
|
*/
|
|
1502
1686
|
declare function recursiveDirectoryCopy(from: string, to: string, data: any): Promise<void>;
|
|
1503
1687
|
|
|
1504
|
-
declare const template_create: typeof create;
|
|
1505
1688
|
declare const template_recursiveDirectoryCopy: typeof recursiveDirectoryCopy;
|
|
1506
1689
|
declare namespace template {
|
|
1507
1690
|
export {
|
|
1508
|
-
|
|
1691
|
+
create$1 as create,
|
|
1509
1692
|
template_recursiveDirectoryCopy as recursiveDirectoryCopy,
|
|
1510
1693
|
};
|
|
1511
1694
|
}
|
|
1512
1695
|
|
|
1513
|
-
interface Options$
|
|
1696
|
+
interface Options$5 {
|
|
1514
1697
|
splitRegexp?: RegExp | RegExp[];
|
|
1515
1698
|
stripRegexp?: RegExp | RegExp[];
|
|
1516
1699
|
delimiter?: string;
|
|
1517
1700
|
transform?: (part: string, index: number, parts: string[]) => string;
|
|
1518
1701
|
}
|
|
1519
1702
|
|
|
1520
|
-
declare function camelCase(input: string, options?: Options$
|
|
1703
|
+
declare function camelCase(input: string, options?: Options$5): string;
|
|
1521
1704
|
|
|
1522
|
-
declare function paramCase(input: string, options?: Options$
|
|
1705
|
+
declare function paramCase(input: string, options?: Options$5): string;
|
|
1523
1706
|
|
|
1524
|
-
declare function snakeCase(input: string, options?: Options$
|
|
1707
|
+
declare function snakeCase(input: string, options?: Options$5): string;
|
|
1525
1708
|
|
|
1526
1709
|
/** Returns a random string */
|
|
1527
1710
|
declare function randomHex(size: number): string;
|
|
@@ -1557,7 +1740,7 @@ declare const format: typeof path$1.format;
|
|
|
1557
1740
|
declare const basename: typeof path$1.basename;
|
|
1558
1741
|
declare const parse: typeof path$1.parse;
|
|
1559
1742
|
|
|
1560
|
-
interface Options$
|
|
1743
|
+
interface Options$4 {
|
|
1561
1744
|
/**
|
|
1562
1745
|
The current working directory.
|
|
1563
1746
|
|
|
@@ -1590,7 +1773,7 @@ declare const findUpStop: unique symbol;
|
|
|
1590
1773
|
|
|
1591
1774
|
type Match = string | typeof findUpStop | undefined;
|
|
1592
1775
|
|
|
1593
|
-
interface Options$
|
|
1776
|
+
interface Options$3 extends Options$4 {
|
|
1594
1777
|
/**
|
|
1595
1778
|
The path to the directory to stop the search before reaching root if there were no matches before the `stopAt` directory.
|
|
1596
1779
|
|
|
@@ -1626,7 +1809,7 @@ console.log(await findUp(['rainbow.png', 'unicorn.png']));
|
|
|
1626
1809
|
//=> '/Users/sindresorhus/unicorn.png'
|
|
1627
1810
|
```
|
|
1628
1811
|
*/
|
|
1629
|
-
declare function findUp(name: string | readonly string[], options?: Options$
|
|
1812
|
+
declare function findUp(name: string | readonly string[], options?: Options$3): Promise<string | undefined>;
|
|
1630
1813
|
|
|
1631
1814
|
/**
|
|
1632
1815
|
Find a file or directory by walking up parent directories.
|
|
@@ -1646,7 +1829,7 @@ console.log(await findUp(async directory => {
|
|
|
1646
1829
|
//=> '/Users/sindresorhus'
|
|
1647
1830
|
```
|
|
1648
1831
|
*/
|
|
1649
|
-
declare function findUp(matcher: (directory: string) => (Match | Promise<Match>), options?: Options$
|
|
1832
|
+
declare function findUp(matcher: (directory: string) => (Match | Promise<Match>), options?: Options$3): Promise<string | undefined>;
|
|
1650
1833
|
|
|
1651
1834
|
declare type ErrnoException$1 = NodeJS.ErrnoException;
|
|
1652
1835
|
|
|
@@ -1701,7 +1884,7 @@ declare type Entry = Entry$1;
|
|
|
1701
1884
|
declare type Pattern = string;
|
|
1702
1885
|
declare type FileSystemAdapter = FileSystemAdapter$1;
|
|
1703
1886
|
|
|
1704
|
-
declare type Options$
|
|
1887
|
+
declare type Options$2 = {
|
|
1705
1888
|
/**
|
|
1706
1889
|
* Return the absolute path for entries.
|
|
1707
1890
|
*
|
|
@@ -1837,159 +2020,1567 @@ declare type Options$1 = {
|
|
|
1837
2020
|
unique?: boolean;
|
|
1838
2021
|
};
|
|
1839
2022
|
|
|
1840
|
-
declare type Task = {
|
|
1841
|
-
base: string;
|
|
1842
|
-
dynamic: boolean;
|
|
1843
|
-
patterns: Pattern[];
|
|
1844
|
-
positive: Pattern[];
|
|
1845
|
-
negative: Pattern[];
|
|
1846
|
-
};
|
|
2023
|
+
declare type Task = {
|
|
2024
|
+
base: string;
|
|
2025
|
+
dynamic: boolean;
|
|
2026
|
+
patterns: Pattern[];
|
|
2027
|
+
positive: Pattern[];
|
|
2028
|
+
negative: Pattern[];
|
|
2029
|
+
};
|
|
2030
|
+
|
|
2031
|
+
declare type EntryObjectModePredicate = {
|
|
2032
|
+
[TKey in keyof Pick<Options$2, 'objectMode'>]-?: true;
|
|
2033
|
+
};
|
|
2034
|
+
declare type EntryStatsPredicate = {
|
|
2035
|
+
[TKey in keyof Pick<Options$2, 'stats'>]-?: true;
|
|
2036
|
+
};
|
|
2037
|
+
declare type EntryObjectPredicate = EntryObjectModePredicate | EntryStatsPredicate;
|
|
2038
|
+
declare function FastGlob(source: Pattern | Pattern[], options: Options$2 & EntryObjectPredicate): Promise<Entry[]>;
|
|
2039
|
+
declare function FastGlob(source: Pattern | Pattern[], options?: Options$2): Promise<string[]>;
|
|
2040
|
+
declare namespace FastGlob {
|
|
2041
|
+
type Options = Options$2;
|
|
2042
|
+
type Entry = Entry;
|
|
2043
|
+
type Task = Task;
|
|
2044
|
+
type Pattern = Pattern;
|
|
2045
|
+
type FileSystemAdapter = FileSystemAdapter;
|
|
2046
|
+
function sync(source: Pattern | Pattern[], options: Options$2 & EntryObjectPredicate): Entry[];
|
|
2047
|
+
function sync(source: Pattern | Pattern[], options?: Options$2): string[];
|
|
2048
|
+
function stream(source: Pattern | Pattern[], options?: Options$2): NodeJS.ReadableStream;
|
|
2049
|
+
function generateTasks(source: Pattern | Pattern[], options?: Options$2): Task[];
|
|
2050
|
+
function isDynamicPattern(source: Pattern, options?: Options$2): boolean;
|
|
2051
|
+
function escapePath(source: Pattern): Pattern;
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
declare const path_findUp: typeof findUp;
|
|
2055
|
+
declare const path_basename: typeof basename;
|
|
2056
|
+
declare const path_delimiter: typeof delimiter;
|
|
2057
|
+
declare const path_dirname: typeof dirname;
|
|
2058
|
+
declare const path_extname: typeof extname;
|
|
2059
|
+
declare const path_format: typeof format;
|
|
2060
|
+
declare const path_isAbsolute: typeof isAbsolute;
|
|
2061
|
+
declare const path_join: typeof join;
|
|
2062
|
+
declare const path_normalize: typeof normalize;
|
|
2063
|
+
declare const path_normalizeString: typeof normalizeString;
|
|
2064
|
+
declare const path_parse: typeof parse;
|
|
2065
|
+
declare const path_relative: typeof relative;
|
|
2066
|
+
declare const path_resolve: typeof resolve;
|
|
2067
|
+
declare const path_sep: typeof sep;
|
|
2068
|
+
declare const path_toNamespacedPath: typeof toNamespacedPath;
|
|
2069
|
+
declare namespace path {
|
|
2070
|
+
export {
|
|
2071
|
+
path_findUp as findUp,
|
|
2072
|
+
FastGlob as glob,
|
|
2073
|
+
path_basename as basename,
|
|
2074
|
+
path_delimiter as delimiter,
|
|
2075
|
+
path_dirname as dirname,
|
|
2076
|
+
path_extname as extname,
|
|
2077
|
+
path_format as format,
|
|
2078
|
+
path_isAbsolute as isAbsolute,
|
|
2079
|
+
path_join as join,
|
|
2080
|
+
path_normalize as normalize,
|
|
2081
|
+
path_normalizeString as normalizeString,
|
|
2082
|
+
path_parse as parse,
|
|
2083
|
+
path_relative as relative,
|
|
2084
|
+
path_resolve as resolve,
|
|
2085
|
+
path_sep as sep,
|
|
2086
|
+
path_toNamespacedPath as toNamespacedPath,
|
|
2087
|
+
};
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
/**
|
|
2091
|
+
* Creates a temporary directory and ties its lifecycle ot the lifecycle of the callback.
|
|
2092
|
+
* @param callback - The callback that receives the temporary directory.
|
|
2093
|
+
*/
|
|
2094
|
+
declare function inTemporaryDirectory<T>(callback: (tmpDir: string) => T | Promise<T>): Promise<T>;
|
|
2095
|
+
/**
|
|
2096
|
+
* It reads a file and returns its content as a string using the
|
|
2097
|
+
* utf-8 encoding
|
|
2098
|
+
* @param path {string} Path to the file to read.
|
|
2099
|
+
* @returns {Promise<string>} A promise that resolves with the content of the file.
|
|
2100
|
+
*/
|
|
2101
|
+
declare function read(path: string): Promise<string>;
|
|
2102
|
+
/**
|
|
2103
|
+
* Copies a file
|
|
2104
|
+
* @param from {string} Path to the directory or file to be copied.
|
|
2105
|
+
* @param to {string} Destination path.
|
|
2106
|
+
*/
|
|
2107
|
+
declare function copy(from: string, to: string): Promise<void>;
|
|
2108
|
+
declare function write(path: string, data: string): Promise<void>;
|
|
2109
|
+
declare function append(path: string, data: string): Promise<void>;
|
|
2110
|
+
declare function mkdir(path: string): Promise<void>;
|
|
2111
|
+
declare function remove(path: string): Promise<void>;
|
|
2112
|
+
declare function rmdir(path: string, { force }?: {
|
|
2113
|
+
force?: boolean;
|
|
2114
|
+
}): Promise<void>;
|
|
2115
|
+
declare function mkTmpDir(): Promise<string>;
|
|
2116
|
+
declare function isDirectory(path: string): Promise<boolean>;
|
|
2117
|
+
/**
|
|
2118
|
+
* Moves a file.
|
|
2119
|
+
* @param src {string} File to be moved.
|
|
2120
|
+
* @param dest {string} Path to be moved to.
|
|
2121
|
+
* @param options {object} Moving options.
|
|
2122
|
+
*/
|
|
2123
|
+
declare function move(src: string, dest: string, options?: {
|
|
2124
|
+
overwrite?: boolean;
|
|
2125
|
+
}): Promise<void>;
|
|
2126
|
+
/**
|
|
2127
|
+
* Changes the permissions of a directory or file.
|
|
2128
|
+
* @param path {string} Path to the file or directory whose permissions will be modified.
|
|
2129
|
+
* @param mode {string | numbers} Permissions to set to the file or directory.
|
|
2130
|
+
*/
|
|
2131
|
+
declare function chmod(path: string, mode: number | string): Promise<void>;
|
|
2132
|
+
/**
|
|
2133
|
+
* Checks if a file has executable permissions.
|
|
2134
|
+
* @param path {string} Path to the file whose permissions will be checked.
|
|
2135
|
+
*/
|
|
2136
|
+
declare function hasExecutablePermissions(path: string): Promise<boolean>;
|
|
2137
|
+
/**
|
|
2138
|
+
* Returns true if a file or directory exists
|
|
2139
|
+
* @param path {string} Path to the directory or file.
|
|
2140
|
+
* @returns {boolean} True if it exists.
|
|
2141
|
+
*/
|
|
2142
|
+
declare function exists(path: string): Promise<boolean>;
|
|
2143
|
+
|
|
2144
|
+
declare const file_inTemporaryDirectory: typeof inTemporaryDirectory;
|
|
2145
|
+
declare const file_read: typeof read;
|
|
2146
|
+
declare const file_copy: typeof copy;
|
|
2147
|
+
declare const file_write: typeof write;
|
|
2148
|
+
declare const file_append: typeof append;
|
|
2149
|
+
declare const file_mkdir: typeof mkdir;
|
|
2150
|
+
declare const file_remove: typeof remove;
|
|
2151
|
+
declare const file_rmdir: typeof rmdir;
|
|
2152
|
+
declare const file_mkTmpDir: typeof mkTmpDir;
|
|
2153
|
+
declare const file_isDirectory: typeof isDirectory;
|
|
2154
|
+
declare const file_move: typeof move;
|
|
2155
|
+
declare const file_chmod: typeof chmod;
|
|
2156
|
+
declare const file_hasExecutablePermissions: typeof hasExecutablePermissions;
|
|
2157
|
+
declare const file_exists: typeof exists;
|
|
2158
|
+
declare namespace file {
|
|
2159
|
+
export {
|
|
2160
|
+
file_inTemporaryDirectory as inTemporaryDirectory,
|
|
2161
|
+
file_read as read,
|
|
2162
|
+
file_copy as copy,
|
|
2163
|
+
file_write as write,
|
|
2164
|
+
file_append as append,
|
|
2165
|
+
file_mkdir as mkdir,
|
|
2166
|
+
file_remove as remove,
|
|
2167
|
+
file_rmdir as rmdir,
|
|
2168
|
+
file_mkTmpDir as mkTmpDir,
|
|
2169
|
+
file_isDirectory as isDirectory,
|
|
2170
|
+
file_move as move,
|
|
2171
|
+
file_chmod as chmod,
|
|
2172
|
+
file_hasExecutablePermissions as hasExecutablePermissions,
|
|
2173
|
+
file_exists as exists,
|
|
2174
|
+
};
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
declare const EMPTY_COMMANDS: [];
|
|
2178
|
+
declare type EmptyTask = {
|
|
2179
|
+
commands: typeof EMPTY_COMMANDS;
|
|
2180
|
+
format: 'empty';
|
|
2181
|
+
parser: EmptyTaskParser;
|
|
2182
|
+
onError?: undefined;
|
|
2183
|
+
};
|
|
2184
|
+
|
|
2185
|
+
declare type TaskResponseFormat = Buffer | string;
|
|
2186
|
+
interface TaskParser<INPUT extends TaskResponseFormat, RESPONSE> {
|
|
2187
|
+
(stdOut: INPUT, stdErr: INPUT): RESPONSE;
|
|
2188
|
+
}
|
|
2189
|
+
interface EmptyTaskParser {
|
|
2190
|
+
(executor: SimpleGitExecutor): void;
|
|
2191
|
+
}
|
|
2192
|
+
interface SimpleGitTaskConfiguration<RESPONSE, FORMAT, INPUT extends TaskResponseFormat> {
|
|
2193
|
+
commands: string[];
|
|
2194
|
+
format: FORMAT;
|
|
2195
|
+
parser: TaskParser<INPUT, RESPONSE>;
|
|
2196
|
+
onError?: (result: GitExecutorResult, error: Error, done: (result: Buffer | Buffer[]) => void, fail: (error: string | Error) => void) => void;
|
|
2197
|
+
}
|
|
2198
|
+
declare type StringTask<R> = SimpleGitTaskConfiguration<R, 'utf-8', string>;
|
|
2199
|
+
declare type BufferTask<R> = SimpleGitTaskConfiguration<R, 'buffer', Buffer>;
|
|
2200
|
+
declare type RunnableTask<R> = StringTask<R> | BufferTask<R>;
|
|
2201
|
+
declare type SimpleGitTask<R> = RunnableTask<R> | EmptyTask;
|
|
2202
|
+
|
|
2203
|
+
/**
|
|
2204
|
+
* The `GitError` is thrown when the underlying `git` process throws a
|
|
2205
|
+
* fatal exception (eg an `ENOENT` exception when attempting to use a
|
|
2206
|
+
* non-writable directory as the root for your repo), and acts as the
|
|
2207
|
+
* base class for more specific errors thrown by the parsing of the
|
|
2208
|
+
* git response or errors in the configuration of the task about to
|
|
2209
|
+
* be run.
|
|
2210
|
+
*
|
|
2211
|
+
* When an exception is thrown, pending tasks in the same instance will
|
|
2212
|
+
* not be executed. The recommended way to run a series of tasks that
|
|
2213
|
+
* can independently fail without needing to prevent future tasks from
|
|
2214
|
+
* running is to catch them individually:
|
|
2215
|
+
*
|
|
2216
|
+
* ```typescript
|
|
2217
|
+
import { gitP, SimpleGit, GitError, PullResult } from 'simple-git';
|
|
2218
|
+
|
|
2219
|
+
function catchTask (e: GitError) {
|
|
2220
|
+
return e.
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
const git = gitP(repoWorkingDir);
|
|
2224
|
+
const pulled: PullResult | GitError = await git.pull().catch(catchTask);
|
|
2225
|
+
const pushed: string | GitError = await git.pushTags().catch(catchTask);
|
|
2226
|
+
```
|
|
2227
|
+
*/
|
|
2228
|
+
declare class GitError extends Error {
|
|
2229
|
+
task?: EmptyTask | StringTask<any> | BufferTask<any> | undefined;
|
|
2230
|
+
constructor(task?: EmptyTask | StringTask<any> | BufferTask<any> | undefined, message?: string);
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
/**
|
|
2234
|
+
* The node-style callback to a task accepts either two arguments with the first as a null
|
|
2235
|
+
* and the second as the data, or just one argument which is an error.
|
|
2236
|
+
*/
|
|
2237
|
+
declare type SimpleGitTaskCallback<T = string, E extends GitError = GitError> = (err: E | null, data: T) => void;
|
|
2238
|
+
/**
|
|
2239
|
+
* The event data emitted to the progress handler whenever progress detail is received.
|
|
2240
|
+
*/
|
|
2241
|
+
interface SimpleGitProgressEvent {
|
|
2242
|
+
/** The underlying method called - push, pull etc */
|
|
2243
|
+
method: string;
|
|
2244
|
+
/** The type of progress being reported, note that any one task may emit many stages - for example `git clone` emits both `receiving` and `resolving` */
|
|
2245
|
+
stage: 'compressing' | 'counting' | 'receiving' | 'resolving' | 'unknown' | 'writing' | string;
|
|
2246
|
+
/** The percent progressed as a number 0 - 100 */
|
|
2247
|
+
progress: number;
|
|
2248
|
+
/** The number of items processed so far */
|
|
2249
|
+
processed: number;
|
|
2250
|
+
/** The total number of items to be processed */
|
|
2251
|
+
total: number;
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
/**
|
|
2255
|
+
* Most tasks accept custom options as an array of strings as well as the
|
|
2256
|
+
* options object. Unless the task is explicitly documented as such, the
|
|
2257
|
+
* tasks will not accept both formats at the same time, preferring whichever
|
|
2258
|
+
* appears last in the arguments.
|
|
2259
|
+
*/
|
|
2260
|
+
declare type TaskOptions<O extends Options$1 = Options$1> = string[] | O;
|
|
2261
|
+
/**
|
|
2262
|
+
* Options supplied in most tasks as an optional trailing object
|
|
2263
|
+
*/
|
|
2264
|
+
declare type OptionsValues = null | string | number;
|
|
2265
|
+
declare type Options$1 = Record<string, OptionsValues>;
|
|
2266
|
+
declare type OptionFlags<FLAGS extends string, VALUE = null> = Partial<Record<FLAGS, VALUE>>;
|
|
2267
|
+
/**
|
|
2268
|
+
* A function called by the executor immediately after creating a child
|
|
2269
|
+
* process. Allows the calling application to implement custom handling of
|
|
2270
|
+
* the incoming stream of data from the `git`.
|
|
2271
|
+
*/
|
|
2272
|
+
declare type outputHandler = (command: string, stdout: NodeJS.ReadableStream, stderr: NodeJS.ReadableStream, args: string[]) => void;
|
|
2273
|
+
/**
|
|
2274
|
+
* Environment variables to be passed into the child process.
|
|
2275
|
+
*/
|
|
2276
|
+
declare type GitExecutorEnv = NodeJS.ProcessEnv | undefined;
|
|
2277
|
+
/**
|
|
2278
|
+
* Public interface of the Executor
|
|
2279
|
+
*/
|
|
2280
|
+
interface SimpleGitExecutor {
|
|
2281
|
+
env: GitExecutorEnv;
|
|
2282
|
+
outputHandler?: outputHandler;
|
|
2283
|
+
binary: string;
|
|
2284
|
+
cwd: string;
|
|
2285
|
+
chain(): SimpleGitExecutor;
|
|
2286
|
+
push<R>(task: SimpleGitTask<R>): Promise<R>;
|
|
2287
|
+
}
|
|
2288
|
+
/**
|
|
2289
|
+
* The resulting output from running the git child process
|
|
2290
|
+
*/
|
|
2291
|
+
interface GitExecutorResult {
|
|
2292
|
+
stdOut: Buffer[];
|
|
2293
|
+
stdErr: Buffer[];
|
|
2294
|
+
exitCode: number;
|
|
2295
|
+
rejection: Maybe<Error>;
|
|
2296
|
+
}
|
|
2297
|
+
interface SimpleGitPluginConfig {
|
|
2298
|
+
/**
|
|
2299
|
+
* Configures the events that should be used to determine when the unederlying child process has
|
|
2300
|
+
* been terminated.
|
|
2301
|
+
*
|
|
2302
|
+
* Version 2 will default to use `onClose=true, onExit=50` to mean the `close` event will be
|
|
2303
|
+
* used to immediately treat the child process as closed and start using the data from `stdOut`
|
|
2304
|
+
* / `stdErr`, whereas the `exit` event will wait `50ms` before treating the child process
|
|
2305
|
+
* as closed.
|
|
2306
|
+
*
|
|
2307
|
+
* This will be changed in version 3 to use `onClose=true, onExit=false` so that only the
|
|
2308
|
+
* close event is used to determine the termination of the process.
|
|
2309
|
+
*/
|
|
2310
|
+
completion: {
|
|
2311
|
+
onClose?: boolean | number;
|
|
2312
|
+
onExit?: boolean | number;
|
|
2313
|
+
};
|
|
2314
|
+
/**
|
|
2315
|
+
* Configures the content of errors thrown by the `simple-git` instance for each task
|
|
2316
|
+
*/
|
|
2317
|
+
errors(error: Buffer | Error | undefined, result: Omit<GitExecutorResult, 'rejection'>): Buffer | Error | undefined;
|
|
2318
|
+
/**
|
|
2319
|
+
* Handler to be called with progress events emitted through the progress plugin
|
|
2320
|
+
*/
|
|
2321
|
+
progress(data: SimpleGitProgressEvent): void;
|
|
2322
|
+
/**
|
|
2323
|
+
* Configuration for the `timeoutPlugin`
|
|
2324
|
+
*/
|
|
2325
|
+
timeout: {
|
|
2326
|
+
/**
|
|
2327
|
+
* The number of milliseconds to wait after spawning the process / receiving
|
|
2328
|
+
* content on the stdOut/stdErr streams before forcibly closing the git process.
|
|
2329
|
+
*/
|
|
2330
|
+
block: number;
|
|
2331
|
+
};
|
|
2332
|
+
spawnOptions: Pick<SpawnOptions, 'uid' | 'gid'>;
|
|
2333
|
+
}
|
|
2334
|
+
/**
|
|
2335
|
+
* Optional configuration settings to be passed to the `simpleGit`
|
|
2336
|
+
* builder.
|
|
2337
|
+
*/
|
|
2338
|
+
interface SimpleGitOptions extends Partial<SimpleGitPluginConfig> {
|
|
2339
|
+
baseDir: string;
|
|
2340
|
+
binary: string;
|
|
2341
|
+
maxConcurrentProcesses: number;
|
|
2342
|
+
config: string[];
|
|
2343
|
+
}
|
|
2344
|
+
declare type Maybe<T> = T | undefined;
|
|
2345
|
+
|
|
2346
|
+
interface DefaultLogFields {
|
|
2347
|
+
hash: string;
|
|
2348
|
+
date: string;
|
|
2349
|
+
message: string;
|
|
2350
|
+
refs: string;
|
|
2351
|
+
body: string;
|
|
2352
|
+
author_name: string;
|
|
2353
|
+
author_email: string;
|
|
2354
|
+
}
|
|
2355
|
+
declare type LogOptions<T = DefaultLogFields> = {
|
|
2356
|
+
file?: string;
|
|
2357
|
+
format?: T;
|
|
2358
|
+
from?: string;
|
|
2359
|
+
mailMap?: boolean;
|
|
2360
|
+
maxCount?: number;
|
|
2361
|
+
multiLine?: boolean;
|
|
2362
|
+
splitter?: string;
|
|
2363
|
+
strictDate?: boolean;
|
|
2364
|
+
symmetric?: boolean;
|
|
2365
|
+
to?: string;
|
|
2366
|
+
};
|
|
2367
|
+
|
|
2368
|
+
interface BranchSummaryBranch {
|
|
2369
|
+
current: boolean;
|
|
2370
|
+
name: string;
|
|
2371
|
+
commit: string;
|
|
2372
|
+
label: string;
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2375
|
+
interface BranchSummary {
|
|
2376
|
+
detached: boolean;
|
|
2377
|
+
current: string;
|
|
2378
|
+
all: string[];
|
|
2379
|
+
branches: {
|
|
2380
|
+
[key: string]: BranchSummaryBranch;
|
|
2381
|
+
};
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
/**
|
|
2385
|
+
* Represents the successful deletion of a single branch
|
|
2386
|
+
*/
|
|
2387
|
+
interface BranchSingleDeleteSuccess {
|
|
2388
|
+
branch: string;
|
|
2389
|
+
hash: string;
|
|
2390
|
+
success: true;
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
/**
|
|
2394
|
+
* Represents the failure to delete a single branch
|
|
2395
|
+
*/
|
|
2396
|
+
interface BranchSingleDeleteFailure {
|
|
2397
|
+
branch: string;
|
|
2398
|
+
hash: null;
|
|
2399
|
+
success: false;
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
type BranchSingleDeleteResult = BranchSingleDeleteFailure | BranchSingleDeleteSuccess;
|
|
2403
|
+
|
|
2404
|
+
/**
|
|
2405
|
+
* Represents the status of having deleted a batch of branches
|
|
2406
|
+
*/
|
|
2407
|
+
interface BranchMultiDeleteResult {
|
|
2408
|
+
/**
|
|
2409
|
+
* All branches included in the response
|
|
2410
|
+
*/
|
|
2411
|
+
all: BranchSingleDeleteResult[];
|
|
2412
|
+
|
|
2413
|
+
/**
|
|
2414
|
+
* Branches mapped by their branch name
|
|
2415
|
+
*/
|
|
2416
|
+
branches: { [branchName: string]: BranchSingleDeleteResult };
|
|
2417
|
+
|
|
2418
|
+
/**
|
|
2419
|
+
* Array of responses that are in error
|
|
2420
|
+
*/
|
|
2421
|
+
errors: BranchSingleDeleteResult[];
|
|
2422
|
+
|
|
2423
|
+
/**
|
|
2424
|
+
* Flag showing whether all branches were deleted successfully
|
|
2425
|
+
*/
|
|
2426
|
+
readonly success: boolean;
|
|
2427
|
+
}
|
|
2428
|
+
|
|
2429
|
+
interface CleanSummary {
|
|
2430
|
+
readonly dryRun: boolean;
|
|
2431
|
+
paths: string[];
|
|
2432
|
+
files: string[];
|
|
2433
|
+
folders: string[];
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
interface CommitResult {
|
|
2437
|
+
author: null | {
|
|
2438
|
+
email: string;
|
|
2439
|
+
name: string;
|
|
2440
|
+
};
|
|
2441
|
+
branch: string;
|
|
2442
|
+
commit: string;
|
|
2443
|
+
root: boolean;
|
|
2444
|
+
summary: {
|
|
2445
|
+
changes: number;
|
|
2446
|
+
insertions: number;
|
|
2447
|
+
deletions: number;
|
|
2448
|
+
};
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
/** Represents the response to using `git.getConfig` */
|
|
2452
|
+
interface ConfigGetResult {
|
|
2453
|
+
/** The key that was searched for */
|
|
2454
|
+
key: string;
|
|
2455
|
+
|
|
2456
|
+
/** The single value seen by `git` for this key (equivalent to `git config --get key`) */
|
|
2457
|
+
value: string | null;
|
|
2458
|
+
|
|
2459
|
+
/** All possible values for this key no matter the scope (equivalent to `git config --get-all key`) */
|
|
2460
|
+
values: string[];
|
|
2461
|
+
|
|
2462
|
+
/** The file paths from which configuration was read */
|
|
2463
|
+
paths: string[];
|
|
2464
|
+
|
|
2465
|
+
/**
|
|
2466
|
+
* The full hierarchy of values the property can have had across the
|
|
2467
|
+
* various scopes that were searched (keys in this Map are the strings
|
|
2468
|
+
* also found in the `paths` array).
|
|
2469
|
+
*/
|
|
2470
|
+
scopes: Map<string, string[]>;
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
/**
|
|
2474
|
+
* Represents the current git configuration, as defined by the output from `git log`
|
|
2475
|
+
*/
|
|
2476
|
+
interface ConfigListSummary {
|
|
2477
|
+
|
|
2478
|
+
/**
|
|
2479
|
+
* All configuration settings, where local/user settings override user/global settings
|
|
2480
|
+
* the overridden value will appear in this object.
|
|
2481
|
+
*/
|
|
2482
|
+
readonly all: ConfigValues;
|
|
2483
|
+
|
|
2484
|
+
/**
|
|
2485
|
+
* The file paths configuration was read from
|
|
2486
|
+
*/
|
|
2487
|
+
files: string[];
|
|
2488
|
+
|
|
2489
|
+
/**
|
|
2490
|
+
* The `ConfigValues` for each of the `files`, use this object to determine
|
|
2491
|
+
* local repo, user and global settings.
|
|
2492
|
+
*/
|
|
2493
|
+
values: { [fileName: string]: ConfigValues };
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2496
|
+
/**
|
|
2497
|
+
* Represents the map of configuration settings
|
|
2498
|
+
*/
|
|
2499
|
+
interface ConfigValues {
|
|
2500
|
+
[key: string]: string | string[];
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
interface DiffResultTextFile {
|
|
2504
|
+
file: string;
|
|
2505
|
+
changes: number;
|
|
2506
|
+
insertions: number;
|
|
2507
|
+
deletions: number;
|
|
2508
|
+
binary: false;
|
|
2509
|
+
}
|
|
2510
|
+
|
|
2511
|
+
interface DiffResultBinaryFile {
|
|
2512
|
+
file: string;
|
|
2513
|
+
before: number;
|
|
2514
|
+
after: number;
|
|
2515
|
+
binary: true;
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
interface DiffResult {
|
|
2519
|
+
/** The total number of files changed as reported in the summary line */
|
|
2520
|
+
changed: number;
|
|
2521
|
+
|
|
2522
|
+
/** When present in the diff, lists the details of each file changed */
|
|
2523
|
+
files: Array<DiffResultTextFile | DiffResultBinaryFile>;
|
|
2524
|
+
|
|
2525
|
+
/** The number of files changed with insertions */
|
|
2526
|
+
insertions: number;
|
|
2527
|
+
|
|
2528
|
+
/** The number of files changed with deletions */
|
|
2529
|
+
deletions: number;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
interface FetchResult {
|
|
2533
|
+
raw: string;
|
|
2534
|
+
remote: string | null;
|
|
2535
|
+
branches: {
|
|
2536
|
+
name: string;
|
|
2537
|
+
tracking: string;
|
|
2538
|
+
}[];
|
|
2539
|
+
tags: {
|
|
2540
|
+
name: string;
|
|
2541
|
+
tracking: string;
|
|
2542
|
+
}[];
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
/** Represents the response to git.grep */
|
|
2546
|
+
interface GrepResult {
|
|
2547
|
+
paths: Set<string>;
|
|
2548
|
+
results: Record<string, Array<{
|
|
2549
|
+
line: number;
|
|
2550
|
+
path: string;
|
|
2551
|
+
preview: string;
|
|
2552
|
+
}>>;
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
/**
|
|
2556
|
+
* The `InitResult` is returned when (re)initialising a git repo.
|
|
2557
|
+
*/
|
|
2558
|
+
interface InitResult {
|
|
2559
|
+
/**
|
|
2560
|
+
* Boolean representing whether the `--bare` option was used
|
|
2561
|
+
*/
|
|
2562
|
+
readonly bare: boolean;
|
|
2563
|
+
|
|
2564
|
+
/**
|
|
2565
|
+
* Boolean representing whether the repo already existed (re-initialised rather than initialised)
|
|
2566
|
+
*/
|
|
2567
|
+
readonly existing: boolean;
|
|
2568
|
+
|
|
2569
|
+
/**
|
|
2570
|
+
* The path used when initialising
|
|
2571
|
+
*/
|
|
2572
|
+
readonly path: string;
|
|
2573
|
+
|
|
2574
|
+
/**
|
|
2575
|
+
* The git configuration directory - for a bare repo this is the same as `path`, in non-bare repos
|
|
2576
|
+
* this will usually be a sub-directory with the name `.git` (or value of the `$GIT_DIR` environment
|
|
2577
|
+
* variable).
|
|
2578
|
+
*/
|
|
2579
|
+
readonly gitDir: string;
|
|
2580
|
+
}
|
|
2581
|
+
|
|
2582
|
+
/**
|
|
2583
|
+
* A parsed response summary for calls to `git mv`
|
|
2584
|
+
*/
|
|
2585
|
+
interface MoveResult {
|
|
2586
|
+
/**
|
|
2587
|
+
* Array of files moved
|
|
2588
|
+
*/
|
|
2589
|
+
moves: Array<{ from: string, to: string }>;
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
interface PullDetailFileChanges {
|
|
2593
|
+
[fileName: string]: number;
|
|
2594
|
+
}
|
|
2595
|
+
|
|
2596
|
+
interface PullDetailSummary {
|
|
2597
|
+
changes: number;
|
|
2598
|
+
insertions: number;
|
|
2599
|
+
deletions: number;
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
interface PullDetail {
|
|
2603
|
+
/** Array of all files that are referenced in the pull */
|
|
2604
|
+
files: string[];
|
|
2605
|
+
|
|
2606
|
+
/** Map of file names to the number of insertions in that file */
|
|
2607
|
+
insertions: PullDetailFileChanges;
|
|
2608
|
+
|
|
2609
|
+
/** Map of file names to the number of deletions in that file */
|
|
2610
|
+
deletions: PullDetailFileChanges;
|
|
2611
|
+
|
|
2612
|
+
summary: PullDetailSummary;
|
|
2613
|
+
|
|
2614
|
+
/** Array of file names that have been created */
|
|
2615
|
+
created: string[];
|
|
2616
|
+
|
|
2617
|
+
/** Array of file names that have been deleted */
|
|
2618
|
+
deleted: string[];
|
|
2619
|
+
}
|
|
2620
|
+
|
|
2621
|
+
interface PullResult extends PullDetail, RemoteMessageResult {
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
/**
|
|
2625
|
+
* Represents file name changes in a StatusResult
|
|
2626
|
+
*/
|
|
2627
|
+
interface StatusResultRenamed {
|
|
2628
|
+
from: string;
|
|
2629
|
+
to: string;
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2632
|
+
interface FileStatusResult {
|
|
2633
|
+
|
|
2634
|
+
/** Original location of the file, when the file has been moved */
|
|
2635
|
+
from?: string
|
|
2636
|
+
|
|
2637
|
+
/** Path of the file */
|
|
2638
|
+
path: string;
|
|
2639
|
+
|
|
2640
|
+
/** First digit of the status code of the file, e.g. 'M' = modified.
|
|
2641
|
+
Represents the status of the index if no merge conflicts, otherwise represents
|
|
2642
|
+
status of one side of the merge. */
|
|
2643
|
+
index: string;
|
|
2644
|
+
|
|
2645
|
+
/** Second digit of the status code of the file. Represents status of the working directory
|
|
2646
|
+
if no merge conflicts, otherwise represents status of other side of a merge. */
|
|
2647
|
+
working_dir: string;
|
|
2648
|
+
}
|
|
2649
|
+
|
|
2650
|
+
/**
|
|
2651
|
+
* The StatusResult is returned for calls to `git.status()`, represents the state of the
|
|
2652
|
+
* working directory.
|
|
2653
|
+
*/
|
|
2654
|
+
interface StatusResult {
|
|
2655
|
+
not_added: string[];
|
|
2656
|
+
conflicted: string[];
|
|
2657
|
+
created: string[];
|
|
2658
|
+
deleted: string[];
|
|
2659
|
+
|
|
2660
|
+
/**
|
|
2661
|
+
* Ignored files are not listed by default, add `--ignored` to the task options in order to see
|
|
2662
|
+
* this array of ignored files/paths.
|
|
2663
|
+
*
|
|
2664
|
+
* Note: ignored files will not be added to the `files` array, and will not be included in the
|
|
2665
|
+
* `isClean()` calculation.
|
|
2666
|
+
*/
|
|
2667
|
+
ignored?: string[];
|
|
2668
|
+
modified: string[];
|
|
2669
|
+
renamed: StatusResultRenamed[];
|
|
2670
|
+
staged: string[];
|
|
2671
|
+
|
|
2672
|
+
/**
|
|
2673
|
+
* All files represented as an array of objects containing the `path` and status in `index` and
|
|
2674
|
+
* in the `working_dir`.
|
|
2675
|
+
*/
|
|
2676
|
+
files: FileStatusResult[];
|
|
2677
|
+
|
|
2678
|
+
/**
|
|
2679
|
+
* Number of commits ahead of the tracked branch
|
|
2680
|
+
*/
|
|
2681
|
+
ahead: number;
|
|
2682
|
+
|
|
2683
|
+
/**
|
|
2684
|
+
*Number of commits behind the tracked branch
|
|
2685
|
+
*/
|
|
2686
|
+
behind: number;
|
|
2687
|
+
|
|
2688
|
+
/**
|
|
2689
|
+
* Name of the current branch
|
|
2690
|
+
*/
|
|
2691
|
+
current: string | null;
|
|
2692
|
+
|
|
2693
|
+
/**
|
|
2694
|
+
* Name of the branch being tracked
|
|
2695
|
+
*/
|
|
2696
|
+
tracking: string | null;
|
|
2697
|
+
|
|
2698
|
+
/**
|
|
2699
|
+
* Detached status of the working copy, for more detail of what the working branch
|
|
2700
|
+
* is detached from use `git.branch()`
|
|
2701
|
+
*/
|
|
2702
|
+
detached: boolean;
|
|
2703
|
+
|
|
2704
|
+
/**
|
|
2705
|
+
* Gets whether this represents a clean working branch.
|
|
2706
|
+
*/
|
|
2707
|
+
isClean(): boolean;
|
|
2708
|
+
}
|
|
2709
|
+
|
|
2710
|
+
/**
|
|
2711
|
+
* Response retrieved when using the `git.tags` method
|
|
2712
|
+
*/
|
|
2713
|
+
interface TagResult {
|
|
2714
|
+
/**
|
|
2715
|
+
* All tag names
|
|
2716
|
+
*/
|
|
2717
|
+
all: string[];
|
|
2718
|
+
|
|
2719
|
+
/**
|
|
2720
|
+
* The semver latest tag name or `undefined` when no tags are named in the response
|
|
2721
|
+
*/
|
|
2722
|
+
latest: string | undefined;
|
|
2723
|
+
}
|
|
2724
|
+
|
|
2725
|
+
/**
|
|
2726
|
+
* The ListLogLine represents a single entry in the `git.log`, the properties on the object
|
|
2727
|
+
* are mixed in depending on the names used in the format (see `DefaultLogFields`), but some
|
|
2728
|
+
* properties are dependent on the command used.
|
|
2729
|
+
*/
|
|
2730
|
+
interface ListLogLine {
|
|
2731
|
+
/**
|
|
2732
|
+
* When using a `--stat=4096` or `--shortstat` options in the `git.log` or `git.stashList`,
|
|
2733
|
+
* each entry in the `ListLogSummary` will also have a `diff` property representing as much
|
|
2734
|
+
* detail as was given in the response.
|
|
2735
|
+
*/
|
|
2736
|
+
diff?: DiffResult;
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2739
|
+
interface LogResult<T = DefaultLogFields> {
|
|
2740
|
+
all: ReadonlyArray<T & ListLogLine>;
|
|
2741
|
+
total: number;
|
|
2742
|
+
latest: (T & ListLogLine) | null;
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
/**
|
|
2746
|
+
* Where the file was deleted, if there is a modify/delete conflict
|
|
2747
|
+
*/
|
|
2748
|
+
interface MergeConflictDeletion {
|
|
2749
|
+
deleteRef: string;
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2752
|
+
/**
|
|
2753
|
+
* Represents a single file with conflicts in the MergeSummary
|
|
2754
|
+
*/
|
|
2755
|
+
interface MergeConflict {
|
|
2756
|
+
|
|
2757
|
+
/**
|
|
2758
|
+
* Type of conflict
|
|
2759
|
+
*/
|
|
2760
|
+
reason: string;
|
|
2761
|
+
|
|
2762
|
+
/**
|
|
2763
|
+
* Path to file
|
|
2764
|
+
*/
|
|
2765
|
+
file: string | null;
|
|
2766
|
+
|
|
2767
|
+
/**
|
|
2768
|
+
* Additional detail for the specific type of conflict
|
|
2769
|
+
*/
|
|
2770
|
+
meta?: MergeConflictDeletion;
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
type MergeResultStatus = 'success' | string;
|
|
2774
|
+
|
|
2775
|
+
interface MergeDetail {
|
|
2776
|
+
conflicts: MergeConflict[];
|
|
2777
|
+
merges: string[];
|
|
2778
|
+
result: MergeResultStatus;
|
|
2779
|
+
readonly failed: boolean;
|
|
2780
|
+
}
|
|
2781
|
+
|
|
2782
|
+
type MergeResult = PullResult & MergeDetail;
|
|
2783
|
+
|
|
2784
|
+
/**
|
|
2785
|
+
*
|
|
2786
|
+
*/
|
|
2787
|
+
interface PushResultPushedItem {
|
|
2788
|
+
local: string;
|
|
2789
|
+
remote: string;
|
|
2790
|
+
|
|
2791
|
+
readonly deleted: boolean;
|
|
2792
|
+
readonly tag: boolean;
|
|
2793
|
+
readonly branch: boolean;
|
|
2794
|
+
readonly new: boolean;
|
|
2795
|
+
readonly alreadyUpdated: boolean;
|
|
2796
|
+
}
|
|
2797
|
+
|
|
2798
|
+
interface RemoteMessagesObjectEnumeration {
|
|
2799
|
+
enumerating: number,
|
|
2800
|
+
counting: number,
|
|
2801
|
+
compressing: number,
|
|
2802
|
+
total: {
|
|
2803
|
+
count: number,
|
|
2804
|
+
delta: number,
|
|
2805
|
+
},
|
|
2806
|
+
reused: {
|
|
2807
|
+
count: number,
|
|
2808
|
+
delta: number,
|
|
2809
|
+
},
|
|
2810
|
+
packReused: number,
|
|
2811
|
+
}
|
|
2812
|
+
|
|
2813
|
+
interface RemoteMessages {
|
|
2814
|
+
all: string[];
|
|
2815
|
+
objects?: RemoteMessagesObjectEnumeration;
|
|
2816
|
+
}
|
|
2817
|
+
|
|
2818
|
+
interface PushResultRemoteMessages extends RemoteMessages {
|
|
2819
|
+
pullRequestUrl?: string;
|
|
2820
|
+
vulnerabilities?: {
|
|
2821
|
+
count: number;
|
|
2822
|
+
summary: string;
|
|
2823
|
+
url: string;
|
|
2824
|
+
};
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
interface RemoteMessageResult<T extends RemoteMessages = RemoteMessages> {
|
|
2828
|
+
remoteMessages: T;
|
|
2829
|
+
}
|
|
2830
|
+
|
|
2831
|
+
interface PushResultBranchUpdate {
|
|
2832
|
+
head: {
|
|
2833
|
+
local: string;
|
|
2834
|
+
remote: string;
|
|
2835
|
+
};
|
|
2836
|
+
hash: {
|
|
2837
|
+
from: string;
|
|
2838
|
+
to: string;
|
|
2839
|
+
};
|
|
2840
|
+
}
|
|
2841
|
+
|
|
2842
|
+
interface PushDetail {
|
|
2843
|
+
repo?: string;
|
|
2844
|
+
ref?: {
|
|
2845
|
+
local: string;
|
|
2846
|
+
};
|
|
2847
|
+
pushed: PushResultPushedItem[];
|
|
2848
|
+
branch?: {
|
|
2849
|
+
local: string;
|
|
2850
|
+
remote: string;
|
|
2851
|
+
remoteName: string;
|
|
2852
|
+
};
|
|
2853
|
+
update?: PushResultBranchUpdate;
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2856
|
+
interface PushResult extends PushDetail, RemoteMessageResult<PushResultRemoteMessages> {
|
|
2857
|
+
}
|
|
2858
|
+
|
|
2859
|
+
type MoveSummary = MoveResult;
|
|
2860
|
+
|
|
2861
|
+
interface RemoteWithoutRefs {
|
|
2862
|
+
name: string;
|
|
2863
|
+
}
|
|
2864
|
+
interface RemoteWithRefs extends RemoteWithoutRefs {
|
|
2865
|
+
refs: {
|
|
2866
|
+
fetch: string;
|
|
2867
|
+
push: string;
|
|
2868
|
+
};
|
|
2869
|
+
}
|
|
2870
|
+
|
|
2871
|
+
declare type ApplyOptions = Options$1 & OptionFlags<'--stat' | '--numstat' | '--summary' | '--check' | '--index' | '--intent-to-add' | '--3way' | '--apply' | '--no-add' | '-R' | '--reverse' | '--allow-binary-replacement' | '--binary' | '--reject' | '-z' | '--inaccurate-eof' | '--recount' | '--cached' | '--ignore-space-change' | '--ignore-whitespace' | '--verbose' | '--unsafe-paths'> & OptionFlags<'--whitespace', 'nowarn' | 'warn' | 'fix' | 'error' | 'error-all'> & OptionFlags<'--build-fake-ancestor' | '--exclude' | '--include' | '--directory', string> & OptionFlags<'-p' | '-C', number>;
|
|
2872
|
+
|
|
2873
|
+
declare enum CheckRepoActions {
|
|
2874
|
+
BARE = "bare",
|
|
2875
|
+
IN_TREE = "tree",
|
|
2876
|
+
IS_REPO_ROOT = "root"
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
/**
|
|
2880
|
+
* All supported option switches available for use in a `git.clean` operation
|
|
2881
|
+
*/
|
|
2882
|
+
declare enum CleanOptions {
|
|
2883
|
+
DRY_RUN = "n",
|
|
2884
|
+
FORCE = "f",
|
|
2885
|
+
IGNORED_INCLUDED = "x",
|
|
2886
|
+
IGNORED_ONLY = "X",
|
|
2887
|
+
EXCLUDING = "e",
|
|
2888
|
+
QUIET = "q",
|
|
2889
|
+
RECURSIVE = "d"
|
|
2890
|
+
}
|
|
2891
|
+
/**
|
|
2892
|
+
* The two modes `git.clean` can run in - one of these must be supplied in order
|
|
2893
|
+
* for the command to not throw a `TaskConfigurationError`
|
|
2894
|
+
*/
|
|
2895
|
+
declare type CleanMode = CleanOptions.FORCE | CleanOptions.DRY_RUN;
|
|
2896
|
+
|
|
2897
|
+
declare enum GitConfigScope {
|
|
2898
|
+
system = "system",
|
|
2899
|
+
global = "global",
|
|
2900
|
+
local = "local",
|
|
2901
|
+
worktree = "worktree"
|
|
2902
|
+
}
|
|
2903
|
+
|
|
2904
|
+
interface GitGrepQuery extends Iterable<string> {
|
|
2905
|
+
/** Adds one or more terms to be grouped as an "and" to any other terms */
|
|
2906
|
+
and(...and: string[]): this;
|
|
2907
|
+
/** Adds one or more search terms - git.grep will "or" this to other terms */
|
|
2908
|
+
param(...param: string[]): this;
|
|
2909
|
+
}
|
|
2910
|
+
|
|
2911
|
+
declare enum ResetMode {
|
|
2912
|
+
MIXED = "mixed",
|
|
2913
|
+
SOFT = "soft",
|
|
2914
|
+
HARD = "hard",
|
|
2915
|
+
MERGE = "merge",
|
|
2916
|
+
KEEP = "keep"
|
|
2917
|
+
}
|
|
2918
|
+
declare type ResetOptions = Options$1 & OptionFlags<'-q' | '--quiet' | '--no-quiet' | '--pathspec-from-nul'> & OptionFlags<'--pathspec-from-file', string>;
|
|
2919
|
+
|
|
2920
|
+
interface SimpleGitFactory {
|
|
2921
|
+
(baseDir?: string, options?: Partial<SimpleGitOptions>): SimpleGit;
|
|
2922
|
+
|
|
2923
|
+
(baseDir: string): SimpleGit;
|
|
2924
|
+
|
|
2925
|
+
(options: Partial<SimpleGitOptions>): SimpleGit;
|
|
2926
|
+
}
|
|
2927
|
+
|
|
2928
|
+
type Response$2<T> = SimpleGit & Promise<T>;
|
|
2929
|
+
|
|
2930
|
+
interface SimpleGitBase {
|
|
2931
|
+
/**
|
|
2932
|
+
* Adds one or more files to source control
|
|
2933
|
+
*/
|
|
2934
|
+
add(files: string | string[], callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
2935
|
+
|
|
2936
|
+
/**
|
|
2937
|
+
* Sets the working directory of the subsequent commands.
|
|
2938
|
+
*/
|
|
2939
|
+
cwd(directory: { path: string, root?: boolean }, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
2940
|
+
|
|
2941
|
+
cwd<path extends string>(directory: path, callback?: SimpleGitTaskCallback<path>): Response$2<path>;
|
|
2942
|
+
|
|
2943
|
+
/**
|
|
2944
|
+
* Compute object ID from a file
|
|
2945
|
+
*/
|
|
2946
|
+
hashObject(path: string, callback?: SimpleGitTaskCallback): Response$2<string>;
|
|
2947
|
+
|
|
2948
|
+
hashObject(path: string, write ?: boolean, callback?: SimpleGitTaskCallback): Response$2<string>;
|
|
2949
|
+
|
|
2950
|
+
/**
|
|
2951
|
+
* Initialize a git repo
|
|
2952
|
+
*/
|
|
2953
|
+
init(bare: boolean, options?: TaskOptions, callback?: SimpleGitTaskCallback<InitResult>): Response$2<InitResult>;
|
|
2954
|
+
|
|
2955
|
+
init(bare: boolean, callback?: SimpleGitTaskCallback<InitResult>): Response$2<InitResult>;
|
|
2956
|
+
|
|
2957
|
+
init(options?: TaskOptions, callback?: SimpleGitTaskCallback<InitResult>): Response$2<InitResult>;
|
|
2958
|
+
|
|
2959
|
+
init(callback?: SimpleGitTaskCallback<InitResult>): Response$2<InitResult>;
|
|
2960
|
+
|
|
2961
|
+
/**
|
|
2962
|
+
* Runs a merge, `options` can be either an array of arguments
|
|
2963
|
+
* supported by the [`git merge`](https://git-scm.com/docs/git-merge)
|
|
2964
|
+
* or an options object.
|
|
2965
|
+
*
|
|
2966
|
+
* Conflicts during the merge result in an error response,
|
|
2967
|
+
* the response type whether it was an error or success will be a MergeSummary instance.
|
|
2968
|
+
* When successful, the MergeSummary has all detail from a the PullSummary
|
|
2969
|
+
*
|
|
2970
|
+
* @see https://github.com/steveukx/git-js/blob/master/src/responses/MergeSummary.js
|
|
2971
|
+
* @see https://github.com/steveukx/git-js/blob/master/src/responses/PullSummary.js
|
|
2972
|
+
*/
|
|
2973
|
+
merge(options: TaskOptions, callback?: SimpleGitTaskCallback<MergeResult>): Response$2<MergeResult>;
|
|
2974
|
+
|
|
2975
|
+
/**
|
|
2976
|
+
* Merges from one branch to another, equivalent to running `git merge ${remote} ${branch}`, the `options` argument can
|
|
2977
|
+
* either be an array of additional parameters to pass to the command or null / omitted to be ignored.
|
|
2978
|
+
*/
|
|
2979
|
+
mergeFromTo<E extends GitError>(remote: string, branch: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<MergeResult, E>): Response$2<MergeResult>;
|
|
2980
|
+
|
|
2981
|
+
mergeFromTo<E extends GitError>(remote: string, branch: string, callback?: SimpleGitTaskCallback<MergeResult, E>): Response$2<MergeResult>;
|
|
2982
|
+
|
|
2983
|
+
/**
|
|
2984
|
+
* Sets a handler function to be called whenever a new child process is created, the handler function will be called
|
|
2985
|
+
* with the name of the command being run and the stdout & stderr streams used by the ChildProcess.
|
|
2986
|
+
*
|
|
2987
|
+
* @example
|
|
2988
|
+
* require('simple-git')
|
|
2989
|
+
* .outputHandler(function (command, stdout, stderr) {
|
|
2990
|
+
* stdout.pipe(process.stdout);
|
|
2991
|
+
* })
|
|
2992
|
+
* .checkout('https://github.com/user/repo.git');
|
|
2993
|
+
*
|
|
2994
|
+
* @see https://nodejs.org/api/child_process.html#child_process_class_childprocess
|
|
2995
|
+
* @see https://nodejs.org/api/stream.html#stream_class_stream_readable
|
|
2996
|
+
*/
|
|
2997
|
+
outputHandler(handler: outputHandler | void): this;
|
|
2998
|
+
|
|
2999
|
+
/**
|
|
3000
|
+
* Pushes the current committed changes to a remote, optionally specify the names of the remote and branch to use
|
|
3001
|
+
* when pushing. Supply multiple options as an array of strings in the first argument - see examples below.
|
|
3002
|
+
*/
|
|
3003
|
+
push(remote?: string, branch?: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<PushResult>): Response$2<PushResult>;
|
|
3004
|
+
|
|
3005
|
+
push(options?: TaskOptions, callback?: SimpleGitTaskCallback<PushResult>): Response$2<PushResult>;
|
|
3006
|
+
|
|
3007
|
+
push(callback?: SimpleGitTaskCallback<PushResult>): Response$2<PushResult>;
|
|
3008
|
+
|
|
3009
|
+
/**
|
|
3010
|
+
* Stash the local repo
|
|
3011
|
+
*/
|
|
3012
|
+
stash(options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3013
|
+
|
|
3014
|
+
stash(callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3015
|
+
|
|
3016
|
+
/**
|
|
3017
|
+
* Show the working tree status.
|
|
3018
|
+
*/
|
|
3019
|
+
status(options?: TaskOptions, callback?: SimpleGitTaskCallback<StatusResult>): Response$2<StatusResult>;
|
|
3020
|
+
|
|
3021
|
+
status(callback?: SimpleGitTaskCallback<StatusResult>): Response$2<StatusResult>;
|
|
3022
|
+
|
|
3023
|
+
}
|
|
3024
|
+
|
|
3025
|
+
interface SimpleGit extends SimpleGitBase {
|
|
3026
|
+
|
|
3027
|
+
/**
|
|
3028
|
+
* Add an annotated tag to the head of the current branch
|
|
3029
|
+
*/
|
|
3030
|
+
addAnnotatedTag(tagName: string, tagMessage: string, callback?: SimpleGitTaskCallback<{ name: string }>): Response$2<{ name: string }>;
|
|
3031
|
+
|
|
3032
|
+
/**
|
|
3033
|
+
* Add config to local git instance for the specified `key` (eg: user.name) and value (eg: 'your name').
|
|
3034
|
+
* Set `append` to true to append to rather than overwrite the key
|
|
3035
|
+
*/
|
|
3036
|
+
addConfig(key: string, value: string, append?: boolean, scope?: keyof typeof GitConfigScope, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3037
|
+
|
|
3038
|
+
addConfig(key: string, value: string, append?: boolean, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3039
|
+
|
|
3040
|
+
addConfig(key: string, value: string, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3041
|
+
|
|
3042
|
+
/**
|
|
3043
|
+
* Applies a patch to the repo
|
|
3044
|
+
*/
|
|
3045
|
+
applyPatch(patches: string | string[], options: TaskOptions<ApplyOptions>, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3046
|
+
|
|
3047
|
+
applyPatch(patches: string | string[], callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3048
|
+
|
|
3049
|
+
/**
|
|
3050
|
+
* Configuration values visible to git in the current working directory
|
|
3051
|
+
*/
|
|
3052
|
+
listConfig(scope: keyof typeof GitConfigScope, callback?: SimpleGitTaskCallback<ConfigListSummary>): Response$2<ConfigListSummary>;
|
|
3053
|
+
|
|
3054
|
+
listConfig(callback?: SimpleGitTaskCallback<ConfigListSummary>): Response$2<ConfigListSummary>;
|
|
3055
|
+
|
|
3056
|
+
/**
|
|
3057
|
+
* Adds a remote to the list of remotes.
|
|
3058
|
+
*
|
|
3059
|
+
* - `remoteName` Name of the repository - eg "upstream"
|
|
3060
|
+
* - `remoteRepo` Fully qualified SSH or HTTP(S) path to the remote repo
|
|
3061
|
+
* - `options` Optional additional settings permitted by the `git remote add` command, merged into the command prior to the repo name and remote url
|
|
3062
|
+
*/
|
|
3063
|
+
addRemote(remoteName: string, remoteRepo: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3064
|
+
|
|
3065
|
+
addRemote(remoteName: string, remoteRepo: string, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3066
|
+
|
|
3067
|
+
/**
|
|
3068
|
+
* Add a lightweight tag to the head of the current branch
|
|
3069
|
+
*/
|
|
3070
|
+
addTag(name: string, callback?: SimpleGitTaskCallback<{ name: string }>): Response$2<{ name: string }>;
|
|
3071
|
+
|
|
3072
|
+
/**
|
|
3073
|
+
* Equivalent to `catFile` but will return the native `Buffer` of content from the git command's stdout.
|
|
3074
|
+
*/
|
|
3075
|
+
binaryCatFile(options: string[], callback?: SimpleGitTaskCallback<any>): Response$2<any>;
|
|
3076
|
+
|
|
3077
|
+
/**
|
|
3078
|
+
* List all branches
|
|
3079
|
+
*/
|
|
3080
|
+
branch(options?: TaskOptions, callback?: SimpleGitTaskCallback<BranchSummary>): Response$2<BranchSummary>;
|
|
3081
|
+
|
|
3082
|
+
/**
|
|
3083
|
+
* List of local branches
|
|
3084
|
+
*/
|
|
3085
|
+
branchLocal(callback?: SimpleGitTaskCallback<BranchSummary>): Response$2<BranchSummary>;
|
|
3086
|
+
|
|
3087
|
+
/**
|
|
3088
|
+
* Returns a list of objects in a tree based on commit hash.
|
|
3089
|
+
* Passing in an object hash returns the object's content, size, and type.
|
|
3090
|
+
*
|
|
3091
|
+
* Passing "-p" will instruct cat-file to determine the object type, and display its formatted contents.
|
|
3092
|
+
*
|
|
3093
|
+
* @see https://git-scm.com/docs/git-cat-file
|
|
3094
|
+
*/
|
|
3095
|
+
catFile(options: string[], callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3096
|
+
|
|
3097
|
+
catFile(callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3098
|
+
|
|
3099
|
+
/**
|
|
3100
|
+
* Check if a pathname or pathnames are excluded by .gitignore
|
|
3101
|
+
*
|
|
3102
|
+
*/
|
|
3103
|
+
checkIgnore(pathNames: string[], callback?: SimpleGitTaskCallback<string[]>): Response$2<string[]>;
|
|
3104
|
+
|
|
3105
|
+
checkIgnore(path: string, callback?: SimpleGitTaskCallback<string[]>): Response$2<string[]>;
|
|
3106
|
+
|
|
3107
|
+
/**
|
|
3108
|
+
* Validates that the current working directory is a valid git repo file path.
|
|
3109
|
+
*
|
|
3110
|
+
* To make a more specific assertion of the repo, add the `action` argument:
|
|
3111
|
+
*
|
|
3112
|
+
* - `bare` to validate that the working directory is inside a bare repo.
|
|
3113
|
+
* - `root` to validate that the working directory is the root of a repo.
|
|
3114
|
+
* - `tree` (default value when omitted) to simply validate that the working
|
|
3115
|
+
* directory is the descendent of a repo
|
|
3116
|
+
*/
|
|
3117
|
+
checkIsRepo(action?: CheckRepoActions, callback?: SimpleGitTaskCallback<boolean>): Response$2<boolean>;
|
|
3118
|
+
|
|
3119
|
+
checkIsRepo(callback?: SimpleGitTaskCallback<boolean>): Response$2<boolean>;
|
|
3120
|
+
|
|
3121
|
+
/**
|
|
3122
|
+
* Checkout a tag or revision, any number of additional arguments can be passed to the `git checkout` command
|
|
3123
|
+
* by supplying either a string or array of strings as the `what` parameter.
|
|
3124
|
+
*/
|
|
3125
|
+
checkout(what: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3126
|
+
|
|
3127
|
+
checkout(what: string, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3128
|
+
|
|
3129
|
+
checkout(options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3130
|
+
|
|
3131
|
+
/**
|
|
3132
|
+
* Checkout a remote branch.
|
|
3133
|
+
*
|
|
3134
|
+
* - branchName name of branch.
|
|
3135
|
+
* - startPoint (e.g origin/development).
|
|
3136
|
+
*/
|
|
3137
|
+
checkoutBranch(branchName: string, startPoint: string, callback?: SimpleGitTaskCallback<void>): Response$2<void>;
|
|
3138
|
+
|
|
3139
|
+
/**
|
|
3140
|
+
* Internally uses pull and tags to get the list of tags then checks out the latest tag.
|
|
3141
|
+
*/
|
|
3142
|
+
checkoutLatestTag(branchName: string, startPoint: string, callback?: SimpleGitTaskCallback<void>): Response$2<void>;
|
|
3143
|
+
|
|
3144
|
+
/**
|
|
3145
|
+
* Checkout a local branch
|
|
3146
|
+
*/
|
|
3147
|
+
checkoutLocalBranch(branchName: string, callback?: SimpleGitTaskCallback<void>): Response$2<void>;
|
|
3148
|
+
|
|
3149
|
+
/**
|
|
3150
|
+
* Deletes unwanted content from the local repo - when supplying the first argument as
|
|
3151
|
+
* an array of `CleanOptions`, the array must include one of `CleanOptions.FORCE` or
|
|
3152
|
+
* `CleanOptions.DRY_RUN`.
|
|
3153
|
+
*
|
|
3154
|
+
* eg:
|
|
3155
|
+
*
|
|
3156
|
+
* ```typescript
|
|
3157
|
+
await git.clean(CleanOptions.FORCE);
|
|
3158
|
+
await git.clean(CleanOptions.DRY_RUN + CleanOptions.RECURSIVE);
|
|
3159
|
+
await git.clean(CleanOptions.FORCE, ['./path']);
|
|
3160
|
+
await git.clean(CleanOptions.IGNORED + CleanOptions.FORCE, {'./path': null});
|
|
3161
|
+
* ```
|
|
3162
|
+
*/
|
|
3163
|
+
clean(args: CleanOptions[], options?: TaskOptions, callback?: SimpleGitTaskCallback<CleanSummary>): Response$2<CleanSummary>;
|
|
3164
|
+
|
|
3165
|
+
clean(mode: CleanMode | string, options?: TaskOptions, callback?: SimpleGitTaskCallback<CleanSummary>): Response$2<CleanSummary>;
|
|
3166
|
+
|
|
3167
|
+
clean(mode: CleanMode | string, callback?: SimpleGitTaskCallback<CleanSummary>): Response$2<CleanSummary>;
|
|
3168
|
+
|
|
3169
|
+
clean(options?: TaskOptions): Response$2<CleanSummary>;
|
|
3170
|
+
|
|
3171
|
+
clean(callback?: SimpleGitTaskCallback<CleanSummary>): Response$2<CleanSummary>;
|
|
3172
|
+
|
|
3173
|
+
/**
|
|
3174
|
+
* Clears the queue of pending commands and returns the wrapper instance for chaining.
|
|
3175
|
+
*/
|
|
3176
|
+
clearQueue(): this;
|
|
3177
|
+
|
|
3178
|
+
/**
|
|
3179
|
+
* Clone a repository into a new directory.
|
|
3180
|
+
*
|
|
3181
|
+
* - repoPath repository url to clone e.g. https://github.com/steveukx/git-js.git
|
|
3182
|
+
* - localPath local folder path to clone to.
|
|
3183
|
+
* - options supported by [git](https://git-scm.com/docs/git-clone).
|
|
3184
|
+
*/
|
|
3185
|
+
clone(repoPath: string, localPath: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3186
|
+
|
|
3187
|
+
clone(repoPath: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3188
|
+
|
|
3189
|
+
/**
|
|
3190
|
+
* Commits changes in the current working directory - when specific file paths are supplied, only changes on those
|
|
3191
|
+
* files will be committed.
|
|
3192
|
+
*/
|
|
3193
|
+
commit(
|
|
3194
|
+
message: string | string[],
|
|
3195
|
+
files?: string | string[],
|
|
3196
|
+
options?: Options$1,
|
|
3197
|
+
callback?: SimpleGitTaskCallback<CommitResult>): Response$2<CommitResult>;
|
|
3198
|
+
|
|
3199
|
+
commit(
|
|
3200
|
+
message: string | string[],
|
|
3201
|
+
options?: TaskOptions,
|
|
3202
|
+
callback?: SimpleGitTaskCallback<CommitResult>): Response$2<CommitResult>;
|
|
3203
|
+
|
|
3204
|
+
commit(
|
|
3205
|
+
message: string | string[],
|
|
3206
|
+
files?: string | string[],
|
|
3207
|
+
callback?: SimpleGitTaskCallback<CommitResult>): Response$2<CommitResult>;
|
|
3208
|
+
|
|
3209
|
+
commit(
|
|
3210
|
+
message: string | string[],
|
|
3211
|
+
callback?: SimpleGitTaskCallback<CommitResult>): Response$2<CommitResult>;
|
|
3212
|
+
|
|
3213
|
+
/**
|
|
3214
|
+
* Sets the path to a custom git binary, should either be `git` when there is an installation of git available on
|
|
3215
|
+
* the system path, or a fully qualified path to the executable.
|
|
3216
|
+
*/
|
|
3217
|
+
customBinary(command: string): this;
|
|
3218
|
+
|
|
3219
|
+
/**
|
|
3220
|
+
* Delete one local branch. Supply the branchName as a string to return a
|
|
3221
|
+
* single `BranchDeletionSummary` instances.
|
|
3222
|
+
*
|
|
3223
|
+
* - branchName name of branch
|
|
3224
|
+
* - forceDelete (optional, defaults to false) set to true to forcibly delete unmerged branches
|
|
3225
|
+
*/
|
|
3226
|
+
deleteLocalBranch(branchName: string, forceDelete?: boolean, callback?: SimpleGitTaskCallback<BranchSingleDeleteResult>): Response$2<BranchSingleDeleteResult>;
|
|
3227
|
+
|
|
3228
|
+
deleteLocalBranch(branchName: string, callback?: SimpleGitTaskCallback<BranchSingleDeleteResult>): Response$2<BranchSingleDeleteResult>;
|
|
3229
|
+
|
|
3230
|
+
/**
|
|
3231
|
+
* Delete one or more local branches. Supply the branchName as a string to return a
|
|
3232
|
+
* single `BranchDeletionSummary` or as an array of branch names to return an array of
|
|
3233
|
+
* `BranchDeletionSummary` instances.
|
|
3234
|
+
*
|
|
3235
|
+
* - branchNames name of branch or array of branch names
|
|
3236
|
+
* - forceDelete (optional, defaults to false) set to true to forcibly delete unmerged branches
|
|
3237
|
+
*/
|
|
3238
|
+
deleteLocalBranches(branchNames: string[], forceDelete?: boolean, callback?: SimpleGitTaskCallback<BranchMultiDeleteResult>): Response$2<BranchMultiDeleteResult>;
|
|
3239
|
+
|
|
3240
|
+
/**
|
|
3241
|
+
* Get the diff of the current repo compared to the last commit with a set of options supplied as a string.
|
|
3242
|
+
*/
|
|
3243
|
+
diff(options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3244
|
+
|
|
3245
|
+
/**
|
|
3246
|
+
* Gets a summary of the diff for files in the repo, uses the `git diff --stat` format to calculate changes.
|
|
3247
|
+
*
|
|
3248
|
+
* in order to get staged (only): `--cached` or `--staged`.
|
|
3249
|
+
*/
|
|
3250
|
+
diffSummary(command: string | number, options: TaskOptions, callback?: SimpleGitTaskCallback<DiffResult>): Response$2<DiffResult>;
|
|
3251
|
+
|
|
3252
|
+
diffSummary(command: string | number, callback?: SimpleGitTaskCallback<DiffResult>): Response$2<DiffResult>;
|
|
3253
|
+
|
|
3254
|
+
diffSummary(options: TaskOptions, callback?: SimpleGitTaskCallback<DiffResult>): Response$2<DiffResult>;
|
|
3255
|
+
|
|
3256
|
+
diffSummary(callback?: SimpleGitTaskCallback<DiffResult>): Response$2<DiffResult>;
|
|
3257
|
+
|
|
3258
|
+
/**
|
|
3259
|
+
* Sets an environment variable for the spawned child process, either supply both a name and value as strings or
|
|
3260
|
+
* a single object to entirely replace the current environment variables.
|
|
3261
|
+
*
|
|
3262
|
+
* @param {string|Object} name
|
|
3263
|
+
* @param {string} [value]
|
|
3264
|
+
*/
|
|
3265
|
+
env(name: string, value: string): this;
|
|
3266
|
+
|
|
3267
|
+
env(env: object): this;
|
|
3268
|
+
|
|
3269
|
+
/**
|
|
3270
|
+
* Calls the supplied `handle` function at the next step in the chain, used to run arbitrary functions synchronously
|
|
3271
|
+
* before the next task in the git api.
|
|
3272
|
+
*/
|
|
3273
|
+
exec(handle: () => void): Response$2<void>;
|
|
3274
|
+
|
|
3275
|
+
/**
|
|
3276
|
+
* Updates the local working copy database with changes from the default remote repo and branch.
|
|
3277
|
+
*/
|
|
3278
|
+
fetch(remote: string, branch: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<FetchResult>): Response$2<FetchResult>;
|
|
3279
|
+
|
|
3280
|
+
fetch(remote: string, branch: string, callback?: SimpleGitTaskCallback<FetchResult>): Response$2<FetchResult>;
|
|
3281
|
+
|
|
3282
|
+
fetch(remote: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<FetchResult>): Response$2<FetchResult>;
|
|
3283
|
+
|
|
3284
|
+
fetch(options?: TaskOptions, callback?: SimpleGitTaskCallback<FetchResult>): Response$2<FetchResult>;
|
|
3285
|
+
|
|
3286
|
+
fetch(callback?: SimpleGitTaskCallback<FetchResult>): Response$2<FetchResult>;
|
|
3287
|
+
|
|
3288
|
+
/**
|
|
3289
|
+
* Gets the current value of a configuration property by it key, optionally specify the scope in which
|
|
3290
|
+
* to run the command (omit / set to `undefined` to check in the complete overlaid configuration visible
|
|
3291
|
+
* to the `git` process).
|
|
3292
|
+
*/
|
|
3293
|
+
getConfig(key: string, scope?: keyof typeof GitConfigScope, callback?: SimpleGitTaskCallback<string>): Response$2<ConfigGetResult>;
|
|
3294
|
+
|
|
3295
|
+
/**
|
|
3296
|
+
* Gets the currently available remotes, setting the optional verbose argument to true includes additional
|
|
3297
|
+
* detail on the remotes themselves.
|
|
3298
|
+
*/
|
|
3299
|
+
getRemotes(callback?: SimpleGitTaskCallback<RemoteWithoutRefs[]>): Response$2<RemoteWithoutRefs[]>;
|
|
3300
|
+
|
|
3301
|
+
getRemotes(verbose?: false, callback?: SimpleGitTaskCallback<RemoteWithoutRefs[]>): Response$2<RemoteWithoutRefs[]>;
|
|
1847
3302
|
|
|
1848
|
-
|
|
1849
|
-
[TKey in keyof Pick<Options$1, 'objectMode'>]-?: true;
|
|
1850
|
-
};
|
|
1851
|
-
declare type EntryStatsPredicate = {
|
|
1852
|
-
[TKey in keyof Pick<Options$1, 'stats'>]-?: true;
|
|
1853
|
-
};
|
|
1854
|
-
declare type EntryObjectPredicate = EntryObjectModePredicate | EntryStatsPredicate;
|
|
1855
|
-
declare function FastGlob(source: Pattern | Pattern[], options: Options$1 & EntryObjectPredicate): Promise<Entry[]>;
|
|
1856
|
-
declare function FastGlob(source: Pattern | Pattern[], options?: Options$1): Promise<string[]>;
|
|
1857
|
-
declare namespace FastGlob {
|
|
1858
|
-
type Options = Options$1;
|
|
1859
|
-
type Entry = Entry;
|
|
1860
|
-
type Task = Task;
|
|
1861
|
-
type Pattern = Pattern;
|
|
1862
|
-
type FileSystemAdapter = FileSystemAdapter;
|
|
1863
|
-
function sync(source: Pattern | Pattern[], options: Options$1 & EntryObjectPredicate): Entry[];
|
|
1864
|
-
function sync(source: Pattern | Pattern[], options?: Options$1): string[];
|
|
1865
|
-
function stream(source: Pattern | Pattern[], options?: Options$1): NodeJS.ReadableStream;
|
|
1866
|
-
function generateTasks(source: Pattern | Pattern[], options?: Options$1): Task[];
|
|
1867
|
-
function isDynamicPattern(source: Pattern, options?: Options$1): boolean;
|
|
1868
|
-
function escapePath(source: Pattern): Pattern;
|
|
1869
|
-
}
|
|
3303
|
+
getRemotes(verbose: true, callback?: SimpleGitTaskCallback<RemoteWithRefs[]>): Response$2<RemoteWithRefs[]>;
|
|
1870
3304
|
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
3305
|
+
/**
|
|
3306
|
+
* Search for files matching the supplied search terms
|
|
3307
|
+
*/
|
|
3308
|
+
grep(searchTerm: string | GitGrepQuery, callback?: SimpleGitTaskCallback<GrepResult>): Response$2<GrepResult>;
|
|
3309
|
+
|
|
3310
|
+
grep(searchTerm: string | GitGrepQuery, options?: TaskOptions, callback?: SimpleGitTaskCallback<GrepResult>): Response$2<GrepResult>;
|
|
3311
|
+
|
|
3312
|
+
/**
|
|
3313
|
+
* List remotes by running the `ls-remote` command with any number of arbitrary options
|
|
3314
|
+
* in either array of object form.
|
|
3315
|
+
*/
|
|
3316
|
+
listRemote(args?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3317
|
+
|
|
3318
|
+
/**
|
|
3319
|
+
* Show commit logs from `HEAD` to the first commit.
|
|
3320
|
+
* If provided between `options.from` and `options.to` tags or branch.
|
|
3321
|
+
*
|
|
3322
|
+
* You can provide `options.file`, which is the path to a file in your repository. Then only this file will be considered.
|
|
3323
|
+
*
|
|
3324
|
+
* To use a custom splitter in the log format, set `options.splitter` to be the string the log should be split on.
|
|
3325
|
+
*
|
|
3326
|
+
* By default the following fields will be part of the result:
|
|
3327
|
+
* `hash`: full commit hash
|
|
3328
|
+
* `date`: author date, ISO 8601-like format
|
|
3329
|
+
* `message`: subject + ref names, like the --decorate option of git-log
|
|
3330
|
+
* `author_name`: author name
|
|
3331
|
+
* `author_email`: author mail
|
|
3332
|
+
* You can specify `options.format` to be an mapping from key to a format option like `%H` (for commit hash).
|
|
3333
|
+
* The fields specified in `options.format` will be the fields in the result.
|
|
3334
|
+
*
|
|
3335
|
+
* Options can also be supplied as a standard options object for adding custom properties supported by the git log command.
|
|
3336
|
+
* For any other set of options, supply options as an array of strings to be appended to the git log command.
|
|
3337
|
+
*
|
|
3338
|
+
* @returns Response<ListLogSummary>
|
|
3339
|
+
*
|
|
3340
|
+
* @see https://git-scm.com/docs/git-log
|
|
3341
|
+
*/
|
|
3342
|
+
log<T = DefaultLogFields>(options?: TaskOptions | LogOptions<T>, callback?: SimpleGitTaskCallback<LogResult<T>>): Response$2<LogResult<T>>;
|
|
3343
|
+
|
|
3344
|
+
/**
|
|
3345
|
+
* Mirror a git repo
|
|
3346
|
+
*
|
|
3347
|
+
* Equivalent to `git.clone(repoPath, localPath, ['--mirror'])`, `clone` allows
|
|
3348
|
+
* for additional task options.
|
|
3349
|
+
*/
|
|
3350
|
+
mirror(repoPath: string, localPath: string, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3351
|
+
|
|
3352
|
+
/**
|
|
3353
|
+
* Moves one or more files to a new destination.
|
|
3354
|
+
*
|
|
3355
|
+
* @see https://git-scm.com/docs/git-mv
|
|
3356
|
+
*/
|
|
3357
|
+
mv(from: string | string[], to: string, callback?: SimpleGitTaskCallback<MoveSummary>): Response$2<MoveSummary>;
|
|
3358
|
+
|
|
3359
|
+
/**
|
|
3360
|
+
* Fetch from and integrate with another repository or a local branch. In the case that the `git pull` fails with a
|
|
3361
|
+
* recognised fatal error, the exception thrown by this function will be a `GitResponseError<PullFailedResult>`.
|
|
3362
|
+
*/
|
|
3363
|
+
pull(remote?: string, branch?: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<PullResult>): Response$2<PullResult>;
|
|
3364
|
+
|
|
3365
|
+
pull(options?: TaskOptions, callback?: SimpleGitTaskCallback<PullResult>): Response$2<PullResult>;
|
|
3366
|
+
|
|
3367
|
+
pull(callback?: SimpleGitTaskCallback<PullResult>): Response$2<PullResult>;
|
|
3368
|
+
|
|
3369
|
+
/**
|
|
3370
|
+
* Pushes the current tag changes to a remote which can be either a URL or named remote. When not specified uses the
|
|
3371
|
+
* default configured remote spec.
|
|
3372
|
+
*/
|
|
3373
|
+
pushTags(remote: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<PushResult>): Response$2<PushResult>;
|
|
3374
|
+
|
|
3375
|
+
pushTags(options?: TaskOptions, callback?: SimpleGitTaskCallback<PushResult>): Response$2<PushResult>;
|
|
3376
|
+
|
|
3377
|
+
pushTags(callback?: SimpleGitTaskCallback<PushResult>): Response$2<PushResult>;
|
|
3378
|
+
|
|
3379
|
+
/**
|
|
3380
|
+
* Executes any command against the git binary.
|
|
3381
|
+
*/
|
|
3382
|
+
raw(commands: string | string[] | TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3383
|
+
|
|
3384
|
+
raw(options: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3385
|
+
|
|
3386
|
+
raw(...commands: string[]): Response$2<string>;
|
|
3387
|
+
|
|
3388
|
+
// leading varargs with trailing options/callback
|
|
3389
|
+
raw(a: string, options: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3390
|
+
|
|
3391
|
+
raw(a: string, b: string, options: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3392
|
+
|
|
3393
|
+
raw(a: string, b: string, c: string, options: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3394
|
+
|
|
3395
|
+
raw(a: string, b: string, c: string, d: string, options: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3396
|
+
|
|
3397
|
+
raw(a: string, b: string, c: string, d: string, e: string, options: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3398
|
+
|
|
3399
|
+
// leading varargs with trailing callback
|
|
3400
|
+
raw(a: string, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3401
|
+
|
|
3402
|
+
raw(a: string, b: string, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3403
|
+
|
|
3404
|
+
raw(a: string, b: string, c: string, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3405
|
+
|
|
3406
|
+
raw(a: string, b: string, c: string, d: string, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3407
|
+
|
|
3408
|
+
raw(a: string, b: string, c: string, d: string, e: string, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3409
|
+
|
|
3410
|
+
/**
|
|
3411
|
+
* Rebases the current working copy. Options can be supplied either as an array of string parameters
|
|
3412
|
+
* to be sent to the `git rebase` command, or a standard options object.
|
|
3413
|
+
*/
|
|
3414
|
+
rebase(options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3415
|
+
|
|
3416
|
+
rebase(callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3417
|
+
|
|
3418
|
+
/**
|
|
3419
|
+
* Call any `git remote` function with arguments passed as an array of strings.
|
|
3420
|
+
*/
|
|
3421
|
+
remote(options: string[], callback?: SimpleGitTaskCallback<void | string>): Response$2<void | string>;
|
|
3422
|
+
|
|
3423
|
+
/**
|
|
3424
|
+
* Removes an entry from the list of remotes.
|
|
3425
|
+
*
|
|
3426
|
+
* - remoteName Name of the repository - eg "upstream"
|
|
3427
|
+
*/
|
|
3428
|
+
removeRemote(remoteName: string, callback?: SimpleGitTaskCallback<void>): Response$2<void>;
|
|
3429
|
+
|
|
3430
|
+
/**
|
|
3431
|
+
* Reset a repo. Called without arguments this is a soft reset for the whole repo,
|
|
3432
|
+
* for explicitly setting the reset mode, supply the first argument as one of the
|
|
3433
|
+
* supported reset modes.
|
|
3434
|
+
*
|
|
3435
|
+
* Trailing options argument can be either a string array, or an extension of the
|
|
3436
|
+
* ResetOptions, use this argument for supplying arbitrary additional arguments,
|
|
3437
|
+
* such as restricting the pathspec.
|
|
3438
|
+
*
|
|
3439
|
+
* ```typescript
|
|
3440
|
+
// equivalent to each other
|
|
3441
|
+
simpleGit().reset(ResetMode.HARD, ['--', 'my-file.txt']);
|
|
3442
|
+
simpleGit().reset(['--hard', '--', 'my-file.txt']);
|
|
3443
|
+
simpleGit().reset(ResetMode.HARD, {'--': null, 'my-file.txt': null});
|
|
3444
|
+
simpleGit().reset({'--hard': null, '--': null, 'my-file.txt': null});
|
|
3445
|
+
```
|
|
3446
|
+
*/
|
|
3447
|
+
reset(mode: ResetMode, options?: TaskOptions<ResetOptions>, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3448
|
+
|
|
3449
|
+
reset(mode: ResetMode, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3450
|
+
|
|
3451
|
+
reset(options?: TaskOptions<ResetOptions>, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3452
|
+
|
|
3453
|
+
/**
|
|
3454
|
+
* Revert one or more commits in the local working copy
|
|
3455
|
+
*
|
|
3456
|
+
* - commit The commit to revert. Can be any hash, offset (eg: `HEAD~2`) or range (eg: `master~5..master~2`)
|
|
3457
|
+
*/
|
|
3458
|
+
revert(commit: String, options?: TaskOptions, callback?: SimpleGitTaskCallback<void>): Response$2<void>;
|
|
3459
|
+
|
|
3460
|
+
revert(commit: String, callback?: SimpleGitTaskCallback<void>): Response$2<void>;
|
|
3461
|
+
|
|
3462
|
+
/**
|
|
3463
|
+
* Passes the supplied options to `git rev-parse` and returns the string response. Options can be either a
|
|
3464
|
+
* string array or `Options` object of options compatible with the [rev-parse](https://git-scm.com/docs/git-rev-parse)
|
|
3465
|
+
*
|
|
3466
|
+
* Example uses of `rev-parse` include converting friendly commit references (ie: branch names) to SHA1 hashes
|
|
3467
|
+
* and retrieving meta details about the current repo (eg: the root directory, and whether it was created as
|
|
3468
|
+
* a bare repo).
|
|
3469
|
+
*/
|
|
3470
|
+
revparse(option: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3471
|
+
|
|
3472
|
+
revparse(options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3473
|
+
|
|
3474
|
+
/**
|
|
3475
|
+
* Removes the named files from source control.
|
|
3476
|
+
*/
|
|
3477
|
+
rm(paths: string | string[], callback?: SimpleGitTaskCallback<void>): Response$2<void>;
|
|
3478
|
+
|
|
3479
|
+
/**
|
|
3480
|
+
* Removes the named files from source control but keeps them on disk rather than deleting them entirely. To
|
|
3481
|
+
* completely remove the files, use `rm`.
|
|
3482
|
+
*/
|
|
3483
|
+
rmKeepLocal(paths: string | string[], callback?: SimpleGitTaskCallback<void>): Response$2<void>;
|
|
3484
|
+
|
|
3485
|
+
/**
|
|
3486
|
+
* Show various types of objects, for example the file at a certain commit
|
|
3487
|
+
*/
|
|
3488
|
+
show(option: string | TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3489
|
+
|
|
3490
|
+
show(callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3491
|
+
|
|
3492
|
+
/**
|
|
3493
|
+
* @deprecated
|
|
3494
|
+
*
|
|
3495
|
+
* From version 2.7.0, use of `silent` is deprecated in favour of using the `debug` library, this method will
|
|
3496
|
+
* be removed in version 3.x.
|
|
3497
|
+
*
|
|
3498
|
+
* Please see the [readme](https://github.com/steveukx/git-js/blob/master/readme.md#enable-logging) for more details.
|
|
3499
|
+
*
|
|
3500
|
+
* Disables/enables the use of the console for printing warnings and errors, by default messages are not shown in
|
|
3501
|
+
* a production environment.
|
|
3502
|
+
*
|
|
3503
|
+
* @param {boolean} silence
|
|
3504
|
+
*/
|
|
3505
|
+
silent(silence?: boolean): this;
|
|
3506
|
+
|
|
3507
|
+
/**
|
|
3508
|
+
* List the stash(s) of the local repo
|
|
3509
|
+
*/
|
|
3510
|
+
stashList(options?: TaskOptions, callback?: SimpleGitTaskCallback<LogResult>): Response$2<LogResult>;
|
|
3511
|
+
|
|
3512
|
+
stashList(callback?: SimpleGitTaskCallback<LogResult>): Response$2<LogResult>;
|
|
3513
|
+
|
|
3514
|
+
/**
|
|
3515
|
+
* Call any `git submodule` function with arguments passed as an array of strings.
|
|
3516
|
+
*/
|
|
3517
|
+
subModule(options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3518
|
+
|
|
3519
|
+
/**
|
|
3520
|
+
* Add a submodule
|
|
3521
|
+
*/
|
|
3522
|
+
submoduleAdd(repo: string, path: string, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3523
|
+
|
|
3524
|
+
/**
|
|
3525
|
+
* Initialise submodules
|
|
3526
|
+
*/
|
|
3527
|
+
submoduleInit(moduleName: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3528
|
+
|
|
3529
|
+
submoduleInit(moduleName: string, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3530
|
+
|
|
3531
|
+
submoduleInit(options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3532
|
+
|
|
3533
|
+
submoduleInit(callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3534
|
+
|
|
3535
|
+
/**
|
|
3536
|
+
* Update submodules
|
|
3537
|
+
*/
|
|
3538
|
+
submoduleUpdate(moduleName: string, options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3539
|
+
|
|
3540
|
+
submoduleUpdate(moduleName: string, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3541
|
+
|
|
3542
|
+
submoduleUpdate(options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3543
|
+
|
|
3544
|
+
submoduleUpdate(callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3545
|
+
|
|
3546
|
+
/**
|
|
3547
|
+
* List all tags. When using git 2.7.0 or above, include an options object with `"--sort": "property-name"` to
|
|
3548
|
+
* sort the tags by that property instead of using the default semantic versioning sort.
|
|
3549
|
+
*
|
|
3550
|
+
* Note, supplying this option when it is not supported by your Git version will cause the operation to fail.
|
|
3551
|
+
*/
|
|
3552
|
+
tag(options?: TaskOptions, callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
3553
|
+
|
|
3554
|
+
/**
|
|
3555
|
+
* Gets a list of tagged versions.
|
|
3556
|
+
*/
|
|
3557
|
+
tags(options?: TaskOptions, callback?: SimpleGitTaskCallback<TagResult>): Response$2<TagResult>;
|
|
3558
|
+
|
|
3559
|
+
tags(callback?: SimpleGitTaskCallback<TagResult>): Response$2<TagResult>;
|
|
3560
|
+
|
|
3561
|
+
/**
|
|
3562
|
+
* Updates repository server info
|
|
3563
|
+
*/
|
|
3564
|
+
updateServerInfo(callback?: SimpleGitTaskCallback<string>): Response$2<string>;
|
|
1905
3565
|
}
|
|
1906
3566
|
|
|
1907
|
-
|
|
1908
|
-
* Creates a temporary directory and ties its lifecycle ot the lifecycle of the callback.
|
|
1909
|
-
* @param callback - The callback that receives the temporary directory.
|
|
1910
|
-
*/
|
|
1911
|
-
declare function inTemporaryDirectory<T>(callback: (tmpDir: string) => T | Promise<T>): Promise<T>;
|
|
1912
|
-
/**
|
|
1913
|
-
* It reads a file and returns its content as a string using the
|
|
1914
|
-
* utf-8 encoding
|
|
1915
|
-
* @param path {string} Path to the file to read.
|
|
1916
|
-
* @returns {Promise<string>} A promise that resolves with the content of the file.
|
|
1917
|
-
*/
|
|
1918
|
-
declare function read(path: string): Promise<string>;
|
|
1919
|
-
/**
|
|
1920
|
-
* Copies a file
|
|
1921
|
-
* @param from {string} Path to the directory or file to be copied.
|
|
1922
|
-
* @param to {string} Destination path.
|
|
1923
|
-
*/
|
|
1924
|
-
declare function copy(from: string, to: string): Promise<void>;
|
|
1925
|
-
declare function write(path: string, data: string): Promise<void>;
|
|
1926
|
-
declare function append(path: string, data: string): Promise<void>;
|
|
1927
|
-
declare function mkdir(path: string): Promise<void>;
|
|
1928
|
-
declare function rmdir(path: string): Promise<void>;
|
|
1929
|
-
declare function mkTmpDir(): Promise<string>;
|
|
1930
|
-
declare function isDirectory(path: string): Promise<boolean>;
|
|
1931
|
-
/**
|
|
1932
|
-
* Moves a file.
|
|
1933
|
-
* @param src {string} File to be moved.
|
|
1934
|
-
* @param dest {string} Path to be moved to.
|
|
1935
|
-
* @param options {object} Moving options.
|
|
1936
|
-
*/
|
|
1937
|
-
declare function move(src: string, dest: string, options?: {
|
|
1938
|
-
overwrite?: boolean;
|
|
1939
|
-
}): Promise<void>;
|
|
1940
|
-
/**
|
|
1941
|
-
* Changes the permissions of a directory or file.
|
|
1942
|
-
* @param path {string} Path to the file or directory whose permissions will be modified.
|
|
1943
|
-
* @param mode {string | numbers} Permissions to set to the file or directory.
|
|
1944
|
-
*/
|
|
1945
|
-
declare function chmod(path: string, mode: number | string): Promise<void>;
|
|
1946
|
-
/**
|
|
1947
|
-
* Checks if a file has executable permissions.
|
|
1948
|
-
* @param path {string} Path to the file whose permissions will be checked.
|
|
1949
|
-
*/
|
|
1950
|
-
declare function hasExecutablePermissions(path: string): Promise<boolean>;
|
|
1951
|
-
/**
|
|
1952
|
-
* Returns true if a file or directory exists
|
|
1953
|
-
* @param path {string} Path to the directory or file.
|
|
1954
|
-
* @returns {boolean} True if it exists.
|
|
1955
|
-
*/
|
|
1956
|
-
declare function exists(path: string): Promise<boolean>;
|
|
3567
|
+
declare const factory: SimpleGitFactory;
|
|
1957
3568
|
|
|
1958
|
-
declare const
|
|
1959
|
-
declare
|
|
1960
|
-
declare const file_copy: typeof copy;
|
|
1961
|
-
declare const file_write: typeof write;
|
|
1962
|
-
declare const file_append: typeof append;
|
|
1963
|
-
declare const file_mkdir: typeof mkdir;
|
|
1964
|
-
declare const file_rmdir: typeof rmdir;
|
|
1965
|
-
declare const file_mkTmpDir: typeof mkTmpDir;
|
|
1966
|
-
declare const file_isDirectory: typeof isDirectory;
|
|
1967
|
-
declare const file_move: typeof move;
|
|
1968
|
-
declare const file_chmod: typeof chmod;
|
|
1969
|
-
declare const file_hasExecutablePermissions: typeof hasExecutablePermissions;
|
|
1970
|
-
declare const file_exists: typeof exists;
|
|
1971
|
-
declare namespace file {
|
|
3569
|
+
declare const git_factory: typeof factory;
|
|
3570
|
+
declare namespace git {
|
|
1972
3571
|
export {
|
|
1973
|
-
|
|
1974
|
-
file_read as read,
|
|
1975
|
-
file_copy as copy,
|
|
1976
|
-
file_write as write,
|
|
1977
|
-
file_append as append,
|
|
1978
|
-
file_mkdir as mkdir,
|
|
1979
|
-
file_rmdir as rmdir,
|
|
1980
|
-
file_mkTmpDir as mkTmpDir,
|
|
1981
|
-
file_isDirectory as isDirectory,
|
|
1982
|
-
file_move as move,
|
|
1983
|
-
file_chmod as chmod,
|
|
1984
|
-
file_hasExecutablePermissions as hasExecutablePermissions,
|
|
1985
|
-
file_exists as exists,
|
|
3572
|
+
git_factory as factory,
|
|
1986
3573
|
};
|
|
1987
3574
|
}
|
|
1988
3575
|
|
|
1989
3576
|
declare enum ContentTokenType {
|
|
1990
3577
|
Command = 0,
|
|
1991
3578
|
Path = 1,
|
|
1992
|
-
Link = 2
|
|
3579
|
+
Link = 2,
|
|
3580
|
+
Yellow = 3,
|
|
3581
|
+
Cyan = 4,
|
|
3582
|
+
Magenta = 5,
|
|
3583
|
+
Green = 6
|
|
1993
3584
|
}
|
|
1994
3585
|
interface ContentMetadata {
|
|
1995
3586
|
link?: string;
|
|
@@ -2004,6 +3595,10 @@ declare const token: {
|
|
|
2004
3595
|
command: (value: string) => ContentToken;
|
|
2005
3596
|
path: (value: string) => ContentToken;
|
|
2006
3597
|
link: (value: string, link: string) => ContentToken;
|
|
3598
|
+
cyan: (value: string) => ContentToken;
|
|
3599
|
+
yellow: (value: string) => ContentToken;
|
|
3600
|
+
magenta: (value: string) => ContentToken;
|
|
3601
|
+
green: (value: string) => ContentToken;
|
|
2007
3602
|
};
|
|
2008
3603
|
declare class TokenizedString {
|
|
2009
3604
|
value: string;
|
|
@@ -2060,8 +3655,18 @@ declare const newline: () => void;
|
|
|
2060
3655
|
*/
|
|
2061
3656
|
declare const error: (content: Fatal) => void;
|
|
2062
3657
|
declare function stringifyMessage(message: Message): string;
|
|
3658
|
+
/**
|
|
3659
|
+
* Use this function when you have multiple concurrent processes that send data events
|
|
3660
|
+
* and we need to output them ensuring that they can visually differenciated by the user.
|
|
3661
|
+
*
|
|
3662
|
+
* @param index {number} The index of the process being run. This is used to determine the color.
|
|
3663
|
+
* @param prefix {string} The prefix to include in the standard output data to differenciate logs.
|
|
3664
|
+
* @param process The callback that's called with a Writable instance to send events through.
|
|
3665
|
+
*/
|
|
3666
|
+
declare function concurrent(index: number, prefix: string, callback: (stdout: Writable, stderr: Writable) => Promise<void>): Promise<void>;
|
|
2063
3667
|
|
|
2064
3668
|
declare const output$1_token: typeof token;
|
|
3669
|
+
type output$1_Message = Message;
|
|
2065
3670
|
declare const output$1_content: typeof content;
|
|
2066
3671
|
type output$1_LogLevel = LogLevel;
|
|
2067
3672
|
declare const output$1_currentLogLevel: typeof currentLogLevel;
|
|
@@ -2073,9 +3678,11 @@ declare const output$1_warn: typeof warn;
|
|
|
2073
3678
|
declare const output$1_newline: typeof newline;
|
|
2074
3679
|
declare const output$1_error: typeof error;
|
|
2075
3680
|
declare const output$1_stringifyMessage: typeof stringifyMessage;
|
|
3681
|
+
declare const output$1_concurrent: typeof concurrent;
|
|
2076
3682
|
declare namespace output$1 {
|
|
2077
3683
|
export {
|
|
2078
3684
|
output$1_token as token,
|
|
3685
|
+
output$1_Message as Message,
|
|
2079
3686
|
output$1_content as content,
|
|
2080
3687
|
output$1_LogLevel as LogLevel,
|
|
2081
3688
|
output$1_currentLogLevel as currentLogLevel,
|
|
@@ -2087,6 +3694,7 @@ declare namespace output$1 {
|
|
|
2087
3694
|
output$1_newline as newline,
|
|
2088
3695
|
output$1_error as error,
|
|
2089
3696
|
output$1_stringifyMessage as stringifyMessage,
|
|
3697
|
+
output$1_concurrent as concurrent,
|
|
2090
3698
|
};
|
|
2091
3699
|
}
|
|
2092
3700
|
|
|
@@ -2106,9 +3714,10 @@ declare function dependencyManagerUsedForCreating(env?: NodeJS.ProcessEnv): Depe
|
|
|
2106
3714
|
* Installs the dependencies in the given directory.
|
|
2107
3715
|
* @param directory {string} The directory that contains the package.json
|
|
2108
3716
|
* @param dependencyManager {DependencyManager} The dependency manager to use to install the dependencies.
|
|
2109
|
-
* @
|
|
3717
|
+
* @param stdout {Writable} Standard output stream.
|
|
3718
|
+
* @returns stderr {Writable} Standard error stream.
|
|
2110
3719
|
*/
|
|
2111
|
-
declare function install(directory: string, dependencyManager: DependencyManager, stdout?: Writable): Promise<void>;
|
|
3720
|
+
declare function install(directory: string, dependencyManager: DependencyManager, stdout?: Writable, stderr?: Writable): Promise<void>;
|
|
2112
3721
|
|
|
2113
3722
|
type dependency_DependencyManager = DependencyManager;
|
|
2114
3723
|
declare const dependency_DependencyManager: typeof DependencyManager;
|
|
@@ -2355,6 +3964,9 @@ declare namespace session {
|
|
|
2355
3964
|
};
|
|
2356
3965
|
}
|
|
2357
3966
|
|
|
3967
|
+
declare type Primitive = string | number | bigint | boolean | null | undefined;
|
|
3968
|
+
declare type Scalars = Primitive | Primitive[];
|
|
3969
|
+
|
|
2358
3970
|
declare namespace util {
|
|
2359
3971
|
type AssertEqual<T, Expected> = [T] extends [Expected] ? [Expected] extends [T] ? true : false : false;
|
|
2360
3972
|
function assertNever(_x: never): never;
|
|
@@ -2378,6 +3990,7 @@ declare const ZodIssueCode: {
|
|
|
2378
3990
|
invalid_type: "invalid_type";
|
|
2379
3991
|
custom: "custom";
|
|
2380
3992
|
invalid_union: "invalid_union";
|
|
3993
|
+
invalid_union_discriminator: "invalid_union_discriminator";
|
|
2381
3994
|
invalid_enum_value: "invalid_enum_value";
|
|
2382
3995
|
unrecognized_keys: "unrecognized_keys";
|
|
2383
3996
|
invalid_arguments: "invalid_arguments";
|
|
@@ -2407,6 +4020,10 @@ interface ZodInvalidUnionIssue extends ZodIssueBase {
|
|
|
2407
4020
|
code: typeof ZodIssueCode.invalid_union;
|
|
2408
4021
|
unionErrors: ZodError[];
|
|
2409
4022
|
}
|
|
4023
|
+
interface ZodInvalidUnionDiscriminatorIssue extends ZodIssueBase {
|
|
4024
|
+
code: typeof ZodIssueCode.invalid_union_discriminator;
|
|
4025
|
+
options: Primitive[];
|
|
4026
|
+
}
|
|
2410
4027
|
interface ZodInvalidEnumValueIssue extends ZodIssueBase {
|
|
2411
4028
|
code: typeof ZodIssueCode.invalid_enum_value;
|
|
2412
4029
|
options: (string | number)[];
|
|
@@ -2431,13 +4048,13 @@ interface ZodTooSmallIssue extends ZodIssueBase {
|
|
|
2431
4048
|
code: typeof ZodIssueCode.too_small;
|
|
2432
4049
|
minimum: number;
|
|
2433
4050
|
inclusive: boolean;
|
|
2434
|
-
type: "array" | "string" | "number";
|
|
4051
|
+
type: "array" | "string" | "number" | "set";
|
|
2435
4052
|
}
|
|
2436
4053
|
interface ZodTooBigIssue extends ZodIssueBase {
|
|
2437
4054
|
code: typeof ZodIssueCode.too_big;
|
|
2438
4055
|
maximum: number;
|
|
2439
4056
|
inclusive: boolean;
|
|
2440
|
-
type: "array" | "string" | "number";
|
|
4057
|
+
type: "array" | "string" | "number" | "set";
|
|
2441
4058
|
}
|
|
2442
4059
|
interface ZodInvalidIntersectionTypesIssue extends ZodIssueBase {
|
|
2443
4060
|
code: typeof ZodIssueCode.invalid_intersection_types;
|
|
@@ -2455,7 +4072,7 @@ interface ZodCustomIssue extends ZodIssueBase {
|
|
|
2455
4072
|
declare type DenormalizedError = {
|
|
2456
4073
|
[k: string]: DenormalizedError | string[];
|
|
2457
4074
|
};
|
|
2458
|
-
declare type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodCustomIssue;
|
|
4075
|
+
declare type ZodIssueOptionalMessage = ZodInvalidTypeIssue | ZodUnrecognizedKeysIssue | ZodInvalidUnionIssue | ZodInvalidUnionDiscriminatorIssue | ZodInvalidEnumValueIssue | ZodInvalidArgumentsIssue | ZodInvalidReturnTypeIssue | ZodInvalidDateIssue | ZodInvalidStringIssue | ZodTooSmallIssue | ZodTooBigIssue | ZodInvalidIntersectionTypesIssue | ZodNotMultipleOfIssue | ZodCustomIssue;
|
|
2459
4076
|
declare type ZodIssue = ZodIssueOptionalMessage & {
|
|
2460
4077
|
message: string;
|
|
2461
4078
|
};
|
|
@@ -2478,7 +4095,13 @@ declare class ZodError<T = any> extends Error {
|
|
|
2478
4095
|
get isEmpty(): boolean;
|
|
2479
4096
|
addIssue: (sub: ZodIssue) => void;
|
|
2480
4097
|
addIssues: (subs?: ZodIssue[]) => void;
|
|
2481
|
-
flatten
|
|
4098
|
+
flatten(mapper?: (issue: ZodIssue) => string): {
|
|
4099
|
+
formErrors: string[];
|
|
4100
|
+
fieldErrors: {
|
|
4101
|
+
[k: string]: string[];
|
|
4102
|
+
};
|
|
4103
|
+
};
|
|
4104
|
+
flatten<U>(mapper?: (issue: ZodIssue) => U): {
|
|
2482
4105
|
formErrors: U[];
|
|
2483
4106
|
fieldErrors: {
|
|
2484
4107
|
[k: string]: U[];
|
|
@@ -2533,7 +4156,7 @@ declare const ZodParsedType: {
|
|
|
2533
4156
|
set: "set";
|
|
2534
4157
|
};
|
|
2535
4158
|
declare type ZodParsedType = keyof typeof ZodParsedType;
|
|
2536
|
-
declare const getParsedType: (data: any
|
|
4159
|
+
declare const getParsedType: (data: any) => ZodParsedType;
|
|
2537
4160
|
declare const makeIssue: (params: {
|
|
2538
4161
|
data: any;
|
|
2539
4162
|
path: (string | number)[];
|
|
@@ -2549,13 +4172,15 @@ declare type ParsePathComponent = string | number;
|
|
|
2549
4172
|
declare type ParsePath = ParsePathComponent[];
|
|
2550
4173
|
declare const EMPTY_PATH: ParsePath;
|
|
2551
4174
|
interface ParseContext {
|
|
4175
|
+
readonly common: {
|
|
4176
|
+
readonly issues: ZodIssue[];
|
|
4177
|
+
readonly contextualErrorMap?: ZodErrorMap;
|
|
4178
|
+
readonly async: boolean;
|
|
4179
|
+
readonly typeCache: Map<any, ZodParsedType> | undefined;
|
|
4180
|
+
};
|
|
2552
4181
|
readonly path: ParsePath;
|
|
2553
|
-
readonly issues: ZodIssue[];
|
|
2554
4182
|
readonly schemaErrorMap?: ZodErrorMap;
|
|
2555
|
-
readonly contextualErrorMap?: ZodErrorMap;
|
|
2556
|
-
readonly async: boolean;
|
|
2557
4183
|
readonly parent: ParseContext | null;
|
|
2558
|
-
readonly typeCache: Map<any, ZodParsedType>;
|
|
2559
4184
|
readonly data: any;
|
|
2560
4185
|
readonly parsedType: ZodParsedType;
|
|
2561
4186
|
}
|
|
@@ -2639,6 +4264,14 @@ declare type ZodTypeAny = ZodType<any, any, any>;
|
|
|
2639
4264
|
declare type TypeOf<T extends ZodType<any, any, any>> = T["_output"];
|
|
2640
4265
|
declare type input<T extends ZodType<any, any, any>> = T["_input"];
|
|
2641
4266
|
declare type output<T extends ZodType<any, any, any>> = T["_output"];
|
|
4267
|
+
declare type allKeys<T> = T extends any ? keyof T : never;
|
|
4268
|
+
declare type TypeOfFlattenedError<T extends ZodType<any, any, any>, U = string> = {
|
|
4269
|
+
formErrors: U[];
|
|
4270
|
+
fieldErrors: {
|
|
4271
|
+
[P in allKeys<TypeOf<T>>]?: U[];
|
|
4272
|
+
};
|
|
4273
|
+
};
|
|
4274
|
+
declare type TypeOfFormErrors<T extends ZodType<any, any, any>> = TypeOfFlattenedError<T>;
|
|
2642
4275
|
|
|
2643
4276
|
declare type CustomErrorParams = Partial<util.Omit<ZodCustomIssue, "code">>;
|
|
2644
4277
|
interface ZodTypeDef {
|
|
@@ -2660,13 +4293,15 @@ declare type SafeParseError<Input> = {
|
|
|
2660
4293
|
error: ZodError<Input>;
|
|
2661
4294
|
};
|
|
2662
4295
|
declare type SafeParseReturnType<Input, Output> = SafeParseSuccess<Output> | SafeParseError<Input>;
|
|
2663
|
-
declare abstract class ZodType<Output, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {
|
|
4296
|
+
declare abstract class ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {
|
|
2664
4297
|
readonly _type: Output;
|
|
2665
4298
|
readonly _output: Output;
|
|
2666
4299
|
readonly _input: Input;
|
|
2667
4300
|
readonly _def: Def;
|
|
2668
4301
|
get description(): string | undefined;
|
|
2669
4302
|
abstract _parse(input: ParseInput): ParseReturnType<Output>;
|
|
4303
|
+
_getType(input: ParseInput): string;
|
|
4304
|
+
_getOrReturnCtx(input: ParseInput, ctx?: ParseContext | undefined): ParseContext;
|
|
2670
4305
|
_processInputParams(input: ParseInput): {
|
|
2671
4306
|
status: ParseStatus;
|
|
2672
4307
|
ctx: ParseContext;
|
|
@@ -2679,10 +4314,6 @@ declare abstract class ZodType<Output, Def extends ZodTypeDef = ZodTypeDef, Inpu
|
|
|
2679
4314
|
safeParseAsync(data: unknown, params?: Partial<ParseParams>): Promise<SafeParseReturnType<Input, Output>>;
|
|
2680
4315
|
/** Alias of safeParseAsync */
|
|
2681
4316
|
spa: (data: unknown, params?: Partial<ParseParams> | undefined) => Promise<SafeParseReturnType<Input, Output>>;
|
|
2682
|
-
/** The .is method has been removed in Zod 3. For details see https://github.com/colinhacks/zod/tree/v3. */
|
|
2683
|
-
is: never;
|
|
2684
|
-
/** The .check method has been removed in Zod 3. For details see https://github.com/colinhacks/zod/tree/v3. */
|
|
2685
|
-
check: never;
|
|
2686
4317
|
refine<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, RefinedOutput, RefinedOutput>;
|
|
2687
4318
|
refine(check: (arg: Output) => unknown | Promise<unknown>, message?: string | CustomErrorParams | ((arg: Output) => CustomErrorParams)): ZodEffects<this, Output, Input>;
|
|
2688
4319
|
refinement<RefinedOutput extends Output>(check: (arg: Output) => arg is RefinedOutput, refinementData: IssueData | ((arg: Output, ctx: RefinementCtx) => IssueData)): ZodEffects<this, RefinedOutput, RefinedOutput>;
|
|
@@ -2899,7 +4530,9 @@ declare namespace objectUtil {
|
|
|
2899
4530
|
type optionalKeys<T extends object> = {
|
|
2900
4531
|
[k in keyof T]: undefined extends T[k] ? k : never;
|
|
2901
4532
|
}[keyof T];
|
|
2902
|
-
type requiredKeys<T extends object> =
|
|
4533
|
+
type requiredKeys<T extends object> = {
|
|
4534
|
+
[k in keyof T]: undefined extends T[k] ? never : k;
|
|
4535
|
+
}[keyof T];
|
|
2903
4536
|
export type addQuestionMarks<T extends object> = {
|
|
2904
4537
|
[k in optionalKeys<T>]?: T[k];
|
|
2905
4538
|
} & {
|
|
@@ -2924,8 +4557,6 @@ declare type extendShape<A, B> = {
|
|
|
2924
4557
|
[k in keyof B]: B[k];
|
|
2925
4558
|
};
|
|
2926
4559
|
declare type UnknownKeysParam = "passthrough" | "strict" | "strip";
|
|
2927
|
-
declare type Primitive = string | number | bigint | boolean | null | undefined;
|
|
2928
|
-
declare type Scalars = Primitive | Primitive[];
|
|
2929
4560
|
interface ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
2930
4561
|
typeName: ZodFirstPartyTypeKind.ZodObject;
|
|
2931
4562
|
shape: () => T;
|
|
@@ -3004,15 +4635,46 @@ declare class ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysPa
|
|
|
3004
4635
|
static lazycreate: <T_1 extends ZodRawShape>(shape: () => T_1, params?: RawCreateParams) => ZodObject<T_1, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T_1]: T_1[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T_1]: T_1[k_2]["_input"]; }>[k_3]; }>;
|
|
3005
4636
|
}
|
|
3006
4637
|
declare type AnyZodObject = ZodObject<any, any, any>;
|
|
3007
|
-
declare type ZodUnionOptions = [ZodTypeAny, ...ZodTypeAny[]]
|
|
3008
|
-
interface ZodUnionDef<T extends ZodUnionOptions = [
|
|
4638
|
+
declare type ZodUnionOptions = Readonly<[ZodTypeAny, ...ZodTypeAny[]]>;
|
|
4639
|
+
interface ZodUnionDef<T extends ZodUnionOptions = Readonly<[
|
|
4640
|
+
ZodTypeAny,
|
|
4641
|
+
ZodTypeAny,
|
|
4642
|
+
...ZodTypeAny[]
|
|
4643
|
+
]>> extends ZodTypeDef {
|
|
3009
4644
|
options: T;
|
|
3010
4645
|
typeName: ZodFirstPartyTypeKind.ZodUnion;
|
|
3011
4646
|
}
|
|
3012
4647
|
declare class ZodUnion<T extends ZodUnionOptions> extends ZodType<T[number]["_output"], ZodUnionDef<T>, T[number]["_input"]> {
|
|
3013
4648
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
3014
4649
|
get options(): T;
|
|
3015
|
-
static create: <T_1 extends [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T_1, params?: RawCreateParams) => ZodUnion<T_1>;
|
|
4650
|
+
static create: <T_1 extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T_1, params?: RawCreateParams) => ZodUnion<T_1>;
|
|
4651
|
+
}
|
|
4652
|
+
declare type ZodDiscriminatedUnionOption<Discriminator extends string, DiscriminatorValue extends Primitive> = ZodObject<{
|
|
4653
|
+
[key in Discriminator]: ZodLiteral<DiscriminatorValue>;
|
|
4654
|
+
} & ZodRawShape, any, any>;
|
|
4655
|
+
interface ZodDiscriminatedUnionDef<Discriminator extends string, DiscriminatorValue extends Primitive, Option extends ZodDiscriminatedUnionOption<Discriminator, DiscriminatorValue>> extends ZodTypeDef {
|
|
4656
|
+
discriminator: Discriminator;
|
|
4657
|
+
options: Map<DiscriminatorValue, Option>;
|
|
4658
|
+
typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion;
|
|
4659
|
+
}
|
|
4660
|
+
declare class ZodDiscriminatedUnion<Discriminator extends string, DiscriminatorValue extends Primitive, Option extends ZodDiscriminatedUnionOption<Discriminator, DiscriminatorValue>> extends ZodType<Option["_output"], ZodDiscriminatedUnionDef<Discriminator, DiscriminatorValue, Option>, Option["_input"]> {
|
|
4661
|
+
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
4662
|
+
get discriminator(): Discriminator;
|
|
4663
|
+
get validDiscriminatorValues(): DiscriminatorValue[];
|
|
4664
|
+
get options(): Map<DiscriminatorValue, Option>;
|
|
4665
|
+
/**
|
|
4666
|
+
* The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.
|
|
4667
|
+
* However, it only allows a union of objects, all of which need to share a discriminator property. This property must
|
|
4668
|
+
* have a different value for each object in the union.
|
|
4669
|
+
* @param discriminator the name of the discriminator property
|
|
4670
|
+
* @param types an array of object schemas
|
|
4671
|
+
* @param params
|
|
4672
|
+
*/
|
|
4673
|
+
static create<Discriminator extends string, DiscriminatorValue extends Primitive, Types extends [
|
|
4674
|
+
ZodDiscriminatedUnionOption<Discriminator, DiscriminatorValue>,
|
|
4675
|
+
ZodDiscriminatedUnionOption<Discriminator, DiscriminatorValue>,
|
|
4676
|
+
...ZodDiscriminatedUnionOption<Discriminator, DiscriminatorValue>[]
|
|
4677
|
+
]>(discriminator: Discriminator, types: Types, params?: RawCreateParams): ZodDiscriminatedUnion<Discriminator, DiscriminatorValue, Types[number]>;
|
|
3016
4678
|
}
|
|
3017
4679
|
interface ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
3018
4680
|
left: T;
|
|
@@ -3024,7 +4686,7 @@ declare class ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> extend
|
|
|
3024
4686
|
static create: <T_1 extends ZodTypeAny, U_1 extends ZodTypeAny>(left: T_1, right: U_1, params?: RawCreateParams) => ZodIntersection<T_1, U_1>;
|
|
3025
4687
|
}
|
|
3026
4688
|
declare type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];
|
|
3027
|
-
declare type AssertArray<T
|
|
4689
|
+
declare type AssertArray<T> = T extends any[] ? T : never;
|
|
3028
4690
|
declare type OutputTypeOfTuple<T extends ZodTupleItems | []> = AssertArray<{
|
|
3029
4691
|
[k in keyof T]: T[k] extends ZodType<any, any> ? T[k]["_output"] : never;
|
|
3030
4692
|
}>;
|
|
@@ -3050,7 +4712,8 @@ interface ZodRecordDef<Key extends KeySchema = ZodString, Value extends ZodTypeA
|
|
|
3050
4712
|
typeName: ZodFirstPartyTypeKind.ZodRecord;
|
|
3051
4713
|
}
|
|
3052
4714
|
declare type KeySchema = ZodType<string | number | symbol, any, any>;
|
|
3053
|
-
declare
|
|
4715
|
+
declare type RecordType<K extends string | number | symbol, V> = [string] extends [K] ? Record<K, V> : [number] extends [K] ? Record<K, V> : [symbol] extends [K] ? Record<K, V> : Partial<Record<K, V>>;
|
|
4716
|
+
declare class ZodRecord<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> extends ZodType<RecordType<Key["_output"], Value["_output"]>, ZodRecordDef<Key, Value>, RecordType<Key["_input"], Value["_input"]>> {
|
|
3054
4717
|
get keySchema(): Key;
|
|
3055
4718
|
get valueSchema(): Value;
|
|
3056
4719
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
@@ -3070,9 +4733,21 @@ declare class ZodMap<Key extends ZodTypeAny = ZodTypeAny, Value extends ZodTypeA
|
|
|
3070
4733
|
interface ZodSetDef<Value extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
3071
4734
|
valueType: Value;
|
|
3072
4735
|
typeName: ZodFirstPartyTypeKind.ZodSet;
|
|
4736
|
+
minSize: {
|
|
4737
|
+
value: number;
|
|
4738
|
+
message?: string;
|
|
4739
|
+
} | null;
|
|
4740
|
+
maxSize: {
|
|
4741
|
+
value: number;
|
|
4742
|
+
message?: string;
|
|
4743
|
+
} | null;
|
|
3073
4744
|
}
|
|
3074
4745
|
declare class ZodSet<Value extends ZodTypeAny = ZodTypeAny> extends ZodType<Set<Value["_output"]>, ZodSetDef<Value>, Set<Value["_input"]>> {
|
|
3075
4746
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
4747
|
+
min(minSize: number, message?: errorUtil.ErrMessage): this;
|
|
4748
|
+
max(maxSize: number, message?: errorUtil.ErrMessage): this;
|
|
4749
|
+
size(size: number, message?: errorUtil.ErrMessage): this;
|
|
4750
|
+
nonempty(message?: errorUtil.ErrMessage): ZodSet<Value>;
|
|
3076
4751
|
static create: <Value_1 extends ZodTypeAny = ZodTypeAny>(valueType: Value_1, params?: RawCreateParams) => ZodSet<Value_1>;
|
|
3077
4752
|
}
|
|
3078
4753
|
interface ZodFunctionDef<Args extends ZodTuple<any, any> = ZodTuple<any, any>, Returns extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
@@ -3102,11 +4777,11 @@ declare class ZodLazy<T extends ZodTypeAny> extends ZodType<output<T>, ZodLazyDe
|
|
|
3102
4777
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
3103
4778
|
static create: <T_1 extends ZodTypeAny>(getter: () => T_1, params?: RawCreateParams) => ZodLazy<T_1>;
|
|
3104
4779
|
}
|
|
3105
|
-
interface ZodLiteralDef<T
|
|
4780
|
+
interface ZodLiteralDef<T = any> extends ZodTypeDef {
|
|
3106
4781
|
value: T;
|
|
3107
4782
|
typeName: ZodFirstPartyTypeKind.ZodLiteral;
|
|
3108
4783
|
}
|
|
3109
|
-
declare class ZodLiteral<T
|
|
4784
|
+
declare class ZodLiteral<T> extends ZodType<T, ZodLiteralDef<T>> {
|
|
3110
4785
|
_parse(input: ParseInput): ParseReturnType<this["_output"]>;
|
|
3111
4786
|
get value(): T;
|
|
3112
4787
|
static create: <T_1 extends Primitive>(value: T_1, params?: RawCreateParams) => ZodLiteral<T_1>;
|
|
@@ -3144,6 +4819,7 @@ declare type EnumLike = {
|
|
|
3144
4819
|
};
|
|
3145
4820
|
declare class ZodNativeEnum<T extends EnumLike> extends ZodType<T[keyof T], ZodNativeEnumDef<T>> {
|
|
3146
4821
|
_parse(input: ParseInput): ParseReturnType<T[keyof T]>;
|
|
4822
|
+
get enum(): T;
|
|
3147
4823
|
static create: <T_1 extends EnumLike>(values: T_1, params?: RawCreateParams) => ZodNativeEnum<T_1>;
|
|
3148
4824
|
}
|
|
3149
4825
|
interface ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|
|
@@ -3211,6 +4887,13 @@ declare class ZodDefault<T extends ZodTypeAny> extends ZodType<util.noUndefined<
|
|
|
3211
4887
|
removeDefault(): T;
|
|
3212
4888
|
static create: <T_1 extends ZodTypeAny>(type: T_1, params?: RawCreateParams) => ZodOptional<T_1>;
|
|
3213
4889
|
}
|
|
4890
|
+
interface ZodNaNDef extends ZodTypeDef {
|
|
4891
|
+
typeName: ZodFirstPartyTypeKind.ZodNaN;
|
|
4892
|
+
}
|
|
4893
|
+
declare class ZodNaN extends ZodType<number, ZodNaNDef> {
|
|
4894
|
+
_parse(input: ParseInput): ParseReturnType<any>;
|
|
4895
|
+
static create: (params?: RawCreateParams) => ZodNaN;
|
|
4896
|
+
}
|
|
3214
4897
|
declare const custom: <T>(check?: ((data: unknown) => any) | undefined, params?: Parameters<ZodTypeAny["refine"]>[1]) => ZodType<T, ZodTypeDef, T>;
|
|
3215
4898
|
|
|
3216
4899
|
declare const late: {
|
|
@@ -3219,6 +4902,7 @@ declare const late: {
|
|
|
3219
4902
|
declare enum ZodFirstPartyTypeKind {
|
|
3220
4903
|
ZodString = "ZodString",
|
|
3221
4904
|
ZodNumber = "ZodNumber",
|
|
4905
|
+
ZodNaN = "ZodNaN",
|
|
3222
4906
|
ZodBigInt = "ZodBigInt",
|
|
3223
4907
|
ZodBoolean = "ZodBoolean",
|
|
3224
4908
|
ZodDate = "ZodDate",
|
|
@@ -3231,6 +4915,7 @@ declare enum ZodFirstPartyTypeKind {
|
|
|
3231
4915
|
ZodArray = "ZodArray",
|
|
3232
4916
|
ZodObject = "ZodObject",
|
|
3233
4917
|
ZodUnion = "ZodUnion",
|
|
4918
|
+
ZodDiscriminatedUnion = "ZodDiscriminatedUnion",
|
|
3234
4919
|
ZodIntersection = "ZodIntersection",
|
|
3235
4920
|
ZodTuple = "ZodTuple",
|
|
3236
4921
|
ZodRecord = "ZodRecord",
|
|
@@ -3247,10 +4932,11 @@ declare enum ZodFirstPartyTypeKind {
|
|
|
3247
4932
|
ZodDefault = "ZodDefault",
|
|
3248
4933
|
ZodPromise = "ZodPromise"
|
|
3249
4934
|
}
|
|
3250
|
-
declare type ZodFirstPartySchemaTypes = ZodString | ZodNumber | ZodBigInt | ZodBoolean | ZodDate | ZodUndefined | ZodNull | ZodAny | ZodUnknown | ZodNever | ZodVoid | ZodArray<any, any> | ZodObject<any, any, any, any, any> | ZodUnion<any> | ZodIntersection<any, any> | ZodTuple<any, any> | ZodRecord<any, any> | ZodMap<any> | ZodSet<any> | ZodFunction<any, any> | ZodLazy<any> | ZodLiteral<any> | ZodEnum<any> | ZodEffects<any, any, any> | ZodNativeEnum<any> | ZodOptional<any> | ZodNullable<any> | ZodDefault<any> | ZodPromise<any>;
|
|
4935
|
+
declare type ZodFirstPartySchemaTypes = ZodString | ZodNumber | ZodNaN | ZodBigInt | ZodBoolean | ZodDate | ZodUndefined | ZodNull | ZodAny | ZodUnknown | ZodNever | ZodVoid | ZodArray<any, any> | ZodObject<any, any, any, any, any> | ZodUnion<any> | ZodDiscriminatedUnion<any, any, any> | ZodIntersection<any, any> | ZodTuple<any, any> | ZodRecord<any, any> | ZodMap<any> | ZodSet<any> | ZodFunction<any, any> | ZodLazy<any> | ZodLiteral<any> | ZodEnum<any> | ZodEffects<any, any, any> | ZodNativeEnum<any> | ZodOptional<any> | ZodNullable<any> | ZodDefault<any> | ZodPromise<any>;
|
|
3251
4936
|
declare const instanceOfType: <T extends new (...args: any[]) => any>(cls: T, params?: Parameters<ZodTypeAny["refine"]>[1]) => ZodType<InstanceType<T>, ZodTypeDef, InstanceType<T>>;
|
|
3252
4937
|
declare const stringType: (params?: RawCreateParams) => ZodString;
|
|
3253
4938
|
declare const numberType: (params?: RawCreateParams) => ZodNumber;
|
|
4939
|
+
declare const nanType: (params?: RawCreateParams) => ZodNaN;
|
|
3254
4940
|
declare const bigIntType: (params?: RawCreateParams) => ZodBigInt;
|
|
3255
4941
|
declare const booleanType: (params?: RawCreateParams) => ZodBoolean;
|
|
3256
4942
|
declare const dateType: (params?: RawCreateParams) => ZodDate;
|
|
@@ -3263,7 +4949,8 @@ declare const voidType: (params?: RawCreateParams) => ZodVoid;
|
|
|
3263
4949
|
declare const arrayType: <T extends ZodTypeAny>(schema: T, params?: RawCreateParams) => ZodArray<T, "many">;
|
|
3264
4950
|
declare const objectType: <T extends ZodRawShape>(shape: T, params?: RawCreateParams) => ZodObject<T, "strip", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T]: T[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T]: T[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T]: T[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T]: T[k_2]["_input"]; }>[k_3]; }>;
|
|
3265
4951
|
declare const strictObjectType: <T extends ZodRawShape>(shape: T, params?: RawCreateParams) => ZodObject<T, "strict", ZodTypeAny, { [k_1 in keyof objectUtil.addQuestionMarks<{ [k in keyof T]: T[k]["_output"]; }>]: objectUtil.addQuestionMarks<{ [k in keyof T]: T[k]["_output"]; }>[k_1]; }, { [k_3 in keyof objectUtil.addQuestionMarks<{ [k_2 in keyof T]: T[k_2]["_input"]; }>]: objectUtil.addQuestionMarks<{ [k_2 in keyof T]: T[k_2]["_input"]; }>[k_3]; }>;
|
|
3266
|
-
declare const unionType: <T extends [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T, params?: RawCreateParams) => ZodUnion<T>;
|
|
4952
|
+
declare const unionType: <T extends readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]>(types: T, params?: RawCreateParams) => ZodUnion<T>;
|
|
4953
|
+
declare const discriminatedUnionType: typeof ZodDiscriminatedUnion.create;
|
|
3267
4954
|
declare const intersectionType: <T extends ZodTypeAny, U extends ZodTypeAny>(left: T, right: U, params?: RawCreateParams) => ZodIntersection<T, U>;
|
|
3268
4955
|
declare const tupleType: <T extends [ZodTypeAny, ...ZodTypeAny[]] | []>(schemas: T, params?: RawCreateParams) => ZodTuple<T, null>;
|
|
3269
4956
|
declare const recordType: typeof ZodRecord.create;
|
|
@@ -3283,225 +4970,241 @@ declare const ostring: () => ZodOptional<ZodString>;
|
|
|
3283
4970
|
declare const onumber: () => ZodOptional<ZodNumber>;
|
|
3284
4971
|
declare const oboolean: () => ZodOptional<ZodBoolean>;
|
|
3285
4972
|
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
type
|
|
3292
|
-
|
|
3293
|
-
type
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
type
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
type
|
|
3300
|
-
declare const
|
|
3301
|
-
|
|
3302
|
-
declare const
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
type
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
declare const
|
|
3309
|
-
declare const
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
declare const
|
|
3313
|
-
declare const
|
|
3314
|
-
declare const
|
|
3315
|
-
type
|
|
3316
|
-
type
|
|
3317
|
-
type
|
|
3318
|
-
type
|
|
3319
|
-
type
|
|
3320
|
-
type
|
|
3321
|
-
type
|
|
3322
|
-
type
|
|
3323
|
-
type
|
|
3324
|
-
type
|
|
3325
|
-
type
|
|
3326
|
-
type
|
|
3327
|
-
|
|
3328
|
-
type
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
type
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
type
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
type
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
type
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
type
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
type
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
type
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
type
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
type
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
type
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
type
|
|
3362
|
-
|
|
3363
|
-
type
|
|
3364
|
-
|
|
3365
|
-
type
|
|
3366
|
-
declare const
|
|
3367
|
-
type
|
|
3368
|
-
|
|
3369
|
-
type
|
|
3370
|
-
type
|
|
3371
|
-
type
|
|
3372
|
-
type
|
|
3373
|
-
type
|
|
3374
|
-
type
|
|
3375
|
-
type
|
|
3376
|
-
type
|
|
3377
|
-
declare const
|
|
3378
|
-
type
|
|
3379
|
-
type
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
type
|
|
3387
|
-
type
|
|
3388
|
-
type
|
|
3389
|
-
|
|
3390
|
-
type
|
|
3391
|
-
type
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
type
|
|
3395
|
-
type
|
|
3396
|
-
|
|
3397
|
-
type
|
|
3398
|
-
type
|
|
3399
|
-
|
|
3400
|
-
type
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
type
|
|
3404
|
-
|
|
3405
|
-
type
|
|
3406
|
-
type
|
|
3407
|
-
declare const
|
|
3408
|
-
type
|
|
3409
|
-
type
|
|
3410
|
-
declare const
|
|
3411
|
-
type
|
|
3412
|
-
type
|
|
3413
|
-
|
|
3414
|
-
type
|
|
3415
|
-
|
|
3416
|
-
type
|
|
3417
|
-
type
|
|
3418
|
-
declare const
|
|
3419
|
-
type
|
|
3420
|
-
type
|
|
3421
|
-
declare const
|
|
3422
|
-
type
|
|
3423
|
-
type
|
|
3424
|
-
|
|
3425
|
-
type
|
|
3426
|
-
|
|
3427
|
-
type
|
|
3428
|
-
type
|
|
3429
|
-
|
|
3430
|
-
type
|
|
3431
|
-
type
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
type
|
|
3435
|
-
type
|
|
3436
|
-
type
|
|
3437
|
-
|
|
3438
|
-
type
|
|
3439
|
-
type
|
|
3440
|
-
type
|
|
3441
|
-
declare const
|
|
3442
|
-
type
|
|
3443
|
-
type
|
|
3444
|
-
|
|
3445
|
-
declare const
|
|
3446
|
-
|
|
3447
|
-
type
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
type
|
|
3451
|
-
type
|
|
3452
|
-
|
|
3453
|
-
type
|
|
3454
|
-
type
|
|
3455
|
-
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
type
|
|
3459
|
-
|
|
3460
|
-
type
|
|
3461
|
-
type
|
|
3462
|
-
type
|
|
3463
|
-
type
|
|
3464
|
-
type
|
|
3465
|
-
type
|
|
3466
|
-
type
|
|
3467
|
-
type
|
|
3468
|
-
type
|
|
3469
|
-
|
|
3470
|
-
type
|
|
3471
|
-
type
|
|
3472
|
-
|
|
3473
|
-
type
|
|
3474
|
-
type
|
|
3475
|
-
type
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
4973
|
+
type mod_ZodParsedType = ZodParsedType;
|
|
4974
|
+
declare const mod_getParsedType: typeof getParsedType;
|
|
4975
|
+
declare const mod_makeIssue: typeof makeIssue;
|
|
4976
|
+
type mod_ParseParams = ParseParams;
|
|
4977
|
+
type mod_ParsePathComponent = ParsePathComponent;
|
|
4978
|
+
type mod_ParsePath = ParsePath;
|
|
4979
|
+
declare const mod_EMPTY_PATH: typeof EMPTY_PATH;
|
|
4980
|
+
type mod_ParseContext = ParseContext;
|
|
4981
|
+
type mod_ParseInput = ParseInput;
|
|
4982
|
+
declare const mod_addIssueToContext: typeof addIssueToContext;
|
|
4983
|
+
type mod_ObjectPair = ObjectPair;
|
|
4984
|
+
type mod_ParseStatus = ParseStatus;
|
|
4985
|
+
declare const mod_ParseStatus: typeof ParseStatus;
|
|
4986
|
+
type mod_ParseResult = ParseResult;
|
|
4987
|
+
declare const mod_INVALID: typeof INVALID;
|
|
4988
|
+
declare const mod_DIRTY: typeof DIRTY;
|
|
4989
|
+
declare const mod_OK: typeof OK;
|
|
4990
|
+
type mod_SyncParseReturnType<T = any> = SyncParseReturnType<T>;
|
|
4991
|
+
type mod_AsyncParseReturnType<T> = AsyncParseReturnType<T>;
|
|
4992
|
+
type mod_ParseReturnType<T> = ParseReturnType<T>;
|
|
4993
|
+
declare const mod_isAborted: typeof isAborted;
|
|
4994
|
+
declare const mod_isDirty: typeof isDirty;
|
|
4995
|
+
declare const mod_isValid: typeof isValid;
|
|
4996
|
+
declare const mod_isAsync: typeof isAsync;
|
|
4997
|
+
type mod_Primitive = Primitive;
|
|
4998
|
+
type mod_Scalars = Scalars;
|
|
4999
|
+
declare const mod_oboolean: typeof oboolean;
|
|
5000
|
+
declare const mod_onumber: typeof onumber;
|
|
5001
|
+
declare const mod_ostring: typeof ostring;
|
|
5002
|
+
type mod_RefinementCtx = RefinementCtx;
|
|
5003
|
+
type mod_ZodRawShape = ZodRawShape;
|
|
5004
|
+
type mod_ZodTypeAny = ZodTypeAny;
|
|
5005
|
+
type mod_TypeOf<T extends ZodType<any, any, any>> = TypeOf<T>;
|
|
5006
|
+
type mod_input<T extends ZodType<any, any, any>> = input<T>;
|
|
5007
|
+
type mod_output<T extends ZodType<any, any, any>> = output<T>;
|
|
5008
|
+
type mod_TypeOfFlattenedError<T extends ZodType<any, any, any>, U = string> = TypeOfFlattenedError<T, U>;
|
|
5009
|
+
type mod_TypeOfFormErrors<T extends ZodType<any, any, any>> = TypeOfFormErrors<T>;
|
|
5010
|
+
type mod_CustomErrorParams = CustomErrorParams;
|
|
5011
|
+
type mod_ZodTypeDef = ZodTypeDef;
|
|
5012
|
+
type mod_SafeParseSuccess<Output> = SafeParseSuccess<Output>;
|
|
5013
|
+
type mod_SafeParseError<Input> = SafeParseError<Input>;
|
|
5014
|
+
type mod_SafeParseReturnType<Input, Output> = SafeParseReturnType<Input, Output>;
|
|
5015
|
+
type mod_ZodType<Output = any, Def extends ZodTypeDef = ZodTypeDef, Input = Output> = ZodType<Output, Def, Input>;
|
|
5016
|
+
declare const mod_ZodType: typeof ZodType;
|
|
5017
|
+
type mod_ZodStringDef = ZodStringDef;
|
|
5018
|
+
type mod_ZodString = ZodString;
|
|
5019
|
+
declare const mod_ZodString: typeof ZodString;
|
|
5020
|
+
type mod_ZodNumberDef = ZodNumberDef;
|
|
5021
|
+
type mod_ZodNumber = ZodNumber;
|
|
5022
|
+
declare const mod_ZodNumber: typeof ZodNumber;
|
|
5023
|
+
type mod_ZodBigIntDef = ZodBigIntDef;
|
|
5024
|
+
type mod_ZodBigInt = ZodBigInt;
|
|
5025
|
+
declare const mod_ZodBigInt: typeof ZodBigInt;
|
|
5026
|
+
type mod_ZodBooleanDef = ZodBooleanDef;
|
|
5027
|
+
type mod_ZodBoolean = ZodBoolean;
|
|
5028
|
+
declare const mod_ZodBoolean: typeof ZodBoolean;
|
|
5029
|
+
type mod_ZodDateDef = ZodDateDef;
|
|
5030
|
+
type mod_ZodDate = ZodDate;
|
|
5031
|
+
declare const mod_ZodDate: typeof ZodDate;
|
|
5032
|
+
type mod_ZodUndefinedDef = ZodUndefinedDef;
|
|
5033
|
+
type mod_ZodUndefined = ZodUndefined;
|
|
5034
|
+
declare const mod_ZodUndefined: typeof ZodUndefined;
|
|
5035
|
+
type mod_ZodNullDef = ZodNullDef;
|
|
5036
|
+
type mod_ZodNull = ZodNull;
|
|
5037
|
+
declare const mod_ZodNull: typeof ZodNull;
|
|
5038
|
+
type mod_ZodAnyDef = ZodAnyDef;
|
|
5039
|
+
type mod_ZodAny = ZodAny;
|
|
5040
|
+
declare const mod_ZodAny: typeof ZodAny;
|
|
5041
|
+
type mod_ZodUnknownDef = ZodUnknownDef;
|
|
5042
|
+
type mod_ZodUnknown = ZodUnknown;
|
|
5043
|
+
declare const mod_ZodUnknown: typeof ZodUnknown;
|
|
5044
|
+
type mod_ZodNeverDef = ZodNeverDef;
|
|
5045
|
+
type mod_ZodNever = ZodNever;
|
|
5046
|
+
declare const mod_ZodNever: typeof ZodNever;
|
|
5047
|
+
type mod_ZodVoidDef = ZodVoidDef;
|
|
5048
|
+
type mod_ZodVoid = ZodVoid;
|
|
5049
|
+
declare const mod_ZodVoid: typeof ZodVoid;
|
|
5050
|
+
type mod_ZodArrayDef<T extends ZodTypeAny = ZodTypeAny> = ZodArrayDef<T>;
|
|
5051
|
+
type mod_ArrayCardinality = ArrayCardinality;
|
|
5052
|
+
type mod_ZodArray<T extends ZodTypeAny, Cardinality extends ArrayCardinality = "many"> = ZodArray<T, Cardinality>;
|
|
5053
|
+
declare const mod_ZodArray: typeof ZodArray;
|
|
5054
|
+
type mod_ZodNonEmptyArray<T extends ZodTypeAny> = ZodNonEmptyArray<T>;
|
|
5055
|
+
declare const mod_objectUtil: typeof objectUtil;
|
|
5056
|
+
type mod_extendShape<A, B> = extendShape<A, B>;
|
|
5057
|
+
type mod_ZodObjectDef<T extends ZodRawShape = ZodRawShape, UnknownKeys extends UnknownKeysParam = UnknownKeysParam, Catchall extends ZodTypeAny = ZodTypeAny> = ZodObjectDef<T, UnknownKeys, Catchall>;
|
|
5058
|
+
type mod_baseObjectOutputType<Shape extends ZodRawShape> = baseObjectOutputType<Shape>;
|
|
5059
|
+
type mod_objectOutputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = objectOutputType<Shape, Catchall>;
|
|
5060
|
+
type mod_baseObjectInputType<Shape extends ZodRawShape> = baseObjectInputType<Shape>;
|
|
5061
|
+
type mod_objectInputType<Shape extends ZodRawShape, Catchall extends ZodTypeAny> = objectInputType<Shape, Catchall>;
|
|
5062
|
+
type mod_SomeZodObject = SomeZodObject;
|
|
5063
|
+
type mod_ZodObject<T extends ZodRawShape, UnknownKeys extends UnknownKeysParam = "strip", Catchall extends ZodTypeAny = ZodTypeAny, Output = objectOutputType<T, Catchall>, Input = objectInputType<T, Catchall>> = ZodObject<T, UnknownKeys, Catchall, Output, Input>;
|
|
5064
|
+
declare const mod_ZodObject: typeof ZodObject;
|
|
5065
|
+
type mod_AnyZodObject = AnyZodObject;
|
|
5066
|
+
type mod_ZodUnionDef<T extends ZodUnionOptions = Readonly<[
|
|
5067
|
+
ZodTypeAny,
|
|
5068
|
+
ZodTypeAny,
|
|
5069
|
+
...ZodTypeAny[]
|
|
5070
|
+
]>> = ZodUnionDef<T>;
|
|
5071
|
+
type mod_ZodUnion<T extends ZodUnionOptions> = ZodUnion<T>;
|
|
5072
|
+
declare const mod_ZodUnion: typeof ZodUnion;
|
|
5073
|
+
type mod_ZodDiscriminatedUnionOption<Discriminator extends string, DiscriminatorValue extends Primitive> = ZodDiscriminatedUnionOption<Discriminator, DiscriminatorValue>;
|
|
5074
|
+
type mod_ZodDiscriminatedUnionDef<Discriminator extends string, DiscriminatorValue extends Primitive, Option extends ZodDiscriminatedUnionOption<Discriminator, DiscriminatorValue>> = ZodDiscriminatedUnionDef<Discriminator, DiscriminatorValue, Option>;
|
|
5075
|
+
type mod_ZodDiscriminatedUnion<Discriminator extends string, DiscriminatorValue extends Primitive, Option extends ZodDiscriminatedUnionOption<Discriminator, DiscriminatorValue>> = ZodDiscriminatedUnion<Discriminator, DiscriminatorValue, Option>;
|
|
5076
|
+
declare const mod_ZodDiscriminatedUnion: typeof ZodDiscriminatedUnion;
|
|
5077
|
+
type mod_ZodIntersectionDef<T extends ZodTypeAny = ZodTypeAny, U extends ZodTypeAny = ZodTypeAny> = ZodIntersectionDef<T, U>;
|
|
5078
|
+
type mod_ZodIntersection<T extends ZodTypeAny, U extends ZodTypeAny> = ZodIntersection<T, U>;
|
|
5079
|
+
declare const mod_ZodIntersection: typeof ZodIntersection;
|
|
5080
|
+
type mod_ZodTupleItems = ZodTupleItems;
|
|
5081
|
+
type mod_AssertArray<T> = AssertArray<T>;
|
|
5082
|
+
type mod_OutputTypeOfTuple<T extends ZodTupleItems | []> = OutputTypeOfTuple<T>;
|
|
5083
|
+
type mod_OutputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = OutputTypeOfTupleWithRest<T, Rest>;
|
|
5084
|
+
type mod_InputTypeOfTuple<T extends ZodTupleItems | []> = InputTypeOfTuple<T>;
|
|
5085
|
+
type mod_InputTypeOfTupleWithRest<T extends ZodTupleItems | [], Rest extends ZodTypeAny | null = null> = InputTypeOfTupleWithRest<T, Rest>;
|
|
5086
|
+
type mod_ZodTupleDef<T extends ZodTupleItems | [] = ZodTupleItems, Rest extends ZodTypeAny | null = null> = ZodTupleDef<T, Rest>;
|
|
5087
|
+
type mod_ZodTuple<T extends [ZodTypeAny, ...ZodTypeAny[]] | [] = [ZodTypeAny, ...ZodTypeAny[]], Rest extends ZodTypeAny | null = null> = ZodTuple<T, Rest>;
|
|
5088
|
+
declare const mod_ZodTuple: typeof ZodTuple;
|
|
5089
|
+
type mod_ZodRecordDef<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> = ZodRecordDef<Key, Value>;
|
|
5090
|
+
type mod_ZodRecord<Key extends KeySchema = ZodString, Value extends ZodTypeAny = ZodTypeAny> = ZodRecord<Key, Value>;
|
|
5091
|
+
declare const mod_ZodRecord: typeof ZodRecord;
|
|
5092
|
+
type mod_ZodMapDef<Key extends ZodTypeAny = ZodTypeAny, Value extends ZodTypeAny = ZodTypeAny> = ZodMapDef<Key, Value>;
|
|
5093
|
+
type mod_ZodMap<Key extends ZodTypeAny = ZodTypeAny, Value extends ZodTypeAny = ZodTypeAny> = ZodMap<Key, Value>;
|
|
5094
|
+
declare const mod_ZodMap: typeof ZodMap;
|
|
5095
|
+
type mod_ZodSetDef<Value extends ZodTypeAny = ZodTypeAny> = ZodSetDef<Value>;
|
|
5096
|
+
type mod_ZodSet<Value extends ZodTypeAny = ZodTypeAny> = ZodSet<Value>;
|
|
5097
|
+
declare const mod_ZodSet: typeof ZodSet;
|
|
5098
|
+
type mod_ZodFunctionDef<Args extends ZodTuple<any, any> = ZodTuple<any, any>, Returns extends ZodTypeAny = ZodTypeAny> = ZodFunctionDef<Args, Returns>;
|
|
5099
|
+
type mod_OuterTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = OuterTypeOfFunction<Args, Returns>;
|
|
5100
|
+
type mod_InnerTypeOfFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = InnerTypeOfFunction<Args, Returns>;
|
|
5101
|
+
type mod_ZodFunction<Args extends ZodTuple<any, any>, Returns extends ZodTypeAny> = ZodFunction<Args, Returns>;
|
|
5102
|
+
declare const mod_ZodFunction: typeof ZodFunction;
|
|
5103
|
+
type mod_ZodLazyDef<T extends ZodTypeAny = ZodTypeAny> = ZodLazyDef<T>;
|
|
5104
|
+
type mod_ZodLazy<T extends ZodTypeAny> = ZodLazy<T>;
|
|
5105
|
+
declare const mod_ZodLazy: typeof ZodLazy;
|
|
5106
|
+
type mod_ZodLiteralDef<T = any> = ZodLiteralDef<T>;
|
|
5107
|
+
type mod_ZodLiteral<T> = ZodLiteral<T>;
|
|
5108
|
+
declare const mod_ZodLiteral: typeof ZodLiteral;
|
|
5109
|
+
type mod_ArrayKeys = ArrayKeys;
|
|
5110
|
+
type mod_Indices<T> = Indices<T>;
|
|
5111
|
+
type mod_ZodEnumDef<T extends EnumValues = EnumValues> = ZodEnumDef<T>;
|
|
5112
|
+
type mod_ZodEnum<T extends [string, ...string[]]> = ZodEnum<T>;
|
|
5113
|
+
declare const mod_ZodEnum: typeof ZodEnum;
|
|
5114
|
+
type mod_ZodNativeEnumDef<T extends EnumLike = EnumLike> = ZodNativeEnumDef<T>;
|
|
5115
|
+
type mod_ZodNativeEnum<T extends EnumLike> = ZodNativeEnum<T>;
|
|
5116
|
+
declare const mod_ZodNativeEnum: typeof ZodNativeEnum;
|
|
5117
|
+
type mod_ZodPromiseDef<T extends ZodTypeAny = ZodTypeAny> = ZodPromiseDef<T>;
|
|
5118
|
+
type mod_ZodPromise<T extends ZodTypeAny> = ZodPromise<T>;
|
|
5119
|
+
declare const mod_ZodPromise: typeof ZodPromise;
|
|
5120
|
+
type mod_Refinement<T> = Refinement<T>;
|
|
5121
|
+
type mod_SuperRefinement<T> = SuperRefinement<T>;
|
|
5122
|
+
type mod_RefinementEffect<T> = RefinementEffect<T>;
|
|
5123
|
+
type mod_TransformEffect<T> = TransformEffect<T>;
|
|
5124
|
+
type mod_PreprocessEffect<T> = PreprocessEffect<T>;
|
|
5125
|
+
type mod_Effect<T> = Effect<T>;
|
|
5126
|
+
type mod_ZodEffectsDef<T extends ZodTypeAny = ZodTypeAny> = ZodEffectsDef<T>;
|
|
5127
|
+
type mod_ZodEffects<T extends ZodTypeAny, Output = T["_output"], Input = T["_input"]> = ZodEffects<T, Output, Input>;
|
|
5128
|
+
declare const mod_ZodEffects: typeof ZodEffects;
|
|
5129
|
+
type mod_ZodOptionalDef<T extends ZodTypeAny = ZodTypeAny> = ZodOptionalDef<T>;
|
|
5130
|
+
type mod_ZodOptionalType<T extends ZodTypeAny> = ZodOptionalType<T>;
|
|
5131
|
+
type mod_ZodOptional<T extends ZodTypeAny> = ZodOptional<T>;
|
|
5132
|
+
declare const mod_ZodOptional: typeof ZodOptional;
|
|
5133
|
+
type mod_ZodNullableDef<T extends ZodTypeAny = ZodTypeAny> = ZodNullableDef<T>;
|
|
5134
|
+
type mod_ZodNullableType<T extends ZodTypeAny> = ZodNullableType<T>;
|
|
5135
|
+
type mod_ZodNullable<T extends ZodTypeAny> = ZodNullable<T>;
|
|
5136
|
+
declare const mod_ZodNullable: typeof ZodNullable;
|
|
5137
|
+
type mod_ZodDefaultDef<T extends ZodTypeAny = ZodTypeAny> = ZodDefaultDef<T>;
|
|
5138
|
+
type mod_ZodDefault<T extends ZodTypeAny> = ZodDefault<T>;
|
|
5139
|
+
declare const mod_ZodDefault: typeof ZodDefault;
|
|
5140
|
+
type mod_ZodNaNDef = ZodNaNDef;
|
|
5141
|
+
type mod_ZodNaN = ZodNaN;
|
|
5142
|
+
declare const mod_ZodNaN: typeof ZodNaN;
|
|
5143
|
+
declare const mod_custom: typeof custom;
|
|
5144
|
+
declare const mod_late: typeof late;
|
|
5145
|
+
type mod_ZodFirstPartyTypeKind = ZodFirstPartyTypeKind;
|
|
5146
|
+
declare const mod_ZodFirstPartyTypeKind: typeof ZodFirstPartyTypeKind;
|
|
5147
|
+
type mod_ZodFirstPartySchemaTypes = ZodFirstPartySchemaTypes;
|
|
5148
|
+
type mod_ZodIssueCode = ZodIssueCode;
|
|
5149
|
+
type mod_ZodIssueBase = ZodIssueBase;
|
|
5150
|
+
type mod_ZodInvalidTypeIssue = ZodInvalidTypeIssue;
|
|
5151
|
+
type mod_ZodUnrecognizedKeysIssue = ZodUnrecognizedKeysIssue;
|
|
5152
|
+
type mod_ZodInvalidUnionIssue = ZodInvalidUnionIssue;
|
|
5153
|
+
type mod_ZodInvalidUnionDiscriminatorIssue = ZodInvalidUnionDiscriminatorIssue;
|
|
5154
|
+
type mod_ZodInvalidEnumValueIssue = ZodInvalidEnumValueIssue;
|
|
5155
|
+
type mod_ZodInvalidArgumentsIssue = ZodInvalidArgumentsIssue;
|
|
5156
|
+
type mod_ZodInvalidReturnTypeIssue = ZodInvalidReturnTypeIssue;
|
|
5157
|
+
type mod_ZodInvalidDateIssue = ZodInvalidDateIssue;
|
|
5158
|
+
type mod_StringValidation = StringValidation;
|
|
5159
|
+
type mod_ZodInvalidStringIssue = ZodInvalidStringIssue;
|
|
5160
|
+
type mod_ZodTooSmallIssue = ZodTooSmallIssue;
|
|
5161
|
+
type mod_ZodTooBigIssue = ZodTooBigIssue;
|
|
5162
|
+
type mod_ZodInvalidIntersectionTypesIssue = ZodInvalidIntersectionTypesIssue;
|
|
5163
|
+
type mod_ZodNotMultipleOfIssue = ZodNotMultipleOfIssue;
|
|
5164
|
+
type mod_ZodCustomIssue = ZodCustomIssue;
|
|
5165
|
+
type mod_DenormalizedError = DenormalizedError;
|
|
5166
|
+
type mod_ZodIssueOptionalMessage = ZodIssueOptionalMessage;
|
|
5167
|
+
type mod_ZodIssue = ZodIssue;
|
|
5168
|
+
declare const mod_quotelessJson: typeof quotelessJson;
|
|
5169
|
+
type mod_ZodFormattedError<T> = ZodFormattedError<T>;
|
|
5170
|
+
type mod_ZodError<T = any> = ZodError<T>;
|
|
5171
|
+
declare const mod_ZodError: typeof ZodError;
|
|
5172
|
+
type mod_IssueData = IssueData;
|
|
5173
|
+
type mod_MakeErrorData = MakeErrorData;
|
|
5174
|
+
type mod_ZodErrorMap = ZodErrorMap;
|
|
5175
|
+
declare const mod_defaultErrorMap: typeof defaultErrorMap;
|
|
5176
|
+
declare const mod_overrideErrorMap: typeof overrideErrorMap;
|
|
5177
|
+
declare const mod_setErrorMap: typeof setErrorMap;
|
|
5178
|
+
declare namespace mod {
|
|
3480
5179
|
export {
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
5180
|
+
mod_ZodParsedType as ZodParsedType,
|
|
5181
|
+
mod_getParsedType as getParsedType,
|
|
5182
|
+
mod_makeIssue as makeIssue,
|
|
5183
|
+
mod_ParseParams as ParseParams,
|
|
5184
|
+
mod_ParsePathComponent as ParsePathComponent,
|
|
5185
|
+
mod_ParsePath as ParsePath,
|
|
5186
|
+
mod_EMPTY_PATH as EMPTY_PATH,
|
|
5187
|
+
mod_ParseContext as ParseContext,
|
|
5188
|
+
mod_ParseInput as ParseInput,
|
|
5189
|
+
mod_addIssueToContext as addIssueToContext,
|
|
5190
|
+
mod_ObjectPair as ObjectPair,
|
|
5191
|
+
mod_ParseStatus as ParseStatus,
|
|
5192
|
+
mod_ParseResult as ParseResult,
|
|
5193
|
+
mod_INVALID as INVALID,
|
|
5194
|
+
mod_DIRTY as DIRTY,
|
|
5195
|
+
mod_OK as OK,
|
|
5196
|
+
mod_SyncParseReturnType as SyncParseReturnType,
|
|
5197
|
+
mod_AsyncParseReturnType as AsyncParseReturnType,
|
|
5198
|
+
mod_ParseReturnType as ParseReturnType,
|
|
5199
|
+
mod_isAborted as isAborted,
|
|
5200
|
+
mod_isDirty as isDirty,
|
|
5201
|
+
mod_isValid as isValid,
|
|
5202
|
+
mod_isAsync as isAsync,
|
|
5203
|
+
mod_Primitive as Primitive,
|
|
5204
|
+
mod_Scalars as Scalars,
|
|
3504
5205
|
TypeOf as infer,
|
|
5206
|
+
TypeOfFlattenedError as inferFlattenedErrors,
|
|
5207
|
+
TypeOfFormErrors as inferFormErrors,
|
|
3505
5208
|
ZodEffects as ZodTransformer,
|
|
3506
5209
|
ZodType as Schema,
|
|
3507
5210
|
ZodType as ZodSchema,
|
|
@@ -3510,6 +5213,7 @@ declare namespace external_d {
|
|
|
3510
5213
|
bigIntType as bigint,
|
|
3511
5214
|
booleanType as boolean,
|
|
3512
5215
|
dateType as date,
|
|
5216
|
+
discriminatedUnionType as discriminatedUnion,
|
|
3513
5217
|
effectsType as effect,
|
|
3514
5218
|
enumType as enum,
|
|
3515
5219
|
functionType as function,
|
|
@@ -3518,16 +5222,17 @@ declare namespace external_d {
|
|
|
3518
5222
|
lazyType as lazy,
|
|
3519
5223
|
literalType as literal,
|
|
3520
5224
|
mapType as map,
|
|
5225
|
+
nanType as nan,
|
|
3521
5226
|
nativeEnumType as nativeEnum,
|
|
3522
5227
|
neverType as never,
|
|
3523
5228
|
nullType as null,
|
|
3524
5229
|
nullableType as nullable,
|
|
3525
5230
|
numberType as number,
|
|
3526
5231
|
objectType as object,
|
|
3527
|
-
|
|
3528
|
-
|
|
5232
|
+
mod_oboolean as oboolean,
|
|
5233
|
+
mod_onumber as onumber,
|
|
3529
5234
|
optionalType as optional,
|
|
3530
|
-
|
|
5235
|
+
mod_ostring as ostring,
|
|
3531
5236
|
preprocessType as preprocess,
|
|
3532
5237
|
promiseType as promise,
|
|
3533
5238
|
recordType as record,
|
|
@@ -3540,144 +5245,150 @@ declare namespace external_d {
|
|
|
3540
5245
|
unionType as union,
|
|
3541
5246
|
unknownType as unknown,
|
|
3542
5247
|
voidType as void,
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3627
|
-
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3652
|
-
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
5248
|
+
mod_RefinementCtx as RefinementCtx,
|
|
5249
|
+
mod_ZodRawShape as ZodRawShape,
|
|
5250
|
+
mod_ZodTypeAny as ZodTypeAny,
|
|
5251
|
+
mod_TypeOf as TypeOf,
|
|
5252
|
+
mod_input as input,
|
|
5253
|
+
mod_output as output,
|
|
5254
|
+
mod_TypeOfFlattenedError as TypeOfFlattenedError,
|
|
5255
|
+
mod_TypeOfFormErrors as TypeOfFormErrors,
|
|
5256
|
+
mod_CustomErrorParams as CustomErrorParams,
|
|
5257
|
+
mod_ZodTypeDef as ZodTypeDef,
|
|
5258
|
+
mod_SafeParseSuccess as SafeParseSuccess,
|
|
5259
|
+
mod_SafeParseError as SafeParseError,
|
|
5260
|
+
mod_SafeParseReturnType as SafeParseReturnType,
|
|
5261
|
+
mod_ZodType as ZodType,
|
|
5262
|
+
mod_ZodStringDef as ZodStringDef,
|
|
5263
|
+
mod_ZodString as ZodString,
|
|
5264
|
+
mod_ZodNumberDef as ZodNumberDef,
|
|
5265
|
+
mod_ZodNumber as ZodNumber,
|
|
5266
|
+
mod_ZodBigIntDef as ZodBigIntDef,
|
|
5267
|
+
mod_ZodBigInt as ZodBigInt,
|
|
5268
|
+
mod_ZodBooleanDef as ZodBooleanDef,
|
|
5269
|
+
mod_ZodBoolean as ZodBoolean,
|
|
5270
|
+
mod_ZodDateDef as ZodDateDef,
|
|
5271
|
+
mod_ZodDate as ZodDate,
|
|
5272
|
+
mod_ZodUndefinedDef as ZodUndefinedDef,
|
|
5273
|
+
mod_ZodUndefined as ZodUndefined,
|
|
5274
|
+
mod_ZodNullDef as ZodNullDef,
|
|
5275
|
+
mod_ZodNull as ZodNull,
|
|
5276
|
+
mod_ZodAnyDef as ZodAnyDef,
|
|
5277
|
+
mod_ZodAny as ZodAny,
|
|
5278
|
+
mod_ZodUnknownDef as ZodUnknownDef,
|
|
5279
|
+
mod_ZodUnknown as ZodUnknown,
|
|
5280
|
+
mod_ZodNeverDef as ZodNeverDef,
|
|
5281
|
+
mod_ZodNever as ZodNever,
|
|
5282
|
+
mod_ZodVoidDef as ZodVoidDef,
|
|
5283
|
+
mod_ZodVoid as ZodVoid,
|
|
5284
|
+
mod_ZodArrayDef as ZodArrayDef,
|
|
5285
|
+
mod_ArrayCardinality as ArrayCardinality,
|
|
5286
|
+
mod_ZodArray as ZodArray,
|
|
5287
|
+
mod_ZodNonEmptyArray as ZodNonEmptyArray,
|
|
5288
|
+
mod_objectUtil as objectUtil,
|
|
5289
|
+
mod_extendShape as extendShape,
|
|
5290
|
+
mod_ZodObjectDef as ZodObjectDef,
|
|
5291
|
+
mod_baseObjectOutputType as baseObjectOutputType,
|
|
5292
|
+
mod_objectOutputType as objectOutputType,
|
|
5293
|
+
mod_baseObjectInputType as baseObjectInputType,
|
|
5294
|
+
mod_objectInputType as objectInputType,
|
|
5295
|
+
mod_SomeZodObject as SomeZodObject,
|
|
5296
|
+
mod_ZodObject as ZodObject,
|
|
5297
|
+
mod_AnyZodObject as AnyZodObject,
|
|
5298
|
+
mod_ZodUnionDef as ZodUnionDef,
|
|
5299
|
+
mod_ZodUnion as ZodUnion,
|
|
5300
|
+
mod_ZodDiscriminatedUnionOption as ZodDiscriminatedUnionOption,
|
|
5301
|
+
mod_ZodDiscriminatedUnionDef as ZodDiscriminatedUnionDef,
|
|
5302
|
+
mod_ZodDiscriminatedUnion as ZodDiscriminatedUnion,
|
|
5303
|
+
mod_ZodIntersectionDef as ZodIntersectionDef,
|
|
5304
|
+
mod_ZodIntersection as ZodIntersection,
|
|
5305
|
+
mod_ZodTupleItems as ZodTupleItems,
|
|
5306
|
+
mod_AssertArray as AssertArray,
|
|
5307
|
+
mod_OutputTypeOfTuple as OutputTypeOfTuple,
|
|
5308
|
+
mod_OutputTypeOfTupleWithRest as OutputTypeOfTupleWithRest,
|
|
5309
|
+
mod_InputTypeOfTuple as InputTypeOfTuple,
|
|
5310
|
+
mod_InputTypeOfTupleWithRest as InputTypeOfTupleWithRest,
|
|
5311
|
+
mod_ZodTupleDef as ZodTupleDef,
|
|
5312
|
+
mod_ZodTuple as ZodTuple,
|
|
5313
|
+
mod_ZodRecordDef as ZodRecordDef,
|
|
5314
|
+
mod_ZodRecord as ZodRecord,
|
|
5315
|
+
mod_ZodMapDef as ZodMapDef,
|
|
5316
|
+
mod_ZodMap as ZodMap,
|
|
5317
|
+
mod_ZodSetDef as ZodSetDef,
|
|
5318
|
+
mod_ZodSet as ZodSet,
|
|
5319
|
+
mod_ZodFunctionDef as ZodFunctionDef,
|
|
5320
|
+
mod_OuterTypeOfFunction as OuterTypeOfFunction,
|
|
5321
|
+
mod_InnerTypeOfFunction as InnerTypeOfFunction,
|
|
5322
|
+
mod_ZodFunction as ZodFunction,
|
|
5323
|
+
mod_ZodLazyDef as ZodLazyDef,
|
|
5324
|
+
mod_ZodLazy as ZodLazy,
|
|
5325
|
+
mod_ZodLiteralDef as ZodLiteralDef,
|
|
5326
|
+
mod_ZodLiteral as ZodLiteral,
|
|
5327
|
+
mod_ArrayKeys as ArrayKeys,
|
|
5328
|
+
mod_Indices as Indices,
|
|
5329
|
+
mod_ZodEnumDef as ZodEnumDef,
|
|
5330
|
+
mod_ZodEnum as ZodEnum,
|
|
5331
|
+
mod_ZodNativeEnumDef as ZodNativeEnumDef,
|
|
5332
|
+
mod_ZodNativeEnum as ZodNativeEnum,
|
|
5333
|
+
mod_ZodPromiseDef as ZodPromiseDef,
|
|
5334
|
+
mod_ZodPromise as ZodPromise,
|
|
5335
|
+
mod_Refinement as Refinement,
|
|
5336
|
+
mod_SuperRefinement as SuperRefinement,
|
|
5337
|
+
mod_RefinementEffect as RefinementEffect,
|
|
5338
|
+
mod_TransformEffect as TransformEffect,
|
|
5339
|
+
mod_PreprocessEffect as PreprocessEffect,
|
|
5340
|
+
mod_Effect as Effect,
|
|
5341
|
+
mod_ZodEffectsDef as ZodEffectsDef,
|
|
5342
|
+
mod_ZodEffects as ZodEffects,
|
|
5343
|
+
mod_ZodOptionalDef as ZodOptionalDef,
|
|
5344
|
+
mod_ZodOptionalType as ZodOptionalType,
|
|
5345
|
+
mod_ZodOptional as ZodOptional,
|
|
5346
|
+
mod_ZodNullableDef as ZodNullableDef,
|
|
5347
|
+
mod_ZodNullableType as ZodNullableType,
|
|
5348
|
+
mod_ZodNullable as ZodNullable,
|
|
5349
|
+
mod_ZodDefaultDef as ZodDefaultDef,
|
|
5350
|
+
mod_ZodDefault as ZodDefault,
|
|
5351
|
+
mod_ZodNaNDef as ZodNaNDef,
|
|
5352
|
+
mod_ZodNaN as ZodNaN,
|
|
5353
|
+
mod_custom as custom,
|
|
5354
|
+
mod_late as late,
|
|
5355
|
+
mod_ZodFirstPartyTypeKind as ZodFirstPartyTypeKind,
|
|
5356
|
+
mod_ZodFirstPartySchemaTypes as ZodFirstPartySchemaTypes,
|
|
5357
|
+
mod_ZodIssueCode as ZodIssueCode,
|
|
5358
|
+
mod_ZodIssueBase as ZodIssueBase,
|
|
5359
|
+
mod_ZodInvalidTypeIssue as ZodInvalidTypeIssue,
|
|
5360
|
+
mod_ZodUnrecognizedKeysIssue as ZodUnrecognizedKeysIssue,
|
|
5361
|
+
mod_ZodInvalidUnionIssue as ZodInvalidUnionIssue,
|
|
5362
|
+
mod_ZodInvalidUnionDiscriminatorIssue as ZodInvalidUnionDiscriminatorIssue,
|
|
5363
|
+
mod_ZodInvalidEnumValueIssue as ZodInvalidEnumValueIssue,
|
|
5364
|
+
mod_ZodInvalidArgumentsIssue as ZodInvalidArgumentsIssue,
|
|
5365
|
+
mod_ZodInvalidReturnTypeIssue as ZodInvalidReturnTypeIssue,
|
|
5366
|
+
mod_ZodInvalidDateIssue as ZodInvalidDateIssue,
|
|
5367
|
+
mod_StringValidation as StringValidation,
|
|
5368
|
+
mod_ZodInvalidStringIssue as ZodInvalidStringIssue,
|
|
5369
|
+
mod_ZodTooSmallIssue as ZodTooSmallIssue,
|
|
5370
|
+
mod_ZodTooBigIssue as ZodTooBigIssue,
|
|
5371
|
+
mod_ZodInvalidIntersectionTypesIssue as ZodInvalidIntersectionTypesIssue,
|
|
5372
|
+
mod_ZodNotMultipleOfIssue as ZodNotMultipleOfIssue,
|
|
5373
|
+
mod_ZodCustomIssue as ZodCustomIssue,
|
|
5374
|
+
mod_DenormalizedError as DenormalizedError,
|
|
5375
|
+
mod_ZodIssueOptionalMessage as ZodIssueOptionalMessage,
|
|
5376
|
+
mod_ZodIssue as ZodIssue,
|
|
5377
|
+
mod_quotelessJson as quotelessJson,
|
|
5378
|
+
mod_ZodFormattedError as ZodFormattedError,
|
|
5379
|
+
mod_ZodError as ZodError,
|
|
5380
|
+
mod_IssueData as IssueData,
|
|
5381
|
+
mod_MakeErrorData as MakeErrorData,
|
|
5382
|
+
mod_ZodErrorMap as ZodErrorMap,
|
|
5383
|
+
mod_defaultErrorMap as defaultErrorMap,
|
|
5384
|
+
mod_overrideErrorMap as overrideErrorMap,
|
|
5385
|
+
mod_setErrorMap as setErrorMap,
|
|
3675
5386
|
};
|
|
3676
5387
|
}
|
|
3677
5388
|
|
|
3678
5389
|
declare namespace schema {
|
|
3679
5390
|
export {
|
|
3680
|
-
|
|
5391
|
+
mod as define,
|
|
3681
5392
|
};
|
|
3682
5393
|
}
|
|
3683
5394
|
|
|
@@ -3693,6 +5404,19 @@ declare namespace toml {
|
|
|
3693
5404
|
};
|
|
3694
5405
|
}
|
|
3695
5406
|
|
|
5407
|
+
interface CreateOptions {
|
|
5408
|
+
port: number;
|
|
5409
|
+
authToken: string;
|
|
5410
|
+
}
|
|
5411
|
+
declare function create(options: CreateOptions): Promise<string>;
|
|
5412
|
+
|
|
5413
|
+
declare const tunnel_create: typeof create;
|
|
5414
|
+
declare namespace tunnel {
|
|
5415
|
+
export {
|
|
5416
|
+
tunnel_create as create,
|
|
5417
|
+
};
|
|
5418
|
+
}
|
|
5419
|
+
|
|
3696
5420
|
/**
|
|
3697
5421
|
* JSON Schema
|
|
3698
5422
|
*
|
|
@@ -4588,7 +6312,7 @@ declare enum JSONSchemaContentEncoding {
|
|
|
4588
6312
|
XToken = 'x-token'
|
|
4589
6313
|
}
|
|
4590
6314
|
|
|
4591
|
-
interface Options<T
|
|
6315
|
+
interface Options<T extends Record<string, any>> {
|
|
4592
6316
|
/**
|
|
4593
6317
|
Config used if there are no existing config.
|
|
4594
6318
|
|
|
@@ -4794,7 +6518,7 @@ interface Options<T> {
|
|
|
4794
6518
|
*/
|
|
4795
6519
|
readonly configFileMode?: number;
|
|
4796
6520
|
}
|
|
4797
|
-
declare type Migrations<T
|
|
6521
|
+
declare type Migrations<T extends Record<string, any>> = Record<string, (store: Conf<T>) => void>;
|
|
4798
6522
|
declare type Schema<T> = {
|
|
4799
6523
|
[Property in keyof T]: ValueSchema;
|
|
4800
6524
|
};
|
|
@@ -5005,6 +6729,21 @@ interface CreateAppQuerySchema {
|
|
|
5005
6729
|
};
|
|
5006
6730
|
}
|
|
5007
6731
|
|
|
6732
|
+
declare const UpdateURLsQuery: string;
|
|
6733
|
+
interface UpdateURLsQueryVariables {
|
|
6734
|
+
apiKey: string;
|
|
6735
|
+
appUrl: string;
|
|
6736
|
+
redir: string[];
|
|
6737
|
+
}
|
|
6738
|
+
interface UpdateURLsQuerySchema {
|
|
6739
|
+
appUpdate: {
|
|
6740
|
+
userErrors: {
|
|
6741
|
+
field: string[];
|
|
6742
|
+
message: string;
|
|
6743
|
+
}[];
|
|
6744
|
+
};
|
|
6745
|
+
}
|
|
6746
|
+
|
|
5008
6747
|
declare const index_FindOrganizationQuery: typeof FindOrganizationQuery;
|
|
5009
6748
|
type index_FindOrganizationQuerySchema = FindOrganizationQuerySchema;
|
|
5010
6749
|
type index_AllOrganizationsQuerySchema = AllOrganizationsQuerySchema;
|
|
@@ -5012,6 +6751,9 @@ declare const index_AllOrganizationsQuery: typeof AllOrganizationsQuery;
|
|
|
5012
6751
|
declare const index_CreateAppQuery: typeof CreateAppQuery;
|
|
5013
6752
|
type index_CreateAppQueryVariables = CreateAppQueryVariables;
|
|
5014
6753
|
type index_CreateAppQuerySchema = CreateAppQuerySchema;
|
|
6754
|
+
declare const index_UpdateURLsQuery: typeof UpdateURLsQuery;
|
|
6755
|
+
type index_UpdateURLsQueryVariables = UpdateURLsQueryVariables;
|
|
6756
|
+
type index_UpdateURLsQuerySchema = UpdateURLsQuerySchema;
|
|
5015
6757
|
declare namespace index {
|
|
5016
6758
|
export {
|
|
5017
6759
|
index_FindOrganizationQuery as FindOrganizationQuery,
|
|
@@ -5021,6 +6763,9 @@ declare namespace index {
|
|
|
5021
6763
|
index_CreateAppQuery as CreateAppQuery,
|
|
5022
6764
|
index_CreateAppQueryVariables as CreateAppQueryVariables,
|
|
5023
6765
|
index_CreateAppQuerySchema as CreateAppQuerySchema,
|
|
6766
|
+
index_UpdateURLsQuery as UpdateURLsQuery,
|
|
6767
|
+
index_UpdateURLsQueryVariables as UpdateURLsQueryVariables,
|
|
6768
|
+
index_UpdateURLsQuerySchema as UpdateURLsQuerySchema,
|
|
5024
6769
|
};
|
|
5025
6770
|
}
|
|
5026
6771
|
|
|
@@ -5307,5 +7052,5 @@ declare const constants: {
|
|
|
5307
7052
|
};
|
|
5308
7053
|
};
|
|
5309
7054
|
|
|
5310
|
-
export { api, checksum, constants, dependency, environment, error$1 as error, file, http, os, output$1 as output, path, schema, session, store, string, system, template, toml, ui, version };
|
|
7055
|
+
export { api, checksum, constants, dependency, environment, error$1 as error, file, git, http, os, output$1 as output, path, schema, session, store, string, system, template, toml, tunnel, ui, version };
|
|
5311
7056
|
//# sourceMappingURL=index.d.ts.map
|