npm

@wedat/api
TypeScript icon, indicating that this package has built-in type declarations

1.5.5 • Public • Published

How ot update:

  1. rename "package_use_to_generate_code.json" to "package.json" (don't forget before publish do rollback)

  2. run: packages\api2dat5> yarn generateServices

  3. check: src\generatedSRC and restore all imports like was before update

  4. check all tsc errors example:

    // getCalculatedSparePartsResponse // getCalculatedSparePartsResponse export interface getCalculatedSparePartsResponse { spareParts?: ns1.spareParts; }

rename to (as was before)

// getCalculatedSparePartsResponse
// getCalculatedSparePartsResponse
export interface getCalculatedSparePartsResponse {
    spareParts?: ns1.MaterialPositions; // undefined
}
  1. change package version
  2. update change log in readme.md

Compile

rollup -c rollup.config.js
npm publish

package use:

  • npm

To run some live request tests and debug you need to add file in "src" folder (this folder is included in ".gitignore" and will not be in git repository)

"src/testAuthData/testAuthData.ts"

export const testAuthData = {
    customerNumber: '3451429',
    customerLogin: 'xxxxx',
    customerPassword: 'xxxxx'
};
  "scripts": {
    "lint": "yarn run -T eslint src/**/*.{ts,tsx}",
    "generateServices": "npm run downloadWsdlFromConfig && npm run generateByWSDL && npm run downloadXSDFileByWsdl && npm run formatGeneratedSRC && npm run formatWsdlXsdDownloadedFiles",
    "downloadWsdlFromConfig": "ts-node ./scripts/downloadWsdlFromConfig.ts ./WsdlXsdDownloadedFiles",
    "_generateDescJsonByWSDL": "ts-node ./scripts/generateDescJsonByWSDL.ts ./WsdlXsdDownloadedFiles",
    "generateByWSDL": "ts-node ./scripts/generateByWSDL.ts ./WsdlXsdDownloadedFiles ./src/generatedSRC",
    "downloadXSDFileByWsdl": "ts-node ./scripts/downloadXSDFileByWsdl.ts ./WsdlXsdDownloadedFiles ./src/generatedSRC",
    "downloadAndParseForTSCheck": "ts-node ./src/servicesTests/typeCheckScript/downloadAndParseForTSCheck.ts",
    "formatGeneratedSRC": "prettier --write ./src/generatedSRC/**/*.*",
    "formatWsdlXsdDownloadedFiles": "prettier --write ./WsdlXsdDownloadedFiles/**/*.*",
    "formatTypeCheckScriptFolder": "prettier --write ./src/servicesTests/typeCheckScript/**/*.*",
    "formatAll": "prettier --write .",
    "formatXML": "prettier --write  **/*.xml",
    "build:esm": "npx tsc --esModuleInterop --module ESNext --outdir dist/esm --declaration"
  }

Readme

Keywords

none

Package Sidebar

Install

npm i @wedat/api

Weekly Downloads

4

Version

1.5.5

License

MIT

Unpacked Size

4.1 MB

Total Files

5

Last publish

Collaborators

  • wedat