Skip to content

Commit bfffbbe

Browse files
committed
plugins
1 parent d263e02 commit bfffbbe

997 files changed

Lines changed: 6707 additions & 3740 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ src/SSCMS.Web/plugins/
1414
src/SSCMS.Web/.vs/
1515
src/SSCMS.Web/.vscode/
1616
src/SSCMS.Web/.config/
17-
src/SSCMS.Web/wwwroot/
1817
src/SSCMS.Web/version.txt
1918
sscms-all.sln
2019

README.md

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# SiteServer CMS
1+
# SSCMS
22

3-
SiteServer CMS 基于 .NET Core,能够以最低的成本、最少的人力投入在最短的时间内架设一个功能齐全、性能优异、规模庞大并易于维护的网站平台。
3+
SSCMS 基于 .NET Core,能够以最低的成本、最少的人力投入在最短的时间内架设一个功能齐全、性能优异、规模庞大并易于维护的网站平台。
44

5-
![SiteServer CMS](https://www.siteserver.cn/assets/images/github-banner.png)
5+
![SSCMS](https://sscms.com/assets/images/github-banner.png)
66

77
## 版本
88

99
项目发布的正式版本存放在 `master` 分支,最新版本存放在 `staging` 分支
1010

11-
| 版本 | 编译状态 | 版本号 | 发布日期 |
12-
| ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
13-
| 正式版 | [![Build status](https://ci.appveyor.com/api/projects/status/plx37i94y9gsqkru/branch/master?svg=true)](https://ci.appveyor.com/project/starlying/cms/branch/master) | ![Nuget version](https://img.shields.io/nuget/v/SS.CMS.svg) | ![master last commit](https://img.shields.io/github/last-commit/siteserver/cms/master.svg) |
14-
| 开发版 | [![Build Status](https://sscms.visualstudio.com/cms/_apis/build/status/siteserver.cms?branchName=staging)](https://sscms.visualstudio.com/cms/_build/latest?definitionId=1&branchName=master) | ![Nuget version](https://img.shields.io/nuget/vpre/SS.CMS.svg) | ![staging last commit](https://img.shields.io/github/last-commit/siteserver/cms/staging.svg) |
11+
| 版本 | 编译状态 | 版本号 | 发布日期 |
12+
| ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------------------------------------- |
13+
| 正式版 | [![Build status](https://sscms.visualstudio.com/cms/_apis/build/status/siteserver.cms?branchName=master)](https://sscms.visualstudio.com/cms/_build/latest?definitionId=1&branchName=master) | ![Nuget version](https://img.shields.io/nuget/v/SS.CMS.svg) | ![master last commit](https://img.shields.io/github/last-commit/siteserver/cms/master.svg) |
14+
| 开发版 | [![Build Status](https://sscms.visualstudio.com/cms/_apis/build/status/siteserver.cms?branchName=staging)](https://sscms.visualstudio.com/cms/_build/latest?definitionId=1&branchName=staging) | ![Nuget version](https://img.shields.io/nuget/vpre/SS.CMS.svg) | ![staging last commit](https://img.shields.io/github/last-commit/siteserver/cms/staging.svg) |
1515

1616
## 迭代计划
1717

@@ -47,19 +47,19 @@ SiteServer CMS 基于 .NET Core,能够以最低的成本、最少的人力投
4747

4848
## 开发文档
4949

50-
[《STL 语言参考手册》](https://www.siteserver.cn/docs/stl/)
50+
[《STL 语言参考手册》](https://sscms.com/docs/stl/)
5151

52-
[《插件开发参考手册》](https://www.siteserver.cn/docs/plugins/)
52+
[《插件开发参考手册》](https://sscms.com/docs/plugins/)
5353

54-
[《CLI 命令行参考手册》](https://www.siteserver.cn/docs/cli/)
54+
[《CLI 命令行参考手册》](https://sscms.com/docs/cli/)
5555

56-
[《REST API 参考手册》](https://www.siteserver.cn/docs/api/)
56+
[《REST API 参考手册》](https://sscms.com/docs/api/)
5757

58-
[《数据结构参考手册》](https://www.siteserver.cn/docs/model/)
58+
[《数据结构参考手册》](https://sscms.com/docs/model/)
5959

60-
系统使用文档请点击 [SiteServer CMS 文档中心](https://www.siteserver.cn/docs/)
60+
系统使用文档请点击 [SSCMS 文档中心](https://sscms.com/docs/)
6161

62-
## SiteServer CMS 源码结构
62+
## SSCMS 源码结构
6363

6464
```code
6565
│ sscms.sln Visual Studio 项目文件
@@ -73,22 +73,26 @@ SiteServer CMS 基于 .NET Core,能够以最低的成本、最少的人力投
7373

7474
## 发布跨平台版本
7575

76-
Window(64位):
76+
Window(64 位):
77+
7778
```
7879
dotnet publish ./src/SSCMS/SSCMS.csproj -r win-x64 --configuration Release -o dist/sscms-win-x64 /p:PublishSingleFile=true
7980
```
8081

81-
Window(32位):
82+
Window(32 位):
83+
8284
```
8385
dotnet publish ./src/SSCMS/SSCMS.csproj -r win-x86 --configuration Release -o dist/sscms-win-x86 /p:PublishSingleFile=true
8486
```
8587

8688
Linux:
89+
8790
```
8891
dotnet publish ./src/SSCMS/SSCMS.csproj -r linux-x64 --configuration Release -o dist/sscms-linux-x64 /p:PublishSingleFile=true
8992
```
9093

9194
MacOS:
95+
9296
```
9397
dotnet publish ./src/SSCMS/SSCMS.csproj -r osx-x64 --configuration Release -o dist/sscms-osx-x64 /p:PublishSingleFile=true
9498
```
@@ -97,7 +101,7 @@ dotnet publish ./src/SSCMS/SSCMS.csproj -r osx-x64 --configuration Release -o di
97101

98102
代码贡献有很多形式,从提交问题,撰写文档,到提交代码,我们欢迎任何形式的贡献!
99103

100-
项目编译需要使用 Visual Studio 2017,你可以从这里下载 [Visual Studio Community 2017](https://www.visualstudio.com/downloads/)
104+
项目编译需要使用 Visual Studio 2019,你可以从这里下载 [Visual Studio Community 2019](https://www.visualstudio.com/downloads/)
101105

102106
- 1、Fork
103107
- 2、创建您的特性分支 (`git checkout -b my-new-feature`)
@@ -107,18 +111,18 @@ dotnet publish ./src/SSCMS/SSCMS.csproj -r osx-x64 --configuration Release -o di
107111

108112
## 系统更新
109113

110-
SiteServer CMS 产品将每隔两月发布新的正式版本,我们将在每次迭代中对核心功能、文档支持、功能插件以及网站模板四个方面进行持续改进。
114+
SSCMS 产品将每隔两月发布新的正式版本,我们将在每次迭代中对核心功能、文档支持、功能插件以及网站模板四个方面进行持续改进。
111115

112116
## 问题与建议
113117

114118
如果发现任何 BUG 以及对产品使用的问题与建议,请提交至 [Github Issues](https://github.com/siteserver/cms/issues)
115119

116120
## 关注最新动态
117121

118-
[![qrcode](https://www.siteserver.cn/assets/images/qrcode_for_wx.jpg)](https://www.siteserver.cn/)
122+
[![qrcode](https://sscms.com/assets/images/qrcode_for_wx.jpg)](https://sscms.com/)
119123

120124
## License
121125

122126
[GNU GENERAL PUBLIC LICENSE 3.0](LICENSE)
123127

124-
Copyright (C) 2003-2020 SiteServer CMS
128+
Copyright (C) 2003-2020 SSCMS

src/SSCMS.Cli/Abstractions/IApiService.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
using System.Collections.Generic;
22
using System.Threading.Tasks;
3+
using SSCMS.Cli.Models;
34
using SSCMS.Cli.Services;
45

56
namespace SSCMS.Cli.Abstractions
67
{
78
public interface IApiService
89
{
9-
(bool success, string successContent, string failureMessage) GetStatus();
10+
(ConfigStatus status, string failureMessage) GetStatus();
1011

1112
Task<(bool success, string failureMessage)> LoginAsync(string account, string password);
1213

1314
(bool success, string failureMessage) Register(string userName, string mobile, string email, string password);
1415

15-
(bool success, string failureMessage) PluginsPublish(string packageId, string zipPath);
16+
(bool success, string failureMessage) PluginsPublish(string publisher, string zipPath);
1617

1718
(bool success, string failureMessage) UnPluginsPublish(string packageId);
1819

src/SSCMS.Cli/Application.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public async Task RunAsync(string[] args)
6767
commandName = StringUtils.Trim(arg);
6868
}
6969

70-
isJobService = StringUtils.ContainsIgnoreCase(jobServiceCommandNames, commandName);
70+
isJobService = ListUtils.ContainsIgnoreCase(jobServiceCommandNames, commandName);
7171
}
7272
}
7373
else

src/SSCMS.Cli/Core/CliUtils.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,5 +112,20 @@ public static bool IsSsCmsExists(string directoryPath)
112112
{
113113
return FileUtils.IsFileExists(PathUtils.Combine(directoryPath, Constants.ConfigFileName)) && FileUtils.IsFileExists(PathUtils.Combine(directoryPath, "appsettings.json")) && DirectoryUtils.IsDirectoryExists("wwwroot");
114114
}
115+
116+
public static string GetOsUserConfigFilePath()
117+
{
118+
return PathUtils.GetOsUserProfileDirectoryPath("config.json");
119+
}
120+
121+
public static string GetOsUserPluginsDirectoryPath(params string[] paths)
122+
{
123+
return PathUtils.GetOsUserProfileDirectoryPath("plugins", PageUtils.Combine(paths));
124+
}
125+
126+
public static string GetOsUserTempDirectoryPath(params string[] paths)
127+
{
128+
return PathUtils.GetOsUserProfileDirectoryPath("temp", PageUtils.Combine(paths));
129+
}
115130
}
116131
}

src/SSCMS.Cli/Core/ReadUtils.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using System.Collections.Generic;
2-
using Datory.Utils;
32
using McMaster.Extensions.CommandLineUtils;
43
using SSCMS.Utils;
54

@@ -9,8 +8,8 @@ public static class ReadUtils
98
{
109
public static string GetSelect(string text, List<string> options)
1110
{
12-
var option = Prompt.GetString($"{text}({Utilities.ToString(options)}):");
13-
return StringUtils.ContainsIgnoreCase(options, option) ? option : GetSelect(text, options);
11+
var option = Prompt.GetString($"{text}({ListUtils.ToString(options)}):");
12+
return ListUtils.ContainsIgnoreCase(options, option) ? option : GetSelect(text, options);
1413
}
1514

1615
public static string GetString(string text)

src/SSCMS.Cli/Core/WriteUtils.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
using System.Reflection;
33
using System.Threading.Tasks;
44
using Datory;
5+
using SSCMS.Cli.Models;
56
using SSCMS.Services;
67
using SSCMS.Utils;
78

src/SSCMS.Cli/Extensions/ServiceCollectionExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public static void AddCliJobs(this IServiceCollection services)
2525
services.AddScoped<IJobService, InstallSsCmsJob>();
2626
services.AddScoped<IJobService, LoginJob>();
2727
services.AddScoped<IJobService, LogoutJob>();
28+
services.AddScoped<IJobService, PluginNewJob>();
2829
services.AddScoped<IJobService, PluginPackageJob>();
2930
services.AddScoped<IJobService, PluginPublishJob>();
3031
services.AddScoped<IJobService, PluginSearchJob>();

src/SSCMS.Cli/Jobs/DataBackupJob.cs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Collections.Generic;
33
using System.Threading.Tasks;
44
using Datory;
5-
using Datory.Utils;
65
using Mono.Options;
76
using SSCMS.Cli.Abstractions;
87
using SSCMS.Cli.Core;
@@ -37,9 +36,9 @@ public DataBackupJob(ISettingsManager settingsManager, IDatabaseManager database
3736
{ "c|config-file=", "指定配置文件Web.config路径或文件名",
3837
v => _configFile = v },
3938
{ "includes=", "指定需要备份的表,多个表用英文逗号隔开,默认备份所有表",
40-
v => _includes = v == null ? null : Utilities.GetStringList(v) },
39+
v => _includes = v == null ? null : ListUtils.GetStringList(v) },
4140
{ "excludes=", "指定需要排除的表,多个表用英文逗号隔开",
42-
v => _excludes = v == null ? null : Utilities.GetStringList(v) },
41+
v => _excludes = v == null ? null : ListUtils.GetStringList(v) },
4342
{ "max-rows=", "指定需要备份的表的最大行数",
4443
v => _maxRows = v == null ? 0 : TranslateUtils.ToInt(v) },
4544
{ "h|help", "命令说明",
@@ -125,9 +124,9 @@ public static async Task Backup(ISettingsManager settingsManager, IDatabaseManag
125124

126125
foreach (var tableName in allTableNames)
127126
{
128-
if (includes != null && !StringUtils.ContainsIgnoreCase(includes, tableName)) continue;
129-
if (StringUtils.ContainsIgnoreCase(excludes, tableName)) continue;
130-
if (StringUtils.ContainsIgnoreCase(tableNames, tableName)) continue;
127+
if (includes != null && !ListUtils.ContainsIgnoreCase(includes, tableName)) continue;
128+
if (ListUtils.ContainsIgnoreCase(excludes, tableName)) continue;
129+
if (ListUtils.ContainsIgnoreCase(tableNames, tableName)) continue;
131130
tableNames.Add(tableName);
132131
}
133132

src/SSCMS.Cli/Jobs/DataRestoreJob.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Threading.Tasks;
4-
using Datory.Utils;
54
using Mono.Options;
65
using SSCMS.Cli.Abstractions;
76
using SSCMS.Cli.Core;
@@ -41,9 +40,9 @@ public DataRestoreJob(ISettingsManager settingsManager, IConfigRepository config
4140
{ "c|config-file=", "指定配置文件Web.config路径或文件名",
4241
v => _configFile = v },
4342
{ "includes=", "指定需要还原的表,多个表用英文逗号隔开,默认还原所有表",
44-
v => _includes = v == null ? null : Utilities.GetStringList(v) },
43+
v => _includes = v == null ? null : ListUtils.GetStringList(v) },
4544
{ "excludes=", "指定需要排除的表,多个表用英文逗号隔开",
46-
v => _excludes = v == null ? null : Utilities.GetStringList(v) },
45+
v => _excludes = v == null ? null : ListUtils.GetStringList(v) },
4746
{ "data-only", "仅恢复数据",
4847
v => _dataOnly = v != null },
4948
{ "h|help", "命令说明",

0 commit comments

Comments
 (0)