@hpcc-js/ddl-shim 2.22.0 → 3.0.0

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/package.json CHANGED
@@ -1,54 +1,48 @@
1
1
  {
2
2
  "name": "@hpcc-js/ddl-shim",
3
- "version": "2.22.0",
3
+ "version": "3.0.0",
4
4
  "description": "hpcc-js DDL parser",
5
- "main": "dist/index.js",
6
- "module": "dist/index.es6",
7
- "unpkg": "dist/index.min.js",
8
- "jsdelivr": "dist/index.min.js",
9
- "bin": "dist/cli.js",
10
- "types": "types/index.d.ts",
11
- "typesVersions": {
12
- "<3.8": {
13
- "*": [
14
- "types-3.4/index.d.ts"
15
- ]
16
- }
5
+ "type": "module",
6
+ "exports": {
7
+ ".": {
8
+ "types": "./types/index.d.ts",
9
+ "default": "./dist/index.js"
10
+ },
11
+ "./dist/*": "./dist/*"
17
12
  },
13
+ "module": "./dist/index.js",
14
+ "browser": "./dist/index.js",
15
+ "types": "./types/index.d.ts",
18
16
  "files": [
19
17
  "dist/*",
20
18
  "src/*",
21
- "schema/*.json",
22
19
  "types/*"
23
20
  ],
24
21
  "scripts": {
25
22
  "preinstall": "echo \"\" > cli.js",
26
- "clean": "rimraf --glob bin lib* types dist ./src/ddl*Schema*.ts ./schema/*.json *.tsbuildinfo",
27
- "compile-es6": "tsc --module es6 --outDir ./lib-es6",
28
- "compile-es6-watch": "npm run compile-es6 -- -w",
23
+ "clean": "rimraf --glob bin lib* types dist ./src/ddl*Schema*.ts ./schema/*.json *.tsbuildinfo .turbo",
29
24
  "generate-v1": "ts-json-schema-generator --tsconfig tsconfig-schema.json --type DDLSchema > ./schema/v1.json",
30
25
  "generate-v2": "ts-json-schema-generator --tsconfig tsconfig-schema.json --type Schema > ./schema/v2.json",
31
26
  "generate": "run-p generate-v1 generate-v2",
32
- "bundle": "rollup -c",
33
- "bundle-watch": "npm run bundle -- --watch",
34
- "minimize": "terser dist/index.js -c -m --source-map -o dist/index.min.js",
35
- "gen-legacy-types": "downlevel-dts ./types ./types-3.4",
36
- "build": "run-s generate compile-es6 bundle",
37
- "watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch",
38
- "stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js",
27
+ "bundle": "node esbuild.js",
28
+ "bundle-watch": "npm run bundle -- --development --watch",
29
+ "gen-types": "tsc --project tsconfig.json",
30
+ "gen-types-watch": "npm run gen-types -- --watch",
31
+ "build": "npm-run-all --serial generate --parallel gen-types bundle",
39
32
  "lint": "eslint ./src",
33
+ "lint-fix": "eslint --fix src/**/*.ts",
40
34
  "docs": "typedoc --options tdoptions.json .",
41
- "update": "npx --yes npm-check-updates -u -t minor"
35
+ "coverage": "vitest run --coverage",
36
+ "update": "npx --yes npm-check-updates -u -t minor",
37
+ "update-major": "npx --yes npm-check-updates -u"
42
38
  },
43
39
  "dependencies": {
44
40
  "ajv": "6.12.6"
45
41
  },
46
42
  "devDependencies": {
47
- "@hpcc-js/bundle": "^2.12.0",
43
+ "@hpcc-js/esbuild-plugins": "^1.2.0",
48
44
  "@rodrigoff/ajv-cli": "5.2.0",
49
- "@types/node": "^18",
50
- "ts-json-schema-generator": "0.98.0",
51
- "tslib": "2.7.0"
45
+ "ts-json-schema-generator": "0.98.0"
52
46
  },
53
47
  "repository": {
54
48
  "type": "git",
@@ -61,5 +55,5 @@
61
55
  "url": "https://github.com/hpcc-systems/Visualization/issues"
62
56
  },
63
57
  "homepage": "https://github.com/hpcc-systems/Visualization",
64
- "gitHead": "fbbef050700b0e9d76ef99714856383d95155149"
58
+ "gitHead": "658c50fd965a7744ba8db675ba6878607c44d5e2"
65
59
  }
@@ -1,3 +1,3 @@
1
1
  export const PKG_NAME = "@hpcc-js/ddl-shim";
2
- export const PKG_VERSION = "2.22.0";
3
- export const BUILD_VERSION = "2.107.0";
2
+ export const PKG_VERSION = "3.0.0";
3
+ export const BUILD_VERSION = "3.2.0";
package/src/cli.ts CHANGED
@@ -2,7 +2,7 @@ import * as fs from "fs";
2
2
 
3
3
  // @ts-ignore
4
4
  import * as ddl2Schema from "../schema/v2.json";
5
- import { upgrade } from "./upgrade";
5
+ import { upgrade } from "./upgrade.ts";
6
6
 
7
7
  const args = process.argv.slice(2);
8
8
 
@@ -1,4 +1,4 @@
1
- import * as DDL2 from "./ddl/v2";
1
+ import * as DDL2 from "./ddl/v2.ts";
2
2
 
3
3
  const classMappings: any = {
4
4
  c3chart_Bar: "chart_Bar",
package/src/index.ts CHANGED
@@ -1,8 +1,8 @@
1
- export * from "./__package__";
2
- import * as DDL1 from "./ddl/v1";
3
- import * as DDL2 from "./ddl/v2";
4
- export * from "./upgrade";
5
- export * from "./validate";
1
+ export * from "./__package__.ts";
2
+ import * as DDL1 from "./ddl/v1.ts";
3
+ import * as DDL2 from "./ddl/v2.ts";
4
+ export * from "./upgrade.ts";
5
+ export * from "./validate.ts";
6
6
 
7
7
  export { DDL1, DDL2 };
8
8
 
package/src/upgrade.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { PKG_NAME, PKG_VERSION } from "./__package__";
2
- import * as DDL1 from "./ddl/v1";
3
- import * as DDL2 from "./ddl/v2";
4
- import { upgrade as dermatologyUpgrade } from "./dermatology";
1
+ import { PKG_NAME, PKG_VERSION } from "./__package__.ts";
2
+ import * as DDL1 from "./ddl/v1.ts";
3
+ import * as DDL2 from "./ddl/v2.ts";
4
+ import { upgrade as dermatologyUpgrade } from "./dermatology.ts";
5
5
 
6
6
  interface IDatasourceOutput {
7
7
  datasource: DDL1.IAnyDatasource;
package/src/validate.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _Ajv from "ajv";
2
- import * as DDL from "./ddl/v1";
3
- import * as DDL2 from "./ddl/v2";
2
+ import * as DDL from "./ddl/v1.ts";
3
+ import * as DDL2 from "./ddl/v2.ts";
4
4
 
5
5
  const Ajv = (_Ajv as any).default || _Ajv;
6
6
 
@@ -31,9 +31,8 @@ export function validate(ddl: DDL.DDLSchema) {
31
31
  }
32
32
  */
33
33
 
34
- // @ts-ignore
35
- import * as _ddl2Schema from "../schema/v2.json";
34
+ import _ddl2Schema from "../schema/v2.json" with { type: "json" };
36
35
 
37
36
  export function validate2(ddl: DDL2.Schema) {
38
- return doValidate(ddl, _ddl2Schema);
37
+ return doValidate(ddl, _ddl2Schema as any);
39
38
  }
@@ -1,4 +1,3 @@
1
1
  export declare const PKG_NAME = "@hpcc-js/ddl-shim";
2
- export declare const PKG_VERSION = "2.22.0";
3
- export declare const BUILD_VERSION = "2.107.0";
4
- //# sourceMappingURL=__package__.d.ts.map
2
+ export declare const PKG_VERSION = "3.0.0";
3
+ export declare const BUILD_VERSION = "3.2.0";
package/types/ddl/v1.d.ts CHANGED
@@ -232,4 +232,3 @@ export declare function isGeohashMapping(mappings: IAnyChoroMapping): boolean;
232
232
  export type IAnyMapping = IPieMapping | ILineMapping | IGraphMapping | IAnyChoroMapping | ITableMapping | IHeatMapMapping;
233
233
  export type IAnySource = IPieSource | ILineSource | ITableSource | IChoroSource | IGraphSource | IHeatMapSource;
234
234
  export type IAnyVisualization = IPieVisualization | ILineVisualization | ITableVisualization | IChoroVisualization | IGraphVisualization | IHeatMapVisualization | ISliderVisualization | IFormVisualization;
235
- //# sourceMappingURL=v1.d.ts.map
package/types/ddl/v2.d.ts CHANGED
@@ -336,4 +336,3 @@ export interface Schema {
336
336
  };
337
337
  };
338
338
  }
339
- //# sourceMappingURL=v2.d.ts.map
@@ -1,4 +1,4 @@
1
- import * as DDL2 from "./ddl/v2";
1
+ import * as DDL2 from "./ddl/v2.ts";
2
2
  type CellPosition = {
3
3
  id: string;
4
4
  position: [number, number, number, number];
@@ -8,4 +8,3 @@ type DDLProperties = {
8
8
  };
9
9
  export declare function upgrade(ddl2: DDL2.Schema, dermObj: any): DDLProperties;
10
10
  export {};
11
- //# sourceMappingURL=dermatology.d.ts.map
package/types/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- export * from "./__package__";
2
- import * as DDL1 from "./ddl/v1";
3
- import * as DDL2 from "./ddl/v2";
4
- export * from "./upgrade";
5
- export * from "./validate";
1
+ export * from "./__package__.ts";
2
+ import * as DDL1 from "./ddl/v1.ts";
3
+ import * as DDL2 from "./ddl/v2.ts";
4
+ export * from "./upgrade.ts";
5
+ export * from "./validate.ts";
6
6
  export { DDL1, DDL2 };
7
7
  export declare function isDDL2Schema(ref: DDL1.DDLSchema | DDL2.Schema): ref is DDL2.Schema;
8
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,3 @@
1
- import * as DDL1 from "./ddl/v1";
2
- import * as DDL2 from "./ddl/v2";
1
+ import * as DDL1 from "./ddl/v1.ts";
2
+ import * as DDL2 from "./ddl/v2.ts";
3
3
  export declare function upgrade(ddl: DDL1.IDDL, baseUrl?: string, wuid?: string, toLowerCase?: boolean, dermatologyJson?: {}): DDL2.Schema;
4
- //# sourceMappingURL=upgrade.d.ts.map
@@ -1,8 +1,7 @@
1
1
  import * as _Ajv from "ajv";
2
- import * as DDL2 from "./ddl/v2";
2
+ import * as DDL2 from "./ddl/v2.ts";
3
3
  export declare const ddl2Schema: object;
4
4
  export declare function validate2(ddl: DDL2.Schema): {
5
5
  success: boolean | PromiseLike<any>;
6
6
  errors: _Ajv.ErrorObject[];
7
7
  };
8
- //# sourceMappingURL=validate.d.ts.map