From 4f842046d01c1d9ccb77f732e9508563d412dd23 Mon Sep 17 00:00:00 2001 From: Niels Steenbeek Date: Fri, 10 Feb 2023 12:11:20 +0100 Subject: [PATCH 1/4] Regenerate generates all entities --- src/commands/generators/Entity.ts | 17 +++--- src/commands/generators/Regenerator.ts | 77 ++++++++++++++++---------- src/node/Entity/Entity.model.ts | 12 ++++ src/node/Entity/Entity.service.ts | 10 ++++ src/routers/EntityRouter.ts | 2 +- 5 files changed, 82 insertions(+), 36 deletions(-) create mode 100644 src/node/Entity/Entity.model.ts create mode 100644 src/node/Entity/Entity.service.ts diff --git a/src/commands/generators/Entity.ts b/src/commands/generators/Entity.ts index d93a404..f36310f 100644 --- a/src/commands/generators/Entity.ts +++ b/src/commands/generators/Entity.ts @@ -20,9 +20,10 @@ export class Entity { private readonly options: EntityOptions; private entityLogicalName: string; - constructor(bearer: string, entityName: string, options: EntityOptions) { + constructor(bearer: string, entityName: string, entityLogicalName: string, options: EntityOptions) { this.bearer = bearer; this.entityName = entityName; + this.entityLogicalName = entityLogicalName; this.options = options; } @@ -46,12 +47,14 @@ export class Entity { private async generateEntityFiles(): Promise { const serviceFilepath = `src/${this.entityName}/${this.entityName}.service.ts`; if (!shell.test('-f', serviceFilepath)) { - const answers = await inquirer.prompt([{ - type: 'input', - name: 'entityLogicalName', - message: 'Entity LogicalName:' - }]); - this.entityLogicalName = answers.entityLogicalName; + if (!this.entityLogicalName) { + const answers = await inquirer.prompt([{ + type: 'input', + name: 'entityLogicalName', + message: 'Entity LogicalName:' + }]); + this.entityLogicalName = answers.entityLogicalName; + } try { await NodeApi.getEntityDefinition(this.entityLogicalName, this.bearer, ['PrimaryIdAttribute']); } catch (e) { diff --git a/src/commands/generators/Regenerator.ts b/src/commands/generators/Regenerator.ts index 78fc0d3..85f24e4 100644 --- a/src/commands/generators/Regenerator.ts +++ b/src/commands/generators/Regenerator.ts @@ -1,23 +1,12 @@ -import * as shell from 'shelljs'; import fs from 'fs'; import {Entity} from './Entity'; import {GlobalOptionSet} from './GlobalOptionSet'; import {EnvironmentVariable} from './EnvironmentVariable'; - -// TODO duplicate with webpack.config.ts -interface BuildJson { - forms: FormJson[]; - webresources: WebresourceJson[]; -} -// TODO duplicate with webpack.config.ts -interface FormJson { - name: string; - build: boolean; -} -// TODO duplicate with webpack.config.ts -interface WebresourceJson extends FormJson { - template: 'React' | 'HTML'; -} +import {WebresourcesCrmJson} from '../../root/Webresources/CrmJson'; +import {SolutionService} from '../../node/Solution/Solution.service'; +import {SolutionComponentService} from '../../node/SolutionComponent/SolutionComponent.service'; +import {EntityService} from '../../node/Entity/Entity.service'; +import { EntityModel } from '../../node/Entity/Entity.model'; export class Regenerator { private readonly bearer: string; @@ -35,19 +24,51 @@ export class Regenerator { } private async regenerateEntities(): Promise { - const buildFiles = shell.ls('./src/**/build.json'); - for (const filepath of buildFiles) { - const pathSplit = filepath.split('/'); - const entityName = pathSplit[pathSplit.length - 2]; - const buildJsonString = String(fs.readFileSync(filepath)); - const buildJson = JSON.parse(buildJsonString) as BuildJson; - const {forms} = buildJson; - if (forms.length > 0) { - console.log(`hso-d365 generate Entity ${entityName}`); - const entity = new Entity(this.bearer, entityName,{}); - await entity.generate(); - } + const entityModels = await this.getEntities(); + for (const entityModel of entityModels) { + const physicalName = entityModel.originallocalizedname || entityModel.physicalname; + const folderName = physicalName.replaceAll(' ', ''); + const entity = new Entity(this.bearer, folderName, entityModel.logicalname, {}); + await entity.generate(); + } + } + + // eslint-disable-next-line max-lines-per-function + private async getEntities(): Promise { + const settings: WebresourcesCrmJson = JSON.parse(fs.readFileSync('./crm.json', 'utf8')); + const {solution_name_generate} = settings.crm; + const solution = await SolutionService.getSolution(solution_name_generate, ['solutionid'], this.bearer); + const filters: Filter[] = [{ + type: 'or', + conditions: [{ + attribute: 'componenttype', + value: 1 // Entity + }] + }, { + conditions: [{ + attribute: '_solutionid_value', + value: solution.solutionid + }] + }]; + const solutionComponents = await SolutionComponentService.retrieveMultipleRecords({ + select: ['objectid'], + filters: filters, + }, this.bearer); + const conditions: Condition[] = []; + for (const solutionComponent of solutionComponents) { + const objectid = solutionComponent.objectid; + conditions.push({ + attribute: 'entityid', + value: objectid, + }); } + return EntityService.retrieveMultipleRecords({ + select: ['entityid', 'collectionname', 'entitysetname', 'logicalname', 'name', 'objecttypecode', 'physicalname', 'originallocalizedname'], + filters: [{ + type: 'or', + conditions: conditions + }] + }, this.bearer); } private async regenerateGlobalOptionSets(): Promise { diff --git a/src/node/Entity/Entity.model.ts b/src/node/Entity/Entity.model.ts new file mode 100644 index 0000000..71fe204 --- /dev/null +++ b/src/node/Entity/Entity.model.ts @@ -0,0 +1,12 @@ + +export interface EntityModel extends Model { + entityid?: string; + collectionname?: string; + entitysetname?: string; + logicalname?: string; + name?: string; + objecttypecode?: number; + originallocalizedname?: string; + physicalname?: string; + solutionid?: string; +} diff --git a/src/node/Entity/Entity.service.ts b/src/node/Entity/Entity.service.ts new file mode 100644 index 0000000..bcfc0d7 --- /dev/null +++ b/src/node/Entity/Entity.service.ts @@ -0,0 +1,10 @@ +import {NodeApi} from '../NodeApi/NodeApi'; +import {EntityModel} from './Entity.model'; + +export class EntityService { + private static entitySetName = 'entities'; + + public static async retrieveMultipleRecords(multipleSystemQueryOptions: MultipleSystemQueryOptions, bearer: string): Promise { + return NodeApi.retrieveMultipleRecords(EntityService.entitySetName, multipleSystemQueryOptions, bearer); + } +} diff --git a/src/routers/EntityRouter.ts b/src/routers/EntityRouter.ts index d69002d..f499833 100644 --- a/src/routers/EntityRouter.ts +++ b/src/routers/EntityRouter.ts @@ -29,7 +29,7 @@ export class EntityRouter extends MsalRouter { } protected async onAuthenticated(): Promise { - const entity = new Entity(this.bearer, this.entityName, this.options); + const entity = new Entity(this.bearer, this.entityName, null, this.options); await entity.generate(); } } From 007b6937682c7c1789ceb6acff89f91911de2524 Mon Sep 17 00:00:00 2001 From: Niels Steenbeek Date: Fri, 10 Feb 2023 12:17:38 +0100 Subject: [PATCH 2/4] Cleanup update --- src/commands/Update.ts | 44 ++++++++---------------------------------- 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/src/commands/Update.ts b/src/commands/Update.ts index 9f95101..fd6287a 100644 --- a/src/commands/Update.ts +++ b/src/commands/Update.ts @@ -1,7 +1,6 @@ import * as colors from 'colors'; import shell from 'shelljs'; import fs from 'fs'; -import {WebresourcesCrmJson} from '../root/Webresources/CrmJson'; import {CrmJson} from '../root/CrmJson'; import cp from 'child_process'; @@ -87,10 +86,10 @@ export class Update { const fileData = String(fs.readFileSync(filepath)); const match = fileData.match(new RegExp(`specify Form onLoad function: ${crm.publisher_prefix}.${crm.namespace}.([^\\W]*).Form.onLoad`)); if (match) { - const entityName_formName = match[1]; - const split = entityName_formName.split('_'); - const newFileData = fileData.replace(new RegExp(entityName_formName, 'ig'), `${split[0]}.${split[1]}`); - shell.ShellString(newFileData).to(filepath); + // const entityName_formName = match[1]; + // const split = entityName_formName.split('_'); + // const newFileData = fileData.replace(new RegExp(entityName_formName, 'ig'), `${split[0]}.${split[1]}`); + // shell.ShellString(newFileData).to(filepath); } }); @@ -119,10 +118,10 @@ export class Update { const fileData = String(fs.readFileSync(filepath)); const match = fileData.match(new RegExp('export class ([a-zA-Z]*)Form {')); if (match) { - const entityName = match[1]; - const importString = `import {${entityName}FormContext} from './${entityName}.formContext';`; - const newExportString = `export class ${entityName}Form extends ${entityName}FormContext {`; - shell.sed('-i', new RegExp(`export class ${entityName}Form {`, 'i'), `${importString}\n${newExportString}`, filepath); + // const entityName = match[1]; + // const importString = `import {${entityName}FormContext} from './${entityName}.formContext';`; + // const newExportString = `export class ${entityName}Form extends ${entityName}FormContext {`; + // shell.sed('-i', new RegExp(`export class ${entityName}Form {`, 'i'), `${importString}\n${newExportString}`, filepath); } } }); @@ -183,33 +182,6 @@ export class Update { // eslint-disable-next-line max-lines-per-function private static updateCrmJson(): void { - if (fs.existsSync('./tools/crm.json')) { - //crm.json - const crmSettings: CrmJson = JSON.parse(fs.readFileSync('./tools/crm.json', 'utf8')); - shell.cp('-R', `${__dirname}/root/crm.json`, '../'); - shell.sed('-i', new RegExp('<%= publisher_prefix %>', 'ig'), crmSettings.crm.publisher_prefix, '../crm.json'); - shell.sed('-i', new RegExp('<%= environment %>', 'ig'), crmSettings.crm.url, '../crm.json'); - shell.sed('-i', new RegExp('<%= namespace %>', 'ig'), (crmSettings as unknown as {webresource: {namespace:string} }).webresource.namespace, '../crm.json'); - if (shell.test('-e', '../.git')) { - cp.execFileSync('git', ['add', '../crm.json']); - } - - // Webresources/crm.json - const webresourcesSettings: WebresourcesCrmJson = JSON.parse(fs.readFileSync('./tools/crm.json', 'utf8')); - shell.cp('-R', `${__dirname}/root/Webresources/crm.json`, '.'); - shell.sed('-i', new RegExp('<%= solution_name_deploy %>', 'ig'), webresourcesSettings.crm.solution_name_deploy, './crm.json'); - shell.sed('-i', new RegExp('<%= solution_name_generate %>', 'ig'), webresourcesSettings.crm.solution_name_generate, './crm.json'); - if (shell.test('-e', '../.git')) { - cp.execFileSync('git', ['add', './crm.json']); - } - // shell.exec('git add ./crm.json'); - - shell.rm('-rf', `./tools`); - if (shell.test('-e', '../.git')) { - cp.execFileSync('git', ['rm', './tools']); - } - // shell.exec('git rm ./tools'); - } const crmSettings: CrmJson = JSON.parse(fs.readFileSync('../crm.json', 'utf8')); shell.cp('-R', `${__dirname}/root/crm.json`, '../'); shell.sed('-i', new RegExp('<%= publisher_prefix %>', 'ig'), crmSettings.crm.publisher_prefix, '../crm.json'); From bef3f29c0975146d4ab94b218cc700bdfb7c9558 Mon Sep 17 00:00:00 2001 From: Niels Steenbeek Date: Fri, 10 Feb 2023 12:17:56 +0100 Subject: [PATCH 3/4] Version 7.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ea8f38f..a119698 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hso/d365-cli", - "version": "6.2.0", + "version": "7.0.0", "author": "HSO Innovation (https://www.hso.com)", "description": "Dynamics 365 Command Line Interface for TypeScript projects for Dataverse", "repository": { From 9831af104ca701a7698848aa4f4a30c9b1e14a26 Mon Sep 17 00:00:00 2001 From: Niels Steenbeek Date: Fri, 10 Feb 2023 12:18:32 +0100 Subject: [PATCH 4/4] Build 7.0.0 --- bin/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/main.js b/bin/main.js index dae39aa..c38e55a 100644 --- a/bin/main.js +++ b/bin/main.js @@ -1 +1 @@ -/*! HSO D365 CLI 6.2.0 | (c) HSO Innovation */!function(){"use strict";var e={5431:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]","ig"),e.publisher_prefix,t),l.sed("-i",new RegExp("<%= environment %>","ig"),e.environment,t),l.sed("-i",new RegExp("<%= namespace %>","ig"),e.namespace,t);var n=l.exec("hso-d365 --version").stdout.replace(/\n/gi,"");l.sed("-i",new RegExp("<%= version %>","ig"),n,t)},e.initWebresourcesCrmJson=function(e){var t=l.ls("Webresources/crm.json")[0];l.sed("-i",new RegExp("<%= solution_name_deploy %>","ig"),e.solution_name_deploy,t),l.sed("-i",new RegExp("<%= solution_name_generate %>","ig"),e.solution_name_generate||e.solution_name_deploy,t)},e.initWebresourcesPackageJson=function(e,t){var n=l.ls("Webresources/package.json")[0];l.sed("-i","<%= projectname %>",e.toLowerCase(),n),l.sed("-i",new RegExp("<%= description %>","ig"),t.solution_name_deploy,n)},e.initWebresourcesWebpackConfig=function(e){var t=l.ls("Webresources/webpack.config.ts")[0];l.sed("-i",new RegExp("<%= publisher_prefix %>","ig"),e.publisher_prefix,t),l.sed("-i",new RegExp("<%= namespace %>","ig"),e.namespace,t),l.sed("-i",new RegExp("<%= description %>","ig"),e.namespace,t)},e.inquirer=function(){var e=this;return f.prompt([{type:"input",name:"environment",message:"D365 environment url (eg. https://yourproject.crm4.dynamics.com):",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(!t)throw new Error("You need to provide an environment");if(!new RegExp("https://(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}").test(t))throw new Error("You need to provide a valid url");return[2,!0]}))}))}},{type:"input",name:"solution_name_deploy",message:"D365 deployment Solution ('Name' column):",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(!t)throw new Error("You need to provide a solution");if(!new RegExp("[a-zA-Z_\\d]*").test(t))throw new Error("You need to provide a valid solution name");return[2,!0]}))}))}},{type:"input",name:"solution_name_generate",message:"D365 generate Solution ('Name' column)\nIf equal to deployment Solution keep blank:",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(t&&!new RegExp("[a-zA-Z_\\d]*").test(t))throw new Error("You need to provide a valid solution name");return[2,!0]}))}))}},{type:"input",name:"solution_name_pcf",message:"D365 PCF Solution ('Name' column)\nIf equal to deployment Solution keep blank:",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(t&&!new RegExp("[a-zA-Z_\\d]*").test(t))throw new Error("You need to provide a valid solution name");return[2,!0]}))}))}},{type:"input",name:"publisher_name",message:"D365 Publisher Name (not Display Name):",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(!t)throw new Error("You need to provide a publisher name");if(!new RegExp("[a-zA-Z_0-9]*").test(t))throw new Error("You need to provide a valid publisher");return[2,!0]}))}))}},{type:"input",name:"publisher_prefix",message:"D365 Publisher Prefix (3 chars a-z):",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(!t)throw new Error("You need to provide a publisher");if(!new RegExp("[a-zA-Z_\\d]*").test(t))throw new Error("You need to provide a valid publisher");return[2,!0]}))}))}},{type:"input",name:"namespace",message:"Customer or Product name:",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(!t)throw new Error("You need to provide a customer or product name");if(!new RegExp("[a-zA-Z_\\d]*").test(t))throw new Error("You need to provide a valid namespace");return[2,!0]}))}))}}])},e}();t.Create=h},6342:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]"),[2,i=i.substr(a+2)]):[2]}}))}))},Object.defineProperty(t,"defaultDependencyxml",{get:function(){return''},enumerable:!1,configurable:!0}),Object.defineProperty(t,"translationRegex",{get:function(){return/\.translate\(["'](.*)["']\)/gm},enumerable:!1,configurable:!0}),t.prototype.generateWebresourceXmlDoc=function(e,n){return s(this,void 0,void 0,(function(){var r,o,i;return u(this,(function(a){switch(a.label){case 0:return r=y.ls("dist/**/locales/*.resx"),0===(o=r.map((function(e){return e.substr(5)}))).length&&null===e.dependencyxml?[2,null]:[4,b.parseStringPromise(e.dependencyxml||t.defaultDependencyxml)];case 1:return i=a.sent(),t.translationRegex.test(String(n))?(this.addLibraries(i,o),this.cleanLibraries(i,o)):this.cleanLibraries(i),[2,i]}}))}))},t.prototype.addLibraries=function(e,n){var r=e.Dependencies.Dependency[0];r.Library||(r.Library=[]);for(var o=function(e){r.Library.find((function(t){return t.$.name===e}))||(console.log("Adding dependency: ".concat(e)),r.Library.push({$:t.createLibraryItem(e)}))},i=0,a=n;i=0;o-=1){var i=r.Library[o].$.name;t.localesResxRegex.test(i)&&(n.includes(i)||(console.log("Removing dependency: ".concat(i)),r.Library.splice(o,1)))}},t.createLibraryItem=function(e){return{name:e,displayName:e,languagecode:t.getLanguageCode(e),description:"",libraryUniqueId:t.guid()}},t.getLanguageCode=function(e){var n;return e.endsWith(".resx")&&(n=t.localesResxRegex.exec(e)),n&&n[1]||""},t.guid=function(){return"{xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx}".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},t.xmlBuilder=new b.Builder,t}(p.MsalRouter);t.Deploy=g},883:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PCF=void 0;var c=a(n(7027)),s=a(n(4357)),u=i(n(7147)),l=a(n(2081)),f=function(){function e(){}return e.createComponent=function(t){c.default.test("-e","../pcf")?t?c.default.test("-e",t)?console.log(s.default.red("Control already exists")):c.default.which("pac")?e.create(t):console.log(s.default.red("You need to install pac first: https://aka.ms/PowerAppsCLI")):console.log(s.default.red("No control name specified!")):console.log(s.default.red("You are not inside the project 'pcf' folder!"))},e.create=function(t){c.default.exec("mkdir ".concat(t)),c.default.cd(t),e.pacInit(t),e.addComponentFiles(t),e.addReference(t)},e.pacInit=function(e){c.default.exec("pac install latest");var t=JSON.parse(u.readFileSync("../../crm.json","utf8")).crm.publisher_prefix;t&&c.default.exec("pac pcf init --namespace ".concat(t," --name ").concat(e," --template field"))},e.addComponentFiles=function(e){c.default.cp("-f","".concat(__dirname,"/PCF/*"),"."),c.default.cp("-f","".concat(__dirname,"/PCF/.*"),".");var t="./".concat(e,"/").concat(e,".tsx");c.default.cp("-r","".concat(__dirname,"/PCF/Component/PCFComponent.tsx"),t),c.default.sed("-i",new RegExp("PCFComponent","g"),e,t),c.default.cp("-f","".concat(__dirname,"/PCF/Component/index.ts"),"./".concat(e)),c.default.sed("-i",new RegExp("PCFComponent","g"),e,"./".concat(e,"/index.ts")),c.default.cp("-f","".concat(__dirname,"/PCF/Component/FieldComponent.ts"),"./".concat(e)),c.default.exec("npm install --save-dev @fluentui/react eslint-plugin-react eslint-plugin-react-hooks rxjs"),c.default.test("-e","../../.git")&&l.default.execFileSync("git",["add","../".concat(e)])},e.addReference=function(e){var t=process.cwd();c.default.cd(".."),c.default.cd("Solutions"),l.default.execFileSync("pac",["solution","add-reference","--path",t]);var n="msbuild /t:build /restore";c.default.exec(n),n+=" /p:configuration=Release",c.default.exec(n),c.default.cd(".."),c.default.cd(e)},e.build=function(){if(c.default.test("-f","Solutions.cdsproj")){var e="msbuild /t:build";c.default.exec(e),e+=" /p:configuration=Release",c.default.exec(e)}else console.log(s.default.red("You are not inside the PCF/Solutions folder containing the Solutions.cdsproj file!"))},e.initPcfSolution=function(e,t,n){if(!c.default.test("-e","Solutions")){c.default.exec("mkdir Solutions"),c.default.cd("Solutions");var r="pac solution init --publisher-name ".concat(t," --publisher-prefix ").concat(n);c.default.exec(r);var o=e;c.default.sed("-i",new RegExp("Solutions","ig"),"".concat(o,""),"src/Other/Solution.xml")}},e.deploy=function(){if(c.default.test("-f","Solutions.cdsproj"))console.log(s.default.red("Deployment should be done on component level!"));else{var e=JSON.parse(u.readFileSync("../crm.json","utf8"));c.default.exec("pac pcf push --publisher-prefix ".concat(e.crm.publisher_prefix)),console.log(s.default.red("When getting an error about 'No profiles found' you need to set this up by following command: ")),console.log(s.default.red("pac auth create --url ".concat(e.crm.url)));console.log("See further information here: ".concat("https://docs.microsoft.com/en-us/powerapps/developer/component-framework/import-custom-controls#connecting-to-your-environment"))}},e}();t.PCF=f},4982:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&e.addLocalesFile(),[4,e.processCodeKeys(t)];case 1:return n.sent(),[2,null]}}))}))},e.getCodeKeys=function(){for(var t=new Set,n=0,r=s.ls("src/**/*.ts*");n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]","ig"),e.crm.publisher_prefix,"../crm.json"),l.default.sed("-i",new RegExp("<%= environment %>","ig"),e.crm.url,"../crm.json"),l.default.sed("-i",new RegExp("<%= namespace %>","ig"),e.webresource.namespace,"../crm.json"),l.default.test("-e","../.git")&&d.default.execFileSync("git",["add","../crm.json"]);var t=JSON.parse(f.default.readFileSync("./tools/crm.json","utf8"));l.default.cp("-R","".concat(__dirname,"/root/Webresources/crm.json"),"."),l.default.sed("-i",new RegExp("<%= solution_name_deploy %>","ig"),t.crm.solution_name_deploy,"./crm.json"),l.default.sed("-i",new RegExp("<%= solution_name_generate %>","ig"),t.crm.solution_name_generate,"./crm.json"),l.default.test("-e","../.git")&&d.default.execFileSync("git",["add","./crm.json"]),l.default.rm("-rf","./tools"),l.default.test("-e","../.git")&&d.default.execFileSync("git",["rm","./tools"])}var n=JSON.parse(f.default.readFileSync("../crm.json","utf8"));l.default.cp("-R","".concat(__dirname,"/root/crm.json"),"../"),l.default.sed("-i",new RegExp("<%= publisher_prefix %>","ig"),n.crm.publisher_prefix,"../crm.json"),l.default.sed("-i",new RegExp("<%= environment %>","ig"),n.crm.url,"../crm.json"),l.default.sed("-i",new RegExp("<%= namespace %>","ig"),n.crm.namespace,"../crm.json"),l.default.test("-e","../.git")&&d.default.execFileSync("git",["add","../crm.json"]);var r=l.default.exec("hso-d365 --version").stdout.replace(/\n/gi,"");l.default.sed("-i",new RegExp("<%= version %>","ig"),r,"../crm.json"),l.default.test("-e","../.git")&&d.default.execFileSync("git",["add","../crm.json"])},e.updatePackageJson=function(){console.log("Updating package.json...");var e=JSON.parse(f.default.readFileSync("./package.json","utf8")),t=e.name,n=e.description,r=e.version,o=JSON.parse(f.default.readFileSync("../crm.json","utf8"));l.default.cp("-R","".concat(__dirname,"/root/Webresources/package.json"),".");var i=l.default.ls("package.json")[0];l.default.sed("-i",new RegExp("<%= projectname %>","ig"),t,i),l.default.sed("-i",new RegExp("<%= description %>","ig"),n,i),l.default.sed("-i",new RegExp("<%= publisher %>","ig"),o.crm.publisher_prefix,i),l.default.sed("-i",new RegExp("<%= version %>","ig"),r,i),console.log("Removing old npm packages. This may take a while..."),l.default.exec("npm prune"),l.default.exec("npm install")},e.updateWebpackConfig=function(){return a(this,void 0,void 0,(function(){return c(this,(function(e){return console.log("Updating webpack.config..."),l.default.cp("-R","".concat(__dirname,"/root/Webresources/webpack.config.ts"),"."),l.default.test("-e","../.git")&&d.default.execFileSync("git",["add","webpack.config.ts"]),[2]}))}))},e}();t.Update=p},3152:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]"]:["Picklist","Status","State"].includes(t)?(r="".concat(this.entityName,"_").concat(n,"Values"),[2,"Xrm.Attributes.OptionSetAttribute<".concat(r,">")]):["Integer","Double","BigInt","Decimal","Double","Money"].includes(t)?[2,"Xrm.Attributes.NumberAttribute"]:["Lookup","Customer","Owner"].includes(t)?[2,"Xrm.Attributes.LookupAttribute"]:(console.log(p.default.blue("".concat(this.entityLogicalName," attribute ").concat(t," falls back to Xrm.Attributes.Attribute."))),[2,"Xrm.Attributes.Attribute"])}))}))},e.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e}();t.AttributeFormContext=h},7911:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]"]:["Picklist","Status","State"].includes(t)?(r="".concat(this.entityName,"_").concat(n,"Values"),[2,"Xrm.Attributes.OptionSetAttribute<".concat(r,">")]):["Integer","Double","BigInt","Decimal","Double","Money"].includes(t)?[2,"Xrm.Attributes.NumberAttribute"]:["Lookup","Customer","Owner"].includes(t)?[2,"Xrm.Attributes.LookupAttribute"]:(console.log(f.default.blue("".concat(this.entityLogicalName," attribute ").concat(t," falls back to Xrm.Attributes.Attribute."))),[2,"Xrm.Attributes.Attribute"])}))}))},e}();t.AttributeTypings=h},1634:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] => {\n"),t+=" return WebApi.executeAction('".concat(i.uniquename,"', request);\n"),t+="};\n\n",c.label=5;case 5:return r++,[3,2];case 6:return t&&(t+="\n"),[2,t]}}))}))},e.prototype.getCustomApis=function(){return a(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,u;return c(this,(function(c){switch(c.label){case 0:return e=JSON.parse(l.default.readFileSync("./crm.json","utf8")),t=e.crm.solution_name_generate,[4,f.SolutionService.getSolution(t,["solutionid"],this.bearer)];case 1:return n=c.sent(),[4,p.SolutionComponentService.retrieveMultipleRecords({select:["objectid"],filters:[{conditions:[{attribute:"_solutionid_value",value:n.solutionid}]},{type:"or",conditions:[{attribute:"componenttype",value:10051}]}]},this.bearer)];case 2:for(r=c.sent(),o=[],i=0,a=r;i0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] {"),p="const environmentVariableValue = await EnvironmentVariableService.getEnvironmentVariableValue('".concat(s.schemaname,"');"),h=e.getReturnString(s),t+="".concat(d,"\n ").concat(p,"\n ").concat(h,"\n }\n\n");return[2,t]}}))}))},e.getReturnString=function(e){if(1e8===e.type)return"return environmentVariableValue ? environmentVariableValue.value : '".concat(e.defaultvalue,"';");if(100000001===e.type)return"return environmentVariableValue ? parseFloat(environmentVariableValue.value) : ".concat(e.defaultvalue,";");if(100000002===e.type)return"return environmentVariableValue ? environmentVariableValue.value === 'yes' : ".concat("yes"===e.defaultvalue,";");if(100000003===e.type){var t="// eslint-disable-next-line quotes\n ";return t+="return environmentVariableValue ? JSON.parse(environmentVariableValue.value) : ".concat(e.defaultvalue,";")}if(100000004===e.type){t="// Not supported or go ahead with the value\n ";return t+="return environmentVariable ? environmentVariableValue.value as unknown : null"}},e.getEnvironmentType=function(e){return 1e8===e.type?"string":100000001===e.type?"number":100000002===e.type?"boolean":100000003===e.type?"JSON":100000004===e.type?"unknown":void 0},e.prototype.getEnvironmentVariableDefinitions=function(){return a(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,l,h;return c(this,(function(c){switch(c.label){case 0:return e=[],t=JSON.parse(u.readFileSync("./crm.json","utf8")),n=t.crm.solution_name_generate,[4,f.SolutionService.getSolution(n,["solutionid"],this.bearer)];case 1:return r=c.sent(),[4,d.SolutionComponentService.retrieveMultipleRecords({select:["objectid"],filters:[{conditions:[{attribute:"_solutionid_value",value:r.solutionid}]},{type:"or",conditions:[{attribute:"componenttype",value:380}]}]},this.bearer)];case 2:o=c.sent(),i=0,a=o,c.label=3;case 3:return i0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]","ig"),a,n),u.sed("-i",new RegExp("<%= namespace %>","ig"),i,n),u.sed("-i",new RegExp("<%= formname %>","ig"),e.name,n),u.sed("-i",new RegExp("<%= entity %>","ig"),this.entityName,n),u.test("-e","../.git")&&f.default.execFileSync("git",["add",n]),console.log("Added ".concat(this.entityName,"/").concat(t,"/").concat(t,".ts")),[2]}))}))},e.prototype.addEntityFormFile=function(e){return a(this,void 0,void 0,(function(){var t,n;return c(this,(function(r){return t=e.name.replace(/\W/g,""),console.log("Adding ".concat(this.entityName,"/").concat(t,"/").concat(t,".form.ts")),n="src/".concat(this.entityName,"/").concat(t,"/").concat(t,".form.ts"),u.cp("-r","".concat(__dirname,"/Entity/form/Entity.form.ts"),n),u.sed("-i",new RegExp("Entity","g"),t,n),u.test("-e","../.git")&&f.default.execFileSync("git",["add",n]),console.log("Added ".concat(this.entityName,"/").concat(t,"/").concat(t,".form.ts")),[2]}))}))},e.prototype.updateBuildFile=function(e){return a(this,void 0,void 0,(function(){var t,n,r,o;return c(this,(function(i){return t=e.name.replace(/\W/g,""),console.log("Updating ".concat(this.entityName,"/build.json")),n="src/".concat(this.entityName,"/build.json"),r=String(l.default.readFileSync(n)),(o=JSON.parse(r)).forms.find((function(e){return e.name===t}))||(o.forms.push({name:t,build:!0}),u.ShellString(JSON.stringify(o,null,2)).to(n),u.test("-e","../.git")&&f.default.execFileSync("git",["add",n])),console.log("Updated ".concat(this.entityName,"/build.json")),[2]}))}))},e.prototype.getSystemForms=function(){return a(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,u,f,d,h;return c(this,(function(c){switch(c.label){case 0:return e=JSON.parse(l.default.readFileSync("./crm.json","utf8")),t=e.crm,n=t.solution_name_generate,r=t.only_solution_forms,[4,b.SolutionService.getSolution(n,["solutionid"],this.bearer)];case 1:return o=c.sent(),i=[{type:"or",conditions:[{attribute:"componenttype",value:24},{attribute:"componenttype",value:60}]}],r&&i.push({conditions:[{attribute:"_solutionid_value",value:o.solutionid}]}),[4,y.SolutionComponentService.retrieveMultipleRecords({select:["objectid"],filters:i},this.bearer)];case 2:for(a=c.sent(),s=[],u=0,f=a;u0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] & ").concat(this.entityName).concat(r,"Controls;\n\n"),n+=" interface ".concat(this.entityName).concat(r,"Controls {\n"),o=n,[4,this.getFormTypingsControlsString(e)];case 2:return n=o+c.sent(),n+=" }\n}",i="src/".concat(this.entityName,"/").concat(this.entityName,".d.ts"),a=String(l.readFileSync(i)),u.ShellString("".concat(a,"\n").concat(n)).to(i),console.log("Updated ".concat(this.entityName,".d.ts")),[2]}}))}))},e.prototype.getFormTypingsControlsString=function(t){return a(this,void 0,void 0,(function(){var n,r,o,i,a;return c(this,(function(c){switch(c.label){case 0:return n="",e.usedControlNames=[],r=JSON.parse(t.formjson),o=n,[4,this.getTabsString(r.Tabs.$values)];case 1:return n=o+c.sent(),i=n,[4,this.getControlsString(r.Header.Controls.$values)];case 2:return n=i+c.sent(),a=n,[4,this.getControlsString(r.Footer.Controls.$values)];case 3:return[2,n=a+c.sent()]}}))}))},e.prototype.getTabsString=function(e){return a(this,void 0,void 0,(function(){var t,n,r,o,i;return c(this,(function(a){switch(a.label){case 0:t="",n=0,r=e,a.label=1;case 1:return n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]","ig"),e,"src/License/Validator/".concat(i)),l.sed("-i",new RegExp("<%= publisher %>","ig"),o,"src/License/Validator/".concat(i)),l.sed("-i",new RegExp("<%= namespace %>","ig"),r,"src/License/Validator/".concat(i))})),l.test("-e","../.git")&&p.default.execFileSync("git",["add","src/License"]),console.log("Adding D365 License Validator done"),[2]}))}))},e}();t.LicenseValidator=h},9160:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?(console.log("hso-d365 generate Entity ".concat(i)),[4,new f.Entity(this.bearer,i,{}).generate()]):[3,3]):[3,4];case 2:c.sent(),c.label=3;case 3:return t++,[3,1];case 4:return[2]}}))}))},e.prototype.regenerateGlobalOptionSets=function(){return a(this,void 0,void 0,(function(){return c(this,(function(e){switch(e.label){case 0:return console.log("hso-d365 generate GlobalOptionSets"),[4,new d.GlobalOptionSet(this.bearer).generate()];case 1:return e.sent(),[2]}}))}))},e.prototype.regenerateEnvironmentVariable=function(){return a(this,void 0,void 0,(function(){return c(this,(function(e){switch(e.label){case 0:return console.log("hso-d365 generate EnvironmentVariable"),[4,new p.EnvironmentVariable(this.bearer).generate()];case 1:return e.sent(),[2]}}))}))},e}();t.Regenerator=h},597:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]","ig"),a,"src/".concat(e,"/").concat(o)),l.sed("-i",new RegExp("<%= namespace %>","ig"),i,"src/".concat(e,"/").concat(o));var c="src/".concat(e,"/").concat(o);l.test("-e","../.git")&&p.default.execFileSync("git",["add",c])})),[2]}))}))},e.addBuildFile=function(e,t){return a(this,void 0,void 0,(function(){var n,r,o;return c(this,(function(i){return console.log("Adding ".concat(e,"/build.json")),n="src/".concat(e,"/build.json"),l.cp("-r","".concat(__dirname,"/Entity/build.json"),n),r=String(d.readFileSync(n)),(o=JSON.parse(r)).webresources.find((function(t){return t.name===e}))||(o.webresources.push({name:e,build:!0,template:t.template}),l.ShellString(JSON.stringify(o,null,2)).to(n)),l.test("-e","../.git")&&p.default.execFileSync("git",["add",n]),console.log("Added ".concat(e,"/build.json")),[2]}))}))},e}();t.Webresource=h},6175:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] [options]"),c.default.command("new ").alias("n").description("Creates a new workspace and an initial Webresource and PCF setup or creates a new PCF component").action((function(e){a.default.test("-e","../pcf")?y.PCF.createComponent(e):s.Create.createProject(e)})).on("--help",(function(){s.Create.showCreateHelp()})),c.default.command("regenerate").alias("rg").description("Regenerates files").action((function(){return r(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return v()?[4,b.RegeneratorRouter.regenerate()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))})).on("--help",(function(){console.log("Regenerates files")})),c.default.command("generate [name]").alias("g").option("-s, --skipForms","Skip generating form files").description("Generates and/or modifies files bases on a schematic.").action((function(e,t,n){v()&&l.Generator.generate(e,t,n)})).on("--help",(function(){l.Generator.showGenerateHelp()})),c.default.command("extractTranslations").alias("extract").description("Extracts translation to resx files").action((function(){d.Resx.extract()})).on("--help",(function(){console.log("In translation folder a folder 'locales' will be generated having translation files."),console.log("It will generate one locales.resx file."),console.log("You have to add for each required language a copy yourself like locales.1033.resx."),console.log("Once done, the tooling will keep up-to-date for you.")})),c.default.command("lint").alias("l").description("Runs linting tools on project code").action((function(){a.default.exec("npm run lint")})).on("--help",(function(){console.log("Runs linting tools on project code using the configuration as specified in your projects '.eslintrc.json' file")})),c.default.command("build").alias("b").description("Compiles project into an output directory named dist").action((function(){a.default.test("-f","Solutions.cdsproj")?y.PCF.build():a.default.exec("npm run build:prod")})).on("--help",(function(){console.log("The command can be used to build the project to be distributed to the D365 environment using the 'deploy' command")})),c.default.command("deploy").option("-f, --force","Force unmodified files as well").description("Invokes the deploy builder").action((function(e){var t=e.force;a.default.test("-f","Solutions.cdsproj")||a.default.test("-f","pcfconfig.json")?y.PCF.deploy():f.Deploy.deployProject(t)})).on("--help",(function(){console.log("Distributes the project to the D365 environment. You need to run the 'build' command first")})),c.default.command("update").alias("u").description("Updates existing workspace and Webresource setup").action((function(){(function(){if(!a.default.test("-e","src"))return console.log(g.default.red("You are not inside the project Webresources folder!")),!1;var e=a.default.exec("hso-d365 --version").stdout.replace(/\n/gi,""),t=JSON.parse(m.default.readFileSync("../crm.json","utf8"));if(t)for(var n=e.split("."),r=t.version.split("."),o=0;o<3;o+=1){if(n[o]>r[o])return!0;if(n[o]").alias("f").description("Sets the Solution forms iscustomizable/canbedeleted true/false").action((function(e){new p.SetFormCustomizable("true"===e)})).on("--help",(function(){console.log("Sets the Solution forms iscustomizable/canbedeleted true/false")})),c.default.command("showFiddlerRule").alias("fiddler").description("Show the Fiddler AutoResponder Rule Editor lines").action((function(){return r(void 0,void 0,void 0,(function(){var e,t,n,r,i,c;return o(this,(function(o){return e=process.cwd(),t=JSON.parse(m.default.readFileSync("../crm.json","utf8")),a.default.test("-e","Solutions")?(n="REGEX:(?insx).+\\/cc_".concat(t.crm.publisher_prefix,".(?'foldername'[^?]*)\\/(?'fname'[^?]*.js)"),r="".concat(e,"\\${foldername}\\out\\controls\\${foldername}\\${fname}"),console.log("Please add to first Rule Editor line (including REGEX:): \n".concat(n)),console.log("Please add to second Rule Editor line: \n".concat(r))):(i="REGEX:(?insx).+\\/".concat(t.crm.publisher_prefix,"_\\/").concat(t.crm.namespace,"\\/(?'foldername'[^?]*)\\/(?'fname'[^?]*.js)"),c="".concat(e,"\\dist\\").concat(t.crm.publisher_prefix,"_\\").concat(t.crm.namespace,"\\${foldername}\\${fname}"),console.log("Please add to first Rule Editor line (including REGEX:): \n".concat(i)),console.log("Please add to second Rule Editor line: \n".concat(c))),[2]}))}))})),c.default.arguments("").action((function(){c.default.outputHelp(),console.log(""),console.log("echo Unknown command!")})),c.default.parse(process.argv)},6855:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?"?".concat(s.join("&")):""},e.generateSelect=function(e){return void 0===e&&(e=[]),e.length>0?"$select=".concat(e.join(",")):null},e.generateFilter=function(t){void 0===t&&(t=[]);var n=[];if(t.length>0)for(var r=0,o=t;r0?"$filter=".concat(n.join(" and ")):null},e.parseFilter=function(e){for(var t=e.type,n=void 0===t?"and":t,r=[],o=0,i=e.conditions;o0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{".concat(e.webresourceid,"}")},[2,i.NodeApi.executeAction("PublishXml",t,n)]}))}))},e.addToSolution=function(e,t,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){return[2,i.NodeApi.executeAction("AddSolutionComponent",n,{ComponentId:e.webresourceid,ComponentType:61,SolutionUniqueName:t,AddRequiredComponents:!1,IncludedComponentSettingsValues:null})]}))}))},e.getWebresourcetype=function(t,n){return r(this,void 0,void 0,(function(){var r,a,c,s,u,l,f,d;return o(this,(function(o){switch(o.label){case 0:return[4,i.NodeApi.getPicklistOptionSet(e.logicalName,"webresourcetype",n)];case 1:for(r=o.sent(),s=0,u=r.Options;s0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] (https://www.hso.com)","description":"Dynamics 365 Command Line Interface for TypeScript projects for Dataverse","repository":{"type":"git","url":"https://github.com/hso-nn/d365-cli.git"},"keywords":["dynamics crm","dynamics d365","webapi","xrm","typescript","d365","dataverse","cli","crm","ce","hso"],"files":["bin/"],"license":"MIT","scripts":{"build":"npm run clean && webpack --mode development","build:prod":"npm run clean && webpack --mode production --bail --progress","clean":"IF exist bin\\\\root\\\\deploy (rmdir /s /q bin\\\\root\\\\deploy)"},"engines":{"node":">=14"},"bin":{"hso-d365":"bin/hso-d365"},"devDependencies":{"@babel/core":"^7.20.12","@babel/polyfill":"^7.12.1","@babel/preset-env":"^7.14.2","@types/colors":"^1.2.1","@types/commander":"^2.12.2","@types/express":"^4.17.13","@types/express-session":"^1.17.4","@types/inquirer":"^7.3.1","@types/node":"^14.14.14","@types/open":"^6.2.1","@types/sanitize-html":"^2.3.2","@types/shelljs":"^0.8.8","@types/webpack":"^5.28.0","@types/webpack-node-externals":"^2.5.2","@types/xml2js":"^0.4.7","@types/xrm":"^9.0.33","@typescript-eslint/eslint-plugin":"^5.12.0","@typescript-eslint/parser":"^5.12.0","babel-loader":"^9.1.2","copy-webpack-plugin":"^11.0.0","cross-env":"^7.0.3","eslint":"^8.9.0","eslint-webpack-plugin":"^3.1.1","json-loader":"^0.5.7","terser-webpack-plugin":"^5.0.3","ts-loader":"^8.0.12","ts-node":"^10.1.0","typescript":"^4.5.5","webpack":"^5.44.0","webpack-cli":"^4.7.2","webpack-node-externals":"^2.5.2"},"dependencies":{"@azure/msal-node":"^1.6.0","colors":"^1.4.0","commander":"^6.2.1","express":"^4.17.1","express-session":"^1.17.2","inquirer":"^8.1.5","open":"^7.3.0","shelljs":"^0.8.4","xml2js":"^0.4.23"}}')}},t={};(function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports})(6175)}(); \ No newline at end of file +/*! HSO D365 CLI 7.0.0 | (c) HSO Innovation */!function(){"use strict";var e={5431:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]","ig"),e.publisher_prefix,t),l.sed("-i",new RegExp("<%= environment %>","ig"),e.environment,t),l.sed("-i",new RegExp("<%= namespace %>","ig"),e.namespace,t);var n=l.exec("hso-d365 --version").stdout.replace(/\n/gi,"");l.sed("-i",new RegExp("<%= version %>","ig"),n,t)},e.initWebresourcesCrmJson=function(e){var t=l.ls("Webresources/crm.json")[0];l.sed("-i",new RegExp("<%= solution_name_deploy %>","ig"),e.solution_name_deploy,t),l.sed("-i",new RegExp("<%= solution_name_generate %>","ig"),e.solution_name_generate||e.solution_name_deploy,t)},e.initWebresourcesPackageJson=function(e,t){var n=l.ls("Webresources/package.json")[0];l.sed("-i","<%= projectname %>",e.toLowerCase(),n),l.sed("-i",new RegExp("<%= description %>","ig"),t.solution_name_deploy,n)},e.initWebresourcesWebpackConfig=function(e){var t=l.ls("Webresources/webpack.config.ts")[0];l.sed("-i",new RegExp("<%= publisher_prefix %>","ig"),e.publisher_prefix,t),l.sed("-i",new RegExp("<%= namespace %>","ig"),e.namespace,t),l.sed("-i",new RegExp("<%= description %>","ig"),e.namespace,t)},e.inquirer=function(){var e=this;return f.prompt([{type:"input",name:"environment",message:"D365 environment url (eg. https://yourproject.crm4.dynamics.com):",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(!t)throw new Error("You need to provide an environment");if(!new RegExp("https://(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}").test(t))throw new Error("You need to provide a valid url");return[2,!0]}))}))}},{type:"input",name:"solution_name_deploy",message:"D365 deployment Solution ('Name' column):",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(!t)throw new Error("You need to provide a solution");if(!new RegExp("[a-zA-Z_\\d]*").test(t))throw new Error("You need to provide a valid solution name");return[2,!0]}))}))}},{type:"input",name:"solution_name_generate",message:"D365 generate Solution ('Name' column)\nIf equal to deployment Solution keep blank:",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(t&&!new RegExp("[a-zA-Z_\\d]*").test(t))throw new Error("You need to provide a valid solution name");return[2,!0]}))}))}},{type:"input",name:"solution_name_pcf",message:"D365 PCF Solution ('Name' column)\nIf equal to deployment Solution keep blank:",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(t&&!new RegExp("[a-zA-Z_\\d]*").test(t))throw new Error("You need to provide a valid solution name");return[2,!0]}))}))}},{type:"input",name:"publisher_name",message:"D365 Publisher Name (not Display Name):",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(!t)throw new Error("You need to provide a publisher name");if(!new RegExp("[a-zA-Z_0-9]*").test(t))throw new Error("You need to provide a valid publisher");return[2,!0]}))}))}},{type:"input",name:"publisher_prefix",message:"D365 Publisher Prefix (3 chars a-z):",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(!t)throw new Error("You need to provide a publisher");if(!new RegExp("[a-zA-Z_\\d]*").test(t))throw new Error("You need to provide a valid publisher");return[2,!0]}))}))}},{type:"input",name:"namespace",message:"Customer or Product name:",validate:function(t){return a(e,void 0,void 0,(function(){return c(this,(function(e){if(!t)throw new Error("You need to provide a customer or product name");if(!new RegExp("[a-zA-Z_\\d]*").test(t))throw new Error("You need to provide a valid namespace");return[2,!0]}))}))}}])},e}();t.Create=h},6342:function(e,t,n){var r,o=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),a=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),c=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},u=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]"),[2,i=i.substr(a+2)]):[2]}}))}))},Object.defineProperty(t,"defaultDependencyxml",{get:function(){return''},enumerable:!1,configurable:!0}),Object.defineProperty(t,"translationRegex",{get:function(){return/\.translate\(["'](.*)["']\)/gm},enumerable:!1,configurable:!0}),t.prototype.generateWebresourceXmlDoc=function(e,n){return s(this,void 0,void 0,(function(){var r,o,i;return u(this,(function(a){switch(a.label){case 0:return r=y.ls("dist/**/locales/*.resx"),0===(o=r.map((function(e){return e.substr(5)}))).length&&null===e.dependencyxml?[2,null]:[4,b.parseStringPromise(e.dependencyxml||t.defaultDependencyxml)];case 1:return i=a.sent(),t.translationRegex.test(String(n))?(this.addLibraries(i,o),this.cleanLibraries(i,o)):this.cleanLibraries(i),[2,i]}}))}))},t.prototype.addLibraries=function(e,n){var r=e.Dependencies.Dependency[0];r.Library||(r.Library=[]);for(var o=function(e){r.Library.find((function(t){return t.$.name===e}))||(console.log("Adding dependency: ".concat(e)),r.Library.push({$:t.createLibraryItem(e)}))},i=0,a=n;i=0;o-=1){var i=r.Library[o].$.name;t.localesResxRegex.test(i)&&(n.includes(i)||(console.log("Removing dependency: ".concat(i)),r.Library.splice(o,1)))}},t.createLibraryItem=function(e){return{name:e,displayName:e,languagecode:t.getLanguageCode(e),description:"",libraryUniqueId:t.guid()}},t.getLanguageCode=function(e){var n;return e.endsWith(".resx")&&(n=t.localesResxRegex.exec(e)),n&&n[1]||""},t.guid=function(){return"{xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx}".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},t.xmlBuilder=new b.Builder,t}(p.MsalRouter);t.Deploy=g},883:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PCF=void 0;var c=a(n(7027)),s=a(n(4357)),u=i(n(7147)),l=a(n(2081)),f=function(){function e(){}return e.createComponent=function(t){c.default.test("-e","../pcf")?t?c.default.test("-e",t)?console.log(s.default.red("Control already exists")):c.default.which("pac")?e.create(t):console.log(s.default.red("You need to install pac first: https://aka.ms/PowerAppsCLI")):console.log(s.default.red("No control name specified!")):console.log(s.default.red("You are not inside the project 'pcf' folder!"))},e.create=function(t){c.default.exec("mkdir ".concat(t)),c.default.cd(t),e.pacInit(t),e.addComponentFiles(t),e.addReference(t)},e.pacInit=function(e){c.default.exec("pac install latest");var t=JSON.parse(u.readFileSync("../../crm.json","utf8")).crm.publisher_prefix;t&&c.default.exec("pac pcf init --namespace ".concat(t," --name ").concat(e," --template field"))},e.addComponentFiles=function(e){c.default.cp("-f","".concat(__dirname,"/PCF/*"),"."),c.default.cp("-f","".concat(__dirname,"/PCF/.*"),".");var t="./".concat(e,"/").concat(e,".tsx");c.default.cp("-r","".concat(__dirname,"/PCF/Component/PCFComponent.tsx"),t),c.default.sed("-i",new RegExp("PCFComponent","g"),e,t),c.default.cp("-f","".concat(__dirname,"/PCF/Component/index.ts"),"./".concat(e)),c.default.sed("-i",new RegExp("PCFComponent","g"),e,"./".concat(e,"/index.ts")),c.default.cp("-f","".concat(__dirname,"/PCF/Component/FieldComponent.ts"),"./".concat(e)),c.default.exec("npm install --save-dev @fluentui/react eslint-plugin-react eslint-plugin-react-hooks rxjs"),c.default.test("-e","../../.git")&&l.default.execFileSync("git",["add","../".concat(e)])},e.addReference=function(e){var t=process.cwd();c.default.cd(".."),c.default.cd("Solutions"),l.default.execFileSync("pac",["solution","add-reference","--path",t]);var n="msbuild /t:build /restore";c.default.exec(n),n+=" /p:configuration=Release",c.default.exec(n),c.default.cd(".."),c.default.cd(e)},e.build=function(){if(c.default.test("-f","Solutions.cdsproj")){var e="msbuild /t:build";c.default.exec(e),e+=" /p:configuration=Release",c.default.exec(e)}else console.log(s.default.red("You are not inside the PCF/Solutions folder containing the Solutions.cdsproj file!"))},e.initPcfSolution=function(e,t,n){if(!c.default.test("-e","Solutions")){c.default.exec("mkdir Solutions"),c.default.cd("Solutions");var r="pac solution init --publisher-name ".concat(t," --publisher-prefix ").concat(n);c.default.exec(r);var o=e;c.default.sed("-i",new RegExp("Solutions","ig"),"".concat(o,""),"src/Other/Solution.xml")}},e.deploy=function(){if(c.default.test("-f","Solutions.cdsproj"))console.log(s.default.red("Deployment should be done on component level!"));else{var e=JSON.parse(u.readFileSync("../crm.json","utf8"));c.default.exec("pac pcf push --publisher-prefix ".concat(e.crm.publisher_prefix)),console.log(s.default.red("When getting an error about 'No profiles found' you need to set this up by following command: ")),console.log(s.default.red("pac auth create --url ".concat(e.crm.url)));console.log("See further information here: ".concat("https://docs.microsoft.com/en-us/powerapps/developer/component-framework/import-custom-controls#connecting-to-your-environment"))}},e}();t.PCF=f},4982:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&e.addLocalesFile(),[4,e.processCodeKeys(t)];case 1:return n.sent(),[2,null]}}))}))},e.getCodeKeys=function(){for(var t=new Set,n=0,r=s.ls("src/**/*.ts*");n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]","ig"),e.crm.publisher_prefix,"../crm.json"),l.default.sed("-i",new RegExp("<%= environment %>","ig"),e.crm.url,"../crm.json"),l.default.sed("-i",new RegExp("<%= namespace %>","ig"),e.crm.namespace,"../crm.json"),l.default.test("-e","../.git")&&d.default.execFileSync("git",["add","../crm.json"]);var t=l.default.exec("hso-d365 --version").stdout.replace(/\n/gi,"");l.default.sed("-i",new RegExp("<%= version %>","ig"),t,"../crm.json"),l.default.test("-e","../.git")&&d.default.execFileSync("git",["add","../crm.json"])},e.updatePackageJson=function(){console.log("Updating package.json...");var e=JSON.parse(f.default.readFileSync("./package.json","utf8")),t=e.name,n=e.description,r=e.version,o=JSON.parse(f.default.readFileSync("../crm.json","utf8"));l.default.cp("-R","".concat(__dirname,"/root/Webresources/package.json"),".");var i=l.default.ls("package.json")[0];l.default.sed("-i",new RegExp("<%= projectname %>","ig"),t,i),l.default.sed("-i",new RegExp("<%= description %>","ig"),n,i),l.default.sed("-i",new RegExp("<%= publisher %>","ig"),o.crm.publisher_prefix,i),l.default.sed("-i",new RegExp("<%= version %>","ig"),r,i),console.log("Removing old npm packages. This may take a while..."),l.default.exec("npm prune"),l.default.exec("npm install")},e.updateWebpackConfig=function(){return a(this,void 0,void 0,(function(){return c(this,(function(e){return console.log("Updating webpack.config..."),l.default.cp("-R","".concat(__dirname,"/root/Webresources/webpack.config.ts"),"."),l.default.test("-e","../.git")&&d.default.execFileSync("git",["add","webpack.config.ts"]),[2]}))}))},e}();t.Update=p},3152:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]"]:["Picklist","Status","State"].includes(t)?(r="".concat(this.entityName,"_").concat(n,"Values"),[2,"Xrm.Attributes.OptionSetAttribute<".concat(r,">")]):["Integer","Double","BigInt","Decimal","Double","Money"].includes(t)?[2,"Xrm.Attributes.NumberAttribute"]:["Lookup","Customer","Owner"].includes(t)?[2,"Xrm.Attributes.LookupAttribute"]:(console.log(p.default.blue("".concat(this.entityLogicalName," attribute ").concat(t," falls back to Xrm.Attributes.Attribute."))),[2,"Xrm.Attributes.Attribute"])}))}))},e.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e}();t.AttributeFormContext=h},7911:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]"]:["Picklist","Status","State"].includes(t)?(r="".concat(this.entityName,"_").concat(n,"Values"),[2,"Xrm.Attributes.OptionSetAttribute<".concat(r,">")]):["Integer","Double","BigInt","Decimal","Double","Money"].includes(t)?[2,"Xrm.Attributes.NumberAttribute"]:["Lookup","Customer","Owner"].includes(t)?[2,"Xrm.Attributes.LookupAttribute"]:(console.log(f.default.blue("".concat(this.entityLogicalName," attribute ").concat(t," falls back to Xrm.Attributes.Attribute."))),[2,"Xrm.Attributes.Attribute"])}))}))},e}();t.AttributeTypings=h},1634:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] => {\n"),t+=" return WebApi.executeAction('".concat(i.uniquename,"', request);\n"),t+="};\n\n",c.label=5;case 5:return r++,[3,2];case 6:return t&&(t+="\n"),[2,t]}}))}))},e.prototype.getCustomApis=function(){return a(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,u;return c(this,(function(c){switch(c.label){case 0:return e=JSON.parse(l.default.readFileSync("./crm.json","utf8")),t=e.crm.solution_name_generate,[4,f.SolutionService.getSolution(t,["solutionid"],this.bearer)];case 1:return n=c.sent(),[4,p.SolutionComponentService.retrieveMultipleRecords({select:["objectid"],filters:[{conditions:[{attribute:"_solutionid_value",value:n.solutionid}]},{type:"or",conditions:[{attribute:"componenttype",value:10051}]}]},this.bearer)];case 2:for(r=c.sent(),o=[],i=0,a=r;i0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] {"),p="const environmentVariableValue = await EnvironmentVariableService.getEnvironmentVariableValue('".concat(s.schemaname,"');"),h=e.getReturnString(s),t+="".concat(d,"\n ").concat(p,"\n ").concat(h,"\n }\n\n");return[2,t]}}))}))},e.getReturnString=function(e){if(1e8===e.type)return"return environmentVariableValue ? environmentVariableValue.value : '".concat(e.defaultvalue,"';");if(100000001===e.type)return"return environmentVariableValue ? parseFloat(environmentVariableValue.value) : ".concat(e.defaultvalue,";");if(100000002===e.type)return"return environmentVariableValue ? environmentVariableValue.value === 'yes' : ".concat("yes"===e.defaultvalue,";");if(100000003===e.type){var t="// eslint-disable-next-line quotes\n ";return t+="return environmentVariableValue ? JSON.parse(environmentVariableValue.value) : ".concat(e.defaultvalue,";")}if(100000004===e.type){t="// Not supported or go ahead with the value\n ";return t+="return environmentVariable ? environmentVariableValue.value as unknown : null"}},e.getEnvironmentType=function(e){return 1e8===e.type?"string":100000001===e.type?"number":100000002===e.type?"boolean":100000003===e.type?"JSON":100000004===e.type?"unknown":void 0},e.prototype.getEnvironmentVariableDefinitions=function(){return a(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,l,h;return c(this,(function(c){switch(c.label){case 0:return e=[],t=JSON.parse(u.readFileSync("./crm.json","utf8")),n=t.crm.solution_name_generate,[4,f.SolutionService.getSolution(n,["solutionid"],this.bearer)];case 1:return r=c.sent(),[4,d.SolutionComponentService.retrieveMultipleRecords({select:["objectid"],filters:[{conditions:[{attribute:"_solutionid_value",value:r.solutionid}]},{type:"or",conditions:[{attribute:"componenttype",value:380}]}]},this.bearer)];case 2:o=c.sent(),i=0,a=o,c.label=3;case 3:return i0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]","ig"),a,n),u.sed("-i",new RegExp("<%= namespace %>","ig"),i,n),u.sed("-i",new RegExp("<%= formname %>","ig"),e.name,n),u.sed("-i",new RegExp("<%= entity %>","ig"),this.entityName,n),u.test("-e","../.git")&&f.default.execFileSync("git",["add",n]),console.log("Added ".concat(this.entityName,"/").concat(t,"/").concat(t,".ts")),[2]}))}))},e.prototype.addEntityFormFile=function(e){return a(this,void 0,void 0,(function(){var t,n;return c(this,(function(r){return t=e.name.replace(/\W/g,""),console.log("Adding ".concat(this.entityName,"/").concat(t,"/").concat(t,".form.ts")),n="src/".concat(this.entityName,"/").concat(t,"/").concat(t,".form.ts"),u.cp("-r","".concat(__dirname,"/Entity/form/Entity.form.ts"),n),u.sed("-i",new RegExp("Entity","g"),t,n),u.test("-e","../.git")&&f.default.execFileSync("git",["add",n]),console.log("Added ".concat(this.entityName,"/").concat(t,"/").concat(t,".form.ts")),[2]}))}))},e.prototype.updateBuildFile=function(e){return a(this,void 0,void 0,(function(){var t,n,r,o;return c(this,(function(i){return t=e.name.replace(/\W/g,""),console.log("Updating ".concat(this.entityName,"/build.json")),n="src/".concat(this.entityName,"/build.json"),r=String(l.default.readFileSync(n)),(o=JSON.parse(r)).forms.find((function(e){return e.name===t}))||(o.forms.push({name:t,build:!0}),u.ShellString(JSON.stringify(o,null,2)).to(n),u.test("-e","../.git")&&f.default.execFileSync("git",["add",n])),console.log("Updated ".concat(this.entityName,"/build.json")),[2]}))}))},e.prototype.getSystemForms=function(){return a(this,void 0,void 0,(function(){var e,t,n,r,o,i,a,s,u,f,d,h;return c(this,(function(c){switch(c.label){case 0:return e=JSON.parse(l.default.readFileSync("./crm.json","utf8")),t=e.crm,n=t.solution_name_generate,r=t.only_solution_forms,[4,b.SolutionService.getSolution(n,["solutionid"],this.bearer)];case 1:return o=c.sent(),i=[{type:"or",conditions:[{attribute:"componenttype",value:24},{attribute:"componenttype",value:60}]}],r&&i.push({conditions:[{attribute:"_solutionid_value",value:o.solutionid}]}),[4,y.SolutionComponentService.retrieveMultipleRecords({select:["objectid"],filters:i},this.bearer)];case 2:for(a=c.sent(),s=[],u=0,f=a;u0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] & ").concat(this.entityName).concat(r,"Controls;\n\n"),n+=" interface ".concat(this.entityName).concat(r,"Controls {\n"),o=n,[4,this.getFormTypingsControlsString(e)];case 2:return n=o+c.sent(),n+=" }\n}",i="src/".concat(this.entityName,"/").concat(this.entityName,".d.ts"),a=String(l.readFileSync(i)),u.ShellString("".concat(a,"\n").concat(n)).to(i),console.log("Updated ".concat(this.entityName,".d.ts")),[2]}}))}))},e.prototype.getFormTypingsControlsString=function(t){return a(this,void 0,void 0,(function(){var n,r,o,i,a;return c(this,(function(c){switch(c.label){case 0:return n="",e.usedControlNames=[],r=JSON.parse(t.formjson),o=n,[4,this.getTabsString(r.Tabs.$values)];case 1:return n=o+c.sent(),i=n,[4,this.getControlsString(r.Header.Controls.$values)];case 2:return n=i+c.sent(),a=n,[4,this.getControlsString(r.Footer.Controls.$values)];case 3:return[2,n=a+c.sent()]}}))}))},e.prototype.getTabsString=function(e){return a(this,void 0,void 0,(function(){var t,n,r,o,i;return c(this,(function(a){switch(a.label){case 0:t="",n=0,r=e,a.label=1;case 1:return n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]","ig"),e,"src/License/Validator/".concat(i)),l.sed("-i",new RegExp("<%= publisher %>","ig"),o,"src/License/Validator/".concat(i)),l.sed("-i",new RegExp("<%= namespace %>","ig"),r,"src/License/Validator/".concat(i))})),l.test("-e","../.git")&&p.default.execFileSync("git",["add","src/License"]),console.log("Adding D365 License Validator done"),[2]}))}))},e}();t.LicenseValidator=h},9160:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]","ig"),a,"src/".concat(e,"/").concat(o)),l.sed("-i",new RegExp("<%= namespace %>","ig"),i,"src/".concat(e,"/").concat(o));var c="src/".concat(e,"/").concat(o);l.test("-e","../.git")&&p.default.execFileSync("git",["add",c])})),[2]}))}))},e.addBuildFile=function(e,t){return a(this,void 0,void 0,(function(){var n,r,o;return c(this,(function(i){return console.log("Adding ".concat(e,"/build.json")),n="src/".concat(e,"/build.json"),l.cp("-r","".concat(__dirname,"/Entity/build.json"),n),r=String(d.readFileSync(n)),(o=JSON.parse(r)).webresources.find((function(t){return t.name===e}))||(o.webresources.push({name:e,build:!0,template:t.template}),l.ShellString(JSON.stringify(o,null,2)).to(n)),l.test("-e","../.git")&&p.default.execFileSync("git",["add",n]),console.log("Added ".concat(e,"/build.json")),[2]}))}))},e}();t.Webresource=h},6175:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] [options]"),c.default.command("new ").alias("n").description("Creates a new workspace and an initial Webresource and PCF setup or creates a new PCF component").action((function(e){a.default.test("-e","../pcf")?y.PCF.createComponent(e):s.Create.createProject(e)})).on("--help",(function(){s.Create.showCreateHelp()})),c.default.command("regenerate").alias("rg").description("Regenerates files").action((function(){return r(void 0,void 0,void 0,(function(){return o(this,(function(e){switch(e.label){case 0:return v()?[4,b.RegeneratorRouter.regenerate()]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))})).on("--help",(function(){console.log("Regenerates files")})),c.default.command("generate [name]").alias("g").option("-s, --skipForms","Skip generating form files").description("Generates and/or modifies files bases on a schematic.").action((function(e,t,n){v()&&l.Generator.generate(e,t,n)})).on("--help",(function(){l.Generator.showGenerateHelp()})),c.default.command("extractTranslations").alias("extract").description("Extracts translation to resx files").action((function(){d.Resx.extract()})).on("--help",(function(){console.log("In translation folder a folder 'locales' will be generated having translation files."),console.log("It will generate one locales.resx file."),console.log("You have to add for each required language a copy yourself like locales.1033.resx."),console.log("Once done, the tooling will keep up-to-date for you.")})),c.default.command("lint").alias("l").description("Runs linting tools on project code").action((function(){a.default.exec("npm run lint")})).on("--help",(function(){console.log("Runs linting tools on project code using the configuration as specified in your projects '.eslintrc.json' file")})),c.default.command("build").alias("b").description("Compiles project into an output directory named dist").action((function(){a.default.test("-f","Solutions.cdsproj")?y.PCF.build():a.default.exec("npm run build:prod")})).on("--help",(function(){console.log("The command can be used to build the project to be distributed to the D365 environment using the 'deploy' command")})),c.default.command("deploy").option("-f, --force","Force unmodified files as well").description("Invokes the deploy builder").action((function(e){var t=e.force;a.default.test("-f","Solutions.cdsproj")||a.default.test("-f","pcfconfig.json")?y.PCF.deploy():f.Deploy.deployProject(t)})).on("--help",(function(){console.log("Distributes the project to the D365 environment. You need to run the 'build' command first")})),c.default.command("update").alias("u").description("Updates existing workspace and Webresource setup").action((function(){(function(){if(!a.default.test("-e","src"))return console.log(g.default.red("You are not inside the project Webresources folder!")),!1;var e=a.default.exec("hso-d365 --version").stdout.replace(/\n/gi,""),t=JSON.parse(m.default.readFileSync("../crm.json","utf8"));if(t)for(var n=e.split("."),r=t.version.split("."),o=0;o<3;o+=1){if(n[o]>r[o])return!0;if(n[o]").alias("f").description("Sets the Solution forms iscustomizable/canbedeleted true/false").action((function(e){new p.SetFormCustomizable("true"===e)})).on("--help",(function(){console.log("Sets the Solution forms iscustomizable/canbedeleted true/false")})),c.default.command("showFiddlerRule").alias("fiddler").description("Show the Fiddler AutoResponder Rule Editor lines").action((function(){return r(void 0,void 0,void 0,(function(){var e,t,n,r,i,c;return o(this,(function(o){return e=process.cwd(),t=JSON.parse(m.default.readFileSync("../crm.json","utf8")),a.default.test("-e","Solutions")?(n="REGEX:(?insx).+\\/cc_".concat(t.crm.publisher_prefix,".(?'foldername'[^?]*)\\/(?'fname'[^?]*.js)"),r="".concat(e,"\\${foldername}\\out\\controls\\${foldername}\\${fname}"),console.log("Please add to first Rule Editor line (including REGEX:): \n".concat(n)),console.log("Please add to second Rule Editor line: \n".concat(r))):(i="REGEX:(?insx).+\\/".concat(t.crm.publisher_prefix,"_\\/").concat(t.crm.namespace,"\\/(?'foldername'[^?]*)\\/(?'fname'[^?]*.js)"),c="".concat(e,"\\dist\\").concat(t.crm.publisher_prefix,"_\\").concat(t.crm.namespace,"\\${foldername}\\${fname}"),console.log("Please add to first Rule Editor line (including REGEX:): \n".concat(i)),console.log("Please add to second Rule Editor line: \n".concat(c))),[2]}))}))})),c.default.arguments("").action((function(){c.default.outputHelp(),console.log(""),console.log("echo Unknown command!")})),c.default.parse(process.argv)},6855:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{s(r.next(e))}catch(e){i(e)}}function c(e){try{s(r.throw(e))}catch(e){i(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,c)}s((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0?"?".concat(s.join("&")):""},e.generateSelect=function(e){return void 0===e&&(e=[]),e.length>0?"$select=".concat(e.join(",")):null},e.generateFilter=function(t){void 0===t&&(t=[]);var n=[];if(t.length>0)for(var r=0,o=t;r0?"$filter=".concat(n.join(" and ")):null},e.parseFilter=function(e){for(var t=e.type,n=void 0===t?"and":t,r=[],o=0,i=e.conditions;o0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]{".concat(e.webresourceid,"}")},[2,i.NodeApi.executeAction("PublishXml",t,n)]}))}))},e.addToSolution=function(e,t,n){return r(this,void 0,void 0,(function(){return o(this,(function(r){return[2,i.NodeApi.executeAction("AddSolutionComponent",n,{ComponentId:e.webresourceid,ComponentType:61,SolutionUniqueName:t,AddRequiredComponents:!1,IncludedComponentSettingsValues:null})]}))}))},e.getWebresourcetype=function(t,n){return r(this,void 0,void 0,(function(){var r,a,c,s,u,l,f,d;return o(this,(function(o){switch(o.label){case 0:return[4,i.NodeApi.getPicklistOptionSet(e.logicalName,"webresourcetype",n)];case 1:for(r=o.sent(),s=0,u=r.Options;s0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1] (https://www.hso.com)","description":"Dynamics 365 Command Line Interface for TypeScript projects for Dataverse","repository":{"type":"git","url":"https://github.com/hso-nn/d365-cli.git"},"keywords":["dynamics crm","dynamics d365","webapi","xrm","typescript","d365","dataverse","cli","crm","ce","hso"],"files":["bin/"],"license":"MIT","scripts":{"build":"npm run clean && webpack --mode development","build:prod":"npm run clean && webpack --mode production --bail --progress","clean":"IF exist bin\\\\root\\\\deploy (rmdir /s /q bin\\\\root\\\\deploy)"},"engines":{"node":">=14"},"bin":{"hso-d365":"bin/hso-d365"},"devDependencies":{"@babel/core":"^7.20.12","@babel/polyfill":"^7.12.1","@babel/preset-env":"^7.14.2","@types/colors":"^1.2.1","@types/commander":"^2.12.2","@types/express":"^4.17.13","@types/express-session":"^1.17.4","@types/inquirer":"^7.3.1","@types/node":"^14.14.14","@types/open":"^6.2.1","@types/sanitize-html":"^2.3.2","@types/shelljs":"^0.8.8","@types/webpack":"^5.28.0","@types/webpack-node-externals":"^2.5.2","@types/xml2js":"^0.4.7","@types/xrm":"^9.0.33","@typescript-eslint/eslint-plugin":"^5.12.0","@typescript-eslint/parser":"^5.12.0","babel-loader":"^9.1.2","copy-webpack-plugin":"^11.0.0","cross-env":"^7.0.3","eslint":"^8.9.0","eslint-webpack-plugin":"^3.1.1","json-loader":"^0.5.7","terser-webpack-plugin":"^5.0.3","ts-loader":"^8.0.12","ts-node":"^10.1.0","typescript":"^4.5.5","webpack":"^5.44.0","webpack-cli":"^4.7.2","webpack-node-externals":"^2.5.2"},"dependencies":{"@azure/msal-node":"^1.6.0","colors":"^1.4.0","commander":"^6.2.1","express":"^4.17.1","express-session":"^1.17.2","inquirer":"^8.1.5","open":"^7.3.0","shelljs":"^0.8.4","xml2js":"^0.4.23"}}')}},t={};(function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports})(6175)}(); \ No newline at end of file