create-steedos-app 2.4.12 → 2.5.0-beta.3

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.4.12",
3
+ "version": "2.5.0-beta.3",
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": "9e0c93d90964dc1a7aef679c64f977d2352ef013"
51
+ "gitHead": "48546b91b2a44dd6f6673af7f5ab707faff6e07c"
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,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 +0,0 @@
1
- #registry "https://registry.npmmirror.com"