From a16ef91457eeee19aff3b646b3f029528536a394 Mon Sep 17 00:00:00 2001 From: Niels Steenbeek Date: Tue, 7 Sep 2021 11:18:24 +0200 Subject: [PATCH 1/3] HSO link as https instead of http --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8db55e..8b3ade9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@hso/d365-cli", "version": "5.5.6", - "author": "HSO Innovation (http://www.hso.com)", + "author": "HSO Innovation (https://www.hso.com)", "description": "Dynamics 365 Command Line Interface for TypeScript projects for Dataverse", "repository": { "type": "git", From 6166d5dff5cf7f09285600e0af2278997d4a5ca0 Mon Sep 17 00:00:00 2001 From: Niels Steenbeek Date: Tue, 7 Sep 2021 15:24:24 +0200 Subject: [PATCH 2/3] Target es6 --- bin/root/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/root/tsconfig.json b/bin/root/tsconfig.json index e530c29..bce5806 100644 --- a/bin/root/tsconfig.json +++ b/bin/root/tsconfig.json @@ -5,7 +5,7 @@ "moduleResolution": "node", "resolveJsonModule": true, "esModuleInterop": true, - "target": "es5", + "target": "es6", "allowJs": true, "sourceMap": true, "jsx": "react", From e07ddd70a5e7b17f136d0ed80b1fd08eeacf619c Mon Sep 17 00:00:00 2001 From: Niels Steenbeek Date: Tue, 7 Sep 2021 15:25:31 +0200 Subject: [PATCH 3/3] Build 5.6.0 --- bin/main.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/main.js b/bin/main.js index 77942ea..0aced40 100644 --- a/bin/main.js +++ b/bin/main.js @@ -1 +1 @@ -/*! HSO D365 CLI 5.5.6 | (c) HSO Innovation */!function(){"use strict";var e={194: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]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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 i(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]","ig"),e.publisher,t),l.sed("-i",new RegExp("<%= solution %>","ig"),e.solution,t),l.sed("-i",new RegExp("<%= environment %>","ig"),e.environment,t),l.sed("-i",new RegExp("<%= namespace %>","ig"),e.namespace,t)},e.initPackageJson=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,n),l.sed("-i",new RegExp("<%= publisher %>","ig"),t.publisher,n)},e.initWebpackConfig=function(e){var t=l.ls("Webresources/webpack.config.ts")[0];l.sed("-i",new RegExp("<%= publisher %>","ig"),e.publisher,t),l.sed("-i",new RegExp("<%= namespace %>","ig"),e.namespace,t),l.sed("-i",new RegExp("<%= description %>","ig"),e.namespace,t)},e.inquirer=function(){return f.prompt([{type:"input",name:"environment",message:"D365 environment url (eg. https://yourproject.crm4.dynamics.com):"},{type:"input",name:"solution",message:"D365 Solution name:"},{type:"input",name:"publisher",message:"D365 Publisher Prefix (3 chars a-z):"},{type:"input",name:"namespace",message:"Customer or Product name"}])},e}();t.Create=p},800: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]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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 i(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]")];case 1:return a.sent(),e=this,[4,l.NodeApi.getAttributesMetadata(this.entityLogicalName,this.bearer)];case 2:return e.attributesMetadata=a.sent(),[4,this.getFormContextAttributesString()];case 3:return t=a.sent(),n="src/"+this.entityName+"/"+this.entityName+".formContext.ts",u.cp("-r",__dirname+"/Entity/Entity.attributesContext.ts","src/"+this.entityName),u.cp("-r","src/"+this.entityName+"/Entity.attributesContext.ts",n),u.rm("-rf","src/"+this.entityName+"/Entity.attributesContext.ts"),u.sed("-i",new RegExp("Entity","g"),this.entityName,n),u.exec("git add "+n),r=String(c.readFileSync(n)),i=this.entityName+"FormContext {",o=r.replace(i,i+"\n"+t),u.ShellString(o).to(n),[4,this.log("Generated "+this.entityName+".formContext.ts
")];case 4:return a.sent(),[2]}}))}))},e.prototype.getFormContextAttributesString=function(){return a(this,void 0,void 0,(function(){var t,n,r,i,o,a,u,c,l,f;return s(this,(function(s){switch(s.label){case 0:t="",n=0,r=this.attributesMetadata,s.label=1;case 1:return n"]:[3,3];case 3:return["Picklist","Status","State"].includes(e)?[2,"Xrm.Attributes.OptionSetAttribute"]:[3,4];case 4:return["Integer","Double","BigInt","Decimal","Double","Money"].includes(e)?[2,"Xrm.Attributes.NumberAttribute"]:[3,5];case 5:return["Lookup","Customer","Owner"].includes(e)?[2,"Xrm.Attributes.LookupAttribute"]:[3,6];case 6:return[4,this.log(''+this.entityLogicalName+" attribute "+e+" falls back to Xrm.Attributes.Attribute.
")];case 7:return t.sent(),[2,"Xrm.Attributes.Attribute"]}}))}))},e.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e}();t.AttributeFormContext=f},527: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]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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 i(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]")];case 1:return s.sent(),n=this,[4,l.NodeApi.getAttributesMetadata(this.entityLogicalName,this.bearer)];case 2:return n.attributesMetadata=s.sent(),[4,this.getFormContextControlsString(e)];case 3:return r=s.sent(),i="src/"+this.entityName+"/"+t+"/"+t+".formContext.ts",u.cp("-r",__dirname+"/Entity/Entity.formContext.ts","src/"+this.entityName+"/"+t),u.cp("-r","src/"+this.entityName+"/"+t+"/Entity.formContext.ts",i),u.rm("-rf","src/"+this.entityName+"/"+t+"/Entity.formContext.ts"),u.sed("-i",new RegExp("Entity","g"),this.entityName,i),u.sed("-i",new RegExp("FormName","g"),t,i),u.exec("git add "+i),o=String(c.readFileSync(i)),a=o.match(new RegExp(t+"FormContext extends AttributeFormContext {","ig"))[0],f=o.replace(a,a+"\n"+r),u.ShellString(f).to(i),[4,this.log("Generated "+t+"/"+t+".formContext.ts
")];case 4:return s.sent(),[2]}}))}))},e.prototype.getFormContextControlsString=function(t){return a(this,void 0,void 0,(function(){var n,r,i,o,a;return s(this,(function(s){switch(s.label){case 0:return n="",e.usedControlNames=[],r=JSON.parse(t.formjson),i=n,[4,this.getTabsString(r.Tabs.$values)];case 1:return n=i+s.sent(),o=n,[4,this.getControlsString(r.Header.Controls.$values)];case 2:return n=o+s.sent(),a=n,[4,this.getControlsString(r.Footer.Controls.$values)];case 3:return[2,n=a+s.sent()]}}))}))},e.prototype.getTabsString=function(t){return a(this,void 0,void 0,(function(){var n,r,i,o,a,u,c;return s(this,(function(s){switch(s.label){case 0:n="",e.usedSectionNames=[],r=0,i=t,s.label=1;case 1:return r'+this.entityLogicalName+" control "+n+" falls back to Xrm.Controls.StandardControl.")];case 4:return o.sent(),[2,"Xrm.Controls.StandardControl"]}}))}))},e.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e}();t.ControlFormContext=f},446:function(e,t,n){var r,i=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])})(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)}),o=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}),s=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)&&o(t,e,n);return a(t,e),t},u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]Using entityLogicalName '"+this.entityLogicalName+"'
")];case 2:return t.sent(),[4,g.Model.generateModel(this.bearer,this.entityName,this.entityLogicalName,(function(t){return u(e,void 0,void 0,(function(){return c(this,(function(e){return[2,this.log(t)]}))}))}))];case 3:return t.sent(),[4,m.Enum.generateEnum(this.bearer,this.entityName,this.entityLogicalName,(function(t){return u(e,void 0,void 0,(function(){return c(this,(function(e){return[2,this.log(t)]}))}))}))];case 4:return t.sent(),this.options.skipForms?[3,7]:[4,v.AttributeFormContext.generateFormContext(this.bearer,this.entityName,this.entityLogicalName,(function(t){return u(e,void 0,void 0,(function(){return c(this,(function(e){return[2,this.log(t)]}))}))}))];case 5:return t.sent(),[4,w.Form.generateFormFiles(this.bearer,this.entityName,this.entityLogicalName,(function(t){return u(e,void 0,void 0,(function(){return c(this,(function(e){return[2,this.log(t)]}))}))}))];case 6:return t.sent(),[3,9];case 7:return[4,this.log("Skip generate form files")];case 8:t.sent(),t.label=9;case 9:return[4,this.log("Generating files finished")];case 10:return t.sent(),[2]}}))}))},t.prototype.generateEntity=function(){return u(this,void 0,void 0,(function(){var e,t,n,r,i;return c(this,(function(o){switch(o.label){case 0:return e="src/"+this.entityName+"/"+this.entityName+".service.ts",d.test("-f",e)?[3,7]:[4,p.prompt([{type:"input",name:"entityLogicalName",message:"Entity LogicalName:"}])];case 1:t=o.sent(),this.entityLogicalName=t.entityLogicalName,o.label=2;case 2:return o.trys.push([2,4,,5]),[4,y.NodeApi.getEntityDefinition(this.entityLogicalName,this.bearer,["PrimaryIdAttribute"])];case 3:return o.sent(),[3,5];case 4:throw n=o.sent(),console.log(f.default.red("Failed: Entity "+this.entityName+" has no LogicalName "+this.entityLogicalName)),n;case 5:return d.mkdir("src/"+this.entityName),[4,this.addEntityFiles(this.entityName)];case 6:return o.sent(),[3,8];case 7:r=String(h.readFileSync(e)),i=r.match(new RegExp("static logicalName = '([a-zA-Z_]*)';")),this.entityLogicalName=i[1],console.log(f.default.green("Entity "+this.entityName+" already exist")),o.label=8;case 8:return[2]}}))}))},t.prototype.addEntityFiles=function(e){return u(this,void 0,void 0,(function(){return c(this,(function(t){switch(t.label){case 0:return[4,this.addServiceFile(e)];case 1:return t.sent(),[4,this.addBuildFile()];case 2:return t.sent(),[2]}}))}))},t.prototype.addServiceFile=function(e){return u(this,void 0,void 0,(function(){var t;return c(this,(function(n){switch(n.label){case 0:return[4,this.log("Adding "+e+"/"+e+".service.ts...")];case 1:return n.sent(),t="src/"+this.entityName+"/"+this.entityName+".service.ts",d.cp("-r",__dirname+"/Entity/Entity.service.ts",t),d.sed("-i",new RegExp("EntityLogicalName","g"),this.entityLogicalName,t),d.sed("-i",new RegExp("Entity","g"),e,t),d.exec("git add "+t),[4,this.log("Added "+e+"/"+e+".service.ts")];case 2:return n.sent(),[2]}}))}))},t.prototype.addBuildFile=function(){return u(this,void 0,void 0,(function(){var e;return c(this,(function(t){switch(t.label){case 0:return[4,this.log("Adding "+this.entityName+"/build.json")];case 1:return t.sent(),e="src/"+this.entityName+"/build.json",d.cp("-r",__dirname+"/Entity/build.json",e),d.exec("git add "+e),[4,this.log("Added "+this.entityName+"/build.json")];case 2:return t.sent(),[2]}}))}))},t}(b.AdalRouter);t.Entity=_},172: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]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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 i(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]")];case 1:return a.sent(),[4,this.getAttributeNamesEnumString()];case 2:return e=a.sent(),[4,this.getNavigationPropertyNamesString()];case 3:return t=a.sent(),[4,this.getSavedQueriesString()];case 4:return n=a.sent(),[4,this.getEnumStrings()];case 5:return r=a.sent(),i="src/"+this.entityName+"/"+this.entityName+".enum.ts",u.cp("-r",__dirname+"/Entity/Entity.enum.ts","src/"+this.entityName),u.cp("-r","src/"+this.entityName+"/Entity.enum.ts",i),u.rm("-rf","src/"+this.entityName+"/Entity.enum.ts"),u.exec("git add "+i),o=String(c.readFileSync(i)),[4,this.log("Generated "+this.entityName+".enum.ts
")];case 6:return a.sent(),u.ShellString(o+e+t+r+n).to(i),[2]}}))}))},e.prototype.getSavedQueriesString=function(){return a(this,void 0,void 0,(function(){var t,n,r,i,o,a,u;return s(this,(function(s){switch(s.label){case 0:return t="",t+="export const "+this.entityName.charAt(0).toLowerCase()+this.entityName.slice(1)+"Views = {\n",[4,f.SavedQueryService.retrieveMultipleRecords({select:["savedqueryid","name","returnedtypecode"],filters:[{conditions:[{attribute:"returnedtypecode",value:this.entityLogicalName}]}]},this.bearer)];case 1:for(n=s.sent(),r=0,i=n;r0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1] {",d="const environmentVariableValue = await EnvironmentVariableService.getEnvironmentVariableValue('"+s.schemaname+"');",h=t.getReturnString(s),e+=f+"\n "+d+"\n "+h+"\n }\n\n";return[2,e]}}))}))},t.getReturnString=function(e){if(1e8===e.type)return"return environmentVariableValue ? environmentVariableValue.value : '"+e.defaultvalue+"';";if(100000001===e.type)return"return environmentVariableValue ? parseFloat(environmentVariableValue.value) : "+e.defaultvalue+";";if(100000002===e.type)return"return environmentVariableValue ? environmentVariableValue.value === 'yes' : "+("yes"===e.defaultvalue)+";";if(100000003===e.type){var t="// eslint-disable-next-line quotes\n ";return t+="return environmentVariableValue ? JSON.parse(environmentVariableValue.value) : "+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"}},t.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},t.prototype.getEnvironmentVariableDefinitions=function(){return u(this,void 0,void 0,(function(){var e,t,n,r,i,o,a,s;return c(this,(function(u){switch(u.label){case 0:return e=[],[4,h.SolutionService.getSolution(["solutionid"],this.bearer)];case 1:return t=u.sent(),[4,b.SolutionComponentService.retrieveMultipleRecords({select:["objectid"],filters:[{conditions:[{attribute:"_solutionid_value",value:t.solutionid}]},{type:"or",conditions:[{attribute:"componenttype",value:380}]}]},this.bearer)];case 2:n=u.sent(),r=0,i=n,u.label=3;case 3:return r0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]","ig"),i,n),c.sed("-i",new RegExp("<%= namespace %>","ig"),o,n),c.sed("-i",new RegExp("<%= formname %>","ig"),e.name,n),c.sed("-i",new RegExp("<%= entity %>","ig"),this.entityName,n),c.exec("git add "+n),[4,this.log("Added "+this.entityName+"/"+t+"/"+t+".ts")];case 3:return a.sent(),[2]}}))}))},e.prototype.addEntityFormFile=function(e){return a(this,void 0,void 0,(function(){var t,n;return s(this,(function(r){switch(r.label){case 0:return t=e.name.replace(/\W/g,""),[4,this.log("Adding "+this.entityName+"/"+t+"/"+t+".form.ts")];case 1:return r.sent(),n="src/"+this.entityName+"/"+t+"/"+t+".form.ts",c.cp("-r",__dirname+"/Entity/Entity.form.ts",n),c.sed("-i",new RegExp("Entity","g"),t,n),c.exec("git add "+n),[4,this.log("Added "+this.entityName+"/"+t+"/"+t+".form.ts")];case 2:return r.sent(),[2]}}))}))},e.prototype.updateBuildFile=function(e){return a(this,void 0,void 0,(function(){var t,n,r,i;return s(this,(function(o){switch(o.label){case 0:return t=e.name.replace(/\W/g,""),[4,this.log("Updating "+this.entityName+"/build.json")];case 1:return o.sent(),n="src/"+this.entityName+"/build.json",r=String(l.readFileSync(n)),(i=JSON.parse(r)).forms.find((function(e){return e.name===t}))||(i.forms.push({name:t,build:!0}),c.ShellString(JSON.stringify(i,null,2)).to(n),c.exec("git add "+n)),[4,this.log("Updated "+this.entityName+"/build.json")];case 2:return o.sent(),[2]}}))}))},e.prototype.getSystemForms=function(){return a(this,void 0,void 0,(function(){var e,t,n,r,i,o,a;return s(this,(function(s){switch(s.label){case 0:return e=[],[4,d.SolutionService.getSolution(["solutionid"],this.bearer)];case 1:return t=s.sent(),[4,p.SolutionComponentService.retrieveMultipleRecords({select:["objectid"],filters:[{conditions:[{attribute:"_solutionid_value",value:t.solutionid}]},{type:"or",conditions:[{attribute:"componenttype",value:24},{attribute:"componenttype",value:60}]}]},this.bearer)];case 2:n=s.sent(),r=0,i=n,s.label=3;case 3:return rForm \''+a.name+"' found")]);case 5:s.sent(),s.label=6;case 6:return r++,[3,3];case 7:return[2,e]}}))}))},e}();t.Form=g},506: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]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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 i(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Generator=void 0;var s=a(n(563)),u=o(n(524)),c=n(446),l=n(751),f=n(42),d=n(636),p=n(722),h=n(283),b=function(){function e(){}return e.generate=function(e,t,n){if(u.test("-e","src"))if(e)if(["entity","webresource","model","licensevalidator","environmentvariable","globaloptionset"].includes(e.toLowerCase())){if("entity"===e.toLowerCase())return c.Entity.generateEntity(t,n);if("webresource"===e.toLowerCase())return l.Webresource.generateWebresource(t);if("model"===e.toLocaleLowerCase())return f.ModelRouter.generateModel(t);if("licensevalidator"===e.toLowerCase())return p.LicenseValidator.generateLicenseValidator(t);if("environmentvariable"===e.toLowerCase())return d.EnvironmentVariable.generateEnvironmentVariable();if("globaloptionsets"===e.toLowerCase())return h.GlobalOptionSet.generateGlobalOptionSets()}else console.log(s.default.red("Schematic "+e+" not supported!"));else console.log(s.default.red("No schematic specified!"));else console.log(s.default.red("You are not inside the project Webresources folder!"))},e.showGenerateHelp=function(){console.log("Arguments:"),console.log(" "+s.default.blue("schematic")),console.log(" The schematic or collection:schematic to generate."),console.log(" Example: Entity, Webresource or LicenseValidator.")},e}();t.Generator=b},283:function(e,t,n){var r,i=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])})(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)}),o=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}),s=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)&&o(t,e,n);return a(t,e),t},u=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]","ig"),e,"src/License/"+o),l.sed("-i",new RegExp("<%= publisher %>","ig"),n,"src/License/"+o),l.sed("-i",new RegExp("<%= namespace %>","ig"),r,"src/License/"+o)})),i=l.ls("webpack.config.ts")[0],l.sed("-i","entry: {",'entry: {\n LicenseValidator: [\n path.resolve(__dirname, "src/License/Validator.ts")\n ],',i),l.exec("git add webpack.config.ts"),console.log("Adding D365 License Validator done"),[2]}}))}))},e}();t.LicenseValidator=d},979: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]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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 i(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]")];case 1:return s.sent(),e="src/"+this.entityName+"/"+this.entityName+".model.ts",u.cp("-r",__dirname+"/Entity/Entity.model.ts","src/"+this.entityName),u.cp("-r","src/"+this.entityName+"/Entity.model.ts",e),u.rm("-rf","src/"+this.entityName+"/Entity.model.ts"),u.sed("-i",new RegExp("Entity","g"),this.entityName,e),u.exec("git add "+e),t=String(c.readFileSync(e)),[4,this.getAttributeInterfaceTypes()];case 2:return n=s.sent(),[4,this.getRelationshipInterfaceTypes()];case 3:return r=s.sent(),[4,this.getImportStrings(r)];case 4:return i=s.sent(),[4,this.getTypeStrings()];case 5:return o=s.sent(),[4,this.getAttributesString(n,r)];case 6:return a=s.sent(),l=a,[4,this.getRelationshipsString(r,n)];case 7:return a=l+s.sent(),f=a,[4,this.getCombinedAttributeRelationshipString(n,r)];case 8:return a=f+s.sent(),d=this.entityName+"Model extends Model {",t=t.replace(d,""+d+a),p="interface",t=t.replace(p,""+i+o+p),u.ShellString(t).to(e),[4,this.log("Generated "+this.entityName+".model.ts
")];case 9:return s.sent(),[2]}}))}))},e.prototype.getImportStrings=function(t){return a(this,void 0,void 0,(function(){var n,r,i,o,a,c,l;return s(this,(function(s){switch(s.label){case 0:n="",r=0,i=Object.keys(t),s.label=1;case 1:return rNavigationProperty \''+o+"' generated
\n Referenced model '"+c+"Model' not found.
\n Add referenced entity '"+c+'\' by following cli command:
\n hso-d365 generate Entity '+c+'
\n And regenerate \''+this.entityName+'\' by following cli command:
\n hso-d365 generate Entity '+this.entityName+"
\n ")];case 3:s.sent(),s.label=4;case 4:return r++,[3,1];case 5:return[2,n]}}))}))},e.prototype.getCombinedAttributeRelationshipString=function(t,n){return a(this,void 0,void 0,(function(){var r,i,o,a,c,l,f,d,p,h;return s(this,(function(s){switch(s.label){case 0:r="",i=Object.keys(t),o=0,a=Object.keys(n),s.label=1;case 1:return o")];case 5:s.sent(),s.label=6;case 6:return n++,[3,2];case 7:return[2,t]}}))}))},e.prototype.getInterfaceType=function(e){return a(this,void 0,void 0,(function(){var t,n,r;return s(this,(function(i){switch(i.label){case 0:return t=e.AttributeType,n=e.SchemaName,r=e.AttributeTypeName,["String","Memo","DateTime","Lookup","Customer","Owner","Uniqueidentifier"].includes(t)?[2,"string"]:[3,1];case 1:return["Boolean"].includes(t)?[2,"boolean"]:[3,2];case 2:return["Picklist"].includes(t)?[2,n+"Values"]:[3,3];case 3:return["Integer","Double","BigInt","Decimal","Double","Money"].includes(t)?[2,"number"]:[3,4];case 4:return["Status"].includes(t)?[4,l.NodeApi.getStatusOptionSet(this.entityLogicalName,this.bearer)]:[3,6];case 5:return[2,i.sent().Options.map((function(e){return e.Value})).join(" | ")];case 6:return["State"].includes(t)?[4,l.NodeApi.getStateOptionSet(this.entityLogicalName,this.bearer)]:[3,8];case 7:return[2,i.sent().Options.map((function(e){return e.Value})).join(" | ")];case 8:if("MultiSelectPicklistType"===r.Value)return[2,"number[]"];i.label=9;case 9:return[2]}}))}))},e.prototype.getTypeStrings=function(){return a(this,void 0,void 0,(function(){var e,t,n,r,i,o,a,u,c,f,d;return s(this,(function(s){switch(s.label){case 0:return e="",[4,l.NodeApi.getAttributesMetadata(this.entityLogicalName,this.bearer)];case 1:t=s.sent(),n=0,r=t,s.label=2;case 2:return n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]","ig"),i,"src/"+e+"/"+a),l.sed("-i",new RegExp("<%= namespace %>","ig"),o,"src/"+e+"/"+a),l.exec("git add src/"+e+"/"+a)})),[2]}}))}))},e.addBuildFile=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i;return s(this,(function(o){return console.log("Adding "+e+"/build.json"),n="src/"+e+"/build.json",l.cp("-r",__dirname+"/Entity/build.json",n),r=String(d.readFileSync(n)),(i=JSON.parse(r)).webresources.find((function(t){return t.name===e}))||(i.webresources.push({name:e,build:!0,template:t.template}),l.ShellString(JSON.stringify(i,null,2)).to(n)),l.exec("git add "+n),console.log("Added "+e+"/build.json"),[2]}))}))},e}();t.Webresource=h},497: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]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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 i(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1] [options]"),l.default.command("new ").alias("n").description("Creates a new workspace and an initial Webresource setup").action((function(e){f.Create.createProject(e)})).on("--help",(function(){f.Create.showCreateHelp()})),l.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){p.Generator.generate(e,t,n)})).on("--help",(function(){p.Generator.showGenerateHelp()})),l.default.command("extractTranslations").alias("extract").description("Extracts translation to resx files").action((function(){y.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.")})),l.default.command("lint").alias("l").description("Runs linting tools on project code").action((function(){c.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")})),l.default.command("build").alias("b").description("Compiles project into an output directory named dist").action((function(){c.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")})),l.default.command("deploy").option("-f, --force","Force unmodified files as well").description("Invokes the deploy builder").action((function(e){var t=e.force;b.Deploy.deployProject(t)})).on("--help",(function(){console.log("Distributes the project to the D365 environment. You need to run the 'build' command first")})),l.default.command("update").alias("u").description("Updates existing workspace and Webresource setup").action((function(){d.Update.updateProject()})).on("--help",(function(){d.Update.showUpdateHelp()})),l.default.command("setFormCustomizable ").alias("f").description("Sets the Solution forms iscustomizable/canbedeleted true/false").action((function(e){new g.SetFormCustomizable("true"===e)})).on("--help",(function(){console.log("Sets the Solution forms iscustomizable/canbedeleted true/false")})),l.default.command("showFiddlerRule").alias("fiddler").description("Show the Fiddler AutoResponder Rule Editor lines").action((function(){return a(void 0,void 0,void 0,(function(){var e,t,n,r,i,o;return s(this,(function(a){switch(a.label){case 0:return[4,h.Variables.get()];case 1:return e=a.sent(),t=e.publisher,n=e.namespace,r="REGEX:(?insx).+\\/"+t+"_\\/"+n+"\\/(?'foldername'[^?]*)\\/(?'fname'[^?]*.js)",i=process.cwd(),o=i+"\\dist\\"+t+"_\\"+n+"\\${foldername}\\${fname}",console.log("Please add to first Rule Editor line (including REGEX:): \n"+r),console.log("Please add to second Rule Editor line: \n"+o),[2]}}))}))})),l.default.arguments("").action((function(){l.default.outputHelp(),console.log(""),console.log("echo Unknown command!")})),l.default.parse(process.argv)},145: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]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=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 i(t,e),t},a=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]\n Login\n \n \n