@agentmark-ai/cli 0.4.1 → 0.5.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/dist/.next/BUILD_ID +1 -1
- package/dist/.next/build-manifest.json +2 -2
- package/dist/.next/cache/.previewinfo +1 -1
- package/dist/.next/cache/.rscinfo +1 -1
- package/dist/.next/cache/.tsbuildinfo +1 -1
- package/dist/.next/cache/config.json +3 -3
- package/dist/.next/cache/webpack/client-production/0.pack +0 -0
- package/dist/.next/cache/webpack/client-production/index.pack +0 -0
- package/dist/.next/cache/webpack/edge-server-production/index.pack +0 -0
- package/dist/.next/cache/webpack/server-production/0.pack +0 -0
- package/dist/.next/cache/webpack/server-production/index.pack +0 -0
- package/dist/.next/prerender-manifest.json +13 -13
- package/dist/.next/server/app/_not-found.html +1 -1
- package/dist/.next/server/app/_not-found.rsc +1 -1
- package/dist/.next/server/app/index.html +1 -1
- package/dist/.next/server/app/index.rsc +1 -1
- package/dist/.next/server/app/requests.html +1 -1
- package/dist/.next/server/app/requests.rsc +1 -1
- package/dist/.next/server/app/sessions.html +1 -1
- package/dist/.next/server/app/sessions.rsc +1 -1
- package/dist/.next/server/app/traces.html +1 -1
- package/dist/.next/server/app/traces.rsc +1 -1
- package/dist/.next/server/pages/404.html +1 -1
- package/dist/.next/server/pages/500.html +1 -1
- package/dist/.next/server/server-reference-manifest.json +1 -1
- package/dist/.next/trace +52 -52
- package/dist/cloudflared/download.d.ts +12 -0
- package/dist/cloudflared/download.js +130 -0
- package/dist/cloudflared/download.js.map +1 -0
- package/dist/cloudflared/index.d.ts +9 -0
- package/dist/cloudflared/index.js +20 -0
- package/dist/cloudflared/index.js.map +1 -0
- package/dist/cloudflared/platform.d.ts +20 -0
- package/dist/cloudflared/platform.js +79 -0
- package/dist/cloudflared/platform.js.map +1 -0
- package/dist/cloudflared/tunnel.d.ts +16 -0
- package/dist/cloudflared/tunnel.js +129 -0
- package/dist/cloudflared/tunnel.js.map +1 -0
- package/dist/cloudflared/types.d.ts +53 -0
- package/dist/cloudflared/types.js +8 -0
- package/dist/cloudflared/types.js.map +1 -0
- package/dist/commands/dev.js +20 -6
- package/dist/commands/dev.js.map +1 -1
- package/dist/index.js +14 -1
- package/dist/index.js.map +1 -1
- package/dist/runner-server/core.js +99 -1
- package/dist/runner-server/core.js.map +1 -1
- package/dist/tunnel.d.ts +3 -16
- package/dist/tunnel.js +5 -128
- package/dist/tunnel.js.map +1 -1
- package/dist/update-notifier/checker.d.ts +26 -0
- package/dist/update-notifier/checker.js +142 -0
- package/dist/update-notifier/checker.js.map +1 -0
- package/dist/update-notifier/constants.d.ts +11 -0
- package/dist/update-notifier/constants.js +15 -0
- package/dist/update-notifier/constants.js.map +1 -0
- package/dist/update-notifier/display.d.ts +24 -0
- package/dist/update-notifier/display.js +90 -0
- package/dist/update-notifier/display.js.map +1 -0
- package/dist/update-notifier/index.d.ts +10 -0
- package/dist/update-notifier/index.js +26 -0
- package/dist/update-notifier/index.js.map +1 -0
- package/dist/update-notifier/types.d.ts +25 -0
- package/dist/update-notifier/types.js +6 -0
- package/dist/update-notifier/types.js.map +1 -0
- package/package.json +1 -3
- /package/dist/.next/static/{YsWMMoO7eekSvkhnayCuF → tydEj7UBhUC9ioggdb9um}/_buildManifest.js +0 -0
- /package/dist/.next/static/{YsWMMoO7eekSvkhnayCuF → tydEj7UBhUC9ioggdb9um}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Display logic for update notifications.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.detectPackageManager = detectPackageManager;
|
|
7
|
+
exports.displayUpdateNotification = displayUpdateNotification;
|
|
8
|
+
const fs_1 = require("fs");
|
|
9
|
+
const path_1 = require("path");
|
|
10
|
+
const constants_1 = require("./constants");
|
|
11
|
+
/**
|
|
12
|
+
* Detects the package manager used in the project by checking for lock files.
|
|
13
|
+
*
|
|
14
|
+
* @param cwd - Directory to check for lock files (defaults to process.cwd())
|
|
15
|
+
* @returns Package manager info with the appropriate upgrade command
|
|
16
|
+
*/
|
|
17
|
+
function detectPackageManager(cwd = process.cwd()) {
|
|
18
|
+
// Check for yarn.lock first (yarn)
|
|
19
|
+
if ((0, fs_1.existsSync)((0, path_1.join)(cwd, 'yarn.lock'))) {
|
|
20
|
+
return {
|
|
21
|
+
name: 'yarn',
|
|
22
|
+
command: `yarn upgrade ${constants_1.PACKAGE_NAME}`,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
// Check for pnpm-lock.yaml (pnpm)
|
|
26
|
+
if ((0, fs_1.existsSync)((0, path_1.join)(cwd, 'pnpm-lock.yaml'))) {
|
|
27
|
+
return {
|
|
28
|
+
name: 'pnpm',
|
|
29
|
+
command: `pnpm update ${constants_1.PACKAGE_NAME}`,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
// Default to npm
|
|
33
|
+
return {
|
|
34
|
+
name: 'npm',
|
|
35
|
+
command: `npm update ${constants_1.PACKAGE_NAME}`,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Displays an update notification to stderr if an update is available.
|
|
40
|
+
* Uses a boxed format with Unicode characters for visibility.
|
|
41
|
+
* Adapts to terminal width to avoid rendering issues.
|
|
42
|
+
*
|
|
43
|
+
* @param result - The result of the update check
|
|
44
|
+
* @param cwd - Directory to check for package manager (defaults to process.cwd())
|
|
45
|
+
*/
|
|
46
|
+
function displayUpdateNotification(result, cwd) {
|
|
47
|
+
if (result.status !== 'update-available') {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const { currentVersion, latestVersion } = result.info;
|
|
51
|
+
const { command } = detectPackageManager(cwd);
|
|
52
|
+
// Get terminal width, default to 80 if unavailable
|
|
53
|
+
const terminalWidth = process.stderr.columns || 80;
|
|
54
|
+
// Calculate box width based on content, but cap at terminal width - 2 for safety
|
|
55
|
+
const versionLine = ` Update available! ${currentVersion} → ${latestVersion}`;
|
|
56
|
+
const commandLine = ` Run: ${command}`;
|
|
57
|
+
const maxContentWidth = Math.max(versionLine.length, commandLine.length);
|
|
58
|
+
const maxBoxWidth = Math.min(terminalWidth - 2, maxContentWidth + 4);
|
|
59
|
+
// If terminal is too narrow, use simple format without box
|
|
60
|
+
if (maxBoxWidth < 40) {
|
|
61
|
+
const simpleNotification = `\nUpdate available: ${currentVersion} → ${latestVersion}\nRun: ${command}\n`;
|
|
62
|
+
process.stderr.write(simpleNotification);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const boxWidth = maxBoxWidth;
|
|
66
|
+
// Truncate lines if needed
|
|
67
|
+
const truncate = (str, width) => {
|
|
68
|
+
if (str.length <= width)
|
|
69
|
+
return str.padEnd(width);
|
|
70
|
+
return str.slice(0, width - 3) + '...';
|
|
71
|
+
};
|
|
72
|
+
// Build the notification box
|
|
73
|
+
const topBorder = '╭' + '─'.repeat(boxWidth) + '╮';
|
|
74
|
+
const bottomBorder = '╰' + '─'.repeat(boxWidth) + '╯';
|
|
75
|
+
const emptyLine = '│' + ' '.repeat(boxWidth) + '│';
|
|
76
|
+
const versionLineFormatted = '│' + truncate(versionLine, boxWidth) + '│';
|
|
77
|
+
const commandLineFormatted = '│' + truncate(commandLine, boxWidth) + '│';
|
|
78
|
+
const notification = [
|
|
79
|
+
'',
|
|
80
|
+
topBorder,
|
|
81
|
+
emptyLine,
|
|
82
|
+
versionLineFormatted,
|
|
83
|
+
commandLineFormatted,
|
|
84
|
+
emptyLine,
|
|
85
|
+
bottomBorder,
|
|
86
|
+
'',
|
|
87
|
+
].join('\n');
|
|
88
|
+
process.stderr.write(notification);
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=display.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display.js","sourceRoot":"","sources":["../../cli-src/update-notifier/display.ts"],"names":[],"mappings":";AA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,oBAAoB;QACpB,oBAAoB;QACpB,SAAS;QACT,YAAY;QACZ,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAEb,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;AACrC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update notifier module - checks for CLI updates and displays notifications.
|
|
3
|
+
*
|
|
4
|
+
* @module update-notifier
|
|
5
|
+
*/
|
|
6
|
+
export type { UpdateInfo, UpdateCheckResult } from './types';
|
|
7
|
+
export { REQUEST_TIMEOUT_MS, NPM_REGISTRY_URL, PACKAGE_NAME, DISABLE_UPDATE_CHECK_ENV, } from './constants';
|
|
8
|
+
export { startUpdateCheck, isUpdateCheckDisabled, isNewerVersion, getCurrentVersion, fetchLatestVersion, } from './checker';
|
|
9
|
+
export { displayUpdateNotification, detectPackageManager, } from './display';
|
|
10
|
+
export type { PackageManagerInfo } from './display';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Update notifier module - checks for CLI updates and displays notifications.
|
|
4
|
+
*
|
|
5
|
+
* @module update-notifier
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.detectPackageManager = exports.displayUpdateNotification = exports.fetchLatestVersion = exports.getCurrentVersion = exports.isNewerVersion = exports.isUpdateCheckDisabled = exports.startUpdateCheck = exports.DISABLE_UPDATE_CHECK_ENV = exports.PACKAGE_NAME = exports.NPM_REGISTRY_URL = exports.REQUEST_TIMEOUT_MS = void 0;
|
|
9
|
+
// Re-export constants
|
|
10
|
+
var constants_1 = require("./constants");
|
|
11
|
+
Object.defineProperty(exports, "REQUEST_TIMEOUT_MS", { enumerable: true, get: function () { return constants_1.REQUEST_TIMEOUT_MS; } });
|
|
12
|
+
Object.defineProperty(exports, "NPM_REGISTRY_URL", { enumerable: true, get: function () { return constants_1.NPM_REGISTRY_URL; } });
|
|
13
|
+
Object.defineProperty(exports, "PACKAGE_NAME", { enumerable: true, get: function () { return constants_1.PACKAGE_NAME; } });
|
|
14
|
+
Object.defineProperty(exports, "DISABLE_UPDATE_CHECK_ENV", { enumerable: true, get: function () { return constants_1.DISABLE_UPDATE_CHECK_ENV; } });
|
|
15
|
+
// Public API - checker functions
|
|
16
|
+
var checker_1 = require("./checker");
|
|
17
|
+
Object.defineProperty(exports, "startUpdateCheck", { enumerable: true, get: function () { return checker_1.startUpdateCheck; } });
|
|
18
|
+
Object.defineProperty(exports, "isUpdateCheckDisabled", { enumerable: true, get: function () { return checker_1.isUpdateCheckDisabled; } });
|
|
19
|
+
Object.defineProperty(exports, "isNewerVersion", { enumerable: true, get: function () { return checker_1.isNewerVersion; } });
|
|
20
|
+
Object.defineProperty(exports, "getCurrentVersion", { enumerable: true, get: function () { return checker_1.getCurrentVersion; } });
|
|
21
|
+
Object.defineProperty(exports, "fetchLatestVersion", { enumerable: true, get: function () { return checker_1.fetchLatestVersion; } });
|
|
22
|
+
// Public API - display functions
|
|
23
|
+
var display_1 = require("./display");
|
|
24
|
+
Object.defineProperty(exports, "displayUpdateNotification", { enumerable: true, get: function () { return display_1.displayUpdateNotification; } });
|
|
25
|
+
Object.defineProperty(exports, "detectPackageManager", { enumerable: true, get: function () { return display_1.detectPackageManager; } });
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../cli-src/update-notifier/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAKH,sBAAsB;AACtB,yCAKqB;AAJnB,+GAAA,kBAAkB,OAAA;AAClB,6GAAA,gBAAgB,OAAA;AAChB,yGAAA,YAAY,OAAA;AACZ,qHAAA,wBAAwB,OAAA;AAG1B,iCAAiC;AACjC,qCAMmB;AALjB,2GAAA,gBAAgB,OAAA;AAChB,gHAAA,qBAAqB,OAAA;AACrB,yGAAA,cAAc,OAAA;AACd,4GAAA,iBAAiB,OAAA;AACjB,6GAAA,kBAAkB,OAAA;AAGpB,iCAAiC;AACjC,qCAGmB;AAFjB,oHAAA,yBAAyB,OAAA;AACzB,+GAAA,oBAAoB,OAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for the update notifier module.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Result of comparing current version to latest.
|
|
6
|
+
*/
|
|
7
|
+
export interface UpdateInfo {
|
|
8
|
+
currentVersion: string;
|
|
9
|
+
latestVersion: string;
|
|
10
|
+
updateAvailable: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Result of an update check operation.
|
|
14
|
+
*/
|
|
15
|
+
export type UpdateCheckResult = {
|
|
16
|
+
status: 'update-available';
|
|
17
|
+
info: UpdateInfo;
|
|
18
|
+
} | {
|
|
19
|
+
status: 'up-to-date';
|
|
20
|
+
info: UpdateInfo;
|
|
21
|
+
} | {
|
|
22
|
+
status: 'check-disabled';
|
|
23
|
+
} | {
|
|
24
|
+
status: 'check-failed';
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../cli-src/update-notifier/types.ts"],"names":[],"mappings":";AAAA;;GAEG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentmark-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Agentmark's CLI",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"express": "^4.20.0",
|
|
46
46
|
"express-rate-limit": "^8.2.1",
|
|
47
47
|
"fs-extra": "^11.2.0",
|
|
48
|
-
"localtunnel": "^2.0.2",
|
|
49
48
|
"lodash": "^4.17.21",
|
|
50
49
|
"next": "15.5.9",
|
|
51
50
|
"next-intl": "^4.4.0",
|
|
@@ -63,7 +62,6 @@
|
|
|
63
62
|
"@types/express": "^4",
|
|
64
63
|
"@types/fs-extra": "^11.0.4",
|
|
65
64
|
"@types/jest": "^29.5.13",
|
|
66
|
-
"@types/localtunnel": "^2.0.4",
|
|
67
65
|
"@types/mdast": "^4.0.0",
|
|
68
66
|
"@types/node": "^20",
|
|
69
67
|
"@types/prompts": "^2",
|
/package/dist/.next/static/{YsWMMoO7eekSvkhnayCuF → tydEj7UBhUC9ioggdb9um}/_buildManifest.js
RENAMED
|
File without changes
|
|
File without changes
|