Skip to content

Commit

Permalink
update: generate TS types during npm i
Browse files Browse the repository at this point in the history
  • Loading branch information
k0stik committed Jan 30, 2024
1 parent 2e96c7b commit dec8da3
Show file tree
Hide file tree
Showing 65 changed files with 2,522 additions and 802 deletions.
3 changes: 3 additions & 0 deletions compile_ts.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import compileTS from "./src/js/scripts/compileTs.mjs";

compileTS("./lib/js/schema", `./lib/js/types.ts`);
3,026 changes: 2,321 additions & 705 deletions package-lock.json

Large diffs are not rendered by default.

29 changes: 20 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"prepublishOnly": "rm -rf lib; npm run transpile",
"transpile": "mkdir -p lib; babel src/js --out-dir lib/js; node build_schemas.js",
"transpile-and-build-assets": "mkdir -p lib; babel src/js --out-dir lib/js; BUILD_ASSETS=true BUILD_PATH='./lib/js' node build_schemas.js",
"transpile-and-build-assets": "mkdir -p lib; babel src/js --out-dir lib/js; BUILD_ASSETS=true BUILD_PATH='./lib/js' node build_schemas.js; node compile_ts.mjs",
"build:assets": "node build_schemas.js",
"build:js-and-python-modules": "BUILD_PYTHON_MODULES=true node build_schemas.js",
"build:assets-with-docs": "BUILD_ASSETS=true node build_schemas.js",
Expand All @@ -29,37 +29,48 @@
},
"homepage": "https://github.com/Exabyte-io/esse",
"devDependencies": {
"@exabyte-io/eslint-config": "^2022.11.17-0",
"@babel/eslint-parser": "^7.16.3",
"@babel/plugin-proposal-class-properties": "^7.16.0",
"@babel/preset-env": "^7.16.4",
"@babel/preset-react": "^7.16.7",
"@babel/register": "^7.23.7",
"@babel/runtime-corejs3": "^7.16.8",
"@exabyte-io/eslint-config": "^2023.8.29-1",
"@typescript-eslint/eslint-plugin": "^5.9.1",
"@typescript-eslint/parser": "^5.9.1",
"chai": "4.3.4",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^19.0.2",
"eslint-config-prettier": "^8.3.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-exports": "^1.0.0-beta.5",
"eslint-import-resolver-meteor": "^0.4.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jsdoc": "^37.1.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.27.1",
"eslint-plugin-mui-path-imports": "0.0.15",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.30.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"husky": "^7.0.4",
"lint-staged": "^12.1.2",
"mocha": "^9.2.0",
"nyc": "15.1.0",
"prettier": "^2.5.1",
"prettyjson": "^1.1.3"
"prettyjson": "^1.1.3",
"typescript": "^4.5.5"
},
"license": "Apache-2.0",
"dependencies": {
"@babel/cli": "7.16.0",
"@babel/core": "7.16.0",
"@babel/eslint-parser": "7.16.3",
"@babel/preset-env": "7.16.4",
"@babel/register": "7.16.0",
"ajv": "8.12.0",
"file": "^0.2.2",
"js-yaml": "^4.1.0",
"json-schema-deref-sync": "0.14.0",
"json-schema-merge-allof": "^0.8.1",
"json-schema-to-typescript": "^13.1.2",
"lodash": "4.17.21"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion schema/core/reusable/categories.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "core/reusable/categories",
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "categories",
"title": "Reusable categories schema",
"description": "Used to categorize entities such as models and methods",
"type": "object",
"properties": {
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/diff.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/diff",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Numerical differentiation category schema",
"title": "Numerical differentiation category schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/diff/fd.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/diff/fd",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Finite difference method category schema",
"title": "Finite difference method category schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/discr.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/discr",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Discretization category schema",
"title": "Discretization category schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/discr/mesh.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/discr/mesh",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Meshing method category schema",
"title": "Meshing method category schema",
"type": "object",
"allOf": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/discr/mesh/hybrid",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Hybrid meshing category schema",
"title": "Hybrid meshing category schema",
"type": "object",
"allOf": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/discr/mesh/nstruct",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Unstructured meshing category schema",
"title": "Unstructured meshing category nstruct schema",
"type": "object",
"allOf": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/discr/mesh/struct",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Structured meshing category schema",
"title": "Structured meshing category schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/fapprx.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/fapprx",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Unstructured meshing category schema",
"title": "Unstructured meshing category fapprx schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/fapprx/basisexp.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/fapprx/basisexp",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Basis expansion category schema",
"title": "Basis expansion category schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/fapprx/ipol.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/fapprx/ipol",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Interpolation category schema",
"title": "Interpolation category schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/fapprx/ipol/lin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/fapprx/ipol/lin",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Linear interpolation category schema",
"title": "Linear interpolation category schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/fapprx/ipol/poly.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/fapprx/ipol/poly",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Polynomial interpolation category schema",
"title": "Polynomial interpolation category schema",
"type": "object",
"allOf": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/fapprx/ipol/spline",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Spline interpolation category schema",
"title": "Spline interpolation category schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/intgr.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/intgr",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Integration category schema",
"title": "Integration category schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/intgr/analytic.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/intgr/analytic",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Analytic integral category schema",
"title": "Analytic integral category schema",
"type": "object",
"allOf": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/intgr/analytic/volume",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "analytic volume integral category schema",
"title": "Analytic volume integral category schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/intgr/diffeq.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/intgr/diffeq",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Methods for the numerical integration of differential equations",
"title": "Methods for the numerical integration of differential equations schema",
"type": "object",
"allOf": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Categories for the numerical integration of differential equations",
"type": "object",
"title": "Order1 schema",
"allOf": [
{
"$ref": "../diffeq.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Categories for the numerical integration of differential equations",
"type": "object",
"title": "Order2 schema",
"allOf": [
{
"$ref": "../diffeq.json"
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/intgr/numquad.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/intgr/numquad",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Methods for the numerical quadrature",
"title": "Methods for the numerical quadrature schema",
"type": "object",
"allOf": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/intgr/numquad/gauss",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Gaussian quadrature rules",
"title": "Gaussian quadrature rules schema",
"type": "object",
"allOf": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/intgr/numquad/newcot",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Newton-Cotes quadrature rules",
"title": "Newton-Cotes quadrature rules schema",
"type": "object",
"allOf": [
{
Expand Down
1 change: 1 addition & 0 deletions schema/methods_category/mathematical/intgr/transf.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$id": "methods-category/mathematical/intgr/transf",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Integral transform methods",
"title": "Integral transform methods schema",
"type": "object",
"allOf": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"$id": "methods-category/mathematical/intgr/transf/fourier",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Fourier transform methods",
"title": "Fourier transform methods schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/linalg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/linalg",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Linear Algebra category schema",
"title": "Linear Algebra category schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/linalg/dcomp.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/linalg/dcomp",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Matrix decomposition methods",
"title": "Matrix decomposition methods schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/linalg/diag.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/linalg/diag",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Matrix diagonalization methods",
"title": "Matrix diagonalization methods schema",
"type": "object",
"allOf": [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/linalg/diag/davidson",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Davidson diagonalization method",
"title": "Davidson diagonalization method schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/linalg/lintra.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/linalg/lintra",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Linear transformation methods",
"title": "Linear transformation methods schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/linalg/matf.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/linalg/matf",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Matrix function methods",
"title": "Matrix function methods schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/opt.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/opt",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Integration category schema",
"title": "Mathematical opt schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/opt/diff.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/opt/diff",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Optimization methods for differentiable functions category schema",
"title": "Optimization methods for differentiable functions category schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/opt/diff/bracket.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/opt/diff/bracket",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Bracket algorithms for the optimization of differentiable functions",
"title": "Bracket algorithms for the optimization of differentiable functions schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/opt/diff/local.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/opt/diff/local",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Local descent methods for the optimization of differentiable functions",
"title": "Local descent methods for the optimization of differentiable functions schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/opt/diff/order1.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/opt/diff/order1",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "First order algorithms for the optimization of differentiable functions",
"title": "First order algorithms for the optimization of differentiable functions schema",
"type": "object",
"allOf": [
{
Expand Down
2 changes: 1 addition & 1 deletion schema/methods_category/mathematical/opt/diff/order2.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$id": "methods-category/mathematical/opt/diff/order2",
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Second order algorithms for the optimization of differentiable functions",
"title": "Second order algorithms for the optimization of differentiable functions schema",
"type": "object",
"allOf": [
{
Expand Down
Loading

0 comments on commit dec8da3

Please sign in to comment.