From 4861665dabe9b485c567bc40028849cfb1cb3171 Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Wed, 13 Nov 2024 14:53:12 +0000 Subject: [PATCH] feat: Upgrade ddl-shim to v3 Signed-off-by: Gordon Smith --- package-lock.json | 569 ++++++++++++++++++++++---- package.json | 2 +- packages/comms/package.json | 2 +- packages/comms/src/services/wsEcl.ts | 2 +- packages/ddl-shim/.vscode/launch.json | 47 +++ packages/ddl-shim/.vscode/tasks.json | 36 ++ packages/ddl-shim/esbuild.js | 12 + packages/ddl-shim/package.json | 52 ++- packages/ddl-shim/rollup.config.mjs | 58 --- packages/ddl-shim/src/cli.ts | 2 +- packages/ddl-shim/src/dermatology.ts | 2 +- packages/ddl-shim/src/index.ts | 10 +- packages/ddl-shim/src/upgrade.ts | 8 +- packages/ddl-shim/src/validate.ts | 9 +- packages/ddl-shim/tsconfig.json | 25 +- packages/ddl-shim/vitest.workspace.ts | 6 + packages/dgrid/package.json | 2 +- 17 files changed, 659 insertions(+), 185 deletions(-) create mode 100644 packages/ddl-shim/.vscode/launch.json create mode 100644 packages/ddl-shim/.vscode/tasks.json create mode 100644 packages/ddl-shim/esbuild.js delete mode 100644 packages/ddl-shim/rollup.config.mjs create mode 100644 packages/ddl-shim/vitest.workspace.ts diff --git a/package-lock.json b/package-lock.json index fc3578a778..d021cb378c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "packages/comms", "packages/composite", "packages/dataflow", - "xpackages/ddl-shim", + "packages/ddl-shim", "xpackages/deck-shim", "packages/dgrid", "packages/dgrid-shim", @@ -1178,39 +1178,8 @@ "link": true }, "node_modules/@hpcc-js/ddl-shim": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/@hpcc-js/ddl-shim/-/ddl-shim-2.22.0.tgz", - "integrity": "sha512-oVsm6Nmtf6/7gJHSoCXtksoPIRDribzaWOODAq65c3Bdp+nK35Jz1U6ve1oX3Ip3ZCzgNTQKMrBgOEgWjGLakg==", - "hasInstallScript": true, - "license": "Apache-2.0", - "dependencies": { - "ajv": "6.12.6" - }, - "bin": { - "ddl-shim": "dist/cli.js" - } - }, - "node_modules/@hpcc-js/ddl-shim/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "license": "MIT", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/@hpcc-js/ddl-shim/node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "license": "MIT" + "resolved": "packages/ddl-shim", + "link": true }, "node_modules/@hpcc-js/dgrid": { "resolved": "packages/dgrid", @@ -3952,6 +3921,106 @@ "dev": true, "license": "MIT" }, + "node_modules/@rodrigoff/ajv-cli": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@rodrigoff/ajv-cli/-/ajv-cli-5.2.0.tgz", + "integrity": "sha512-Cq0Gku1xiUU+GjD42vzCu90qHTAFA1L4FNptqx+X8g6QKeX776yl9O1cpdb7Fk+H3dB9KLDnnEO0qV0aZfbPng==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0", + "fast-json-patch": "^3.1.1", + "glob": "^7.1.0", + "js-yaml": "^3.14.0", + "json-schema-migrate": "^2.0.0", + "json5": "^2.1.3", + "minimist": "^1.2.0" + }, + "bin": { + "ajv": "dist/index.js" + }, + "peerDependencies": { + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + } + } + }, + "node_modules/@rodrigoff/ajv-cli/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@rodrigoff/ajv-cli/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@rodrigoff/ajv-cli/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@rodrigoff/ajv-cli/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rodrigoff/ajv-cli/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@rollup/plugin-commonjs": { "version": "25.0.8", "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-25.0.8.tgz", @@ -10147,6 +10216,13 @@ "node": ">= 6" } }, + "node_modules/fast-json-patch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.1.1.tgz", + "integrity": "sha512-vf6IHUX2SBcA+5/+4883dsIjpBTqmfBjmYiWK1savxQmFk4JfBMLa7ynTYOs1Rolp/T1betJxHiGD3g1Mn8lUQ==", + "dev": true, + "license": "MIT" + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -12845,6 +12921,40 @@ "jju": "^1.1.0" } }, + "node_modules/json-schema-migrate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/json-schema-migrate/-/json-schema-migrate-2.0.0.tgz", + "integrity": "sha512-r38SVTtojDRp4eD6WsCqiE0eNDt4v1WalBXb9cyZYw9ai5cGtBwzRNWjHzJl38w6TxFkXAIA7h+fyX3tnrAFhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + } + }, + "node_modules/json-schema-migrate/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/json-schema-migrate/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, "node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", @@ -18091,6 +18201,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -19545,6 +19665,86 @@ "typescript": ">=4.2.0" } }, + "node_modules/ts-json-schema-generator": { + "version": "0.98.0", + "resolved": "https://registry.npmjs.org/ts-json-schema-generator/-/ts-json-schema-generator-0.98.0.tgz", + "integrity": "sha512-emurTxAKkhk9a/i0Rfg5WkT5Hbg7MaL9VlxQXsWScBun0aXVl99gr06sEcHm3EJ8As4Ji51J7VJGEg6wrER/Kg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "commander": "^9.0.0", + "glob": "^7.2.0", + "json5": "^2.2.0", + "safe-stable-stringify": "^2.3.1", + "typescript": "~4.5.4" + }, + "bin": { + "ts-json-schema-generator": "bin/ts-json-schema-generator" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/ts-json-schema-generator/node_modules/commander": { + "version": "9.5.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", + "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || >=14" + } + }, + "node_modules/ts-json-schema-generator/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ts-json-schema-generator/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/ts-json-schema-generator/node_modules/typescript": { + "version": "4.5.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz", + "integrity": "sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, "node_modules/tsconfig-paths": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz", @@ -21711,7 +21911,6 @@ "version": "3.1.0", "license": "Apache-2.0", "dependencies": { - "@hpcc-js/ddl-shim": "^2.22.0", "@hpcc-js/util": "^3.1.0", "@xmldom/xmldom": "0.9.5", "abort-controller": "3.0.0", @@ -21721,6 +21920,7 @@ "undici": "5.28.4" }, "devDependencies": { + "@hpcc-js/ddl-shim": "^3.0.0", "@hpcc-js/esbuild-plugins": "^1.2.0", "@types/d3-request": "1.0.9", "@types/d3-time-format": "2.3.4", @@ -21785,6 +21985,43 @@ "faker": "4.1.0" } }, + "packages/ddl-shim": { + "name": "@hpcc-js/ddl-shim", + "version": "3.0.0", + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "ajv": "6.12.6" + }, + "devDependencies": { + "@hpcc-js/esbuild-plugins": "^1.2.0", + "@rodrigoff/ajv-cli": "5.2.0", + "@types/node": "^18", + "ts-json-schema-generator": "0.98.0" + } + }, + "packages/ddl-shim/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "packages/ddl-shim/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "license": "MIT" + }, "packages/dgrid": { "name": "@hpcc-js/dgrid", "version": "3.0.0", @@ -21795,7 +22032,7 @@ "@hpcc-js/util": "^3.1.0" }, "devDependencies": { - "@hpcc-js/ddl-shim": "^2.22.0", + "@hpcc-js/ddl-shim": "^3.0.0", "@hpcc-js/esbuild-plugins": "^1.2.0", "@testing-library/dom": "10.4.0", "d3-format": "^1", @@ -22342,6 +22579,8 @@ }, "devDependencies": { "@hpcc-js/esbuild-plugins": "^1.2.0", + "d3-format": "^1", + "d3-selection": "^1", "react": "18.3.1", "react-dom": "18.3.1" }, @@ -22372,6 +22611,193 @@ "grid-list": "0.4.1" } }, + "packages/loader/node_modules/@hpcc-js/dgrid": { + "version": "2.34.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/dgrid/-/dgrid-2.34.0.tgz", + "integrity": "sha512-bUgWY1O+ccyWP5V/yQJT02Y6SJUiXybP+JVeW2Jhk8DotIRDHHxm2ZRX6UNMtUlTqtVDYXyhKJmQJ38G10WZpw==", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@hpcc-js/common": "^2.73.0", + "@hpcc-js/ddl-shim": "^2.22.0", + "@hpcc-js/dgrid-shim": "^2.26.0", + "@hpcc-js/util": "^2.53.0" + } + }, + "packages/loader/node_modules/@hpcc-js/dgrid2": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/dgrid2/-/dgrid2-2.5.0.tgz", + "integrity": "sha512-87+TeJRDoeR7RVqgHX4RqudzHnAvPWQ2U00s4viToAe2tpmC/2wcSG59nDbXZFduC3KuDe20CKhjm1ExP/o2ww==", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@hpcc-js/common": "^2.73.0", + "@hpcc-js/preact-shim": "^2.18.0", + "@hpcc-js/util": "^2.53.0" + } + }, + "packages/loader/node_modules/@hpcc-js/form": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/form/-/form-2.12.0.tgz", + "integrity": "sha512-/7J+LjIlUA9RETOhN5hZI0q6yhhaUGRSrpSLYJppqkhYd0QASQkYSnpLwBIo7QaQaEsDG2O0A1nEVzBW3L3dEg==", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@hpcc-js/api": "^2.14.0", + "@hpcc-js/chart": "^2.86.0", + "@hpcc-js/common": "^2.73.0" + } + }, + "packages/loader/node_modules/@hpcc-js/graph": { + "version": "2.87.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/graph/-/graph-2.87.0.tgz", + "integrity": "sha512-/qz7hxuEhYLTKDSMz2njnO8aI4rtoQCMEhcoVePb6u80R8vr3IexytPNnGppSZiTEX4jWiceiEEGRNNhv44c+A==", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@hpcc-js/api": "^2.14.0", + "@hpcc-js/common": "^2.73.0", + "@hpcc-js/html": "^2.44.0", + "@hpcc-js/react": "^2.55.0", + "@hpcc-js/util": "^2.53.0" + } + }, + "packages/loader/node_modules/@hpcc-js/html": { + "version": "2.44.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/html/-/html-2.44.0.tgz", + "integrity": "sha512-mWwkOZUxltoagJmSh/PnC08C9aPg8bOShACZ2BB+D+Jm+8Hf7VfKI/SUeC8eHy9slJAj2K0GbHmzGAWlZcBqng==", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@hpcc-js/common": "^2.73.0", + "@hpcc-js/preact-shim": "^2.18.0", + "@hpcc-js/util": "^2.53.0" + } + }, + "packages/loader/node_modules/@hpcc-js/layout": { + "version": "2.51.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/layout/-/layout-2.51.0.tgz", + "integrity": "sha512-v0JooU8RT6Er7sAlaomMULeS3WA+B5qTfqYV14H27Ls6a0YlonF+YdzpEuWs6qHz25fb7CnqrSN2f99xnlKAMA==", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@hpcc-js/api": "^2.14.0", + "@hpcc-js/chart": "^2.86.0", + "@hpcc-js/common": "^2.73.0", + "@hpcc-js/dgrid2": "^2.5.0" + } + }, + "packages/loader/node_modules/@hpcc-js/leaflet-shim": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/leaflet-shim/-/leaflet-shim-2.5.0.tgz", + "integrity": "sha512-7niXEXV3dNKs13KVq50c9fiDz1s/qHx7Fj8jDf1zldlPCwi+jtp9ZVK+TdhPgETba2pE6wettGEl1sKrz45yuA==", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@types/leaflet": "1.9.8", + "leaflet": "1.9.4" + } + }, + "packages/loader/node_modules/@hpcc-js/map": { + "version": "2.79.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/map/-/map-2.79.0.tgz", + "integrity": "sha512-Xphi1MHbabiiq1xVjN0rQkWSK+zfk59xVLh5bhXpSY3g620cv1F4MNk2mjzm7TEYSAESEpY81jrYOk9853Xc7A==", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@hpcc-js/api": "^2.14.0", + "@hpcc-js/common": "^2.73.0", + "@hpcc-js/graph": "^2.87.0", + "@hpcc-js/layout": "^2.51.0", + "@hpcc-js/leaflet-shim": "^2.5.0", + "@hpcc-js/other": "^2.17.0", + "@hpcc-js/util": "^2.53.0" + } + }, + "packages/loader/node_modules/@hpcc-js/marshaller": { + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/marshaller/-/marshaller-2.27.0.tgz", + "integrity": "sha512-uMYgT/nIVBEOQgqdlpCX2Fbcxhfq0TJT+IHt8nNJBYsngSU1SOMlZ2G0JCsnmx5HTEpJZhD/BhFeaQ4FVebeLw==", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@hpcc-js/chart": "^2.86.0", + "@hpcc-js/codemirror": "^2.64.0", + "@hpcc-js/common": "^2.73.0", + "@hpcc-js/comms": "^2.98.0", + "@hpcc-js/composite": "^2.9.0", + "@hpcc-js/ddl-shim": "^2.22.0", + "@hpcc-js/dgrid": "^2.34.0", + "@hpcc-js/form": "^2.12.0", + "@hpcc-js/graph": "^2.87.0", + "@hpcc-js/layout": "^2.51.0", + "@hpcc-js/map": "^2.79.0", + "@hpcc-js/other": "^2.17.0", + "@hpcc-js/phosphor": "^2.20.0", + "@hpcc-js/util": "^2.53.0" + } + }, + "packages/loader/node_modules/@hpcc-js/observable-shim": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/observable-shim/-/observable-shim-1.0.0.tgz", + "integrity": "sha512-d20y1dgGdiWORseKUN3hSXtqIxhQGxv50q51FZ14OdJY6lePRzaX5XkFm2IKIUeXOtUxb2Eb7FZHhPfMJxDoeg==", + "extraneous": true, + "license": "Apache-2.0" + }, + "packages/loader/node_modules/@hpcc-js/observablehq-compiler": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@hpcc-js/observablehq-compiler/-/observablehq-compiler-1.4.0.tgz", + "integrity": "sha512-e0PZvRP4M+YC/fHv8wSvoMf3iAaXRmJ6gi3X/EAD6Te2PH6KZRxW7NxfVomxR8mi3mc5yVFgstGlPbaKKzP4VA==", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@hpcc-js/observable-shim": "^1.0.0", + "node-fetch": "3.3.2", + "yargs": "17.7.2" + }, + "bin": { + "csv2json": "bin/dsv2json.js", + "csv2tsv": "bin/dsv2dsv.js", + "dsv2dsv": "bin/dsv2dsv.js", + "dsv2json": "bin/dsv2json.js", + "json2csv": "bin/json2dsv.js", + "json2dsv": "bin/json2dsv.js", + "json2tsv": "bin/json2dsv.js", + "tsv2csv": "bin/dsv2dsv.js", + "tsv2json": "bin/dsv2json.js" + }, + "engines": { + "node": ">=12" + } + }, + "packages/map": { + "name": "@hpcc-js/map", + "version": "3.0.0", + "extraneous": true, + "license": "Apache-2.0", + "dependencies": { + "@hpcc-js/api": "^3.0.0", + "@hpcc-js/common": "^3.0.0", + "@hpcc-js/graph": "^3.0.0", + "@hpcc-js/layout": "^3.0.0", + "@hpcc-js/other": "^3.0.0", + "@hpcc-js/util": "^3.0.0" + }, + "devDependencies": { + "@hpcc-js/esbuild-plugins": "^1.2.0", + "@hpcc-js/leaflet-shim": "^2.5.0", + "d3-collection": "^1", + "d3-color": "3.1.0", + "d3-format": "^1", + "d3-geo": "^1", + "d3-quadtree": "^1", + "d3-request": "^1", + "d3-selection": "^1", + "d3-tile": "^1", + "google-maps": "3.3.0", + "topojson-client": "3.1.0" + } + }, "packages/markdown-it-plugins": { "name": "@hpcc-js/markdown-it-plugins", "version": "1.1.2", @@ -22392,16 +22818,6 @@ "tsx": "4.19.2" } }, - "packages/markdown-it-plugins/node_modules/commander": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", - "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 10" - } - }, "packages/markdown-it-plugins/node_modules/d3-dsv": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz", @@ -22409,36 +22825,45 @@ "dev": true, "license": "ISC", "dependencies": { - "commander": "7", - "iconv-lite": "0.6", - "rw": "1" - }, - "bin": { - "csv2json": "bin/dsv2json.js", - "csv2tsv": "bin/dsv2dsv.js", - "dsv2dsv": "bin/dsv2dsv.js", - "dsv2json": "bin/dsv2json.js", - "json2csv": "bin/json2dsv.js", - "json2dsv": "bin/json2dsv.js", - "json2tsv": "bin/json2dsv.js", - "tsv2csv": "bin/dsv2dsv.js", - "tsv2json": "bin/dsv2json.js" - }, - "engines": { - "node": ">=12" + "@hpcc-js/api": "^2.14.0", + "@hpcc-js/chart": "^2.86.0", + "@hpcc-js/common": "^2.73.0", + "@hpcc-js/dgrid": "^2.34.0", + "@hpcc-js/form": "^2.12.0", + "@hpcc-js/html": "^2.44.0", + "@hpcc-js/layout": "^2.51.0", + "@hpcc-js/other": "^2.17.0", + "@hpcc-js/phosphor": "^2.20.0" } }, - "packages/markdown-it-plugins/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "license": "MIT", + "packages/marshaller": { + "name": "@hpcc-js/marshaller", + "version": "3.0.0", + "extraneous": true, + "license": "Apache-2.0", "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" + "@hpcc-js/chart": "^3.0.0", + "@hpcc-js/codemirror": "^3.0.0", + "@hpcc-js/common": "^3.0.0", + "@hpcc-js/comms": "^3.0.0", + "@hpcc-js/composite": "^3.0.0", + "@hpcc-js/dgrid": "^3.0.0", + "@hpcc-js/form": "^3.0.0", + "@hpcc-js/graph": "^3.0.0", + "@hpcc-js/layout": "^3.0.0", + "@hpcc-js/map": "^3.0.0", + "@hpcc-js/other": "^3.0.0", + "@hpcc-js/phosphor": "^3.0.0", + "@hpcc-js/util": "^3.0.0" }, - "engines": { - "node": ">=0.10.0" + "devDependencies": { + "@hpcc-js/ddl-shim": "^2.22.0", + "@hpcc-js/esbuild-plugins": "^1.2.0", + "d3-array": "^1", + "d3-collection": "^1", + "d3-dsv": "^1", + "d3-fetch": "^1", + "d3-selection": "^1" } }, "packages/observable-shim": { diff --git a/package.json b/package.json index 05f0e93516..459e67de97 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "packages/comms", "packages/composite", "packages/dataflow", - "xpackages/ddl-shim", + "packages/ddl-shim", "xpackages/deck-shim", "packages/dgrid", "packages/dgrid-shim", diff --git a/packages/comms/package.json b/packages/comms/package.json index de26c35711..f518d4089a 100644 --- a/packages/comms/package.json +++ b/packages/comms/package.json @@ -58,7 +58,6 @@ "wsdl-all": "npm-run-all --aggregate-output -c --serial build --parallel wsdl-*" }, "dependencies": { - "@hpcc-js/ddl-shim": "^2.22.0", "@hpcc-js/util": "^3.1.0", "@xmldom/xmldom": "0.9.5", "abort-controller": "3.0.0", @@ -69,6 +68,7 @@ }, "devDependencies": { "@hpcc-js/esbuild-plugins": "^1.2.0", + "@hpcc-js/ddl-shim": "^3.0.0", "@types/d3-request": "1.0.9", "@types/d3-time-format": "2.3.4", "@types/node": "^18", diff --git a/packages/comms/src/services/wsEcl.ts b/packages/comms/src/services/wsEcl.ts index 63018b17d4..5a9b8f1550 100644 --- a/packages/comms/src/services/wsEcl.ts +++ b/packages/comms/src/services/wsEcl.ts @@ -1,4 +1,4 @@ -import { DDL2 } from "@hpcc-js/ddl-shim"; +import type { DDL2 } from "@hpcc-js/ddl-shim"; import { IConnection, IOptions } from "../connection.ts"; import { ESPExceptions, Service } from "../espConnection.ts"; diff --git a/packages/ddl-shim/.vscode/launch.json b/packages/ddl-shim/.vscode/launch.json new file mode 100644 index 0000000000..7c2436335f --- /dev/null +++ b/packages/ddl-shim/.vscode/launch.json @@ -0,0 +1,47 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "test-browser", + "type": "msedge", + "request": "launch", + "url": "http://localhost:8888", + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ], + }, + { + "name": "test-node", + "type": "node", + "request": "launch", + "runtimeArgs": [ + "run-script", + "test-node" + ], + "runtimeExecutable": "npm", + "skipFiles": [ + "/**" + ], + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ], + }, + { + "name": "index.html", + "request": "launch", + "type": "msedge", + "url": "file:///${workspaceFolder}/index.html", + "runtimeArgs": [ + "--disable-web-security" + ], + "webRoot": "${workspaceFolder}", + "outFiles": [ + "${workspaceFolder}/**/*.js", + "!**/node_modules/**" + ] + } + ] +} \ No newline at end of file diff --git a/packages/ddl-shim/.vscode/tasks.json b/packages/ddl-shim/.vscode/tasks.json new file mode 100644 index 0000000000..120545d06c --- /dev/null +++ b/packages/ddl-shim/.vscode/tasks.json @@ -0,0 +1,36 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "gen-types-watch", + "type": "npm", + "script": "gen-types-watch", + "problemMatcher": [ + "$tsc-watch" + ], + "presentation": { + "group": "group-build" + } + }, + { + "label": "bundle-watch", + "type": "npm", + "script": "bundle-watch", + "problemMatcher": [], + "presentation": { + "group": "group-build" + } + }, + { + "label": "build", + "dependsOn": [ + "gen-types-watch", + "bundle-watch", + ], + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} \ No newline at end of file diff --git a/packages/ddl-shim/esbuild.js b/packages/ddl-shim/esbuild.js new file mode 100644 index 0000000000..208b13ddf4 --- /dev/null +++ b/packages/ddl-shim/esbuild.js @@ -0,0 +1,12 @@ +import { neutralTpl } from "@hpcc-js/esbuild-plugins"; +import pkg from "./package.json" with { type: "json" }; + +// config --- +await Promise.all([ + neutralTpl("src/index.ts", "dist/index", { + keepNames: true, + external: [ + ...Object.keys(pkg.dependencies), + ] + }) +]); diff --git a/packages/ddl-shim/package.json b/packages/ddl-shim/package.json index 60cde0e226..27d7307d9c 100644 --- a/packages/ddl-shim/package.json +++ b/packages/ddl-shim/package.json @@ -1,54 +1,50 @@ { "name": "@hpcc-js/ddl-shim", - "version": "2.22.0", + "version": "3.0.0", "description": "hpcc-js DDL parser", - "main": "dist/index.js", - "module": "dist/index.es6", - "unpkg": "dist/index.min.js", - "jsdelivr": "dist/index.min.js", - "bin": "dist/cli.js", - "types": "types/index.d.ts", - "typesVersions": { - "<3.8": { - "*": [ - "types-3.4/index.d.ts" - ] - } + "type": "module", + "exports": { + ".": { + "types": "./types/index.d.ts", + "default": "./dist/index.js" + }, + "./dist/*": "./dist/*" }, + "module": "./dist/index.js", + "browser": "./dist/index.js", + "types": "./types/index.d.ts", "files": [ "dist/*", "src/*", - "schema/*.json", "types/*" ], "scripts": { "preinstall": "echo \"\" > cli.js", - "clean": "rimraf --glob bin lib* types dist ./src/ddl*Schema*.ts ./schema/*.json *.tsbuildinfo", - "compile-es6": "tsc --module es6 --outDir ./lib-es6", - "compile-es6-watch": "npm run compile-es6 -- -w", + "clean": "rimraf --glob bin lib* types dist ./src/ddl*Schema*.ts ./schema/*.json *.tsbuildinfo .turbo", "generate-v1": "ts-json-schema-generator --tsconfig tsconfig-schema.json --type DDLSchema > ./schema/v1.json", "generate-v2": "ts-json-schema-generator --tsconfig tsconfig-schema.json --type Schema > ./schema/v2.json", "generate": "run-p generate-v1 generate-v2", - "bundle": "rollup -c", - "bundle-watch": "npm run bundle -- --watch", - "minimize": "terser dist/index.js -c -m --source-map -o dist/index.min.js", - "gen-legacy-types": "downlevel-dts ./types ./types-3.4", - "build": "run-s generate compile-es6 bundle", - "watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch", + "bundle": "node esbuild.js", + "bundle-watch": "npm run bundle -- --development --watch", + "gen-types": "tsc --project tsconfig.json", + "gen-types-watch": "npm run gen-types -- --watch", + "build": "npm-run-all --serial generate --parallel gen-types bundle", "stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js", "lint": "eslint ./src", + "lint-fix": "eslint --fix src/**/*.ts", "docs": "typedoc --options tdoptions.json .", - "update": "npx --yes npm-check-updates -u -t minor" + "coverage": "vitest run --coverage", + "update": "npx --yes npm-check-updates -u -t minor", + "update-major": "npx --yes npm-check-updates -u" }, "dependencies": { "ajv": "6.12.6" }, "devDependencies": { - "@hpcc-js/bundle": "^2.12.0", + "@hpcc-js/esbuild-plugins": "^1.2.0", "@rodrigoff/ajv-cli": "5.2.0", "@types/node": "^18", - "ts-json-schema-generator": "0.98.0", - "tslib": "2.7.0" + "ts-json-schema-generator": "0.98.0" }, "repository": { "type": "git", @@ -61,4 +57,4 @@ "url": "https://github.com/hpcc-systems/Visualization/issues" }, "homepage": "https://github.com/hpcc-systems/Visualization" -} +} \ No newline at end of file diff --git a/packages/ddl-shim/rollup.config.mjs b/packages/ddl-shim/rollup.config.mjs deleted file mode 100644 index c6d1d45573..0000000000 --- a/packages/ddl-shim/rollup.config.mjs +++ /dev/null @@ -1,58 +0,0 @@ -import { external, globals } from "@hpcc-js/bundle"; -import alias from "@rollup/plugin-alias"; -import commonjs from "@rollup/plugin-commonjs"; -import json from "@rollup/plugin-json"; -import nodeResolve from "@rollup/plugin-node-resolve"; -import postcss from "rollup-plugin-postcss"; -import shebang from "rollup-plugin-add-shebang"; -import sourcemaps from "rollup-plugin-sourcemaps"; - -// eslint-disable-next-line @typescript-eslint/no-var-requires -import pkg from "./package.json" with { type: "json" }; - -export default [{ - input: "lib-es6/cli", - external: ["fs"], - output: [{ - file: pkg.bin, - format: "cjs", - sourcemap: true - }], - plugins: [ - shebang({ - include: "dist/cli.js" - }), - nodeResolve(), - json(), - sourcemaps() - ] -}, { - input: "lib-es6/index", - external: external, - output: [{ - file: pkg.main, - format: "umd", - sourcemap: true, - globals: globals, - name: pkg.name - }, { - file: pkg.module + ".js", - format: "es", - sourcemap: true, - globals: globals, - name: pkg.name - }], - plugins: [ - alias({}), - nodeResolve({ - preferBuiltins: true - }), - commonjs({}), - json(), - sourcemaps(), - postcss({ - extensions: [".css"], - minimize: true - }) - ] -}]; \ No newline at end of file diff --git a/packages/ddl-shim/src/cli.ts b/packages/ddl-shim/src/cli.ts index 29373d6bad..2290c9481a 100644 --- a/packages/ddl-shim/src/cli.ts +++ b/packages/ddl-shim/src/cli.ts @@ -2,7 +2,7 @@ import * as fs from "fs"; // @ts-ignore import * as ddl2Schema from "../schema/v2.json"; -import { upgrade } from "./upgrade"; +import { upgrade } from "./upgrade.ts"; const args = process.argv.slice(2); diff --git a/packages/ddl-shim/src/dermatology.ts b/packages/ddl-shim/src/dermatology.ts index 1ed6fad089..de47a42abc 100644 --- a/packages/ddl-shim/src/dermatology.ts +++ b/packages/ddl-shim/src/dermatology.ts @@ -1,4 +1,4 @@ -import * as DDL2 from "./ddl/v2"; +import * as DDL2 from "./ddl/v2.ts"; const classMappings: any = { c3chart_Bar: "chart_Bar", diff --git a/packages/ddl-shim/src/index.ts b/packages/ddl-shim/src/index.ts index 23cd20fc6b..4c6271b4a4 100644 --- a/packages/ddl-shim/src/index.ts +++ b/packages/ddl-shim/src/index.ts @@ -1,8 +1,8 @@ -export * from "./__package__"; -import * as DDL1 from "./ddl/v1"; -import * as DDL2 from "./ddl/v2"; -export * from "./upgrade"; -export * from "./validate"; +export * from "./__package__.ts"; +import * as DDL1 from "./ddl/v1.ts"; +import * as DDL2 from "./ddl/v2.ts"; +export * from "./upgrade.ts"; +export * from "./validate.ts"; export { DDL1, DDL2 }; diff --git a/packages/ddl-shim/src/upgrade.ts b/packages/ddl-shim/src/upgrade.ts index 5c07106ba6..ba0a2523ab 100644 --- a/packages/ddl-shim/src/upgrade.ts +++ b/packages/ddl-shim/src/upgrade.ts @@ -1,7 +1,7 @@ -import { PKG_NAME, PKG_VERSION } from "./__package__"; -import * as DDL1 from "./ddl/v1"; -import * as DDL2 from "./ddl/v2"; -import { upgrade as dermatologyUpgrade } from "./dermatology"; +import { PKG_NAME, PKG_VERSION } from "./__package__.ts"; +import * as DDL1 from "./ddl/v1.ts"; +import * as DDL2 from "./ddl/v2.ts"; +import { upgrade as dermatologyUpgrade } from "./dermatology.ts"; interface IDatasourceOutput { datasource: DDL1.IAnyDatasource; diff --git a/packages/ddl-shim/src/validate.ts b/packages/ddl-shim/src/validate.ts index 7c3431b31d..63f364363a 100644 --- a/packages/ddl-shim/src/validate.ts +++ b/packages/ddl-shim/src/validate.ts @@ -1,6 +1,6 @@ import * as _Ajv from "ajv"; -import * as DDL from "./ddl/v1"; -import * as DDL2 from "./ddl/v2"; +import * as DDL from "./ddl/v1.ts"; +import * as DDL2 from "./ddl/v2.ts"; const Ajv = (_Ajv as any).default || _Ajv; @@ -31,9 +31,8 @@ export function validate(ddl: DDL.DDLSchema) { } */ -// @ts-ignore -import * as _ddl2Schema from "../schema/v2.json"; +import _ddl2Schema from "../schema/v2.json" with { type: "json" }; export function validate2(ddl: DDL2.Schema) { - return doValidate(ddl, _ddl2Schema); + return doValidate(ddl, _ddl2Schema as any); } diff --git a/packages/ddl-shim/tsconfig.json b/packages/ddl-shim/tsconfig.json index 7e19ec1c9a..3cd3be3a69 100644 --- a/packages/ddl-shim/tsconfig.json +++ b/packages/ddl-shim/tsconfig.json @@ -1,14 +1,25 @@ { - "extends": "../tsconfig.settings.json", "compilerOptions": { - "rootDir": "./src", - "outDir": "./lib-umd", - "declarationDir": "./types", - "types": [ - "node" + "rootDir": "src", + "module": "NodeNext", + "target": "ESNext", + "resolveJsonModule": true, + "emitDeclarationOnly": true, + "declaration": true, + "declarationDir": "types", + "strict": false, + "noImplicitAny": false, + "noImplicitThis": false, + "strictNullChecks": false, + "skipLibCheck": true, + "allowImportingTsExtensions": true, + "lib": [ + "DOM", + "ESNext", + "ES2020" ] }, "include": [ - "./src/**/*" + "./src/index.ts" ] } \ No newline at end of file diff --git a/packages/ddl-shim/vitest.workspace.ts b/packages/ddl-shim/vitest.workspace.ts new file mode 100644 index 0000000000..fa7bb0720b --- /dev/null +++ b/packages/ddl-shim/vitest.workspace.ts @@ -0,0 +1,6 @@ +import { defineWorkspace } from 'vitest/config'; +import baseWorkspace from '../../vitest.workspace.ts'; + +export default defineWorkspace([ + ...baseWorkspace +]) \ No newline at end of file diff --git a/packages/dgrid/package.json b/packages/dgrid/package.json index 5fc52db291..5fc65bec4e 100644 --- a/packages/dgrid/package.json +++ b/packages/dgrid/package.json @@ -42,7 +42,7 @@ }, "devDependencies": { "@hpcc-js/esbuild-plugins": "^1.2.0", - "@hpcc-js/ddl-shim": "^2.22.0", + "@hpcc-js/ddl-shim": "^3.0.0", "@testing-library/dom": "10.4.0", "d3-format": "^1", "d3-selection": "^1"