@tunghtml/strapi-plugin-filtered-relation 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.3] - 2024-12-02
4
+
5
+ ### Changed
6
+
7
+ - **Package cleanup**: Added `files` field to package.json to only publish necessary files
8
+ - Removed unnecessary files from npm package (push-to-github.sh, PUBLISH.md, etc.)
9
+ - Reduces package size and keeps it clean
10
+ - Only includes: admin/, server/, strapi-admin.js, strapi-server.js, README.md, CHANGELOG.md
11
+
3
12
  ## [1.1.2] - 2024-12-02
4
13
 
5
14
  ### Fixed
package/README.md CHANGED
@@ -109,3 +109,7 @@ Current version: 1.1.0
109
109
  ## License
110
110
 
111
111
  MIT
112
+
113
+ ---
114
+
115
+ Built by **Tung Le**. More Strapi plugins and case studies at [tungln.is-a.dev](https://tungln.is-a.dev).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tunghtml/strapi-plugin-filtered-relation",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "A Strapi custom field plugin for displaying filtered relations with dynamic placeholder support and status change capability",
5
5
  "keywords": [
6
6
  "strapi",
@@ -10,6 +10,14 @@
10
10
  "filter",
11
11
  "strapi5"
12
12
  ],
13
+ "files": [
14
+ "admin",
15
+ "server",
16
+ "strapi-admin.js",
17
+ "strapi-server.js",
18
+ "README.md",
19
+ "CHANGELOG.md"
20
+ ],
13
21
  "strapi": {
14
22
  "name": "filtered-relation",
15
23
  "displayName": "Filtered Relation",
@@ -28,12 +36,21 @@
28
36
  "styled-components": "^6.0.0"
29
37
  },
30
38
  "author": {
31
- "name": "Tung HTML",
32
- "email": "tunghtml@example.com"
39
+ "name": "Tung Le",
40
+ "email": "nhattung1511@gmail.com",
41
+ "url": "https://tungln.is-a.dev"
33
42
  },
34
43
  "engines": {
35
44
  "node": ">=18.0.0 <=22.x.x",
36
45
  "npm": ">=6.0.0"
37
46
  },
38
- "license": "MIT"
47
+ "license": "MIT",
48
+ "homepage": "https://github.com/finnwasabi/strapi-plugin-filtered-relation#readme",
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/finnwasabi/strapi-plugin-filtered-relation.git"
52
+ },
53
+ "bugs": {
54
+ "url": "https://github.com/finnwasabi/strapi-plugin-filtered-relation/issues"
55
+ }
39
56
  }
package/PUBLISH.md DELETED
@@ -1,94 +0,0 @@
1
- # Publishing Guide
2
-
3
- ## Prerequisites
4
-
5
- 1. Make sure you're logged in to npm:
6
-
7
- ```bash
8
- npm login
9
- ```
10
-
11
- 2. Verify your npm account has access to publish `@tunghtml` scoped packages
12
-
13
- ## Steps to Publish
14
-
15
- ### 1. Test Locally First
16
-
17
- The plugin is already configured as a local plugin in `backend/config/plugins.js`:
18
-
19
- ```javascript
20
- "filtered-relation": {
21
- enabled: true,
22
- resolve: "./src/plugins/filtered-relation",
23
- }
24
- ```
25
-
26
- Test thoroughly in your local Strapi instance before publishing.
27
-
28
- ### 2. Update Version
29
-
30
- Update version in `package.json`:
31
-
32
- - Patch: 1.1.0 -> 1.1.1 (bug fixes)
33
- - Minor: 1.1.0 -> 1.2.0 (new features, backward compatible)
34
- - Major: 1.1.0 -> 2.0.0 (breaking changes)
35
-
36
- ### 3. Publish to NPM
37
-
38
- From the plugin directory:
39
-
40
- ```bash
41
- cd backend/src/plugins/filtered-relation
42
- npm publish --access public
43
- ```
44
-
45
- ### 4. Update Project to Use NPM Package
46
-
47
- After publishing, you can switch back to using the npm package:
48
-
49
- 1. Update `backend/package.json`:
50
-
51
- ```json
52
- {
53
- "dependencies": {
54
- "@tunghtml/strapi-plugin-filtered-relation": "^1.1.0"
55
- }
56
- }
57
- ```
58
-
59
- 2. Update `backend/config/plugins.js`:
60
-
61
- ```javascript
62
- "filtered-relation": {
63
- enabled: true,
64
- // Remove the resolve line to use npm package
65
- }
66
- ```
67
-
68
- 3. Install the package:
69
-
70
- ```bash
71
- cd backend
72
- yarn install
73
- ```
74
-
75
- ## Current Version
76
-
77
- Version 1.1.0 includes:
78
-
79
- - Status change dropdown feature
80
- - Dynamic status options from schema
81
- - Auto-refresh on status change
82
- - Backward compatible with 1.0.0
83
-
84
- ## Testing Checklist
85
-
86
- Before publishing, verify:
87
-
88
- - [ ] Plugin loads without errors
89
- - [ ] Filtered relations display correctly
90
- - [ ] Status dropdown shows correct options
91
- - [ ] Status change updates the record
92
- - [ ] Lists refresh automatically after status change
93
- - [ ] Works with different content types (reusable)
94
- - [ ] No console errors
package/push-to-github.sh DELETED
@@ -1,52 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Script to push plugin to GitHub
4
- # Usage: ./push-to-github.sh
5
-
6
- set -e
7
-
8
- echo "🚀 Pushing strapi-plugin-filtered-relation to GitHub..."
9
-
10
- # Check if we're in the right directory
11
- if [ ! -f "package.json" ]; then
12
- echo "❌ Error: package.json not found. Are you in the plugin directory?"
13
- exit 1
14
- fi
15
-
16
- # Check if git is initialized
17
- if [ ! -d ".git" ]; then
18
- echo "📦 Initializing git repository..."
19
- git init
20
- git remote add origin https://github.com/finnwasabi/strapi-plugin-filtered-relation.git
21
- fi
22
-
23
- # Add all files
24
- echo "📝 Adding files..."
25
- git add .
26
-
27
- # Commit
28
- echo "💾 Committing changes..."
29
- git commit -m "Release v1.1.0 - Add status change dropdown feature
30
-
31
- - Add status change dropdown at end of each item
32
- - Dynamically fetch enum options from target model schema
33
- - Move items between records using connect/disconnect API
34
- - Dispatch custom events to refresh all fields without page reload
35
- - Remove all console.log statements
36
- - Update README with detailed options table and descriptions
37
- - Update CHANGELOG with technical details
38
- - Fully dynamic and reusable for any use case"
39
-
40
- # Tag the release
41
- echo "🏷️ Creating tag v1.1.0..."
42
- git tag -a v1.1.0 -m "Version 1.1.0"
43
-
44
- # Push to GitHub
45
- echo "⬆️ Pushing to GitHub..."
46
- git push origin main
47
- git push origin v1.1.0
48
-
49
- echo "✅ Successfully pushed to GitHub!"
50
- echo "📦 Package: @tunghtml/strapi-plugin-filtered-relation@1.1.0"
51
- echo "🔗 GitHub: https://github.com/finnwasabi/strapi-plugin-filtered-relation"
52
- echo "🔗 NPM: https://www.npmjs.com/package/@tunghtml/strapi-plugin-filtered-relation"