@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.
- package/dist/aquila.cjs.js +1 -0
- package/dist/aquila.d.ts +2 -0
- package/dist/aquila.es.js +858 -0
- package/dist/helpers/helpers.d.ts +1 -0
- package/{helpers → dist/helpers}/shared.struct_helper.d.ts +2 -2
- package/dist/helpers.cjs.js +1 -0
- package/dist/helpers.d.ts +2 -0
- package/dist/helpers.es.js +61 -0
- package/{pb → dist/pb}/_generated/aquila.action_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/aquila.action_pb.d.ts +5 -14
- package/{pb → dist/pb}/_generated/aquila.data_type_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/aquila.data_type_pb.d.ts +4 -11
- package/{pb → dist/pb}/_generated/aquila.flow_type_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/aquila.flow_type_pb.d.ts +4 -11
- package/{pb → dist/pb}/_generated/aquila.runtime_function_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/aquila.runtime_function_pb.d.ts +4 -11
- package/{pb → dist/pb}/_generated/aquila.runtime_status_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/aquila.runtime_status_pb.d.ts +4 -12
- package/{pb → dist/pb}/_generated/aquila.runtime_usage_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/aquila.runtime_usage_pb.d.ts +4 -11
- package/{pb → dist/pb}/_generated/sagittarius.action_configuration_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/sagittarius.action_configuration_pb.d.ts +4 -11
- package/{pb → dist/pb}/_generated/sagittarius.data_type_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/sagittarius.data_type_pb.d.ts +4 -11
- package/{pb → dist/pb}/_generated/sagittarius.flow_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/sagittarius.flow_pb.d.ts +5 -13
- package/{pb → dist/pb}/_generated/sagittarius.flow_type_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/sagittarius.flow_type_pb.d.ts +4 -11
- package/{pb → dist/pb}/_generated/sagittarius.ping_pb.client.d.ts +7 -11
- package/{pb → dist/pb}/_generated/sagittarius.ping_pb.d.ts +3 -10
- package/{pb → dist/pb}/_generated/sagittarius.runtime_function_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/sagittarius.runtime_function_pb.d.ts +4 -11
- package/{pb → dist/pb}/_generated/sagittarius.runtime_status_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/sagittarius.runtime_status_pb.d.ts +4 -12
- package/{pb → dist/pb}/_generated/sagittarius.runtime_usage_pb.client.d.ts +7 -12
- package/{pb → dist/pb}/_generated/sagittarius.runtime_usage_pb.d.ts +4 -11
- package/dist/pb/_generated/sagittarius.text_execution_pb.client.d.ts +27 -0
- package/{pb → dist/pb}/_generated/sagittarius.text_execution_pb.d.ts +4 -11
- package/{pb → dist/pb}/_generated/shared.action_configuration_pb.d.ts +3 -11
- package/{pb → dist/pb}/_generated/shared.data_type_pb.d.ts +2 -10
- package/{pb → dist/pb}/_generated/shared.flow_definition_pb.d.ts +35 -47
- package/{pb → dist/pb}/_generated/shared.flow_pb.d.ts +12 -24
- package/{pb → dist/pb}/_generated/shared.runtime_function_pb.d.ts +3 -11
- package/{pb → dist/pb}/_generated/shared.runtime_status_pb.d.ts +52 -32
- package/{pb → dist/pb}/_generated/shared.runtime_usage_pb.d.ts +1 -9
- package/{pb → dist/pb}/_generated/shared.struct_pb.d.ts +62 -55
- package/{pb → dist/pb}/_generated/shared.translation_pb.d.ts +1 -9
- package/dist/pb/aquila.d.ts +12 -0
- package/dist/pb/sagittarius.d.ts +18 -0
- package/dist/pb/shared.d.ts +9 -0
- package/dist/rpc-interceptor-DARwxsWH.cjs +1 -0
- package/dist/rpc-interceptor-Dzh_AxUX.js +52 -0
- package/dist/sagittarius.cjs.js +1 -0
- package/dist/sagittarius.d.ts +2 -0
- package/dist/sagittarius.es.js +1212 -0
- package/dist/shared.cjs.js +1 -0
- package/dist/shared.d.ts +2 -0
- package/dist/shared.es.js +3 -0
- package/dist/shared.flow_pb-BBS51Wou.cjs +1 -0
- package/dist/shared.flow_pb-Bt00q6yT.js +717 -0
- package/dist/shared.runtime_usage_pb-Cgr2Xle6.cjs +2 -0
- package/dist/shared.runtime_usage_pb-QD7fpRLv.js +3069 -0
- package/package.json +24 -22
- package/helpers/helpers.d.ts +0 -1
- package/helpers/helpers.js +0 -1
- package/helpers/helpers.ts +0 -1
- package/helpers/shared.struct_helper.js +0 -59
- package/helpers/shared.struct_helper.ts +0 -70
- package/index.js +0 -0
- package/pb/_generated/.gitkeep +0 -0
- package/pb/_generated/aquila.action_pb.client.js +0 -25
- package/pb/_generated/aquila.action_pb.js +0 -468
- package/pb/_generated/aquila.data_type_pb.client.js +0 -23
- package/pb/_generated/aquila.data_type_pb.js +0 -112
- package/pb/_generated/aquila.flow_type_pb.client.js +0 -25
- package/pb/_generated/aquila.flow_type_pb.js +0 -112
- package/pb/_generated/aquila.runtime_function_pb.client.js +0 -25
- package/pb/_generated/aquila.runtime_function_pb.js +0 -112
- package/pb/_generated/aquila.runtime_status_pb.client.js +0 -23
- package/pb/_generated/aquila.runtime_status_pb.js +0 -126
- package/pb/_generated/aquila.runtime_usage_pb.client.js +0 -23
- package/pb/_generated/aquila.runtime_usage_pb.js +0 -112
- package/pb/_generated/sagittarius.action_configuration_pb.client.js +0 -23
- package/pb/_generated/sagittarius.action_configuration_pb.js +0 -120
- package/pb/_generated/sagittarius.data_type_pb.client.js +0 -23
- package/pb/_generated/sagittarius.data_type_pb.js +0 -112
- package/pb/_generated/sagittarius.flow_pb.client.js +0 -23
- package/pb/_generated/sagittarius.flow_pb.js +0 -138
- package/pb/_generated/sagittarius.flow_type_pb.client.js +0 -25
- package/pb/_generated/sagittarius.flow_type_pb.js +0 -112
- package/pb/_generated/sagittarius.ping_pb.client.js +0 -23
- package/pb/_generated/sagittarius.ping_pb.js +0 -64
- package/pb/_generated/sagittarius.runtime_function_pb.client.js +0 -25
- package/pb/_generated/sagittarius.runtime_function_pb.js +0 -112
- package/pb/_generated/sagittarius.runtime_status_pb.client.js +0 -23
- package/pb/_generated/sagittarius.runtime_status_pb.js +0 -126
- package/pb/_generated/sagittarius.runtime_usage_pb.client.js +0 -23
- package/pb/_generated/sagittarius.runtime_usage_pb.js +0 -112
- package/pb/_generated/sagittarius.text_execution_pb.client.d.ts +0 -32
- package/pb/_generated/sagittarius.text_execution_pb.client.js +0 -23
- package/pb/_generated/sagittarius.text_execution_pb.js +0 -568
- package/pb/_generated/shared.action_configuration_pb.js +0 -251
- package/pb/_generated/shared.data_type_pb.js +0 -411
- package/pb/_generated/shared.flow_definition_pb.js +0 -269
- package/pb/_generated/shared.flow_pb.js +0 -762
- package/pb/_generated/shared.runtime_function_pb.js +0 -238
- package/pb/_generated/shared.runtime_status_pb.js +0 -315
- package/pb/_generated/shared.runtime_usage_pb.js +0 -62
- package/pb/_generated/shared.struct_pb.js +0 -274
- package/pb/_generated/shared.translation_pb.js +0 -62
- package/pb/aquila.d.ts +0 -24
- package/pb/aquila.js +0 -24
- package/pb/aquila.ts +0 -24
- package/pb/sagittarius.d.ts +0 -36
- package/pb/sagittarius.js +0 -36
- package/pb/sagittarius.ts +0 -36
- package/pb/shared.d.ts +0 -18
- package/pb/shared.js +0 -18
- 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.
|
|
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": "
|
|
19
|
-
"generate:aquila": "protoc --ts_opt=add_pb_suffix
|
|
20
|
-
"generate:sagittarius": "protoc --ts_opt=add_pb_suffix --ts_opt=
|
|
21
|
-
"generate:shared": "protoc --ts_opt=add_pb_suffix --ts_opt=
|
|
22
|
-
"generate": "npm run clean && npm run generate:shared && npm run generate:sagittarius && npm run generate:aquila && npm run generate:exports
|
|
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
|
-
"
|
|
35
|
-
"helpers",
|
|
36
|
-
"index.ts",
|
|
37
|
-
"index.js",
|
|
38
|
-
"index.d.ts",
|
|
39
|
-
"package.json"
|
|
34
|
+
"dist"
|
|
40
35
|
],
|
|
41
|
-
"
|
|
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
|
-
"
|
|
41
|
+
"types": "./dist/shared.d.ts",
|
|
42
|
+
"import": "./dist/shared.es.js",
|
|
43
|
+
"require": "./dist/shared.cjs.js"
|
|
48
44
|
},
|
|
49
45
|
"./aquila": {
|
|
50
|
-
"
|
|
46
|
+
"types": "./dist/aquila.d.ts",
|
|
47
|
+
"import": "./dist/aquila.es.js",
|
|
48
|
+
"require": "./dist/aquila.cjs.js"
|
|
51
49
|
},
|
|
52
50
|
"./sagittarius": {
|
|
53
|
-
"
|
|
51
|
+
"types": "./dist/sagittarius.d.ts",
|
|
52
|
+
"import": "./dist/sagittarius.es.js",
|
|
53
|
+
"require": "./dist/sagittarius.cjs.js"
|
|
54
54
|
},
|
|
55
55
|
"./helpers": {
|
|
56
|
-
"
|
|
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": {
|
package/helpers/helpers.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./shared.struct_helper.js";
|
package/helpers/helpers.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./shared.struct_helper.js";
|
package/helpers/helpers.ts
DELETED
|
@@ -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
|
package/pb/_generated/.gitkeep
DELETED
|
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
|
-
}
|