farseer-cli 1.0.10 → 1.1.1
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 +19 -0
- package/dist/commands/app.js +348 -344
- package/dist/commands/app.js.map +7 -0
- package/dist/commands/apps.js +110 -82
- package/dist/commands/apps.js.map +7 -0
- package/dist/commands/cells.js +161 -0
- package/dist/commands/cells.js.map +7 -0
- package/dist/commands/checkout.js +140 -155
- package/dist/commands/checkout.js.map +7 -0
- package/dist/commands/config.js +128 -126
- package/dist/commands/config.js.map +7 -0
- package/dist/commands/dashboards.js +130 -0
- package/dist/commands/dashboards.js.map +7 -0
- package/dist/commands/diff.js +171 -193
- package/dist/commands/diff.js.map +7 -0
- package/dist/commands/dimensions.js +222 -119
- package/dist/commands/dimensions.js.map +7 -0
- package/dist/commands/files.js +96 -77
- package/dist/commands/files.js.map +7 -0
- package/dist/commands/formula.js +116 -0
- package/dist/commands/formula.js.map +7 -0
- package/dist/commands/install.js +74 -76
- package/dist/commands/install.js.map +7 -0
- package/dist/commands/list.js +91 -73
- package/dist/commands/list.js.map +7 -0
- package/dist/commands/login.js +137 -98
- package/dist/commands/login.js.map +7 -0
- package/dist/commands/logout.js +59 -41
- package/dist/commands/logout.js.map +7 -0
- package/dist/commands/mcp-server.js +36 -23
- package/dist/commands/mcp-server.js.map +7 -0
- package/dist/commands/model.js +186 -175
- package/dist/commands/model.js.map +7 -0
- package/dist/commands/pull.js +264 -274
- package/dist/commands/pull.js.map +7 -0
- package/dist/commands/push.js +209 -221
- package/dist/commands/push.js.map +7 -0
- package/dist/commands/run.js +276 -321
- package/dist/commands/run.js.map +7 -0
- package/dist/commands/sheets.js +200 -0
- package/dist/commands/sheets.js.map +7 -0
- package/dist/commands/status.js +149 -169
- package/dist/commands/status.js.map +7 -0
- package/dist/commands/variables.js +247 -188
- package/dist/commands/variables.js.map +7 -0
- package/dist/commands/whoami.js +65 -44
- package/dist/commands/whoami.js.map +7 -0
- package/dist/index.js +179 -115
- package/dist/index.js.map +7 -0
- package/dist/mcp/index.js +33 -16
- package/dist/mcp/index.js.map +7 -0
- package/dist/mcp/prompts/workflows.js +191 -145
- package/dist/mcp/prompts/workflows.js.map +7 -0
- package/dist/mcp/resources/documentation.js +158 -148
- package/dist/mcp/resources/documentation.js.map +7 -0
- package/dist/mcp/server.js +56 -33
- package/dist/mcp/server.js.map +7 -0
- package/dist/mcp/tools/appTools.js +309 -277
- package/dist/mcp/tools/appTools.js.map +7 -0
- package/dist/mcp/tools/authTools.js +130 -121
- package/dist/mcp/tools/authTools.js.map +7 -0
- package/dist/mcp/tools/cellTools.js +148 -0
- package/dist/mcp/tools/cellTools.js.map +7 -0
- package/dist/mcp/tools/dashboardTools.js +133 -0
- package/dist/mcp/tools/dashboardTools.js.map +7 -0
- package/dist/mcp/tools/dataTools.js +270 -267
- package/dist/mcp/tools/dataTools.js.map +7 -0
- package/dist/mcp/tools/modelTools.js +575 -229
- package/dist/mcp/tools/modelTools.js.map +7 -0
- package/dist/mcp/tools/runTools.js +201 -203
- package/dist/mcp/tools/runTools.js.map +7 -0
- package/dist/mcp/tools/sheetTools.js +240 -0
- package/dist/mcp/tools/sheetTools.js.map +7 -0
- package/dist/mcp/tools/syncTools.js +335 -314
- package/dist/mcp/tools/syncTools.js.map +7 -0
- package/dist/mcp/utils/helpers.js +117 -123
- package/dist/mcp/utils/helpers.js.map +7 -0
- package/dist/services/appSyncService.js +381 -437
- package/dist/services/appSyncService.js.map +7 -0
- package/dist/services/configService.js +154 -143
- package/dist/services/configService.js.map +7 -0
- package/dist/services/farseerApi.js +422 -399
- package/dist/services/farseerApi.js.map +7 -0
- package/dist/services/farseerFactory.js +208 -273
- package/dist/services/farseerFactory.js.map +7 -0
- package/dist/services/farseerService.js +467 -486
- package/dist/services/farseerService.js.map +7 -0
- package/dist/services/syncService.js +661 -731
- package/dist/services/syncService.js.map +7 -0
- package/dist/utils/constants.js +52 -19
- package/dist/utils/constants.js.map +7 -0
- package/dist/utils/entityResolver.js +78 -0
- package/dist/utils/entityResolver.js.map +7 -0
- package/dist/utils/helpers.js +331 -365
- package/dist/utils/helpers.js.map +7 -0
- package/dist/utils/logger.js +74 -42
- package/dist/utils/logger.js.map +7 -0
- package/package.json +3 -2
package/dist/commands/pull.js
CHANGED
|
@@ -1,286 +1,276 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
37
11
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var pull_exports = {};
|
|
30
|
+
__export(pull_exports, {
|
|
31
|
+
registerPullCommand: () => registerPullCommand
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(pull_exports);
|
|
34
|
+
var import_chalk = __toESM(require("chalk"));
|
|
35
|
+
var import_inquirer = __toESM(require("inquirer"));
|
|
36
|
+
var import_logger = require("../utils/logger");
|
|
37
|
+
var import_farseerFactory = require("../services/farseerFactory");
|
|
38
|
+
var import_syncService = require("../services/syncService");
|
|
39
|
+
var import_appSyncService = require("../services/appSyncService");
|
|
40
|
+
var import_helpers = require("../utils/helpers");
|
|
47
41
|
function registerPullCommand(program) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
42
|
+
program.command("pull [org] [tenant]").description(
|
|
43
|
+
"Pull files from Farseer instance to local\n\nUsage: pull <org> <tenant> OR pull <tenant> (if org is known)"
|
|
44
|
+
).option("--all", "Pull all files (default: only scripts .ts, .js)").option("--force", "Force pull, overwriting local changes on conflicts").action(async (arg1, arg2, options) => {
|
|
45
|
+
const { organisation, tenant } = (0, import_helpers.resolveTenantWithOrgMapping)(arg1, arg2);
|
|
46
|
+
const clientResult = await (0, import_farseerFactory.getFarseerClientWithFallback)(organisation, tenant);
|
|
47
|
+
if (!clientResult) {
|
|
48
|
+
(0, import_farseerFactory.showLoginPrompt)(tenant);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
const syncService = new import_syncService.SyncService(tenant, clientResult.client);
|
|
52
|
+
const tenantDir = (0, import_helpers.getTenantDir)(tenant);
|
|
53
|
+
(0, import_helpers.ensureDirectoryExists)(tenantDir);
|
|
54
|
+
await createDefaultPackageJson(tenantDir, tenant);
|
|
55
|
+
console.log();
|
|
56
|
+
console.log(import_chalk.default.bold("\u2550\u2550\u2550 Files \u2550\u2550\u2550"));
|
|
57
|
+
import_logger.logger.info(`Pulling files from ${tenant}...`);
|
|
58
|
+
try {
|
|
59
|
+
let result = await syncService.pull({ all: options.all, force: options.force });
|
|
60
|
+
if (result.conflicts.length > 0 && !options.force) {
|
|
61
|
+
console.log();
|
|
62
|
+
console.log(import_chalk.default.red.bold(`${result.conflicts.length} conflict(s) detected:`));
|
|
63
|
+
console.log();
|
|
64
|
+
for (const conflict of result.conflicts) {
|
|
65
|
+
console.log(import_chalk.default.red(` ! ${conflict.filePath}`));
|
|
66
|
+
console.log(import_chalk.default.dim(` ${conflict.description}`));
|
|
59
67
|
}
|
|
60
|
-
const syncService = new syncService_1.SyncService(tenant, clientResult.client);
|
|
61
|
-
// Step 1: Ensure tenant folder exists
|
|
62
|
-
const tenantDir = (0, helpers_1.getTenantDir)(tenant);
|
|
63
|
-
(0, helpers_1.ensureDirectoryExists)(tenantDir);
|
|
64
|
-
// Create default package.json if it doesn't exist
|
|
65
|
-
await createDefaultPackageJson(tenantDir, tenant);
|
|
66
|
-
// Step 2: Pull files from Farseer
|
|
67
68
|
console.log();
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
{ name: 'Restore remote version', value: 'keep_remote' },
|
|
95
|
-
];
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
choices = [
|
|
99
|
-
{ name: 'Keep local version', value: 'keep_local' },
|
|
100
|
-
{ name: 'Use remote version (overwrite local)', value: 'keep_remote' },
|
|
101
|
-
{ name: 'Keep both (save remote as .remote file)', value: 'keep_both' },
|
|
102
|
-
];
|
|
103
|
-
}
|
|
104
|
-
const answer = await inquirer_1.default.prompt([
|
|
105
|
-
{
|
|
106
|
-
type: 'list',
|
|
107
|
-
name: 'resolution',
|
|
108
|
-
message: `${conflict.filePath} - ${conflict.description}`,
|
|
109
|
-
choices,
|
|
110
|
-
},
|
|
111
|
-
]);
|
|
112
|
-
resolutions[conflict.filePath] = answer.resolution;
|
|
113
|
-
}
|
|
114
|
-
// Re-pull with resolutions
|
|
115
|
-
result = await syncService.pull({ all: options.all, conflictResolutions: resolutions });
|
|
116
|
-
}
|
|
117
|
-
if (result.downloaded.length > 0) {
|
|
118
|
-
console.log(chalk_1.default.green('Downloaded:'));
|
|
119
|
-
for (const file of result.downloaded) {
|
|
120
|
-
console.log(chalk_1.default.green(` + ${file}`));
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
if (result.deleted.length > 0) {
|
|
124
|
-
console.log(chalk_1.default.red('Deleted (removed from remote):'));
|
|
125
|
-
for (const file of result.deleted) {
|
|
126
|
-
console.log(chalk_1.default.red(` - ${file}`));
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
if (result.conflictFilesWritten.length > 0) {
|
|
130
|
-
console.log(chalk_1.default.yellow('Conflict files created:'));
|
|
131
|
-
for (const file of result.conflictFilesWritten) {
|
|
132
|
-
console.log(chalk_1.default.yellow(` ~ ${file}`));
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
logger_1.logger.dim(`Files: +${result.downloaded.length} -${result.deleted.length} (${result.unchanged.length} unchanged)`);
|
|
136
|
-
// Create audit log entries for downloaded files
|
|
137
|
-
if (result.downloaded.length > 0) {
|
|
138
|
-
const syncState = syncService.loadSyncState();
|
|
139
|
-
const auditEntries = result.downloaded.map((filePath) => ({
|
|
140
|
-
operation: 'pulled',
|
|
141
|
-
filePath,
|
|
142
|
-
uploadTime: syncState.files[filePath]?.metadata?.uploadTime,
|
|
143
|
-
uploaderEmail: syncState.files[filePath]?.metadata?.uploaderEmail,
|
|
144
|
-
uploaderName: syncState.files[filePath]?.metadata?.uploaderName,
|
|
145
|
-
}));
|
|
146
|
-
(0, helpers_1.appendToAuditLog)(tenant, auditEntries);
|
|
147
|
-
}
|
|
148
|
-
let hasChanges = result.downloaded.length > 0 || result.deleted.length > 0;
|
|
149
|
-
// Step 3: Pull apps
|
|
150
|
-
let appResult = {
|
|
151
|
-
created: [],
|
|
152
|
-
updated: [],
|
|
153
|
-
deleted: [],
|
|
154
|
-
unchanged: [],
|
|
155
|
-
};
|
|
156
|
-
console.log();
|
|
157
|
-
console.log(chalk_1.default.bold('═══ Apps ═══'));
|
|
158
|
-
logger_1.logger.info(`Pulling apps from ${tenant}...`);
|
|
159
|
-
const appSyncService = new appSyncService_1.AppSyncService(tenant, clientResult.client);
|
|
160
|
-
appResult = await appSyncService.pull();
|
|
161
|
-
if (appResult.created.length > 0) {
|
|
162
|
-
console.log(chalk_1.default.green('New apps:'));
|
|
163
|
-
for (const app of appResult.created) {
|
|
164
|
-
console.log(chalk_1.default.green(` + ${app}`));
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
if (appResult.updated.length > 0) {
|
|
168
|
-
console.log(chalk_1.default.yellow('Updated apps:'));
|
|
169
|
-
for (const app of appResult.updated) {
|
|
170
|
-
console.log(chalk_1.default.yellow(` ~ ${app}`));
|
|
171
|
-
}
|
|
69
|
+
const resolutions = {};
|
|
70
|
+
for (const conflict of result.conflicts) {
|
|
71
|
+
let choices;
|
|
72
|
+
if (conflict.type === "local_modified_remote_deleted") {
|
|
73
|
+
choices = [
|
|
74
|
+
{ name: "Keep local (keep your modified file)", value: "keep_local" },
|
|
75
|
+
{ name: "Accept deletion (delete local file)", value: "keep_remote" }
|
|
76
|
+
];
|
|
77
|
+
} else if (conflict.type === "local_deleted_remote_modified") {
|
|
78
|
+
choices = [
|
|
79
|
+
{ name: "Keep deleted (don't restore file)", value: "keep_local" },
|
|
80
|
+
{ name: "Restore remote version", value: "keep_remote" }
|
|
81
|
+
];
|
|
82
|
+
} else {
|
|
83
|
+
choices = [
|
|
84
|
+
{ name: "Keep local version", value: "keep_local" },
|
|
85
|
+
{ name: "Use remote version (overwrite local)", value: "keep_remote" },
|
|
86
|
+
{ name: "Keep both (save remote as .remote file)", value: "keep_both" }
|
|
87
|
+
];
|
|
88
|
+
}
|
|
89
|
+
const answer = await import_inquirer.default.prompt([
|
|
90
|
+
{
|
|
91
|
+
type: "list",
|
|
92
|
+
name: "resolution",
|
|
93
|
+
message: `${conflict.filePath} - ${conflict.description}`,
|
|
94
|
+
choices
|
|
172
95
|
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
for (const app of appResult.deleted) {
|
|
176
|
-
console.log(chalk_1.default.red(` - ${app}`));
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
logger_1.logger.dim(`Apps: +${appResult.created.length} ~${appResult.updated.length} -${appResult.deleted.length} (${appResult.unchanged.length} unchanged)`);
|
|
180
|
-
hasChanges =
|
|
181
|
-
hasChanges ||
|
|
182
|
-
appResult.created.length > 0 ||
|
|
183
|
-
appResult.updated.length > 0 ||
|
|
184
|
-
appResult.deleted.length > 0;
|
|
185
|
-
if (!hasChanges) {
|
|
186
|
-
logger_1.logger.success('Already up to date.');
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
console.log();
|
|
190
|
-
console.log(chalk_1.default.bold('═══ Summary ═══'));
|
|
191
|
-
logger_1.logger.success('Pull complete!');
|
|
192
|
-
logger_1.logger.dim(`Files: +${result.downloaded.length} -${result.deleted.length} (${result.unchanged.length} unchanged)`);
|
|
193
|
-
logger_1.logger.dim(`Apps: +${appResult.created.length} ~${appResult.updated.length} -${appResult.deleted.length} (${appResult.unchanged.length} unchanged)`);
|
|
96
|
+
]);
|
|
97
|
+
resolutions[conflict.filePath] = answer.resolution;
|
|
194
98
|
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
99
|
+
result = await syncService.pull({ all: options.all, conflictResolutions: resolutions });
|
|
100
|
+
}
|
|
101
|
+
if (result.downloaded.length > 0) {
|
|
102
|
+
console.log(import_chalk.default.green("Downloaded:"));
|
|
103
|
+
for (const file of result.downloaded) {
|
|
104
|
+
console.log(import_chalk.default.green(` + ${file}`));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
if (result.deleted.length > 0) {
|
|
108
|
+
console.log(import_chalk.default.red("Deleted (removed from remote):"));
|
|
109
|
+
for (const file of result.deleted) {
|
|
110
|
+
console.log(import_chalk.default.red(` - ${file}`));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (result.conflictFilesWritten.length > 0) {
|
|
114
|
+
console.log(import_chalk.default.yellow("Conflict files created:"));
|
|
115
|
+
for (const file of result.conflictFilesWritten) {
|
|
116
|
+
console.log(import_chalk.default.yellow(` ~ ${file}`));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
import_logger.logger.dim(
|
|
120
|
+
`Files: +${result.downloaded.length} -${result.deleted.length} (${result.unchanged.length} unchanged)`
|
|
121
|
+
);
|
|
122
|
+
if (result.downloaded.length > 0) {
|
|
123
|
+
const syncState = syncService.loadSyncState();
|
|
124
|
+
const auditEntries = result.downloaded.map((filePath) => ({
|
|
125
|
+
operation: "pulled",
|
|
126
|
+
filePath,
|
|
127
|
+
uploadTime: syncState.files[filePath]?.metadata?.uploadTime,
|
|
128
|
+
uploaderEmail: syncState.files[filePath]?.metadata?.uploaderEmail,
|
|
129
|
+
uploaderName: syncState.files[filePath]?.metadata?.uploaderName
|
|
130
|
+
}));
|
|
131
|
+
(0, import_helpers.appendToAuditLog)(tenant, auditEntries);
|
|
132
|
+
}
|
|
133
|
+
let hasChanges = result.downloaded.length > 0 || result.deleted.length > 0;
|
|
134
|
+
let appResult = {
|
|
135
|
+
created: [],
|
|
136
|
+
updated: [],
|
|
137
|
+
deleted: [],
|
|
138
|
+
unchanged: []
|
|
139
|
+
};
|
|
140
|
+
console.log();
|
|
141
|
+
console.log(import_chalk.default.bold("\u2550\u2550\u2550 Apps \u2550\u2550\u2550"));
|
|
142
|
+
import_logger.logger.info(`Pulling apps from ${tenant}...`);
|
|
143
|
+
const appSyncService = new import_appSyncService.AppSyncService(tenant, clientResult.client);
|
|
144
|
+
appResult = await appSyncService.pull();
|
|
145
|
+
if (appResult.created.length > 0) {
|
|
146
|
+
console.log(import_chalk.default.green("New apps:"));
|
|
147
|
+
for (const app of appResult.created) {
|
|
148
|
+
console.log(import_chalk.default.green(` + ${app}`));
|
|
201
149
|
}
|
|
202
|
-
|
|
150
|
+
}
|
|
151
|
+
if (appResult.updated.length > 0) {
|
|
152
|
+
console.log(import_chalk.default.yellow("Updated apps:"));
|
|
153
|
+
for (const app of appResult.updated) {
|
|
154
|
+
console.log(import_chalk.default.yellow(` ~ ${app}`));
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (appResult.deleted.length > 0) {
|
|
158
|
+
console.log(import_chalk.default.red("Deleted apps (removed from remote):"));
|
|
159
|
+
for (const app of appResult.deleted) {
|
|
160
|
+
console.log(import_chalk.default.red(` - ${app}`));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
import_logger.logger.dim(
|
|
164
|
+
`Apps: +${appResult.created.length} ~${appResult.updated.length} -${appResult.deleted.length} (${appResult.unchanged.length} unchanged)`
|
|
165
|
+
);
|
|
166
|
+
hasChanges = hasChanges || appResult.created.length > 0 || appResult.updated.length > 0 || appResult.deleted.length > 0;
|
|
167
|
+
if (!hasChanges) {
|
|
168
|
+
import_logger.logger.success("Already up to date.");
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
console.log();
|
|
172
|
+
console.log(import_chalk.default.bold("\u2550\u2550\u2550 Summary \u2550\u2550\u2550"));
|
|
173
|
+
import_logger.logger.success("Pull complete!");
|
|
174
|
+
import_logger.logger.dim(
|
|
175
|
+
`Files: +${result.downloaded.length} -${result.deleted.length} (${result.unchanged.length} unchanged)`
|
|
176
|
+
);
|
|
177
|
+
import_logger.logger.dim(
|
|
178
|
+
`Apps: +${appResult.created.length} ~${appResult.updated.length} -${appResult.deleted.length} (${appResult.unchanged.length} unchanged)`
|
|
179
|
+
);
|
|
180
|
+
} catch (error) {
|
|
181
|
+
import_logger.logger.error("Pull failed.");
|
|
182
|
+
if (error instanceof Error) {
|
|
183
|
+
import_logger.logger.dim(error.message);
|
|
184
|
+
}
|
|
185
|
+
process.exit(1);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
203
188
|
}
|
|
204
189
|
async function createDefaultPackageJson(tenantDir, tenant) {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
190
|
+
const fs = await import("fs");
|
|
191
|
+
const path = await import("path");
|
|
192
|
+
const packageJsonPath = path.join(tenantDir, "package.json");
|
|
193
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
const packageJson = {
|
|
197
|
+
name: `farseer-scripts-${tenant}`,
|
|
198
|
+
version: "1.0.0",
|
|
199
|
+
description: `Farseer App scripts for ${tenant}`,
|
|
200
|
+
main: "src/index.ts",
|
|
201
|
+
scripts: {},
|
|
202
|
+
keywords: ["farseer", "scripts", tenant],
|
|
203
|
+
author: "Farseer",
|
|
204
|
+
license: "ISC",
|
|
205
|
+
dependencies: {
|
|
206
|
+
"@google-cloud/bigquery": "^7.9.0",
|
|
207
|
+
"@google-cloud/storage": "^7.12.1",
|
|
208
|
+
"@googleapis/sheets": "^5.0.5",
|
|
209
|
+
"@sendgrid/mail": "^7.7.0",
|
|
210
|
+
"@types/node-forge": "^1.3.11",
|
|
211
|
+
"@xmldom/xmldom": "^0.9.8",
|
|
212
|
+
arquero: "^5.4.1",
|
|
213
|
+
axios: "^1.10.0",
|
|
214
|
+
"axios-retry": "^3.9.1",
|
|
215
|
+
"basic-ftp": "^5.0.5",
|
|
216
|
+
"client-oauth2": "^4.3.3",
|
|
217
|
+
"csv-parser": "^3.0.0",
|
|
218
|
+
dotenv: "^16.4.5",
|
|
219
|
+
"draft-js": "^0.11.7",
|
|
220
|
+
exceljs: "^4.4.0",
|
|
221
|
+
"farseer-client": "https://storage.googleapis.com/farseer-remote-jobs-results/farseer-client/release-1.4.5.tar",
|
|
222
|
+
"farseer-client-axios": "https://storage.googleapis.com/farseer-remote-jobs-results/farseer-client-axios/6898c0cb-5dca-4b2f-b325-119efc7f099e/v1.0.1.tar",
|
|
223
|
+
"fast-xml-parser": "^4.5.0",
|
|
224
|
+
"form-data": "^4.0.0",
|
|
225
|
+
googleapis: "^144.0.0",
|
|
226
|
+
heapdump: "^0.3.15",
|
|
227
|
+
"image-size": "^1.1.1",
|
|
228
|
+
jszip: "^3.10.1",
|
|
229
|
+
"lossless-json": "^4.0.1",
|
|
230
|
+
mssql: "^10.0.4",
|
|
231
|
+
"node-fetch": "^2.7.0",
|
|
232
|
+
"node-forge": "^1.3.1",
|
|
233
|
+
"node-sp-auth": "^3.0.8",
|
|
234
|
+
numeral: "^2.0.6",
|
|
235
|
+
oracledb: "^6.6.0",
|
|
236
|
+
papaparse: "^5.5.1",
|
|
237
|
+
pdfkit: "^0.14.0",
|
|
238
|
+
pdfmake: "^0.2.20",
|
|
239
|
+
soap: "^1.1.11",
|
|
240
|
+
"ssh2-sftp-client": "^11.0.0",
|
|
241
|
+
"strong-soap": "^4.1.13",
|
|
242
|
+
"ts-node": "^10.9.2",
|
|
243
|
+
typescript: "^5.5.4",
|
|
244
|
+
undici: "^6.19.8",
|
|
245
|
+
uuid: "^11.1.0",
|
|
246
|
+
winston: "^3.17.0",
|
|
247
|
+
xlsx: "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
|
|
248
|
+
"xml-crypto": "^6.1.2"
|
|
249
|
+
},
|
|
250
|
+
devDependencies: {
|
|
251
|
+
"@types/draft-js": "^0.11.18",
|
|
252
|
+
"@types/heapdump": "^0.3.4",
|
|
253
|
+
"@types/mssql": "^9.1.5",
|
|
254
|
+
"@types/node": "^18.19.50",
|
|
255
|
+
"@types/node-fetch": "^2.6.11",
|
|
256
|
+
"@types/numeral": "^2.0.5",
|
|
257
|
+
"@types/oracledb": "^6.5.3",
|
|
258
|
+
"@types/papaparse": "^5.3.15",
|
|
259
|
+
"@types/pdfmake": "^0.2.11",
|
|
260
|
+
"@types/soap": "^0.18.0",
|
|
261
|
+
"@types/ssh2-sftp-client": "^9.0.4",
|
|
262
|
+
"@types/tough-cookie": "^4.0.5",
|
|
263
|
+
"@types/uuid": "^10.0.0",
|
|
264
|
+
"@types/xmldom": "^0.1.34",
|
|
265
|
+
"ts-node": "^10.9.2",
|
|
266
|
+
typescript: "^5.5.4"
|
|
210
267
|
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
description: `Farseer App scripts for ${tenant}`,
|
|
215
|
-
main: 'src/index.ts',
|
|
216
|
-
scripts: {},
|
|
217
|
-
keywords: ['farseer', 'scripts', tenant],
|
|
218
|
-
author: 'Farseer',
|
|
219
|
-
license: 'ISC',
|
|
220
|
-
dependencies: {
|
|
221
|
-
'@google-cloud/bigquery': '^7.9.0',
|
|
222
|
-
'@google-cloud/storage': '^7.12.1',
|
|
223
|
-
'@googleapis/sheets': '^5.0.5',
|
|
224
|
-
'@sendgrid/mail': '^7.7.0',
|
|
225
|
-
'@types/node-forge': '^1.3.11',
|
|
226
|
-
'@xmldom/xmldom': '^0.9.8',
|
|
227
|
-
arquero: '^5.4.1',
|
|
228
|
-
axios: '^1.10.0',
|
|
229
|
-
'axios-retry': '^3.9.1',
|
|
230
|
-
'basic-ftp': '^5.0.5',
|
|
231
|
-
'client-oauth2': '^4.3.3',
|
|
232
|
-
'csv-parser': '^3.0.0',
|
|
233
|
-
dotenv: '^16.4.5',
|
|
234
|
-
'draft-js': '^0.11.7',
|
|
235
|
-
exceljs: '^4.4.0',
|
|
236
|
-
'farseer-client': 'https://storage.googleapis.com/farseer-remote-jobs-results/farseer-client/release-1.4.5.tar',
|
|
237
|
-
'farseer-client-axios': 'https://storage.googleapis.com/farseer-remote-jobs-results/farseer-client-axios/6898c0cb-5dca-4b2f-b325-119efc7f099e/v1.0.1.tar',
|
|
238
|
-
'fast-xml-parser': '^4.5.0',
|
|
239
|
-
'form-data': '^4.0.0',
|
|
240
|
-
googleapis: '^144.0.0',
|
|
241
|
-
heapdump: '^0.3.15',
|
|
242
|
-
'image-size': '^1.1.1',
|
|
243
|
-
jszip: '^3.10.1',
|
|
244
|
-
'lossless-json': '^4.0.1',
|
|
245
|
-
mssql: '^10.0.4',
|
|
246
|
-
'node-fetch': '^2.7.0',
|
|
247
|
-
'node-forge': '^1.3.1',
|
|
248
|
-
'node-sp-auth': '^3.0.8',
|
|
249
|
-
numeral: '^2.0.6',
|
|
250
|
-
oracledb: '^6.6.0',
|
|
251
|
-
papaparse: '^5.5.1',
|
|
252
|
-
pdfkit: '^0.14.0',
|
|
253
|
-
pdfmake: '^0.2.20',
|
|
254
|
-
soap: '^1.1.11',
|
|
255
|
-
'ssh2-sftp-client': '^11.0.0',
|
|
256
|
-
'strong-soap': '^4.1.13',
|
|
257
|
-
'ts-node': '^10.9.2',
|
|
258
|
-
typescript: '^5.5.4',
|
|
259
|
-
undici: '^6.19.8',
|
|
260
|
-
uuid: '^11.1.0',
|
|
261
|
-
winston: '^3.17.0',
|
|
262
|
-
xlsx: 'https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz',
|
|
263
|
-
'xml-crypto': '^6.1.2',
|
|
264
|
-
},
|
|
265
|
-
devDependencies: {
|
|
266
|
-
'@types/draft-js': '^0.11.18',
|
|
267
|
-
'@types/heapdump': '^0.3.4',
|
|
268
|
-
'@types/mssql': '^9.1.5',
|
|
269
|
-
'@types/node': '^18.19.50',
|
|
270
|
-
'@types/node-fetch': '^2.6.11',
|
|
271
|
-
'@types/numeral': '^2.0.5',
|
|
272
|
-
'@types/oracledb': '^6.5.3',
|
|
273
|
-
'@types/papaparse': '^5.3.15',
|
|
274
|
-
'@types/pdfmake': '^0.2.11',
|
|
275
|
-
'@types/soap': '^0.18.0',
|
|
276
|
-
'@types/ssh2-sftp-client': '^9.0.4',
|
|
277
|
-
'@types/tough-cookie': '^4.0.5',
|
|
278
|
-
'@types/uuid': '^10.0.0',
|
|
279
|
-
'@types/xmldom': '^0.1.34',
|
|
280
|
-
'ts-node': '^10.9.2',
|
|
281
|
-
typescript: '^5.5.4',
|
|
282
|
-
},
|
|
283
|
-
};
|
|
284
|
-
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf-8');
|
|
285
|
-
logger_1.logger.dim(`Created package.json for ${tenant}`);
|
|
268
|
+
};
|
|
269
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), "utf-8");
|
|
270
|
+
import_logger.logger.dim(`Created package.json for ${tenant}`);
|
|
286
271
|
}
|
|
272
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
273
|
+
0 && (module.exports = {
|
|
274
|
+
registerPullCommand
|
|
275
|
+
});
|
|
276
|
+
//# sourceMappingURL=pull.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/commands/pull.ts"],
|
|
4
|
+
"sourcesContent": ["import { Command } from 'commander';\nimport chalk from 'chalk';\nimport inquirer from 'inquirer';\nimport { logger } from '../utils/logger';\nimport { getFarseerClientWithFallback, showLoginPrompt } from '../services/farseerFactory';\nimport { SyncService, ConflictResolutions } from '../services/syncService';\nimport { AppSyncService } from '../services/appSyncService';\nimport {\n getTenantDir,\n ensureDirectoryExists,\n resolveTenantWithOrgMapping,\n appendToAuditLog,\n AuditLogEntry,\n} from '../utils/helpers';\n\nexport function registerPullCommand(program: Command): void {\n program\n .command('pull [org] [tenant]')\n .description(\n 'Pull files from Farseer instance to local\\n\\nUsage: pull <org> <tenant> OR pull <tenant> (if org is known)',\n )\n .option('--all', 'Pull all files (default: only scripts .ts, .js)')\n .option('--force', 'Force pull, overwriting local changes on conflicts')\n .action(async (arg1, arg2, options) => {\n const { organisation, tenant } = resolveTenantWithOrgMapping(arg1, arg2);\n const clientResult = await getFarseerClientWithFallback(organisation, tenant);\n\n if (!clientResult) {\n showLoginPrompt(tenant);\n process.exit(1);\n }\n\n const syncService = new SyncService(tenant, clientResult.client);\n\n // Step 1: Ensure tenant folder exists\n const tenantDir = getTenantDir(tenant);\n ensureDirectoryExists(tenantDir);\n\n // Create default package.json if it doesn't exist\n await createDefaultPackageJson(tenantDir, tenant);\n\n // Step 2: Pull files from Farseer\n console.log();\n console.log(chalk.bold('\u2550\u2550\u2550 Files \u2550\u2550\u2550'));\n logger.info(`Pulling files from ${tenant}...`);\n\n try {\n let result = await syncService.pull({ all: options.all, force: options.force });\n\n // Handle conflicts interactively\n if (result.conflicts.length > 0 && !options.force) {\n console.log();\n console.log(chalk.red.bold(`${result.conflicts.length} conflict(s) detected:`));\n console.log();\n\n for (const conflict of result.conflicts) {\n console.log(chalk.red(` ! ${conflict.filePath}`));\n console.log(chalk.dim(` ${conflict.description}`));\n }\n console.log();\n\n const resolutions: ConflictResolutions = {};\n\n for (const conflict of result.conflicts) {\n let choices: { name: string; value: string }[];\n\n if (conflict.type === 'local_modified_remote_deleted') {\n choices = [\n { name: 'Keep local (keep your modified file)', value: 'keep_local' },\n { name: 'Accept deletion (delete local file)', value: 'keep_remote' },\n ];\n } else if (conflict.type === 'local_deleted_remote_modified') {\n choices = [\n { name: \"Keep deleted (don't restore file)\", value: 'keep_local' },\n { name: 'Restore remote version', value: 'keep_remote' },\n ];\n } else {\n choices = [\n { name: 'Keep local version', value: 'keep_local' },\n { name: 'Use remote version (overwrite local)', value: 'keep_remote' },\n { name: 'Keep both (save remote as .remote file)', value: 'keep_both' },\n ];\n }\n\n const answer = await inquirer.prompt([\n {\n type: 'list',\n name: 'resolution',\n message: `${conflict.filePath} - ${conflict.description}`,\n choices,\n },\n ]);\n\n resolutions[conflict.filePath] = answer.resolution;\n }\n\n // Re-pull with resolutions\n result = await syncService.pull({ all: options.all, conflictResolutions: resolutions });\n }\n\n if (result.downloaded.length > 0) {\n console.log(chalk.green('Downloaded:'));\n for (const file of result.downloaded) {\n console.log(chalk.green(` + ${file}`));\n }\n }\n\n if (result.deleted.length > 0) {\n console.log(chalk.red('Deleted (removed from remote):'));\n for (const file of result.deleted) {\n console.log(chalk.red(` - ${file}`));\n }\n }\n\n if (result.conflictFilesWritten.length > 0) {\n console.log(chalk.yellow('Conflict files created:'));\n for (const file of result.conflictFilesWritten) {\n console.log(chalk.yellow(` ~ ${file}`));\n }\n }\n\n logger.dim(\n `Files: +${result.downloaded.length} -${result.deleted.length} (${result.unchanged.length} unchanged)`,\n );\n\n // Create audit log entries for downloaded files\n if (result.downloaded.length > 0) {\n const syncState = syncService.loadSyncState();\n const auditEntries: AuditLogEntry[] = result.downloaded.map((filePath) => ({\n operation: 'pulled' as const,\n filePath,\n uploadTime: syncState.files[filePath]?.metadata?.uploadTime,\n uploaderEmail: syncState.files[filePath]?.metadata?.uploaderEmail,\n uploaderName: syncState.files[filePath]?.metadata?.uploaderName,\n }));\n\n appendToAuditLog(tenant, auditEntries);\n }\n\n let hasChanges = result.downloaded.length > 0 || result.deleted.length > 0;\n\n // Step 3: Pull apps\n let appResult = {\n created: [] as string[],\n updated: [] as string[],\n deleted: [] as string[],\n unchanged: [] as string[],\n };\n\n console.log();\n console.log(chalk.bold('\u2550\u2550\u2550 Apps \u2550\u2550\u2550'));\n logger.info(`Pulling apps from ${tenant}...`);\n\n const appSyncService = new AppSyncService(tenant, clientResult.client);\n appResult = await appSyncService.pull();\n\n if (appResult.created.length > 0) {\n console.log(chalk.green('New apps:'));\n for (const app of appResult.created) {\n console.log(chalk.green(` + ${app}`));\n }\n }\n\n if (appResult.updated.length > 0) {\n console.log(chalk.yellow('Updated apps:'));\n for (const app of appResult.updated) {\n console.log(chalk.yellow(` ~ ${app}`));\n }\n }\n\n if (appResult.deleted.length > 0) {\n console.log(chalk.red('Deleted apps (removed from remote):'));\n for (const app of appResult.deleted) {\n console.log(chalk.red(` - ${app}`));\n }\n }\n\n logger.dim(\n `Apps: +${appResult.created.length} ~${appResult.updated.length} -${appResult.deleted.length} (${appResult.unchanged.length} unchanged)`,\n );\n\n hasChanges =\n hasChanges ||\n appResult.created.length > 0 ||\n appResult.updated.length > 0 ||\n appResult.deleted.length > 0;\n\n if (!hasChanges) {\n logger.success('Already up to date.');\n return;\n }\n\n console.log();\n console.log(chalk.bold('\u2550\u2550\u2550 Summary \u2550\u2550\u2550'));\n logger.success('Pull complete!');\n logger.dim(\n `Files: +${result.downloaded.length} -${result.deleted.length} (${result.unchanged.length} unchanged)`,\n );\n logger.dim(\n `Apps: +${appResult.created.length} ~${appResult.updated.length} -${appResult.deleted.length} (${appResult.unchanged.length} unchanged)`,\n );\n } catch (error) {\n logger.error('Pull failed.');\n if (error instanceof Error) {\n logger.dim(error.message);\n }\n process.exit(1);\n }\n });\n}\n\nasync function createDefaultPackageJson(tenantDir: string, tenant: string): Promise<void> {\n const fs = await import('fs');\n const path = await import('path');\n\n const packageJsonPath = path.join(tenantDir, 'package.json');\n\n if (fs.existsSync(packageJsonPath)) {\n return;\n }\n\n const packageJson = {\n name: `farseer-scripts-${tenant}`,\n version: '1.0.0',\n description: `Farseer App scripts for ${tenant}`,\n main: 'src/index.ts',\n scripts: {},\n keywords: ['farseer', 'scripts', tenant],\n author: 'Farseer',\n license: 'ISC',\n dependencies: {\n '@google-cloud/bigquery': '^7.9.0',\n '@google-cloud/storage': '^7.12.1',\n '@googleapis/sheets': '^5.0.5',\n '@sendgrid/mail': '^7.7.0',\n '@types/node-forge': '^1.3.11',\n '@xmldom/xmldom': '^0.9.8',\n arquero: '^5.4.1',\n axios: '^1.10.0',\n 'axios-retry': '^3.9.1',\n 'basic-ftp': '^5.0.5',\n 'client-oauth2': '^4.3.3',\n 'csv-parser': '^3.0.0',\n dotenv: '^16.4.5',\n 'draft-js': '^0.11.7',\n exceljs: '^4.4.0',\n 'farseer-client':\n 'https://storage.googleapis.com/farseer-remote-jobs-results/farseer-client/release-1.4.5.tar',\n 'farseer-client-axios':\n 'https://storage.googleapis.com/farseer-remote-jobs-results/farseer-client-axios/6898c0cb-5dca-4b2f-b325-119efc7f099e/v1.0.1.tar',\n 'fast-xml-parser': '^4.5.0',\n 'form-data': '^4.0.0',\n googleapis: '^144.0.0',\n heapdump: '^0.3.15',\n 'image-size': '^1.1.1',\n jszip: '^3.10.1',\n 'lossless-json': '^4.0.1',\n mssql: '^10.0.4',\n 'node-fetch': '^2.7.0',\n 'node-forge': '^1.3.1',\n 'node-sp-auth': '^3.0.8',\n numeral: '^2.0.6',\n oracledb: '^6.6.0',\n papaparse: '^5.5.1',\n pdfkit: '^0.14.0',\n pdfmake: '^0.2.20',\n soap: '^1.1.11',\n 'ssh2-sftp-client': '^11.0.0',\n 'strong-soap': '^4.1.13',\n 'ts-node': '^10.9.2',\n typescript: '^5.5.4',\n undici: '^6.19.8',\n uuid: '^11.1.0',\n winston: '^3.17.0',\n xlsx: 'https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz',\n 'xml-crypto': '^6.1.2',\n },\n devDependencies: {\n '@types/draft-js': '^0.11.18',\n '@types/heapdump': '^0.3.4',\n '@types/mssql': '^9.1.5',\n '@types/node': '^18.19.50',\n '@types/node-fetch': '^2.6.11',\n '@types/numeral': '^2.0.5',\n '@types/oracledb': '^6.5.3',\n '@types/papaparse': '^5.3.15',\n '@types/pdfmake': '^0.2.11',\n '@types/soap': '^0.18.0',\n '@types/ssh2-sftp-client': '^9.0.4',\n '@types/tough-cookie': '^4.0.5',\n '@types/uuid': '^10.0.0',\n '@types/xmldom': '^0.1.34',\n 'ts-node': '^10.9.2',\n typescript: '^5.5.4',\n },\n };\n\n fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2), 'utf-8');\n logger.dim(`Created package.json for ${tenant}`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAkB;AAClB,sBAAqB;AACrB,oBAAuB;AACvB,4BAA8D;AAC9D,yBAAiD;AACjD,4BAA+B;AAC/B,qBAMO;AAEA,SAAS,oBAAoB,SAAwB;AACxD,UACK,Q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