Skip to content

Conversation

@sauravraw
Copy link
Contributor

No description provided.

@sauravraw sauravraw requested a review from Copilot April 3, 2025 11:48
@sauravraw sauravraw requested review from a team as code owners April 3, 2025 11:48

This comment was marked as resolved.

@sauravraw sauravraw changed the base branch from main to dev April 3, 2025 11:50
@sauravraw sauravraw requested a review from Copilot April 3, 2025 11:50

This comment was marked as resolved.

@sauravraw sauravraw requested a review from Copilot April 3, 2025 12:10

This comment was marked as resolved.

@sauravraw sauravraw requested a review from Copilot April 4, 2025 06:07

This comment was marked as resolved.

@sauravraw sauravraw requested a review from Copilot April 4, 2025 06:07

This comment was marked as resolved.

@sauravraw sauravraw force-pushed the feature/cli-optimise branch from 4a0510d to 7cd75ad Compare April 4, 2025 06:10
@sauravraw sauravraw requested a review from Copilot April 6, 2025 17:50
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 847 out of 852 changed files in this pull request and generated no comments.

Files not reviewed (5)
  • .vscode/extensions.json: Language not supported
  • api/.gitignore: Language not supported
  • api/package.json: Language not supported
  • api/production.env: Language not supported
  • api/tsconfig.json: Language not supported
Comments suppressed due to low confidence (1)

api/src/server.ts:127

  • Consider renaming the parameter 'path' in the file watcher callback to avoid shadowing the imported 'path' module, for clarity.
watcher.on('change', async (path) => {

@umeshmore45 umeshmore45 requested a review from Copilot April 7, 2025 08:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 847 out of 852 changed files in this pull request and generated 1 comment.

Files not reviewed (5)
  • .vscode/extensions.json: Language not supported
  • api/.gitignore: Language not supported
  • api/package.json: Language not supported
  • api/production.env: Language not supported
  • api/tsconfig.json: Language not supported
Comments suppressed due to low confidence (1)

api/src/utils/custom-logger.utils.ts:10

  • Using startsWith for path validation could be error prone; replacing it with a check using path.relative would ensure that the resolved path truly resides within the basePath.
if (!resolvedPath.startsWith(basePath)) {

@sauravraw sauravraw requested a review from Copilot April 7, 2025 09:14
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 847 out of 852 changed files in this pull request and generated no comments.

Files not reviewed (5)
  • .vscode/extensions.json: Language not supported
  • api/.gitignore: Language not supported
  • api/package.json: Language not supported
  • api/production.env: Language not supported
  • api/tsconfig.json: Language not supported

@sauravraw sauravraw requested a review from Copilot April 7, 2025 09:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 848 out of 853 changed files in this pull request and generated no comments.

Files not reviewed (5)
  • .vscode/extensions.json: Language not supported
  • api/.gitignore: Language not supported
  • api/package.json: Language not supported
  • api/production.env: Language not supported
  • api/tsconfig.json: Language not supported
Comments suppressed due to low confidence (2)

api/src/validators/stack.validator.ts:14

  • [nitpick] Consider adding a brief comment explaining the use of a global regex in error message replacement, to clarify its necessity compared to a single replacement.
errorMessage: VALIDATION_ERRORS.STRING_REQUIRED.replace(/\$/g, "Name"),

api/src/utils/custom-logger.utils.ts:25

  • [nitpick] Review the directory containment check logic in safeJoin to ensure that all edge cases for preventing directory traversal are correctly handled. Adding inline comments to explain the rationale could improve maintainability.
if (relativePath === '' || relativePath === '.' || (!relativePath.startsWith('..') && !path.isAbsolute(relativePath))) {

setExistingField((prevExisting: ExistingFieldType) => {
const updatedExisting = { ...prevExisting };
const validLabels = cmsLocaleOptions?.map(locale => locale.label) || [];
Object.entries(updatedExisting).forEach(([index, entry]) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const validLabels = cmsLocaleOptions?.map(locale => locale?.label) || [];
Object.entries(updatedExisting)?.forEach(([index, entry]) => {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Object.entries(updatedExisting).forEach(([index, entry]) => {
const [labelPart] = entry.label.split('-');
if (!validLabels.includes(labelPart)) {
delete updatedExisting[index];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const [labelPart] = entry?.label?.split('-');
if (!validLabels?.includes(labelPart)) {
delete updatedExisting?.[index];

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

entry?.label?.split('-'); adding validation to this gives error, added validation to other code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Object.keys(updated).forEach((key) => {
const [labelPart] = key.split('-');
if (!validLabels.includes(labelPart)) {
delete updated[key];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Object.keys(updated)?.forEach((key) => {
const [labelPart] = key?.split('-');
if (!validLabels?.includes(labelPart)) {
delete updated?.[key];

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

const isPresent = prevList.some(
(item: { label: string; value: string }) => item?.value === 'master_locale'
const isPresent = prevList.filter(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prevList?.filter

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done


if (!isPresent) {

if(isPresent[0]?.label !== newLabel){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if(isPresent?.[0]?.label !== newLabel){

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@AishDani AishDani requested a review from sayalijoshi27 April 17, 2025 06:25
@sayalijoshi27 sayalijoshi27 merged commit 6009226 into dev Apr 17, 2025
3 of 5 checks passed
@umeshmore45 umeshmore45 deleted the feature/cli-optimise branch June 2, 2025 09:21
umeshmore45 pushed a commit that referenced this pull request Jun 11, 2025
AishDani pushed a commit that referenced this pull request Jul 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants