jsrepo 1.0.0 → 1.0.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/README.md CHANGED
@@ -1,5 +1,3 @@
1
1
  # jsrepo
2
2
 
3
- ```bash
4
- npx jsrepo@next init
5
- ```
3
+ CLI for [jsrepo](https://github.com/ieedan/jsrepo).
package/dist/index.js CHANGED
@@ -667,7 +667,7 @@ var Err = (err) => {
667
667
  };
668
668
 
669
669
  // src/config/index.ts
670
- var CONFIG_NAME = "blocks.json";
670
+ var CONFIG_NAME = "jsrepo.json";
671
671
  var schema = v.object({
672
672
  $schema: v.string(),
673
673
  repos: v.optional(v.array(v.string()), []),
@@ -681,7 +681,7 @@ var getConfig = () => {
681
681
  }
682
682
  const config = v.safeParse(schema, JSON.parse(fs.readFileSync(CONFIG_NAME).toString()));
683
683
  if (!config.success) {
684
- return Err("There was an error reading your `blocks.json` file!");
684
+ return Err(`There was an error reading your \`${CONFIG_NAME}\` file!`);
685
685
  }
686
686
  return Ok(config.output);
687
687
  };
@@ -695,7 +695,7 @@ import * as v2 from "valibot";
695
695
 
696
696
  // src/utils/index.ts
697
697
  import color from "chalk";
698
- var OUTPUT_FILE = "blocks-manifest.json";
698
+ var OUTPUT_FILE = "jsrepo-manifest.json";
699
699
  var WARN = color.bgRgb(245, 149, 66).white("WARN");
700
700
  var INFO = color.bgBlueBright.white("INFO");
701
701
 
@@ -1135,7 +1135,7 @@ var schema2 = v4.object({
1135
1135
  repo: v4.optional(v4.string()),
1136
1136
  allow: v4.boolean()
1137
1137
  });
1138
- var add = new Command("add").argument("[blocks...]", "Whichever block you want to add to your project.").option("-y, --yes", "Add and install any required dependencies.", false).option("-A, --allow", "Allow jsrepo to download code from the provided repo.", false).option("--repo <repo>", "Repository to download the blocks from").option("--verbose", "Include debug logs.", false).action(async (blockNames, opts) => {
1138
+ var add = new Command("add").argument("[blocks...]", "Names of the blocks you want to add to your project.").option("-y, --yes", "Add and install any required dependencies.", false).option("-A, --allow", "Allow jsrepo to download code from the provided repo.", false).option("--repo <repo>", "Repository to download the blocks from.").option("--verbose", "Include debug logs.", false).action(async (blockNames, opts) => {
1139
1139
  const options = v4.parse(schema2, opts);
1140
1140
  await _add(blockNames, options);
1141
1141
  });
@@ -1477,7 +1477,7 @@ var schema3 = v5.object({
1477
1477
  dirs: v5.array(v5.string()),
1478
1478
  cwd: v5.string()
1479
1479
  });
1480
- var build = new Command2("build").description(`Builds the provided --dirs in the project root into a \`${OUTPUT_FILE}\` file.`).option("--dirs [dirs...]", "The directories containing the blocks.", ["./blocks"]).option("--no-output", `Do not output a \`${OUTPUT_FILE}\` file.`).option("--verbose", "Include debug logs.", false).option("--cwd <cwd>", "The current working directory", process.cwd()).action(async (opts) => {
1480
+ var build = new Command2("build").description(`Builds the provided --dirs in the project root into a \`${OUTPUT_FILE}\` file.`).option("--dirs [dirs...]", "The directories containing the blocks.", ["./blocks"]).option("--no-output", `Do not output a \`${OUTPUT_FILE}\` file.`).option("--verbose", "Include debug logs.", false).option("--cwd <cwd>", "The current working directory.", process.cwd()).action(async (opts) => {
1481
1481
  const options = v5.parse(schema3, opts);
1482
1482
  await _build(options);
1483
1483
  });
@@ -1830,10 +1830,10 @@ var schema5 = v7.object({
1830
1830
  repos: v7.optional(v7.array(v7.string())),
1831
1831
  watermark: v7.boolean()
1832
1832
  });
1833
- var init = new Command4("init").description("Initializes the configuration file").option("--path <path>", "Path to install the blocks").option("--repos [repos...]", "Repository to install the blocks from").option(
1833
+ var init = new Command4("init").description("Initializes your project with a configuration file.").option("--path <path>", "Path to install the blocks.").option("--repos [repos...]", "Repository to install the blocks from.").option(
1834
1834
  "--no-watermark",
1835
1835
  "Will not add a watermark to each file upon adding it to your project."
1836
- ).option("--tests", "Will include tests along with the functions.").action(async (opts) => {
1836
+ ).option("--tests", "Will include tests with the blocks.").action(async (opts) => {
1837
1837
  const options = v7.parse(schema5, opts);
1838
1838
  await _init(options);
1839
1839
  });
@@ -1917,7 +1917,7 @@ var schema6 = v8.object({
1917
1917
  repo: v8.optional(v8.string()),
1918
1918
  allow: v8.boolean()
1919
1919
  });
1920
- var test = new Command5("test").description("Tests blocks against most recent tests").addArgument(new Argument("[blocks...]", "Whichever blocks you want to test.").default([])).option("--verbose", "Include debug logs.", false).option("-A, --allow", "Allow jsrepo to download code from the provided repo.", false).option("--repo <repo>", "Repository to download the blocks from").option("--debug", "Leaves the temp test file around for debugging upon failure.", false).action(async (blockNames, opts) => {
1920
+ var test = new Command5("test").description("Tests local blocks against most recent remote tests.").addArgument(new Argument("[blocks...]", "The blocks you want to test.").default([])).option("--verbose", "Include debug logs.", false).option("-A, --allow", "Allow jsrepo to download code from the provided repo.", false).option("--repo <repo>", "Repository to download the blocks from.").option("--debug", "Leaves the temp test file around for debugging upon failure.", false).action(async (blockNames, opts) => {
1921
1921
  const options = v8.parse(schema6, opts);
1922
1922
  await _test(blockNames, options);
1923
1923
  });
package/package.json CHANGED
@@ -1,16 +1,14 @@
1
1
  {
2
2
  "name": "jsrepo",
3
- "description": "A CLI to blocks to your project.",
4
- "version": "1.0.0",
3
+ "description": "A CLI to add shared code from remote repositories.",
4
+ "version": "1.0.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/ieedan/jsrepo"
8
8
  },
9
9
  "keywords": [
10
- "blocks",
11
- "typescript",
12
- "tested",
13
- "documented"
10
+ "repo",
11
+ "cli"
14
12
  ],
15
13
  "author": "Aidan Bleser",
16
14
  "license": "MIT",
@@ -28,8 +26,7 @@
28
26
  "README.md",
29
27
  "schema.json",
30
28
  "dist/**/*",
31
- "src/**/*",
32
- "blocks/**/*"
29
+ "src/**/*"
33
30
  ],
34
31
  "devDependencies": {
35
32
  "@biomejs/biome": "1.9.4",
@@ -41,7 +38,6 @@
41
38
  "vitest": "^2.1.5"
42
39
  },
43
40
  "dependencies": {
44
- "@changesets/cli": "^2.27.9",
45
41
  "@clack/prompts": "^0.8.1",
46
42
  "ansi-regex": "^6.1.0",
47
43
  "chalk": "^5.3.0",
@@ -61,9 +57,7 @@
61
57
  "build": "tsup",
62
58
  "format": "biome format --write",
63
59
  "lint": "biome lint --write",
64
- "check": "biome check",
65
- "ci:release": "tsup && changeset publish",
66
- "changeset": "changeset",
60
+ "check": "biome check && tsc",
67
61
  "test": "vitest",
68
62
  "check:types": "tsc"
69
63
  }
package/schema.json CHANGED
@@ -3,14 +3,14 @@
3
3
  "type": "object",
4
4
  "properties": {
5
5
  "repos": {
6
- "description": "Repositories to download blocks from.",
6
+ "description": "Repositories to download code from.",
7
7
  "type": "array",
8
8
  "items": {
9
9
  "type": "string"
10
10
  }
11
11
  },
12
12
  "path": {
13
- "description": "Path to add blocks to in your project.",
13
+ "description": "Path to add code to in your project.",
14
14
  "type": "string"
15
15
  },
16
16
  "includeTests": {
@@ -30,10 +30,10 @@ const schema = v.object({
30
30
  type Options = v.InferInput<typeof schema>;
31
31
 
32
32
  const add = new Command('add')
33
- .argument('[blocks...]', 'Whichever block you want to add to your project.')
33
+ .argument('[blocks...]', 'Names of the blocks you want to add to your project.')
34
34
  .option('-y, --yes', 'Add and install any required dependencies.', false)
35
35
  .option('-A, --allow', 'Allow jsrepo to download code from the provided repo.', false)
36
- .option('--repo <repo>', 'Repository to download the blocks from')
36
+ .option('--repo <repo>', 'Repository to download the blocks from.')
37
37
  .option('--verbose', 'Include debug logs.', false)
38
38
  .action(async (blockNames, opts) => {
39
39
  const options = v.parse(schema, opts);
@@ -23,7 +23,7 @@ const build = new Command('build')
23
23
  .option('--dirs [dirs...]', 'The directories containing the blocks.', ['./blocks'])
24
24
  .option('--no-output', `Do not output a \`${OUTPUT_FILE}\` file.`)
25
25
  .option('--verbose', 'Include debug logs.', false)
26
- .option('--cwd <cwd>', 'The current working directory', process.cwd())
26
+ .option('--cwd <cwd>', 'The current working directory.', process.cwd())
27
27
  .action(async (opts) => {
28
28
  const options = v.parse(schema, opts);
29
29
 
@@ -17,14 +17,14 @@ const schema = v.object({
17
17
  type Options = v.InferInput<typeof schema>;
18
18
 
19
19
  const init = new Command('init')
20
- .description('Initializes the configuration file')
21
- .option('--path <path>', 'Path to install the blocks')
22
- .option('--repos [repos...]', 'Repository to install the blocks from')
20
+ .description('Initializes your project with a configuration file.')
21
+ .option('--path <path>', 'Path to install the blocks.')
22
+ .option('--repos [repos...]', 'Repository to install the blocks from.')
23
23
  .option(
24
24
  '--no-watermark',
25
25
  'Will not add a watermark to each file upon adding it to your project.'
26
26
  )
27
- .option('--tests', 'Will include tests along with the functions.')
27
+ .option('--tests', 'Will include tests with the blocks.')
28
28
  .action(async (opts) => {
29
29
  const options = v.parse(schema, opts);
30
30
 
@@ -27,11 +27,11 @@ const schema = v.object({
27
27
  type Options = v.InferInput<typeof schema>;
28
28
 
29
29
  const test = new Command('test')
30
- .description('Tests blocks against most recent tests')
31
- .addArgument(new Argument('[blocks...]', 'Whichever blocks you want to test.').default([]))
30
+ .description('Tests local blocks against most recent remote tests.')
31
+ .addArgument(new Argument('[blocks...]', 'The blocks you want to test.').default([]))
32
32
  .option('--verbose', 'Include debug logs.', false)
33
33
  .option('-A, --allow', 'Allow jsrepo to download code from the provided repo.', false)
34
- .option('--repo <repo>', 'Repository to download the blocks from')
34
+ .option('--repo <repo>', 'Repository to download the blocks from.')
35
35
  .option('--debug', 'Leaves the temp test file around for debugging upon failure.', false)
36
36
  .action(async (blockNames, opts) => {
37
37
  const options = v.parse(schema, opts);
@@ -2,7 +2,7 @@ import fs from 'node:fs';
2
2
  import * as v from 'valibot';
3
3
  import { Err, Ok, type Result } from '../blocks/types/result';
4
4
 
5
- const CONFIG_NAME = 'blocks.json';
5
+ const CONFIG_NAME = 'jsrepo.json';
6
6
 
7
7
  const schema = v.object({
8
8
  $schema: v.string(),
@@ -20,7 +20,7 @@ const getConfig = (): Result<Config, string> => {
20
20
  const config = v.safeParse(schema, JSON.parse(fs.readFileSync(CONFIG_NAME).toString()));
21
21
 
22
22
  if (!config.success) {
23
- return Err('There was an error reading your `blocks.json` file!');
23
+ return Err(`There was an error reading your \`${CONFIG_NAME}\` file!`);
24
24
  }
25
25
 
26
26
  return Ok(config.output);
@@ -1,6 +1,6 @@
1
1
  import color from 'chalk';
2
2
 
3
- export const OUTPUT_FILE = 'blocks-manifest.json';
3
+ export const OUTPUT_FILE = 'jsrepo-manifest.json';
4
4
 
5
5
  const WARN = color.bgRgb(245, 149, 66).white('WARN');
6
6