@serverless-devs/s 2.0.95 → 2.0.97-beta.11

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.
Files changed (147) hide show
  1. package/Makefile +23 -0
  2. package/lib/clean/index.js +39 -32
  3. package/lib/cli/cli-manager.js +12 -18
  4. package/lib/cli/index.js +59 -54
  5. package/lib/component/index.js +54 -144
  6. package/lib/config/add/index.js +45 -38
  7. package/lib/config/delete/index.js +53 -48
  8. package/lib/config/get/index.js +50 -43
  9. package/lib/config/index.js +40 -33
  10. package/lib/core/command/command-manager.js +9 -11
  11. package/lib/core/component/hook.js +4 -4
  12. package/lib/core/component/index.js +13 -13
  13. package/lib/error/human-error.js +5 -5
  14. package/lib/error/human-warning.js +4 -4
  15. package/lib/error/index.js +38 -45
  16. package/lib/index.js +116 -120
  17. package/lib/init/index.js +104 -97
  18. package/lib/init/init-manager.js +66 -19
  19. package/lib/onboarding/index.js +5 -5
  20. package/lib/set/analysis/index.js +43 -36
  21. package/lib/set/index.js +40 -33
  22. package/lib/set/locale/index.js +55 -50
  23. package/lib/set/registry/index.js +54 -49
  24. package/lib/set/workspace/index.js +44 -37
  25. package/lib/specification/parse.js +11 -15
  26. package/lib/update-notifier/index.js +17 -17
  27. package/lib/utils/command-util.js +74 -57
  28. package/lib/utils/common.js +98 -13
  29. package/lib/utils/index.js +3 -3
  30. package/package.json +5 -4
  31. package/readme.md +8 -3
  32. package/.eslintrc.json +0 -112
  33. package/.prettierrc.json +0 -11
  34. package/CODE_OF_CONDUCT.md +0 -5
  35. package/CONTRIBUTING.md +0 -189
  36. package/CONTRIBUTORS.md +0 -148
  37. package/docs/readme.md +0 -94
  38. package/docs/zh/awesome.md +0 -20
  39. package/docs/zh/cicd.md +0 -231
  40. package/docs/zh/cli_design.md +0 -100
  41. package/docs/zh/command/clean.md +0 -63
  42. package/docs/zh/command/cli.md +0 -92
  43. package/docs/zh/command/component.md +0 -76
  44. package/docs/zh/command/config.md +0 -278
  45. package/docs/zh/command/custom.md +0 -73
  46. package/docs/zh/command/init.md +0 -148
  47. package/docs/zh/command/readme.md +0 -76
  48. package/docs/zh/command/set.md +0 -195
  49. package/docs/zh/default_provider_config/alibabacloud.md +0 -82
  50. package/docs/zh/default_provider_config/aws.md +0 -12
  51. package/docs/zh/default_provider_config/azure.md +0 -9
  52. package/docs/zh/default_provider_config/baiducloud.md +0 -8
  53. package/docs/zh/default_provider_config/gcp.md +0 -21
  54. package/docs/zh/default_provider_config/huaweicloud.md +0 -52
  55. package/docs/zh/default_provider_config/readme.md +0 -9
  56. package/docs/zh/default_provider_config/tencentcloud.md +0 -41
  57. package/docs/zh/install.md +0 -52
  58. package/docs/zh/package_dev.md +0 -142
  59. package/docs/zh/quick_start.md +0 -297
  60. package/docs/zh/readme.md +0 -90
  61. package/docs/zh/tool.md +0 -80
  62. package/docs/zh/yaml.md +0 -207
  63. package/docs/zh/yaml_and_cli.md +0 -67
  64. package/jest.setup.ts +0 -37
  65. package/lib/clean/index.d.ts +0 -1
  66. package/lib/cli/cli-manager.d.ts +0 -13
  67. package/lib/cli/index.d.ts +0 -2
  68. package/lib/component/index.d.ts +0 -1
  69. package/lib/config/add/index.d.ts +0 -1
  70. package/lib/config/common/common.d.ts +0 -46
  71. package/lib/config/delete/index.d.ts +0 -2
  72. package/lib/config/get/index.d.ts +0 -1
  73. package/lib/config/index.d.ts +0 -2
  74. package/lib/constants/index.d.ts +0 -0
  75. package/lib/constants/static-variable.d.ts +0 -4
  76. package/lib/core/command/command-manager.d.ts +0 -12
  77. package/lib/core/component/hook.d.ts +0 -17
  78. package/lib/core/component/index.d.ts +0 -53
  79. package/lib/core/index.d.ts +0 -2
  80. package/lib/core/plugin/index.d.ts +0 -13
  81. package/lib/entiry/cli.d.ts +0 -27
  82. package/lib/entiry/index.d.ts +0 -2
  83. package/lib/error/command-error.d.ts +0 -5
  84. package/lib/error/config-delete-error.d.ts +0 -5
  85. package/lib/error/config-error.d.ts +0 -5
  86. package/lib/error/config-get-error.d.ts +0 -5
  87. package/lib/error/human-error.d.ts +0 -13
  88. package/lib/error/human-warning.d.ts +0 -8
  89. package/lib/error/index.d.ts +0 -17
  90. package/lib/error/init-error.d.ts +0 -5
  91. package/lib/error/serverless-error.d.ts +0 -4
  92. package/lib/execDaemon.d.ts +0 -6
  93. package/lib/index.d.ts +0 -2
  94. package/lib/init/index.d.ts +0 -2
  95. package/lib/init/init-config.d.ts +0 -43
  96. package/lib/init/init-manager.d.ts +0 -17
  97. package/lib/onboarding/index.d.ts +0 -2
  98. package/lib/set/analysis/index.d.ts +0 -1
  99. package/lib/set/index.d.ts +0 -1
  100. package/lib/set/locale/index.d.ts +0 -1
  101. package/lib/set/registry/index.d.ts +0 -10
  102. package/lib/set/workspace/index.d.ts +0 -1
  103. package/lib/specification/analysis.d.ts +0 -12
  104. package/lib/specification/index.d.ts +0 -4
  105. package/lib/specification/parse.d.ts +0 -24
  106. package/lib/specification/version.d.ts +0 -35
  107. package/lib/update-notifier/index.d.ts +0 -10
  108. package/lib/utils/command-util.d.ts +0 -18
  109. package/lib/utils/common.d.ts +0 -28
  110. package/lib/utils/core.d.ts +0 -3
  111. package/lib/utils/handler-set-config.d.ts +0 -19
  112. package/lib/utils/i18n/en.d.ts +0 -44
  113. package/lib/utils/i18n/index.d.ts +0 -2
  114. package/lib/utils/i18n/zh.d.ts +0 -44
  115. package/lib/utils/index.d.ts +0 -9
  116. package/lib/utils/logger.d.ts +0 -11
  117. package/lib/utils/storage.d.ts +0 -8
  118. package/lib/utils/url-parser.d.ts +0 -15
  119. package/spec/readme.md +0 -59
  120. package/spec/zh/0.0.1/readme.md +0 -47
  121. package/spec/zh/0.0.1/serverless_package_model/1.purpose_and_goals.md +0 -3
  122. package/spec/zh/0.0.1/serverless_package_model/2.overview_and_terminology.md +0 -14
  123. package/spec/zh/0.0.1/serverless_package_model/3.package_model.md +0 -434
  124. package/spec/zh/0.0.1/serverless_package_model/4.application_scopes.md +0 -3
  125. package/spec/zh/0.0.1/serverless_package_model/5.design_principles.md +0 -3
  126. package/spec/zh/0.0.1/serverless_package_model/readme.md +0 -12
  127. package/spec/zh/0.0.1/serverless_registry_model/1.purpose_and_goals.md +0 -18
  128. package/spec/zh/0.0.1/serverless_registry_model/2.overview_and_terminology.md +0 -18
  129. package/spec/zh/0.0.1/serverless_registry_model/3.registry_model.md +0 -61
  130. package/spec/zh/0.0.1/serverless_registry_model/4.application_scopes.md +0 -6
  131. package/spec/zh/0.0.1/serverless_registry_model/5.design_principles.md +0 -3
  132. package/spec/zh/0.0.1/serverless_registry_model/readme.md +0 -12
  133. package/spec/zh/0.0.1/serverless_user_model/1.purpose_and_goals.md +0 -3
  134. package/spec/zh/0.0.1/serverless_user_model/2.overview_and_terminology.md +0 -16
  135. package/spec/zh/0.0.1/serverless_user_model/3.user_model.md +0 -218
  136. package/spec/zh/0.0.1/serverless_user_model/4.application_scopes.md +0 -4
  137. package/spec/zh/0.0.1/serverless_user_model/5.design_principles.md +0 -3
  138. package/spec/zh/0.0.1/serverless_user_model/readme.md +0 -12
  139. package/test/ci.sh +0 -33
  140. package/test/cli/cli-manager.test.ts +0 -64
  141. package/test/config/get.test.ts +0 -12
  142. package/test/helloworld.test.ts +0 -7
  143. package/test/start-fc-http-nodejs12/code/index.js +0 -47
  144. package/test/start-fc-http-nodejs12/s.yaml +0 -38
  145. package/test/utils/index.test.ts +0 -8
  146. package/test/utils/storage.test.ts +0 -19
  147. package/tsconfig.json +0 -37
@@ -1,28 +0,0 @@
1
- /** @format */
2
- export declare const red: any;
3
- export declare const bgRed: any;
4
- export declare function getVersion(): string;
5
- export declare function getFolderSize(rootItemPath: string): Promise<any>;
6
- export declare function yamlLoad(filePath: string): any;
7
- export declare function checkAndReturnTemplateFile(): string;
8
- export declare function checkTemplateFile(templateFile: string): string;
9
- export declare function printn(n: number, str?: string): string;
10
- export declare function getLang(): string;
11
- export declare function replaceFun(str: any, obj: any): any;
12
- export declare function getTemplatekey(str: any): any;
13
- export declare function replaceTemplate(files: Array<string>, content: {
14
- [key: string]: string;
15
- }): void;
16
- export declare function mark(source: string): string;
17
- export declare function emoji(emoji: string): string;
18
- declare const _default: {
19
- checkAndReturnTemplateFile: typeof checkAndReturnTemplateFile;
20
- checkTemplateFile: typeof checkTemplateFile;
21
- printn: typeof printn;
22
- mark: typeof mark;
23
- getLang: typeof getLang;
24
- replaceTemplate: typeof replaceTemplate;
25
- replaceFun: typeof replaceFun;
26
- getTemplatekey: typeof getTemplatekey;
27
- };
28
- export default _default;
@@ -1,3 +0,0 @@
1
- export declare function getCoreVersion(): any;
2
- declare const _default: any;
3
- export default _default;
@@ -1,19 +0,0 @@
1
- /** @format */
2
- interface ProfileParams {
3
- data?: any;
4
- configKey?: string;
5
- read?: boolean;
6
- filePath?: string;
7
- }
8
- interface Profile {
9
- [key: string]: any;
10
- }
11
- export declare function setConfig(key: string, value: any): void;
12
- export declare function getConfig(key: string, defaultValue?: any): any;
13
- export declare function handlerProfileFile(params: ProfileParams): Promise<Profile>;
14
- declare const _default: {
15
- setConfig: typeof setConfig;
16
- getConfig: typeof getConfig;
17
- handlerProfileFile: typeof handlerProfileFile;
18
- };
19
- export default _default;
@@ -1,44 +0,0 @@
1
- declare const _default: {
2
- clean_up_the_environment: string;
3
- display_help_for_command: string;
4
- remove_components: string;
5
- delete_the_file_under_the_cache: string;
6
- record_your_log_information: string;
7
- init_pproject_deploy_tip: string;
8
- tip_for_a_serverless_project: string;
9
- create_a_new_project: string;
10
- en: string;
11
- zh: string;
12
- select_current_language: string;
13
- 'app-tip': string;
14
- 'template-tip': string;
15
- 'fc-runtime-starter': string;
16
- 'fc-custom-container-stater': string;
17
- web: string;
18
- 'static-site': string;
19
- 'best-practice': string;
20
- 'devs-template': string;
21
- 'fc-http-nodejs': string;
22
- 'fc-http-python': string;
23
- 'fc-http-java': string;
24
- 'fc-custom-container-event-python3': string;
25
- 'fc-custom-container-event-cpp': string;
26
- 'fc-custom-container-http-springboot': string;
27
- 'fc-custom-container-http-aspdotnetcore': string;
28
- 'express-starter': string;
29
- 'koa-starter': string;
30
- 'nuxtjs-starter': string;
31
- 'eggjs-starter': string;
32
- 'flask-starter': string;
33
- 'SpringBoot-starter': string;
34
- 'Zblog-starter': string;
35
- 'website-starter': string;
36
- 'react-starter': string;
37
- 'vue-starter': string;
38
- puppeteer: string;
39
- ffmpeg: string;
40
- pdf2Img: string;
41
- tensorflow: string;
42
- todoList: string;
43
- };
44
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const i18n: (key: string) => any;
2
- export default i18n;
@@ -1,44 +0,0 @@
1
- declare const _default: {
2
- clean_up_the_environment: string;
3
- display_help_for_command: string;
4
- remove_components: string;
5
- delete_the_file_under_the_cache: string;
6
- record_your_log_information: string;
7
- init_pproject_deploy_tip: string;
8
- tip_for_a_serverless_project: string;
9
- create_a_new_project: string;
10
- en: string;
11
- zh: string;
12
- select_current_language: string;
13
- 'app-tip': string;
14
- 'template-tip': string;
15
- 'fc-runtime-starter': string;
16
- 'fc-custom-container-stater': string;
17
- web: string;
18
- 'static-site': string;
19
- 'best-practice': string;
20
- 'devs-template': string;
21
- 'fc-http-nodejs': string;
22
- 'fc-http-python': string;
23
- 'fc-http-java': string;
24
- 'fc-custom-container-event-python3': string;
25
- 'fc-custom-container-event-cpp': string;
26
- 'fc-custom-container-http-springboot': string;
27
- 'fc-custom-container-http-aspdotnetcore': string;
28
- 'express-starter': string;
29
- 'koa-starter': string;
30
- 'nuxtjs-starter': string;
31
- 'eggjs-starter': string;
32
- 'flask-starter': string;
33
- 'SpringBoot-starter': string;
34
- 'Zblog-starter': string;
35
- 'website-starter': string;
36
- 'react-starter': string;
37
- 'vue-starter': string;
38
- puppeteer: string;
39
- ffmpeg: string;
40
- pdf2Img: string;
41
- tensorflow: string;
42
- todoList: string;
43
- };
44
- export default _default;
@@ -1,9 +0,0 @@
1
- /** @format */
2
- export { default as common } from './common';
3
- export { default as configSet } from './handler-set-config';
4
- export { default as storage } from './storage';
5
- export { default as urlParser } from './url-parser';
6
- export { default as registerAction } from './command-util';
7
- export { default as logger } from './logger';
8
- export { default as i18n } from './i18n';
9
- export declare const getYamlPath: (prePath: string, name: string) => string;
@@ -1,11 +0,0 @@
1
- /** @format */
2
- export default class ServerlessDevsCliLogger {
3
- static log(m: any): void;
4
- static info(m: any): void;
5
- static debug(m: any): void;
6
- static error(m: any): void;
7
- static warning(m: any): void;
8
- static success(m: any): void;
9
- static spinner(info: any): any;
10
- static output(info: any): any;
11
- }
@@ -1,8 +0,0 @@
1
- /** @format */
2
- export declare function getHomeDir(): string;
3
- export declare function getHistoryFile(): string;
4
- declare const _default: {
5
- getHomeDir: typeof getHomeDir;
6
- getHistoryFile: typeof getHistoryFile;
7
- };
8
- export default _default;
@@ -1,15 +0,0 @@
1
- /** @format */
2
- /// <reference types="node" />
3
- import URL from 'url';
4
- import { GitRepoTemplate } from '../entiry';
5
- export declare function parse(url: string): URL.Url;
6
- export declare function getProjectNameFromUrl(url: string): string;
7
- export declare function isUrlFormat(url: string): boolean;
8
- export declare function extractTemplateInfo(url: URL.Url): GitRepoTemplate;
9
- declare const _default: {
10
- extractTemplateInfo: typeof extractTemplateInfo;
11
- getProjectNameFromUrl: typeof getProjectNameFromUrl;
12
- isUrlFormat: typeof isUrlFormat;
13
- parse: typeof parse;
14
- };
15
- export default _default;
package/spec/readme.md DELETED
@@ -1,59 +0,0 @@
1
- # Serverless Devs Model(SDM)
2
-
3
- Serverless Devs Model(SDM,下文简称SDM)的官方文档,主要用于介绍 SDM 的模型详情与相关规范。
4
-
5
- Serverless Devs Model(SDM) 是一种与厂商 FaaS 平台无关的 Serverless 架构工具链模型,用于定义通用的 Serverless 架构工具使用标准,让开发者更专注于业务逻辑,提升 Serverless 应用开发、部署、运维效率,通过该模型,开发者可以通过一种更灵活、更通用的方法使用不同云厂商以及开源的 Serverless 产品,进而更高效、更简洁、更便利的实现 Serverless 应用管理。
6
-
7
- ## 介绍
8
-
9
- "Serverless应用的开发人员应该更关心业务代码,而不需要更多精力去适应不同Serverless平台(包括不同厂商的开发者工具学习,不同功能的使用等)。"
10
-
11
- ![](https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1631771269638_20210916054752754202.png)
12
-
13
- ### 为什么需要工具模型
14
-
15
- 就目前来看 Serverless 架构厂商锁定严重,不同厂商会有不同的工具,不同的使用途径,这使得开发者在应用开发的过程中,以及在混合云部署、运维的过程中面临了诸多困难:
16
-
17
- - **学习难度大**:开发者要针对不同的云厂商学习不同的工具使用方法,接受不同 Serverless 平台的使用方法,包括不限于发布部署、运维、构建等众多流程;
18
- - **工具扩展差**:很多 Serverless 平台提供的开发者工具,往往是由开发团队提供对应的功能,使用者仅具有使用的功能,如需进行部分的定制化能力,或拓展能力,是难以扩展的;
19
- - **适配成本高**:多云部署,业务迁移是生产过程中常见的行为,由于 Serverless 架构厂商锁定严重导致多云部署、业务迁移时学习成本以及转换成本非常高;
20
-
21
- 在 Serverless Devs Model(SDM) 中,我们提出了一种以应用为中心,以组件为途径的方法:
22
-
23
- - **应用概念优先**:该模型将会以应用纬度进行项目管理,而不再单单以资源形式进行项目管理,这将对应用的开发和定义有着更清晰的定义;
24
- - **组件化功能透出**:该模型将不会提供任何与 Serverless 平台相关的功能,这些所有的功能都将会通过组件,以一种可插拔的形式对开发者透出,Serverless 开发者可以在一个应用中,同时使用多种组件,实现一个完整的应用部署,甚至可以同时实现混合云的部署;
25
- - **通用功能的抽象**:该模型将会推进 Serverless 架构在不同平台下的通用功能的抽象,例如应用的构建、调试功能等都可以通过组件形式进一步抽象为更多的 Serverless 开发者提供开发支持;
26
-
27
- :trophy: 我们的目标是:
28
-
29
- - 开发者可以通过一套工具更简单、更方便、更快速的使用不同 Serverless 平台的产品/功能,包括不限于构建、调试、部署、运维等不同的流程或者阶段;
30
- - 开发者可以以应用的视角去看到 Serverless 应用,甚至是可以通过一行命令将 Serverless 应用部署到不同的 Serverless 平台;
31
- - 开发者可以非常简单的进行Onboarding的流程,可以体验一致的进行不能上层能力的抽象;
32
-
33
- ## 模型学习
34
-
35
- 模型本身由 Serverless Devs 项目驱动,并作为一组版本话 API 文档进行维护,如下所示:
36
-
37
- - [v0.0.1 (Serverless Devs v2.x)](zh/0.0.1/readme.md)
38
-
39
- ## 社区
40
-
41
- ### 贡献
42
-
43
- > 有关详细信息,请参阅[贡献指南](../CONTRIBUTING.md)。
44
-
45
- 针对 spec 的贡献也可以参考以下内容:
46
- - 将 Serverless Devs 仓库 fork 到自己的账号/组织下;
47
- - 对 spec 内容进行修改,更新,完善;
48
- - 对对应版本下的`readme.md`进行更新,添加自己到`作者`->`贡献者`中;
49
- - 提`Pull requests`到仓库`Serverless-Devs/Serverless-Devs`的`docs`分支下;并添加 [Anycodes](https://github.com/anycodes) 、 [hanxie](https://github.com/hanxie-crypto) 等作为Reviewers,同时在Comment中填写好更新理由;
50
-
51
- ### 会议时间
52
-
53
- - 等待社区反馈
54
-
55
- ## 协议
56
-
57
- Serverless Devs 是一个遵循 [MIT](../LICENSE) 协议的开源项目。
58
-
59
- Serverless Devs 使用的 node_modules 以及其他第三方的依赖库都可能有其遵循的协议,我们推荐你阅读并了解这些协议,因为其中的条款可能和 MIT 协议中的不完全相同。
@@ -1,47 +0,0 @@
1
- # Serverless Devs Model(SDM) v0.0.1 文档
2
-
3
- - 版本:v0.0.1
4
- - 作者:
5
- - 发起人:
6
- - [Anycodes](https://github.com/anycodes)
7
- - 贡献者:
8
- - [hanxie](https://github.com/hanxie-crypto)
9
- - [git-qfzhang](https://github.com/git-qfzhang)
10
- - 时间:2021.9.16
11
- - 内容:
12
- - [Serverless Registry Model](./serverless_registry_model)
13
- - [Serverless Package Model](./serverless_package_model)
14
- - [Serverless User Model](./serverless_user_model)
15
-
16
- ## 简介
17
-
18
- Serverless Devs Model(SDM) v0.0.1 文档是由 Serverless Devs 社区发起编写的第一版关于 Serverless 工具链的规范模型文档。该文档将会主要通过 Serverless 工具链体系中的 **Registry模型**,**开发工具模型**以及**用户使用模型**三个模块进行撰写。
19
-
20
- ![](https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1631773288370_20210916062130083859.png)
21
-
22
- 由上图所示,Serverless Devs 的开发角色分为两部分:
23
- - **Package developer**:指的是开发/贡献符合 Serverless Package Model 规范的组件或者公开的应用案例;这部分开发者通常会吧应用发布到对应的 Registry 上;
24
- - **Serverless developer**:指的是 Serverless 应用的开发者,这部分开发者通过使用 Package developer 开发的公共应用案例或者引用不同的组件,将自己的应用部署到不同的 Serverless 平台,或者对应用进行不同的处理,包括不限于构建、观测、压测、调试等;
25
-
26
- 同时通过上图也可以看到两个比较明显的词汇:Component和Application:
27
- - **Component**:指的是组件;是由 Package developer 开发并发布的符合 Serverless Package Model 规范的一段代码,通常这段代码会在应用中被引用,并在 Serverless Devs 开发者工具 中被加载,并按照预定的规则进行执行某些动作。例如,将用户的代码部署到 Serverless 平台;将 Serverless 应用进行构建和打包;对 Serverless 应用进行调试等;
28
- - **Application**:指的是应用;可以由 Package developer 公开发布到 Registry,以供更多人学习和使用,例如某位贡献者贡献了一个猫狗识别的案例到Registry;也可以由 Serverless developer 开发,例如某人开发了一个 人脸识别的应用;通常情况下一个应用可以引用一个或者多个组件,并通过 Serverless Devs 开发者工具 工具部署到 Serverless 平台,例如我开发了一个猫狗识别的应用,在这个应用中引用了 Lambda 组件帮助我将部分业务逻辑部署到 FaaS 平台,同时我也引用了 Website 组件帮助我把前端业务代码部署到对象存储中;
29
-
30
- 通过上图,同样也可以看到 Serverless Devs Model 包含了以下三个模块:
31
-
32
- - **Registry模型**:一个开放的 Serverless Registry Model。Package的开发者可以将自己开发的组件,或者待分享的应用发布到该平台。该平台可以使用目前 Serverless Devs 所支持的 Github Resitry, Gitee Registry, Serverless Registry,也可以按照该规范搭建私有的 Registry 以完成部分能力。详情可以参考[Registry模型文档](serverless_registry_model)
33
- - **开发包模型**:一个关于 Serverless Package 的规范。Package developer 需要遵循该规范进行组件的开发或者应用的共享,否则将无法被 Serverless Devs 开发者工具 工具所识别和加载,也无法被 Application 所引用,并实现预期的功能。详情可以参考[开发包模型](serverless_pacakge_model)
34
- - **用户使用模型**:Serverless developer 在进行应用开发时所需要遵守的约定,以确保 Serverless Devs 开发者工具 可以准确识别相对应的内容,并按照预期加载对应的 Component,完成预期的功能。详情可以参考[用户使用模型文档](serverless_user_model)
35
-
36
- ## 社区
37
-
38
- ### 贡献
39
-
40
- 有关详细信息,请参阅[贡献指南](../../../CONTRIBUTING.md)。
41
-
42
-
43
- ## 协议
44
-
45
- Serverless Devs 是一个遵循 [MIT](../../../LICENSE) 协议的开源项目。
46
-
47
- Serverless Devs 使用的 node_modules 以及其他第三方的依赖库都可能有其遵循的协议,我们推荐你阅读并了解这些协议,因为其中的条款可能和 MIT 协议中的不完全相同。
@@ -1,3 +0,0 @@
1
- # 目的和目标
2
-
3
- Serverless Package Model(简称SPM,下文将使用SPM代替)的目标是定义一种 Serverless Package 开发模型以及开发者规范;核心目的是基于这套模型或者规范所开发的项目,可以被 Serverless Registry 所接受,并且被 Serverless Devs 开发者工具所识别,按照 Serverless 开发者的预期实现实现预定的功能。
@@ -1,14 +0,0 @@
1
- # 概述和术语
2
-
3
- Serverless Package Model(SPM) 是 Package 开发者所需要使用的模型,以及遵循的规范。从形态组成纬度包括应用与组件两部分;同文件树组成来看包括用于自描述的`publish.yaml`文件,以及业务代码`:
4
-
5
- ![](https://serverless-article-picture.oss-cn-hangzhou.aliyuncs.com/1631934027954_20210918030028156081.png)
6
-
7
-
8
- ### Package与Package Model
9
-
10
- 相对来说,Package是一个实际的产物,由规范的代码组成,目的是完成某个功能或者表示一个案例;而Package Model相对来说是抽象的存在,表示的是一种规范与规则。
11
-
12
- - Package是由指符合 SPM 规范的代码,其目标是用来实现模型功能,包括不限于部署业务逻辑到 Serverless 平台,调试 Serverless 应用代码等;
13
- - Package Model 是 Serverless Devs 的 Package 开发规范,只有按照该模型,遵循该规范的 Serverless Package 才可以被 Serverless Devs 开发者工具 所识别,并且可以成功的发布在符合 Serverless Registry Model 规范的 Serverless Registry 平台上;
14
-