create-steedos-app 2.2.52-beta.21 → 2.2.52-beta.25

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 (71) hide show
  1. package/LICENSE.txt +2 -3
  2. package/README.md +51 -2
  3. package/dist/index.js +385 -0
  4. package/package.json +35 -22
  5. package/createSteedosApp.js +0 -127
  6. package/index.js +0 -19
  7. package/templates/default/.scripts/env.sh +0 -7
  8. package/templates/default/.scripts/flush_cacher_db.js +0 -7
  9. package/templates/default/.scripts/setup.sh +0 -8
  10. package/templates/default/.scripts/tailscale.sh +0 -7
  11. package/templates/default/.scripts/tailscaled.sh +0 -6
  12. package/templates/default/.steedos/_package.json +0 -11
  13. package/templates/default/.steedos/steedos-packages.yml +0 -30
  14. package/templates/default/.steedos/yarn.lock +0 -35
  15. package/templates/default/.vscode/extensions.json +0 -5
  16. package/templates/default/.vscode/settings.json +0 -17
  17. package/templates/default/Dockerfile +0 -21
  18. package/templates/default/Dockerfile-codeserver +0 -37
  19. package/templates/default/README.md +0 -99
  20. package/templates/default/_package.json +0 -60
  21. package/templates/default/docker-compose.yml +0 -59
  22. package/templates/default/env +0 -35
  23. package/templates/default/gitignore +0 -35
  24. package/templates/default/gitpod.Dockerfile +0 -52
  25. package/templates/default/gitpod.yml +0 -47
  26. package/templates/default/index.js +0 -0
  27. package/templates/default/jsreport-app/_package.json +0 -16
  28. package/templates/default/jsreport-app/jsreport.config.json +0 -43
  29. package/templates/default/jsreport-app/server.js +0 -14
  30. package/templates/default/lerna.json +0 -10
  31. package/templates/default/moleculer.config.js +0 -268
  32. package/templates/default/node-red-app/LICENSE.txt +0 -706
  33. package/templates/default/node-red-app/README.md +0 -78
  34. package/templates/default/node-red-app/_package.json +0 -26
  35. package/templates/default/node-red-app/index.js +0 -137
  36. package/templates/default/node-red-app/public/css/simplegrid.css +0 -145
  37. package/templates/default/node-red-app/public/css/style.css +0 -482
  38. package/templates/default/node-red-app/public/favicon.ico +0 -0
  39. package/templates/default/node-red-app/public/first-run.html +0 -280
  40. package/templates/default/node-red-app/public/fonts/css.css +0 -224
  41. package/templates/default/node-red-app/public/images/progress-bar.png +0 -0
  42. package/templates/default/node-red-app/public/images/progress-left.png +0 -0
  43. package/templates/default/node-red-app/public/images/progress-middle.png +0 -0
  44. package/templates/default/node-red-app/public/images/progress-o-bar.png +0 -0
  45. package/templates/default/node-red-app/public/images/progress-o-left.png +0 -0
  46. package/templates/default/node-red-app/public/images/progress-o-middle.png +0 -0
  47. package/templates/default/node-red-app/public/images/progress-o-right.png +0 -0
  48. package/templates/default/node-red-app/public/images/progress-right.png +0 -0
  49. package/templates/default/node-red-app/public/images/spin.svg +0 -41
  50. package/templates/default/node-red-app/public/images/title-wave.png +0 -0
  51. package/templates/default/node-red-app/public/index.html +0 -220
  52. package/templates/default/node-red-app/public/scripts/jquery-1.11.2.min.js +0 -4
  53. package/templates/default/node-red-app/public/scripts/zxcvbn.js +0 -28
  54. package/templates/default/node-red-app/public/steedos.png +0 -0
  55. package/templates/default/node-red-app/red.js +0 -294
  56. package/templates/default/node-red-app/routers/health.js +0 -13
  57. package/templates/default/node-red-app/settings.js +0 -121
  58. package/templates/default/services/community.service.js +0 -19
  59. package/templates/default/services/enterprise.service.js +0 -26
  60. package/templates/default/services/sidecar-server.service.js +0 -7
  61. package/templates/default/steedos-app/README.md +0 -5
  62. package/templates/default/steedos-app/_package.json +0 -9
  63. package/templates/default/steedos-app/main/default/client/analytics.baidu.client.js +0 -24
  64. package/templates/default/steedos-app/package.service.js +0 -69
  65. package/templates/default/steedos-app/tsconfig.json +0 -74
  66. package/templates/default/steedos-config.yml +0 -95
  67. package/templates/default/steedos-packages/README.md +0 -1
  68. package/templates/default/steedos-packages/my-package/README.md +0 -3
  69. package/templates/default/steedos-packages/my-package/_package.json +0 -9
  70. package/templates/default/steedos-packages/my-package/main/default/client/analytics.baidu.client.js +0 -24
  71. package/templates/default/steedos-packages/my-package/package.service.js +0 -69
@@ -1,294 +0,0 @@
1
- // Copied from https://github.com/node-red/node-red/blob/6d294a0c74343601fb194066fa41edf3b092cdae/packages/node_modules/node-red/red.js
2
- // with major modifications
3
-
4
- 'use strict';
5
-
6
- var http = require('http');
7
- var https = require('https');
8
- var util = require("util");
9
- var express = require("express");
10
- var crypto = require("crypto");
11
- var bcrypt;
12
-
13
- try {
14
- bcrypt = require('bcrypt');
15
- }
16
- catch(e) {
17
- bcrypt = require('bcryptjs');
18
- }
19
-
20
- var RED = require("node-red");
21
-
22
- module.exports = function(settings) {
23
- var server;
24
- var app = express();
25
- require('./routers/health')(app);
26
-
27
- if (process.env.NODE_RED_ENABLE_SAFE_MODE && !/^false$/i.test(process.env.NODE_RED_ENABLE_SAFE_MODE)) {
28
- settings.safeMode = true;
29
- }
30
-
31
- // Delay logging of (translated) messages until the RED object has been initialized
32
- var delayedLogItems = [];
33
-
34
- var startupHttps = settings.https;
35
- if (typeof startupHttps === "function") {
36
- // Get the result of the function, because createServer doesn't accept functions as input
37
- startupHttps = startupHttps();
38
- }
39
- var httpsPromise = Promise.resolve(startupHttps);
40
-
41
- httpsPromise.then(function(startupHttps) {
42
- if (startupHttps) {
43
- server = https.createServer(startupHttps,function(req,res) {app(req,res);});
44
-
45
- if (settings.httpsRefreshInterval) {
46
- var httpsRefreshInterval = parseFloat(settings.httpsRefreshInterval)||12;
47
- if (httpsRefreshInterval > 596) {
48
- // Max value based on (2^31-1)ms - the max that setInterval can accept
49
- httpsRefreshInterval = 596;
50
- }
51
- // Check whether setSecureContext is available (Node.js 11+)
52
- if (server.setSecureContext) {
53
- // Check whether `http` is a callable function
54
- if (typeof settings.https === "function") {
55
- delayedLogItems.push({type:"info", id:"server.https.refresh-interval", params:{interval:httpsRefreshInterval}});
56
- setInterval(function () {
57
- try {
58
- // Get the result of the function, because createServer doesn't accept functions as input
59
- Promise.resolve(settings.https()).then(function(refreshedHttps) {
60
- if (refreshedHttps) {
61
- // Only update the credentials in the server when key or cert has changed
62
- if(!server.key || !server.cert || !server.key.equals(refreshedHttps.key) || !server.cert.equals(refreshedHttps.cert)) {
63
- server.setSecureContext(refreshedHttps);
64
- RED.log.info(RED.log._("server.https.settings-refreshed"));
65
- }
66
- }
67
- }).catch(function(err) {
68
- RED.log.error(RED.log._("server.https.refresh-failed",{message:err}));
69
- });
70
- } catch(err) {
71
- RED.log.error(RED.log._("server.https.refresh-failed",{message:err}));
72
- }
73
- }, httpsRefreshInterval*60*60*1000);
74
- } else {
75
- delayedLogItems.push({type:"warn", id:"server.https.function-required"});
76
- }
77
- } else {
78
- delayedLogItems.push({type:"warn", id:"server.https.nodejs-version"});
79
- }
80
- }
81
- } else {
82
- server = http.createServer(function(req,res) {app(req,res);});
83
- }
84
- server.setMaxListeners(0);
85
-
86
- function formatRoot(root) {
87
- if (root[0] != "/") {
88
- root = "/" + root;
89
- }
90
- if (root.slice(-1) != "/") {
91
- root = root + "/";
92
- }
93
- return root;
94
- }
95
-
96
- if (settings.httpRoot === false) {
97
- settings.httpAdminRoot = false;
98
- settings.httpNodeRoot = false;
99
- } else {
100
- settings.httpRoot = settings.httpRoot||"/";
101
- settings.disableEditor = settings.disableEditor||false;
102
- }
103
-
104
- if (settings.httpAdminRoot !== false) {
105
- settings.httpAdminRoot = formatRoot(settings.httpAdminRoot || settings.httpRoot || "/");
106
- settings.httpAdminAuth = settings.httpAdminAuth || settings.httpAuth;
107
- } else {
108
- settings.disableEditor = true;
109
- }
110
-
111
- if (settings.httpNodeRoot !== false) {
112
- settings.httpNodeRoot = formatRoot(settings.httpNodeRoot || settings.httpRoot || "/");
113
- settings.httpNodeAuth = settings.httpNodeAuth || settings.httpAuth;
114
- }
115
-
116
- // replicate (settings.uiPort = settings.uiPort||1880;) but allow zero
117
- if (settings.uiPort === undefined){
118
- settings.uiPort = 1880;
119
- }
120
-
121
- settings.uiHost = settings.uiHost||"0.0.0.0";
122
-
123
- try {
124
- RED.init(server,settings);
125
- } catch(err) {
126
- if (err.code == "unsupported_version") {
127
- console.log("Unsupported version of Node.js:",process.version);
128
- console.log("Node-RED requires Node.js v8.9.0 or later");
129
- } else {
130
- console.log("Failed to start server:");
131
- if (err.stack) {
132
- console.log(err.stack);
133
- } else {
134
- console.log(err);
135
- }
136
- }
137
- process.exit(1);
138
- }
139
-
140
- function basicAuthMiddleware(user,pass) {
141
- var basicAuth = require('basic-auth');
142
- var checkPassword;
143
- var localCachedPassword;
144
- if (pass.length == "32") {
145
- // Assume its a legacy md5 password
146
- checkPassword = function(p) {
147
- return crypto.createHash('md5').update(p,'utf8').digest('hex') === pass;
148
- }
149
- } else {
150
- checkPassword = function(p) {
151
- return bcrypt.compareSync(p,pass);
152
- }
153
- }
154
-
155
- var checkPasswordAndCache = function(p) {
156
- // For BasicAuth routes we know the password cannot change without
157
- // a restart of Node-RED. This means we can cache the provided crypted
158
- // version to save recalculating each time.
159
- if (localCachedPassword === p) {
160
- return true;
161
- }
162
- var result = checkPassword(p);
163
- if (result) {
164
- localCachedPassword = p;
165
- }
166
- return result;
167
- }
168
-
169
- return function(req,res,next) {
170
- if (req.method === 'OPTIONS') {
171
- return next();
172
- }
173
- var requestUser = basicAuth(req);
174
- if (!requestUser || requestUser.name !== user || !checkPasswordAndCache(requestUser.pass)) {
175
- res.set('WWW-Authenticate', 'Basic realm="Authorization Required"');
176
- return res.sendStatus(401);
177
- }
178
- next();
179
- }
180
- }
181
-
182
- if (settings.httpAdminRoot !== false && settings.httpAdminAuth) {
183
- RED.log.warn(RED.log._("server.httpadminauth-deprecated"));
184
- app.use(settings.httpAdminRoot, basicAuthMiddleware(settings.httpAdminAuth.user,settings.httpAdminAuth.pass));
185
- }
186
-
187
- if (settings.httpAdminRoot !== false) {
188
- app.use(settings.httpAdminRoot,RED.httpAdmin);
189
- }
190
- if (settings.httpNodeRoot !== false && settings.httpNodeAuth) {
191
- app.use(settings.httpNodeRoot,basicAuthMiddleware(settings.httpNodeAuth.user,settings.httpNodeAuth.pass));
192
- }
193
- if (settings.httpNodeRoot !== false) {
194
- app.use(settings.httpNodeRoot,RED.httpNode);
195
- }
196
- if (settings.httpStatic) {
197
- settings.httpStaticAuth = settings.httpStaticAuth || settings.httpAuth;
198
- if (settings.httpStaticAuth) {
199
- app.use("/",basicAuthMiddleware(settings.httpStaticAuth.user,settings.httpStaticAuth.pass));
200
- }
201
- app.use("/",express.static(settings.httpStatic));
202
- }
203
-
204
- function getListenPath() {
205
- var port = settings.serverPort;
206
- if (port === undefined){
207
- port = settings.uiPort;
208
- }
209
-
210
- var listenPath = 'http'+(settings.https?'s':'')+'://'+
211
- (settings.uiHost == '::'?'localhost':(settings.uiHost == '0.0.0.0'?'127.0.0.1':settings.uiHost))+
212
- ':'+port;
213
- if (settings.httpAdminRoot !== false) {
214
- listenPath += settings.httpAdminRoot;
215
- } else if (settings.httpStatic) {
216
- listenPath += "/";
217
- }
218
- return listenPath;
219
- }
220
-
221
- RED.start().then(function() {
222
- if (settings.httpAdminRoot !== false || settings.httpNodeRoot !== false || settings.httpStatic) {
223
- server.on('error', function(err) {
224
- if (err.errno === "EADDRINUSE") {
225
- RED.log.error(RED.log._("server.unable-to-listen", {listenpath:getListenPath()}));
226
- RED.log.error(RED.log._("server.port-in-use"));
227
- } else {
228
- RED.log.error(RED.log._("server.uncaught-exception"));
229
- if (err.stack) {
230
- RED.log.error(err.stack);
231
- } else {
232
- RED.log.error(err);
233
- }
234
- }
235
- process.exit(1);
236
- });
237
-
238
- // Log all the delayed messages, since they can be translated at this point
239
- delayedLogItems.forEach(function (delayedLogItem, index) {
240
- RED.log[delayedLogItem.type](RED.log._(delayedLogItem.id, delayedLogItem.params||{}));
241
- });
242
-
243
- server.listen(settings.uiPort,settings.uiHost,function() {
244
- if (settings.httpAdminRoot === false) {
245
- RED.log.info(RED.log._("server.admin-ui-disabled"));
246
- }
247
- settings.serverPort = server.address().port;
248
- process.title = 'node-red';
249
- RED.log.info(RED.log._("server.now-running", {listenpath:getListenPath()}));
250
- });
251
- } else {
252
- RED.log.info(RED.log._("server.headless-mode"));
253
- }
254
- }).catch(function(err) {
255
- RED.log.error(RED.log._("server.failed-to-start"));
256
- if (err.stack) {
257
- RED.log.error(err.stack);
258
- } else {
259
- RED.log.error(err);
260
- }
261
- });
262
-
263
- process.on('uncaughtException',function(err) {
264
- util.log('[red] Uncaught Exception:');
265
- if (err.stack) {
266
- util.log(err.stack);
267
- } else {
268
- util.log(err);
269
- }
270
- process.exit(1);
271
- });
272
-
273
- var stopping = false;
274
- function exitWhenStopped() {
275
- if (!stopping) {
276
- stopping = true;
277
- RED.stop().then(function() {
278
- process.exit();
279
- });
280
- }
281
- }
282
- process.on('SIGINT', exitWhenStopped);
283
- process.on('SIGTERM', exitWhenStopped);
284
- process.on('SIGHUP', exitWhenStopped);
285
- process.on('SIGUSR2', exitWhenStopped); // for nodemon restart
286
- process.on('SIGBREAK', exitWhenStopped); // for windows ctrl-break
287
- process.on('message', function(m) { // for PM2 under window with --shutdown-with-message
288
- if (m === 'shutdown') { exitWhenStopped() }
289
- });
290
-
291
- }).catch(function(err) {
292
- console.log("Failed to get https settings: " + err);
293
- });
294
- };
@@ -1,13 +0,0 @@
1
- const express = require('express');
2
-
3
- module.exports = function (app) {
4
- const router = express.Router();
5
-
6
- router.get('/', function (req, res, next) {
7
- res.json({
8
- status: 'UP'
9
- });
10
- });
11
-
12
- app.use('/health', router);
13
- }
@@ -1,121 +0,0 @@
1
- /**
2
- * Copyright 2014, 2019 IBM Corp.
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- **/
16
-
17
- var path = require("path");
18
- var util = require("util");
19
- var fs = require("fs");
20
-
21
- const mongoUrl = process.env.MONGO_URL;
22
-
23
- const REGEX_LEADING_ALPHA = /^[^a-zA-Z]*/;
24
- const REGEX_ALPHA_NUM = /[^a-zA-Z0-9]/g;
25
-
26
- // function _sanitizeAppName(name) {
27
- // name = name || 'node-red';
28
- // return name.toLowerCase().replace(REGEX_LEADING_ALPHA, '').replace(REGEX_ALPHA_NUM, '');
29
- // }
30
-
31
- // var dbName = _sanitizeAppName(process.env.NODE_RED_STORAGE_DB_NAME || "nodered");
32
-
33
- var userDir = process.env.NODE_RED_STORAGE_USER_DIR || path.join(__dirname, ".node-red");
34
- // Ensure userDir exists - something that is normally taken care of by
35
- // localfilesystem storage when running locally
36
- if (!fs.existsSync(userDir)) fs.mkdirSync(userDir);
37
- if (!fs.existsSync(path.join(userDir, "node_modules"))) fs.mkdirSync(path.join(userDir, "node_modules"));
38
-
39
- var settings = module.exports = {
40
- uiPort: process.env.PORT || 1880,
41
- mqttReconnectTime: 15000,
42
- debugMaxLength: 1000,
43
-
44
- //Flag for enabling Appmetrics dashboard (https://github.com/RuntimeTools/appmetrics-dash)
45
- useAppmetrics: false,
46
-
47
- userDir: userDir,
48
-
49
- flowFile: path.join('..', 'flows', `${process.env.NODE_RED_STORAGE_APP_NAME || "nodered"}.json`),
50
-
51
- // Add the bluemix-specific nodes in
52
- nodesDir: path.join(__dirname, "nodes"),
53
-
54
- // Blacklist the non-bluemix friendly nodes
55
- nodesExcludes: ['90-exec.js', '28-tail.js', '10-file.js', '23-watch.js'],
56
-
57
- // Enable module reinstalls on start-up; this ensures modules installed
58
- // post-deploy are restored after a restage
59
- autoInstallModules: true,
60
-
61
- // Move the admin UI
62
- httpAdminRoot: '/red',
63
-
64
- // Serve up the welcome page
65
- httpStatic: path.join(__dirname, "public"),
66
-
67
- functionGlobalContext: {
68
- lodash: require('lodash'),
69
- moment: require('moment'),
70
- validator: require('validator')
71
- },
72
-
73
- // Configure the logging output
74
- logging: {
75
- // Only console logging is currently supported
76
- console: {
77
- // Level of logging to be recorded. Options are:
78
- // fatal - only those errors which make the application unusable should be recorded
79
- // error - record errors which are deemed fatal for a particular request + fatal errors
80
- // warn - record problems which are non fatal + errors + fatal errors
81
- // info - record information about the general running of the application + warn + error + fatal errors
82
- // debug - record information which is more verbose than info + info + warn + error + fatal errors
83
- // trace - record very detailed logging + debug + info + warn + error + fatal errors
84
- // off - turn off all logging (doesn't affect metrics or audit)
85
- level: "info",
86
- // Whether or not to include metric events in the log output
87
- metrics: false,
88
- // Whether or not to include audit events in the log output
89
- audit: true
90
- }
91
- },
92
-
93
- editorTheme: {
94
- page: {
95
- title: "Flow Builder",
96
- favicon: path.join(__dirname, "public", "favicon.ico"),
97
- css: "",
98
- scripts: []
99
- },
100
- header: {
101
- title: "Flow Builder",
102
- image: path.join(__dirname, "public", "steedos.png"),
103
- // url: "https://www.steedos.com" // optional url to make the header text/image a link to this url
104
- },
105
- }
106
- };
107
-
108
- if (!mongoUrl) {
109
- util.log("Failed to find the env MONGO_URL");
110
- util.log("Falling back to local filesystem storage. Changes will *not* be saved across application restarts.");
111
- } else {
112
- // Set the Cloudant storage module settings
113
- settings.mongodbSettings = {
114
- // The name of the service instance to use.
115
- mongoURI: process.env.MONGO_URL,
116
- // The prefix for all document names stored by this instance.
117
- appname: process.env.NODE_RED_STORAGE_APP_NAME || "nodered"
118
- }
119
- util.log("Using mongodb storage: " + settings.mongodbSettings.mongoURI + " appname:" + settings.mongodbSettings.appname);
120
- settings.storageModule = require('@steedos/node-red-contrib-mongodb-storage')
121
- }
@@ -1,19 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-03-31 15:20:09
4
- * @Description: 社区版, 开源、免费
5
- */
6
- module.exports = {
7
- name: "community-server",
8
- namespace: "steedos",
9
- async created() {
10
- // 启动 元数据服务
11
- this.broker.createService(require("@steedos/service-metadata-server"));
12
- // 启动 加载软件包服务
13
- this.broker.createService(require("@steedos/service-package-registry"));
14
- // 启动 登录页面服务
15
- this.broker.createService(require("@steedos/webapp-accounts"));
16
- // 启动 meteor服务
17
- this.broker.createService(require("@steedos/service-steedos-server"));
18
- }
19
- }
@@ -1,26 +0,0 @@
1
- /*
2
- * @Author: baozhoutao@steedos.com
3
- * @Date: 2022-03-31 15:20:09
4
- * @Description: 企业版, 请联系官方购买: https://www.steedos.cn
5
- */
6
-
7
- module.exports = {
8
- name: "community-server",
9
- namespace: "steedos",
10
- async created() {
11
- // 启动 元数据服务
12
- this.broker.createService(require("@steedos/service-metadata-server"));
13
- // 启动 加载软件包服务
14
- this.broker.createService(require("@steedos/service-package-registry"));
15
- // 启动 登录页面服务
16
- this.broker.createService(require("@steedos/webapp-accounts"));
17
- // 启动 meteor服务
18
- this.broker.createService(require("@steedos/service-steedos-server"));
19
- // 启动 sidecar服务: steedos services 跨语言访问
20
- // this.broker.createService(require("@steedos/service-sidecar"));
21
- // 启动 amis服务: 给page提供amis渲染器
22
- this.broker.createService(require("@steedos/service-plugin-amis"));
23
- // 许可证服务
24
- this.broker.createService(require("@steedos/ee_service-plugin-license"));
25
- }
26
- }
@@ -1,7 +0,0 @@
1
- const SidecarService = require("@steedos/service-sidecar");
2
-
3
- module.exports = {
4
- name: "$sidecar",
5
- namespace: "steedos",
6
- mixins: [SidecarService],
7
- }
@@ -1,5 +0,0 @@
1
- ## 默认开发目录
2
-
3
- ## 关于 .gitkeep
4
- git无法提交一个空的文件夹,当用户需要提交一个空的文件夹的时候,按照惯例,会把一个称为.gitkeep的文件放在这些文件夹里。
5
- 如果空文件夹中有其他文件时,可以删除.gitkeep文件
@@ -1,9 +0,0 @@
1
- {
2
- "name": "steedos-app-default",
3
- "version": "1.0.0",
4
- "description": "A Steedos App",
5
- "main": "package.service.js",
6
- "license": "MIT",
7
- "private": true,
8
- "scripts": {}
9
- }
@@ -1,24 +0,0 @@
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
- })();
@@ -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,74 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- /* Visit https://aka.ms/tsconfig.json to read more about this file */
4
-
5
- /* Basic Options */
6
- // "incremental": true, /* Enable incremental compilation */
7
- "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */
8
- "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
9
- // "lib": [], /* Specify library files to be included in the compilation. */
10
- // "allowJs": true, /* Allow javascript files to be compiled. */
11
- // "checkJs": true, /* Report errors in .js files. */
12
- // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */
13
- // "declaration": true, /* Generates corresponding '.d.ts' file. */
14
- // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
15
- // "sourceMap": true, /* Generates corresponding '.map' file. */
16
- // "outFile": "./", /* Concatenate and emit output to single file. */
17
- // "outDir": "./", /* Redirect output structure to the directory. */
18
- // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
19
- // "composite": true, /* Enable project compilation */
20
- // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
21
- // "removeComments": true, /* Do not emit comments to output. */
22
- // "noEmit": true, /* Do not emit outputs. */
23
- // "importHelpers": true, /* Import emit helpers from 'tslib'. */
24
- // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
25
- // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
26
-
27
- /* Strict Type-Checking Options */
28
- "strict": true, /* Enable all strict type-checking options. */
29
- // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
30
- // "strictNullChecks": true, /* Enable strict null checks. */
31
- // "strictFunctionTypes": true, /* Enable strict checking of function types. */
32
- // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
33
- // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
34
- // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
35
- // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
36
-
37
- /* Additional Checks */
38
- // "noUnusedLocals": true, /* Report errors on unused locals. */
39
- // "noUnusedParameters": true, /* Report errors on unused parameters. */
40
- // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
41
- // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
42
- // "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
43
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an 'override' modifier. */
44
- // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
45
-
46
- /* Module Resolution Options */
47
- // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
48
- // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
49
- // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
50
- "rootDirs": [
51
- "./main/default/routes/task"
52
- ], /* List of root folders whose combined content represents the structure of the project at runtime. */
53
- // "typeRoots": [], /* List of folders to include type definitions from. */
54
- // "types": [], /* Type declaration files to be included in compilation. */
55
- // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
56
- "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
57
- // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
58
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
59
-
60
- /* Source Map Options */
61
- // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
62
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
63
- // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
64
- // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
65
-
66
- /* Experimental Options */
67
- // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
68
- // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
69
-
70
- /* Advanced Options */
71
- "skipLibCheck": true, /* Skip type checking of declaration files. */
72
- "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
73
- }
74
- }