chore: add cypress files to ignore list and use glob ignore option (#2700)
This commit is contained in:
parent
f58144d785
commit
c7aec5cfcb
@ -3,7 +3,7 @@ import { requestGQL } from './request';
|
|||||||
|
|
||||||
export async function getEthereumConfig() {
|
export async function getEthereumConfig() {
|
||||||
const query = gql`
|
const query = gql`
|
||||||
{
|
query {
|
||||||
networkParameter(key: "blockchains.ethereumConfig") {
|
networkParameter(key: "blockchains.ethereumConfig") {
|
||||||
value
|
value
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@ import { requestGQL } from './request';
|
|||||||
|
|
||||||
export async function getMarkets() {
|
export async function getMarkets() {
|
||||||
const query = gql`
|
const query = gql`
|
||||||
{
|
query {
|
||||||
marketsConnection {
|
marketsConnection {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
|
@ -3,7 +3,7 @@ import { requestGQL } from './request';
|
|||||||
|
|
||||||
export async function getPartyStake(partyId: string) {
|
export async function getPartyStake(partyId: string) {
|
||||||
const query = gql`
|
const query = gql`
|
||||||
{
|
query {
|
||||||
party(id:"${partyId}") {
|
party(id:"${partyId}") {
|
||||||
stakingSummary {
|
stakingSummary {
|
||||||
currentStakeAvailable
|
currentStakeAvailable
|
||||||
|
@ -3,7 +3,7 @@ import { requestGQL } from './request';
|
|||||||
|
|
||||||
export async function getProposal(id: string) {
|
export async function getProposal(id: string) {
|
||||||
const query = gql`
|
const query = gql`
|
||||||
{
|
query {
|
||||||
proposal(id: "${id}") {
|
proposal(id: "${id}") {
|
||||||
id
|
id
|
||||||
state
|
state
|
||||||
|
@ -3,7 +3,7 @@ import { requestGQL } from './request';
|
|||||||
|
|
||||||
export async function getVegaAsset() {
|
export async function getVegaAsset() {
|
||||||
const query = gql`
|
const query = gql`
|
||||||
{
|
query {
|
||||||
assetsConnection {
|
assetsConnection {
|
||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
|
@ -9,9 +9,13 @@ const ignore = [
|
|||||||
'libs/fills/src/lib/fills-data-provider.ts',
|
'libs/fills/src/lib/fills-data-provider.ts',
|
||||||
'libs/orders/src/lib/components/order-data-provider/order-data-provider.ts',
|
'libs/orders/src/lib/components/order-data-provider/order-data-provider.ts',
|
||||||
'libs/trades/src/lib/trades-data-provider.ts',
|
'libs/trades/src/lib/trades-data-provider.ts',
|
||||||
|
// any queries in libs/cypress run against capsule
|
||||||
|
'libs/cypress/**/*.ts',
|
||||||
|
'libs/cypress/**/*.js',
|
||||||
];
|
];
|
||||||
|
|
||||||
const globPromise = util.promisify(glob);
|
const globPromise = util.promisify(glob);
|
||||||
|
const globOptions = { ignore };
|
||||||
|
|
||||||
const processTsFiles = (files) => {
|
const processTsFiles = (files) => {
|
||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
@ -44,15 +48,11 @@ ${textContent}
|
|||||||
};
|
};
|
||||||
|
|
||||||
const run = async () => {
|
const run = async () => {
|
||||||
const files1 = await globPromise('apps/**/*.ts');
|
const files1 = await globPromise('apps/**/*.ts', globOptions);
|
||||||
const files2 = await globPromise('libs/**/*.ts');
|
const files2 = await globPromise('libs/**/*.ts', globOptions);
|
||||||
const files3 = await globPromise('apps/**/*.tsx');
|
const files3 = await globPromise('apps/**/*.tsx', globOptions);
|
||||||
const files4 = await globPromise('lib/**/*.tsx');
|
const files4 = await globPromise('lib/**/*.tsx', globOptions);
|
||||||
processTsFiles(
|
processTsFiles([...files1, ...files2, ...files3, ...files4]);
|
||||||
[...files1, ...files2, ...files3, ...files4].filter(
|
|
||||||
(f) => !ignore.includes(f)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
const gqlFiles1 = await globPromise('lib/**/*.graphql');
|
const gqlFiles1 = await globPromise('lib/**/*.graphql');
|
||||||
const gqlFiles2 = await globPromise('apps/**/*.graphql');
|
const gqlFiles2 = await globPromise('apps/**/*.graphql');
|
||||||
processGraphQlFiles([...gqlFiles1, ...gqlFiles2]);
|
processGraphQlFiles([...gqlFiles1, ...gqlFiles2]);
|
||||||
|
Loading…
Reference in New Issue
Block a user