srcpack 0.1.0 → 0.1.1
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/cli.js +6 -6
- package/package.json +2 -1
- package/src/cli.ts +8 -6
package/dist/cli.js
CHANGED
|
@@ -189467,17 +189467,16 @@ Usage:
|
|
|
189467
189467
|
npx srcpack Bundle all, upload if configured
|
|
189468
189468
|
npx srcpack web api Bundle specific bundles only
|
|
189469
189469
|
npx srcpack --dry-run Bundle without upload (preview)
|
|
189470
|
-
npx srcpack
|
|
189470
|
+
npx srcpack init Interactive config setup
|
|
189471
189471
|
npx srcpack login Authenticate with Google Drive
|
|
189472
189472
|
|
|
189473
189473
|
Options:
|
|
189474
189474
|
--dry-run Preview bundles without uploading
|
|
189475
|
-
--init Create configuration file
|
|
189476
189475
|
-h, --help Show this help message
|
|
189477
189476
|
`);
|
|
189478
189477
|
return;
|
|
189479
189478
|
}
|
|
189480
|
-
if (args.includes("
|
|
189479
|
+
if (args.includes("init")) {
|
|
189481
189480
|
await runInit();
|
|
189482
189481
|
return;
|
|
189483
189482
|
}
|
|
@@ -189486,10 +189485,11 @@ Options:
|
|
|
189486
189485
|
return;
|
|
189487
189486
|
}
|
|
189488
189487
|
const dryRun = args.includes("--dry-run");
|
|
189489
|
-
const
|
|
189488
|
+
const subcommands = ["init", "login"];
|
|
189489
|
+
const requestedBundles = args.filter((arg) => !arg.startsWith("-") && !subcommands.includes(arg));
|
|
189490
189490
|
const config2 = await loadConfig();
|
|
189491
189491
|
if (!config2) {
|
|
189492
|
-
console.error("No configuration found. Run `npx srcpack
|
|
189492
|
+
console.error("No configuration found. Run `npx srcpack init` to create one.");
|
|
189493
189493
|
process.exit(1);
|
|
189494
189494
|
}
|
|
189495
189495
|
const bundleNames = requestedBundles.length ? requestedBundles : Object.keys(config2.bundles);
|
|
@@ -189565,7 +189565,7 @@ function getGdriveConfig(config2) {
|
|
|
189565
189565
|
async function runLogin() {
|
|
189566
189566
|
const config2 = await loadConfig();
|
|
189567
189567
|
if (!config2) {
|
|
189568
|
-
console.error("No configuration found. Run `npx srcpack
|
|
189568
|
+
console.error("No configuration found. Run `npx srcpack init` to create one.");
|
|
189569
189569
|
process.exit(1);
|
|
189570
189570
|
}
|
|
189571
189571
|
const uploadConfig = getGdriveConfig(config2);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "srcpack",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Zero-config CLI for bundling code into LLM-optimized context files",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"llm",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"homepage": "https://kriasoft.com/srcpack/",
|
|
33
33
|
"repository": "github:kriasoft/srcpack",
|
|
34
34
|
"type": "module",
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
35
36
|
"exports": {
|
|
36
37
|
".": {
|
|
37
38
|
"types": "./dist/index.d.ts",
|
package/src/cli.ts
CHANGED
|
@@ -37,18 +37,17 @@ Usage:
|
|
|
37
37
|
npx srcpack Bundle all, upload if configured
|
|
38
38
|
npx srcpack web api Bundle specific bundles only
|
|
39
39
|
npx srcpack --dry-run Bundle without upload (preview)
|
|
40
|
-
npx srcpack
|
|
40
|
+
npx srcpack init Interactive config setup
|
|
41
41
|
npx srcpack login Authenticate with Google Drive
|
|
42
42
|
|
|
43
43
|
Options:
|
|
44
44
|
--dry-run Preview bundles without uploading
|
|
45
|
-
--init Create configuration file
|
|
46
45
|
-h, --help Show this help message
|
|
47
46
|
`);
|
|
48
47
|
return;
|
|
49
48
|
}
|
|
50
49
|
|
|
51
|
-
if (args.includes("
|
|
50
|
+
if (args.includes("init")) {
|
|
52
51
|
await runInit();
|
|
53
52
|
return;
|
|
54
53
|
}
|
|
@@ -59,13 +58,16 @@ Options:
|
|
|
59
58
|
}
|
|
60
59
|
|
|
61
60
|
const dryRun = args.includes("--dry-run");
|
|
62
|
-
const
|
|
61
|
+
const subcommands = ["init", "login"];
|
|
62
|
+
const requestedBundles = args.filter(
|
|
63
|
+
(arg) => !arg.startsWith("-") && !subcommands.includes(arg),
|
|
64
|
+
);
|
|
63
65
|
|
|
64
66
|
const config = await loadConfig();
|
|
65
67
|
|
|
66
68
|
if (!config) {
|
|
67
69
|
console.error(
|
|
68
|
-
"No configuration found. Run `npx srcpack
|
|
70
|
+
"No configuration found. Run `npx srcpack init` to create one.",
|
|
69
71
|
);
|
|
70
72
|
process.exit(1);
|
|
71
73
|
}
|
|
@@ -190,7 +192,7 @@ async function runLogin(): Promise<void> {
|
|
|
190
192
|
|
|
191
193
|
if (!config) {
|
|
192
194
|
console.error(
|
|
193
|
-
"No configuration found. Run `npx srcpack
|
|
195
|
+
"No configuration found. Run `npx srcpack init` to create one.",
|
|
194
196
|
);
|
|
195
197
|
process.exit(1);
|
|
196
198
|
}
|