create-steedos-app 2.2.52-beta.34 → 2.2.52-beta.36
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/LICENSE.txt +0 -2
- package/README.md +16 -27
- package/dist/default/package.json +30 -0
- package/dist/default/steedos-app/main/default/client/analytics.baidu.client.js +24 -0
- package/dist/default/steedos-app/package.json +6 -0
- package/dist/default/steedos-app/package.service.js +69 -0
- package/dist/default/steedos.config.js +18 -0
- package/dist/index.js +9 -9
- package/package.json +2 -2
package/LICENSE.txt
CHANGED
|
@@ -11,8 +11,6 @@ If the file has no header, the following rules apply
|
|
|
11
11
|
|
|
12
12
|
On request, licenses under different terms are available.
|
|
13
13
|
|
|
14
|
-
Project templates can be found in the folders steedos-projects/
|
|
15
|
-
|
|
16
14
|
Source code of enterprise features are files that
|
|
17
15
|
* are in folders named "ee" or start with "ee_", or in subfolders of such folders.
|
|
18
16
|
* contain the strings "ee_" in its filename name.
|
package/README.md
CHANGED
|
@@ -1,51 +1,40 @@
|
|
|
1
1
|
# Create Steedos App
|
|
2
2
|
|
|
3
|
-
The easiest way to get started with
|
|
3
|
+
The easiest way to get started with Steedos Platform is by using `create-steedos-app`. This CLI tool enables you to quickly start building a new steedos application, with everything set up for you. You can create a new app using the default steedos template, or by using one of the [official Steedos examples](https://github.com/steedos/steedos-platform/tree/master/examples). To get started, use the following command:
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
npx create-steedos-app@latest
|
|
7
7
|
# or
|
|
8
|
-
yarn create
|
|
8
|
+
yarn create steedos-app
|
|
9
9
|
# or
|
|
10
|
-
pnpm create
|
|
10
|
+
pnpm create steedos-app
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
To create a new app in a specific folder, you can send a name as an argument. For example, the following command will create a new Steedos app called `contract-app` in a folder with the same name:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
npx create-steedos-app@latest
|
|
16
|
+
npx create-steedos-app@latest contract-app
|
|
17
17
|
# or
|
|
18
|
-
yarn create
|
|
18
|
+
yarn create steedos-app contract-app
|
|
19
19
|
# or
|
|
20
|
-
pnpm create
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
To create a new app in a specific folder, you can send a name as an argument. For example, the following command will create a new Next.js app called `blog-app` in a folder with the same name:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
npx create-steedos-app@latest blog-app
|
|
27
|
-
# or
|
|
28
|
-
yarn create next-app blog-app
|
|
29
|
-
# or
|
|
30
|
-
pnpm create next-app blog-app
|
|
20
|
+
pnpm create steedos-app contract-app
|
|
31
21
|
```
|
|
32
22
|
|
|
33
23
|
## Options
|
|
34
24
|
|
|
35
25
|
`create-steedos-app` comes with the following options:
|
|
36
26
|
|
|
37
|
-
-
|
|
38
|
-
- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Next.js repo](https://github.com/vercel/next.js/tree/canary/examples) or a GitHub URL. The URL can use any branch and/or subdirectory.
|
|
27
|
+
- **-e, --example [name]|[github-url]** - An example to bootstrap the app with. You can use an example name from the [Steedos Platform repo](https://github.com/steedos/steedos-platform/tree/master/examples) or a GitHub URL. The URL can use any branch and/or subdirectory.
|
|
39
28
|
- **--example-path <path-to-example>** - In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately: `--example-path foo/bar`
|
|
40
|
-
- **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. To bootstrap using yarn we recommend to run `yarn create
|
|
41
|
-
- **--use-pnpm** - Explicitly tell the CLI to bootstrap the app using pnpm. To bootstrap using pnpm we recommend running `pnpm create
|
|
29
|
+
- **--use-npm** - Explicitly tell the CLI to bootstrap the app using npm. To bootstrap using yarn we recommend to run `yarn create steedos-app`
|
|
30
|
+
- **--use-pnpm** - Explicitly tell the CLI to bootstrap the app using pnpm. To bootstrap using pnpm we recommend running `pnpm create steedos-app`
|
|
42
31
|
|
|
43
|
-
## Why use Create
|
|
32
|
+
## Why use Create Steedos App?
|
|
44
33
|
|
|
45
|
-
`create-steedos-app` allows you to create a new
|
|
34
|
+
`create-steedos-app` allows you to create a new Steedos Platform app within seconds. It is officially maintained by the creators of Steedos Platform, and includes a number of benefits:
|
|
46
35
|
|
|
47
36
|
- **Interactive Experience**: Running `npx create-steedos-app` (with no arguments) launches an interactive experience that guides you through setting up a project.
|
|
48
|
-
- **Zero Dependencies**: Initializing a project is as quick as one second. Create
|
|
49
|
-
- **Offline Support**: Create
|
|
50
|
-
- **Support for Examples**: Create
|
|
51
|
-
- **Tested**: The package is part of the
|
|
37
|
+
- **Zero Dependencies**: Initializing a project is as quick as one second. Create Steedos App has zero dependencies.
|
|
38
|
+
- **Offline Support**: Create Steedos App will automatically detect if you're offline and bootstrap your project using your local package cache.
|
|
39
|
+
- **Support for Examples**: Create Steedos App can bootstrap your application using an example from the Steedos Platform examples collection (e.g. `npx create-steedos-app --example api-routes`).
|
|
40
|
+
- **Tested**: The package is part of the Steedos Platform monorepo and tested using the same integration test suite as Steedos Platform itself, ensuring it works as expected with every release.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "steedos-app",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "steedos start"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"@steedos/service-community": "2.2.52-beta.34"
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
12
|
+
"moleculer-repl": "^0.6.4"
|
|
13
|
+
},
|
|
14
|
+
"resolutions": {
|
|
15
|
+
"typeorm": "0.2.28",
|
|
16
|
+
"**/lodash": "^4.17.15",
|
|
17
|
+
"**/handlebars": "^4.3.0",
|
|
18
|
+
"**/debug": "^3.1.0",
|
|
19
|
+
"**/hoek": "^5.0.3",
|
|
20
|
+
"**/cryptiles": "^4.1.2",
|
|
21
|
+
"**/bcrypt": "3.0.6",
|
|
22
|
+
"**/samlp": "3.4.1",
|
|
23
|
+
"**/xmldom": "0.2.1",
|
|
24
|
+
"**/tslib": "2.3.1",
|
|
25
|
+
"**/fibers": "^4.0.3",
|
|
26
|
+
"**/cookies": "0.6.2",
|
|
27
|
+
"**/@babel/runtime": "7.12.0",
|
|
28
|
+
"**/graphql": "15.5.0"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var _hmt = _hmt || [];
|
|
2
|
+
(function() {
|
|
3
|
+
try {
|
|
4
|
+
var hm = document.createElement("script");
|
|
5
|
+
hm.src = "https://hm.baidu.com/hm.js?6bdb41ab7e3b884e6dfdd331bcdd2622";
|
|
6
|
+
var s = document.getElementsByTagName("script")[0];
|
|
7
|
+
s.parentNode.insertBefore(hm, s);
|
|
8
|
+
} catch (error) {
|
|
9
|
+
console.log(error);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
Meteor.startup(function(){
|
|
14
|
+
Tracker.autorun(function() {
|
|
15
|
+
FlowRouter.watchPathChange();
|
|
16
|
+
if (FlowRouter.current().path) {
|
|
17
|
+
window._hmt.push(['_trackPageview', FlowRouter.current().path]);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
})
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.log(error);
|
|
23
|
+
}
|
|
24
|
+
})();
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
// Namespace of nodes to segment your nodes on the same network.
|
|
3
|
+
namespace: "steedos",
|
|
4
|
+
// Default log level for built-in console logger. It can be overwritten in logger options above.
|
|
5
|
+
// Available values: trace, debug, info, warn, error, fatal
|
|
6
|
+
logLevel: "warn",
|
|
7
|
+
|
|
8
|
+
// Called after broker started.
|
|
9
|
+
started(broker) {
|
|
10
|
+
// 启动 元数据服务
|
|
11
|
+
broker.createService(require("@steedos/service-metadata-server"));
|
|
12
|
+
// 启动 加载软件包服务
|
|
13
|
+
broker.createService(require("@steedos/service-package-registry"));
|
|
14
|
+
// 启动 meteor服务
|
|
15
|
+
broker.createService(require("@steedos/service-steedos-server"));
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
};
|