create-steedos-app 2.2.52-beta.4 → 2.2.52-beta.44

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 (88) hide show
  1. package/LICENSE.txt +2 -5
  2. package/README.md +40 -2
  3. package/dist/create-app.d.ts +10 -0
  4. package/dist/default/README-template.md +27 -0
  5. package/dist/default/env +32 -0
  6. package/dist/default/gitignore +17 -0
  7. package/{templates → dist}/default/steedos-app/main/default/client/analytics.baidu.client.js +0 -0
  8. package/dist/default/steedos-app/package.json +6 -0
  9. package/{templates → dist}/default/steedos-app/package.service.js +0 -0
  10. package/dist/default/steedos.config.js +18 -0
  11. package/dist/gitignore +17 -0
  12. package/dist/helpers/examples.d.ts +12 -0
  13. package/dist/helpers/get-pkg-manager.d.ts +2 -0
  14. package/dist/helpers/git.d.ts +1 -0
  15. package/dist/helpers/install.d.ts +22 -0
  16. package/dist/helpers/is-folder-empty.d.ts +1 -0
  17. package/dist/helpers/is-online.d.ts +1 -0
  18. package/dist/helpers/is-writeable.d.ts +1 -0
  19. package/dist/helpers/make-dir.d.ts +3 -0
  20. package/dist/helpers/validate-pkg.d.ts +4 -0
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.js +385 -0
  23. package/package.json +35 -22
  24. package/createSteedosApp.js +0 -127
  25. package/index.js +0 -19
  26. package/templates/default/.scripts/env.sh +0 -7
  27. package/templates/default/.scripts/flush_cacher_db.js +0 -7
  28. package/templates/default/.scripts/setup.sh +0 -8
  29. package/templates/default/.scripts/tailscale.sh +0 -7
  30. package/templates/default/.scripts/tailscaled.sh +0 -6
  31. package/templates/default/.steedos/_package.json +0 -11
  32. package/templates/default/.steedos/steedos-packages.yml +0 -30
  33. package/templates/default/.steedos/yarn.lock +0 -35
  34. package/templates/default/.vscode/extensions.json +0 -5
  35. package/templates/default/.vscode/settings.json +0 -17
  36. package/templates/default/Dockerfile +0 -21
  37. package/templates/default/Dockerfile-codeserver +0 -37
  38. package/templates/default/README.md +0 -99
  39. package/templates/default/_package.json +0 -60
  40. package/templates/default/docker-compose.yml +0 -59
  41. package/templates/default/env +0 -35
  42. package/templates/default/gitignore +0 -35
  43. package/templates/default/gitpod.Dockerfile +0 -52
  44. package/templates/default/gitpod.yml +0 -47
  45. package/templates/default/index.js +0 -0
  46. package/templates/default/jsreport-app/_package.json +0 -16
  47. package/templates/default/jsreport-app/jsreport.config.json +0 -43
  48. package/templates/default/jsreport-app/server.js +0 -14
  49. package/templates/default/lerna.json +0 -10
  50. package/templates/default/moleculer.config.js +0 -268
  51. package/templates/default/node-red-app/LICENSE.txt +0 -706
  52. package/templates/default/node-red-app/README.md +0 -78
  53. package/templates/default/node-red-app/_package.json +0 -26
  54. package/templates/default/node-red-app/index.js +0 -137
  55. package/templates/default/node-red-app/public/css/simplegrid.css +0 -145
  56. package/templates/default/node-red-app/public/css/style.css +0 -482
  57. package/templates/default/node-red-app/public/favicon.ico +0 -0
  58. package/templates/default/node-red-app/public/first-run.html +0 -280
  59. package/templates/default/node-red-app/public/fonts/css.css +0 -224
  60. package/templates/default/node-red-app/public/images/progress-bar.png +0 -0
  61. package/templates/default/node-red-app/public/images/progress-left.png +0 -0
  62. package/templates/default/node-red-app/public/images/progress-middle.png +0 -0
  63. package/templates/default/node-red-app/public/images/progress-o-bar.png +0 -0
  64. package/templates/default/node-red-app/public/images/progress-o-left.png +0 -0
  65. package/templates/default/node-red-app/public/images/progress-o-middle.png +0 -0
  66. package/templates/default/node-red-app/public/images/progress-o-right.png +0 -0
  67. package/templates/default/node-red-app/public/images/progress-right.png +0 -0
  68. package/templates/default/node-red-app/public/images/spin.svg +0 -41
  69. package/templates/default/node-red-app/public/images/title-wave.png +0 -0
  70. package/templates/default/node-red-app/public/index.html +0 -220
  71. package/templates/default/node-red-app/public/scripts/jquery-1.11.2.min.js +0 -4
  72. package/templates/default/node-red-app/public/scripts/zxcvbn.js +0 -28
  73. package/templates/default/node-red-app/public/steedos.png +0 -0
  74. package/templates/default/node-red-app/red.js +0 -294
  75. package/templates/default/node-red-app/routers/health.js +0 -13
  76. package/templates/default/node-red-app/settings.js +0 -121
  77. package/templates/default/services/community.service.js +0 -19
  78. package/templates/default/services/enterprise.service.js +0 -26
  79. package/templates/default/services/sidecar-server.service.js +0 -7
  80. package/templates/default/steedos-app/README.md +0 -5
  81. package/templates/default/steedos-app/_package.json +0 -9
  82. package/templates/default/steedos-app/tsconfig.json +0 -74
  83. package/templates/default/steedos-config.yml +0 -95
  84. package/templates/default/steedos-packages/README.md +0 -1
  85. package/templates/default/steedos-packages/my-package/README.md +0 -3
  86. package/templates/default/steedos-packages/my-package/_package.json +0 -9
  87. package/templates/default/steedos-packages/my-package/main/default/client/analytics.baidu.client.js +0 -24
  88. package/templates/default/steedos-packages/my-package/package.service.js +0 -69
package/LICENSE.txt CHANGED
@@ -6,14 +6,11 @@ To determine under which license you may use a file from the Steedos source code
6
6
  please resort to the header of that file.
7
7
 
8
8
  If the file has no header, the following rules apply
9
- 1. project templates are licensed under MIT, see License.MIT.txt
10
- 2. enterprise features are licensed under Steedos Enterprise Terms, see License.enterprise.txt
11
- 3. source code that is neither (1) nor (2) is licensed under AGPL, see License.AGPL.txt
9
+ 1. enterprise features are licensed under Steedos Enterprise Terms, see License.enterprise.txt
10
+ 2. source code that is neither (1) is licensed under MIT, see https://opensource.org/licenses/MIT
12
11
 
13
12
  On request, licenses under different terms are available.
14
13
 
15
- Project templates can be found in the folders steedos-projects/
16
-
17
14
  Source code of enterprise features are files that
18
15
  * are in folders named "ee" or start with "ee_", or in subfolders of such folders.
19
16
  * contain the strings "ee_" in its filename name.
package/README.md CHANGED
@@ -1,2 +1,40 @@
1
- ## 功能说明
2
- - 此包是npx命令`create-steedos-app`,用于创建项目,如 `npx create-steedos-app my-app`
1
+ # Create Steedos App
2
+
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
+
5
+ ```bash
6
+ npx create-steedos-app@latest
7
+ # or
8
+ yarn create steedos-app
9
+ # or
10
+ pnpm create steedos-app
11
+ ```
12
+
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
+
15
+ ```bash
16
+ npx create-steedos-app@latest contract-app
17
+ # or
18
+ yarn create steedos-app contract-app
19
+ # or
20
+ pnpm create steedos-app contract-app
21
+ ```
22
+
23
+ ## Options
24
+
25
+ `create-steedos-app` comes with the following options:
26
+
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.
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`
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`
31
+
32
+ ## Why use Create Steedos App?
33
+
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:
35
+
36
+ - **Interactive Experience**: Running `npx create-steedos-app` (with no arguments) launches an interactive experience that guides you through setting up a project.
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,10 @@
1
+ import type { PackageManager } from './helpers/get-pkg-manager';
2
+ export declare class DownloadError extends Error {
3
+ }
4
+ export declare function createApp({ appPath, packageManager, example, examplePath, typescript, }: {
5
+ appPath: string;
6
+ packageManager: PackageManager;
7
+ example?: string;
8
+ examplePath?: string;
9
+ typescript?: boolean;
10
+ }): Promise<void>;
@@ -0,0 +1,27 @@
1
+ This is a [Steedos](https://www.steedos.com/) project bootstrapped with [`create-steedos-app`](https://github.com/steedos/steedos-platform/tree/master/packages/create-steedos-app).
2
+
3
+ ## Getting Started
4
+
5
+ First, run the development server:
6
+
7
+ ```bash
8
+ npm run start
9
+ # or
10
+ yarn start
11
+ ```
12
+
13
+ Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
14
+
15
+ ## Learn More
16
+
17
+ To learn more about Steedos Platform, take a look at the following resources:
18
+
19
+ - [Steedos Documentation](https://www.steedos.com/docs) - learn about Steedos features and API.
20
+
21
+ You can check out [the Steedos GitHub repository](https://github.com/steedos/steedos-platform/) - your feedback and contributions are welcome!
22
+
23
+ ## Deploy your project
24
+
25
+ The easiest way to deploy your Steedos app is to use the [Docker Template](https://github.com/steedos/docker).
26
+
27
+ Check out our [Steedos deployment documentation](https://www.steedos.com/docs/deploy/getting-started) for more details.
@@ -0,0 +1,32 @@
1
+ PORT=5000
2
+ ROOT_URL=http://127.0.0.1:5000
3
+ TRANSPORTER=redis://127.0.0.1:6379
4
+ CACHER=redis://127.0.0.1:6379/1
5
+ MONGO_URL=mongodb://127.0.0.1:27017/steedos
6
+ MONGO_OPLOG_URL=mongodb://127.0.0.1:27017/local
7
+
8
+ STEEDOS_CFS_STORE=local
9
+ STEEDOS_STORAGE_DIR=./storage
10
+
11
+ # 身份验证
12
+ STEEDOS_TENANT_ENABLE_PASSWORD_LOGIN=true
13
+ STEEDOS_TENANT_TOKEN_SECRET=change-me
14
+
15
+ # 绑定华炎云账户
16
+ STEEDOS_CLOUD_API_KEY=
17
+ STEEDOS_CLOUD_SPACE_ID=
18
+
19
+ # vscode 代码同步
20
+ METADATA_SERVER=
21
+ METADATA_APIKEY=
22
+
23
+ # CDN in china, default is https://unpkg.com
24
+ STEEDOS_UNPKG_URL=https://npm.elemecdn.com
25
+ STEEDOS_PUBLIC_PAGE_ASSETURLS=https://unpkg.com/@steedos-ui/builder-widgets@2.2.32/dist/assets.json
26
+
27
+ SSO_OIDC_CONFIG_URL=
28
+ SSO_OIDC_CLIENT_ID=
29
+ SSO_OIDC_CLIENT_SECRET=
30
+ SSO_OIDC_NAME=
31
+ SSO_OIDC_LOGO=
32
+ SSO_OIDC_REQUIRE_LOCAL_ACCOUNT=false
@@ -0,0 +1,17 @@
1
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
+
3
+ **/.DS_Store
4
+
5
+ **/node_modules
6
+
7
+ .npmrc
8
+ .yarnrc
9
+ **/npm-error.log
10
+ **/yarn-error.log
11
+ **/lerna-debug.log
12
+
13
+ storage
14
+ dist
15
+ logs
16
+
17
+ .env.local
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "my-steedos-package",
3
+ "version": "0.1.0",
4
+ "main": "package.service.js",
5
+ "private": true
6
+ }
@@ -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
+ };
package/dist/gitignore ADDED
@@ -0,0 +1,17 @@
1
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
+
3
+ **/.DS_Store
4
+
5
+ **/node_modules
6
+
7
+ .npmrc
8
+ .yarnrc
9
+ **/npm-error.log
10
+ **/yarn-error.log
11
+ **/lerna-debug.log
12
+
13
+ storage
14
+ dist
15
+ logs
16
+
17
+ .env.local
@@ -0,0 +1,12 @@
1
+ export declare type RepoInfo = {
2
+ username: string;
3
+ name: string;
4
+ branch: string;
5
+ filePath: string;
6
+ };
7
+ export declare function isUrlOk(url: string): Promise<boolean>;
8
+ export declare function getRepoInfo(url: URL, examplePath?: string): Promise<RepoInfo | undefined>;
9
+ export declare function hasRepo({ username, name, branch, filePath, }: RepoInfo): Promise<boolean>;
10
+ export declare function existsInRepo(nameOrUrl: string): Promise<boolean>;
11
+ export declare function downloadAndExtractRepo(root: string, { username, name, branch, filePath }: RepoInfo): Promise<void>;
12
+ export declare function downloadAndExtractExample(root: string, name: string): Promise<void>;
@@ -0,0 +1,2 @@
1
+ export declare type PackageManager = 'npm' | 'pnpm' | 'yarn';
2
+ export declare function getPkgManager(): PackageManager;
@@ -0,0 +1 @@
1
+ export declare function tryGitInit(root: string): boolean;
@@ -0,0 +1,22 @@
1
+ import type { PackageManager } from './get-pkg-manager';
2
+ interface InstallArgs {
3
+ /**
4
+ * Indicate whether to install packages using npm, pnpm or Yarn.
5
+ */
6
+ packageManager: PackageManager;
7
+ /**
8
+ * Indicate whether there is an active Internet connection.
9
+ */
10
+ isOnline: boolean;
11
+ /**
12
+ * Indicate whether the given dependencies are devDependencies.
13
+ */
14
+ devDependencies?: boolean;
15
+ }
16
+ /**
17
+ * Spawn a package manager installation with either Yarn or NPM.
18
+ *
19
+ * @returns A Promise that resolves once the installation is finished.
20
+ */
21
+ export declare function install(root: string, dependencies: string[] | null, { packageManager, isOnline, devDependencies }: InstallArgs): Promise<void>;
22
+ export {};
@@ -0,0 +1 @@
1
+ export declare function isFolderEmpty(root: string, name: string): boolean;
@@ -0,0 +1 @@
1
+ export declare function getOnline(): Promise<boolean>;
@@ -0,0 +1 @@
1
+ export declare function isWriteable(directory: string): Promise<boolean>;
@@ -0,0 +1,3 @@
1
+ export declare function makeDir(root: string, options?: {
2
+ recursive: boolean;
3
+ }): Promise<void>;
@@ -0,0 +1,4 @@
1
+ export declare function validateNpmName(name: string): {
2
+ valid: boolean;
3
+ problems?: string[];
4
+ };
@@ -0,0 +1 @@
1
+ export {};