@anvil-works/anvil-cli 0.8.1 → 0.9.0-canary.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 +7 -1
- package/dist/CLILogger.d.ts +8 -41
- package/dist/CLILogger.d.ts.map +1 -1
- package/dist/WatchSession.d.ts.map +1 -1
- package/dist/cli.js +381 -339
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/convertTemplate.d.ts.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/deps.d.ts.map +1 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/gitAuth.d.ts.map +1 -1
- package/dist/commands/version.d.ts.map +1 -1
- package/dist/commands/watch.d.ts.map +1 -1
- package/dist/index.js +218 -77
- package/dist/logger.d.ts +61 -5
- package/dist/logger.d.ts.map +1 -1
- package/dist/program.d.ts.map +1 -1
- package/dist/programBase.d.ts.map +1 -1
- package/dist/services/oauth-login.d.ts.map +1 -1
- package/dist/watch/SaveProcessor.d.ts +3 -5
- package/dist/watch/SaveProcessor.d.ts.map +1 -1
- package/dist/watch/SyncManager.d.ts +2 -0
- package/dist/watch/SyncManager.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/commands/config.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAepC,UAAU,eAAe;IACrB,MAAM,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IAC/B,WAAW,EAAE,MAAM,IAAI,CAAC;CAC3B;AAOD,MAAM,WAAW,cAAc;IAC3B,QAAQ,EAAE;QACN,KAAK,EAAE,MAAM,CAAC;QACd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vC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,sBAA2B,GACrC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAa5C;AAuBD,wBAAsB,mBAAmB,CACrC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,sBAA2B,GACrC,OAAO,CAAC,qBAAqB,CAAC,CA6ChC;AAED,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoCrE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,OAAO,EAAE,cAAc,EAAwB,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAGH,yBAAyB,EAMzB,KAAK,eAAe,EACpB,KAAK,cAAc,EACtB,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,C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":"deps.d.ts","sourceRoot":"","sources":["../../src/commands/deps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../src/commands/deps.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA0E1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/commands/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,OAAO,EAKH,wBAAwB,EAC3B,MAAM,gBAAgB,CAAC;AAExB,wBAAsB,yBAAyB,CAAC,OAAO,GAAE,wBAA6B;;;;;GASrF;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/commands/env.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,OAAO,EAKH,wBAAwB,EAC3B,MAAM,gBAAgB,CAAC;AAExB,wBAAsB,yBAAyB,CAAC,OAAO,GAAE,wBAA6B;;;;;GASrF;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiDzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitAuth.d.ts","sourceRoot":"","sources":["../../src/commands/gitAuth.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAKpC,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAkB,MAAM,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AmB,GAAG,MAAM,CA2E7E;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyB7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/commands/version.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/commands/version.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,MAAM,WAAW,WAAW;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,CAO3D;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAc9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAgB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../src/commands/watch.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,OAAO,EAAgB,MAAM,WAAW,CAAC;AAIlD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAO/C,OAAO,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE1F,OAAO,EAAE,YAAY,EAA6B,MAAM,uBAAuB,CAAC;AAuBhF,UAAU,yBAAyB;IAC/B,+BAA+B,EAAE,OAAO,+BAA+B,CAAC;IACxE,iBAAiB,EAAE,OAAO,iBAAiB,CAAC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GAC3C,OAAO,CAAC,OAAO,CAAC,CAgRlB;AAED,wBAAsB,8BAA8B,CAChD,OAAO,EAAE,yBAAyB,EAClC,OAAO,EAAE;IACL,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,GACF,OAAO,CAAC,IAAI,CAAC,CA6Gf;AA2KD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CA0C9D"}
|
package/dist/index.js
CHANGED
|
@@ -6705,10 +6705,6 @@ var __webpack_modules__ = {
|
|
|
6705
6705
|
"use strict";
|
|
6706
6706
|
module.exports = require("fs");
|
|
6707
6707
|
},
|
|
6708
|
-
ora (module) {
|
|
6709
|
-
"use strict";
|
|
6710
|
-
module.exports = require("ora");
|
|
6711
|
-
},
|
|
6712
6708
|
os (module) {
|
|
6713
6709
|
"use strict";
|
|
6714
6710
|
module.exports = require("os");
|
|
@@ -7489,7 +7485,7 @@ var __webpack_exports__ = {};
|
|
|
7489
7485
|
uB: ()=>config_getPreferredEditorCommand,
|
|
7490
7486
|
Bc: ()=>getSettableConfigKeys,
|
|
7491
7487
|
P$: ()=>config_isCommandAvailable,
|
|
7492
|
-
n: ()=>
|
|
7488
|
+
n: ()=>isDevMode,
|
|
7493
7489
|
Wj: ()=>config_isTestMode,
|
|
7494
7490
|
Wc: ()=>config_normalizeAnvilOrigin,
|
|
7495
7491
|
Vl: ()=>config_normalizeAnvilUrl,
|
|
@@ -13143,9 +13139,9 @@ var __webpack_exports__ = {};
|
|
|
13143
13139
|
const fromConfig = config_getConfig("anvilUrl");
|
|
13144
13140
|
if ("string" == typeof fromConfig && fromConfig.trim()) return fromConfig.trim();
|
|
13145
13141
|
if (config_isTestMode()) return process.env.ANVIL_API_ORIGIN || "http://localhost:3000";
|
|
13146
|
-
return
|
|
13142
|
+
return isDevMode() ? "http://localhost:3000" : "https://anvil.works";
|
|
13147
13143
|
}
|
|
13148
|
-
function
|
|
13144
|
+
function isDevMode() {
|
|
13149
13145
|
const devMode = config_getConfig("devMode");
|
|
13150
13146
|
return true === devMode;
|
|
13151
13147
|
}
|
|
@@ -13161,7 +13157,7 @@ var __webpack_exports__ = {};
|
|
|
13161
13157
|
if (!process.stdin.isTTY || !process.stdout.isTTY) throw new Error(`${action} requires interactive input, but stdin/stdout is not a TTY. ${explicitAlternative}`);
|
|
13162
13158
|
}
|
|
13163
13159
|
const logger_timestamp = ()=>new Date().toISOString();
|
|
13164
|
-
const
|
|
13160
|
+
const verboseTimestamp = ()=>{
|
|
13165
13161
|
const now = new Date();
|
|
13166
13162
|
const time = now.toLocaleTimeString("en-US", {
|
|
13167
13163
|
hour12: false,
|
|
@@ -13178,16 +13174,35 @@ var __webpack_exports__ = {};
|
|
|
13178
13174
|
function writeJson(entry) {
|
|
13179
13175
|
console.log(JSON.stringify(entry));
|
|
13180
13176
|
}
|
|
13181
|
-
|
|
13177
|
+
function writeStdout(...args) {
|
|
13178
|
+
console.log(...args);
|
|
13179
|
+
}
|
|
13180
|
+
function logger_logJsonResult(success, options) {
|
|
13181
|
+
if (globalConfig_getGlobalOutputConfig().jsonMode) writeJson({
|
|
13182
|
+
type: "result",
|
|
13183
|
+
success,
|
|
13184
|
+
message: options?.message,
|
|
13185
|
+
data: options?.data,
|
|
13186
|
+
error: options?.error,
|
|
13187
|
+
timestamp: logger_timestamp()
|
|
13188
|
+
});
|
|
13189
|
+
}
|
|
13190
|
+
class BaseLogger {
|
|
13182
13191
|
paused = false;
|
|
13183
13192
|
get jsonMode() {
|
|
13184
13193
|
return globalConfig_getGlobalOutputConfig().jsonMode;
|
|
13185
13194
|
}
|
|
13186
|
-
|
|
13195
|
+
isDebugEnabled() {
|
|
13196
|
+
return isDevMode();
|
|
13197
|
+
}
|
|
13198
|
+
isVerboseEnabled() {
|
|
13199
|
+
return globalConfig_getGlobalOutputConfig().verbose || Boolean(config_getConfig("verbose"));
|
|
13200
|
+
}
|
|
13201
|
+
write(...args) {
|
|
13187
13202
|
if (this.paused) return;
|
|
13188
|
-
console.
|
|
13203
|
+
console.error(...args);
|
|
13189
13204
|
}
|
|
13190
|
-
|
|
13205
|
+
writeLogJson(level, message) {
|
|
13191
13206
|
if (this.paused) return;
|
|
13192
13207
|
writeJson({
|
|
13193
13208
|
type: "log",
|
|
@@ -13196,59 +13211,80 @@ var __webpack_exports__ = {};
|
|
|
13196
13211
|
timestamp: logger_timestamp()
|
|
13197
13212
|
});
|
|
13198
13213
|
}
|
|
13214
|
+
writeProgressJson(key, status, message) {
|
|
13215
|
+
writeJson({
|
|
13216
|
+
type: "progress",
|
|
13217
|
+
key,
|
|
13218
|
+
status,
|
|
13219
|
+
message,
|
|
13220
|
+
timestamp: logger_timestamp()
|
|
13221
|
+
});
|
|
13222
|
+
}
|
|
13223
|
+
result(text, options) {
|
|
13224
|
+
if (this.jsonMode) return void logger_logJsonResult(options.success ?? true, options.json);
|
|
13225
|
+
const lines = "function" == typeof text ? text() : "string" == typeof text ? [
|
|
13226
|
+
text
|
|
13227
|
+
] : text;
|
|
13228
|
+
for (const line of lines)writeStdout(line);
|
|
13229
|
+
if (options.note) this.info(options.note);
|
|
13230
|
+
}
|
|
13231
|
+
logAt(level, prefix, args) {
|
|
13232
|
+
if (this.jsonMode) this.writeLogJson(level, args.map(String).join(" "));
|
|
13233
|
+
else this.write(...prefix, ...args);
|
|
13234
|
+
}
|
|
13199
13235
|
debug(...args) {
|
|
13200
|
-
if (
|
|
13201
|
-
|
|
13236
|
+
if (this.isDebugEnabled()) this.logAt("debug", [
|
|
13237
|
+
external_chalk_namespaceObject.chalkStderr.gray("[DEV]")
|
|
13238
|
+
], args);
|
|
13202
13239
|
}
|
|
13203
13240
|
verbose(...args) {
|
|
13204
|
-
if (
|
|
13205
|
-
|
|
13241
|
+
if (this.isVerboseEnabled()) this.logAt("verbose", [
|
|
13242
|
+
external_chalk_namespaceObject.chalkStderr.gray(`[${verboseTimestamp()}]`)
|
|
13243
|
+
], args);
|
|
13206
13244
|
}
|
|
13207
13245
|
info(...args) {
|
|
13208
|
-
|
|
13209
|
-
else this.log(...args);
|
|
13246
|
+
this.logAt("info", [], args);
|
|
13210
13247
|
}
|
|
13211
13248
|
warn(...args) {
|
|
13212
|
-
|
|
13213
|
-
|
|
13249
|
+
this.logAt("warn", [
|
|
13250
|
+
external_chalk_namespaceObject.chalkStderr.yellow("⚠")
|
|
13251
|
+
], args);
|
|
13214
13252
|
}
|
|
13215
13253
|
error(...args) {
|
|
13216
|
-
|
|
13217
|
-
|
|
13254
|
+
this.logAt("error", [
|
|
13255
|
+
external_chalk_namespaceObject.chalkStderr.red("✖")
|
|
13256
|
+
], args);
|
|
13218
13257
|
}
|
|
13219
13258
|
success(message) {
|
|
13220
|
-
|
|
13221
|
-
|
|
13259
|
+
this.logAt("info", [
|
|
13260
|
+
external_chalk_namespaceObject.chalkStderr.green("✔")
|
|
13261
|
+
], [
|
|
13262
|
+
message
|
|
13263
|
+
]);
|
|
13222
13264
|
}
|
|
13223
13265
|
progress(key, message) {
|
|
13224
|
-
if (this.
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
status: "start",
|
|
13228
|
-
message,
|
|
13229
|
-
timestamp: logger_timestamp()
|
|
13230
|
-
});
|
|
13231
|
-
else this.log(external_chalk_default().blue("→"), external_chalk_default().blue(message));
|
|
13266
|
+
if (this.paused) return;
|
|
13267
|
+
if (this.jsonMode) this.writeProgressJson(key, "start", message);
|
|
13268
|
+
else this.showProgressStart(key, message);
|
|
13232
13269
|
}
|
|
13233
13270
|
progressUpdate(key, message) {
|
|
13234
|
-
if (this.
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
status: "update",
|
|
13238
|
-
message,
|
|
13239
|
-
timestamp: logger_timestamp()
|
|
13240
|
-
});
|
|
13241
|
-
else this.log(external_chalk_default().blue("→"), external_chalk_default().blue(message));
|
|
13271
|
+
if (this.paused) return;
|
|
13272
|
+
if (this.jsonMode) this.writeProgressJson(key, "update", message);
|
|
13273
|
+
else this.showProgressUpdate(key, message);
|
|
13242
13274
|
}
|
|
13243
13275
|
progressEnd(key, message) {
|
|
13244
|
-
if (this.
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13276
|
+
if (this.paused) return;
|
|
13277
|
+
if (this.jsonMode) this.writeProgressJson(key, "end", message || "");
|
|
13278
|
+
else this.showProgressEnd(key, message);
|
|
13279
|
+
}
|
|
13280
|
+
showProgressStart(_key, message) {
|
|
13281
|
+
this.write(external_chalk_namespaceObject.chalkStderr.blue("→"), external_chalk_namespaceObject.chalkStderr.blue(message));
|
|
13282
|
+
}
|
|
13283
|
+
showProgressUpdate(_key, message) {
|
|
13284
|
+
this.write(external_chalk_namespaceObject.chalkStderr.blue("→"), external_chalk_namespaceObject.chalkStderr.blue(message));
|
|
13285
|
+
}
|
|
13286
|
+
showProgressEnd(_key, message) {
|
|
13287
|
+
if (message) this.write(external_chalk_namespaceObject.chalkStderr.green("✔"), message);
|
|
13252
13288
|
}
|
|
13253
13289
|
pause() {
|
|
13254
13290
|
this.paused = true;
|
|
@@ -13256,10 +13292,6 @@ var __webpack_exports__ = {};
|
|
|
13256
13292
|
resume() {
|
|
13257
13293
|
this.paused = false;
|
|
13258
13294
|
}
|
|
13259
|
-
async prompt(questions, options) {
|
|
13260
|
-
globalConfig_assertCanPrompt(options?.action ?? "Prompt", options?.nonInteractiveHint);
|
|
13261
|
-
throw new Error("Prompting not supported in DefaultLogger. Use CLILogger for interactive prompts.");
|
|
13262
|
-
}
|
|
13263
13295
|
async confirm(message, defaultValue = true, options) {
|
|
13264
13296
|
const answer = await this.prompt([
|
|
13265
13297
|
{
|
|
@@ -13278,12 +13310,25 @@ var __webpack_exports__ = {};
|
|
|
13278
13310
|
name: "value",
|
|
13279
13311
|
message,
|
|
13280
13312
|
choices,
|
|
13281
|
-
default: defaultValue
|
|
13313
|
+
default: defaultValue,
|
|
13314
|
+
loop: false
|
|
13282
13315
|
}
|
|
13283
13316
|
], options);
|
|
13284
13317
|
return answer.value;
|
|
13285
13318
|
}
|
|
13286
13319
|
}
|
|
13320
|
+
class DefaultLogger extends BaseLogger {
|
|
13321
|
+
isDebugEnabled() {
|
|
13322
|
+
return super.isDebugEnabled() && !config_isTestMode();
|
|
13323
|
+
}
|
|
13324
|
+
isVerboseEnabled() {
|
|
13325
|
+
return super.isVerboseEnabled() && !config_isTestMode();
|
|
13326
|
+
}
|
|
13327
|
+
async prompt(questions, options) {
|
|
13328
|
+
globalConfig_assertCanPrompt(options?.action ?? "Prompt", options?.nonInteractiveHint);
|
|
13329
|
+
throw new Error("Prompting not supported in DefaultLogger. Use CLILogger for interactive prompts.");
|
|
13330
|
+
}
|
|
13331
|
+
}
|
|
13287
13332
|
let logger_logger = new DefaultLogger();
|
|
13288
13333
|
const defaultErrorHandler = (event, error)=>{
|
|
13289
13334
|
logger_logger.error(`Error in event handler for '${event}': ${error}`);
|
|
@@ -18993,13 +19038,13 @@ print(json.dumps({"issues": issues}))
|
|
|
18993
19038
|
}
|
|
18994
19039
|
return renames;
|
|
18995
19040
|
}
|
|
18996
|
-
async
|
|
19041
|
+
async getCommittedAnvilYaml(version) {
|
|
18997
19042
|
try {
|
|
18998
|
-
const content = await this.config.gitService.show(
|
|
19043
|
+
const content = await this.config.gitService.show(`${version}:anvil.yaml`);
|
|
18999
19044
|
const parsedYaml = external_js_yaml_namespaceObject.load(content);
|
|
19000
19045
|
if (!parsedYaml || "object" != typeof parsedYaml) return null;
|
|
19001
19046
|
try {
|
|
19002
|
-
const requirements = await this.config.gitService.show(
|
|
19047
|
+
const requirements = await this.config.gitService.show(`${version}:server_code/requirements.txt`);
|
|
19003
19048
|
parsedYaml.runtime_options = {
|
|
19004
19049
|
...parsedYaml.runtime_options ?? {},
|
|
19005
19050
|
server_spec: {
|
|
@@ -19013,7 +19058,22 @@ print(json.dumps({"issues": issues}))
|
|
|
19013
19058
|
return null;
|
|
19014
19059
|
}
|
|
19015
19060
|
}
|
|
19061
|
+
async getAnvilYamlUpdates(previousYaml) {
|
|
19062
|
+
const changes = await getAnvilYamlChanges(this.config.repoPath, previousYaml, {
|
|
19063
|
+
logger: this.logger
|
|
19064
|
+
});
|
|
19065
|
+
return changes.map(({ key, value })=>{
|
|
19066
|
+
this.logger.verbose(` ✓ anvil.yaml[${key}] → [["${key}"], ...]`);
|
|
19067
|
+
return [
|
|
19068
|
+
[
|
|
19069
|
+
key
|
|
19070
|
+
],
|
|
19071
|
+
value
|
|
19072
|
+
];
|
|
19073
|
+
});
|
|
19074
|
+
}
|
|
19016
19075
|
async processBatchedChanges(changes) {
|
|
19076
|
+
const version = this.config.getCommitId();
|
|
19017
19077
|
const saveArray = [];
|
|
19018
19078
|
const originalFilePaths = [];
|
|
19019
19079
|
let anvilYamlDependenciesChanged = false;
|
|
@@ -19022,10 +19082,8 @@ print(json.dumps({"issues": issues}))
|
|
|
19022
19082
|
});
|
|
19023
19083
|
for (const change of deduplicatedChanges){
|
|
19024
19084
|
if ("anvil.yaml" === change.path) {
|
|
19025
|
-
const previousAnvilYaml = await this.
|
|
19026
|
-
const anvilChanges = await
|
|
19027
|
-
logger: this.logger
|
|
19028
|
-
});
|
|
19085
|
+
const previousAnvilYaml = await this.getCommittedAnvilYaml(version);
|
|
19086
|
+
const anvilChanges = await this.getAnvilYamlUpdates(previousAnvilYaml);
|
|
19029
19087
|
const previousDependencies = normalizeAnvilYamlDependenciesValue(previousAnvilYaml?.dependencies);
|
|
19030
19088
|
const currentDependencies = await readAnvilYamlDependencies(this.config.repoPath);
|
|
19031
19089
|
if (!anvilYamlDependenciesEqual(previousDependencies, currentDependencies)) anvilYamlDependenciesChanged = true;
|
|
@@ -19033,15 +19091,7 @@ print(json.dumps({"issues": issues}))
|
|
|
19033
19091
|
this.logger.verbose(" Ignoring anvil.yaml: No changes detected");
|
|
19034
19092
|
continue;
|
|
19035
19093
|
}
|
|
19036
|
-
|
|
19037
|
-
saveArray.push([
|
|
19038
|
-
[
|
|
19039
|
-
key
|
|
19040
|
-
],
|
|
19041
|
-
value
|
|
19042
|
-
]);
|
|
19043
|
-
this.logger.verbose(` ✓ anvil.yaml[${key}] → [["${key}"], ...]`);
|
|
19044
|
-
}
|
|
19094
|
+
saveArray.push(...anvilChanges);
|
|
19045
19095
|
originalFilePaths.push(change.path);
|
|
19046
19096
|
continue;
|
|
19047
19097
|
}
|
|
@@ -19079,7 +19129,7 @@ print(json.dumps({"issues": issues}))
|
|
|
19079
19129
|
reason: "No savable changes"
|
|
19080
19130
|
};
|
|
19081
19131
|
}
|
|
19082
|
-
await this.sendSavesToAnvil(saveArray, originalFilePaths);
|
|
19132
|
+
await this.sendSavesToAnvil(saveArray, originalFilePaths, version);
|
|
19083
19133
|
return {
|
|
19084
19134
|
skipped: false,
|
|
19085
19135
|
anvilYamlDependenciesChanged
|
|
@@ -19099,14 +19149,14 @@ print(json.dumps({"issues": issues}))
|
|
|
19099
19149
|
const changeDesc = "rename" === change.type && change.from ? `${change.from} → ${change.path}` : change.path;
|
|
19100
19150
|
this.logger.verbose(` ✓ ${changeDesc} → ${JSON.stringify(savePath)} → ${contentToLog}`);
|
|
19101
19151
|
}
|
|
19102
|
-
async sendSavesToAnvil(saveArray, originalFilePaths
|
|
19152
|
+
async sendSavesToAnvil(saveArray, originalFilePaths, version, retryCount = 0) {
|
|
19103
19153
|
const fileCount = saveArray.length;
|
|
19104
19154
|
const message = 1 === fileCount ? "Syncing to Anvil" : `Syncing ${fileCount} changes to Anvil`;
|
|
19105
19155
|
this.progress.update("sync", message);
|
|
19106
19156
|
const payload = {
|
|
19107
19157
|
edit_session: this.config.editSession,
|
|
19108
19158
|
save_sequence: this.saveSequence++,
|
|
19109
|
-
version
|
|
19159
|
+
version,
|
|
19110
19160
|
updates: saveArray
|
|
19111
19161
|
};
|
|
19112
19162
|
this.logger.debug((0, external_node_util_namespaceObject.format)("PAYLOAD:", JSON.stringify(this.sanitizePayload(payload), null, 2)));
|
|
@@ -19245,9 +19295,10 @@ print(json.dumps({"issues": issues}))
|
|
|
19245
19295
|
...conflicts
|
|
19246
19296
|
];
|
|
19247
19297
|
if (0 === changesToSave.length) return;
|
|
19248
|
-
const
|
|
19298
|
+
const version = this.config.getCommitId();
|
|
19299
|
+
const { newSaveArray, newFilePaths } = await this.rerouteChanges(changesToSave, version);
|
|
19249
19300
|
if (0 === newSaveArray.length) return;
|
|
19250
|
-
await this.sendSavesToAnvil(newSaveArray, newFilePaths, retryCount + 1);
|
|
19301
|
+
await this.sendSavesToAnvil(newSaveArray, newFilePaths, version, retryCount + 1);
|
|
19251
19302
|
}
|
|
19252
19303
|
getConflictDiagnosticInfo(json_resp) {
|
|
19253
19304
|
if (json_resp.overtaken) return {
|
|
@@ -19276,11 +19327,20 @@ print(json.dumps({"issues": issues}))
|
|
|
19276
19327
|
}
|
|
19277
19328
|
if (this.config.getCommitId() === commitIdBeforePostSaveSync) this.config.setCommitId(version);
|
|
19278
19329
|
}
|
|
19279
|
-
async rerouteChanges(changes) {
|
|
19330
|
+
async rerouteChanges(changes, version) {
|
|
19280
19331
|
this.logger.verbose(`Re-routing ${changes.length} local change(s)...`);
|
|
19281
19332
|
const newSaveArray = [];
|
|
19282
19333
|
const newFilePaths = [];
|
|
19283
19334
|
for (const change of changes){
|
|
19335
|
+
if ("anvil.yaml" === change.path) {
|
|
19336
|
+
if (this.config.stagedOnly) continue;
|
|
19337
|
+
const updates = await this.getAnvilYamlUpdates(await this.getCommittedAnvilYaml(version));
|
|
19338
|
+
if (updates.length > 0) {
|
|
19339
|
+
newSaveArray.push(...updates);
|
|
19340
|
+
newFilePaths.push(change.path);
|
|
19341
|
+
}
|
|
19342
|
+
continue;
|
|
19343
|
+
}
|
|
19284
19344
|
const routeResult = await routeFileChange({
|
|
19285
19345
|
relativePath: change.path,
|
|
19286
19346
|
changeType: change.type,
|
|
@@ -19327,6 +19387,50 @@ print(json.dumps({"issues": issues}))
|
|
|
19327
19387
|
}
|
|
19328
19388
|
return normalized;
|
|
19329
19389
|
}
|
|
19390
|
+
function isServiceList(value) {
|
|
19391
|
+
return Array.isArray(value) && value.every((service)=>"string" == typeof service?.source);
|
|
19392
|
+
}
|
|
19393
|
+
function isYamlMapping(value) {
|
|
19394
|
+
return null != value && Object.getPrototypeOf(value) === Object.prototype;
|
|
19395
|
+
}
|
|
19396
|
+
function mergeServiceAdditions(base, local, remote) {
|
|
19397
|
+
const before = base ?? [];
|
|
19398
|
+
const latest = remote ?? [];
|
|
19399
|
+
if (!isServiceList(before) || !isServiceList(local) || !isServiceList(latest)) return;
|
|
19400
|
+
const existingSources = new Set(before.map((service)=>service.source));
|
|
19401
|
+
const existing = local.filter((service)=>existingSources.has(service.source));
|
|
19402
|
+
if (!deepEqual(existing, before)) return;
|
|
19403
|
+
const remoteSources = new Set(latest.map((service)=>service.source));
|
|
19404
|
+
const additions = local.filter((service)=>!existingSources.has(service.source));
|
|
19405
|
+
const sharedSources = new Set(additions.map(({ source })=>source).filter((source)=>remoteSources.has(source)));
|
|
19406
|
+
const sharedAdditions = (services)=>services.filter(({ source })=>sharedSources.has(source));
|
|
19407
|
+
if (!deepEqual(sharedAdditions(additions), sharedAdditions(latest))) return;
|
|
19408
|
+
return [
|
|
19409
|
+
...latest,
|
|
19410
|
+
...additions.filter(({ source })=>!sharedSources.has(source))
|
|
19411
|
+
];
|
|
19412
|
+
}
|
|
19413
|
+
function mergeAnvilYaml(baseContent, localContent, remoteContent) {
|
|
19414
|
+
if (baseContent === remoteContent) return localContent;
|
|
19415
|
+
const base = external_js_yaml_namespaceObject.load(baseContent);
|
|
19416
|
+
const local = external_js_yaml_namespaceObject.load(localContent);
|
|
19417
|
+
const remote = external_js_yaml_namespaceObject.load(remoteContent);
|
|
19418
|
+
if (!isYamlMapping(base) || !isYamlMapping(local) || !isYamlMapping(remote)) throw new Error("Cannot reconcile anvil.yaml: expected YAML mappings in the local and committed versions");
|
|
19419
|
+
const rebased = new Map(Object.entries(remote));
|
|
19420
|
+
for (const key of new Set([
|
|
19421
|
+
...Object.keys(base),
|
|
19422
|
+
...Object.keys(local)
|
|
19423
|
+
]))if (!(deepEqual(base[key], local[key]) || deepEqual(remote[key], local[key]))) if (deepEqual(base[key], remote[key])) if (Object.hasOwn(local, key)) rebased.set(key, local[key]);
|
|
19424
|
+
else rebased.delete(key);
|
|
19425
|
+
else {
|
|
19426
|
+
const services = "services" === key ? mergeServiceAdditions(base[key], local[key], remote[key]) : void 0;
|
|
19427
|
+
if (!services) throw new Error(`Cannot reconcile concurrent edits to anvil.yaml (${key})`);
|
|
19428
|
+
rebased.set(key, services);
|
|
19429
|
+
}
|
|
19430
|
+
const merged = Object.fromEntries(rebased);
|
|
19431
|
+
if (deepEqual(merged, local)) return localContent;
|
|
19432
|
+
return deepEqual(merged, remote) ? remoteContent : external_js_yaml_namespaceObject.dump(merged);
|
|
19433
|
+
}
|
|
19330
19434
|
class SyncManager extends Emitter {
|
|
19331
19435
|
logger;
|
|
19332
19436
|
config;
|
|
@@ -19425,9 +19529,20 @@ print(json.dumps({"issues": issues}))
|
|
|
19425
19529
|
}
|
|
19426
19530
|
}
|
|
19427
19531
|
async resetToFetchedAnvilRef(tempRef, oldCommitId, localChangesToPreserve) {
|
|
19532
|
+
const rebase = !this.config.stagedOnly && localChangesToPreserve.has("anvil.yaml") ? await this.prepareAnvilYamlRebase(tempRef) : void 0;
|
|
19428
19533
|
await this.config.gitService.reset(tempRef, "mixed");
|
|
19534
|
+
if (rebase) try {
|
|
19535
|
+
const latestContent = await external_fs_.promises.readFile(rebase.manifestPath, "utf8");
|
|
19536
|
+
const merged = latestContent === rebase.localContent ? rebase.mergedContent : mergeAnvilYaml(rebase.baseContent, latestContent, rebase.remoteContent);
|
|
19537
|
+
if (merged !== latestContent) await external_fs_.promises.writeFile(rebase.manifestPath, merged);
|
|
19538
|
+
} catch (error) {
|
|
19539
|
+
await this.config.gitService.reset(rebase.baseCommit, "mixed");
|
|
19540
|
+
throw error;
|
|
19541
|
+
}
|
|
19429
19542
|
const newCommitId = await this.config.gitService.getCommitId();
|
|
19430
|
-
await this.config.gitService.checkout([
|
|
19543
|
+
await this.config.gitService.checkout(rebase ? [
|
|
19544
|
+
".anvil_editor.yaml"
|
|
19545
|
+
] : [
|
|
19431
19546
|
".anvil_editor.yaml",
|
|
19432
19547
|
"anvil.yaml"
|
|
19433
19548
|
]);
|
|
@@ -19435,6 +19550,30 @@ print(json.dumps({"issues": issues}))
|
|
|
19435
19550
|
await this.deleteFilesRemovedOnAnvilLocally(oldCommitId, newCommitId, localChangesToPreserve);
|
|
19436
19551
|
await this.discardFormattingOnlyYamlChanges();
|
|
19437
19552
|
}
|
|
19553
|
+
async prepareAnvilYamlRebase(remoteRef) {
|
|
19554
|
+
const baseCommit = await this.config.gitService.getCommitId();
|
|
19555
|
+
const [baseContent, remoteContent] = await Promise.all([
|
|
19556
|
+
this.config.gitService.show(`${baseCommit}:anvil.yaml`),
|
|
19557
|
+
this.config.gitService.show(`${remoteRef}:anvil.yaml`)
|
|
19558
|
+
]);
|
|
19559
|
+
const manifestPath = external_path_default().join(this.config.repoPath, "anvil.yaml");
|
|
19560
|
+
let localContent;
|
|
19561
|
+
try {
|
|
19562
|
+
localContent = await external_fs_.promises.readFile(manifestPath, "utf8");
|
|
19563
|
+
} catch (error) {
|
|
19564
|
+
if ("ENOENT" === error.code) return;
|
|
19565
|
+
throw error;
|
|
19566
|
+
}
|
|
19567
|
+
const mergedContent = mergeAnvilYaml(baseContent, localContent, remoteContent);
|
|
19568
|
+
return {
|
|
19569
|
+
manifestPath,
|
|
19570
|
+
baseCommit,
|
|
19571
|
+
baseContent,
|
|
19572
|
+
remoteContent,
|
|
19573
|
+
localContent,
|
|
19574
|
+
mergedContent
|
|
19575
|
+
};
|
|
19576
|
+
}
|
|
19438
19577
|
isCleanForFastForward(status) {
|
|
19439
19578
|
return status.isClean && 0 === status.modified.length && 0 === status.notAdded.length && 0 === status.created.length && 0 === status.deleted.length && 0 === status.staged.length && 0 === status.renamed.length;
|
|
19440
19579
|
}
|
|
@@ -19630,6 +19769,7 @@ print(json.dumps({"issues": issues}))
|
|
|
19630
19769
|
username: this.username,
|
|
19631
19770
|
gitService: this.gitService,
|
|
19632
19771
|
editorYaml: this.editorYaml,
|
|
19772
|
+
stagedOnly: this.stagedOnly,
|
|
19633
19773
|
getAuthToken: ()=>this.authToken,
|
|
19634
19774
|
setAuthToken: (token)=>{
|
|
19635
19775
|
this.authToken = token;
|
|
@@ -19685,6 +19825,7 @@ print(json.dumps({"issues": issues}))
|
|
|
19685
19825
|
const status = await this.gitService.getStatus();
|
|
19686
19826
|
const locallyChangedFiles = buildLocalChangesSet(status);
|
|
19687
19827
|
if (!this.stagedOnly) for (const filePath of savedFilePaths)locallyChangedFiles.add(filePath);
|
|
19828
|
+
if (savedFilePaths.has("anvil.yaml")) locallyChangedFiles.delete("anvil.yaml");
|
|
19688
19829
|
return this.syncManager.syncRemoteChanges(locallyChangedFiles);
|
|
19689
19830
|
}
|
|
19690
19831
|
async connectWebSocket() {
|
|
@@ -21123,7 +21264,7 @@ print(json.dumps({"issues": issues}))
|
|
|
21123
21264
|
};
|
|
21124
21265
|
return {
|
|
21125
21266
|
source: "default",
|
|
21126
|
-
url:
|
|
21267
|
+
url: isDevMode() ? "http://localhost:3000" : "https://anvil.works"
|
|
21127
21268
|
};
|
|
21128
21269
|
}
|
|
21129
21270
|
const defaultCheckoutDeps = {
|