@agent8/deploy 1.1.0 → 1.2.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.
Files changed (2) hide show
  1. package/bin/agent8.js +11 -4
  2. package/package.json +1 -1
package/bin/agent8.js CHANGED
@@ -34,7 +34,7 @@ const envConfig = dotenv.parse(fs.readFileSync(envFilePath));
34
34
 
35
35
  const endpoint =
36
36
  envConfig.VITE_AGENT8_REMOTE_URL ||
37
- "https://verse8-simple-game-backend-609824224664.asia-northeast3.run.app";
37
+ "https://verse8-game-backend-kr-609824224664.asia-northeast3.run.app";
38
38
 
39
39
  let verse = envConfig.VITE_AGENT8_VERSE;
40
40
  let account = envConfig.VITE_AGENT8_ACCOUNT;
@@ -58,12 +58,19 @@ if (previewMode || prodMode) {
58
58
  );
59
59
  process.exit(1);
60
60
  }
61
+
62
+ if (previewMode && !verse) {
63
+ console.error(
64
+ "Error: VITE_AGENT8_VERSE is required in .env file for preview mode"
65
+ );
66
+ process.exit(1);
67
+ }
61
68
  }
62
69
 
63
70
  // Determine target verse based on mode
64
71
  let targetVerse = verse;
65
72
  if (previewMode) {
66
- targetVerse = `${account}-preview`;
73
+ targetVerse = `${verse}-preview`;
67
74
  console.log("Preview mode: Deploying to preview verse:", targetVerse);
68
75
  } else if (prodMode) {
69
76
  console.log("Production mode: Deploying to verse:", targetVerse);
@@ -99,7 +106,7 @@ if (fs.existsSync(serverFilePath)) {
99
106
  const hash = calculateFileHash(serverFilePath);
100
107
  newHashes["server.js"] = hash;
101
108
 
102
- if (hash !== deployedHashes["server.js"]) {
109
+ if (prodMode || hash !== deployedHashes["server.js"]) {
103
110
  filesToUpload.push({
104
111
  filePath: serverFilePath,
105
112
  uploadPath: "",
@@ -133,7 +140,7 @@ if (!previewMode) {
133
140
  const hash = calculateFileHash(fullPath);
134
141
  newHashes[deployKey] = hash;
135
142
 
136
- if (hash !== deployedHashes[deployKey]) {
143
+ if (prodMode || hash !== deployedHashes[deployKey]) {
137
144
  filesToUpload.push({
138
145
  filePath: fullPath,
139
146
  uploadPath: uploadPath === "." ? "" : uploadPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent8/deploy",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "A CLI tool for running agent8 commands",
5
5
  "main": "index.js",
6
6
  "bin": {