@sme.up/kokos-sdk-node 0.0.2 → 0.0.3

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,14 +1,14 @@
1
- FROM node:18-alpine AS builder
1
+ FROM node:18-slim AS builder
2
2
  WORKDIR /app
3
3
  COPY package*.json ./
4
4
  RUN npm install
5
5
  COPY . .
6
6
  RUN npm run build
7
7
 
8
- FROM node:18-alpine AS server
8
+ FROM node:18-slim AS server
9
9
  WORKDIR /app
10
10
  COPY package* ./
11
11
  RUN npm install
12
12
  COPY --from=builder ./app/lib ./lib
13
13
  EXPOSE 3000
14
- CMD ["npm", "run", "start:restapi"]
14
+ CMD ["npm", "run", "start:restapi"]
package/init/JS_00_01.txt CHANGED
@@ -17,6 +17,13 @@ const JS_00_01: KokosService = {
17
17
  async function getTree(fun: Fun, context: ExecutionContext): Promise<SmeupTree> {
18
18
  const tree: SmeupTree = {
19
19
  type: SmeupDataStructureType.SmeupTree,
20
+ messages: [
21
+ {
22
+ gravity: "INFO",
23
+ message: "Info message. CN;COL;PIPPO",
24
+ mode: "TN",
25
+ }
26
+ ],
20
27
  children: [
21
28
  {
22
29
  children: [],
@@ -35,6 +42,23 @@ async function getTree(fun: Fun, context: ExecutionContext): Promise<SmeupTree>
35
42
  async function getTable(fun: Fun, context: ExecutionContext): Promise<SmeupTable> {
36
43
  const table: SmeupTable = {
37
44
  type: SmeupDataStructureType.SmeupTable,
45
+ messages: [
46
+ {
47
+ gravity: "INFO",
48
+ message: "Info message. CN;COL;PIPPO",
49
+ mode: "TN",
50
+ },
51
+ {
52
+ gravity: "WARNING",
53
+ message: "Warning message. CN;COL;PLUTO",
54
+ mode: "PM",
55
+ },
56
+ {
57
+ gravity: "ERROR",
58
+ message: "Error message.",
59
+ mode: "PN",
60
+ }
61
+ ],
38
62
  columns: [
39
63
  {
40
64
  code: "COL",
@@ -8,6 +8,13 @@ const JS_00_01 = {
8
8
  async function getTree(fun, context) {
9
9
  const tree = {
10
10
  type: SmeupDataStructureType.SmeupTree,
11
+ messages: [
12
+ {
13
+ gravity: "INFO",
14
+ message: "Info message. CN;COL;PIPPO",
15
+ mode: "TN",
16
+ }
17
+ ],
11
18
  children: [
12
19
  {
13
20
  children: [],
@@ -25,6 +32,23 @@ async function getTree(fun, context) {
25
32
  async function getTable(fun, context) {
26
33
  const table = {
27
34
  type: SmeupDataStructureType.SmeupTable,
35
+ messages: [
36
+ {
37
+ gravity: "INFO",
38
+ message: "Info message. CN;COL;PIPPO",
39
+ mode: "TN",
40
+ },
41
+ {
42
+ gravity: "WARNING",
43
+ message: "Warning message. CN;COL;PLUTO",
44
+ mode: "PM",
45
+ },
46
+ {
47
+ gravity: "ERROR",
48
+ message: "Error message.",
49
+ mode: "PN",
50
+ }
51
+ ],
28
52
  columns: [
29
53
  {
30
54
  code: "COL1",
@@ -3,6 +3,7 @@
3
3
  */
4
4
  export interface SmeupDataStructure {
5
5
  type: SmeupDataStructureType;
6
+ messages: SmeupMessage[];
6
7
  }
7
8
  /**
8
9
  * SmeupDataStructure types
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sme.up/kokos-sdk-node",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "description": "Kokos SDK Node.js",
5
5
  "author": "Smeup LAB <info@smeup.com> (https://www.smeup.com/)",
6
6
  "type": "module",