straight_to_video 0.0.7 → 0.0.9
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/app/assets/javascripts/mediabunny.min.js +9 -9
- data/app/assets/javascripts/straight-to-video.js +175 -62
- data/index.js +174 -61
- data/lib/straight_to_video/version.rb +1 -1
- data/package-lock.json +24 -18
- data/package.json +3 -3
- data/script/release +87 -33
- data/script/test +1 -1
- metadata +1 -1
data/package-lock.json
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "straight-to-video",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "straight-to-video",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.9",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"mediabunny": "^1.
|
|
12
|
+
"mediabunny": "^1.27.3"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@playwright/test": "^1.
|
|
15
|
+
"@playwright/test": "^1.57.0",
|
|
16
16
|
"busboy": "^1.6.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"@hotwired/stimulus": "^3.2.0"
|
|
20
|
+
},
|
|
21
|
+
"peerDependenciesMeta": {
|
|
22
|
+
"@hotwired/stimulus": {
|
|
23
|
+
"optional": true
|
|
24
|
+
}
|
|
20
25
|
}
|
|
21
26
|
},
|
|
22
27
|
"node_modules/@hotwired/stimulus": {
|
|
@@ -24,16 +29,17 @@
|
|
|
24
29
|
"resolved": "https://registry.npmjs.org/@hotwired/stimulus/-/stimulus-3.2.2.tgz",
|
|
25
30
|
"integrity": "sha512-eGeIqNOQpXoPAIP7tC1+1Yc1yl1xnwYqg+3mzqxyrbE5pg5YFBZcA6YoTiByJB6DKAEsiWtl6tjTJS4IYtbB7A==",
|
|
26
31
|
"license": "MIT",
|
|
32
|
+
"optional": true,
|
|
27
33
|
"peer": true
|
|
28
34
|
},
|
|
29
35
|
"node_modules/@playwright/test": {
|
|
30
|
-
"version": "1.
|
|
31
|
-
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.
|
|
32
|
-
"integrity": "sha512-
|
|
36
|
+
"version": "1.57.0",
|
|
37
|
+
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.57.0.tgz",
|
|
38
|
+
"integrity": "sha512-6TyEnHgd6SArQO8UO2OMTxshln3QMWBtPGrOCgs3wVEmQmwyuNtB10IZMfmYDE0riwNR1cu4q+pPcxMVtaG3TA==",
|
|
33
39
|
"dev": true,
|
|
34
40
|
"license": "Apache-2.0",
|
|
35
41
|
"dependencies": {
|
|
36
|
-
"playwright": "1.
|
|
42
|
+
"playwright": "1.57.0"
|
|
37
43
|
},
|
|
38
44
|
"bin": {
|
|
39
45
|
"playwright": "cli.js"
|
|
@@ -85,9 +91,9 @@
|
|
|
85
91
|
}
|
|
86
92
|
},
|
|
87
93
|
"node_modules/mediabunny": {
|
|
88
|
-
"version": "1.
|
|
89
|
-
"resolved": "https://registry.npmjs.org/mediabunny/-/mediabunny-1.
|
|
90
|
-
"integrity": "sha512-
|
|
94
|
+
"version": "1.27.3",
|
|
95
|
+
"resolved": "https://registry.npmjs.org/mediabunny/-/mediabunny-1.27.3.tgz",
|
|
96
|
+
"integrity": "sha512-hlzmgzMznp9DhA5fMJKS5yEAyfCUMxAc+DbSPxD4J1J2cYVl1L+pZLndkt5xLlD5aB5eHEnphHMW14ammMlUXg==",
|
|
91
97
|
"license": "MPL-2.0",
|
|
92
98
|
"workspaces": [
|
|
93
99
|
"packages/*"
|
|
@@ -102,13 +108,13 @@
|
|
|
102
108
|
}
|
|
103
109
|
},
|
|
104
110
|
"node_modules/playwright": {
|
|
105
|
-
"version": "1.
|
|
106
|
-
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.
|
|
107
|
-
"integrity": "sha512-
|
|
111
|
+
"version": "1.57.0",
|
|
112
|
+
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.57.0.tgz",
|
|
113
|
+
"integrity": "sha512-ilYQj1s8sr2ppEJ2YVadYBN0Mb3mdo9J0wQ+UuDhzYqURwSoW4n1Xs5vs7ORwgDGmyEh33tRMeS8KhdkMoLXQw==",
|
|
108
114
|
"dev": true,
|
|
109
115
|
"license": "Apache-2.0",
|
|
110
116
|
"dependencies": {
|
|
111
|
-
"playwright-core": "1.
|
|
117
|
+
"playwright-core": "1.57.0"
|
|
112
118
|
},
|
|
113
119
|
"bin": {
|
|
114
120
|
"playwright": "cli.js"
|
|
@@ -121,9 +127,9 @@
|
|
|
121
127
|
}
|
|
122
128
|
},
|
|
123
129
|
"node_modules/playwright-core": {
|
|
124
|
-
"version": "1.
|
|
125
|
-
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.
|
|
126
|
-
"integrity": "sha512-
|
|
130
|
+
"version": "1.57.0",
|
|
131
|
+
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.57.0.tgz",
|
|
132
|
+
"integrity": "sha512-agTcKlMw/mjBWOnD6kFZttAAGHgi/Nw0CZ2o6JqWSbMlI219lAFLZZCyqByTsvVAJq5XA5H8cA6PrvBRpBWEuQ==",
|
|
127
133
|
"dev": true,
|
|
128
134
|
"license": "Apache-2.0",
|
|
129
135
|
"bin": {
|
data/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "straight-to-video",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "Browser-based, hardware-accelerated video upload optimization",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"mediabunny": "^1.
|
|
18
|
+
"mediabunny": "^1.27.3"
|
|
19
19
|
},
|
|
20
20
|
"keywords": [
|
|
21
21
|
"webcodecs",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"test": "script/test"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@playwright/test": "^1.
|
|
44
|
+
"@playwright/test": "^1.57.0",
|
|
45
45
|
"busboy": "^1.6.0"
|
|
46
46
|
}
|
|
47
47
|
}
|
data/script/release
CHANGED
|
@@ -21,49 +21,103 @@ case "$BUMP_TYPE" in
|
|
|
21
21
|
*) echo "Invalid bump type: $BUMP_TYPE (must be patch|minor|major)" >&2; exit 2 ;;
|
|
22
22
|
esac
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
package_name() {
|
|
25
|
+
node -p "require('./package.json').name"
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
package_version() {
|
|
29
|
+
node -p "require('./package.json').version"
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
head_package_version() {
|
|
33
|
+
git show HEAD:package.json | node -p "JSON.parse(require('fs').readFileSync(0, 'utf8')).version"
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
assert_working_tree_is_release_safe() {
|
|
37
|
+
local status
|
|
38
|
+
status="$(git status --porcelain)"
|
|
39
|
+
|
|
40
|
+
[ -z "$status" ] && return 0
|
|
41
|
+
|
|
42
|
+
local disallowed
|
|
43
|
+
disallowed="$(echo "$status" | sed -E 's/^.. //g' | while read -r path; do
|
|
44
|
+
case "$path" in
|
|
45
|
+
CHANGELOG.md|Gemfile.lock|package.json|package-lock.json|lib/straight_to_video/version.rb) ;;
|
|
46
|
+
app/assets/javascripts/*|pkg/*) ;;
|
|
47
|
+
*) echo "$path" ;;
|
|
48
|
+
esac
|
|
49
|
+
done)"
|
|
50
|
+
|
|
51
|
+
if [ -n "$disallowed" ]; then
|
|
52
|
+
echo "Working tree has non-release changes. Commit or stash before releasing." >&2
|
|
53
|
+
git status --short
|
|
54
|
+
exit 1
|
|
55
|
+
fi
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
ensure_npm_auth() {
|
|
59
|
+
npm whoami >/dev/null 2>&1 || {
|
|
60
|
+
echo "Not authenticated with npm. Run: npm login" >&2
|
|
61
|
+
exit 1
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
npm_has_version() {
|
|
66
|
+
local package_name version
|
|
67
|
+
package_name="$(package_name)"
|
|
68
|
+
version="$(package_version)"
|
|
69
|
+
|
|
70
|
+
npm view "${package_name}@${version}" version >/dev/null 2>&1
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
head_is_version_commit() {
|
|
74
|
+
[ "$(git log -1 --pretty=%s)" = "$(package_version)" ]
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
assert_working_tree_is_release_safe
|
|
31
78
|
|
|
32
79
|
## Bump version in package.json only (no git tag)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
# Sync Ruby gem version file to the new package version
|
|
37
|
-
# Read version from package.json using Node for portability
|
|
38
|
-
VERSION=$(node -p "require('./package.json').version")
|
|
39
|
-
if [ -z "${VERSION:-}" ]; then
|
|
40
|
-
echo "Unable to determine version from package.json" >&2
|
|
41
|
-
exit 1
|
|
80
|
+
if ! (head_is_version_commit && npm_has_version); then
|
|
81
|
+
ensure_npm_auth
|
|
42
82
|
fi
|
|
43
83
|
|
|
44
|
-
|
|
45
|
-
if [
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
fi
|
|
84
|
+
if ! head_is_version_commit; then
|
|
85
|
+
if [ "$(package_version)" = "$(head_package_version)" ]; then
|
|
86
|
+
echo "Bumping version: npm version --no-git-tag-version $BUMP_TYPE"
|
|
87
|
+
npm version "$BUMP_TYPE" --no-git-tag-version
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
VERSION="$(package_version)"
|
|
49
91
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
92
|
+
RB_VERSION_FILE="lib/straight_to_video/version.rb"
|
|
93
|
+
if [ ! -f "$RB_VERSION_FILE" ]; then
|
|
94
|
+
echo "Missing $RB_VERSION_FILE" >&2
|
|
95
|
+
exit 1
|
|
96
|
+
fi
|
|
53
97
|
|
|
54
|
-
|
|
55
|
-
|
|
98
|
+
tmp_file="$RB_VERSION_FILE.tmp"
|
|
99
|
+
printf 'module StraightToVideo\n VERSION = "%s"\nend\n' "$VERSION" > "$tmp_file"
|
|
100
|
+
mv "$tmp_file" "$RB_VERSION_FILE"
|
|
56
101
|
|
|
57
|
-
#
|
|
58
|
-
|
|
102
|
+
# Vendor javascript files (reflect new version in headers)
|
|
103
|
+
./script/vendor
|
|
59
104
|
|
|
60
|
-
#
|
|
61
|
-
|
|
62
|
-
|
|
105
|
+
# Bump the version in the Gemfile.lock
|
|
106
|
+
bundle
|
|
107
|
+
|
|
108
|
+
# Commit version bumps as a single commit; bundler's rake release will tag
|
|
109
|
+
git add CHANGELOG.md package.json package-lock.json Gemfile.lock "$RB_VERSION_FILE" app/assets/javascripts
|
|
110
|
+
git commit -m "$VERSION"
|
|
111
|
+
fi
|
|
63
112
|
|
|
64
113
|
# Publish to npm
|
|
65
|
-
|
|
66
|
-
|
|
114
|
+
VERSION="$(package_version)"
|
|
115
|
+
if npm_has_version; then
|
|
116
|
+
echo "Skipping npm publish (already published): $(package_name)@${VERSION}"
|
|
117
|
+
else
|
|
118
|
+
echo "Publishing to npm (2FA may prompt)..."
|
|
119
|
+
npm publish
|
|
120
|
+
fi
|
|
67
121
|
|
|
68
122
|
# Trigger JSPM build
|
|
69
123
|
echo "Triggering JSPM build for straight-to-video@${VERSION}..."
|
data/script/test
CHANGED