notes-to-strapi-export-article-ai 1.0.3 → 1.0.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/.github/workflows/deploy.yml +4 -3
- package/main.ts +16 -12
- package/manifest.json +9 -9
- package/package.json +1 -1
- package/versions.json +3 -2
|
@@ -19,8 +19,8 @@ jobs:
|
|
|
19
19
|
|
|
20
20
|
- name: Configure Git
|
|
21
21
|
run: |
|
|
22
|
-
git config --local user.email "
|
|
23
|
-
git config --local user.name "
|
|
22
|
+
git config --local user.email "your-email@example.com"
|
|
23
|
+
git config --local user.name "Your Name"
|
|
24
24
|
|
|
25
25
|
- name: Use Node.js
|
|
26
26
|
uses: actions/setup-node@v4
|
|
@@ -47,11 +47,12 @@ jobs:
|
|
|
47
47
|
done
|
|
48
48
|
|
|
49
49
|
npm version $new_version --no-git-tag-version
|
|
50
|
+
sed -i "s/\"version\": \".*\"/\"version\": \"$new_version\"/" manifest.json
|
|
50
51
|
echo "::set-output name=VERSION::$new_version"
|
|
51
52
|
|
|
52
53
|
- name: Commit and Push Version Update
|
|
53
54
|
run: |
|
|
54
|
-
git add package.json
|
|
55
|
+
git add package.json manifest.json
|
|
55
56
|
git commit -m "chore(release): ${{ steps.version-bump.outputs.VERSION }}"
|
|
56
57
|
git tag v${{ steps.version-bump.outputs.VERSION }}
|
|
57
58
|
git push origin main --follow-tags
|
package/main.ts
CHANGED
|
@@ -10,9 +10,9 @@ import {
|
|
|
10
10
|
} from 'obsidian'
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
|
-
* The settings for the plugin
|
|
13
|
+
* The settings for the Strapi Exporter plugin
|
|
14
14
|
*/
|
|
15
|
-
interface
|
|
15
|
+
interface StrapiExporterSettings {
|
|
16
16
|
strapiUrl: string
|
|
17
17
|
strapiApiToken: string
|
|
18
18
|
openaiApiKey: string
|
|
@@ -26,7 +26,7 @@ interface MyPluginSettings {
|
|
|
26
26
|
/**
|
|
27
27
|
* The default settings for the plugin
|
|
28
28
|
*/
|
|
29
|
-
const
|
|
29
|
+
const DEFAULT_STRAPI_EXPORTER_SETTINGS: StrapiExporterSettings = {
|
|
30
30
|
strapiUrl: '',
|
|
31
31
|
strapiApiToken: '',
|
|
32
32
|
openaiApiKey: '',
|
|
@@ -79,8 +79,8 @@ const DEFAULT_SETTINGS: MyPluginSettings = {
|
|
|
79
79
|
/**
|
|
80
80
|
* The main plugin class
|
|
81
81
|
*/
|
|
82
|
-
export default class
|
|
83
|
-
settings:
|
|
82
|
+
export default class StrapiExporterPlugin extends Plugin {
|
|
83
|
+
settings: StrapiExporterSettings
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
86
|
* The main entry point for the plugin
|
|
@@ -318,9 +318,9 @@ export default class MyPlugin extends Plugin {
|
|
|
318
318
|
)
|
|
319
319
|
}
|
|
320
320
|
)
|
|
321
|
-
ribbonIconEl.addClass('
|
|
321
|
+
ribbonIconEl.addClass('strapi-exporter-ribbon-class')
|
|
322
322
|
|
|
323
|
-
this.addSettingTab(new
|
|
323
|
+
this.addSettingTab(new StrapiExporterSettingTab(this.app, this))
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
onunload() {}
|
|
@@ -329,7 +329,11 @@ export default class MyPlugin extends Plugin {
|
|
|
329
329
|
* Load the settings for the plugin
|
|
330
330
|
*/
|
|
331
331
|
async loadSettings() {
|
|
332
|
-
this.settings = Object.assign(
|
|
332
|
+
this.settings = Object.assign(
|
|
333
|
+
{},
|
|
334
|
+
DEFAULT_STRAPI_EXPORTER_SETTINGS,
|
|
335
|
+
await this.loadData()
|
|
336
|
+
)
|
|
333
337
|
}
|
|
334
338
|
|
|
335
339
|
/**
|
|
@@ -560,12 +564,12 @@ export default class MyPlugin extends Plugin {
|
|
|
560
564
|
}
|
|
561
565
|
|
|
562
566
|
/**
|
|
563
|
-
* The settings tab for the plugin
|
|
567
|
+
* The settings tab for the Strapi Exporter plugin
|
|
564
568
|
*/
|
|
565
|
-
class
|
|
566
|
-
plugin:
|
|
569
|
+
class StrapiExporterSettingTab extends PluginSettingTab {
|
|
570
|
+
plugin: StrapiExporterPlugin
|
|
567
571
|
|
|
568
|
-
constructor(app: App, plugin:
|
|
572
|
+
constructor(app: App, plugin: StrapiExporterPlugin) {
|
|
569
573
|
super(app, plugin)
|
|
570
574
|
this.plugin = plugin
|
|
571
575
|
}
|
package/manifest.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
"id": "notes-to-strapi-export-article-ai",
|
|
3
|
+
"name": "Strapi Exporter, Notes to Strapi article AI enhanced",
|
|
4
|
+
"version": "1.0.4",
|
|
5
|
+
"minAppVersion": "1.5.0",
|
|
6
|
+
"description": "Effortlessly export your notes to Strapi CMS with AI-powered image handling and SEO optimization. Replace all the images in your notes by uploaded images in Strapi, and add SEO metadata to uploaded images.",
|
|
7
|
+
"author": "Cinquin Andy",
|
|
8
|
+
"authorUrl": "https://andy.cinquin.com",
|
|
9
|
+
"isDesktopOnly": true,
|
|
10
|
+
"fundingUrl": "https://github.com/sponsors/CinquinAndy"
|
|
11
11
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "notes-to-strapi-export-article-ai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Effortlessly export your Obsidian notes to Strapi CMS with AI-powered image handling and SEO optimization. Replace all the images in your notes by uploaded images in Strapi, and add SEO metadata to uploaded images.",
|
|
5
5
|
"main": "main.js",
|
|
6
6
|
"scripts": {
|
package/versions.json
CHANGED