@akash-chowdhury-24/deployhub 1.0.11 → 1.0.12

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akash-chowdhury-24/deployhub",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Zero-configuration deployment and artifact manager",
5
5
  "type": "module",
6
6
  "main": "./src/cli/index.js",
@@ -15,10 +15,8 @@ import {
15
15
  writeWorkflowFile,
16
16
  getRequiredSecrets,
17
17
  generateEnvExampleContent,
18
- guessCliGithubRepo,
19
18
  addDeployhubToPackageJson,
20
- isGithubCliSource,
21
- normalizeGithubCliSource,
19
+ DEFAULT_NPM_CLI_SOURCE,
22
20
  } from '../utils/github-actions.js';
23
21
  import {
24
22
  promptPlatformQuestions,
@@ -365,7 +363,7 @@ export function registerInitCommand(program) {
365
363
  const detectedFrontend = detectFrontend(cwd);
366
364
  const detectedBackend = detectBackend(cwd);
367
365
  const defaultName = path.basename(cwd) || 'my-app';
368
- const defaultCliRepo = await guessCliGithubRepo(cwd);
366
+ const cliSource = DEFAULT_NPM_CLI_SOURCE;
369
367
 
370
368
  const { projectName } = await inquirer.prompt([
371
369
  {
@@ -448,14 +446,6 @@ export function registerInitCommand(program) {
448
446
  message: 'Configure deployment?',
449
447
  default: false,
450
448
  },
451
- {
452
- type: 'input',
453
- name: 'cliSource',
454
- message:
455
- 'DeployHub CLI source for GitHub Actions (github:user/repo or npm:@akash-chowdhury-24/deployhub):',
456
- default: defaultCliRepo,
457
- filter: (value) => normalizeGithubCliSource(value),
458
- },
459
449
  ]);
460
450
 
461
451
  /** @type {Record<string, Record<string, unknown>>} */
@@ -734,7 +724,7 @@ export function registerInitCommand(program) {
734
724
  },
735
725
  artifactRetention: 10,
736
726
  cli: {
737
- source: answers.cliSource,
727
+ source: cliSource,
738
728
  },
739
729
  };
740
730
 
@@ -752,13 +742,13 @@ export function registerInitCommand(program) {
752
742
  }
753
743
 
754
744
  await saveConfig(config, cwd);
755
- await addDeployhubToPackageJson(answers.cliSource, cwd);
745
+ await addDeployhubToPackageJson(cliSource, cwd);
756
746
  await writeWorkflowFile(
757
747
  config.storage,
758
748
  deploy,
759
749
  environments,
760
750
  cwd,
761
- answers.cliSource,
751
+ cliSource,
762
752
  config
763
753
  );
764
754
 
@@ -784,24 +774,13 @@ export function registerInitCommand(program) {
784
774
  console.log(' • .env.example');
785
775
  console.log('');
786
776
  console.log(chalk.bold('Next steps:'));
787
- if (isGithubCliSource(answers.cliSource)) {
788
- console.log(
789
- ' 1. For a private DeployHub CLI repo, create a GitHub PAT with repo read access'
790
- );
791
- console.log(
792
- ` and add it as ${chalk.cyan('DEPLOYHUB_GITHUB_TOKEN')} in your demo project secrets`
793
- );
794
- console.log(' (public CLI repos can skip this — HTTPS is used automatically)');
795
- } else {
796
- console.log(' 1. Push the DeployHub CLI repo to GitHub (if using github: source)');
797
- }
798
- console.log(' 2. Copy .env.example to .env and fill in credentials');
777
+ console.log(' 1. Copy .env.example to .env and fill in credentials');
799
778
  if (secrets.length > 0) {
800
- console.log(' 3. Add these secrets to GitHub (Settings → Secrets):');
779
+ console.log(' 2. Add these secrets to GitHub (Settings → Secrets):');
801
780
  secrets.forEach((s) => console.log(` • ${s}`));
802
781
  }
803
- console.log(` ${secrets.length > 0 ? '4' : '3'}. Run ${chalk.cyan('deployhub doctor')} to verify your setup`);
804
- console.log(` ${secrets.length > 0 ? '5' : '4'}. Push to main — GitHub Actions will run ${chalk.cyan('deployhub build')} automatically`);
782
+ console.log(` ${secrets.length > 0 ? '3' : '2'}. Run ${chalk.cyan('deployhub doctor')} to verify your setup`);
783
+ console.log(` ${secrets.length > 0 ? '4' : '3'}. Push to main — GitHub Actions will run ${chalk.cyan('deployhub build')} automatically`);
805
784
  console.log('');
806
785
  printAuthorFooter();
807
786
  });
@@ -60,7 +60,7 @@ const ENV_VAR_DEFAULTS = {
60
60
  };
61
61
 
62
62
  const NPM_PACKAGE = '@akash-chowdhury-24/deployhub';
63
- const DEFAULT_NPM_CLI_SOURCE = `npm:${NPM_PACKAGE}`;
63
+ export const DEFAULT_NPM_CLI_SOURCE = `npm:${NPM_PACKAGE}`;
64
64
  export const GITHUB_CLI_TOKEN_SECRET = 'DEPLOYHUB_GITHUB_TOKEN';
65
65
 
66
66
  /**