Skip to content

Commit

Permalink
feat: publish.yaml add schema props
Browse files Browse the repository at this point in the history
Signed-off-by: zxypro1 <[email protected]>
  • Loading branch information
zxypro1 committed Mar 7, 2024
1 parent 7c86e49 commit f0af1b8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/engine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serverless-devs/engine",
"version": "0.1.2-beta.1",
"version": "0.1.2-beta.2",
"description": "a engine lib for serverless-devs",
"main": "lib/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/load-component/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@serverless-devs/load-component",
"version": "0.0.7-beta.1",
"version": "0.0.7-beta.2",
"description": "request for serverless-devs",
"main": "lib/index.js",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions packages/load-component/src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ export const buildComponentInstance = async (componentPath: string, params?: any
if (componentInstance) {
componentInstance.__path = componentPath;
const publishData = getYamlContent(path.join(componentPath, 'publish.yaml'));
const schema = get(publishData, 'Schema');
componentInstance.schemaPath = schema ? path.join(componentPath, schema) : undefined;
const version = get(publishData, 'Version');
if (version) {
componentInstance.__version = version;
Expand Down

0 comments on commit f0af1b8

Please sign in to comment.