@messagevisor/cli 0.0.1 → 0.2.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/CHANGELOG.md +24 -0
- package/LICENSE +21 -0
- package/README.md +7 -0
- package/bin.js +3 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +26 -0
- package/lib/index.js.map +1 -0
- package/package.json +36 -13
- package/src/index.ts +27 -0
- package/tsconfig.cjs.json +11 -0
- package/tsconfig.typecheck.json +4 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
# [0.2.0](https://github.com/messagevisor/messagevisor/compare/v0.1.0...v0.2.0) (2026-06-02)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @messagevisor/cli
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [0.1.0](https://github.com/messagevisor/messagevisor/compare/v0.0.2...v0.1.0) (2026-05-31)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @messagevisor/cli
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 0.0.2 (2026-05-31)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @messagevisor/cli
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Fahad Heylaal (https://fahad19.com)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
package/README.md
ADDED
package/bin.js
ADDED
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var core_1 = require("@messagevisor/core");
|
|
4
|
+
var rootDirectoryPath = process.cwd();
|
|
5
|
+
var projectConfig;
|
|
6
|
+
var datasource;
|
|
7
|
+
try {
|
|
8
|
+
projectConfig = (0, core_1.getProjectConfig)(rootDirectoryPath);
|
|
9
|
+
datasource = new core_1.Datasource(projectConfig, rootDirectoryPath);
|
|
10
|
+
}
|
|
11
|
+
catch (error) {
|
|
12
|
+
var command = process.argv.slice(2)[0];
|
|
13
|
+
if (command !== "init" && command !== "help" && command !== "--help" && command !== "-h") {
|
|
14
|
+
console.error((0, core_1.getCLIErrorOutput)(error));
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
(0, core_1.runCLI)({
|
|
19
|
+
rootDirectoryPath: rootDirectoryPath,
|
|
20
|
+
projectConfig: projectConfig,
|
|
21
|
+
datasource: datasource,
|
|
22
|
+
}).catch(function (error) {
|
|
23
|
+
console.error((0, core_1.getCLIErrorOutput)(error));
|
|
24
|
+
process.exit(1);
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,2CAA6F;AAE7F,IAAM,iBAAiB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAExC,IAAI,aAAa,CAAC;AAClB,IAAI,UAAU,CAAC;AAEf,IAAI,CAAC;IACH,aAAa,GAAG,IAAA,uBAAgB,EAAC,iBAAiB,CAAC,CAAC;IACpD,UAAU,GAAG,IAAI,iBAAU,CAAC,aAAa,EAAE,iBAAiB,CAAC,CAAC;AAChE,CAAC;AAAC,OAAO,KAAK,EAAE,CAAC;IACf,IAAM,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzC,IAAI,OAAO,KAAK,MAAM,IAAI,OAAO,KAAK,MAAM,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACzF,OAAO,CAAC,KAAK,CAAC,IAAA,wBAAiB,EAAC,KAAK,CAAC,CAAC,CAAC;QACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAA,aAAM,EAAC;IACL,iBAAiB,mBAAA;IACjB,aAAa,eAAA;IACb,UAAU,YAAA;CACX,CAAC,CAAC,KAAK,CAAC,UAAC,KAAK;IACb,OAAO,CAAC,KAAK,CAAC,IAAA,wBAAiB,EAAC,KAAK,CAAC,CAAC,CAAC;IACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,38 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
"name": "@messagevisor/cli",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "CLI package of Messagevisor",
|
|
5
|
+
"main": "bin.js",
|
|
6
|
+
"types": "lib/index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"messagevisor": "bin.js"
|
|
9
|
+
},
|
|
10
|
+
"scripts": {
|
|
11
|
+
"transpile": "rimraf lib && tsc --project tsconfig.cjs.json",
|
|
12
|
+
"dist": "echo 'Nothing to dist here'",
|
|
13
|
+
"build": "npm run transpile",
|
|
14
|
+
"test": "echo 'Nothing to test in this package'",
|
|
15
|
+
"typecheck": "tsc --noEmit --skipLibCheck -p tsconfig.typecheck.json"
|
|
16
|
+
},
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Fahad Heylaal",
|
|
19
|
+
"url": "https://fahad19.com"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://messagevisor.com",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/messagevisor/messagevisor.git"
|
|
25
|
+
},
|
|
26
|
+
"publishConfig": {
|
|
27
|
+
"access": "public",
|
|
28
|
+
"registry": "https://registry.npmjs.org/"
|
|
29
|
+
},
|
|
30
|
+
"bugs": {
|
|
31
|
+
"url": "https://github.com/messagevisor/messagevisor/issues"
|
|
32
|
+
},
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@messagevisor/core": "0.2.0"
|
|
36
|
+
},
|
|
37
|
+
"gitHead": "53cfef1a5ae28724b24226dd3a32ff813b063ce3"
|
|
15
38
|
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { runCLI, getProjectConfig, Datasource, getCLIErrorOutput } from "@messagevisor/core";
|
|
2
|
+
|
|
3
|
+
const rootDirectoryPath = process.cwd();
|
|
4
|
+
|
|
5
|
+
let projectConfig;
|
|
6
|
+
let datasource;
|
|
7
|
+
|
|
8
|
+
try {
|
|
9
|
+
projectConfig = getProjectConfig(rootDirectoryPath);
|
|
10
|
+
datasource = new Datasource(projectConfig, rootDirectoryPath);
|
|
11
|
+
} catch (error) {
|
|
12
|
+
const command = process.argv.slice(2)[0];
|
|
13
|
+
|
|
14
|
+
if (command !== "init" && command !== "help" && command !== "--help" && command !== "-h") {
|
|
15
|
+
console.error(getCLIErrorOutput(error));
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
runCLI({
|
|
21
|
+
rootDirectoryPath,
|
|
22
|
+
projectConfig,
|
|
23
|
+
datasource,
|
|
24
|
+
}).catch((error) => {
|
|
25
|
+
console.error(getCLIErrorOutput(error));
|
|
26
|
+
process.exit(1);
|
|
27
|
+
});
|