wiki-plugin-linkitylink 0.0.1 → 0.0.5

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/README.md CHANGED
@@ -79,6 +79,7 @@ wiki --port 3001
79
79
  **Variables:**
80
80
  - `LINKITYLINK_PORT` - Port for this wiki's linkitylink instance (default: 3010)
81
81
  - `LINKITYLINK_PATH` - Path to linkitylink installation (default: `../../linkitylink` relative to plugin)
82
+ - `ENABLE_APP_PURCHASE` - Show "Buy in App" button (default: false, set to `true` to enable)
82
83
 
83
84
  ### Base URLs (owner.json)
84
85
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wiki-plugin-linkitylink",
3
- "version": "0.0.1",
3
+ "version": "0.0.5",
4
4
  "description": "Linkitylink integration plugin for federated wiki",
5
5
  "keywords": [
6
6
  "wiki",
@@ -24,6 +24,7 @@
24
24
  "test": "echo \"Error: no test specified\" && exit 1"
25
25
  },
26
26
  "dependencies": {
27
+ "linkitylink": "latest",
27
28
  "http-proxy": "^1.18.1",
28
29
  "node-fetch": "^2.6.1"
29
30
  }
package/server/server.js CHANGED
@@ -8,7 +8,7 @@ const { spawn } = require('child_process');
8
8
 
9
9
  // Linkitylink configuration
10
10
  const LINKITYLINK_PORT = process.env.LINKITYLINK_PORT || 3010;
11
- const LINKITYLINK_PATH = process.env.LINKITYLINK_PATH || path.join(__dirname, '../../../linkitylink');
11
+ const LINKITYLINK_PATH = process.env.LINKITYLINK_PATH || path.join(__dirname, '../../linkitylink');
12
12
 
13
13
  let linkitylinkProcess = null;
14
14
 
@@ -20,25 +20,25 @@ function loadWikiConfig() {
20
20
  const ownerData = JSON.parse(fs.readFileSync(ownerPath, 'utf8'));
21
21
 
22
22
  // Extract base URLs from owner.json
23
- // Default to localhost if not specified
23
+ // Default to dev allyabase if not specified
24
24
  return {
25
- fountURL: ownerData.fountURL || 'http://localhost:3006',
26
- bdoURL: ownerData.bdoURL || 'http://localhost:3003',
27
- addieURL: ownerData.addieURL || 'http://localhost:3005'
25
+ fountURL: ownerData.fountURL || 'https://dev.fount.allyabase.com',
26
+ bdoURL: ownerData.bdoURL || 'https://dev.bdo.allyabase.com',
27
+ addieURL: ownerData.addieURL || 'https://dev.addie.allyabase.com'
28
28
  };
29
29
  }
30
- console.warn('[wiki-plugin-linkitylink] No owner.json found, using localhost defaults');
30
+ console.warn('[wiki-plugin-linkitylink] No owner.json found, using dev allyabase defaults');
31
31
  return {
32
- fountURL: 'http://localhost:3006',
33
- bdoURL: 'http://localhost:3003',
34
- addieURL: 'http://localhost:3005'
32
+ fountURL: 'https://dev.fount.allyabase.com',
33
+ bdoURL: 'https://dev.bdo.allyabase.com',
34
+ addieURL: 'https://dev.addie.allyabase.com'
35
35
  };
36
36
  } catch (err) {
37
37
  console.error('[wiki-plugin-linkitylink] Error loading wiki config:', err);
38
38
  return {
39
- fountURL: 'http://localhost:3006',
40
- bdoURL: 'http://localhost:3003',
41
- addieURL: 'http://localhost:3005'
39
+ fountURL: 'https://dev.fount.allyabase.com',
40
+ bdoURL: 'https://dev.bdo.allyabase.com',
41
+ addieURL: 'https://dev.addie.allyabase.com'
42
42
  };
43
43
  }
44
44
  }
@@ -70,11 +70,11 @@ async function launchLinkitylink(wikiConfig) {
70
70
  return reject(new Error('Linkitylink directory not found'));
71
71
  }
72
72
 
73
- // Check for server.js
74
- const serverPath = path.join(LINKITYLINK_PATH, 'server.js');
73
+ // Check for linkitylink.js
74
+ const serverPath = path.join(LINKITYLINK_PATH, 'linkitylink.js');
75
75
  if (!fs.existsSync(serverPath)) {
76
- console.error(`[wiki-plugin-linkitylink] ❌ server.js not found at ${serverPath}`);
77
- return reject(new Error('Linkitylink server.js not found'));
76
+ console.error(`[wiki-plugin-linkitylink] ❌ linkitylink.js not found at ${serverPath}`);
77
+ return reject(new Error('Linkitylink linkitylink.js not found'));
78
78
  }
79
79
 
80
80
  // Set environment variables for this linkitylink instance
@@ -83,11 +83,12 @@ async function launchLinkitylink(wikiConfig) {
83
83
  PORT: LINKITYLINK_PORT.toString(),
84
84
  FOUNT_BASE_URL: wikiConfig.fountURL,
85
85
  BDO_BASE_URL: wikiConfig.bdoURL,
86
- ADDIE_BASE_URL: wikiConfig.addieURL
86
+ ADDIE_BASE_URL: wikiConfig.addieURL,
87
+ ENABLE_APP_PURCHASE: process.env.ENABLE_APP_PURCHASE || 'false'
87
88
  };
88
89
 
89
90
  // Spawn linkitylink process
90
- linkitylinkProcess = spawn('node', ['server.js'], {
91
+ linkitylinkProcess = spawn('node', ['linkitylink.js'], {
91
92
  cwd: LINKITYLINK_PATH,
92
93
  env: env,
93
94
  stdio: ['ignore', 'pipe', 'pipe']