This repository was archived by the owner on Jun 4, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
export query command base code #1
Merged
Merged
Changes from 2 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
d570ec8
export query command base code
shafeeqd959 66b5542
removed invalid files
shafeeqd959 89b378f
added entries and asset support
shafeeqd959 4fd0af8
added huskey talisman rc
shafeeqd959 2100051
talisman
shafeeqd959 669bf9d
precommit hhok
shafeeqd959 e2aaa32
updated gitignore
shafeeqd959 1eee826
updated gitignore
shafeeqd959 35606c3
added all test cases
shafeeqd959 8083b63
added reviewed changes
shafeeqd959 bc1a1a8
incorporated reviews
shafeeqd959 07e7212
added support for personalize, marketplace apps, variants
shafeeqd959 cea16b1
talisman update
shafeeqd959 aade126
remove run test
shafeeqd959 6e55b5a
updated package.json
shafeeqd959 e74c270
Merge pull request #2 from contentstack/test-cases
shafeeqd959 1cff5e6
fixed test cases
shafeeqd959 bb27506
Merge branch 'feat/base-setup' of github.com:contentstack/cli-query-e…
shafeeqd959 e3cfe6f
removed unused data
shafeeqd959 7345dee
updated talisman rc
shafeeqd959 dfdff5b
beta version update
shafeeqd959 ba0c63b
removed codeql
shafeeqd959 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Build files | ||
| /lib | ||
| /test | ||
| /types |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| { | ||
| "env": { | ||
| "node": true | ||
| }, | ||
| "parser": "@typescript-eslint/parser", | ||
| "parserOptions": { | ||
| "project": "tsconfig.json", | ||
| "sourceType": "module" | ||
| }, | ||
| "extends": [ | ||
| // "oclif", | ||
| "oclif-typescript", | ||
| "plugin:@typescript-eslint/recommended" | ||
| ], | ||
| "rules": { | ||
| "@typescript-eslint/no-unused-vars": [ | ||
| "error", | ||
| { | ||
| "args": "none" | ||
| } | ||
| ], | ||
| "@typescript-eslint/prefer-namespace-keyword": "error", | ||
| "@typescript-eslint/quotes": [ | ||
| "error", | ||
| "single", | ||
| { | ||
| "avoidEscape": true, | ||
| "allowTemplateLiterals": true | ||
| } | ||
| ], | ||
| "semi": "off", | ||
| "@typescript-eslint/type-annotation-spacing": "error", | ||
| "@typescript-eslint/no-redeclare": "off", | ||
| "eqeqeq": [ | ||
| "error", | ||
| "smart" | ||
| ], | ||
| "id-match": "error", | ||
| "no-eval": "error", | ||
| "no-var": "error", | ||
| "quotes": "off", | ||
| "indent": "off", | ||
| "camelcase": "off", | ||
| "comma-dangle": "off", | ||
| "arrow-parens": "off", | ||
| "operator-linebreak": "off", | ||
| "object-curly-spacing": "off", | ||
| "node/no-missing-import": "off", | ||
| "padding-line-between-statements": "off", | ||
| "@typescript-eslint/ban-ts-ignore": "off", | ||
| "unicorn/no-abusive-eslint-disable": "off", | ||
| "unicorn/consistent-function-scoping": "off", | ||
| "@typescript-eslint/no-use-before-define": "off" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # For most projects, this workflow file will not need changing; you simply need | ||
| # to commit it to your repository. | ||
| # | ||
| # You may wish to alter this file to override the set of languages analyzed, | ||
| # or to provide custom queries or build logic. | ||
| # | ||
| # ******** NOTE ******** | ||
| # We have attempted to detect the languages in your repository. Please check | ||
| # the `language` matrix defined below to confirm you have the correct set of | ||
| # supported CodeQL languages. | ||
| # | ||
| name: "CodeQL" | ||
|
|
||
| on: | ||
| pull_request: | ||
| # The branches below must be a subset of the branches above | ||
| branches: '*' | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| actions: read | ||
| contents: read | ||
| security-events: write | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| language: [ 'javascript' ] | ||
| # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | ||
| # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v3.5.3 | ||
|
|
||
| # Initializes the CodeQL tools for scanning. | ||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v2 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| # If you wish to specify custom queries, you can do so here or in a config file. | ||
| # By default, queries listed here will override any specified in a config file. | ||
| # Prefix the list here with "+" to use these queries and those in the config file. | ||
|
|
||
| # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs | ||
| # queries: security-extended,security-and-quality | ||
|
|
||
|
|
||
| # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
| # If this step fails, then you should remove it and run the build manually (see below) | ||
| - name: Autobuild | ||
| uses: github/codeql-action/autobuild@v2 | ||
|
|
||
| # ℹ️ Command-line programs to run using the OS shell. | ||
| # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | ||
|
|
||
| # If the Autobuild fails above, remove it and uncomment the following three lines. | ||
| # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. | ||
|
|
||
| # - run: | | ||
| # echo "Run, Build Application using script" | ||
| # ./location_of_script_within_repo/buildscript.sh | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| name: Create Jira Ticket for Github Issue | ||
|
|
||
| on: | ||
| issues: | ||
| types: [opened] | ||
|
|
||
| jobs: | ||
| issue-jira: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
|
|
||
| - name: Login to Jira | ||
| uses: atlassian/gajira-login@master | ||
| env: | ||
| JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }} | ||
| JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }} | ||
| JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }} | ||
|
|
||
| - name: Create Jira Issue | ||
| id: create_jira | ||
| uses: atlassian/gajira-create@master | ||
| with: | ||
| project: ${{ secrets.JIRA_PROJECT }} | ||
| issuetype: ${{ secrets.JIRA_ISSUE_TYPE }} | ||
| summary: Github | Issue | ${{ github.event.repository.name }} | ${{ github.event.issue.title }} | ||
| description: | | ||
| *GitHub Issue:* ${{ github.event.issue.html_url }} | ||
|
|
||
| *Description:* | ||
| ${{ github.event.issue.body }} | ||
| fields: "${{ secrets.ISSUES_JIRA_FIELDS }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Checks the security policy and configurations | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| jobs: | ||
| security-policy: | ||
| if: github.event.repository.visibility == 'public' | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Checks for SECURITY.md policy file | ||
| run: | | ||
| if ! [[ -f "SECURITY.md" || -f ".github/SECURITY.md" ]]; then exit 1; fi | ||
| security-license: | ||
| if: github.event.repository.visibility == 'public' | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| shell: bash | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Checks for License file | ||
| run: | | ||
| expected_license_files=("LICENSE" "LICENSE.txt" "LICENSE.md" "License.txt") | ||
| license_file_found=false | ||
| current_year=$(date +"%Y") | ||
|
|
||
| for license_file in "${expected_license_files[@]}"; do | ||
| if [ -f "$license_file" ]; then | ||
| license_file_found=true | ||
| # check the license file for the current year, if not exists, exit with error | ||
| if ! grep -q "$current_year" "$license_file"; then | ||
| echo "License file $license_file does not contain the current year." | ||
| exit 2 | ||
| fi | ||
| break | ||
| fi | ||
| done | ||
|
|
||
| if [ "$license_file_found" = false ]; then | ||
| echo "No license file found. Please add a license file to the repository." | ||
| exit 1 | ||
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| name: Source Composition Analysis Scan | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| jobs: | ||
| security-sca: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Run Snyk to check for vulnerabilities | ||
| uses: snyk/actions/node@master | ||
| env: | ||
| SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
| with: | ||
| args: --all-projects --fail-on=all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Secrets Scan | ||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
| jobs: | ||
| security-secrets: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: '2' | ||
| ref: '${{ github.event.pull_request.head.ref }}' | ||
| - run: | | ||
| git reset --soft HEAD~1 | ||
| - name: Install Talisman | ||
| run: | | ||
| # Download Talisman | ||
| wget https://github.com/thoughtworks/talisman/releases/download/v1.37.0/talisman_linux_amd64 -O talisman | ||
|
|
||
| # Checksum verification | ||
| checksum=$(sha256sum ./talisman | awk '{print $1}') | ||
| if [ "$checksum" != "8e0ae8bb7b160bf10c4fa1448beb04a32a35e63505b3dddff74a092bccaaa7e4" ]; then exit 1; fi | ||
|
|
||
| # Make it executable | ||
| chmod +x talisman | ||
| - name: Run talisman | ||
| run: | | ||
| # Run Talisman with the pre-commit hook | ||
| ./talisman --githook pre-commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| *-debug.log | ||
| *-error.log | ||
| /.nyc_output | ||
| /dist | ||
| /lib | ||
| /tmp | ||
| /yarn.lock | ||
| node_modules | ||
| .DS_Store | ||
| coverage | ||
| ./contents | ||
| .vscode/ | ||
| /lib | ||
| .env |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "require": [ | ||
| "test/helpers/init.js", | ||
| "ts-node/register", | ||
| "source-map-support/register" | ||
| ], | ||
| "watch-extensions": [ | ||
| "ts" | ||
| ], | ||
| "recursive": true, | ||
| "timeout": 5000 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "inlcude": [ | ||
| "lib/**/*.js" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| **/README.md |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "semi": true, | ||
| "trailingComma": "all", | ||
| "singleQuote": true, | ||
| "printWidth": 120, | ||
| "tabWidth": 2 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| fileignoreconfig: | ||
| - filename: .eslintrc | ||
| checksum: d11aa7173fffaa6f733cc314a312838906cff6afab97f42e8e6d93bf4a5a76e5 | ||
| - filename: oclif.manifest.json | ||
| checksum: 70d6a81db033dc698972acd75ac953b009197b3bdf12d9ed5ec05bea87b79d7c | ||
| - filename: test/config.json | ||
| checksum: c873d014bed32db9095aed58f806e30c83f5e86e58f295ce81ee5cab64e30fcb | ||
| - filename: README copy.md | ||
| checksum: c96aa532137679b3f9f1029813e762d7f3375481ee4a3c7219297eacb0db3735 | ||
| - filename: src/utils/asset-utils.ts | ||
| checksum: 048c4d2d454babf5f46e81be1055115d5ef190ea070d545804c62204ce9e3c64 | ||
| - filename: src/utils/config-handler.ts | ||
| checksum: 55a6133788c592b656a0c62c49e1f19c03892e20e40e22e4dc3f8ab16c4f34d6 | ||
| - filename: src/core/query-runner.ts | ||
| checksum: 6e48aaddde5206524af969dac9e74feeff98f4da2be48c28e13db357cd57e8bf | ||
| - filename: src/utils/query-resolver.ts | ||
| checksum: 14fa2da02fba66c17f67b95474068983dddb59d930ace576575c9e405a0e5363 | ||
| - filename: src/commands/cm/stacks/export-query.ts | ||
| checksum: 6e34002e1bd35c75716b6e7400cfeec89e85d6e85178a4ac53b6e8b76157e60e | ||
| - filename: src/utils/export-config-handler.ts | ||
| checksum: e74a83578eda7264c0422f8ee63aaf46598a0c4cda4b5f1a92ef549b64483cd7 | ||
| - filename: src/utils/query-handler.ts | ||
| checksum: 9ecaa236d0c24704ecc65687a6f532aa6fba3d1be30e52c35d2fc29de6612e77 | ||
| - filename: src/utils/query-parser.ts | ||
| checksum: ce26f57850556f9c68706dbf3c9d5a642af10a8bc914dda279c5db31e662e17e | ||
| - filename: .github/workflows/secrets-scan.yml | ||
| checksum: d79ec3f3288964f7d117b9ad319a54c0ebc152e35f69be8fde95522034fdfb2a | ||
| version: '1.0' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2024 Contentstack | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| @echo off | ||
|
|
||
| node "%~dp0\dev" %* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/usr/bin/env node_modules/.bin/ts-node | ||
| // eslint-disable-next-line node/shebang, unicorn/prefer-top-level-await | ||
| (async () => { | ||
| const oclif = await import('@oclif/core'); | ||
| await oclif.execute({ development: true, dir: __dirname }); | ||
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| @echo off | ||
|
|
||
| node "%~dp0\run" %* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/usr/bin/env node | ||
|
|
||
| // eslint-disable-next-line unicorn/prefer-top-level-await | ||
| (async () => { | ||
| const oclif = await import('@oclif/core'); | ||
| await oclif.execute({ development: false, dir: __dirname }); | ||
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.