alex-c-line 2.1.0 → 2.2.0

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/index.cjs CHANGED
@@ -377,6 +377,34 @@ function gitPostMergeCleanup(program) {
377
377
  });
378
378
  }
379
379
  //#endregion
380
+ //#region src/cli/commands/internal/media/generate.ts
381
+ function internalMediaGenerate(program) {
382
+ program.command("generate").argument("[directory]", "The directory to generate from", process.cwd()).action(async (directory) => {
383
+ async function readDirectory(directory) {
384
+ const directoryContents = await (0, node_fs_promises.readdir)(directory, { withFileTypes: true });
385
+ for (const entry of directoryContents) {
386
+ const fullPath = node_path.default.join(directory, entry.name);
387
+ if (entry.isDirectory() && ![
388
+ ".git",
389
+ "node_modules",
390
+ "__pycache__",
391
+ ".venv"
392
+ ].includes(entry.name)) await readDirectory(fullPath);
393
+ if (entry.isFile() && entry.name.endsWith(".py")) {
394
+ console.info(`Rendering ${node_path.default.relative(process.cwd(), fullPath)}...`);
395
+ await (0, execa.execa)({ stdio: "inherit" })`manim -pql ${fullPath}`;
396
+ }
397
+ }
398
+ }
399
+ await readDirectory(directory);
400
+ });
401
+ }
402
+ //#endregion
403
+ //#region src/cli/commands/internal/media/index.ts
404
+ function internalMedia(program) {
405
+ loadCommands(program.command("media"), { internalMediaGenerate });
406
+ }
407
+ //#endregion
380
408
  //#region src/utility/fileSystem/findPackageRoot.ts
381
409
  async function findPackageRoot(startDirectory, packageName) {
382
410
  let directory = startDirectory;
@@ -423,6 +451,7 @@ function internal(program) {
423
451
  loadCommands(program.command("internal").description("Commands meant more for internal use by me and is not recommended for production usage."), {
424
452
  checkLockfileVersionDiscrepancy,
425
453
  gitPostMergeCleanup,
454
+ internalMedia,
426
455
  outdatedDependencies
427
456
  });
428
457
  }
@@ -1170,7 +1199,7 @@ function template(program) {
1170
1199
  //#endregion
1171
1200
  //#region package.json
1172
1201
  var name = "alex-c-line";
1173
- var version$1 = "2.1.0";
1202
+ var version$1 = "2.2.0";
1174
1203
  var description = "Command-line tool with commands to streamline the developer workflow.";
1175
1204
  //#endregion
1176
1205
  //#region src/utility/updates/checkUpdate.ts
package/dist/index.js CHANGED
@@ -346,6 +346,34 @@ function gitPostMergeCleanup(program) {
346
346
  });
347
347
  }
348
348
  //#endregion
349
+ //#region src/cli/commands/internal/media/generate.ts
350
+ function internalMediaGenerate(program) {
351
+ program.command("generate").argument("[directory]", "The directory to generate from", process.cwd()).action(async (directory) => {
352
+ async function readDirectory(directory) {
353
+ const directoryContents = await readdir(directory, { withFileTypes: true });
354
+ for (const entry of directoryContents) {
355
+ const fullPath = path.join(directory, entry.name);
356
+ if (entry.isDirectory() && ![
357
+ ".git",
358
+ "node_modules",
359
+ "__pycache__",
360
+ ".venv"
361
+ ].includes(entry.name)) await readDirectory(fullPath);
362
+ if (entry.isFile() && entry.name.endsWith(".py")) {
363
+ console.info(`Rendering ${path.relative(process.cwd(), fullPath)}...`);
364
+ await execa({ stdio: "inherit" })`manim -pql ${fullPath}`;
365
+ }
366
+ }
367
+ }
368
+ await readDirectory(directory);
369
+ });
370
+ }
371
+ //#endregion
372
+ //#region src/cli/commands/internal/media/index.ts
373
+ function internalMedia(program) {
374
+ loadCommands(program.command("media"), { internalMediaGenerate });
375
+ }
376
+ //#endregion
349
377
  //#region src/utility/fileSystem/findPackageRoot.ts
350
378
  async function findPackageRoot(startDirectory, packageName) {
351
379
  let directory = startDirectory;
@@ -392,6 +420,7 @@ function internal(program) {
392
420
  loadCommands(program.command("internal").description("Commands meant more for internal use by me and is not recommended for production usage."), {
393
421
  checkLockfileVersionDiscrepancy,
394
422
  gitPostMergeCleanup,
423
+ internalMedia,
395
424
  outdatedDependencies
396
425
  });
397
426
  }
@@ -1139,7 +1168,7 @@ function template(program) {
1139
1168
  //#endregion
1140
1169
  //#region package.json
1141
1170
  var name = "alex-c-line";
1142
- var version$1 = "2.1.0";
1171
+ var version$1 = "2.2.0";
1143
1172
  var description = "Command-line tool with commands to streamline the developer workflow.";
1144
1173
  //#endregion
1145
1174
  //#region src/utility/updates/checkUpdate.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "alex-c-line",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "description": "Command-line tool with commands to streamline the developer workflow.",
5
5
  "repository": {
6
6
  "type": "git",