staklink 0.3.45 → 0.3.47
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 +27 -5
- package/dist/staklink-cli.cjs +1 -1
- package/package.json +1 -1
package/dist/proxy-server.cjs
CHANGED
|
@@ -56941,7 +56941,7 @@ var SSEManager = class {
|
|
|
56941
56941
|
var sseManager = new SSEManager();
|
|
56942
56942
|
|
|
56943
56943
|
// src/proxy/version.ts
|
|
56944
|
-
var VERSION = "0.3.
|
|
56944
|
+
var VERSION = "0.3.47";
|
|
56945
56945
|
|
|
56946
56946
|
// node_modules/uuid/dist/esm/stringify.js
|
|
56947
56947
|
var byteToHex = [];
|
|
@@ -111178,11 +111178,15 @@ services:
|
|
|
111178
111178
|
<Dockerfile>
|
|
111179
111179
|
FROM ghcr.io/stakwork/staklink-js:latest
|
|
111180
111180
|
</Dockerfile>
|
|
111181
|
+
<.env>
|
|
111182
|
+
NEW_ENV_VAR=some_value
|
|
111183
|
+
</.env>
|
|
111181
111184
|
|
|
111182
111185
|
IMPORTANT: YOU DO NOT NEED TO INCLUDE FILES THAT DID NOT CHANGE. Only include files that you modified.`;
|
|
111183
|
-
var makePrompt = (podConfigPath) =>
|
|
111186
|
+
var makePrompt = (podConfigPath, history) => {
|
|
111187
|
+
let p = `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.
|
|
111184
111188
|
|
|
111185
|
-
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). 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).
|
|
111189
|
+
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). Also you may need to return required environment variables in a .env 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).
|
|
111186
111190
|
|
|
111187
111191
|
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.
|
|
111188
111192
|
|
|
@@ -111199,10 +111203,20 @@ We have SPECIAL env vars for pm2, that tell the code-server system how to automa
|
|
|
111199
111203
|
|
|
111200
111204
|
None of these commands are required though, only the "script" is required (to start the frontend).
|
|
111201
111205
|
|
|
111202
|
-
When you have made a file change and want to restart the whole pm2 environment, do so like this: \`npx -y staklink reload\`. That will start the pm2 apps, then re-run all the install, build, pre-start commands if they are defined.
|
|
111206
|
+
When you have made a file change and want to restart the whole pm2 environment, do so like this: \`npx -y staklink reload\`. That will start the pm2 apps, then re-run all the install, build, pre-start commands if they are defined. IMPORTANT: the main frontend service should be accessible from outside the pod... so depending on the language/framework being used, you might want to make sure the host is correct (such as adding '--host 0.0.0.0' to the start script of rails for example).
|
|
111203
111207
|
|
|
111204
111208
|
Good luck!
|
|
111205
111209
|
`;
|
|
111210
|
+
if (history) {
|
|
111211
|
+
p += `
|
|
111212
|
+
|
|
111213
|
+
Here is a summary of our previous conversation history:
|
|
111214
|
+
${history}
|
|
111215
|
+
|
|
111216
|
+
`;
|
|
111217
|
+
}
|
|
111218
|
+
return p;
|
|
111219
|
+
};
|
|
111206
111220
|
var parseXML = (rawResponse) => {
|
|
111207
111221
|
const files = {};
|
|
111208
111222
|
const regex = /<([\w.\-]+)>([\s\S]*?)<\/\1>/g;
|
|
@@ -113120,8 +113134,16 @@ ${diff.trim()}`);
|
|
|
113120
113134
|
createAsyncAgentHandler(
|
|
113121
113135
|
(req) => {
|
|
113122
113136
|
const podConfigPath = req.body.podConfigPath || "/workspaces/.pod-config/.user-dockerfile";
|
|
113137
|
+
let history = void 0;
|
|
113138
|
+
if (req.body.history) {
|
|
113139
|
+
if (typeof req.body.history === "string") {
|
|
113140
|
+
history = req.body.history;
|
|
113141
|
+
} else {
|
|
113142
|
+
history = JSON.stringify(req.body.history);
|
|
113143
|
+
}
|
|
113144
|
+
}
|
|
113123
113145
|
return {
|
|
113124
|
-
prompt: repair_exports.makePrompt(podConfigPath),
|
|
113146
|
+
prompt: repair_exports.makePrompt(podConfigPath, history),
|
|
113125
113147
|
system: repair_exports.SYSTEM
|
|
113126
113148
|
};
|
|
113127
113149
|
},
|
package/dist/staklink-cli.cjs
CHANGED
|
@@ -10948,7 +10948,7 @@ var glob = Object.assign(glob_, {
|
|
|
10948
10948
|
glob.glob = glob;
|
|
10949
10949
|
|
|
10950
10950
|
// src/proxy/version.ts
|
|
10951
|
-
var VERSION = "0.3.
|
|
10951
|
+
var VERSION = "0.3.47";
|
|
10952
10952
|
|
|
10953
10953
|
// src/cli.ts
|
|
10954
10954
|
var STAKLINK_PROXY = "staklink-proxy";
|