@kenkaiiii/gg-editor-premiere-panel 0.2.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 KenKai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,200 @@
1
+ # @kenkaiiii/gg-editor-premiere-panel
2
+
3
+ <p align="center">
4
+ <strong>Adobe Premiere Pro extensions that let <a href="../gg-editor/README.md">gg-editor</a> drive Premiere.</strong>
5
+ </p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@kenkaiiii/gg-editor-premiere-panel"><img src="https://img.shields.io/npm/v/@kenkaiiii/gg-editor-premiere-panel?style=for-the-badge" alt="npm version"></a>
9
+ <a href="../../LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="MIT License"></a>
10
+ </p>
11
+
12
+ This package ships **two** panels that both speak the same wire protocol to gg-editor:
13
+
14
+ | Panel | Best for | Lifespan |
15
+ |---|---|---|
16
+ | **UXP plugin** (recommended) | Premiere Pro **25.6+** | The only path that survives Adobe's September 2026 ExtendScript sunset |
17
+ | **CEP panel** (legacy) | Premiere Pro 22 → 25.x | Works through **September 2026**, then removed by Adobe |
18
+
19
+ Both panels can be installed at once — they have different bundle ids and don't conflict. gg-editor picks whichever responds first.
20
+
21
+ ---
22
+
23
+ ## Why two panels?
24
+
25
+ On macOS, gg-editor can drive Premiere through `osascript` → AppleEvents → ExtendScript as a fallback. On Windows there's no equivalent transport — the only way to script a running Premiere is from inside the host itself. That's where these extensions come in.
26
+
27
+ Beyond Windows support, the CEP panel is also faster than osascript on macOS (~10–30 ms per call vs ~200–500 ms), and the UXP plugin is the only one that will keep working past Adobe's September 2026 sunset of CEP/ExtendScript.
28
+
29
+ ---
30
+
31
+ ## Install (UXP — recommended)
32
+
33
+ ```bash
34
+ npm i -g @kenkaiiii/gg-editor-premiere-panel
35
+ gg-editor-premiere-panel install # defaults to --uxp
36
+ ```
37
+
38
+ That command copies the plugin to:
39
+
40
+ | Platform | Path |
41
+ |---|---|
42
+ | macOS | `~/Library/Application Support/Adobe/UXP/Plugins/External/com.kenkaiiii.gg-editor-premiere-panel.uxp/` |
43
+ | Windows | `%APPDATA%\Adobe\UXP\Plugins\External\com.kenkaiiii.gg-editor-premiere-panel.uxp\` |
44
+
45
+ Then **once**, in Premiere Pro:
46
+
47
+ 1. Quit and restart Premiere
48
+ 2. Open Premiere **Settings → Plugins** and tick **"Enable Developer Mode"**
49
+ 3. Restart Premiere again (developer mode needs a restart)
50
+ 4. Open **Window → UXP Plugins → GG Editor**
51
+ 5. Click **Connect**
52
+
53
+ That's it. Now run `ggeditor --host premiere` from another terminal.
54
+
55
+ > **Why ggeditor hosts the WebSocket server (and the panel connects to it)**: UXP plugins can't open listening TCP sockets. So the gg-editor CLI binds a localhost WebSocket server on port 7437, and the UXP plugin dials out to it. (The CEP panel is the other way round — the panel is the HTTP server, ggeditor is the client.)
56
+
57
+ ---
58
+
59
+ ## Install (CEP — legacy)
60
+
61
+ ```bash
62
+ gg-editor-premiere-panel install --cep
63
+ ```
64
+
65
+ That command:
66
+ 1. Copies the panel files to your CEP extensions directory
67
+ 2. Sets `PlayerDebugMode=1` for CSXS versions 9–12 (required for unsigned panels)
68
+
69
+ Then **restart Premiere Pro**, open `Window → Extensions → GG Editor`. The panel should show "listening" and a port number.
70
+
71
+ ---
72
+
73
+ ## Use
74
+
75
+ ```bash
76
+ ggeditor --host premiere # gg-editor CLI talks to whichever panel is open
77
+ ```
78
+
79
+ That's it. No further config.
80
+
81
+ ---
82
+
83
+ ## CLI commands
84
+
85
+ ```bash
86
+ gg-editor-premiere-panel install # install UXP plugin (default)
87
+ gg-editor-premiere-panel install --cep # install legacy CEP panel
88
+ gg-editor-premiere-panel uninstall # remove UXP plugin
89
+ gg-editor-premiere-panel uninstall --cep # remove CEP panel
90
+ gg-editor-premiere-panel status # show install state for both
91
+ gg-editor-premiere-panel debug-on # enable PlayerDebugMode (CEP only)
92
+ gg-editor-premiere-panel debug-off # disable PlayerDebugMode (CEP only)
93
+ ```
94
+
95
+ ---
96
+
97
+ ## Where things live
98
+
99
+ | What | macOS | Windows |
100
+ |---|---|---|
101
+ | UXP plugin | `~/Library/Application Support/Adobe/UXP/Plugins/External/com.kenkaiiii.gg-editor-premiere-panel.uxp/` | `%APPDATA%\Adobe\UXP\Plugins\External\com.kenkaiiii.gg-editor-premiere-panel.uxp\` |
102
+ | CEP panel | `~/Library/Application Support/Adobe/CEP/extensions/com.kenkaiiii.gg-editor-premiere-panel/` | `%APPDATA%\Adobe\CEP\extensions\com.kenkaiiii.gg-editor-premiere-panel\` |
103
+ | `PlayerDebugMode` (CEP only) | `~/Library/Preferences/com.adobe.CSXS.<N>.plist` | `HKCU\Software\Adobe\CSXS.<N>` (registry) |
104
+
105
+ CEP debug mode is set for CSXS versions 9 through 12 (covers Premiere 2019 to 2025+). UXP doesn't use PlayerDebugMode; instead it requires the **Settings → Plugins → Enable Developer Mode** toggle inside Premiere itself.
106
+
107
+ ---
108
+
109
+ ## Wire protocol
110
+
111
+ ### UXP (WebSocket, gg-editor is the server)
112
+
113
+ The plugin connects out to `ws://127.0.0.1:7437` (or 7438..7443 if the default is busy). On connect it sends a hello frame:
114
+
115
+ ```json
116
+ { "kind": "hello", "product": "gg-editor-premiere-panel", "panelKind": "uxp", "version": "0.2.0" }
117
+ ```
118
+
119
+ Then RPC requests flow ggeditor → plugin, with replies on the same socket:
120
+
121
+ ```json
122
+ → { "id": "1", "method": "get_timeline", "params": {} }
123
+ ← { "id": "1", "ok": true, "result": { ... } }
124
+ ← { "id": "1", "ok": false, "error": "..." }
125
+ ```
126
+
127
+ ### CEP (HTTP, panel is the server)
128
+
129
+ ```http
130
+ GET /health
131
+ → { "ok": true, "product": "gg-editor-premiere-panel", "port": 7437, "kind": "cep" }
132
+
133
+ POST /rpc
134
+ Body: { "method": "get_timeline", "params": {} }
135
+ → { "ok": true, "result": {...} }
136
+ → { "ok": false, "error": "..." }
137
+ ```
138
+
139
+ ### Methods
140
+
141
+ Both panels expose the same set:
142
+
143
+ - `ping` — health + Premiere version
144
+ - `get_timeline` — clips, markers, fps, duration
145
+ - `get_markers` — list of markers on the active sequence
146
+ - `add_marker` — drop a marker with note + color + duration
147
+ - `append_clip` — import + add at end of active sequence
148
+ - `replace_clip` — swap a clip's media without disturbing range
149
+ - `clone_timeline` — duplicate the active sequence
150
+ - `save_project` — File → Save
151
+ - `import_to_media_pool` — bulk import into a bin
152
+ - `import_subtitles` — import an SRT into the project
153
+ - `import_timeline` — bulk import EDL/FCPXML/AAF
154
+ - `insert_clip_on_track` — surgical insert at a record-frame
155
+
156
+ Unsupported via either panel (use `write_edl + import_timeline` from gg-editor):
157
+
158
+ - `cut_at`, `ripple_delete` — no scriptable razor on either runtime
159
+ - `render` — needs Adobe Media Encoder integration; deferred
160
+ - `set_clip_speed`, Lumetri color ops — not exposed on either runtime today
161
+
162
+ ---
163
+
164
+ ## Security
165
+
166
+ - The UXP plugin only ever connects to `ws://127.0.0.1` (declared via `requiredPermissions.network.domains` in its manifest). The WS server bgg-editor binds is `127.0.0.1`-only.
167
+ - The CEP panel's HTTP server binds to `127.0.0.1` only. Never exposed beyond localhost.
168
+ - `PlayerDebugMode=1` lets unsigned CEP panels load. This is the standard development flag — Adobe documents it.
169
+
170
+ ---
171
+
172
+ ## Troubleshooting
173
+
174
+ **(UXP) Plugin doesn't show up in Window → UXP Plugins:**
175
+ 1. Confirm developer mode: Premiere → Settings → Plugins → "Enable Developer Mode" must be ticked
176
+ 2. Run `gg-editor-premiere-panel status` — confirm the install path exists
177
+ 3. Fully quit Premiere and relaunch
178
+
179
+ **(UXP) Panel says "disconnected":**
180
+ - Make sure `ggeditor` is running before you click Connect, OR enable "Connect on launch" so the panel keeps retrying
181
+ - Check the port matches in both places (default 7437; the panel field is editable)
182
+
183
+ **(CEP) Panel doesn't show up in Window → Extensions:**
184
+ 1. Run `gg-editor-premiere-panel status` — confirm install dir exists
185
+ 2. Run `gg-editor-premiere-panel debug-on` — sometimes Premiere updates wipe this
186
+ 3. Fully quit Premiere (not just close the project) and relaunch
187
+ 4. Check Window → Workspaces — the Extensions submenu only appears for some workspaces
188
+
189
+ **(CEP) Panel shows "bind failed":**
190
+ - Port 7437 is in use. Set `GG_EDITOR_PREMIERE_PORT=8000` (or any free port) in the env Premiere launches with.
191
+
192
+ **`ggeditor --host premiere` says "panel not reachable":**
193
+ - For UXP: panel must be open AND clicked **Connect**
194
+ - For CEP: panel must be open (it only starts the HTTP server while the window is visible)
195
+
196
+ ---
197
+
198
+ ## License
199
+
200
+ MIT
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../bin/cli.ts"],"names":[],"mappings":""}
@@ -0,0 +1,159 @@
1
+ #!/usr/bin/env node
2
+ import chalk from "chalk";
3
+ import { disableDebugMode, enableDebugMode, installCepPanel, installUxpPlugin, installedPanelDir, installedUxpPluginDir, isCepPanelInstalled, isUxpPluginInstalled, uninstallCepPanel, uninstallUxpPlugin, } from "../src/installer.js";
4
+ /**
5
+ * `gg-editor-premiere-panel` ships two panels:
6
+ *
7
+ * - **UXP** (default) — Premiere Pro 25.6+. The only path that survives
8
+ * Adobe's September 2026 ExtendScript sunset.
9
+ * - **CEP** (`--cep`) — Legacy ExtendScript-backed panel. Works on Premiere
10
+ * 22+, but Adobe is removing CEP support after Sept 2026.
11
+ *
12
+ * Both can coexist (different bundle ids); the gg-editor bridge prefers the
13
+ * one that responds first.
14
+ */
15
+ function printHelp() {
16
+ process.stdout.write(`gg-editor-premiere-panel — install the gg-editor extension into Adobe Premiere Pro
17
+
18
+ USAGE
19
+ gg-editor-premiere-panel install [--uxp|--cep] Install the panel (UXP by default)
20
+ gg-editor-premiere-panel uninstall [--uxp|--cep] Remove a panel (defaults to UXP)
21
+ gg-editor-premiere-panel status Show install state for both panels
22
+ gg-editor-premiere-panel debug-on Enable PlayerDebugMode (CEP only)
23
+ gg-editor-premiere-panel debug-off Disable PlayerDebugMode (CEP only)
24
+
25
+ PANEL CHOICES
26
+ --uxp Modern UXP plugin. Requires Premiere Pro 25.6+.
27
+ You must enable Premiere → Settings → Plugins → "Enable Developer Mode" once.
28
+ --cep Legacy CEP panel. Works through September 2026, then removed by Adobe.
29
+
30
+ After UXP install:
31
+ 1. Quit and restart Premiere Pro
32
+ 2. In Premiere: Settings → Plugins → check "Enable Developer Mode"
33
+ 3. Restart Premiere
34
+ 4. Window menu → UXP Plugins → "GG Editor"
35
+ 5. Click Connect — the panel dials gg-editor's WS server (default port 7437)
36
+ 6. Now run \`ggeditor --host premiere\`
37
+
38
+ After CEP install:
39
+ 1. Quit and restart Premiere Pro
40
+ 2. Window menu → Extensions → "GG Editor"
41
+ 3. The panel should show "listening" with a port (default 7437)
42
+ 4. Now run \`ggeditor --host premiere\`
43
+
44
+ The gg-editor CLI hosts a WebSocket server on 127.0.0.1 only — never beyond
45
+ localhost — that the UXP plugin connects to. (UXP plugins can't open listening
46
+ sockets, so the roles are flipped vs the CEP path where the panel is the server.)
47
+ `);
48
+ }
49
+ function status() {
50
+ const cepInstalled = isCepPanelInstalled();
51
+ const uxpInstalled = isUxpPluginInstalled();
52
+ process.stdout.write(chalk.bold("UXP plugin (Premiere 25.6+, recommended)\n"));
53
+ process.stdout.write(` Path: ${installedUxpPluginDir()}\n`);
54
+ process.stdout.write(` Installed: ${uxpInstalled ? chalk.green("yes") : chalk.red("no")}\n`);
55
+ process.stdout.write("\n");
56
+ process.stdout.write(chalk.bold("CEP panel (legacy, supported through Sept 2026)\n"));
57
+ process.stdout.write(` Path: ${installedPanelDir()}\n`);
58
+ process.stdout.write(` Installed: ${cepInstalled ? chalk.green("yes") : chalk.red("no")}\n`);
59
+ }
60
+ function pickChoice(args, fallback = "uxp") {
61
+ if (args.includes("--cep"))
62
+ return "cep";
63
+ if (args.includes("--uxp"))
64
+ return "uxp";
65
+ return fallback;
66
+ }
67
+ function doInstallUxp() {
68
+ process.stdout.write(chalk.dim("Installing UXP plugin…\n"));
69
+ const r = installUxpPlugin();
70
+ process.stdout.write(` Installed to: ${r.installedTo}\n`);
71
+ process.stdout.write(` Copied files: ${r.copiedFiles}\n\n`);
72
+ process.stdout.write(chalk.bold("Next steps:\n"));
73
+ process.stdout.write(" 1. Quit and restart Premiere Pro\n");
74
+ process.stdout.write(" 2. Settings → Plugins → enable \"Enable Developer Mode\"\n");
75
+ process.stdout.write(" 3. Restart Premiere again (developer mode requires a restart)\n");
76
+ process.stdout.write(" 4. Window → UXP Plugins → \"GG Editor\"\n");
77
+ process.stdout.write(" 5. Click Connect, then run: ggeditor --host premiere\n");
78
+ }
79
+ function doInstallCep() {
80
+ process.stdout.write(chalk.dim("Installing CEP panel…\n"));
81
+ const r = installCepPanel();
82
+ process.stdout.write(` Installed to: ${r.installedTo}\n`);
83
+ process.stdout.write(` Copied files: ${r.copiedFiles}\n\n`);
84
+ process.stdout.write(chalk.dim("Enabling PlayerDebugMode (required for unsigned panels)…\n"));
85
+ const dm = enableDebugMode();
86
+ for (const [v, ok] of Object.entries(dm.perVersion)) {
87
+ process.stdout.write(` CSXS.${v}: ${ok ? chalk.green("ok") : chalk.red("failed")}\n`);
88
+ }
89
+ if (dm.notes.length) {
90
+ for (const n of dm.notes)
91
+ process.stdout.write(chalk.dim(` note: ${n}\n`));
92
+ }
93
+ process.stdout.write("\n" + chalk.bold("Next steps:\n"));
94
+ process.stdout.write(" 1. Quit and restart Premiere Pro\n");
95
+ process.stdout.write(" 2. Window → Extensions → \"GG Editor\"\n");
96
+ process.stdout.write(" 3. Run: ggeditor --host premiere\n");
97
+ process.stdout.write(chalk.yellow("\nNote: Adobe is removing CEP support in September 2026. " +
98
+ "Consider --uxp if your Premiere is 25.6+.\n"));
99
+ }
100
+ async function main() {
101
+ const argv = process.argv.slice(2);
102
+ const cmd = argv[0];
103
+ if (!cmd || cmd === "-h" || cmd === "--help") {
104
+ printHelp();
105
+ return;
106
+ }
107
+ if (cmd === "install") {
108
+ const choice = pickChoice(argv);
109
+ if (choice === "cep")
110
+ doInstallCep();
111
+ else
112
+ doInstallUxp();
113
+ return;
114
+ }
115
+ if (cmd === "uninstall") {
116
+ const choice = pickChoice(argv);
117
+ if (choice === "cep") {
118
+ const r = uninstallCepPanel();
119
+ if (r.removed)
120
+ process.stdout.write(chalk.green(`Removed CEP: ${r.path}\n`));
121
+ else
122
+ process.stdout.write(chalk.dim(`CEP not installed: ${r.path}\n`));
123
+ }
124
+ else {
125
+ const r = uninstallUxpPlugin();
126
+ if (r.removed)
127
+ process.stdout.write(chalk.green(`Removed UXP: ${r.path}\n`));
128
+ else
129
+ process.stdout.write(chalk.dim(`UXP not installed: ${r.path}\n`));
130
+ }
131
+ return;
132
+ }
133
+ if (cmd === "status") {
134
+ status();
135
+ return;
136
+ }
137
+ if (cmd === "debug-on") {
138
+ const r = enableDebugMode();
139
+ for (const [v, ok] of Object.entries(r.perVersion)) {
140
+ process.stdout.write(` CSXS.${v}: ${ok ? chalk.green("ok") : chalk.red("failed")}\n`);
141
+ }
142
+ return;
143
+ }
144
+ if (cmd === "debug-off") {
145
+ const r = disableDebugMode();
146
+ for (const [v, ok] of Object.entries(r.perVersion)) {
147
+ process.stdout.write(` CSXS.${v}: ${ok ? chalk.green("ok") : chalk.red("failed")}\n`);
148
+ }
149
+ return;
150
+ }
151
+ process.stderr.write(chalk.red(`unknown command: ${cmd}\n`));
152
+ printHelp();
153
+ process.exit(1);
154
+ }
155
+ main().catch((e) => {
156
+ process.stderr.write(chalk.red(`Fatal: ${e.message}\n`));
157
+ process.exit(1);
158
+ });
159
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../bin/cli.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;GAUG;AAEH,SAAS,SAAS;IAChB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BtB,CAAC,CAAC;AACH,CAAC;AAED,SAAS,MAAM;IACb,MAAM,YAAY,GAAG,mBAAmB,EAAE,CAAC;IAC3C,MAAM,YAAY,GAAG,oBAAoB,EAAE,CAAC;IAC5C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC,CAAC;IAC/E,OAAO,CAAC,MAAM,CAAC,K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B,MAAM,CAAC,GAAG,gBAAgB,EAAE,CAAC;QAC7B,KAAK,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,EAAE,CAAC;YACnD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACzF,CAAC;QACD,OAAO;IACT,CAAC;IAED,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC,CAAC;IAC7D,SAAS,EAAE,CAAC;IACZ,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,UAAW,CAAW,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;IACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { BUNDLE_ID, BUNDLE_ID_UXP, disableDebugMode, enableDebugMode, installCepPanel, installPanel, installUxpPlugin, installedPanelDir, installedUxpPluginDir, isCepPanelInstalled, isPanelInstalled, isUxpPluginInstalled, panelSourceDir, uninstallCepPanel, uninstallPanel, uninstallUxpPlugin, userExtensionsDir, userUxpPluginsDir, uxpPluginSourceDir, } from "./installer.js";
2
+ export type { DebugModeResult, InstallResult } from "./installer.js";
3
+ export declare const PANEL_DEFAULT_PORT = 7437;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACrE,eAAO,MAAM,kBAAkB,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { BUNDLE_ID, BUNDLE_ID_UXP, disableDebugMode, enableDebugMode, installCepPanel, installPanel, installUxpPlugin, installedPanelDir, installedUxpPluginDir, isCepPanelInstalled, isPanelInstalled, isUxpPluginInstalled, panelSourceDir, uninstallCepPanel, uninstallPanel, uninstallUxpPlugin, userExtensionsDir, userUxpPluginsDir, uxpPluginSourceDir, } from "./installer.js";
2
+ export const PANEL_DEFAULT_PORT = 7437;
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { BUNDLE_ID, BUNDLE_ID_UXP, installedPanelDir, installedUxpPluginDir, userExtensionsDir, userUxpPluginsDir } from "./paths.js";
2
+ /**
3
+ * Locate the panel/ directory that ships in this package. Works whether the
4
+ * package is consumed from npm (panel/ alongside dist/) or from the source
5
+ * tree (panel/ alongside src/).
6
+ */
7
+ export declare function panelSourceDir(): string;
8
+ /**
9
+ * Locate the panel-uxp/ directory that ships in this package. Same dual-mode
10
+ * resolution as `panelSourceDir()` but anchored on the UXP `manifest.json`.
11
+ */
12
+ export declare function uxpPluginSourceDir(): string;
13
+ export interface InstallResult {
14
+ installedTo: string;
15
+ copiedFiles: number;
16
+ }
17
+ /** Recursively copy panel/ into the user's CEP extensions directory. */
18
+ export declare function installCepPanel(): InstallResult;
19
+ /** Back-compat alias for callers still on the v0.1 API. */
20
+ export declare const installPanel: typeof installCepPanel;
21
+ export declare function uninstallCepPanel(): {
22
+ removed: boolean;
23
+ path: string;
24
+ };
25
+ export declare const uninstallPanel: typeof uninstallCepPanel;
26
+ export declare function isCepPanelInstalled(): boolean;
27
+ export declare const isPanelInstalled: typeof isCepPanelInstalled;
28
+ /** Recursively copy panel-uxp/ into the user's UXP External plugins dir. */
29
+ export declare function installUxpPlugin(): InstallResult;
30
+ export declare function uninstallUxpPlugin(): {
31
+ removed: boolean;
32
+ path: string;
33
+ };
34
+ export declare function isUxpPluginInstalled(): boolean;
35
+ /**
36
+ * Unsigned CEP panels won't load unless PlayerDebugMode=1 is set per CSXS
37
+ * version. For an alpha distribution we toggle it programmatically.
38
+ *
39
+ * macOS: `defaults write com.adobe.CSXS.<N> PlayerDebugMode 1`
40
+ * Windows: registry key HKCU\Software\Adobe\CSXS.<N> → PlayerDebugMode = "1"
41
+ *
42
+ * UXP plugins do **not** use PlayerDebugMode; they require the user to
43
+ * toggle "Enable Developer Mode" inside Premiere → Plugins, which we can't
44
+ * do programmatically.
45
+ */
46
+ export interface DebugModeResult {
47
+ ok: boolean;
48
+ perVersion: Record<string, boolean>;
49
+ notes: string[];
50
+ }
51
+ export declare function enableDebugMode(): DebugModeResult;
52
+ export declare function disableDebugMode(): DebugModeResult;
53
+ export { BUNDLE_ID, BUNDLE_ID_UXP, installedPanelDir, installedUxpPluginDir, userExtensionsDir, userUxpPluginsDir, };
54
+ //# sourceMappingURL=installer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../src/installer.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,SAAS,EACT,aAAa,EAEb,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAIpB;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAYvC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAa3C;AAED,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wEAAwE;AACxE,wBAAgB,eAAe,IAAI,aAAa,CAW/C;AAED,2DAA2D;AAC3D,eAAO,MAAM,YAAY,wBAAkB,CAAC;AAE5C,wBAAgB,iBAAiB,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAKtE;AAED,eAAO,MAAM,cAAc,0BAAoB,CAAC;AAEhD,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED,eAAO,MAAM,gBAAgB,4BAAsB,CAAC;AAIpD,4EAA4E;AAC5E,wBAAgB,gBAAgB,IAAI,aAAa,CAWhD;AAED,wBAAgB,kBAAkB,IAAI;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAKvE;AAED,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAID;;;;;;;;;;GAUG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,OAAO,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,wBAAgB,eAAe,IAAI,eAAe,CAqCjD;AAED,wBAAgB,gBAAgB,IAAI,eAAe,CAwBlD;AAeD,OAAO,EACL,SAAS,EACT,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GAClB,CAAC"}
@@ -0,0 +1,166 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import { cpSync, existsSync, mkdirSync, readdirSync, rmSync, statSync } from "node:fs";
3
+ import { platform } from "node:os";
4
+ import { dirname, join, resolve } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+ import { BUNDLE_ID, BUNDLE_ID_UXP, CSXS_VERSIONS, installedPanelDir, installedUxpPluginDir, userExtensionsDir, userUxpPluginsDir, } from "./paths.js";
7
+ // ── CEP panel ────────────────────────────────────────────────
8
+ /**
9
+ * Locate the panel/ directory that ships in this package. Works whether the
10
+ * package is consumed from npm (panel/ alongside dist/) or from the source
11
+ * tree (panel/ alongside src/).
12
+ */
13
+ export function panelSourceDir() {
14
+ // Built file lives at dist/src/installer.js → ../../panel
15
+ const here = dirname(fileURLToPath(import.meta.url));
16
+ const candidates = [
17
+ resolve(here, "..", "..", "panel"), // when built: dist/src/* → ../../panel
18
+ resolve(here, "..", "panel"), // when run from src/* → ../panel (dev)
19
+ resolve(here, "panel"), // safety
20
+ ];
21
+ for (const c of candidates) {
22
+ if (existsSync(join(c, "CSXS", "manifest.xml")))
23
+ return c;
24
+ }
25
+ throw new Error("Could not find panel/ directory in package. Searched: " + candidates.join(", "));
26
+ }
27
+ /**
28
+ * Locate the panel-uxp/ directory that ships in this package. Same dual-mode
29
+ * resolution as `panelSourceDir()` but anchored on the UXP `manifest.json`.
30
+ */
31
+ export function uxpPluginSourceDir() {
32
+ const here = dirname(fileURLToPath(import.meta.url));
33
+ const candidates = [
34
+ resolve(here, "..", "..", "panel-uxp"),
35
+ resolve(here, "..", "panel-uxp"),
36
+ resolve(here, "panel-uxp"),
37
+ ];
38
+ for (const c of candidates) {
39
+ if (existsSync(join(c, "manifest.json")))
40
+ return c;
41
+ }
42
+ throw new Error("Could not find panel-uxp/ directory in package. Searched: " + candidates.join(", "));
43
+ }
44
+ /** Recursively copy panel/ into the user's CEP extensions directory. */
45
+ export function installCepPanel() {
46
+ const src = panelSourceDir();
47
+ const dest = installedPanelDir();
48
+ mkdirSync(userExtensionsDir(), { recursive: true });
49
+ if (existsSync(dest)) {
50
+ rmSync(dest, { recursive: true, force: true });
51
+ }
52
+ cpSync(src, dest, { recursive: true });
53
+ return { installedTo: dest, copiedFiles: countFiles(dest) };
54
+ }
55
+ /** Back-compat alias for callers still on the v0.1 API. */
56
+ export const installPanel = installCepPanel;
57
+ export function uninstallCepPanel() {
58
+ const dest = installedPanelDir();
59
+ if (!existsSync(dest))
60
+ return { removed: false, path: dest };
61
+ rmSync(dest, { recursive: true, force: true });
62
+ return { removed: true, path: dest };
63
+ }
64
+ export const uninstallPanel = uninstallCepPanel;
65
+ export function isCepPanelInstalled() {
66
+ return existsSync(join(installedPanelDir(), "CSXS", "manifest.xml"));
67
+ }
68
+ export const isPanelInstalled = isCepPanelInstalled;
69
+ // ── UXP plugin ───────────────────────────────────────────────
70
+ /** Recursively copy panel-uxp/ into the user's UXP External plugins dir. */
71
+ export function installUxpPlugin() {
72
+ const src = uxpPluginSourceDir();
73
+ const dest = installedUxpPluginDir();
74
+ mkdirSync(userUxpPluginsDir(), { recursive: true });
75
+ if (existsSync(dest)) {
76
+ rmSync(dest, { recursive: true, force: true });
77
+ }
78
+ cpSync(src, dest, { recursive: true });
79
+ return { installedTo: dest, copiedFiles: countFiles(dest) };
80
+ }
81
+ export function uninstallUxpPlugin() {
82
+ const dest = installedUxpPluginDir();
83
+ if (!existsSync(dest))
84
+ return { removed: false, path: dest };
85
+ rmSync(dest, { recursive: true, force: true });
86
+ return { removed: true, path: dest };
87
+ }
88
+ export function isUxpPluginInstalled() {
89
+ return existsSync(join(installedUxpPluginDir(), "manifest.json"));
90
+ }
91
+ export function enableDebugMode() {
92
+ const perVersion = {};
93
+ const notes = [];
94
+ for (const v of CSXS_VERSIONS) {
95
+ if (platform() === "darwin") {
96
+ const r = spawnSync("defaults", ["write", `com.adobe.CSXS.${v}`, "PlayerDebugMode", "1"], {
97
+ encoding: "utf8",
98
+ });
99
+ perVersion[v] = r.status === 0;
100
+ if (r.status !== 0 && r.stderr)
101
+ notes.push(`CSXS.${v}: ${r.stderr.trim()}`);
102
+ }
103
+ else if (platform() === "win32") {
104
+ const r = spawnSync("reg", [
105
+ "ADD",
106
+ `HKCU\\Software\\Adobe\\CSXS.${v}`,
107
+ "/v",
108
+ "PlayerDebugMode",
109
+ "/t",
110
+ "REG_SZ",
111
+ "/d",
112
+ "1",
113
+ "/f",
114
+ ], { encoding: "utf8", windowsHide: true });
115
+ perVersion[v] = r.status === 0;
116
+ if (r.status !== 0 && r.stderr)
117
+ notes.push(`CSXS.${v}: ${r.stderr.trim()}`);
118
+ }
119
+ else {
120
+ perVersion[v] = false;
121
+ notes.push(`platform ${platform()} not supported`);
122
+ }
123
+ }
124
+ const ok = Object.values(perVersion).some((v) => v);
125
+ return { ok, perVersion, notes };
126
+ }
127
+ export function disableDebugMode() {
128
+ const perVersion = {};
129
+ const notes = [];
130
+ for (const v of CSXS_VERSIONS) {
131
+ if (platform() === "darwin") {
132
+ const r = spawnSync("defaults", ["delete", `com.adobe.CSXS.${v}`, "PlayerDebugMode"], {
133
+ encoding: "utf8",
134
+ });
135
+ // delete returns non-zero if key didn't exist; treat as success.
136
+ perVersion[v] = true;
137
+ if (r.status !== 0)
138
+ notes.push(`CSXS.${v}: not previously set`);
139
+ }
140
+ else if (platform() === "win32") {
141
+ const r = spawnSync("reg", ["DELETE", `HKCU\\Software\\Adobe\\CSXS.${v}`, "/v", "PlayerDebugMode", "/f"], { encoding: "utf8", windowsHide: true });
142
+ perVersion[v] = true;
143
+ if (r.status !== 0)
144
+ notes.push(`CSXS.${v}: not previously set`);
145
+ }
146
+ else {
147
+ perVersion[v] = false;
148
+ }
149
+ }
150
+ return { ok: true, perVersion, notes };
151
+ }
152
+ // ── Helpers ──────────────────────────────────────────────────
153
+ function countFiles(dir) {
154
+ let n = 0;
155
+ for (const entry of readdirSync(dir)) {
156
+ const p = join(dir, entry);
157
+ const s = statSync(p);
158
+ if (s.isDirectory())
159
+ n += countFiles(p);
160
+ else
161
+ n += 1;
162
+ }
163
+ return n;
164
+ }
165
+ export { BUNDLE_ID, BUNDLE_ID_UXP, installedPanelDir, installedUxpPluginDir, userExtensionsDir, userUxpPluginsDir, };
166
+ //# sourceMappingURL=installer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installer.js","sourceRoot":"","sources":["../../src/installer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EACL,SAAS,EACT,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAEpB,gEAAgE;AAEhE;;;;GAIG;AACH,MAAM,UAAU,cAAc;IAC5B,0DAA0D;IAC1D,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,MAAM,UAAU,GAAG;QACjB,OAAO,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,uCAAuC;QAC3E,OAAO,CAAC,IAAI,EAAE,IAAI,EA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