create-steedos-app 2.5.16 → 2.5.17-beta.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-steedos-app",
3
- "version": "2.5.16",
3
+ "version": "2.5.17-beta.2",
4
4
  "keywords": [
5
5
  "react",
6
6
  "steedos"
@@ -48,5 +48,5 @@
48
48
  "engines": {
49
49
  "node": ">=12.22.0"
50
50
  },
51
- "gitHead": "29c5576aac882d8ae615c0542c458bb82afd77db"
51
+ "gitHead": "e66767a9214d49a229341a37f1d9b18737b25bd9"
52
52
  }
@@ -1,20 +0,0 @@
1
- FROM node:14-slim
2
-
3
- RUN apt-get update || : && apt-get install -y \
4
- python \
5
- curl \
6
- build-essential
7
-
8
- WORKDIR /app
9
-
10
- ADD .env .
11
- ADD lerna.json .
12
- ADD package.json .
13
- ADD steedos.config.js .
14
- ADD steedos-packages .
15
-
16
- ENV NODE_ENV=production
17
-
18
- RUN yarn --production
19
-
20
- CMD ["yarn", "start"]
@@ -1,64 +0,0 @@
1
- 华炎魔方模版项目
2
- ===
3
-
4
- <p align="center">
5
- <a href="./README_en.md">English</a>
6
- <a href="https://www.steedos.cn/docs/"> · 文档</a>
7
- <a href="https://www.steedos.cn/videos/"> · 视频</a>
8
- <a href="https://demo.steedos.cn"> · 试用</a>
9
- </p>
10
-
11
-
12
- <p align="center" style="border-top: solid 1px #cccccc">
13
- 华炎魔方是 <a href="https://developer.salesforce.com/developer-centers/developer-experience" target="_blank">Salesforce Developer Experience (DX)</a> 的开源替代方案,将低代码技术与 <a href="https://www.steedos.cn/docs/deploy/devops"> DevOps 工具</a> 结合,实现敏捷开发的新高度。
14
- </p>
15
-
16
- <h3 align="center">
17
- 🤖 🎨 🚀
18
- </h3>
19
-
20
-
21
- # 快速向导
22
-
23
- ## 启动华炎魔方
24
-
25
- 开发软件包之前,先启动花华炎魔方服务。
26
-
27
- 1. 将 .env 复制为 .env.local,并修改相关配置参数。
28
- 2. 使用 docker 启动华炎魔方。
29
-
30
- ```bash
31
- docker-compose up
32
- ```
33
-
34
- ## 访问华炎魔方
35
-
36
- 打开浏览器,访问 http://127.0.0.1:5000,进入华炎魔方。
37
-
38
- 进入设置应用,可以:
39
- - 创建自定义对象
40
- - 创建应用
41
- - 创建微页面
42
-
43
- ## 开发软件包
44
-
45
- 可以使用微服务的方式扩展华炎魔方。可以参考 services 文件夹下的例子。
46
-
47
- ```bash
48
- yarn
49
- yarn start
50
- ```
51
-
52
- ## 使用 Node-RED
53
-
54
- [Node-Red](https://nodered.org/) 是 IBM 开源的服务端低代码开发工具,提供了可视化的开发环境,开发华炎魔方微服务。
55
-
56
- - 创建定时任务
57
- - 自定义微服务
58
- - 自定义API
59
- - 自定义触发器
60
- - 接收和推送消息
61
-
62
- ```bash
63
- yarn nodered
64
- ```
@@ -1,57 +0,0 @@
1
- version: "3.9"
2
-
3
- services:
4
-
5
- steedos:
6
- image: steedos/steedos-community:2.5
7
- ports:
8
- - "5000:5000"
9
- env_file:
10
- - .env.local
11
- environment:
12
- - PORT=5000
13
- - MONGO_URL=mongodb://mongodb:27017/steedos
14
- - MONGO_OPLOG_URL=mongodb://mongodb:27017/local
15
- - TRANSPORTER=nats://nats:4222
16
- - CACHER=redis://redis:6379
17
- depends_on:
18
- mongodb:
19
- condition: service_healthy
20
-
21
- redis:
22
- image: redis:6.2
23
- ports:
24
- - "6379:6379"
25
-
26
- mongodb:
27
- image: mongo:4.4
28
- ports:
29
- - 27017:27017
30
- entrypoint: [ "/usr/bin/mongod", "--bind_ip_all", "--replSet", "steedos" ]
31
- healthcheck:
32
- test: echo 'db.runCommand("ping").ok' | mongo --quiet | grep 1
33
- interval: 10s
34
- timeout: 10s
35
- retries: 5
36
- volumes:
37
- - 'steedos-mongo-data:/data/db'
38
-
39
- mongodb-init:
40
- image: mongo:4.4
41
- restart: "no"
42
- depends_on:
43
- mongodb:
44
- condition: service_healthy
45
- command: >
46
- mongo --host mongodb:27017 --eval "rs.initiate({ _id: 'steedos', members: [{_id: 0, host: 'mongodb:27017'}]})"
47
-
48
- # Micro Service Transporter
49
- nats:
50
- image: bitnami/nats
51
- ports:
52
- - "4222:4222"
53
- - "8222:8222" # monitor port
54
-
55
- volumes:
56
- steedos-mongo-data:
57
- driver: local
package/dist/default/env DELETED
@@ -1,44 +0,0 @@
1
- # 参考 https://www.steedos.cn/docs/deploy/steedos-config
2
-
3
- PORT=5000
4
- ROOT_URL=http://127.0.0.1:5000
5
- TRANSPORTER=nats://127.0.0.1:4222
6
- CACHER=redis://127.0.0.1:6379
7
- MONGO_URL=mongodb://127.0.0.1:27017/steedos
8
- MONGO_OPLOG_URL=mongodb://127.0.0.1:27017/local
9
- # NODE_ENV=development
10
-
11
- # STEEDOS_CFS_STORE=local
12
- # STEEDOS_STORAGE_DIR=./storage
13
-
14
- # 初始安装的软件包
15
- # STEEDOS_INITIAL_PACKAGES=@steedos-labs/project-ee,@steedos-labs/demo-ee,@steedos-labs/flows
16
-
17
- # 身份验证
18
- # STEEDOS_TENANT_ENABLE_PASSWORD_LOGIN=true
19
- # STEEDOS_TENANT_TOKEN_SECRET=
20
- # STEEDOS_TENANT_ENABLE_REGISTER=true
21
-
22
- # VSCode 代码同步
23
- # METADATA_SERVER=
24
- # METADATA_APIKEY=
25
-
26
- # 启用 Steedos ID 统一身份认证。
27
- # STEEDOS_IDENTITY_OIDC_ENABLED=true
28
- # STEEDOS_IDENTITY_OIDC_ISSUER=https://id.steedos.cn/realms/master
29
- # STEEDOS_IDENTITY_OIDC_CONFIG_URL=https://id.steedos.cn/realms/master/.well-known/openid-configuration
30
- # STEEDOS_IDENTITY_OIDC_CLIENT_ID=steedos-oidc-public
31
- # STEEDOS_IDENTITY_OIDC_CLIENT_SECRET=none
32
- # STEEDOS_IDENTITY_OIDC_NAME=Steedos ID
33
-
34
- # Node-RED 配置
35
- # NODERED_CREDENTIAL_SECRET=steedos
36
-
37
- # 配置资产包 CDN 服务的网址
38
- # STEEDOS_UNPKG_URL=https://unpkg.steedos.cn
39
-
40
- # 配置 Amis 当前引用的版本号
41
- # STEEDOS_AMIS_VERSION=2.7.2
42
-
43
- # 配置资产包的地址,多个资产包用,隔开
44
- # STEEDOS_PUBLIC_PAGE_ASSETURLS=https://unpkg.steedos.cn/@steedos-widgets/amis-object@1.1/dist/assets.json
@@ -1,19 +0,0 @@
1
- # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
-
3
- **/.DS_Store
4
-
5
- **/node_modules
6
-
7
- **/npm-error.log
8
- **/yarn-error.log
9
- **/lerna-debug.log
10
-
11
- storage
12
- dist
13
- logs
14
-
15
- .env.local
16
- .steedos
17
- .node-red
18
-
19
- yarn.lock
@@ -1,40 +0,0 @@
1
- image: ecr.aws.steedos.cn/dockerhub/steedos/gitpod-workspace-base:2.2.3
2
-
3
- # List the ports you want to expose and what to do when they are served. See https://www.gitpod.io/docs/config-ports/
4
- ports:
5
- - port: 5000
6
- onOpen: ignore
7
- visibility: public
8
- - port: 6379
9
- onOpen: ignore
10
- - port: 27017
11
- onOpen: ignore
12
- visibility: public
13
- - port: 4222
14
- onOpen: ignore
15
- - port: 8222
16
- onOpen: ignore
17
-
18
- # List the start up tasks. You can start them in parallel in multiple terminals. See https://www.gitpod.io/docs/config-start-tasks/
19
- tasks:
20
- - name: Docker
21
- command: |
22
- echo "ROOT_URL=$(gp url 5000)" >> .env.local
23
- echo "METADATA_SERVER=$(gp url 5000)" >> .env.local
24
- yarn
25
- docker-compose up
26
- - name: Nodejs Services
27
- command: |
28
- gp await-port 5000
29
- yarn start
30
- - name: Node-RED
31
- command: |
32
- gp await-port 5000
33
- yarn nodered
34
-
35
- vscode:
36
- extensions:
37
- - redhat.vscode-yaml
38
- - steedos.steedosdx-vscode
39
- - steedos.steedosdx-vscode-core
40
- - ms-ceintl.vscode-language-pack-zh-hans
@@ -1,7 +0,0 @@
1
- {
2
- "packages": [
3
- "services/*"
4
- ],
5
- "version": "0.0.1",
6
- "useNx": false
7
- }
@@ -1,18 +0,0 @@
1
- require('dotenv-flow').config({});
2
-
3
- // Moleculer Configuration
4
- // https://moleculer.services/docs/0.14/configuration.html
5
- module.exports = {
6
- // Namespace of nodes to segment your nodes on the same network.
7
- namespace: "steedos",
8
- // Default log level for built-in console logger. It can be overwritten in logger options above.
9
- // Available values: trace, debug, info, warn, error, fatal
10
- logLevel: "info",
11
-
12
- transporter: process.env.TRANSPORTER,
13
-
14
- // Called after broker started.
15
- started(broker) {
16
- },
17
-
18
- };
@@ -1,18 +0,0 @@
1
- "use strict";
2
- require('dotenv-flow').config({});
3
- const path = require('path');
4
- const lodash = require('lodash');
5
-
6
- // Node-Red Configuration
7
- // https://nodered.org/docs/user-guide/runtime/configuration
8
- const appName = process.env.NODE_RED_STORAGE_APP_NAME || 'default'
9
- module.exports = {
10
- flowFile: path.join(__dirname,'flows', `${appName}.json`),
11
- flowFilePretty: true,
12
- credentialSecret: process.env.NODERED_CREDENTIAL_SECRET || 'steedos',
13
- nodesDir: path.join(__dirname,'nodes'),
14
- userDir: path.join(__dirname,'.node-red'),
15
- functionGlobalContext: {
16
- _: lodash
17
- } // enables global context
18
- };
@@ -1 +0,0 @@
1
- #registry=https://registry.npmmirror.com
@@ -1,22 +0,0 @@
1
- module.exports = {
2
- rest: { method: 'GET', path: '/graphql' },
3
- // 在微服务中查询数据库
4
- async handler(ctx) {
5
- return await this.broker.call('api.graphql', {
6
- query: `
7
- query {
8
- space_users(filters: ["user", "=", "${ctx.meta.user.userId}"]) {
9
- name
10
- organization__expand {
11
- name
12
- }
13
- }
14
- }
15
- `},
16
- // 如果查询 GraphQL 需要带上当前用户的权限,需要传入 user 属性。
17
- {
18
- user: ctx.meta.user
19
- }
20
- )
21
- },
22
- }
@@ -1,18 +0,0 @@
1
- module.exports = {
2
- rest: { method: 'GET', path: '/objectql' },
3
- async handler(ctx) {
4
- return await this.broker.call(
5
- 'objectql.find',
6
- {
7
- objectName: 'space_users',
8
- query: {
9
- filters: ['user', '=', ctx.meta.user.userId]
10
- },
11
- },
12
- // 如果查询需要带上当前用户的权限,需要传入 user 属性。
13
- {
14
- user: ctx.meta.user
15
- }
16
- );
17
- }
18
- }
@@ -1,8 +0,0 @@
1
- {
2
- "name": "my-steedos-service",
3
- "version": "0.0.1",
4
- "description": "",
5
- "main": "package.service.js",
6
- "dependencies": {
7
- }
8
- }
@@ -1,31 +0,0 @@
1
- const graphqlQuerySpaceUsers = require('./api/graphqlQuerySpaceUsers');
2
- const objectqlQuerySpaceUsers = require('./api/objectqlQuerySpaceUsers');
3
-
4
- const spaceUsersBeforeUpdate = require('./triggers/spaceUsersBeforeUpdate');
5
-
6
- module.exports = {
7
- name: "example-service",
8
-
9
- actions: {
10
- hello: {
11
- // 使用微服务方式定义 API 接口。
12
- // 访问地址: GET /service/api/example-service/hello/:name
13
- rest: { method: 'GET', path: '/hello/:name' },
14
- handler(ctx) {
15
- return {
16
- data: 'Welcome ' + ctx.params.name
17
- }
18
- }
19
- },
20
- me: {
21
- rest: { method: 'GET', path: '/me' },
22
- // 在微服务中获取当前登录的用户信息
23
- async handler(ctx) {
24
- return ctx.meta.user
25
- }
26
- },
27
- graphqlQuerySpaceUsers,
28
- objectqlQuerySpaceUsers,
29
- spaceUsersBeforeUpdate
30
- }
31
- }
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- trigger: { objectName: 'space_users', when: ['before.update']},
3
- async handler(ctx) {
4
- this.broker.logger.warn('spaceUsersBeforeUpdate', ctx)
5
- }
6
- }
@@ -1,8 +0,0 @@
1
- {
2
- "name": "my-steedos-app",
3
- "version": "0.0.1",
4
- "description": "",
5
- "main": "package.service.js",
6
- "dependencies": {
7
- }
8
- }
@@ -1,69 +0,0 @@
1
- "use strict";
2
- const project = require('./package.json');
3
- const packageName = project.name;
4
- const packageLoader = require('@steedos/service-package-loader');
5
- /**
6
- * @typedef {import('moleculer').Context} Context Moleculer's Context
7
- * 软件包服务启动后也需要抛出事件。
8
- */
9
- module.exports = {
10
- name: packageName,
11
- namespace: "steedos",
12
- mixins: [packageLoader],
13
- /**
14
- * Settings
15
- */
16
- settings: {
17
- packageInfo: {
18
- path: __dirname,
19
- name: packageName
20
- }
21
- },
22
-
23
- /**
24
- * Dependencies
25
- */
26
- dependencies: [],
27
-
28
- /**
29
- * Actions
30
- */
31
- actions: {
32
-
33
- },
34
-
35
- /**
36
- * Events
37
- */
38
- events: {
39
-
40
- },
41
-
42
- /**
43
- * Methods
44
- */
45
- methods: {
46
-
47
- },
48
-
49
- /**
50
- * Service created lifecycle event handler
51
- */
52
- async created() {
53
-
54
- },
55
-
56
- /**
57
- * Service started lifecycle event handler
58
- */
59
- async started() {
60
-
61
- },
62
-
63
- /**
64
- * Service stopped lifecycle event handler
65
- */
66
- async stopped() {
67
-
68
- }
69
- };
@@ -1,15 +0,0 @@
1
- require('dotenv-flow').config();
2
-
3
- module.exports = {
4
- // Namespace of nodes to segment your nodes on the same network.
5
- namespace: "steedos",
6
- // Default log level for built-in console logger. It can be overwritten in logger options above.
7
- // Available values: trace, debug, info, warn, error, fatal
8
- logLevel: "warn",
9
-
10
- // Called after broker started.
11
- started(broker) {
12
- broker.createService(require("@steedos/service-community"));
13
- },
14
-
15
- };
@@ -1 +0,0 @@
1
- #registry "https://registry.npmmirror.com"
package/dist/gitignore DELETED
@@ -1,19 +0,0 @@
1
- # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
-
3
- **/.DS_Store
4
-
5
- **/node_modules
6
-
7
- **/npm-error.log
8
- **/yarn-error.log
9
- **/lerna-debug.log
10
-
11
- storage
12
- dist
13
- logs
14
-
15
- .env.local
16
- .steedos
17
- .node-red
18
-
19
- yarn.lock