gristlabs_grist-core/package.json
Paul Fitzpatrick ec8ab598cb (core) add a yarn run cli tool, and add a sqlite gristify option
Summary:
This adds rudimentary support for opening certain SQLite files in Grist.

If you have a file such as `landing.db` in Grist, you can convert it to Grist format by doing (either in monorepo or grist-core):
```
yarn run cli -h
yarn run cli sqlite -h
yarn run cli sqlite gristify landing.db
```

The file is now openable by Grist. To actually do so with the regular Grist server, you'll need to either import it, or convert some doc you don't care about in the `samples/` directory to be a soft link to it (and then force a reload).

This implementation is a rudimentary experiment. Here are some awkwardnesses:
 * Only tables that happen to have a column called `id`, and where the column happens to be an integer, can be opened directly with Grist as it is today. That could be generalized, but it looked more than a Gristathon's worth of work, so I instead used SQLite views.
 * Grist will handle tables that start with an uncapitalized letter a bit erratically. You can successfully add columns, for example, but removing them will cause sadness - Grist will rename the table in a confused way.
 * I didn't attempt to deal with column names with spaces etc (though views could deal with those).
 * I haven't tried to do any fancy type mapping.
 * Columns with constraints can make adding new rows impossible in Grist, since Grist requires that a row can be added with just a single cell set.

Test Plan: added small test

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3502
2022-07-14 12:00:30 -04:00

153 lines
4.9 KiB
JSON

{
"name": "grist-core",
"version": "0.7.9",
"license": "Apache-2.0",
"description": "Grist is the evolution of spreadsheets",
"homepage": "https://github.com/gristlabs/grist-core",
"repository": "git://github.com/gristlabs/grist-core.git",
"scripts": {
"start": "sandbox/watch.sh",
"install:python": "buildtools/prepare_python.sh",
"install:python2": "buildtools/prepare_python2.sh",
"install:python3": "buildtools/prepare_python3.sh",
"build:prod": "buildtools/build.sh",
"start:prod": "sandbox/run.sh",
"test": "GRIST_SESSION_COOKIE=grist_test_cookie GRIST_TEST_LOGIN=1 TEST_SUPPORT_API_KEY=api_key_for_support TEST_CLEAN_DATABASE=true NODE_PATH=_build:_build/stubs:_build/ext mocha -g ${GREP_TEST:-''} _build/test/nbrowser/*.js _build/test/server/**/*.js _build/test/gen-server/**/*.js",
"test:server": "GRIST_SESSION_COOKIE=grist_test_cookie NODE_PATH=_build:_build/stubs:_build/ext mocha _build/test/server/**/*.js _build/test/gen-server/**/*.js",
"test:smoke": "NODE_PATH=_build:_build/stubs:_build/ext mocha _build/test/nbrowser/Smoke.js",
"test:docker": "./test/test_under_docker.sh",
"cli": "NODE_PATH=_build:_build/stubs:_build/ext node _build/app/server/companion.js"
},
"keywords": [
"grist",
"spreadsheet",
"database"
],
"author": {
"name": "Grist Labs Inc.",
"email": "info@getgrist.com"
},
"private": false,
"devDependencies": {
"@types/accept-language-parser": "1.5.2",
"@types/backbone": "1.3.43",
"@types/chai": "4.1.7",
"@types/chai-as-promised": "7.1.0",
"@types/content-disposition": "0.5.2",
"@types/diff-match-patch": "1.0.32",
"@types/double-ended-queue": "2.1.0",
"@types/express": "4.16.0",
"@types/form-data": "2.2.1",
"@types/fs-extra": "5.0.4",
"@types/image-size": "0.0.29",
"@types/js-yaml": "3.11.2",
"@types/lodash": "4.14.117",
"@types/lru-cache": "5.1.1",
"@types/mime-types": "2.1.0",
"@types/mocha": "5.2.5",
"@types/moment-timezone": "0.5.9",
"@types/node": "^14",
"@types/node-fetch": "2.1.2",
"@types/pidusage": "2.0.1",
"@types/plotly.js": "1.44.15",
"@types/qrcode": "1.4.2",
"@types/redlock": "3.0.2",
"@types/saml2-js": "2.0.1",
"@types/selenium-webdriver": "4.0.0",
"@types/sinon": "5.0.5",
"@types/sqlite3": "3.1.6",
"@types/tmp": "0.0.33",
"@types/uuid": "3.4.4",
"@types/which": "2.0.1",
"@types/ws": "^6",
"app-module-path": "2.2.0",
"catw": "1.0.1",
"chai": "4.2.0",
"chai-as-promised": "7.1.1",
"esbuild-loader": "2.19.0",
"mocha": "5.2.0",
"mocha-webdriver": "0.2.9",
"moment-locales-webpack-plugin": "^1.2.0",
"nodemon": "^2.0.4",
"otplib": "12.0.1",
"selenium-webdriver": "3.6.0",
"sinon": "7.1.1",
"source-map-loader": "^0.2.4",
"tmp-promise": "1.0.5",
"typescript": "4.7.4",
"webpack": "5.73.0",
"webpack-cli": "4.10.0",
"why-is-node-running": "2.0.3"
},
"dependencies": {
"@googleapis/drive": "0.3.1",
"@googleapis/oauth2": "0.2.0",
"@gristlabs/connect-sqlite3": "0.9.11-grist.4",
"@gristlabs/express-session": "1.17.0",
"@gristlabs/moment-guess": "1.2.4-grist.1",
"@gristlabs/pidusage": "2.0.17",
"@gristlabs/sqlite3": "4.1.1-grist.6",
"@popperjs/core": "2.3.3",
"accept-language-parser": "1.5.0",
"async-mutex": "0.2.4",
"axios": "0.18.0",
"backbone": "1.3.3",
"bootstrap": "3.3.5",
"bootstrap-datepicker": "1.9.0",
"bowser": "2.7.0",
"brace": "0.11.1",
"collect-js-deps": "^0.1.1",
"commander": "9.3.0",
"components-jqueryui": "1.12.1",
"connect-redis": "3.4.0",
"cookie": "0.5.0",
"cookie-parser": "1.4.3",
"csv": "4.0.0",
"diff-match-patch": "1.0.5",
"double-ended-queue": "2.1.0-0",
"electron": "3.0.7",
"exceljs": "4.2.1",
"express": "4.16.4",
"file-type": "14.1.4",
"fs-extra": "7.0.0",
"grain-rpc": "0.1.7",
"grainjs": "1.0.2",
"highlight.js": "9.13.1",
"http-proxy-agent": "5.0.0",
"https-proxy-agent": "5.0.1",
"i18n-iso-countries": "6.1.0",
"image-size": "0.6.3",
"jquery": "2.2.1",
"js-yaml": "3.12.0",
"knockout": "3.5.0",
"locale-currency": "0.0.2",
"lodash": "4.17.15",
"moment": "2.22.2",
"moment-timezone": "0.5.21",
"morgan": "1.9.1",
"mousetrap": "1.6.2",
"multiparty": "4.2.2",
"node-fetch": "2.2.0",
"pg": "8.6.0",
"plotly.js-basic-dist": "1.51.1",
"popper-max-size-modifier": "0.2.0",
"popweasel": "0.1.18",
"qrcode": "1.5.0",
"randomcolor": "0.5.3",
"redis": "2.8.0",
"redlock": "3.1.2",
"saml2-js": "2.0.3",
"short-uuid": "3.1.1",
"tmp": "0.0.33",
"ts-interface-checker": "1.0.2",
"typeorm": "0.2.18",
"uuid": "3.3.2",
"winston": "2.4.5",
"ws": "6.1.0"
},
"resolutions": {
"jquery": "2.2.1",
"ts-interface-checker": "1.0.2"
}
}