@constructive-io/cli 5.1.12 → 5.1.14
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/esm/index.js +2 -4
- package/esm/utils/display.js +0 -11
- package/index.js +2 -4
- package/package.json +7 -7
- package/utils/display.d.ts +0 -2
- package/utils/display.js +0 -16
package/esm/index.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { findAndRequirePackageJson } from 'find-and-require-package-json';
|
|
3
3
|
import { CLI } from 'inquirerer';
|
|
4
|
-
import { join } from 'path';
|
|
5
4
|
import { commands } from './commands';
|
|
6
5
|
if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
7
|
-
const
|
|
8
|
-
const pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
6
|
+
const pkg = findAndRequirePackageJson(__dirname);
|
|
9
7
|
console.log(pkg.version);
|
|
10
8
|
process.exit(0);
|
|
11
9
|
}
|
package/esm/utils/display.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
import { findAndRequirePackageJson } from 'find-and-require-package-json';
|
|
2
|
-
import yanse from 'yanse';
|
|
3
|
-
// Function to display the version information
|
|
4
|
-
export function displayVersion() {
|
|
5
|
-
const pkg = findAndRequirePackageJson(__dirname);
|
|
6
|
-
console.log(yanse.green(`Name: ${pkg.name}`));
|
|
7
|
-
console.log(yanse.blue(`Version: ${pkg.version}`));
|
|
8
|
-
}
|
|
9
1
|
export const usageText = `
|
|
10
2
|
Usage: cnc <command> [options]
|
|
11
3
|
constructive <command> [options]
|
|
@@ -56,6 +48,3 @@ export const usageText = `
|
|
|
56
48
|
cnc server --port 8080 Start server on port 8080
|
|
57
49
|
cnc init workspace Initialize new workspace
|
|
58
50
|
`;
|
|
59
|
-
export function displayUsage() {
|
|
60
|
-
console.log(usageText);
|
|
61
|
-
}
|
package/index.js
CHANGED
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.options = void 0;
|
|
5
|
-
const
|
|
5
|
+
const find_and_require_package_json_1 = require("find-and-require-package-json");
|
|
6
6
|
const inquirerer_1 = require("inquirerer");
|
|
7
|
-
const path_1 = require("path");
|
|
8
7
|
const commands_1 = require("./commands");
|
|
9
8
|
if (process.argv.includes('--version') || process.argv.includes('-v')) {
|
|
10
|
-
const
|
|
11
|
-
const pkg = JSON.parse((0, fs_1.readFileSync)(pkgPath, 'utf8'));
|
|
9
|
+
const pkg = (0, find_and_require_package_json_1.findAndRequirePackageJson)(__dirname);
|
|
12
10
|
console.log(pkg.version);
|
|
13
11
|
process.exit(0);
|
|
14
12
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constructive-io/cli",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.14",
|
|
4
4
|
"author": "Constructive <developers@constructive.io>",
|
|
5
5
|
"description": "Constructive CLI",
|
|
6
6
|
"main": "index.js",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"ts-node": "^10.9.2"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@constructive-io/graphql-codegen": "^2.17.
|
|
49
|
+
"@constructive-io/graphql-codegen": "^2.17.22",
|
|
50
50
|
"@constructive-io/graphql-env": "^2.8.8",
|
|
51
|
-
"@constructive-io/graphql-explorer": "^2.10.
|
|
52
|
-
"@constructive-io/graphql-server": "^2.10.
|
|
53
|
-
"@pgpmjs/core": "^3.
|
|
51
|
+
"@constructive-io/graphql-explorer": "^2.10.16",
|
|
52
|
+
"@constructive-io/graphql-server": "^2.10.16",
|
|
53
|
+
"@pgpmjs/core": "^3.2.0",
|
|
54
54
|
"@pgpmjs/logger": "^1.3.5",
|
|
55
55
|
"@pgpmjs/server-utils": "^2.8.8",
|
|
56
56
|
"@pgpmjs/types": "^2.12.6",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"minimist": "^1.2.8",
|
|
61
61
|
"pg-cache": "^1.6.9",
|
|
62
62
|
"pg-env": "^1.2.4",
|
|
63
|
-
"pgpm": "^1.
|
|
63
|
+
"pgpm": "^1.3.0",
|
|
64
64
|
"shelljs": "^0.10.0",
|
|
65
65
|
"yanse": "^0.1.8"
|
|
66
66
|
},
|
|
@@ -75,5 +75,5 @@
|
|
|
75
75
|
"postgres",
|
|
76
76
|
"graphile"
|
|
77
77
|
],
|
|
78
|
-
"gitHead": "
|
|
78
|
+
"gitHead": "f041cbb1c54277b1b408af5b44d5a8cae933bae7"
|
|
79
79
|
}
|
package/utils/display.d.ts
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
export declare function displayVersion(): void;
|
|
2
1
|
export declare const usageText = "\n Usage: cnc <command> [options]\n constructive <command> [options]\n \n Core Database Operations:\n add Add database changes to plans and create SQL files\n deploy Deploy database changes and migrations\n verify Verify database state and migrations\n revert Revert database changes and migrations\n \n Project Management:\n init Initialize pgpm workspace or module\n extension Manage module dependencies\n plan Generate module deployment plans\n package Package module for distribution\n update Update CLI/pgpm (installs pgpm by default)\n cache Manage cached templates (clean)\n \n Development Tools:\n server Start a GraphQL server\n explorer Launch GraphiQL explorer interface\n docker Manage PostgreSQL Docker containers (start/stop)\n export Export database migrations from existing databases\n \n Database Administration:\n kill Terminate database connections and optionally drop databases\n install Install pgpm modules\n tag Add tags to changes for versioning\n \n Migration Tools:\n migrate Migration management subcommands\n init Initialize migration tracking\n status Show migration status\n list List all changes\n deps Show change dependencies\n \n Global Options:\n -h, --help Display this help information\n -v, --version Display version information\n --cwd <directory> Working directory (default: current directory)\n \n Individual Command Help:\n constructive <command> --help Display detailed help for specific command\n constructive <command> -h Display detailed help for specific command\n \n Examples:\n cnc deploy --help Show deploy command options\n cnc server --port 8080 Start server on port 8080\n cnc init workspace Initialize new workspace\n ";
|
|
3
|
-
export declare function displayUsage(): void;
|
package/utils/display.js
CHANGED
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
3
|
exports.usageText = void 0;
|
|
7
|
-
exports.displayVersion = displayVersion;
|
|
8
|
-
exports.displayUsage = displayUsage;
|
|
9
|
-
const find_and_require_package_json_1 = require("find-and-require-package-json");
|
|
10
|
-
const yanse_1 = __importDefault(require("yanse"));
|
|
11
|
-
// Function to display the version information
|
|
12
|
-
function displayVersion() {
|
|
13
|
-
const pkg = (0, find_and_require_package_json_1.findAndRequirePackageJson)(__dirname);
|
|
14
|
-
console.log(yanse_1.default.green(`Name: ${pkg.name}`));
|
|
15
|
-
console.log(yanse_1.default.blue(`Version: ${pkg.version}`));
|
|
16
|
-
}
|
|
17
4
|
exports.usageText = `
|
|
18
5
|
Usage: cnc <command> [options]
|
|
19
6
|
constructive <command> [options]
|
|
@@ -64,6 +51,3 @@ exports.usageText = `
|
|
|
64
51
|
cnc server --port 8080 Start server on port 8080
|
|
65
52
|
cnc init workspace Initialize new workspace
|
|
66
53
|
`;
|
|
67
|
-
function displayUsage() {
|
|
68
|
-
console.log(exports.usageText);
|
|
69
|
-
}
|