Skip to content

Commit

Permalink
Merge branch 'master' into sarah/lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahschwartz authored Oct 23, 2023
2 parents 8c166d6 + b8af5e1 commit c0afcb8
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 13 deletions.
2 changes: 1 addition & 1 deletion docs/latest/fuel-indexer
Submodule fuel-indexer updated 46 files
+25 −16 Cargo.lock
+17 −17 Cargo.toml
+6 −17 docs/src/getting-started/dependencies.md
+1 −0 packages/fuel-indexer-api-server/Cargo.toml
+8 −0 packages/fuel-indexer-api-server/src/api.rs
+75 −0 packages/fuel-indexer-api-server/src/ffi.rs
+1 −0 packages/fuel-indexer-api-server/src/lib.rs
+43 −5 packages/fuel-indexer-api-server/src/uses.rs
+66 −18 packages/fuel-indexer-database/database-types/src/lib.rs
+1 −0 packages/fuel-indexer-database/postgres/migrations/20231012190730_indexer_status.down.sql
+6 −0 packages/fuel-indexer-database/postgres/migrations/20231012190730_indexer_status.up.sql
+58 −0 packages/fuel-indexer-database/postgres/src/lib.rs
+31 −0 packages/fuel-indexer-database/src/queries.rs
+1 −0 packages/fuel-indexer-lib/Cargo.toml
+13 −0 packages/fuel-indexer-lib/src/config/cli.rs
+5 −0 packages/fuel-indexer-lib/src/config/mod.rs
+0 −5 packages/fuel-indexer-lib/src/constants.rs
+3 −0 packages/fuel-indexer-lib/src/defaults.rs
+372 −2 packages/fuel-indexer-lib/src/graphql/mod.rs
+86 −21 packages/fuel-indexer-lib/src/graphql/parser.rs
+4 −4 packages/fuel-indexer-lib/src/graphql/validator.rs
+29 −3 packages/fuel-indexer-macros/src/decoder.rs
+67 −17 packages/fuel-indexer-macros/src/helpers.rs
+48 −2 packages/fuel-indexer-macros/src/indexer.rs
+8 −0 packages/fuel-indexer-macros/src/schema.rs
+2 −2 packages/fuel-indexer-schema/src/db/tables.rs
+2 −2 packages/fuel-indexer-tests/contracts/fuel-indexer-test/Forc.lock
+175 −158 packages/fuel-indexer-tests/contracts/fuel-indexer-test/out/debug/fuel-indexer-test-abi.json
+ packages/fuel-indexer-tests/contracts/fuel-indexer-test/out/debug/fuel-indexer-test.bin
+3 −2 packages/fuel-indexer-tests/contracts/fuel-indexer-test/src/main.sw
+1 −1 packages/fuel-indexer-tests/indexers/fuel-indexer-test/fuel_indexer_test.yaml
+ packages/fuel-indexer-tests/indexers/simple-wasm/simple_wasm.wasm
+2 −2 packages/fuel-indexer-tests/tests/indexing.rs
+1 −0 packages/fuel-indexer-tests/tests/snapshots/integration_tests__commands__default_indexer_config.snap
+4 −0 packages/fuel-indexer-tests/tests/snapshots/integration_tests__commands__forc_index_start_help_output.snap
+4 −0 ...uel-indexer-tests/tests/snapshots/integration_tests__commands__fuel_indexer_api_server_run_help_output.snap
+4 −0 packages/fuel-indexer-tests/tests/snapshots/integration_tests__commands__fuel_indexer_run_help_output.snap
+13 −0 packages/fuel-indexer/src/commands/run.rs
+2 −2 packages/fuel-indexer/src/database.rs
+33 −19 packages/fuel-indexer/src/executor.rs
+5 −6 packages/fuel-indexer/src/lib.rs
+62 −24 packages/fuel-indexer/src/service.rs
+1 −0 plugins/forc-index/Cargo.toml
+8 −5 plugins/forc-index/src/ops/forc_index_deploy.rs
+33 −2 plugins/forc-index/src/ops/forc_index_start.rs
+77 −22 plugins/forc-index/src/ops/forc_index_status.rs
2 changes: 1 addition & 1 deletion docs/latest/fuels-ts
Submodule fuels-ts updated 145 files
2 changes: 1 addition & 1 deletion docs/latest/fuels-wallet
Submodule fuels-wallet updated 231 files
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"build": "next build",
"build:ci": "run-s docs:* generate:* build",
"build:ci": "run-s docs:* generate:* patch:wallet build",
"check": "run-s lint prettier:check",
"check:prod": "run-s lint:prod prettier:check",
"copy:icons": "cp -r ./node_modules/@fuel-ui/icons/dist/icons/sprite.svg ./public/icons",
Expand All @@ -22,6 +22,7 @@
"prettier:check": "prettier --check .",
"prettier:format": "prettier --write .",
"start": "next start",
"patch:wallet": "node scripts/wallet-examples.mjs",
"test:guides": "npx playwright test tests/test.spec.ts",
"test:guides:debug": "DEBUG=pw:api npx playwright test tests/test.spec.ts",
"ts:check": "tsc --noEmit",
Expand Down
19 changes: 11 additions & 8 deletions scripts/generate-links/getSortedLinks.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -192,15 +192,18 @@ export default function getSortedLinks(config, docs) {
.replaceAll(' ', '_')
.replaceAll('-', '_');

const pathLength = isLatest ? 4 : 3;
const isIndexA = a.slug.split('/').length === pathLength;
if (isIndexA) {
return -1;
}
const isIndexB = b.slug.split('/').length === pathLength;
if (isIndexB) {
return 1;
if (a.slug.includes('fuels-ts')) {
const pathLength = isLatest ? 4 : 3;
const isIndexA = a.slug.split('/').length === pathLength;
if (isIndexA) {
return -1;
}
const isIndexB = b.slug.split('/').length === pathLength;
if (isIndexB) {
return 1;
}
}

const aIdx = catOrder ? catOrder.indexOf(lowerA) : 0;
const bIdx = catOrder ? catOrder.indexOf(lowerB) : 0;
const result = aIdx - bIdx;
Expand Down
34 changes: 34 additions & 0 deletions scripts/wallet-examples.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import fs from 'fs';
import path from 'path';

const examplesPath = './docs/fuels-wallet/packages/docs/examples';
const latestExamplesPath = './docs/latest/fuels-wallet/packages/docs/examples';

const propToReplace = 'onPress';
const replacementProp = 'onClick';

const pattern = new RegExp(`\\b${propToReplace}\\s*=\\s*\\{([^}]+)\\}`, 'g');

function replaceInFile(filePath) {
const content = fs.readFileSync(filePath, 'utf8');
const newContent = content.replace(pattern, `${replacementProp}={$1}`);
fs.writeFileSync(filePath, newContent);
}

function processDirectory(directory) {
const files = fs.readdirSync(directory);

files.forEach((fileName) => {
const filePath = path.join(directory, fileName);
const stat = fs.statSync(filePath);

if (stat.isDirectory()) {
processDirectory(filePath);
} else if (fileName.endsWith('.tsx')) {
replaceInFile(filePath);
}
});
}

processDirectory(examplesPath);
processDirectory(latestExamplesPath);
3 changes: 3 additions & 0 deletions src/components/FeedbackForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,9 @@ const styles = {
submit: cssObj({
'&:hover': {
backgroundColor: '$semanticSolidInfoBg !important',
'html[class="fuel_light-theme"] &': {
color: '$gray6',
},
},
}),
helpful: cssObj({
Expand Down
1 change: 1 addition & 0 deletions src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ const styles = {
maxWidth: '1000px',
width: '100vw',
boxSizing: 'border-box',
margin: 'auto',
},

'@xl': {
Expand Down
4 changes: 4 additions & 0 deletions src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,7 @@ textarea {
.form-textarea:focus {
outline: 1px solid var(--colors-inputBaseBorder) !important;
}

select {
color: inherit !important;
}

0 comments on commit c0afcb8

Please sign in to comment.