@budibase/server 2.0.34-alpha.5 → 2.0.34-alpha.7
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/__mocks__/node-fetch.ts +12 -2
- package/builder/assets/{index.33bdfd8f.js → index.ffeaa56c.js} +1 -1
- package/builder/index.html +1 -1
- package/coverage/clover.xml +426 -496
- package/coverage/coverage-final.json +47 -49
- package/coverage/lcov-report/api/controllers/apikeys.js.html +6 -6
- package/coverage/lcov-report/api/controllers/automation.js.html +1 -1
- package/coverage/lcov-report/api/controllers/cloud.js.html +13 -13
- package/coverage/lcov-report/api/controllers/datasource.js.html +1 -1
- package/coverage/lcov-report/api/controllers/dev.js.html +20 -20
- package/coverage/lcov-report/api/controllers/index.html +9 -24
- package/coverage/lcov-report/api/controllers/integration.js.html +4 -4
- package/coverage/lcov-report/api/controllers/layout.js.html +1 -1
- package/coverage/lcov-report/api/controllers/metadata.js.html +9 -9
- package/coverage/lcov-report/api/controllers/migrations.js.html +4 -4
- package/coverage/lcov-report/api/controllers/permission.js.html +1 -1
- package/coverage/lcov-report/api/controllers/query/index.html +1 -1
- package/coverage/lcov-report/api/controllers/query/validation.js.html +4 -4
- package/coverage/lcov-report/api/controllers/role.js.html +1 -1
- package/coverage/lcov-report/api/controllers/routing.js.html +9 -9
- package/coverage/lcov-report/api/controllers/row/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/index.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internal.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/internalSearch.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/staticFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/row/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/script.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/bulkFormula.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/external.js.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.html +1 -1
- package/coverage/lcov-report/api/controllers/table/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/templates.js.html +6 -6
- package/coverage/lcov-report/api/controllers/user.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/exporters.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.html +1 -1
- package/coverage/lcov-report/api/controllers/view/index.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/utils.js.html +1 -1
- package/coverage/lcov-report/api/controllers/view/viewBuilder.js.html +1 -1
- package/coverage/lcov-report/api/index.html +1 -1
- package/coverage/lcov-report/api/index.js.html +26 -26
- package/coverage/lcov-report/api/routes/analytics.js.html +7 -7
- package/coverage/lcov-report/api/routes/apikeys.js.html +8 -8
- package/coverage/lcov-report/api/routes/automation.js.html +11 -11
- package/coverage/lcov-report/api/routes/cloud.js.html +8 -8
- package/coverage/lcov-report/api/routes/component.js.html +8 -8
- package/coverage/lcov-report/api/routes/datasource.js.html +9 -9
- package/coverage/lcov-report/api/routes/deploy.js.html +8 -8
- package/coverage/lcov-report/api/routes/dev.js.html +13 -13
- package/coverage/lcov-report/api/routes/index.html +5 -20
- package/coverage/lcov-report/api/routes/integration.js.html +8 -8
- package/coverage/lcov-report/api/routes/layout.js.html +8 -8
- package/coverage/lcov-report/api/routes/metadata.js.html +9 -9
- package/coverage/lcov-report/api/routes/migrations.js.html +7 -7
- package/coverage/lcov-report/api/routes/permission.js.html +9 -9
- package/coverage/lcov-report/api/routes/query.js.html +10 -10
- package/coverage/lcov-report/api/routes/role.js.html +9 -9
- package/coverage/lcov-report/api/routes/routing.js.html +8 -8
- package/coverage/lcov-report/api/routes/screen.js.html +9 -9
- package/coverage/lcov-report/api/routes/script.js.html +1 -1
- package/coverage/lcov-report/api/routes/table.js.html +10 -10
- package/coverage/lcov-report/api/routes/templates.js.html +8 -8
- package/coverage/lcov-report/api/routes/user.js.html +8 -8
- package/coverage/lcov-report/api/routes/utils/index.html +1 -1
- package/coverage/lcov-report/api/routes/utils/validators.js.html +45 -45
- package/coverage/lcov-report/api/routes/view.js.html +10 -10
- package/coverage/lcov-report/automations/actions.js.html +1 -1
- package/coverage/lcov-report/automations/automationUtils.js.html +1 -1
- package/coverage/lcov-report/automations/bullboard.js.html +25 -10
- package/coverage/lcov-report/automations/index.html +16 -16
- package/coverage/lcov-report/automations/index.js.html +4 -4
- package/coverage/lcov-report/automations/steps/bash.js.html +1 -1
- package/coverage/lcov-report/automations/steps/delay.js.html +1 -1
- package/coverage/lcov-report/automations/steps/discord.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeQuery.js.html +1 -1
- package/coverage/lcov-report/automations/steps/executeScript.js.html +1 -1
- package/coverage/lcov-report/automations/steps/filter.js.html +1 -1
- package/coverage/lcov-report/automations/steps/index.html +1 -1
- package/coverage/lcov-report/automations/steps/integromat.js.html +1 -1
- package/coverage/lcov-report/automations/steps/loop.js.html +1 -1
- package/coverage/lcov-report/automations/steps/outgoingWebhook.js.html +1 -1
- package/coverage/lcov-report/automations/steps/queryRows.js.html +1 -1
- package/coverage/lcov-report/automations/steps/sendSmtpEmail.js.html +1 -1
- package/coverage/lcov-report/automations/steps/serverLog.js.html +1 -1
- package/coverage/lcov-report/automations/steps/slack.js.html +1 -1
- package/coverage/lcov-report/automations/steps/updateRow.js.html +1 -1
- package/coverage/lcov-report/automations/steps/utils.js.html +1 -1
- package/coverage/lcov-report/automations/steps/zapier.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/app.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/cron.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/index.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowDeleted.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowSaved.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/rowUpdated.js.html +1 -1
- package/coverage/lcov-report/automations/triggerInfo/webhook.js.html +1 -1
- package/coverage/lcov-report/automations/triggers.js.html +23 -23
- package/coverage/lcov-report/constants/index.html +5 -5
- package/coverage/lcov-report/constants/index.js.html +4 -16
- package/coverage/lcov-report/constants/layouts.js.html +1 -1
- package/coverage/lcov-report/constants/screens.js.html +1 -1
- package/coverage/lcov-report/db/inMemoryView.js.html +1 -1
- package/coverage/lcov-report/db/index.html +1 -1
- package/coverage/lcov-report/db/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/LinkController.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.html +1 -1
- package/coverage/lcov-report/db/linkedRows/index.js.html +1 -1
- package/coverage/lcov-report/db/linkedRows/linkUtils.js.html +1 -1
- package/coverage/lcov-report/db/newid.js.html +1 -1
- package/coverage/lcov-report/db/utils.js.html +2 -2
- package/coverage/lcov-report/events/AutomationEmitter.js.html +1 -1
- package/coverage/lcov-report/events/index.html +1 -1
- package/coverage/lcov-report/events/index.js.html +2 -2
- package/coverage/lcov-report/events/utils.js.html +1 -1
- package/coverage/lcov-report/index.html +45 -45
- package/coverage/lcov-report/integrations/tests/TestConfiguration.js.html +1 -1
- package/coverage/lcov-report/integrations/tests/index.html +1 -1
- package/coverage/lcov-report/middleware/appInfo.js.html +5 -5
- package/coverage/lcov-report/middleware/builder.js.html +9 -9
- package/coverage/lcov-report/middleware/currentapp.js.html +14 -14
- package/coverage/lcov-report/middleware/index.html +1 -1
- package/coverage/lcov-report/middleware/joi-validator.js.html +1 -1
- package/coverage/lcov-report/middleware/publicApi.js.html +5 -5
- package/coverage/lcov-report/middleware/resourceId.js.html +22 -22
- package/coverage/lcov-report/middleware/selfhost.js.html +1 -1
- package/coverage/lcov-report/middleware/utils.js.html +3 -3
- package/coverage/lcov-report/utilities/budibaseDir.js.html +1 -1
- package/coverage/lcov-report/utilities/centralPath.js.html +1 -1
- package/coverage/lcov-report/utilities/csvParser.js.html +1 -1
- package/coverage/lcov-report/utilities/global.js.html +1 -1
- package/coverage/lcov-report/utilities/index.html +20 -20
- package/coverage/lcov-report/utilities/index.js.html +2 -2
- package/coverage/lcov-report/utilities/plugins.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/inMemoryQueue.js.html +1 -1
- package/coverage/lcov-report/utilities/queue/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.html +1 -1
- package/coverage/lcov-report/utilities/routing/index.js.html +6 -6
- package/coverage/lcov-report/utilities/rowProcessor/index.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/index.js.html +1 -1
- package/coverage/lcov-report/utilities/rowProcessor/utils.js.html +1 -1
- package/coverage/lcov-report/utilities/scriptRunner.js.html +1 -1
- package/coverage/lcov-report/utilities/security.js.html +1 -1
- package/coverage/lcov-report/utilities/statusCodes.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/index.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/rows.js.html +1 -1
- package/coverage/lcov-report/utilities/usageQuota/usageQuoteReset.js.html +1 -1
- package/coverage/lcov-report/utilities/users.js.html +1 -1
- package/coverage/lcov-report/utilities/workerRequests.js.html +46 -46
- package/coverage/lcov.info +492 -596
- package/dist/api/controllers/webhook.js +88 -89
- package/dist/api/routes/utils/validators.js +2 -2
- package/dist/api/routes/webhook.js +39 -11
- package/dist/app.js +2 -84
- package/dist/automations/bullboard.js +7 -2
- package/dist/automations/utils.js +5 -37
- package/dist/constants/index.js +0 -3
- package/dist/package.json +6 -6
- package/dist/sdk/app/automations/index.js +29 -0
- package/dist/sdk/app/automations/webhook.js +54 -0
- package/dist/sdk/app/backups/imports.js +24 -0
- package/dist/sdk/index.js +2 -0
- package/dist/startup.js +152 -0
- package/dist/tests/utilities/TestConfiguration.js +8 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/api/controllers/{webhook.js → webhook.ts} +33 -48
- package/src/api/routes/utils/validators.js +2 -2
- package/src/api/routes/{webhook.js → webhook.ts} +7 -6
- package/src/app.ts +3 -108
- package/src/automations/bullboard.js +6 -1
- package/src/automations/utils.ts +12 -20
- package/src/constants/index.js +0 -4
- package/src/definitions/automations.ts +1 -6
- package/src/migrations/functions/tests/syncQuotas.spec.js +1 -3
- package/src/migrations/functions/tests/userEmailViewCasing.spec.js +6 -4
- package/src/sdk/app/automations/index.ts +5 -0
- package/src/sdk/app/automations/webhook.ts +43 -0
- package/src/sdk/app/backups/imports.ts +39 -5
- package/src/sdk/index.ts +2 -0
- package/src/startup.ts +138 -0
- package/src/tests/utilities/TestConfiguration.js +7 -0
- package/coverage/lcov-report/api/controllers/webhook.js.html +0 -424
- package/coverage/lcov-report/api/routes/webhook.js.html +0 -163
package/dist/sdk/index.js
CHANGED
|
@@ -5,9 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
const backups_1 = __importDefault(require("./app/backups"));
|
|
7
7
|
const tables_1 = __importDefault(require("./app/tables"));
|
|
8
|
+
const automations_1 = __importDefault(require("./app/automations"));
|
|
8
9
|
const sdk = {
|
|
9
10
|
backups: backups_1.default,
|
|
10
11
|
tables: tables_1.default,
|
|
12
|
+
automations: automations_1.default,
|
|
11
13
|
};
|
|
12
14
|
// default export for TS
|
|
13
15
|
exports.default = sdk;
|
package/dist/startup.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
26
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
27
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
28
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
29
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
30
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
31
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
35
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
36
|
+
};
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.startup = void 0;
|
|
39
|
+
const env = __importStar(require("./environment"));
|
|
40
|
+
const redis_1 = __importDefault(require("./utilities/redis"));
|
|
41
|
+
const workerRequests_1 = require("./utilities/workerRequests");
|
|
42
|
+
const backend_core_1 = require("@budibase/backend-core");
|
|
43
|
+
const fs_1 = __importDefault(require("fs"));
|
|
44
|
+
const watch_1 = require("./watch");
|
|
45
|
+
const automations_1 = __importDefault(require("./automations"));
|
|
46
|
+
const fileSystem_1 = __importDefault(require("./utilities/fileSystem"));
|
|
47
|
+
const events_1 = __importDefault(require("./events"));
|
|
48
|
+
const migrations = __importStar(require("./migrations"));
|
|
49
|
+
const bullboard_1 = __importDefault(require("./automations/bullboard"));
|
|
50
|
+
const pro = __importStar(require("../../../../budibase-pro/packages/pro"));
|
|
51
|
+
const api_1 = __importDefault(require("./api"));
|
|
52
|
+
const sdk_1 = __importDefault(require("./sdk"));
|
|
53
|
+
const pino = require("koa-pino-logger");
|
|
54
|
+
let STARTUP_RAN = false;
|
|
55
|
+
function initRoutes(app) {
|
|
56
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
app.use(pino((0, backend_core_1.pinoSettings)()));
|
|
58
|
+
if (!env.isTest()) {
|
|
59
|
+
const plugin = yield bullboard_1.default.init();
|
|
60
|
+
app.use(plugin);
|
|
61
|
+
}
|
|
62
|
+
app.context.eventEmitter = events_1.default;
|
|
63
|
+
app.context.auth = {};
|
|
64
|
+
// api routes
|
|
65
|
+
app.use(api_1.default.router.routes());
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function initPro() {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
yield pro.init({
|
|
71
|
+
backups: {
|
|
72
|
+
processing: {
|
|
73
|
+
exportAppFn: sdk_1.default.backups.exportApp,
|
|
74
|
+
importAppFn: sdk_1.default.backups.importApp,
|
|
75
|
+
statsFn: sdk_1.default.backups.calculateBackupStats,
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function shutdown(server) {
|
|
82
|
+
server.close();
|
|
83
|
+
server.destroy();
|
|
84
|
+
}
|
|
85
|
+
function startup(app, server) {
|
|
86
|
+
var _a;
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
if (STARTUP_RAN) {
|
|
89
|
+
return;
|
|
90
|
+
}
|
|
91
|
+
STARTUP_RAN = true;
|
|
92
|
+
if (server) {
|
|
93
|
+
console.log(`Budibase running on ${JSON.stringify(server.address())}`);
|
|
94
|
+
env._set("PORT", server.address().port);
|
|
95
|
+
}
|
|
96
|
+
events_1.default.emitPort(env.PORT);
|
|
97
|
+
fileSystem_1.default.init();
|
|
98
|
+
yield redis_1.default.init();
|
|
99
|
+
// run migrations on startup if not done via http
|
|
100
|
+
// not recommended in a clustered environment
|
|
101
|
+
if (!env.HTTP_MIGRATIONS && !env.isTest()) {
|
|
102
|
+
try {
|
|
103
|
+
yield migrations.migrate();
|
|
104
|
+
}
|
|
105
|
+
catch (e) {
|
|
106
|
+
backend_core_1.logging.logAlert("Error performing migrations. Exiting.", e);
|
|
107
|
+
shutdown();
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
// check and create admin user if required
|
|
111
|
+
if (env.SELF_HOSTED &&
|
|
112
|
+
!env.MULTI_TENANCY &&
|
|
113
|
+
env.BB_ADMIN_USER_EMAIL &&
|
|
114
|
+
env.BB_ADMIN_USER_PASSWORD) {
|
|
115
|
+
const checklist = yield (0, workerRequests_1.getChecklist)();
|
|
116
|
+
if (!((_a = checklist === null || checklist === void 0 ? void 0 : checklist.adminUser) === null || _a === void 0 ? void 0 : _a.checked)) {
|
|
117
|
+
try {
|
|
118
|
+
const tenantId = backend_core_1.tenancy.getTenantId();
|
|
119
|
+
const user = yield (0, workerRequests_1.createAdminUser)(env.BB_ADMIN_USER_EMAIL, env.BB_ADMIN_USER_PASSWORD, tenantId);
|
|
120
|
+
// Need to set up an API key for automated integration tests
|
|
121
|
+
if (env.isTest()) {
|
|
122
|
+
yield (0, workerRequests_1.generateApiKey)(user._id);
|
|
123
|
+
}
|
|
124
|
+
console.log("Admin account automatically created for", env.BB_ADMIN_USER_EMAIL);
|
|
125
|
+
}
|
|
126
|
+
catch (e) {
|
|
127
|
+
backend_core_1.logging.logAlert("Error creating initial admin user. Exiting.", e);
|
|
128
|
+
shutdown();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// monitor plugin directory if required
|
|
133
|
+
if (env.SELF_HOSTED &&
|
|
134
|
+
!env.MULTI_TENANCY &&
|
|
135
|
+
env.PLUGINS_DIR &&
|
|
136
|
+
fs_1.default.existsSync(env.PLUGINS_DIR)) {
|
|
137
|
+
(0, watch_1.watch)();
|
|
138
|
+
}
|
|
139
|
+
// check for version updates
|
|
140
|
+
yield backend_core_1.installation.checkInstallVersion();
|
|
141
|
+
// get the references to the queue promises, don't await as
|
|
142
|
+
// they will never end, unless the processing stops
|
|
143
|
+
let queuePromises = [];
|
|
144
|
+
queuePromises.push(automations_1.default.init());
|
|
145
|
+
queuePromises.push(initPro());
|
|
146
|
+
if (app) {
|
|
147
|
+
// bring routes online as final step once everything ready
|
|
148
|
+
yield initRoutes(app);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
exports.startup = startup;
|
|
@@ -25,6 +25,7 @@ const context = require("@budibase/backend-core/context");
|
|
|
25
25
|
const { generateDevInfoID, SEPARATOR } = require("@budibase/backend-core/db");
|
|
26
26
|
const { encrypt } = require("@budibase/backend-core/encryption");
|
|
27
27
|
const { DocumentType, generateUserMetadataID } = require("../../db/utils");
|
|
28
|
+
const { startup } = require("../../startup");
|
|
28
29
|
const GLOBAL_USER_ID = "us_uuid1";
|
|
29
30
|
const EMAIL = "babs@babs.com";
|
|
30
31
|
const FIRSTNAME = "Barbara";
|
|
@@ -38,6 +39,10 @@ class TestConfiguration {
|
|
|
38
39
|
this.server = require("../../app");
|
|
39
40
|
// we need the request for logging in, involves cookies, hard to fake
|
|
40
41
|
this.request = supertest(this.server);
|
|
42
|
+
this.started = true;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
this.started = false;
|
|
41
46
|
}
|
|
42
47
|
this.appId = null;
|
|
43
48
|
this.allApps = [];
|
|
@@ -87,6 +92,9 @@ class TestConfiguration {
|
|
|
87
92
|
// use a new id as the name to avoid name collisions
|
|
88
93
|
init(appName = newid()) {
|
|
89
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
+
if (!this.started) {
|
|
96
|
+
yield startup();
|
|
97
|
+
}
|
|
90
98
|
this.user = yield this.globalUser();
|
|
91
99
|
this.globalUserId = this.user._id;
|
|
92
100
|
this.userMetadataId = generateUserMetadataID(this.globalUserId);
|