@usepowerplant/cli 0.4.24 → 0.4.26
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/main.js +18 -6
- package/dist/menubar/Powerplant.app.zip +0 -0
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d8a10efc-d51d-5eaf-94f5-f1daf8755a2a")}catch(e){}}();
|
|
3
3
|
import { createRequire as __cliCreateRequire } from 'node:module';
|
|
4
4
|
const require = __cliCreateRequire(import.meta.url);
|
|
5
5
|
var __create = Object.create;
|
|
@@ -86915,7 +86915,7 @@ import { createHmac } from "node:crypto";
|
|
|
86915
86915
|
import tls2 from "node:tls";
|
|
86916
86916
|
var import_undici = __toESM(require_undici(), 1);
|
|
86917
86917
|
var CLI_VERSION_HEADER = "x-powerplant-cli-version";
|
|
86918
|
-
var cliVersion = true ? "0.4.
|
|
86918
|
+
var cliVersion = true ? "0.4.26" : "0.0.0-checkout";
|
|
86919
86919
|
function cliVersionHeaders() {
|
|
86920
86920
|
return { [CLI_VERSION_HEADER]: cliVersion, "user-agent": `powerplant-cli/${cliVersion}` };
|
|
86921
86921
|
}
|
|
@@ -90371,6 +90371,16 @@ function isOurHook2(hook) {
|
|
|
90371
90371
|
if (runsPowerplantHook(commandWords(command) ?? [])) return true;
|
|
90372
90372
|
return /['"]$/.test(command) && OUR_LEGACY_SCRIPTS.includes(command.slice(0, -1).split(/[\\/]/).pop());
|
|
90373
90373
|
}
|
|
90374
|
+
var CODEX_HOOK_NAME = "Powerplant";
|
|
90375
|
+
function codexHandler(command, entries, kept) {
|
|
90376
|
+
const last = entries.at(-1);
|
|
90377
|
+
const inPlace = last !== void 0 && kept.length === entries.length - 1 && Object.keys(last).length === 1 ? external_exports.array(jsonObject).parse(last.hooks) : [];
|
|
90378
|
+
const current = inPlace.length === 1 ? inPlace[0] : void 0;
|
|
90379
|
+
if (current !== void 0 && current.type === "command" && current.command === command && current.timeout === 2 && Object.keys(current).every((key) => ["type", "command", "timeout", "statusMessage"].includes(key))) {
|
|
90380
|
+
return current;
|
|
90381
|
+
}
|
|
90382
|
+
return { type: "command", command, timeout: 2, statusMessage: CODEX_HOOK_NAME };
|
|
90383
|
+
}
|
|
90374
90384
|
function mergeHarnessHooks(harness, text, command) {
|
|
90375
90385
|
try {
|
|
90376
90386
|
const nativeName = nativeHarnessName(harness);
|
|
@@ -90399,7 +90409,7 @@ function mergeHarnessHooks(harness, text, command) {
|
|
|
90399
90409
|
else hooks[event] = kept;
|
|
90400
90410
|
continue;
|
|
90401
90411
|
}
|
|
90402
|
-
const handler = nativeName === "cursor" ? { command, timeout: 2 } :
|
|
90412
|
+
const handler = nativeName === "cursor" ? { command, timeout: 2 } : codexHandler(command, entries, kept);
|
|
90403
90413
|
hooks[event] = [...kept, nativeName === "cursor" ? handler : { hooks: [handler] }];
|
|
90404
90414
|
}
|
|
90405
90415
|
const next = { ...settings, ...nativeName === "cursor" && command !== null ? { version: 1 } : {}, hooks };
|
|
@@ -98496,7 +98506,7 @@ import { accessSync, constants as constants4, readFileSync as readFileSync22 } f
|
|
|
98496
98506
|
import path42 from "node:path";
|
|
98497
98507
|
|
|
98498
98508
|
// src/version.ts
|
|
98499
|
-
var CLI_VERSION = true ? "0.4.
|
|
98509
|
+
var CLI_VERSION = true ? "0.4.26" : "0.0.0-checkout";
|
|
98500
98510
|
var CLI_RELEASE_BUILD = true ? true : false;
|
|
98501
98511
|
var CLI_PACKAGE_NAME = "@usepowerplant/cli";
|
|
98502
98512
|
|
|
@@ -102513,6 +102523,7 @@ import path52 from "node:path";
|
|
|
102513
102523
|
async function prepareCredentialUpgrade(deps) {
|
|
102514
102524
|
if (!deps.needsMigration() || !deps.serviceExists() || deps.ready()) return "ready";
|
|
102515
102525
|
if (deps.installing()) return "busy";
|
|
102526
|
+
if (!deps.savesCredentials && deps.launcherCurrent()) return "not-ready";
|
|
102516
102527
|
const deadline = deps.now() + 3e4;
|
|
102517
102528
|
let lock = await deps.tryLock();
|
|
102518
102529
|
while (lock === null) {
|
|
@@ -103105,7 +103116,8 @@ ${USAGE}`);
|
|
|
103105
103116
|
now: Date.now,
|
|
103106
103117
|
sleep: () => new Promise((resolve2) => setTimeout(resolve2, 250)),
|
|
103107
103118
|
restartCommand: `powerplant restart${config2.appEnv === "production" ? "" : ` --env ${config2.appEnv}`}`,
|
|
103108
|
-
describeBlock: () => credentialUpgradeBlock
|
|
103119
|
+
describeBlock: () => credentialUpgradeBlock,
|
|
103120
|
+
savesCredentials: command !== "menu"
|
|
103109
103121
|
}).catch((error63) => {
|
|
103110
103122
|
if (error63 instanceof ExpectedCliError && credentialUpgradeBlock !== void 0) {
|
|
103111
103123
|
reportDaily(
|
|
@@ -103989,4 +104001,4 @@ undici/lib/web/websocket/frame.js:
|
|
|
103989
104001
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
103990
104002
|
*/
|
|
103991
104003
|
|
|
103992
|
-
//# debugId=
|
|
104004
|
+
//# debugId=d8a10efc-d51d-5eaf-94f5-f1daf8755a2a
|
|
Binary file
|