@depup/cloudflare__workers-types 5.20260928.1-depup.0 → 5.20260930.1-depup.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/changes.json +1 -1
- package/experimental/index.d.ts +198 -4
- package/experimental/index.ts +176 -4
- package/index.d.ts +141 -4
- package/index.ts +119 -4
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ npm install @depup/cloudflare__workers-types
|
|
|
13
13
|
|
|
14
14
|
| Field | Value |
|
|
15
15
|
|-------|-------|
|
|
16
|
-
| Original | [@cloudflare/workers-types](https://www.npmjs.com/package/@cloudflare/workers-types) @ 5.
|
|
17
|
-
| Processed | 2026-09-
|
|
16
|
+
| Original | [@cloudflare/workers-types](https://www.npmjs.com/package/@cloudflare/workers-types) @ 5.20260930.1 |
|
|
17
|
+
| Processed | 2026-09-30 |
|
|
18
18
|
| Smoke test | failed |
|
|
19
19
|
| Deps updated | 0 |
|
|
20
20
|
|
package/changes.json
CHANGED
package/experimental/index.d.ts
CHANGED
|
@@ -1456,6 +1456,55 @@ declare abstract class SubtleCrypto {
|
|
|
1456
1456
|
extractable: boolean,
|
|
1457
1457
|
keyUsages: string[],
|
|
1458
1458
|
): Promise<CryptoKey>;
|
|
1459
|
+
static supports(
|
|
1460
|
+
operation: string,
|
|
1461
|
+
algorithm:
|
|
1462
|
+
| string
|
|
1463
|
+
| SubtleCryptoGenerateKeyAlgorithm
|
|
1464
|
+
| SubtleCryptoImportKeyAlgorithm
|
|
1465
|
+
| SubtleCryptoDeriveKeyAlgorithm
|
|
1466
|
+
| SubtleCryptoHashAlgorithm
|
|
1467
|
+
| SubtleCryptoEncryptAlgorithm
|
|
1468
|
+
| SubtleCryptoSignAlgorithm,
|
|
1469
|
+
length?: number | null,
|
|
1470
|
+
): boolean;
|
|
1471
|
+
static supports(
|
|
1472
|
+
operation: string,
|
|
1473
|
+
algorithm:
|
|
1474
|
+
| string
|
|
1475
|
+
| SubtleCryptoGenerateKeyAlgorithm
|
|
1476
|
+
| SubtleCryptoImportKeyAlgorithm
|
|
1477
|
+
| SubtleCryptoDeriveKeyAlgorithm
|
|
1478
|
+
| SubtleCryptoHashAlgorithm
|
|
1479
|
+
| SubtleCryptoEncryptAlgorithm
|
|
1480
|
+
| SubtleCryptoSignAlgorithm,
|
|
1481
|
+
additionalAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1482
|
+
): boolean;
|
|
1483
|
+
encapsulateKey(
|
|
1484
|
+
encapsulationAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1485
|
+
encapsulationKey: CryptoKey,
|
|
1486
|
+
sharedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1487
|
+
extractable: boolean,
|
|
1488
|
+
keyUsages: string[],
|
|
1489
|
+
): Promise<SubtleCryptoEncapsulatedKey>;
|
|
1490
|
+
encapsulateBits(
|
|
1491
|
+
encapsulationAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1492
|
+
encapsulationKey: CryptoKey,
|
|
1493
|
+
): Promise<SubtleCryptoEncapsulatedBits>;
|
|
1494
|
+
decapsulateKey(
|
|
1495
|
+
decapsulationAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1496
|
+
decapsulationKey: CryptoKey,
|
|
1497
|
+
ciphertext: ArrayBuffer | ArrayBufferView,
|
|
1498
|
+
sharedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1499
|
+
extractable: boolean,
|
|
1500
|
+
keyUsages: string[],
|
|
1501
|
+
): Promise<CryptoKey>;
|
|
1502
|
+
decapsulateBits(
|
|
1503
|
+
decapsulationAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1504
|
+
decapsulationKey: CryptoKey,
|
|
1505
|
+
ciphertext: ArrayBuffer | ArrayBufferView,
|
|
1506
|
+
): Promise<ArrayBuffer>;
|
|
1507
|
+
getPublicKey(key: CryptoKey, keyUsages: string[]): Promise<CryptoKey>;
|
|
1459
1508
|
timingSafeEqual(
|
|
1460
1509
|
a: ArrayBuffer | ArrayBufferView,
|
|
1461
1510
|
b: ArrayBuffer | ArrayBufferView,
|
|
@@ -1522,12 +1571,22 @@ interface JsonWebKey {
|
|
|
1522
1571
|
qi?: string;
|
|
1523
1572
|
oth?: RsaOtherPrimesInfo[];
|
|
1524
1573
|
k?: string;
|
|
1574
|
+
pub?: string;
|
|
1575
|
+
priv?: string;
|
|
1525
1576
|
}
|
|
1526
1577
|
interface RsaOtherPrimesInfo {
|
|
1527
1578
|
r?: string;
|
|
1528
1579
|
d?: string;
|
|
1529
1580
|
t?: string;
|
|
1530
1581
|
}
|
|
1582
|
+
interface SubtleCryptoEncapsulatedBits {
|
|
1583
|
+
sharedKey: ArrayBuffer;
|
|
1584
|
+
ciphertext: ArrayBuffer;
|
|
1585
|
+
}
|
|
1586
|
+
interface SubtleCryptoEncapsulatedKey {
|
|
1587
|
+
sharedKey: CryptoKey;
|
|
1588
|
+
ciphertext: ArrayBuffer;
|
|
1589
|
+
}
|
|
1531
1590
|
interface SubtleCryptoDeriveKeyAlgorithm {
|
|
1532
1591
|
name: string;
|
|
1533
1592
|
salt?: ArrayBuffer | ArrayBufferView;
|
|
@@ -1568,6 +1627,7 @@ interface SubtleCryptoSignAlgorithm {
|
|
|
1568
1627
|
hash?: string | SubtleCryptoHashAlgorithm;
|
|
1569
1628
|
dataLength?: number;
|
|
1570
1629
|
saltLength?: number;
|
|
1630
|
+
context?: ArrayBuffer | ArrayBufferView;
|
|
1571
1631
|
}
|
|
1572
1632
|
interface CryptoKeyKeyAlgorithm {
|
|
1573
1633
|
name: string;
|
|
@@ -12754,8 +12814,6 @@ interface ArtifactsCreateRepoResult {
|
|
|
12754
12814
|
remote: string;
|
|
12755
12815
|
/** Plaintext access token (only returned at creation time). */
|
|
12756
12816
|
token: string;
|
|
12757
|
-
/** ISO 8601 token expiry timestamp. */
|
|
12758
|
-
tokenExpiresAt: string;
|
|
12759
12817
|
}
|
|
12760
12818
|
/** Paginated list of repositories. */
|
|
12761
12819
|
interface ArtifactsRepoListResult {
|
|
@@ -12798,11 +12856,62 @@ interface ArtifactsTokenListResult {
|
|
|
12798
12856
|
total: number;
|
|
12799
12857
|
}
|
|
12800
12858
|
/**
|
|
12801
|
-
*
|
|
12859
|
+
* Classification of a Git tree entry derived from its mode.
|
|
12860
|
+
*
|
|
12861
|
+
* `tree` is a directory, `blob` is a regular file, `symlink` is a symbolic link,
|
|
12862
|
+
* `gitlink` is a submodule reference, and `exec` is an executable file.
|
|
12863
|
+
*/
|
|
12864
|
+
type ArtifactsTreeEntryType = "tree" | "blob" | "symlink" | "gitlink" | "exec";
|
|
12865
|
+
/** An immediate child of a Git tree returned by {@link ArtifactsRepo.readTree}. */
|
|
12866
|
+
interface ArtifactsTreeEntry {
|
|
12867
|
+
/** Name relative to the tree being read. */
|
|
12868
|
+
name: string;
|
|
12869
|
+
/** Canonical Git mode, such as `100644` for a file or `40000` for a tree. */
|
|
12870
|
+
mode: string;
|
|
12871
|
+
/** Lowercase, 40-character SHA-1 object ID. */
|
|
12872
|
+
hash: string;
|
|
12873
|
+
/** Classification derived from `mode`. */
|
|
12874
|
+
type: ArtifactsTreeEntryType;
|
|
12875
|
+
}
|
|
12876
|
+
/** Decoded metadata returned by {@link ArtifactsRepo.readCommit} and {@link ArtifactsRepo.log}. */
|
|
12877
|
+
interface ArtifactsCommitMetadata {
|
|
12878
|
+
/** Lowercase, 40-character SHA-1 commit ID. */
|
|
12879
|
+
hash: string;
|
|
12880
|
+
/** Lowercase, 40-character SHA-1 ID of the commit's root tree. */
|
|
12881
|
+
treeHash: string;
|
|
12882
|
+
/** Commit message with one trailing newline removed, if present. */
|
|
12883
|
+
message: string;
|
|
12884
|
+
/** Author identity from the commit. */
|
|
12885
|
+
author: {
|
|
12886
|
+
/** Author name. */
|
|
12887
|
+
name: string;
|
|
12888
|
+
/** Author email address. */
|
|
12889
|
+
email: string;
|
|
12890
|
+
};
|
|
12891
|
+
/** Committer identity from the commit. */
|
|
12892
|
+
committer: {
|
|
12893
|
+
/** Committer name. */
|
|
12894
|
+
name: string;
|
|
12895
|
+
/** Committer email address. */
|
|
12896
|
+
email: string;
|
|
12897
|
+
};
|
|
12898
|
+
/** Parent commit IDs in Git order; empty for a root commit. */
|
|
12899
|
+
parents: string[];
|
|
12900
|
+
/** Author timestamp in Unix seconds. */
|
|
12901
|
+
authoredAt: number;
|
|
12902
|
+
/** Committer timestamp in Unix seconds. */
|
|
12903
|
+
committedAt: number;
|
|
12904
|
+
}
|
|
12905
|
+
/**
|
|
12906
|
+
* Repository capability returned by {@link Artifacts.get}.
|
|
12802
12907
|
*
|
|
12908
|
+
* Metadata is available through {@link info}, not as properties on the capability.
|
|
12803
12909
|
* Methods may throw `ArtifactsError` with code `INTERNAL_ERROR` if an unexpected service error occurs.
|
|
12910
|
+
*
|
|
12911
|
+
* The capability is an RPC stub. Dispose of it when finished, for example with
|
|
12912
|
+
* `using repo = await env.ARTIFACTS.get(name);`, to release it before the request ends.
|
|
12804
12913
|
*/
|
|
12805
|
-
interface ArtifactsRepo extends
|
|
12914
|
+
interface ArtifactsRepo extends Disposable {
|
|
12806
12915
|
/**
|
|
12807
12916
|
* Create an access token for this repo.
|
|
12808
12917
|
* @param scope Token scope: "write" (default) or "read".
|
|
@@ -12822,6 +12931,66 @@ interface ArtifactsRepo extends ArtifactsRepoInfo {
|
|
|
12822
12931
|
* @throws {ArtifactsError} with code `INVALID_INPUT` if tokenOrId is empty.
|
|
12823
12932
|
*/
|
|
12824
12933
|
revokeToken(tokenOrId: string): Promise<boolean>;
|
|
12934
|
+
/**
|
|
12935
|
+
* Retrieve current repository metadata. Each call performs a fresh lookup.
|
|
12936
|
+
* @returns Current public repository metadata.
|
|
12937
|
+
* @throws {ArtifactsError} `NOT_FOUND` if the repository was deleted, or `INTERNAL_ERROR` on
|
|
12938
|
+
* an unexpected lookup failure.
|
|
12939
|
+
*/
|
|
12940
|
+
info(): Promise<ArtifactsRepoInfo>;
|
|
12941
|
+
/**
|
|
12942
|
+
* Read the raw bytes of a Git blob by object ID.
|
|
12943
|
+
* @param hash Lowercase, 40-character SHA-1 object ID.
|
|
12944
|
+
* @returns An untyped {@link Blob}, or `null` if the object is missing or is not a Git blob.
|
|
12945
|
+
* @throws {ArtifactsError} `INVALID_INPUT` for a malformed hash, `MEMORY_LIMIT` if the object
|
|
12946
|
+
* cannot be buffered safely, or `INTERNAL_ERROR` on an unexpected read failure.
|
|
12947
|
+
* @see {@link ArtifactsRepo.readFile} to resolve a file by ref and path.
|
|
12948
|
+
*/
|
|
12949
|
+
readBlob(hash: string): Promise<Blob | null>;
|
|
12950
|
+
/**
|
|
12951
|
+
* Read the immediate children of a Git tree by object ID.
|
|
12952
|
+
* @param hash Lowercase, 40-character SHA-1 tree ID.
|
|
12953
|
+
* @returns Tree entries, or `null` if the object is missing.
|
|
12954
|
+
* @throws {ArtifactsError} `INVALID_INPUT` for a malformed hash, or `INTERNAL_ERROR` if the
|
|
12955
|
+
* object is not a valid tree or the read fails unexpectedly.
|
|
12956
|
+
* @see {@link ArtifactsTreeEntry}
|
|
12957
|
+
*/
|
|
12958
|
+
readTree(hash: string): Promise<ArtifactsTreeEntry[] | null>;
|
|
12959
|
+
/**
|
|
12960
|
+
* Decode a Git commit by object ID.
|
|
12961
|
+
* @param hash Lowercase, 40-character SHA-1 commit ID.
|
|
12962
|
+
* @returns Commit metadata, or `null` if the object is missing.
|
|
12963
|
+
* @throws {ArtifactsError} `INVALID_INPUT` for a malformed hash, or `INTERNAL_ERROR` if the
|
|
12964
|
+
* object is not a valid commit or the read fails unexpectedly.
|
|
12965
|
+
* @see {@link ArtifactsCommitMetadata}
|
|
12966
|
+
*/
|
|
12967
|
+
readCommit(hash: string): Promise<ArtifactsCommitMetadata | null>;
|
|
12968
|
+
/**
|
|
12969
|
+
* Resolve a file from a branch, tag, or commit ID and return its bytes with a browser-safe
|
|
12970
|
+
* content type in {@link Blob.type}.
|
|
12971
|
+
* @param args File lookup options.
|
|
12972
|
+
* @param args.ref Branch, tag, or commit ID to resolve.
|
|
12973
|
+
* @param args.path Non-empty repository-relative path.
|
|
12974
|
+
* @returns A MIME-typed {@link Blob}, or `null` if the ref or path cannot resolve to a file.
|
|
12975
|
+
* @throws {ArtifactsError} `INVALID_INPUT` if either argument is empty, `MEMORY_LIMIT` if the
|
|
12976
|
+
* file cannot be buffered safely, or `INTERNAL_ERROR` on an unexpected read failure.
|
|
12977
|
+
*/
|
|
12978
|
+
readFile(args: { ref: string; path: string }): Promise<Blob | null>;
|
|
12979
|
+
/**
|
|
12980
|
+
* List commits along the first-parent chain, newest first.
|
|
12981
|
+
* @param opts History options. All fields are optional.
|
|
12982
|
+
* @param opts.ref Branch, tag, or commit ID; defaults to `HEAD`.
|
|
12983
|
+
* @param opts.limit Maximum results; defaults to `50` and is capped at `1000`.
|
|
12984
|
+
* @param opts.offset Number of matching commits to skip; defaults to `0`.
|
|
12985
|
+
* @returns Commit metadata, or an empty array if the ref cannot be resolved.
|
|
12986
|
+
* @throws {ArtifactsError} `INTERNAL_ERROR` on an unexpected traversal failure.
|
|
12987
|
+
* @see {@link ArtifactsCommitMetadata}
|
|
12988
|
+
*/
|
|
12989
|
+
log(opts?: {
|
|
12990
|
+
ref?: string;
|
|
12991
|
+
limit?: number;
|
|
12992
|
+
offset?: number;
|
|
12993
|
+
}): Promise<ArtifactsCommitMetadata[]>;
|
|
12825
12994
|
// ── Fork ──
|
|
12826
12995
|
/**
|
|
12827
12996
|
* Fork this repo to a new repo.
|
|
@@ -12849,6 +13018,7 @@ interface ArtifactsRepo extends ArtifactsRepoInfo {
|
|
|
12849
13018
|
type ArtifactsErrorCode =
|
|
12850
13019
|
| "ALREADY_EXISTS"
|
|
12851
13020
|
| "NOT_FOUND"
|
|
13021
|
+
| "CREATE_IN_PROGRESS"
|
|
12852
13022
|
| "IMPORT_IN_PROGRESS"
|
|
12853
13023
|
| "FORK_IN_PROGRESS"
|
|
12854
13024
|
| "INVALID_INPUT"
|
|
@@ -12901,6 +13071,7 @@ interface Artifacts {
|
|
|
12901
13071
|
* @param name Repository name.
|
|
12902
13072
|
* @returns Repo handle.
|
|
12903
13073
|
* @throws {ArtifactsError} with code `NOT_FOUND` if the repo does not exist.
|
|
13074
|
+
* @throws {ArtifactsError} with code `CREATE_IN_PROGRESS` if the repo is still being created.
|
|
12904
13075
|
* @throws {ArtifactsError} with code `IMPORT_IN_PROGRESS` if the repo is still importing.
|
|
12905
13076
|
* @throws {ArtifactsError} with code `FORK_IN_PROGRESS` if the repo is still forking.
|
|
12906
13077
|
*/
|
|
@@ -15246,6 +15417,29 @@ declare abstract class D1PreparedStatement {
|
|
|
15246
15417
|
// TypeScript's interface merging will ensure our empty interface is effectively
|
|
15247
15418
|
// ignored when `Disposable` is included in the standard lib.
|
|
15248
15419
|
interface Disposable {}
|
|
15420
|
+
declare module "cloudflare:durable-objects" {
|
|
15421
|
+
/**
|
|
15422
|
+
* Marks a Durable Object method as safe to run more than once. The runtime may then retry calls
|
|
15423
|
+
* to it after a disconnect that might have happened after the method started. It does not
|
|
15424
|
+
* enable retries or change how many are made.
|
|
15425
|
+
*
|
|
15426
|
+
* Each attempt creates its own return value, so if the method returns an `RpcTarget`, its
|
|
15427
|
+
* `[Symbol.dispose]()` may run once per attempt.
|
|
15428
|
+
*
|
|
15429
|
+
* Only public instance methods can be decorated. When composing decorators, apply `@retryable`
|
|
15430
|
+
* outermost (first in source order) so it marks the method that is finally installed.
|
|
15431
|
+
* Otherwise `@retryable` has no effect, and constructing the object logs a warning.
|
|
15432
|
+
* Requires standard (not `experimentalDecorators`) decorators and a bundler that transforms
|
|
15433
|
+
* them, such as Wrangler.
|
|
15434
|
+
*/
|
|
15435
|
+
export function retryable<This, Args extends unknown[], Return>(
|
|
15436
|
+
value: (this: This, ...args: Args) => Return,
|
|
15437
|
+
context: ClassMethodDecoratorContext<
|
|
15438
|
+
This,
|
|
15439
|
+
(this: This, ...args: Args) => Return
|
|
15440
|
+
>,
|
|
15441
|
+
): (this: This, ...args: Args) => Return;
|
|
15442
|
+
}
|
|
15249
15443
|
/**
|
|
15250
15444
|
* The returned data after sending an email
|
|
15251
15445
|
*/
|
package/experimental/index.ts
CHANGED
|
@@ -1460,6 +1460,55 @@ export declare abstract class SubtleCrypto {
|
|
|
1460
1460
|
extractable: boolean,
|
|
1461
1461
|
keyUsages: string[],
|
|
1462
1462
|
): Promise<CryptoKey>;
|
|
1463
|
+
static supports(
|
|
1464
|
+
operation: string,
|
|
1465
|
+
algorithm:
|
|
1466
|
+
| string
|
|
1467
|
+
| SubtleCryptoGenerateKeyAlgorithm
|
|
1468
|
+
| SubtleCryptoImportKeyAlgorithm
|
|
1469
|
+
| SubtleCryptoDeriveKeyAlgorithm
|
|
1470
|
+
| SubtleCryptoHashAlgorithm
|
|
1471
|
+
| SubtleCryptoEncryptAlgorithm
|
|
1472
|
+
| SubtleCryptoSignAlgorithm,
|
|
1473
|
+
length?: number | null,
|
|
1474
|
+
): boolean;
|
|
1475
|
+
static supports(
|
|
1476
|
+
operation: string,
|
|
1477
|
+
algorithm:
|
|
1478
|
+
| string
|
|
1479
|
+
| SubtleCryptoGenerateKeyAlgorithm
|
|
1480
|
+
| SubtleCryptoImportKeyAlgorithm
|
|
1481
|
+
| SubtleCryptoDeriveKeyAlgorithm
|
|
1482
|
+
| SubtleCryptoHashAlgorithm
|
|
1483
|
+
| SubtleCryptoEncryptAlgorithm
|
|
1484
|
+
| SubtleCryptoSignAlgorithm,
|
|
1485
|
+
additionalAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1486
|
+
): boolean;
|
|
1487
|
+
encapsulateKey(
|
|
1488
|
+
encapsulationAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1489
|
+
encapsulationKey: CryptoKey,
|
|
1490
|
+
sharedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1491
|
+
extractable: boolean,
|
|
1492
|
+
keyUsages: string[],
|
|
1493
|
+
): Promise<SubtleCryptoEncapsulatedKey>;
|
|
1494
|
+
encapsulateBits(
|
|
1495
|
+
encapsulationAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1496
|
+
encapsulationKey: CryptoKey,
|
|
1497
|
+
): Promise<SubtleCryptoEncapsulatedBits>;
|
|
1498
|
+
decapsulateKey(
|
|
1499
|
+
decapsulationAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1500
|
+
decapsulationKey: CryptoKey,
|
|
1501
|
+
ciphertext: ArrayBuffer | ArrayBufferView,
|
|
1502
|
+
sharedKeyAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1503
|
+
extractable: boolean,
|
|
1504
|
+
keyUsages: string[],
|
|
1505
|
+
): Promise<CryptoKey>;
|
|
1506
|
+
decapsulateBits(
|
|
1507
|
+
decapsulationAlgorithm: string | SubtleCryptoImportKeyAlgorithm,
|
|
1508
|
+
decapsulationKey: CryptoKey,
|
|
1509
|
+
ciphertext: ArrayBuffer | ArrayBufferView,
|
|
1510
|
+
): Promise<ArrayBuffer>;
|
|
1511
|
+
getPublicKey(key: CryptoKey, keyUsages: string[]): Promise<CryptoKey>;
|
|
1463
1512
|
timingSafeEqual(
|
|
1464
1513
|
a: ArrayBuffer | ArrayBufferView,
|
|
1465
1514
|
b: ArrayBuffer | ArrayBufferView,
|
|
@@ -1526,12 +1575,22 @@ export interface JsonWebKey {
|
|
|
1526
1575
|
qi?: string;
|
|
1527
1576
|
oth?: RsaOtherPrimesInfo[];
|
|
1528
1577
|
k?: string;
|
|
1578
|
+
pub?: string;
|
|
1579
|
+
priv?: string;
|
|
1529
1580
|
}
|
|
1530
1581
|
export interface RsaOtherPrimesInfo {
|
|
1531
1582
|
r?: string;
|
|
1532
1583
|
d?: string;
|
|
1533
1584
|
t?: string;
|
|
1534
1585
|
}
|
|
1586
|
+
export interface SubtleCryptoEncapsulatedBits {
|
|
1587
|
+
sharedKey: ArrayBuffer;
|
|
1588
|
+
ciphertext: ArrayBuffer;
|
|
1589
|
+
}
|
|
1590
|
+
export interface SubtleCryptoEncapsulatedKey {
|
|
1591
|
+
sharedKey: CryptoKey;
|
|
1592
|
+
ciphertext: ArrayBuffer;
|
|
1593
|
+
}
|
|
1535
1594
|
export interface SubtleCryptoDeriveKeyAlgorithm {
|
|
1536
1595
|
name: string;
|
|
1537
1596
|
salt?: ArrayBuffer | ArrayBufferView;
|
|
@@ -1572,6 +1631,7 @@ export interface SubtleCryptoSignAlgorithm {
|
|
|
1572
1631
|
hash?: string | SubtleCryptoHashAlgorithm;
|
|
1573
1632
|
dataLength?: number;
|
|
1574
1633
|
saltLength?: number;
|
|
1634
|
+
context?: ArrayBuffer | ArrayBufferView;
|
|
1575
1635
|
}
|
|
1576
1636
|
export interface CryptoKeyKeyAlgorithm {
|
|
1577
1637
|
name: string;
|
|
@@ -12768,8 +12828,6 @@ export interface ArtifactsCreateRepoResult {
|
|
|
12768
12828
|
remote: string;
|
|
12769
12829
|
/** Plaintext access token (only returned at creation time). */
|
|
12770
12830
|
token: string;
|
|
12771
|
-
/** ISO 8601 token expiry timestamp. */
|
|
12772
|
-
tokenExpiresAt: string;
|
|
12773
12831
|
}
|
|
12774
12832
|
/** Paginated list of repositories. */
|
|
12775
12833
|
export interface ArtifactsRepoListResult {
|
|
@@ -12812,11 +12870,63 @@ export interface ArtifactsTokenListResult {
|
|
|
12812
12870
|
total: number;
|
|
12813
12871
|
}
|
|
12814
12872
|
/**
|
|
12815
|
-
*
|
|
12873
|
+
* Classification of a Git tree entry derived from its mode.
|
|
12816
12874
|
*
|
|
12875
|
+
* `tree` is a directory, `blob` is a regular file, `symlink` is a symbolic link,
|
|
12876
|
+
* `gitlink` is a submodule reference, and `exec` is an executable file.
|
|
12877
|
+
*/
|
|
12878
|
+
export type ArtifactsTreeEntryType =
|
|
12879
|
+
"tree" | "blob" | "symlink" | "gitlink" | "exec";
|
|
12880
|
+
/** An immediate child of a Git tree returned by {@link ArtifactsRepo.readTree}. */
|
|
12881
|
+
export interface ArtifactsTreeEntry {
|
|
12882
|
+
/** Name relative to the tree being read. */
|
|
12883
|
+
name: string;
|
|
12884
|
+
/** Canonical Git mode, such as `100644` for a file or `40000` for a tree. */
|
|
12885
|
+
mode: string;
|
|
12886
|
+
/** Lowercase, 40-character SHA-1 object ID. */
|
|
12887
|
+
hash: string;
|
|
12888
|
+
/** Classification derived from `mode`. */
|
|
12889
|
+
type: ArtifactsTreeEntryType;
|
|
12890
|
+
}
|
|
12891
|
+
/** Decoded metadata returned by {@link ArtifactsRepo.readCommit} and {@link ArtifactsRepo.log}. */
|
|
12892
|
+
export interface ArtifactsCommitMetadata {
|
|
12893
|
+
/** Lowercase, 40-character SHA-1 commit ID. */
|
|
12894
|
+
hash: string;
|
|
12895
|
+
/** Lowercase, 40-character SHA-1 ID of the commit's root tree. */
|
|
12896
|
+
treeHash: string;
|
|
12897
|
+
/** Commit message with one trailing newline removed, if present. */
|
|
12898
|
+
message: string;
|
|
12899
|
+
/** Author identity from the commit. */
|
|
12900
|
+
author: {
|
|
12901
|
+
/** Author name. */
|
|
12902
|
+
name: string;
|
|
12903
|
+
/** Author email address. */
|
|
12904
|
+
email: string;
|
|
12905
|
+
};
|
|
12906
|
+
/** Committer identity from the commit. */
|
|
12907
|
+
committer: {
|
|
12908
|
+
/** Committer name. */
|
|
12909
|
+
name: string;
|
|
12910
|
+
/** Committer email address. */
|
|
12911
|
+
email: string;
|
|
12912
|
+
};
|
|
12913
|
+
/** Parent commit IDs in Git order; empty for a root commit. */
|
|
12914
|
+
parents: string[];
|
|
12915
|
+
/** Author timestamp in Unix seconds. */
|
|
12916
|
+
authoredAt: number;
|
|
12917
|
+
/** Committer timestamp in Unix seconds. */
|
|
12918
|
+
committedAt: number;
|
|
12919
|
+
}
|
|
12920
|
+
/**
|
|
12921
|
+
* Repository capability returned by {@link Artifacts.get}.
|
|
12922
|
+
*
|
|
12923
|
+
* Metadata is available through {@link info}, not as properties on the capability.
|
|
12817
12924
|
* Methods may throw `ArtifactsError` with code `INTERNAL_ERROR` if an unexpected service error occurs.
|
|
12925
|
+
*
|
|
12926
|
+
* The capability is an RPC stub. Dispose of it when finished, for example with
|
|
12927
|
+
* `using repo = await env.ARTIFACTS.get(name);`, to release it before the request ends.
|
|
12818
12928
|
*/
|
|
12819
|
-
export interface ArtifactsRepo extends
|
|
12929
|
+
export interface ArtifactsRepo extends Disposable {
|
|
12820
12930
|
/**
|
|
12821
12931
|
* Create an access token for this repo.
|
|
12822
12932
|
* @param scope Token scope: "write" (default) or "read".
|
|
@@ -12836,6 +12946,66 @@ export interface ArtifactsRepo extends ArtifactsRepoInfo {
|
|
|
12836
12946
|
* @throws {ArtifactsError} with code `INVALID_INPUT` if tokenOrId is empty.
|
|
12837
12947
|
*/
|
|
12838
12948
|
revokeToken(tokenOrId: string): Promise<boolean>;
|
|
12949
|
+
/**
|
|
12950
|
+
* Retrieve current repository metadata. Each call performs a fresh lookup.
|
|
12951
|
+
* @returns Current public repository metadata.
|
|
12952
|
+
* @throws {ArtifactsError} `NOT_FOUND` if the repository was deleted, or `INTERNAL_ERROR` on
|
|
12953
|
+
* an unexpected lookup failure.
|
|
12954
|
+
*/
|
|
12955
|
+
info(): Promise<ArtifactsRepoInfo>;
|
|
12956
|
+
/**
|
|
12957
|
+
* Read the raw bytes of a Git blob by object ID.
|
|
12958
|
+
* @param hash Lowercase, 40-character SHA-1 object ID.
|
|
12959
|
+
* @returns An untyped {@link Blob}, or `null` if the object is missing or is not a Git blob.
|
|
12960
|
+
* @throws {ArtifactsError} `INVALID_INPUT` for a malformed hash, `MEMORY_LIMIT` if the object
|
|
12961
|
+
* cannot be buffered safely, or `INTERNAL_ERROR` on an unexpected read failure.
|
|
12962
|
+
* @see {@link ArtifactsRepo.readFile} to resolve a file by ref and path.
|
|
12963
|
+
*/
|
|
12964
|
+
readBlob(hash: string): Promise<Blob | null>;
|
|
12965
|
+
/**
|
|
12966
|
+
* Read the immediate children of a Git tree by object ID.
|
|
12967
|
+
* @param hash Lowercase, 40-character SHA-1 tree ID.
|
|
12968
|
+
* @returns Tree entries, or `null` if the object is missing.
|
|
12969
|
+
* @throws {ArtifactsError} `INVALID_INPUT` for a malformed hash, or `INTERNAL_ERROR` if the
|
|
12970
|
+
* object is not a valid tree or the read fails unexpectedly.
|
|
12971
|
+
* @see {@link ArtifactsTreeEntry}
|
|
12972
|
+
*/
|
|
12973
|
+
readTree(hash: string): Promise<ArtifactsTreeEntry[] | null>;
|
|
12974
|
+
/**
|
|
12975
|
+
* Decode a Git commit by object ID.
|
|
12976
|
+
* @param hash Lowercase, 40-character SHA-1 commit ID.
|
|
12977
|
+
* @returns Commit metadata, or `null` if the object is missing.
|
|
12978
|
+
* @throws {ArtifactsError} `INVALID_INPUT` for a malformed hash, or `INTERNAL_ERROR` if the
|
|
12979
|
+
* object is not a valid commit or the read fails unexpectedly.
|
|
12980
|
+
* @see {@link ArtifactsCommitMetadata}
|
|
12981
|
+
*/
|
|
12982
|
+
readCommit(hash: string): Promise<ArtifactsCommitMetadata | null>;
|
|
12983
|
+
/**
|
|
12984
|
+
* Resolve a file from a branch, tag, or commit ID and return its bytes with a browser-safe
|
|
12985
|
+
* content type in {@link Blob.type}.
|
|
12986
|
+
* @param args File lookup options.
|
|
12987
|
+
* @param args.ref Branch, tag, or commit ID to resolve.
|
|
12988
|
+
* @param args.path Non-empty repository-relative path.
|
|
12989
|
+
* @returns A MIME-typed {@link Blob}, or `null` if the ref or path cannot resolve to a file.
|
|
12990
|
+
* @throws {ArtifactsError} `INVALID_INPUT` if either argument is empty, `MEMORY_LIMIT` if the
|
|
12991
|
+
* file cannot be buffered safely, or `INTERNAL_ERROR` on an unexpected read failure.
|
|
12992
|
+
*/
|
|
12993
|
+
readFile(args: { ref: string; path: string }): Promise<Blob | null>;
|
|
12994
|
+
/**
|
|
12995
|
+
* List commits along the first-parent chain, newest first.
|
|
12996
|
+
* @param opts History options. All fields are optional.
|
|
12997
|
+
* @param opts.ref Branch, tag, or commit ID; defaults to `HEAD`.
|
|
12998
|
+
* @param opts.limit Maximum results; defaults to `50` and is capped at `1000`.
|
|
12999
|
+
* @param opts.offset Number of matching commits to skip; defaults to `0`.
|
|
13000
|
+
* @returns Commit metadata, or an empty array if the ref cannot be resolved.
|
|
13001
|
+
* @throws {ArtifactsError} `INTERNAL_ERROR` on an unexpected traversal failure.
|
|
13002
|
+
* @see {@link ArtifactsCommitMetadata}
|
|
13003
|
+
*/
|
|
13004
|
+
log(opts?: {
|
|
13005
|
+
ref?: string;
|
|
13006
|
+
limit?: number;
|
|
13007
|
+
offset?: number;
|
|
13008
|
+
}): Promise<ArtifactsCommitMetadata[]>;
|
|
12839
13009
|
// ── Fork ──
|
|
12840
13010
|
/**
|
|
12841
13011
|
* Fork this repo to a new repo.
|
|
@@ -12863,6 +13033,7 @@ export interface ArtifactsRepo extends ArtifactsRepoInfo {
|
|
|
12863
13033
|
export type ArtifactsErrorCode =
|
|
12864
13034
|
| "ALREADY_EXISTS"
|
|
12865
13035
|
| "NOT_FOUND"
|
|
13036
|
+
| "CREATE_IN_PROGRESS"
|
|
12866
13037
|
| "IMPORT_IN_PROGRESS"
|
|
12867
13038
|
| "FORK_IN_PROGRESS"
|
|
12868
13039
|
| "INVALID_INPUT"
|
|
@@ -12915,6 +13086,7 @@ export interface Artifacts {
|
|
|
12915
13086
|
* @param name Repository name.
|
|
12916
13087
|
* @returns Repo handle.
|
|
12917
13088
|
* @throws {ArtifactsError} with code `NOT_FOUND` if the repo does not exist.
|
|
13089
|
+
* @throws {ArtifactsError} with code `CREATE_IN_PROGRESS` if the repo is still being created.
|
|
12918
13090
|
* @throws {ArtifactsError} with code `IMPORT_IN_PROGRESS` if the repo is still importing.
|
|
12919
13091
|
* @throws {ArtifactsError} with code `FORK_IN_PROGRESS` if the repo is still forking.
|
|
12920
13092
|
*/
|
package/index.d.ts
CHANGED
|
@@ -1496,6 +1496,8 @@ interface JsonWebKey {
|
|
|
1496
1496
|
qi?: string;
|
|
1497
1497
|
oth?: RsaOtherPrimesInfo[];
|
|
1498
1498
|
k?: string;
|
|
1499
|
+
pub?: string;
|
|
1500
|
+
priv?: string;
|
|
1499
1501
|
}
|
|
1500
1502
|
interface RsaOtherPrimesInfo {
|
|
1501
1503
|
r?: string;
|
|
@@ -1542,6 +1544,7 @@ interface SubtleCryptoSignAlgorithm {
|
|
|
1542
1544
|
hash?: string | SubtleCryptoHashAlgorithm;
|
|
1543
1545
|
dataLength?: number;
|
|
1544
1546
|
saltLength?: number;
|
|
1547
|
+
context?: ArrayBuffer | ArrayBufferView;
|
|
1545
1548
|
}
|
|
1546
1549
|
interface CryptoKeyKeyAlgorithm {
|
|
1547
1550
|
name: string;
|
|
@@ -12471,8 +12474,6 @@ interface ArtifactsCreateRepoResult {
|
|
|
12471
12474
|
remote: string;
|
|
12472
12475
|
/** Plaintext access token (only returned at creation time). */
|
|
12473
12476
|
token: string;
|
|
12474
|
-
/** ISO 8601 token expiry timestamp. */
|
|
12475
|
-
tokenExpiresAt: string;
|
|
12476
12477
|
}
|
|
12477
12478
|
/** Paginated list of repositories. */
|
|
12478
12479
|
interface ArtifactsRepoListResult {
|
|
@@ -12515,11 +12516,62 @@ interface ArtifactsTokenListResult {
|
|
|
12515
12516
|
total: number;
|
|
12516
12517
|
}
|
|
12517
12518
|
/**
|
|
12518
|
-
*
|
|
12519
|
+
* Classification of a Git tree entry derived from its mode.
|
|
12519
12520
|
*
|
|
12521
|
+
* `tree` is a directory, `blob` is a regular file, `symlink` is a symbolic link,
|
|
12522
|
+
* `gitlink` is a submodule reference, and `exec` is an executable file.
|
|
12523
|
+
*/
|
|
12524
|
+
type ArtifactsTreeEntryType = "tree" | "blob" | "symlink" | "gitlink" | "exec";
|
|
12525
|
+
/** An immediate child of a Git tree returned by {@link ArtifactsRepo.readTree}. */
|
|
12526
|
+
interface ArtifactsTreeEntry {
|
|
12527
|
+
/** Name relative to the tree being read. */
|
|
12528
|
+
name: string;
|
|
12529
|
+
/** Canonical Git mode, such as `100644` for a file or `40000` for a tree. */
|
|
12530
|
+
mode: string;
|
|
12531
|
+
/** Lowercase, 40-character SHA-1 object ID. */
|
|
12532
|
+
hash: string;
|
|
12533
|
+
/** Classification derived from `mode`. */
|
|
12534
|
+
type: ArtifactsTreeEntryType;
|
|
12535
|
+
}
|
|
12536
|
+
/** Decoded metadata returned by {@link ArtifactsRepo.readCommit} and {@link ArtifactsRepo.log}. */
|
|
12537
|
+
interface ArtifactsCommitMetadata {
|
|
12538
|
+
/** Lowercase, 40-character SHA-1 commit ID. */
|
|
12539
|
+
hash: string;
|
|
12540
|
+
/** Lowercase, 40-character SHA-1 ID of the commit's root tree. */
|
|
12541
|
+
treeHash: string;
|
|
12542
|
+
/** Commit message with one trailing newline removed, if present. */
|
|
12543
|
+
message: string;
|
|
12544
|
+
/** Author identity from the commit. */
|
|
12545
|
+
author: {
|
|
12546
|
+
/** Author name. */
|
|
12547
|
+
name: string;
|
|
12548
|
+
/** Author email address. */
|
|
12549
|
+
email: string;
|
|
12550
|
+
};
|
|
12551
|
+
/** Committer identity from the commit. */
|
|
12552
|
+
committer: {
|
|
12553
|
+
/** Committer name. */
|
|
12554
|
+
name: string;
|
|
12555
|
+
/** Committer email address. */
|
|
12556
|
+
email: string;
|
|
12557
|
+
};
|
|
12558
|
+
/** Parent commit IDs in Git order; empty for a root commit. */
|
|
12559
|
+
parents: string[];
|
|
12560
|
+
/** Author timestamp in Unix seconds. */
|
|
12561
|
+
authoredAt: number;
|
|
12562
|
+
/** Committer timestamp in Unix seconds. */
|
|
12563
|
+
committedAt: number;
|
|
12564
|
+
}
|
|
12565
|
+
/**
|
|
12566
|
+
* Repository capability returned by {@link Artifacts.get}.
|
|
12567
|
+
*
|
|
12568
|
+
* Metadata is available through {@link info}, not as properties on the capability.
|
|
12520
12569
|
* Methods may throw `ArtifactsError` with code `INTERNAL_ERROR` if an unexpected service error occurs.
|
|
12570
|
+
*
|
|
12571
|
+
* The capability is an RPC stub. Dispose of it when finished, for example with
|
|
12572
|
+
* `using repo = await env.ARTIFACTS.get(name);`, to release it before the request ends.
|
|
12521
12573
|
*/
|
|
12522
|
-
interface ArtifactsRepo extends
|
|
12574
|
+
interface ArtifactsRepo extends Disposable {
|
|
12523
12575
|
/**
|
|
12524
12576
|
* Create an access token for this repo.
|
|
12525
12577
|
* @param scope Token scope: "write" (default) or "read".
|
|
@@ -12539,6 +12591,66 @@ interface ArtifactsRepo extends ArtifactsRepoInfo {
|
|
|
12539
12591
|
* @throws {ArtifactsError} with code `INVALID_INPUT` if tokenOrId is empty.
|
|
12540
12592
|
*/
|
|
12541
12593
|
revokeToken(tokenOrId: string): Promise<boolean>;
|
|
12594
|
+
/**
|
|
12595
|
+
* Retrieve current repository metadata. Each call performs a fresh lookup.
|
|
12596
|
+
* @returns Current public repository metadata.
|
|
12597
|
+
* @throws {ArtifactsError} `NOT_FOUND` if the repository was deleted, or `INTERNAL_ERROR` on
|
|
12598
|
+
* an unexpected lookup failure.
|
|
12599
|
+
*/
|
|
12600
|
+
info(): Promise<ArtifactsRepoInfo>;
|
|
12601
|
+
/**
|
|
12602
|
+
* Read the raw bytes of a Git blob by object ID.
|
|
12603
|
+
* @param hash Lowercase, 40-character SHA-1 object ID.
|
|
12604
|
+
* @returns An untyped {@link Blob}, or `null` if the object is missing or is not a Git blob.
|
|
12605
|
+
* @throws {ArtifactsError} `INVALID_INPUT` for a malformed hash, `MEMORY_LIMIT` if the object
|
|
12606
|
+
* cannot be buffered safely, or `INTERNAL_ERROR` on an unexpected read failure.
|
|
12607
|
+
* @see {@link ArtifactsRepo.readFile} to resolve a file by ref and path.
|
|
12608
|
+
*/
|
|
12609
|
+
readBlob(hash: string): Promise<Blob | null>;
|
|
12610
|
+
/**
|
|
12611
|
+
* Read the immediate children of a Git tree by object ID.
|
|
12612
|
+
* @param hash Lowercase, 40-character SHA-1 tree ID.
|
|
12613
|
+
* @returns Tree entries, or `null` if the object is missing.
|
|
12614
|
+
* @throws {ArtifactsError} `INVALID_INPUT` for a malformed hash, or `INTERNAL_ERROR` if the
|
|
12615
|
+
* object is not a valid tree or the read fails unexpectedly.
|
|
12616
|
+
* @see {@link ArtifactsTreeEntry}
|
|
12617
|
+
*/
|
|
12618
|
+
readTree(hash: string): Promise<ArtifactsTreeEntry[] | null>;
|
|
12619
|
+
/**
|
|
12620
|
+
* Decode a Git commit by object ID.
|
|
12621
|
+
* @param hash Lowercase, 40-character SHA-1 commit ID.
|
|
12622
|
+
* @returns Commit metadata, or `null` if the object is missing.
|
|
12623
|
+
* @throws {ArtifactsError} `INVALID_INPUT` for a malformed hash, or `INTERNAL_ERROR` if the
|
|
12624
|
+
* object is not a valid commit or the read fails unexpectedly.
|
|
12625
|
+
* @see {@link ArtifactsCommitMetadata}
|
|
12626
|
+
*/
|
|
12627
|
+
readCommit(hash: string): Promise<ArtifactsCommitMetadata | null>;
|
|
12628
|
+
/**
|
|
12629
|
+
* Resolve a file from a branch, tag, or commit ID and return its bytes with a browser-safe
|
|
12630
|
+
* content type in {@link Blob.type}.
|
|
12631
|
+
* @param args File lookup options.
|
|
12632
|
+
* @param args.ref Branch, tag, or commit ID to resolve.
|
|
12633
|
+
* @param args.path Non-empty repository-relative path.
|
|
12634
|
+
* @returns A MIME-typed {@link Blob}, or `null` if the ref or path cannot resolve to a file.
|
|
12635
|
+
* @throws {ArtifactsError} `INVALID_INPUT` if either argument is empty, `MEMORY_LIMIT` if the
|
|
12636
|
+
* file cannot be buffered safely, or `INTERNAL_ERROR` on an unexpected read failure.
|
|
12637
|
+
*/
|
|
12638
|
+
readFile(args: { ref: string; path: string }): Promise<Blob | null>;
|
|
12639
|
+
/**
|
|
12640
|
+
* List commits along the first-parent chain, newest first.
|
|
12641
|
+
* @param opts History options. All fields are optional.
|
|
12642
|
+
* @param opts.ref Branch, tag, or commit ID; defaults to `HEAD`.
|
|
12643
|
+
* @param opts.limit Maximum results; defaults to `50` and is capped at `1000`.
|
|
12644
|
+
* @param opts.offset Number of matching commits to skip; defaults to `0`.
|
|
12645
|
+
* @returns Commit metadata, or an empty array if the ref cannot be resolved.
|
|
12646
|
+
* @throws {ArtifactsError} `INTERNAL_ERROR` on an unexpected traversal failure.
|
|
12647
|
+
* @see {@link ArtifactsCommitMetadata}
|
|
12648
|
+
*/
|
|
12649
|
+
log(opts?: {
|
|
12650
|
+
ref?: string;
|
|
12651
|
+
limit?: number;
|
|
12652
|
+
offset?: number;
|
|
12653
|
+
}): Promise<ArtifactsCommitMetadata[]>;
|
|
12542
12654
|
// ── Fork ──
|
|
12543
12655
|
/**
|
|
12544
12656
|
* Fork this repo to a new repo.
|
|
@@ -12566,6 +12678,7 @@ interface ArtifactsRepo extends ArtifactsRepoInfo {
|
|
|
12566
12678
|
type ArtifactsErrorCode =
|
|
12567
12679
|
| "ALREADY_EXISTS"
|
|
12568
12680
|
| "NOT_FOUND"
|
|
12681
|
+
| "CREATE_IN_PROGRESS"
|
|
12569
12682
|
| "IMPORT_IN_PROGRESS"
|
|
12570
12683
|
| "FORK_IN_PROGRESS"
|
|
12571
12684
|
| "INVALID_INPUT"
|
|
@@ -12618,6 +12731,7 @@ interface Artifacts {
|
|
|
12618
12731
|
* @param name Repository name.
|
|
12619
12732
|
* @returns Repo handle.
|
|
12620
12733
|
* @throws {ArtifactsError} with code `NOT_FOUND` if the repo does not exist.
|
|
12734
|
+
* @throws {ArtifactsError} with code `CREATE_IN_PROGRESS` if the repo is still being created.
|
|
12621
12735
|
* @throws {ArtifactsError} with code `IMPORT_IN_PROGRESS` if the repo is still importing.
|
|
12622
12736
|
* @throws {ArtifactsError} with code `FORK_IN_PROGRESS` if the repo is still forking.
|
|
12623
12737
|
*/
|
|
@@ -14963,6 +15077,29 @@ declare abstract class D1PreparedStatement {
|
|
|
14963
15077
|
// TypeScript's interface merging will ensure our empty interface is effectively
|
|
14964
15078
|
// ignored when `Disposable` is included in the standard lib.
|
|
14965
15079
|
interface Disposable {}
|
|
15080
|
+
declare module "cloudflare:durable-objects" {
|
|
15081
|
+
/**
|
|
15082
|
+
* Marks a Durable Object method as safe to run more than once. The runtime may then retry calls
|
|
15083
|
+
* to it after a disconnect that might have happened after the method started. It does not
|
|
15084
|
+
* enable retries or change how many are made.
|
|
15085
|
+
*
|
|
15086
|
+
* Each attempt creates its own return value, so if the method returns an `RpcTarget`, its
|
|
15087
|
+
* `[Symbol.dispose]()` may run once per attempt.
|
|
15088
|
+
*
|
|
15089
|
+
* Only public instance methods can be decorated. When composing decorators, apply `@retryable`
|
|
15090
|
+
* outermost (first in source order) so it marks the method that is finally installed.
|
|
15091
|
+
* Otherwise `@retryable` has no effect, and constructing the object logs a warning.
|
|
15092
|
+
* Requires standard (not `experimentalDecorators`) decorators and a bundler that transforms
|
|
15093
|
+
* them, such as Wrangler.
|
|
15094
|
+
*/
|
|
15095
|
+
export function retryable<This, Args extends unknown[], Return>(
|
|
15096
|
+
value: (this: This, ...args: Args) => Return,
|
|
15097
|
+
context: ClassMethodDecoratorContext<
|
|
15098
|
+
This,
|
|
15099
|
+
(this: This, ...args: Args) => Return
|
|
15100
|
+
>,
|
|
15101
|
+
): (this: This, ...args: Args) => Return;
|
|
15102
|
+
}
|
|
14966
15103
|
/**
|
|
14967
15104
|
* The returned data after sending an email
|
|
14968
15105
|
*/
|
package/index.ts
CHANGED
|
@@ -1500,6 +1500,8 @@ export interface JsonWebKey {
|
|
|
1500
1500
|
qi?: string;
|
|
1501
1501
|
oth?: RsaOtherPrimesInfo[];
|
|
1502
1502
|
k?: string;
|
|
1503
|
+
pub?: string;
|
|
1504
|
+
priv?: string;
|
|
1503
1505
|
}
|
|
1504
1506
|
export interface RsaOtherPrimesInfo {
|
|
1505
1507
|
r?: string;
|
|
@@ -1546,6 +1548,7 @@ export interface SubtleCryptoSignAlgorithm {
|
|
|
1546
1548
|
hash?: string | SubtleCryptoHashAlgorithm;
|
|
1547
1549
|
dataLength?: number;
|
|
1548
1550
|
saltLength?: number;
|
|
1551
|
+
context?: ArrayBuffer | ArrayBufferView;
|
|
1549
1552
|
}
|
|
1550
1553
|
export interface CryptoKeyKeyAlgorithm {
|
|
1551
1554
|
name: string;
|
|
@@ -12485,8 +12488,6 @@ export interface ArtifactsCreateRepoResult {
|
|
|
12485
12488
|
remote: string;
|
|
12486
12489
|
/** Plaintext access token (only returned at creation time). */
|
|
12487
12490
|
token: string;
|
|
12488
|
-
/** ISO 8601 token expiry timestamp. */
|
|
12489
|
-
tokenExpiresAt: string;
|
|
12490
12491
|
}
|
|
12491
12492
|
/** Paginated list of repositories. */
|
|
12492
12493
|
export interface ArtifactsRepoListResult {
|
|
@@ -12529,11 +12530,63 @@ export interface ArtifactsTokenListResult {
|
|
|
12529
12530
|
total: number;
|
|
12530
12531
|
}
|
|
12531
12532
|
/**
|
|
12532
|
-
*
|
|
12533
|
+
* Classification of a Git tree entry derived from its mode.
|
|
12534
|
+
*
|
|
12535
|
+
* `tree` is a directory, `blob` is a regular file, `symlink` is a symbolic link,
|
|
12536
|
+
* `gitlink` is a submodule reference, and `exec` is an executable file.
|
|
12537
|
+
*/
|
|
12538
|
+
export type ArtifactsTreeEntryType =
|
|
12539
|
+
"tree" | "blob" | "symlink" | "gitlink" | "exec";
|
|
12540
|
+
/** An immediate child of a Git tree returned by {@link ArtifactsRepo.readTree}. */
|
|
12541
|
+
export interface ArtifactsTreeEntry {
|
|
12542
|
+
/** Name relative to the tree being read. */
|
|
12543
|
+
name: string;
|
|
12544
|
+
/** Canonical Git mode, such as `100644` for a file or `40000` for a tree. */
|
|
12545
|
+
mode: string;
|
|
12546
|
+
/** Lowercase, 40-character SHA-1 object ID. */
|
|
12547
|
+
hash: string;
|
|
12548
|
+
/** Classification derived from `mode`. */
|
|
12549
|
+
type: ArtifactsTreeEntryType;
|
|
12550
|
+
}
|
|
12551
|
+
/** Decoded metadata returned by {@link ArtifactsRepo.readCommit} and {@link ArtifactsRepo.log}. */
|
|
12552
|
+
export interface ArtifactsCommitMetadata {
|
|
12553
|
+
/** Lowercase, 40-character SHA-1 commit ID. */
|
|
12554
|
+
hash: string;
|
|
12555
|
+
/** Lowercase, 40-character SHA-1 ID of the commit's root tree. */
|
|
12556
|
+
treeHash: string;
|
|
12557
|
+
/** Commit message with one trailing newline removed, if present. */
|
|
12558
|
+
message: string;
|
|
12559
|
+
/** Author identity from the commit. */
|
|
12560
|
+
author: {
|
|
12561
|
+
/** Author name. */
|
|
12562
|
+
name: string;
|
|
12563
|
+
/** Author email address. */
|
|
12564
|
+
email: string;
|
|
12565
|
+
};
|
|
12566
|
+
/** Committer identity from the commit. */
|
|
12567
|
+
committer: {
|
|
12568
|
+
/** Committer name. */
|
|
12569
|
+
name: string;
|
|
12570
|
+
/** Committer email address. */
|
|
12571
|
+
email: string;
|
|
12572
|
+
};
|
|
12573
|
+
/** Parent commit IDs in Git order; empty for a root commit. */
|
|
12574
|
+
parents: string[];
|
|
12575
|
+
/** Author timestamp in Unix seconds. */
|
|
12576
|
+
authoredAt: number;
|
|
12577
|
+
/** Committer timestamp in Unix seconds. */
|
|
12578
|
+
committedAt: number;
|
|
12579
|
+
}
|
|
12580
|
+
/**
|
|
12581
|
+
* Repository capability returned by {@link Artifacts.get}.
|
|
12533
12582
|
*
|
|
12583
|
+
* Metadata is available through {@link info}, not as properties on the capability.
|
|
12534
12584
|
* Methods may throw `ArtifactsError` with code `INTERNAL_ERROR` if an unexpected service error occurs.
|
|
12585
|
+
*
|
|
12586
|
+
* The capability is an RPC stub. Dispose of it when finished, for example with
|
|
12587
|
+
* `using repo = await env.ARTIFACTS.get(name);`, to release it before the request ends.
|
|
12535
12588
|
*/
|
|
12536
|
-
export interface ArtifactsRepo extends
|
|
12589
|
+
export interface ArtifactsRepo extends Disposable {
|
|
12537
12590
|
/**
|
|
12538
12591
|
* Create an access token for this repo.
|
|
12539
12592
|
* @param scope Token scope: "write" (default) or "read".
|
|
@@ -12553,6 +12606,66 @@ export interface ArtifactsRepo extends ArtifactsRepoInfo {
|
|
|
12553
12606
|
* @throws {ArtifactsError} with code `INVALID_INPUT` if tokenOrId is empty.
|
|
12554
12607
|
*/
|
|
12555
12608
|
revokeToken(tokenOrId: string): Promise<boolean>;
|
|
12609
|
+
/**
|
|
12610
|
+
* Retrieve current repository metadata. Each call performs a fresh lookup.
|
|
12611
|
+
* @returns Current public repository metadata.
|
|
12612
|
+
* @throws {ArtifactsError} `NOT_FOUND` if the repository was deleted, or `INTERNAL_ERROR` on
|
|
12613
|
+
* an unexpected lookup failure.
|
|
12614
|
+
*/
|
|
12615
|
+
info(): Promise<ArtifactsRepoInfo>;
|
|
12616
|
+
/**
|
|
12617
|
+
* Read the raw bytes of a Git blob by object ID.
|
|
12618
|
+
* @param hash Lowercase, 40-character SHA-1 object ID.
|
|
12619
|
+
* @returns An untyped {@link Blob}, or `null` if the object is missing or is not a Git blob.
|
|
12620
|
+
* @throws {ArtifactsError} `INVALID_INPUT` for a malformed hash, `MEMORY_LIMIT` if the object
|
|
12621
|
+
* cannot be buffered safely, or `INTERNAL_ERROR` on an unexpected read failure.
|
|
12622
|
+
* @see {@link ArtifactsRepo.readFile} to resolve a file by ref and path.
|
|
12623
|
+
*/
|
|
12624
|
+
readBlob(hash: string): Promise<Blob | null>;
|
|
12625
|
+
/**
|
|
12626
|
+
* Read the immediate children of a Git tree by object ID.
|
|
12627
|
+
* @param hash Lowercase, 40-character SHA-1 tree ID.
|
|
12628
|
+
* @returns Tree entries, or `null` if the object is missing.
|
|
12629
|
+
* @throws {ArtifactsError} `INVALID_INPUT` for a malformed hash, or `INTERNAL_ERROR` if the
|
|
12630
|
+
* object is not a valid tree or the read fails unexpectedly.
|
|
12631
|
+
* @see {@link ArtifactsTreeEntry}
|
|
12632
|
+
*/
|
|
12633
|
+
readTree(hash: string): Promise<ArtifactsTreeEntry[] | null>;
|
|
12634
|
+
/**
|
|
12635
|
+
* Decode a Git commit by object ID.
|
|
12636
|
+
* @param hash Lowercase, 40-character SHA-1 commit ID.
|
|
12637
|
+
* @returns Commit metadata, or `null` if the object is missing.
|
|
12638
|
+
* @throws {ArtifactsError} `INVALID_INPUT` for a malformed hash, or `INTERNAL_ERROR` if the
|
|
12639
|
+
* object is not a valid commit or the read fails unexpectedly.
|
|
12640
|
+
* @see {@link ArtifactsCommitMetadata}
|
|
12641
|
+
*/
|
|
12642
|
+
readCommit(hash: string): Promise<ArtifactsCommitMetadata | null>;
|
|
12643
|
+
/**
|
|
12644
|
+
* Resolve a file from a branch, tag, or commit ID and return its bytes with a browser-safe
|
|
12645
|
+
* content type in {@link Blob.type}.
|
|
12646
|
+
* @param args File lookup options.
|
|
12647
|
+
* @param args.ref Branch, tag, or commit ID to resolve.
|
|
12648
|
+
* @param args.path Non-empty repository-relative path.
|
|
12649
|
+
* @returns A MIME-typed {@link Blob}, or `null` if the ref or path cannot resolve to a file.
|
|
12650
|
+
* @throws {ArtifactsError} `INVALID_INPUT` if either argument is empty, `MEMORY_LIMIT` if the
|
|
12651
|
+
* file cannot be buffered safely, or `INTERNAL_ERROR` on an unexpected read failure.
|
|
12652
|
+
*/
|
|
12653
|
+
readFile(args: { ref: string; path: string }): Promise<Blob | null>;
|
|
12654
|
+
/**
|
|
12655
|
+
* List commits along the first-parent chain, newest first.
|
|
12656
|
+
* @param opts History options. All fields are optional.
|
|
12657
|
+
* @param opts.ref Branch, tag, or commit ID; defaults to `HEAD`.
|
|
12658
|
+
* @param opts.limit Maximum results; defaults to `50` and is capped at `1000`.
|
|
12659
|
+
* @param opts.offset Number of matching commits to skip; defaults to `0`.
|
|
12660
|
+
* @returns Commit metadata, or an empty array if the ref cannot be resolved.
|
|
12661
|
+
* @throws {ArtifactsError} `INTERNAL_ERROR` on an unexpected traversal failure.
|
|
12662
|
+
* @see {@link ArtifactsCommitMetadata}
|
|
12663
|
+
*/
|
|
12664
|
+
log(opts?: {
|
|
12665
|
+
ref?: string;
|
|
12666
|
+
limit?: number;
|
|
12667
|
+
offset?: number;
|
|
12668
|
+
}): Promise<ArtifactsCommitMetadata[]>;
|
|
12556
12669
|
// ── Fork ──
|
|
12557
12670
|
/**
|
|
12558
12671
|
* Fork this repo to a new repo.
|
|
@@ -12580,6 +12693,7 @@ export interface ArtifactsRepo extends ArtifactsRepoInfo {
|
|
|
12580
12693
|
export type ArtifactsErrorCode =
|
|
12581
12694
|
| "ALREADY_EXISTS"
|
|
12582
12695
|
| "NOT_FOUND"
|
|
12696
|
+
| "CREATE_IN_PROGRESS"
|
|
12583
12697
|
| "IMPORT_IN_PROGRESS"
|
|
12584
12698
|
| "FORK_IN_PROGRESS"
|
|
12585
12699
|
| "INVALID_INPUT"
|
|
@@ -12632,6 +12746,7 @@ export interface Artifacts {
|
|
|
12632
12746
|
* @param name Repository name.
|
|
12633
12747
|
* @returns Repo handle.
|
|
12634
12748
|
* @throws {ArtifactsError} with code `NOT_FOUND` if the repo does not exist.
|
|
12749
|
+
* @throws {ArtifactsError} with code `CREATE_IN_PROGRESS` if the repo is still being created.
|
|
12635
12750
|
* @throws {ArtifactsError} with code `IMPORT_IN_PROGRESS` if the repo is still importing.
|
|
12636
12751
|
* @throws {ArtifactsError} with code `FORK_IN_PROGRESS` if the repo is still forking.
|
|
12637
12752
|
*/
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"author": "Cloudflare Workers DevProd Team <workers-devprod@cloudflare.com> (https://workers.cloudflare.com)",
|
|
9
9
|
"license": "MIT OR Apache-2.0",
|
|
10
|
-
"version": "5.
|
|
10
|
+
"version": "5.20260930.1-depup.0",
|
|
11
11
|
"keywords": [
|
|
12
12
|
"@cloudflare/workers-types",
|
|
13
13
|
"depup",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"changes": {},
|
|
21
21
|
"depsUpdated": 0,
|
|
22
22
|
"originalPackage": "@cloudflare/workers-types",
|
|
23
|
-
"originalVersion": "5.
|
|
24
|
-
"processedAt": "2026-09-
|
|
23
|
+
"originalVersion": "5.20260930.1",
|
|
24
|
+
"processedAt": "2026-09-30T08:12:33.802Z",
|
|
25
25
|
"smokeTest": "failed"
|
|
26
26
|
}
|
|
27
27
|
}
|