You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by li...@apache.org on 2024/09/19 06:37:09 UTC

(incubator-answer) branch dev updated (6c9203a7 -> be00ce4f)

This is an automated email from the ASF dual-hosted git repository.

linkinstar pushed a change to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git


    from 6c9203a7 fix: setup install language error
     new 48c23878 chore: sync swagger
     new be00ce4f fix: install plugin dependencies

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 cmd/wire_gen.go       | 5 ++---
 docs/docs.go          | 8 ++++----
 docs/swagger.json     | 9 ++++-----
 docs/swagger.yaml     | 7 +++----
 internal/cli/build.go | 9 ++++++++-
 5 files changed, 21 insertions(+), 17 deletions(-)


(incubator-answer) 01/02: chore: sync swagger

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

linkinstar pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit 48c238785359238d1ed278dd0921476d4ebd4c66
Author: sy-records <52...@qq52o.cn>
AuthorDate: Wed Sep 18 19:24:44 2024 +0800

    chore: sync swagger
---
 cmd/wire_gen.go   | 5 ++---
 docs/docs.go      | 8 ++++----
 docs/swagger.json | 9 ++++-----
 docs/swagger.yaml | 7 +++----
 4 files changed, 13 insertions(+), 16 deletions(-)

diff --git a/cmd/wire_gen.go b/cmd/wire_gen.go
index 537ece84..f5a3f900 100644
--- a/cmd/wire_gen.go
+++ b/cmd/wire_gen.go
@@ -1,6 +1,3 @@
-//go:build !wireinject
-// +build !wireinject
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -23,6 +20,8 @@
 // Code generated by Wire. DO NOT EDIT.
 
 //go:generate go run github.com/google/wire/cmd/wire
+//go:build !wireinject
+// +build !wireinject
 
 package answercmd
 
diff --git a/docs/docs.go b/docs/docs.go
index 69078bf4..e461c3a9 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -11559,12 +11559,12 @@ const docTemplate = `{
 
 // SwaggerInfo holds exported Swagger Info so clients can modify it
 var SwaggerInfo = &swag.Spec{
-	Version:          "= \"v0.0.1\"",
+	Version:          "",
 	Host:             "",
-	BasePath:         "= \"/\"",
+	BasePath:         "/",
 	Schemes:          []string{},
-	Title:            "\"apache answer\"",
-	Description:      "= \"apache answer api\"",
+	Title:            "Apache Answer",
+	Description:      "Apache Answer API",
 	InfoInstanceName: "swagger",
 	SwaggerTemplate:  docTemplate,
 	LeftDelim:        "{{",
diff --git a/docs/swagger.json b/docs/swagger.json
index 4ca27f0a..322a87ad 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -1,12 +1,11 @@
 {
     "swagger": "2.0",
     "info": {
-        "description": "= \"apache answer api\"",
-        "title": "\"apache answer\"",
-        "contact": {},
-        "version": "= \"v0.0.1\""
+        "description": "Apache Answer API",
+        "title": "Apache Answer",
+        "contact": {}
     },
-    "basePath": "= \"/\"",
+    "basePath": "/",
     "paths": {
         "/": {
             "get": {
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index b9c36562..66a594d5 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -15,7 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
-basePath: = "/"
+basePath: /
 definitions:
   constant.NotificationChannelKey:
     enum:
@@ -2910,9 +2910,8 @@ definitions:
     type: object
 info:
   contact: {}
-  description: = "apache answer api"
-  title: '"apache answer"'
-  version: = "v0.0.1"
+  description: Apache Answer API
+  title: Apache Answer
 paths:
   /:
     get:


(incubator-answer) 02/02: fix: install plugin dependencies

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

linkinstar pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit be00ce4fc52a00fff2ee88aa8b17d8310958097f
Author: sy-records <52...@qq52o.cn>
AuthorDate: Thu Sep 19 13:36:30 2024 +0800

    fix: install plugin dependencies
---
 internal/cli/build.go | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/internal/cli/build.go b/internal/cli/build.go
index 2e59ca58..6af13c7a 100644
--- a/internal/cli/build.go
+++ b/internal/cli/build.go
@@ -264,9 +264,16 @@ func copyUIFiles(b *buildingMaterial) (err error) {
 		if !dir.CheckFileExist(packageJsonPath) {
 			continue
 		}
+
+		pnpmInstallCmd := b.newExecCmd("pnpm", "install")
+		pnpmInstallCmd.Dir = sourcePluginDir
+		if err = pnpmInstallCmd.Run(); err != nil {
+			return fmt.Errorf("failed to install plugin dependencies: %w", err)
+		}
+
 		localPluginDir := filepath.Join(localUIPluginDir, entry.Name())
 		fmt.Printf("try to copy dir from %s to %s\n", sourcePluginDir, localPluginDir)
-		if err = copyDirEntries(os.DirFS(sourcePluginDir), ".", localPluginDir); err != nil {
+		if err = copyDirEntries(os.DirFS(sourcePluginDir), ".", localPluginDir, "node_modules"); err != nil {
 			return fmt.Errorf("failed to copy ui files: %w", err)
 		}
 	}