Skip to content

Commit 56aeab8

Browse files
Merge pull request #103 from contentstack/development
staging PR
2 parents 4457ba9 + 722790b commit 56aeab8

File tree

12 files changed

+2440
-1794
lines changed

12 files changed

+2440
-1794
lines changed

.github/CODEOWNERS

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1-
* @contentstack/security-admin
1+
* @contentstack/devex-pr-reviewers
2+
3+
.github/workflows/sca-scan.yml @contentstack/security-admin
4+
5+
**/.snyk @contentstack/security-admin
6+
7+
.github/workflows/policy-scan.yml @contentstack/security-admin
8+
9+
.github/workflows/issues-jira.yml @contentstack/security-admin

.github/workflows/policy-scan.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,23 @@ jobs:
2424
- uses: actions/checkout@master
2525
- name: Checks for License file
2626
run: |
27-
if ! [[ -f "LICENSE" || -f "License.txt" || -f "LICENSE.md" ]]; then exit 1; fi
27+
expected_license_files=("LICENSE" "LICENSE.txt" "LICENSE.md" "License.txt")
28+
license_file_found=false
29+
current_year=$(date +"%Y")
30+
31+
for license_file in "${expected_license_files[@]}"; do
32+
if [ -f "$license_file" ]; then
33+
license_file_found=true
34+
# check the license file for the current year, if not exists, exit with error
35+
if ! grep -q "$current_year" "$license_file"; then
36+
echo "License file $license_file does not contain the current year."
37+
exit 2
38+
fi
39+
break
40+
fi
41+
done
42+
43+
if [ "$license_file_found" = false ]; then
44+
echo "No license file found. Please add a license file to the repository."
45+
exit 1
46+
fi

.talismanrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
fileignoreconfig:
2+
- filename: .github/workflows/secrets-scan.yml
3+
ignore_detectors:
4+
- filecontent
25
- filename: package-lock.json
36
checksum: e78fc9c4b8032c8a0fd0c0fef9b0b85808aa51e0c3a9c291f8c6227e116705a6
47
- filename: src/typings/@contentstack/cli-command.d.ts

package-lock.json

Lines changed: 2396 additions & 1780 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "contentstack-cli-content-type",
33
"description": "Retrieve information about Content Types in a Stack.",
4-
"version": "1.3.0",
4+
"version": "1.3.1",
55
"author": "Contentstack Developer",
66
"bugs": "https://github.com/contentstack/contentstack-cli-content-type/issues",
77
"dependencies": {

src/commands/content-type/audit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default class AuditCommand extends Command {
7171
const output = buildOutput(audit.logs, users)
7272
this.printOutput(output, 'Audit Logs', flags['content-type'], stack.name)
7373
} catch (error: any) {
74-
this.error(error, { exit: 1, suggestions: error.suggestions })
74+
this.error(error?.message || 'An error occurred.', { exit: 1, suggestions: error.suggestions })
7575
}
7676
}
7777
}

src/commands/content-type/compare-remote.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export default class CompareRemoteCommand extends Command {
4848
const remoteStackApi = flags['remote-stack'] as string
4949

5050
if (originStackApi === remoteStackApi) {
51-
this.warn('Comparing the same Stack does not produce useful results.')
51+
this.warn('You cannot compare the same stack. Please choose different stacks to compare.')
5252
}
5353

5454
const spinner = cliux.loaderV2(Command.RequestDataMessage)
@@ -75,7 +75,7 @@ export default class CompareRemoteCommand extends Command {
7575
const output = await buildOutput(flags['content-type'], originContentTypeResp, remoteContentTypeResp)
7676
this.printOutput(output, 'changes', flags['content-type'], `${originStackResp.name} <-> ${remoteStackResp.name}`)
7777
} catch (error: any) {
78-
this.error(error, { exit: 1, suggestions: error.suggestions })
78+
this.error(error?.message || 'An error occurred.', { exit: 1, suggestions: error.suggestions })
7979
}
8080
}
8181
}

src/commands/content-type/compare.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,10 @@ export default class CompareCommand extends Command {
110110
this.printOutput(output, 'changes', flags['content-type'], stack.name)
111111

112112
if (flags.left && flags.left === flags.right) {
113-
this.warn('Comparing the same version does not produce useful results.')
113+
this.warn('You cannot compare the same version. Please select different versions to compare.')
114114
}
115115
} catch (error: any) {
116-
this.error(error, { exit: 1, suggestions: error.suggestions })
116+
this.error(error?.message || 'An error occurred.', { exit: 1, suggestions: error.suggestions })
117117
}
118118
}
119119
}

src/commands/content-type/details.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default class DetailsCommand extends Command {
8282
})
8383
this.printOutput(output, 'details', flags['content-type'], stack.name)
8484
} catch (error: any) {
85-
this.error(error, { exit: 1, suggestions: error.suggestions })
85+
this.error(error?.message || 'An error occurred.', { exit: 1, suggestions: error.suggestions })
8686
}
8787
}
8888
}

src/commands/content-type/diagram.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default class DiagramCommand extends Command {
110110
const output = await createDiagram(diagramOptions)
111111
this.log(`Created Graph: ${output.outputPath}`)
112112
} catch (error: any) {
113-
this.error(error, { exit: 1, suggestions: error.suggestions })
113+
this.error(error?.message || 'An error occurred.', { exit: 1, suggestions: error.suggestions })
114114
}
115115
}
116116
}

0 commit comments

Comments
 (0)