-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into multi-wiki-support
- Loading branch information
Showing
90 changed files
with
349 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/*\ | ||
title: $:/core/modules/utils/repository.js | ||
type: application/javascript | ||
module-type: utils | ||
Utilities for working with the TiddlyWiki repository file structure | ||
\*/ | ||
(function(){ | ||
|
||
/*jslint node: true, browser: true */ | ||
/*global $tw: false */ | ||
"use strict"; | ||
|
||
/* | ||
Get an object containing all the plugins as a hashmap by title of the JSON representation of the plugin | ||
*/ | ||
exports.getAllPlugins = function() { | ||
var fs = require("fs"), | ||
path = require("path"), | ||
tiddlers = {}; | ||
// Collect up the library plugins | ||
var collectPlugins = function(folder) { | ||
var pluginFolders = $tw.utils.getSubdirectories(folder) || []; | ||
for(var p=0; p<pluginFolders.length; p++) { | ||
if(!$tw.boot.excludeRegExp.test(pluginFolders[p])) { | ||
var pluginFields = $tw.loadPluginFolder(path.resolve(folder,"./" + pluginFolders[p])); | ||
if(pluginFields && pluginFields.title) { | ||
tiddlers[pluginFields.title] = pluginFields; | ||
} | ||
} | ||
} | ||
}, | ||
collectPublisherPlugins = function(folder) { | ||
var publisherFolders = $tw.utils.getSubdirectories(folder) || []; | ||
for(var t=0; t<publisherFolders.length; t++) { | ||
if(!$tw.boot.excludeRegExp.test(publisherFolders[t])) { | ||
collectPlugins(path.resolve(folder,"./" + publisherFolders[t])); | ||
} | ||
} | ||
}; | ||
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.pluginsPath,$tw.config.pluginsEnvVar),collectPublisherPlugins); | ||
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.themesPath,$tw.config.themesEnvVar),collectPublisherPlugins); | ||
$tw.utils.each($tw.getLibraryItemSearchPaths($tw.config.languagesPath,$tw.config.languagesEnvVar),collectPlugins); | ||
return tiddlers; | ||
}; | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
title: $:/config/OfficialPluginLibrary | ||
tags: $:/tags/PluginLibrary | ||
url: https://tiddlywiki.com/library/v5.3.3/index.html | ||
caption: {{$:/language/OfficialPluginLibrary}} | ||
tags: $:/tags/PluginLibrary | ||
title: $:/config/OfficialPluginLibrary | ||
url: https://tiddlywiki5-git-plugin-stability-badges-jermolenes-projects.vercel.app/library/v5.3.3/index.html | ||
|
||
{{$:/language/OfficialPluginLibrary/Hint}} | ||
Plugin library for https://tiddlywiki5-git-plugin-stability-badges-jermolenes-projects.vercel.app |
8 changes: 4 additions & 4 deletions
8
editions/prerelease/tiddlers/system/PrereleaseOfficialPluginLibrary.tid
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
title: $:/config/OfficialPluginLibrary | ||
caption: {{$:/language/OfficialPluginLibrary}} | ||
tags: $:/tags/PluginLibrary | ||
url: https://tiddlywiki.com/prerelease/library/v5.3.3/index.html | ||
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease) | ||
title: $:/config/OfficialPluginLibrary | ||
url: https://tiddlywiki5-git-plugin-stability-badges-jermolenes-projects.vercel.app/library/v5.3.3/index.html | ||
|
||
The prerelease version of the official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team. | ||
Plugin library for https://tiddlywiki5-git-plugin-stability-badges-jermolenes-projects.vercel.app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/*\ | ||
title: test-plugins.js | ||
type: application/javascript | ||
tags: [[$:/tags/test-spec]] | ||
Tests for integrity of the core plugins, languages, themes and editions | ||
\*/ | ||
(function(){ | ||
|
||
/*jslint node: true, browser: true */ | ||
/*global $tw: false */ | ||
"use strict"; | ||
|
||
if($tw.node) { | ||
|
||
describe("Plugin tests", function() { | ||
|
||
// Get all the plugins as a hashmap by title of a JSON string with the plugin content | ||
var tiddlers = $tw.utils.getAllPlugins(); | ||
// console.log(JSON.stringify(Object.keys(tiddlers),null,4)); | ||
describe("every plugin should have the required standard fields", function() { | ||
var titles = Object.keys(tiddlers); | ||
$tw.utils.each(titles,function(title) { | ||
it("plugin " + title + " should have the required standard fields",function() { | ||
var fields = tiddlers[title]; | ||
expect(fields["plugin-type"]).toMatch(/^(?:plugin|language|theme)$/); | ||
switch(fields["plugin-type"]) { | ||
case "plugin": | ||
expect(!!(fields.name && fields.description && fields.list)).toEqual(true); | ||
expect(fields.stability).toMatch(/^(?:STABILITY_0_DEPRECATED|STABILITY_1_EXPERIMENTAL|STABILITY_2_STABLE|STABILITY_3_LEGACY)$/); | ||
break; | ||
case "language": | ||
expect(!!(fields.name && fields.description)).toEqual(true); | ||
break; | ||
case "theme": | ||
expect(!!(fields.name && fields.description)).toEqual(true); | ||
break; | ||
} | ||
}); | ||
}); | ||
}); | ||
}); | ||
} | ||
|
||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
created: 20240520155341641 | ||
modified: 20240520162820882 | ||
tags: PluginMechanism | ||
title: Plugin Stability | ||
type: text/vnd.tiddlywiki | ||
|
||
Plugins are recommended to have a `stability` field that communicates the state of development of the plugin. It can contain the following values: | ||
|
||
* ''STABILITY_0_DEPRECATED'' - Deprecated. This plugin is not recommended for new projects | ||
* ''STABILITY_1_EXPERIMENTAL'' - Experimental. Non-backward compatible changes or removal may occur in any future release. Use of the plugin is not recommended in production environments | ||
* ''STABILITY_2_STABLE'' - Stable. | ||
* ''STABILITY_3_LEGACY'' - Legacy. Although this plugin is unlikely to be removed, it is no longer actively maintained, and other alternatives are available | ||
|
||
These stability levels are taken from the Node.js project - https://nodejs.org/api/documentation.html#stability-index. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.