@kradle/cli 0.0.2 → 0.0.4
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/commands/challenge/create.js +2 -0
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
- package/bin/dev.cmd +0 -3
- package/bin/dev.js +0 -14
|
@@ -51,6 +51,8 @@ export default class Create extends Command {
|
|
|
51
51
|
const challengeData = await api.getChallenge(args.challenge);
|
|
52
52
|
// Remove fields that shouldn't be in the config file
|
|
53
53
|
const { id, creationTime, updateTime, creator, ...cleanChallenge } = challengeData;
|
|
54
|
+
// We remove the username prefix from the slug, to make the challenge easy to share with others
|
|
55
|
+
cleanChallenge.slug = cleanChallenge.slug.split(":")[1];
|
|
54
56
|
// Remove quotes from keys
|
|
55
57
|
const configStr = JSON.stringify(cleanChallenge, null, 2).replace(/"([a-zA-Z0-9_]+)":/g, "$1:");
|
|
56
58
|
await fs.writeFile(challenge.configPath, `
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kradle/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Kradle's CLI. Manage challenges, evaluations, agents and more!",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cli"
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"lint": "biome check .",
|
|
27
27
|
"lint:fix": "biome check --write .",
|
|
28
28
|
"format": "biome format --write .",
|
|
29
|
-
"prepack": "
|
|
30
|
-
"postpack": "
|
|
29
|
+
"prepack": "sh scripts/prepack.sh",
|
|
30
|
+
"postpack": "sh scripts/postpack.sh",
|
|
31
31
|
"version": "oclif readme && git add README.md"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
package/bin/dev.cmd
DELETED
package/bin/dev.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env -S npx --yes tsx
|
|
2
|
-
|
|
3
|
-
import { execute } from "@oclif/core";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import fs from "node:fs";
|
|
6
|
-
import dotenv from "dotenv";
|
|
7
|
-
|
|
8
|
-
// Load .env file from cwd if it exists
|
|
9
|
-
const envPath = path.join(process.cwd(), ".env");
|
|
10
|
-
if (fs.existsSync(envPath)) {
|
|
11
|
-
dotenv.config({ path: envPath, quiet: true });
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
await execute({ development: true, dir: import.meta.url });
|