@clt-chatbot/scenario-core 1.0.0 → 1.0.2

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.
@@ -9,4 +9,5 @@ export declare class ChatbotEngine {
9
9
  getNextNode(currentNodeId: string, sourceHandle?: string | null, slots?: any): ScenarioNode | null;
10
10
  isInteractiveNode(node: ScenarioNode | undefined): boolean;
11
11
  isAutoPassthroughNode(node: ScenarioNode | undefined): boolean;
12
+ getVersion(): string;
12
13
  }
@@ -19,7 +19,9 @@ class ChatbotEngine {
19
19
  getDeepValue(obj, path) {
20
20
  if (!path)
21
21
  return undefined;
22
- const keys = path.split('.');
22
+ // [0] 형태의 배열 접근을 .0 형태로 정규화합니다.
23
+ const normalizedPath = path.replace(/\[(\w+)\]/g, '.$1').replace(/^\./, '');
24
+ const keys = normalizedPath.split('.');
23
25
  let current = obj;
24
26
  for (const key of keys) {
25
27
  if (current === null || current === undefined)
@@ -114,5 +116,8 @@ class ChatbotEngine {
114
116
  return false;
115
117
  return ['setSlot', 'set-slot', 'delay', 'api', 'toast', 'link'].includes(node.type);
116
118
  }
119
+ getVersion() {
120
+ return "1.0.1";
121
+ }
117
122
  }
118
123
  exports.ChatbotEngine = ChatbotEngine;
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "@clt-chatbot/scenario-core",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
- "files": ["dist"],
6
+ "files": [
7
+ "dist"
8
+ ],
7
9
  "scripts": {
8
10
  "build": "tsc",
9
11
  "prepare": "npm run build"
12
+ },
13
+ "devDependencies": {
14
+ "typescript": "^5.0.0",
15
+ "@types/node": "^20.0.0"
10
16
  }
11
17
  }