Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,838 changes: 870 additions & 968 deletions e2e/cypress/support/dataCyType.d.ts

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions webapp/dataCy.core.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,13 @@ export function formatOutput(sortedItems) {
let fileContent = '// This file was generated. DO NOT edit manually.\n';
fileContent += '// Use `npm run generate-data-cy` to update this file.\n\n';

if (sortedItems.length === 0) {
fileContent += 'declare namespace DataCy {\n export type Value = never\n}';
return fileContent;
}

fileContent += 'declare namespace DataCy {\n';
fileContent +=
' export type Value = \n ' +
sortedItems.map((i) => `"${i}"`).join(' |\n ') +
'\n}';
fileContent += ' interface Values {\n';
fileContent += sortedItems
.map((i) => ` "${i}": true;`)
.join('\n');
fileContent += '\n }\n';
fileContent += ' export type Value = keyof Values;\n';
fileContent += '}\n';
return fileContent;
}
1 change: 0 additions & 1 deletion webapp/dataCy.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ const SRC_PATH = resolve('./src');
const OUTPUT_PATH = resolve('../e2e/cypress/support/dataCyType.d.ts');

export function extractDataCy(): Plugin {
// Incremental state for watchChange — maps a file path to its dataCy values
const fileItems: Record<string, string[]> = {};

return {
Expand Down
38 changes: 10 additions & 28 deletions webapp/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"schema": "node ./scripts/generate-schemas.js public",
"billing-schema": "node ./scripts/generate-schemas.js billing",
"prettier": "prettier --write ./src",
"eslint": "eslint --ext .ts --ext .tsx --max-warnings 0 --report-unused-disable-directives .",
"eslint": "eslint --ext .ts --ext .tsx --max-warnings 0 --report-unused-disable-directives --resolve-plugins-relative-to . . $([ -d ../../billing/frontend ] && echo ../../billing/frontend)",
"tsc": "npm run --prefix ../library build:types && tsc",
"unused-exports": "ts-unused-exports tsconfig.json --findCompletelyUnusedFiles --ignoreFiles=GoToDocsButton",
"tsc:prod": "npm run --prefix ../library build:types && tsc --project tsconfig.prod.json",
Expand Down
2 changes: 1 addition & 1 deletion webapp/scripts/generate-schemas.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const definitions = {
},
billing: {
schema: 'V2%20Billing',
output: './src/service/billingApiSchema.generated.ts',
output: '../../billing/frontend/billingApiSchema.generated.ts',
},
};

Expand Down
27 changes: 0 additions & 27 deletions webapp/src/ee/billing/BillingSection.tsx

This file was deleted.

49 changes: 0 additions & 49 deletions webapp/src/ee/billing/CustomerPortal/CustomerPortal.tsx

This file was deleted.

Loading
Loading