🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@rtinternal/java

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rtinternal/java - npm Package Compare versions

Comparing version
0.14.0-rtinternal-jdk11
to
0.15.0-rtinternal-jdk11
+16
.devcontainer/devcontainer.json
{
"build": {
"dockerfile": "Dockerfile"
},
"runArgs": [],
"customizations": {
"vscode": {
"extensions": [
"streetsidesoftware.code-spell-checker",
"bierner.markdown-emoji",
"smulyono.reveal",
"ms-azuretools.vscode-docker"
]
}
}
}
FROM mcr.microsoft.com/devcontainers/javascript-node:22
RUN apt-get update
RUN apt-get install -y openjdk-17-jdk
+6
-7

@@ -5,3 +5,2 @@ 'use strict';

var _ = require('lodash');
var async = require('async');

@@ -156,3 +155,3 @@ var path = require('path');

// This must be done first in order to ensure the proper API is used.
if (_.isUndefined(callback) && java.asyncOptions && _.isFunction(java.asyncOptions.promisify)) {
if (typeof callback === 'undefined' && java.asyncOptions && typeof java.asyncOptions.promisify === 'function') {
// Create a promisified version of this function.

@@ -165,3 +164,3 @@ var launchJvmPromise = java.asyncOptions.promisify(java.ensureJvm.bind(java));

// If we get here, callback must be a node-style callback function. If not, throw an error.
else if (!_.isFunction(callback)) {
else if (typeof callback !== 'function') {
throw new Error('java.launchJvm(cb) requires its one argument to be a callback function.');

@@ -202,3 +201,3 @@ }

if (_.isString(java.asyncOptions.ifReadOnlySuffix) && java.asyncOptions.ifReadOnlySuffix !== '') {
if (typeof java.asyncOptions.ifReadOnlySuffix === 'string' && java.asyncOptions.ifReadOnlySuffix !== '') {
ifReadOnlySuffix = java.asyncOptions.ifReadOnlySuffix;

@@ -279,3 +278,3 @@ }

if (_.isString(syncSuffix)) {
if (typeof syncSuffix === 'string') {
var syncName = usableName(methodName + syncSuffix);

@@ -285,3 +284,3 @@ result[syncName] = callStaticMethodSync.bind(java, name, methodName);

if (_.isString(asyncSuffix)) {
if (typeof asyncSuffix === 'string') {
var asyncName = usableName(methodName + asyncSuffix);

@@ -291,3 +290,3 @@ result[asyncName] = callStaticMethod.bind(java, name, methodName);

if (promisify && _.isString(promiseSuffix)) {
if (promisify && typeof promiseSuffix === 'string') {
var promiseName = usableName(methodName + promiseSuffix);

@@ -294,0 +293,0 @@ result[promiseName] = promisify(callStaticMethod.bind(java, name, methodName));

@@ -10,3 +10,3 @@ {

],
"version": "0.14.0-rtinternal-jdk11",
"version": "0.15.0-rtinternal-jdk11",
"engines": {

@@ -36,13 +36,12 @@ "node": ">=7.0.0"

"@mapbox/node-pre-gyp": "^1.0.8",
"async": "^3.2.5",
"async": "^3.2.6",
"find-java-home": "^2.0.0",
"glob": "^10.3.10",
"lodash": "^4.17.21",
"nan": "^2.18.0",
"node-gyp": "^10.0.1"
"glob": "^10.4.5",
"nan": "^2.22.2",
"node-gyp": "^10.3.1"
},
"devDependencies": {
"aws-sdk": "^2.1095.0",
"chalk": "2.4.1",
"nodeunit": "0.11.3",
"chalk": "2.4.2",
"nodeunit": "^0.11.3",
"when": "3.7.8"

@@ -55,3 +54,4 @@ },

},
"main": "./index.js"
"main": "./index.js",
"packageManager": "pnpm@9.5.0+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903"
}

@@ -7,3 +7,2 @@ // testAllThreeSuffix.js

var assert = require("assert");
var _ = require('lodash');

@@ -24,6 +23,6 @@ java.asyncOptions = {

test.ok(!_.isUndefined(arrayList.addSync), 'Expected `addSync` to be present, but it is NOT.');
test.ok(!_.isUndefined(arrayList.addAsync), 'Expected `addAsync` to be present, but it is NOT.');
test.ok(!_.isUndefined(arrayList.addPromise), 'Expected `addPromise` to be present, but it is NOT.');
test.ok(_.isUndefined(arrayList.add), 'Expected `add` to NOT be present, but it is.');
test.ok(typeof arrayList.addSync !== 'undefined', 'Expected `addSync` to be present, but it is NOT.');
test.ok(typeof arrayList.addAsync !== 'undefined', 'Expected `addAsync` to be present, but it is NOT.');
test.ok(typeof arrayList.addPromise !== 'undefined', 'Expected `addPromise` to be present, but it is NOT.');
test.ok(typeof arrayList.add === 'undefined', 'Expected `add` to NOT be present, but it is.');
test.done();

@@ -48,8 +47,8 @@ },

var api = _.functions(String);
test.ok(_.includes(api, 'formatSync'), 'Expected `formatSync` to be present, but it is NOT.');
test.ok(_.includes(api, 'formatAsync'), 'Expected `formatAsync` to be present, but it is NOT.');
test.ok(_.includes(api, 'formatPromise'), 'Expected `formatPromise` to be present, but it is NOT.');
test.ok(!_.includes(api, 'format'), 'Expected `format` to NOT be present, but it is.');
test.ok(!_.includes(api, 'formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
var api = Object.keys(String).filter((key) => typeof String[key] === 'function');
test.ok(api.includes('formatSync'), 'Expected `formatSync` to be present, but it is NOT.');
test.ok(api.includes('formatAsync'), 'Expected `formatAsync` to be present, but it is NOT.');
test.ok(api.includes('formatPromise'), 'Expected `formatPromise` to be present, but it is NOT.');
test.ok(!api.includes('format'), 'Expected `format` to NOT be present, but it is.');
test.ok(!api.includes('formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
test.done();

@@ -56,0 +55,0 @@ },

@@ -7,3 +7,2 @@ // testAsyncSuffixSyncDefault.js

var assert = require("assert");
var _ = require('lodash');

@@ -45,5 +44,5 @@ module.exports = {

test.ok(!_.isUndefined(arrayList.addAsync), 'Expected `addAsync` to be present, but it is NOT.');
test.ok(!_.isUndefined(arrayList.add), 'Expected `add` to be present, but it is NOT.');
test.ok(_.isUndefined(arrayList.addPromise), 'Expected `addPromise` to NOT be present, but it is.');
test.ok(typeof arrayList.addAsync !== 'undefined', 'Expected `addAsync` to be present, but it is NOT.');
test.ok(typeof arrayList.add !== 'undefined', 'Expected `add` to be present, but it is NOT.');
test.ok(typeof arrayList.addPromise === 'undefined', 'Expected `addPromise` to NOT be present, but it is.');
test.done();

@@ -68,8 +67,8 @@ },

var api = _.functions(String);
test.ok(_.includes(api, 'format'), 'Expected `format` to be present, but it is NOT.');
test.ok(_.includes(api, 'formatAsync'), 'Expected `formatAsync` to be present, but it is NOT.');
test.ok(!_.includes(api, 'formatSync'), 'Expected `formatSync` to NOT be present, but it is.');
test.ok(!_.includes(api, 'formatPromise'), 'Expected `formatPromise` to NOT be present, but it is.');
test.ok(!_.includes(api, 'formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
var api = Object.keys(String).filter((key) => typeof String[key] === 'function');
test.ok(api.includes('format'), 'Expected `format` to be present, but it is NOT.');
test.ok(api.includes('formatAsync'), 'Expected `formatAsync` to be present, but it is NOT.');
test.ok(!api.includes('formatSync'), 'Expected `formatSync` to NOT be present, but it is.');
test.ok(!api.includes('formatPromise'), 'Expected `formatPromise` to NOT be present, but it is.');
test.ok(!api.includes('formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
test.done();

@@ -76,0 +75,0 @@ },

// testClientBeforeError.js
var _ = require('lodash');
var java = require("../");

@@ -25,3 +24,3 @@ var nodeunit = require("nodeunit");

java.ensureJvm(function(err) {
test.ok(_.isObject(err));
test.ok(err && typeof err === 'object');
test.ok(err instanceof Error);

@@ -28,0 +27,0 @@ test.strictEqual(err.message, 'dummy error');

// testClientBeforeSyncThrows.js
var _ = require('lodash');
var java = require("../");

@@ -25,3 +24,3 @@ var nodeunit = require("nodeunit");

java.ensureJvm(function(err) {
test.ok(_.isObject(err));
test.ok(err && typeof err === 'object');
test.ok(err instanceof Error);

@@ -28,0 +27,0 @@ test.strictEqual(err.message, 'dummy error');

// testClientBeforeThrows.js
var _ = require('lodash');
var java = require("../");

@@ -25,3 +24,3 @@ var nodeunit = require("nodeunit");

java.ensureJvm(function(err) {
test.ok(_.isObject(err));
test.ok(err && typeof err === 'object');
test.ok(err instanceof Error);

@@ -28,0 +27,0 @@ test.strictEqual(err.message, 'dummy error');

// testClientPBeforeError.js
var _ = require('lodash');
var java = require("../");

@@ -35,3 +34,3 @@ var nodeunit = require("nodeunit");

function(err) {
test.ok(_.isObject(err));
test.ok(err && typeof err === 'object');
test.ok(err instanceof Error);

@@ -38,0 +37,0 @@ test.strictEqual(err.message, 'dummy error');

// testClientPBeforeThrows.js
var _ = require('lodash');
var java = require("../");

@@ -35,3 +34,3 @@ var nodeunit = require("nodeunit");

function(err) {
test.ok(_.isObject(err));
test.ok(err && typeof err === 'object');
test.ok(err instanceof Error);

@@ -38,0 +37,0 @@ test.strictEqual(err.message, 'dummy error');

@@ -5,3 +5,2 @@ // testDefacto.js

var _ = require('lodash');
var java = require("../");

@@ -14,4 +13,4 @@ var nodeunit = require("nodeunit");

test.expect(9);
var api = _.functions(java);
test.ok(_.includes(api, 'isJvmCreated'), 'Expected `isJvmCreated` to be present, but it is NOT.');
var api = Object.keys(java).filter((key) => typeof java[key] === 'function');
test.ok(api.includes('isJvmCreated'), 'Expected `isJvmCreated` to be present, but it is NOT.');
test.ok(!java.isJvmCreated());

@@ -54,5 +53,5 @@

test.ok(!_.isUndefined(arrayList.addSync), 'Expected `addSync` to be present, but it is NOT.');
test.ok(!_.isUndefined(arrayList.add), 'Expected `add` to be present, but it is NOT.');
test.ok(_.isUndefined(arrayList.addPromise), 'Expected `addPromise` to NOT be present, but it is.');
test.ok(typeof arrayList.addSync !== 'undefined', 'Expected `addSync` to be present, but it is NOT.');
test.ok(typeof arrayList.add !== 'undefined', 'Expected `add` to be present, but it is NOT.');
test.ok(typeof arrayList.addPromise === 'undefined', 'Expected `addPromise` to NOT be present, but it is.');
test.done();

@@ -77,8 +76,8 @@ },

var api = _.functions(String);
test.ok(_.includes(api, 'format'), 'Expected `format` to be present, but it is NOT.');
test.ok(_.includes(api, 'formatSync'), 'Expected `formatSync` to be present, but it is NOT.');
test.ok(!_.includes(api, 'formatAsync'), 'Expected `formatAsync` to NOT be present, but it is.');
test.ok(!_.includes(api, 'formatPromise'), 'Expected `formatPromise` to NOT be present, but it is.');
test.ok(!_.includes(api, 'formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
var api = Object.keys(String).filter((key) => typeof String[key] === 'function');
test.ok(api.includes('format'), 'Expected `format` to be present, but it is NOT.');
test.ok(api.includes('formatSync'), 'Expected `formatSync` to be present, but it is NOT.');
test.ok(!api.includes('formatAsync'), 'Expected `formatAsync` to NOT be present, but it is.');
test.ok(!api.includes('formatPromise'), 'Expected `formatPromise` to NOT be present, but it is.');
test.ok(!api.includes('formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
test.done();

@@ -85,0 +84,0 @@ },

@@ -7,3 +7,2 @@ // testDefactoPlusPromise.js

var assert = require("assert");
var _ = require("lodash");

@@ -13,4 +12,4 @@ module.exports = {

test.expect(7);
var api = _.functions(java);
test.ok(_.includes(api, 'isJvmCreated'), 'Expected `isJvmCreated` to be present, but it is NOT.');
var api = Object.keys(java).filter((key) => typeof java[key] === 'function');
test.ok(api.includes('isJvmCreated'), 'Expected `isJvmCreated` to be present, but it is NOT.');
test.ok(!java.isJvmCreated());

@@ -51,5 +50,5 @@

test.ok(!_.isUndefined(arrayList.addSync), 'Expected `addSync` to be present, but it is NOT.');
test.ok(!_.isUndefined(arrayList.add), 'Expected `add` to be present, but it is NOT.');
test.ok(!_.isUndefined(arrayList.addPromise), 'Expected `addPromise` to be present, but it is NOT.');
test.ok(arrayList.addSync !== 'undefined', 'Expected `addSync` to be present, but it is NOT.');
test.ok(arrayList.add !== 'undefined', 'Expected `add` to be present, but it is NOT.');
test.ok(arrayList.addPromise !== 'undefined', 'Expected `addPromise` to be present, but it is NOT.');
test.done();

@@ -74,8 +73,8 @@ },

var api = _.functions(String);
test.ok(_.includes(api, 'format'), 'Expected `format` to be present, but it is NOT.');
test.ok(_.includes(api, 'formatSync'), 'Expected `formatSync` to be present, but it is NOT.');
test.ok(_.includes(api, 'formatPromise'), 'Expected `formatPromise` to be present, but it is NOT.');
test.ok(!_.includes(api, 'formatAsync'), 'Expected `formatAsync` to NOT be present, but it is.');
test.ok(!_.includes(api, 'formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
var api = Object.keys(String).filter((key) => typeof String[key] === 'function');
test.ok(api.includes('format'), 'Expected `format` to be present, but it is NOT.');
test.ok(api.includes('formatSync'), 'Expected `formatSync` to be present, but it is NOT.');
test.ok(api.includes('formatPromise'), 'Expected `formatPromise` to be present, but it is NOT.');
test.ok(!api.includes('formatAsync'), 'Expected `formatAsync` to NOT be present, but it is.');
test.ok(!api.includes('formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
test.done();

@@ -82,0 +81,0 @@ },

@@ -6,3 +6,2 @@ // testDefault.js

var _ = require('lodash');
var java = require("../");

@@ -20,5 +19,5 @@ var nodeunit = require("nodeunit");

test.ok(!_.isUndefined(arrayList.addSync), 'Expected `addSync` to be present, but it is NOT.');
test.ok(!_.isUndefined(arrayList.add), 'Expected `add` to be present, but it is NOT.');
test.ok(_.isUndefined(arrayList.addPromise), 'Expected `addPromise` to NOT be present, but it is.');
test.ok(typeof arrayList.addSync !== 'undefined', 'Expected `addSync` to be present, but it is NOT.');
test.ok(typeof arrayList.add !== 'undefined', 'Expected `add` to be present, but it is NOT.');
test.ok(typeof arrayList.addPromise === 'undefined', 'Expected `addPromise` to NOT be present, but it is.');
test.done();

@@ -43,8 +42,8 @@ },

var api = _.functions(String);
test.ok(_.includes(api, 'format'), 'Expected `format` to be present, but it is NOT.');
test.ok(_.includes(api, 'formatSync'), 'Expected `formatSync` to be present, but it is NOT.');
test.ok(!_.includes(api, 'formatAsync'), 'Expected `formatAsync` to NOT be present, but it is.');
test.ok(!_.includes(api, 'formatPromise'), 'Expected `formatPromise` to NOT be present, but it is.');
test.ok(!_.includes(api, 'formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
var api = Object.keys(String).filter((key) => typeof String[key] === 'function');
test.ok(api.includes('format'), 'Expected `format` to be present, but it is NOT.');
test.ok(api.includes('formatSync'), 'Expected `formatSync` to be present, but it is NOT.');
test.ok(!api.includes('formatAsync'), 'Expected `formatAsync` to NOT be present, but it is.');
test.ok(!api.includes('formatPromise'), 'Expected `formatPromise` to NOT be present, but it is.');
test.ok(!api.includes('formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
test.done();

@@ -51,0 +50,0 @@ },

// testInvalidLaunch.js
var _ = require('lodash');
var java = require("../");

@@ -5,0 +4,0 @@ var nodeunit = require("nodeunit");

@@ -7,3 +7,2 @@ // testNoAsync.js

var assert = require("assert");
var _ = require('lodash');
var when = require('when');

@@ -14,4 +13,4 @@

test.expect(7);
var api = _.functions(java);
test.ok(_.includes(api, 'isJvmCreated'), 'Expected `isJvmCreated` to be present, but it is NOT.');
var api = Object.keys(java).filter((key) => typeof java[key] === 'function');
test.ok(api.includes('isJvmCreated'), 'Expected `isJvmCreated` to be present, but it is NOT.');
test.ok(!java.isJvmCreated());

@@ -57,6 +56,6 @@

test.ok(!_.isUndefined(arrayList.addSync), 'Expected `addSync` to be present, but it is NOT.');
test.ok(!_.isUndefined(arrayList.addPromise), 'Expected `addPromise` to be present, but it is NOT.');
test.ok(_.isUndefined(arrayList.add), 'Expected `add` to NOT be present, but it is.');
test.ok(_.isUndefined(arrayList.addAsync), 'Expected `addAsync` to NOT be present, but it is.');
test.ok(typeof arrayList.addSync !== 'undefined', 'Expected `addSync` to be present, but it is NOT.');
test.ok(typeof arrayList.addPromise !== 'undefined', 'Expected `addPromise` to be present, but it is NOT.');
test.ok(typeof arrayList.add === 'undefined', 'Expected `add` to NOT be present, but it is.');
test.ok(typeof arrayList.addAsync === 'undefined', 'Expected `addAsync` to NOT be present, but it is.');
test.done();

@@ -81,8 +80,8 @@ },

var api = _.functions(String);
test.ok(_.includes(api, 'formatSync'), 'Expected `formatSync` to be present, but it is NOT.');
test.ok(_.includes(api, 'formatPromise'), 'Expected `formatPromise` to be present, but it is NOT.');
test.ok(!_.includes(api, 'format'), 'Expected `format` to NOT be present, but it is.');
test.ok(!_.includes(api, 'formatAsync'), 'Expected `formatAsync` to NOT be present, but it is.');
test.ok(!_.includes(api, 'formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
var api = Object.keys(String).filter((key) => typeof String[key] === 'function');
test.ok(api.includes('formatSync'), 'Expected `formatSync` to be present, but it is NOT.');
test.ok(api.includes('formatPromise'), 'Expected `formatPromise` to be present, but it is NOT.');
test.ok(!api.includes('format'), 'Expected `format` to NOT be present, but it is.');
test.ok(!api.includes('formatAsync'), 'Expected `formatAsync` to NOT be present, but it is.');
test.ok(!api.includes('formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
test.done();

@@ -89,0 +88,0 @@ },

@@ -8,3 +8,2 @@ // testSyncDefaultPlusPromise.js

var assert = require("assert");
var _ = require('lodash');

@@ -24,6 +23,6 @@ java.asyncOptions = {

test.ok(!_.isUndefined(arrayList.add), 'Expected `add` to be present, but it is NOT.');
test.ok(!_.isUndefined(arrayList.addP), 'Expected `addP` to be present, but it is NOT.');
test.ok(_.isUndefined(arrayList.addSync), 'Expected `addSync` to NOT be present, but it is.');
test.ok(_.isUndefined(arrayList.addAsync), 'Expected `addAsync` to NOT be present, but it is.');
test.ok(typeof arrayList.add !== 'undefined', 'Expected `add` to be present, but it is NOT.');
test.ok(typeof arrayList.addP !== 'undefined', 'Expected `addP` to be present, but it is NOT.');
test.ok(typeof arrayList.addSync === 'undefined', 'Expected `addSync` to NOT be present, but it is.');
test.ok(typeof arrayList.addAsync === 'undefined', 'Expected `addAsync` to NOT be present, but it is.');
test.done();

@@ -49,8 +48,8 @@ },

var api = _.functions(String);
test.ok(_.includes(api, 'format'), 'Expected `format` to be present, but it is NOT.');
test.ok(_.includes(api, 'formatP'), 'Expected `formatP` to be present, but it is NOT.');
test.ok(!_.includes(api, 'formatSync'), 'Expected `formatSync` to NOT be present, but it is.');
test.ok(!_.includes(api, 'formatAsync'), 'Expected `formatAsync` to NOT be present, but it is.');
test.ok(!_.includes(api, 'formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
var api = Object.keys(String).filter((key) => typeof String[key] === 'function');
test.ok(api.includes('format'), 'Expected `format` to be present, but it is NOT.');
test.ok(api.includes('formatP'), 'Expected `formatP` to be present, but it is NOT.');
test.ok(!api.includes('formatSync'), 'Expected `formatSync` to NOT be present, but it is.');
test.ok(!api.includes('formatAsync'), 'Expected `formatAsync` to NOT be present, but it is.');
test.ok(!api.includes('formatundefined'), 'Expected `formatundefined` to NOT be present, but it is.');
test.done();

@@ -57,0 +56,0 @@ },

@@ -10,3 +10,2 @@ // testUnusableMethodName.js

var _ = require('lodash');
var java = require("../");

@@ -13,0 +12,0 @@ var nodeunit = require("nodeunit");

Sorry, the diff of this file is not supported yet