Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
nsteenbeek committed Jan 20, 2020
2 parents eb18e01 + f1094e1 commit f75a305
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ Once the files are deployed, it's possible to point to a local file instead of t
const formContext = executionContext.getFormContext(),
id = formContext.data.entity.getId(),
quote = await QuoteService.retrieveClone(id),
quote.name = `Copy - ${quote.name}`,
validation = await QuoteService.validateRecord(quote);
if (validation.isValid) {
try {
Expand Down
2 changes: 1 addition & 1 deletion bin/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bin/root/deploy/deploy.js

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions bin/root/src/util/FormUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,15 @@ export class FormUtil {
control.addCustomView(viewId, defaultView.returnedtypecode, defaultView.name, firstChild.outerHTML, defaultView.layoutxml, true);
}
}

static setDisabled(executionContext: Xrm.Events.EventContext, disabled: boolean, attributeNames: string[]): void {
const formContext = executionContext.getFormContext();

attributeNames.forEach((fieldname: string) => {
const formControl: Xrm.Controls.StandardControl = formContext.getControl(fieldname);
if (formControl) {
formControl.setDisabled(disabled);
}
});
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hso/d365-cli",
"version": "1.1.2",
"version": "1.2.0",
"author": "HSO Innovation <[email protected]> (http://www.hso.com)",
"description": "HSO D365 Command Line Interface",
"repository": {
Expand Down
1 change: 1 addition & 0 deletions src/Entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export class Entity {
const webpackConfigFile = shell.ls('webpack.config.js')[0];
// eslint-disable-next-line max-len
shell.sed('-i', 'entry: {', `entry: {\n ${entityname}: [\n path.resolve(__dirname, "src/${entityname}/${entityname}.ts")\n ],`, webpackConfigFile);
shell.exec('git add webpack.config.js');
console.log('Adding D365 Entity done');
}
}
1 change: 1 addition & 0 deletions src/LicenseValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class LicenseValidator {
const webpackConfigFile = shell.ls('webpack.config.js')[0];
// eslint-disable-next-line max-len
shell.sed('-i', 'entry: {', `entry: {\n LicenseValidator: [\n path.resolve(__dirname, "src/License/Validator.ts")\n ],`, webpackConfigFile);
shell.exec('git add webpack.config.js');
console.log('Adding D365 License Validator done');
}
}
2 changes: 1 addition & 1 deletion src/Update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class Update {
console.log(`Updating util...`);
shell.cp('-R', `${__dirname}/root/src/util`, './src');
shell.exec('git add src/util/Base64.ts');
shell.exec('git add src/util/ModelValidator.ts');
shell.exec('git add src/util/FormUtil.ts');

console.log(`Updating Annotation...`);
shell.cp('-R', `${__dirname}/root/src/Annotation`, './src');
Expand Down
1 change: 1 addition & 0 deletions src/Webresource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export class Webresource {
extension = template === 'React' ? 'tsx' : 'ts';
// eslint-disable-next-line max-len
shell.sed('-i', 'entry: {', `entry: {\n ${webresourcename}: [\n path.resolve(__dirname, "src/${webresourcename}/${webresourcename}.${extension}")\n ],`, webpackConfigFile);
shell.exec('git add webpack.config.js');
console.log('Adding D365 Webresource done');
}
}
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {Update} from './update';
import {Generator} from './Generator';

program
.version('1.1.2') // .version(require('../package').version)
.version('1.2.0') // .version(require('../package').version)
.usage('<command> [options]');

program
Expand Down
2 changes: 0 additions & 2 deletions src/root/deploy/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ class App {
private mountTokenRoute(router: Router): void {
router.get('/token/:token', (req: Request, res: Response): void => {
this.bearer = req.params.token;
console.log(`Bearer: ${this.bearer}`);
res.redirect('/deploy');
});
}
Expand Down Expand Up @@ -163,7 +162,6 @@ class App {
private async deployFile(path: string, messenger: Function): Promise<void> {
return new Promise((resolve): void => {
fs.readFile(path, async (err: Error, data: Buffer) => {
console.log(`Using Bearer: ${this.bearer}`);
const crmPath = path.substr(5),
webresource = await this.getWebresource(crmPath);
messenger(`${crmPath}`);
Expand Down

0 comments on commit f75a305

Please sign in to comment.