@code0-tech/tucana 0.0.62 → 0.0.65

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 (119) hide show
  1. package/dist/aquila.cjs.js +1 -0
  2. package/dist/aquila.d.ts +2 -0
  3. package/dist/aquila.es.js +858 -0
  4. package/dist/helpers/helpers.d.ts +1 -0
  5. package/{helpers → dist/helpers}/shared.struct_helper.d.ts +2 -2
  6. package/dist/helpers.cjs.js +1 -0
  7. package/dist/helpers.d.ts +2 -0
  8. package/dist/helpers.es.js +61 -0
  9. package/{pb → dist/pb}/_generated/aquila.action_pb.client.d.ts +7 -12
  10. package/{pb → dist/pb}/_generated/aquila.action_pb.d.ts +5 -14
  11. package/{pb → dist/pb}/_generated/aquila.data_type_pb.client.d.ts +7 -12
  12. package/{pb → dist/pb}/_generated/aquila.data_type_pb.d.ts +4 -11
  13. package/{pb → dist/pb}/_generated/aquila.flow_type_pb.client.d.ts +7 -12
  14. package/{pb → dist/pb}/_generated/aquila.flow_type_pb.d.ts +4 -11
  15. package/{pb → dist/pb}/_generated/aquila.runtime_function_pb.client.d.ts +7 -12
  16. package/{pb → dist/pb}/_generated/aquila.runtime_function_pb.d.ts +4 -11
  17. package/{pb → dist/pb}/_generated/aquila.runtime_status_pb.client.d.ts +7 -12
  18. package/{pb → dist/pb}/_generated/aquila.runtime_status_pb.d.ts +4 -12
  19. package/{pb → dist/pb}/_generated/aquila.runtime_usage_pb.client.d.ts +7 -12
  20. package/{pb → dist/pb}/_generated/aquila.runtime_usage_pb.d.ts +4 -11
  21. package/{pb → dist/pb}/_generated/sagittarius.action_configuration_pb.client.d.ts +7 -12
  22. package/{pb → dist/pb}/_generated/sagittarius.action_configuration_pb.d.ts +4 -11
  23. package/{pb → dist/pb}/_generated/sagittarius.data_type_pb.client.d.ts +7 -12
  24. package/{pb → dist/pb}/_generated/sagittarius.data_type_pb.d.ts +4 -11
  25. package/{pb → dist/pb}/_generated/sagittarius.flow_pb.client.d.ts +7 -12
  26. package/{pb → dist/pb}/_generated/sagittarius.flow_pb.d.ts +5 -13
  27. package/{pb → dist/pb}/_generated/sagittarius.flow_type_pb.client.d.ts +7 -12
  28. package/{pb → dist/pb}/_generated/sagittarius.flow_type_pb.d.ts +4 -11
  29. package/{pb → dist/pb}/_generated/sagittarius.ping_pb.client.d.ts +7 -11
  30. package/{pb → dist/pb}/_generated/sagittarius.ping_pb.d.ts +3 -10
  31. package/{pb → dist/pb}/_generated/sagittarius.runtime_function_pb.client.d.ts +7 -12
  32. package/{pb → dist/pb}/_generated/sagittarius.runtime_function_pb.d.ts +4 -11
  33. package/{pb → dist/pb}/_generated/sagittarius.runtime_status_pb.client.d.ts +7 -12
  34. package/{pb → dist/pb}/_generated/sagittarius.runtime_status_pb.d.ts +4 -12
  35. package/{pb → dist/pb}/_generated/sagittarius.runtime_usage_pb.client.d.ts +7 -12
  36. package/{pb → dist/pb}/_generated/sagittarius.runtime_usage_pb.d.ts +4 -11
  37. package/dist/pb/_generated/sagittarius.text_execution_pb.client.d.ts +27 -0
  38. package/{pb → dist/pb}/_generated/sagittarius.text_execution_pb.d.ts +4 -11
  39. package/{pb → dist/pb}/_generated/shared.action_configuration_pb.d.ts +3 -11
  40. package/{pb → dist/pb}/_generated/shared.data_type_pb.d.ts +2 -10
  41. package/{pb → dist/pb}/_generated/shared.flow_definition_pb.d.ts +35 -47
  42. package/{pb → dist/pb}/_generated/shared.flow_pb.d.ts +12 -24
  43. package/{pb → dist/pb}/_generated/shared.runtime_function_pb.d.ts +3 -11
  44. package/{pb → dist/pb}/_generated/shared.runtime_status_pb.d.ts +52 -32
  45. package/{pb → dist/pb}/_generated/shared.runtime_usage_pb.d.ts +1 -9
  46. package/{pb → dist/pb}/_generated/shared.struct_pb.d.ts +62 -55
  47. package/{pb → dist/pb}/_generated/shared.translation_pb.d.ts +1 -9
  48. package/dist/pb/aquila.d.ts +12 -0
  49. package/dist/pb/sagittarius.d.ts +18 -0
  50. package/dist/pb/shared.d.ts +9 -0
  51. package/dist/rpc-interceptor-DARwxsWH.cjs +1 -0
  52. package/dist/rpc-interceptor-Dzh_AxUX.js +52 -0
  53. package/dist/sagittarius.cjs.js +1 -0
  54. package/dist/sagittarius.d.ts +2 -0
  55. package/dist/sagittarius.es.js +1212 -0
  56. package/dist/shared.cjs.js +1 -0
  57. package/dist/shared.d.ts +2 -0
  58. package/dist/shared.es.js +3 -0
  59. package/dist/shared.flow_pb-BBS51Wou.cjs +1 -0
  60. package/dist/shared.flow_pb-Bt00q6yT.js +717 -0
  61. package/dist/shared.runtime_usage_pb-Cgr2Xle6.cjs +2 -0
  62. package/dist/shared.runtime_usage_pb-QD7fpRLv.js +3069 -0
  63. package/package.json +24 -22
  64. package/helpers/helpers.d.ts +0 -1
  65. package/helpers/helpers.js +0 -1
  66. package/helpers/helpers.ts +0 -1
  67. package/helpers/shared.struct_helper.js +0 -59
  68. package/helpers/shared.struct_helper.ts +0 -70
  69. package/index.js +0 -0
  70. package/pb/_generated/.gitkeep +0 -0
  71. package/pb/_generated/aquila.action_pb.client.js +0 -25
  72. package/pb/_generated/aquila.action_pb.js +0 -468
  73. package/pb/_generated/aquila.data_type_pb.client.js +0 -23
  74. package/pb/_generated/aquila.data_type_pb.js +0 -112
  75. package/pb/_generated/aquila.flow_type_pb.client.js +0 -25
  76. package/pb/_generated/aquila.flow_type_pb.js +0 -112
  77. package/pb/_generated/aquila.runtime_function_pb.client.js +0 -25
  78. package/pb/_generated/aquila.runtime_function_pb.js +0 -112
  79. package/pb/_generated/aquila.runtime_status_pb.client.js +0 -23
  80. package/pb/_generated/aquila.runtime_status_pb.js +0 -126
  81. package/pb/_generated/aquila.runtime_usage_pb.client.js +0 -23
  82. package/pb/_generated/aquila.runtime_usage_pb.js +0 -112
  83. package/pb/_generated/sagittarius.action_configuration_pb.client.js +0 -23
  84. package/pb/_generated/sagittarius.action_configuration_pb.js +0 -120
  85. package/pb/_generated/sagittarius.data_type_pb.client.js +0 -23
  86. package/pb/_generated/sagittarius.data_type_pb.js +0 -112
  87. package/pb/_generated/sagittarius.flow_pb.client.js +0 -23
  88. package/pb/_generated/sagittarius.flow_pb.js +0 -138
  89. package/pb/_generated/sagittarius.flow_type_pb.client.js +0 -25
  90. package/pb/_generated/sagittarius.flow_type_pb.js +0 -112
  91. package/pb/_generated/sagittarius.ping_pb.client.js +0 -23
  92. package/pb/_generated/sagittarius.ping_pb.js +0 -64
  93. package/pb/_generated/sagittarius.runtime_function_pb.client.js +0 -25
  94. package/pb/_generated/sagittarius.runtime_function_pb.js +0 -112
  95. package/pb/_generated/sagittarius.runtime_status_pb.client.js +0 -23
  96. package/pb/_generated/sagittarius.runtime_status_pb.js +0 -126
  97. package/pb/_generated/sagittarius.runtime_usage_pb.client.js +0 -23
  98. package/pb/_generated/sagittarius.runtime_usage_pb.js +0 -112
  99. package/pb/_generated/sagittarius.text_execution_pb.client.d.ts +0 -32
  100. package/pb/_generated/sagittarius.text_execution_pb.client.js +0 -23
  101. package/pb/_generated/sagittarius.text_execution_pb.js +0 -568
  102. package/pb/_generated/shared.action_configuration_pb.js +0 -251
  103. package/pb/_generated/shared.data_type_pb.js +0 -411
  104. package/pb/_generated/shared.flow_definition_pb.js +0 -269
  105. package/pb/_generated/shared.flow_pb.js +0 -762
  106. package/pb/_generated/shared.runtime_function_pb.js +0 -238
  107. package/pb/_generated/shared.runtime_status_pb.js +0 -315
  108. package/pb/_generated/shared.runtime_usage_pb.js +0 -62
  109. package/pb/_generated/shared.struct_pb.js +0 -274
  110. package/pb/_generated/shared.translation_pb.js +0 -62
  111. package/pb/aquila.d.ts +0 -24
  112. package/pb/aquila.js +0 -24
  113. package/pb/aquila.ts +0 -24
  114. package/pb/sagittarius.d.ts +0 -36
  115. package/pb/sagittarius.js +0 -36
  116. package/pb/sagittarius.ts +0 -36
  117. package/pb/shared.d.ts +0 -18
  118. package/pb/shared.js +0 -18
  119. package/pb/shared.ts +0 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code0-tech/tucana",
3
- "version": "0.0.62",
3
+ "version": "0.0.65",
4
4
  "description": "Code0 GRPC Protocol",
5
5
  "homepage": "https://github.com/code0-tech/tucana#readme",
6
6
  "bugs": {
@@ -13,47 +13,49 @@
13
13
  "license": "Apache-2.0",
14
14
  "author": "",
15
15
  "type": "module",
16
- "main": "index.js",
17
16
  "scripts": {
18
- "build": "tsc -p tsconfig.json",
19
- "generate:aquila": "protoc --ts_opt=add_pb_suffix --ts_opt=output_javascript --ts_opt=generate_dependencies --ts_out=pb/_generated --proto_path=../../proto/aquila --proto_path=../../proto/shared ../../proto/aquila/*.proto",
20
- "generate:sagittarius": "protoc --ts_opt=add_pb_suffix --ts_opt=output_javascript --ts_opt=generate_dependencies --ts_out=pb/_generated --proto_path=../../proto/sagittarius --proto_path=../../proto/shared ../../proto/sagittarius/*.proto",
21
- "generate:shared": "protoc --ts_opt=add_pb_suffix --ts_opt=output_javascript --ts_opt=generate_dependencies --ts_out=pb/_generated --proto_path=../../proto/shared ../../proto/shared/*.proto",
22
- "generate": "npm run clean && npm run generate:shared && npm run generate:sagittarius && npm run generate:aquila && npm run generate:exports && npm run generate:replace-enums",
17
+ "build": "vite build",
18
+ "generate:aquila": "protoc --ts_opt=add_pb_suffix --ts_opt=generate_dependencies --ts_out=pb/_generated --proto_path=../../proto/aquila --proto_path=../../proto/shared ../../proto/aquila/*.proto",
19
+ "generate:sagittarius": "protoc --ts_opt=add_pb_suffix --ts_opt=generate_dependencies --ts_out=pb/_generated --proto_path=../../proto/sagittarius --proto_path=../../proto/shared ../../proto/sagittarius/*.proto",
20
+ "generate:shared": "protoc --ts_opt=add_pb_suffix --ts_opt=generate_dependencies --ts_out=pb/_generated --proto_path=../../proto/shared ../../proto/shared/*.proto",
21
+ "generate": "npm run clean && npm run generate:shared && npm run generate:sagittarius && npm run generate:aquila && npm run generate:exports",
23
22
  "generate:exports": "node scripts/generateExports.mjs",
24
- "generate:replace-enums": "npx ts-node scripts/replace-enums.ts",
25
23
  "clean": "rm -rf pb/_generated/*.js && rm -rf pb/_generated/*.ts && rm -rf helpers/*.js"
26
24
  },
27
25
  "devDependencies": {
26
+ "vite": "^8.0.3",
27
+ "vite-plugin-dts": "^4.5.4",
28
28
  "@protobuf-ts/plugin": "^2.11.1",
29
29
  "protoc": "^34.0.0",
30
30
  "ts-morph": "^27.0.2",
31
31
  "ts-node": "^10.9.2"
32
32
  },
33
33
  "files": [
34
- "pb",
35
- "helpers",
36
- "index.ts",
37
- "index.js",
38
- "index.d.ts",
39
- "package.json"
34
+ "dist"
40
35
  ],
41
- "types": "index.d.ts",
36
+ "main": "./dist/tucana.cjs.js",
37
+ "module": "./dist/tucana.es.js",
38
+ "types": "./dist/tucana.d.ts",
42
39
  "exports": {
43
- ".": {
44
- "import": "./index.js"
45
- },
46
40
  "./shared": {
47
- "import": "./pb/shared.js"
41
+ "types": "./dist/shared.d.ts",
42
+ "import": "./dist/shared.es.js",
43
+ "require": "./dist/shared.cjs.js"
48
44
  },
49
45
  "./aquila": {
50
- "import": "./pb/aquila.js"
46
+ "types": "./dist/aquila.d.ts",
47
+ "import": "./dist/aquila.es.js",
48
+ "require": "./dist/aquila.cjs.js"
51
49
  },
52
50
  "./sagittarius": {
53
- "import": "./pb/sagittarius.js"
51
+ "types": "./dist/sagittarius.d.ts",
52
+ "import": "./dist/sagittarius.es.js",
53
+ "require": "./dist/sagittarius.cjs.js"
54
54
  },
55
55
  "./helpers": {
56
- "import": "./helpers/helpers.js"
56
+ "types": "./dist/helpers.d.ts",
57
+ "import": "./dist/helpers.es.js",
58
+ "require": "./dist/helpers.cjs.js"
57
59
  }
58
60
  },
59
61
  "publishConfig": {
@@ -1 +0,0 @@
1
- export * from "./shared.struct_helper.js";
@@ -1 +0,0 @@
1
- export * from "./shared.struct_helper.js";
@@ -1 +0,0 @@
1
- export * from "./shared.struct_helper.js";
@@ -1,59 +0,0 @@
1
- function toAllowedValue(value) {
2
- switch (value.kind.oneofKind) {
3
- case "nullValue":
4
- return null;
5
- case "numberValue":
6
- return value.kind.numberValue;
7
- case "stringValue":
8
- return value.kind.stringValue;
9
- case "boolValue":
10
- return value.kind.boolValue;
11
- case "listValue":
12
- return value.kind.listValue.values.map(toAllowedValue);
13
- case "structValue":
14
- const obj = {};
15
- for (const [k, v] of Object.entries(value.kind.structValue.fields)) {
16
- obj[k] = toAllowedValue(v);
17
- }
18
- return obj;
19
- default:
20
- throw new Error(`Unsupported Value kind: ${value.kind.oneofKind}`);
21
- }
22
- }
23
- function constructValue(value) {
24
- if (value === null) {
25
- return { kind: { oneofKind: "nullValue", nullValue: 0 } };
26
- }
27
- if (typeof value === "number") {
28
- return { kind: { oneofKind: "numberValue", numberValue: value } };
29
- }
30
- if (typeof value === "string") {
31
- return { kind: { oneofKind: "stringValue", stringValue: value } };
32
- }
33
- if (typeof value === "boolean") {
34
- return { kind: { oneofKind: "boolValue", boolValue: value } };
35
- }
36
- if (Array.isArray(value)) {
37
- const listValues = value.map(v => constructValue(v));
38
- return {
39
- kind: {
40
- oneofKind: "listValue",
41
- listValue: { values: listValues }
42
- }
43
- };
44
- }
45
- if (typeof value === "object") {
46
- const structFields = {};
47
- for (const [k, v] of Object.entries(value)) {
48
- structFields[k] = constructValue(v);
49
- }
50
- return {
51
- kind: {
52
- oneofKind: "structValue",
53
- structValue: { fields: structFields }
54
- }
55
- };
56
- }
57
- throw new Error(`Unsupported value type: ${typeof value}`);
58
- }
59
- export { toAllowedValue, constructValue };
@@ -1,70 +0,0 @@
1
- import {Value} from "../pb/shared";
2
-
3
- type PlainValue = null | number | string | boolean | Array<PlainValue> | object;
4
-
5
- function toAllowedValue(value: Value): PlainValue {
6
- switch (value.kind.oneofKind) {
7
- case "nullValue":
8
- return null;
9
- case "numberValue":
10
- return value.kind.numberValue;
11
- case "stringValue":
12
- return value.kind.stringValue;
13
- case "boolValue":
14
- return value.kind.boolValue;
15
- case "listValue":
16
- return value.kind.listValue.values.map(toAllowedValue);
17
- case "structValue":
18
- const obj: { [key: string]: PlainValue } = {};
19
- for (const [k, v] of Object.entries(value.kind.structValue.fields)) {
20
- obj[k] = toAllowedValue(v);
21
- }
22
- return obj;
23
- default:
24
- throw new Error(`Unsupported Value kind: ${value.kind.oneofKind}`);
25
- }
26
- }
27
-
28
-
29
- function constructValue(value: PlainValue): Value {
30
- if (value === null) {
31
- return {kind: {oneofKind: "nullValue", nullValue: 0}};
32
- }
33
- if (typeof value === "number") {
34
- return {kind: {oneofKind: "numberValue", numberValue: value}};
35
- }
36
- if (typeof value === "string") {
37
- return {kind: {oneofKind: "stringValue", stringValue: value}};
38
- }
39
- if (typeof value === "boolean") {
40
- return {kind: {oneofKind: "boolValue", boolValue: value}};
41
- }
42
- if (Array.isArray(value)) {
43
- const listValues = value.map(v => constructValue(v));
44
- return {
45
- kind: {
46
- oneofKind: "listValue",
47
- listValue: {values: listValues}
48
- }
49
- };
50
- }
51
- if (typeof value === "object") {
52
- const structFields: { [key: string]: Value } = {};
53
- for (const [k, v] of Object.entries(value)) {
54
- structFields[k] = constructValue(v);
55
- }
56
- return {
57
- kind: {
58
- oneofKind: "structValue",
59
- structValue: {fields: structFields}
60
- }
61
- };
62
- }
63
- throw new Error(`Unsupported value type: ${typeof value}`);
64
- }
65
-
66
- export {
67
- toAllowedValue,
68
- constructValue,
69
- PlainValue
70
- }
package/index.js DELETED
File without changes
File without changes
@@ -1,25 +0,0 @@
1
- // @generated by protobuf-ts 2.11.1 with parameter add_pb_suffix,output_javascript,generate_dependencies
2
- // @generated from protobuf file "aquila.action.proto" (package "aquila", syntax proto3)
3
- // tslint:disable
4
- import { ActionTransferService } from "./aquila.action_pb";
5
- import { stackIntercept } from "@protobuf-ts/runtime-rpc";
6
- /**
7
- * @generated from protobuf service aquila.ActionTransferService
8
- */
9
- export class ActionTransferServiceClient {
10
- constructor(_transport) {
11
- this._transport = _transport;
12
- this.typeName = ActionTransferService.typeName;
13
- this.methods = ActionTransferService.methods;
14
- this.options = ActionTransferService.options;
15
- }
16
- /**
17
- * This behavior achieves a bi-directional stream so that both services aren't required to be a server & client on their own
18
- *
19
- * @generated from protobuf rpc: Transfer
20
- */
21
- transfer(options) {
22
- const method = this.methods[0], opt = this._transport.mergeOptions(options);
23
- return stackIntercept("duplex", this._transport, method, opt);
24
- }
25
- }