@factorialco/fcode-cli 1.1.0
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/README.md +1021 -0
- package/bin/dev +17 -0
- package/bin/dev.cmd +3 -0
- package/bin/run +7 -0
- package/bin/run.cmd +3 -0
- package/dist/commands/add.d.ts +6 -0
- package/dist/commands/add.js +22 -0
- package/dist/commands/clone.d.ts +26 -0
- package/dist/commands/clone.js +177 -0
- package/dist/commands/dependencies/add.d.ts +9 -0
- package/dist/commands/dependencies/add.js +13 -0
- package/dist/commands/dependencies/install.d.ts +14 -0
- package/dist/commands/dependencies/install.js +44 -0
- package/dist/commands/dependencies/pull.d.ts +12 -0
- package/dist/commands/dependencies/pull.js +14 -0
- package/dist/commands/dependencies/push.d.ts +12 -0
- package/dist/commands/dependencies/push.js +14 -0
- package/dist/commands/dependencies/reset.d.ts +9 -0
- package/dist/commands/dependencies/reset.js +13 -0
- package/dist/commands/dependencies/status.d.ts +9 -0
- package/dist/commands/dependencies/status.js +13 -0
- package/dist/commands/http.d.ts +22 -0
- package/dist/commands/http.js +272 -0
- package/dist/commands/login.d.ts +18 -0
- package/dist/commands/login.js +62 -0
- package/dist/commands/logout.d.ts +10 -0
- package/dist/commands/logout.js +34 -0
- package/dist/commands/modules/add.d.ts +9 -0
- package/dist/commands/modules/add.js +13 -0
- package/dist/commands/modules/pull.d.ts +13 -0
- package/dist/commands/modules/pull.js +43 -0
- package/dist/commands/modules/push.d.ts +13 -0
- package/dist/commands/modules/push.js +35 -0
- package/dist/commands/modules/remove.d.ts +9 -0
- package/dist/commands/modules/remove.js +19 -0
- package/dist/commands/modules/reset.d.ts +9 -0
- package/dist/commands/modules/reset.js +13 -0
- package/dist/commands/modules/status.d.ts +11 -0
- package/dist/commands/modules/status.js +40 -0
- package/dist/commands/pre-debug.d.ts +20 -0
- package/dist/commands/pre-debug.js +120 -0
- package/dist/commands/process-metadata.d.ts +18 -0
- package/dist/commands/process-metadata.js +63 -0
- package/dist/commands/processes/add.d.ts +9 -0
- package/dist/commands/processes/add.js +13 -0
- package/dist/commands/processes/install-dependencies.d.ts +14 -0
- package/dist/commands/processes/install-dependencies.js +30 -0
- package/dist/commands/processes/pull.d.ts +13 -0
- package/dist/commands/processes/pull.js +47 -0
- package/dist/commands/processes/push.d.ts +13 -0
- package/dist/commands/processes/push.js +39 -0
- package/dist/commands/processes/remove.d.ts +9 -0
- package/dist/commands/processes/remove.js +19 -0
- package/dist/commands/processes/reset.d.ts +9 -0
- package/dist/commands/processes/reset.js +13 -0
- package/dist/commands/processes/status.d.ts +11 -0
- package/dist/commands/processes/status.js +58 -0
- package/dist/commands/pull.d.ts +9 -0
- package/dist/commands/pull.js +32 -0
- package/dist/commands/push.d.ts +9 -0
- package/dist/commands/push.js +29 -0
- package/dist/commands/remote/add.d.ts +10 -0
- package/dist/commands/remote/add.js +32 -0
- package/dist/commands/remote/list.d.ts +7 -0
- package/dist/commands/remote/list.js +33 -0
- package/dist/commands/remote/set.d.ts +10 -0
- package/dist/commands/remote/set.js +28 -0
- package/dist/commands/reset.d.ts +6 -0
- package/dist/commands/reset.js +19 -0
- package/dist/commands/run.d.ts +16 -0
- package/dist/commands/run.js +56 -0
- package/dist/commands/runtime-env.d.ts +12 -0
- package/dist/commands/runtime-env.js +42 -0
- package/dist/commands/settings/get.d.ts +12 -0
- package/dist/commands/settings/get.js +67 -0
- package/dist/commands/settings/remove.d.ts +9 -0
- package/dist/commands/settings/remove.js +35 -0
- package/dist/commands/settings/set.d.ts +10 -0
- package/dist/commands/settings/set.js +39 -0
- package/dist/commands/setup-debug.d.ts +12 -0
- package/dist/commands/setup-debug.js +118 -0
- package/dist/commands/status.d.ts +6 -0
- package/dist/commands/status.js +22 -0
- package/dist/commands/team/pull.d.ts +8 -0
- package/dist/commands/team/pull.js +23 -0
- package/dist/commands/team/push.d.ts +11 -0
- package/dist/commands/team/push.js +41 -0
- package/dist/commands/team/status.d.ts +8 -0
- package/dist/commands/team/status.js +40 -0
- package/dist/commands/test/scaffold.d.ts +9 -0
- package/dist/commands/test/scaffold.js +61 -0
- package/dist/commands/test.d.ts +13 -0
- package/dist/commands/test.js +72 -0
- package/dist/commands/variables/add.d.ts +12 -0
- package/dist/commands/variables/add.js +21 -0
- package/dist/commands/variables/pull.d.ts +12 -0
- package/dist/commands/variables/pull.js +14 -0
- package/dist/commands/variables/push.d.ts +12 -0
- package/dist/commands/variables/push.js +14 -0
- package/dist/commands/variables/remove.d.ts +9 -0
- package/dist/commands/variables/remove.js +19 -0
- package/dist/commands/variables/reset.d.ts +9 -0
- package/dist/commands/variables/reset.js +13 -0
- package/dist/commands/variables/status.d.ts +12 -0
- package/dist/commands/variables/status.js +58 -0
- package/dist/config/global.d.ts +15 -0
- package/dist/config/global.js +77 -0
- package/dist/config/index.d.ts +14 -0
- package/dist/config/index.js +44 -0
- package/dist/config/remote.d.ts +15 -0
- package/dist/config/remote.js +60 -0
- package/dist/config/settings.d.ts +16 -0
- package/dist/config/settings.js +54 -0
- package/dist/config/workspace.d.ts +28 -0
- package/dist/config/workspace.js +158 -0
- package/dist/core/commands/api-client-command.d.ts +6 -0
- package/dist/core/commands/api-client-command.js +30 -0
- package/dist/core/commands/base-command.d.ts +11 -0
- package/dist/core/commands/base-command.js +61 -0
- package/dist/core/commands/dependency-command.d.ts +5 -0
- package/dist/core/commands/dependency-command.js +16 -0
- package/dist/core/commands/modules-command.d.ts +7 -0
- package/dist/core/commands/modules-command.js +18 -0
- package/dist/core/commands/processes-command.d.ts +8 -0
- package/dist/core/commands/processes-command.js +27 -0
- package/dist/core/commands/resource-command.d.ts +24 -0
- package/dist/core/commands/resource-command.js +92 -0
- package/dist/core/commands/variables-command.d.ts +5 -0
- package/dist/core/commands/variables-command.js +16 -0
- package/dist/core/dependencies/env-dependencies-command.d.ts +19 -0
- package/dist/core/dependencies/env-dependencies-command.js +70 -0
- package/dist/core/dependencies/env-process-dependencies-command.d.ts +15 -0
- package/dist/core/dependencies/env-process-dependencies-command.js +78 -0
- package/dist/core/dependencies/javascript-env-dependencies.d.ts +8 -0
- package/dist/core/dependencies/javascript-env-dependencies.js +77 -0
- package/dist/core/dependencies/python-env-dependencies.d.ts +9 -0
- package/dist/core/dependencies/python-env-dependencies.js +91 -0
- package/dist/core/errors.d.ts +55 -0
- package/dist/core/errors.js +144 -0
- package/dist/core/executors/execution-task.d.ts +29 -0
- package/dist/core/executors/execution-task.js +139 -0
- package/dist/core/executors/javascript-execution-task.d.ts +13 -0
- package/dist/core/executors/javascript-execution-task.js +618 -0
- package/dist/core/executors/python/context.d.ts +2 -0
- package/dist/core/executors/python/context.js +3 -0
- package/dist/core/executors/python/datastore.d.ts +2 -0
- package/dist/core/executors/python/datastore.js +4 -0
- package/dist/core/executors/python-execution-task.d.ts +11 -0
- package/dist/core/executors/python-execution-task.js +173 -0
- package/dist/core/executors/source-code-sanitizer.d.ts +4 -0
- package/dist/core/executors/source-code-sanitizer.js +45 -0
- package/dist/core/resource-merger.d.ts +14 -0
- package/dist/core/resource-merger.js +155 -0
- package/dist/core/resource-pusher.d.ts +12 -0
- package/dist/core/resource-pusher.js +133 -0
- package/dist/core/resource-repository.d.ts +8 -0
- package/dist/core/resource-repository.js +2 -0
- package/dist/core/types.d.ts +290 -0
- package/dist/core/types.js +238 -0
- package/dist/core/utils/dependencies.d.ts +5 -0
- package/dist/core/utils/dependencies.js +82 -0
- package/dist/core/utils/variables.d.ts +4 -0
- package/dist/core/utils/variables.js +10 -0
- package/dist/hooks/init/auth.d.ts +3 -0
- package/dist/hooks/init/auth.js +28 -0
- package/dist/hooks/init/update.d.ts +3 -0
- package/dist/hooks/init/update.js +42 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -0
- package/dist/repositories/process.d.ts +36 -0
- package/dist/repositories/process.js +339 -0
- package/dist/repositories/programming-language-manifest.d.ts +17 -0
- package/dist/repositories/programming-language-manifest.js +95 -0
- package/dist/repositories/resource.d.ts +29 -0
- package/dist/repositories/resource.js +79 -0
- package/dist/repositories/script-library.d.ts +28 -0
- package/dist/repositories/script-library.js +164 -0
- package/dist/repositories/team.d.ts +23 -0
- package/dist/repositories/team.js +74 -0
- package/dist/repositories/variable.d.ts +26 -0
- package/dist/repositories/variable.js +174 -0
- package/dist/runtime/executor.js +87 -0
- package/dist/runtime/executor.py +81 -0
- package/dist/runtime/libs/node/fcode/index.js +1 -0
- package/dist/runtime/libs/python/fcode/__init__.py +75 -0
- package/dist/runtime/libs/python/fcode/context.py +98 -0
- package/dist/runtime/libs/python/fcode/datastore.py +35 -0
- package/dist/runtime/libs/python/fcode/schedule.py +45 -0
- package/dist/runtime/libs/python/fcode/storage.py +271 -0
- package/dist/runtime/libs/python/fcode/variables.py +102 -0
- package/dist/services/auth-service.d.ts +12 -0
- package/dist/services/auth-service.js +114 -0
- package/dist/services/credential-prompter.d.ts +6 -0
- package/dist/services/credential-prompter.js +60 -0
- package/dist/services/fcode-graphql-client.d.ts +45 -0
- package/dist/services/fcode-graphql-client.js +721 -0
- package/dist/services/http-server.d.ts +3 -0
- package/dist/services/http-server.js +17 -0
- package/dist/services/oauth-browser-service.d.ts +9 -0
- package/dist/services/oauth-browser-service.js +164 -0
- package/dist/services/process-parameters-sampler.d.ts +2 -0
- package/dist/services/process-parameters-sampler.js +41 -0
- package/dist/services/process-runner.d.ts +22 -0
- package/dist/services/process-runner.js +97 -0
- package/dist/services/resource-checker.d.ts +8 -0
- package/dist/services/resource-checker.js +82 -0
- package/dist/services/test-runner.d.ts +17 -0
- package/dist/services/test-runner.js +228 -0
- package/dist/utils/canonical-hash.d.ts +9 -0
- package/dist/utils/canonical-hash.js +30 -0
- package/dist/utils/cli/index.d.ts +14 -0
- package/dist/utils/cli/index.js +50 -0
- package/dist/utils/cli/screen.d.ts +2 -0
- package/dist/utils/cli/screen.js +25 -0
- package/dist/utils/cli/styled/table.d.ts +23 -0
- package/dist/utils/cli/styled/table.js +272 -0
- package/dist/utils/colorize-resource.d.ts +1 -0
- package/dist/utils/colorize-resource.js +7 -0
- package/dist/utils/env-utils.d.ts +2 -0
- package/dist/utils/env-utils.js +16 -0
- package/dist/utils/file-utils.d.ts +11 -0
- package/dist/utils/file-utils.js +33 -0
- package/dist/utils/filenamify.d.ts +4 -0
- package/dist/utils/filenamify.js +73 -0
- package/dist/utils/gitignore.d.ts +17 -0
- package/dist/utils/gitignore.js +60 -0
- package/dist/utils/promise.d.ts +4 -0
- package/dist/utils/promise.js +38 -0
- package/dist/utils/url-utils.d.ts +2 -0
- package/dist/utils/url-utils.js +10 -0
- package/dist/utils/variable-warnings.d.ts +8 -0
- package/dist/utils/variable-warnings.js +38 -0
- package/oclif.manifest.json +1783 -0
- package/package.json +129 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const global_1 = require("../../config/global");
|
|
4
|
+
const base_command_1 = require("../../core/commands/base-command");
|
|
5
|
+
const types_1 = require("../../core/types");
|
|
6
|
+
const cli_1 = require("../../utils/cli");
|
|
7
|
+
class RemoteAdd extends base_command_1.default {
|
|
8
|
+
async init() {
|
|
9
|
+
const { args } = await this.parse(RemoteAdd);
|
|
10
|
+
let { url } = (0, global_1.parseTeamOrigin)(args.team || '');
|
|
11
|
+
await super.init(url);
|
|
12
|
+
}
|
|
13
|
+
async run() {
|
|
14
|
+
const { args } = await this.parse(RemoteAdd);
|
|
15
|
+
const slugWithOptionalUrl = args.team || '';
|
|
16
|
+
let { slug, url } = (0, global_1.parseTeamOrigin)(slugWithOptionalUrl);
|
|
17
|
+
// Access is enforced by the platform on pull; the cached group list is only a hint
|
|
18
|
+
// (it goes stale for teams created after login), never a permission gate.
|
|
19
|
+
if (!slug) {
|
|
20
|
+
const userInfo = await new global_1.default().getUserInfo(url);
|
|
21
|
+
cli_1.default.log(`🏢 Your teams: \n\t${(userInfo.groups ?? []).join('\n\t')}`);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
await this.workspaceConfig.setActiveTeam(slugWithOptionalUrl);
|
|
25
|
+
cli_1.default.log(`🌩️ ${slugWithOptionalUrl} team workspace remote added successfully and set as active!\n`);
|
|
26
|
+
cli_1.default.log(`Change active team with command 'fcode remote:set [team]'`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
RemoteAdd.args = types_1.TeamNameArg;
|
|
30
|
+
RemoteAdd.description = 'Add a remote team workspace';
|
|
31
|
+
RemoteAdd.examples = ['$ fcode remote:add'];
|
|
32
|
+
exports.default = RemoteAdd;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const base_command_1 = require("../../core/commands/base-command");
|
|
4
|
+
const cli_1 = require("../../utils/cli");
|
|
5
|
+
const color_1 = require("@oclif/color");
|
|
6
|
+
const workspace_1 = require("../../config/workspace");
|
|
7
|
+
class RemoteList extends base_command_1.default {
|
|
8
|
+
async init() {
|
|
9
|
+
this.workspaceConfig = new workspace_1.default();
|
|
10
|
+
}
|
|
11
|
+
async run() {
|
|
12
|
+
const config = await this.workspaceConfig.getAll();
|
|
13
|
+
const teams = Object.keys(config.teams || {});
|
|
14
|
+
const activeTeam = (await this.workspaceConfig.get('activeTeam')) || '';
|
|
15
|
+
if (teams.length === 0) {
|
|
16
|
+
cli_1.default.log('📋 No remote team workspaces added yet.');
|
|
17
|
+
cli_1.default.log(`Add one with ${color_1.default.cyan('fcode remote:add [team]')}`);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
cli_1.default.log('🏢 Remote team workspaces:\n');
|
|
21
|
+
for (const team of teams) {
|
|
22
|
+
const isActive = team === activeTeam;
|
|
23
|
+
const prefix = isActive ? `${color_1.default.green('*')} ` : ' ';
|
|
24
|
+
const suffix = isActive ? ` ${color_1.default.green('(active)')}` : '';
|
|
25
|
+
cli_1.default.log(`${prefix}${team}${suffix}`);
|
|
26
|
+
}
|
|
27
|
+
cli_1.default.log('');
|
|
28
|
+
cli_1.default.log(`Set active team with ${color_1.default.cyan('fcode remote:set [team]')}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
RemoteList.description = 'List remote team workspaces';
|
|
32
|
+
RemoteList.examples = ['$ fcode remote:list'];
|
|
33
|
+
exports.default = RemoteList;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import BaseCommand from '../../core/commands/base-command';
|
|
2
|
+
export default class RemoteSet extends BaseCommand {
|
|
3
|
+
static args: {
|
|
4
|
+
team: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
init(): Promise<void>;
|
|
9
|
+
run(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const global_1 = require("../../config/global");
|
|
4
|
+
const base_command_1 = require("../../core/commands/base-command");
|
|
5
|
+
const types_1 = require("../../core/types");
|
|
6
|
+
const cli_1 = require("../../utils/cli");
|
|
7
|
+
class RemoteSet extends base_command_1.default {
|
|
8
|
+
async init() {
|
|
9
|
+
const { args } = await this.parse(RemoteSet);
|
|
10
|
+
let { url } = (0, global_1.parseTeamOrigin)(args.team || '');
|
|
11
|
+
await super.init(url);
|
|
12
|
+
}
|
|
13
|
+
async run() {
|
|
14
|
+
const { args } = await this.parse(RemoteSet);
|
|
15
|
+
const slugWithOptionalUrl = args.team || '';
|
|
16
|
+
let { slug } = (0, global_1.parseTeamOrigin)(slugWithOptionalUrl);
|
|
17
|
+
if (!slug) {
|
|
18
|
+
cli_1.default.log(`🏢 Added teams: \n\t${(await this.workspaceConfig.getAddedTeams()).join('\n\t')}`);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
await this.workspaceConfig.setActiveTeam(slugWithOptionalUrl);
|
|
22
|
+
cli_1.default.log(`🔔 ${slugWithOptionalUrl} team workspace remote set as active!\n`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
RemoteSet.args = types_1.TeamNameArg;
|
|
26
|
+
RemoteSet.description = 'Set the active remote team workspace';
|
|
27
|
+
RemoteSet.examples = ['$ fcode remote:set [team]'];
|
|
28
|
+
exports.default = RemoteSet;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const reset_1 = require("./processes/reset");
|
|
5
|
+
const reset_2 = require("./modules/reset");
|
|
6
|
+
const reset_3 = require("./variables/reset");
|
|
7
|
+
const reset_4 = require("./dependencies/reset");
|
|
8
|
+
class Reset extends core_1.Command {
|
|
9
|
+
async run() {
|
|
10
|
+
await this.parse(Reset);
|
|
11
|
+
await reset_1.default.run([]);
|
|
12
|
+
await reset_2.default.run([]);
|
|
13
|
+
await reset_3.default.run([]);
|
|
14
|
+
await reset_4.default.run([]);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
Reset.description = 'Reset team workspace with contents from current remote';
|
|
18
|
+
Reset.examples = ['$ fcode reset'];
|
|
19
|
+
exports.default = Reset;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class Run extends Command {
|
|
3
|
+
static args: {
|
|
4
|
+
slug: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
};
|
|
6
|
+
static description: string;
|
|
7
|
+
static examples: string[];
|
|
8
|
+
static flags: {
|
|
9
|
+
parameters: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
|
+
version: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
logLevel: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
jsonLogs: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
variablesFile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const path = require("node:path");
|
|
5
|
+
const core_2 = require("@oclif/core");
|
|
6
|
+
const process_runner_1 = require("../services/process-runner");
|
|
7
|
+
class Run extends core_2.Command {
|
|
8
|
+
async run() {
|
|
9
|
+
const { args: { slug }, flags: { parameters: parametersFlag, version, logLevel, jsonLogs, variablesFile }, } = await this.parse(Run);
|
|
10
|
+
let parameters;
|
|
11
|
+
if (parametersFlag) {
|
|
12
|
+
try {
|
|
13
|
+
parameters = JSON.parse(parametersFlag);
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
parameters = await Promise.resolve(`${path.resolve(parametersFlag)}`).then(s => require(s));
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
await (0, process_runner_1.runProcess)({ slug, parameters, version, logLevel, jsonLogs, extraVariablesFile: variablesFile });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
Run.args = {
|
|
23
|
+
slug: core_1.Args.string({
|
|
24
|
+
description: 'Process slug',
|
|
25
|
+
name: 'slug',
|
|
26
|
+
required: true,
|
|
27
|
+
}),
|
|
28
|
+
};
|
|
29
|
+
Run.description = 'Run Factorial Code processes locally';
|
|
30
|
+
Run.examples = ['$ fcode run [process-slug]', '$ fcode run --parameters ./parameters.json [process-slug]'];
|
|
31
|
+
Run.flags = {
|
|
32
|
+
parameters: core_1.Flags.string({
|
|
33
|
+
char: 'p',
|
|
34
|
+
description: 'Parameters: stringified JSON or file path',
|
|
35
|
+
}),
|
|
36
|
+
version: core_1.Flags.string({
|
|
37
|
+
char: 'v',
|
|
38
|
+
description: 'Process version',
|
|
39
|
+
}),
|
|
40
|
+
logLevel: core_1.Flags.string({
|
|
41
|
+
char: 'l',
|
|
42
|
+
description: 'Log level to use in process execution',
|
|
43
|
+
default: 'DEBUG',
|
|
44
|
+
options: ['DEBUG', 'INFO', 'WARNING', 'ERROR'],
|
|
45
|
+
}),
|
|
46
|
+
jsonLogs: core_1.Flags.boolean({
|
|
47
|
+
char: 'j',
|
|
48
|
+
description: 'Output process logs as newline-delimited JSON (NDJSON)',
|
|
49
|
+
default: false,
|
|
50
|
+
}),
|
|
51
|
+
variablesFile: core_1.Flags.string({
|
|
52
|
+
char: 'e',
|
|
53
|
+
description: 'Path to a .env file whose variables override workspace variables',
|
|
54
|
+
}),
|
|
55
|
+
};
|
|
56
|
+
exports.default = Run;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
import VariableRepository from '../repositories/variable';
|
|
3
|
+
export default class RuntimeEnv extends Command {
|
|
4
|
+
static readonly hidden = true;
|
|
5
|
+
static readonly args: {
|
|
6
|
+
language: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static readonly description = "Debug preparation for Factorial Code processes locally (without execution)";
|
|
9
|
+
static readonly examples: string[];
|
|
10
|
+
_variableRepository: VariableRepository;
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const path = require("node:path");
|
|
5
|
+
const dependencies_1 = require("../core/utils/dependencies");
|
|
6
|
+
const variable_1 = require("../repositories/variable");
|
|
7
|
+
class RuntimeEnv extends core_1.Command {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this._variableRepository = new variable_1.default();
|
|
11
|
+
}
|
|
12
|
+
async run() {
|
|
13
|
+
const parsed = await this.parse(RuntimeEnv);
|
|
14
|
+
let { args: { language }, } = parsed;
|
|
15
|
+
const variables = await this._variableRepository.findAllForExecution();
|
|
16
|
+
const dependenciesPath = await (0, dependencies_1.getDependenciesPath)(language);
|
|
17
|
+
const libraryPath = path.join(__dirname, '..', 'runtime', 'libs', language === 'PYTHON' ? 'python' : 'node');
|
|
18
|
+
variables.forEach((variable) => {
|
|
19
|
+
console.log(`${variable.key}=${variable.value}`);
|
|
20
|
+
});
|
|
21
|
+
console.log('DEPENDENCIES_PATH=' + dependenciesPath);
|
|
22
|
+
console.log('LIBRARY_PATH=' + libraryPath);
|
|
23
|
+
if (language === 'PYTHON') {
|
|
24
|
+
console.log('PYTHONPATH=' + [dependenciesPath, libraryPath, process.cwd()].join(':'));
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
console.log('NODE_PATH=' + [dependenciesPath, libraryPath, process.cwd()].join(':'));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
RuntimeEnv.hidden = true;
|
|
32
|
+
RuntimeEnv.args = {
|
|
33
|
+
language: core_1.Args.string({
|
|
34
|
+
description: 'Programming language',
|
|
35
|
+
name: 'language',
|
|
36
|
+
required: true,
|
|
37
|
+
options: ['PYTHON', 'JAVASCRIPT'],
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
RuntimeEnv.description = 'Debug preparation for Factorial Code processes locally (without execution)';
|
|
41
|
+
RuntimeEnv.examples = ['$ fcode runtime-env PYTHON', '$ fcode runtime-env JAVASCRIPT'];
|
|
42
|
+
exports.default = RuntimeEnv;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class SettingsGet extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
key: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
static flags: {
|
|
9
|
+
all: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
};
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const global_1 = require("../../config/global");
|
|
5
|
+
const settings_1 = require("../../config/settings");
|
|
6
|
+
const cli_1 = require("../../utils/cli");
|
|
7
|
+
const color_1 = require("@oclif/color");
|
|
8
|
+
class SettingsGet extends core_1.Command {
|
|
9
|
+
async run() {
|
|
10
|
+
const { args, flags } = await this.parse(SettingsGet);
|
|
11
|
+
const { key } = args;
|
|
12
|
+
try {
|
|
13
|
+
const globalConfig = new global_1.default();
|
|
14
|
+
const settings = (await globalConfig.get('settings')) || {};
|
|
15
|
+
if (key) {
|
|
16
|
+
const value = settings[key];
|
|
17
|
+
if (value != undefined) {
|
|
18
|
+
cli_1.default.log(value);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
const allSettings = {};
|
|
23
|
+
if (flags['all']) {
|
|
24
|
+
for (const settingDef of settings_1.SETTINGS_DEFINITIONS) {
|
|
25
|
+
allSettings[settingDef.key] = settings[settingDef.key] !== undefined ? settings[settingDef.key] : settingDef.default;
|
|
26
|
+
}
|
|
27
|
+
const definedKeys = settings_1.SETTINGS_DEFINITIONS.map((def) => def.key);
|
|
28
|
+
for (const [settingKey, settingValue] of Object.entries(settings)) {
|
|
29
|
+
if (!definedKeys.includes(settingKey)) {
|
|
30
|
+
allSettings[settingKey] = settingValue;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
for (const [settingKey, settingValue] of Object.entries(settings)) {
|
|
36
|
+
allSettings[settingKey] = settingValue;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (Object.keys(allSettings).length === 0) {
|
|
40
|
+
cli_1.default.log(color_1.default.yellow('No settings are currently set'));
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
cli_1.default.log(JSON.stringify(allSettings, null, 2));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
cli_1.default.error(error.message);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
SettingsGet.description = 'Get a setting value or all settings';
|
|
53
|
+
SettingsGet.examples = [`$ fcode settings:get ${settings_1.SettingKeys.DISABLE_UPDATE_NOTIFIER}`, '$ fcode settings:get', '$ fcode settings:get --all'];
|
|
54
|
+
SettingsGet.args = {
|
|
55
|
+
key: core_1.Args.string({
|
|
56
|
+
description: 'Setting key (optional, shows all settings if omitted)',
|
|
57
|
+
name: 'key',
|
|
58
|
+
required: false,
|
|
59
|
+
}),
|
|
60
|
+
};
|
|
61
|
+
SettingsGet.flags = {
|
|
62
|
+
all: core_1.Flags.boolean({
|
|
63
|
+
char: 'a',
|
|
64
|
+
description: 'Show all settings including defaults',
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
67
|
+
exports.default = SettingsGet;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class SettingsRemove extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
key: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
};
|
|
8
|
+
run(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const global_1 = require("../../config/global");
|
|
5
|
+
const cli_1 = require("../../utils/cli");
|
|
6
|
+
const color_1 = require("@oclif/color");
|
|
7
|
+
const settings_1 = require("../../config/settings");
|
|
8
|
+
class SettingsRemove extends core_1.Command {
|
|
9
|
+
async run() {
|
|
10
|
+
const { args } = await this.parse(SettingsRemove);
|
|
11
|
+
const { key } = args;
|
|
12
|
+
try {
|
|
13
|
+
const globalConfig = new global_1.default();
|
|
14
|
+
const removed = await globalConfig.removeSetting(key);
|
|
15
|
+
if (!removed) {
|
|
16
|
+
cli_1.default.log(color_1.default.yellow(`Setting '${key}' is not set`));
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
cli_1.default.log(color_1.default.green(`✓ Setting '${key}' removed`));
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
cli_1.default.error(error.message);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
SettingsRemove.description = 'Remove a setting value';
|
|
27
|
+
SettingsRemove.examples = [`$ fcode settings:remove ${settings_1.SettingKeys.DISABLE_UPDATE_NOTIFIER}`];
|
|
28
|
+
SettingsRemove.args = {
|
|
29
|
+
key: core_1.Args.string({
|
|
30
|
+
description: 'Setting key',
|
|
31
|
+
name: 'key',
|
|
32
|
+
required: true,
|
|
33
|
+
}),
|
|
34
|
+
};
|
|
35
|
+
exports.default = SettingsRemove;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class SettingsSet extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static examples: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
key: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
value: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
run(): Promise<void>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const global_1 = require("../../config/global");
|
|
5
|
+
const cli_1 = require("../../utils/cli");
|
|
6
|
+
const color_1 = require("@oclif/color");
|
|
7
|
+
const settings_1 = require("../../config/settings");
|
|
8
|
+
class SettingsSet extends core_1.Command {
|
|
9
|
+
async run() {
|
|
10
|
+
const { args } = await this.parse(SettingsSet);
|
|
11
|
+
const { key, value } = args;
|
|
12
|
+
try {
|
|
13
|
+
const globalConfig = new global_1.default();
|
|
14
|
+
await globalConfig.setSetting(key, value);
|
|
15
|
+
cli_1.default.log(color_1.default.green(`✓ Setting '${key}' set to ${JSON.stringify(value)}`));
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
cli_1.default.error(error.message);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
SettingsSet.description = 'Set a setting value';
|
|
23
|
+
SettingsSet.examples = [
|
|
24
|
+
`$ fcode settings:set ${settings_1.SettingKeys.DISABLE_UPDATE_NOTIFIER} true`,
|
|
25
|
+
`$ fcode settings:set ${settings_1.SettingKeys.IGNORE_WORKSPACE_NOT_EMPTY} false`,
|
|
26
|
+
];
|
|
27
|
+
SettingsSet.args = {
|
|
28
|
+
key: core_1.Args.string({
|
|
29
|
+
description: 'Setting key',
|
|
30
|
+
name: 'key',
|
|
31
|
+
required: true,
|
|
32
|
+
}),
|
|
33
|
+
value: core_1.Args.string({
|
|
34
|
+
description: 'Setting value',
|
|
35
|
+
name: 'value',
|
|
36
|
+
required: true,
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
39
|
+
exports.default = SettingsSet;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
import ProcessRepository from '../repositories/process';
|
|
3
|
+
export default class SetupDebug extends Command {
|
|
4
|
+
static args: {};
|
|
5
|
+
static description: string;
|
|
6
|
+
static examples: string[];
|
|
7
|
+
static flags: {};
|
|
8
|
+
_processRepository: ProcessRepository;
|
|
9
|
+
protected createLaunchFile(): Promise<void>;
|
|
10
|
+
protected createSettingsFile(): Promise<void>;
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const core_1 = require("@oclif/core");
|
|
4
|
+
const fs = require("fs-extra");
|
|
5
|
+
const path = require("node:path");
|
|
6
|
+
const cli_1 = require("../utils/cli");
|
|
7
|
+
const dependencies_1 = require("../core/utils/dependencies");
|
|
8
|
+
const process_1 = require("../repositories/process");
|
|
9
|
+
class SetupDebug extends core_1.Command {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this._processRepository = new process_1.default();
|
|
13
|
+
}
|
|
14
|
+
async createLaunchFile() {
|
|
15
|
+
const launchJsonPath = path.join('.vscode', 'launch.json');
|
|
16
|
+
if (fs.existsSync(launchJsonPath)) {
|
|
17
|
+
if (!(await cli_1.default.confirm('⚠️ File .vscode/launch.json already exists. Do you want to overwrite it? yes/no'))) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
if (!fs.existsSync('.vscode')) {
|
|
22
|
+
fs.mkdirSync('.vscode');
|
|
23
|
+
}
|
|
24
|
+
const processes = (await this._processRepository.findAll());
|
|
25
|
+
const configurations = [
|
|
26
|
+
{
|
|
27
|
+
name: 'Python Debugger: <Current File>',
|
|
28
|
+
type: 'debugpy',
|
|
29
|
+
request: 'launch',
|
|
30
|
+
program: path.join(__dirname, '..', 'runtime', 'executor.py'),
|
|
31
|
+
args: ['${file}'],
|
|
32
|
+
console: 'integratedTerminal',
|
|
33
|
+
justMyCode: true,
|
|
34
|
+
rules: [{ path: path.join(__dirname, '..', 'runtime'), include: false }],
|
|
35
|
+
env: {}
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'Node Debugger: <Current File>',
|
|
39
|
+
type: 'node',
|
|
40
|
+
request: 'launch',
|
|
41
|
+
program: path.join(__dirname, '..', 'runtime', 'executor.js'),
|
|
42
|
+
args: ['${file}'],
|
|
43
|
+
console: 'integratedTerminal',
|
|
44
|
+
env: {}
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
for (const process of processes) {
|
|
48
|
+
if (process.script.programmingLanguage === 'PYTHON') {
|
|
49
|
+
configurations.push({
|
|
50
|
+
name: `Python Debugger: ${process.slug}`,
|
|
51
|
+
type: 'debugpy',
|
|
52
|
+
request: 'launch',
|
|
53
|
+
program: path.join(__dirname, '..', 'runtime', 'executor.py'),
|
|
54
|
+
args: [await this._processRepository.getProcessFullPath(process.slug)],
|
|
55
|
+
console: 'integratedTerminal',
|
|
56
|
+
justMyCode: true,
|
|
57
|
+
rules: [{ path: path.join(__dirname, '..', 'runtime'), include: false }],
|
|
58
|
+
env: {}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
else if (process.script.programmingLanguage === 'JAVASCRIPT') {
|
|
62
|
+
configurations.push({
|
|
63
|
+
name: `Node Debugger: ${process.slug}`,
|
|
64
|
+
type: 'node',
|
|
65
|
+
request: 'launch',
|
|
66
|
+
program: path.join(__dirname, '..', 'runtime', 'executor.js'),
|
|
67
|
+
args: [await this._processRepository.getProcessFullPath(process.slug)],
|
|
68
|
+
console: 'integratedTerminal',
|
|
69
|
+
env: {}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (process.env.YC_COMMAND) {
|
|
74
|
+
configurations.forEach((configuration) => {
|
|
75
|
+
configuration.env = {
|
|
76
|
+
...configuration.env,
|
|
77
|
+
YC_COMMAND: process.env.YC_COMMAND
|
|
78
|
+
};
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
fs.outputJson(launchJsonPath, { configurations }, { encoding: 'utf-8', spaces: 2 });
|
|
82
|
+
console.log('✨ Created .vscode/launch.json');
|
|
83
|
+
}
|
|
84
|
+
async createSettingsFile() {
|
|
85
|
+
const settingsJsonPath = path.join('.vscode', 'settings.json');
|
|
86
|
+
let isUpdate = false;
|
|
87
|
+
let content = {};
|
|
88
|
+
if (fs.existsSync(settingsJsonPath)) {
|
|
89
|
+
if (!(await cli_1.default.confirm('⚠️ File .vscode/settings.json already exists. Do you want to overwrite configuration? yes/no'))) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
content = fs.readJsonSync(settingsJsonPath);
|
|
93
|
+
isUpdate = true;
|
|
94
|
+
}
|
|
95
|
+
if (!fs.existsSync('.vscode')) {
|
|
96
|
+
fs.mkdirSync('.vscode');
|
|
97
|
+
}
|
|
98
|
+
const dependenciesPath = await (0, dependencies_1.getDependenciesPath)('PYTHON');
|
|
99
|
+
content['python.analysis.extraPaths'] = [path.join(__dirname, '..', 'runtime', 'libs', 'python'), dependenciesPath];
|
|
100
|
+
fs.writeJsonSync(settingsJsonPath, content, { encoding: 'utf-8', spaces: 2 });
|
|
101
|
+
if (isUpdate) {
|
|
102
|
+
console.log('✨ Updated .vscode/settings.json');
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
console.log('✨ Created .vscode/settings.json');
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
async run() {
|
|
109
|
+
await this.parse(SetupDebug);
|
|
110
|
+
await this.createLaunchFile();
|
|
111
|
+
await this.createSettingsFile();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
SetupDebug.args = {};
|
|
115
|
+
SetupDebug.description = 'Setup vscode debug configurations';
|
|
116
|
+
SetupDebug.examples = ['$ fcode setup-debug'];
|
|
117
|
+
SetupDebug.flags = {};
|
|
118
|
+
exports.default = SetupDebug;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const base_command_1 = require("../core/commands/base-command");
|
|
4
|
+
const status_1 = require("./modules/status");
|
|
5
|
+
const status_2 = require("./processes/status");
|
|
6
|
+
const status_3 = require("./variables/status");
|
|
7
|
+
const status_4 = require("./dependencies/status");
|
|
8
|
+
const status_5 = require("./team/status");
|
|
9
|
+
class Status extends base_command_1.default {
|
|
10
|
+
async run() {
|
|
11
|
+
await this.parse(Status);
|
|
12
|
+
await this.logActiveTeam();
|
|
13
|
+
await status_2.default.run([]);
|
|
14
|
+
await status_1.default.run([]);
|
|
15
|
+
await status_3.default.run([]);
|
|
16
|
+
await status_4.default.run([]);
|
|
17
|
+
await status_5.default.run([]);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
Status.description = 'Show team workspace status';
|
|
21
|
+
Status.examples = ['$ fcode status'];
|
|
22
|
+
exports.default = Status;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import ApiClientCommand from '../../core/commands/api-client-command';
|
|
2
|
+
import TeamRepository from '../../repositories/team';
|
|
3
|
+
export default class TeamPullCommand extends ApiClientCommand {
|
|
4
|
+
static description: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
_teamRepository: TeamRepository;
|
|
7
|
+
run(): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const color_1 = require("@oclif/color");
|
|
4
|
+
const api_client_command_1 = require("../../core/commands/api-client-command");
|
|
5
|
+
const team_1 = require("../../repositories/team");
|
|
6
|
+
const cli_1 = require("../../utils/cli");
|
|
7
|
+
class TeamPullCommand extends api_client_command_1.default {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this._teamRepository = new team_1.default();
|
|
11
|
+
}
|
|
12
|
+
async run() {
|
|
13
|
+
await this.parse(TeamPullCommand);
|
|
14
|
+
cli_1.default.log(color_1.default.cyan('\n🗄️ pulling team settings...'));
|
|
15
|
+
const raw = await this._fcodeGraphQLClient.team();
|
|
16
|
+
const team = await this._teamRepository.fromRaw(raw);
|
|
17
|
+
this._teamRepository.save(team);
|
|
18
|
+
await this.workspaceConfig.setTeamStoredHash(team.contentHash);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
TeamPullCommand.description = 'Fetch team settings (timezone, error handler, inheritance) from cloud into team.json';
|
|
22
|
+
TeamPullCommand.examples = ['$ fcode team:pull'];
|
|
23
|
+
exports.default = TeamPullCommand;
|