create-steedos-app 2.5.18 → 2.5.19-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.
Files changed (34) hide show
  1. package/dist/create-app.js +185 -0
  2. package/dist/create-app.js.map +1 -0
  3. package/dist/helpers/examples.d.ts +1 -0
  4. package/dist/helpers/examples.js +63 -0
  5. package/dist/helpers/examples.js.map +1 -0
  6. package/dist/helpers/get-pkg-manager.js +30 -0
  7. package/dist/helpers/get-pkg-manager.js.map +1 -0
  8. package/dist/helpers/git.js +53 -0
  9. package/dist/helpers/git.js.map +1 -0
  10. package/dist/helpers/install.js +66 -0
  11. package/dist/helpers/install.js.map +1 -0
  12. package/dist/helpers/is-folder-empty.js +60 -0
  13. package/dist/helpers/is-folder-empty.js.map +1 -0
  14. package/dist/helpers/is-online.js +43 -0
  15. package/dist/helpers/is-online.js.map +1 -0
  16. package/dist/helpers/is-writeable.js +18 -0
  17. package/dist/helpers/is-writeable.js.map +1 -0
  18. package/dist/helpers/make-dir.js +12 -0
  19. package/dist/helpers/make-dir.js.map +1 -0
  20. package/dist/helpers/validate-pkg.js +22 -0
  21. package/dist/helpers/validate-pkg.js.map +1 -0
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.js +162 -384
  24. package/dist/index.js.map +1 -0
  25. package/package.json +7 -7
  26. package/dist/default/README-template.md +0 -87
  27. package/dist/default/moleculer.config.js +0 -18
  28. package/dist/default/package.json +0 -18
  29. package/dist/default/steedos-packages/example-service/package.json +0 -8
  30. package/dist/default/steedos-packages/example-service/package.service.js +0 -86
  31. package/dist/default/steedos-platform/docker-compose.yml +0 -49
  32. package/dist/default/steedos-platform/package.json +0 -13
  33. package/dist/default/steedos-platform/steedos.config.js +0 -22
  34. package/templates/default/README-template.md +0 -87
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAEA,kDAAyB;AACzB,0DAAiC;AAC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;IACD,OAAO,CAAC,GAAG,EAAE,CAAA;IAEb,MAAM,YAAY,EAAE,CAAA;IAEpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-steedos-app",
3
- "version": "2.5.18",
3
+ "version": "2.5.19-beta.2",
4
4
  "keywords": [
5
5
  "react",
6
6
  "steedos"
@@ -21,9 +21,9 @@
21
21
  "templates"
22
22
  ],
23
23
  "scripts": {
24
- "dev": "ncc build ./index.ts -w -o dist/",
25
- "prebuild": "rimraf ./dist/",
26
- "build": "ncc build ./index.ts -o ./dist/ --minify --no-cache --no-source-map-register"
24
+ "start": "node ./dist/index.js",
25
+ "dev": "ts-node src/index.ts",
26
+ "build": "rm -rf dist && tsc"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/async-retry": "1.4.4",
@@ -31,7 +31,7 @@
31
31
  "@types/node": "^12.6.8",
32
32
  "@types/prompts": "2.0.1",
33
33
  "@types/rimraf": "3.0.0",
34
- "@types/tar": "4.0.3",
34
+ "@types/tar": "6.1.7",
35
35
  "@types/validate-npm-package-name": "3.0.0",
36
36
  "@vercel/ncc": "0.33.4",
37
37
  "async-retry": "1.3.1",
@@ -47,7 +47,7 @@
47
47
  "validate-npm-package-name": "3.0.0"
48
48
  },
49
49
  "engines": {
50
- "node": ">=12.22.0"
50
+ "node": ">=14"
51
51
  },
52
- "gitHead": "4974b06e445d9dfd6f7530504bd7b37c700df419"
52
+ "gitHead": "fc946a6dd1aa34db1809edf505ddd1edce91fe1c"
53
53
  }
@@ -1,87 +0,0 @@
1
-
2
- # Steedos DX Project Template
3
-
4
- Steedos Developer Experience (DX) is a new way to manage and develop apps on the Steedos Low-Code Platform across their entire lifecycle. It brings together the best of the Low-Code Platform to enable source-driven development, team collaboration with governance, and new levels of agility for custom app development on Steedos.
5
-
6
- - [What is Steedos DX](https://docs.steedos.com/developer/setup/steedos-dx)
7
- - [What is Steedos Package](https://docs.steedos.com/developer/package/overview)
8
-
9
- # Getting Started
10
-
11
- ## Run Steedos Platform
12
-
13
- First, you must run Steedos Platform. You can follow the [Self Hosting Tutorial](/deploy/deploy-docker) to deploy Steedos on a server, or launch a local Steedos Platform.
14
-
15
- ```bash
16
- cd steedos-platform
17
- docker-compose up
18
- ```
19
-
20
- You can also refer to the instructions in the `./steedos-platform` dir to run Steedos Platform with Node.js.
21
-
22
- ### Register Admin Account
23
-
24
- Upon its first launch, the system will prompt you to register an account and create an organization. This account will also become the administrator account for the organization.
25
-
26
- ### Create an API Key
27
-
28
- You can log in to the Steedos server with administrator credentials, go to the settings app, select the API Key menu, and create a new API Key.
29
-
30
- ## Setup Environment Variable
31
-
32
- ### Setup TRANSPORTER
33
-
34
- The Steedos package operates using the [Moleculer](https://moleculer.services/docs) microservices framework, connecting microservices through the configuration of a unified Transporter.
35
-
36
- [Moleculer Transporter](https://moleculer.services/docs/0.14/networking) is an important module if you are running services on multiple nodes. Transporter communicates with other nodes. It transfers events, calls requests and processes responses …etc. If multiple instances of a service are running on different nodes then the requests will be load-balanced among them.
37
-
38
- ```bash
39
- TRANSPORTER=redis://127.0.0.1:6379
40
- ```
41
- :::tip
42
- Please make sure the TRANSPORTER you configured matches the Steedos server you wish to connect to and that the network is interconnected.
43
- :::
44
-
45
- :::danger
46
- For running in a production environment, be sure to configure the Redis password.
47
- :::
48
-
49
- ### Setup Metadata Server
50
-
51
- Setup environment variables required for metadata synchronization.
52
-
53
- ```bash
54
- steedos source:config
55
- ```
56
-
57
- - Metadata Server: METADATA_SERVER is the ROOT_URL of the Steedos server you wish to connect to.
58
- - Metadata API Key: METADATA_APIKEY is used to authenticate your identity.
59
-
60
- This command writes environment variables into the .env.local file,
61
-
62
- ```bash
63
- METADATA_SERVER=
64
- METADATA_APIKEY=
65
- ```
66
-
67
- You can also set the above environment variables directly without running the command.
68
-
69
- ## Run Steedos Packages
70
-
71
- ### Install Dependences
72
-
73
- ```bash
74
- yarn
75
- ```
76
-
77
- ### Run Packages
78
-
79
- You can use the [moleculer-runner](https://moleculer.services/docs/0.14/runner) command to launch the steedos packages.
80
-
81
- ```bash
82
- yarn moleculer-runner steedos-packages/*/package.service.js --hot --repl
83
- ```
84
-
85
- :::tip
86
- Please note that the Steedos DX project supports multi-package development, and the above command simultaneously launches all packages under the steedos-packages folder.
87
- :::
@@ -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
- {
2
- "version": "0.0.1",
3
- "private": true,
4
- "workspaces": [
5
- "steedos-packages/*"
6
- ],
7
- "repository": "git://github.com/steedos/steedos-project-template.git",
8
- "scripts": {
9
- "start": "moleculer-runner steedos-packages/*/package.service.js --hot --repl",
10
- "repl": "moleculer-runner --repl"
11
- },
12
- "dependencies": {
13
- "@steedos/service-package-loader": "^2.5"
14
- },
15
- "devDependencies": {
16
- "moleculer-repl": "^0.7.4"
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,86 +0,0 @@
1
- const project = require('./package.json');
2
- const packageLoader = require('@steedos/service-package-loader');
3
-
4
- module.exports = {
5
- name: "example-service",
6
-
7
- mixins: [packageLoader],
8
-
9
- metadata: {
10
- $package: {
11
- name: project.name,
12
- version: project.version,
13
- path: __dirname,
14
- isPackage: true
15
- }
16
- },
17
-
18
- actions: {
19
- hello: {
20
- // 使用微服务方式定义 API 接口。
21
- // 访问地址: GET /service/api/example-service/hello/:name
22
- rest: { method: 'GET', path: '/hello/:name' },
23
- handler(ctx) {
24
- return {
25
- data: 'Welcome ' + ctx.params.name
26
- }
27
- }
28
- },
29
- me: {
30
- rest: { method: 'GET', path: '/me' },
31
- // 在微服务中获取当前登录的用户信息
32
- async handler(ctx) {
33
- return ctx.meta.user
34
- }
35
- },
36
- // 在微服务中调用graphql查询数据库
37
- graphqlQuerySpaceUsers: {
38
- rest: { method: 'GET', path: '/graphql' },
39
- async handler(ctx) {
40
- return await this.broker.call('api.graphql', {
41
- query: `
42
- query {
43
- space_users(filters: ["user", "=", "${ctx.meta.user.userId}"]) {
44
- name
45
- organization__expand {
46
- name
47
- }
48
- }
49
- }
50
- `},
51
- // 如果查询 GraphQL 需要带上当前用户的权限,需要传入 user 属性。
52
- {
53
- user: ctx.meta.user
54
- }
55
- )
56
- },
57
- },
58
- // 在微服务中调用objectql查询数据库, 需要 mixins: [require('@steedos/service-object-mixin')],
59
- objectqlQuerySpaceUsers: {
60
- rest: { method: 'GET', path: '/objectql' },
61
- async handler(ctx) {
62
- return await this.getObject('space_users').find(
63
- {
64
- filters: ['user', '=', ctx.meta.user.userId]
65
- },
66
- ctx.meta.user
67
- )
68
- }
69
- },
70
- // 使用微服务定义触发器
71
- spaceUsersBeforeUpdate: {
72
- trigger: { listenTo: 'space_users', when: ['beforeUpdate', 'beforeInsert']},
73
- async handler(ctx) {
74
- this.broker.logger.info('spaceUsersBeforeUpdate', ctx)
75
- }
76
- }
77
- },
78
- events: {
79
- "@space_users.updated": {
80
- handler(payload) {
81
- // 监听人员修改事件
82
- this.broker.logger.info(payload);
83
- }
84
- }
85
- }
86
- }
@@ -1,49 +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
- environment:
10
- - PORT=5000
11
- - ROOT_URL=http://127.0.0.1:5000
12
- - MONGO_URL=mongodb://mongodb:27017/steedos
13
- - MONGO_OPLOG_URL=mongodb://mongodb:27017/local
14
- - TRANSPORTER=redis://redis:6379
15
- - CACHER=redis://redis:6379/1
16
- - STEEDOS_STORAGE_DIR=./steedos-storage
17
- volumes:
18
- - "./steedos-storage:/steedos-storage"
19
- depends_on:
20
- mongodb:
21
- condition: service_healthy
22
-
23
- redis:
24
- image: redis:6.2.10
25
- command: "redis-server --save \"\" --appendonly no --loglevel warning"
26
- ports:
27
- - "6379:6379"
28
-
29
- mongodb:
30
- image: mongo:4.4
31
- ports:
32
- - 27017:27017
33
- command: "--bind_ip_all --replSet steedos --logpath /var/log/mongodb/mongod.log"
34
- healthcheck:
35
- test: echo 'db.runCommand("ping").ok' | mongo --quiet | grep 1
36
- interval: 10s
37
- timeout: 10s
38
- retries: 5
39
- volumes:
40
- - './steedos-storage-mongodb:/data/db'
41
-
42
- mongodb-init:
43
- image: mongo:4.4
44
- restart: "no"
45
- depends_on:
46
- mongodb:
47
- condition: service_healthy
48
- command: >
49
- mongo --host mongodb:27017 --eval "rs.initiate({ _id: 'steedos', members: [{_id: 0, host: 'mongodb:27017'}]})"
@@ -1,13 +0,0 @@
1
- {
2
- "name": "steedos-platform",
3
- "version": "1.0.0",
4
- "main": "index.js",
5
- "license": "MIT",
6
- "scripts": {
7
- "start": "steedos start"
8
- },
9
- "dependencies": {
10
- "@steedos/service-community": "^2.5"
11
- }
12
- }
13
-
@@ -1,22 +0,0 @@
1
- const path = require('path');
2
- require('dotenv-flow').config({
3
- path: path.join(__dirname, '.')
4
- });
5
-
6
- // Moleculer Configuration
7
- // https://moleculer.services/docs/0.14/configuration.html
8
- module.exports = {
9
- // Namespace of nodes to segment your nodes on the same network.
10
- namespace: "steedos",
11
- // Default log level for built-in console logger. It can be overwritten in logger options above.
12
- // Available values: trace, debug, info, warn, error, fatal
13
- logLevel: "warn",
14
-
15
- transporter: process.env.TRANSPORTER,
16
-
17
- // Called after broker started.
18
- started(broker) {
19
- broker.createService(require("@steedos/service-community"));
20
- }
21
-
22
- };
@@ -1,87 +0,0 @@
1
-
2
- # Steedos DX Project Template
3
-
4
- Steedos Developer Experience (DX) is a new way to manage and develop apps on the Steedos Low-Code Platform across their entire lifecycle. It brings together the best of the Low-Code Platform to enable source-driven development, team collaboration with governance, and new levels of agility for custom app development on Steedos.
5
-
6
- - [What is Steedos DX](https://docs.steedos.com/developer/setup/steedos-dx)
7
- - [What is Steedos Package](https://docs.steedos.com/developer/package/overview)
8
-
9
- # Getting Started
10
-
11
- ## Run Steedos Platform
12
-
13
- First, you must run Steedos Platform. You can follow the [Self Hosting Tutorial](/deploy/deploy-docker) to deploy Steedos on a server, or launch a local Steedos Platform.
14
-
15
- ```bash
16
- cd steedos-platform
17
- docker-compose up
18
- ```
19
-
20
- You can also refer to the instructions in the `./steedos-platform` dir to run Steedos Platform with Node.js.
21
-
22
- ### Register Admin Account
23
-
24
- Upon its first launch, the system will prompt you to register an account and create an organization. This account will also become the administrator account for the organization.
25
-
26
- ### Create an API Key
27
-
28
- You can log in to the Steedos server with administrator credentials, go to the settings app, select the API Key menu, and create a new API Key.
29
-
30
- ## Setup Environment Variable
31
-
32
- ### Setup TRANSPORTER
33
-
34
- The Steedos package operates using the [Moleculer](https://moleculer.services/docs) microservices framework, connecting microservices through the configuration of a unified Transporter.
35
-
36
- [Moleculer Transporter](https://moleculer.services/docs/0.14/networking) is an important module if you are running services on multiple nodes. Transporter communicates with other nodes. It transfers events, calls requests and processes responses …etc. If multiple instances of a service are running on different nodes then the requests will be load-balanced among them.
37
-
38
- ```bash
39
- TRANSPORTER=redis://127.0.0.1:6379
40
- ```
41
- :::tip
42
- Please make sure the TRANSPORTER you configured matches the Steedos server you wish to connect to and that the network is interconnected.
43
- :::
44
-
45
- :::danger
46
- For running in a production environment, be sure to configure the Redis password.
47
- :::
48
-
49
- ### Setup Metadata Server
50
-
51
- Setup environment variables required for metadata synchronization.
52
-
53
- ```bash
54
- steedos source:config
55
- ```
56
-
57
- - Metadata Server: METADATA_SERVER is the ROOT_URL of the Steedos server you wish to connect to.
58
- - Metadata API Key: METADATA_APIKEY is used to authenticate your identity.
59
-
60
- This command writes environment variables into the .env.local file,
61
-
62
- ```bash
63
- METADATA_SERVER=
64
- METADATA_APIKEY=
65
- ```
66
-
67
- You can also set the above environment variables directly without running the command.
68
-
69
- ## Run Steedos Packages
70
-
71
- ### Install Dependences
72
-
73
- ```bash
74
- yarn
75
- ```
76
-
77
- ### Run Packages
78
-
79
- You can use the [moleculer-runner](https://moleculer.services/docs/0.14/runner) command to launch the steedos packages.
80
-
81
- ```bash
82
- yarn moleculer-runner steedos-packages/*/package.service.js --hot --repl
83
- ```
84
-
85
- :::tip
86
- Please note that the Steedos DX project supports multi-package development, and the above command simultaneously launches all packages under the steedos-packages folder.
87
- :::