staklink 0.3.72 → 0.3.74
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/proxy-server.cjs +31 -10
- package/dist/staklink-cli.cjs +1 -1
- package/package.json +1 -1
package/dist/proxy-server.cjs
CHANGED
|
@@ -61136,16 +61136,40 @@ var Repo = class {
|
|
|
61136
61136
|
await this.unsetUserConfig();
|
|
61137
61137
|
}
|
|
61138
61138
|
// Enhanced push method that accepts user credentials
|
|
61139
|
+
// Automatically handles the case where remote has new commits (e.g., from GitHub rebase)
|
|
61140
|
+
// by pulling with rebase and pushing again
|
|
61139
61141
|
async pushCurrentBranchWithCredentials(credentials) {
|
|
61140
61142
|
const currentBranch = (await this.printCurrentBranch()).trim();
|
|
61141
61143
|
try {
|
|
61142
61144
|
if (credentials) {
|
|
61143
61145
|
await this.setUserCredentials(credentials);
|
|
61144
61146
|
}
|
|
61145
|
-
|
|
61146
|
-
|
|
61147
|
-
|
|
61148
|
-
|
|
61147
|
+
try {
|
|
61148
|
+
const result = await this.push(currentBranch);
|
|
61149
|
+
return result;
|
|
61150
|
+
} catch (pushError) {
|
|
61151
|
+
const errorMessage = pushError instanceof Error ? pushError.message : String(pushError);
|
|
61152
|
+
const isRejectedDueToRemoteChanges = errorMessage.includes("[rejected]") || errorMessage.includes("non-fast-forward") || errorMessage.includes("Updates were rejected");
|
|
61153
|
+
if (isRejectedDueToRemoteChanges) {
|
|
61154
|
+
try {
|
|
61155
|
+
await this.execCommand(
|
|
61156
|
+
`git pull --rebase origin ${currentBranch}`
|
|
61157
|
+
);
|
|
61158
|
+
} catch (pullError) {
|
|
61159
|
+
const status = await this.execCommand("git status");
|
|
61160
|
+
if (status.includes("rebase in progress") || status.includes("Unmerged") || status.includes("both modified")) {
|
|
61161
|
+
await this.execCommand("git rebase --abort");
|
|
61162
|
+
throw new Error(
|
|
61163
|
+
`Push failed: Remote has conflicting changes that cannot be automatically rebased. Please resolve conflicts manually.`
|
|
61164
|
+
);
|
|
61165
|
+
}
|
|
61166
|
+
throw pullError;
|
|
61167
|
+
}
|
|
61168
|
+
const result = await this.push(currentBranch);
|
|
61169
|
+
return result;
|
|
61170
|
+
}
|
|
61171
|
+
throw pushError;
|
|
61172
|
+
}
|
|
61149
61173
|
} finally {
|
|
61150
61174
|
if (credentials) {
|
|
61151
61175
|
await this.restoreOriginalCredentials();
|
|
@@ -61229,7 +61253,7 @@ var SSEManager = class {
|
|
|
61229
61253
|
var sseManager = new SSEManager();
|
|
61230
61254
|
|
|
61231
61255
|
// src/proxy/version.ts
|
|
61232
|
-
var VERSION = "0.3.
|
|
61256
|
+
var VERSION = "0.3.74";
|
|
61233
61257
|
|
|
61234
61258
|
// node_modules/uuid/dist/esm/stringify.js
|
|
61235
61259
|
var byteToHex = [];
|
|
@@ -121727,9 +121751,6 @@ services:
|
|
|
121727
121751
|
<Dockerfile>
|
|
121728
121752
|
FROM ghcr.io/stakwork/staklink-js:latest
|
|
121729
121753
|
</Dockerfile>
|
|
121730
|
-
<.env>
|
|
121731
|
-
NEW_ENV_VAR=some_value
|
|
121732
|
-
</.env>
|
|
121733
121754
|
|
|
121734
121755
|
IMPORTANT: YOU DO NOT NEED TO INCLUDE FILES THAT DID NOT CHANGE. Only include files that you modified.`;
|
|
121735
121756
|
var REPAIR_PROMPT = `Please inspect the current running environment, and try to fix it. The user tried to load the frontend on the defined PORT, but something went wrong.`;
|
|
@@ -121737,13 +121758,13 @@ var makeRepairPrompt = (podConfigPath, history, initialPrompt) => {
|
|
|
121737
121758
|
let p = initialPrompt ? initialPrompt : REPAIR_PROMPT;
|
|
121738
121759
|
p += `
|
|
121739
121760
|
|
|
121740
|
-
The config files can be read at ${podConfigPath}. You must find out how to edit the pm2.config.js and the docker-compose.yaml in order to get the project to run successfully (there is also a Dockerfile which may also be changed if absolutely needed).
|
|
121761
|
+
The config files can be read at ${podConfigPath}. You must find out how to edit the pm2.config.js and the docker-compose.yaml in order to get the project to run successfully (there is also a Dockerfile which may also be changed if absolutely needed). Remember that you may need to add or alter env vars in the pm2.config.js file. Focus on the frontend app defined in the pm2 config file, don't worry about other services unless they are needed to run the frontend. For example, if its a next.js app, you can read the package.json to see what SHOULD be in the pm2 "script" command or the special install/build/etc commands. REMEMBER: this is a development environment, so the pm2 script should be something like "npm run dev" or something similar... we want to default to whatever start script is best for development (like whatever has hot-reload etc).
|
|
121741
121762
|
|
|
121742
121763
|
This project is currently running a remote code-server instance. Docker is optional, but may be used. The docker-compose file has already been started. You can use the regular docker commands (docker ps, docker logs, etc) to inspect the running containers.
|
|
121743
121764
|
|
|
121744
121765
|
The actual core project code is being run with pm2! You can use pm2 commands to inspect the running processes. However, there is another service running in pm2 also (called staklink-proxy), that is not part of the software project at hand. DO NOT run "pm2 logs" just like that... only read logs of specific processes from the pm2 config file one at a time! Your goal is to get all supporting services and processes running in order to run the main project frontend. (Of course, sometimes its just one simple frontend process without supporting services. It really just depends on the project).
|
|
121745
121766
|
|
|
121746
|
-
|
|
121767
|
+
Along with general env vars, we have SPECIAL env vars for pm2, that tell the code-server system how to automatically build and start the project.
|
|
121747
121768
|
- PORT: The port the project runs on (e.g. 3000)
|
|
121748
121769
|
- INSTALL_COMMAND: The command to install dependencies (e.g. npm install)
|
|
121749
121770
|
- BUILD_COMMAND: The command to build the project (e.g. npm run build)
|
package/dist/staklink-cli.cjs
CHANGED
|
@@ -10967,7 +10967,7 @@ var glob = Object.assign(glob_, {
|
|
|
10967
10967
|
glob.glob = glob;
|
|
10968
10968
|
|
|
10969
10969
|
// src/proxy/version.ts
|
|
10970
|
-
var VERSION = "0.3.
|
|
10970
|
+
var VERSION = "0.3.74";
|
|
10971
10971
|
|
|
10972
10972
|
// src/cli.ts
|
|
10973
10973
|
var STAKLINK_PROXY = "staklink-proxy";
|