@hpcc-js/ddl-shim 2.25.1 → 2.25.2

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@hpcc-js/ddl-shim",
3
- "version": "2.25.1",
3
+ "version": "2.25.2",
4
4
  "description": "hpcc-js DDL parser",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.es6",
@@ -41,7 +41,7 @@
41
41
  "update": "npx --yes npm-check-updates -u -t minor"
42
42
  },
43
43
  "dependencies": {
44
- "ajv": "6.12.6"
44
+ "ajv": "6.14.0"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@hpcc-js/bundle": "^2.12.0",
@@ -61,5 +61,5 @@
61
61
  "url": "https://github.com/hpcc-systems/Visualization/issues"
62
62
  },
63
63
  "homepage": "https://github.com/hpcc-systems/Visualization",
64
- "gitHead": "0907b8d15d369c89483954a1d96e2247ba020cb6"
64
+ "gitHead": "e9d09185b7cd29dce187ab524d6f03ad0e6abd0e"
65
65
  }
@@ -1,3 +1,3 @@
1
- export const PKG_NAME = "@hpcc-js/ddl-shim";
2
- export const PKG_VERSION = "2.25.0";
3
- export const BUILD_VERSION = "2.108.6";
1
+ export const PKG_NAME = "@hpcc-js/ddl-shim";
2
+ export const PKG_VERSION = "2.25.2";
3
+ export const BUILD_VERSION = "2.108.10";
package/src/cli.ts CHANGED
@@ -1,60 +1,60 @@
1
- import * as fs from "fs";
2
-
3
- // @ts-ignore
4
- import * as ddl2Schema from "../schema/v2.json";
5
- import { upgrade } from "./upgrade";
6
-
7
- const args = process.argv.slice(2);
8
-
9
- switch (args[0]) {
10
- case "--echo":
11
- process.stdout.write(args[1]);
12
- break;
13
- case "--schema":
14
- process.stdout.write(JSON.stringify(ddl2Schema));
15
- break;
16
- case "--upgrade":
17
- case "--upgradeNoLower":
18
- const srcPath = args[1];
19
- const destPath = args[2];
20
- const baseUrl = args[3];
21
- const wuid = args[4];
22
- const layoutPath = args[5];
23
- if (srcPath && destPath && srcPath !== destPath) {
24
- let layoutJson = {};
25
- if (layoutPath) {
26
- try {
27
- layoutJson = JSON.parse(fs.readFileSync(layoutPath).toString());
28
- } catch (e) {
29
- console.error(e);
30
- }
31
- }
32
- fs.readFile(srcPath, "utf8", function (err, data) {
33
- if (err) throw err;
34
- const ddl2 = upgrade(
35
- JSON.parse(data),
36
- baseUrl || "http://localhost:8010",
37
- wuid || "WUID",
38
- args[0] === "--upgrade",
39
- layoutJson
40
- );
41
- fs.writeFile(destPath, JSON.stringify(ddl2), function (err) {
42
- if (err) throw err;
43
- console.info("complete");
44
- });
45
- });
46
- }
47
- break;
48
- case "--help":
49
- break;
50
- default:
51
- process.stdout.write(`
52
- Usage: <command>
53
-
54
- where <command> is one of:
55
- --schema: output DDL2 schmea.
56
- --upgrade ddl1 [baseUrl wuid [layout]]: updgrade ddl and layout version 1 to ddl version 2.
57
- --upgradeNoLower ddl1 [baseUrl wuid [layout]]: updgrade ddl and layout version 1 to ddl version 2 without changing field IDs upper/lower casing.
58
- --help: this message.
59
- `);
60
- }
1
+ import * as fs from "fs";
2
+
3
+ // @ts-ignore
4
+ import * as ddl2Schema from "../schema/v2.json";
5
+ import { upgrade } from "./upgrade";
6
+
7
+ const args = process.argv.slice(2);
8
+
9
+ switch (args[0]) {
10
+ case "--echo":
11
+ process.stdout.write(args[1]);
12
+ break;
13
+ case "--schema":
14
+ process.stdout.write(JSON.stringify(ddl2Schema));
15
+ break;
16
+ case "--upgrade":
17
+ case "--upgradeNoLower":
18
+ const srcPath = args[1];
19
+ const destPath = args[2];
20
+ const baseUrl = args[3];
21
+ const wuid = args[4];
22
+ const layoutPath = args[5];
23
+ if (srcPath && destPath && srcPath !== destPath) {
24
+ let layoutJson = {};
25
+ if (layoutPath) {
26
+ try {
27
+ layoutJson = JSON.parse(fs.readFileSync(layoutPath).toString());
28
+ } catch (e) {
29
+ console.error(e);
30
+ }
31
+ }
32
+ fs.readFile(srcPath, "utf8", function (err, data) {
33
+ if (err) throw err;
34
+ const ddl2 = upgrade(
35
+ JSON.parse(data),
36
+ baseUrl || "http://localhost:8010",
37
+ wuid || "WUID",
38
+ args[0] === "--upgrade",
39
+ layoutJson
40
+ );
41
+ fs.writeFile(destPath, JSON.stringify(ddl2), function (err) {
42
+ if (err) throw err;
43
+ console.info("complete");
44
+ });
45
+ });
46
+ }
47
+ break;
48
+ case "--help":
49
+ break;
50
+ default:
51
+ process.stdout.write(`
52
+ Usage: <command>
53
+
54
+ where <command> is one of:
55
+ --schema: output DDL2 schmea.
56
+ --upgrade ddl1 [baseUrl wuid [layout]]: updgrade ddl and layout version 1 to ddl version 2.
57
+ --upgradeNoLower ddl1 [baseUrl wuid [layout]]: updgrade ddl and layout version 1 to ddl version 2 without changing field IDs upper/lower casing.
58
+ --help: this message.
59
+ `);
60
+ }