@nx.js/runtime 0.0.59 → 0.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +267 -20
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1763,6 +1763,125 @@ interface GamepadEffectParameters {
|
|
|
1763
1763
|
strongMagnitude?: number;
|
|
1764
1764
|
weakMagnitude?: number;
|
|
1765
1765
|
}
|
|
1766
|
+
interface AesCbcParams {
|
|
1767
|
+
name: "AES-CBC";
|
|
1768
|
+
iv: BufferSource;
|
|
1769
|
+
}
|
|
1770
|
+
interface AesCtrParams extends Algorithm {
|
|
1771
|
+
counter: BufferSource;
|
|
1772
|
+
length: number;
|
|
1773
|
+
}
|
|
1774
|
+
interface AesXtsParams {
|
|
1775
|
+
name: "AES-XTS";
|
|
1776
|
+
sectorSize: number;
|
|
1777
|
+
sector?: number;
|
|
1778
|
+
isNintendo?: boolean;
|
|
1779
|
+
}
|
|
1780
|
+
interface AesDerivedKeyParams extends Algorithm {
|
|
1781
|
+
length: number;
|
|
1782
|
+
}
|
|
1783
|
+
interface AesGcmParams extends Algorithm {
|
|
1784
|
+
additionalData?: BufferSource;
|
|
1785
|
+
iv: BufferSource;
|
|
1786
|
+
tagLength?: number;
|
|
1787
|
+
}
|
|
1788
|
+
interface AesKeyAlgorithm extends KeyAlgorithm {
|
|
1789
|
+
length: number;
|
|
1790
|
+
}
|
|
1791
|
+
interface AesKeyGenParams extends Algorithm {
|
|
1792
|
+
length: number;
|
|
1793
|
+
}
|
|
1794
|
+
interface Algorithm {
|
|
1795
|
+
name: string;
|
|
1796
|
+
}
|
|
1797
|
+
interface EcKeyAlgorithm extends KeyAlgorithm {
|
|
1798
|
+
namedCurve: NamedCurve;
|
|
1799
|
+
}
|
|
1800
|
+
interface EcKeyGenParams extends Algorithm {
|
|
1801
|
+
namedCurve: NamedCurve;
|
|
1802
|
+
}
|
|
1803
|
+
interface EcKeyImportParams extends Algorithm {
|
|
1804
|
+
namedCurve: NamedCurve;
|
|
1805
|
+
}
|
|
1806
|
+
interface EcdhKeyDeriveParams extends Algorithm {
|
|
1807
|
+
public: CryptoKey;
|
|
1808
|
+
}
|
|
1809
|
+
interface EcdsaParams extends Algorithm {
|
|
1810
|
+
hash: HashAlgorithmIdentifier;
|
|
1811
|
+
}
|
|
1812
|
+
interface HkdfParams extends Algorithm {
|
|
1813
|
+
hash: HashAlgorithmIdentifier;
|
|
1814
|
+
info: BufferSource;
|
|
1815
|
+
salt: BufferSource;
|
|
1816
|
+
}
|
|
1817
|
+
interface HmacImportParams extends Algorithm {
|
|
1818
|
+
hash: HashAlgorithmIdentifier;
|
|
1819
|
+
length?: number;
|
|
1820
|
+
}
|
|
1821
|
+
interface HmacKeyAlgorithm extends KeyAlgorithm {
|
|
1822
|
+
hash: KeyAlgorithm;
|
|
1823
|
+
length: number;
|
|
1824
|
+
}
|
|
1825
|
+
interface HmacKeyGenParams extends Algorithm {
|
|
1826
|
+
hash: HashAlgorithmIdentifier;
|
|
1827
|
+
length?: number;
|
|
1828
|
+
}
|
|
1829
|
+
interface JsonWebKey {
|
|
1830
|
+
alg?: string;
|
|
1831
|
+
crv?: string;
|
|
1832
|
+
d?: string;
|
|
1833
|
+
dp?: string;
|
|
1834
|
+
dq?: string;
|
|
1835
|
+
e?: string;
|
|
1836
|
+
ext?: boolean;
|
|
1837
|
+
k?: string;
|
|
1838
|
+
key_ops?: string[];
|
|
1839
|
+
kty?: string;
|
|
1840
|
+
n?: string;
|
|
1841
|
+
oth?: RsaOtherPrimesInfo[];
|
|
1842
|
+
p?: string;
|
|
1843
|
+
q?: string;
|
|
1844
|
+
qi?: string;
|
|
1845
|
+
use?: string;
|
|
1846
|
+
x?: string;
|
|
1847
|
+
y?: string;
|
|
1848
|
+
}
|
|
1849
|
+
interface KeyAlgorithm {
|
|
1850
|
+
name: string;
|
|
1851
|
+
}
|
|
1852
|
+
type NamedCurve = string;
|
|
1853
|
+
type AlgorithmIdentifier = Algorithm | string;
|
|
1854
|
+
type KeyFormat = "jwk" | "pkcs8" | "raw" | "spki";
|
|
1855
|
+
type KeyType = "private" | "public" | "secret";
|
|
1856
|
+
type KeyUsage = "decrypt" | "deriveBits" | "deriveKey" | "encrypt" | "sign" | "unwrapKey" | "verify" | "wrapKey";
|
|
1857
|
+
interface RsaHashedImportParams extends Algorithm {
|
|
1858
|
+
hash: HashAlgorithmIdentifier;
|
|
1859
|
+
}
|
|
1860
|
+
interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
|
|
1861
|
+
hash: KeyAlgorithm;
|
|
1862
|
+
}
|
|
1863
|
+
interface RsaHashedKeyGenParams extends RsaKeyGenParams {
|
|
1864
|
+
hash: HashAlgorithmIdentifier;
|
|
1865
|
+
}
|
|
1866
|
+
interface RsaKeyAlgorithm extends KeyAlgorithm {
|
|
1867
|
+
modulusLength: number;
|
|
1868
|
+
publicExponent: BigInteger;
|
|
1869
|
+
}
|
|
1870
|
+
interface RsaKeyGenParams extends Algorithm {
|
|
1871
|
+
modulusLength: number;
|
|
1872
|
+
publicExponent: BigInteger;
|
|
1873
|
+
}
|
|
1874
|
+
interface RsaOaepParams extends Algorithm {
|
|
1875
|
+
label?: BufferSource;
|
|
1876
|
+
}
|
|
1877
|
+
interface RsaOtherPrimesInfo {
|
|
1878
|
+
d?: string;
|
|
1879
|
+
r?: string;
|
|
1880
|
+
t?: string;
|
|
1881
|
+
}
|
|
1882
|
+
interface RsaPssParams extends Algorithm {
|
|
1883
|
+
saltLength: number;
|
|
1884
|
+
}
|
|
1766
1885
|
type BlobPart = string | Blob | BufferSource;
|
|
1767
1886
|
interface BlobPropertyBag {
|
|
1768
1887
|
endings?: "native" | "transparent";
|
|
@@ -2570,10 +2689,16 @@ declare class Response extends Body {
|
|
|
2570
2689
|
* @see https://developer.mozilla.org/docs/Web/API/fetch
|
|
2571
2690
|
*/
|
|
2572
2691
|
declare function fetch(input: string | URL | Request, init?: RequestInit): Promise<Response>;
|
|
2573
|
-
|
|
2574
|
-
|
|
2692
|
+
declare class CryptoKey {
|
|
2693
|
+
readonly algorithm: KeyAlgorithm;
|
|
2694
|
+
readonly extractable: boolean;
|
|
2695
|
+
readonly type: KeyType;
|
|
2696
|
+
readonly usages: KeyUsage[];
|
|
2697
|
+
/**
|
|
2698
|
+
* @private
|
|
2699
|
+
*/
|
|
2700
|
+
constructor();
|
|
2575
2701
|
}
|
|
2576
|
-
type AlgorithmIdentifier = Algorithm | string;
|
|
2577
2702
|
/**
|
|
2578
2703
|
* Basic cryptography features available in the current context.
|
|
2579
2704
|
* It allows access to a cryptographically strong random number
|
|
@@ -2641,10 +2766,17 @@ declare class SubtleCrypto {
|
|
|
2641
2766
|
* @ignore
|
|
2642
2767
|
*/
|
|
2643
2768
|
constructor();
|
|
2644
|
-
|
|
2769
|
+
/**
|
|
2770
|
+
* Decrypts some encrypted data.
|
|
2771
|
+
*
|
|
2772
|
+
* It takes as arguments a key to decrypt with, some optional extra parameters, and the data to decrypt (also known as "ciphertext").
|
|
2773
|
+
*
|
|
2774
|
+
* @returns A Promise which will be fulfilled with the decrypted data (also known as "plaintext") as an `ArrayBuffer`.
|
|
2775
|
+
* @see https://developer.mozilla.org/docs/Web/API/SubtleCrypto/decrypt
|
|
2776
|
+
*/
|
|
2777
|
+
decrypt(algorithm: AesCbcParams | AesXtsParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
|
2645
2778
|
deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
|
|
2646
2779
|
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | HkdfParams | Pbkdf2Params | AesDerivedKeyParams | HmacImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
2647
|
-
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | HkdfParams | Pbkdf2Params | AesDerivedKeyParams | HmacImportParams, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
2648
2780
|
/**
|
|
2649
2781
|
* Generates a digest of the given data. A digest is a short fixed-length value
|
|
2650
2782
|
* derived from some variable-length input. Cryptographic digests should exhibit
|
|
@@ -2668,24 +2800,25 @@ declare class SubtleCrypto {
|
|
|
2668
2800
|
* @see https://developer.mozilla.org/docs/Web/API/SubtleCrypto/digest
|
|
2669
2801
|
*/
|
|
2670
2802
|
digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>;
|
|
2671
|
-
encrypt(algorithm:
|
|
2803
|
+
encrypt(algorithm: AesCbcParams | AesXtsParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
|
2672
2804
|
exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>;
|
|
2673
2805
|
exportKey(format: "pkcs8" | "raw" | "spki", key: CryptoKey): Promise<ArrayBuffer>;
|
|
2674
|
-
exportKey(format: KeyFormat, key: CryptoKey): Promise<ArrayBuffer | JsonWebKey>;
|
|
2675
2806
|
generateKey(algorithm: "Ed25519", extractable: boolean, keyUsages: readonly ("sign" | "verify")[]): Promise<CryptoKeyPair>;
|
|
2676
2807
|
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: readonly KeyUsage[]): Promise<CryptoKeyPair>;
|
|
2677
2808
|
generateKey(algorithm: Pbkdf2Params | AesKeyGenParams | HmacKeyGenParams, extractable: boolean, keyUsages: readonly KeyUsage[]): Promise<CryptoKey>;
|
|
2678
2809
|
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey | CryptoKeyPair>;
|
|
2679
2810
|
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: readonly KeyUsage[]): Promise<CryptoKeyPair>;
|
|
2680
2811
|
generateKey(algorithm: Pbkdf2Params | AesKeyGenParams | HmacKeyGenParams, extractable: boolean, keyUsages: readonly KeyUsage[]): Promise<CryptoKey>;
|
|
2681
|
-
|
|
2682
|
-
|
|
2812
|
+
/**
|
|
2813
|
+
* Takes as input a key in an external, portable format and gives you a
|
|
2814
|
+
* {@link CryptoKey} object that you can use in the Web Crypto API.
|
|
2815
|
+
*
|
|
2816
|
+
* @see https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey
|
|
2817
|
+
*/
|
|
2818
|
+
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
2683
2819
|
importKey(format: "pkcs8" | "raw" | "spki", keyData: BufferSource, algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
2684
|
-
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: readonly KeyUsage[]): Promise<CryptoKey>;
|
|
2685
|
-
importKey(format: "pkcs8" | "raw" | "spki", keyData: BufferSource, algorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
2686
2820
|
sign(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>;
|
|
2687
2821
|
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>;
|
|
2688
|
-
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams | EcKeyImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
2689
2822
|
verify(algorithm: AlgorithmIdentifier | RsaPssParams | EcdsaParams, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>;
|
|
2690
2823
|
wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams): Promise<ArrayBuffer>;
|
|
2691
2824
|
}
|
|
@@ -3376,6 +3509,76 @@ declare class AmbientLightSensor extends Sensor {
|
|
|
3376
3509
|
start(): void;
|
|
3377
3510
|
stop(): void;
|
|
3378
3511
|
}
|
|
3512
|
+
declare class DOMException extends Error {
|
|
3513
|
+
INDEX_SIZE_ERR: 1;
|
|
3514
|
+
DOMSTRING_SIZE_ERR: 2;
|
|
3515
|
+
HIERARCHY_REQUEST_ERR: 3;
|
|
3516
|
+
WRONG_DOCUMENT_ERR: 4;
|
|
3517
|
+
INVALID_CHARACTER_ERR: 5;
|
|
3518
|
+
NO_DATA_ALLOWED_ERR: 6;
|
|
3519
|
+
NO_MODIFICATION_ALLOWED_ERR: 7;
|
|
3520
|
+
NOT_FOUND_ERR: 8;
|
|
3521
|
+
NOT_SUPPORTED_ERR: 9;
|
|
3522
|
+
INUSE_ATTRIBUTE_ERR: 10;
|
|
3523
|
+
INVALID_STATE_ERR: 11;
|
|
3524
|
+
SYNTAX_ERR: 12;
|
|
3525
|
+
INVALID_MODIFICATION_ERR: 13;
|
|
3526
|
+
NAMESPACE_ERR: 14;
|
|
3527
|
+
INVALID_ACCESS_ERR: 15;
|
|
3528
|
+
VALIDATION_ERR: 16;
|
|
3529
|
+
TYPE_MISMATCH_ERR: 17;
|
|
3530
|
+
SECURITY_ERR: 18;
|
|
3531
|
+
NETWORK_ERR: 19;
|
|
3532
|
+
ABORT_ERR: 20;
|
|
3533
|
+
URL_MISMATCH_ERR: 21;
|
|
3534
|
+
QUOTA_EXCEEDED_ERR: 22;
|
|
3535
|
+
TIMEOUT_ERR: 23;
|
|
3536
|
+
INVALID_NODE_TYPE_ERR: 24;
|
|
3537
|
+
DATA_CLONE_ERR: 25;
|
|
3538
|
+
static INDEX_SIZE_ERR: 1;
|
|
3539
|
+
static DOMSTRING_SIZE_ERR: 2;
|
|
3540
|
+
static HIERARCHY_REQUEST_ERR: 3;
|
|
3541
|
+
static WRONG_DOCUMENT_ERR: 4;
|
|
3542
|
+
static INVALID_CHARACTER_ERR: 5;
|
|
3543
|
+
static NO_DATA_ALLOWED_ERR: 6;
|
|
3544
|
+
static NO_MODIFICATION_ALLOWED_ERR: 7;
|
|
3545
|
+
static NOT_FOUND_ERR: 8;
|
|
3546
|
+
static NOT_SUPPORTED_ERR: 9;
|
|
3547
|
+
static INUSE_ATTRIBUTE_ERR: 10;
|
|
3548
|
+
static INVALID_STATE_ERR: 11;
|
|
3549
|
+
static SYNTAX_ERR: 12;
|
|
3550
|
+
static INVALID_MODIFICATION_ERR: 13;
|
|
3551
|
+
static NAMESPACE_ERR: 14;
|
|
3552
|
+
static INVALID_ACCESS_ERR: 15;
|
|
3553
|
+
static VALIDATION_ERR: 16;
|
|
3554
|
+
static TYPE_MISMATCH_ERR: 17;
|
|
3555
|
+
static SECURITY_ERR: 18;
|
|
3556
|
+
static NETWORK_ERR: 19;
|
|
3557
|
+
static ABORT_ERR: 20;
|
|
3558
|
+
static URL_MISMATCH_ERR: 21;
|
|
3559
|
+
static QUOTA_EXCEEDED_ERR: 22;
|
|
3560
|
+
static TIMEOUT_ERR: 23;
|
|
3561
|
+
static INVALID_NODE_TYPE_ERR: 24;
|
|
3562
|
+
static DATA_CLONE_ERR: 25;
|
|
3563
|
+
code: number;
|
|
3564
|
+
constructor(message?: string, name?: string);
|
|
3565
|
+
}
|
|
3566
|
+
/**
|
|
3567
|
+
* Compression formats supported by {@link CompressionStream | `CompressionStream`} and {@link DecompressionStream | `DecompressionStream`}.
|
|
3568
|
+
*/
|
|
3569
|
+
type CompressionFormat = "deflate" | "deflate-raw" | "gzip" | "zstd";
|
|
3570
|
+
/**
|
|
3571
|
+
* @see https://developer.mozilla.org/docs/Web/API/CompressionStream
|
|
3572
|
+
*/
|
|
3573
|
+
declare class CompressionStream extends TransformStream<Uint8Array, Uint8Array> {
|
|
3574
|
+
constructor(format: CompressionFormat);
|
|
3575
|
+
}
|
|
3576
|
+
/**
|
|
3577
|
+
* @see https://developer.mozilla.org/docs/Web/API/DecompressionStream
|
|
3578
|
+
*/
|
|
3579
|
+
declare class DecompressionStream extends TransformStream<Uint8Array, Uint8Array> {
|
|
3580
|
+
constructor(format: CompressionFormat);
|
|
3581
|
+
}
|
|
3379
3582
|
/**
|
|
3380
3583
|
* The `import.meta` meta-property exposes context-specific metadata to a JavaScript module.
|
|
3381
3584
|
* It contains information about the module, such as the module's URL.
|
|
@@ -3479,6 +3682,20 @@ declare namespace Switch {
|
|
|
3479
3682
|
* ```
|
|
3480
3683
|
*/
|
|
3481
3684
|
declare function resolveDns(hostname: string): Promise<string[]>;
|
|
3685
|
+
interface ReadFileOptions {
|
|
3686
|
+
/**
|
|
3687
|
+
* Byte offset to start reading the file from.
|
|
3688
|
+
*
|
|
3689
|
+
* @default 0
|
|
3690
|
+
*/
|
|
3691
|
+
start?: number;
|
|
3692
|
+
/**
|
|
3693
|
+
* Byte offset to stop reading the file at (inclusive).
|
|
3694
|
+
*
|
|
3695
|
+
* @default Infinity
|
|
3696
|
+
*/
|
|
3697
|
+
end?: number;
|
|
3698
|
+
}
|
|
3482
3699
|
/**
|
|
3483
3700
|
* Creates the directory at the provided `path`, as well as any necessary parent directories.
|
|
3484
3701
|
*
|
|
@@ -3506,7 +3723,7 @@ declare namespace Switch {
|
|
|
3506
3723
|
* const gameState = JSON.parse(new TextDecoder().decode(buffer));
|
|
3507
3724
|
* ```
|
|
3508
3725
|
*/
|
|
3509
|
-
declare function readFile(path: PathLike): Promise<ArrayBuffer | null>;
|
|
3726
|
+
declare function readFile(path: PathLike, opts?: ReadFileOptions): Promise<ArrayBuffer | null>;
|
|
3510
3727
|
/**
|
|
3511
3728
|
* Synchronously returns an array of the file names within `path`.
|
|
3512
3729
|
*
|
|
@@ -3530,7 +3747,7 @@ declare namespace Switch {
|
|
|
3530
3747
|
* const appState = JSON.parse(new TextDecoder().decode(buffer));
|
|
3531
3748
|
* ```
|
|
3532
3749
|
*/
|
|
3533
|
-
declare function readFileSync(path: PathLike): ArrayBuffer | null;
|
|
3750
|
+
declare function readFileSync(path: PathLike, opts?: ReadFileOptions): ArrayBuffer | null;
|
|
3534
3751
|
/**
|
|
3535
3752
|
* Synchronously writes the contents of `data` to the file at `path`.
|
|
3536
3753
|
*
|
|
@@ -3584,7 +3801,7 @@ declare namespace Switch {
|
|
|
3584
3801
|
/**
|
|
3585
3802
|
* Options object for the {@link file | `Switch.file()`} function.
|
|
3586
3803
|
*/
|
|
3587
|
-
interface FsFileOptions {
|
|
3804
|
+
interface FsFileOptions extends ReadFileOptions {
|
|
3588
3805
|
type?: string;
|
|
3589
3806
|
/**
|
|
3590
3807
|
* Create a "big file", which is a directory with the "archive" bit set.
|
|
@@ -3603,7 +3820,7 @@ declare namespace Switch {
|
|
|
3603
3820
|
*
|
|
3604
3821
|
* @default 65536
|
|
3605
3822
|
*/
|
|
3606
|
-
chunkSize
|
|
3823
|
+
chunkSize?: number;
|
|
3607
3824
|
}
|
|
3608
3825
|
/**
|
|
3609
3826
|
* Returns a {@link FsFile | `Switch.FsFile`} instance for the given `path`.
|
|
@@ -3620,9 +3837,12 @@ declare namespace Switch {
|
|
|
3620
3837
|
* also for writing files.
|
|
3621
3838
|
*/
|
|
3622
3839
|
declare class FsFile extends File {
|
|
3840
|
+
start?: number;
|
|
3841
|
+
end?: number;
|
|
3623
3842
|
constructor(path: PathLike, opts?: FsFileOptions);
|
|
3624
3843
|
get size(): number;
|
|
3625
3844
|
stat(): Promise<Stats | null>;
|
|
3845
|
+
slice(start?: number, end?: number, type?: string): FsFile;
|
|
3626
3846
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
3627
3847
|
text(): Promise<string>;
|
|
3628
3848
|
json(): Promise<any>;
|
|
@@ -4147,12 +4367,37 @@ declare namespace Switch {
|
|
|
4147
4367
|
* ```
|
|
4148
4368
|
*/
|
|
4149
4369
|
static openSdmc(): FileSystem;
|
|
4370
|
+
/**
|
|
4371
|
+
* Opens a file system partition for the application with the specified title ID.
|
|
4372
|
+
* The file system type is specified by the `FsFileSystemType` parameter.
|
|
4373
|
+
*
|
|
4374
|
+
* @example
|
|
4375
|
+
*
|
|
4376
|
+
* ```typescript
|
|
4377
|
+
* import { FsFileSystemType } from '@nx.js/constants';
|
|
4378
|
+
*
|
|
4379
|
+
* // Open and mount the "User" partition
|
|
4380
|
+
* const fs = Switch.FileSystem.openWithId(
|
|
4381
|
+
* 0x0100000000001000n,
|
|
4382
|
+
* FsFileSystemType.ContentMeta,
|
|
4383
|
+
* );
|
|
4384
|
+
* const url = fs.mount();
|
|
4385
|
+
*
|
|
4386
|
+
* // Read the file entries at the root of the file system
|
|
4387
|
+
* console.log(Switch.readDirSync(url));
|
|
4388
|
+
* ```
|
|
4389
|
+
*
|
|
4390
|
+
* @param titleId The title ID of the file system to open.
|
|
4391
|
+
* @param type The `FsFileSystemType` of the file system to open.
|
|
4392
|
+
* @param path The base path of the file system to open. Defaults to `/`.
|
|
4393
|
+
*/
|
|
4394
|
+
static openWithId(titleId: bigint, type: number, path?: string): FileSystem;
|
|
4150
4395
|
}
|
|
4151
4396
|
interface ServiceDispatchParams {
|
|
4152
4397
|
targetSession?: number;
|
|
4153
4398
|
context?: number;
|
|
4154
4399
|
bufferAttrs?: number[];
|
|
4155
|
-
buffers?:
|
|
4400
|
+
buffers?: BufferSource[];
|
|
4156
4401
|
inSendPid?: boolean;
|
|
4157
4402
|
inObjects?: Service[];
|
|
4158
4403
|
inHandles?: number[];
|
|
@@ -4166,9 +4411,9 @@ declare namespace Switch {
|
|
|
4166
4411
|
isDomain(): void;
|
|
4167
4412
|
isOverride(): void;
|
|
4168
4413
|
dispatch(rid: number, params?: ServiceDispatchParams): void;
|
|
4169
|
-
dispatchIn(rid: number, inData:
|
|
4170
|
-
dispatchOut(rid: number, outData:
|
|
4171
|
-
dispatchInOut(rid: number, inData?:
|
|
4414
|
+
dispatchIn(rid: number, inData: BufferSource, parmas?: ServiceDispatchParams): void;
|
|
4415
|
+
dispatchOut(rid: number, outData: BufferSource, params?: ServiceDispatchParams): void;
|
|
4416
|
+
dispatchInOut(rid: number, inData?: BufferSource, outData?: BufferSource, params?: ServiceDispatchParams): void;
|
|
4172
4417
|
}
|
|
4173
4418
|
type PathLike = string | URL;
|
|
4174
4419
|
interface Versions {
|
|
@@ -4194,6 +4439,8 @@ declare namespace Switch {
|
|
|
4194
4439
|
readonly turbojpeg: string;
|
|
4195
4440
|
readonly wasm3: string;
|
|
4196
4441
|
readonly webp: string;
|
|
4442
|
+
readonly zlib: string;
|
|
4443
|
+
readonly zstd: string;
|
|
4197
4444
|
}
|
|
4198
4445
|
interface Stats {
|
|
4199
4446
|
size: number;
|