@aspects-ai/workspace-cli 0.1.22 → 0.1.24

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.js CHANGED
@@ -1,17 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // src/index.ts
4
- import { Command as Command9 } from "commander";
4
+ import { Command as Command8 } from "commander";
5
5
 
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@aspects-ai/workspace-cli",
9
- version: "0.1.21",
9
+ version: "0.1.23",
10
10
  private: false,
11
11
  description: "Lightweight CLI for installing libraries into workspaces",
12
12
  type: "module",
13
13
  bin: {
14
- "workspace-cli": "./dist/index.js"
14
+ "workspace-cli": "./dist/index.js",
15
+ remotion: "./src/remotion-bin.js"
15
16
  },
16
17
  scripts: {
17
18
  build: "tsup src/index.ts --format esm --dts --clean && npm run copy:registry",
@@ -21,7 +22,8 @@ var package_default = {
21
22
  },
22
23
  files: [
23
24
  "dist",
24
- "src/registry"
25
+ "src/registry",
26
+ "src/remotion-bin.js"
25
27
  ],
26
28
  dependencies: {
27
29
  "@remotion/cli": "4.0.356",
@@ -620,48 +622,11 @@ function createInitCommand() {
620
622
  });
621
623
  }
622
624
 
623
- // src/commands/remotion.ts
624
- import { Command as Command5 } from "commander";
625
- import { execa as execa2 } from "execa";
626
- import { createRequire } from "module";
627
- import path7 from "path";
628
- function createRemotionCommand() {
629
- const command = new Command5("remotion").description("Run remotion CLI commands using the bundled remotion installation").allowUnknownOption().allowExcessArguments().action(async (...actionArgs) => {
630
- const cmd = actionArgs[actionArgs.length - 1];
631
- const args = cmd.parent?.args.slice(1) || process.argv.slice(process.argv.indexOf("remotion") + 1);
632
- console.error("DEBUG actionArgs length:", actionArgs.length);
633
- console.error("DEBUG cmd.args:", cmd.args);
634
- console.error("DEBUG cmd.parent?.args:", cmd.parent?.args);
635
- console.error("DEBUG process.argv:", process.argv);
636
- console.error("DEBUG final args:", args);
637
- const require2 = createRequire(import.meta.url);
638
- const remotionCliPath = require2.resolve("@remotion/cli/package.json");
639
- const remotionCliDir = path7.dirname(remotionCliPath);
640
- const remotionBin = path7.join(remotionCliDir, "remotion-cli.js");
641
- try {
642
- const execArgs = [remotionBin, ...args];
643
- console.error("DEBUG remotionBin:", remotionBin);
644
- console.error("DEBUG execArgs:", execArgs);
645
- await execa2("node", execArgs, {
646
- stdio: "inherit",
647
- cwd: process.cwd(),
648
- env: {
649
- ...process.env,
650
- ANIMATION_SSR_MODE: "true"
651
- }
652
- });
653
- } catch (error) {
654
- process.exit(error.exitCode || 1);
655
- }
656
- });
657
- return command;
658
- }
659
-
660
625
  // src/commands/list.ts
661
- import { Command as Command6 } from "commander";
626
+ import { Command as Command5 } from "commander";
662
627
  import chalk5 from "chalk";
663
628
  function createListCommand() {
664
- return new Command6("list").description("List available libraries").action(async () => {
629
+ return new Command5("list").description("List available libraries").action(async () => {
665
630
  try {
666
631
  const libraries = await listLibraries();
667
632
  logger.log(chalk5.bold("\nAvailable libraries:\n"));
@@ -682,19 +647,19 @@ function createListCommand() {
682
647
 
683
648
  // src/commands/update-template.ts
684
649
  import chalk6 from "chalk";
685
- import { Command as Command7 } from "commander";
686
- import { execa as execa3 } from "execa";
650
+ import { Command as Command6 } from "commander";
651
+ import { execa as execa2 } from "execa";
687
652
  import fs7 from "fs-extra";
688
653
  import os2 from "os";
689
- import path8 from "path";
654
+ import path7 from "path";
690
655
  var NOODLE_BASE_REPO = "https://github.com/aspects-ai/noodle-templates";
691
656
  var NOODLE_BASE_BRANCH = "main";
692
657
  var WORKSPACE_FILE_PATH = "noodle-base/WORKSPACE.md";
693
658
  function createUpdateTemplateCommand() {
694
- return new Command7("update-template").description("Update WORKSPACE.md file from noodle-base template").action(async () => {
659
+ return new Command6("update-template").description("Update WORKSPACE.md file from noodle-base template").action(async () => {
695
660
  try {
696
661
  const workspaceRoot = await ensureWorkspaceRoot();
697
- const targetFile = path8.join(workspaceRoot, "WORKSPACE.md");
662
+ const targetFile = path7.join(workspaceRoot, "WORKSPACE.md");
698
663
  const token = getToken();
699
664
  const targetExists = await fs7.pathExists(targetFile);
700
665
  if (targetExists) {
@@ -721,23 +686,23 @@ function createUpdateTemplateCommand() {
721
686
  });
722
687
  }
723
688
  async function fetchFileFromGit(options) {
724
- const tempDir = await fs7.mkdtemp(path8.join(os2.tmpdir(), "workspace-cli-"));
689
+ const tempDir = await fs7.mkdtemp(path7.join(os2.tmpdir(), "workspace-cli-"));
725
690
  try {
726
691
  const repoUrl = options.repository.replace(
727
692
  "https://github.com/",
728
693
  `https://${options.token}@github.com/`
729
694
  );
730
- await execa3("git", ["init"], { cwd: tempDir });
731
- await execa3("git", ["remote", "add", "origin", repoUrl], { cwd: tempDir });
732
- await execa3("git", ["config", "core.sparseCheckout", "true"], { cwd: tempDir });
733
- const sparseFile = path8.join(tempDir, ".git", "info", "sparse-checkout");
695
+ await execa2("git", ["init"], { cwd: tempDir });
696
+ await execa2("git", ["remote", "add", "origin", repoUrl], { cwd: tempDir });
697
+ await execa2("git", ["config", "core.sparseCheckout", "true"], { cwd: tempDir });
698
+ const sparseFile = path7.join(tempDir, ".git", "info", "sparse-checkout");
734
699
  await fs7.writeFile(sparseFile, `${options.filePath}
735
700
  `);
736
- await execa3("git", ["pull", "origin", options.branch, "--depth=1"], {
701
+ await execa2("git", ["pull", "origin", options.branch, "--depth=1"], {
737
702
  cwd: tempDir,
738
703
  stderr: "pipe"
739
704
  });
740
- const sourceFile = path8.join(tempDir, options.filePath);
705
+ const sourceFile = path7.join(tempDir, options.filePath);
741
706
  if (!await fs7.pathExists(sourceFile)) {
742
707
  throw new Error(`File '${options.filePath}' not found in repository`);
743
708
  }
@@ -755,10 +720,10 @@ async function fetchFileFromGit(options) {
755
720
  }
756
721
 
757
722
  // src/commands/update.ts
758
- import { Command as Command8 } from "commander";
723
+ import { Command as Command7 } from "commander";
759
724
  import chalk7 from "chalk";
760
725
  function createUpdateCommand() {
761
- return new Command8("update").description("Update an installed library to the latest version").argument("<library>", "Name of the library to update").action(async (libraryName) => {
726
+ return new Command7("update").description("Update an installed library to the latest version").argument("<library>", "Name of the library to update").action(async (libraryName) => {
762
727
  try {
763
728
  const workspaceRoot = await ensureWorkspaceRoot();
764
729
  await getOrCreateConfig(workspaceRoot);
@@ -786,7 +751,7 @@ Use 'workspace-cli add ${libraryName}' to install it first.`
786
751
  }
787
752
 
788
753
  // src/index.ts
789
- var program = new Command9();
754
+ var program = new Command8();
790
755
  program.name("workspace-cli").description("Lightweight CLI for installing libraries into workspaces").version(package_default.version);
791
756
  program.addCommand(createInitCommand());
792
757
  program.addCommand(createListCommand());
@@ -795,5 +760,4 @@ program.addCommand(createUpdateCommand());
795
760
  program.addCommand(createCreateCompositionCommand());
796
761
  program.addCommand(createUpdateTemplateCommand());
797
762
  program.addCommand(createCreateRemotionEntryCommand());
798
- program.addCommand(createRemotionCommand());
799
763
  program.parse(process.argv);
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@aspects-ai/workspace-cli",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "private": false,
5
5
  "description": "Lightweight CLI for installing libraries into workspaces",
6
6
  "type": "module",
7
7
  "bin": {
8
- "workspace-cli": "./dist/index.js"
8
+ "workspace-cli": "./dist/index.js",
9
+ "remotion": "./src/remotion-bin.js"
9
10
  },
10
11
  "scripts": {
11
12
  "build": "tsup src/index.ts --format esm --dts --clean && npm run copy:registry",
@@ -15,7 +16,8 @@
15
16
  },
16
17
  "files": [
17
18
  "dist",
18
- "src/registry"
19
+ "src/registry",
20
+ "src/remotion-bin.js"
19
21
  ],
20
22
  "dependencies": {
21
23
  "@remotion/cli": "4.0.356",
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ require('@remotion/cli/remotion-cli');