@edgestore/shared 0.1.7 → 0.2.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.
|
@@ -182,7 +182,7 @@ type Builder<TCtx, TDef extends AnyDef> = {
|
|
|
182
182
|
/**
|
|
183
183
|
* return `true` to allow upload
|
|
184
184
|
*
|
|
185
|
-
* By default every upload from your app is allowed.
|
|
185
|
+
* By default, every upload from your app is allowed.
|
|
186
186
|
*/
|
|
187
187
|
beforeUpload(beforeUpload: BeforeUploadFn<TCtx, TDef>): Builder<TCtx, {
|
|
188
188
|
type: TDef['type'];
|
|
@@ -8,7 +8,7 @@ export type UploadOptions = {
|
|
|
8
8
|
* But it might take some time for the CDN cache to be cleared.
|
|
9
9
|
* So maybe you will keep seeing the old file for a while.
|
|
10
10
|
*
|
|
11
|
-
* If you want to replace an existing file immediately leave the `manualFileName` option empty and use the `replaceTargetUrl` option.
|
|
11
|
+
* If you want to replace an existing file, immediately leave the `manualFileName` option empty and use the `replaceTargetUrl` option.
|
|
12
12
|
*/
|
|
13
13
|
manualFileName?: string;
|
|
14
14
|
/**
|
package/dist/types.d.ts
CHANGED
|
@@ -70,7 +70,7 @@ export type FilterKeys<TObj extends object, TFilter> = {
|
|
|
70
70
|
*/
|
|
71
71
|
export type Filter<TObj extends object, TFilter> = Pick<TObj, FilterKeys<TObj, TFilter>>;
|
|
72
72
|
/**
|
|
73
|
-
* Unwrap return type if the type is a function (sync or async), else
|
|
73
|
+
* Unwrap return type if the type is a function (sync or async), else uses the type as is
|
|
74
74
|
* @internal
|
|
75
75
|
*/
|
|
76
76
|
export type Unwrap<TType> = TType extends (...args: any[]) => infer R ? ThenArg<R> : TType;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edgestore/shared",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Upload files with ease from React/Next.js",
|
|
5
5
|
"homepage": "https://edgestore.dev",
|
|
6
6
|
"repository": "https://github.com/edgestorejs/edgestore.git",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"typescript": "^5.1.6",
|
|
63
63
|
"zod": "3.21.4"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "a5ecda9ba69eaada4624556dd9422ce49e5dfb66"
|
|
66
66
|
}
|
|
@@ -263,7 +263,7 @@ type Builder<TCtx, TDef extends AnyDef> = {
|
|
|
263
263
|
/**
|
|
264
264
|
* return `true` to allow upload
|
|
265
265
|
*
|
|
266
|
-
* By default every upload from your app is allowed.
|
|
266
|
+
* By default, every upload from your app is allowed.
|
|
267
267
|
*/
|
|
268
268
|
beforeUpload(beforeUpload: BeforeUploadFn<TCtx, TDef>): Builder<
|
|
269
269
|
TCtx,
|
package/src/internals/types.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type UploadOptions = {
|
|
|
8
8
|
* But it might take some time for the CDN cache to be cleared.
|
|
9
9
|
* So maybe you will keep seeing the old file for a while.
|
|
10
10
|
*
|
|
11
|
-
* If you want to replace an existing file immediately leave the `manualFileName` option empty and use the `replaceTargetUrl` option.
|
|
11
|
+
* If you want to replace an existing file, immediately leave the `manualFileName` option empty and use the `replaceTargetUrl` option.
|
|
12
12
|
*/
|
|
13
13
|
manualFileName?: string;
|
|
14
14
|
/**
|
package/src/types.ts
CHANGED
|
@@ -108,7 +108,7 @@ export type Filter<TObj extends object, TFilter> = Pick<
|
|
|
108
108
|
>;
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
|
-
* Unwrap return type if the type is a function (sync or async), else
|
|
111
|
+
* Unwrap return type if the type is a function (sync or async), else uses the type as is
|
|
112
112
|
* @internal
|
|
113
113
|
*/
|
|
114
114
|
export type Unwrap<TType> = TType extends (...args: any[]) => infer R
|