ultimate-jekyll-manager 0.0.35 → 0.0.36

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.
@@ -1,3 +1,4 @@
1
+ // @TODO: DELETE THIS FILE when the project is ready
1
2
  // Module
2
3
  export default (Manager) => {
3
4
  return new Promise(async function (resolve, reject) {
@@ -1,3 +1,5 @@
1
+ // @TODO: DELETE THIS FILE when the project is ready
2
+
1
3
  // Module
2
4
  export default (Manager) => {
3
5
  // Shortcuts
@@ -1,3 +1,5 @@
1
+ // @TODO: DELETE THIS FILE when the project is ready
2
+
1
3
  // Libraries
2
4
  import helper from './helper.js';
3
5
 
@@ -119,8 +119,6 @@ async function processTranslation() {
119
119
  const openAIKey = await fetchOpenAIKey();
120
120
  const ujOnly = process.env.UJ_TRANSLATION_ONLY;
121
121
 
122
- // console.log('--openAIKey', openAIKey);
123
-
124
122
  if (!openAIKey) {
125
123
  return logger.error('❌ openAIKey not set. Translation requires OpenAI API key.');
126
124
  }
@@ -687,7 +685,6 @@ async function pushTranslationBranch(updatedFiles) {
687
685
  logger.log(`🎉 Finished pushing ${files.length} file(s) to '${TRANSLATION_BRANCH}'`);
688
686
  }
689
687
 
690
-
691
688
  async function fetchOpenAIKey() {
692
689
  const url = 'https://api.itwcreativeworks.com/get-api-keys';
693
690
 
@@ -698,13 +695,17 @@ async function fetchOpenAIKey() {
698
695
  headers: {
699
696
  'Authorization': `Bearer ${process.env.GH_TOKEN}`,
700
697
  },
701
- body: {
698
+ query: {
702
699
  authorizationKeyName: 'github',
703
700
  }
704
701
  });
705
702
 
703
+ // Log
704
+ logger.log('OpenAI API response:', response);
705
+
706
+ // Return
706
707
  return response.openai.ultimate_jekyll.translation;
707
708
  } catch (error) {
708
- console.error('Error:', error);
709
+ logger.error('Error:', error);
709
710
  }
710
711
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-jekyll-manager",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
4
  "description": "Ultimate Jekyll dependency manager",
5
5
  "main": "dist/index.js",
6
6
  "exports": {