@promptscript/cli 1.0.0-alpha.1 → 1.0.0-alpha.10
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 +123 -0
- package/README.md +56 -9
- package/index.js +16213 -18545
- package/package.json +29 -17
- package/src/cli.d.ts.map +1 -1
- package/src/commands/compile.d.ts +2 -1
- package/src/commands/compile.d.ts.map +1 -1
- package/src/commands/diff.d.ts.map +1 -1
- package/src/commands/init.d.ts.map +1 -1
- package/src/commands/update-check.d.ts +6 -0
- package/src/commands/update-check.d.ts.map +1 -0
- package/src/commands/validate.d.ts.map +1 -1
- package/src/index.d.ts +3 -0
- package/src/index.d.ts.map +1 -1
- package/src/output/console.d.ts +15 -1
- package/src/output/console.d.ts.map +1 -1
- package/src/prettier/index.d.ts +2 -0
- package/src/prettier/index.d.ts.map +1 -0
- package/src/prettier/loader.d.ts +36 -0
- package/src/prettier/loader.d.ts.map +1 -0
- package/src/services.d.ts +1 -0
- package/src/services.d.ts.map +1 -1
- package/src/templates/migrate-skill.d.ts +9 -0
- package/src/templates/migrate-skill.d.ts.map +1 -0
- package/src/types.d.ts +4 -2
- package/src/types.d.ts.map +1 -1
- package/src/utils/ai-tools-detector.d.ts +10 -0
- package/src/utils/ai-tools-detector.d.ts.map +1 -1
- package/src/utils/manifest-loader.d.ts +157 -0
- package/src/utils/manifest-loader.d.ts.map +1 -0
- package/src/utils/registry-resolver.d.ts +41 -0
- package/src/utils/registry-resolver.d.ts.map +1 -0
- package/src/utils/suggestion-engine.d.ts +56 -0
- package/src/utils/suggestion-engine.d.ts.map +1 -0
- package/src/utils/version-check.d.ts +48 -0
- package/src/utils/version-check.d.ts.map +1 -0
- package/package.publish.json +0 -32
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Result of a version check.
|
|
3
|
+
*/
|
|
4
|
+
export interface UpdateInfo {
|
|
5
|
+
currentVersion: string;
|
|
6
|
+
latestVersion: string;
|
|
7
|
+
updateAvailable: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get the cache directory path.
|
|
11
|
+
* Uses ~/.promptscript/.cache/ for consistency with Git registry cache.
|
|
12
|
+
*
|
|
13
|
+
* - All platforms: ~/.promptscript/.cache/
|
|
14
|
+
*/
|
|
15
|
+
export declare function getCacheDir(): string;
|
|
16
|
+
/**
|
|
17
|
+
* Get the full path to the version cache file.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getCachePath(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Fetch the latest version from npm registry.
|
|
22
|
+
* Returns null on any network error.
|
|
23
|
+
*/
|
|
24
|
+
export declare function fetchLatestVersion(): Promise<string | null>;
|
|
25
|
+
/**
|
|
26
|
+
* Check for updates automatically (respects cache).
|
|
27
|
+
* Called from preAction hook.
|
|
28
|
+
*
|
|
29
|
+
* @param currentVersion - The current CLI version
|
|
30
|
+
* @returns Update info if a newer version is available, null otherwise
|
|
31
|
+
*/
|
|
32
|
+
export declare function checkForUpdates(currentVersion: string): Promise<UpdateInfo | null>;
|
|
33
|
+
/**
|
|
34
|
+
* Force check for updates (ignores cache).
|
|
35
|
+
* Used by the update-check command.
|
|
36
|
+
*
|
|
37
|
+
* @param currentVersion - The current CLI version
|
|
38
|
+
* @returns Update info with check result
|
|
39
|
+
*/
|
|
40
|
+
export declare function forceCheckForUpdates(currentVersion: string): Promise<{
|
|
41
|
+
info: UpdateInfo | null;
|
|
42
|
+
error: boolean;
|
|
43
|
+
}>;
|
|
44
|
+
/**
|
|
45
|
+
* Print the update notification message.
|
|
46
|
+
*/
|
|
47
|
+
export declare function printUpdateNotification(info: UpdateInfo): void;
|
|
48
|
+
//# sourceMappingURL=version-check.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version-check.d.ts","sourceRoot":"","sources":["../../../../../packages/cli/src/utils/version-check.ts"],"names":[],"mappings":"AAkBA;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAEpC;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AA+CD;;;GAGG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA+BjE;AAoCD;;;;;;GAMG;AACH,wBAAsB,eAAe,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,GAAG,IAAI,CAAC,CAgDxF;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC;IAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAwBtD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAI9D"}
|
package/package.publish.json
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@promptscript/cli",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"description": "CLI for PromptScript - The Infrastructure-as-Code for AI Context",
|
|
5
|
-
"repository": {
|
|
6
|
-
"type": "git",
|
|
7
|
-
"url": "https://github.com/mrwogu/promptscript.git",
|
|
8
|
-
"directory": "packages/cli"
|
|
9
|
-
},
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
13
|
-
"type": "module",
|
|
14
|
-
"main": "./index.js",
|
|
15
|
-
"bin": {
|
|
16
|
-
"prs": "./bin/prs.js",
|
|
17
|
-
"promptscript": "./bin/prs.js"
|
|
18
|
-
},
|
|
19
|
-
"dependencies": {
|
|
20
|
-
"@inquirer/prompts": "^8.2.0",
|
|
21
|
-
"chalk": "^5.6.2",
|
|
22
|
-
"chokidar": "^5.0.0",
|
|
23
|
-
"commander": "^14.0.2",
|
|
24
|
-
"ora": "^9.0.0",
|
|
25
|
-
"yaml": "^2.8.2"
|
|
26
|
-
},
|
|
27
|
-
"engines": {
|
|
28
|
-
"node": ">=18"
|
|
29
|
-
},
|
|
30
|
-
"keywords": ["promptscript", "ai", "cli", "copilot", "claude", "cursor"],
|
|
31
|
-
"license": "MIT"
|
|
32
|
-
}
|