UNPKG

@frontitude/cli

Version:

The Frontitude CLI enables product teams to integrate their code with Frontitude (frontitude.com), thus creating a single source of truth for their product copy, from design to development.

1 lines 678 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pullProjectsTexts=void 0;const tslib_1=require("tslib"),fetch_1=tslib_1.__importDefault(require("./fetch")),envConfig_1=tslib_1.__importDefault(require("../../envConfig")),ErrorNames=tslib_1.__importStar(require("../../common/constants/ErrorNames"));async function pullProjectsTexts(e){try{const t={method:"POST",type:"json",body:JSON.stringify(e)};return await(0,fetch_1.default)(`${envConfig_1.default.SERVER_URL}/projects/export_text`,t)}catch(e){throw"HTTP_CODE_405"===e.name&&(e.name=ErrorNames.PERMISSION_DENIED_DEVELOPER_INTEGRATION_IS_TURNED_OFF),e}}exports.pullProjectsTexts=pullProjectsTexts;