From a68880f1dc9165b8e25bec1478e327b8fb522c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 11:46:07 +0200 Subject: [PATCH 01/15] Configure api-extractor & documenter. --- .gitattributes | 7 +- .gitignore | 3 + .npmignore | 1 + .vscode/settings.json | 3 +- README.md | 22 ++- api-extractor.json | 434 ++++++++++++++++++++++++++++++++++++++++++ package.json | 4 +- 7 files changed, 469 insertions(+), 5 deletions(-) create mode 100644 api-extractor.json diff --git a/.gitattributes b/.gitattributes index 5bdaa90d..7b84ccdf 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,8 @@ -# https://github.com/github/linguist#overrides +# https://github.com/github-linguist/linguist/blob/master/docs/overrides.md +# https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github src/proto/compiled.js linguist-generated src/proto/compiled.d.ts linguist-generated +docs/* linguist-documentation + +# https://api-extractor.com/pages/setup/invoking/ +*.json linguist-language=JSON-with-Comments diff --git a/.gitignore b/.gitignore index f25c4bf9..a11ad61d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ out-browser out-browser-tests node_modules/ tags +temp/ +dist/ +etc/ diff --git a/.npmignore b/.npmignore index 565b2be5..bbfd77d0 100644 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1,3 @@ src/testdata/** src/testutils/** +docs/** diff --git a/.vscode/settings.json b/.vscode/settings.json index 7a73a41b..e71a0461 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,2 +1,3 @@ { -} \ No newline at end of file + "files.associations": { "*.json": "jsonc" } +} diff --git a/README.md b/README.md index 83d3a5a4..89bdbb78 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ MultiversX SDK for JavaScript and TypeScript (written in TypeScript). ## Documentation - - [Cookbook](https://docs.multiversx.com/sdk-and-tools/sdk-js/sdk-js-cookbook/) +- [Cookbook](https://docs.multiversx.com/sdk-and-tools/sdk-js/sdk-js-cookbook/) ## Distribution @@ -63,4 +63,22 @@ In order to run the tests **in the browser**, do as follows: make clean && npm run browser-tests ``` -For the `localnet` tests, make sure you have a *local testnet* up & running. In order to start a *local testnet*, follow [this](https://docs.multiversx.com/developers/setup-local-testnet/). +For the `localnet` tests, make sure you have a _local testnet_ up & running. In order to start a _local testnet_, follow [this](https://docs.multiversx.com/developers/setup-local-testnet/). + +### Generating the documentation + +API documentation is generated from the source code using [api-extractor](https://api-extractor.com). + +Prerequisites: + +``` +npm install -g @microsoft/api-extractor +npm install -g @microsoft/api-documenter +``` + +In order to (re)generate the documentation, run the following: + +``` +npm run api:extract +npm run api:document +``` diff --git a/api-extractor.json b/api-extractor.json new file mode 100644 index 00000000..868066ec --- /dev/null +++ b/api-extractor.json @@ -0,0 +1,434 @@ +/** + * Config file for API Extractor. For more info, please visit: https://api-extractor.com + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + + /** + * Optionally specifies another JSON config file that this file extends from. This provides a way for + * standard settings to be shared across multiple projects. + * + * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains + * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be + * resolved using NodeJS require(). + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "extends": "./shared/api-extractor-base.json" + // "extends": "my-package/include/api-extractor-base.json" + + /** + * Determines the "" token that can be used with other config file settings. The project folder + * typically contains the tsconfig.json and package.json config files, but the path is user-defined. + * + * The path is resolved relative to the folder of the config file that contains the setting. + * + * The default value for "projectFolder" is the token "", which means the folder is determined by traversing + * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder + * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error + * will be reported. + * + * SUPPORTED TOKENS: + * DEFAULT VALUE: "" + */ + // "projectFolder": "..", + + /** + * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor + * analyzes the symbols exported by this module. + * + * The file extension must be ".d.ts" and not ".ts". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + */ + "mainEntryPointFilePath": "/out/index.d.ts", + + /** + * A list of NPM package names whose exports should be treated as part of this package. + * + * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", + * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part + * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly + * imports library2. To avoid this, we might specify: + * + * "bundledPackages": [ "library2" ], + * + * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been + * local files for library1. + * + * The "bundledPackages" elements may specify glob patterns using minimatch syntax. To ensure deterministic + * output, globs are expanded by matching explicitly declared top-level dependencies only. For example, + * the pattern below will NOT match "@my-company/example" unless it appears in a field such as "dependencies" + * or "devDependencies" of the project's package.json file: + * + * "bundledPackages": [ "@my-company/*" ], + */ + "bundledPackages": [], + + /** + * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files + * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. + * To use the OS's default newline kind, specify "os". + * + * DEFAULT VALUE: "crlf" + */ + // "newlineKind": "crlf", + + /** + * Set to true when invoking API Extractor's test harness. When `testMode` is true, the `toolVersion` field in the + * .api.json file is assigned an empty string to prevent spurious diffs in output files tracked for tests. + * + * DEFAULT VALUE: "false" + */ + // "testMode": false, + + /** + * Specifies how API Extractor sorts members of an enum when generating the .api.json file. By default, the output + * files will be sorted alphabetically, which is "by-name". To keep the ordering in the source code, specify + * "preserve". + * + * DEFAULT VALUE: "by-name" + */ + // "enumMemberOrder": "by-name", + + /** + * Determines how the TypeScript compiler engine will be invoked by API Extractor. + */ + "compiler": { + /** + * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * Note: This setting will be ignored if "overrideTsconfig" is used. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/tsconfig.json" + */ + // "tsconfigFilePath": "/tsconfig.json", + /** + * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. + * The object must conform to the TypeScript tsconfig schema: + * + * http://json.schemastore.org/tsconfig + * + * If omitted, then the tsconfig.json file will be read from the "projectFolder". + * + * DEFAULT VALUE: no overrideTsconfig section + */ + // "overrideTsconfig": { + // . . . + // } + /** + * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended + * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when + * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses + * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. + * + * DEFAULT VALUE: false + */ + // "skipLibCheck": true, + }, + + /** + * Configures how the API report file (*.api.md) will be generated. + */ + "apiReport": { + /** + * (REQUIRED) Whether to generate an API report. + */ + "enabled": true + + /** + * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce + * a full file path. + * + * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". + * + * SUPPORTED TOKENS: , + * DEFAULT VALUE: ".api.md" + */ + // "reportFileName": ".api.md", + + /** + * Specifies the folder where the API report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, + * e.g. for an API review. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportFolder": "/temp/", + + /** + * Specifies the folder where the temporary report file is written. The file name portion is determined by + * the "reportFileName" setting. + * + * After the temporary file is written to disk, it is compared with the file in the "reportFolder". + * If they are different, a production build will fail. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/" + */ + // "reportTempFolder": "/temp/", + + /** + * Whether "forgotten exports" should be included in the API report file. Forgotten exports are declarations + * flagged with `ae-forgotten-export` warnings. See https://api-extractor.com/pages/messages/ae-forgotten-export/ to + * learn more. + * + * DEFAULT VALUE: "false" + */ + // "includeForgottenExports": false + }, + + /** + * Configures how the doc model file (*.api.json) will be generated. + */ + "docModel": { + /** + * (REQUIRED) Whether to generate a doc model file. + */ + "enabled": true + + /** + * The output path for the doc model file. The file extension should be ".api.json". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/temp/.api.json" + */ + // "apiJsonFilePath": "/temp/.api.json", + + /** + * Whether "forgotten exports" should be included in the doc model file. Forgotten exports are declarations + * flagged with `ae-forgotten-export` warnings. See https://api-extractor.com/pages/messages/ae-forgotten-export/ to + * learn more. + * + * DEFAULT VALUE: "false" + */ + // "includeForgottenExports": false, + + /** + * The base URL where the project's source code can be viewed on a website such as GitHub or + * Azure DevOps. This URL path corresponds to the `` path on disk. + * + * This URL is concatenated with the file paths serialized to the doc model to produce URL file paths to individual API items. + * For example, if the `projectFolderUrl` is "https://github.com/microsoft/rushstack/tree/main/apps/api-extractor" and an API + * item's file path is "api/ExtractorConfig.ts", the full URL file path would be + * "https://github.com/microsoft/rushstack/tree/main/apps/api-extractor/api/ExtractorConfig.js". + * + * Can be omitted if you don't need source code links in your API documentation reference. + * + * SUPPORTED TOKENS: none + * DEFAULT VALUE: "" + */ + // "projectFolderUrl": "http://github.com/path/to/your/projectFolder" + }, + + /** + * Configures how the .d.ts rollup file will be generated. + */ + "dtsRollup": { + /** + * (REQUIRED) Whether to generate the .d.ts rollup file. + */ + "enabled": true + + /** + * Specifies the output path for a .d.ts rollup file to be generated without any trimming. + * This file will include all declarations that are exported by the main entry point. + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "/dist/.d.ts" + */ + // "untrimmedFilePath": "/dist/.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for an "alpha" release. + * This file will include only declarations that are marked as "@public", "@beta", or "@alpha". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "alphaTrimmedFilePath": "/dist/-alpha.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. + * This file will include only declarations that are marked as "@public" or "@beta". + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "betaTrimmedFilePath": "/dist/-beta.d.ts", + + /** + * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. + * This file will include only declarations that are marked as "@public". + * + * If the path is an empty string, then this file will not be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "publicTrimmedFilePath": "/dist/-public.d.ts", + + /** + * When a declaration is trimmed, by default it will be replaced by a code comment such as + * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the + * declaration completely. + * + * DEFAULT VALUE: false + */ + // "omitTrimmingComments": true + }, + + /** + * Configures how the tsdoc-metadata.json file will be generated. + */ + "tsdocMetadata": { + /** + * Whether to generate the tsdoc-metadata.json file. + * + * DEFAULT VALUE: true + */ + // "enabled": true, + /** + * Specifies where the TSDoc metadata file should be written. + * + * The path is resolved relative to the folder of the config file that contains the setting; to change this, + * prepend a folder token such as "". + * + * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", + * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup + * falls back to "tsdoc-metadata.json" in the package folder. + * + * SUPPORTED TOKENS: , , + * DEFAULT VALUE: "" + */ + // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" + }, + + /** + * Configures how API Extractor reports error and warning messages produced during analysis. + * + * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. + */ + "messages": { + /** + * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing + * the input .d.ts files. + * + * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "compilerMessageReporting": { + /** + * Configures the default routing for messages that don't match an explicit rule in this table. + */ + "default": { + /** + * Specifies whether the message should be written to the the tool's output log. Note that + * the "addToApiReportFile" property may supersede this option. + * + * Possible values: "error", "warning", "none" + * + * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail + * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes + * the "--local" option), the warning is displayed but the build will not fail. + * + * DEFAULT VALUE: "warning" + */ + "logLevel": "warning" + + /** + * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), + * then the message will be written inside that file; otherwise, the message is instead logged according to + * the "logLevel" option. + * + * DEFAULT VALUE: false + */ + // "addToApiReportFile": false + } + + // "TS2551": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by API Extractor during its analysis. + * + * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" + * + * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings + */ + "extractorMessageReporting": { + "default": { + "logLevel": "warning" + // "addToApiReportFile": false + } + + // "ae-extra-release-tag": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + }, + + /** + * Configures handling of messages reported by the TSDoc parser when analyzing code comments. + * + * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" + * + * DEFAULT VALUE: A single "default" entry with logLevel=warning. + */ + "tsdocMessageReporting": { + "default": { + "logLevel": "warning" + // "addToApiReportFile": false + } + + // "tsdoc-link-tag-unescaped-text": { + // "logLevel": "warning", + // "addToApiReportFile": true + // }, + // + // . . . + } + } +} diff --git a/package.json b/package.json index 1175e6a7..9957e768 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,9 @@ "browser-tests": "make clean && make browser-tests && http-server --port=9876 -o browser-tests/index.html", "lint": "tslint --project .", "pretest": "npm run compile", - "prepare": "npm run compile" + "prepare": "npm run compile", + "api:extract": "api-extractor run --local --verbose", + "api:document": "api-documenter markdown --input-folder temp --output-folder docs" }, "author": "MultiversX", "license": "MIT", From 9a6b9331a7c29e0ae0e33a67e73467a63969122b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 16:36:36 +0200 Subject: [PATCH 02/15] Update readme. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 89bdbb78..23ee4a36 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,9 @@ Prerequisites: ``` npm install -g @microsoft/api-extractor -npm install -g @microsoft/api-documenter + +# https://github.com/microsoft/rushstack/issues/4586 +npm install -g @microsoft/api-documenter@7.23.38 ``` In order to (re)generate the documentation, run the following: From a13b2824572e6f63fa49cb362eeb598197a03c55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 17:36:07 +0200 Subject: [PATCH 03/15] Update docs. --- .npmignore | 1 - README.md | 12 ++++++++++-- package.json | 2 +- src/index.ts | 6 ++++++ 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.npmignore b/.npmignore index bbfd77d0..565b2be5 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,2 @@ src/testdata/** src/testutils/** -docs/** diff --git a/README.md b/README.md index 23ee4a36..6658d9ba 100644 --- a/README.md +++ b/README.md @@ -65,7 +65,7 @@ make clean && npm run browser-tests For the `localnet` tests, make sure you have a _local testnet_ up & running. In order to start a _local testnet_, follow [this](https://docs.multiversx.com/developers/setup-local-testnet/). -### Generating the documentation +### Updating the documentation API documentation is generated from the source code using [api-extractor](https://api-extractor.com). @@ -81,6 +81,14 @@ npm install -g @microsoft/api-documenter@7.23.38 In order to (re)generate the documentation, run the following: ``` +rm -rf ~/mx-sdk-js-core-docs +git clone -b gh-pages --single-branch https://github.com/multiversx/mx-sdk-js-core.git ~/mx-sdk-js-core-docs + +npm run compile npm run api:extract -npm run api:document + +MAJOR_VERSION=v$(node -p "require('./package.json').version.split('.')[0]") +DOCS_OUTPUT_FOLDER=~/mx-sdk-js-core-docs/${MAJOR_VERSION} npm run api:document ``` + +Then, commit the changes in ` ~/mx-sdk-js-core-docs` push them to GitHub. diff --git a/package.json b/package.json index 9957e768..28dec29c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "pretest": "npm run compile", "prepare": "npm run compile", "api:extract": "api-extractor run --local --verbose", - "api:document": "api-documenter markdown --input-folder temp --output-folder docs" + "api:document": "api-documenter markdown --input-folder temp --output-folder $DOCS_OUTPUT_FOLDER" }, "author": "MultiversX", "license": "MIT", diff --git a/src/index.ts b/src/index.ts index cb6d0047..e89b0105 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,9 @@ +/** + * A library for interacting with the MultiversX blockchain (in general) and Smart Contracts (in particular). + * + * @packageDocumentation + */ + require('./globals'); export * from "./account"; From cc871a8c7ed3f9ce2714cfc9f9ef9d1341a2aba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 17:46:58 +0200 Subject: [PATCH 04/15] Sketch update docs. --- .github/workflows/update-docs.yml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/update-docs.yml diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml new file mode 100644 index 00000000..4700f58e --- /dev/null +++ b/.github/workflows/update-docs.yml @@ -0,0 +1,36 @@ +name: Update docs + +on: + pull_request: + branches: [main] + +permissions: + contents: write + +jobs: + update-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/checkout@v4 + with: + ref: "gh-pages" + repository: ${{ github.event.pull_request.head.repo.full_name }} + path: "docs" + + - uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: https://registry.npmjs.org/ + + - name: Create release + run: | + npm ci + npm run api:extract + MAJOR_VERSION=v$(node -p "require('./package.json').version.split('.')[0]") + DOCS_OUTPUT_FOLDER=${GITHUB_WORKSPACE}/docs/${MAJOR_VERSION} + + mkdir -p $DOCS_OUTPUT_FOLDER + + npm run api:document From 6d19b53492ff190a0f66eb82d6ec78abb011a998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 17:50:42 +0200 Subject: [PATCH 05/15] Fix workflow. --- .github/workflows/update-docs.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 4700f58e..ce201377 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -24,7 +24,14 @@ jobs: node-version: 18 registry-url: https://registry.npmjs.org/ - - name: Create release + - name: Install dependencies + run: | + npm install -g @microsoft/api-extractor + + # https://github.com/microsoft/rushstack/issues/4586 + npm install -g @microsoft/api-documenter@7.23.38 + + - name: Re-generate docs run: | npm ci npm run api:extract From 11fd0681b2d128c2a3c1dd288005e07b124f67e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 17:55:00 +0200 Subject: [PATCH 06/15] Re-generate docs. --- .github/workflows/update-docs.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index ce201377..16f17030 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -33,11 +33,16 @@ jobs: - name: Re-generate docs run: | - npm ci - npm run api:extract MAJOR_VERSION=v$(node -p "require('./package.json').version.split('.')[0]") DOCS_OUTPUT_FOLDER=${GITHUB_WORKSPACE}/docs/${MAJOR_VERSION} + mkdir -p ./etc mkdir -p $DOCS_OUTPUT_FOLDER + npm ci + npm run api:extract npm run api:document + + cd ${GITHUB_WORKSPACE}/docs + git commit -am "Re-generated docs." + git push From 287102ae00854a16537d540905b2680ffe6747c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 18:00:53 +0200 Subject: [PATCH 07/15] Fix passing params. --- .github/workflows/update-docs.yml | 2 +- .gitignore | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 16f17030..cf57cb97 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -41,7 +41,7 @@ jobs: npm ci npm run api:extract - npm run api:document + DOCS_OUTPUT_FOLDER=$DOCS_OUTPUT_FOLDER npm run api:document cd ${GITHUB_WORKSPACE}/docs git commit -am "Re-generated docs." diff --git a/.gitignore b/.gitignore index a11ad61d..f25c4bf9 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,3 @@ out-browser out-browser-tests node_modules/ tags -temp/ -dist/ -etc/ From 9296e2b47d0cf14bd9fa0f03c9d7655dfec189a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 18:07:14 +0200 Subject: [PATCH 08/15] Fix git config. --- .github/workflows/update-docs.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index cf57cb97..79c78666 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -44,5 +44,9 @@ jobs: DOCS_OUTPUT_FOLDER=$DOCS_OUTPUT_FOLDER npm run api:document cd ${GITHUB_WORKSPACE}/docs + + # See: https://github.com/actions/checkout/blob/main/README.md#push-a-commit-using-the-built-in-token + git config user.name github-actions + git config user.email github-actions@github.com git commit -am "Re-generated docs." git push From 2a37d8df80ad37c9ed7ea69d0fa5ccc207e4e7e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 18:12:13 +0200 Subject: [PATCH 09/15] Update docs. --- .github/workflows/update-docs.yml | 2 +- README.md | 1 + src/transaction.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 79c78666..6c90e607 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -48,5 +48,5 @@ jobs: # See: https://github.com/actions/checkout/blob/main/README.md#push-a-commit-using-the-built-in-token git config user.name github-actions git config user.email github-actions@github.com - git commit -am "Re-generated docs." + git commit -am "Re-generated docs." --allow-empty git push diff --git a/README.md b/README.md index 6658d9ba..e9849340 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ MultiversX SDK for JavaScript and TypeScript (written in TypeScript). ## Documentation - [Cookbook](https://docs.multiversx.com/sdk-and-tools/sdk-js/sdk-js-cookbook/) +- [Auto-generated API documentation](https://multiversx.github.io/mx-sdk-js-core/) ## Distribution diff --git a/src/transaction.ts b/src/transaction.ts index e8926c44..f5f5dff8 100644 --- a/src/transaction.ts +++ b/src/transaction.ts @@ -16,7 +16,7 @@ const createTransactionHasher = require("blake2b"); const TRANSACTION_HASH_LENGTH = 32; /** - * An abstraction for creating, signing and broadcasting transactions. + * An abstraction for creating and signing transactions. */ export class Transaction { /** From cd809284e05f91c736b4330353663364c6b72c25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 18:17:57 +0200 Subject: [PATCH 10/15] Fix after self review. --- .gitattributes | 1 - .npmignore | 1 + README.md | 30 +----------------------------- 3 files changed, 2 insertions(+), 30 deletions(-) diff --git a/.gitattributes b/.gitattributes index 7b84ccdf..55f6d563 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,7 +2,6 @@ # https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github src/proto/compiled.js linguist-generated src/proto/compiled.d.ts linguist-generated -docs/* linguist-documentation # https://api-extractor.com/pages/setup/invoking/ *.json linguist-language=JSON-with-Comments diff --git a/.npmignore b/.npmignore index 565b2be5..2deed472 100644 --- a/.npmignore +++ b/.npmignore @@ -1,2 +1,3 @@ src/testdata/** src/testutils/** +api-extractor.json diff --git a/README.md b/README.md index e9849340..24972f02 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ MultiversX SDK for JavaScript and TypeScript (written in TypeScript). ## Documentation - [Cookbook](https://docs.multiversx.com/sdk-and-tools/sdk-js/sdk-js-cookbook/) -- [Auto-generated API documentation](https://multiversx.github.io/mx-sdk-js-core/) +- [Auto-generated documentation](https://multiversx.github.io/mx-sdk-js-core/) ## Distribution @@ -65,31 +65,3 @@ make clean && npm run browser-tests ``` For the `localnet` tests, make sure you have a _local testnet_ up & running. In order to start a _local testnet_, follow [this](https://docs.multiversx.com/developers/setup-local-testnet/). - -### Updating the documentation - -API documentation is generated from the source code using [api-extractor](https://api-extractor.com). - -Prerequisites: - -``` -npm install -g @microsoft/api-extractor - -# https://github.com/microsoft/rushstack/issues/4586 -npm install -g @microsoft/api-documenter@7.23.38 -``` - -In order to (re)generate the documentation, run the following: - -``` -rm -rf ~/mx-sdk-js-core-docs -git clone -b gh-pages --single-branch https://github.com/multiversx/mx-sdk-js-core.git ~/mx-sdk-js-core-docs - -npm run compile -npm run api:extract - -MAJOR_VERSION=v$(node -p "require('./package.json').version.split('.')[0]") -DOCS_OUTPUT_FOLDER=~/mx-sdk-js-core-docs/${MAJOR_VERSION} npm run api:document -``` - -Then, commit the changes in ` ~/mx-sdk-js-core-docs` push them to GitHub. From 977dfb9d9e8ba97b4164962e2af334fbd13e652a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 18:20:26 +0200 Subject: [PATCH 11/15] Fix triggers. --- .github/workflows/update-docs.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 6c90e607..04ae8cf3 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -1,8 +1,9 @@ name: Update docs on: - pull_request: - branches: [main] + workflow_dispatch: + release: + types: [released] permissions: contents: write From ed625d73706714951610cab00c8bb8b45f188f27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 22:43:49 +0200 Subject: [PATCH 12/15] Typedoc instead of api-extractor. --- .gitattributes | 3 - .github/workflows/update-docs.yml | 11 +- .npmignore | 1 - api-extractor.json | 434 ------------------------------ 4 files changed, 4 insertions(+), 445 deletions(-) delete mode 100644 api-extractor.json diff --git a/.gitattributes b/.gitattributes index 55f6d563..e834ae0a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,3 @@ # https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github src/proto/compiled.js linguist-generated src/proto/compiled.d.ts linguist-generated - -# https://api-extractor.com/pages/setup/invoking/ -*.json linguist-language=JSON-with-Comments diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 04ae8cf3..2879fb32 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -2,6 +2,8 @@ name: Update docs on: workflow_dispatch: + pull_request: + branches: [main] release: types: [released] @@ -27,22 +29,17 @@ jobs: - name: Install dependencies run: | - npm install -g @microsoft/api-extractor - - # https://github.com/microsoft/rushstack/issues/4586 - npm install -g @microsoft/api-documenter@7.23.38 + npm install -g typedoc - name: Re-generate docs run: | MAJOR_VERSION=v$(node -p "require('./package.json').version.split('.')[0]") DOCS_OUTPUT_FOLDER=${GITHUB_WORKSPACE}/docs/${MAJOR_VERSION} - mkdir -p ./etc mkdir -p $DOCS_OUTPUT_FOLDER npm ci - npm run api:extract - DOCS_OUTPUT_FOLDER=$DOCS_OUTPUT_FOLDER npm run api:document + typedoc --out $DOCS_OUTPUT_FOLDER src/index.ts --includeVersion cd ${GITHUB_WORKSPACE}/docs diff --git a/.npmignore b/.npmignore index 2deed472..565b2be5 100644 --- a/.npmignore +++ b/.npmignore @@ -1,3 +1,2 @@ src/testdata/** src/testutils/** -api-extractor.json diff --git a/api-extractor.json b/api-extractor.json deleted file mode 100644 index 868066ec..00000000 --- a/api-extractor.json +++ /dev/null @@ -1,434 +0,0 @@ -/** - * Config file for API Extractor. For more info, please visit: https://api-extractor.com - */ -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - /** - * Optionally specifies another JSON config file that this file extends from. This provides a way for - * standard settings to be shared across multiple projects. - * - * If the path starts with "./" or "../", the path is resolved relative to the folder of the file that contains - * the "extends" field. Otherwise, the first path segment is interpreted as an NPM package name, and will be - * resolved using NodeJS require(). - * - * SUPPORTED TOKENS: none - * DEFAULT VALUE: "" - */ - // "extends": "./shared/api-extractor-base.json" - // "extends": "my-package/include/api-extractor-base.json" - - /** - * Determines the "" token that can be used with other config file settings. The project folder - * typically contains the tsconfig.json and package.json config files, but the path is user-defined. - * - * The path is resolved relative to the folder of the config file that contains the setting. - * - * The default value for "projectFolder" is the token "", which means the folder is determined by traversing - * parent folders, starting from the folder containing api-extractor.json, and stopping at the first folder - * that contains a tsconfig.json file. If a tsconfig.json file cannot be found in this way, then an error - * will be reported. - * - * SUPPORTED TOKENS: - * DEFAULT VALUE: "" - */ - // "projectFolder": "..", - - /** - * (REQUIRED) Specifies the .d.ts file to be used as the starting point for analysis. API Extractor - * analyzes the symbols exported by this module. - * - * The file extension must be ".d.ts" and not ".ts". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - */ - "mainEntryPointFilePath": "/out/index.d.ts", - - /** - * A list of NPM package names whose exports should be treated as part of this package. - * - * For example, suppose that Webpack is used to generate a distributed bundle for the project "library1", - * and another NPM package "library2" is embedded in this bundle. Some types from library2 may become part - * of the exported API for library1, but by default API Extractor would generate a .d.ts rollup that explicitly - * imports library2. To avoid this, we might specify: - * - * "bundledPackages": [ "library2" ], - * - * This would direct API Extractor to embed those types directly in the .d.ts rollup, as if they had been - * local files for library1. - * - * The "bundledPackages" elements may specify glob patterns using minimatch syntax. To ensure deterministic - * output, globs are expanded by matching explicitly declared top-level dependencies only. For example, - * the pattern below will NOT match "@my-company/example" unless it appears in a field such as "dependencies" - * or "devDependencies" of the project's package.json file: - * - * "bundledPackages": [ "@my-company/*" ], - */ - "bundledPackages": [], - - /** - * Specifies what type of newlines API Extractor should use when writing output files. By default, the output files - * will be written with Windows-style newlines. To use POSIX-style newlines, specify "lf" instead. - * To use the OS's default newline kind, specify "os". - * - * DEFAULT VALUE: "crlf" - */ - // "newlineKind": "crlf", - - /** - * Set to true when invoking API Extractor's test harness. When `testMode` is true, the `toolVersion` field in the - * .api.json file is assigned an empty string to prevent spurious diffs in output files tracked for tests. - * - * DEFAULT VALUE: "false" - */ - // "testMode": false, - - /** - * Specifies how API Extractor sorts members of an enum when generating the .api.json file. By default, the output - * files will be sorted alphabetically, which is "by-name". To keep the ordering in the source code, specify - * "preserve". - * - * DEFAULT VALUE: "by-name" - */ - // "enumMemberOrder": "by-name", - - /** - * Determines how the TypeScript compiler engine will be invoked by API Extractor. - */ - "compiler": { - /** - * Specifies the path to the tsconfig.json file to be used by API Extractor when analyzing the project. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * Note: This setting will be ignored if "overrideTsconfig" is used. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/tsconfig.json" - */ - // "tsconfigFilePath": "/tsconfig.json", - /** - * Provides a compiler configuration that will be used instead of reading the tsconfig.json file from disk. - * The object must conform to the TypeScript tsconfig schema: - * - * http://json.schemastore.org/tsconfig - * - * If omitted, then the tsconfig.json file will be read from the "projectFolder". - * - * DEFAULT VALUE: no overrideTsconfig section - */ - // "overrideTsconfig": { - // . . . - // } - /** - * This option causes the compiler to be invoked with the --skipLibCheck option. This option is not recommended - * and may cause API Extractor to produce incomplete or incorrect declarations, but it may be required when - * dependencies contain declarations that are incompatible with the TypeScript engine that API Extractor uses - * for its analysis. Where possible, the underlying issue should be fixed rather than relying on skipLibCheck. - * - * DEFAULT VALUE: false - */ - // "skipLibCheck": true, - }, - - /** - * Configures how the API report file (*.api.md) will be generated. - */ - "apiReport": { - /** - * (REQUIRED) Whether to generate an API report. - */ - "enabled": true - - /** - * The filename for the API report files. It will be combined with "reportFolder" or "reportTempFolder" to produce - * a full file path. - * - * The file extension should be ".api.md", and the string should not contain a path separator such as "\" or "/". - * - * SUPPORTED TOKENS: , - * DEFAULT VALUE: ".api.md" - */ - // "reportFileName": ".api.md", - - /** - * Specifies the folder where the API report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * The API report file is normally tracked by Git. Changes to it can be used to trigger a branch policy, - * e.g. for an API review. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/" - */ - // "reportFolder": "/temp/", - - /** - * Specifies the folder where the temporary report file is written. The file name portion is determined by - * the "reportFileName" setting. - * - * After the temporary file is written to disk, it is compared with the file in the "reportFolder". - * If they are different, a production build will fail. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/" - */ - // "reportTempFolder": "/temp/", - - /** - * Whether "forgotten exports" should be included in the API report file. Forgotten exports are declarations - * flagged with `ae-forgotten-export` warnings. See https://api-extractor.com/pages/messages/ae-forgotten-export/ to - * learn more. - * - * DEFAULT VALUE: "false" - */ - // "includeForgottenExports": false - }, - - /** - * Configures how the doc model file (*.api.json) will be generated. - */ - "docModel": { - /** - * (REQUIRED) Whether to generate a doc model file. - */ - "enabled": true - - /** - * The output path for the doc model file. The file extension should be ".api.json". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/temp/.api.json" - */ - // "apiJsonFilePath": "/temp/.api.json", - - /** - * Whether "forgotten exports" should be included in the doc model file. Forgotten exports are declarations - * flagged with `ae-forgotten-export` warnings. See https://api-extractor.com/pages/messages/ae-forgotten-export/ to - * learn more. - * - * DEFAULT VALUE: "false" - */ - // "includeForgottenExports": false, - - /** - * The base URL where the project's source code can be viewed on a website such as GitHub or - * Azure DevOps. This URL path corresponds to the `` path on disk. - * - * This URL is concatenated with the file paths serialized to the doc model to produce URL file paths to individual API items. - * For example, if the `projectFolderUrl` is "https://github.com/microsoft/rushstack/tree/main/apps/api-extractor" and an API - * item's file path is "api/ExtractorConfig.ts", the full URL file path would be - * "https://github.com/microsoft/rushstack/tree/main/apps/api-extractor/api/ExtractorConfig.js". - * - * Can be omitted if you don't need source code links in your API documentation reference. - * - * SUPPORTED TOKENS: none - * DEFAULT VALUE: "" - */ - // "projectFolderUrl": "http://github.com/path/to/your/projectFolder" - }, - - /** - * Configures how the .d.ts rollup file will be generated. - */ - "dtsRollup": { - /** - * (REQUIRED) Whether to generate the .d.ts rollup file. - */ - "enabled": true - - /** - * Specifies the output path for a .d.ts rollup file to be generated without any trimming. - * This file will include all declarations that are exported by the main entry point. - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "/dist/.d.ts" - */ - // "untrimmedFilePath": "/dist/.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for an "alpha" release. - * This file will include only declarations that are marked as "@public", "@beta", or "@alpha". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "alphaTrimmedFilePath": "/dist/-alpha.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "beta" release. - * This file will include only declarations that are marked as "@public" or "@beta". - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "betaTrimmedFilePath": "/dist/-beta.d.ts", - - /** - * Specifies the output path for a .d.ts rollup file to be generated with trimming for a "public" release. - * This file will include only declarations that are marked as "@public". - * - * If the path is an empty string, then this file will not be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "publicTrimmedFilePath": "/dist/-public.d.ts", - - /** - * When a declaration is trimmed, by default it will be replaced by a code comment such as - * "Excluded from this release type: exampleMember". Set "omitTrimmingComments" to true to remove the - * declaration completely. - * - * DEFAULT VALUE: false - */ - // "omitTrimmingComments": true - }, - - /** - * Configures how the tsdoc-metadata.json file will be generated. - */ - "tsdocMetadata": { - /** - * Whether to generate the tsdoc-metadata.json file. - * - * DEFAULT VALUE: true - */ - // "enabled": true, - /** - * Specifies where the TSDoc metadata file should be written. - * - * The path is resolved relative to the folder of the config file that contains the setting; to change this, - * prepend a folder token such as "". - * - * The default value is "", which causes the path to be automatically inferred from the "tsdocMetadata", - * "typings" or "main" fields of the project's package.json. If none of these fields are set, the lookup - * falls back to "tsdoc-metadata.json" in the package folder. - * - * SUPPORTED TOKENS: , , - * DEFAULT VALUE: "" - */ - // "tsdocMetadataFilePath": "/dist/tsdoc-metadata.json" - }, - - /** - * Configures how API Extractor reports error and warning messages produced during analysis. - * - * There are three sources of messages: compiler messages, API Extractor messages, and TSDoc messages. - */ - "messages": { - /** - * Configures handling of diagnostic messages reported by the TypeScript compiler engine while analyzing - * the input .d.ts files. - * - * TypeScript message identifiers start with "TS" followed by an integer. For example: "TS2551" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "compilerMessageReporting": { - /** - * Configures the default routing for messages that don't match an explicit rule in this table. - */ - "default": { - /** - * Specifies whether the message should be written to the the tool's output log. Note that - * the "addToApiReportFile" property may supersede this option. - * - * Possible values: "error", "warning", "none" - * - * Errors cause the build to fail and return a nonzero exit code. Warnings cause a production build fail - * and return a nonzero exit code. For a non-production build (e.g. when "api-extractor run" includes - * the "--local" option), the warning is displayed but the build will not fail. - * - * DEFAULT VALUE: "warning" - */ - "logLevel": "warning" - - /** - * When addToApiReportFile is true: If API Extractor is configured to write an API report file (.api.md), - * then the message will be written inside that file; otherwise, the message is instead logged according to - * the "logLevel" option. - * - * DEFAULT VALUE: false - */ - // "addToApiReportFile": false - } - - // "TS2551": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by API Extractor during its analysis. - * - * API Extractor message identifiers start with "ae-". For example: "ae-extra-release-tag" - * - * DEFAULT VALUE: See api-extractor-defaults.json for the complete table of extractorMessageReporting mappings - */ - "extractorMessageReporting": { - "default": { - "logLevel": "warning" - // "addToApiReportFile": false - } - - // "ae-extra-release-tag": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - }, - - /** - * Configures handling of messages reported by the TSDoc parser when analyzing code comments. - * - * TSDoc message identifiers start with "tsdoc-". For example: "tsdoc-link-tag-unescaped-text" - * - * DEFAULT VALUE: A single "default" entry with logLevel=warning. - */ - "tsdocMessageReporting": { - "default": { - "logLevel": "warning" - // "addToApiReportFile": false - } - - // "tsdoc-link-tag-unescaped-text": { - // "logLevel": "warning", - // "addToApiReportFile": true - // }, - // - // . . . - } - } -} From 699be1812158a07c2302b4d8cabd0d3536c18a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 22:49:06 +0200 Subject: [PATCH 13/15] Undo some changes, bump version. --- .vscode/settings.json | 1 - package-lock.json | 4 ++-- package.json | 6 ++---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index e71a0461..2c63c085 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,2 @@ { - "files.associations": { "*.json": "jsonc" } } diff --git a/package-lock.json b/package-lock.json index 8973fb29..13e8e70b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@multiversx/sdk-core", - "version": "12.19.1", + "version": "12.19.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@multiversx/sdk-core", - "version": "12.19.1", + "version": "12.19.2", "license": "MIT", "dependencies": { "@multiversx/sdk-transaction-decoder": "1.0.2", diff --git a/package.json b/package.json index 28dec29c..a7aff72c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@multiversx/sdk-core", - "version": "12.19.1", + "version": "12.19.2", "description": "MultiversX SDK for JavaScript and TypeScript", "main": "out/index.js", "types": "out/index.d.js", @@ -20,9 +20,7 @@ "browser-tests": "make clean && make browser-tests && http-server --port=9876 -o browser-tests/index.html", "lint": "tslint --project .", "pretest": "npm run compile", - "prepare": "npm run compile", - "api:extract": "api-extractor run --local --verbose", - "api:document": "api-documenter markdown --input-folder temp --output-folder $DOCS_OUTPUT_FOLDER" + "prepare": "npm run compile" }, "author": "MultiversX", "license": "MIT", From 9f69ea2b1bd59267191254575bade02d6ab09b34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Fri, 29 Mar 2024 22:51:50 +0200 Subject: [PATCH 14/15] Fix workflow trigger. --- .github/workflows/update-docs.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index 2879fb32..dfaa3f46 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -2,8 +2,6 @@ name: Update docs on: workflow_dispatch: - pull_request: - branches: [main] release: types: [released] From 71e2cab08efedb2904cf323e24e4031ace416590 Mon Sep 17 00:00:00 2001 From: Andrei Bancioiu Date: Mon, 1 Apr 2024 10:54:32 +0300 Subject: [PATCH 15/15] Fix add & commit for docs. --- .github/workflows/update-docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/update-docs.yml b/.github/workflows/update-docs.yml index dfaa3f46..ac3f00da 100644 --- a/.github/workflows/update-docs.yml +++ b/.github/workflows/update-docs.yml @@ -44,5 +44,6 @@ jobs: # See: https://github.com/actions/checkout/blob/main/README.md#push-a-commit-using-the-built-in-token git config user.name github-actions git config user.email github-actions@github.com - git commit -am "Re-generated docs." --allow-empty + git add . + git commit -m "Re-generated docs." --allow-empty git push