Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7f190f2
chore: added strapi boilerplate
ahnv May 12, 2025
1706fa2
feat: restructure plugin admin and introduce settings page, common mo…
ahnv May 14, 2025
6987ac1
fix: build
ahnv May 14, 2025
7b2b74b
feat: enhance ImageKit plugin with expanded configuration options and…
ahnv May 15, 2025
f53dcb2
feat: add permission checks to plugin controllers
ahnv May 15, 2025
4a832e1
feat: integrate ImageKit Media Library widget
ahnv May 15, 2025
0d20943
feat: Implement webhook integration for ImageKit file import
ahnv May 18, 2025
8d92a9f
feat: Add media library permission and update permissions structure
ahnv May 18, 2025
68bfe14
refactor: rename isPrivate to useSignedUrls for clarity in URL signing
ahnv May 18, 2025
2c1af86
feat: add private file upload option and improve URL signing
ahnv May 18, 2025
40fc86e
docs: Overhaul README, add LICENSE & CONTRIBUTING.md, and update sett…
ahnv May 18, 2025
d71327b
chore: Bump version to 1.0.0
ahnv May 18, 2025
486ce98
refactor: move URL transformation to Strapi sanitizer
ahnv May 20, 2025
41a038e
refactor: remove unused clearImageKitClient and enhance upload params
ahnv May 21, 2025
9a39ef7
feat: enhance plugin configuration with upload and URL options
ahnv May 21, 2025
cf72af0
fix: spelling correction in readme
ahnv May 21, 2025
14b4459
refactor: reorganize settings page layout and improve validation flow
ahnv May 28, 2025
0e094a9
fix: set default folderPath to root instead of using path.dirname
ahnv May 28, 2025
a0cb38f
docs: improve README clarity and organization with updated headings a…
ahnv Jun 3, 2025
b6ca3c8
refactor: improve media library widget cleanup and settings security
ahnv Jun 10, 2025
f9cb083
refactor: clean up code and improve error handling in media library
ahnv Jun 19, 2025
2cf210b
fix: update error notification type and message for failed imports
ahnv Jun 19, 2025
e64de7a
feat: add English translations for ImageKit media library UI components
ahnv Jun 19, 2025
4827f45
style: add missing space in ImageKit error log message
ahnv Jun 19, 2025
c32c332
style: standardize code formatting and add husky pre-commit hooks
ahnv Jun 27, 2025
9b00545
ci: add GitHub Actions workflows for NPM publishing and CI builds
ahnv Jun 27, 2025
221d702
ci: add GitHub Actions workflow for automated NPM package publishing
ahnv Jun 27, 2025
e15f7c6
docs: add CI badge and improve README documentation structure
ahnv Jun 27, 2025
caa5170
docs: simplify README table of contents by removing redundant sections
ahnv Jun 27, 2025
ea5fe34
docs: add screenshots and update configuration instructions in README
ahnv Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{package.json,*.yml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
37 changes: 37 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Node CI

on:
push:
pull_request:

jobs:
pack:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
runs-on: ubuntu-latest

steps:
- name: ⬇️ Check out code
uses: actions/checkout@v4

- name: 🟢 Enable Corepack
run: corepack enable

- name: 🟢 Set up Node 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn

- name: 📦 Install deps, build, pack
run: |
yarn install --frozen-lockfile
yarn build
yarn pack --out %s-%v.tgz
env:
CI: true

- name: 📤 Upload package artifact
uses: actions/upload-artifact@v4
with:
name: strapi-plugin-imagekit-package
path: strapi-plugin-imagekit-*.tgz
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Publish Package to npmjs

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: ⬇️ Check out code
uses: actions/checkout@v4

- name: 🟢 Enable Corepack
run: corepack enable

- name: 🟢 Set up Node 20
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: yarn
registry-url: 'https://registry.npmjs.org'

- name: Build and Publish
run: |
yarn install --frozen-lockfile

yarn build

# print the NPM user name for validation
yarn npm whoami

VERSION=$(node -p "require('./package.json').version" )

# Only publish stable versions to the latest tag
if [[ "$VERSION" =~ ^[^-]+$ ]]; then
NPM_TAG="latest"
else
NPM_TAG="beta"
fi

echo "Publishing $VERSION with $NPM_TAG tag."

yarn npm publish --tag $NPM_TAG --provenance

env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
CI: true
138 changes: 138 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

############################
# 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
*.sqlite3


############################
# Misc.
############################

*#
ssl
.idea
nbproject
.tsbuildinfo
.eslintcache
.env


############################
# Strapi
############################

public/uploads/*
!public/uploads/.gitkeep


############################
# Build
############################

dist
build


############################
# Node.js
############################

lib-cov
lcov.info
pids
logs
results
node_modules
.node_history


############################
# Package managers
############################

.yarn/*
!.yarn/cache
!.yarn/unplugged
!.yarn/patches
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.pnp.*
yarn-error.log


############################
# Tests
############################

coverage
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20.13.0
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
coverage
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"tabWidth": 2,
"printWidth": 100,
"singleQuote": true,
"trailingComma": "es5"
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"editor.tabSize": 2,
"typescript.preferences.importModuleSpecifier": "relative",
"prettier.bracketSpacing": false,
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.codeActionsOnSave": {
"source.addMissingImports.ts": "always",
"source.fixAll.eslint": "always",
"source.organizeImports": "always"
},
"typescript.tsdk": "node_modules/typescript/lib"
}
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
47 changes: 47 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributing to strapi-plugin-imagekit

Thank you for your interest in contributing to the ImageKit Strapi Plugin! 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.).
- 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!
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 ImageKit Pvt Ltd

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.
Loading