@hyperweb/telescope 2.2.2 → 2.2.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.
Files changed (3) hide show
  1. package/cli.js +4 -36
  2. package/esm/cli.js +4 -3
  3. package/package.json +2 -2
package/cli.js CHANGED
@@ -1,42 +1,10 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
3
  exports.cli = void 0;
37
4
  const prompt_1 = require("./prompt");
38
5
  const cmds_1 = require("./cmds");
39
- const pkg = __importStar(require("../package.json"));
6
+ const find_and_require_package_json_1 = require("find-and-require-package-json");
7
+ const pkg = (0, find_and_require_package_json_1.findAndRequirePackageJson)(__dirname);
40
8
  const cli = async (argv) => {
41
9
  if (argv.v || argv.version) {
42
10
  console.log(pkg.version);
@@ -49,8 +17,8 @@ const cli = async (argv) => {
49
17
  type: 'fuzzy',
50
18
  name: 'cmd',
51
19
  message: 'what do you want to do?',
52
- choices: Object.keys(cmds_1.Commands)
53
- }
20
+ choices: Object.keys(cmds_1.Commands),
21
+ },
54
22
  ], argv);
55
23
  if (typeof cmds_1.Commands[cmd] === 'function') {
56
24
  await cmds_1.Commands[cmd](argv);
package/esm/cli.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { prompt } from './prompt';
2
2
  import { Commands as commands } from './cmds';
3
- import * as pkg from '../package.json';
3
+ import { findAndRequirePackageJson } from 'find-and-require-package-json';
4
+ const pkg = findAndRequirePackageJson(__dirname);
4
5
  export const cli = async (argv) => {
5
6
  if (argv.v || argv.version) {
6
7
  console.log(pkg.version);
@@ -13,8 +14,8 @@ export const cli = async (argv) => {
13
14
  type: 'fuzzy',
14
15
  name: 'cmd',
15
16
  message: 'what do you want to do?',
16
- choices: Object.keys(commands)
17
- }
17
+ choices: Object.keys(commands),
18
+ },
18
19
  ], argv);
19
20
  if (typeof commands[cmd] === 'function') {
20
21
  await commands[cmd](argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperweb/telescope",
3
- "version": "2.2.2",
3
+ "version": "2.2.3",
4
4
  "description": "A TypeScript Transpiler for Cosmos Protobufs",
5
5
  "author": "Constructive <developers@constructive.io>",
6
6
  "homepage": "https://github.com/hyperweb-io/telescope",
@@ -93,5 +93,5 @@
93
93
  "shelljs": "^0.8.5",
94
94
  "yaml": "^2.3.4"
95
95
  },
96
- "gitHead": "97fcfb8a8fc94e0b84795c59e1378371c90622d7"
96
+ "gitHead": "e08c8868d293c6a15e31eb278f85cc8b33fe3d40"
97
97
  }