@dainprotocol/cli 1.1.29 → 1.1.31

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.
@@ -1 +1,2 @@
1
- DAIN_API_KEY=NEED_TO_BE_SET
1
+ DAIN_API_KEY=NEED_TO_BE_SET
2
+ PORT=
@@ -12,6 +12,8 @@ import {
12
12
  LayoutUIBuilder,
13
13
  } from "@dainprotocol/utils";
14
14
 
15
+ const port = Number(process.env.PORT) || 2022;
16
+
15
17
  const getWeatherEmoji = (temperature: number): string => {
16
18
  if (temperature <= 0) return "🥶";
17
19
  if (temperature <= 10) return "❄️";
@@ -214,6 +216,6 @@ const dainService = defineDAINService({
214
216
  tools: [getWeatherConfig, getWeatherForecastConfig],
215
217
  });
216
218
 
217
- dainService.startNode().then(({ address }) => {
219
+ dainService.startNode({ port: port }).then(({ address }) => {
218
220
  console.log("Weather DAIN Service is running at :" + address().port);
219
221
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dainprotocol/cli",
3
- "version": "1.1.29",
3
+ "version": "1.1.31",
4
4
  "private": false,
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "@ai-sdk/anthropic": "^0.0.50",
24
- "@dainprotocol/service-sdk": "^1.0.85",
24
+ "@dainprotocol/service-sdk": "^1.1.13",
25
25
  "@dainprotocol/tunnel": "^1.0.5",
26
26
  "@types/fs-extra": "^11.0.4",
27
27
  "@types/localtunnel": "^2.0.4",
@@ -1 +1,2 @@
1
- DAIN_API_KEY=NEED_TO_BE_SET
1
+ DAIN_API_KEY=NEED_TO_BE_SET
2
+ PORT=
@@ -12,6 +12,8 @@ import {
12
12
  LayoutUIBuilder,
13
13
  } from "@dainprotocol/utils";
14
14
 
15
+ const port = Number(process.env.PORT) || 2022;
16
+
15
17
  const getWeatherEmoji = (temperature: number): string => {
16
18
  if (temperature <= 0) return "🥶";
17
19
  if (temperature <= 10) return "❄️";
@@ -214,6 +216,6 @@ const dainService = defineDAINService({
214
216
  tools: [getWeatherConfig, getWeatherForecastConfig],
215
217
  });
216
218
 
217
- dainService.startNode().then(({ address }) => {
219
+ dainService.startNode({ port: port }).then(({ address }) => {
218
220
  console.log("Weather DAIN Service is running at :" + address().port);
219
221
  });