Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
retoolrpc
JavaScript client packageReview Retool's RPC documentation before installing the JavaScript package.
You can use npm
, yarn
, or pnpm
to install the package.
# Using npm
npm install retoolrpc
# Using yarn
yarn add retoolrpc
# Using pnpm
pnpm add retoolrpc
import { RetoolRPC } from 'retoolrpc'
// for CommonJS, uses `require`, e.g.:
// var { RetoolRPC} = require('retoolrpc')
const rpc = new RetoolRPC({
apiToken: 'your-api-token-here', // Replace this token with your API token
host: 'http://localhost:3000/', // Replace this host with your host
resourceId: 'resource-id', // Replace this resource ID with your ID
environmentName: 'production', // Replace this environment name with your name (defaults to production)
pollingIntervalMs: 1000, // The polling interval for the RPC
pollingTimeoutMs: 5000, // The polling timeout for the RPC
version: '0.0.1', // An optional version number for functions schemas
logLevel: 'info', // Change to 'debug' for verbose logging or use own logger implementation by passing a logger param
})
rpc.register({
name: 'helloWorld',
arguments: {
name: { type: 'string', description: 'Your name', required: true },
},
implementation: async (args, context) => {
return {
message: `Hello ${args.name}!`,
context,
}
},
})
await rpc.listen()
For users of Sequelize, we offer an ORM mixin that enables the addition of fundamental model functions with a single function call, registerModel
. When you register a model with rpc
, it automatically registers various remote functions for the model, including create
, update
, createOrUpdate
, findByPk
, findBy
, and findAll
. You can find additional details here.
Following is an example of registering a User
model:
import { RetoolRPC, sequelizeMixin } from 'retoolrpc'
import { User } from './orm/models' // the path to your model may be different
const CustomRPC = sequelizeMixin(RetoolRPC)
const rpc = new CustomRPC({ ... })
rpc.registerModel({
model: Experiment,
findByAttributes: ['id', 'name'],
writeAttributes: ['name'],
})
We plan to support other ORMs in the future.
FAQs
TypeScript package for Retool RPC
The npm package retoolrpc receives a total of 3,834 weekly downloads. As such, retoolrpc popularity was classified as popular.
We found that retoolrpc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.