Upload 351 files
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +4 -0
- node_modules/@img/sharp-darwin-x64/LICENSE +191 -0
- node_modules/@img/sharp-darwin-x64/README.md +18 -0
- node_modules/@img/sharp-darwin-x64/lib/sharp-darwin-x64.node +3 -0
- node_modules/@img/sharp-darwin-x64/package.json +40 -0
- node_modules/@img/sharp-libvips-darwin-x64/README.md +46 -0
- node_modules/@img/sharp-libvips-darwin-x64/lib/glib-2.0/include/glibconfig.h +221 -0
- node_modules/@img/sharp-libvips-darwin-x64/lib/index.js +1 -0
- node_modules/@img/sharp-libvips-darwin-x64/lib/libvips-cpp.42.dylib +3 -0
- node_modules/@img/sharp-libvips-darwin-x64/package.json +36 -0
- node_modules/@img/sharp-libvips-darwin-x64/versions.json +30 -0
- node_modules/@next/env/README.md +3 -0
- node_modules/@next/env/dist/index.d.ts +22 -0
- node_modules/@next/env/dist/index.js +1 -0
- node_modules/@next/env/package.json +36 -0
- node_modules/@next/eslint-plugin-next/README.md +4 -0
- node_modules/@next/eslint-plugin-next/dist/index.js +70 -0
- node_modules/@next/eslint-plugin-next/dist/rules/google-font-display.js +51 -0
- node_modules/@next/eslint-plugin-next/dist/rules/google-font-preconnect.js +41 -0
- node_modules/@next/eslint-plugin-next/dist/rules/inline-script-id.js +59 -0
- node_modules/@next/eslint-plugin-next/dist/rules/next-script-for-ga.js +70 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-assign-module-variable.js +35 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-async-client-component.js +90 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-before-interactive-script-outside-document.js +95 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-css-tags.js +39 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-document-import-in-page.js +74 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-duplicate-head.js +54 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-head-element.js +34 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-head-import-in-document.js +76 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-html-link-for-pages.js +236 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-img-element.js +42 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-page-custom-font.js +127 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-script-component-in-head.js +44 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-styled-jsx-in-document.js +78 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-sync-scripts.js +37 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-title-in-document-head.js +46 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-typos.js +150 -0
- node_modules/@next/eslint-plugin-next/dist/rules/no-unwanted-polyfillio.js +122 -0
- node_modules/@next/eslint-plugin-next/dist/utils/define-rule.js +13 -0
- node_modules/@next/eslint-plugin-next/dist/utils/get-root-dirs.js +33 -0
- node_modules/@next/eslint-plugin-next/dist/utils/node-attributes.js +114 -0
- node_modules/@next/eslint-plugin-next/dist/utils/url.js +232 -0
- node_modules/@next/eslint-plugin-next/package.json +24 -0
- node_modules/@next/swc-darwin-x64/README.md +3 -0
- node_modules/@next/swc-darwin-x64/next-swc.darwin-x64.node +3 -0
- node_modules/@next/swc-darwin-x64/package.json +23 -0
- node_modules/@tailwindcss/node/LICENSE +21 -0
- node_modules/@tailwindcss/node/README.md +40 -0
- node_modules/@tailwindcss/node/dist/esm-cache.loader.d.mts +5 -0
- node_modules/@tailwindcss/node/dist/esm-cache.loader.mjs +1 -0
.gitattributes
CHANGED
|
@@ -35,3 +35,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
public/riverforest.wav filter=lfs diff=lfs merge=lfs -text
|
| 37 |
node_modules/lightningcss-darwin-x64/lightningcss.darwin-x64.node filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
public/riverforest.wav filter=lfs diff=lfs merge=lfs -text
|
| 37 |
node_modules/lightningcss-darwin-x64/lightningcss.darwin-x64.node filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
node_modules/@img/sharp-darwin-x64/lib/sharp-darwin-x64.node filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
node_modules/@img/sharp-libvips-darwin-x64/lib/libvips-cpp.42.dylib filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
node_modules/@next/swc-darwin-x64/next-swc.darwin-x64.node filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
node_modules/@tailwindcss/oxide-darwin-x64/tailwindcss-oxide.darwin-x64.node filter=lfs diff=lfs merge=lfs -text
|
node_modules/@img/sharp-darwin-x64/LICENSE
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction, and
|
| 10 |
+
distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright
|
| 13 |
+
owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all other entities
|
| 16 |
+
that control, are controlled by, or are under common control with that entity.
|
| 17 |
+
For the purposes of this definition, "control" means (i) the power, direct or
|
| 18 |
+
indirect, to cause the direction or management of such entity, whether by
|
| 19 |
+
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 20 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 21 |
+
|
| 22 |
+
"You" (or "Your") shall mean an individual or Legal Entity exercising
|
| 23 |
+
permissions granted by this License.
|
| 24 |
+
|
| 25 |
+
"Source" form shall mean the preferred form for making modifications, including
|
| 26 |
+
but not limited to software source code, documentation source, and configuration
|
| 27 |
+
files.
|
| 28 |
+
|
| 29 |
+
"Object" form shall mean any form resulting from mechanical transformation or
|
| 30 |
+
translation of a Source form, including but not limited to compiled object code,
|
| 31 |
+
generated documentation, and conversions to other media types.
|
| 32 |
+
|
| 33 |
+
"Work" shall mean the work of authorship, whether in Source or Object form, made
|
| 34 |
+
available under the License, as indicated by a copyright notice that is included
|
| 35 |
+
in or attached to the work (an example is provided in the Appendix below).
|
| 36 |
+
|
| 37 |
+
"Derivative Works" shall mean any work, whether in Source or Object form, that
|
| 38 |
+
is based on (or derived from) the Work and for which the editorial revisions,
|
| 39 |
+
annotations, elaborations, or other modifications represent, as a whole, an
|
| 40 |
+
original work of authorship. For the purposes of this License, Derivative Works
|
| 41 |
+
shall not include works that remain separable from, or merely link (or bind by
|
| 42 |
+
name) to the interfaces of, the Work and Derivative Works thereof.
|
| 43 |
+
|
| 44 |
+
"Contribution" shall mean any work of authorship, including the original version
|
| 45 |
+
of the Work and any modifications or additions to that Work or Derivative Works
|
| 46 |
+
thereof, that is intentionally submitted to Licensor for inclusion in the Work
|
| 47 |
+
by the copyright owner or by an individual or Legal Entity authorized to submit
|
| 48 |
+
on behalf of the copyright owner. For the purposes of this definition,
|
| 49 |
+
"submitted" means any form of electronic, verbal, or written communication sent
|
| 50 |
+
to the Licensor or its representatives, including but not limited to
|
| 51 |
+
communication on electronic mailing lists, source code control systems, and
|
| 52 |
+
issue tracking systems that are managed by, or on behalf of, the Licensor for
|
| 53 |
+
the purpose of discussing and improving the Work, but excluding communication
|
| 54 |
+
that is conspicuously marked or otherwise designated in writing by the copyright
|
| 55 |
+
owner as "Not a Contribution."
|
| 56 |
+
|
| 57 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
|
| 58 |
+
of whom a Contribution has been received by Licensor and subsequently
|
| 59 |
+
incorporated within the Work.
|
| 60 |
+
|
| 61 |
+
2. Grant of Copyright License.
|
| 62 |
+
|
| 63 |
+
Subject to the terms and conditions of this License, each Contributor hereby
|
| 64 |
+
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
| 65 |
+
irrevocable copyright license to reproduce, prepare Derivative Works of,
|
| 66 |
+
publicly display, publicly perform, sublicense, and distribute the Work and such
|
| 67 |
+
Derivative Works in Source or Object form.
|
| 68 |
+
|
| 69 |
+
3. Grant of Patent License.
|
| 70 |
+
|
| 71 |
+
Subject to the terms and conditions of this License, each Contributor hereby
|
| 72 |
+
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
|
| 73 |
+
irrevocable (except as stated in this section) patent license to make, have
|
| 74 |
+
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
|
| 75 |
+
such license applies only to those patent claims licensable by such Contributor
|
| 76 |
+
that are necessarily infringed by their Contribution(s) alone or by combination
|
| 77 |
+
of their Contribution(s) with the Work to which such Contribution(s) was
|
| 78 |
+
submitted. If You institute patent litigation against any entity (including a
|
| 79 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
|
| 80 |
+
Contribution incorporated within the Work constitutes direct or contributory
|
| 81 |
+
patent infringement, then any patent licenses granted to You under this License
|
| 82 |
+
for that Work shall terminate as of the date such litigation is filed.
|
| 83 |
+
|
| 84 |
+
4. Redistribution.
|
| 85 |
+
|
| 86 |
+
You may reproduce and distribute copies of the Work or Derivative Works thereof
|
| 87 |
+
in any medium, with or without modifications, and in Source or Object form,
|
| 88 |
+
provided that You meet the following conditions:
|
| 89 |
+
|
| 90 |
+
You must give any other recipients of the Work or Derivative Works a copy of
|
| 91 |
+
this License; and
|
| 92 |
+
You must cause any modified files to carry prominent notices stating that You
|
| 93 |
+
changed the files; and
|
| 94 |
+
You must retain, in the Source form of any Derivative Works that You distribute,
|
| 95 |
+
all copyright, patent, trademark, and attribution notices from the Source form
|
| 96 |
+
of the Work, excluding those notices that do not pertain to any part of the
|
| 97 |
+
Derivative Works; and
|
| 98 |
+
If the Work includes a "NOTICE" text file as part of its distribution, then any
|
| 99 |
+
Derivative Works that You distribute must include a readable copy of the
|
| 100 |
+
attribution notices contained within such NOTICE file, excluding those notices
|
| 101 |
+
that do not pertain to any part of the Derivative Works, in at least one of the
|
| 102 |
+
following places: within a NOTICE text file distributed as part of the
|
| 103 |
+
Derivative Works; within the Source form or documentation, if provided along
|
| 104 |
+
with the Derivative Works; or, within a display generated by the Derivative
|
| 105 |
+
Works, if and wherever such third-party notices normally appear. The contents of
|
| 106 |
+
the NOTICE file are for informational purposes only and do not modify the
|
| 107 |
+
License. You may add Your own attribution notices within Derivative Works that
|
| 108 |
+
You distribute, alongside or as an addendum to the NOTICE text from the Work,
|
| 109 |
+
provided that such additional attribution notices cannot be construed as
|
| 110 |
+
modifying the License.
|
| 111 |
+
You may add Your own copyright statement to Your modifications and may provide
|
| 112 |
+
additional or different license terms and conditions for use, reproduction, or
|
| 113 |
+
distribution of Your modifications, or for any such Derivative Works as a whole,
|
| 114 |
+
provided Your use, reproduction, and distribution of the Work otherwise complies
|
| 115 |
+
with the conditions stated in this License.
|
| 116 |
+
|
| 117 |
+
5. Submission of Contributions.
|
| 118 |
+
|
| 119 |
+
Unless You explicitly state otherwise, any Contribution intentionally submitted
|
| 120 |
+
for inclusion in the Work by You to the Licensor shall be under the terms and
|
| 121 |
+
conditions of this License, without any additional terms or conditions.
|
| 122 |
+
Notwithstanding the above, nothing herein shall supersede or modify the terms of
|
| 123 |
+
any separate license agreement you may have executed with Licensor regarding
|
| 124 |
+
such Contributions.
|
| 125 |
+
|
| 126 |
+
6. Trademarks.
|
| 127 |
+
|
| 128 |
+
This License does not grant permission to use the trade names, trademarks,
|
| 129 |
+
service marks, or product names of the Licensor, except as required for
|
| 130 |
+
reasonable and customary use in describing the origin of the Work and
|
| 131 |
+
reproducing the content of the NOTICE file.
|
| 132 |
+
|
| 133 |
+
7. Disclaimer of Warranty.
|
| 134 |
+
|
| 135 |
+
Unless required by applicable law or agreed to in writing, Licensor provides the
|
| 136 |
+
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 137 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
|
| 138 |
+
including, without limitation, any warranties or conditions of TITLE,
|
| 139 |
+
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
|
| 140 |
+
solely responsible for determining the appropriateness of using or
|
| 141 |
+
redistributing the Work and assume any risks associated with Your exercise of
|
| 142 |
+
permissions under this License.
|
| 143 |
+
|
| 144 |
+
8. Limitation of Liability.
|
| 145 |
+
|
| 146 |
+
In no event and under no legal theory, whether in tort (including negligence),
|
| 147 |
+
contract, or otherwise, unless required by applicable law (such as deliberate
|
| 148 |
+
and grossly negligent acts) or agreed to in writing, shall any Contributor be
|
| 149 |
+
liable to You for damages, including any direct, indirect, special, incidental,
|
| 150 |
+
or consequential damages of any character arising as a result of this License or
|
| 151 |
+
out of the use or inability to use the Work (including but not limited to
|
| 152 |
+
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
|
| 153 |
+
any and all other commercial damages or losses), even if such Contributor has
|
| 154 |
+
been advised of the possibility of such damages.
|
| 155 |
+
|
| 156 |
+
9. Accepting Warranty or Additional Liability.
|
| 157 |
+
|
| 158 |
+
While redistributing the Work or Derivative Works thereof, You may choose to
|
| 159 |
+
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
|
| 160 |
+
other liability obligations and/or rights consistent with this License. However,
|
| 161 |
+
in accepting such obligations, You may act only on Your own behalf and on Your
|
| 162 |
+
sole responsibility, not on behalf of any other Contributor, and only if You
|
| 163 |
+
agree to indemnify, defend, and hold each Contributor harmless for any liability
|
| 164 |
+
incurred by, or claims asserted against, such Contributor by reason of your
|
| 165 |
+
accepting any such warranty or additional liability.
|
| 166 |
+
|
| 167 |
+
END OF TERMS AND CONDITIONS
|
| 168 |
+
|
| 169 |
+
APPENDIX: How to apply the Apache License to your work
|
| 170 |
+
|
| 171 |
+
To apply the Apache License to your work, attach the following boilerplate
|
| 172 |
+
notice, with the fields enclosed by brackets "[]" replaced with your own
|
| 173 |
+
identifying information. (Don't include the brackets!) The text should be
|
| 174 |
+
enclosed in the appropriate comment syntax for the file format. We also
|
| 175 |
+
recommend that a file or class name and description of purpose be included on
|
| 176 |
+
the same "printed page" as the copyright notice for easier identification within
|
| 177 |
+
third-party archives.
|
| 178 |
+
|
| 179 |
+
Copyright [yyyy] [name of copyright owner]
|
| 180 |
+
|
| 181 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 182 |
+
you may not use this file except in compliance with the License.
|
| 183 |
+
You may obtain a copy of the License at
|
| 184 |
+
|
| 185 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 186 |
+
|
| 187 |
+
Unless required by applicable law or agreed to in writing, software
|
| 188 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 189 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 190 |
+
See the License for the specific language governing permissions and
|
| 191 |
+
limitations under the License.
|
node_modules/@img/sharp-darwin-x64/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# `@img/sharp-darwin-x64`
|
| 2 |
+
|
| 3 |
+
Prebuilt sharp for use with macOS x64.
|
| 4 |
+
|
| 5 |
+
## Licensing
|
| 6 |
+
|
| 7 |
+
Copyright 2013 Lovell Fuller and others.
|
| 8 |
+
|
| 9 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 10 |
+
you may not use this file except in compliance with the License.
|
| 11 |
+
You may obtain a copy of the License at
|
| 12 |
+
[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)
|
| 13 |
+
|
| 14 |
+
Unless required by applicable law or agreed to in writing, software
|
| 15 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 16 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 17 |
+
See the License for the specific language governing permissions and
|
| 18 |
+
limitations under the License.
|
node_modules/@img/sharp-darwin-x64/lib/sharp-darwin-x64.node
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cd7e298512d7320c80592a3d25d50746f1486042131cda4a29375eb017b450c5
|
| 3 |
+
size 245736
|
node_modules/@img/sharp-darwin-x64/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "@img/sharp-darwin-x64",
|
| 3 |
+
"version": "0.33.5",
|
| 4 |
+
"description": "Prebuilt sharp for use with macOS x64",
|
| 5 |
+
"author": "Lovell Fuller <npm@lovell.info>",
|
| 6 |
+
"homepage": "https://sharp.pixelplumbing.com",
|
| 7 |
+
"repository": {
|
| 8 |
+
"type": "git",
|
| 9 |
+
"url": "git+https://github.com/lovell/sharp.git",
|
| 10 |
+
"directory": "npm/darwin-x64"
|
| 11 |
+
},
|
| 12 |
+
"license": "Apache-2.0",
|
| 13 |
+
"funding": {
|
| 14 |
+
"url": "https://opencollective.com/libvips"
|
| 15 |
+
},
|
| 16 |
+
"preferUnplugged": true,
|
| 17 |
+
"optionalDependencies": {
|
| 18 |
+
"@img/sharp-libvips-darwin-x64": "1.0.4"
|
| 19 |
+
},
|
| 20 |
+
"files": [
|
| 21 |
+
"lib"
|
| 22 |
+
],
|
| 23 |
+
"publishConfig": {
|
| 24 |
+
"access": "public"
|
| 25 |
+
},
|
| 26 |
+
"type": "commonjs",
|
| 27 |
+
"exports": {
|
| 28 |
+
"./sharp.node": "./lib/sharp-darwin-x64.node",
|
| 29 |
+
"./package": "./package.json"
|
| 30 |
+
},
|
| 31 |
+
"engines": {
|
| 32 |
+
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
|
| 33 |
+
},
|
| 34 |
+
"os": [
|
| 35 |
+
"darwin"
|
| 36 |
+
],
|
| 37 |
+
"cpu": [
|
| 38 |
+
"x64"
|
| 39 |
+
]
|
| 40 |
+
}
|
node_modules/@img/sharp-libvips-darwin-x64/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# `@img/sharp-libvips-darwin-x64`
|
| 2 |
+
|
| 3 |
+
Prebuilt libvips and dependencies for use with sharp on macOS x64.
|
| 4 |
+
|
| 5 |
+
## Licensing
|
| 6 |
+
|
| 7 |
+
This software contains third-party libraries
|
| 8 |
+
used under the terms of the following licences:
|
| 9 |
+
|
| 10 |
+
| Library | Used under the terms of |
|
| 11 |
+
|---------------|-----------------------------------------------------------------------------------------------------------|
|
| 12 |
+
| aom | BSD 2-Clause + [Alliance for Open Media Patent License 1.0](https://aomedia.org/license/patent-license/) |
|
| 13 |
+
| cairo | Mozilla Public License 2.0 |
|
| 14 |
+
| cgif | MIT Licence |
|
| 15 |
+
| expat | MIT Licence |
|
| 16 |
+
| fontconfig | [fontconfig Licence](https://gitlab.freedesktop.org/fontconfig/fontconfig/blob/main/COPYING) (BSD-like) |
|
| 17 |
+
| freetype | [freetype Licence](https://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/FTL.TXT) (BSD-like) |
|
| 18 |
+
| fribidi | LGPLv3 |
|
| 19 |
+
| glib | LGPLv3 |
|
| 20 |
+
| harfbuzz | MIT Licence |
|
| 21 |
+
| highway | Apache-2.0 License, BSD 3-Clause |
|
| 22 |
+
| lcms | MIT Licence |
|
| 23 |
+
| libarchive | BSD 2-Clause |
|
| 24 |
+
| libexif | LGPLv3 |
|
| 25 |
+
| libffi | MIT Licence |
|
| 26 |
+
| libheif | LGPLv3 |
|
| 27 |
+
| libimagequant | [BSD 2-Clause](https://github.com/lovell/libimagequant/blob/main/COPYRIGHT) |
|
| 28 |
+
| libnsgif | MIT Licence |
|
| 29 |
+
| libpng | [libpng License](https://github.com/pnggroup/libpng/blob/master/LICENSE) |
|
| 30 |
+
| librsvg | LGPLv3 |
|
| 31 |
+
| libspng | [BSD 2-Clause, libpng License](https://github.com/randy408/libspng/blob/master/LICENSE) |
|
| 32 |
+
| libtiff | [libtiff License](https://gitlab.com/libtiff/libtiff/blob/master/LICENSE.md) (BSD-like) |
|
| 33 |
+
| libvips | LGPLv3 |
|
| 34 |
+
| libwebp | New BSD License |
|
| 35 |
+
| libxml2 | MIT Licence |
|
| 36 |
+
| mozjpeg | [zlib License, IJG License, BSD-3-Clause](https://github.com/mozilla/mozjpeg/blob/master/LICENSE.md) |
|
| 37 |
+
| pango | LGPLv3 |
|
| 38 |
+
| pixman | MIT Licence |
|
| 39 |
+
| proxy-libintl | LGPLv3 |
|
| 40 |
+
| zlib-ng | [zlib Licence](https://github.com/zlib-ng/zlib-ng/blob/develop/LICENSE.md) |
|
| 41 |
+
|
| 42 |
+
Use of libraries under the terms of the LGPLv3 is via the
|
| 43 |
+
"any later version" clause of the LGPLv2 or LGPLv2.1.
|
| 44 |
+
|
| 45 |
+
Please report any errors or omissions via
|
| 46 |
+
https://github.com/lovell/sharp-libvips/issues/new
|
node_modules/@img/sharp-libvips-darwin-x64/lib/glib-2.0/include/glibconfig.h
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* glibconfig.h
|
| 2 |
+
*
|
| 3 |
+
* This is a generated file. Please modify 'glibconfig.h.in'
|
| 4 |
+
*/
|
| 5 |
+
|
| 6 |
+
#ifndef __GLIBCONFIG_H__
|
| 7 |
+
#define __GLIBCONFIG_H__
|
| 8 |
+
|
| 9 |
+
#include <glib/gmacros.h>
|
| 10 |
+
|
| 11 |
+
#include <limits.h>
|
| 12 |
+
#include <float.h>
|
| 13 |
+
#define GLIB_HAVE_ALLOCA_H
|
| 14 |
+
|
| 15 |
+
#define GLIB_STATIC_COMPILATION 1
|
| 16 |
+
#define GOBJECT_STATIC_COMPILATION 1
|
| 17 |
+
#define GIO_STATIC_COMPILATION 1
|
| 18 |
+
#define GMODULE_STATIC_COMPILATION 1
|
| 19 |
+
#define GI_STATIC_COMPILATION 1
|
| 20 |
+
#define G_INTL_STATIC_COMPILATION 1
|
| 21 |
+
#define FFI_STATIC_BUILD 1
|
| 22 |
+
|
| 23 |
+
/* Specifies that GLib's g_print*() functions wrap the
|
| 24 |
+
* system printf functions. This is useful to know, for example,
|
| 25 |
+
* when using glibc's register_printf_function().
|
| 26 |
+
*/
|
| 27 |
+
#define GLIB_USING_SYSTEM_PRINTF
|
| 28 |
+
|
| 29 |
+
G_BEGIN_DECLS
|
| 30 |
+
|
| 31 |
+
#define G_MINFLOAT FLT_MIN
|
| 32 |
+
#define G_MAXFLOAT FLT_MAX
|
| 33 |
+
#define G_MINDOUBLE DBL_MIN
|
| 34 |
+
#define G_MAXDOUBLE DBL_MAX
|
| 35 |
+
#define G_MINSHORT SHRT_MIN
|
| 36 |
+
#define G_MAXSHORT SHRT_MAX
|
| 37 |
+
#define G_MAXUSHORT USHRT_MAX
|
| 38 |
+
#define G_MININT INT_MIN
|
| 39 |
+
#define G_MAXINT INT_MAX
|
| 40 |
+
#define G_MAXUINT UINT_MAX
|
| 41 |
+
#define G_MINLONG LONG_MIN
|
| 42 |
+
#define G_MAXLONG LONG_MAX
|
| 43 |
+
#define G_MAXULONG ULONG_MAX
|
| 44 |
+
|
| 45 |
+
typedef signed char gint8;
|
| 46 |
+
typedef unsigned char guint8;
|
| 47 |
+
|
| 48 |
+
typedef signed short gint16;
|
| 49 |
+
typedef unsigned short guint16;
|
| 50 |
+
|
| 51 |
+
#define G_GINT16_MODIFIER "h"
|
| 52 |
+
#define G_GINT16_FORMAT "hi"
|
| 53 |
+
#define G_GUINT16_FORMAT "hu"
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
typedef signed int gint32;
|
| 57 |
+
typedef unsigned int guint32;
|
| 58 |
+
|
| 59 |
+
#define G_GINT32_MODIFIER ""
|
| 60 |
+
#define G_GINT32_FORMAT "i"
|
| 61 |
+
#define G_GUINT32_FORMAT "u"
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
#define G_HAVE_GINT64 1 /* deprecated, always true */
|
| 65 |
+
|
| 66 |
+
G_GNUC_EXTENSION typedef signed long long gint64;
|
| 67 |
+
G_GNUC_EXTENSION typedef unsigned long long guint64;
|
| 68 |
+
|
| 69 |
+
#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL))
|
| 70 |
+
#define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL))
|
| 71 |
+
|
| 72 |
+
#define G_GINT64_MODIFIER "ll"
|
| 73 |
+
#define G_GINT64_FORMAT "lli"
|
| 74 |
+
#define G_GUINT64_FORMAT "llu"
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
#define GLIB_SIZEOF_VOID_P 8
|
| 78 |
+
#define GLIB_SIZEOF_LONG 8
|
| 79 |
+
#define GLIB_SIZEOF_SIZE_T 8
|
| 80 |
+
#define GLIB_SIZEOF_SSIZE_T 8
|
| 81 |
+
|
| 82 |
+
typedef signed long gssize;
|
| 83 |
+
typedef unsigned long gsize;
|
| 84 |
+
#define G_GSIZE_MODIFIER "l"
|
| 85 |
+
#define G_GSSIZE_MODIFIER "l"
|
| 86 |
+
#define G_GSIZE_FORMAT "lu"
|
| 87 |
+
#define G_GSSIZE_FORMAT "li"
|
| 88 |
+
|
| 89 |
+
#define G_MAXSIZE G_MAXULONG
|
| 90 |
+
#define G_MINSSIZE G_MINLONG
|
| 91 |
+
#define G_MAXSSIZE G_MAXLONG
|
| 92 |
+
|
| 93 |
+
typedef gint64 goffset;
|
| 94 |
+
#define G_MINOFFSET G_MININT64
|
| 95 |
+
#define G_MAXOFFSET G_MAXINT64
|
| 96 |
+
|
| 97 |
+
#define G_GOFFSET_MODIFIER G_GINT64_MODIFIER
|
| 98 |
+
#define G_GOFFSET_FORMAT G_GINT64_FORMAT
|
| 99 |
+
#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
|
| 100 |
+
|
| 101 |
+
#define G_POLLFD_FORMAT "%d"
|
| 102 |
+
|
| 103 |
+
#define GPOINTER_TO_INT(p) ((gint) (glong) (p))
|
| 104 |
+
#define GPOINTER_TO_UINT(p) ((guint) (gulong) (p))
|
| 105 |
+
|
| 106 |
+
#define GINT_TO_POINTER(i) ((gpointer) (glong) (i))
|
| 107 |
+
#define GUINT_TO_POINTER(u) ((gpointer) (gulong) (u))
|
| 108 |
+
|
| 109 |
+
typedef signed long gintptr;
|
| 110 |
+
typedef unsigned long guintptr;
|
| 111 |
+
|
| 112 |
+
#define G_GINTPTR_MODIFIER "l"
|
| 113 |
+
#define G_GINTPTR_FORMAT "li"
|
| 114 |
+
#define G_GUINTPTR_FORMAT "lu"
|
| 115 |
+
|
| 116 |
+
#define GLIB_MAJOR_VERSION 2
|
| 117 |
+
#define GLIB_MINOR_VERSION 81
|
| 118 |
+
#define GLIB_MICRO_VERSION 1
|
| 119 |
+
|
| 120 |
+
#define G_OS_UNIX
|
| 121 |
+
|
| 122 |
+
#define G_VA_COPY va_copy
|
| 123 |
+
|
| 124 |
+
#define G_VA_COPY_AS_ARRAY 1
|
| 125 |
+
|
| 126 |
+
#define G_HAVE_ISO_VARARGS 1
|
| 127 |
+
|
| 128 |
+
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
|
| 129 |
+
* is passed ISO vararg support is turned off, and there is no work
|
| 130 |
+
* around to turn it on, so we unconditionally turn it off.
|
| 131 |
+
*/
|
| 132 |
+
#if __GNUC__ == 2 && __GNUC_MINOR__ == 95
|
| 133 |
+
# undef G_HAVE_ISO_VARARGS
|
| 134 |
+
#endif
|
| 135 |
+
|
| 136 |
+
#define G_HAVE_GROWING_STACK 0
|
| 137 |
+
|
| 138 |
+
#ifndef _MSC_VER
|
| 139 |
+
# define G_HAVE_GNUC_VARARGS 1
|
| 140 |
+
#endif
|
| 141 |
+
|
| 142 |
+
#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
|
| 143 |
+
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
| 144 |
+
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
|
| 145 |
+
#define G_GNUC_INTERNAL __hidden
|
| 146 |
+
#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
|
| 147 |
+
#define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
|
| 148 |
+
#else
|
| 149 |
+
#define G_GNUC_INTERNAL
|
| 150 |
+
#endif
|
| 151 |
+
|
| 152 |
+
#define G_THREADS_ENABLED
|
| 153 |
+
#define G_THREADS_IMPL_POSIX
|
| 154 |
+
|
| 155 |
+
#define G_ATOMIC_LOCK_FREE
|
| 156 |
+
|
| 157 |
+
#define GINT16_TO_LE(val) ((gint16) (val))
|
| 158 |
+
#define GUINT16_TO_LE(val) ((guint16) (val))
|
| 159 |
+
#define GINT16_TO_BE(val) ((gint16) GUINT16_SWAP_LE_BE (val))
|
| 160 |
+
#define GUINT16_TO_BE(val) (GUINT16_SWAP_LE_BE (val))
|
| 161 |
+
|
| 162 |
+
#define GINT32_TO_LE(val) ((gint32) (val))
|
| 163 |
+
#define GUINT32_TO_LE(val) ((guint32) (val))
|
| 164 |
+
#define GINT32_TO_BE(val) ((gint32) GUINT32_SWAP_LE_BE (val))
|
| 165 |
+
#define GUINT32_TO_BE(val) (GUINT32_SWAP_LE_BE (val))
|
| 166 |
+
|
| 167 |
+
#define GINT64_TO_LE(val) ((gint64) (val))
|
| 168 |
+
#define GUINT64_TO_LE(val) ((guint64) (val))
|
| 169 |
+
#define GINT64_TO_BE(val) ((gint64) GUINT64_SWAP_LE_BE (val))
|
| 170 |
+
#define GUINT64_TO_BE(val) (GUINT64_SWAP_LE_BE (val))
|
| 171 |
+
|
| 172 |
+
#define GLONG_TO_LE(val) ((glong) GINT64_TO_LE (val))
|
| 173 |
+
#define GULONG_TO_LE(val) ((gulong) GUINT64_TO_LE (val))
|
| 174 |
+
#define GLONG_TO_BE(val) ((glong) GINT64_TO_BE (val))
|
| 175 |
+
#define GULONG_TO_BE(val) ((gulong) GUINT64_TO_BE (val))
|
| 176 |
+
#define GINT_TO_LE(val) ((gint) GINT32_TO_LE (val))
|
| 177 |
+
#define GUINT_TO_LE(val) ((guint) GUINT32_TO_LE (val))
|
| 178 |
+
#define GINT_TO_BE(val) ((gint) GINT32_TO_BE (val))
|
| 179 |
+
#define GUINT_TO_BE(val) ((guint) GUINT32_TO_BE (val))
|
| 180 |
+
#define GSIZE_TO_LE(val) ((gsize) GUINT64_TO_LE (val))
|
| 181 |
+
#define GSSIZE_TO_LE(val) ((gssize) GINT64_TO_LE (val))
|
| 182 |
+
#define GSIZE_TO_BE(val) ((gsize) GUINT64_TO_BE (val))
|
| 183 |
+
#define GSSIZE_TO_BE(val) ((gssize) GINT64_TO_BE (val))
|
| 184 |
+
#define G_BYTE_ORDER G_LITTLE_ENDIAN
|
| 185 |
+
|
| 186 |
+
#define GLIB_SYSDEF_POLLIN =1
|
| 187 |
+
#define GLIB_SYSDEF_POLLOUT =4
|
| 188 |
+
#define GLIB_SYSDEF_POLLPRI =2
|
| 189 |
+
#define GLIB_SYSDEF_POLLHUP =16
|
| 190 |
+
#define GLIB_SYSDEF_POLLERR =8
|
| 191 |
+
#define GLIB_SYSDEF_POLLNVAL =32
|
| 192 |
+
|
| 193 |
+
/* No way to disable deprecation warnings for macros, so only emit deprecation
|
| 194 |
+
* warnings on platforms where usage of this macro is broken */
|
| 195 |
+
#if defined(__APPLE__) || defined(_MSC_VER) || defined(__CYGWIN__)
|
| 196 |
+
#define G_MODULE_SUFFIX "so" GLIB_DEPRECATED_MACRO_IN_2_76
|
| 197 |
+
#else
|
| 198 |
+
#define G_MODULE_SUFFIX "so"
|
| 199 |
+
#endif
|
| 200 |
+
|
| 201 |
+
typedef int GPid;
|
| 202 |
+
#define G_PID_FORMAT "i"
|
| 203 |
+
|
| 204 |
+
#define GLIB_SYSDEF_AF_UNIX 1
|
| 205 |
+
#define GLIB_SYSDEF_AF_INET 2
|
| 206 |
+
#define GLIB_SYSDEF_AF_INET6 30
|
| 207 |
+
|
| 208 |
+
#define GLIB_SYSDEF_MSG_OOB 1
|
| 209 |
+
#define GLIB_SYSDEF_MSG_PEEK 2
|
| 210 |
+
#define GLIB_SYSDEF_MSG_DONTROUTE 4
|
| 211 |
+
|
| 212 |
+
#define G_DIR_SEPARATOR '/'
|
| 213 |
+
#define G_DIR_SEPARATOR_S "/"
|
| 214 |
+
#define G_SEARCHPATH_SEPARATOR ':'
|
| 215 |
+
#define G_SEARCHPATH_SEPARATOR_S ":"
|
| 216 |
+
|
| 217 |
+
#undef G_HAVE_FREE_SIZED
|
| 218 |
+
|
| 219 |
+
G_END_DECLS
|
| 220 |
+
|
| 221 |
+
#endif /* __GLIBCONFIG_H__ */
|
node_modules/@img/sharp-libvips-darwin-x64/lib/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
module.exports = __dirname;
|
node_modules/@img/sharp-libvips-darwin-x64/lib/libvips-cpp.42.dylib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:abd2783a73b054229e1e2d99968ed1482246b52173cd09ed87f8aa8e4895532f
|
| 3 |
+
size 18158608
|
node_modules/@img/sharp-libvips-darwin-x64/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "@img/sharp-libvips-darwin-x64",
|
| 3 |
+
"version": "1.0.4",
|
| 4 |
+
"description": "Prebuilt libvips and dependencies for use with sharp on macOS x64",
|
| 5 |
+
"author": "Lovell Fuller <npm@lovell.info>",
|
| 6 |
+
"homepage": "https://sharp.pixelplumbing.com",
|
| 7 |
+
"repository": {
|
| 8 |
+
"type": "git",
|
| 9 |
+
"url": "git+https://github.com/lovell/sharp-libvips.git",
|
| 10 |
+
"directory": "npm/darwin-x64"
|
| 11 |
+
},
|
| 12 |
+
"license": "LGPL-3.0-or-later",
|
| 13 |
+
"funding": {
|
| 14 |
+
"url": "https://opencollective.com/libvips"
|
| 15 |
+
},
|
| 16 |
+
"preferUnplugged": true,
|
| 17 |
+
"publishConfig": {
|
| 18 |
+
"access": "public"
|
| 19 |
+
},
|
| 20 |
+
"files": [
|
| 21 |
+
"lib",
|
| 22 |
+
"versions.json"
|
| 23 |
+
],
|
| 24 |
+
"type": "commonjs",
|
| 25 |
+
"exports": {
|
| 26 |
+
"./lib": "./lib/index.js",
|
| 27 |
+
"./package": "./package.json",
|
| 28 |
+
"./versions": "./versions.json"
|
| 29 |
+
},
|
| 30 |
+
"os": [
|
| 31 |
+
"darwin"
|
| 32 |
+
],
|
| 33 |
+
"cpu": [
|
| 34 |
+
"x64"
|
| 35 |
+
]
|
| 36 |
+
}
|
node_modules/@img/sharp-libvips-darwin-x64/versions.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"aom": "3.9.1",
|
| 3 |
+
"archive": "3.7.4",
|
| 4 |
+
"cairo": "1.18.0",
|
| 5 |
+
"cgif": "0.4.1",
|
| 6 |
+
"exif": "0.6.24",
|
| 7 |
+
"expat": "2.6.2",
|
| 8 |
+
"ffi": "3.4.6",
|
| 9 |
+
"fontconfig": "2.15.0",
|
| 10 |
+
"freetype": "2.13.2",
|
| 11 |
+
"fribidi": "1.0.15",
|
| 12 |
+
"glib": "2.81.1",
|
| 13 |
+
"harfbuzz": "9.0.0",
|
| 14 |
+
"heif": "1.18.2",
|
| 15 |
+
"highway": "1.2.0",
|
| 16 |
+
"imagequant": "2.4.1",
|
| 17 |
+
"lcms": "2.16",
|
| 18 |
+
"mozjpeg": "4.1.5",
|
| 19 |
+
"pango": "1.54.0",
|
| 20 |
+
"pixman": "0.43.4",
|
| 21 |
+
"png": "1.6.43",
|
| 22 |
+
"proxy-libintl": "0.4",
|
| 23 |
+
"rsvg": "2.58.93",
|
| 24 |
+
"spng": "0.7.4",
|
| 25 |
+
"tiff": "4.6.0",
|
| 26 |
+
"vips": "8.15.3",
|
| 27 |
+
"webp": "1.4.0",
|
| 28 |
+
"xml": "2.13.3",
|
| 29 |
+
"zlib-ng": "2.2.1"
|
| 30 |
+
}
|
node_modules/@next/env/README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# `@next/env`
|
| 2 |
+
|
| 3 |
+
Next.js' util for loading dotenv files in with the proper priorities
|
node_modules/@next/env/dist/index.d.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
export type Env = {
|
| 2 |
+
[key: string]: string | undefined;
|
| 3 |
+
};
|
| 4 |
+
export type LoadedEnvFiles = Array<{
|
| 5 |
+
path: string;
|
| 6 |
+
contents: string;
|
| 7 |
+
env: Env;
|
| 8 |
+
}>;
|
| 9 |
+
export declare let initialEnv: Env | undefined;
|
| 10 |
+
export declare function updateInitialEnv(newEnv: Env): void;
|
| 11 |
+
type Log = {
|
| 12 |
+
info: (...args: any[]) => void;
|
| 13 |
+
error: (...args: any[]) => void;
|
| 14 |
+
};
|
| 15 |
+
export declare function processEnv(loadedEnvFiles: LoadedEnvFiles, dir?: string, log?: Log, forceReload?: boolean, onReload?: (envFilePath: string) => void): Env[];
|
| 16 |
+
export declare function resetEnv(): void;
|
| 17 |
+
export declare function loadEnvConfig(dir: string, dev?: boolean, log?: Log, forceReload?: boolean, onReload?: (envFilePath: string) => void): {
|
| 18 |
+
combinedEnv: Env;
|
| 19 |
+
parsedEnv: Env | undefined;
|
| 20 |
+
loadedEnvFiles: LoadedEnvFiles;
|
| 21 |
+
};
|
| 22 |
+
export {};
|
node_modules/@next/env/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
(()=>{var e={383:e=>{"use strict";function _searchLast(e,t){const n=Array.from(e.matchAll(t));return n.length>0?n.slice(-1)[0].index:-1}function _interpolate(e,t,n){const r=_searchLast(e,/(?!(?<=\\))\$/g);if(r===-1)return e;const o=e.slice(r);const s=/((?!(?<=\\))\${?([\w]+)(?::-([^}\\]*))?}?)/;const i=o.match(s);if(i!=null){const[,r,o,s]=i;return _interpolate(e.replace(r,t[o]||s||n.parsed[o]||""),t,n)}return e}function _resolveEscapeSequences(e){return e.replace(/\\\$/g,"$")}function expand(e){const t=e.ignoreProcessEnv?{}:process.env;for(const n in e.parsed){const r=Object.prototype.hasOwnProperty.call(t,n)?t[n]:e.parsed[n];e.parsed[n]=_resolveEscapeSequences(_interpolate(r,t,e))}for(const n in e.parsed){t[n]=e.parsed[n]}return e}e.exports.j=expand},234:(e,t,n)=>{const r=n(147);const o=n(17);const s=n(37);const i=n(113);const c=n(803);const a=c.version;const p=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;function parse(e){const t={};let n=e.toString();n=n.replace(/\r\n?/gm,"\n");let r;while((r=p.exec(n))!=null){const e=r[1];let n=r[2]||"";n=n.trim();const o=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/gm,"$2");if(o==='"'){n=n.replace(/\\n/g,"\n");n=n.replace(/\\r/g,"\r")}t[e]=n}return t}function _parseVault(e){const t=_vaultPath(e);const n=l.configDotenv({path:t});if(!n.parsed){throw new Error(`MISSING_DATA: Cannot parse ${t} for an unknown reason`)}const r=_dotenvKey(e).split(",");const o=r.length;let s;for(let e=0;e<o;e++){try{const t=r[e].trim();const o=_instructions(n,t);s=l.decrypt(o.ciphertext,o.key);break}catch(t){if(e+1>=o){throw t}}}return l.parse(s)}function _log(e){console.log(`[dotenv@${a}][INFO] ${e}`)}function _warn(e){console.log(`[dotenv@${a}][WARN] ${e}`)}function _debug(e){console.log(`[dotenv@${a}][DEBUG] ${e}`)}function _dotenvKey(e){if(e&&e.DOTENV_KEY&&e.DOTENV_KEY.length>0){return e.DOTENV_KEY}if(process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0){return process.env.DOTENV_KEY}return""}function _instructions(e,t){let n;try{n=new URL(t)}catch(e){if(e.code==="ERR_INVALID_URL"){throw new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development")}throw e}const r=n.password;if(!r){throw new Error("INVALID_DOTENV_KEY: Missing key part")}const o=n.searchParams.get("environment");if(!o){throw new Error("INVALID_DOTENV_KEY: Missing environment part")}const s=`DOTENV_VAULT_${o.toUpperCase()}`;const i=e.parsed[s];if(!i){throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${s} in your .env.vault file.`)}return{ciphertext:i,key:r}}function _vaultPath(e){let t=o.resolve(process.cwd(),".env");if(e&&e.path&&e.path.length>0){t=e.path}return t.endsWith(".vault")?t:`${t}.vault`}function _resolveHome(e){return e[0]==="~"?o.join(s.homedir(),e.slice(1)):e}function _configVault(e){_log("Loading env from encrypted .env.vault");const t=l._parseVault(e);let n=process.env;if(e&&e.processEnv!=null){n=e.processEnv}l.populate(n,t,e);return{parsed:t}}function configDotenv(e){let t=o.resolve(process.cwd(),".env");let n="utf8";const s=Boolean(e&&e.debug);if(e){if(e.path!=null){t=_resolveHome(e.path)}if(e.encoding!=null){n=e.encoding}}try{const o=l.parse(r.readFileSync(t,{encoding:n}));let s=process.env;if(e&&e.processEnv!=null){s=e.processEnv}l.populate(s,o,e);return{parsed:o}}catch(e){if(s){_debug(`Failed to load ${t} ${e.message}`)}return{error:e}}}function config(e){const t=_vaultPath(e);if(_dotenvKey(e).length===0){return l.configDotenv(e)}if(!r.existsSync(t)){_warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${t}. Did you forget to build it?`);return l.configDotenv(e)}return l._configVault(e)}function decrypt(e,t){const n=Buffer.from(t.slice(-64),"hex");let r=Buffer.from(e,"base64");const o=r.slice(0,12);const s=r.slice(-16);r=r.slice(12,-16);try{const e=i.createDecipheriv("aes-256-gcm",n,o);e.setAuthTag(s);return`${e.update(r)}${e.final()}`}catch(e){const t=e instanceof RangeError;const n=e.message==="Invalid key length";const r=e.message==="Unsupported state or unable to authenticate data";if(t||n){const e="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(e)}else if(r){const e="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(e)}else{console.error("Error: ",e.code);console.error("Error: ",e.message);throw e}}}function populate(e,t,n={}){const r=Boolean(n&&n.debug);const o=Boolean(n&&n.override);if(typeof t!=="object"){throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate")}for(const n of Object.keys(t)){if(Object.prototype.hasOwnProperty.call(e,n)){if(o===true){e[n]=t[n]}if(r){if(o===true){_debug(`"${n}" is already defined and WAS overwritten`)}else{_debug(`"${n}" is already defined and was NOT overwritten`)}}}else{e[n]=t[n]}}}const l={configDotenv:configDotenv,_configVault:_configVault,_parseVault:_parseVault,config:config,decrypt:decrypt,parse:parse,populate:populate};e.exports.configDotenv=l.configDotenv;e.exports._configVault=l._configVault;e.exports._parseVault=l._parseVault;e.exports.config=l.config;e.exports.decrypt=l.decrypt;e.exports.parse=l.parse;e.exports.populate=l.populate;e.exports=l},113:e=>{"use strict";e.exports=require("crypto")},147:e=>{"use strict";e.exports=require("fs")},37:e=>{"use strict";e.exports=require("os")},17:e=>{"use strict";e.exports=require("path")},803:e=>{"use strict";e.exports=JSON.parse('{"name":"dotenv","version":"16.3.1","description":"Loads environment variables from .env file","main":"lib/main.js","types":"lib/main.d.ts","exports":{".":{"types":"./lib/main.d.ts","require":"./lib/main.js","default":"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},"scripts":{"dts-check":"tsc --project tests/types/tsconfig.json","lint":"standard","lint-readme":"standard-markdown","pretest":"npm run lint && npm run dts-check","test":"tap tests/*.js --100 -Rspec","prerelease":"npm test","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/motdotla/dotenv.git"},"funding":"https://github.com/motdotla/dotenv?sponsor=1","keywords":["dotenv","env",".env","environment","variables","config","settings"],"readmeFilename":"README.md","license":"BSD-2-Clause","devDependencies":{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3","decache":"^4.6.1","sinon":"^14.0.1","standard":"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0","tap":"^16.3.0","tar":"^6.1.11","typescript":"^4.8.4"},"engines":{"node":">=12"},"browser":{"fs":false}}')}};var t={};function __nccwpck_require__(n){var r=t[n];if(r!==undefined){return r.exports}var o=t[n]={exports:{}};var s=true;try{e[n](o,o.exports,__nccwpck_require__);s=false}finally{if(s)delete t[n]}return o.exports}(()=>{__nccwpck_require__.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;__nccwpck_require__.d(t,{a:t});return t}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var n in t){if(__nccwpck_require__.o(t,n)&&!__nccwpck_require__.o(e,n)){Object.defineProperty(e,n,{enumerable:true,get:t[n]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n={};(()=>{"use strict";__nccwpck_require__.r(n);__nccwpck_require__.d(n,{initialEnv:()=>a,updateInitialEnv:()=>updateInitialEnv,processEnv:()=>processEnv,resetEnv:()=>resetEnv,loadEnvConfig:()=>loadEnvConfig});var e=__nccwpck_require__(147);var t=__nccwpck_require__.n(e);var r=__nccwpck_require__(17);var o=__nccwpck_require__.n(r);var s=__nccwpck_require__(234);var i=__nccwpck_require__.n(s);var c=__nccwpck_require__(383);let a=undefined;let p=undefined;let l=undefined;let u=[];let _=[];function updateInitialEnv(e){Object.assign(a||{},e)}function replaceProcessEnv(e){Object.keys(process.env).forEach((t=>{if(!t.startsWith("__NEXT_PRIVATE")){if(e[t]===undefined||e[t]===""){delete process.env[t]}}}));Object.entries(e).forEach((([e,t])=>{process.env[e]=t}))}function processEnv(e,t,n=console,o=false,i){var p;if(!a){a=Object.assign({},process.env)}if(!o&&(process.env.__NEXT_PROCESSED_ENV||e.length===0)){return[process.env]}process.env.__NEXT_PROCESSED_ENV="true";const l=Object.assign({},a);const u={};for(const o of e){try{let e={};e.parsed=s.parse(o.contents);e=(0,c.j)(e);if(e.parsed&&!_.some((e=>e.contents===o.contents&&e.path===o.path))){i===null||i===void 0?void 0:i(o.path)}for(const t of Object.keys(e.parsed||{})){if(typeof u[t]==="undefined"&&typeof l[t]==="undefined"){u[t]=(p=e.parsed)===null||p===void 0?void 0:p[t]}}o.env=e.parsed||{}}catch(e){n.error(`Failed to load env from ${r.join(t||"",o.path)}`,e)}}return[Object.assign(process.env,u),u]}function resetEnv(){if(a){replaceProcessEnv(a)}}function loadEnvConfig(t,n,o=console,s=false,i){if(!a){a=Object.assign({},process.env)}if(p&&!s){return{combinedEnv:p,parsedEnv:l,loadedEnvFiles:u}}replaceProcessEnv(a);_=u;u=[];const c=process.env.NODE_ENV==="test";const d=c?"test":n?"development":"production";const f=[`.env.${d}.local`,d!=="test"&&`.env.local`,`.env.${d}`,".env"].filter(Boolean);for(const n of f){const s=r.join(t,n);try{const t=e.statSync(s);if(!t.isFile()&&!t.isFIFO()){continue}const r=e.readFileSync(s,"utf8");u.push({path:n,contents:r,env:{}})}catch(e){if(e.code!=="ENOENT"){o.error(`Failed to load env from ${n}`,e)}}}[p,l]=processEnv(u,t,o,s,i);return{combinedEnv:p,parsedEnv:l,loadedEnvFiles:u}}})();module.exports=n})();
|
node_modules/@next/env/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "@next/env",
|
| 3 |
+
"version": "15.2.2",
|
| 4 |
+
"keywords": [
|
| 5 |
+
"react",
|
| 6 |
+
"next",
|
| 7 |
+
"next.js",
|
| 8 |
+
"dotenv"
|
| 9 |
+
],
|
| 10 |
+
"description": "Next.js dotenv file loading",
|
| 11 |
+
"repository": {
|
| 12 |
+
"type": "git",
|
| 13 |
+
"url": "https://github.com/vercel/next.js",
|
| 14 |
+
"directory": "packages/next-env"
|
| 15 |
+
},
|
| 16 |
+
"author": "Next.js Team <support@vercel.com>",
|
| 17 |
+
"license": "MIT",
|
| 18 |
+
"main": "dist/index.js",
|
| 19 |
+
"types": "dist/index.d.ts",
|
| 20 |
+
"files": [
|
| 21 |
+
"dist"
|
| 22 |
+
],
|
| 23 |
+
"scripts": {
|
| 24 |
+
"dev": "ncc build ./index.ts -w -o dist/",
|
| 25 |
+
"prerelease": "node ../../scripts/rm.mjs dist",
|
| 26 |
+
"types": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
|
| 27 |
+
"release": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register",
|
| 28 |
+
"build": "pnpm release && pnpm types",
|
| 29 |
+
"prepublishOnly": "cd ../../ && turbo run build"
|
| 30 |
+
},
|
| 31 |
+
"devDependencies": {
|
| 32 |
+
"@vercel/ncc": "0.34.0",
|
| 33 |
+
"dotenv": "16.3.1",
|
| 34 |
+
"dotenv-expand": "10.0.0"
|
| 35 |
+
}
|
| 36 |
+
}
|
node_modules/@next/eslint-plugin-next/README.md
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# `@next/eslint-plugin-next`
|
| 2 |
+
|
| 3 |
+
Documentation for `@next/eslint-plugin-next` can be found at:
|
| 4 |
+
https://nextjs.org/docs/app/api-reference/config/eslint
|
node_modules/@next/eslint-plugin-next/dist/index.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
module.exports = {
|
| 3 |
+
rules: {
|
| 4 |
+
'google-font-display': require('./rules/google-font-display'),
|
| 5 |
+
'google-font-preconnect': require('./rules/google-font-preconnect'),
|
| 6 |
+
'inline-script-id': require('./rules/inline-script-id'),
|
| 7 |
+
'next-script-for-ga': require('./rules/next-script-for-ga'),
|
| 8 |
+
'no-assign-module-variable': require('./rules/no-assign-module-variable'),
|
| 9 |
+
'no-async-client-component': require('./rules/no-async-client-component'),
|
| 10 |
+
'no-before-interactive-script-outside-document': require('./rules/no-before-interactive-script-outside-document'),
|
| 11 |
+
'no-css-tags': require('./rules/no-css-tags'),
|
| 12 |
+
'no-document-import-in-page': require('./rules/no-document-import-in-page'),
|
| 13 |
+
'no-duplicate-head': require('./rules/no-duplicate-head'),
|
| 14 |
+
'no-head-element': require('./rules/no-head-element'),
|
| 15 |
+
'no-head-import-in-document': require('./rules/no-head-import-in-document'),
|
| 16 |
+
'no-html-link-for-pages': require('./rules/no-html-link-for-pages'),
|
| 17 |
+
'no-img-element': require('./rules/no-img-element'),
|
| 18 |
+
'no-page-custom-font': require('./rules/no-page-custom-font'),
|
| 19 |
+
'no-script-component-in-head': require('./rules/no-script-component-in-head'),
|
| 20 |
+
'no-styled-jsx-in-document': require('./rules/no-styled-jsx-in-document'),
|
| 21 |
+
'no-sync-scripts': require('./rules/no-sync-scripts'),
|
| 22 |
+
'no-title-in-document-head': require('./rules/no-title-in-document-head'),
|
| 23 |
+
'no-typos': require('./rules/no-typos'),
|
| 24 |
+
'no-unwanted-polyfillio': require('./rules/no-unwanted-polyfillio')
|
| 25 |
+
},
|
| 26 |
+
configs: {
|
| 27 |
+
recommended: {
|
| 28 |
+
plugins: [
|
| 29 |
+
'@next/next'
|
| 30 |
+
],
|
| 31 |
+
rules: {
|
| 32 |
+
// warnings
|
| 33 |
+
'@next/next/google-font-display': 'warn',
|
| 34 |
+
'@next/next/google-font-preconnect': 'warn',
|
| 35 |
+
'@next/next/next-script-for-ga': 'warn',
|
| 36 |
+
'@next/next/no-async-client-component': 'warn',
|
| 37 |
+
'@next/next/no-before-interactive-script-outside-document': 'warn',
|
| 38 |
+
'@next/next/no-css-tags': 'warn',
|
| 39 |
+
'@next/next/no-head-element': 'warn',
|
| 40 |
+
'@next/next/no-html-link-for-pages': 'warn',
|
| 41 |
+
'@next/next/no-img-element': 'warn',
|
| 42 |
+
'@next/next/no-page-custom-font': 'warn',
|
| 43 |
+
'@next/next/no-styled-jsx-in-document': 'warn',
|
| 44 |
+
'@next/next/no-sync-scripts': 'warn',
|
| 45 |
+
'@next/next/no-title-in-document-head': 'warn',
|
| 46 |
+
'@next/next/no-typos': 'warn',
|
| 47 |
+
'@next/next/no-unwanted-polyfillio': 'warn',
|
| 48 |
+
// errors
|
| 49 |
+
'@next/next/inline-script-id': 'error',
|
| 50 |
+
'@next/next/no-assign-module-variable': 'error',
|
| 51 |
+
'@next/next/no-document-import-in-page': 'error',
|
| 52 |
+
'@next/next/no-duplicate-head': 'error',
|
| 53 |
+
'@next/next/no-head-import-in-document': 'error',
|
| 54 |
+
'@next/next/no-script-component-in-head': 'error'
|
| 55 |
+
}
|
| 56 |
+
},
|
| 57 |
+
'core-web-vitals': {
|
| 58 |
+
plugins: [
|
| 59 |
+
'@next/next'
|
| 60 |
+
],
|
| 61 |
+
extends: [
|
| 62 |
+
'plugin:@next/next/recommended'
|
| 63 |
+
],
|
| 64 |
+
rules: {
|
| 65 |
+
'@next/next/no-html-link-for-pages': 'error',
|
| 66 |
+
'@next/next/no-sync-scripts': 'error'
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
}
|
| 70 |
+
};
|
node_modules/@next/eslint-plugin-next/dist/rules/google-font-display.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var _nodeattributes = /*#__PURE__*/ _interop_require_default(require("../utils/node-attributes"));
|
| 4 |
+
function _interop_require_default(obj) {
|
| 5 |
+
return obj && obj.__esModule ? obj : {
|
| 6 |
+
default: obj
|
| 7 |
+
};
|
| 8 |
+
}
|
| 9 |
+
var url = 'https://nextjs.org/docs/messages/google-font-display';
|
| 10 |
+
module.exports = (0, _definerule.defineRule)({
|
| 11 |
+
meta: {
|
| 12 |
+
docs: {
|
| 13 |
+
description: 'Enforce font-display behavior with Google Fonts.',
|
| 14 |
+
recommended: true,
|
| 15 |
+
url: url
|
| 16 |
+
},
|
| 17 |
+
type: 'problem',
|
| 18 |
+
schema: []
|
| 19 |
+
},
|
| 20 |
+
create: function create(context) {
|
| 21 |
+
return {
|
| 22 |
+
JSXOpeningElement: function JSXOpeningElement(node) {
|
| 23 |
+
var message;
|
| 24 |
+
if (node.name.name !== 'link') {
|
| 25 |
+
return;
|
| 26 |
+
}
|
| 27 |
+
var attributes = new _nodeattributes.default(node);
|
| 28 |
+
if (!attributes.has('href') || !attributes.hasValue('href')) {
|
| 29 |
+
return;
|
| 30 |
+
}
|
| 31 |
+
var hrefValue = attributes.value('href');
|
| 32 |
+
var isGoogleFont = typeof hrefValue === 'string' && hrefValue.startsWith('https://fonts.googleapis.com/css');
|
| 33 |
+
if (isGoogleFont) {
|
| 34 |
+
var params = new URLSearchParams(hrefValue.split('?', 2)[1]);
|
| 35 |
+
var displayValue = params.get('display');
|
| 36 |
+
if (!params.has('display')) {
|
| 37 |
+
message = 'A font-display parameter is missing (adding `&display=optional` is recommended).';
|
| 38 |
+
} else if (displayValue === 'auto' || displayValue === 'block' || displayValue === 'fallback') {
|
| 39 |
+
message = "".concat(displayValue[0].toUpperCase() + displayValue.slice(1), " is not recommended.");
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
if (message) {
|
| 43 |
+
context.report({
|
| 44 |
+
node: node,
|
| 45 |
+
message: "".concat(message, " See: ").concat(url)
|
| 46 |
+
});
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
};
|
| 50 |
+
}
|
| 51 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/google-font-preconnect.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var _nodeattributes = /*#__PURE__*/ _interop_require_default(require("../utils/node-attributes"));
|
| 4 |
+
function _interop_require_default(obj) {
|
| 5 |
+
return obj && obj.__esModule ? obj : {
|
| 6 |
+
default: obj
|
| 7 |
+
};
|
| 8 |
+
}
|
| 9 |
+
var url = 'https://nextjs.org/docs/messages/google-font-preconnect';
|
| 10 |
+
module.exports = (0, _definerule.defineRule)({
|
| 11 |
+
meta: {
|
| 12 |
+
docs: {
|
| 13 |
+
description: 'Ensure `preconnect` is used with Google Fonts.',
|
| 14 |
+
recommended: true,
|
| 15 |
+
url: url
|
| 16 |
+
},
|
| 17 |
+
type: 'problem',
|
| 18 |
+
schema: []
|
| 19 |
+
},
|
| 20 |
+
create: function create(context) {
|
| 21 |
+
return {
|
| 22 |
+
JSXOpeningElement: function JSXOpeningElement(node) {
|
| 23 |
+
if (node.name.name !== 'link') {
|
| 24 |
+
return;
|
| 25 |
+
}
|
| 26 |
+
var attributes = new _nodeattributes.default(node);
|
| 27 |
+
if (!attributes.has('href') || !attributes.hasValue('href')) {
|
| 28 |
+
return;
|
| 29 |
+
}
|
| 30 |
+
var hrefValue = attributes.value('href');
|
| 31 |
+
var preconnectMissing = !attributes.has('rel') || !attributes.hasValue('rel') || attributes.value('rel') !== 'preconnect';
|
| 32 |
+
if (typeof hrefValue === 'string' && hrefValue.startsWith('https://fonts.gstatic.com') && preconnectMissing) {
|
| 33 |
+
context.report({
|
| 34 |
+
node: node,
|
| 35 |
+
message: '`rel="preconnect"` is missing from Google Font. See: '.concat(url)
|
| 36 |
+
});
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
};
|
| 40 |
+
}
|
| 41 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/inline-script-id.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var url = 'https://nextjs.org/docs/messages/inline-script-id';
|
| 4 |
+
module.exports = (0, _definerule.defineRule)({
|
| 5 |
+
meta: {
|
| 6 |
+
docs: {
|
| 7 |
+
description: 'Enforce `id` attribute on `next/script` components with inline content.',
|
| 8 |
+
recommended: true,
|
| 9 |
+
url: url
|
| 10 |
+
},
|
| 11 |
+
type: 'problem',
|
| 12 |
+
schema: []
|
| 13 |
+
},
|
| 14 |
+
create: function create(context) {
|
| 15 |
+
var nextScriptImportName = null;
|
| 16 |
+
return {
|
| 17 |
+
ImportDeclaration: function ImportDeclaration(node) {
|
| 18 |
+
if (node.source.value === 'next/script') {
|
| 19 |
+
nextScriptImportName = node.specifiers[0].local.name;
|
| 20 |
+
}
|
| 21 |
+
},
|
| 22 |
+
JSXElement: function JSXElement(node) {
|
| 23 |
+
if (nextScriptImportName == null) return;
|
| 24 |
+
if (node.openingElement && node.openingElement.name && node.openingElement.name.name !== nextScriptImportName) {
|
| 25 |
+
return;
|
| 26 |
+
}
|
| 27 |
+
var attributeNames = new Set();
|
| 28 |
+
var hasNonCheckableSpreadAttribute = false;
|
| 29 |
+
node.openingElement.attributes.forEach(function(attribute) {
|
| 30 |
+
// Early return if we already have a non-checkable spread attribute, for better performance
|
| 31 |
+
if (hasNonCheckableSpreadAttribute) return;
|
| 32 |
+
if (attribute.type === 'JSXAttribute') {
|
| 33 |
+
attributeNames.add(attribute.name.name);
|
| 34 |
+
} else if (attribute.type === 'JSXSpreadAttribute') {
|
| 35 |
+
if (attribute.argument && attribute.argument.properties) {
|
| 36 |
+
attribute.argument.properties.forEach(function(property) {
|
| 37 |
+
attributeNames.add(property.key.name);
|
| 38 |
+
});
|
| 39 |
+
} else {
|
| 40 |
+
// JSXSpreadAttribute without properties is not checkable
|
| 41 |
+
hasNonCheckableSpreadAttribute = true;
|
| 42 |
+
}
|
| 43 |
+
}
|
| 44 |
+
});
|
| 45 |
+
// https://github.com/vercel/next.js/issues/34030
|
| 46 |
+
// If there is a non-checkable spread attribute, we simply ignore them
|
| 47 |
+
if (hasNonCheckableSpreadAttribute) return;
|
| 48 |
+
if (node.children.length > 0 || attributeNames.has('dangerouslySetInnerHTML')) {
|
| 49 |
+
if (!attributeNames.has('id')) {
|
| 50 |
+
context.report({
|
| 51 |
+
node: node,
|
| 52 |
+
message: "`next/script` components with inline content must specify an `id` attribute. See: ".concat(url)
|
| 53 |
+
});
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
}
|
| 57 |
+
};
|
| 58 |
+
}
|
| 59 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/next-script-for-ga.js
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var _nodeattributes = /*#__PURE__*/ _interop_require_default(require("../utils/node-attributes"));
|
| 4 |
+
function _interop_require_default(obj) {
|
| 5 |
+
return obj && obj.__esModule ? obj : {
|
| 6 |
+
default: obj
|
| 7 |
+
};
|
| 8 |
+
}
|
| 9 |
+
var SUPPORTED_SRCS = [
|
| 10 |
+
'www.google-analytics.com/analytics.js',
|
| 11 |
+
'www.googletagmanager.com/gtag/js'
|
| 12 |
+
];
|
| 13 |
+
var SUPPORTED_HTML_CONTENT_URLS = [
|
| 14 |
+
'www.google-analytics.com/analytics.js',
|
| 15 |
+
'www.googletagmanager.com/gtm.js'
|
| 16 |
+
];
|
| 17 |
+
var description = 'Prefer `next/script` component when using the inline script for Google Analytics.';
|
| 18 |
+
var url = 'https://nextjs.org/docs/messages/next-script-for-ga';
|
| 19 |
+
var ERROR_MSG = "".concat(description, " See: ").concat(url);
|
| 20 |
+
// Check if one of the items in the list is a substring of the passed string
|
| 21 |
+
var containsStr = function(str, strList) {
|
| 22 |
+
return strList.some(function(s) {
|
| 23 |
+
return str.includes(s);
|
| 24 |
+
});
|
| 25 |
+
};
|
| 26 |
+
module.exports = (0, _definerule.defineRule)({
|
| 27 |
+
meta: {
|
| 28 |
+
docs: {
|
| 29 |
+
description: description,
|
| 30 |
+
recommended: true,
|
| 31 |
+
url: url
|
| 32 |
+
},
|
| 33 |
+
type: 'problem',
|
| 34 |
+
schema: []
|
| 35 |
+
},
|
| 36 |
+
create: function create(context) {
|
| 37 |
+
return {
|
| 38 |
+
JSXOpeningElement: function JSXOpeningElement(node) {
|
| 39 |
+
if (node.name.name !== 'script') {
|
| 40 |
+
return;
|
| 41 |
+
}
|
| 42 |
+
if (node.attributes.length === 0) {
|
| 43 |
+
return;
|
| 44 |
+
}
|
| 45 |
+
var attributes = new _nodeattributes.default(node);
|
| 46 |
+
// Check if the Alternative async tag is being used to add GA.
|
| 47 |
+
// https://developers.google.com/analytics/devguides/collection/analyticsjs#alternative_async_tag
|
| 48 |
+
// https://developers.google.com/analytics/devguides/collection/gtagjs
|
| 49 |
+
if (typeof attributes.value('src') === 'string' && containsStr(attributes.value('src'), SUPPORTED_SRCS)) {
|
| 50 |
+
return context.report({
|
| 51 |
+
node: node,
|
| 52 |
+
message: ERROR_MSG
|
| 53 |
+
});
|
| 54 |
+
}
|
| 55 |
+
// Check if inline script is being used to add GA.
|
| 56 |
+
// https://developers.google.com/analytics/devguides/collection/analyticsjs#the_google_analytics_tag
|
| 57 |
+
// https://developers.google.com/tag-manager/quickstart
|
| 58 |
+
if (attributes.value('dangerouslySetInnerHTML') && attributes.value('dangerouslySetInnerHTML').length > 0) {
|
| 59 |
+
var htmlContent = attributes.value('dangerouslySetInnerHTML')[0].value.quasis && attributes.value('dangerouslySetInnerHTML')[0].value.quasis[0].value.raw;
|
| 60 |
+
if (htmlContent && containsStr(htmlContent, SUPPORTED_HTML_CONTENT_URLS)) {
|
| 61 |
+
context.report({
|
| 62 |
+
node: node,
|
| 63 |
+
message: ERROR_MSG
|
| 64 |
+
});
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
}
|
| 68 |
+
};
|
| 69 |
+
}
|
| 70 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-assign-module-variable.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var url = 'https://nextjs.org/docs/messages/no-assign-module-variable';
|
| 4 |
+
module.exports = (0, _definerule.defineRule)({
|
| 5 |
+
meta: {
|
| 6 |
+
docs: {
|
| 7 |
+
description: 'Prevent assignment to the `module` variable.',
|
| 8 |
+
recommended: true,
|
| 9 |
+
url: url
|
| 10 |
+
},
|
| 11 |
+
type: 'problem',
|
| 12 |
+
schema: []
|
| 13 |
+
},
|
| 14 |
+
create: function create(context) {
|
| 15 |
+
return {
|
| 16 |
+
VariableDeclaration: function VariableDeclaration(node) {
|
| 17 |
+
// Checks node.declarations array for variable with id.name of `module`
|
| 18 |
+
var moduleVariableFound = node.declarations.some(function(declaration) {
|
| 19 |
+
if ('name' in declaration.id) {
|
| 20 |
+
return declaration.id.name === 'module';
|
| 21 |
+
}
|
| 22 |
+
return false;
|
| 23 |
+
});
|
| 24 |
+
// Return early if no `module` variable is found
|
| 25 |
+
if (!moduleVariableFound) {
|
| 26 |
+
return;
|
| 27 |
+
}
|
| 28 |
+
context.report({
|
| 29 |
+
node: node,
|
| 30 |
+
message: "Do not assign to the variable `module`. See: ".concat(url)
|
| 31 |
+
});
|
| 32 |
+
}
|
| 33 |
+
};
|
| 34 |
+
}
|
| 35 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-async-client-component.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var url = 'https://nextjs.org/docs/messages/no-async-client-component';
|
| 4 |
+
var description = 'Prevent client components from being async functions.';
|
| 5 |
+
var message = "".concat(description, " See: ").concat(url);
|
| 6 |
+
function isCapitalized(str) {
|
| 7 |
+
return /[A-Z]/.test(str === null || str === void 0 ? void 0 : str[0]);
|
| 8 |
+
}
|
| 9 |
+
module.exports = (0, _definerule.defineRule)({
|
| 10 |
+
meta: {
|
| 11 |
+
docs: {
|
| 12 |
+
description: description,
|
| 13 |
+
recommended: true,
|
| 14 |
+
url: url
|
| 15 |
+
},
|
| 16 |
+
type: 'problem',
|
| 17 |
+
schema: []
|
| 18 |
+
},
|
| 19 |
+
create: function create(context) {
|
| 20 |
+
return {
|
| 21 |
+
Program: function Program(node) {
|
| 22 |
+
var isClientComponent = false;
|
| 23 |
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
| 24 |
+
try {
|
| 25 |
+
var _loop = function() {
|
| 26 |
+
var block = _step.value;
|
| 27 |
+
if (block.type === 'ExpressionStatement' && block.expression.type === 'Literal' && block.expression.value === 'use client') {
|
| 28 |
+
isClientComponent = true;
|
| 29 |
+
}
|
| 30 |
+
if (block.type === 'ExportDefaultDeclaration' && isClientComponent) {
|
| 31 |
+
var _block_declaration;
|
| 32 |
+
// export default async function MyComponent() {...}
|
| 33 |
+
if (((_block_declaration = block.declaration) === null || _block_declaration === void 0 ? void 0 : _block_declaration.type) === 'FunctionDeclaration' && block.declaration.async && isCapitalized(block.declaration.id.name)) {
|
| 34 |
+
context.report({
|
| 35 |
+
node: block,
|
| 36 |
+
message: message
|
| 37 |
+
});
|
| 38 |
+
}
|
| 39 |
+
// async function MyComponent() {...}; export default MyComponent;
|
| 40 |
+
if (block.declaration.type === 'Identifier' && isCapitalized(block.declaration.name)) {
|
| 41 |
+
var targetName = block.declaration.name;
|
| 42 |
+
var functionDeclaration = node.body.find(function(localBlock) {
|
| 43 |
+
if (localBlock.type === 'FunctionDeclaration' && localBlock.id.name === targetName) return true;
|
| 44 |
+
if (localBlock.type === 'VariableDeclaration' && localBlock.declarations.find(function(declaration) {
|
| 45 |
+
var _declaration_id;
|
| 46 |
+
return ((_declaration_id = declaration.id) === null || _declaration_id === void 0 ? void 0 : _declaration_id.type) === 'Identifier' && declaration.id.name === targetName;
|
| 47 |
+
})) return true;
|
| 48 |
+
return false;
|
| 49 |
+
});
|
| 50 |
+
if ((functionDeclaration === null || functionDeclaration === void 0 ? void 0 : functionDeclaration.type) === 'FunctionDeclaration' && functionDeclaration.async) {
|
| 51 |
+
context.report({
|
| 52 |
+
node: functionDeclaration,
|
| 53 |
+
message: message
|
| 54 |
+
});
|
| 55 |
+
}
|
| 56 |
+
if ((functionDeclaration === null || functionDeclaration === void 0 ? void 0 : functionDeclaration.type) === 'VariableDeclaration') {
|
| 57 |
+
var _varDeclarator_init;
|
| 58 |
+
var varDeclarator = functionDeclaration.declarations.find(function(declaration) {
|
| 59 |
+
var _declaration_id;
|
| 60 |
+
return ((_declaration_id = declaration.id) === null || _declaration_id === void 0 ? void 0 : _declaration_id.type) === 'Identifier' && declaration.id.name === targetName;
|
| 61 |
+
});
|
| 62 |
+
if ((varDeclarator === null || varDeclarator === void 0 ? void 0 : (_varDeclarator_init = varDeclarator.init) === null || _varDeclarator_init === void 0 ? void 0 : _varDeclarator_init.type) === 'ArrowFunctionExpression' && varDeclarator.init.async) {
|
| 63 |
+
context.report({
|
| 64 |
+
node: functionDeclaration,
|
| 65 |
+
message: message
|
| 66 |
+
});
|
| 67 |
+
}
|
| 68 |
+
}
|
| 69 |
+
}
|
| 70 |
+
}
|
| 71 |
+
};
|
| 72 |
+
for(var _iterator = node.body[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true)_loop();
|
| 73 |
+
} catch (err) {
|
| 74 |
+
_didIteratorError = true;
|
| 75 |
+
_iteratorError = err;
|
| 76 |
+
} finally{
|
| 77 |
+
try {
|
| 78 |
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
| 79 |
+
_iterator.return();
|
| 80 |
+
}
|
| 81 |
+
} finally{
|
| 82 |
+
if (_didIteratorError) {
|
| 83 |
+
throw _iteratorError;
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
};
|
| 89 |
+
}
|
| 90 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-before-interactive-script-outside-document.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
|
| 4 |
+
function _getRequireWildcardCache(nodeInterop) {
|
| 5 |
+
if (typeof WeakMap !== "function") return null;
|
| 6 |
+
var cacheBabelInterop = new WeakMap();
|
| 7 |
+
var cacheNodeInterop = new WeakMap();
|
| 8 |
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
| 9 |
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
| 10 |
+
})(nodeInterop);
|
| 11 |
+
}
|
| 12 |
+
function _interop_require_wildcard(obj, nodeInterop) {
|
| 13 |
+
if (!nodeInterop && obj && obj.__esModule) {
|
| 14 |
+
return obj;
|
| 15 |
+
}
|
| 16 |
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
| 17 |
+
return {
|
| 18 |
+
default: obj
|
| 19 |
+
};
|
| 20 |
+
}
|
| 21 |
+
var cache = _getRequireWildcardCache(nodeInterop);
|
| 22 |
+
if (cache && cache.has(obj)) {
|
| 23 |
+
return cache.get(obj);
|
| 24 |
+
}
|
| 25 |
+
var newObj = {
|
| 26 |
+
__proto__: null
|
| 27 |
+
};
|
| 28 |
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
| 29 |
+
for(var key in obj){
|
| 30 |
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
| 31 |
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
| 32 |
+
if (desc && (desc.get || desc.set)) {
|
| 33 |
+
Object.defineProperty(newObj, key, desc);
|
| 34 |
+
} else {
|
| 35 |
+
newObj[key] = obj[key];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
newObj.default = obj;
|
| 40 |
+
if (cache) {
|
| 41 |
+
cache.set(obj, newObj);
|
| 42 |
+
}
|
| 43 |
+
return newObj;
|
| 44 |
+
}
|
| 45 |
+
var url = 'https://nextjs.org/docs/messages/no-before-interactive-script-outside-document';
|
| 46 |
+
var convertToCorrectSeparator = function(str) {
|
| 47 |
+
return str.replace(/[\\/]/g, _path.sep);
|
| 48 |
+
};
|
| 49 |
+
module.exports = (0, _definerule.defineRule)({
|
| 50 |
+
meta: {
|
| 51 |
+
docs: {
|
| 52 |
+
description: "Prevent usage of `next/script`'s `beforeInteractive` strategy outside of `pages/_document.js`.",
|
| 53 |
+
recommended: true,
|
| 54 |
+
url: url
|
| 55 |
+
},
|
| 56 |
+
type: 'problem',
|
| 57 |
+
schema: []
|
| 58 |
+
},
|
| 59 |
+
create: function create(context) {
|
| 60 |
+
var scriptImportName = null;
|
| 61 |
+
return {
|
| 62 |
+
'ImportDeclaration[source.value="next/script"] > ImportDefaultSpecifier': function(node) {
|
| 63 |
+
scriptImportName = node.local.name;
|
| 64 |
+
},
|
| 65 |
+
JSXOpeningElement: function JSXOpeningElement(node) {
|
| 66 |
+
var pathname = convertToCorrectSeparator(context.filename);
|
| 67 |
+
var isInAppDir = pathname.includes("".concat(_path.sep, "app").concat(_path.sep));
|
| 68 |
+
// This rule shouldn't fire in `app/`
|
| 69 |
+
if (isInAppDir) {
|
| 70 |
+
return;
|
| 71 |
+
}
|
| 72 |
+
if (!scriptImportName) {
|
| 73 |
+
return;
|
| 74 |
+
}
|
| 75 |
+
if (node.name && node.name.name !== scriptImportName) {
|
| 76 |
+
return;
|
| 77 |
+
}
|
| 78 |
+
var strategy = node.attributes.find(function(child) {
|
| 79 |
+
return child.name && child.name.name === 'strategy';
|
| 80 |
+
});
|
| 81 |
+
if (!strategy || !strategy.value || strategy.value.value !== 'beforeInteractive') {
|
| 82 |
+
return;
|
| 83 |
+
}
|
| 84 |
+
var document = context.filename.split('pages', 2)[1];
|
| 85 |
+
if (document && _path.parse(document).name.startsWith('_document')) {
|
| 86 |
+
return;
|
| 87 |
+
}
|
| 88 |
+
context.report({
|
| 89 |
+
node: node,
|
| 90 |
+
message: "`next/script`'s `beforeInteractive` strategy should not be used outside of `pages/_document.js`. See: ".concat(url)
|
| 91 |
+
});
|
| 92 |
+
}
|
| 93 |
+
};
|
| 94 |
+
}
|
| 95 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-css-tags.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var url = 'https://nextjs.org/docs/messages/no-css-tags';
|
| 4 |
+
module.exports = (0, _definerule.defineRule)({
|
| 5 |
+
meta: {
|
| 6 |
+
docs: {
|
| 7 |
+
description: 'Prevent manual stylesheet tags.',
|
| 8 |
+
recommended: true,
|
| 9 |
+
url: url
|
| 10 |
+
},
|
| 11 |
+
type: 'problem',
|
| 12 |
+
schema: []
|
| 13 |
+
},
|
| 14 |
+
create: function create(context) {
|
| 15 |
+
return {
|
| 16 |
+
JSXOpeningElement: function JSXOpeningElement(node) {
|
| 17 |
+
if (node.name.name !== 'link') {
|
| 18 |
+
return;
|
| 19 |
+
}
|
| 20 |
+
if (node.attributes.length === 0) {
|
| 21 |
+
return;
|
| 22 |
+
}
|
| 23 |
+
var attributes = node.attributes.filter(function(attr) {
|
| 24 |
+
return attr.type === 'JSXAttribute';
|
| 25 |
+
});
|
| 26 |
+
if (attributes.find(function(attr) {
|
| 27 |
+
return attr.name.name === 'rel' && attr.value.value === 'stylesheet';
|
| 28 |
+
}) && attributes.find(function(attr) {
|
| 29 |
+
return attr.name.name === 'href' && attr.value.type === 'Literal' && !/^https?/.test(attr.value.value);
|
| 30 |
+
})) {
|
| 31 |
+
context.report({
|
| 32 |
+
node: node,
|
| 33 |
+
message: "Do not include stylesheets manually. See: ".concat(url)
|
| 34 |
+
});
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
};
|
| 38 |
+
}
|
| 39 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-document-import-in-page.js
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
|
| 4 |
+
function _getRequireWildcardCache(nodeInterop) {
|
| 5 |
+
if (typeof WeakMap !== "function") return null;
|
| 6 |
+
var cacheBabelInterop = new WeakMap();
|
| 7 |
+
var cacheNodeInterop = new WeakMap();
|
| 8 |
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
| 9 |
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
| 10 |
+
})(nodeInterop);
|
| 11 |
+
}
|
| 12 |
+
function _interop_require_wildcard(obj, nodeInterop) {
|
| 13 |
+
if (!nodeInterop && obj && obj.__esModule) {
|
| 14 |
+
return obj;
|
| 15 |
+
}
|
| 16 |
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
| 17 |
+
return {
|
| 18 |
+
default: obj
|
| 19 |
+
};
|
| 20 |
+
}
|
| 21 |
+
var cache = _getRequireWildcardCache(nodeInterop);
|
| 22 |
+
if (cache && cache.has(obj)) {
|
| 23 |
+
return cache.get(obj);
|
| 24 |
+
}
|
| 25 |
+
var newObj = {
|
| 26 |
+
__proto__: null
|
| 27 |
+
};
|
| 28 |
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
| 29 |
+
for(var key in obj){
|
| 30 |
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
| 31 |
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
| 32 |
+
if (desc && (desc.get || desc.set)) {
|
| 33 |
+
Object.defineProperty(newObj, key, desc);
|
| 34 |
+
} else {
|
| 35 |
+
newObj[key] = obj[key];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
newObj.default = obj;
|
| 40 |
+
if (cache) {
|
| 41 |
+
cache.set(obj, newObj);
|
| 42 |
+
}
|
| 43 |
+
return newObj;
|
| 44 |
+
}
|
| 45 |
+
var url = 'https://nextjs.org/docs/messages/no-document-import-in-page';
|
| 46 |
+
module.exports = (0, _definerule.defineRule)({
|
| 47 |
+
meta: {
|
| 48 |
+
docs: {
|
| 49 |
+
description: 'Prevent importing `next/document` outside of `pages/_document.js`.',
|
| 50 |
+
recommended: true,
|
| 51 |
+
url: url
|
| 52 |
+
},
|
| 53 |
+
type: 'problem',
|
| 54 |
+
schema: []
|
| 55 |
+
},
|
| 56 |
+
create: function create(context) {
|
| 57 |
+
return {
|
| 58 |
+
ImportDeclaration: function ImportDeclaration(node) {
|
| 59 |
+
if (node.source.value !== 'next/document') {
|
| 60 |
+
return;
|
| 61 |
+
}
|
| 62 |
+
var paths = context.filename.split('pages');
|
| 63 |
+
var page = paths[paths.length - 1];
|
| 64 |
+
if (!page || page.startsWith("".concat(_path.sep, "_document")) || page.startsWith("".concat(_path.posix.sep, "_document"))) {
|
| 65 |
+
return;
|
| 66 |
+
}
|
| 67 |
+
context.report({
|
| 68 |
+
node: node,
|
| 69 |
+
message: "`<Document />` from `next/document` should not be imported outside of `pages/_document.js`. See: ".concat(url)
|
| 70 |
+
});
|
| 71 |
+
}
|
| 72 |
+
};
|
| 73 |
+
}
|
| 74 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-duplicate-head.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var url = 'https://nextjs.org/docs/messages/no-duplicate-head';
|
| 4 |
+
module.exports = (0, _definerule.defineRule)({
|
| 5 |
+
meta: {
|
| 6 |
+
docs: {
|
| 7 |
+
description: 'Prevent duplicate usage of `<Head>` in `pages/_document.js`.',
|
| 8 |
+
recommended: true,
|
| 9 |
+
url: url
|
| 10 |
+
},
|
| 11 |
+
type: 'problem',
|
| 12 |
+
schema: []
|
| 13 |
+
},
|
| 14 |
+
create: function create(context) {
|
| 15 |
+
var sourceCode = context.sourceCode;
|
| 16 |
+
var documentImportName;
|
| 17 |
+
return {
|
| 18 |
+
ImportDeclaration: function ImportDeclaration(node) {
|
| 19 |
+
if (node.source.value === 'next/document') {
|
| 20 |
+
var documentImport = node.specifiers.find(function(param) {
|
| 21 |
+
var type = param.type;
|
| 22 |
+
return type === 'ImportDefaultSpecifier';
|
| 23 |
+
});
|
| 24 |
+
if (documentImport && documentImport.local) {
|
| 25 |
+
documentImportName = documentImport.local.name;
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
ReturnStatement: function ReturnStatement(node) {
|
| 30 |
+
var ancestors = sourceCode.getAncestors(node);
|
| 31 |
+
var documentClass = ancestors.find(function(ancestorNode) {
|
| 32 |
+
return ancestorNode.type === 'ClassDeclaration' && ancestorNode.superClass && 'name' in ancestorNode.superClass && ancestorNode.superClass.name === documentImportName;
|
| 33 |
+
});
|
| 34 |
+
if (!documentClass) {
|
| 35 |
+
return;
|
| 36 |
+
}
|
| 37 |
+
if (node.argument && 'children' in node.argument && node.argument.children) {
|
| 38 |
+
// @ts-expect-error - `node.argument` could be a `JSXElement` which has property `children`
|
| 39 |
+
var headComponents = node.argument.children.filter(function(childrenNode) {
|
| 40 |
+
return childrenNode.openingElement && childrenNode.openingElement.name && childrenNode.openingElement.name.name === 'Head';
|
| 41 |
+
});
|
| 42 |
+
if (headComponents.length > 1) {
|
| 43 |
+
for(var i = 1; i < headComponents.length; i++){
|
| 44 |
+
context.report({
|
| 45 |
+
node: headComponents[i],
|
| 46 |
+
message: "Do not include multiple instances of `<Head/>`. See: ".concat(url)
|
| 47 |
+
});
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
};
|
| 53 |
+
}
|
| 54 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-head-element.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var path = require("path");
|
| 4 |
+
var url = 'https://nextjs.org/docs/messages/no-head-element';
|
| 5 |
+
module.exports = (0, _definerule.defineRule)({
|
| 6 |
+
meta: {
|
| 7 |
+
docs: {
|
| 8 |
+
description: 'Prevent usage of `<head>` element.',
|
| 9 |
+
category: 'HTML',
|
| 10 |
+
recommended: true,
|
| 11 |
+
url: url
|
| 12 |
+
},
|
| 13 |
+
type: 'problem',
|
| 14 |
+
schema: []
|
| 15 |
+
},
|
| 16 |
+
create: function create(context) {
|
| 17 |
+
return {
|
| 18 |
+
JSXOpeningElement: function JSXOpeningElement(node) {
|
| 19 |
+
var paths = context.filename;
|
| 20 |
+
var isInAppDir = function() {
|
| 21 |
+
return paths.includes("app".concat(path.sep)) || paths.includes("app".concat(path.posix.sep));
|
| 22 |
+
};
|
| 23 |
+
// Only lint the <head> element in pages directory
|
| 24 |
+
if (node.name.name !== 'head' || isInAppDir()) {
|
| 25 |
+
return;
|
| 26 |
+
}
|
| 27 |
+
context.report({
|
| 28 |
+
node: node,
|
| 29 |
+
message: "Do not use `<head>` element. Use `<Head />` from `next/head` instead. See: ".concat(url)
|
| 30 |
+
});
|
| 31 |
+
}
|
| 32 |
+
};
|
| 33 |
+
}
|
| 34 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-head-import-in-document.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
|
| 4 |
+
function _getRequireWildcardCache(nodeInterop) {
|
| 5 |
+
if (typeof WeakMap !== "function") return null;
|
| 6 |
+
var cacheBabelInterop = new WeakMap();
|
| 7 |
+
var cacheNodeInterop = new WeakMap();
|
| 8 |
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
| 9 |
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
| 10 |
+
})(nodeInterop);
|
| 11 |
+
}
|
| 12 |
+
function _interop_require_wildcard(obj, nodeInterop) {
|
| 13 |
+
if (!nodeInterop && obj && obj.__esModule) {
|
| 14 |
+
return obj;
|
| 15 |
+
}
|
| 16 |
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
| 17 |
+
return {
|
| 18 |
+
default: obj
|
| 19 |
+
};
|
| 20 |
+
}
|
| 21 |
+
var cache = _getRequireWildcardCache(nodeInterop);
|
| 22 |
+
if (cache && cache.has(obj)) {
|
| 23 |
+
return cache.get(obj);
|
| 24 |
+
}
|
| 25 |
+
var newObj = {
|
| 26 |
+
__proto__: null
|
| 27 |
+
};
|
| 28 |
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
| 29 |
+
for(var key in obj){
|
| 30 |
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
| 31 |
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
| 32 |
+
if (desc && (desc.get || desc.set)) {
|
| 33 |
+
Object.defineProperty(newObj, key, desc);
|
| 34 |
+
} else {
|
| 35 |
+
newObj[key] = obj[key];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
newObj.default = obj;
|
| 40 |
+
if (cache) {
|
| 41 |
+
cache.set(obj, newObj);
|
| 42 |
+
}
|
| 43 |
+
return newObj;
|
| 44 |
+
}
|
| 45 |
+
var url = 'https://nextjs.org/docs/messages/no-head-import-in-document';
|
| 46 |
+
module.exports = (0, _definerule.defineRule)({
|
| 47 |
+
meta: {
|
| 48 |
+
docs: {
|
| 49 |
+
description: 'Prevent usage of `next/head` in `pages/_document.js`.',
|
| 50 |
+
recommended: true,
|
| 51 |
+
url: url
|
| 52 |
+
},
|
| 53 |
+
type: 'problem',
|
| 54 |
+
schema: []
|
| 55 |
+
},
|
| 56 |
+
create: function create(context) {
|
| 57 |
+
return {
|
| 58 |
+
ImportDeclaration: function ImportDeclaration(node) {
|
| 59 |
+
if (node.source.value !== 'next/head') {
|
| 60 |
+
return;
|
| 61 |
+
}
|
| 62 |
+
var document = context.filename.split('pages', 2)[1];
|
| 63 |
+
if (!document) {
|
| 64 |
+
return;
|
| 65 |
+
}
|
| 66 |
+
var _path_parse = _path.parse(document), name = _path_parse.name, dir = _path_parse.dir;
|
| 67 |
+
if (name.startsWith('_document') || dir === '/_document' && name === 'index') {
|
| 68 |
+
context.report({
|
| 69 |
+
node: node,
|
| 70 |
+
message: "`next/head` should not be imported in `pages".concat(document, "`. Use `<Head />` from `next/document` instead. See: ").concat(url)
|
| 71 |
+
});
|
| 72 |
+
}
|
| 73 |
+
}
|
| 74 |
+
};
|
| 75 |
+
}
|
| 76 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-html-link-for-pages.js
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
|
| 4 |
+
var _fs = /*#__PURE__*/ _interop_require_wildcard(require("fs"));
|
| 5 |
+
var _getrootdirs = require("../utils/get-root-dirs");
|
| 6 |
+
var _url = require("../utils/url");
|
| 7 |
+
function _array_like_to_array(arr, len) {
|
| 8 |
+
if (len == null || len > arr.length) len = arr.length;
|
| 9 |
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
| 10 |
+
return arr2;
|
| 11 |
+
}
|
| 12 |
+
function _array_with_holes(arr) {
|
| 13 |
+
if (Array.isArray(arr)) return arr;
|
| 14 |
+
}
|
| 15 |
+
function _array_without_holes(arr) {
|
| 16 |
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
| 17 |
+
}
|
| 18 |
+
function _getRequireWildcardCache(nodeInterop) {
|
| 19 |
+
if (typeof WeakMap !== "function") return null;
|
| 20 |
+
var cacheBabelInterop = new WeakMap();
|
| 21 |
+
var cacheNodeInterop = new WeakMap();
|
| 22 |
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
| 23 |
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
| 24 |
+
})(nodeInterop);
|
| 25 |
+
}
|
| 26 |
+
function _interop_require_wildcard(obj, nodeInterop) {
|
| 27 |
+
if (!nodeInterop && obj && obj.__esModule) {
|
| 28 |
+
return obj;
|
| 29 |
+
}
|
| 30 |
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
| 31 |
+
return {
|
| 32 |
+
default: obj
|
| 33 |
+
};
|
| 34 |
+
}
|
| 35 |
+
var cache = _getRequireWildcardCache(nodeInterop);
|
| 36 |
+
if (cache && cache.has(obj)) {
|
| 37 |
+
return cache.get(obj);
|
| 38 |
+
}
|
| 39 |
+
var newObj = {
|
| 40 |
+
__proto__: null
|
| 41 |
+
};
|
| 42 |
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
| 43 |
+
for(var key in obj){
|
| 44 |
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
| 45 |
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
| 46 |
+
if (desc && (desc.get || desc.set)) {
|
| 47 |
+
Object.defineProperty(newObj, key, desc);
|
| 48 |
+
} else {
|
| 49 |
+
newObj[key] = obj[key];
|
| 50 |
+
}
|
| 51 |
+
}
|
| 52 |
+
}
|
| 53 |
+
newObj.default = obj;
|
| 54 |
+
if (cache) {
|
| 55 |
+
cache.set(obj, newObj);
|
| 56 |
+
}
|
| 57 |
+
return newObj;
|
| 58 |
+
}
|
| 59 |
+
function _iterable_to_array(iter) {
|
| 60 |
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
| 61 |
+
}
|
| 62 |
+
function _iterable_to_array_limit(arr, i) {
|
| 63 |
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
| 64 |
+
if (_i == null) return;
|
| 65 |
+
var _arr = [];
|
| 66 |
+
var _n = true;
|
| 67 |
+
var _d = false;
|
| 68 |
+
var _s, _e;
|
| 69 |
+
try {
|
| 70 |
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
| 71 |
+
_arr.push(_s.value);
|
| 72 |
+
if (i && _arr.length === i) break;
|
| 73 |
+
}
|
| 74 |
+
} catch (err) {
|
| 75 |
+
_d = true;
|
| 76 |
+
_e = err;
|
| 77 |
+
} finally{
|
| 78 |
+
try {
|
| 79 |
+
if (!_n && _i["return"] != null) _i["return"]();
|
| 80 |
+
} finally{
|
| 81 |
+
if (_d) throw _e;
|
| 82 |
+
}
|
| 83 |
+
}
|
| 84 |
+
return _arr;
|
| 85 |
+
}
|
| 86 |
+
function _non_iterable_rest() {
|
| 87 |
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
| 88 |
+
}
|
| 89 |
+
function _non_iterable_spread() {
|
| 90 |
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
| 91 |
+
}
|
| 92 |
+
function _sliced_to_array(arr, i) {
|
| 93 |
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
| 94 |
+
}
|
| 95 |
+
function _to_consumable_array(arr) {
|
| 96 |
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
| 97 |
+
}
|
| 98 |
+
function _unsupported_iterable_to_array(o, minLen) {
|
| 99 |
+
if (!o) return;
|
| 100 |
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
| 101 |
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
| 102 |
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
| 103 |
+
if (n === "Map" || n === "Set") return Array.from(n);
|
| 104 |
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
| 105 |
+
}
|
| 106 |
+
var pagesDirWarning = (0, _url.execOnce)(function(pagesDirs) {
|
| 107 |
+
console.warn("Pages directory cannot be found at ".concat(pagesDirs.join(' or '), ". ") + 'If using a custom path, please configure with the `no-html-link-for-pages` rule in your eslint config file.');
|
| 108 |
+
});
|
| 109 |
+
// Cache for fs.existsSync lookup.
|
| 110 |
+
// Prevent multiple blocking IO requests that have already been calculated.
|
| 111 |
+
var fsExistsSyncCache = {};
|
| 112 |
+
var memoize = function(fn) {
|
| 113 |
+
var cache = {};
|
| 114 |
+
return function() {
|
| 115 |
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
| 116 |
+
args[_key] = arguments[_key];
|
| 117 |
+
}
|
| 118 |
+
var key = JSON.stringify(args);
|
| 119 |
+
if (cache[key] === undefined) {
|
| 120 |
+
cache[key] = fn.apply(void 0, _to_consumable_array(args));
|
| 121 |
+
}
|
| 122 |
+
return cache[key];
|
| 123 |
+
};
|
| 124 |
+
};
|
| 125 |
+
var cachedGetUrlFromPagesDirectories = memoize(_url.getUrlFromPagesDirectories);
|
| 126 |
+
var cachedGetUrlFromAppDirectory = memoize(_url.getUrlFromAppDirectory);
|
| 127 |
+
var url = 'https://nextjs.org/docs/messages/no-html-link-for-pages';
|
| 128 |
+
module.exports = (0, _definerule.defineRule)({
|
| 129 |
+
meta: {
|
| 130 |
+
docs: {
|
| 131 |
+
description: 'Prevent usage of `<a>` elements to navigate to internal Next.js pages.',
|
| 132 |
+
category: 'HTML',
|
| 133 |
+
recommended: true,
|
| 134 |
+
url: url
|
| 135 |
+
},
|
| 136 |
+
type: 'problem',
|
| 137 |
+
schema: [
|
| 138 |
+
{
|
| 139 |
+
oneOf: [
|
| 140 |
+
{
|
| 141 |
+
type: 'string'
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
type: 'array',
|
| 145 |
+
uniqueItems: true,
|
| 146 |
+
items: {
|
| 147 |
+
type: 'string'
|
| 148 |
+
}
|
| 149 |
+
}
|
| 150 |
+
]
|
| 151 |
+
}
|
| 152 |
+
]
|
| 153 |
+
},
|
| 154 |
+
/**
|
| 155 |
+
* Creates an ESLint rule listener.
|
| 156 |
+
*/ create: function create(context) {
|
| 157 |
+
var ruleOptions = context.options;
|
| 158 |
+
var _ruleOptions = _sliced_to_array(ruleOptions, 1), customPagesDirectory = _ruleOptions[0];
|
| 159 |
+
var rootDirs = (0, _getrootdirs.getRootDirs)(context);
|
| 160 |
+
var pagesDirs = (customPagesDirectory ? [
|
| 161 |
+
customPagesDirectory
|
| 162 |
+
] : rootDirs.map(function(dir) {
|
| 163 |
+
return [
|
| 164 |
+
_path.join(dir, 'pages'),
|
| 165 |
+
_path.join(dir, 'src', 'pages')
|
| 166 |
+
];
|
| 167 |
+
})).flat();
|
| 168 |
+
var foundPagesDirs = pagesDirs.filter(function(dir) {
|
| 169 |
+
if (fsExistsSyncCache[dir] === undefined) {
|
| 170 |
+
fsExistsSyncCache[dir] = _fs.existsSync(dir);
|
| 171 |
+
}
|
| 172 |
+
return fsExistsSyncCache[dir];
|
| 173 |
+
});
|
| 174 |
+
var appDirs = rootDirs.map(function(dir) {
|
| 175 |
+
return [
|
| 176 |
+
_path.join(dir, 'app'),
|
| 177 |
+
_path.join(dir, 'src', 'app')
|
| 178 |
+
];
|
| 179 |
+
}).flat();
|
| 180 |
+
var foundAppDirs = appDirs.filter(function(dir) {
|
| 181 |
+
if (fsExistsSyncCache[dir] === undefined) {
|
| 182 |
+
fsExistsSyncCache[dir] = _fs.existsSync(dir);
|
| 183 |
+
}
|
| 184 |
+
return fsExistsSyncCache[dir];
|
| 185 |
+
});
|
| 186 |
+
// warn if there are no pages and app directories
|
| 187 |
+
if (foundPagesDirs.length === 0 && foundAppDirs.length === 0) {
|
| 188 |
+
pagesDirWarning(pagesDirs);
|
| 189 |
+
return {};
|
| 190 |
+
}
|
| 191 |
+
var pageUrls = cachedGetUrlFromPagesDirectories('/', foundPagesDirs);
|
| 192 |
+
var appDirUrls = cachedGetUrlFromAppDirectory('/', foundAppDirs);
|
| 193 |
+
var allUrlRegex = _to_consumable_array(pageUrls).concat(_to_consumable_array(appDirUrls));
|
| 194 |
+
return {
|
| 195 |
+
JSXOpeningElement: function JSXOpeningElement(node) {
|
| 196 |
+
if (node.name.name !== 'a') {
|
| 197 |
+
return;
|
| 198 |
+
}
|
| 199 |
+
if (node.attributes.length === 0) {
|
| 200 |
+
return;
|
| 201 |
+
}
|
| 202 |
+
var target = node.attributes.find(function(attr) {
|
| 203 |
+
return attr.type === 'JSXAttribute' && attr.name.name === 'target';
|
| 204 |
+
});
|
| 205 |
+
if (target && target.value.value === '_blank') {
|
| 206 |
+
return;
|
| 207 |
+
}
|
| 208 |
+
var href = node.attributes.find(function(attr) {
|
| 209 |
+
return attr.type === 'JSXAttribute' && attr.name.name === 'href';
|
| 210 |
+
});
|
| 211 |
+
if (!href || href.value && href.value.type !== 'Literal') {
|
| 212 |
+
return;
|
| 213 |
+
}
|
| 214 |
+
var hasDownloadAttr = node.attributes.find(function(attr) {
|
| 215 |
+
return attr.type === 'JSXAttribute' && attr.name.name === 'download';
|
| 216 |
+
});
|
| 217 |
+
if (hasDownloadAttr) {
|
| 218 |
+
return;
|
| 219 |
+
}
|
| 220 |
+
var hrefPath = (0, _url.normalizeURL)(href.value.value);
|
| 221 |
+
// Outgoing links are ignored
|
| 222 |
+
if (/^(https?:\/\/|\/\/)/.test(hrefPath)) {
|
| 223 |
+
return;
|
| 224 |
+
}
|
| 225 |
+
allUrlRegex.forEach(function(foundUrl) {
|
| 226 |
+
if (foundUrl.test((0, _url.normalizeURL)(hrefPath))) {
|
| 227 |
+
context.report({
|
| 228 |
+
node: node,
|
| 229 |
+
message: "Do not use an `<a>` element to navigate to `".concat(hrefPath, "`. Use `<Link />` from `next/link` instead. See: ").concat(url)
|
| 230 |
+
});
|
| 231 |
+
}
|
| 232 |
+
});
|
| 233 |
+
}
|
| 234 |
+
};
|
| 235 |
+
}
|
| 236 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-img-element.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var path = require("path");
|
| 4 |
+
var url = 'https://nextjs.org/docs/messages/no-img-element';
|
| 5 |
+
module.exports = (0, _definerule.defineRule)({
|
| 6 |
+
meta: {
|
| 7 |
+
docs: {
|
| 8 |
+
description: 'Prevent usage of `<img>` element due to slower LCP and higher bandwidth.',
|
| 9 |
+
category: 'HTML',
|
| 10 |
+
recommended: true,
|
| 11 |
+
url: url
|
| 12 |
+
},
|
| 13 |
+
type: 'problem',
|
| 14 |
+
schema: []
|
| 15 |
+
},
|
| 16 |
+
create: function create(context) {
|
| 17 |
+
// Get relative path of the file
|
| 18 |
+
var relativePath = context.filename.replace(path.sep, '/').replace(context.cwd, '').replace(/^\//, '');
|
| 19 |
+
var isAppDir = /^(src\/)?app\//.test(relativePath);
|
| 20 |
+
return {
|
| 21 |
+
JSXOpeningElement: function JSXOpeningElement(node) {
|
| 22 |
+
var _node_parent_parent_openingElement_name, _node_parent_parent_openingElement, _node_parent_parent, _node_parent;
|
| 23 |
+
if (node.name.name !== 'img') {
|
| 24 |
+
return;
|
| 25 |
+
}
|
| 26 |
+
if (node.attributes.length === 0) {
|
| 27 |
+
return;
|
| 28 |
+
}
|
| 29 |
+
if (((_node_parent = node.parent) === null || _node_parent === void 0 ? void 0 : (_node_parent_parent = _node_parent.parent) === null || _node_parent_parent === void 0 ? void 0 : (_node_parent_parent_openingElement = _node_parent_parent.openingElement) === null || _node_parent_parent_openingElement === void 0 ? void 0 : (_node_parent_parent_openingElement_name = _node_parent_parent_openingElement.name) === null || _node_parent_parent_openingElement_name === void 0 ? void 0 : _node_parent_parent_openingElement_name.name) === 'picture') {
|
| 30 |
+
return;
|
| 31 |
+
}
|
| 32 |
+
// If is metadata route files, ignore
|
| 33 |
+
// e.g. opengraph-image.js, twitter-image.js, icon.js
|
| 34 |
+
if (isAppDir && /\/opengraph-image|twitter-image|icon\.\w+$/.test(relativePath)) return;
|
| 35 |
+
context.report({
|
| 36 |
+
node: node,
|
| 37 |
+
message: "Using `<img>` could result in slower LCP and higher bandwidth. Consider using `<Image />` from `next/image` or a custom image loader to automatically optimize images. This may incur additional usage or cost from your provider. See: ".concat(url)
|
| 38 |
+
});
|
| 39 |
+
}
|
| 40 |
+
};
|
| 41 |
+
}
|
| 42 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-page-custom-font.js
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var _nodeattributes = /*#__PURE__*/ _interop_require_default(require("../utils/node-attributes"));
|
| 4 |
+
var _path = require("path");
|
| 5 |
+
function _interop_require_default(obj) {
|
| 6 |
+
return obj && obj.__esModule ? obj : {
|
| 7 |
+
default: obj
|
| 8 |
+
};
|
| 9 |
+
}
|
| 10 |
+
var url = 'https://nextjs.org/docs/messages/no-page-custom-font';
|
| 11 |
+
function isIdentifierMatch(id1, id2) {
|
| 12 |
+
return id1 === null && id2 === null || id1 && id2 && id1.name === id2.name;
|
| 13 |
+
}
|
| 14 |
+
module.exports = (0, _definerule.defineRule)({
|
| 15 |
+
meta: {
|
| 16 |
+
docs: {
|
| 17 |
+
description: 'Prevent page-only custom fonts.',
|
| 18 |
+
recommended: true,
|
| 19 |
+
url: url
|
| 20 |
+
},
|
| 21 |
+
type: 'problem',
|
| 22 |
+
schema: []
|
| 23 |
+
},
|
| 24 |
+
create: function create(context) {
|
| 25 |
+
var sourceCode = context.sourceCode;
|
| 26 |
+
var paths = context.filename.split('pages');
|
| 27 |
+
var page = paths[paths.length - 1];
|
| 28 |
+
// outside of a file within `pages`, bail
|
| 29 |
+
if (!page) {
|
| 30 |
+
return {};
|
| 31 |
+
}
|
| 32 |
+
var is_Document = page.startsWith("".concat(_path.sep, "_document")) || page.startsWith("".concat(_path.posix.sep, "_document"));
|
| 33 |
+
var documentImportName;
|
| 34 |
+
var localDefaultExportId;
|
| 35 |
+
var exportDeclarationType;
|
| 36 |
+
return {
|
| 37 |
+
ImportDeclaration: function ImportDeclaration(node) {
|
| 38 |
+
if (node.source.value === 'next/document') {
|
| 39 |
+
var documentImport = node.specifiers.find(function(param) {
|
| 40 |
+
var type = param.type;
|
| 41 |
+
return type === 'ImportDefaultSpecifier';
|
| 42 |
+
});
|
| 43 |
+
if (documentImport && documentImport.local) {
|
| 44 |
+
documentImportName = documentImport.local.name;
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
},
|
| 48 |
+
ExportDefaultDeclaration: function ExportDefaultDeclaration(node) {
|
| 49 |
+
exportDeclarationType = node.declaration.type;
|
| 50 |
+
if (node.declaration.type === 'FunctionDeclaration') {
|
| 51 |
+
localDefaultExportId = node.declaration.id;
|
| 52 |
+
return;
|
| 53 |
+
}
|
| 54 |
+
if (node.declaration.type === 'ClassDeclaration' && node.declaration.superClass && 'name' in node.declaration.superClass && node.declaration.superClass.name === documentImportName) {
|
| 55 |
+
localDefaultExportId = node.declaration.id;
|
| 56 |
+
}
|
| 57 |
+
},
|
| 58 |
+
JSXOpeningElement: function JSXOpeningElement(node) {
|
| 59 |
+
if (node.name.name !== 'link') {
|
| 60 |
+
return;
|
| 61 |
+
}
|
| 62 |
+
var ancestors = sourceCode.getAncestors(node);
|
| 63 |
+
// if `export default <name>` is further down within the file after the
|
| 64 |
+
// currently traversed component, then `localDefaultExportName` will
|
| 65 |
+
// still be undefined
|
| 66 |
+
if (!localDefaultExportId) {
|
| 67 |
+
// find the top level of the module
|
| 68 |
+
var program = ancestors.find(function(ancestor) {
|
| 69 |
+
return ancestor.type === 'Program';
|
| 70 |
+
});
|
| 71 |
+
// go over each token to find the combination of `export default <name>`
|
| 72 |
+
for(var i = 0; i <= program.tokens.length - 1; i++){
|
| 73 |
+
if (localDefaultExportId) {
|
| 74 |
+
break;
|
| 75 |
+
}
|
| 76 |
+
var token = program.tokens[i];
|
| 77 |
+
if (token.type === 'Keyword' && token.value === 'export') {
|
| 78 |
+
var nextToken = program.tokens[i + 1];
|
| 79 |
+
if (nextToken && nextToken.type === 'Keyword' && nextToken.value === 'default') {
|
| 80 |
+
var maybeIdentifier = program.tokens[i + 2];
|
| 81 |
+
if (maybeIdentifier && maybeIdentifier.type === 'Identifier') {
|
| 82 |
+
localDefaultExportId = {
|
| 83 |
+
name: maybeIdentifier.value
|
| 84 |
+
};
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
}
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
var parentComponent = ancestors.find(function(ancestor) {
|
| 91 |
+
// export default class ... extends ...
|
| 92 |
+
if (exportDeclarationType === 'ClassDeclaration') {
|
| 93 |
+
return ancestor.type === exportDeclarationType && 'superClass' in ancestor && ancestor.superClass && 'name' in ancestor.superClass && ancestor.superClass.name === documentImportName;
|
| 94 |
+
}
|
| 95 |
+
if ('id' in ancestor) {
|
| 96 |
+
// export default function ...
|
| 97 |
+
if (exportDeclarationType === 'FunctionDeclaration') {
|
| 98 |
+
return ancestor.type === exportDeclarationType && isIdentifierMatch(ancestor.id, localDefaultExportId);
|
| 99 |
+
}
|
| 100 |
+
// function ...() {} export default ...
|
| 101 |
+
// class ... extends ...; export default ...
|
| 102 |
+
return isIdentifierMatch(ancestor.id, localDefaultExportId);
|
| 103 |
+
}
|
| 104 |
+
return false;
|
| 105 |
+
});
|
| 106 |
+
// file starts with _document and this <link /> is within the default export
|
| 107 |
+
if (is_Document && parentComponent) {
|
| 108 |
+
return;
|
| 109 |
+
}
|
| 110 |
+
var attributes = new _nodeattributes.default(node);
|
| 111 |
+
if (!attributes.has('href') || !attributes.hasValue('href')) {
|
| 112 |
+
return;
|
| 113 |
+
}
|
| 114 |
+
var hrefValue = attributes.value('href');
|
| 115 |
+
var isGoogleFont = typeof hrefValue === 'string' && hrefValue.startsWith('https://fonts.googleapis.com/css');
|
| 116 |
+
if (isGoogleFont) {
|
| 117 |
+
var end = "This is discouraged. See: ".concat(url);
|
| 118 |
+
var message = is_Document ? "Using `<link />` outside of `<Head>` will disable automatic font optimization. ".concat(end) : "Custom fonts not added in `pages/_document.js` will only load for a single page. ".concat(end);
|
| 119 |
+
context.report({
|
| 120 |
+
node: node,
|
| 121 |
+
message: message
|
| 122 |
+
});
|
| 123 |
+
}
|
| 124 |
+
}
|
| 125 |
+
};
|
| 126 |
+
}
|
| 127 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-script-component-in-head.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var url = 'https://nextjs.org/docs/messages/no-script-component-in-head';
|
| 4 |
+
module.exports = (0, _definerule.defineRule)({
|
| 5 |
+
meta: {
|
| 6 |
+
docs: {
|
| 7 |
+
description: 'Prevent usage of `next/script` in `next/head` component.',
|
| 8 |
+
recommended: true,
|
| 9 |
+
url: url
|
| 10 |
+
},
|
| 11 |
+
type: 'problem',
|
| 12 |
+
schema: []
|
| 13 |
+
},
|
| 14 |
+
create: function create(context) {
|
| 15 |
+
var isNextHead = null;
|
| 16 |
+
return {
|
| 17 |
+
ImportDeclaration: function ImportDeclaration(node) {
|
| 18 |
+
if (node.source.value === 'next/head') {
|
| 19 |
+
isNextHead = node.source.value;
|
| 20 |
+
}
|
| 21 |
+
if (node.source.value !== 'next/script') {
|
| 22 |
+
return;
|
| 23 |
+
}
|
| 24 |
+
},
|
| 25 |
+
JSXElement: function JSXElement(node) {
|
| 26 |
+
if (!isNextHead) {
|
| 27 |
+
return;
|
| 28 |
+
}
|
| 29 |
+
if (node.openingElement && node.openingElement.name && node.openingElement.name.name !== 'Head') {
|
| 30 |
+
return;
|
| 31 |
+
}
|
| 32 |
+
var scriptTag = node.children.find(function(child) {
|
| 33 |
+
return child.openingElement && child.openingElement.name && child.openingElement.name.name === 'Script';
|
| 34 |
+
});
|
| 35 |
+
if (scriptTag) {
|
| 36 |
+
context.report({
|
| 37 |
+
node: node,
|
| 38 |
+
message: "`next/script` should not be used in `next/head` component. Move `<Script />` outside of `<Head>` instead. See: ".concat(url)
|
| 39 |
+
});
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
};
|
| 43 |
+
}
|
| 44 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-styled-jsx-in-document.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
|
| 4 |
+
function _getRequireWildcardCache(nodeInterop) {
|
| 5 |
+
if (typeof WeakMap !== "function") return null;
|
| 6 |
+
var cacheBabelInterop = new WeakMap();
|
| 7 |
+
var cacheNodeInterop = new WeakMap();
|
| 8 |
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
| 9 |
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
| 10 |
+
})(nodeInterop);
|
| 11 |
+
}
|
| 12 |
+
function _interop_require_wildcard(obj, nodeInterop) {
|
| 13 |
+
if (!nodeInterop && obj && obj.__esModule) {
|
| 14 |
+
return obj;
|
| 15 |
+
}
|
| 16 |
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
| 17 |
+
return {
|
| 18 |
+
default: obj
|
| 19 |
+
};
|
| 20 |
+
}
|
| 21 |
+
var cache = _getRequireWildcardCache(nodeInterop);
|
| 22 |
+
if (cache && cache.has(obj)) {
|
| 23 |
+
return cache.get(obj);
|
| 24 |
+
}
|
| 25 |
+
var newObj = {
|
| 26 |
+
__proto__: null
|
| 27 |
+
};
|
| 28 |
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
| 29 |
+
for(var key in obj){
|
| 30 |
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
| 31 |
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
| 32 |
+
if (desc && (desc.get || desc.set)) {
|
| 33 |
+
Object.defineProperty(newObj, key, desc);
|
| 34 |
+
} else {
|
| 35 |
+
newObj[key] = obj[key];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
newObj.default = obj;
|
| 40 |
+
if (cache) {
|
| 41 |
+
cache.set(obj, newObj);
|
| 42 |
+
}
|
| 43 |
+
return newObj;
|
| 44 |
+
}
|
| 45 |
+
var url = 'https://nextjs.org/docs/messages/no-styled-jsx-in-document';
|
| 46 |
+
module.exports = (0, _definerule.defineRule)({
|
| 47 |
+
meta: {
|
| 48 |
+
docs: {
|
| 49 |
+
description: 'Prevent usage of `styled-jsx` in `pages/_document.js`.',
|
| 50 |
+
recommended: true,
|
| 51 |
+
url: url
|
| 52 |
+
},
|
| 53 |
+
type: 'problem',
|
| 54 |
+
schema: []
|
| 55 |
+
},
|
| 56 |
+
create: function create(context) {
|
| 57 |
+
return {
|
| 58 |
+
JSXOpeningElement: function JSXOpeningElement(node) {
|
| 59 |
+
var document = context.filename.split('pages', 2)[1];
|
| 60 |
+
if (!document) {
|
| 61 |
+
return;
|
| 62 |
+
}
|
| 63 |
+
var _path_parse = _path.parse(document), name = _path_parse.name, dir = _path_parse.dir;
|
| 64 |
+
if (!(name.startsWith('_document') || dir === '/_document' && name === 'index')) {
|
| 65 |
+
return;
|
| 66 |
+
}
|
| 67 |
+
if (node.name.name === 'style' && node.attributes.find(function(attr) {
|
| 68 |
+
return attr.type === 'JSXAttribute' && attr.name.name === 'jsx';
|
| 69 |
+
})) {
|
| 70 |
+
context.report({
|
| 71 |
+
node: node,
|
| 72 |
+
message: "`styled-jsx` should not be used in `pages/_document.js`. See: ".concat(url)
|
| 73 |
+
});
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
};
|
| 77 |
+
}
|
| 78 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-sync-scripts.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var url = 'https://nextjs.org/docs/messages/no-sync-scripts';
|
| 4 |
+
module.exports = (0, _definerule.defineRule)({
|
| 5 |
+
meta: {
|
| 6 |
+
docs: {
|
| 7 |
+
description: 'Prevent synchronous scripts.',
|
| 8 |
+
recommended: true,
|
| 9 |
+
url: url
|
| 10 |
+
},
|
| 11 |
+
type: 'problem',
|
| 12 |
+
schema: []
|
| 13 |
+
},
|
| 14 |
+
create: function create(context) {
|
| 15 |
+
return {
|
| 16 |
+
JSXOpeningElement: function JSXOpeningElement(node) {
|
| 17 |
+
if (node.name.name !== 'script') {
|
| 18 |
+
return;
|
| 19 |
+
}
|
| 20 |
+
if (node.attributes.length === 0) {
|
| 21 |
+
return;
|
| 22 |
+
}
|
| 23 |
+
var attributeNames = node.attributes.filter(function(attr) {
|
| 24 |
+
return attr.type === 'JSXAttribute';
|
| 25 |
+
}).map(function(attr) {
|
| 26 |
+
return attr.name.name;
|
| 27 |
+
});
|
| 28 |
+
if (attributeNames.includes('src') && !attributeNames.includes('async') && !attributeNames.includes('defer')) {
|
| 29 |
+
context.report({
|
| 30 |
+
node: node,
|
| 31 |
+
message: "Synchronous scripts should not be used. See: ".concat(url)
|
| 32 |
+
});
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
};
|
| 36 |
+
}
|
| 37 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-title-in-document-head.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var url = 'https://nextjs.org/docs/messages/no-title-in-document-head';
|
| 4 |
+
module.exports = (0, _definerule.defineRule)({
|
| 5 |
+
meta: {
|
| 6 |
+
docs: {
|
| 7 |
+
description: 'Prevent usage of `<title>` with `Head` component from `next/document`.',
|
| 8 |
+
recommended: true,
|
| 9 |
+
url: url
|
| 10 |
+
},
|
| 11 |
+
type: 'problem',
|
| 12 |
+
schema: []
|
| 13 |
+
},
|
| 14 |
+
create: function create(context) {
|
| 15 |
+
var headFromNextDocument = false;
|
| 16 |
+
return {
|
| 17 |
+
ImportDeclaration: function ImportDeclaration(node) {
|
| 18 |
+
if (node.source.value === 'next/document') {
|
| 19 |
+
if (node.specifiers.some(function(param) {
|
| 20 |
+
var local = param.local;
|
| 21 |
+
return local.name === 'Head';
|
| 22 |
+
})) {
|
| 23 |
+
headFromNextDocument = true;
|
| 24 |
+
}
|
| 25 |
+
}
|
| 26 |
+
},
|
| 27 |
+
JSXElement: function JSXElement(node) {
|
| 28 |
+
if (!headFromNextDocument) {
|
| 29 |
+
return;
|
| 30 |
+
}
|
| 31 |
+
if (node.openingElement && node.openingElement.name && node.openingElement.name.name !== 'Head') {
|
| 32 |
+
return;
|
| 33 |
+
}
|
| 34 |
+
var titleTag = node.children.find(function(child) {
|
| 35 |
+
return child.openingElement && child.openingElement.name && child.openingElement.name.type === 'JSXIdentifier' && child.openingElement.name.name === 'title';
|
| 36 |
+
});
|
| 37 |
+
if (titleTag) {
|
| 38 |
+
context.report({
|
| 39 |
+
node: titleTag,
|
| 40 |
+
message: "Do not use `<title>` element with `<Head />` component from `next/document`. Titles should defined at the page-level using `<Head />` from `next/head` instead. See: ".concat(url)
|
| 41 |
+
});
|
| 42 |
+
}
|
| 43 |
+
}
|
| 44 |
+
};
|
| 45 |
+
}
|
| 46 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-typos.js
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
var _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
|
| 4 |
+
function _getRequireWildcardCache(nodeInterop) {
|
| 5 |
+
if (typeof WeakMap !== "function") return null;
|
| 6 |
+
var cacheBabelInterop = new WeakMap();
|
| 7 |
+
var cacheNodeInterop = new WeakMap();
|
| 8 |
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
| 9 |
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
| 10 |
+
})(nodeInterop);
|
| 11 |
+
}
|
| 12 |
+
function _interop_require_wildcard(obj, nodeInterop) {
|
| 13 |
+
if (!nodeInterop && obj && obj.__esModule) {
|
| 14 |
+
return obj;
|
| 15 |
+
}
|
| 16 |
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
| 17 |
+
return {
|
| 18 |
+
default: obj
|
| 19 |
+
};
|
| 20 |
+
}
|
| 21 |
+
var cache = _getRequireWildcardCache(nodeInterop);
|
| 22 |
+
if (cache && cache.has(obj)) {
|
| 23 |
+
return cache.get(obj);
|
| 24 |
+
}
|
| 25 |
+
var newObj = {
|
| 26 |
+
__proto__: null
|
| 27 |
+
};
|
| 28 |
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
| 29 |
+
for(var key in obj){
|
| 30 |
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
| 31 |
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
| 32 |
+
if (desc && (desc.get || desc.set)) {
|
| 33 |
+
Object.defineProperty(newObj, key, desc);
|
| 34 |
+
} else {
|
| 35 |
+
newObj[key] = obj[key];
|
| 36 |
+
}
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
newObj.default = obj;
|
| 40 |
+
if (cache) {
|
| 41 |
+
cache.set(obj, newObj);
|
| 42 |
+
}
|
| 43 |
+
return newObj;
|
| 44 |
+
}
|
| 45 |
+
var NEXT_EXPORT_FUNCTIONS = [
|
| 46 |
+
'getStaticProps',
|
| 47 |
+
'getStaticPaths',
|
| 48 |
+
'getServerSideProps'
|
| 49 |
+
];
|
| 50 |
+
// 0 is the exact match
|
| 51 |
+
var THRESHOLD = 1;
|
| 52 |
+
// the minimum number of operations required to convert string a to string b.
|
| 53 |
+
function minDistance(a, b) {
|
| 54 |
+
var m = a.length;
|
| 55 |
+
var n = b.length;
|
| 56 |
+
if (m < n) {
|
| 57 |
+
return minDistance(b, a);
|
| 58 |
+
}
|
| 59 |
+
if (n === 0) {
|
| 60 |
+
return m;
|
| 61 |
+
}
|
| 62 |
+
var previousRow = Array.from({
|
| 63 |
+
length: n + 1
|
| 64 |
+
}, function(_, i) {
|
| 65 |
+
return i;
|
| 66 |
+
});
|
| 67 |
+
for(var i = 0; i < m; i++){
|
| 68 |
+
var s1 = a[i];
|
| 69 |
+
var currentRow = [
|
| 70 |
+
i + 1
|
| 71 |
+
];
|
| 72 |
+
for(var j = 0; j < n; j++){
|
| 73 |
+
var s2 = b[j];
|
| 74 |
+
var insertions = previousRow[j + 1] + 1;
|
| 75 |
+
var deletions = currentRow[j] + 1;
|
| 76 |
+
var substitutions = previousRow[j] + Number(s1 !== s2);
|
| 77 |
+
currentRow.push(Math.min(insertions, deletions, substitutions));
|
| 78 |
+
}
|
| 79 |
+
previousRow = currentRow;
|
| 80 |
+
}
|
| 81 |
+
return previousRow[previousRow.length - 1];
|
| 82 |
+
}
|
| 83 |
+
module.exports = (0, _definerule.defineRule)({
|
| 84 |
+
meta: {
|
| 85 |
+
docs: {
|
| 86 |
+
description: 'Prevent common typos in Next.js data fetching functions.',
|
| 87 |
+
recommended: true
|
| 88 |
+
},
|
| 89 |
+
type: 'problem',
|
| 90 |
+
schema: []
|
| 91 |
+
},
|
| 92 |
+
create: function create(context) {
|
| 93 |
+
function checkTypos(node, name) {
|
| 94 |
+
if (NEXT_EXPORT_FUNCTIONS.includes(name)) {
|
| 95 |
+
return;
|
| 96 |
+
}
|
| 97 |
+
var potentialTypos = NEXT_EXPORT_FUNCTIONS.map(function(o) {
|
| 98 |
+
return {
|
| 99 |
+
option: o,
|
| 100 |
+
distance: minDistance(o, name)
|
| 101 |
+
};
|
| 102 |
+
}).filter(function(param) {
|
| 103 |
+
var distance = param.distance;
|
| 104 |
+
return distance <= THRESHOLD && distance > 0;
|
| 105 |
+
}).sort(function(a, b) {
|
| 106 |
+
return a.distance - b.distance;
|
| 107 |
+
});
|
| 108 |
+
if (potentialTypos.length) {
|
| 109 |
+
context.report({
|
| 110 |
+
node: node,
|
| 111 |
+
message: "".concat(name, " may be a typo. Did you mean ").concat(potentialTypos[0].option, "?")
|
| 112 |
+
});
|
| 113 |
+
}
|
| 114 |
+
}
|
| 115 |
+
return {
|
| 116 |
+
ExportNamedDeclaration: function ExportNamedDeclaration(node) {
|
| 117 |
+
var page = context.filename.split('pages', 2)[1];
|
| 118 |
+
if (!page || _path.parse(page).dir.startsWith('/api')) {
|
| 119 |
+
return;
|
| 120 |
+
}
|
| 121 |
+
var decl = node.declaration;
|
| 122 |
+
if (!decl) {
|
| 123 |
+
return;
|
| 124 |
+
}
|
| 125 |
+
switch(decl.type){
|
| 126 |
+
case 'FunctionDeclaration':
|
| 127 |
+
{
|
| 128 |
+
checkTypos(node, decl.id.name);
|
| 129 |
+
break;
|
| 130 |
+
}
|
| 131 |
+
case 'VariableDeclaration':
|
| 132 |
+
{
|
| 133 |
+
decl.declarations.forEach(function(d) {
|
| 134 |
+
if (d.id.type !== 'Identifier') {
|
| 135 |
+
return;
|
| 136 |
+
}
|
| 137 |
+
checkTypos(node, d.id.name);
|
| 138 |
+
});
|
| 139 |
+
break;
|
| 140 |
+
}
|
| 141 |
+
default:
|
| 142 |
+
{
|
| 143 |
+
break;
|
| 144 |
+
}
|
| 145 |
+
}
|
| 146 |
+
return;
|
| 147 |
+
}
|
| 148 |
+
};
|
| 149 |
+
}
|
| 150 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/rules/no-unwanted-polyfillio.js
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
var _definerule = require("../utils/define-rule");
|
| 3 |
+
// Keep in sync with next.js polyfills file : https://github.com/vercel/next.js/blob/master/packages/next-polyfill-nomodule/src/index.js
|
| 4 |
+
var NEXT_POLYFILLED_FEATURES = [
|
| 5 |
+
'Array.prototype.@@iterator',
|
| 6 |
+
'Array.prototype.at',
|
| 7 |
+
'Array.prototype.copyWithin',
|
| 8 |
+
'Array.prototype.fill',
|
| 9 |
+
'Array.prototype.find',
|
| 10 |
+
'Array.prototype.findIndex',
|
| 11 |
+
'Array.prototype.flatMap',
|
| 12 |
+
'Array.prototype.flat',
|
| 13 |
+
'Array.from',
|
| 14 |
+
'Array.prototype.includes',
|
| 15 |
+
'Array.of',
|
| 16 |
+
'Function.prototype.name',
|
| 17 |
+
'fetch',
|
| 18 |
+
'Map',
|
| 19 |
+
'Number.EPSILON',
|
| 20 |
+
'Number.Epsilon',
|
| 21 |
+
'Number.isFinite',
|
| 22 |
+
'Number.isNaN',
|
| 23 |
+
'Number.isInteger',
|
| 24 |
+
'Number.isSafeInteger',
|
| 25 |
+
'Number.MAX_SAFE_INTEGER',
|
| 26 |
+
'Number.MIN_SAFE_INTEGER',
|
| 27 |
+
'Number.parseFloat',
|
| 28 |
+
'Number.parseInt',
|
| 29 |
+
'Object.assign',
|
| 30 |
+
'Object.entries',
|
| 31 |
+
'Object.fromEntries',
|
| 32 |
+
'Object.getOwnPropertyDescriptor',
|
| 33 |
+
'Object.getOwnPropertyDescriptors',
|
| 34 |
+
'Object.hasOwn',
|
| 35 |
+
'Object.is',
|
| 36 |
+
'Object.keys',
|
| 37 |
+
'Object.values',
|
| 38 |
+
'Reflect',
|
| 39 |
+
'Set',
|
| 40 |
+
'Symbol',
|
| 41 |
+
'Symbol.asyncIterator',
|
| 42 |
+
'String.prototype.codePointAt',
|
| 43 |
+
'String.prototype.endsWith',
|
| 44 |
+
'String.fromCodePoint',
|
| 45 |
+
'String.prototype.includes',
|
| 46 |
+
'String.prototype.@@iterator',
|
| 47 |
+
'String.prototype.padEnd',
|
| 48 |
+
'String.prototype.padStart',
|
| 49 |
+
'String.prototype.repeat',
|
| 50 |
+
'String.raw',
|
| 51 |
+
'String.prototype.startsWith',
|
| 52 |
+
'String.prototype.trimEnd',
|
| 53 |
+
'String.prototype.trimStart',
|
| 54 |
+
'URL',
|
| 55 |
+
'URL.prototype.toJSON',
|
| 56 |
+
'URLSearchParams',
|
| 57 |
+
'WeakMap',
|
| 58 |
+
'WeakSet',
|
| 59 |
+
'Promise',
|
| 60 |
+
'Promise.prototype.finally',
|
| 61 |
+
'es2015',
|
| 62 |
+
'es2016',
|
| 63 |
+
'es2017',
|
| 64 |
+
'es2018',
|
| 65 |
+
'es2019',
|
| 66 |
+
'es5',
|
| 67 |
+
'es6',
|
| 68 |
+
'es7'
|
| 69 |
+
];
|
| 70 |
+
var url = 'https://nextjs.org/docs/messages/no-unwanted-polyfillio';
|
| 71 |
+
module.exports = (0, _definerule.defineRule)({
|
| 72 |
+
meta: {
|
| 73 |
+
docs: {
|
| 74 |
+
description: 'Prevent duplicate polyfills from Polyfill.io.',
|
| 75 |
+
category: 'HTML',
|
| 76 |
+
recommended: true,
|
| 77 |
+
url: url
|
| 78 |
+
},
|
| 79 |
+
type: 'problem',
|
| 80 |
+
schema: []
|
| 81 |
+
},
|
| 82 |
+
create: function create(context) {
|
| 83 |
+
var scriptImport = null;
|
| 84 |
+
return {
|
| 85 |
+
ImportDeclaration: function ImportDeclaration(node) {
|
| 86 |
+
if (node.source && node.source.value === 'next/script') {
|
| 87 |
+
scriptImport = node.specifiers[0].local.name;
|
| 88 |
+
}
|
| 89 |
+
},
|
| 90 |
+
JSXOpeningElement: function JSXOpeningElement(node) {
|
| 91 |
+
if (node.name && node.name.name !== 'script' && node.name.name !== scriptImport) {
|
| 92 |
+
return;
|
| 93 |
+
}
|
| 94 |
+
if (node.attributes.length === 0) {
|
| 95 |
+
return;
|
| 96 |
+
}
|
| 97 |
+
var srcNode = node.attributes.find(function(attr) {
|
| 98 |
+
return attr.type === 'JSXAttribute' && attr.name.name === 'src';
|
| 99 |
+
});
|
| 100 |
+
if (!srcNode || srcNode.value.type !== 'Literal') {
|
| 101 |
+
return;
|
| 102 |
+
}
|
| 103 |
+
var src = srcNode.value.value;
|
| 104 |
+
if (src.startsWith('https://cdn.polyfill.io/v2/') || src.startsWith('https://polyfill.io/v3/') || // https://community.fastly.com/t/new-options-for-polyfill-io-users/2540
|
| 105 |
+
src.startsWith('https://polyfill-fastly.net/') || src.startsWith('https://polyfill-fastly.io/') || // https://blog.cloudflare.com/polyfill-io-now-available-on-cdnjs-reduce-your-supply-chain-risk
|
| 106 |
+
src.startsWith('https://cdnjs.cloudflare.com/polyfill/')) {
|
| 107 |
+
var featureQueryString = new URL(src).searchParams.get('features');
|
| 108 |
+
var featuresRequested = (featureQueryString || '').split(',');
|
| 109 |
+
var unwantedFeatures = featuresRequested.filter(function(feature) {
|
| 110 |
+
return NEXT_POLYFILLED_FEATURES.includes(feature);
|
| 111 |
+
});
|
| 112 |
+
if (unwantedFeatures.length > 0) {
|
| 113 |
+
context.report({
|
| 114 |
+
node: node,
|
| 115 |
+
message: "No duplicate polyfills from Polyfill.io are allowed. ".concat(unwantedFeatures.join(', '), " ").concat(unwantedFeatures.length > 1 ? 'are' : 'is', " already shipped with Next.js. See: ").concat(url)
|
| 116 |
+
});
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
}
|
| 120 |
+
};
|
| 121 |
+
}
|
| 122 |
+
});
|
node_modules/@next/eslint-plugin-next/dist/utils/define-rule.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "defineRule", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return defineRule;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
var defineRule = function(rule) {
|
| 12 |
+
return rule;
|
| 13 |
+
};
|
node_modules/@next/eslint-plugin-next/dist/utils/get-root-dirs.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
Object.defineProperty(exports, "getRootDirs", {
|
| 6 |
+
enumerable: true,
|
| 7 |
+
get: function() {
|
| 8 |
+
return getRootDirs;
|
| 9 |
+
}
|
| 10 |
+
});
|
| 11 |
+
var _fastglob = require("fast-glob");
|
| 12 |
+
/**
|
| 13 |
+
* Process a Next.js root directory glob.
|
| 14 |
+
*/ var processRootDir = function(rootDir) {
|
| 15 |
+
return (0, _fastglob.globSync)(rootDir.replace(/\\/g, '/'), {
|
| 16 |
+
onlyDirectories: true
|
| 17 |
+
});
|
| 18 |
+
};
|
| 19 |
+
var getRootDirs = function(context) {
|
| 20 |
+
var rootDirs = [
|
| 21 |
+
context.cwd
|
| 22 |
+
];
|
| 23 |
+
var nextSettings = context.settings.next || {};
|
| 24 |
+
var rootDir = nextSettings.rootDir;
|
| 25 |
+
if (typeof rootDir === 'string') {
|
| 26 |
+
rootDirs = processRootDir(rootDir);
|
| 27 |
+
} else if (Array.isArray(rootDir)) {
|
| 28 |
+
rootDirs = rootDir.map(function(dir) {
|
| 29 |
+
return typeof dir === 'string' ? processRootDir(dir) : [];
|
| 30 |
+
}).flat();
|
| 31 |
+
}
|
| 32 |
+
return rootDirs;
|
| 33 |
+
};
|
node_modules/@next/eslint-plugin-next/dist/utils/node-attributes.js
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Return attributes and values of a node in a convenient way:
|
| 2 |
+
/* example:
|
| 3 |
+
<ExampleElement attr1="15" attr2>
|
| 4 |
+
{ attr1: {
|
| 5 |
+
hasValue: true,
|
| 6 |
+
value: 15
|
| 7 |
+
},
|
| 8 |
+
attr2: {
|
| 9 |
+
hasValue: false
|
| 10 |
+
}
|
| 11 |
+
Inclusion of hasValue is in case an eslint rule cares about boolean values
|
| 12 |
+
explicitly assigned to attribute vs the attribute being used as a flag
|
| 13 |
+
*/ "use strict";
|
| 14 |
+
Object.defineProperty(exports, "__esModule", {
|
| 15 |
+
value: true
|
| 16 |
+
});
|
| 17 |
+
Object.defineProperty(exports, "default", {
|
| 18 |
+
enumerable: true,
|
| 19 |
+
get: function() {
|
| 20 |
+
return NodeAttributes;
|
| 21 |
+
}
|
| 22 |
+
});
|
| 23 |
+
function _class_call_check(instance, Constructor) {
|
| 24 |
+
if (!(instance instanceof Constructor)) {
|
| 25 |
+
throw new TypeError("Cannot call a class as a function");
|
| 26 |
+
}
|
| 27 |
+
}
|
| 28 |
+
function _defineProperties(target, props) {
|
| 29 |
+
for(var i = 0; i < props.length; i++){
|
| 30 |
+
var descriptor = props[i];
|
| 31 |
+
descriptor.enumerable = descriptor.enumerable || false;
|
| 32 |
+
descriptor.configurable = true;
|
| 33 |
+
if ("value" in descriptor) descriptor.writable = true;
|
| 34 |
+
Object.defineProperty(target, descriptor.key, descriptor);
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
function _create_class(Constructor, protoProps, staticProps) {
|
| 38 |
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
| 39 |
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
| 40 |
+
return Constructor;
|
| 41 |
+
}
|
| 42 |
+
function _define_property(obj, key, value) {
|
| 43 |
+
if (key in obj) {
|
| 44 |
+
Object.defineProperty(obj, key, {
|
| 45 |
+
value: value,
|
| 46 |
+
enumerable: true,
|
| 47 |
+
configurable: true,
|
| 48 |
+
writable: true
|
| 49 |
+
});
|
| 50 |
+
} else {
|
| 51 |
+
obj[key] = value;
|
| 52 |
+
}
|
| 53 |
+
return obj;
|
| 54 |
+
}
|
| 55 |
+
var NodeAttributes = /*#__PURE__*/ function() {
|
| 56 |
+
"use strict";
|
| 57 |
+
function NodeAttributes(ASTnode) {
|
| 58 |
+
var _this = this;
|
| 59 |
+
_class_call_check(this, NodeAttributes);
|
| 60 |
+
_define_property(this, "attributes", void 0);
|
| 61 |
+
this.attributes = {};
|
| 62 |
+
ASTnode.attributes.forEach(function(attribute) {
|
| 63 |
+
if (!attribute.type || attribute.type !== 'JSXAttribute') {
|
| 64 |
+
return;
|
| 65 |
+
}
|
| 66 |
+
if (!!attribute.value) {
|
| 67 |
+
// hasValue
|
| 68 |
+
var value = typeof attribute.value.value === 'string' ? attribute.value.value : typeof attribute.value.expression.value !== 'undefined' ? attribute.value.expression.value : attribute.value.expression.properties;
|
| 69 |
+
_this.attributes[attribute.name.name] = {
|
| 70 |
+
hasValue: true,
|
| 71 |
+
value: value
|
| 72 |
+
};
|
| 73 |
+
} else {
|
| 74 |
+
_this.attributes[attribute.name.name] = {
|
| 75 |
+
hasValue: false
|
| 76 |
+
};
|
| 77 |
+
}
|
| 78 |
+
});
|
| 79 |
+
}
|
| 80 |
+
_create_class(NodeAttributes, [
|
| 81 |
+
{
|
| 82 |
+
key: "hasAny",
|
| 83 |
+
value: function hasAny() {
|
| 84 |
+
return !!Object.keys(this.attributes).length;
|
| 85 |
+
}
|
| 86 |
+
},
|
| 87 |
+
{
|
| 88 |
+
key: "has",
|
| 89 |
+
value: function has(attrName) {
|
| 90 |
+
return !!this.attributes[attrName];
|
| 91 |
+
}
|
| 92 |
+
},
|
| 93 |
+
{
|
| 94 |
+
key: "hasValue",
|
| 95 |
+
value: function hasValue(attrName) {
|
| 96 |
+
return !!this.attributes[attrName].hasValue;
|
| 97 |
+
}
|
| 98 |
+
},
|
| 99 |
+
{
|
| 100 |
+
key: "value",
|
| 101 |
+
value: function value(attrName) {
|
| 102 |
+
var attr = this.attributes[attrName];
|
| 103 |
+
if (!attr) {
|
| 104 |
+
return true;
|
| 105 |
+
}
|
| 106 |
+
if (attr.hasValue) {
|
| 107 |
+
return attr.value;
|
| 108 |
+
}
|
| 109 |
+
return undefined;
|
| 110 |
+
}
|
| 111 |
+
}
|
| 112 |
+
]);
|
| 113 |
+
return NodeAttributes;
|
| 114 |
+
}();
|
node_modules/@next/eslint-plugin-next/dist/utils/url.js
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"use strict";
|
| 2 |
+
Object.defineProperty(exports, "__esModule", {
|
| 3 |
+
value: true
|
| 4 |
+
});
|
| 5 |
+
function _export(target, all) {
|
| 6 |
+
for(var name in all)Object.defineProperty(target, name, {
|
| 7 |
+
enumerable: true,
|
| 8 |
+
get: all[name]
|
| 9 |
+
});
|
| 10 |
+
}
|
| 11 |
+
_export(exports, {
|
| 12 |
+
execOnce: function() {
|
| 13 |
+
return execOnce;
|
| 14 |
+
},
|
| 15 |
+
getUrlFromAppDirectory: function() {
|
| 16 |
+
return getUrlFromAppDirectory;
|
| 17 |
+
},
|
| 18 |
+
getUrlFromPagesDirectories: function() {
|
| 19 |
+
return getUrlFromPagesDirectories;
|
| 20 |
+
},
|
| 21 |
+
normalizeAppPath: function() {
|
| 22 |
+
return normalizeAppPath;
|
| 23 |
+
},
|
| 24 |
+
normalizeURL: function() {
|
| 25 |
+
return normalizeURL;
|
| 26 |
+
}
|
| 27 |
+
});
|
| 28 |
+
var _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
|
| 29 |
+
var _fs = /*#__PURE__*/ _interop_require_wildcard(require("fs"));
|
| 30 |
+
function _array_like_to_array(arr, len) {
|
| 31 |
+
if (len == null || len > arr.length) len = arr.length;
|
| 32 |
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
| 33 |
+
return arr2;
|
| 34 |
+
}
|
| 35 |
+
function _array_without_holes(arr) {
|
| 36 |
+
if (Array.isArray(arr)) return _array_like_to_array(arr);
|
| 37 |
+
}
|
| 38 |
+
function _getRequireWildcardCache(nodeInterop) {
|
| 39 |
+
if (typeof WeakMap !== "function") return null;
|
| 40 |
+
var cacheBabelInterop = new WeakMap();
|
| 41 |
+
var cacheNodeInterop = new WeakMap();
|
| 42 |
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
| 43 |
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
| 44 |
+
})(nodeInterop);
|
| 45 |
+
}
|
| 46 |
+
function _interop_require_wildcard(obj, nodeInterop) {
|
| 47 |
+
if (!nodeInterop && obj && obj.__esModule) {
|
| 48 |
+
return obj;
|
| 49 |
+
}
|
| 50 |
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
| 51 |
+
return {
|
| 52 |
+
default: obj
|
| 53 |
+
};
|
| 54 |
+
}
|
| 55 |
+
var cache = _getRequireWildcardCache(nodeInterop);
|
| 56 |
+
if (cache && cache.has(obj)) {
|
| 57 |
+
return cache.get(obj);
|
| 58 |
+
}
|
| 59 |
+
var newObj = {
|
| 60 |
+
__proto__: null
|
| 61 |
+
};
|
| 62 |
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
| 63 |
+
for(var key in obj){
|
| 64 |
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
| 65 |
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
| 66 |
+
if (desc && (desc.get || desc.set)) {
|
| 67 |
+
Object.defineProperty(newObj, key, desc);
|
| 68 |
+
} else {
|
| 69 |
+
newObj[key] = obj[key];
|
| 70 |
+
}
|
| 71 |
+
}
|
| 72 |
+
}
|
| 73 |
+
newObj.default = obj;
|
| 74 |
+
if (cache) {
|
| 75 |
+
cache.set(obj, newObj);
|
| 76 |
+
}
|
| 77 |
+
return newObj;
|
| 78 |
+
}
|
| 79 |
+
function _iterable_to_array(iter) {
|
| 80 |
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
| 81 |
+
}
|
| 82 |
+
function _non_iterable_spread() {
|
| 83 |
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
| 84 |
+
}
|
| 85 |
+
function _to_consumable_array(arr) {
|
| 86 |
+
return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
|
| 87 |
+
}
|
| 88 |
+
function _unsupported_iterable_to_array(o, minLen) {
|
| 89 |
+
if (!o) return;
|
| 90 |
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
| 91 |
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
| 92 |
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
| 93 |
+
if (n === "Map" || n === "Set") return Array.from(n);
|
| 94 |
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
| 95 |
+
}
|
| 96 |
+
// Cache for fs.readdirSync lookup.
|
| 97 |
+
// Prevent multiple blocking IO requests that have already been calculated.
|
| 98 |
+
var fsReadDirSyncCache = {};
|
| 99 |
+
/**
|
| 100 |
+
* Recursively parse directory for page URLs.
|
| 101 |
+
*/ function parseUrlForPages(urlprefix, directory) {
|
| 102 |
+
var _fsReadDirSyncCache, _directory;
|
| 103 |
+
var _;
|
| 104 |
+
(_ = (_fsReadDirSyncCache = fsReadDirSyncCache)[_directory = directory]) !== null && _ !== void 0 ? _ : _fsReadDirSyncCache[_directory] = _fs.readdirSync(directory, {
|
| 105 |
+
withFileTypes: true
|
| 106 |
+
});
|
| 107 |
+
var res = [];
|
| 108 |
+
fsReadDirSyncCache[directory].forEach(function(dirent) {
|
| 109 |
+
// TODO: this should account for all page extensions
|
| 110 |
+
// not just js(x) and ts(x)
|
| 111 |
+
if (/(\.(j|t)sx?)$/.test(dirent.name)) {
|
| 112 |
+
if (/^index(\.(j|t)sx?)$/.test(dirent.name)) {
|
| 113 |
+
res.push("".concat(urlprefix).concat(dirent.name.replace(/^index(\.(j|t)sx?)$/, '')));
|
| 114 |
+
}
|
| 115 |
+
res.push("".concat(urlprefix).concat(dirent.name.replace(/(\.(j|t)sx?)$/, '')));
|
| 116 |
+
} else {
|
| 117 |
+
var dirPath = _path.join(directory, dirent.name);
|
| 118 |
+
if (dirent.isDirectory() && !dirent.isSymbolicLink()) {
|
| 119 |
+
var _res;
|
| 120 |
+
(_res = res).push.apply(_res, _to_consumable_array(parseUrlForPages(urlprefix + dirent.name + '/', dirPath)));
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
});
|
| 124 |
+
return res;
|
| 125 |
+
}
|
| 126 |
+
/**
|
| 127 |
+
* Recursively parse app directory for URLs.
|
| 128 |
+
*/ function parseUrlForAppDir(urlprefix, directory) {
|
| 129 |
+
var _fsReadDirSyncCache, _directory;
|
| 130 |
+
var _;
|
| 131 |
+
(_ = (_fsReadDirSyncCache = fsReadDirSyncCache)[_directory = directory]) !== null && _ !== void 0 ? _ : _fsReadDirSyncCache[_directory] = _fs.readdirSync(directory, {
|
| 132 |
+
withFileTypes: true
|
| 133 |
+
});
|
| 134 |
+
var res = [];
|
| 135 |
+
fsReadDirSyncCache[directory].forEach(function(dirent) {
|
| 136 |
+
// TODO: this should account for all page extensions
|
| 137 |
+
// not just js(x) and ts(x)
|
| 138 |
+
if (/(\.(j|t)sx?)$/.test(dirent.name)) {
|
| 139 |
+
if (/^page(\.(j|t)sx?)$/.test(dirent.name)) {
|
| 140 |
+
res.push("".concat(urlprefix).concat(dirent.name.replace(/^page(\.(j|t)sx?)$/, '')));
|
| 141 |
+
} else if (!/^layout(\.(j|t)sx?)$/.test(dirent.name)) {
|
| 142 |
+
res.push("".concat(urlprefix).concat(dirent.name.replace(/(\.(j|t)sx?)$/, '')));
|
| 143 |
+
}
|
| 144 |
+
} else {
|
| 145 |
+
var dirPath = _path.join(directory, dirent.name);
|
| 146 |
+
if (dirent.isDirectory(dirPath) && !dirent.isSymbolicLink()) {
|
| 147 |
+
var _res;
|
| 148 |
+
(_res = res).push.apply(_res, _to_consumable_array(parseUrlForPages(urlprefix + dirent.name + '/', dirPath)));
|
| 149 |
+
}
|
| 150 |
+
}
|
| 151 |
+
});
|
| 152 |
+
return res;
|
| 153 |
+
}
|
| 154 |
+
function normalizeURL(url) {
|
| 155 |
+
if (!url) {
|
| 156 |
+
return;
|
| 157 |
+
}
|
| 158 |
+
url = url.split('?', 1)[0];
|
| 159 |
+
url = url.split('#', 1)[0];
|
| 160 |
+
url = url = url.replace(/(\/index\.html)$/, '/');
|
| 161 |
+
// Empty URLs should not be trailed with `/`, e.g. `#heading`
|
| 162 |
+
if (url === '') {
|
| 163 |
+
return url;
|
| 164 |
+
}
|
| 165 |
+
url = url.endsWith('/') ? url : url + '/';
|
| 166 |
+
return url;
|
| 167 |
+
}
|
| 168 |
+
function normalizeAppPath(route) {
|
| 169 |
+
return ensureLeadingSlash(route.split('/').reduce(function(pathname, segment, index, segments) {
|
| 170 |
+
// Empty segments are ignored.
|
| 171 |
+
if (!segment) {
|
| 172 |
+
return pathname;
|
| 173 |
+
}
|
| 174 |
+
// Groups are ignored.
|
| 175 |
+
if (isGroupSegment(segment)) {
|
| 176 |
+
return pathname;
|
| 177 |
+
}
|
| 178 |
+
// Parallel segments are ignored.
|
| 179 |
+
if (segment[0] === '@') {
|
| 180 |
+
return pathname;
|
| 181 |
+
}
|
| 182 |
+
// The last segment (if it's a leaf) should be ignored.
|
| 183 |
+
if ((segment === 'page' || segment === 'route') && index === segments.length - 1) {
|
| 184 |
+
return pathname;
|
| 185 |
+
}
|
| 186 |
+
return "".concat(pathname, "/").concat(segment);
|
| 187 |
+
}, ''));
|
| 188 |
+
}
|
| 189 |
+
function getUrlFromPagesDirectories(urlPrefix, directories) {
|
| 190 |
+
return Array.from(// De-duplicate similar pages across multiple directories.
|
| 191 |
+
new Set(directories.flatMap(function(directory) {
|
| 192 |
+
return parseUrlForPages(urlPrefix, directory);
|
| 193 |
+
}).map(// Since the URLs are normalized we add `^` and `$` to the RegExp to make sure they match exactly.
|
| 194 |
+
function(url) {
|
| 195 |
+
return "^".concat(normalizeURL(url), "$");
|
| 196 |
+
}))).map(function(urlReg) {
|
| 197 |
+
urlReg = urlReg.replace(/\[.*\]/g, '((?!.+?\\..+?).*?)');
|
| 198 |
+
return new RegExp(urlReg);
|
| 199 |
+
});
|
| 200 |
+
}
|
| 201 |
+
function getUrlFromAppDirectory(urlPrefix, directories) {
|
| 202 |
+
return Array.from(// De-duplicate similar pages across multiple directories.
|
| 203 |
+
new Set(directories.map(function(directory) {
|
| 204 |
+
return parseUrlForAppDir(urlPrefix, directory);
|
| 205 |
+
}).flat().map(// Since the URLs are normalized we add `^` and `$` to the RegExp to make sure they match exactly.
|
| 206 |
+
function(url) {
|
| 207 |
+
return "^".concat(normalizeAppPath(url), "$");
|
| 208 |
+
}))).map(function(urlReg) {
|
| 209 |
+
urlReg = urlReg.replace(/\[.*\]/g, '((?!.+?\\..+?).*?)');
|
| 210 |
+
return new RegExp(urlReg);
|
| 211 |
+
});
|
| 212 |
+
}
|
| 213 |
+
function execOnce(fn) {
|
| 214 |
+
var used = false;
|
| 215 |
+
var result;
|
| 216 |
+
return function() {
|
| 217 |
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
| 218 |
+
args[_key] = arguments[_key];
|
| 219 |
+
}
|
| 220 |
+
if (!used) {
|
| 221 |
+
used = true;
|
| 222 |
+
result = fn.apply(void 0, _to_consumable_array(args));
|
| 223 |
+
}
|
| 224 |
+
return result;
|
| 225 |
+
};
|
| 226 |
+
}
|
| 227 |
+
function ensureLeadingSlash(route) {
|
| 228 |
+
return route.startsWith('/') ? route : "/".concat(route);
|
| 229 |
+
}
|
| 230 |
+
function isGroupSegment(segment) {
|
| 231 |
+
return segment[0] === '(' && segment.endsWith(')');
|
| 232 |
+
}
|
node_modules/@next/eslint-plugin-next/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "@next/eslint-plugin-next",
|
| 3 |
+
"version": "15.2.2",
|
| 4 |
+
"description": "ESLint plugin for Next.js.",
|
| 5 |
+
"main": "dist/index.js",
|
| 6 |
+
"license": "MIT",
|
| 7 |
+
"repository": {
|
| 8 |
+
"url": "vercel/next.js",
|
| 9 |
+
"directory": "packages/eslint-plugin-next"
|
| 10 |
+
},
|
| 11 |
+
"files": [
|
| 12 |
+
"dist"
|
| 13 |
+
],
|
| 14 |
+
"dependencies": {
|
| 15 |
+
"fast-glob": "3.3.1"
|
| 16 |
+
},
|
| 17 |
+
"devDependencies": {
|
| 18 |
+
"eslint": "8.56.0"
|
| 19 |
+
},
|
| 20 |
+
"scripts": {
|
| 21 |
+
"build": "swc -d dist src",
|
| 22 |
+
"prepublishOnly": "cd ../../ && turbo run build"
|
| 23 |
+
}
|
| 24 |
+
}
|
node_modules/@next/swc-darwin-x64/README.md
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# `@next/swc-darwin-x64`
|
| 2 |
+
|
| 3 |
+
This is the **x86_64-apple-darwin** binary for `@next/swc`
|
node_modules/@next/swc-darwin-x64/next-swc.darwin-x64.node
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:216fa94ef67d1fc107482d0cc21713ae4787304db1bc7da82a5495213c45e9f7
|
| 3 |
+
size 126413696
|
node_modules/@next/swc-darwin-x64/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "@next/swc-darwin-x64",
|
| 3 |
+
"version": "15.2.2",
|
| 4 |
+
"repository": {
|
| 5 |
+
"type": "git",
|
| 6 |
+
"url": "https://github.com/vercel/next.js",
|
| 7 |
+
"directory": "crates/napi/npm/darwin-x64"
|
| 8 |
+
},
|
| 9 |
+
"os": [
|
| 10 |
+
"darwin"
|
| 11 |
+
],
|
| 12 |
+
"cpu": [
|
| 13 |
+
"x64"
|
| 14 |
+
],
|
| 15 |
+
"main": "next-swc.darwin-x64.node",
|
| 16 |
+
"files": [
|
| 17 |
+
"next-swc.darwin-x64.node"
|
| 18 |
+
],
|
| 19 |
+
"license": "MIT",
|
| 20 |
+
"engines": {
|
| 21 |
+
"node": ">= 10"
|
| 22 |
+
}
|
| 23 |
+
}
|
node_modules/@tailwindcss/node/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MIT License
|
| 2 |
+
|
| 3 |
+
Copyright (c) Tailwind Labs, Inc.
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
node_modules/@tailwindcss/node/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<p align="center">
|
| 2 |
+
<a href="https://tailwindcss.com" target="_blank">
|
| 3 |
+
<picture>
|
| 4 |
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-dark.svg">
|
| 5 |
+
<source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg">
|
| 6 |
+
<img alt="Tailwind CSS" src="https://raw.githubusercontent.com/tailwindlabs/tailwindcss/HEAD/.github/logo-light.svg" width="350" height="70" style="max-width: 100%;">
|
| 7 |
+
</picture>
|
| 8 |
+
</a>
|
| 9 |
+
</p>
|
| 10 |
+
|
| 11 |
+
<p align="center">
|
| 12 |
+
A utility-first CSS framework for rapidly building custom user interfaces.
|
| 13 |
+
</p>
|
| 14 |
+
|
| 15 |
+
<p align="center">
|
| 16 |
+
<a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/actions/workflow/status/tailwindlabs/tailwindcss/ci.yml?branch=next" alt="Build Status"></a>
|
| 17 |
+
<a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a>
|
| 18 |
+
<a href="https://github.com/tailwindcss/tailwindcss/releases"><img src="https://img.shields.io/npm/v/tailwindcss.svg" alt="Latest Release"></a>
|
| 19 |
+
<a href="https://github.com/tailwindcss/tailwindcss/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/tailwindcss.svg" alt="License"></a>
|
| 20 |
+
</p>
|
| 21 |
+
|
| 22 |
+
---
|
| 23 |
+
|
| 24 |
+
## Documentation
|
| 25 |
+
|
| 26 |
+
For full documentation, visit [tailwindcss.com](https://tailwindcss.com).
|
| 27 |
+
|
| 28 |
+
## Community
|
| 29 |
+
|
| 30 |
+
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
|
| 31 |
+
|
| 32 |
+
[Discuss Tailwind CSS on GitHub](https://github.com/tailwindcss/tailwindcss/discussions)
|
| 33 |
+
|
| 34 |
+
For chatting with others using the framework:
|
| 35 |
+
|
| 36 |
+
[Join the Tailwind CSS Discord Server](https://discord.gg/7NF8GNe)
|
| 37 |
+
|
| 38 |
+
## Contributing
|
| 39 |
+
|
| 40 |
+
If you're interested in contributing to Tailwind CSS, please read our [contributing docs](https://github.com/tailwindcss/tailwindcss/blob/next/.github/CONTRIBUTING.md) **before submitting a pull request**.
|
node_modules/@tailwindcss/node/dist/esm-cache.loader.d.mts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { ResolveHook } from 'node:module';
|
| 2 |
+
|
| 3 |
+
declare let resolve: ResolveHook;
|
| 4 |
+
|
| 5 |
+
export { resolve };
|
node_modules/@tailwindcss/node/dist/esm-cache.loader.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
import{isBuiltin as i}from"node:module";var o=async(a,e,u)=>{let r=await u(a,e);if(r.url===import.meta.url||i(r.url)||!e.parentURL)return r;let t=new URL(e.parentURL).searchParams.get("id");if(t===null)return r;let l=new URL(r.url);return l.searchParams.set("id",t),{...r,url:`${l}`}};export{o as resolve};
|