-
Notifications
You must be signed in to change notification settings - Fork 0
Strapi ImageKit Provider #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ahnv
wants to merge
19
commits into
main
Choose a base branch
from
dev
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 11 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
a0572b3
initial commit
4bd6483
updated logs
28b6700
added readme.md
7e23b78
added readme.md
8e55a57
updated readme
c48fb91
updated readme
64425c6
updated readme
ankur-dwivedi 01ae6d7
updated readme.md
ankur-dwivedi dcb807c
updated readme.md
ankur-dwivedi b745993
feat: ImageKit Strapi plugin v1
ahnv e6354fb
ci: add GitHub Actions workflow to publish to npm on release
ahnv 73a6b06
style: add and configure ESLint for TypeScript project
ahnv 78029a3
fix: correct typos in Rollup config and README documentation
ahnv 3689b6e
docs: remove duplicate features section and clarify signed URLs descr…
ahnv f1884fc
refactor: rename restrictUnsignedUrls to useSignedUrls for clarity
ahnv 403bd2c
fix: file url cache
ahnv 753b7cd
docs: updated ReadMe
ahnv 041c90f
docs: updated readme
ahnv 8dab21c
docs: updated CONTRIBUTING
ahnv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
dist/ | ||
.eslintrc.js | ||
jest.config.js | ||
rollup.config.mjs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
module.exports = { | ||
root: true, | ||
extends: [ | ||
'@strapi/eslint-config/back/typescript' /*'plugin:@typescript-eslint/recommended-requiring-type-checking'*/, | ||
], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'eslint-plugin-rxjs'], | ||
parserOptions: { | ||
project: ['./tsconfig.eslint.json'], | ||
}, | ||
globals: { | ||
strapi: false, | ||
}, | ||
rules: { | ||
...require('./index').rules, | ||
'rxjs/finnish': 'error', | ||
'node/no-unsupported-features/es-syntax': 'off', | ||
'node/no-missing-import': 'off', | ||
// TODO: The following rules from @strapi/eslint-config/back/typescript are disabled because they're causing problems we need to solve or fix | ||
// to be solved in configuration | ||
'node/no-unsupported-features/es-syntax': 'off', | ||
'import/prefer-default-export': 'off', | ||
'import/namespace': 'off', | ||
'node/no-missing-import': 'off', | ||
ahnv marked this conversation as resolved.
Show resolved
Hide resolved
|
||
'@typescript-eslint/brace-style': 'off', // TODO: fix conflict with prettier/prettier in data-transfer/engine/index.ts | ||
// to be cleaned up throughout codebase (too many to fix at the moment) | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'@typescript-eslint/comma-dangle': 'off', | ||
'@typescript-eslint/quotes': 'off', | ||
'@typescript-eslint/no-shadow': 'off', | ||
'@typescript-eslint/naming-convention': 'warn', | ||
'@typescript-eslint/no-empty-interface': 'warn', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**.test.ts'], | ||
rules: { | ||
'@typescript-eslint/ban-ts-comment': 'warn', // as long as javascript is allowed in our codebase, we want to test erroneous typescript usage | ||
}, | ||
}, | ||
], | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
# From https://github.com/Danimoth/gitattributes/blob/master/Web.gitattributes | ||
|
||
# Handle line endings automatically for files detected as text | ||
# and leave all files detected as binary untouched. | ||
* text=auto | ||
|
||
# | ||
# The above will handle all files NOT found below | ||
# | ||
|
||
# | ||
## These files are text and should be normalized (Convert crlf => lf) | ||
# | ||
|
||
# source code | ||
*.php text | ||
*.css text | ||
*.sass text | ||
*.scss text | ||
*.less text | ||
*.styl text | ||
*.js text eol=lf | ||
*.coffee text | ||
*.json text | ||
*.htm text | ||
*.html text | ||
*.xml text | ||
*.svg text | ||
*.txt text | ||
*.ini text | ||
*.inc text | ||
*.pl text | ||
*.rb text | ||
*.py text | ||
*.scm text | ||
*.sql text | ||
*.sh text | ||
*.bat text | ||
|
||
# templates | ||
*.ejs text | ||
*.hbt text | ||
*.jade text | ||
*.haml text | ||
*.hbs text | ||
*.dot text | ||
*.tmpl text | ||
*.phtml text | ||
|
||
# git config | ||
.gitattributes text | ||
.gitignore text | ||
.gitconfig text | ||
|
||
# code analysis config | ||
.jshintrc text | ||
.jscsrc text | ||
.jshintignore text | ||
.csslintrc text | ||
|
||
# misc config | ||
*.yaml text | ||
*.yml text | ||
.editorconfig text | ||
|
||
# build config | ||
*.npmignore text | ||
*.bowerrc text | ||
|
||
# Heroku | ||
Procfile text | ||
.slugignore text | ||
|
||
# Documentation | ||
*.md text | ||
LICENSE text | ||
AUTHORS text | ||
|
||
|
||
# | ||
## These files are binary and should be left untouched | ||
# | ||
|
||
# (binary is a macro for -text -diff) | ||
*.png binary | ||
*.jpg binary | ||
*.jpeg binary | ||
*.gif binary | ||
*.ico binary | ||
*.mov binary | ||
*.mp4 binary | ||
*.mp3 binary | ||
*.flv binary | ||
*.fla binary | ||
*.swf binary | ||
*.gz binary | ||
*.zip binary | ||
*.7z binary | ||
*.ttf binary | ||
*.eot binary | ||
*.woff binary | ||
*.pyc binary | ||
*.pdf binary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [20.x] | ||
abhinavr4 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Build and Test | ||
run: | | ||
npm install | ||
npm run build | ||
npm run test || echo "No tests defined. Skipping." | ||
env: | ||
CI: true | ||
|
||
publish: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org/ | ||
- name: NPM Publish | ||
run: | | ||
npm install | ||
npm run build | ||
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN | ||
npm whoami | ||
VERSION=$(node -p "require('./package.json').version" ) | ||
if [[ "$VERSION" =~ ^[^-]+$ ]]; then | ||
NPM_TAG="latest" | ||
else | ||
NPM_TAG="beta" | ||
fi | ||
echo "Publishing $VERSION with $NPM_TAG tag." | ||
npm publish --tag $NPM_TAG --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.npm_token }} | ||
CI: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
node_modules | ||
package-lock.json | ||
yarn.lock | ||
|
||
# Cruft | ||
.DS_Store | ||
npm-debug.log | ||
.idea | ||
|
||
dist | ||
.yarn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
############################ | ||
# OS X | ||
############################ | ||
|
||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
Icon | ||
.Spotlight-V100 | ||
.Trashes | ||
._* | ||
|
||
############################ | ||
# Linux | ||
############################ | ||
|
||
*~ | ||
|
||
############################ | ||
# Windows | ||
############################ | ||
|
||
Thumbs.db | ||
ehthumbs.db | ||
Desktop.ini | ||
$RECYCLE.BIN/ | ||
*.cab | ||
*.msi | ||
*.msm | ||
*.msp | ||
|
||
############################ | ||
# Packages | ||
############################ | ||
|
||
*.7z | ||
*.csv | ||
*.dat | ||
*.dmg | ||
*.gz | ||
*.iso | ||
*.jar | ||
*.rar | ||
*.tar | ||
*.zip | ||
*.com | ||
*.class | ||
*.dll | ||
*.exe | ||
*.o | ||
*.seed | ||
*.so | ||
*.swo | ||
*.swp | ||
*.swn | ||
*.swm | ||
*.out | ||
*.pid | ||
|
||
############################ | ||
# Logs and databases | ||
############################ | ||
|
||
.tmp | ||
*.log | ||
*.sql | ||
*.sqlite | ||
|
||
############################ | ||
# Misc. | ||
############################ | ||
|
||
*# | ||
ssl | ||
.editorconfig | ||
.gitattributes | ||
.idea | ||
nbproject | ||
|
||
############################ | ||
# Node.js | ||
############################ | ||
|
||
lib-cov | ||
lcov.info | ||
pids | ||
logs | ||
results | ||
build | ||
node_modules | ||
.node_history | ||
|
||
############################ | ||
# Tests | ||
############################ | ||
|
||
test | ||
tests | ||
__tests__ | ||
jest.config.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v20.13.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Contributing to @imagekit/strapi-provider-upload | ||
|
||
Thank you for your interest in contributing to the ImageKit Strapi Upload Provider! Your help is greatly appreciated. Please follow the guidelines below to ensure a smooth contribution process. | ||
|
||
## Getting Started | ||
|
||
1. **Fork the repository** and clone your fork locally. | ||
2. **Install dependencies**: | ||
```bash | ||
npm install | ||
# or | ||
yarn install | ||
``` | ||
3. **Create a new branch** for your feature or bugfix: | ||
```bash | ||
git checkout -b my-feature | ||
``` | ||
|
||
## Development | ||
- Keep your code clean and readable. | ||
- Follow existing code style and conventions (TypeScript, Prettier, etc.). | ||
- Add or update tests where applicable. | ||
- Document new features or changes in the README if needed. | ||
|
||
## Pull Requests | ||
- Ensure your branch is up to date with the latest `main` branch. | ||
- Open a pull request with a clear description of your changes. | ||
- Reference any related issues in your PR description. | ||
- Be responsive to code review feedback. | ||
|
||
## Commit Messages | ||
- Use clear, descriptive commit messages. | ||
- Follow the [Conventional Commits](https://www.conventionalcommits.org/) style if possible. | ||
|
||
## Code of Conduct | ||
Please be respectful and considerate in all interactions. | ||
|
||
## Reporting Issues | ||
If you find a bug or have a feature request, please open an issue on GitHub with as much detail as possible. | ||
|
||
--- | ||
|
||
Thank you for helping make this project better! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2025 Imagekit | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.