@oeave/bakery3 0.1.0 → 0.3.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 +10 -10
- package/dist/bake/index.d.ts +3 -3
- package/dist/bake/index.js +4 -4
- package/dist/{bake-DaOlenyx.d.ts → bake-DZ-CJR6f.d.ts} +8 -1
- package/dist/catalog/index.d.ts +5 -5
- package/dist/catalog/index.js +3 -3
- package/dist/{chunk-TGFNQBKC.js → chunk-3T3FJOSD.js} +5 -5
- package/dist/chunk-3T3FJOSD.js.map +1 -0
- package/dist/{chunk-V3QINEEG.js → chunk-62M6XXNX.js} +58 -3
- package/dist/chunk-62M6XXNX.js.map +1 -0
- package/dist/{chunk-ARMTTZXZ.js → chunk-6FAMQZXB.js} +8 -8
- package/dist/chunk-6FAMQZXB.js.map +1 -0
- package/dist/{chunk-54WJDN5R.js → chunk-CSSJRP5W.js} +9 -6
- package/dist/chunk-CSSJRP5W.js.map +1 -0
- package/dist/{chunk-W6WQ5UP7.js → chunk-EN4ROBYQ.js} +32 -5
- package/dist/chunk-EN4ROBYQ.js.map +1 -0
- package/dist/chunk-KZLVTSBI.js +191 -0
- package/dist/chunk-KZLVTSBI.js.map +1 -0
- package/dist/{chunk-MD2U6S4N.js → chunk-LAKXC4WR.js} +218 -142
- package/dist/chunk-LAKXC4WR.js.map +1 -0
- package/dist/{chunk-HQTUFVMM.js → chunk-NEK5TBEH.js} +3 -3
- package/dist/chunk-NEK5TBEH.js.map +1 -0
- package/dist/chunk-OPM2L63B.js +253 -0
- package/dist/chunk-OPM2L63B.js.map +1 -0
- package/dist/{chunk-APBOWWSV.js → chunk-R5IUPOWI.js} +3 -3
- package/dist/chunk-R5IUPOWI.js.map +1 -0
- package/dist/{chunk-6YVQANMW.js → chunk-STRK4SZN.js} +262 -16
- package/dist/chunk-STRK4SZN.js.map +1 -0
- package/dist/{chunk-CX4WTVGH.js → chunk-WLEFNUOH.js} +411 -371
- package/dist/chunk-WLEFNUOH.js.map +1 -0
- package/dist/{chunk-25ZXSVQ3.js → chunk-X6GW43EX.js} +3 -3
- package/dist/{chunk-25ZXSVQ3.js.map → chunk-X6GW43EX.js.map} +1 -1
- package/dist/{chunk-WBIAFIHV.js → chunk-XK35ANPJ.js} +3 -3
- package/dist/{chunk-WBIAFIHV.js.map → chunk-XK35ANPJ.js.map} +1 -1
- package/dist/devtools/index.d.ts +3 -3
- package/dist/devtools/index.js +10 -9
- package/dist/hotspots/index.d.ts +237 -31
- package/dist/hotspots/index.js +1013 -118
- package/dist/hotspots/index.js.map +1 -1
- package/dist/index.d.ts +39 -8
- package/dist/index.js +11 -10
- package/dist/node/index.cjs +266 -141
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.d.cts +152 -87
- package/dist/node/index.d.ts +27 -6
- package/dist/node/index.js +52 -3
- package/dist/node/index.js.map +1 -1
- package/dist/{prepare-C5qVvaw4.d.ts → prepare-BtjY4G3q.d.ts} +1 -1
- package/dist/presets/index.d.ts +37 -1
- package/dist/presets/index.js +4 -4
- package/dist/presets/index.js.map +1 -1
- package/dist/r3f/index.d.ts +4 -4
- package/dist/r3f/index.js +13 -12
- package/dist/r3f/index.js.map +1 -1
- package/dist/{room-S5TLCK4F.js → room-BM7Z7NKG.js} +6 -6
- package/dist/{room-S5TLCK4F.js.map → room-BM7Z7NKG.js.map} +1 -1
- package/dist/{rooms.gen-vhj6sFW5.d.ts → rooms.gen-DItzBR9k.d.ts} +112 -84
- package/dist/session-NPVBESWA.js +9 -0
- package/dist/{session-YCQS4MRH.js.map → session-NPVBESWA.js.map} +1 -1
- package/dist/{testRun-BIPXaVPb.d.ts → testRun-20OARnQr.d.ts} +12 -3
- package/dist/tsl/index.d.ts +14 -1
- package/dist/tsl/index.js +8 -2
- package/dist/tsl/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-54WJDN5R.js.map +0 -1
- package/dist/chunk-6YVQANMW.js.map +0 -1
- package/dist/chunk-AF5BIELI.js +0 -70
- package/dist/chunk-AF5BIELI.js.map +0 -1
- package/dist/chunk-APBOWWSV.js.map +0 -1
- package/dist/chunk-ARMTTZXZ.js.map +0 -1
- package/dist/chunk-CX4WTVGH.js.map +0 -1
- package/dist/chunk-HQTUFVMM.js.map +0 -1
- package/dist/chunk-MD2U6S4N.js.map +0 -1
- package/dist/chunk-TGFNQBKC.js.map +0 -1
- package/dist/chunk-V3QINEEG.js.map +0 -1
- package/dist/chunk-W6WQ5UP7.js.map +0 -1
- package/dist/session-YCQS4MRH.js +0 -9
package/dist/node/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Q as QualityPreset, O as OutputSpec, R as RenderSpec, C as ColorSpec } from '../bake-
|
|
2
|
-
export { F as FrameSequenceIndex } from '../bake-
|
|
3
|
-
import { B as BatchProgress, R as Recorded, c as Bakery3Error, W as WebhookPayload, d as Bakery3Client, e as RenderRecord, C as CostEstimate, f as BatchOpenRequest, b as Batch, A as AssetImportKind, g as AssetImportResponse, h as
|
|
4
|
-
export {
|
|
1
|
+
import { Q as QualityPreset, O as OutputSpec, R as RenderSpec, C as ColorSpec } from '../bake-DZ-CJR6f.js';
|
|
2
|
+
export { F as FrameSequenceIndex } from '../bake-DZ-CJR6f.js';
|
|
3
|
+
import { B as BatchProgress, R as Recorded, c as Bakery3Error, W as WebhookPayload, d as Bakery3Client, e as RenderRecord, C as CostEstimate, f as BatchOpenRequest, b as Batch, A as AssetImportKind, g as AssetImportResponse, h as AssetDeleteResponse, i as RetryPolicy, j as RenderSet, T as TestRunOptions } from '../testRun-20OARnQr.js';
|
|
4
|
+
export { k as BatchAddRequest, l as BatchAddResponse, m as BatchExportLine, n as BatchItemOutcome, o as BatchItemRecord, p as BatchItemRequest, q as BatchItemsPage, r as BatchPageRefused, a as BatchRecord, F as FlushOptions, s as RenderSetFailure, t as RenderSetImage, u as WaitOptions } from '../testRun-20OARnQr.js';
|
|
5
5
|
import { H as HdriPresetName } from '../catalog.gen-BM-aNf7n.js';
|
|
6
|
-
import { R as RoomPresetName, a as RoomPresetLighting } from '../rooms.gen-
|
|
6
|
+
import { R as RoomPresetName, a as RoomPresetLighting } from '../rooms.gen-DItzBR9k.js';
|
|
7
7
|
import '../animation-B1h0Ryvj.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -495,6 +495,27 @@ declare class AssetsApi {
|
|
|
495
495
|
import(url: string, options?: {
|
|
496
496
|
kind?: AssetImportKind;
|
|
497
497
|
}): Promise<AssetImportResponse>;
|
|
498
|
+
/**
|
|
499
|
+
* Delete one uploaded file from the project now, rather than when
|
|
500
|
+
* retention would. `deleted` is false when the project held no such file,
|
|
501
|
+
* so deleting twice is not an error. The next render that needs the file
|
|
502
|
+
* uploads it again; a render still queued that needs it can fail, and a
|
|
503
|
+
* failed render costs nothing.
|
|
504
|
+
*
|
|
505
|
+
* await api.assets.delete('sha256:9f2b…');
|
|
506
|
+
* // { hash: 'sha256:9f2b…', deleted: true }
|
|
507
|
+
*/
|
|
508
|
+
delete(hash: string): Promise<AssetDeleteResponse>;
|
|
509
|
+
/**
|
|
510
|
+
* Delete every uploaded file in the project, a page per request until
|
|
511
|
+
* none is left. Resolves with how many were deleted.
|
|
512
|
+
*
|
|
513
|
+
* await api.assets.deleteAll();
|
|
514
|
+
* // { deleted: 240 }
|
|
515
|
+
*/
|
|
516
|
+
deleteAll(): Promise<{
|
|
517
|
+
deleted: number;
|
|
518
|
+
}>;
|
|
498
519
|
}
|
|
499
520
|
type Request = <T>(method: string, path: string, body?: unknown) => Promise<T>;
|
|
500
521
|
declare class TokensApi {
|
|
@@ -573,4 +594,4 @@ declare class BatchesApi {
|
|
|
573
594
|
get(id: string): Promise<Batch>;
|
|
574
595
|
}
|
|
575
596
|
|
|
576
|
-
export { type Angle, Bakery3Error, Bakery3Server, type Bakery3ServerOptions, Batch, type BatchEnvironment, BatchOpenRequest, type BatchProduct, BatchProgress, type BatchRoom, type BrowserToken, type BrowserTokenOptions, CostEstimate, type ImageShot, type ProductSkip, Recorded, type RenderBatchOptions, type RenderBatchProgress, type RenderBatchRecorded, type RenderBatchRun, RenderRecord, RenderSet, RenderSpec, RetryPolicy, type Shot, type ShotSettings, TestRunOptions, type VideoShot, type View, type ViewWord, verifyWebhook };
|
|
597
|
+
export { type Angle, AssetDeleteResponse, Bakery3Error, Bakery3Server, type Bakery3ServerOptions, Batch, type BatchEnvironment, BatchOpenRequest, type BatchProduct, BatchProgress, type BatchRoom, type BrowserToken, type BrowserTokenOptions, CostEstimate, type ImageShot, type ProductSkip, Recorded, type RenderBatchOptions, type RenderBatchProgress, type RenderBatchRecorded, type RenderBatchRun, RenderRecord, RenderSet, RenderSpec, RetryPolicy, type Shot, type ShotSettings, TestRunOptions, type VideoShot, type View, type ViewWord, verifyWebhook };
|
package/dist/node/index.js
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import { warnIfKeyIsExposed, Bakery3Client, quoteKey, testSettings, sampleOf, Batch } from '../chunk-
|
|
1
|
+
import { warnIfKeyIsExposed, Bakery3Client, quoteKey, testSettings, sampleOf, Batch } from '../chunk-X6GW43EX.js';
|
|
2
2
|
import { RenderSet, emptyRecorded } from '../chunk-ZEBVAIJJ.js';
|
|
3
|
-
import { QUALITY, isClipFormat, isVideoFormat, protocolVersionFor, SDK_VERSION } from '../chunk-
|
|
3
|
+
import { QUALITY, isClipFormat, isVideoFormat, protocolVersionFor, SDK_VERSION } from '../chunk-R5IUPOWI.js';
|
|
4
4
|
import { HDRI_PRESETS, PRESETS_VERSION, PEDESTAL_PRESETS } from '../chunk-6NYR73Y7.js';
|
|
5
|
-
import { ROOM_PRESETS } from '../chunk-
|
|
5
|
+
import { ROOM_PRESETS } from '../chunk-LAKXC4WR.js';
|
|
6
6
|
import { Bakery3Error } from '../chunk-3G5QL4F4.js';
|
|
7
7
|
export { Bakery3Error, BatchPageRefused } from '../chunk-3G5QL4F4.js';
|
|
8
8
|
|
|
9
|
+
// src/protocol/asset.ts
|
|
10
|
+
var ASSET_HASH_PATTERN = /^sha256:[0-9a-f]{64}$/;
|
|
11
|
+
function isAssetHash(value) {
|
|
12
|
+
return typeof value === "string" && ASSET_HASH_PATTERN.test(value);
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
// src/frame.ts
|
|
10
16
|
var VIEW_WORDS = {
|
|
11
17
|
front: { azimuthDeg: 0, elevationDeg: 6 },
|
|
@@ -1175,6 +1181,49 @@ var AssetsApi = class {
|
|
|
1175
1181
|
...options.kind ? { kind: options.kind } : {}
|
|
1176
1182
|
});
|
|
1177
1183
|
}
|
|
1184
|
+
/**
|
|
1185
|
+
* Delete one uploaded file from the project now, rather than when
|
|
1186
|
+
* retention would. `deleted` is false when the project held no such file,
|
|
1187
|
+
* so deleting twice is not an error. The next render that needs the file
|
|
1188
|
+
* uploads it again; a render still queued that needs it can fail, and a
|
|
1189
|
+
* failed render costs nothing.
|
|
1190
|
+
*
|
|
1191
|
+
* await api.assets.delete('sha256:9f2b…');
|
|
1192
|
+
* // { hash: 'sha256:9f2b…', deleted: true }
|
|
1193
|
+
*/
|
|
1194
|
+
async delete(hash) {
|
|
1195
|
+
if (!isAssetHash(hash)) {
|
|
1196
|
+
throw new Bakery3Error({
|
|
1197
|
+
code: "InvalidRequest",
|
|
1198
|
+
message: `"${String(hash).slice(0, 80)}" is not an asset hash. Expected sha256: followed by 64 lowercase hex characters.`,
|
|
1199
|
+
fix: "Pass the hash an import or a manifest gave you, or call assets.deleteAll() for every file.",
|
|
1200
|
+
docs: "https://bakery3.com/docs/uploads#delete-your-uploaded-files"
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
return this.client().request(
|
|
1204
|
+
"DELETE",
|
|
1205
|
+
`/v1/assets/${hash}`
|
|
1206
|
+
);
|
|
1207
|
+
}
|
|
1208
|
+
/**
|
|
1209
|
+
* Delete every uploaded file in the project, a page per request until
|
|
1210
|
+
* none is left. Resolves with how many were deleted.
|
|
1211
|
+
*
|
|
1212
|
+
* await api.assets.deleteAll();
|
|
1213
|
+
* // { deleted: 240 }
|
|
1214
|
+
*/
|
|
1215
|
+
async deleteAll() {
|
|
1216
|
+
const client = this.client();
|
|
1217
|
+
let deleted = 0;
|
|
1218
|
+
for (; ; ) {
|
|
1219
|
+
const page = await client.request(
|
|
1220
|
+
"DELETE",
|
|
1221
|
+
"/v1/assets"
|
|
1222
|
+
);
|
|
1223
|
+
deleted += page.deleted;
|
|
1224
|
+
if (!page.more || page.deleted === 0) return { deleted };
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1178
1227
|
};
|
|
1179
1228
|
var TokensApi = class {
|
|
1180
1229
|
constructor(request) {
|