@limrun/api 0.46.2 → 0.46.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/instance-client.d.mts +93 -0
- package/instance-client.d.mts.map +1 -1
- package/instance-client.d.ts +93 -0
- package/instance-client.d.ts.map +1 -1
- package/instance-client.js +82 -0
- package/instance-client.js.map +1 -1
- package/instance-client.mjs +82 -0
- package/instance-client.mjs.map +1 -1
- package/ios-client.d.mts.map +1 -1
- package/ios-client.d.ts.map +1 -1
- package/ios-client.js +3 -1
- package/ios-client.js.map +1 -1
- package/ios-client.mjs +3 -1
- package/ios-client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/assets-helpers.d.mts.map +1 -1
- package/resources/assets-helpers.d.ts.map +1 -1
- package/resources/assets-helpers.js +9 -4
- package/resources/assets-helpers.js.map +1 -1
- package/resources/assets-helpers.mjs +9 -4
- package/resources/assets-helpers.mjs.map +1 -1
- package/src/instance-client.ts +245 -0
- package/src/ios-client.ts +3 -1
- package/src/resources/assets-helpers.ts +9 -4
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/src/ios-client.ts
CHANGED
|
@@ -2385,11 +2385,13 @@ export async function createInstanceClient(options: InstanceClientOptions): Prom
|
|
|
2385
2385
|
const setStoreKitConfig = async (bundleId: string, storekit: Buffer | Uint8Array): Promise<void> => {
|
|
2386
2386
|
const body = Buffer.isBuffer(storekit) ? storekit : Buffer.from(storekit);
|
|
2387
2387
|
const url = `${options.apiUrl}/payments/storeKitConfigs/${encodeURIComponent(bundleId)}`;
|
|
2388
|
+
// No manual Content-Length: fetch computes it from the Buffer, and setting
|
|
2389
|
+
// it too makes Node 22's built-in fetch send a duplicate that the npm undici
|
|
2390
|
+
// proxy dispatcher rejects whenever HTTP(S)_PROXY is set.
|
|
2388
2391
|
const response = await nodeProxyTransport.fetch(url, {
|
|
2389
2392
|
method: 'PUT',
|
|
2390
2393
|
headers: {
|
|
2391
2394
|
'Content-Type': 'application/octet-stream',
|
|
2392
|
-
'Content-Length': body.length.toString(),
|
|
2393
2395
|
Authorization: `Bearer ${options.token}`,
|
|
2394
2396
|
},
|
|
2395
2397
|
body: body as any,
|
|
@@ -54,9 +54,10 @@ export interface AssetGetOrUploadResponse {
|
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* Body init for the signed-URL PUT. Without a progress callback the buffer is sent
|
|
57
|
-
* directly. With one, the buffer is wrapped
|
|
58
|
-
* fire as chunks are pulled onto the socket;
|
|
59
|
-
* by the caller keeps the request non-chunked,
|
|
57
|
+
* directly and fetch derives Content-Length from it. With one, the buffer is wrapped
|
|
58
|
+
* in a ReadableStream so the callback can fire as chunks are pulled onto the socket;
|
|
59
|
+
* the explicit Content-Length header set by the caller keeps the request non-chunked,
|
|
60
|
+
* which signed URLs require.
|
|
60
61
|
*/
|
|
61
62
|
function uploadBodyInit(
|
|
62
63
|
data: Buffer,
|
|
@@ -109,9 +110,13 @@ export class Assets extends GeneratedAssets {
|
|
|
109
110
|
...(creationResponse.expiresAt && { expiresAt: creationResponse.expiresAt }),
|
|
110
111
|
};
|
|
111
112
|
}
|
|
113
|
+
// Content-Length is set manually only for the streamed body; for the buffered
|
|
114
|
+
// body fetch computes it itself, and setting it too makes Node 22's built-in
|
|
115
|
+
// fetch send a duplicate that the npm undici proxy dispatcher rejects with
|
|
116
|
+
// "invalid content-length header" whenever HTTP(S)_PROXY is set.
|
|
112
117
|
const uploadResponse = await nodeProxyTransport.fetch(creationResponse.signedUploadUrl, {
|
|
113
118
|
headers: {
|
|
114
|
-
'Content-Length': data.length.toString(),
|
|
119
|
+
...(body.onUploadProgress && { 'Content-Length': data.length.toString() }),
|
|
115
120
|
'Content-Type': 'application/octet-stream',
|
|
116
121
|
},
|
|
117
122
|
method: 'PUT',
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.46.
|
|
1
|
+
export const VERSION = '0.46.4'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.46.
|
|
1
|
+
export declare const VERSION = "0.46.4";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.46.
|
|
1
|
+
export declare const VERSION = "0.46.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.46.
|
|
1
|
+
export const VERSION = '0.46.4'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|