mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-09-29 01:40:47 +00:00
9fffb491f9
Summary: Adds a Python function `REQUEST` which makes an HTTP GET request. Behind the scenes it: - Raises a special exception to stop trying to evaluate the current cell and just keep the existing value. - Notes the request arguments which will be returned by `apply_user_actions`. - Makes the actual request in NodeJS, which sends back the raw response data in a new action `RespondToRequests` which reevaluates the cell(s) that made the request. - Wraps the response data in a class which mimics the `Response` class of the `requests` library. In certain cases, this asynchronous flow doesn't work and the sandbox will instead synchronously call an exported JS method: - When reevaluating a single cell to get a formula error, the request is made synchronously. - When a formula makes multiple requests, the earlier responses are retrieved synchronously from files which store responses as long as needed to complete evaluating formulas. See https://grist.slack.com/archives/CL1LQ8AT0/p1653399747810139 Test Plan: Added Python and nbrowser tests. Reviewers: georgegevoian Reviewed By: georgegevoian Subscribers: paulfitz, dsagal Differential Revision: https://phab.getgrist.com/D3429
33 lines
692 B
JSON
33 lines
692 B
JSON
{
|
|
"compilerOptions": {
|
|
"allowSyntheticDefaultImports": true,
|
|
"target": "es2016",
|
|
"module": "commonjs",
|
|
"strict": true,
|
|
"strictPropertyInitialization": false,
|
|
"sourceMap": true,
|
|
"noImplicitAny": true,
|
|
"noUnusedLocals": true,
|
|
"moduleResolution": "node",
|
|
"allowJs": true,
|
|
"baseUrl": "..",
|
|
"rootDir": "..",
|
|
"outDir": "../_build",
|
|
"paths": {
|
|
"*": [
|
|
"*",
|
|
"grist-core/*",
|
|
"stubs/*",
|
|
"ext/*"
|
|
],
|
|
},
|
|
"composite": true,
|
|
"plugins": [{
|
|
"name": "typescript-eslint-language-service"
|
|
}],
|
|
"emitDecoratorMetadata": true,
|
|
"experimentalDecorators": true,
|
|
"jsx": "react"
|
|
}
|
|
}
|