@xylex-group/athena 2.8.0 → 2.8.2
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 +13 -6
- package/dist/browser.cjs +663 -17
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +7 -7
- package/dist/browser.d.ts +7 -7
- package/dist/browser.js +663 -17
- package/dist/browser.js.map +1 -1
- package/dist/cli/index.cjs +693 -18
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +3 -3
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.js +693 -18
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +664 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +664 -17
- package/dist/index.js.map +1 -1
- package/dist/{model-form-DMed05gE.d.cts → model-form-Cx3wtvi8.d.ts} +641 -36
- package/dist/{model-form-DXPlOnlI.d.ts → model-form-_ugfOXao.d.cts} +641 -36
- package/dist/{pipeline-D4sJRKqN.d.cts → pipeline-BtD-Uo5X.d.cts} +1 -1
- package/dist/{pipeline-CkMnhwPI.d.ts → pipeline-yCIZNJHE.d.ts} +1 -1
- package/dist/{react-email-DZhDDlEl.d.cts → react-email-CiiSVa9F.d.cts} +4 -6
- package/dist/{react-email-Lrz9A-BW.d.ts → react-email-WN8UU3AL.d.ts} +4 -6
- package/dist/react.cjs +1 -1
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +4 -4
- package/dist/react.d.ts +4 -4
- package/dist/react.js +1 -1
- package/dist/react.js.map +1 -1
- package/dist/{types-CAtTGGoz.d.cts → types-89EfjLjV.d.cts} +2 -1
- package/dist/{types-BzY6fETM.d.ts → types-C2kiTt6-.d.ts} +2 -1
- package/dist/{types-vikz9YIO.d.cts → types-g8G6J0xE.d.cts} +4 -1
- package/dist/{types-vikz9YIO.d.ts → types-g8G6J0xE.d.ts} +4 -1
- package/package.json +26 -56
package/dist/cli/index.cjs
CHANGED
|
@@ -1885,7 +1885,7 @@ var getSessionCookie = (request, config) => {
|
|
|
1885
1885
|
|
|
1886
1886
|
// package.json
|
|
1887
1887
|
var package_default = {
|
|
1888
|
-
version: "2.8.
|
|
1888
|
+
version: "2.8.2"
|
|
1889
1889
|
};
|
|
1890
1890
|
|
|
1891
1891
|
// src/sdk-version.ts
|
|
@@ -3881,7 +3881,12 @@ function createStorageFileModule(base, config = {}) {
|
|
|
3881
3881
|
content_type: input.content_type ?? source.contentType,
|
|
3882
3882
|
size_bytes: source.sizeBytes,
|
|
3883
3883
|
public: input.public,
|
|
3884
|
-
metadata: input.metadata
|
|
3884
|
+
metadata: input.metadata,
|
|
3885
|
+
server_side_encryption: input.server_side_encryption,
|
|
3886
|
+
sse: input.sse,
|
|
3887
|
+
ssekms_key_id: input.ssekms_key_id,
|
|
3888
|
+
kms_key_id: input.kms_key_id,
|
|
3889
|
+
bucket_key_enabled: input.bucket_key_enabled
|
|
3885
3890
|
}
|
|
3886
3891
|
};
|
|
3887
3892
|
});
|
|
@@ -3892,10 +3897,17 @@ function createStorageFileModule(base, config = {}) {
|
|
|
3892
3897
|
for (let index = 0; index < uploadRequests.length; index += 1) {
|
|
3893
3898
|
const request = uploadRequests[index];
|
|
3894
3899
|
const uploadUrl = uploadUrls[index];
|
|
3895
|
-
const response = await putUploadBody(
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3900
|
+
const response = await putUploadBody(
|
|
3901
|
+
uploadUrl.upload.url,
|
|
3902
|
+
uploadUrl.upload.headers ?? {},
|
|
3903
|
+
request.source,
|
|
3904
|
+
input,
|
|
3905
|
+
options,
|
|
3906
|
+
(progress) => {
|
|
3907
|
+
aggregateLoaded[index] = progress.loaded;
|
|
3908
|
+
input.onProgress?.(createProgressSnapshot("uploading", sources, index, progress.loaded, sum(aggregateLoaded)));
|
|
3909
|
+
}
|
|
3910
|
+
);
|
|
3899
3911
|
uploaded.push({
|
|
3900
3912
|
file: uploadUrl.file,
|
|
3901
3913
|
upload: uploadUrl.upload,
|
|
@@ -3998,8 +4010,9 @@ function validateUploadConstraints(sources, input) {
|
|
|
3998
4010
|
}
|
|
3999
4011
|
}
|
|
4000
4012
|
}
|
|
4001
|
-
async function putUploadBody(url, source, input, options, onProgress) {
|
|
4002
|
-
const headers = new Headers(
|
|
4013
|
+
async function putUploadBody(url, uploadHeaders, source, input, options, onProgress) {
|
|
4014
|
+
const headers = new Headers(uploadHeaders);
|
|
4015
|
+
new Headers(input.uploadHeaders).forEach((value, key) => headers.set(key, value));
|
|
4003
4016
|
if (source.contentType && !headers.has("Content-Type")) {
|
|
4004
4017
|
headers.set("Content-Type", source.contentType);
|
|
4005
4018
|
}
|
|
@@ -4318,6 +4331,23 @@ var storageSdkManifest = {
|
|
|
4318
4331
|
responseEnvelope: "athena",
|
|
4319
4332
|
responseType: "StorageFileMutationResponse"
|
|
4320
4333
|
},
|
|
4334
|
+
{
|
|
4335
|
+
name: "postStorageFileVisibility",
|
|
4336
|
+
method: "POST",
|
|
4337
|
+
path: "/storage/files/{file_id}/visibility",
|
|
4338
|
+
pathParams: ["file_id"],
|
|
4339
|
+
requestType: "SetStorageFileVisibilityRequest",
|
|
4340
|
+
responseEnvelope: "athena",
|
|
4341
|
+
responseType: "StorageFileMutationResponse"
|
|
4342
|
+
},
|
|
4343
|
+
{
|
|
4344
|
+
name: "setManyStorageFileVisibility",
|
|
4345
|
+
method: "POST",
|
|
4346
|
+
path: "/storage/files/visibility-many",
|
|
4347
|
+
requestType: "SetManyStorageFileVisibilityRequest",
|
|
4348
|
+
responseEnvelope: "athena",
|
|
4349
|
+
responseType: "StorageFileMutationManyResponse"
|
|
4350
|
+
},
|
|
4321
4351
|
{
|
|
4322
4352
|
name: "deleteStorageFolder",
|
|
4323
4353
|
method: "POST",
|
|
@@ -4333,6 +4363,484 @@ var storageSdkManifest = {
|
|
|
4333
4363
|
requestType: "MoveStorageFolderRequest",
|
|
4334
4364
|
responseEnvelope: "athena",
|
|
4335
4365
|
responseType: "StorageFolderMutationResponse"
|
|
4366
|
+
},
|
|
4367
|
+
{
|
|
4368
|
+
name: "searchStorageFiles",
|
|
4369
|
+
method: "POST",
|
|
4370
|
+
path: "/storage/files/search",
|
|
4371
|
+
requestType: "SearchStorageFilesRequest",
|
|
4372
|
+
responseEnvelope: "athena",
|
|
4373
|
+
responseType: "StorageListFilesResponse"
|
|
4374
|
+
},
|
|
4375
|
+
{
|
|
4376
|
+
name: "confirmStorageUpload",
|
|
4377
|
+
method: "POST",
|
|
4378
|
+
path: "/storage/files/{file_id}/confirm-upload",
|
|
4379
|
+
pathParams: ["file_id"],
|
|
4380
|
+
requestType: "ConfirmStorageUploadRequest",
|
|
4381
|
+
responseEnvelope: "athena",
|
|
4382
|
+
responseType: "StorageFileMutationResponse"
|
|
4383
|
+
},
|
|
4384
|
+
{
|
|
4385
|
+
name: "uploadStorageFileBinary",
|
|
4386
|
+
method: "PUT",
|
|
4387
|
+
path: "/storage/files/{file_id}/upload",
|
|
4388
|
+
pathParams: ["file_id"],
|
|
4389
|
+
responseEnvelope: "athena",
|
|
4390
|
+
responseType: "StorageFileMutationResponse",
|
|
4391
|
+
binary: true
|
|
4392
|
+
},
|
|
4393
|
+
{
|
|
4394
|
+
name: "copyStorageFile",
|
|
4395
|
+
method: "POST",
|
|
4396
|
+
path: "/storage/files/{file_id}/copy",
|
|
4397
|
+
pathParams: ["file_id"],
|
|
4398
|
+
requestType: "CopyStorageFileRequest",
|
|
4399
|
+
responseEnvelope: "athena",
|
|
4400
|
+
responseType: "StorageFileMutationResponse"
|
|
4401
|
+
},
|
|
4402
|
+
{
|
|
4403
|
+
name: "deleteManyStorageFiles",
|
|
4404
|
+
method: "POST",
|
|
4405
|
+
path: "/storage/files/delete-many",
|
|
4406
|
+
requestType: "DeleteManyStorageFilesRequest",
|
|
4407
|
+
responseEnvelope: "athena",
|
|
4408
|
+
responseType: "StorageFileMutationManyResponse"
|
|
4409
|
+
},
|
|
4410
|
+
{
|
|
4411
|
+
name: "updateManyStorageFiles",
|
|
4412
|
+
method: "POST",
|
|
4413
|
+
path: "/storage/files/update-many",
|
|
4414
|
+
requestType: "UpdateManyStorageFilesRequest",
|
|
4415
|
+
responseEnvelope: "athena",
|
|
4416
|
+
responseType: "StorageFileMutationManyResponse"
|
|
4417
|
+
},
|
|
4418
|
+
{
|
|
4419
|
+
name: "restoreStorageFile",
|
|
4420
|
+
method: "POST",
|
|
4421
|
+
path: "/storage/files/{file_id}/restore",
|
|
4422
|
+
pathParams: ["file_id"],
|
|
4423
|
+
responseEnvelope: "athena",
|
|
4424
|
+
responseType: "StorageFileMutationResponse"
|
|
4425
|
+
},
|
|
4426
|
+
{
|
|
4427
|
+
name: "purgeStorageFile",
|
|
4428
|
+
method: "DELETE",
|
|
4429
|
+
path: "/storage/files/{file_id}/purge",
|
|
4430
|
+
pathParams: ["file_id"],
|
|
4431
|
+
responseEnvelope: "athena",
|
|
4432
|
+
responseType: "StorageFileMutationResponse"
|
|
4433
|
+
},
|
|
4434
|
+
{
|
|
4435
|
+
name: "getStorageFilePublicUrl",
|
|
4436
|
+
method: "GET",
|
|
4437
|
+
path: "/storage/files/{file_id}/public-url",
|
|
4438
|
+
pathParams: ["file_id"],
|
|
4439
|
+
responseEnvelope: "athena",
|
|
4440
|
+
responseType: "Record<string, unknown>"
|
|
4441
|
+
},
|
|
4442
|
+
{
|
|
4443
|
+
name: "getStorageFileProxyUrl",
|
|
4444
|
+
method: "GET",
|
|
4445
|
+
path: "/storage/files/{file_id}/proxy-url",
|
|
4446
|
+
pathParams: ["file_id"],
|
|
4447
|
+
queryParams: ["purpose"],
|
|
4448
|
+
responseEnvelope: "athena",
|
|
4449
|
+
responseType: "Record<string, unknown>"
|
|
4450
|
+
},
|
|
4451
|
+
{
|
|
4452
|
+
name: "listStorageFileVersions",
|
|
4453
|
+
method: "GET",
|
|
4454
|
+
path: "/storage/files/{file_id}/versions",
|
|
4455
|
+
pathParams: ["file_id"],
|
|
4456
|
+
responseEnvelope: "athena",
|
|
4457
|
+
responseType: "Record<string, unknown>"
|
|
4458
|
+
},
|
|
4459
|
+
{
|
|
4460
|
+
name: "restoreStorageFileVersion",
|
|
4461
|
+
method: "POST",
|
|
4462
|
+
path: "/storage/files/{file_id}/versions/{version_id}/restore",
|
|
4463
|
+
pathParams: ["file_id", "version_id"],
|
|
4464
|
+
responseEnvelope: "athena",
|
|
4465
|
+
responseType: "Record<string, unknown>"
|
|
4466
|
+
},
|
|
4467
|
+
{
|
|
4468
|
+
name: "deleteStorageFileVersion",
|
|
4469
|
+
method: "DELETE",
|
|
4470
|
+
path: "/storage/files/{file_id}/versions/{version_id}",
|
|
4471
|
+
pathParams: ["file_id", "version_id"],
|
|
4472
|
+
responseEnvelope: "athena",
|
|
4473
|
+
responseType: "Record<string, unknown>"
|
|
4474
|
+
},
|
|
4475
|
+
{
|
|
4476
|
+
name: "getStorageFileRetention",
|
|
4477
|
+
method: "GET",
|
|
4478
|
+
path: "/storage/files/{file_id}/retention",
|
|
4479
|
+
pathParams: ["file_id"],
|
|
4480
|
+
queryParams: ["version_id"],
|
|
4481
|
+
responseEnvelope: "athena",
|
|
4482
|
+
responseType: "Record<string, unknown>"
|
|
4483
|
+
},
|
|
4484
|
+
{
|
|
4485
|
+
name: "setStorageFileRetention",
|
|
4486
|
+
method: "POST",
|
|
4487
|
+
path: "/storage/files/{file_id}/retention",
|
|
4488
|
+
pathParams: ["file_id"],
|
|
4489
|
+
requestType: "StorageFileRetentionRequest",
|
|
4490
|
+
responseEnvelope: "athena",
|
|
4491
|
+
responseType: "Record<string, unknown>"
|
|
4492
|
+
},
|
|
4493
|
+
{
|
|
4494
|
+
name: "listStorageFolders",
|
|
4495
|
+
method: "POST",
|
|
4496
|
+
path: "/storage/folders/list",
|
|
4497
|
+
requestType: "ListStorageFoldersRequest",
|
|
4498
|
+
responseEnvelope: "athena",
|
|
4499
|
+
responseType: "Record<string, unknown>"
|
|
4500
|
+
},
|
|
4501
|
+
{
|
|
4502
|
+
name: "treeStorageFolders",
|
|
4503
|
+
method: "POST",
|
|
4504
|
+
path: "/storage/folders/tree",
|
|
4505
|
+
requestType: "TreeStorageFoldersRequest",
|
|
4506
|
+
responseEnvelope: "athena",
|
|
4507
|
+
responseType: "Record<string, unknown>"
|
|
4508
|
+
},
|
|
4509
|
+
{
|
|
4510
|
+
name: "listStoragePermissions",
|
|
4511
|
+
method: "POST",
|
|
4512
|
+
path: "/storage/permissions/list",
|
|
4513
|
+
requestType: "StoragePermissionListRequest",
|
|
4514
|
+
responseEnvelope: "athena",
|
|
4515
|
+
responseType: "StoragePermissionListResponse"
|
|
4516
|
+
},
|
|
4517
|
+
{
|
|
4518
|
+
name: "grantStoragePermission",
|
|
4519
|
+
method: "POST",
|
|
4520
|
+
path: "/storage/permissions/grant",
|
|
4521
|
+
requestType: "StoragePermissionGrantRequest",
|
|
4522
|
+
responseEnvelope: "athena",
|
|
4523
|
+
responseType: "Record<string, unknown>"
|
|
4524
|
+
},
|
|
4525
|
+
{
|
|
4526
|
+
name: "revokeStoragePermission",
|
|
4527
|
+
method: "POST",
|
|
4528
|
+
path: "/storage/permissions/revoke",
|
|
4529
|
+
requestType: "StoragePermissionRevokeRequest",
|
|
4530
|
+
responseEnvelope: "athena",
|
|
4531
|
+
responseType: "Record<string, unknown>"
|
|
4532
|
+
},
|
|
4533
|
+
{
|
|
4534
|
+
name: "checkStoragePermission",
|
|
4535
|
+
method: "POST",
|
|
4536
|
+
path: "/storage/permissions/check",
|
|
4537
|
+
requestType: "StoragePermissionCheckRequest",
|
|
4538
|
+
responseEnvelope: "athena",
|
|
4539
|
+
responseType: "StoragePermissionCheckResponse"
|
|
4540
|
+
},
|
|
4541
|
+
{
|
|
4542
|
+
name: "listStorageObjects",
|
|
4543
|
+
method: "POST",
|
|
4544
|
+
path: "/storage/objects",
|
|
4545
|
+
requestType: "StorageListObjectsRequest",
|
|
4546
|
+
responseEnvelope: "athena",
|
|
4547
|
+
responseType: "Record<string, unknown>"
|
|
4548
|
+
},
|
|
4549
|
+
{
|
|
4550
|
+
name: "headStorageObject",
|
|
4551
|
+
method: "POST",
|
|
4552
|
+
path: "/storage/objects/head",
|
|
4553
|
+
requestType: "StorageObjectRequest",
|
|
4554
|
+
responseEnvelope: "athena",
|
|
4555
|
+
responseType: "Record<string, unknown>"
|
|
4556
|
+
},
|
|
4557
|
+
{
|
|
4558
|
+
name: "existsStorageObject",
|
|
4559
|
+
method: "POST",
|
|
4560
|
+
path: "/storage/objects/exists",
|
|
4561
|
+
requestType: "StorageObjectRequest",
|
|
4562
|
+
responseEnvelope: "athena",
|
|
4563
|
+
responseType: "Record<string, unknown>"
|
|
4564
|
+
},
|
|
4565
|
+
{
|
|
4566
|
+
name: "validateStorageObject",
|
|
4567
|
+
method: "POST",
|
|
4568
|
+
path: "/storage/objects/validate",
|
|
4569
|
+
requestType: "StorageObjectValidateRequest",
|
|
4570
|
+
responseEnvelope: "athena",
|
|
4571
|
+
responseType: "Record<string, unknown>"
|
|
4572
|
+
},
|
|
4573
|
+
{
|
|
4574
|
+
name: "updateStorageObject",
|
|
4575
|
+
method: "POST",
|
|
4576
|
+
path: "/storage/objects/update",
|
|
4577
|
+
requestType: "StorageUpdateObjectRequest",
|
|
4578
|
+
responseEnvelope: "athena",
|
|
4579
|
+
responseType: "Record<string, unknown>"
|
|
4580
|
+
},
|
|
4581
|
+
{
|
|
4582
|
+
name: "copyStorageObject",
|
|
4583
|
+
method: "POST",
|
|
4584
|
+
path: "/storage/objects/copy",
|
|
4585
|
+
requestType: "StorageObjectCopyRequest",
|
|
4586
|
+
responseEnvelope: "athena",
|
|
4587
|
+
responseType: "Record<string, unknown>"
|
|
4588
|
+
},
|
|
4589
|
+
{
|
|
4590
|
+
name: "getStorageObjectUrl",
|
|
4591
|
+
method: "POST",
|
|
4592
|
+
path: "/storage/objects/url",
|
|
4593
|
+
requestType: "StorageObjectRequest",
|
|
4594
|
+
responseEnvelope: "athena",
|
|
4595
|
+
responseType: "Record<string, unknown>"
|
|
4596
|
+
},
|
|
4597
|
+
{
|
|
4598
|
+
name: "getStorageObjectPublicUrl",
|
|
4599
|
+
method: "POST",
|
|
4600
|
+
path: "/storage/objects/public-url",
|
|
4601
|
+
requestType: "StorageObjectPublicUrlRequest",
|
|
4602
|
+
responseEnvelope: "athena",
|
|
4603
|
+
responseType: "Record<string, unknown>"
|
|
4604
|
+
},
|
|
4605
|
+
{
|
|
4606
|
+
name: "deleteStorageObject",
|
|
4607
|
+
method: "POST",
|
|
4608
|
+
path: "/storage/objects/delete",
|
|
4609
|
+
requestType: "StorageObjectRequest",
|
|
4610
|
+
responseEnvelope: "athena",
|
|
4611
|
+
responseType: "Record<string, unknown>"
|
|
4612
|
+
},
|
|
4613
|
+
{
|
|
4614
|
+
name: "createStorageObjectUploadUrl",
|
|
4615
|
+
method: "POST",
|
|
4616
|
+
path: "/storage/objects/upload-url",
|
|
4617
|
+
requestType: "StoragePresignUploadRequest",
|
|
4618
|
+
responseEnvelope: "athena",
|
|
4619
|
+
responseType: "Record<string, unknown>"
|
|
4620
|
+
},
|
|
4621
|
+
{
|
|
4622
|
+
name: "createStorageObjectPostPolicy",
|
|
4623
|
+
method: "POST",
|
|
4624
|
+
path: "/storage/objects/post-policy",
|
|
4625
|
+
requestType: "StorageSignedPostPolicyRequest",
|
|
4626
|
+
responseEnvelope: "athena",
|
|
4627
|
+
responseType: "Record<string, unknown>"
|
|
4628
|
+
},
|
|
4629
|
+
{
|
|
4630
|
+
name: "listStorageObjectVersions",
|
|
4631
|
+
method: "POST",
|
|
4632
|
+
path: "/storage/objects/versions",
|
|
4633
|
+
requestType: "StorageObjectVersionListRequest",
|
|
4634
|
+
responseEnvelope: "athena",
|
|
4635
|
+
responseType: "Record<string, unknown>"
|
|
4636
|
+
},
|
|
4637
|
+
{
|
|
4638
|
+
name: "restoreStorageObjectVersion",
|
|
4639
|
+
method: "POST",
|
|
4640
|
+
path: "/storage/objects/versions/restore",
|
|
4641
|
+
requestType: "StorageObjectVersionMutationRequest",
|
|
4642
|
+
responseEnvelope: "athena",
|
|
4643
|
+
responseType: "Record<string, unknown>"
|
|
4644
|
+
},
|
|
4645
|
+
{
|
|
4646
|
+
name: "deleteStorageObjectVersion",
|
|
4647
|
+
method: "POST",
|
|
4648
|
+
path: "/storage/objects/versions/delete",
|
|
4649
|
+
requestType: "StorageObjectVersionMutationRequest",
|
|
4650
|
+
responseEnvelope: "athena",
|
|
4651
|
+
responseType: "Record<string, unknown>"
|
|
4652
|
+
},
|
|
4653
|
+
{
|
|
4654
|
+
name: "createStorageObjectFolder",
|
|
4655
|
+
method: "POST",
|
|
4656
|
+
path: "/storage/objects/folder",
|
|
4657
|
+
requestType: "StorageObjectFolderCreateRequest",
|
|
4658
|
+
responseEnvelope: "athena",
|
|
4659
|
+
responseType: "Record<string, unknown>"
|
|
4660
|
+
},
|
|
4661
|
+
{
|
|
4662
|
+
name: "deleteStorageObjectFolder",
|
|
4663
|
+
method: "POST",
|
|
4664
|
+
path: "/storage/objects/folder/delete",
|
|
4665
|
+
requestType: "StorageObjectFolderDeleteRequest",
|
|
4666
|
+
responseEnvelope: "athena",
|
|
4667
|
+
responseType: "Record<string, unknown>"
|
|
4668
|
+
},
|
|
4669
|
+
{
|
|
4670
|
+
name: "renameStorageObjectFolder",
|
|
4671
|
+
method: "POST",
|
|
4672
|
+
path: "/storage/objects/folder/rename",
|
|
4673
|
+
requestType: "StorageObjectFolderRenameRequest",
|
|
4674
|
+
responseEnvelope: "athena",
|
|
4675
|
+
responseType: "Record<string, unknown>"
|
|
4676
|
+
},
|
|
4677
|
+
{
|
|
4678
|
+
name: "listStorageBuckets",
|
|
4679
|
+
method: "POST",
|
|
4680
|
+
path: "/storage/buckets/list",
|
|
4681
|
+
requestType: "Omit<StorageObjectBaseRequest, 'bucket'>",
|
|
4682
|
+
responseEnvelope: "athena",
|
|
4683
|
+
responseType: "Record<string, unknown>"
|
|
4684
|
+
},
|
|
4685
|
+
{
|
|
4686
|
+
name: "createStorageBucket",
|
|
4687
|
+
method: "POST",
|
|
4688
|
+
path: "/storage/buckets/create",
|
|
4689
|
+
requestType: "StorageObjectBaseRequest",
|
|
4690
|
+
responseEnvelope: "athena",
|
|
4691
|
+
responseType: "Record<string, unknown>"
|
|
4692
|
+
},
|
|
4693
|
+
{
|
|
4694
|
+
name: "deleteStorageBucket",
|
|
4695
|
+
method: "POST",
|
|
4696
|
+
path: "/storage/buckets/delete",
|
|
4697
|
+
requestType: "StorageObjectBaseRequest",
|
|
4698
|
+
responseEnvelope: "athena",
|
|
4699
|
+
responseType: "Record<string, unknown>"
|
|
4700
|
+
},
|
|
4701
|
+
{
|
|
4702
|
+
name: "getStorageBucketLifecycle",
|
|
4703
|
+
method: "POST",
|
|
4704
|
+
path: "/storage/buckets/lifecycle",
|
|
4705
|
+
requestType: "StorageBucketLifecycleRequest",
|
|
4706
|
+
responseEnvelope: "athena",
|
|
4707
|
+
responseType: "Record<string, unknown>"
|
|
4708
|
+
},
|
|
4709
|
+
{
|
|
4710
|
+
name: "setStorageBucketLifecycle",
|
|
4711
|
+
method: "POST",
|
|
4712
|
+
path: "/storage/buckets/lifecycle/set",
|
|
4713
|
+
requestType: "StorageSetBucketLifecycleRequest",
|
|
4714
|
+
responseEnvelope: "athena",
|
|
4715
|
+
responseType: "Record<string, unknown>"
|
|
4716
|
+
},
|
|
4717
|
+
{
|
|
4718
|
+
name: "deleteStorageBucketLifecycle",
|
|
4719
|
+
method: "POST",
|
|
4720
|
+
path: "/storage/buckets/lifecycle/delete",
|
|
4721
|
+
requestType: "StorageBucketLifecycleRequest",
|
|
4722
|
+
responseEnvelope: "athena",
|
|
4723
|
+
responseType: "Record<string, unknown>"
|
|
4724
|
+
},
|
|
4725
|
+
{
|
|
4726
|
+
name: "getStorageBucketPolicy",
|
|
4727
|
+
method: "POST",
|
|
4728
|
+
path: "/storage/buckets/policy",
|
|
4729
|
+
requestType: "StorageBucketPolicyRequest",
|
|
4730
|
+
responseEnvelope: "athena",
|
|
4731
|
+
responseType: "Record<string, unknown>"
|
|
4732
|
+
},
|
|
4733
|
+
{
|
|
4734
|
+
name: "setStorageBucketPolicy",
|
|
4735
|
+
method: "POST",
|
|
4736
|
+
path: "/storage/buckets/policy/set",
|
|
4737
|
+
requestType: "StorageSetBucketPolicyRequest",
|
|
4738
|
+
responseEnvelope: "athena",
|
|
4739
|
+
responseType: "Record<string, unknown>"
|
|
4740
|
+
},
|
|
4741
|
+
{
|
|
4742
|
+
name: "deleteStorageBucketPolicy",
|
|
4743
|
+
method: "POST",
|
|
4744
|
+
path: "/storage/buckets/policy/delete",
|
|
4745
|
+
requestType: "StorageBucketPolicyRequest",
|
|
4746
|
+
responseEnvelope: "athena",
|
|
4747
|
+
responseType: "Record<string, unknown>"
|
|
4748
|
+
},
|
|
4749
|
+
{
|
|
4750
|
+
name: "getStorageBucketPublicAccess",
|
|
4751
|
+
method: "POST",
|
|
4752
|
+
path: "/storage/buckets/public-access",
|
|
4753
|
+
requestType: "StoragePublicAccessBlockRequest",
|
|
4754
|
+
responseEnvelope: "athena",
|
|
4755
|
+
responseType: "Record<string, unknown>"
|
|
4756
|
+
},
|
|
4757
|
+
{
|
|
4758
|
+
name: "setStorageBucketPublicAccess",
|
|
4759
|
+
method: "POST",
|
|
4760
|
+
path: "/storage/buckets/public-access/set",
|
|
4761
|
+
requestType: "StorageSetPublicAccessBlockRequest",
|
|
4762
|
+
responseEnvelope: "athena",
|
|
4763
|
+
responseType: "Record<string, unknown>"
|
|
4764
|
+
},
|
|
4765
|
+
{
|
|
4766
|
+
name: "deleteStorageBucketPublicAccess",
|
|
4767
|
+
method: "POST",
|
|
4768
|
+
path: "/storage/buckets/public-access/delete",
|
|
4769
|
+
requestType: "StoragePublicAccessBlockRequest",
|
|
4770
|
+
responseEnvelope: "athena",
|
|
4771
|
+
responseType: "Record<string, unknown>"
|
|
4772
|
+
},
|
|
4773
|
+
{
|
|
4774
|
+
name: "getStorageBucketCors",
|
|
4775
|
+
method: "POST",
|
|
4776
|
+
path: "/storage/buckets/cors",
|
|
4777
|
+
requestType: "StorageBucketCorsRequest",
|
|
4778
|
+
responseEnvelope: "athena",
|
|
4779
|
+
responseType: "Record<string, unknown>"
|
|
4780
|
+
},
|
|
4781
|
+
{
|
|
4782
|
+
name: "setStorageBucketCors",
|
|
4783
|
+
method: "POST",
|
|
4784
|
+
path: "/storage/buckets/cors/set",
|
|
4785
|
+
requestType: "StorageSetBucketCorsRequest",
|
|
4786
|
+
responseEnvelope: "athena",
|
|
4787
|
+
responseType: "Record<string, unknown>"
|
|
4788
|
+
},
|
|
4789
|
+
{
|
|
4790
|
+
name: "deleteStorageBucketCors",
|
|
4791
|
+
method: "POST",
|
|
4792
|
+
path: "/storage/buckets/cors/delete",
|
|
4793
|
+
requestType: "StorageBucketCorsRequest",
|
|
4794
|
+
responseEnvelope: "athena",
|
|
4795
|
+
responseType: "Record<string, unknown>"
|
|
4796
|
+
},
|
|
4797
|
+
{
|
|
4798
|
+
name: "createStorageMultipartUpload",
|
|
4799
|
+
method: "POST",
|
|
4800
|
+
path: "/storage/multipart/create",
|
|
4801
|
+
requestType: "StorageMultipartCreateRequest",
|
|
4802
|
+
responseEnvelope: "athena",
|
|
4803
|
+
responseType: "Record<string, unknown>"
|
|
4804
|
+
},
|
|
4805
|
+
{
|
|
4806
|
+
name: "signStorageMultipartPart",
|
|
4807
|
+
method: "POST",
|
|
4808
|
+
path: "/storage/multipart/sign-part",
|
|
4809
|
+
requestType: "StorageMultipartSignPartRequest",
|
|
4810
|
+
responseEnvelope: "athena",
|
|
4811
|
+
responseType: "Record<string, unknown>"
|
|
4812
|
+
},
|
|
4813
|
+
{
|
|
4814
|
+
name: "completeStorageMultipartUpload",
|
|
4815
|
+
method: "POST",
|
|
4816
|
+
path: "/storage/multipart/complete",
|
|
4817
|
+
requestType: "StorageMultipartCompleteRequest",
|
|
4818
|
+
responseEnvelope: "athena",
|
|
4819
|
+
responseType: "StorageFileMutationResponse"
|
|
4820
|
+
},
|
|
4821
|
+
{
|
|
4822
|
+
name: "abortStorageMultipartUpload",
|
|
4823
|
+
method: "POST",
|
|
4824
|
+
path: "/storage/multipart/abort",
|
|
4825
|
+
requestType: "StorageMultipartAbortRequest",
|
|
4826
|
+
responseEnvelope: "athena",
|
|
4827
|
+
responseType: "Record<string, unknown>"
|
|
4828
|
+
},
|
|
4829
|
+
{
|
|
4830
|
+
name: "listStorageMultipartParts",
|
|
4831
|
+
method: "POST",
|
|
4832
|
+
path: "/storage/multipart/list-parts",
|
|
4833
|
+
requestType: "StorageMultipartListPartsRequest",
|
|
4834
|
+
responseEnvelope: "athena",
|
|
4835
|
+
responseType: "Record<string, unknown>"
|
|
4836
|
+
},
|
|
4837
|
+
{
|
|
4838
|
+
name: "listStorageAuditEvents",
|
|
4839
|
+
method: "POST",
|
|
4840
|
+
path: "/storage/audit/list",
|
|
4841
|
+
requestType: "StorageAuditQueryRequest",
|
|
4842
|
+
responseEnvelope: "athena",
|
|
4843
|
+
responseType: "StorageAuditListResponse"
|
|
4336
4844
|
}
|
|
4337
4845
|
]
|
|
4338
4846
|
};
|
|
@@ -4785,7 +5293,7 @@ async function putPresignedUploadBody(uploadUrl, uploadHeaders, body, options) {
|
|
|
4785
5293
|
return fetch(uploadUrl, init);
|
|
4786
5294
|
}
|
|
4787
5295
|
function attachManagedUpload(upload) {
|
|
4788
|
-
const headers = {};
|
|
5296
|
+
const headers = { ...upload.headers ?? {} };
|
|
4789
5297
|
return {
|
|
4790
5298
|
...upload,
|
|
4791
5299
|
method: "PUT",
|
|
@@ -4831,7 +5339,12 @@ function normalizeUploadUrlRequest(input) {
|
|
|
4831
5339
|
file_id: input.file_id ?? input.fileId,
|
|
4832
5340
|
public: input.public,
|
|
4833
5341
|
visibility: input.visibility,
|
|
4834
|
-
metadata: input.metadata
|
|
5342
|
+
metadata: input.metadata,
|
|
5343
|
+
server_side_encryption: input.server_side_encryption,
|
|
5344
|
+
sse: input.sse,
|
|
5345
|
+
ssekms_key_id: input.ssekms_key_id,
|
|
5346
|
+
kms_key_id: input.kms_key_id,
|
|
5347
|
+
bucket_key_enabled: input.bucket_key_enabled
|
|
4835
5348
|
};
|
|
4836
5349
|
}
|
|
4837
5350
|
async function callStorageUploadBinaryEndpoint(gateway, endpoint, body, options, runtimeOptions) {
|
|
@@ -4982,6 +5495,12 @@ function createStorageModule(gateway, runtimeOptions) {
|
|
|
4982
5495
|
options,
|
|
4983
5496
|
resolvedRuntimeOptions
|
|
4984
5497
|
);
|
|
5498
|
+
const callStorageFileVisibility = (fileId, method, input, options) => callAthena2(
|
|
5499
|
+
withPathParam("/storage/files/{file_id}/visibility", "file_id", fileId),
|
|
5500
|
+
method,
|
|
5501
|
+
input,
|
|
5502
|
+
options
|
|
5503
|
+
);
|
|
4985
5504
|
const base = {
|
|
4986
5505
|
listStorageCatalogs(options) {
|
|
4987
5506
|
return callRaw("/storage/catalogs", "GET", void 0, options);
|
|
@@ -5031,7 +5550,7 @@ function createStorageModule(gateway, runtimeOptions) {
|
|
|
5031
5550
|
return callAthena2(withPathParam("/storage/files/{file_id}", "file_id", fileId), "DELETE", void 0, options);
|
|
5032
5551
|
},
|
|
5033
5552
|
setStorageFileVisibility(fileId, input, options) {
|
|
5034
|
-
return
|
|
5553
|
+
return callStorageFileVisibility(fileId, "PATCH", input, options);
|
|
5035
5554
|
},
|
|
5036
5555
|
deleteStorageFolder(input, options) {
|
|
5037
5556
|
return callAthena2("/storage/folders/delete", "POST", input, options);
|
|
@@ -5103,13 +5622,62 @@ function createStorageModule(gateway, runtimeOptions) {
|
|
|
5103
5622
|
publicUrl(fileId, options) {
|
|
5104
5623
|
return callAthena2(withPathParam("/storage/files/{file_id}/public-url", "file_id", fileId), "GET", void 0, options);
|
|
5105
5624
|
},
|
|
5625
|
+
proxyUrl(fileId, query, options) {
|
|
5626
|
+
const path = appendQuery(
|
|
5627
|
+
withPathParam("/storage/files/{file_id}/proxy-url", "file_id", fileId),
|
|
5628
|
+
query
|
|
5629
|
+
);
|
|
5630
|
+
return callAthena2(path, "GET", void 0, options);
|
|
5631
|
+
},
|
|
5106
5632
|
proxy(fileId, query, options) {
|
|
5107
5633
|
return base.getStorageFileProxy(fileId, query, options);
|
|
5108
5634
|
},
|
|
5109
|
-
|
|
5635
|
+
versions(fileId, options) {
|
|
5636
|
+
return callAthena2(withPathParam("/storage/files/{file_id}/versions", "file_id", fileId), "GET", void 0, options);
|
|
5637
|
+
},
|
|
5638
|
+
restoreVersion(fileId, versionId, options) {
|
|
5639
|
+
return callAthena2(
|
|
5640
|
+
withPathParam(
|
|
5641
|
+
withPathParam("/storage/files/{file_id}/versions/{version_id}/restore", "file_id", fileId),
|
|
5642
|
+
"version_id",
|
|
5643
|
+
versionId
|
|
5644
|
+
),
|
|
5645
|
+
"POST",
|
|
5646
|
+
{},
|
|
5647
|
+
options
|
|
5648
|
+
);
|
|
5649
|
+
},
|
|
5650
|
+
deleteVersion(fileId, versionId, options) {
|
|
5651
|
+
return callAthena2(
|
|
5652
|
+
withPathParam(
|
|
5653
|
+
withPathParam("/storage/files/{file_id}/versions/{version_id}", "file_id", fileId),
|
|
5654
|
+
"version_id",
|
|
5655
|
+
versionId
|
|
5656
|
+
),
|
|
5657
|
+
"DELETE",
|
|
5658
|
+
void 0,
|
|
5659
|
+
options
|
|
5660
|
+
);
|
|
5661
|
+
},
|
|
5662
|
+
retention: {
|
|
5663
|
+
get(fileId, query, options) {
|
|
5664
|
+
const path = appendQuery(
|
|
5665
|
+
withPathParam("/storage/files/{file_id}/retention", "file_id", fileId),
|
|
5666
|
+
query
|
|
5667
|
+
);
|
|
5668
|
+
return callAthena2(path, "GET", void 0, options);
|
|
5669
|
+
},
|
|
5110
5670
|
set(fileId, input, options) {
|
|
5671
|
+
return callAthena2(withPathParam("/storage/files/{file_id}/retention", "file_id", fileId), "POST", input, options);
|
|
5672
|
+
}
|
|
5673
|
+
},
|
|
5674
|
+
visibility: {
|
|
5675
|
+
update(fileId, input, options) {
|
|
5111
5676
|
return base.setStorageFileVisibility(fileId, input, options);
|
|
5112
5677
|
},
|
|
5678
|
+
set(fileId, input, options) {
|
|
5679
|
+
return callStorageFileVisibility(fileId, "POST", input, options);
|
|
5680
|
+
},
|
|
5113
5681
|
setMany(input, options) {
|
|
5114
5682
|
return callAthena2("/storage/files/visibility-many", "POST", input, options);
|
|
5115
5683
|
}
|
|
@@ -5204,6 +5772,18 @@ function createStorageModule(gateway, runtimeOptions) {
|
|
|
5204
5772
|
uploadUrl(input, options) {
|
|
5205
5773
|
return callAthena2("/storage/objects/upload-url", "POST", input, options);
|
|
5206
5774
|
},
|
|
5775
|
+
versions(input, options) {
|
|
5776
|
+
return callAthena2("/storage/objects/versions", "POST", input, options);
|
|
5777
|
+
},
|
|
5778
|
+
restoreVersion(input, options) {
|
|
5779
|
+
return callAthena2("/storage/objects/versions/restore", "POST", input, options);
|
|
5780
|
+
},
|
|
5781
|
+
deleteVersion(input, options) {
|
|
5782
|
+
return callAthena2("/storage/objects/versions/delete", "POST", input, options);
|
|
5783
|
+
},
|
|
5784
|
+
postPolicy(input, options) {
|
|
5785
|
+
return callAthena2("/storage/objects/post-policy", "POST", input, options);
|
|
5786
|
+
},
|
|
5207
5787
|
folder: objectFolder
|
|
5208
5788
|
};
|
|
5209
5789
|
const bucket = {
|
|
@@ -5216,6 +5796,39 @@ function createStorageModule(gateway, runtimeOptions) {
|
|
|
5216
5796
|
delete(input, options) {
|
|
5217
5797
|
return callAthena2("/storage/buckets/delete", "POST", input, options);
|
|
5218
5798
|
},
|
|
5799
|
+
lifecycle: {
|
|
5800
|
+
get(input, options) {
|
|
5801
|
+
return callAthena2("/storage/buckets/lifecycle", "POST", input, options);
|
|
5802
|
+
},
|
|
5803
|
+
set(input, options) {
|
|
5804
|
+
return callAthena2("/storage/buckets/lifecycle/set", "POST", input, options);
|
|
5805
|
+
},
|
|
5806
|
+
delete(input, options) {
|
|
5807
|
+
return callAthena2("/storage/buckets/lifecycle/delete", "POST", input, options);
|
|
5808
|
+
}
|
|
5809
|
+
},
|
|
5810
|
+
policy: {
|
|
5811
|
+
get(input, options) {
|
|
5812
|
+
return callAthena2("/storage/buckets/policy", "POST", input, options);
|
|
5813
|
+
},
|
|
5814
|
+
set(input, options) {
|
|
5815
|
+
return callAthena2("/storage/buckets/policy/set", "POST", input, options);
|
|
5816
|
+
},
|
|
5817
|
+
delete(input, options) {
|
|
5818
|
+
return callAthena2("/storage/buckets/policy/delete", "POST", input, options);
|
|
5819
|
+
}
|
|
5820
|
+
},
|
|
5821
|
+
publicAccess: {
|
|
5822
|
+
get(input, options) {
|
|
5823
|
+
return callAthena2("/storage/buckets/public-access", "POST", input, options);
|
|
5824
|
+
},
|
|
5825
|
+
set(input, options) {
|
|
5826
|
+
return callAthena2("/storage/buckets/public-access/set", "POST", input, options);
|
|
5827
|
+
},
|
|
5828
|
+
delete(input, options) {
|
|
5829
|
+
return callAthena2("/storage/buckets/public-access/delete", "POST", input, options);
|
|
5830
|
+
}
|
|
5831
|
+
},
|
|
5219
5832
|
cors: {
|
|
5220
5833
|
get(input, options) {
|
|
5221
5834
|
return callAthena2("/storage/buckets/cors", "POST", input, options);
|
|
@@ -7813,21 +8426,54 @@ function resolveServiceUrls(config) {
|
|
|
7813
8426
|
storageUrl: resolveServiceUrlOverride(config.storage?.url, "Athena storage base URL") ?? resolveServiceUrlOverride(config.storageUrl, "Athena storage base URL") ?? (baseUrl ? appendServicePath(baseUrl, "storage") : void 0)
|
|
7814
8427
|
};
|
|
7815
8428
|
}
|
|
8429
|
+
function resolveOptionalClientName(value) {
|
|
8430
|
+
if (value === void 0 || value === null) {
|
|
8431
|
+
return void 0;
|
|
8432
|
+
}
|
|
8433
|
+
const normalizedValue = value.trim();
|
|
8434
|
+
return normalizedValue ? normalizedValue : void 0;
|
|
8435
|
+
}
|
|
8436
|
+
function resolveRequiredClientApiKey(value) {
|
|
8437
|
+
if (value === void 0 || value === null) {
|
|
8438
|
+
throw new Error(
|
|
8439
|
+
"Athena API key is required. Pass createClient(url, key) with a real API key, or set key in the config object."
|
|
8440
|
+
);
|
|
8441
|
+
}
|
|
8442
|
+
const normalizedValue = value.trim();
|
|
8443
|
+
if (!normalizedValue) {
|
|
8444
|
+
throw new Error(
|
|
8445
|
+
"Athena API key is required. Pass createClient(url, key) with a real API key, or set key in the config object."
|
|
8446
|
+
);
|
|
8447
|
+
}
|
|
8448
|
+
return normalizedValue;
|
|
8449
|
+
}
|
|
7816
8450
|
function normalizeAuthClientConfig(auth, defaultBaseUrl) {
|
|
7817
8451
|
if (!auth && defaultBaseUrl === void 0) {
|
|
7818
8452
|
return void 0;
|
|
7819
8453
|
}
|
|
7820
|
-
const {
|
|
8454
|
+
const {
|
|
8455
|
+
url,
|
|
8456
|
+
baseUrl,
|
|
8457
|
+
apiKey,
|
|
8458
|
+
bearerToken,
|
|
8459
|
+
...rest
|
|
8460
|
+
} = auth ?? {};
|
|
7821
8461
|
const normalized = {
|
|
7822
8462
|
...rest
|
|
7823
8463
|
};
|
|
7824
8464
|
const resolvedBaseUrl = resolveClientServiceBaseUrl(
|
|
7825
|
-
url ??
|
|
8465
|
+
url ?? baseUrl ?? defaultBaseUrl,
|
|
7826
8466
|
"Athena auth base URL"
|
|
7827
8467
|
);
|
|
7828
8468
|
if (resolvedBaseUrl !== void 0) {
|
|
7829
8469
|
normalized.baseUrl = resolvedBaseUrl;
|
|
7830
8470
|
}
|
|
8471
|
+
if (typeof apiKey === "string") {
|
|
8472
|
+
normalized.apiKey = apiKey;
|
|
8473
|
+
}
|
|
8474
|
+
if (typeof bearerToken === "string") {
|
|
8475
|
+
normalized.bearerToken = bearerToken;
|
|
8476
|
+
}
|
|
7831
8477
|
return normalized;
|
|
7832
8478
|
}
|
|
7833
8479
|
function resolveCreateClientConfig(config) {
|
|
@@ -7839,8 +8485,8 @@ function resolveCreateClientConfig(config) {
|
|
|
7839
8485
|
}
|
|
7840
8486
|
return {
|
|
7841
8487
|
baseUrl: resolvedUrls.dbUrl,
|
|
7842
|
-
apiKey: config.key,
|
|
7843
|
-
client: config.client,
|
|
8488
|
+
apiKey: resolveRequiredClientApiKey(config.key),
|
|
8489
|
+
client: resolveOptionalClientName(config.client),
|
|
7844
8490
|
backend: toBackendConfig(config.backend),
|
|
7845
8491
|
headers: config.headers,
|
|
7846
8492
|
auth: config.auth,
|
|
@@ -7937,7 +8583,7 @@ function createClientFromConfig(config) {
|
|
|
7937
8583
|
return sdkClient;
|
|
7938
8584
|
}
|
|
7939
8585
|
function createClient(configOrUrl, apiKey, options) {
|
|
7940
|
-
if (typeof configOrUrl === "string") {
|
|
8586
|
+
if (typeof configOrUrl === "string" || configOrUrl === null || configOrUrl === void 0) {
|
|
7941
8587
|
return createClientFromConfig(resolveCreateClientConfig({
|
|
7942
8588
|
url: configOrUrl,
|
|
7943
8589
|
key: apiKey ?? "",
|
|
@@ -8527,6 +9173,7 @@ async function runSchemaGenerator(options = {}) {
|
|
|
8527
9173
|
return {
|
|
8528
9174
|
...generated,
|
|
8529
9175
|
configPath,
|
|
9176
|
+
config,
|
|
8530
9177
|
writtenFiles
|
|
8531
9178
|
};
|
|
8532
9179
|
}
|
|
@@ -8555,7 +9202,7 @@ function generateUsage() {
|
|
|
8555
9202
|
"",
|
|
8556
9203
|
"Options:",
|
|
8557
9204
|
" --config <path> Explicit path to athena.config.ts or athena-js.config.ts",
|
|
8558
|
-
" --dry-run Build generated files in memory without writing them to disk",
|
|
9205
|
+
" --dry-run Build generated files in memory without writing them to disk and print mode/target hints",
|
|
8559
9206
|
" -h, --help Show help for generate",
|
|
8560
9207
|
"",
|
|
8561
9208
|
"Config resolution:",
|
|
@@ -8569,6 +9216,28 @@ function generateUsage() {
|
|
|
8569
9216
|
" athena-js generate --config ./athena.config.ts --dry-run"
|
|
8570
9217
|
].join("\n");
|
|
8571
9218
|
}
|
|
9219
|
+
function usesSchemaScopedModelTarget(target) {
|
|
9220
|
+
return /\{schema(?:_[a-z]+)?\}/.test(target);
|
|
9221
|
+
}
|
|
9222
|
+
function formatGeneratorModeLines(result) {
|
|
9223
|
+
const lines = [
|
|
9224
|
+
`[mode] format=${result.config.output.format} modelTarget=${result.config.output.targets.model}`
|
|
9225
|
+
];
|
|
9226
|
+
if (result.config.output.format === "define-model") {
|
|
9227
|
+
lines.push(
|
|
9228
|
+
'[note] Zero-style table-builder files are not active. Set output.format="table-builder" or ATHENA_GENERATOR_OUTPUT_FORMAT=table-builder to emit table(...).schema(...).columns(...).primaryKey(...).'
|
|
9229
|
+
);
|
|
9230
|
+
}
|
|
9231
|
+
lines.push(
|
|
9232
|
+
"[note] Table-builder generation is stable. experimental.findManyAst only affects runtime findMany(...) transport and does not enable generator table output."
|
|
9233
|
+
);
|
|
9234
|
+
if (usesSchemaScopedModelTarget(result.config.output.targets.model)) {
|
|
9235
|
+
lines.push(
|
|
9236
|
+
'[note] Flat athena/models/*.ts output is opt-in. Set output.targets.model="athena/models/{model_kebab}.ts" or ATHENA_GENERATOR_MODEL_TARGET=athena/models/{model_kebab}.ts; multi-schema collisions are still auto-scoped by schema when needed.'
|
|
9237
|
+
);
|
|
9238
|
+
}
|
|
9239
|
+
return lines;
|
|
9240
|
+
}
|
|
8572
9241
|
function usage(topic = "root") {
|
|
8573
9242
|
return topic === "generate" ? generateUsage() : rootUsage();
|
|
8574
9243
|
}
|
|
@@ -8670,12 +9339,18 @@ async function runCLI(argv, runtime = {}) {
|
|
|
8670
9339
|
}
|
|
8671
9340
|
if (parsed.dryRun) {
|
|
8672
9341
|
log(`[dry-run] Generated ${result.files.length} files from ${result.configPath}`);
|
|
9342
|
+
for (const line of formatGeneratorModeLines(result)) {
|
|
9343
|
+
log(line);
|
|
9344
|
+
}
|
|
8673
9345
|
for (const file of result.files) {
|
|
8674
9346
|
log(` - ${file.path}`);
|
|
8675
9347
|
}
|
|
8676
9348
|
return;
|
|
8677
9349
|
}
|
|
8678
9350
|
log(`Generated ${result.writtenFiles.length} files from ${result.configPath}`);
|
|
9351
|
+
for (const line of formatGeneratorModeLines(result)) {
|
|
9352
|
+
log(line);
|
|
9353
|
+
}
|
|
8679
9354
|
for (const filePath of result.writtenFiles) {
|
|
8680
9355
|
log(` - ${filePath}`);
|
|
8681
9356
|
}
|