Added npmrc and container

This commit is contained in:
Hugo Bernier 2023-10-25 20:38:00 -04:00
parent 0a16498b4f
commit 6fb288bd1c
9 changed files with 12107 additions and 12248 deletions

View File

@ -1,8 +0,0 @@
{
"@microsoft/generator-sharepoint": {
"plusBeta": true,
"isCreatingSolution": true,
"environment": "spo",
"whichFolder": "subdir"
}
}

View File

@ -1,6 +0,0 @@
{
"name": "samples",
"lockfileVersion": 2,
"requires": true,
"packages": {}
}

View File

@ -0,0 +1,39 @@
// For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer
{
"name": "SPFx 1.18.0",
"image": "docker.io/m365pnp/spfx:1.18.0",
// Set *default* container specific settings.json values on container create.
"settings": {},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"editorconfig.editorconfig",
"dbaeumer.vscode-eslint"
],
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [
4321,
35729
],
"portsAttributes": {
"4321": {
"protocol": "https",
"label": "Manifest",
"onAutoForward": "silent",
"requireLocalPort": true
},
// Not needed for SPFx>= 1.12.1
// "5432": {
// "protocol": "https",
// "label": "Workbench",
// "onAutoForward": "silent"
// },
"35729": {
"protocol": "https",
"label": "LiveReload",
"onAutoForward": "silent",
"requireLocalPort": true
}
},
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
"remoteUser": "node"
}

View File

@ -0,0 +1,33 @@
echo
echo -e "\e[1;94mInstalling Node dependencies\e[0m"
npm install
## commands to create dev certificate and copy it to the root folder of the project
echo
echo -e "\e[1;94mGenerating dev certificate\e[0m"
gulp trust-dev-cert
# Convert the generated PEM certificate to a CER certificate
openssl x509 -inform PEM -in ~/.rushstack/rushstack-serve.pem -outform DER -out ./spfx-dev-cert.cer
# Copy the PEM ecrtificate for non-Windows hosts
cp ~/.rushstack/rushstack-serve.pem ./spfx-dev-cert.pem
## add *.cer to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.cer' ./.gitignore
then
echo "# .CER Certificates" >> .gitignore
echo "*.cer" >> .gitignore
fi
## add *.pem to .gitignore to prevent certificates from being saved in repo
if ! grep -Fxq '*.pem' ./.gitignore
then
echo "# .PEM Certificates" >> .gitignore
echo "*.pem" >> .gitignore
fi
echo
echo -e "\e[1;92mReady!\e[0m"
echo -e "\n\e[1;94m**********\nOptional: if you plan on using gulp serve, don't forget to add the container certificate to your local machine. Please visit https://aka.ms/spfx-devcontainer for more information\n**********"

View File

@ -0,0 +1 @@
v16.13.0

View File

@ -1,12 +1,12 @@
# List view command set extensions # Copy Path and Copy Name List view command set extensions
## Summary ## Summary
List view command set extensions with below functionalities List view command set extensions with below functionalities
1. Copy Path allows to copy the path of the document without breaking the permission inheritence.
2. Copy Name allows to copy the name of the document without using the currently available rename functionality.
![Copy Path & Copy Name Extenstions](assets/CopyPathCopyNameExtenstions.png)
1. Copy Path allows to copy the path of the document without breaking the permission inheritance.
2. Copy Name allows to copy the name of the document without using the currently available rename functionality.
![Copy Path & Copy Name Extensions](assets/CopyPathCopyNameExtenstions.png)
## Compatibility ## Compatibility
@ -36,6 +36,7 @@ For more information about SPFx compatibility, please refer to <https://aka.ms/s
> Get your own free development tenant by subscribing to [Microsoft 365 developer program](http://aka.ms/m365devprogram) > Get your own free development tenant by subscribing to [Microsoft 365 developer program](http://aka.ms/m365devprogram)
## Prerequisites ## Prerequisites
N/A N/A
## Contributors ## Contributors
@ -48,6 +49,22 @@ N/A
| ------- | ----------------- | --------------- | | ------- | ----------------- | --------------- |
| 1.0 | Oct 22, 2023 | Initial release | | 1.0 | Oct 22, 2023 | Initial release |
## Help
We do not support samples, but this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.
If you're having issues building the solution, please run [spfx doctor](https://pnp.github.io/cli-microsoft365/cmd/spfx/spfx-doctor/) from within the solution folder to diagnose incompatibility issues with your environment.
You can try looking at [issues related to this sample](https://github.com/pnp/sp-dev-fx-webparts/issues?q=label%3A%22sample%3A%20react-utility-extensions%22) to see if anybody else is having the same issues.
You can also try looking at [discussions related to this sample](https://github.com/pnp/sp-dev-fx-webparts/discussions?discussions_q=react-utility-extensions) and see what the community is saying.
If you encounter any issues using this sample, [create a new issue](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Abug-suspected%2Csample%3A%20react-utility-extensions&template=bug-report.yml&sample=react-utility-extensions&authors=@HarminderSethi&title=react-utility-extensions%20-%20).
For questions regarding this sample, [create a new question](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aquestion%2Csample%3A%20react-utility-extensions&template=question.yml&sample=react-utility-extensions&authors=@HarminderSethi&title=react-utility-extensions%20-%20).
Finally, if you have an idea for improvement, [make a suggestion](https://github.com/pnp/sp-dev-fx-webparts/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A%2Ctype%3Aenhancement%2Csample%3A%20react-utility-extensions&template=suggestion.yml&sample=react-utility-extensions&authors=@HarminderSethi&title=react-utility-extensions%20-%20).
## Disclaimer ## Disclaimer
**THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** **THIS CODE IS PROVIDED _AS IS_ WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.**

View File

@ -0,0 +1,60 @@
[
{
"name": "pnp-sp-dev-spfx-extensions-react-utility-extensions",
"source": "pnp",
"title": "Copy Path and Copy Name List view command set extensions",
"shortDescription": "List view command set extensions with below functionalities: Copy Path and Copy Name.",
"url": "https://github.com/pnp/sp-dev-fx-extensions/tree/main/samples/react-utility-extensions",
"longDescription": [
"List view command set extensions with below functionalities:",
"1. Copy Path allows to copy the path of the document without breaking the permission inheritance.",
"2. Copy Name allows to copy the name of the document without using the currently available rename functionality."
],
"creationDateTime": "2023-10-04",
"updateDateTime": "2023-10-04",
"products": [
"SharePoint"
],
"metadata": [
{
"key": "CLIENT-SIDE-DEV",
"value": "React"
},
{
"key": "SPFX-VERSION",
"value": "1.18.0"
}
],
"tags": [],
"categories": [
"SPFX-COMMAND-EXTENSION"
],
"thumbnails": [
{
"type": "image",
"order": 100,
"url": "https://github.com/pnp/sp-dev-fx-extensions/raw/main/samples/react-utility-extensions/assets/CopyPathCopyNameExtenstions.png",
"alt": "Preview"
}
],
"authors": [
{
"gitHubAccount": "HarminderSethi",
"pictureUrl": "https://github.com/HarminderSethi.png",
"name": "Harminder Singh"
}
],
"references": [
{
"name": "Overview of SharePoint Framework Extensions",
"description": "You can use SharePoint Framework (SPFx) Extensions to extend the SharePoint user experience. With SPFx Extensions, you can customize more facets of the SharePoint experience, including notification areas, toolbars, and list data views. SPFx Extensions are available in all Microsoft 365 subscriptions for production usage.",
"url": "https://docs.microsoft.com/sharepoint/dev/spfx/extensions/overview-extensions?WT.mc_id=m365-15741-cxa"
},
{
"name": "Use page placeholders from Application Customizer",
"description": "Application Customizers provide access to well-known locations on SharePoint pages that you can modify based on your business and functional requirements. For example, you can create dynamic header and footer experiences that render across all the pages in SharePoint Online.",
"url": "https://docs.microsoft.com/sharepoint/dev/spfx/extensions/get-started/using-page-placeholder-with-extensions?WT.mc_id=m365-15741-cxa"
}
]
}
]

View File

@ -1,277 +0,0 @@
# Upgrade project react-utilityFunctions to v1.18.0
Date: 10/22/2023
## Findings
Following is the list of steps required to upgrade your project to SharePoint Framework version 1.18.0. [Summary](#Summary) of the modifications is included at the end of the report.
### FN001001 @microsoft/sp-core-library | Required
Upgrade SharePoint Framework dependency package @microsoft/sp-core-library
Execute the following command:
```sh
npm i -SE @microsoft/sp-core-library@1.18.0
```
File: [./package.json:18:5](./package.json)
### FN001011 @microsoft/sp-dialog | Required
Upgrade SharePoint Framework dependency package @microsoft/sp-dialog
Execute the following command:
```sh
npm i -SE @microsoft/sp-dialog@1.18.0
```
File: [./package.json:19:5](./package.json)
### FN001014 @microsoft/sp-listview-extensibility | Required
Upgrade SharePoint Framework dependency package @microsoft/sp-listview-extensibility
Execute the following command:
```sh
npm i -SE @microsoft/sp-listview-extensibility@1.18.0
```
File: [./package.json:20:5](./package.json)
### FN001035 @fluentui/react | Required
Install SharePoint Framework dependency package @fluentui/react
Execute the following command:
```sh
npm i -SE @fluentui/react@8.106.4
```
File: [./package.json:15:3](./package.json)
### FN001013 @microsoft/decorators | Required
Upgrade SharePoint Framework dependency package @microsoft/decorators
Execute the following command:
```sh
npm i -SE @microsoft/decorators@1.18.0
```
File: [./package.json:17:5](./package.json)
### FN001034 @microsoft/sp-adaptive-card-extension-base | Optional
Install SharePoint Framework dependency package @microsoft/sp-adaptive-card-extension-base
Execute the following command:
```sh
npm i -SE @microsoft/sp-adaptive-card-extension-base@1.18.0
```
File: [./package.json:15:3](./package.json)
### FN002001 @microsoft/sp-build-web | Required
Upgrade SharePoint Framework dev dependency package @microsoft/sp-build-web
Execute the following command:
```sh
npm i -DE @microsoft/sp-build-web@1.18.0
```
File: [./package.json:29:5](./package.json)
### FN002002 @microsoft/sp-module-interfaces | Required
Upgrade SharePoint Framework dev dependency package @microsoft/sp-module-interfaces
Execute the following command:
```sh
npm i -DE @microsoft/sp-module-interfaces@1.18.0
```
File: [./package.json:30:5](./package.json)
### FN002022 @microsoft/eslint-plugin-spfx | Required
Upgrade SharePoint Framework dev dependency package @microsoft/eslint-plugin-spfx
Execute the following command:
```sh
npm i -DE @microsoft/eslint-plugin-spfx@1.18.0
```
File: [./package.json:27:5](./package.json)
### FN002023 @microsoft/eslint-config-spfx | Required
Upgrade SharePoint Framework dev dependency package @microsoft/eslint-config-spfx
Execute the following command:
```sh
npm i -DE @microsoft/eslint-config-spfx@1.18.0
```
File: [./package.json:26:5](./package.json)
### FN002026 typescript | Required
Upgrade SharePoint Framework dev dependency package typescript
Execute the following command:
```sh
npm i -DE typescript@4.7.4
```
File: [./package.json:38:5](./package.json)
### FN002028 @microsoft/rush-stack-compiler-4.7 | Required
Install SharePoint Framework dev dependency package @microsoft/rush-stack-compiler-4.7
Execute the following command:
```sh
npm i -DE @microsoft/rush-stack-compiler-4.7@0.1.0
```
File: [./package.json:25:3](./package.json)
### FN010001 .yo-rc.json version | Recommended
Update version in .yo-rc.json
```json
{
"@microsoft/generator-sharepoint": {
"version": "1.18.0"
}
}
```
File: [./.yo-rc.json:10:5](./.yo-rc.json)
### FN010010 .yo-rc.json @microsoft/teams-js SDK version | Recommended
Update @microsoft/teams-js SDK version in .yo-rc.json
```json
{
"@microsoft/generator-sharepoint": {
"sdkVersions": {
"@microsoft/teams-js": "2.12.0"
}
}
}
```
File: [./.yo-rc.json:2:3](./.yo-rc.json)
### FN012017 tsconfig.json extends property | Required
Update tsconfig.json extends property
```json
{
"extends": "./node_modules/@microsoft/rush-stack-compiler-4.7/includes/tsconfig-web.json"
}
```
File: [./tsconfig.json:2:3](./tsconfig.json)
### FN021003 package.json engines.node | Required
Update package.json engines.node property
```json
{
"engines": {
"node": ">=16.13.0 <17.0.0 || >=18.17.1 <19.0.0"
}
}
```
File: [./package.json:6:5](./package.json)
### FN017001 Run npm dedupe | Optional
If, after upgrading npm packages, when building the project you have errors similar to: "error TS2345: Argument of type 'SPHttpClientConfiguration' is not assignable to parameter of type 'SPHttpClientConfiguration'", try running 'npm dedupe' to cleanup npm packages.
Execute the following command:
```sh
npm dedupe
```
File: [./package.json](./package.json)
## Summary
### Execute script
```sh
npm i -SE @microsoft/sp-core-library@1.18.0 @microsoft/sp-dialog@1.18.0 @microsoft/sp-listview-extensibility@1.18.0 @fluentui/react@8.106.4 @microsoft/decorators@1.18.0 @microsoft/sp-adaptive-card-extension-base@1.18.0
npm i -DE @microsoft/sp-build-web@1.18.0 @microsoft/sp-module-interfaces@1.18.0 @microsoft/eslint-plugin-spfx@1.18.0 @microsoft/eslint-config-spfx@1.18.0 typescript@4.7.4 @microsoft/rush-stack-compiler-4.7@0.1.0
npm dedupe
```
### Modify files
#### [./.yo-rc.json](./.yo-rc.json)
Update version in .yo-rc.json:
```json
{
"@microsoft/generator-sharepoint": {
"version": "1.18.0"
}
}
```
Update @microsoft/teams-js SDK version in .yo-rc.json:
```json
{
"@microsoft/generator-sharepoint": {
"sdkVersions": {
"@microsoft/teams-js": "2.12.0"
}
}
}
```
#### [./tsconfig.json](./tsconfig.json)
Update tsconfig.json extends property:
```json
{
"extends": "./node_modules/@microsoft/rush-stack-compiler-4.7/includes/tsconfig-web.json"
}
```
#### [./package.json](./package.json)
Update package.json engines.node property:
```json
{
"engines": {
"node": ">=16.13.0 <17.0.0 || >=18.17.1 <19.0.0"
}
}
```

File diff suppressed because it is too large Load Diff