diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 00000000..d07c4e4e
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,7 @@
+{
+ "printWidth": 100,
+ "tabWidth": 2,
+ "semi": true,
+ "singleQuote": true,
+ "trailingComma": "none"
+}
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
index f3fda475..1f6fc4b7 100644
--- a/.vscode/extensions.json
+++ b/.vscode/extensions.json
@@ -1,5 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
- "recommendations": ["eliostruyf.vscode-typescript-exportallmodules"]
+ "recommendations": ["eliostruyf.vscode-typescript-exportallmodules", "esbenp.prettier-vscode"]
}
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7d5ebb4b..1e6fdd80 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -25,9 +25,9 @@ Eager to start contributing? Great 🤩, you can contribute to the following pro
- Start by forking this project;
- Clone your fork to your local machine;
-- Run `npm i`;
+- Run `pnpm i`;
- Open the project in VS Code;
-- To start developing, run `npm run dev:ext` and press `f5` to start the debugging session.
+- To start developing, run `pnpm dev:ext` and press `f5` to start the debugging session.
### Tips
diff --git a/README.md b/README.md
index b02a9877..b95d21e3 100644
--- a/README.md
+++ b/README.md
@@ -12,7 +12,7 @@
-
+
@@ -115,7 +115,7 @@ You can get the extension via:
If you have the courage to test out the beta features, we made available a beta version as well. You can install this via:
- Uninstall the main Front Matter version
-- Install the beta version
+- Install the beta version
- VS Code marketplace: [VS Code Marketplace - Front Matter BETA](https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta).
- The extension CLI: `ext install eliostruyf.vscode-front-matter-beta`
- Or by clicking on the following link: open extension in VS Code
@@ -200,4 +200,4 @@ You can open showcase issues for the following things:
-
\ No newline at end of file
+
diff --git a/e2e/src/runTests.ts b/e2e/src/runTests.ts
index bb1e755d..99a69824 100644
--- a/e2e/src/runTests.ts
+++ b/e2e/src/runTests.ts
@@ -1,33 +1,33 @@
-import * as path from 'path';
-import * as semver from "semver";
-import { ExTester, ReleaseQuality } from "vscode-extension-tester";
-
+import * as path from 'path'
+import * as semver from 'semver'
+import { ExTester, ReleaseQuality } from 'vscode-extension-tester'
async function main(): Promise {
- const vsCodeVersion: semver.SemVer = new semver.SemVer(`1.66.0`);
- const version = vsCodeVersion.version;
+ const vsCodeVersion: semver.SemVer = new semver.SemVer(`1.66.0`)
+ const version = vsCodeVersion.version
- const storageFolder = path.join(__dirname, "..", "storage");
- const extFolder = path.join(__dirname, "..", "extensions");
+ const storageFolder = path.join(__dirname, '..', 'storage')
+ const extFolder = path.join(__dirname, '..', 'extensions')
try {
- const testPath = path.join(__dirname, "command.test.js");
+ const testPath = path.join(__dirname, 'command.test.js')
- const exTester = new ExTester(storageFolder, ReleaseQuality.Stable, extFolder);
- await exTester.downloadCode(version);
- await exTester.installVsix({ useYarn: false });
+ const exTester = new ExTester(storageFolder, ReleaseQuality.Stable, extFolder)
+ await exTester.downloadCode(version)
+ await exTester.installVsix({ useYarn: false })
// await exTester.installFromMarketplace("eliostruyf.vscode-front-matter");
- await exTester.downloadChromeDriver(version);
+ await exTester.downloadChromeDriver(version)
// await exTester.setupRequirements({vscodeVersion: version});
const result = await exTester.runTests(testPath, {
- vscodeVersion: version
- });
+ vscodeVersion: version,
+ resources: [storageFolder],
+ })
- process.exit(result);
+ process.exit(result)
} catch (err) {
- console.log(err);
- process.exit(1);
+ console.log(err)
+ process.exit(1)
}
}
-main();
+main()
diff --git a/package.json b/package.json
index 724c6fe4..75360f06 100644
--- a/package.json
+++ b/package.json
@@ -2177,8 +2177,9 @@
"clean": "rimraf dist",
"start:site": "cd ./docs && npm run dev",
"clean:test": "rm ./e2e/sample/frontmatter.json || exit 0 && rm -rf ./e2e/sample/.frontmatter || exit 0",
- "test": "tsc -p tsconfig.e2e.json && npm run clean:test && pnpm i -g @vscode/vsce && node ./e2e/out/runTests.js",
- "lint": "eslint --max-warnings=0 ./src/{commands,components}"
+ "test": "pnpm lint; tsc -p tsconfig.e2e.json && npm run clean:test && pnpm i -g @vscode/vsce && node ./e2e/out/runTests.js",
+ "lint": "eslint --max-warnings=0 ./src/{commands,components}",
+ "prettier": "prettier --write ./src"
},
"devDependencies": {
"@actions/core": "^1.8.2",
@@ -2247,6 +2248,8 @@
"postcss": "^8.3.6",
"postcss-loader": "4.3.0",
"postcss-nested": "^5.0.6",
+ "prettier": "^2.8.3",
+ "prettier-plugin-tailwindcss": "^0.2.2",
"react": "17.0.1",
"react-datepicker": "4.2.1",
"react-dom": "17.0.1",
@@ -2263,14 +2266,14 @@
"style-loader": "2.0.0",
"tailwindcss": "^2.2.7",
"tailwindcss-nested-groups": "^1.2.4",
- "ts-loader": "8.0.3",
- "typescript": "4.5.5",
+ "ts-loader": "^9.4.2",
+ "typescript": "^4.6.2",
"uniforms": "^3.7.0",
"uniforms-antd": "^3.7.0",
"uniforms-bridge-json-schema": "^3.7.0",
"uniforms-unstyled": "^3.7.0",
"url-join-ts": "^1.0.5",
- "vscode-extension-tester": "4.2.5",
+ "vscode-extension-tester": "^5.3.0",
"wc-react": "github:estruyf/wc-react",
"webpack": "^5.65.0",
"webpack-bundle-analyzer": "^4.5.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e135ddcf..afcfaade 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -67,6 +67,8 @@ specifiers:
postcss: ^8.3.6
postcss-loader: 4.3.0
postcss-nested: ^5.0.6
+ prettier: ^2.8.3
+ prettier-plugin-tailwindcss: ^0.2.2
react: 17.0.1
react-datepicker: 4.2.1
react-dom: 17.0.1
@@ -83,14 +85,14 @@ specifiers:
style-loader: 2.0.0
tailwindcss: ^2.2.7
tailwindcss-nested-groups: ^1.2.4
- ts-loader: 8.0.3
- typescript: 4.5.5
+ ts-loader: ^9.4.2
+ typescript: ^4.6.2
uniforms: ^3.7.0
uniforms-antd: ^3.7.0
uniforms-bridge-json-schema: ^3.7.0
uniforms-unstyled: ^3.7.0
url-join-ts: ^1.0.5
- vscode-extension-tester: 4.2.5
+ vscode-extension-tester: ^5.3.0
wc-react: github:estruyf/wc-react
webpack: ^5.65.0
webpack-bundle-analyzer: ^4.5.0
@@ -128,8 +130,8 @@ devDependencies:
'@types/react-datepicker': 4.8.0_w7o5yyljkiidx2s2nzb26ottzu
'@types/react-dom': 17.0.0
'@types/vscode': 1.74.0
- '@typescript-eslint/eslint-plugin': 5.50.0_463slnisjmie3ga6nht6iq5g4u
- '@typescript-eslint/parser': 5.50.0_gpshh2li6qp2z6l6wwjxu2emgi
+ '@typescript-eslint/eslint-plugin': 5.50.0_go4drrxstycfikanvu45pi4vgq
+ '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64
'@vscode/codicons': 0.0.20
'@vscode/extension-telemetry': 0.4.10
'@vscode/webview-ui-toolkit': 0.9.3_react@17.0.1
@@ -166,6 +168,8 @@ devDependencies:
postcss: 8.4.21
postcss-loader: 4.3.0_6jdsrmfenkuhhw3gx4zvjlznce
postcss-nested: 5.0.6_postcss@8.4.21
+ prettier: 2.8.3
+ prettier-plugin-tailwindcss: 0.2.2_prettier@2.8.3
react: 17.0.1
react-datepicker: 4.2.1_w7o5yyljkiidx2s2nzb26ottzu
react-dom: 17.0.1_react@17.0.1
@@ -182,14 +186,14 @@ devDependencies:
style-loader: 2.0.0_webpack@5.75.0
tailwindcss: 2.2.19_4xaawq3hrlasat64u2hch2fhdy
tailwindcss-nested-groups: 1.2.4_tailwindcss@2.2.19
- ts-loader: 8.0.3_typescript@4.5.5
- typescript: 4.5.5
+ ts-loader: 9.4.2_hhrrucqyg4eysmfpujvov2ym5u
+ typescript: 4.9.5
uniforms: 3.10.2_react@17.0.1
uniforms-antd: 3.10.2_pmcwetab3euy6ubdu5x4dhisee
uniforms-bridge-json-schema: 3.10.2_react@17.0.1
uniforms-unstyled: 3.10.2_react@17.0.1
url-join-ts: 1.0.5
- vscode-extension-tester: 4.2.5_rgw4eiitjdvgxwfnqqw3bex6ee
+ vscode-extension-tester: 5.3.0_4r5rv57huad4ctfiz6vn747ruu
wc-react: github.com/estruyf/wc-react/0989e37af55d3ee97392bf2747a818e4873243fa
webpack: 5.75.0_webpack-cli@4.10.0
webpack-bundle-analyzer: 4.7.0
@@ -937,8 +941,10 @@ packages:
resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==}
dev: true
- /@types/selenium-webdriver/3.0.20:
- resolution: {integrity: sha512-6d8Q5fqS9DWOXEhMDiF6/2FjyHdmP/jSTAUyeQR7QwrFeNmYyzmvGxD5aLIHL445HjWgibs0eAig+KPnbaesXA==}
+ /@types/selenium-webdriver/4.1.10:
+ resolution: {integrity: sha512-o6ARpkBI8J0b+jhLjXF46rYc8Vsb5CLrRetyA3V3qUPVDwNjPDyHZsZOCFSXH0KPZ6lIn2BfP1xVEPnO+AQy5w==}
+ dependencies:
+ '@types/ws': 8.5.4
dev: true
/@types/semver/7.3.13:
@@ -1015,7 +1021,7 @@ packages:
'@types/node': 10.17.48
dev: true
- /@typescript-eslint/eslint-plugin/5.50.0_463slnisjmie3ga6nht6iq5g4u:
+ /@typescript-eslint/eslint-plugin/5.50.0_go4drrxstycfikanvu45pi4vgq:
resolution: {integrity: sha512-vwksQWSFZiUhgq3Kv7o1Jcj0DUNylwnIlGvKvLLYsq8pAWha6/WCnXUeaSoNNha/K7QSf2+jvmkxggC1u3pIwQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -1026,10 +1032,10 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/parser': 5.50.0_gpshh2li6qp2z6l6wwjxu2emgi
+ '@typescript-eslint/parser': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64
'@typescript-eslint/scope-manager': 5.50.0
- '@typescript-eslint/type-utils': 5.50.0_gpshh2li6qp2z6l6wwjxu2emgi
- '@typescript-eslint/utils': 5.50.0_gpshh2li6qp2z6l6wwjxu2emgi
+ '@typescript-eslint/type-utils': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64
+ '@typescript-eslint/utils': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64
debug: 4.3.4
eslint: 8.33.0
grapheme-splitter: 1.0.4
@@ -1037,13 +1043,13 @@ packages:
natural-compare-lite: 1.4.0
regexpp: 3.2.0
semver: 7.3.8
- tsutils: 3.21.0_typescript@4.5.5
- typescript: 4.5.5
+ tsutils: 3.21.0_typescript@4.9.5
+ typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/parser/5.50.0_gpshh2li6qp2z6l6wwjxu2emgi:
+ /@typescript-eslint/parser/5.50.0_4vsywjlpuriuw3tl5oq6zy5a64:
resolution: {integrity: sha512-KCcSyNaogUDftK2G9RXfQyOCt51uB5yqC6pkUYqhYh8Kgt+DwR5M0EwEAxGPy/+DH6hnmKeGsNhiZRQxjH71uQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -1055,10 +1061,10 @@ packages:
dependencies:
'@typescript-eslint/scope-manager': 5.50.0
'@typescript-eslint/types': 5.50.0
- '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.5.5
+ '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.9.5
debug: 4.3.4
eslint: 8.33.0
- typescript: 4.5.5
+ typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
@@ -1071,7 +1077,7 @@ packages:
'@typescript-eslint/visitor-keys': 5.50.0
dev: true
- /@typescript-eslint/type-utils/5.50.0_gpshh2li6qp2z6l6wwjxu2emgi:
+ /@typescript-eslint/type-utils/5.50.0_4vsywjlpuriuw3tl5oq6zy5a64:
resolution: {integrity: sha512-dcnXfZ6OGrNCO7E5UY/i0ktHb7Yx1fV6fnQGGrlnfDhilcs6n19eIRcvLBqx6OQkrPaFlDPk3OJ0WlzQfrV0bQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -1081,12 +1087,12 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.5.5
- '@typescript-eslint/utils': 5.50.0_gpshh2li6qp2z6l6wwjxu2emgi
+ '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.9.5
+ '@typescript-eslint/utils': 5.50.0_4vsywjlpuriuw3tl5oq6zy5a64
debug: 4.3.4
eslint: 8.33.0
- tsutils: 3.21.0_typescript@4.5.5
- typescript: 4.5.5
+ tsutils: 3.21.0_typescript@4.9.5
+ typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
@@ -1096,7 +1102,7 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
- /@typescript-eslint/typescript-estree/5.50.0_typescript@4.5.5:
+ /@typescript-eslint/typescript-estree/5.50.0_typescript@4.9.5:
resolution: {integrity: sha512-Gq4zapso+OtIZlv8YNAStFtT6d05zyVCK7Fx3h5inlLBx2hWuc/0465C2mg/EQDDU2LKe52+/jN4f0g9bd+kow==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -1111,13 +1117,13 @@ packages:
globby: 11.1.0
is-glob: 4.0.3
semver: 7.3.8
- tsutils: 3.21.0_typescript@4.5.5
- typescript: 4.5.5
+ tsutils: 3.21.0_typescript@4.9.5
+ typescript: 4.9.5
transitivePeerDependencies:
- supports-color
dev: true
- /@typescript-eslint/utils/5.50.0_gpshh2li6qp2z6l6wwjxu2emgi:
+ /@typescript-eslint/utils/5.50.0_4vsywjlpuriuw3tl5oq6zy5a64:
resolution: {integrity: sha512-v/AnUFImmh8G4PH0NDkf6wA8hujNNcrwtecqW4vtQ1UOSNBaZl49zP1SHoZ/06e+UiwzHpgb5zP5+hwlYYWYAw==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
@@ -1127,7 +1133,7 @@ packages:
'@types/semver': 7.3.13
'@typescript-eslint/scope-manager': 5.50.0
'@typescript-eslint/types': 5.50.0
- '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.5.5
+ '@typescript-eslint/typescript-estree': 5.50.0_typescript@4.9.5
eslint: 8.33.0
eslint-scope: 5.1.1
eslint-utils: 3.0.0_eslint@8.33.0
@@ -1154,6 +1160,34 @@ packages:
engines: {vscode: ^1.60.0}
dev: true
+ /@vscode/vsce/2.17.0:
+ resolution: {integrity: sha512-W4HN5MtTVj/mroQU1d82bUEeWM3dUykMFnMYZPtZ6jrMiHN1PUoN3RGcS896N0r2rIq8KpWDtufcQHgK8VfgpA==}
+ engines: {node: '>= 14'}
+ hasBin: true
+ dependencies:
+ azure-devops-node-api: 11.2.0
+ chalk: 2.4.2
+ cheerio: 1.0.0-rc.12
+ commander: 6.2.1
+ glob: 7.2.0
+ hosted-git-info: 4.1.0
+ leven: 3.1.0
+ markdown-it: 12.3.2
+ mime: 1.6.0
+ minimatch: 3.1.2
+ parse-semver: 1.1.1
+ read: 1.0.7
+ semver: 5.7.1
+ tmp: 0.2.1
+ typed-rest-client: 1.8.9
+ url-join: 4.0.1
+ xml2js: 0.4.23
+ yauzl: 2.10.0
+ yazl: 2.5.1
+ optionalDependencies:
+ keytar: 7.9.0
+ dev: true
+
/@vscode/webview-ui-toolkit/0.9.3_react@17.0.1:
resolution: {integrity: sha512-uEEpTVA21zkHtWMR8TPT7vbIZ1+tvfhQPThEdmmDjh0PulKPvaAVNqnGbQitU3F9GVqpq2AdIKAq6N1jFeBoXg==}
peerDependencies:
@@ -1610,6 +1644,7 @@ packages:
/base64-js/1.5.1:
resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==}
dev: true
+ optional: true
/batch/0.6.1:
resolution: {integrity: sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==}
@@ -1649,6 +1684,7 @@ packages:
inherits: 2.0.4
readable-stream: 3.6.0
dev: true
+ optional: true
/body-parser/1.20.1:
resolution: {integrity: sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==}
@@ -1747,6 +1783,7 @@ packages:
base64-js: 1.5.1
ieee754: 1.2.1
dev: true
+ optional: true
/buffers/0.1.1:
resolution: {integrity: sha512-9q/rDEGSb/Qsvv2qvzIzdluL5k7AaJOTrw23z9reQthrbF7is4CtlT0DXyO1oei2DCp4uojjzQ7igaSHp1kAEQ==}
@@ -2018,6 +2055,11 @@ packages:
delayed-stream: 1.0.0
dev: true
+ /commander/10.0.0:
+ resolution: {integrity: sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA==}
+ engines: {node: '>=14'}
+ dev: true
+
/commander/2.20.3:
resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==}
dev: true
@@ -2042,8 +2084,8 @@ packages:
engines: {node: '>= 12'}
dev: true
- /compare-versions/3.6.0:
- resolution: {integrity: sha512-W6Af2Iw1z4CB7q4uU4hv646dW9GQuBM+YpC0UvUCWSD8w90SJjp+ujJuXaEMtAXBtSqGfMPuFOVn4/+FlaqfBA==}
+ /compare-versions/5.0.3:
+ resolution: {integrity: sha512-4UZlZP8Z99MGEY+Ovg/uJxJuvoXuN4M6B3hKaiackiHrgzQFEe3diJi1mf1PNHbFujM7FvLrK2bpgIaImbtZ1A==}
dev: true
/compressible/2.0.18:
@@ -2290,6 +2332,7 @@ packages:
resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==}
engines: {node: '>=4.0.0'}
dev: true
+ optional: true
/deep-is/0.1.4:
resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==}
@@ -2357,6 +2400,7 @@ packages:
resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==}
engines: {node: '>=8'}
dev: true
+ optional: true
/detect-node/2.1.0:
resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==}
@@ -2533,15 +2577,6 @@ packages:
once: 1.4.0
dev: true
- /enhanced-resolve/4.5.0:
- resolution: {integrity: sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg==}
- engines: {node: '>=6.9.0'}
- dependencies:
- graceful-fs: 4.2.10
- memory-fs: 0.5.0
- tapable: 1.1.3
- dev: true
-
/enhanced-resolve/5.12.0:
resolution: {integrity: sha512-QHTXI/sZQmko1cbDoNAa3mJ5qhWUUNAq3vR0/YiD379fWQrcfuoX1+HW2S0MTt7XmoPLapdaDKUtelUSPic7hQ==}
engines: {node: '>=10.13.0'}
@@ -2569,13 +2604,6 @@ packages:
hasBin: true
dev: true
- /errno/0.1.8:
- resolution: {integrity: sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==}
- hasBin: true
- dependencies:
- prr: 1.0.1
- dev: true
-
/error-ex/1.3.2:
resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==}
dependencies:
@@ -2848,6 +2876,7 @@ packages:
resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==}
engines: {node: '>=6'}
dev: true
+ optional: true
/express/4.18.2:
resolution: {integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==}
@@ -3071,6 +3100,15 @@ packages:
universalify: 2.0.0
dev: true
+ /fs-extra/11.1.0:
+ resolution: {integrity: sha512-0rcTq621PD5jM/e0a3EJoGC/1TC5ZBCERW82LQuwfGnCa1V8w7dpYH1yNu+SLb6E5dkeCBzKEyLGlFrnr+dUyw==}
+ engines: {node: '>=14.14'}
+ dependencies:
+ graceful-fs: 4.2.10
+ jsonfile: 6.1.0
+ universalify: 2.0.0
+ dev: true
+
/fs-monkey/1.0.3:
resolution: {integrity: sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q==}
dev: true
@@ -3157,6 +3195,7 @@ packages:
/github-from-package/0.0.0:
resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==}
dev: true
+ optional: true
/glob-parent/5.1.2:
resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==}
@@ -3198,6 +3237,17 @@ packages:
path-is-absolute: 1.0.1
dev: true
+ /glob/8.1.0:
+ resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==}
+ engines: {node: '>=12'}
+ dependencies:
+ fs.realpath: 1.0.0
+ inflight: 1.0.6
+ inherits: 2.0.4
+ minimatch: 5.0.1
+ once: 1.4.0
+ dev: true
+
/globals/13.20.0:
resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==}
engines: {node: '>=8'}
@@ -3359,8 +3409,9 @@ packages:
wbuf: 1.7.3
dev: true
- /hpagent/0.1.2:
- resolution: {integrity: sha512-ePqFXHtSQWAFXYmj+JtOTHr84iNrII4/QRlAAPPE+zqnKy4xJo7Ie1Y4kC7AdB+LxLxSTTzBMASsEcy0q8YyvQ==}
+ /hpagent/1.2.0:
+ resolution: {integrity: sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA==}
+ engines: {node: '>=14'}
dev: true
/hsl-regex/1.0.0:
@@ -3547,6 +3598,7 @@ packages:
/ieee754/1.2.1:
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
dev: true
+ optional: true
/ignore/5.2.4:
resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==}
@@ -3605,6 +3657,7 @@ packages:
/ini/1.3.8:
resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==}
dev: true
+ optional: true
/internal-slot/1.0.4:
resolution: {integrity: sha512-tA8URYccNzMo94s5MQZgH8NB/XTa6HsOo0MLfXTKKEnHVVdegzaQoFZ7Jp44bdvLvY2waT5dc+j5ICEswhi7UQ==}
@@ -3984,6 +4037,7 @@ packages:
node-addon-api: 4.3.0
prebuild-install: 7.1.1
dev: true
+ optional: true
/keyv/4.5.2:
resolution: {integrity: sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g==}
@@ -4214,14 +4268,6 @@ packages:
fs-monkey: 1.0.3
dev: true
- /memory-fs/0.5.0:
- resolution: {integrity: sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA==}
- engines: {node: '>=4.3.0 <5.0.0 || >=5.10'}
- dependencies:
- errno: 0.1.8
- readable-stream: 2.3.7
- dev: true
-
/memorystream/0.3.1:
resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==}
engines: {node: '>= 0.10.0'}
@@ -4482,6 +4528,7 @@ packages:
/mkdirp-classic/0.5.3:
resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==}
dev: true
+ optional: true
/mkdirp/0.5.6:
resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==}
@@ -4533,19 +4580,19 @@ packages:
resolution: {integrity: sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==}
dev: true
- /monaco-page-objects/1.9.2_nd7aufnafpcvjaepgzlwugj3oe:
- resolution: {integrity: sha512-1/JHv0ZwGnoWfq23IyP5PVLRq8NC0YXIoP6jG02R5Ev73hDznwJ3xTEVMzzpRPRGfMyVK4JNaA1aqax82jzaQA==}
+ /monaco-page-objects/3.3.0_mcttbz3hm275ldw6tl6gcvo6pq:
+ resolution: {integrity: sha512-BnyE3MYuKhcqqhkAdVWNDSS8wWaPSKPz9PDb2KovBqeTnzbiZ4R5SpupsupJe23Fg9QwKCXe06EcYU2ofwKyAA==}
peerDependencies:
- selenium-webdriver: ^3.0.0
+ selenium-webdriver: ^4.6.1
+ typescript: '>=4.6.2'
dependencies:
clipboardy: 2.3.0
clone-deep: 4.0.1
- compare-versions: 3.6.0
- fs-extra: 10.1.0
- selenium-webdriver: 3.6.0
- ts-essentials: 8.1.0_typescript@4.5.5
- transitivePeerDependencies:
- - typescript
+ compare-versions: 5.0.3
+ fs-extra: 11.1.0
+ selenium-webdriver: 4.8.0
+ ts-essentials: 9.3.0_typescript@4.9.5
+ typescript: 4.9.5
dev: true
/mri/1.2.0:
@@ -4602,6 +4649,7 @@ packages:
/napi-build-utils/1.0.2:
resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==}
dev: true
+ optional: true
/natural-compare-lite/1.4.0:
resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==}
@@ -4637,10 +4685,12 @@ packages:
dependencies:
semver: 7.3.8
dev: true
+ optional: true
/node-addon-api/4.3.0:
resolution: {integrity: sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==}
dev: true
+ optional: true
/node-emoji/1.11.0:
resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==}
@@ -4837,11 +4887,6 @@ packages:
word-wrap: 1.2.3
dev: true
- /os-tmpdir/1.0.2:
- resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==}
- engines: {node: '>=0.10.0'}
- dev: true
-
/p-cancelable/2.1.1:
resolution: {integrity: sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==}
engines: {node: '>=8'}
@@ -5190,12 +5235,71 @@ packages:
tar-fs: 2.1.1
tunnel-agent: 0.6.0
dev: true
+ optional: true
/prelude-ls/1.2.1:
resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==}
engines: {node: '>= 0.8.0'}
dev: true
+ /prettier-plugin-tailwindcss/0.2.2_prettier@2.8.3:
+ resolution: {integrity: sha512-5RjUbWRe305pUpc48MosoIp6uxZvZxrM6GyOgsbGLTce+ehePKNm7ziW2dLG2air9aXbGuXlHVSQQw4Lbosq3w==}
+ engines: {node: '>=12.17.0'}
+ peerDependencies:
+ '@prettier/plugin-php': '*'
+ '@prettier/plugin-pug': '*'
+ '@shopify/prettier-plugin-liquid': '*'
+ '@shufo/prettier-plugin-blade': '*'
+ '@trivago/prettier-plugin-sort-imports': '*'
+ prettier: '>=2.2.0'
+ prettier-plugin-astro: '*'
+ prettier-plugin-css-order: '*'
+ prettier-plugin-import-sort: '*'
+ prettier-plugin-jsdoc: '*'
+ prettier-plugin-organize-attributes: '*'
+ prettier-plugin-organize-imports: '*'
+ prettier-plugin-style-order: '*'
+ prettier-plugin-svelte: '*'
+ prettier-plugin-twig-melody: '*'
+ peerDependenciesMeta:
+ '@prettier/plugin-php':
+ optional: true
+ '@prettier/plugin-pug':
+ optional: true
+ '@shopify/prettier-plugin-liquid':
+ optional: true
+ '@shufo/prettier-plugin-blade':
+ optional: true
+ '@trivago/prettier-plugin-sort-imports':
+ optional: true
+ prettier-plugin-astro:
+ optional: true
+ prettier-plugin-css-order:
+ optional: true
+ prettier-plugin-import-sort:
+ optional: true
+ prettier-plugin-jsdoc:
+ optional: true
+ prettier-plugin-organize-attributes:
+ optional: true
+ prettier-plugin-organize-imports:
+ optional: true
+ prettier-plugin-style-order:
+ optional: true
+ prettier-plugin-svelte:
+ optional: true
+ prettier-plugin-twig-melody:
+ optional: true
+ dependencies:
+ prettier: 2.8.3
+ dev: true
+
+ /prettier/2.8.3:
+ resolution: {integrity: sha512-tJ/oJ4amDihPoufT5sM0Z1SKEuKay8LfVAMlbbhnnkvt6BUserZylqo2PN+p9KeljLr0OHa2rXHU1T8reeoTrw==}
+ engines: {node: '>=10.13.0'}
+ hasBin: true
+ dev: true
+
/pretty-error/2.1.2:
resolution: {integrity: sha512-EY5oDzmsX5wvuynAByrmY0P0hcp+QpnAKbJng2A2MPjVKXCxrDSUkzghVJ4ZGPIv+JC4gX8fPUWscC0RtjsWGw==}
dependencies:
@@ -5228,10 +5332,6 @@ packages:
ipaddr.js: 1.9.1
dev: true
- /prr/1.0.1:
- resolution: {integrity: sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==}
- dev: true
-
/pump/1.0.3:
resolution: {integrity: sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==}
dependencies:
@@ -5860,6 +5960,7 @@ packages:
minimist: 1.2.7
strip-json-comments: 2.0.1
dev: true
+ optional: true
/react-datepicker/4.2.1_w7o5yyljkiidx2s2nzb26ottzu:
resolution: {integrity: sha512-0gcvHMnX8rS1fV90PjjsB7MQdsWNU77JeVHf6bbwK9HnFxgwjVflTx40ebKmHV+leqe+f+FgUP9Nvqbe5RGyfA==}
@@ -6181,13 +6282,6 @@ packages:
resolution: {integrity: sha512-zgn5OjNQXLUTdq8m17KdaicF6w89TZs8ZU8y0AYENIU6wG8GG6LLm0yLSiPY8DmaYmHdgRW8rnApjoT0fQRfMg==}
dev: true
- /rimraf/2.7.1:
- resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==}
- hasBin: true
- dependencies:
- glob: 7.2.0
- dev: true
-
/rimraf/3.0.2:
resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==}
hasBin: true
@@ -6282,14 +6376,16 @@ packages:
resolution: {integrity: sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg==}
dev: true
- /selenium-webdriver/3.6.0:
- resolution: {integrity: sha512-WH7Aldse+2P5bbFBO4Gle/nuQOdVwpHMTL6raL3uuBj/vPG07k6uzt3aiahu352ONBr5xXh0hDlM3LhtXPOC4Q==}
- engines: {node: '>= 6.9.0'}
+ /selenium-webdriver/4.8.0:
+ resolution: {integrity: sha512-s/HL8WNwy1ggHR244+tAhjhyKMJnZLt1HKJ6Gn7nQgVjB/ybDF+46Uui0qI2J7AjPNJzlUmTncdC/jg/kKkn0A==}
+ engines: {node: '>= 14.20.0'}
dependencies:
jszip: 3.10.1
- rimraf: 2.7.1
- tmp: 0.0.30
- xml2js: 0.4.23
+ tmp: 0.2.1
+ ws: 8.12.0
+ transitivePeerDependencies:
+ - bufferutil
+ - utf-8-validate
dev: true
/selfsigned/2.1.1:
@@ -6304,11 +6400,6 @@ packages:
hasBin: true
dev: true
- /semver/6.3.0:
- resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==}
- hasBin: true
- dev: true
-
/semver/7.3.8:
resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==}
engines: {node: '>=10'}
@@ -6443,6 +6534,7 @@ packages:
/simple-concat/1.0.1:
resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==}
dev: true
+ optional: true
/simple-get/4.0.1:
resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==}
@@ -6451,6 +6543,7 @@ packages:
once: 1.4.0
simple-concat: 1.0.1
dev: true
+ optional: true
/simple-git/3.16.0:
resolution: {integrity: sha512-zuWYsOLEhbJRWVxpjdiXl6eyAyGo/KzVW+KFhhw9MqEEJttcq+32jTWSGyxTdf9e/YCohxRE+9xpWFj9FdiJNw==}
@@ -6662,6 +6755,7 @@ packages:
resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==}
engines: {node: '>=0.10.0'}
dev: true
+ optional: true
/strip-json-comments/3.1.1:
resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==}
@@ -6792,6 +6886,7 @@ packages:
pump: 3.0.0
tar-stream: 2.2.0
dev: true
+ optional: true
/tar-stream/1.6.2:
resolution: {integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==}
@@ -6816,6 +6911,7 @@ packages:
inherits: 2.0.4
readable-stream: 3.6.0
dev: true
+ optional: true
/targz/1.0.1:
resolution: {integrity: sha512-6q4tP9U55mZnRuMTBqnqc3nwYQY3kv+QthCFZuMk+Tn1qYUnMPmL/JZ/mzgXINzFpSqfU+242IFmFU9VPvqaQw==}
@@ -6877,13 +6973,6 @@ packages:
resolution: {integrity: sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA==}
dev: true
- /tmp/0.0.30:
- resolution: {integrity: sha512-HXdTB7lvMwcb55XFfrTM8CPr/IYREk4hVBFaQ4b/6nInrluSL86hfHm7vu0luYKCfyBZp2trCjpc8caC3vVM3w==}
- engines: {node: '>=0.4.0'}
- dependencies:
- os-tmpdir: 1.0.2
- dev: true
-
/tmp/0.2.1:
resolution: {integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==}
engines: {node: '>=8.17.0'}
@@ -6930,26 +7019,27 @@ packages:
utf8-byte-length: 1.0.4
dev: true
- /ts-essentials/8.1.0_typescript@4.5.5:
- resolution: {integrity: sha512-34xALeQADWRYq9kbtprP4KdpTQ3v3BBIs/U4SpaP+C4++B8ijXY5NnILRJLchQVMzw7YBzKuGMUMrI9uT+ALVw==}
+ /ts-essentials/9.3.0_typescript@4.9.5:
+ resolution: {integrity: sha512-XeiCboEyBG8UqXZtXl59bWEi4ZgOqRsogFDI6WDGIF1LmzbYiAkIwjkXN6zZWWl4re/lsOqMlYfe8KA0XiiEPw==}
peerDependencies:
- typescript: '>=4.0.0'
+ typescript: '>=4.1.0'
dependencies:
- typescript: 4.5.5
+ typescript: 4.9.5
dev: true
- /ts-loader/8.0.3_typescript@4.5.5:
- resolution: {integrity: sha512-wsqfnVdB7xQiqhqbz2ZPLGHLPZbHVV5Qn/MNFZkCFxRU1miDyxKORucDGxKtsQJ63Rfza0udiUxWF5nHY6bpdQ==}
- engines: {node: '>=10.0.0'}
+ /ts-loader/9.4.2_hhrrucqyg4eysmfpujvov2ym5u:
+ resolution: {integrity: sha512-OmlC4WVmFv5I0PpaxYb+qGeGOdm5giHU7HwDDUjw59emP2UYMHy9fFSDcYgSNoH8sXcj4hGCSEhlDZ9ULeDraA==}
+ engines: {node: '>=12.0.0'}
peerDependencies:
typescript: '*'
+ webpack: ^5.0.0
dependencies:
- chalk: 2.4.2
- enhanced-resolve: 4.5.0
- loader-utils: 1.4.2
+ chalk: 4.1.2
+ enhanced-resolve: 5.12.0
micromatch: 4.0.5
- semver: 6.3.0
- typescript: 4.5.5
+ semver: 7.3.8
+ typescript: 4.9.5
+ webpack: 5.75.0_webpack-cli@4.10.0
dev: true
/tslib/1.14.1:
@@ -6960,14 +7050,14 @@ packages:
resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==}
dev: true
- /tsutils/3.21.0_typescript@4.5.5:
+ /tsutils/3.21.0_typescript@4.9.5:
resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==}
engines: {node: '>= 6'}
peerDependencies:
typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta'
dependencies:
tslib: 1.14.1
- typescript: 4.5.5
+ typescript: 4.9.5
dev: true
/tunnel-agent/0.6.0:
@@ -6975,6 +7065,7 @@ packages:
dependencies:
safe-buffer: 5.2.1
dev: true
+ optional: true
/tunnel/0.0.6:
resolution: {integrity: sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==}
@@ -7022,8 +7113,8 @@ packages:
underscore: 1.13.6
dev: true
- /typescript/4.5.5:
- resolution: {integrity: sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA==}
+ /typescript/4.9.5:
+ resolution: {integrity: sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==}
engines: {node: '>=4.2.0'}
hasBin: true
dev: true
@@ -7200,68 +7291,43 @@ packages:
engines: {node: '>= 0.8'}
dev: true
- /vsce/2.15.0:
- resolution: {integrity: sha512-P8E9LAZvBCQnoGoizw65JfGvyMqNGlHdlUXD1VAuxtvYAaHBKLBdKPnpy60XKVDAkQCfmMu53g+gq9FM+ydepw==}
- engines: {node: '>= 14'}
- deprecated: vsce has been renamed to @vscode/vsce. Install using @vscode/vsce instead.
- hasBin: true
- dependencies:
- azure-devops-node-api: 11.2.0
- chalk: 2.4.2
- cheerio: 1.0.0-rc.12
- commander: 6.2.1
- glob: 7.2.0
- hosted-git-info: 4.1.0
- keytar: 7.9.0
- leven: 3.1.0
- markdown-it: 12.3.2
- mime: 1.6.0
- minimatch: 3.1.2
- parse-semver: 1.1.1
- read: 1.0.7
- semver: 5.7.1
- tmp: 0.2.1
- typed-rest-client: 1.8.9
- url-join: 4.0.1
- xml2js: 0.4.23
- yauzl: 2.10.0
- yazl: 2.5.1
- dev: true
-
- /vscode-extension-tester-locators/1.62.2_gbv7m2qd3dlril5shkdv2le4qm:
- resolution: {integrity: sha512-XzN0Tus5ct2aQKY/KpQbRz/M4+0isKC5/5SvS+6djLphBj3pZqvwduOdp6Gb6ATHt3AkwGn+Yau3X6mwgNJGlg==}
+ /vscode-extension-tester-locators/3.3.0_uesc2kg7tcvmuropzf2xkvkrym:
+ resolution: {integrity: sha512-rpeuCVNTxy5fGy2lQKPNUBCt6/7nSJBZY91J2MtwVYv1Nj6VbVZl38JNq7KAM9J+7pNSPYLsFAmHB2NzLWkD5g==}
peerDependencies:
- monaco-page-objects: ^1.0.0
- selenium-webdriver: ^3.0.0
+ monaco-page-objects: ^3.3.0
+ selenium-webdriver: ^4.6.1
dependencies:
- monaco-page-objects: 1.9.2_nd7aufnafpcvjaepgzlwugj3oe
- selenium-webdriver: 3.6.0
+ monaco-page-objects: 3.3.0_mcttbz3hm275ldw6tl6gcvo6pq
+ selenium-webdriver: 4.8.0
dev: true
- /vscode-extension-tester/4.2.5_rgw4eiitjdvgxwfnqqw3bex6ee:
- resolution: {integrity: sha512-Igl3hnnLOtcC7vBJyMui5G+Vt6OiWtoomtqdD1oD+7bZFsF9OqBqDE9tD2K1mTYI4tlRFEBgC7jRi2h29bRNfg==}
+ /vscode-extension-tester/5.3.0_4r5rv57huad4ctfiz6vn747ruu:
+ resolution: {integrity: sha512-AWUJkeEsKCxQniD2p1N6gtnLHilgAtz0FszRfqL898z4ZJuySmkKD2+GOuqeacU/PjmSEsVd3h8BcxyvDswcVw==}
hasBin: true
peerDependencies:
mocha: '>=5.2.0'
+ typescript: '>=4.6.2'
dependencies:
- '@types/selenium-webdriver': 3.0.20
- commander: 8.3.0
- compare-versions: 3.6.0
- fs-extra: 10.1.0
- glob: 7.2.0
+ '@types/selenium-webdriver': 4.1.10
+ '@vscode/vsce': 2.17.0
+ commander: 10.0.0
+ compare-versions: 5.0.3
+ fs-extra: 11.1.0
+ glob: 8.1.0
got: 11.8.6
- hpagent: 0.1.2
+ hpagent: 1.2.0
js-yaml: 4.1.0
mocha: 10.2.0
- monaco-page-objects: 1.9.2_nd7aufnafpcvjaepgzlwugj3oe
+ monaco-page-objects: 3.3.0_mcttbz3hm275ldw6tl6gcvo6pq
sanitize-filename: 1.6.3
- selenium-webdriver: 3.6.0
+ selenium-webdriver: 4.8.0
targz: 1.0.1
+ typescript: 4.9.5
unzip-stream: 0.3.1
- vsce: 2.15.0
- vscode-extension-tester-locators: 1.62.2_gbv7m2qd3dlril5shkdv2le4qm
+ vscode-extension-tester-locators: 3.3.0_uesc2kg7tcvmuropzf2xkvkrym
transitivePeerDependencies:
- - typescript
+ - bufferutil
+ - utf-8-validate
dev: true
/warning/4.0.3:
diff --git a/src/commands/Article.ts b/src/commands/Article.ts
index 8baec070..2dbc670f 100644
--- a/src/commands/Article.ts
+++ b/src/commands/Article.ts
@@ -1,10 +1,20 @@
import { Folders } from './Folders';
import { DEFAULT_CONTENT_TYPE } from './../constants/ContentType';
import { isValidFile } from './../helpers/isValidFile';
-import { SETTING_AUTO_UPDATE_DATE, SETTING_SLUG_UPDATE_FILE_NAME, SETTING_TEMPLATES_PREFIX, CONFIG_KEY, SETTING_DATE_FORMAT, SETTING_SLUG_PREFIX, SETTING_SLUG_SUFFIX, SETTING_CONTENT_PLACEHOLDERS, TelemetryEvent } from './../constants';
+import {
+ SETTING_AUTO_UPDATE_DATE,
+ SETTING_SLUG_UPDATE_FILE_NAME,
+ SETTING_TEMPLATES_PREFIX,
+ CONFIG_KEY,
+ SETTING_DATE_FORMAT,
+ SETTING_SLUG_PREFIX,
+ SETTING_SLUG_SUFFIX,
+ SETTING_CONTENT_PLACEHOLDERS,
+ TelemetryEvent
+} from './../constants';
import * as vscode from 'vscode';
-import { CustomPlaceholder, Field, TaxonomyType } from "../models";
-import { format } from "date-fns";
+import { CustomPlaceholder, Field, TaxonomyType } from '../models';
+import { format } from 'date-fns';
import { ArticleHelper, Settings, SlugHelper } from '../helpers';
import { Notifications } from '../helpers/Notifications';
import { extname, basename, parse, dirname } from 'path';
@@ -18,13 +28,12 @@ import { MediaListener } from '../listeners/panel';
import { NavigationType } from '../dashboardWebView/models';
import { processKnownPlaceholders } from '../helpers/PlaceholderHelper';
-
export class Article {
/**
- * Insert taxonomy
- *
- * @param type
- */
+ * Insert taxonomy
+ *
+ * @param type
+ */
public static async insert(type: TaxonomyType) {
const editor = vscode.window.activeTextEditor;
if (!editor) {
@@ -38,16 +47,21 @@ export class Article {
}
let options: vscode.QuickPickItem[] = [];
- const matterProp: string = type === TaxonomyType.Tag ? "tags" : "categories";
+ const matterProp: string = type === TaxonomyType.Tag ? 'tags' : 'categories';
// Add the selected options to the options array
if (article.data[matterProp]) {
const propData = article.data[matterProp];
if (propData && propData.length > 0) {
- options = [...propData].filter(p => p).map(p => ({
- label: p,
- picked: true
- } as vscode.QuickPickItem));
+ options = [...propData]
+ .filter((p) => p)
+ .map(
+ (p) =>
+ ({
+ label: p,
+ picked: true
+ } as vscode.QuickPickItem)
+ );
}
}
@@ -55,7 +69,7 @@ export class Article {
const crntOptions = Settings.getTaxonomy(type);
if (crntOptions && crntOptions.length > 0) {
for (const crntOpt of crntOptions) {
- if (!options.find(o => o.label === crntOpt)) {
+ if (!options.find((o) => o.label === crntOpt)) {
options.push({
label: crntOpt
});
@@ -64,18 +78,18 @@ export class Article {
}
if (options.length === 0) {
- Notifications.info(`No ${type === TaxonomyType.Tag ? "tags" : "categories"} configured.`);
+ Notifications.info(`No ${type === TaxonomyType.Tag ? 'tags' : 'categories'} configured.`);
return;
}
const selectedOptions = await vscode.window.showQuickPick(options, {
- placeHolder: `Select your ${type === TaxonomyType.Tag ? "tags" : "categories"} to insert`,
+ placeHolder: `Select your ${type === TaxonomyType.Tag ? 'tags' : 'categories'} to insert`,
canPickMany: true,
ignoreFocusOut: true
});
if (selectedOptions) {
- article.data[matterProp] = selectedOptions.map(o => o.label);
+ article.data[matterProp] = selectedOptions.map((o) => o.label);
}
ArticleHelper.update(editor, article);
@@ -100,7 +114,9 @@ export class Article {
try {
ArticleHelper.update(editor, article);
} catch (e) {
- Notifications.error(`Something failed while parsing the date format. Check your "${CONFIG_KEY}${SETTING_DATE_FORMAT}" setting.`);
+ Notifications.error(
+ `Something failed while parsing the date format. Check your "${CONFIG_KEY}${SETTING_DATE_FORMAT}" setting.`
+ );
}
}
@@ -124,14 +140,11 @@ export class Article {
const updatedArticle = this.setLastModifiedDateInner(editor.document);
- if (typeof updatedArticle === "undefined") {
+ if (typeof updatedArticle === 'undefined') {
return;
}
- ArticleHelper.update(
- editor,
- updatedArticle as ParsedFrontMatter
- );
+ ArticleHelper.update(editor, updatedArticle as ParsedFrontMatter);
}
public static async setLastModifiedDateOnSave(
@@ -139,7 +152,7 @@ export class Article {
): Promise {
const updatedArticle = this.setLastModifiedDateInner(document);
- if (typeof updatedArticle === "undefined") {
+ if (typeof updatedArticle === 'undefined') {
return [];
}
@@ -164,7 +177,9 @@ export class Article {
cloneArticle.data[dateField] = Article.formatDate(new Date());
return cloneArticle;
} catch (e: unknown) {
- Notifications.error(`Something failed while parsing the date format. Check your "${CONFIG_KEY}${SETTING_DATE_FORMAT}" setting.`);
+ Notifications.error(
+ `Something failed while parsing the date format. Check your "${CONFIG_KEY}${SETTING_DATE_FORMAT}" setting.`
+ );
}
}
@@ -194,8 +209,8 @@ export class Article {
/**
* Generate the slug based on the article title
*/
- public static async updateSlug() {
- Telemetry.send(TelemetryEvent.generateSlug);
+ public static async updateSlug() {
+ Telemetry.send(TelemetryEvent.generateSlug);
const updateFileName = Settings.get(SETTING_SLUG_UPDATE_FILE_NAME) as string;
const editor = vscode.window.activeTextEditor;
@@ -212,30 +227,38 @@ export class Article {
let filePrefix = Settings.get(SETTING_TEMPLATES_PREFIX);
const contentType = ArticleHelper.getContentType(article.data);
filePrefix = ArticleHelper.getFilePrefix(editor.document.uri.fsPath, contentType);
-
- const titleField = "title";
+
+ const titleField = 'title';
const articleTitle: string = article.data[titleField];
const slugInfo = Article.generateSlug(articleTitle);
if (slugInfo && slugInfo.slug && slugInfo.slugWithPrefixAndSuffix) {
- article.data["slug"] = slugInfo.slugWithPrefixAndSuffix;
+ article.data['slug'] = slugInfo.slugWithPrefixAndSuffix;
if (contentType) {
// Update the fields containing the slug placeholder
- const fieldsToUpdate: Field[] = contentType.fields.filter(f => f.default === "{{slug}}");
+ const fieldsToUpdate: Field[] = contentType.fields.filter((f) => f.default === '{{slug}}');
for (const field of fieldsToUpdate) {
article.data[field.name] = slugInfo.slug;
}
// Update the fields containing a custom placeholder that depends on slug
const placeholders = Settings.get(SETTING_CONTENT_PLACEHOLDERS);
- const customPlaceholders = placeholders?.filter(p => p.value && p.value.includes("{{slug}}"));
+ const customPlaceholders = placeholders?.filter(
+ (p) => p.value && p.value.includes('{{slug}}')
+ );
const dateFormat = Settings.get(SETTING_DATE_FORMAT) as string;
- for (const customPlaceholder of (customPlaceholders || [])) {
- const customPlaceholderFields = contentType.fields.filter(f => f.default === `{{${customPlaceholder.id}}}`);
+ for (const customPlaceholder of customPlaceholders || []) {
+ const customPlaceholderFields = contentType.fields.filter(
+ (f) => f.default === `{{${customPlaceholder.id}}}`
+ );
for (const pField of customPlaceholderFields) {
article.data[pField.name] = customPlaceholder.value;
- article.data[pField.name] = processKnownPlaceholders(article.data[pField.name], articleTitle, dateFormat);
+ article.data[pField.name] = processKnownPlaceholders(
+ article.data[pField.name],
+ articleTitle,
+ dateFormat
+ );
}
}
}
@@ -250,11 +273,11 @@ export class Article {
const ext = extname(editor.document.fileName);
const fileName = basename(editor.document.fileName);
- let slugName = slugInfo.slug.startsWith("/") ? slugInfo.slug.substring(1) : slugInfo.slug;
- slugName = slugName.endsWith("/") ? slugName.substring(0, slugName.length - 1) : slugName;
+ let slugName = slugInfo.slug.startsWith('/') ? slugInfo.slug.substring(1) : slugInfo.slug;
+ slugName = slugName.endsWith('/') ? slugName.substring(0, slugName.length - 1) : slugName;
let newFileName = `${slugName}${ext}`;
- if (filePrefix && typeof filePrefix === "string") {
+ if (filePrefix && typeof filePrefix === 'string') {
newFileName = `${filePrefix}-${newFileName}`;
}
@@ -272,7 +295,7 @@ export class Article {
}
}
}
- }
+ }
/**
* Retrieve the slug from the front matter
@@ -291,7 +314,7 @@ export class Article {
const parsedFile = parse(file);
- if (parsedFile.name.toLowerCase() !== "index") {
+ if (parsedFile.name.toLowerCase() !== 'index') {
return parsedFile.name;
}
@@ -312,8 +335,8 @@ export class Article {
return;
}
- const newDraftStatus = !article.data["draft"];
- article.data["draft"] = newDraftStatus;
+ const newDraftStatus = !article.data['draft'];
+ article.data['draft'] = newDraftStatus;
ArticleHelper.update(editor, article);
}
@@ -329,7 +352,7 @@ export class Article {
// Is article located in one of the content folders
const folders = Folders.get();
const documentPath = parseWinPath(document.fileName);
- const folder = folders.find(f => documentPath.startsWith(f.path));
+ const folder = folders.find((f) => documentPath.startsWith(f.path));
if (!folder) {
return;
}
@@ -346,10 +369,12 @@ export class Article {
public static formatDate(dateValue: Date): string {
const dateFormat = Settings.get(SETTING_DATE_FORMAT) as string;
- if (dateFormat && typeof dateFormat === "string") {
+ if (dateFormat && typeof dateFormat === 'string') {
return format(dateValue, DateHelper.formatUpdate(dateFormat) as string);
} else {
- return typeof dateValue.toISOString === 'function' ? dateValue.toISOString() : dateValue?.toString();
+ return typeof dateValue.toISOString === 'function'
+ ? dateValue.toISOString()
+ : dateValue?.toString();
}
}
@@ -357,19 +382,20 @@ export class Article {
* Insert an image from the media dashboard into the article
*/
public static async insertMedia() {
- const editor = vscode.window.activeTextEditor;
+ const editor = vscode.window.activeTextEditor;
if (!editor) {
return;
}
const article = ArticleHelper.getFrontMatter(editor);
- const contentType = article && article.data ? ArticleHelper.getContentType(article.data) : DEFAULT_CONTENT_TYPE;
+ const contentType =
+ article && article.data ? ArticleHelper.getContentType(article.data) : DEFAULT_CONTENT_TYPE;
const position = editor.selection.active;
const selectionText = editor.document.getText(editor.selection);
await vscode.commands.executeCommand(COMMAND_NAME.dashboard, {
- type: "media",
+ type: 'media',
data: {
pageBundle: !!contentType.pageBundle,
filePath: editor.document.uri.fsPath,
@@ -381,13 +407,13 @@ export class Article {
// Let the editor panel know you are selecting an image
MediaListener.getMediaSelection();
- }
+ }
/**
* Insert a snippet into the article
*/
public static async insertSnippet() {
- const editor = vscode.window.activeTextEditor;
+ const editor = vscode.window.activeTextEditor;
if (!editor) {
return;
}
@@ -400,14 +426,14 @@ export class Article {
await vscode.commands.executeCommand(COMMAND_NAME.dashboard, {
type: NavigationType.Snippets,
data: {
- fileTitle: article?.data.title || "",
+ fileTitle: article?.data.title || '',
filePath: editor.document.uri.fsPath,
fieldName: basename(editor.document.uri.fsPath),
position,
selection: selectionText
}
} as DashboardData);
- }
+ }
/**
* Update the article date and return it
@@ -417,7 +443,7 @@ export class Article {
* @param forceCreate
*/
private static articleDate(article: ParsedFrontMatter, field: string, forceCreate: boolean) {
- if (typeof article.data[field] !== "undefined" || forceCreate) {
+ if (typeof article.data[field] !== 'undefined' || forceCreate) {
article.data[field] = Article.formatDate(new Date());
}
return article;
diff --git a/src/commands/Backers.ts b/src/commands/Backers.ts
index 73bb80a4..31b7d59e 100644
--- a/src/commands/Backers.ts
+++ b/src/commands/Backers.ts
@@ -1,8 +1,8 @@
import { commands, ExtensionContext } from 'vscode';
import { COMMAND_NAME, CONTEXT } from '../constants';
import { Extension } from '../helpers';
-import { Credentials } from "../services/Credentials";
-import fetch from "node-fetch";
+import { Credentials } from '../services/Credentials';
+import fetch from 'node-fetch';
import { ExplorerView } from '../explorerView/ExplorerView';
import { Dashboard } from './Dashboard';
import { SettingsListener } from '../listeners/panel';
@@ -26,16 +26,16 @@ export class Backers {
public static async tryUsernameCheck() {
try {
const username = await Backers.getUsername();
- Backers.validate(username || "");
+ Backers.validate(username || '');
} catch (e) {
- Backers.validate("");
+ Backers.validate('');
}
}
public static async getUsername() {
const octokit = await Backers.creds?.getOctokit();
const user = await octokit?.users.getAuthenticated();
-
+
if (user?.data?.login) {
return user?.data?.login;
}
@@ -52,7 +52,9 @@ export class Backers {
const isBeta = ext.isBetaVersion();
- const response = await fetch(`https://${isBeta ? `beta.` : ``}frontmatter.codes/api/backers?backer=${username}`);
+ const response = await fetch(
+ `https://${isBeta ? `beta.` : ``}frontmatter.codes/api/backers?backer=${username}`
+ );
if (response.ok) {
const prevData = await ext.getState(CONTEXT.backer, 'global');
@@ -63,7 +65,7 @@ export class Backers {
if (explorerView.visible) {
SettingsListener.getSettings();
}
-
+
if (Dashboard.isOpen) {
Dashboard.reload();
}
@@ -72,4 +74,4 @@ export class Backers {
ext.setState(CONTEXT.backer, false, 'global');
}
}
-}
\ No newline at end of file
+}
diff --git a/src/commands/Cache.ts b/src/commands/Cache.ts
index 67b6b387..9924dcfb 100644
--- a/src/commands/Cache.ts
+++ b/src/commands/Cache.ts
@@ -1,35 +1,32 @@
-import { commands } from "vscode";
-import { COMMAND_NAME, ExtensionState } from "../constants";
-import { Extension, Notifications } from "../helpers";
+import { commands } from 'vscode';
+import { COMMAND_NAME, ExtensionState } from '../constants';
+import { Extension, Notifications } from '../helpers';
export class Cache {
-
public static async registerCommands() {
const ext = Extension.getInstance();
const subscriptions = ext.subscriptions;
- subscriptions.push(
- commands.registerCommand(COMMAND_NAME.clearCache, Cache.clear)
- );
+ subscriptions.push(commands.registerCommand(COMMAND_NAME.clearCache, Cache.clear));
}
- public static async get(key: string, type: "workspace" | "global"): Promise {
+ public static async get(key: string, type: 'workspace' | 'global'): Promise {
const ext = Extension.getInstance();
const cache = await ext.getState(key, type);
return cache || undefined;
}
- public static async set(key: string, data: any, type: "workspace" | "global") {
- await Extension.getInstance().setState(key, data, "workspace");
+ public static async set(key: string, data: unknown, type: 'workspace' | 'global' = 'workspace') {
+ await Extension.getInstance().setState(key, data, type);
}
private static async clear() {
const ext = Extension.getInstance();
- await ext.setState(ExtensionState.Dashboard.Pages.Cache, undefined, "workspace");
- await ext.setState(ExtensionState.Dashboard.Pages.Index, undefined, "workspace");
- await ext.setState(ExtensionState.Settings.Extends, undefined, "workspace");
+ await ext.setState(ExtensionState.Dashboard.Pages.Cache, undefined, 'workspace');
+ await ext.setState(ExtensionState.Dashboard.Pages.Index, undefined, 'workspace');
+ await ext.setState(ExtensionState.Settings.Extends, undefined, 'workspace');
- Notifications.info("Cache cleared");
+ Notifications.info('Cache cleared');
}
-}
\ No newline at end of file
+}
diff --git a/src/commands/Content.ts b/src/commands/Content.ts
index 1c048e93..6c4ef060 100644
--- a/src/commands/Content.ts
+++ b/src/commands/Content.ts
@@ -1,9 +1,8 @@
-import { commands, QuickPickItem, window } from 'vscode';
+import { commands, QuickPickItem, window } from 'vscode';
import { COMMAND_NAME, SETTING_TEMPLATES_ENABLED } from '../constants';
import { Settings } from '../helpers';
export class Content {
-
public static async create() {
const templatesEnabled = await Settings.get(SETTING_TEMPLATES_ENABLED);
if (!templatesEnabled) {
@@ -11,16 +10,19 @@ export class Content {
return;
}
- const options: QuickPickItem[] = [{
- label: "Create content by content type",
- description: "Select if you want to create new content by the available content type(s)"
- }, {
- label: "Create content by template",
- description: "Select if you want to create new content by the available template(s)"
- } as QuickPickItem];
+ const options: QuickPickItem[] = [
+ {
+ label: 'Create content by content type',
+ description: 'Select if you want to create new content by the available content type(s)'
+ },
+ {
+ label: 'Create content by template',
+ description: 'Select if you want to create new content by the available template(s)'
+ } as QuickPickItem
+ ];
const selectedOption = await window.showQuickPick(options, {
- title: "Create content",
+ title: 'Create content',
placeHolder: `Select how you want to create your new content`,
canPickMany: false,
ignoreFocusOut: true
@@ -36,4 +38,4 @@ export class Content {
return;
}
-}
\ No newline at end of file
+}
diff --git a/src/commands/Dashboard.ts b/src/commands/Dashboard.ts
index c6057b1f..158eca26 100644
--- a/src/commands/Dashboard.ts
+++ b/src/commands/Dashboard.ts
@@ -1,14 +1,25 @@
import { SETTING_DASHBOARD_OPENONSTART, CONTEXT, ExtensionState } from '../constants';
-import { join } from "path";
-import { commands, Uri, ViewColumn, Webview, WebviewPanel, window } from "vscode";
+import { join } from 'path';
+import { commands, Uri, ViewColumn, Webview, WebviewPanel, window } from 'vscode';
import { Logger, Settings as SettingsHelper } from '../helpers';
import { DashboardCommand } from '../dashboardWebView/DashboardCommand';
import { Extension } from '../helpers/Extension';
import { WebviewHelper } from '@estruyf/vscode';
import { DashboardData } from '../models/DashboardData';
import { MediaLibrary } from '../helpers/MediaLibrary';
-import { DashboardListener, MediaListener, SettingsListener, TelemetryListener, DataListener, PagesListener, ExtensionListener, SnippetListener, TaxonomyListener, LogListener } from '../listeners/dashboard';
-import { MediaListener as PanelMediaListener } from '../listeners/panel'
+import {
+ DashboardListener,
+ MediaListener,
+ SettingsListener,
+ TelemetryListener,
+ DataListener,
+ PagesListener,
+ ExtensionListener,
+ SnippetListener,
+ TaxonomyListener,
+ LogListener
+} from '../listeners/dashboard';
+import { MediaListener as PanelMediaListener } from '../listeners/panel';
import { GitListener, ModeListener } from '../listeners/general';
export class Dashboard {
@@ -39,10 +50,10 @@ export class Dashboard {
Dashboard._viewData = data;
if (Dashboard.isOpen) {
- Dashboard.reveal(!!data);
- } else {
- Dashboard.create();
- }
+ Dashboard.reveal(!!data);
+ } else {
+ Dashboard.create();
+ }
await commands.executeCommand('setContext', CONTEXT.isDashboardOpen, true);
}
@@ -62,7 +73,10 @@ export class Dashboard {
Dashboard.webview.reveal();
if (hasData) {
- Dashboard.postWebviewMessage({ command: DashboardCommand.viewData, data: Dashboard.viewData });
+ Dashboard.postWebviewMessage({
+ command: DashboardCommand.viewData,
+ data: Dashboard.viewData
+ });
}
}
}
@@ -74,7 +88,11 @@ export class Dashboard {
public static reload() {
if (Dashboard.isOpen) {
Dashboard.webview?.dispose();
- Extension.getInstance().setState(ExtensionState.Dashboard.Pages.Cache, undefined, "workspace")
+ Extension.getInstance().setState(
+ ExtensionState.Dashboard.Pages.Cache,
+ undefined,
+ 'workspace'
+ );
setTimeout(() => {
Dashboard.open();
@@ -110,14 +128,20 @@ export class Dashboard {
light: Uri.file(join(extensionUri.fsPath, 'assets/icons/frontmatter-short-light.svg'))
};
- Dashboard.webview.webview.html = Dashboard.getWebviewContent(Dashboard.webview.webview, extensionUri);
+ Dashboard.webview.webview.html = Dashboard.getWebviewContent(
+ Dashboard.webview.webview,
+ extensionUri
+ );
Dashboard.webview.onDidChangeViewState(async () => {
if (!this.webview?.visible) {
Dashboard._viewData = undefined;
PanelMediaListener.getMediaSelection();
- Dashboard.postWebviewMessage({ command: DashboardCommand.viewData, data: null });
+ Dashboard.postWebviewMessage({
+ command: DashboardCommand.viewData,
+ data: null
+ });
}
await commands.executeCommand('setContext', CONTEXT.isDashboardOpen, this.webview?.visible);
@@ -164,7 +188,7 @@ export class Dashboard {
* Post data to the dashboard
* @param msg
*/
- public static postWebviewMessage(msg: { command: DashboardCommand, data?: unknown }) {
+ public static postWebviewMessage(msg: { command: DashboardCommand; data?: unknown }) {
if (Dashboard.isDisposed) {
return;
}
@@ -179,14 +203,16 @@ export class Dashboard {
* @param webView
*/
private static getWebviewContent(webView: Webview, extensionPath: Uri): string {
- const dashboardFile = "dashboardWebView.js";
+ const dashboardFile = 'dashboardWebView.js';
const localPort = `9000`;
const localServerUrl = `localhost:${localPort}`;
- let scriptUri = "";
+ let scriptUri = '';
const isProd = Extension.getInstance().isProductionMode;
if (isProd) {
- scriptUri = webView.asWebviewUri(Uri.joinPath(extensionPath, 'dist', dashboardFile)).toString();
+ scriptUri = webView
+ .asWebviewUri(Uri.joinPath(extensionPath, 'dist', dashboardFile))
+ .toString();
} else {
scriptUri = `http://${localServerUrl}/${dashboardFile}`;
}
@@ -199,12 +225,22 @@ export class Dashboard {
const csp = [
`default-src 'none';`,
- `img-src ${`vscode-file://vscode-app`} ${webView.cspSource} https://api.visitorbadge.io 'self' 'unsafe-inline' https://*`,
- `media-src ${`vscode-file://vscode-app`} ${webView.cspSource} 'self' 'unsafe-inline' https://*`,
- `script-src ${isProd ? `'nonce-${nonce}'` : `http://${localServerUrl} http://0.0.0.0:${localPort}`} 'unsafe-eval'`,
+ `img-src ${`vscode-file://vscode-app`} ${
+ webView.cspSource
+ } https://api.visitorbadge.io 'self' 'unsafe-inline' https://*`,
+ `media-src ${`vscode-file://vscode-app`} ${
+ webView.cspSource
+ } 'self' 'unsafe-inline' https://*`,
+ `script-src ${
+ isProd ? `'nonce-${nonce}'` : `http://${localServerUrl} http://0.0.0.0:${localPort}`
+ } 'unsafe-eval'`,
`style-src ${webView.cspSource} 'self' 'unsafe-inline'`,
`font-src ${webView.cspSource}`,
- `connect-src https://o1022172.ingest.sentry.io ${isProd ? `` : `ws://${localServerUrl} ws://0.0.0.0:${localPort} http://${localServerUrl} http://0.0.0.0:${localPort}`}`
+ `connect-src https://o1022172.ingest.sentry.io ${
+ isProd
+ ? ``
+ : `ws://${localServerUrl} ws://0.0.0.0:${localPort} http://${localServerUrl} http://0.0.0.0:${localPort}`
+ }`
];
return `
@@ -218,11 +254,15 @@ export class Dashboard {
Front Matter Dashboard
-
+
-
+