wassim-k / sp-entity Goto Github PK
View Code? Open in Web Editor NEWGenerate strongly-typed models from SharePoint lists in TypeScript
License: MIT License
Generate strongly-typed models from SharePoint lists in TypeScript
License: MIT License
When performing the REST api requests, the response returns the default language that is configured on the SharePoint site.
In some languages, diacritics prevent to generate a correct name for the entity fields.
For instance, on a site French, "Créé" results in "cr", "Modifié Par" results in "modifiPar" etc.
I think there are 2 options :
Either use the internal name of the field to generate the entities
Or remove the diacritics, here is a suggestion on how to do it (in TextUtil.ts)
public static camelCase(text: string): string {
text = this.removeDiacritics(text);
text = this.removeNonWordChars(text);
return camelCase(text);
}
public static removeDiacritics(text: string): string {
return text.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
}
The CLI tool does not support company proxy, thus it blocks all requests made to SharePoint API.
A suggestion would be to implement a custom implementation of NodeFetchClient by retrieving the proxy settings from the environment then use an http proxy agent. The may are better options though.
This would be something like :
export class NodeFetchClientWithProxy extends NodeFetchClient {
constructor(parameters: IAuthOptions) {
super(parameters);
}
public fetch(url: string, options: FetchOptions): Promise<any> {
const optionsWithProxyAgent: any = options;
if (process.env.HTTPS_PROXY || process.env.HTTP_PROXY) {
optionsWithProxyAgent.agent = new ProxyAgent(process.env.HTTPS_PROXY || process.env.HTTP_PROXY);
}
return super.fetch(url, optionsWithProxyAgent || options);
}
}
Hi,
Is it possible to use it with Angular 6 app? Or it's strictly bound to SpFx framework?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.