@seeka-labs/cli-apps-azure 3.9.17 → 3.9.18

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
@@ -5730,7 +5730,7 @@ var require_commander = __commonJS({
5730
5730
  var version;
5731
5731
  var init_package = __esm({
5732
5732
  "../cli-apps/package.json"() {
5733
- version = "3.9.17";
5733
+ version = "3.9.18";
5734
5734
  }
5735
5735
  });
5736
5736
 
@@ -104465,7 +104465,7 @@ npmScopes:
104465
104465
  var version2;
104466
104466
  var init_package2 = __esm({
104467
104467
  "package.json"() {
104468
- version2 = "3.9.17";
104468
+ version2 = "3.9.18";
104469
104469
  }
104470
104470
  });
104471
104471
 
@@ -104571,12 +104571,31 @@ async function initAppCommand2(config) {
104571
104571
  let appName = config.appName ?? existingInitConfig.appName;
104572
104572
  let orgName = config.orgName ?? existingInitConfig.orgName;
104573
104573
  const localAppPath = path11.resolve(rawLocalAppPath);
104574
+ let skipGitOperations = false;
104575
+ const gitDirPath = path11.join(localAppPath, ".git");
104576
+ if (fs14.existsSync(gitDirPath)) {
104577
+ console.log("\n\u26A0\uFE0F WARNING: Existing git repository detected in the target directory.\n");
104578
+ const { continueWithExistingRepo } = await dist_default12.prompt([
104579
+ {
104580
+ type: "confirm",
104581
+ name: "continueWithExistingRepo",
104582
+ message: "An initialized git repository already exists. Do you want to continue? (No git pull/push/fetch commands will be run)",
104583
+ default: false
104584
+ }
104585
+ ]);
104586
+ if (!continueWithExistingRepo) {
104587
+ console.log("\u274C Operation cancelled by user.");
104588
+ return;
104589
+ }
104590
+ skipGitOperations = true;
104591
+ console.log("\u2705 Continuing with existing git repository. Git operations will be skipped.\n");
104592
+ }
104574
104593
  if (fs14.existsSync(localAppPath)) {
104575
104594
  const files = fs14.readdirSync(localAppPath);
104576
104595
  if (files.length > 0) {
104577
- const isOnlySeeka = files.every((file) => file === ".seeka" || file === ".vscode" || file === ".idea");
104596
+ const isOnlySeeka = files.every((file) => file === ".seeka" || file === ".vscode" || file === ".idea" || file === ".git");
104578
104597
  if (!isOnlySeeka) {
104579
- throw new Error(`Directory ${localAppPath} is not empty and contains files other than .seeka or .idea or .vscode folders. Please provide an empty directory or one that only contains a .seeka/ folder.`);
104598
+ throw new Error(`Directory ${localAppPath} is not empty and contains files other than .seeka or .idea or .vscode or .git folders. Please provide an empty directory or one that only contains a .seeka/ or .git/ folder.`);
104580
104599
  }
104581
104600
  }
104582
104601
  }
@@ -104813,19 +104832,23 @@ async function initAppCommand2(config) {
104813
104832
  console.log(`Repository: https://github.com/${owner}/${repo}`);
104814
104833
  console.log(`Environment: ${prodEnvironmentName}
104815
104834
  `);
104816
- console.log(`
104835
+ if (!skipGitOperations) {
104836
+ console.log(`
104817
104837
  \u{1F4E5} Cloning repository to: ${localAppPath}
104818
104838
  `);
104819
- const repoUrl = `https://github.com/${owner}/${repo}.git`;
104820
- const seekaDirExists = fs14.existsSync(path11.join(localAppPath, ".seeka"));
104821
- if (seekaDirExists) {
104822
- console.log("\u{1F4C1} Directory has existing .seeka folder, preparing git repository from main...\n");
104823
- ensureRepoReadyFromMain(localAppPath, repoUrl, token);
104839
+ const repoUrl = `https://github.com/${owner}/${repo}.git`;
104840
+ const seekaDirExists = fs14.existsSync(path11.join(localAppPath, ".seeka"));
104841
+ if (seekaDirExists) {
104842
+ console.log("\u{1F4C1} Directory has existing .seeka folder, preparing git repository from main...\n");
104843
+ ensureRepoReadyFromMain(localAppPath, repoUrl, token);
104844
+ } else {
104845
+ cloneMainBranch(repoUrl, localAppPath, process.cwd(), token);
104846
+ }
104847
+ console.log('\n\u{1F33F} Creating and switching to "dev" branch...\n');
104848
+ createOrResetDevBranch(localAppPath);
104824
104849
  } else {
104825
- cloneMainBranch(repoUrl, localAppPath, process.cwd(), token);
104850
+ console.log("\n\u23ED\uFE0F Skipping git clone/fetch operations (existing repo detected).\n");
104826
104851
  }
104827
- console.log('\n\u{1F33F} Creating and switching to "dev" branch...\n');
104828
- createOrResetDevBranch(localAppPath);
104829
104852
  console.log("\n\u{1F916} Installing AI context...\n");
104830
104853
  await aiContextCommand({
104831
104854
  targetDir: localAppPath,
@@ -104849,20 +104872,33 @@ async function initAppCommand2(config) {
104849
104872
  azureFunctionResourceGroupName
104850
104873
  };
104851
104874
  await initCommandV2(initOptions);
104852
- console.log("\n\u{1F4DD} Creating initial commit...\n");
104853
- const commitMessage = `Initial scaffold from Seeka app SDK v${version2}`;
104854
- commitAll(localAppPath, commitMessage);
104855
- console.log(`\u2705 Initial commit created: "${commitMessage}"`);
104856
- console.log("\n\u{1F680} Pushing to remote...\n");
104857
- pushDevBranch(localAppPath);
104858
- console.log("\n\u2705 Seeka app initialized successfully!\n");
104859
- console.log(`\u{1F3E0} Local directory: ${localAppPath}`);
104860
- console.log(`\u{1F4E6} Repository: https://github.com/${owner}/${repo}`);
104861
- console.log(`\u{1F33F} Branch "dev" pushed: https://github.com/${owner}/${repo}/tree/dev`);
104862
- console.log(`\u{1F30D} Environment: ${prodEnvironmentName}`);
104863
- console.log(`\u2699\uFE0F Repository variables: https://github.com/${owner}/${repo}/settings/variables/actions`);
104864
- console.log(`\u{1F310} Environment "${prodEnvironmentName}" settings: https://github.com/${owner}/${repo}/settings/environments
104875
+ if (!skipGitOperations) {
104876
+ console.log("\n\u{1F4DD} Creating initial commit...\n");
104877
+ const commitMessage = `Initial scaffold from Seeka app SDK v${version2}`;
104878
+ commitAll(localAppPath, commitMessage);
104879
+ console.log(`\u2705 Initial commit created: "${commitMessage}"`);
104880
+ console.log("\n\u{1F680} Pushing to remote...\n");
104881
+ pushDevBranch(localAppPath);
104882
+ console.log("\n\u2705 Seeka app initialized successfully!\n");
104883
+ console.log(`\u{1F3E0} Local directory: ${localAppPath}`);
104884
+ console.log(`\u{1F4E6} Repository: https://github.com/${owner}/${repo}`);
104885
+ console.log(`\u{1F33F} Branch "dev" pushed: https://github.com/${owner}/${repo}/tree/dev`);
104886
+ console.log(`\u{1F30D} Environment: ${prodEnvironmentName}`);
104887
+ console.log(`\u2699\uFE0F Repository variables: https://github.com/${owner}/${repo}/settings/variables/actions`);
104888
+ console.log(`\u{1F310} Environment "${prodEnvironmentName}" settings: https://github.com/${owner}/${repo}/settings/environments
104865
104889
  `);
104890
+ } else {
104891
+ console.log("\n\u23ED\uFE0F Skipping git commit and push operations (existing repo detected).\n");
104892
+ console.log("\n\u2705 Seeka app initialized successfully!\n");
104893
+ console.log(`\u{1F3E0} Local directory: ${localAppPath}`);
104894
+ console.log(`\u{1F4E6} Repository: https://github.com/${owner}/${repo}`);
104895
+ console.log(`\u{1F30D} Environment: ${prodEnvironmentName}`);
104896
+ console.log(`\u2699\uFE0F Repository variables: https://github.com/${owner}/${repo}/settings/variables/actions`);
104897
+ console.log(`\u{1F310} Environment "${prodEnvironmentName}" settings: https://github.com/${owner}/${repo}/settings/environments`);
104898
+ console.log(`
104899
+ \u26A0\uFE0F Note: You are using an existing git repository. Please manually commit and push your changes when ready.
104900
+ `);
104901
+ }
104866
104902
  } catch (error) {
104867
104903
  console.error("\n\u274C Failed to initialize app:", error.message);
104868
104904
  throw error;
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seeka-labs/cli-apps-azure",
3
- "version": "3.9.17",
3
+ "version": "3.9.18",
4
4
  "type": "module",
5
5
  "description": "Seeka - Apps CLI - Azure",
6
6
  "author": "SEEKA <platform@seeka.co>",
@@ -33,7 +33,7 @@
33
33
  "devDependencies": {
34
34
  "@jest/globals": "^30",
35
35
  "@octokit/rest": "^22.0.1",
36
- "@seeka-labs/cli-apps": "3.9.17",
36
+ "@seeka-labs/cli-apps": "3.9.18",
37
37
  "@types/cross-spawn": "^6",
38
38
  "@types/jest": "^30",
39
39
  "@types/libsodium-wrappers": "^0.7",