@gentbajko/slopify 1.5.1 → 2.0.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.
- package/README.md +34 -8
- package/dist/adapters/alignment/cache.js +67 -7
- package/dist/edge/cli.js +10 -2
- package/dist/edge/docker-launch.js +77 -0
- package/dist/edge/docker-projects/activation.js +35 -0
- package/dist/edge/docker-projects/claims.js +85 -0
- package/dist/edge/docker-projects/committed.js +40 -0
- package/dist/edge/docker-projects/engine.js +384 -0
- package/dist/edge/docker-projects/install.js +246 -0
- package/dist/edge/docker-projects/recover.js +100 -0
- package/dist/edge/docker-projects/state.js +221 -0
- package/dist/edge/docker-projects/tree.js +170 -0
- package/dist/edge/docker-projects/volume.js +95 -0
- package/dist/edge/docker.js +6 -0
- package/dist/edge/http/actions.js +64 -15
- package/dist/edge/http/app.js +6 -0
- package/dist/edge/http/folder-location-schema.js +11 -0
- package/dist/edge/http/folder-location.js +65 -0
- package/dist/edge/http/open-folder.js +2 -14
- package/dist/edge/http/projects.js +2 -0
- package/dist/edge/http/revision-files.js +2 -18
- package/dist/kernel/db/migrations/0012-project-recovery.sql +17 -0
- package/dist/kernel/lock.js +20 -6
- package/dist/main.js +11 -1
- package/dist/slices/admission/rules.js +6 -0
- package/dist/slices/admission/schema.js +3 -1
- package/dist/slices/article/plain.js +16 -9
- package/dist/slices/control/revision-control.js +2 -2
- package/dist/slices/narration/pronunciation-chunks.js +105 -0
- package/dist/slices/narration/pronunciation.js +126 -0
- package/dist/slices/narration/steering.js +82 -24
- package/dist/slices/play-drafts/convert.js +3 -1
- package/dist/slices/play-drafts/schema.js +3 -1
- package/dist/slices/rebuild/admission-repo.js +7 -4
- package/dist/slices/rebuild/recipe-audio-parts.js +70 -14
- package/dist/slices/rebuild/recipe-audio.js +61 -40
- package/dist/slices/rebuild/recipe-model.js +5 -3
- package/dist/slices/rebuild/recipe-preparation.js +6 -4
- package/dist/slices/rebuild/recipe-text.js +11 -3
- package/dist/slices/rebuild/recovery-conflict.js +30 -0
- package/dist/slices/rebuild/recovery-model.js +44 -0
- package/dist/slices/rebuild/recovery-repo.js +84 -0
- package/dist/slices/rebuild/recovery-selection.js +68 -0
- package/dist/slices/rebuild/recovery.js +257 -0
- package/dist/slices/rebuild/runtime-export-inputs.js +3 -2
- package/dist/slices/rebuild/runtime-narration-publication.js +30 -0
- package/dist/slices/rebuild/runtime-narration-reuse.js +20 -2
- package/dist/slices/rebuild/runtime-plan.js +8 -2
- package/dist/slices/rebuild/runtime-publication.js +9 -4
- package/dist/slices/rebuild/service.js +44 -22
- package/dist/slices/rebuild/transition-repo.js +1 -1
- package/dist/slices/revisions/mutation-assets.js +6 -1
- package/dist/slices/revisions/mutation-request.js +4 -0
- package/dist/slices/revisions/mutations.js +10 -5
- package/dist/slices/revisions/rules.js +43 -0
- package/dist/slices/revisions/schema.js +12 -0
- package/dist/slices/settings/repo.js +4 -2
- package/dist/web/assets/index-CZNiHm8P.css +1 -0
- package/dist/web/assets/index-DPgGLX5m.js +137 -0
- package/dist/web/index.html +2 -2
- package/package.json +3 -2
- package/scripts/docker-run.sh +1 -74
- package/dist/web/assets/index-CbGJtCio.js +0 -137
- package/dist/web/assets/index-DX1_chKs.css +0 -1
package/dist/web/index.html
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
7
|
<meta name="color-scheme" content="dark light" />
|
|
8
8
|
<title>Slopify</title>
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-DPgGLX5m.js"></script>
|
|
10
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CZNiHm8P.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<div id="root"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gentbajko/slopify",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Turn a prompt into a finished video, locally, with your own provider keys",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Gent Bajko",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"scripts": {
|
|
26
26
|
"build": "tsc -p tsconfig.build.json && node scripts/copy-migrations.mjs && node scripts/copy-assets.mjs && node scripts/copy-web.mjs",
|
|
27
27
|
"build:types": "tsc -p tsconfig.build.json --declaration --emitDeclarationOnly",
|
|
28
|
-
"typecheck": "tsc --noEmit"
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"smoke:docker-projects": "node scripts/docker-projects-smoke.mjs"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
32
|
"@fastify/busboy": "^3.2.2",
|
package/scripts/docker-run.sh
CHANGED
|
@@ -1,76 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -euo pipefail
|
|
3
|
-
|
|
4
|
-
if [[ "$(uname -s)" != Linux ]]; then
|
|
5
|
-
echo "This Docker launcher requires Linux. Use plain Docker with API providers on this host." >&2
|
|
6
|
-
exit 1
|
|
7
|
-
fi
|
|
8
|
-
|
|
9
|
-
image=${SLOPIFY_DOCKER_IMAGE:-ghcr.io/gentbajko/slopify:latest}
|
|
10
|
-
container=${SLOPIFY_DOCKER_NAME:-slopify}
|
|
11
|
-
volume=${SLOPIFY_DOCKER_VOLUME:-slopify-data}
|
|
12
|
-
host_port=${SLOPIFY_DOCKER_HOST_PORT:-6969}
|
|
13
|
-
if [[ ! "$host_port" =~ ^[0-9]{1,5}$ ]] || (( host_port > 65535 )); then
|
|
14
|
-
echo "SLOPIFY_DOCKER_HOST_PORT must be a port from 0 to 65535." >&2
|
|
15
|
-
exit 1
|
|
16
|
-
fi
|
|
17
|
-
published_port=$host_port
|
|
18
|
-
if [[ "$host_port" == 0 ]]; then published_port=""; fi
|
|
19
|
-
|
|
20
|
-
mounts=()
|
|
21
|
-
environment=()
|
|
22
|
-
bridge_directory=${SLOPIFY_HOST_CLI_DIR:-}
|
|
23
|
-
if [[ -n "$bridge_directory" ]]; then
|
|
24
|
-
if [[ ! -d "$bridge_directory" || ! -S "$bridge_directory/cli.sock" || ! -f "$bridge_directory/token" || "$bridge_directory" == *,* ]]; then
|
|
25
|
-
echo "Host CLI helper is not ready. Rerun the Slopify Docker launcher." >&2
|
|
26
|
-
exit 1
|
|
27
|
-
fi
|
|
28
|
-
mounts+=(--mount "type=bind,source=$bridge_directory,target=/opt/slopify-host,readonly")
|
|
29
|
-
environment+=(--env SLOPIFY_HOST_CLI_DIR=/opt/slopify-host)
|
|
30
|
-
fi
|
|
31
|
-
|
|
32
|
-
if ! docker image inspect "$image" >/dev/null 2>&1; then docker pull "$image"; fi
|
|
33
|
-
image_id=$(docker image inspect --format '{{.Id}}' "$image")
|
|
34
|
-
# Changing an installation path or image requires new bind mounts. Re-running
|
|
35
|
-
# the launcher reconciles those automatically while keeping the named data volume.
|
|
36
|
-
signature=$(printf '%s\0' "$image_id" "$volume" "$host_port" "$bridge_directory" "host-cli-protocol-1" | sha256sum | cut -d ' ' -f 1)
|
|
37
|
-
previous=""
|
|
38
|
-
if docker container inspect "$container" >/dev/null 2>&1; then
|
|
39
|
-
existing_signature=$(docker inspect --format '{{index .Config.Labels "io.slopify.launcher"}}' "$container")
|
|
40
|
-
if [[ "$existing_signature" == "$signature" ]]; then
|
|
41
|
-
docker start "$container" >/dev/null
|
|
42
|
-
echo "Slopify is running at http://$(docker port "$container" 6969/tcp)"
|
|
43
|
-
exit 0
|
|
44
|
-
fi
|
|
45
|
-
existing_volume=$(docker inspect --format '{{range .Mounts}}{{if eq .Destination "/data"}}{{.Name}}{{end}}{{end}}' "$container")
|
|
46
|
-
if [[ "$existing_volume" != "$volume" ]]; then
|
|
47
|
-
echo "Container $container uses a different data mount. Set SLOPIFY_DOCKER_NAME to a new name or select its existing SLOPIFY_DOCKER_VOLUME." >&2
|
|
48
|
-
exit 1
|
|
49
|
-
fi
|
|
50
|
-
previous="$container-previous-$(date +%Y%m%d%H%M%S)"
|
|
51
|
-
previous_restart=$(docker inspect --format '{{.HostConfig.RestartPolicy.Name}}' "$container")
|
|
52
|
-
docker update --restart=no "$container" >/dev/null
|
|
53
|
-
docker stop "$container" >/dev/null
|
|
54
|
-
docker rename "$container" "$previous"
|
|
55
|
-
fi
|
|
56
|
-
|
|
57
|
-
if ! docker run -d \
|
|
58
|
-
--name "$container" \
|
|
59
|
-
--label "io.slopify.launcher=$signature" \
|
|
60
|
-
--restart always \
|
|
61
|
-
-p "127.0.0.1:$published_port:6969" \
|
|
62
|
-
--mount "type=volume,source=$volume,target=/data" \
|
|
63
|
-
"${mounts[@]}" \
|
|
64
|
-
"${environment[@]}" \
|
|
65
|
-
"$image"; then
|
|
66
|
-
if [[ -n "$previous" ]]; then
|
|
67
|
-
failed_signature=$(docker inspect --format '{{index .Config.Labels "io.slopify.launcher"}}' "$container" 2>/dev/null || true)
|
|
68
|
-
if [[ "$failed_signature" == "$signature" ]]; then docker rm -f "$container" >/dev/null; fi
|
|
69
|
-
docker rename "$previous" "$container"
|
|
70
|
-
docker update --restart="$previous_restart" "$container" >/dev/null
|
|
71
|
-
docker start "$container" >/dev/null
|
|
72
|
-
fi
|
|
73
|
-
exit 1
|
|
74
|
-
fi
|
|
75
|
-
echo "Slopify is starting at http://$(docker port "$container" 6969/tcp)"
|
|
76
|
-
if [[ -n "$previous" ]]; then echo "Previous container kept stopped as $previous."; fi
|
|
3
|
+
exec node "$(dirname -- "${BASH_SOURCE[0]}")/../dist/edge/docker-launch.js"
|