@pitcher/cli-scripts 1.0.2 → 1.0.3

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.
@@ -12,6 +12,7 @@ export function createPublishAppCommand() {
12
12
  .option("--org <organization>", "Organization subdomain", "dev")
13
13
  .option("--increment-version", "Increment version in app.json") // Add increment-version option
14
14
  .option("--dry-run", "Perform a dry run without publishing") // Add dry-run option
15
+ .option("--publish-url <url>", "Explicit publish URL") // Add publish-url option
15
16
  .description('zip the contents of a folder and publish as an app to a pitcher org URL. for current folder: "p publish-app --api-key myapikey"')
16
17
  // Set default folder to current directory
17
18
  .action(async (folder = ".", options) => {
@@ -46,7 +47,8 @@ export function createPublishAppCommand() {
46
47
  console.log(`Zipped ${archive.pointer()} total bytes`);
47
48
  const formData = new FormData();
48
49
  formData.append("file", fs.createReadStream(zipFilePath));
49
- const publishUrl = `https://${options.org}.my.pitcher.com/api/v1/apps/publish/`; // Construct the publish URL
50
+ // Use explicit publish URL if provided, otherwise construct from org
51
+ const publishUrl = options.publishUrl || `https://${options.org}.my.pitcher.com/api/v1/apps/publish/`;
50
52
  if (options.dryRun) {
51
53
  console.log("Dry run mode enabled. The following data would be published:");
52
54
  console.log("Publish URL:", publishUrl);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pitcher/cli-scripts",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "The Pitcher CLI for various tasks in its ecosystem.",
5
5
  "author": "Pitcher AG",
6
6
  "license": "MIT",