@reporting-bi/cli 0.1.7 → 0.1.8
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/dist/index.js +27 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2638,7 +2638,7 @@ var require_service = __commonJS({
|
|
|
2638
2638
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
2639
2639
|
exports2.Service = exports2.ServiceAuthException = exports2.ServiceEvent = exports2.ServiceException = exports2.serializeRequestParams = void 0;
|
|
2640
2640
|
var qs_1 = __importDefault(require_lib());
|
|
2641
|
-
var
|
|
2641
|
+
var cache_js_1 = require_cache();
|
|
2642
2642
|
function isObject2(value) {
|
|
2643
2643
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
2644
2644
|
}
|
|
@@ -2683,7 +2683,7 @@ var require_service = __commonJS({
|
|
|
2683
2683
|
}
|
|
2684
2684
|
get cache() {
|
|
2685
2685
|
if (!this._cache)
|
|
2686
|
-
this._cache = new
|
|
2686
|
+
this._cache = new cache_js_1.ServiceCache();
|
|
2687
2687
|
return this._cache;
|
|
2688
2688
|
}
|
|
2689
2689
|
constructor(options) {
|
|
@@ -2820,6 +2820,24 @@ var require_service = __commonJS({
|
|
|
2820
2820
|
const response = await this.putRaw(path7, data, params, options);
|
|
2821
2821
|
return this.handleResponse(response);
|
|
2822
2822
|
}
|
|
2823
|
+
async patchRaw(path7, data, params, options) {
|
|
2824
|
+
const url2 = this.createUrl(path7, params);
|
|
2825
|
+
this.dispatchEvent(new ServiceEvent2("beforeRequest", { url: url2, params, options, method: "PATCH" }));
|
|
2826
|
+
const json3 = isObject2(data) || Array.isArray(data);
|
|
2827
|
+
return fetch(url2, {
|
|
2828
|
+
method: "PATCH",
|
|
2829
|
+
body: json3 ? JSON.stringify(data) : data,
|
|
2830
|
+
headers: await this.createHeaders({
|
|
2831
|
+
...options?.headers ?? {},
|
|
2832
|
+
"Content-Type": `${json3 ? "application/json" : "text/plain"}; charset=UTF-8`
|
|
2833
|
+
}),
|
|
2834
|
+
credentials: this.credentials
|
|
2835
|
+
});
|
|
2836
|
+
}
|
|
2837
|
+
async patch(path7, data, params, options) {
|
|
2838
|
+
const response = await this.patchRaw(path7, data, params, options);
|
|
2839
|
+
return this.handleResponse(response);
|
|
2840
|
+
}
|
|
2823
2841
|
};
|
|
2824
2842
|
exports2.Service = Service2;
|
|
2825
2843
|
}
|
|
@@ -35161,7 +35179,7 @@ function text(data) {
|
|
|
35161
35179
|
async function mcp() {
|
|
35162
35180
|
const server = new McpServer({
|
|
35163
35181
|
name: "reporting-bi",
|
|
35164
|
-
version: "0.1.
|
|
35182
|
+
version: "0.1.8"
|
|
35165
35183
|
});
|
|
35166
35184
|
server.tool(
|
|
35167
35185
|
"status",
|
|
@@ -35707,8 +35725,8 @@ async function checkForUpdate() {
|
|
|
35707
35725
|
saveUpdateCheck({ lastCheck: now });
|
|
35708
35726
|
const latest = await fetchLatestVersion();
|
|
35709
35727
|
if (!latest) return;
|
|
35710
|
-
if (!isNewer(latest, "0.1.
|
|
35711
|
-
console.log(`\x1B[33mUpdating ${PACKAGE_NAME} ${"0.1.
|
|
35728
|
+
if (!isNewer(latest, "0.1.8")) return;
|
|
35729
|
+
console.log(`\x1B[33mUpdating ${PACKAGE_NAME} ${"0.1.8"} \u2192 ${latest}...\x1B[0m`);
|
|
35712
35730
|
(0, import_node_child_process3.execSync)(npmInstallCmd(latest), { stdio: "inherit" });
|
|
35713
35731
|
console.log(`\x1B[32mUpdated to ${latest}.\x1B[0m`);
|
|
35714
35732
|
} catch {
|
|
@@ -35720,11 +35738,11 @@ async function forceUpdate() {
|
|
|
35720
35738
|
console.error("Could not fetch latest version from npm.");
|
|
35721
35739
|
process.exit(1);
|
|
35722
35740
|
}
|
|
35723
|
-
if (!isNewer(latest, "0.1.
|
|
35724
|
-
console.log(`Already up to date (${"0.1.
|
|
35741
|
+
if (!isNewer(latest, "0.1.8")) {
|
|
35742
|
+
console.log(`Already up to date (${"0.1.8"}).`);
|
|
35725
35743
|
return;
|
|
35726
35744
|
}
|
|
35727
|
-
console.log(`Updating ${PACKAGE_NAME} ${"0.1.
|
|
35745
|
+
console.log(`Updating ${PACKAGE_NAME} ${"0.1.8"} \u2192 ${latest}...`);
|
|
35728
35746
|
(0, import_node_child_process3.execSync)(npmInstallCmd(latest), { stdio: "inherit" });
|
|
35729
35747
|
console.log(`\x1B[32mUpdated to ${latest}.\x1B[0m`);
|
|
35730
35748
|
saveUpdateCheck({ lastCheck: Date.now() });
|
|
@@ -35874,7 +35892,7 @@ Examples:
|
|
|
35874
35892
|
(async () => {
|
|
35875
35893
|
const [command, ...args] = process.argv.slice(2);
|
|
35876
35894
|
if (command === "--version" || command === "-v") {
|
|
35877
|
-
console.log("0.1.
|
|
35895
|
+
console.log("0.1.8");
|
|
35878
35896
|
return;
|
|
35879
35897
|
}
|
|
35880
35898
|
await checkForUpdate();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reporting-bi/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Reporting.bi CLI — command-line interface for the Reporting.bi platform",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"build": "yarn node build.mjs",
|
|
15
15
|
"watch": "yarn build --watch",
|
|
16
16
|
"rpbi": "yarn node dist/index.js",
|
|
17
|
-
"deploy-installers": "
|
|
17
|
+
"deploy-installers": "node -e \"const fs=require('fs');fs.cpSync('install.sh','../rp-static/install-cli.sh');fs.cpSync('install.ps1','../rp-static/install-cli.ps1')\"",
|
|
18
18
|
"release": "yarn node -e \"const p=require('./package.json');const v=p.version.split('.');v[2]++;p.version=v.join('.');require('fs').writeFileSync('package.json',JSON.stringify(p,null,'\\t')+'\\n')\" && yarn build && git add package.json && git commit -m \"rp-cli v$(yarn node -p \"require('./package.json').version\")\" && git push && yarn npm publish --access public"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|