@malloydata/malloy-explorer 0.0.299-dev250804170242 → 0.0.299-dev250808170326
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +727 -300
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +728 -301
- package/dist/esm/index.js.map +1 -1
- package/dist/malloy-explorer.css +1 -2
- package/dist/types/components/ResultPanel/DownloadButton.d.ts +6 -0
- package/dist/types/components/primitives/utils/icon.d.ts +6 -0
- package/dist/types/components/utils/download.d.ts +44 -0
- package/dist/types/components/utils/download.spec.d.ts +1 -0
- package/package.json +1 -1
- package/.editorconfig +0 -8
- package/.github/workflows/prerelease.yaml +0 -28
- package/.github/workflows/test.yaml +0 -26
- package/.gitmodules +0 -3
- package/.node-version +0 -1
- package/.prettierrc.js +0 -8
- package/.vscode/extensions.json +0 -6
- package/babel.config.cjs +0 -49
- package/eslint.config.mjs +0 -150
- package/index.html +0 -19
- package/jest.config.ts +0 -27
- package/postcss.config.mjs +0 -20
- package/vite.config.mts +0 -69
package/dist/malloy-explorer.css
CHANGED
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
.mlyy280wj{--mly1ojyoay:var(--mlyndhcph)}
|
|
34
34
|
.mly7ouyw2{--mly5m5edj:var(--mly1i3blw4)}
|
|
35
35
|
.mlym9y5t7{--mlynfhokh:block}
|
|
36
|
-
.mly28fmrt{--mlynfhokh:none}
|
|
37
36
|
.mly1bo1i26{--mlyri8z08:0}
|
|
38
37
|
.mly1ae5hkt{--mlyvpnzvp:block}
|
|
39
38
|
.mly11ogjb6{--mlyvpnzvp:none}
|
|
@@ -52,7 +51,6 @@
|
|
|
52
51
|
.mly1dsjhx:disabled{--mlyxo3nik:var(--mly1gq6bli)}
|
|
53
52
|
.mlyiv1q3g:disabled{--mlyxo3nik:var(--mlywh4rgx)}
|
|
54
53
|
.mly1u5txqc:hover{--mly1by112x:.3}
|
|
55
|
-
.mly1x0xcia:hover{--mlynfhokh:block}
|
|
56
54
|
.mly1fzkygm:hover{--mlyri8z08:.3}
|
|
57
55
|
.mly1g9of4s:hover{--mlyvpnzvp:block}
|
|
58
56
|
.mly157rht3:hover{--mlyvpnzvp:inline-flex}
|
|
@@ -186,6 +184,7 @@
|
|
|
186
184
|
@layer priority4{
|
|
187
185
|
.mly1ua5tub{-webkit-box-orient:vertical}
|
|
188
186
|
.mly1gzmk7r{-webkit-line-clamp:3}
|
|
187
|
+
.mlyc26acl{align-content:center}
|
|
189
188
|
.mly6s0dn4{align-items:center}
|
|
190
189
|
.mlypqajaz{align-items:end}
|
|
191
190
|
.mly1cy8zhl{align-items:flex-start}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
+
export interface DownloadButtonProps {
|
|
3
|
+
result?: Malloy.Result;
|
|
4
|
+
name?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function DownloadButton({ name, result }: DownloadButtonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -107,6 +107,12 @@ export declare const ICON_MAP: {
|
|
|
107
107
|
desc?: string;
|
|
108
108
|
descId?: string;
|
|
109
109
|
}>;
|
|
110
|
+
readonly download: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
111
|
+
title?: string;
|
|
112
|
+
titleId?: string;
|
|
113
|
+
desc?: string;
|
|
114
|
+
descId?: string;
|
|
115
|
+
}>;
|
|
110
116
|
readonly aggregate: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
111
117
|
title?: string;
|
|
112
118
|
titleId?: string;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import * as Malloy from '@malloydata/malloy-interfaces';
|
|
2
|
+
export interface WriteStream {
|
|
3
|
+
write: (text: string) => void;
|
|
4
|
+
close: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare abstract class DataWriter {
|
|
7
|
+
readonly stream: WriteStream;
|
|
8
|
+
readonly result: Malloy.Result;
|
|
9
|
+
constructor(stream: WriteStream, result: Malloy.Result);
|
|
10
|
+
abstract process(data: AsyncIterableIterator<Malloy.DataWithRecordCell>): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
export declare class JSONWriter extends DataWriter {
|
|
13
|
+
process(data: AsyncIterableIterator<Malloy.DataWithRecordCell>): Promise<void>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* CSV writer class that handles nested data.
|
|
17
|
+
* This writer creates CSV using a DFS traversal of the result dataset.
|
|
18
|
+
* Each trivial column value is converted to a CSV of 1x1 matrix and all the
|
|
19
|
+
* columns are merged together to create a CSV that represents 1 QueryDataRow.
|
|
20
|
+
* Since this follows DFS, each non trivial data is rendered into a NxM matrix
|
|
21
|
+
* where N is the number of rows in the nested data and M is the number of
|
|
22
|
+
* columns it has.
|
|
23
|
+
* For any row with X number of columns, we end up with X number of NxM matrices
|
|
24
|
+
* where the value of N,M pair may be different for each column.
|
|
25
|
+
* We then merge the matrices so that we end up with a larger matrix of size
|
|
26
|
+
* Max(N)xSum(M) by taking one row of csv from each matrix at a time. For any
|
|
27
|
+
* matrix with N<Max(N), we add a row of empty CSV cells of size N.
|
|
28
|
+
*/
|
|
29
|
+
export declare class CSVWriter extends DataWriter {
|
|
30
|
+
private readonly columnSeparator;
|
|
31
|
+
private readonly rowSeparator;
|
|
32
|
+
private readonly quoteCharacter;
|
|
33
|
+
private readonly includeHeader;
|
|
34
|
+
private readonly emptyCell;
|
|
35
|
+
private escape;
|
|
36
|
+
private stringify;
|
|
37
|
+
private getColWeight;
|
|
38
|
+
private getHeaderRow;
|
|
39
|
+
private mergeMatrices;
|
|
40
|
+
private getChildMatrix;
|
|
41
|
+
private getRowMatrix;
|
|
42
|
+
process(data: AsyncIterableIterator<Malloy.DataWithRecordCell>): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
export declare function dataIterator(result: Malloy.Result): AsyncGenerator<Malloy.CellWithRecordCell, void, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
package/.editorconfig
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: npmjs.com Pre-release
|
|
2
|
-
|
|
3
|
-
on: [workflow_dispatch]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
test:
|
|
7
|
-
uses: './.github/workflows/test.yaml'
|
|
8
|
-
|
|
9
|
-
npm-prerelease:
|
|
10
|
-
needs:
|
|
11
|
-
- test
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- name: Use Node.js
|
|
16
|
-
uses: actions/setup-node@v4
|
|
17
|
-
with:
|
|
18
|
-
node-version: 20.x
|
|
19
|
-
- name: npm install, build, and publish
|
|
20
|
-
run: |
|
|
21
|
-
npm ci --loglevel error
|
|
22
|
-
PRERELEASE=$(date +%y%m%d%H%M%S)
|
|
23
|
-
VERSION=$(jq -r .version ./package.json)-dev$PRERELEASE
|
|
24
|
-
npm version --no-git-tag-version $VERSION
|
|
25
|
-
npm publish --access=public
|
|
26
|
-
env:
|
|
27
|
-
CI: true
|
|
28
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
name: Test
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
workflow_call:
|
|
5
|
-
pull_request:
|
|
6
|
-
push:
|
|
7
|
-
branches:
|
|
8
|
-
- main
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
test-all:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v4
|
|
16
|
-
- name: Use Node.js
|
|
17
|
-
uses: actions/setup-node@v4
|
|
18
|
-
with:
|
|
19
|
-
node-version: 20.x
|
|
20
|
-
- name: Install
|
|
21
|
-
run: npm ci --loglevel error
|
|
22
|
-
- name: Build and Test
|
|
23
|
-
run: |
|
|
24
|
-
npm run build
|
|
25
|
-
npm run lint
|
|
26
|
-
npm run test
|
package/.gitmodules
DELETED
package/.node-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
20.18.1
|
package/.prettierrc.js
DELETED
package/.vscode/extensions.json
DELETED
package/babel.config.cjs
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
module.exports = {
|
|
11
|
-
presets: [
|
|
12
|
-
['@babel/preset-typescript'],
|
|
13
|
-
['@babel/preset-react', {runtime: 'automatic'}],
|
|
14
|
-
],
|
|
15
|
-
plugins: [
|
|
16
|
-
['@babel/plugin-syntax-typescript', {isTSX: true}],
|
|
17
|
-
[
|
|
18
|
-
'@stylexjs/babel-plugin',
|
|
19
|
-
{
|
|
20
|
-
dev: process.env.NODE_ENV === 'development',
|
|
21
|
-
runtimeInjection: false,
|
|
22
|
-
genConditionalClasses: true,
|
|
23
|
-
treeshakeCompensation: true,
|
|
24
|
-
unstable_moduleResolution: {
|
|
25
|
-
type: 'commonJS',
|
|
26
|
-
rootDir: __dirname,
|
|
27
|
-
},
|
|
28
|
-
classNamePrefix: process.env.NODE_ENV === 'development' ? 'x' : 'mly',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
],
|
|
32
|
-
env: {
|
|
33
|
-
test: {
|
|
34
|
-
presets: ['@babel/preset-env'],
|
|
35
|
-
plugins: [
|
|
36
|
-
[
|
|
37
|
-
'@stylexjs/babel-plugin',
|
|
38
|
-
{
|
|
39
|
-
runtimeInjection: false,
|
|
40
|
-
unstable_moduleResolution: {
|
|
41
|
-
type: 'commonJS',
|
|
42
|
-
rootDir: __dirname,
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
],
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
};
|
package/eslint.config.mjs
DELETED
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import {fixupConfigRules, fixupPluginRules} from '@eslint/compat';
|
|
2
|
-
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
3
|
-
import stylexEslint from '@stylexjs/eslint-plugin';
|
|
4
|
-
import jest from 'eslint-plugin-jest';
|
|
5
|
-
import prettier from 'eslint-plugin-prettier';
|
|
6
|
-
import react from 'eslint-plugin-react';
|
|
7
|
-
import reactHooks from 'eslint-plugin-react-hooks';
|
|
8
|
-
import tsParser from '@typescript-eslint/parser';
|
|
9
|
-
import globals, {fileURLToPath} from 'node:url';
|
|
10
|
-
import path from 'node:path';
|
|
11
|
-
import js from '@eslint/js';
|
|
12
|
-
import {FlatCompat} from '@eslint/eslintrc';
|
|
13
|
-
|
|
14
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
-
const __dirname = path.dirname(__filename);
|
|
16
|
-
const compat = new FlatCompat({
|
|
17
|
-
baseDirectory: __dirname,
|
|
18
|
-
recommendedConfig: js.configs.recommended,
|
|
19
|
-
allConfig: js.configs.all,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export default [
|
|
23
|
-
{
|
|
24
|
-
ignores: [
|
|
25
|
-
'**/*.d.ts',
|
|
26
|
-
'**/@flowtypes',
|
|
27
|
-
'**/flow',
|
|
28
|
-
'**/node_modules/',
|
|
29
|
-
'**/dist/',
|
|
30
|
-
'**/build/',
|
|
31
|
-
'**/malloy-samples/',
|
|
32
|
-
'babel.config.cjs',
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
...fixupConfigRules(
|
|
36
|
-
compat.extends(
|
|
37
|
-
'eslint:recommended',
|
|
38
|
-
'plugin:@typescript-eslint/eslint-recommended',
|
|
39
|
-
'plugin:@typescript-eslint/recommended',
|
|
40
|
-
'prettier',
|
|
41
|
-
'plugin:jest/recommended',
|
|
42
|
-
'plugin:prettier/recommended',
|
|
43
|
-
'plugin:react/recommended',
|
|
44
|
-
'plugin:react-hooks/recommended'
|
|
45
|
-
)
|
|
46
|
-
),
|
|
47
|
-
{
|
|
48
|
-
plugins: {
|
|
49
|
-
'@typescript-eslint': fixupPluginRules(typescriptEslint),
|
|
50
|
-
jest: fixupPluginRules(jest),
|
|
51
|
-
prettier: fixupPluginRules(prettier),
|
|
52
|
-
'@stylexjs': fixupPluginRules(stylexEslint),
|
|
53
|
-
react: fixupPluginRules(react),
|
|
54
|
-
'react-hooks': fixupPluginRules(reactHooks),
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
settings: {
|
|
58
|
-
react: {
|
|
59
|
-
version: 'detect',
|
|
60
|
-
},
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
rules: {
|
|
64
|
-
'array-callback-return': 'error',
|
|
65
|
-
'consistent-return': 'error',
|
|
66
|
-
|
|
67
|
-
'no-console': [
|
|
68
|
-
'error',
|
|
69
|
-
{
|
|
70
|
-
allow: ['debug', 'info', 'warn', 'error'],
|
|
71
|
-
},
|
|
72
|
-
],
|
|
73
|
-
|
|
74
|
-
'prettier/prettier': 'error',
|
|
75
|
-
'sort-keys': 'off',
|
|
76
|
-
'no-duplicate-imports': 'error',
|
|
77
|
-
|
|
78
|
-
'no-restricted-imports': [
|
|
79
|
-
'error',
|
|
80
|
-
{
|
|
81
|
-
patterns: ['@malloydata/malloy/src/*'],
|
|
82
|
-
|
|
83
|
-
paths: [
|
|
84
|
-
{
|
|
85
|
-
name: 'lodash',
|
|
86
|
-
message: 'Import [module] from lodash/[module] instead',
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
],
|
|
91
|
-
|
|
92
|
-
'no-throw-literal': 'error',
|
|
93
|
-
|
|
94
|
-
'@typescript-eslint/consistent-type-imports': 'off',
|
|
95
|
-
'@typescript-eslint/no-empty-function': 'off',
|
|
96
|
-
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
97
|
-
|
|
98
|
-
'@typescript-eslint/no-unused-vars': [
|
|
99
|
-
'error',
|
|
100
|
-
{
|
|
101
|
-
argsIgnorePattern: '^_',
|
|
102
|
-
varsIgnorePattern: '^_',
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
|
|
106
|
-
'@typescript-eslint/parameter-properties': [
|
|
107
|
-
'error',
|
|
108
|
-
{
|
|
109
|
-
prefer: 'parameter-property',
|
|
110
|
-
},
|
|
111
|
-
],
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
files: ['**/*.tsx?'],
|
|
116
|
-
|
|
117
|
-
languageOptions: {
|
|
118
|
-
parser: tsParser,
|
|
119
|
-
ecmaVersion: 5,
|
|
120
|
-
sourceType: 'script',
|
|
121
|
-
|
|
122
|
-
parserOptions: {
|
|
123
|
-
warnOnUnsupportedTypeScriptVersion: false,
|
|
124
|
-
project: ['./tsconfig.json'],
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
rules: {
|
|
129
|
-
'@typescript-eslint/no-floating-promises': 'error',
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
files: ['scripts/**'],
|
|
134
|
-
|
|
135
|
-
rules: {
|
|
136
|
-
'node/no-unpublished-import': 'off',
|
|
137
|
-
'no-console': 'off',
|
|
138
|
-
'no-process-exit': 'off',
|
|
139
|
-
},
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
files: ['**/*.spec.tsx?'],
|
|
143
|
-
|
|
144
|
-
languageOptions: {
|
|
145
|
-
globals: {
|
|
146
|
-
...globals.jest,
|
|
147
|
-
},
|
|
148
|
-
},
|
|
149
|
-
},
|
|
150
|
-
];
|
package/index.html
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<title>Malloy Explorer Dev</title>
|
|
5
|
-
</head>
|
|
6
|
-
<body>
|
|
7
|
-
<div>
|
|
8
|
-
<ul>
|
|
9
|
-
<li><a href="/dev/explorer.html">Malloy Explorer</a></li>
|
|
10
|
-
<ul>
|
|
11
|
-
<li><a href="/dev/source.html">Source Panel</a></li>
|
|
12
|
-
<li><a href="/dev/query.html">Query Panel</a></li>
|
|
13
|
-
<li><a href="/dev/result.html">Result Panel</a></li>
|
|
14
|
-
<li><a href="/dev/primitives.html">Primitive Components</a></li>
|
|
15
|
-
</ul>
|
|
16
|
-
</ul>
|
|
17
|
-
</div>
|
|
18
|
-
</body>
|
|
19
|
-
</html>
|
package/jest.config.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
module.exports = {
|
|
9
|
-
setupFilesAfterEnv: ['<rootDir>/src/test/jest.setup.ts'],
|
|
10
|
-
moduleFileExtensions: ['js', 'jsx', 'ts', 'tsx'],
|
|
11
|
-
testMatch: ['<rootDir>/src/**/?(*.)spec.(ts|js)?(x)'],
|
|
12
|
-
testPathIgnorePatterns: ['/node_modules/', '/dist/', '/dev/', '/src/test/'],
|
|
13
|
-
transform: {
|
|
14
|
-
'^.+\\.tsx?$': ['babel-jest'],
|
|
15
|
-
},
|
|
16
|
-
testTimeout: 100000,
|
|
17
|
-
verbose: true,
|
|
18
|
-
testEnvironment: 'jsdom',
|
|
19
|
-
collectCoverage: true,
|
|
20
|
-
coverageReporters: ['lcov', 'html'],
|
|
21
|
-
collectCoverageFrom: ['<rootDir>/src/**/*.(ts|tsx)', '!**/*.stylex.ts'],
|
|
22
|
-
preset: 'ts-jest',
|
|
23
|
-
moduleNameMapper: {
|
|
24
|
-
uuid: require.resolve('uuid'),
|
|
25
|
-
'\\.svg\\?react$': '<rootDir>/src/test/SvgMock.tsx',
|
|
26
|
-
},
|
|
27
|
-
};
|
package/postcss.config.mjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
import babelConfig from './babel.config.cjs';
|
|
11
|
-
|
|
12
|
-
export default {
|
|
13
|
-
plugins: {
|
|
14
|
-
'@stylexjs/postcss-plugin': {
|
|
15
|
-
include: ['src/**/*.{js,jsx,ts,tsx}'],
|
|
16
|
-
useCSSLayers: true,
|
|
17
|
-
babelConfig,
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
};
|
package/vite.config.mts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import {defineConfig} from 'vite';
|
|
2
|
-
import {resolve} from 'path';
|
|
3
|
-
|
|
4
|
-
import replace from '@rollup/plugin-replace';
|
|
5
|
-
import react from '@vitejs/plugin-react';
|
|
6
|
-
import svgr from 'vite-plugin-svgr';
|
|
7
|
-
import babelConfig from './babel.config.cjs';
|
|
8
|
-
|
|
9
|
-
export default defineConfig({
|
|
10
|
-
plugins: [
|
|
11
|
-
svgr(),
|
|
12
|
-
react({babel: babelConfig}),
|
|
13
|
-
replace({
|
|
14
|
-
'Object.defineProperty(exports, "__esModule", { value: true });':
|
|
15
|
-
'Object.defineProperty(typeof exports !== \'undefined\' ? exports : {}, "__esModule", { value: true });',
|
|
16
|
-
delimiters: ['\n', '\n'],
|
|
17
|
-
preventAssignment: true,
|
|
18
|
-
}),
|
|
19
|
-
],
|
|
20
|
-
build: {
|
|
21
|
-
lib: {
|
|
22
|
-
entry: resolve(__dirname, 'src/index.ts'),
|
|
23
|
-
formats: ['es', 'cjs'],
|
|
24
|
-
fileName: format => {
|
|
25
|
-
if (format === 'cjs') return 'cjs/[name].cjs';
|
|
26
|
-
return 'esm/[name].js';
|
|
27
|
-
},
|
|
28
|
-
name: 'index',
|
|
29
|
-
},
|
|
30
|
-
rollupOptions: {
|
|
31
|
-
preserveSymlinks: true,
|
|
32
|
-
external: [
|
|
33
|
-
'react',
|
|
34
|
-
'react-dom',
|
|
35
|
-
'react/jsx-runtime',
|
|
36
|
-
'@malloydata/db-duckdb/wasm',
|
|
37
|
-
'@malloydata/malloy',
|
|
38
|
-
'@malloydata/malloy-tag',
|
|
39
|
-
'@malloydata/malloy-filter',
|
|
40
|
-
'@malloydata/malloy-interfaces',
|
|
41
|
-
'@malloydata/malloy-query-builder',
|
|
42
|
-
'@malloydata/render',
|
|
43
|
-
],
|
|
44
|
-
output: {
|
|
45
|
-
manualChunks: _id => {
|
|
46
|
-
return 'index';
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
minify: false,
|
|
51
|
-
sourcemap: true,
|
|
52
|
-
},
|
|
53
|
-
define: {
|
|
54
|
-
'process.env': {},
|
|
55
|
-
},
|
|
56
|
-
optimizeDeps: {
|
|
57
|
-
force: true,
|
|
58
|
-
include: [
|
|
59
|
-
'@malloydata/db-duckdb/wasm',
|
|
60
|
-
'@malloydata/render',
|
|
61
|
-
'@malloydata/malloy',
|
|
62
|
-
'@malloydata/malloy-tag',
|
|
63
|
-
'@malloydata/malloy-filter',
|
|
64
|
-
'@malloydata/malloy-interfaces',
|
|
65
|
-
'@malloydata/malloy-query-builder',
|
|
66
|
-
],
|
|
67
|
-
exclude: ['@mapbox/node-pre-gyp'],
|
|
68
|
-
},
|
|
69
|
-
});
|