Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[feat] duckdb module placeholder (#2926)

Igor Dykhtafc974d852d24
diff --git a/package.json b/package.json
index 154f53aba..0d8cda73f 100644
--- a/package.json
+++ b/package.json
@@ -34,6 +34,7 @@
"./src/effects",
"./src/reducers",
"./src/components",
+ "./src/duckdb",
"./src/ai-assistant"
],
"repository": {
diff --git a/src/duckdb/babel.config.js b/src/duckdb/babel.config.js
new file mode 100644
index 000000000..eb16706b6
--- /dev/null
+++ b/src/duckdb/babel.config.js
@@ -0,0 +1,51 @@
+// SPDX-License-Identifier: MIT
+// Copyright contributors to the kepler.gl project
+
+const KeplerPackage = require('./package');
+
+const PRESETS = ['@babel/preset-env', '@babel/preset-react', '@babel/preset-typescript'];
+const PLUGINS = [
+ ['@babel/plugin-transform-typescript', {isTSX: true, allowDeclareFields: true}],
+ '@babel/plugin-transform-modules-commonjs',
+ '@babel/plugin-transform-class-properties',
+ '@babel/plugin-transform-optional-chaining',
+ '@babel/plugin-transform-logical-assignment-operators',
+ '@babel/plugin-transform-nullish-coalescing-operator',
+ '@babel/plugin-transform-export-namespace-from',
+ [
+ '@babel/transform-runtime',
+ {
+ regenerator: true
+ }
+ ],
+ [
+ 'search-and-replace',
+ {
+ rules: [
+ {
+ search: '__PACKAGE_VERSION__',
+ replace: KeplerPackage.version
+ }
+ ]
+ }
+ ]
+];
+const ENV = {
+ test: {
+ plugins: ['istanbul']
+ },
+ debug: {
+ sourceMaps: 'inline',
+ retainLines: true
+ }
+};
+
+module.exports = function babel(api) {
+ api.cache(true);
+
+ return {
+ presets: PRESETS,
+ plugins: PLUGINS,
+ env: ENV
+ };
+};
diff --git a/src/duckdb/package.json b/src/duckdb/package.json
new file mode 100644
index 000000000..4f5519bf5
--- /dev/null
+++ b/src/duckdb/package.json
@@ -0,0 +1,48 @@
+{
+ "name": "@kepler.gl/duckdb",
+ "author": "Shan He <[email protected]>",
+ "version": "3.1.0-alpha.5",
+ "description": "kepler.gl duckDB plugin",
+ "license": "MIT",
+ "main": "dist/index.js",
+ "types": "dist/index.d.ts",
+ "keywords": [
+ "duckdb"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/keplergl/kepler.gl.git"
+ },
+ "scripts": {
+ "build": "rm -fr dist && babel src --out-dir dist --source-maps inline --extensions '.ts,.tsx,.js,.jsx' --ignore '**/*.d.ts'",
+ "build:umd": "NODE_OPTIONS=--openssl-legacy-provider webpack --config ./webpack/umd.js --progress --env.prod",
+ "build:types": "tsc --project ./tsconfig.production.json",
+ "prepublishOnly": "babel-node ../../scripts/license-header/bin --license ../../FILE-HEADER && yarn build && yarn build:types",
+ "stab": "mkdir -p dist && touch dist/index.js"
+ },
+ "files": [
+ "dist",
+ "umd"
+ ],
+ "dependencies": {
+ "@kepler.gl/constants": "3.1.0-alpha.5",
+ "@kepler.gl/types": "3.1.0-alpha.5"
+ },
+ "nyc": {
+ "sourceMap": false,
+ "instrument": false
+ },
+ "maintainers": [
+ "Shan He <[email protected]>",
+ "Igor Dykhta <[email protected]>",
+ "Ilya Boyandin <[email protected]>"
+ ],
+ "engines": {
+ "node": ">=18"
+ },
+ "volta": {
+ "node": "18.18.2",
+ "yarn": "4.4.0"
+ },
+ "packageManager": "[email protected]"
+}
diff --git a/src/duckdb/src/index.ts b/src/duckdb/src/index.ts
new file mode 100644
index 000000000..762aa28fe
--- /dev/null
+++ b/src/duckdb/src/index.ts
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: MIT
+// Copyright contributors to the kepler.gl project
+
+const DUCK = 0;
+
+export default DUCK;
diff --git a/src/duckdb/tsconfig.production.json b/src/duckdb/tsconfig.production.json
new file mode 100644
index 000000000..f8ee4aa48
--- /dev/null
+++ b/src/duckdb/tsconfig.production.json
@@ -0,0 +1,28 @@
+{
+ "compilerOptions": {
+ "target": "es2020",
+ "allowJs": false,
+ "checkJs": false,
+ "jsx": "react",
+ "module": "esnext",
+ "moduleResolution": "node",
+ "declaration": true,
+ "emitDeclarationOnly": true,
+ "noImplicitAny": false,
+ "noImplicitReturns": true,
+ "noImplicitThis": true,
+ "noUnusedLocals": true,
+ "outDir": "dist",
+ "sourceMap": true,
+ "strictNullChecks": true,
+ "suppressImplicitAnyIndexErrors": false,
+ "esModuleInterop": true,
+ "allowSyntheticDefaultImports": true,
+ "skipLibCheck": true,
+ "strict": true,
+ "resolveJsonModule": true,
+ "isolatedModules": true,
+ "baseUrl": "./src"
+ },
+ "include": ["src"]
+}
diff --git a/yarn.lock b/yarn.lock
index d38f35fc4..719be5255 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3392,6 +3392,15 @@ __metadata:
languageName: unknown
linkType: soft
+"@kepler.gl/duckdb@workspace:src/duckdb":
+ version: 0.0.0-use.local
+ resolution: "@kepler.gl/duckdb@workspace:src/duckdb"
+ dependencies:
+ "@kepler.gl/constants": "npm:3.1.0-alpha.5"
+ "@kepler.gl/types": "npm:3.1.0-alpha.5"
+ languageName: unknown
+ linkType: soft
+
"@kepler.gl/effects@npm:3.1.0-alpha.5, @kepler.gl/effects@workspace:src/effects":
version: 0.0.0-use.local
resolution: "@kepler.gl/effects@workspace:src/effects"