@vsceasy/cli 0.1.4 → 0.1.6
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 +1 -0
- package/README.md +5 -3
- package/dist/bin/cli.js +4043 -153
- package/dist/index.js +3832 -9
- package/dist/lib/findProject.d.ts +12 -10
- package/dist/lib/templatesData.d.ts +2 -0
- package/package.json +4 -2
|
@@ -4,16 +4,18 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare function findProjectRoot(start?: string): string;
|
|
6
6
|
/**
|
|
7
|
-
* Resolves the bundled templates/ directory.
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*
|
|
12
|
-
*
|
|
7
|
+
* Resolves the bundled templates/ directory.
|
|
8
|
+
*
|
|
9
|
+
* In the source tree / npm-style installs an on-disk `templates/` exists next
|
|
10
|
+
* to the code, so we return that directly (fast, no extraction). When that is
|
|
11
|
+
* absent — notably a globally installed binary whose bin is a symlink, where
|
|
12
|
+
* walking the filesystem can never reach the package — we materialize the
|
|
13
|
+
* templates embedded in the binary (see scripts/embedTemplates.ts) into a
|
|
14
|
+
* stable temp dir and return that. Either way callers get a real directory,
|
|
15
|
+
* so every fs.readFileSync/readdirSync consumer keeps working unchanged.
|
|
13
16
|
*
|
|
14
|
-
* Callers
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* which does not exist on a user's machine.
|
|
17
|
+
* Callers may pass a runtime-real path (e.g. `process.argv[1]`) to seed the
|
|
18
|
+
* disk walk. Do NOT pass `__dirname`: the bundler inlines it as the
|
|
19
|
+
* build-machine path, which does not exist on a user's machine.
|
|
18
20
|
*/
|
|
19
21
|
export declare function findTemplatesRoot(fromFile?: string): string;
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vsceasy/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Build VS Code extensions fast — React UI + typed RPC bridge between extension and webview + file-based routing for panels, commands, menus, tree views, and subpanels.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
+
"pretest": "bun run embed:templates",
|
|
7
8
|
"test": "bun test ./src/tests",
|
|
8
9
|
"gen:types": "bun scripts/genCodiconTypes.ts",
|
|
9
10
|
"sync:runtime": "bun scripts/syncRuntime.ts",
|
|
11
|
+
"embed:templates": "bun scripts/embedTemplates.ts",
|
|
10
12
|
"build:runtime": "cd packages/vsceasy-runtime && bun install && bunx tsc",
|
|
11
|
-
"build": "bun run gen:types && bun run sync:runtime && bun run build:runtime && tsc --emitDeclarationOnly && bun build ./src/index.ts ./src/bin/cli.ts --target=node --outdir ./dist --format cjs",
|
|
13
|
+
"build": "bun run gen:types && bun run sync:runtime && bun run embed:templates && bun run build:runtime && tsc --emitDeclarationOnly && bun build ./src/index.ts ./src/bin/cli.ts --target=node --outdir ./dist --format cjs",
|
|
12
14
|
"build:test": "bun build ./src/tests/*.ts --target=node --outdir dist/tests --format cjs",
|
|
13
15
|
"prepublishOnly": "bun run build",
|
|
14
16
|
"start": "bun run src/cli.ts",
|