
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
apps-script-backend
Advanced tools
First iteration of the library.
Features:
Annotate your models and tables with the information about the spreadsheet information, and save/load your entities with one line of code.
import StorageService from 'apps-script-backend/src/storage/StorageService'
import Entity from 'apps-script-backend/src/storage/Entity'
import Table from 'apps-script-backend/src/storage/Table'
import { tableColumns, tableName, tableType } from 'apps-script-backend/src/storage/decorators'
@tableColumns([
['name'],
['age', { type: Number }]
])
class CatEntity extends Entity {
name: string
age: number
}
@tableName('Cats')
@tableType(CatEntity)
class CatsTable extends Table<CatEntity> {
}
let cat = new CatEntity();
cat.name = 'Barsik';
cat.age = 10;
let storage = new StorageService('my_spreadsheet_id');
let table = new CatsTable(storage);
table.upsert(cat);
You can implement your own
IStorageService
to support storage other then google spreadsheets
For now, there is an action based routing
// actions/GetEchoAction.ts
import Application from 'apps-script-backend/src/Application';
import { IAction } from 'apps-script-backend/src/Router';
import { sendJson } from 'apps-script-backend/src/helpers/http';
export default <IAction> {
process (request, app: Application) {
const foo = request.parameter.foo;
return { echoFoo: foo };
}
};
// main.ts
import options from './options';
import GetEchoAction from './actions/GetEchoAction';
import Application from 'apps-script-backend/src/Application';
import Router from 'apps-script-backend/src/Router';
let app = new Application({
secure: options.secure,
routes: {
'$get /echo': GetEchoAction
},
spreadsheetId: options.spreadsheetId,
shouldMeaserTimings: options.shouldMeaserTimings,
logLevel: 'warn'
});
function doPost(request) {
return app.process('post', request);
}
function doGet(request) {
return app.process('get', request);
}
We have created some Google apps script API mocks, so that you can create and test your application even without uploading it to google scripts. See the test
folder.
:copyright: 2017 MIT
FAQs
Google Apps Script as a Backend. ----
The npm package apps-script-backend receives a total of 0 weekly downloads. As such, apps-script-backend popularity was classified as not popular.
We found that apps-script-backend demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.