spoclip-kit 1.0.11 → 1.0.13
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/dist/index.esm.js +3 -16
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3 -16
- package/dist/index.js.map +1 -1
- package/dist/libs/cost.d.ts +8 -4
- package/dist/libs/cost.d.ts.map +1 -1
- package/dist/libs/index.esm.js +3 -16
- package/dist/libs/index.esm.js.map +1 -1
- package/dist/libs/index.js +3 -16
- package/dist/libs/index.js.map +1 -1
- package/dist/libs/libs/cost.d.ts +8 -4
- package/dist/libs/libs/cost.d.ts.map +1 -1
- package/package.json +3 -2
package/dist/index.esm.js
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* - 전체 시간 4K 다운로드 시 티켓 상관없이 20톨
|
|
4
|
-
* - 1분 미만인 경우, remainingFreeDownloads > 0 이면 무료
|
|
5
|
-
* - 1분 미만인 경우, remainingFreeDownloads <= 0 이면 1톨부터 시작
|
|
6
|
-
* - 55초부터는 1.92xx 이므로 반올림 시 1.9톨
|
|
7
|
-
* - 59초부터는 1.98xx 이므로 반올림 시 2톨
|
|
8
|
-
* - 60초부터는 2.00xx 이므로 반올림 시 2톨
|
|
9
|
-
* - 62초부터는 2.03xx 이므로 반올림 시 2톨
|
|
10
|
-
* - 63초부터는 2.05xx 이므로 반올림 시 2.1톨
|
|
11
|
-
*
|
|
12
|
-
* @returns - 다운로드 비용
|
|
13
|
-
*/
|
|
14
|
-
function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remainingFreeDownloads, }) {
|
|
15
|
-
if (isFullTime && quality === '4K') {
|
|
1
|
+
function getVideoDownloadCost({ duration, quality, ticketCode, remainingFreeDownloads, }) {
|
|
2
|
+
if (quality === '4K') {
|
|
16
3
|
return { cost: 20, isPlusFree: false };
|
|
17
4
|
}
|
|
18
5
|
const durationInSeconds = duration / 1000;
|
|
@@ -22,7 +9,7 @@ function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remai
|
|
|
22
9
|
return { cost: 0, isPlusFree: true };
|
|
23
10
|
}
|
|
24
11
|
const costPerSecond = 1 / 60;
|
|
25
|
-
const cost = Math.round(durationInSeconds * costPerSecond * 10) / 10
|
|
12
|
+
const cost = Math.round(durationInSeconds * costPerSecond * 10) / 10;
|
|
26
13
|
return { cost, isPlusFree: false };
|
|
27
14
|
}
|
|
28
15
|
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":"AA0BM,SAAU,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,UAAU,EACV,sBAAsB,GACK,EAAA;AAC3B,IAAA,IAAI,OAAO,KAAK,IAAI,EAAE;QACpB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;IACxC;AAEA,IAAA,MAAM,iBAAiB,GAAG,QAAQ,GAAG,IAAI;AACzC,IAAA,MAAM,SAAS,GAAG,iBAAiB,GAAG,EAAE;AACxC,IAAA,MAAM,MAAM,GAAG,UAAU,KAAK,MAAM;IAEpC,IAAI,MAAM,IAAI,sBAAsB,GAAG,CAAC,IAAI,SAAS,EAAE;QACrD,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IACtC;AAEA,IAAA,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;AAC5B,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,GAAG,aAAa,GAAG,EAAE,CAAC,GAAG,EAAE;AACpE,IAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;AACpC;;;;"}
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* - 전체 시간 4K 다운로드 시 티켓 상관없이 20톨
|
|
6
|
-
* - 1분 미만인 경우, remainingFreeDownloads > 0 이면 무료
|
|
7
|
-
* - 1분 미만인 경우, remainingFreeDownloads <= 0 이면 1톨부터 시작
|
|
8
|
-
* - 55초부터는 1.92xx 이므로 반올림 시 1.9톨
|
|
9
|
-
* - 59초부터는 1.98xx 이므로 반올림 시 2톨
|
|
10
|
-
* - 60초부터는 2.00xx 이므로 반올림 시 2톨
|
|
11
|
-
* - 62초부터는 2.03xx 이므로 반올림 시 2톨
|
|
12
|
-
* - 63초부터는 2.05xx 이므로 반올림 시 2.1톨
|
|
13
|
-
*
|
|
14
|
-
* @returns - 다운로드 비용
|
|
15
|
-
*/
|
|
16
|
-
function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remainingFreeDownloads, }) {
|
|
17
|
-
if (isFullTime && quality === '4K') {
|
|
3
|
+
function getVideoDownloadCost({ duration, quality, ticketCode, remainingFreeDownloads, }) {
|
|
4
|
+
if (quality === '4K') {
|
|
18
5
|
return { cost: 20, isPlusFree: false };
|
|
19
6
|
}
|
|
20
7
|
const durationInSeconds = duration / 1000;
|
|
@@ -24,7 +11,7 @@ function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remai
|
|
|
24
11
|
return { cost: 0, isPlusFree: true };
|
|
25
12
|
}
|
|
26
13
|
const costPerSecond = 1 / 60;
|
|
27
|
-
const cost = Math.round(durationInSeconds * costPerSecond * 10) / 10
|
|
14
|
+
const cost = Math.round(durationInSeconds * costPerSecond * 10) / 10;
|
|
28
15
|
return { cost, isPlusFree: false };
|
|
29
16
|
}
|
|
30
17
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":";;AA0BM,SAAU,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,UAAU,EACV,sBAAsB,GACK,EAAA;AAC3B,IAAA,IAAI,OAAO,KAAK,IAAI,EAAE;QACpB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;IACxC;AAEA,IAAA,MAAM,iBAAiB,GAAG,QAAQ,GAAG,IAAI;AACzC,IAAA,MAAM,SAAS,GAAG,iBAAiB,GAAG,EAAE;AACxC,IAAA,MAAM,MAAM,GAAG,UAAU,KAAK,MAAM;IAEpC,IAAI,MAAM,IAAI,sBAAsB,GAAG,CAAC,IAAI,SAAS,EAAE;QACrD,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IACtC;AAEA,IAAA,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;AAC5B,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,GAAG,aAAa,GAAG,EAAE,CAAC,GAAG,EAAE;AACpE,IAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;AACpC;;;;"}
|
package/dist/libs/cost.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { TicketCode } from '@/types/membership';
|
|
2
2
|
/**
|
|
3
|
+
* 비디오 다운로드 비용을 계산합니다.
|
|
4
|
+
*
|
|
3
5
|
* @description
|
|
4
6
|
* - 전체 시간 4K 다운로드 시 티켓 상관없이 20톨
|
|
5
7
|
* - 1분 미만인 경우, remainingFreeDownloads > 0 이면 무료
|
|
@@ -10,16 +12,18 @@ import type { TicketCode } from '@/types/membership';
|
|
|
10
12
|
* - 62초부터는 2.03xx 이므로 반올림 시 2톨
|
|
11
13
|
* - 63초부터는 2.05xx 이므로 반올림 시 2.1톨
|
|
12
14
|
*
|
|
13
|
-
* @returns - 다운로드 비용
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
+
type GetVideoDownloadCostParams = {
|
|
16
17
|
duration: number;
|
|
17
|
-
isFullTime: boolean;
|
|
18
18
|
quality: '2K' | '4K';
|
|
19
19
|
ticketCode: TicketCode;
|
|
20
20
|
remainingFreeDownloads: number;
|
|
21
|
-
|
|
21
|
+
/** @deprecated 이 파라미터는 더이상 사용되지 않습니다. */
|
|
22
|
+
isFullTime?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare function getVideoDownloadCost({ duration, quality, ticketCode, remainingFreeDownloads, }: GetVideoDownloadCostParams): {
|
|
22
25
|
cost: number;
|
|
23
26
|
isPlusFree: boolean;
|
|
24
27
|
};
|
|
28
|
+
export {};
|
|
25
29
|
//# sourceMappingURL=cost.d.ts.map
|
package/dist/libs/cost.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/libs/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/libs/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;;GAaG;AAEH,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAE/B,yCAAyC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AACF,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,UAAU,EACV,sBAAsB,GACvB,EAAE,0BAA0B;;;EAgB5B"}
|
package/dist/libs/index.esm.js
CHANGED
|
@@ -1,18 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* - 전체 시간 4K 다운로드 시 티켓 상관없이 20톨
|
|
4
|
-
* - 1분 미만인 경우, remainingFreeDownloads > 0 이면 무료
|
|
5
|
-
* - 1분 미만인 경우, remainingFreeDownloads <= 0 이면 1톨부터 시작
|
|
6
|
-
* - 55초부터는 1.92xx 이므로 반올림 시 1.9톨
|
|
7
|
-
* - 59초부터는 1.98xx 이므로 반올림 시 2톨
|
|
8
|
-
* - 60초부터는 2.00xx 이므로 반올림 시 2톨
|
|
9
|
-
* - 62초부터는 2.03xx 이므로 반올림 시 2톨
|
|
10
|
-
* - 63초부터는 2.05xx 이므로 반올림 시 2.1톨
|
|
11
|
-
*
|
|
12
|
-
* @returns - 다운로드 비용
|
|
13
|
-
*/
|
|
14
|
-
function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remainingFreeDownloads, }) {
|
|
15
|
-
if (isFullTime && quality === '4K') {
|
|
1
|
+
function getVideoDownloadCost({ duration, quality, ticketCode, remainingFreeDownloads, }) {
|
|
2
|
+
if (quality === '4K') {
|
|
16
3
|
return { cost: 20, isPlusFree: false };
|
|
17
4
|
}
|
|
18
5
|
const durationInSeconds = duration / 1000;
|
|
@@ -22,7 +9,7 @@ function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remai
|
|
|
22
9
|
return { cost: 0, isPlusFree: true };
|
|
23
10
|
}
|
|
24
11
|
const costPerSecond = 1 / 60;
|
|
25
|
-
const cost = Math.round(durationInSeconds * costPerSecond * 10) / 10
|
|
12
|
+
const cost = Math.round(durationInSeconds * costPerSecond * 10) / 10;
|
|
26
13
|
return { cost, isPlusFree: false };
|
|
27
14
|
}
|
|
28
15
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":"AA0BM,SAAU,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,UAAU,EACV,sBAAsB,GACK,EAAA;AAC3B,IAAA,IAAI,OAAO,KAAK,IAAI,EAAE;QACpB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;IACxC;AAEA,IAAA,MAAM,iBAAiB,GAAG,QAAQ,GAAG,IAAI;AACzC,IAAA,MAAM,SAAS,GAAG,iBAAiB,GAAG,EAAE;AACxC,IAAA,MAAM,MAAM,GAAG,UAAU,KAAK,MAAM;IAEpC,IAAI,MAAM,IAAI,sBAAsB,GAAG,CAAC,IAAI,SAAS,EAAE;QACrD,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IACtC;AAEA,IAAA,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;AAC5B,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,GAAG,aAAa,GAAG,EAAE,CAAC,GAAG,EAAE;AACpE,IAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;AACpC;;;;"}
|
package/dist/libs/index.js
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
* - 전체 시간 4K 다운로드 시 티켓 상관없이 20톨
|
|
6
|
-
* - 1분 미만인 경우, remainingFreeDownloads > 0 이면 무료
|
|
7
|
-
* - 1분 미만인 경우, remainingFreeDownloads <= 0 이면 1톨부터 시작
|
|
8
|
-
* - 55초부터는 1.92xx 이므로 반올림 시 1.9톨
|
|
9
|
-
* - 59초부터는 1.98xx 이므로 반올림 시 2톨
|
|
10
|
-
* - 60초부터는 2.00xx 이므로 반올림 시 2톨
|
|
11
|
-
* - 62초부터는 2.03xx 이므로 반올림 시 2톨
|
|
12
|
-
* - 63초부터는 2.05xx 이므로 반올림 시 2.1톨
|
|
13
|
-
*
|
|
14
|
-
* @returns - 다운로드 비용
|
|
15
|
-
*/
|
|
16
|
-
function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remainingFreeDownloads, }) {
|
|
17
|
-
if (isFullTime && quality === '4K') {
|
|
3
|
+
function getVideoDownloadCost({ duration, quality, ticketCode, remainingFreeDownloads, }) {
|
|
4
|
+
if (quality === '4K') {
|
|
18
5
|
return { cost: 20, isPlusFree: false };
|
|
19
6
|
}
|
|
20
7
|
const durationInSeconds = duration / 1000;
|
|
@@ -24,7 +11,7 @@ function getVideoDownloadCost({ duration, isFullTime, quality, ticketCode, remai
|
|
|
24
11
|
return { cost: 0, isPlusFree: true };
|
|
25
12
|
}
|
|
26
13
|
const costPerSecond = 1 / 60;
|
|
27
|
-
const cost = Math.round(durationInSeconds * costPerSecond * 10) / 10
|
|
14
|
+
const cost = Math.round(durationInSeconds * costPerSecond * 10) / 10;
|
|
28
15
|
return { cost, isPlusFree: false };
|
|
29
16
|
}
|
|
30
17
|
|
package/dist/libs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/libs/cost.ts"],"sourcesContent":[null],"names":[],"mappings":";;AA0BM,SAAU,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,UAAU,EACV,sBAAsB,GACK,EAAA;AAC3B,IAAA,IAAI,OAAO,KAAK,IAAI,EAAE;QACpB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;IACxC;AAEA,IAAA,MAAM,iBAAiB,GAAG,QAAQ,GAAG,IAAI;AACzC,IAAA,MAAM,SAAS,GAAG,iBAAiB,GAAG,EAAE;AACxC,IAAA,MAAM,MAAM,GAAG,UAAU,KAAK,MAAM;IAEpC,IAAI,MAAM,IAAI,sBAAsB,GAAG,CAAC,IAAI,SAAS,EAAE;QACrD,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE;IACtC;AAEA,IAAA,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE;AAC5B,IAAA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,GAAG,aAAa,GAAG,EAAE,CAAC,GAAG,EAAE;AACpE,IAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE;AACpC;;;;"}
|
package/dist/libs/libs/cost.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { TicketCode } from '@/types/membership';
|
|
2
2
|
/**
|
|
3
|
+
* 비디오 다운로드 비용을 계산합니다.
|
|
4
|
+
*
|
|
3
5
|
* @description
|
|
4
6
|
* - 전체 시간 4K 다운로드 시 티켓 상관없이 20톨
|
|
5
7
|
* - 1분 미만인 경우, remainingFreeDownloads > 0 이면 무료
|
|
@@ -10,16 +12,18 @@ import type { TicketCode } from '@/types/membership';
|
|
|
10
12
|
* - 62초부터는 2.03xx 이므로 반올림 시 2톨
|
|
11
13
|
* - 63초부터는 2.05xx 이므로 반올림 시 2.1톨
|
|
12
14
|
*
|
|
13
|
-
* @returns - 다운로드 비용
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
+
type GetVideoDownloadCostParams = {
|
|
16
17
|
duration: number;
|
|
17
|
-
isFullTime: boolean;
|
|
18
18
|
quality: '2K' | '4K';
|
|
19
19
|
ticketCode: TicketCode;
|
|
20
20
|
remainingFreeDownloads: number;
|
|
21
|
-
|
|
21
|
+
/** @deprecated 이 파라미터는 더이상 사용되지 않습니다. */
|
|
22
|
+
isFullTime?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare function getVideoDownloadCost({ duration, quality, ticketCode, remainingFreeDownloads, }: GetVideoDownloadCostParams): {
|
|
22
25
|
cost: number;
|
|
23
26
|
isPlusFree: boolean;
|
|
24
27
|
};
|
|
28
|
+
export {};
|
|
25
29
|
//# sourceMappingURL=cost.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/libs/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD
|
|
1
|
+
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/libs/cost.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;;;;;;;GAaG;AAEH,KAAK,0BAA0B,GAAG;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,UAAU,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAE/B,yCAAyC;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AACF,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,OAAO,EACP,UAAU,EACV,sBAAsB,GACvB,EAAE,0BAA0B;;;EAgB5B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spoclip-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "TypeScript utility library for internal use",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -67,5 +67,6 @@
|
|
|
67
67
|
},
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
|
-
}
|
|
70
|
+
},
|
|
71
|
+
"packageManager": "pnpm@10.13.1+sha512.37ebf1a5c7a30d5fabe0c5df44ee8da4c965ca0c5af3dbab28c3a1681b70a256218d05c81c9c0dcf767ef6b8551eb5b960042b9ed4300c59242336377e01cfad"
|
|
71
72
|
}
|