ntpclient 1.1.2 → 1.1.3

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/cli.d.ts CHANGED
@@ -1 +1,2 @@
1
+ #!/usr/bin/env node
1
2
  export {};
package/cli.js CHANGED
@@ -1,3 +1,4 @@
1
+ #!/usr/bin/env node
1
2
  "use strict";
2
3
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
4
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -9,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
10
  });
10
11
  };
11
12
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const commander = require("commander");
13
+ const commander_1 = require("commander");
13
14
  const fs = require("fs");
14
15
  const path = require("path");
15
16
  const _1 = require("./");
@@ -19,7 +20,7 @@ const packageJsonPath = fs.existsSync(defaultPackageJsonPath)
19
20
  : path.join(__dirname, '../package.json');
20
21
  const packageJson = fs.readFileSync(packageJsonPath, 'utf-8');
21
22
  const { bin, description, version } = JSON.parse(packageJson);
22
- commander
23
+ commander_1.program
23
24
  .name(Object.keys(bin)[0])
24
25
  .version(version)
25
26
  .description(description)
@@ -27,7 +28,7 @@ commander
27
28
  .option('-p, --port <number>', 'Specify a custom NTP port')
28
29
  .option('-t, --timeout <number>', 'Specify the timeout in milliseconds')
29
30
  .parse(process.argv);
30
- const commanderOptions = commander.opts();
31
+ const commanderOptions = commander_1.program.opts();
31
32
  void (() => __awaiter(void 0, void 0, void 0, function* () {
32
33
  try {
33
34
  const date = yield new _1.NTPClient(Object.assign(Object.assign(Object.assign({}, (commanderOptions.server && { server: commanderOptions.server })), (commanderOptions.port && { port: commanderOptions.port })), (commanderOptions.timeout && { replyTimeout: commanderOptions.timeout }))).getNetworkTime();
package/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names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I,CAAC,CAAC;AAEvB,MAAM,gBAAgB,GAAG,mBAAS,CAAC,IAAI,EAAE,CAAC;AAE1C,KAAK,CAAC,GAAS,EAAE;IACf,IAAI;QACF,MAAM,IAAI,GAAG,MAAM,IAAI,YAAS,+CAC3B,CAAC,gBAAgB,CAAC,MAAM,IAAI,EAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,EAAC,CAAC,GAC9D,CAAC,gBAAgB,CAAC,IAAI,IAAI,EAAC,IAAI,EAAE,gBAAgB,CAAC,IAAI,EAAC,CAAC,GACxD,CAAC,gBAAgB,CAAC,OAAO,IAAI,EAAC,YAAY,EAAE,gBAAgB,CAAC,OAAO,EAAC,CAAC,EACzE,CAAC,cAAc,EAAE,CAAC;QAEpB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;QAC9B,OAAO,CAAC,IAAI,EAAE,CAAC;KAChB;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;KACjB;AACH,CAAC,CAAA,CAAC,EAAE,CAAC"}
package/package.json CHANGED
@@ -3,71 +3,42 @@
3
3
  "bin": {
4
4
  "ntpclient": "cli.js"
5
5
  },
6
- "deno": "edition-deno/src/index.ts",
7
6
  "dependencies": {
8
- "commander": "7.1.0"
7
+ "commander": "9.4.1"
9
8
  },
10
9
  "description": "A TypeScript implementation of the NTP Client Protocol",
11
10
  "devDependencies": {
12
- "@ffflorian/eslint-config": "0.6.2",
13
- "@ffflorian/prettier-config": "0.1.2",
14
- "@ffflorian/semantic-release-config": "0.5.0",
15
- "@semantic-release/changelog": "5.0.1",
16
- "@semantic-release/git": "9.0.0",
17
- "@types/jasmine": "3.6.4",
18
- "@types/node": "~14",
19
- "@typescript-eslint/eslint-plugin": "4.0.0",
20
- "@typescript-eslint/parser": "3.10.1",
11
+ "@evilmartians/lefthook": "1.2.1",
12
+ "@ffflorian/eslint-config": "0.8.3",
13
+ "@ffflorian/prettier-config": "0.1.4",
14
+ "@ffflorian/semantic-release-config": "0.5.2",
15
+ "@semantic-release/changelog": "6.0.1",
16
+ "@semantic-release/git": "10.0.1",
17
+ "@types/jasmine": "4.3.0",
18
+ "@types/node": "~16",
19
+ "@typescript-eslint/eslint-plugin": "5.43.0",
20
+ "@typescript-eslint/parser": "5.43.0",
21
21
  "babel-eslint": "10.1.0",
22
22
  "cpx": "1.5.0",
23
- "eslint": "7.20.0",
24
- "eslint-config-prettier": "8.0.0",
25
- "eslint-plugin-import": "2.22.1",
26
- "eslint-plugin-jasmine": "4.1.2",
27
- "eslint-plugin-jsdoc": "32.1.0",
28
- "eslint-plugin-no-unsanitized": "3.1.4",
29
- "eslint-plugin-prettier": "3.3.1",
30
- "eslint-plugin-simple-import-sort": "7.0.0",
31
- "eslint-plugin-sort-keys-fix": "1.1.1",
32
- "eslint-plugin-typescript-sort-keys": "1.5.0",
33
- "husky": "5.1.0",
34
- "jasmine": "3.6.4",
35
- "lint-staged": "10.5.4",
36
- "make-deno-edition": "1.2.0",
37
- "prettier": "2.2.1",
23
+ "eslint": "7.32.0",
24
+ "eslint-config-prettier": "8.5.0",
25
+ "eslint-plugin-import": "2.26.0",
26
+ "eslint-plugin-jasmine": "4.1.3",
27
+ "eslint-plugin-jsdoc": "39.6.2",
28
+ "eslint-plugin-no-unsanitized": "4.0.1",
29
+ "eslint-plugin-prettier": "4.2.1",
30
+ "eslint-plugin-simple-import-sort": "8.0.0",
31
+ "eslint-plugin-sort-keys-fix": "1.1.2",
32
+ "eslint-plugin-typescript-sort-keys": "2.1.0",
33
+ "eslint-plugin-unused-imports": "1.1.5",
34
+ "jasmine": "4.5.0",
35
+ "prettier": "2.7.1",
38
36
  "publish-flat": "1.4.1",
39
37
  "rimraf": "3.0.2",
40
- "semantic-release": "17.3.9",
41
- "ts-node": "9.1.1",
42
- "typescript": "4.1.5"
38
+ "semantic-release": "19.0.5",
39
+ "ts-node": "10.9.1",
40
+ "typescript": "4.9.3"
43
41
  },
44
- "editions": [
45
- {
46
- "description": "TypeScript source code with import for modules",
47
- "directory": "src",
48
- "engines": false,
49
- "entry": "src/index.ts",
50
- "tags": [
51
- "source",
52
- "typescript",
53
- "import"
54
- ]
55
- },
56
- {
57
- "description": "TypeScript source code made to be compatible with Deno",
58
- "directory": "edition-deno",
59
- "entry": "src/index.ts",
60
- "tags": [
61
- "typescript",
62
- "import",
63
- "deno"
64
- ],
65
- "engines": {
66
- "deno": true,
67
- "browsers": false
68
- }
69
- }
70
- ],
71
42
  "engines": {
72
43
  "node": ">= 10.9"
73
44
  },
@@ -80,24 +51,7 @@
80
51
  "index.js.map",
81
52
  "src"
82
53
  ],
83
- "keywords": [
84
- "deno",
85
- "deno-edition",
86
- "deno-entry",
87
- "denoland"
88
- ],
89
54
  "license": "GPL-3.0",
90
- "lint-staged": {
91
- "*.{json,md}": [
92
- "prettier --write"
93
- ],
94
- "spec/**/*.ts": [
95
- "eslint --config .eslintrc.spec.json --fix"
96
- ],
97
- "src/**/*.ts": [
98
- "eslint --fix"
99
- ]
100
- },
101
55
  "main": "index.js",
102
56
  "name": "ntpclient",
103
57
  "prettier": "@ffflorian/prettier-config",
@@ -106,11 +60,10 @@
106
60
  },
107
61
  "repository": "https://github.com/ffflorian/ntpclient.git",
108
62
  "scripts": {
109
- "build:deno": "make-deno-edition",
110
63
  "build:ts": "tsc",
111
- "clear": "rimraf dist edition-deno",
64
+ "clear": "rimraf dist",
112
65
  "copy:source": "cpx \"src/*.ts\" flattened",
113
- "dist": "yarn clear && yarn build:ts && yarn build:deno",
66
+ "dist": "yarn clear && yarn build:ts",
114
67
  "fix": "yarn fix:other && yarn fix:ts",
115
68
  "fix:other": "yarn prettier --write",
116
69
  "fix:ts": "yarn lint:ts --fix && yarn lint:ts:spec --fix",
@@ -120,10 +73,10 @@
120
73
  "lint:ts": "eslint --ignore-path .gitignore --ext .ts src/",
121
74
  "lint:ts:spec": "eslint --ignore-path .gitignore --ext .ts --config .eslintrc.spec.json spec/",
122
75
  "postversion": "node ../node_modules/publish-flat/cli-copy.js -i package.json -o ../package.json version",
123
- "prettier": "prettier --ignore-path .gitignore \"*.{json,md}\"",
76
+ "prettier": "prettier \"*.{json,md,yml}\"",
124
77
  "release": "semantic-release",
125
78
  "start": "ts-node src/cli.ts",
126
79
  "test": "ts-node -P tsconfig.jasmine.json node_modules/.bin/jasmine"
127
80
  },
128
- "version": "1.1.2"
81
+ "version": "1.1.3"
129
82
  }
package/src/cli.ts CHANGED
@@ -1,4 +1,6 @@
1
- import * as commander from 'commander';
1
+ #!/usr/bin/env node
2
+
3
+ import {program as commander} from 'commander';
2
4
  import * as fs from 'fs';
3
5
  import * as path from 'path';
4
6
 
package/CHANGELOG.md DELETED
@@ -1,41 +0,0 @@
1
- ## [1.1.1](https://github.com/ffflorian/ntpclient/compare/v1.1.0...v1.1.1) (2021-02-19)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * Publish deno files to repository ([64c7f3d](https://github.com/ffflorian/ntpclient/commit/64c7f3dbd4b0432b88f1c6d59050a0f843639112))
7
-
8
- # [1.1.0](https://github.com/ffflorian/ntpclient/compare/v1.0.2...v1.1.0) (2021-02-19)
9
-
10
-
11
- ### Features
12
-
13
- * Deno edition ([#572](https://github.com/ffflorian/ntpclient/issues/572)) ([ab0b63f](https://github.com/ffflorian/ntpclient/commit/ab0b63fb51d1b986846ea92d99ad8053e1ec5bee))
14
-
15
- ## [1.0.2](https://github.com/ffflorian/ntpclient/compare/v1.0.1...v1.0.2) (2019-09-06)
16
-
17
- ### Bug Fixes
18
-
19
- - Use postversion when publishing ([762781c](https://github.com/ffflorian/ntpclient/commit/762781c))
20
-
21
- ## [1.0.1](https://github.com/ffflorian/ntpclient/compare/v1.0.0...v1.0.1) (2019-06-14)
22
-
23
- ### Bug Fixes
24
-
25
- - Use flattened dir to publish ([e431a72](https://github.com/ffflorian/ntpclient/commit/e431a72))
26
-
27
- # [1.0.0](https://github.com/ffflorian/ntpclient/compare/v0.8.0...v1.0.0) (2019-06-13)
28
-
29
- ### Features
30
-
31
- - New import structure, remove webpack ([1b6b324](https://github.com/ffflorian/ntpclient/commit/1b6b324))
32
-
33
- ### BREAKING CHANGES
34
-
35
- - NTPClient is not a default export anymore and the 'dist' directory is omitted
36
-
37
- # [0.8.0](https://github.com/ffflorian/ntpclient/compare/v0.7.3...v0.8.0) (2019-05-27)
38
-
39
- ### Features
40
-
41
- - Force release ([a13fb26](https://github.com/ffflorian/ntpclient/commit/a13fb26))