javonet-nodejs-sdk 2.6.7 → 2.6.9
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/core/handler/CreateClassInstanceHandler.cjs +35 -1
- package/dist/core/handler/Handler.cjs +28 -9
- package/dist/core/handler/LoadLibraryHandler.cjs +15 -9
- package/dist/core/handler/PassDelegateHandler.cjs +2 -2
- package/dist/core/interpreter/Interpreter.cjs +11 -33
- package/dist/core/protocol/CommandSerializer.cjs +3 -8
- package/dist/core/receiver/Receiver.cjs +6 -6
- package/dist/sdk/Activator.cjs +44 -0
- package/dist/sdk/ActivatorDetails.cjs +13 -3
- package/dist/sdk/ConfigRuntimeFactory.cjs +9 -0
- package/dist/sdk/InvocationContext.cjs +112 -66
- package/dist/sdk/Javonet.cjs +3 -0
- package/dist/sdk/RuntimeContext.cjs +8 -8
- package/dist/sdk/configuration/ConfigSourceResolver.cjs +43 -21
- package/dist/sdk/tools/ComplexTypeResolver.cjs +84 -34
- package/dist/types/core/handler/CreateClassInstanceHandler.d.ts +8 -0
- package/dist/types/core/handler/Handler.d.ts +2 -1
- package/dist/types/core/handler/PassDelegateHandler.d.ts +2 -2
- package/dist/types/core/interpreter/Interpreter.d.ts +2 -2
- package/dist/types/core/protocol/CommandSerializer.d.ts +3 -3
- package/dist/types/core/receiver/Receiver.d.ts +4 -4
- package/dist/types/sdk/Activator.d.ts +12 -0
- package/dist/types/sdk/ActivatorDetails.d.ts +5 -3
- package/dist/types/sdk/ConfigRuntimeFactory.d.ts +7 -0
- package/dist/types/sdk/InvocationContext.d.ts +19 -17
- package/dist/types/sdk/Javonet.d.ts +2 -1
- package/dist/types/sdk/RuntimeContext.d.ts +4 -3
- package/dist/types/sdk/configuration/ConfigSourceResolver.d.ts +21 -4
- package/dist/types/sdk/tools/ComplexTypeResolver.d.ts +21 -5
- package/dist/types/utils/CommandType.d.ts +1 -0
- package/dist/types/utils/Primitives.d.ts +5 -0
- package/dist/utils/CommandType.cjs +2 -1
- package/dist/utils/Primitives.cjs +201 -0
- package/lib/core/handler/CreateClassInstanceHandler.js +46 -1
- package/lib/core/handler/Handler.js +34 -9
- package/lib/core/handler/LoadLibraryHandler.js +28 -14
- package/lib/core/handler/PassDelegateHandler.js +2 -2
- package/lib/core/interpreter/Interpreter.js +11 -35
- package/lib/core/protocol/CommandSerializer.js +5 -10
- package/lib/core/receiver/Receiver.js +6 -6
- package/lib/sdk/Activator.js +22 -0
- package/lib/sdk/ActivatorDetails.js +18 -3
- package/lib/sdk/ConfigRuntimeFactory.js +10 -0
- package/lib/sdk/InvocationContext.js +133 -74
- package/lib/sdk/Javonet.js +2 -0
- package/lib/sdk/RuntimeContext.js +8 -8
- package/lib/sdk/configuration/ConfigSourceResolver.js +47 -14
- package/lib/sdk/tools/ComplexTypeResolver.js +104 -42
- package/lib/utils/CommandType.js +1 -0
- package/lib/utils/Primitives.js +193 -0
- package/package.json +4 -3
|
@@ -144,11 +144,12 @@ class RuntimeContext {
|
|
|
144
144
|
* Each invocation triggers the creation of a new RuntimeContext instance wrapping the current command with a new parent command.
|
|
145
145
|
* The developer can decide at any moment of the materialization for the context, taking full control of the chunks of the expression being transferred and processed on the target runtime.
|
|
146
146
|
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/foundations/execute-method)
|
|
147
|
+
* @returns {Promise<void>}
|
|
147
148
|
* @method
|
|
148
149
|
*/
|
|
149
|
-
execute() {
|
|
150
|
+
async execute() {
|
|
150
151
|
// @ts-expect-error
|
|
151
|
-
this.#responseCommand = this.#interpreter?.execute(this.#currentCommand, this.connectionData)
|
|
152
|
+
this.#responseCommand = await this.#interpreter?.execute(this.#currentCommand, this.connectionData)
|
|
152
153
|
this.#currentCommand = null
|
|
153
154
|
if (this.#responseCommand === undefined) {
|
|
154
155
|
throw new Error('responseCommand is undefined in Runtime Context execute method')
|
|
@@ -164,14 +165,14 @@ class RuntimeContext {
|
|
|
164
165
|
* The argument is a relative or full path to the library. If the library has dependencies on other libraries, the latter needs to be added first.
|
|
165
166
|
* After referencing the library, any objects stored in this package can be used. Use static classes, create instances, call methods, use fields and properties, and much more.
|
|
166
167
|
* @param {string} libraryPath - The relative or full path to the library.
|
|
167
|
-
* @returns {RuntimeContext} RuntimeContext instance.
|
|
168
|
+
* @returns {Promise<RuntimeContext>} RuntimeContext instance.
|
|
168
169
|
* @see [Javonet Guides](https://www.javonet.com/guides/v2/javascript/getting-started/adding-references-to-libraries)
|
|
169
170
|
* @method
|
|
170
171
|
*/
|
|
171
|
-
loadLibrary(libraryPath) {
|
|
172
|
+
async loadLibrary(libraryPath) {
|
|
172
173
|
let localCommand = new Command(this.runtimeName, CommandType.LoadLibrary, [libraryPath])
|
|
173
174
|
this.#currentCommand = this.#buildCommand(localCommand)
|
|
174
|
-
this.execute()
|
|
175
|
+
await this.execute()
|
|
175
176
|
return this
|
|
176
177
|
}
|
|
177
178
|
|
|
@@ -316,9 +317,8 @@ class RuntimeContext {
|
|
|
316
317
|
for (let i = 0; i < newArray.length; i++) {
|
|
317
318
|
newArray[i] = 'object'
|
|
318
319
|
}
|
|
319
|
-
const args = [delegatesCacheInstance.addDelegate(payloadItem), RuntimeName.Nodejs]
|
|
320
|
-
|
|
321
|
-
)
|
|
320
|
+
const args = [delegatesCacheInstance.addDelegate(payloadItem), RuntimeName.Nodejs]
|
|
321
|
+
args.push(...newArray)
|
|
322
322
|
return new Command(this.runtimeName, CommandType.PassDelegate, args)
|
|
323
323
|
} else if (TypesHandler.isPrimitiveOrNullOrUndefined(payloadItem)) {
|
|
324
324
|
return new Command(this.runtimeName, CommandType.Value, [payloadItem])
|
|
@@ -1,20 +1,36 @@
|
|
|
1
|
-
//
|
|
2
|
-
// lib/sdk/configuration/ConfigSourceResolver.js
|
|
3
|
-
import fs from 'fs'
|
|
4
|
-
import process from 'process'
|
|
1
|
+
// @ts-check
|
|
5
2
|
|
|
6
3
|
import { ConfigsDictionary } from './ConfigsDictionary.js'
|
|
7
4
|
import { JsonConfigResolver } from './configResolvers/JsonConfigResolver.js'
|
|
8
5
|
import { YamlConfigResolver } from './configResolvers/YamlConfigResolver.js'
|
|
9
6
|
import { ConnectionStringConfigResolver } from './configResolvers/ConnectionStringConfigResolver.js'
|
|
7
|
+
import { getRequire, isNodejsRuntime } from '../../utils/Runtime.js'
|
|
10
8
|
|
|
9
|
+
/** @type {typeof import('fs') | null} */
|
|
10
|
+
let fs = null
|
|
11
|
+
/** @type {typeof import('process') | null} */
|
|
12
|
+
let process = null
|
|
13
|
+
|
|
14
|
+
const requireDynamic = getRequire(import.meta.url)
|
|
11
15
|
class ConfigSourceResolver {
|
|
16
|
+
/**
|
|
17
|
+
* @param {import('./ConfigPriority.js').ConfigPriority} priority
|
|
18
|
+
* @param {string | any} configSource
|
|
19
|
+
*/
|
|
12
20
|
static addConfigs(priority, configSource) {
|
|
13
21
|
console.log(`Adding config from source: ${configSource} with priority '${priority}'`)
|
|
14
|
-
|
|
15
|
-
|
|
22
|
+
if (configSource && typeof configSource === 'object') {
|
|
23
|
+
JsonConfigResolver.addConfigs(priority, configSource)
|
|
24
|
+
} else {
|
|
25
|
+
const configString = ConfigSourceResolver._getConfigSourceAsString(configSource)
|
|
26
|
+
ConfigSourceResolver._parseConfigsAndAddToCollection(priority, configString)
|
|
27
|
+
}
|
|
16
28
|
}
|
|
17
29
|
|
|
30
|
+
/**
|
|
31
|
+
* @param {string} configName
|
|
32
|
+
* @returns {*}
|
|
33
|
+
*/
|
|
18
34
|
static getConfig(configName) {
|
|
19
35
|
console.log(`Retrieving config ${configName}`)
|
|
20
36
|
return ConfigsDictionary.getConfig(configName)
|
|
@@ -24,23 +40,39 @@ class ConfigSourceResolver {
|
|
|
24
40
|
ConfigsDictionary.clearConfigs()
|
|
25
41
|
}
|
|
26
42
|
|
|
43
|
+
/**
|
|
44
|
+
* @param {string} configSource
|
|
45
|
+
* @returns {string}
|
|
46
|
+
*/
|
|
27
47
|
static _getConfigSourceAsString(configSource) {
|
|
28
48
|
if (!configSource || configSource.trim() === '') {
|
|
29
49
|
throw new Error('Config source cannot be null or whitespace.')
|
|
30
50
|
}
|
|
31
51
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
52
|
+
if (isNodejsRuntime()) {
|
|
53
|
+
if (!process) {
|
|
54
|
+
process = requireDynamic('process')
|
|
55
|
+
}
|
|
56
|
+
if (!fs) {
|
|
57
|
+
fs = requireDynamic('fs')
|
|
58
|
+
}
|
|
36
59
|
|
|
37
|
-
|
|
38
|
-
|
|
60
|
+
const envValue = process?.env[configSource]
|
|
61
|
+
if (envValue && envValue.trim() !== '') {
|
|
62
|
+
configSource = envValue
|
|
63
|
+
}
|
|
64
|
+
if (fs?.existsSync(configSource) && fs?.statSync(configSource).isFile()) {
|
|
65
|
+
configSource = fs.readFileSync(configSource, { encoding: 'utf-8' })
|
|
66
|
+
}
|
|
39
67
|
}
|
|
40
|
-
|
|
41
68
|
return configSource.trim()
|
|
42
69
|
}
|
|
43
70
|
|
|
71
|
+
/**
|
|
72
|
+
* @param {import('./ConfigPriority.js').ConfigPriority} priority
|
|
73
|
+
* @param {string} configString
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
44
76
|
static _parseConfigsAndAddToCollection(priority, configString) {
|
|
45
77
|
// JSON
|
|
46
78
|
try {
|
|
@@ -60,7 +92,8 @@ class ConfigSourceResolver {
|
|
|
60
92
|
YamlConfigResolver.addConfigs(priority, configString)
|
|
61
93
|
return
|
|
62
94
|
} catch (ex) {
|
|
63
|
-
|
|
95
|
+
// @ts-expect-error
|
|
96
|
+
if (ex?.name === 'SyntaxError') {
|
|
64
97
|
// not YAML
|
|
65
98
|
} else {
|
|
66
99
|
console.log('Failed to parse config source as YAML: ' + ex)
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
//@ts-check
|
|
2
|
+
import { PrimitiveSet } from '../../utils/Primitives.js'
|
|
2
3
|
import { getRequire } from '../../utils/Runtime.js'
|
|
3
4
|
import { RuntimeName } from '../../utils/RuntimeName.js'
|
|
5
|
+
import { Activator } from '../Activator.js'
|
|
4
6
|
import { ActivatorDetails } from '../ActivatorDetails.js'
|
|
5
7
|
import { InvocationContext } from '../InvocationContext.js'
|
|
6
8
|
import { JavaTypeParsingFunctions } from './typeParsingFunctions/JavaTypeParsingFunctions.js'
|
|
@@ -14,19 +16,23 @@ const dynamicImport = getRequire(import.meta.url)
|
|
|
14
16
|
* @typedef {import('../../types.d.ts').RuntimeName} RuntimeName
|
|
15
17
|
*/
|
|
16
18
|
|
|
19
|
+
/** @type {Map<number, Map<string, Function>>} */
|
|
20
|
+
const typeParsingFunctions = new Map([
|
|
21
|
+
[RuntimeName.Netcore, NetcoreTypeParsingFunctions],
|
|
22
|
+
[RuntimeName.Jvm, JavaTypeParsingFunctions],
|
|
23
|
+
[RuntimeName.Nodejs, NodejsTypeParsingFunctions],
|
|
24
|
+
[RuntimeName.Python, PythonTypeParsingFunctions],
|
|
25
|
+
[RuntimeName.Python27, PythonTypeParsingFunctions],
|
|
26
|
+
])
|
|
27
|
+
|
|
17
28
|
class ComplexTypeResolver {
|
|
18
29
|
/** @type {Map<string, ActivatorDetails>} */
|
|
19
|
-
#typeMap
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
[RuntimeName.Nodejs, NodejsTypeParsingFunctions],
|
|
26
|
-
[RuntimeName.Python, PythonTypeParsingFunctions],
|
|
27
|
-
[RuntimeName.Python27, PythonTypeParsingFunctions],
|
|
28
|
-
])
|
|
29
|
-
|
|
30
|
+
#typeMap
|
|
31
|
+
|
|
32
|
+
constructor() {
|
|
33
|
+
this.#typeMap = new Map()
|
|
34
|
+
}
|
|
35
|
+
|
|
30
36
|
/**
|
|
31
37
|
* Register a custom type mapping
|
|
32
38
|
* @param {string} resultType - The type name from the target runtime
|
|
@@ -42,46 +48,47 @@ class ComplexTypeResolver {
|
|
|
42
48
|
/**
|
|
43
49
|
* Convert InvocationContext result to appropriate JavaScript type
|
|
44
50
|
* @param {InvocationContext} ic - The invocation context
|
|
45
|
-
* @returns {Promise<any>
|
|
51
|
+
* @returns {Promise<any>} The converted result
|
|
46
52
|
*/
|
|
47
|
-
convertResult(ic) {
|
|
53
|
+
async convertResult(ic) {
|
|
48
54
|
const runtimeName = ic.getRuntimeName()
|
|
49
|
-
const resultType = ic.getResultType()
|
|
50
|
-
|
|
51
|
-
// Try built-in type parsing functions first
|
|
52
|
-
const runtimeDict = this.#typeParsingFunctions.get(runtimeName)
|
|
53
|
-
if (runtimeDict) {
|
|
54
|
-
let parsingFunc = null;
|
|
55
|
-
if (resultType instanceof Promise) {
|
|
56
|
-
parsingFunc = resultType.then(result => {
|
|
57
|
-
parsingFunc = runtimeDict.get(result);
|
|
58
|
-
})
|
|
59
|
-
} else {
|
|
60
|
-
parsingFunc = runtimeDict.get(resultType);
|
|
61
|
-
}
|
|
55
|
+
const resultType = await ic.getResultType()
|
|
62
56
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
57
|
+
if (!resultType) {
|
|
58
|
+
throw new Error('resultType is not valid')
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
let underlyingType = ComplexTypeResolver.tryGetUnderlyingArrayType(resultType)
|
|
62
|
+
if (underlyingType !== null) {
|
|
63
|
+
const { Type } = /** @type {ActivatorDetails} */ (this.#typeMap.get(underlyingType))
|
|
64
|
+
|
|
65
|
+
const complexTypesArray = await ic.retrieveArray()
|
|
66
|
+
return complexTypesArray.map((item) => Activator.createInstance(Type, item))
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
activatorDetails = resultType.then(result => {
|
|
73
|
-
activatorDetails = this.#typeMap.get(result);
|
|
74
|
-
})
|
|
75
|
-
} else {
|
|
76
|
-
activatorDetails = this.#typeMap.get(resultType);
|
|
69
|
+
const parsingFunction = ComplexTypeResolver.tryGetTypeParsingFunction(runtimeName, resultType)
|
|
70
|
+
if (parsingFunction) {
|
|
71
|
+
return parsingFunction(ic)
|
|
77
72
|
}
|
|
78
73
|
|
|
74
|
+
const activatorDetails = this.tryGetValueFromTypeMap(resultType)
|
|
79
75
|
if (!activatorDetails) {
|
|
80
76
|
throw new Error(`No type registered for key '${resultType}'.`)
|
|
81
77
|
}
|
|
82
|
-
|
|
83
|
-
//
|
|
84
|
-
|
|
78
|
+
|
|
79
|
+
// For nodejs inmemory, getValue() returns the actual JS object
|
|
80
|
+
if (runtimeName === RuntimeName.Nodejs) {
|
|
81
|
+
const value = await ic.getValue()
|
|
82
|
+
if (value) {
|
|
83
|
+
// If it's already an instance of the registered type, return it directly
|
|
84
|
+
if (value instanceof activatorDetails.Type) {
|
|
85
|
+
return value
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Create new instance with stored default arguments
|
|
91
|
+
return Activator.createInstance(activatorDetails.Type, activatorDetails.arguments ?? null)
|
|
85
92
|
}
|
|
86
93
|
|
|
87
94
|
/**
|
|
@@ -116,6 +123,61 @@ class ComplexTypeResolver {
|
|
|
116
123
|
}
|
|
117
124
|
return typeObj
|
|
118
125
|
}
|
|
119
|
-
}
|
|
120
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Attempts to extract the underlying element type from an array type string
|
|
129
|
+
* @param {string} type - The type string to parse (e.g., "MyType[]")
|
|
130
|
+
* @returns {string | null} Object indicating success and the element type
|
|
131
|
+
* @throws {Error} If the array element type is a primitive type
|
|
132
|
+
*/
|
|
133
|
+
static tryGetUnderlyingArrayType(type) {
|
|
134
|
+
// Validate input type
|
|
135
|
+
if (typeof type !== 'string' || !type.includes('[')) {
|
|
136
|
+
return null
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
let trimmedType = type.trim()
|
|
140
|
+
if (!trimmedType) return null
|
|
141
|
+
|
|
142
|
+
// If assembly-qualified, remove everything after the first comma
|
|
143
|
+
const commaIndex = trimmedType.indexOf(',')
|
|
144
|
+
if (commaIndex > 0) {
|
|
145
|
+
trimmedType = trimmedType.substring(0, commaIndex).trim()
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// Find the first '[' — everything before it is the base type
|
|
149
|
+
const bracketIndex = trimmedType.indexOf('[')
|
|
150
|
+
if (bracketIndex > 0) {
|
|
151
|
+
trimmedType = trimmedType.substring(0, bracketIndex).trim()
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
// Check if base type is a primitive (primitives are not supported as array elements)
|
|
155
|
+
if (PrimitiveSet.has(trimmedType)) {
|
|
156
|
+
throw new Error('Primitive array element types are not supported.')
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
return trimmedType
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @param {RuntimeName} runtimeName
|
|
164
|
+
* @param {string} resultType
|
|
165
|
+
* @returns {any}
|
|
166
|
+
*/
|
|
167
|
+
static tryGetTypeParsingFunction(runtimeName, resultType) {
|
|
168
|
+
const runtimeDict = typeParsingFunctions.get(runtimeName)
|
|
169
|
+
return runtimeDict ? (runtimeDict.get(resultType) ?? null) : null
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @param {string} resultType
|
|
174
|
+
* @returns {ActivatorDetails | null}
|
|
175
|
+
*/
|
|
176
|
+
tryGetValueFromTypeMap(resultType) {
|
|
177
|
+
if (!resultType) {
|
|
178
|
+
throw new Error('resultType is not valid')
|
|
179
|
+
}
|
|
180
|
+
return this.#typeMap.get(resultType) ?? null
|
|
181
|
+
}
|
|
182
|
+
}
|
|
121
183
|
export { ComplexTypeResolver }
|
package/lib/utils/CommandType.js
CHANGED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
/**
|
|
3
|
+
* Set of primitive type names that are not supported as array element types
|
|
4
|
+
* @type {Set<string>}
|
|
5
|
+
*/
|
|
6
|
+
export const PrimitiveSet = new Set(
|
|
7
|
+
[
|
|
8
|
+
// --- JavaScript / TypeScript ---
|
|
9
|
+
'string',
|
|
10
|
+
'number',
|
|
11
|
+
'boolean',
|
|
12
|
+
'bigint',
|
|
13
|
+
'symbol',
|
|
14
|
+
'undefined',
|
|
15
|
+
'null',
|
|
16
|
+
|
|
17
|
+
// --- .NET / C# ---
|
|
18
|
+
'bool',
|
|
19
|
+
'boolean',
|
|
20
|
+
'byte',
|
|
21
|
+
'sbyte',
|
|
22
|
+
'char',
|
|
23
|
+
'decimal',
|
|
24
|
+
'double',
|
|
25
|
+
'float',
|
|
26
|
+
'single',
|
|
27
|
+
'int',
|
|
28
|
+
'int32',
|
|
29
|
+
'uint',
|
|
30
|
+
'uint32',
|
|
31
|
+
'long',
|
|
32
|
+
'int64',
|
|
33
|
+
'ulong',
|
|
34
|
+
'uint64',
|
|
35
|
+
'short',
|
|
36
|
+
'int16',
|
|
37
|
+
'ushort',
|
|
38
|
+
'uint16',
|
|
39
|
+
'object',
|
|
40
|
+
'string',
|
|
41
|
+
'system.boolean',
|
|
42
|
+
'system.byte',
|
|
43
|
+
'system.sbyte',
|
|
44
|
+
'system.char',
|
|
45
|
+
'system.decimal',
|
|
46
|
+
'system.double',
|
|
47
|
+
'system.single',
|
|
48
|
+
'system.int',
|
|
49
|
+
'system.int32',
|
|
50
|
+
'system.uint',
|
|
51
|
+
'system.uint32',
|
|
52
|
+
'system.int64',
|
|
53
|
+
'system.uint64',
|
|
54
|
+
'system.int16',
|
|
55
|
+
'system.uint16',
|
|
56
|
+
'system.object',
|
|
57
|
+
'system.string',
|
|
58
|
+
|
|
59
|
+
// --- Java ---
|
|
60
|
+
'byte',
|
|
61
|
+
'short',
|
|
62
|
+
'int',
|
|
63
|
+
'long',
|
|
64
|
+
'float',
|
|
65
|
+
'double',
|
|
66
|
+
'char',
|
|
67
|
+
'boolean',
|
|
68
|
+
'java.lang.string',
|
|
69
|
+
|
|
70
|
+
// --- Python ---
|
|
71
|
+
'str',
|
|
72
|
+
'int',
|
|
73
|
+
'float',
|
|
74
|
+
'bool',
|
|
75
|
+
'bytes',
|
|
76
|
+
'bytearray',
|
|
77
|
+
|
|
78
|
+
// --- Go ---
|
|
79
|
+
'rune',
|
|
80
|
+
'byte',
|
|
81
|
+
'bool',
|
|
82
|
+
'string',
|
|
83
|
+
'int',
|
|
84
|
+
'int8',
|
|
85
|
+
'int16',
|
|
86
|
+
'int32',
|
|
87
|
+
'int64',
|
|
88
|
+
'uint',
|
|
89
|
+
'uint8',
|
|
90
|
+
'uint16',
|
|
91
|
+
'uint32',
|
|
92
|
+
'uint64',
|
|
93
|
+
'float32',
|
|
94
|
+
'float64',
|
|
95
|
+
|
|
96
|
+
// --- C / C++ ---
|
|
97
|
+
'char',
|
|
98
|
+
'short',
|
|
99
|
+
'int',
|
|
100
|
+
'long',
|
|
101
|
+
'float',
|
|
102
|
+
'double',
|
|
103
|
+
'signed char',
|
|
104
|
+
'unsigned char',
|
|
105
|
+
'unsigned short',
|
|
106
|
+
'unsigned int',
|
|
107
|
+
'unsigned long',
|
|
108
|
+
|
|
109
|
+
// --- Rust ---
|
|
110
|
+
'bool',
|
|
111
|
+
'u8',
|
|
112
|
+
'i8',
|
|
113
|
+
'u16',
|
|
114
|
+
'i16',
|
|
115
|
+
'u32',
|
|
116
|
+
'i32',
|
|
117
|
+
'u64',
|
|
118
|
+
'i64',
|
|
119
|
+
'f32',
|
|
120
|
+
'f64',
|
|
121
|
+
'usize',
|
|
122
|
+
'isize',
|
|
123
|
+
'str',
|
|
124
|
+
|
|
125
|
+
// --- Kotlin ---
|
|
126
|
+
'boolean',
|
|
127
|
+
'byte',
|
|
128
|
+
'short',
|
|
129
|
+
'int',
|
|
130
|
+
'long',
|
|
131
|
+
'float',
|
|
132
|
+
'double',
|
|
133
|
+
'char',
|
|
134
|
+
'string',
|
|
135
|
+
|
|
136
|
+
// --- Swift ---
|
|
137
|
+
'bool',
|
|
138
|
+
'int',
|
|
139
|
+
'uint',
|
|
140
|
+
'float',
|
|
141
|
+
'double',
|
|
142
|
+
'string',
|
|
143
|
+
'character',
|
|
144
|
+
|
|
145
|
+
// --- PHP ---
|
|
146
|
+
'int',
|
|
147
|
+
'integer',
|
|
148
|
+
'float',
|
|
149
|
+
'double',
|
|
150
|
+
'string',
|
|
151
|
+
'bool',
|
|
152
|
+
'boolean',
|
|
153
|
+
'mixed',
|
|
154
|
+
|
|
155
|
+
// --- Ruby ---
|
|
156
|
+
'string',
|
|
157
|
+
'integer',
|
|
158
|
+
'fixnum',
|
|
159
|
+
'float',
|
|
160
|
+
'symbol',
|
|
161
|
+
'boolean',
|
|
162
|
+
|
|
163
|
+
// --- Dart ---
|
|
164
|
+
'int',
|
|
165
|
+
'double',
|
|
166
|
+
'num',
|
|
167
|
+
'bool',
|
|
168
|
+
'string',
|
|
169
|
+
|
|
170
|
+
// --- Scala ---
|
|
171
|
+
'int',
|
|
172
|
+
'long',
|
|
173
|
+
'double',
|
|
174
|
+
'float',
|
|
175
|
+
'char',
|
|
176
|
+
'boolean',
|
|
177
|
+
'string',
|
|
178
|
+
|
|
179
|
+
// --- Haskell ---
|
|
180
|
+
'int',
|
|
181
|
+
'float',
|
|
182
|
+
'double',
|
|
183
|
+
'char',
|
|
184
|
+
'bool',
|
|
185
|
+
'integer',
|
|
186
|
+
|
|
187
|
+
// --- Generic aliases ---
|
|
188
|
+
'text',
|
|
189
|
+
'primitive',
|
|
190
|
+
'any',
|
|
191
|
+
'void',
|
|
192
|
+
].map((x) => x.toLowerCase())
|
|
193
|
+
)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "javonet-nodejs-sdk",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.9",
|
|
4
4
|
"description": "Javonet allows you to reference and use modules or packages written in (Java/Kotlin/Groovy/Clojure, C#/VB.NET, Ruby, Perl, Python, JavaScript/TypeScript) like they were created in your technology. It works on Linux/Windows and MacOS for applications created in JVM, CLR/Netcore, Perl, Python, Ruby, NodeJS, C++ or GoLang and gives you unparalleled freedom and flexibility with native performance in building your mixed-technologies products. Let it be accessing best AI or cryptography libraries, devices SDKs, legacy client modules, internal custom packages or anything from public repositories available on NPM, Nuget, PyPI, Maven/Gradle, RubyGems or GitHub. Get free from programming languages barriers today! For more information check out our guides at https://www.javonet.com/guides/v2/",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "SdNCenter Sp. z o. o.",
|
|
@@ -40,12 +40,13 @@
|
|
|
40
40
|
"format": "prettier --write ."
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
+
"@types/uuid": "^10.0.0",
|
|
43
44
|
"@types/ws": "^8.18.1",
|
|
44
45
|
"buffer": "^6.0.3",
|
|
45
46
|
"glob": "^10.4.5",
|
|
46
47
|
"js-yaml": "^4.1.0",
|
|
47
48
|
"uuid": "^10.0.0",
|
|
48
|
-
"ws": "^8.
|
|
49
|
+
"ws": "^8.18.1"
|
|
49
50
|
},
|
|
50
51
|
"devDependencies": {
|
|
51
52
|
"@babel/cli": "^7.25.9",
|
|
@@ -58,7 +59,7 @@
|
|
|
58
59
|
"@types/js-yaml": "^4.0.9",
|
|
59
60
|
"babel-loader": "^9.2.1",
|
|
60
61
|
"cross-env": "^7.0.3",
|
|
61
|
-
"esbuild": "^0.
|
|
62
|
+
"esbuild": "^0.27.0",
|
|
62
63
|
"eslint": "^9.15.0",
|
|
63
64
|
"eslint-config-prettier": "^9.1.0",
|
|
64
65
|
"eslint-plugin-jest": "^28.9.0",
|