-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jayanth@Aries
authored and
Jayanth@Aries
committed
Feb 22, 2024
0 parents
commit 48994c6
Showing
150 changed files
with
149,149 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,8 @@ | ||
ENABLE_NEW_JSX_TRANSFORM="true" | ||
FAST_REFRESH="true" | ||
|
||
CLOUD_IDENTIFIER=gcp-us | ||
APPLICATION_ID=todo-application-id | ||
APPLICATION_URL=https://todo.url.com/url | ||
INITIAL_PROJECT_KEY=bundles-starter-development | ||
ENTRY_POINT_URI_PATH=custom-objects-editor |
This file contains 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 @@ | ||
dist/** | ||
node_modules/* | ||
coverage/* | ||
public/* | ||
schema.graphql | ||
*.rest.graphql |
This file contains 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,61 @@ | ||
process.env.ENABLE_NEW_JSX_TRANSFORM = 'true'; | ||
|
||
/** | ||
* @type {import("eslint").Linter.Config} | ||
*/ | ||
module.exports = { | ||
extends: [ | ||
'@commercetools-frontend/eslint-config-mc-app', | ||
"eslint:recommended", | ||
// "plugin:react/recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:import/recommended", | ||
"plugin:import/typescript", | ||
"plugin:prettier/recommended" | ||
], | ||
plugins: ['graphql', 'unused-imports'], | ||
overrides: [ | ||
{ | ||
files: ['**/*.ctp.graphql'], | ||
rules: { | ||
'graphql/template-strings': [ | ||
'error', | ||
{ | ||
env: 'literal', | ||
schemaJson: require('./schemas/ctp.json'), | ||
}, | ||
], | ||
}, | ||
}, | ||
], | ||
ignorePatterns: ['public/', 'node_nodules/', '*.config.js', '.eslintrc.js', '*.d.ts'], | ||
rules: { | ||
quotes: ['error', 'single'], | ||
// we want to force semicolons | ||
semi: ['error', 'always'], | ||
// we use 2 spaces to indent our code | ||
indent: ['error', 2, { "SwitchCase": 1 }], | ||
|
||
// we want to avoid extraneous spaces | ||
'no-multi-spaces': ['error'], | ||
'react/jsx-uses-react': ['error'], | ||
'react/jsx-uses-vars': ['error'], | ||
'import/order': ['error'], | ||
'import/newline-after-import': ['error'], | ||
'react/prop-types': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/explicit-module-boundary-types': 'off', //disable for CI | ||
'no-unused-vars': 'off', // or "@typescript-eslint/no-unused-vars": "off", | ||
'unused-imports/no-unused-imports': 'error', | ||
'unused-imports/no-unused-vars': [ | ||
'warn', | ||
{ | ||
vars: 'all', | ||
varsIgnorePattern: '^_', | ||
args: 'after-used', | ||
argsIgnorePattern: '^_', | ||
}, | ||
], | ||
}, | ||
}; |
Binary file not shown.
This file contains 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,38 @@ | ||
name: Custom Applications CI | ||
|
||
on: [push] | ||
|
||
env: | ||
CI: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [12.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Get yarn cache | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
- uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Install dependencies | ||
run: yarn install --pure-lockfile | ||
- name: Lint | ||
run: yarn run lint | ||
- name: Test | ||
run: yarn run test | ||
- name: Build | ||
run: yarn run build |
This file contains 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,13 @@ | ||
node_modules/ | ||
dist/ | ||
coverage/ | ||
public/ | ||
csp.json | ||
env.json | ||
.env.local | ||
.firebase/ | ||
.firebaserc | ||
firebase.json | ||
lambda.js | ||
_site/ | ||
.sass-cache/ |
This file contains 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 @@ | ||
package.json | ||
**/dist/ | ||
**/public/ | ||
**/coverage/ |
This file contains 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,19 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"parser": "typescript", | ||
"overrides": [ | ||
{ | ||
"files": "*.json", | ||
"options": { | ||
"parser": "json" | ||
} | ||
}, | ||
{ | ||
"files": "*.graphql", | ||
"options": { | ||
"parser": "graphql" | ||
} | ||
} | ||
] | ||
} |
This file contains 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,26 @@ | ||
/* THIS IS A GENERATED FILE */ | ||
/* eslint-disable import/no-duplicates */ | ||
|
||
declare module '*/fetch-channel-details.ctp.graphql' { | ||
import { DocumentNode } from 'graphql'; | ||
const defaultDocument: DocumentNode; | ||
export const FetchChannelDetails: DocumentNode; | ||
|
||
export default defaultDocument; | ||
} | ||
|
||
declare module '*/fetch-channels.ctp.graphql' { | ||
import { DocumentNode } from 'graphql'; | ||
const defaultDocument: DocumentNode; | ||
export const FetchChannels: DocumentNode; | ||
|
||
export default defaultDocument; | ||
} | ||
|
||
declare module '*/update-channel-details.ctp.graphql' { | ||
import { DocumentNode } from 'graphql'; | ||
const defaultDocument: DocumentNode; | ||
export const UpdateChannelDetails: DocumentNode; | ||
|
||
export default defaultDocument; | ||
} |
This file contains 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,11 @@ | ||
declare module '@commercetools/sync-actions' { | ||
export type SyncAction = { action: string; [x: string]: unknown }; | ||
function buildActions<NextDraft, OriginalDraft>( | ||
nextDraft: NextDraft, | ||
originalDraft: OriginalDraft | ||
): SyncAction[]; | ||
export type Syncer = { | ||
buildActions: typeof buildActions; | ||
}; | ||
export function createSyncChannels(): Syncer; | ||
} |
This file contains 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) 2021 commercetools | ||
|
||
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 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,16 @@ | ||
<p align="center"> | ||
<a href="https://commercetools.com/"> | ||
<img alt="commercetools logo" src="https://unpkg.com/@commercetools-frontend/assets/logos/commercetools_primary-logo_horizontal_RGB.png"> | ||
</a> | ||
<b>Custom Application starter template</b> | ||
</p> | ||
|
||
A starter template to [develop Custom Applications](https://docs.commercetools.com/custom-applications/) for the Merchant Center. | ||
|
||
# Installing the template | ||
|
||
Read the [Getting started](https://docs.commercetools.com/custom-applications/getting-started) documentation for more information. | ||
|
||
# Developing the Custom Application | ||
|
||
Learn more about [developing a Custom Application](https://docs.commercetools.com/custom-applications/development) and [how to use the CLI](https://docs.commercetools.com/custom-applications/api-reference/cli). |
Oops, something went wrong.