Skip to content

Commit

Permalink
fix: fixed bundled types
Browse files Browse the repository at this point in the history
  • Loading branch information
BetimBeja committed Feb 11, 2023
1 parent 61f1ca1 commit 8552ffd
Show file tree
Hide file tree
Showing 6 changed files with 6,106 additions and 12,905 deletions.
18,979 changes: 6,092 additions & 12,887 deletions ComponentFramework-Mock/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ComponentFramework-Mock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
},
"dependencies": {
"@shko.online/dataverse-odata": "^0.1.0",
"@shko.online/dataverse-odata": "^0.1.3",
"@types/lokijs": "^1.5.7",
"@types/powerapps-component-framework": "^1.3.4",
"@types/sinon": "^10.0.13",
Expand Down
20 changes: 10 additions & 10 deletions ComponentFramework-Mock/src/ComponentFramework-Mock/WebApi.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import type { SinonStub } from 'sinon';

import { stub } from 'sinon';
import { parseOData } from '@shko.online/dataverse-odata'
import { parseOData } from '@shko.online/dataverse-odata';
import { MetadataDB } from '../ComponentFramework-Mock-Generator';

export class WebApiMock implements ComponentFramework.WebApi {
Expand Down Expand Up @@ -83,15 +83,15 @@ export class WebApiMock implements ComponentFramework.WebApi {
message: `Could not find record with id: '${id}' for entity: '${entityType}'.`,
});
}
if(options){
var parsed = parseOData(options);
if(parsed.$select){
const oldRow = result.row;
result.row = {};
parsed.$select.forEach(attribute=>{
result.row[attribute] = oldRow[attribute];
})
}
if (options) {
var parsed = parseOData(options);
if (parsed.$select) {
const oldRow = result.row;
result.row = {};
parsed.$select.forEach((attribute) => {
result.row[attribute] = oldRow[attribute];
});
}
}
resolve(result.row);
}, this._Delay);
Expand Down
3 changes: 0 additions & 3 deletions ComponentFramework-Mock/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ Copyright (c) 2022 Betim Beja and Shko Online LLC
Licensed under the MIT license.
*/

/// <reference types="powerapps-component-framework" />
/// <reference path="./global.d.ts" />

export type { MockToRaw, PropertyMap, PropertyToMock } from './ComponentFramework-Mock';
export type { MockGenerator } from './ComponentFramework-Mock-Generator';
export type { ShkoOnline } from './ShkoOnline';
Expand Down
5 changes: 1 addition & 4 deletions ComponentFramework-Mock/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@
"@shko.online/componentframework-mock*": [
"./src*"
]
},
"typeRoots": [
"./node_modules/@types"
]
}
},
"exclude": [
"node_modules",
Expand Down
2 changes: 2 additions & 0 deletions scripts/tscfy.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ async function tscfy(options = {}) {
await run({ watch, command, silent, errorCallback });
}

await execa.command('npx copyfiles -u 1 src/**/*.d.ts lib/ts3.9')

if (!watch) {
await execa.command('npx downlevel-dts lib/ts3.9 lib/ts3.4');
}
Expand Down

0 comments on commit 8552ffd

Please sign in to comment.