@osaas/cli 0.5.0 → 0.6.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmd.d.ts","sourceRoot":"","sources":["../../src/transcode/cmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,OAAO,UAAU,YAAY,
|
|
1
|
+
{"version":3,"file":"cmd.d.ts","sourceRoot":"","sources":["../../src/transcode/cmd.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,MAAM,CAAC,OAAO,UAAU,YAAY,YAgCnC"}
|
package/dist/transcode/cmd.js
CHANGED
|
@@ -9,8 +9,9 @@ function cmdTranscode() {
|
|
|
9
9
|
.description('Transcode file to ABR fileset and store on S3 bucket')
|
|
10
10
|
.argument('<source>', 'Source URL (supported protocols: http, https)')
|
|
11
11
|
.argument('<dest>', 'Destination URL (supported protocols: s3)')
|
|
12
|
+
.argument('[packageDestination]', 'Optional destination URL for Streaming package (supported protocols: s3)')
|
|
12
13
|
.option('-d, --duration <duration>', 'Duration in seconds. If not provided will transcode entire file')
|
|
13
|
-
.action(async (source, dest, options, command) => {
|
|
14
|
+
.action(async (source, dest, packageDestination, options, command) => {
|
|
14
15
|
try {
|
|
15
16
|
const globalOpts = command.optsWithGlobals();
|
|
16
17
|
const environment = globalOpts?.env || 'prod';
|
|
@@ -18,7 +19,8 @@ function cmdTranscode() {
|
|
|
18
19
|
const pool = new client_transcode_1.QueuePool({ context: ctx, size: 1 });
|
|
19
20
|
await pool.init();
|
|
20
21
|
await pool.transcode(new URL(source), new URL(dest), {
|
|
21
|
-
duration: options.duration
|
|
22
|
+
duration: options.duration,
|
|
23
|
+
packageDestination: packageDestination
|
|
22
24
|
});
|
|
23
25
|
await pool.destroy();
|
|
24
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmd.js","sourceRoot":"","sources":["../../src/transcode/cmd.ts"],"names":[],"mappings":";;AAAA,oDAA6C;AAC7C,8DAAoD;AACpD,yCAAoC;AAEpC,SAAwB,YAAY;IAClC,MAAM,SAAS,GAAG,IAAI,mBAAO,CAAC,WAAW,CAAC,CAAC;IAE3C,SAAS;SACN,WAAW,CAAC,sDAAsD,CAAC;SACnE,QAAQ,CAAC,UAAU,EAAE,+CAA+C,CAAC;SACrE,QAAQ,CAAC,QAAQ,EAAE,2CAA2C,CAAC;SAC/D,MAAM,CACL,2BAA2B,EAC3B,iEAAiE,CAClE;SACA,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"cmd.js","sourceRoot":"","sources":["../../src/transcode/cmd.ts"],"names":[],"mappings":";;AAAA,oDAA6C;AAC7C,8DAAoD;AACpD,yCAAoC;AAEpC,SAAwB,YAAY;IAClC,MAAM,SAAS,GAAG,IAAI,mBAAO,CAAC,WAAW,CAAC,CAAC;IAE3C,SAAS;SACN,WAAW,CAAC,sDAAsD,CAAC;SACnE,QAAQ,CAAC,UAAU,EAAE,+CAA+C,CAAC;SACrE,QAAQ,CAAC,QAAQ,EAAE,2CAA2C,CAAC;SAC/D,QAAQ,CACP,sBAAsB,EACtB,0EAA0E,CAC3E;SACA,MAAM,CACL,2BAA2B,EAC3B,iEAAiE,CAClE;SACA,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE;QACnE,IAAI;YACF,MAAM,UAAU,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;YAC7C,MAAM,WAAW,GAAG,UAAU,EAAE,GAAG,IAAI,MAAM,CAAC;YAC9C,MAAM,GAAG,GAAG,IAAI,qBAAO,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;YACzC,MAAM,IAAI,GAAG,IAAI,4BAAS,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;YACtD,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;YAClB,MAAM,IAAI,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,CAAC,EAAE;gBACnD,QAAQ,EAAE,OAAO,CAAC,QAAQ;gBAC1B,kBAAkB,EAAE,kBAAkB;aACvC,CAAC,CAAC;YACH,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;SACtB;QAAC,OAAO,GAAG,EAAE;YACZ,OAAO,CAAC,GAAG,CAAE,GAAa,CAAC,OAAO,CAAC,CAAC;SACrC;IACH,CAAC,CAAC,CAAC;IACL,OAAO,SAAS,CAAC;AACnB,CAAC;AAhCD,+BAgCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@osaas/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Open Source Cloud CLI",
|
|
5
5
|
"author": "Eyevinn Technology <work@eyevinn.se>",
|
|
6
6
|
"homepage": "https://www.osaas.io",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"test": "jest --pass-with-no-tests"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@osaas/client-core": "^0.
|
|
25
|
-
"@osaas/client-transcode": "^0.
|
|
24
|
+
"@osaas/client-core": "^0.6.0",
|
|
25
|
+
"@osaas/client-transcode": "^0.5.0",
|
|
26
26
|
"chalk": "4.1.2",
|
|
27
27
|
"commander": "^12.1.0",
|
|
28
28
|
"fast-jwt": "^4.0.1"
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "0d54f545a51a26df68290fc3a3bcfce2ce2851aa"
|
|
34
34
|
}
|
package/src/transcode/cmd.ts
CHANGED
|
@@ -9,11 +9,15 @@ export default function cmdTranscode() {
|
|
|
9
9
|
.description('Transcode file to ABR fileset and store on S3 bucket')
|
|
10
10
|
.argument('<source>', 'Source URL (supported protocols: http, https)')
|
|
11
11
|
.argument('<dest>', 'Destination URL (supported protocols: s3)')
|
|
12
|
+
.argument(
|
|
13
|
+
'[packageDestination]',
|
|
14
|
+
'Optional destination URL for Streaming package (supported protocols: s3)'
|
|
15
|
+
)
|
|
12
16
|
.option(
|
|
13
17
|
'-d, --duration <duration>',
|
|
14
18
|
'Duration in seconds. If not provided will transcode entire file'
|
|
15
19
|
)
|
|
16
|
-
.action(async (source, dest, options, command) => {
|
|
20
|
+
.action(async (source, dest, packageDestination, options, command) => {
|
|
17
21
|
try {
|
|
18
22
|
const globalOpts = command.optsWithGlobals();
|
|
19
23
|
const environment = globalOpts?.env || 'prod';
|
|
@@ -21,7 +25,8 @@ export default function cmdTranscode() {
|
|
|
21
25
|
const pool = new QueuePool({ context: ctx, size: 1 });
|
|
22
26
|
await pool.init();
|
|
23
27
|
await pool.transcode(new URL(source), new URL(dest), {
|
|
24
|
-
duration: options.duration
|
|
28
|
+
duration: options.duration,
|
|
29
|
+
packageDestination: packageDestination
|
|
25
30
|
});
|
|
26
31
|
await pool.destroy();
|
|
27
32
|
} catch (err) {
|