Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build, package, test, lint, serve all working - beta9
- Loading branch information
1 parent
cce16ae
commit 14e33a1
Showing
35 changed files
with
582 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { ITestingSettings } from "../../test/settings.js"; | ||
import { SPFetchClient, MsalFetchClient, AdalFetchClient } from "@pnp/nodejs"; | ||
import { sp } from "@pnp/sp"; | ||
import { graph } from "@pnp/graph"; | ||
|
||
export async function spSetup(settings: ITestingSettings): Promise<void> { | ||
|
||
// if we have an msal section, use that one | ||
if (settings.testing.sp.msal) { | ||
sp.setup({ | ||
sp: { | ||
baseUrl: settings.testing.sp.url, | ||
fetchClientFactory: () => { | ||
return new MsalFetchClient(settings.testing.sp.msal.init, settings.testing.sp.msal.scopes); | ||
}, | ||
}, | ||
}); | ||
|
||
} else { | ||
// configure your node options | ||
sp.setup({ | ||
sp: { | ||
fetchClientFactory: () => { | ||
return new SPFetchClient(settings.testing.sp.url, settings.testing.sp.id, settings.testing.sp.secret); | ||
}, | ||
}, | ||
}); | ||
} | ||
} | ||
|
||
export async function graphSetup(settings: ITestingSettings): Promise<void> { | ||
|
||
// if we have an msal section, use that one | ||
if (settings.testing.graph.msal) { | ||
graph.setup({ | ||
graph: { | ||
fetchClientFactory: () => { | ||
return new MsalFetchClient(settings.testing.graph.msal.init, settings.testing.graph.msal.scopes); | ||
}, | ||
}, | ||
}); | ||
|
||
} else { | ||
// configure your node options | ||
graph.setup({ | ||
graph: { | ||
fetchClientFactory: () => { | ||
return new AdalFetchClient(settings.testing.graph.tenant, settings.testing.graph.id, settings.testing.graph.secret); | ||
}, | ||
}, | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,14 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"target": "es2015", | ||
"module": "commonjs", | ||
"baseUrl": ".", | ||
"rootDir": "../../", | ||
"outDir": "../../serve/", | ||
"declaration": true, | ||
"declarationMap": true, | ||
"types": [ | ||
"sharepoint" | ||
], | ||
"lib": [ | ||
"es6", | ||
"dom" | ||
], | ||
"paths": { | ||
"@pnp/*": [ | ||
"../../packages/*" | ||
] | ||
}, | ||
"forceConsistentCasingInFileNames": true, | ||
"moduleResolution": "node", | ||
"inlineSources": true, | ||
"sourceMap": true, | ||
"skipDefaultLibCheck": true, | ||
"skipLibCheck": true, | ||
"experimentalDecorators": true | ||
"outDir": "../../build/server/", | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"composite": false, | ||
"incremental": true, | ||
}, | ||
"files": [ | ||
"./main.ts" | ||
"include": [ | ||
"./**/*.ts", | ||
"../../packages/**/*.ts" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.