@floless/app 0.108.1 → 0.109.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/dist/floless-server.cjs +253 -203
- package/dist/web/app.css +36 -1
- package/dist/web/app.js +6 -1
- package/dist/web/aware.js +6 -0
- package/dist/web/steel-detail-refs.js +69 -0
- package/dist/web/steel-editor.html +6 -3
- package/dist/web/workspaces.js +155 -1
- package/package.json +1 -1
package/dist/floless-server.cjs
CHANGED
|
@@ -3887,9 +3887,9 @@ var require_caller = __commonJS({
|
|
|
3887
3887
|
if (!Array.isArray(stack)) {
|
|
3888
3888
|
return void 0;
|
|
3889
3889
|
}
|
|
3890
|
-
const
|
|
3890
|
+
const entries2 = stack.slice(2);
|
|
3891
3891
|
const fileNames = [];
|
|
3892
|
-
for (const entry2 of
|
|
3892
|
+
for (const entry2 of entries2) {
|
|
3893
3893
|
if (!entry2) {
|
|
3894
3894
|
continue;
|
|
3895
3895
|
}
|
|
@@ -11213,13 +11213,13 @@ var require_context = __commonJS({
|
|
|
11213
11213
|
this.server = server;
|
|
11214
11214
|
}
|
|
11215
11215
|
function defaultSchemaErrorFormatter(errors, dataVar) {
|
|
11216
|
-
let
|
|
11216
|
+
let text3 = "";
|
|
11217
11217
|
const separator = ", ";
|
|
11218
11218
|
for (let i = 0; i !== errors.length; ++i) {
|
|
11219
11219
|
const e = errors[i];
|
|
11220
|
-
|
|
11220
|
+
text3 += dataVar + (e.instancePath || "") + " " + e.message + separator;
|
|
11221
11221
|
}
|
|
11222
|
-
return new Error(
|
|
11222
|
+
return new Error(text3.slice(0, -separator.length));
|
|
11223
11223
|
}
|
|
11224
11224
|
module2.exports = Context;
|
|
11225
11225
|
}
|
|
@@ -11915,20 +11915,20 @@ var require_secure_json_parse = __commonJS({
|
|
|
11915
11915
|
var hasBuffer = typeof Buffer !== "undefined";
|
|
11916
11916
|
var suspectProtoRx = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/;
|
|
11917
11917
|
var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
|
|
11918
|
-
function _parse(
|
|
11918
|
+
function _parse(text3, reviver, options) {
|
|
11919
11919
|
if (options == null) {
|
|
11920
11920
|
if (reviver !== null && typeof reviver === "object") {
|
|
11921
11921
|
options = reviver;
|
|
11922
11922
|
reviver = void 0;
|
|
11923
11923
|
}
|
|
11924
11924
|
}
|
|
11925
|
-
if (hasBuffer && Buffer.isBuffer(
|
|
11926
|
-
|
|
11925
|
+
if (hasBuffer && Buffer.isBuffer(text3)) {
|
|
11926
|
+
text3 = text3.toString();
|
|
11927
11927
|
}
|
|
11928
|
-
if (
|
|
11929
|
-
|
|
11928
|
+
if (text3 && text3.charCodeAt(0) === 65279) {
|
|
11929
|
+
text3 = text3.slice(1);
|
|
11930
11930
|
}
|
|
11931
|
-
const obj2 = JSON.parse(
|
|
11931
|
+
const obj2 = JSON.parse(text3, reviver);
|
|
11932
11932
|
if (obj2 === null || typeof obj2 !== "object") {
|
|
11933
11933
|
return obj2;
|
|
11934
11934
|
}
|
|
@@ -11938,15 +11938,15 @@ var require_secure_json_parse = __commonJS({
|
|
|
11938
11938
|
return obj2;
|
|
11939
11939
|
}
|
|
11940
11940
|
if (protoAction !== "ignore" && constructorAction !== "ignore") {
|
|
11941
|
-
if (suspectProtoRx.test(
|
|
11941
|
+
if (suspectProtoRx.test(text3) === false && suspectConstructorRx.test(text3) === false) {
|
|
11942
11942
|
return obj2;
|
|
11943
11943
|
}
|
|
11944
11944
|
} else if (protoAction !== "ignore" && constructorAction === "ignore") {
|
|
11945
|
-
if (suspectProtoRx.test(
|
|
11945
|
+
if (suspectProtoRx.test(text3) === false) {
|
|
11946
11946
|
return obj2;
|
|
11947
11947
|
}
|
|
11948
11948
|
} else {
|
|
11949
|
-
if (suspectConstructorRx.test(
|
|
11949
|
+
if (suspectConstructorRx.test(text3) === false) {
|
|
11950
11950
|
return obj2;
|
|
11951
11951
|
}
|
|
11952
11952
|
}
|
|
@@ -11984,20 +11984,20 @@ var require_secure_json_parse = __commonJS({
|
|
|
11984
11984
|
}
|
|
11985
11985
|
return obj2;
|
|
11986
11986
|
}
|
|
11987
|
-
function parse(
|
|
11987
|
+
function parse(text3, reviver, options) {
|
|
11988
11988
|
const { stackTraceLimit } = Error;
|
|
11989
11989
|
Error.stackTraceLimit = 0;
|
|
11990
11990
|
try {
|
|
11991
|
-
return _parse(
|
|
11991
|
+
return _parse(text3, reviver, options);
|
|
11992
11992
|
} finally {
|
|
11993
11993
|
Error.stackTraceLimit = stackTraceLimit;
|
|
11994
11994
|
}
|
|
11995
11995
|
}
|
|
11996
|
-
function safeParse(
|
|
11996
|
+
function safeParse(text3, reviver) {
|
|
11997
11997
|
const { stackTraceLimit } = Error;
|
|
11998
11998
|
Error.stackTraceLimit = 0;
|
|
11999
11999
|
try {
|
|
12000
|
-
return _parse(
|
|
12000
|
+
return _parse(text3, reviver, { safe: true });
|
|
12001
12001
|
} catch {
|
|
12002
12002
|
return void 0;
|
|
12003
12003
|
} finally {
|
|
@@ -16640,7 +16640,7 @@ var require_core = __commonJS({
|
|
|
16640
16640
|
errorsText(errors = this.errors, { separator = ", ", dataVar = "data" } = {}) {
|
|
16641
16641
|
if (!errors || errors.length === 0)
|
|
16642
16642
|
return "No errors";
|
|
16643
|
-
return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((
|
|
16643
|
+
return errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text3, msg) => text3 + separator + msg);
|
|
16644
16644
|
}
|
|
16645
16645
|
$dataMetaSchema(metaSchema, keywordsJsonPointers) {
|
|
16646
16646
|
const rules = this.RULES.all;
|
|
@@ -38743,12 +38743,12 @@ var require_commonjs5 = __commonJS({
|
|
|
38743
38743
|
}
|
|
38744
38744
|
this.#readdirCBInFlight = true;
|
|
38745
38745
|
const fullpath = this.fullpath();
|
|
38746
|
-
this.#fs.readdir(fullpath, { withFileTypes: true }, (er,
|
|
38746
|
+
this.#fs.readdir(fullpath, { withFileTypes: true }, (er, entries2) => {
|
|
38747
38747
|
if (er) {
|
|
38748
38748
|
this.#readdirFail(er.code);
|
|
38749
38749
|
children.provisional = 0;
|
|
38750
38750
|
} else {
|
|
38751
|
-
for (const e of
|
|
38751
|
+
for (const e of entries2) {
|
|
38752
38752
|
this.#readdirAddChild(e, children);
|
|
38753
38753
|
}
|
|
38754
38754
|
this.#readdirSuccess(children);
|
|
@@ -39305,11 +39305,11 @@ var require_commonjs5 = __commonJS({
|
|
|
39305
39305
|
const dirs = /* @__PURE__ */ new Set();
|
|
39306
39306
|
const walk2 = (dir, cb) => {
|
|
39307
39307
|
dirs.add(dir);
|
|
39308
|
-
dir.readdirCB((er,
|
|
39308
|
+
dir.readdirCB((er, entries2) => {
|
|
39309
39309
|
if (er) {
|
|
39310
39310
|
return cb(er);
|
|
39311
39311
|
}
|
|
39312
|
-
let len =
|
|
39312
|
+
let len = entries2.length;
|
|
39313
39313
|
if (!len)
|
|
39314
39314
|
return cb();
|
|
39315
39315
|
const next = () => {
|
|
@@ -39317,7 +39317,7 @@ var require_commonjs5 = __commonJS({
|
|
|
39317
39317
|
cb();
|
|
39318
39318
|
}
|
|
39319
39319
|
};
|
|
39320
|
-
for (const e of
|
|
39320
|
+
for (const e of entries2) {
|
|
39321
39321
|
if (!filter || filter(e)) {
|
|
39322
39322
|
results.push(withFileTypes ? e : e.fullpath());
|
|
39323
39323
|
}
|
|
@@ -39356,8 +39356,8 @@ var require_commonjs5 = __commonJS({
|
|
|
39356
39356
|
}
|
|
39357
39357
|
const dirs = /* @__PURE__ */ new Set([entry2]);
|
|
39358
39358
|
for (const dir of dirs) {
|
|
39359
|
-
const
|
|
39360
|
-
for (const e of
|
|
39359
|
+
const entries2 = dir.readdirSync();
|
|
39360
|
+
for (const e of entries2) {
|
|
39361
39361
|
if (!filter || filter(e)) {
|
|
39362
39362
|
results.push(withFileTypes ? e : e.fullpath());
|
|
39363
39363
|
}
|
|
@@ -39417,8 +39417,8 @@ var require_commonjs5 = __commonJS({
|
|
|
39417
39417
|
}
|
|
39418
39418
|
const dirs = /* @__PURE__ */ new Set([entry2]);
|
|
39419
39419
|
for (const dir of dirs) {
|
|
39420
|
-
const
|
|
39421
|
-
for (const e of
|
|
39420
|
+
const entries2 = dir.readdirSync();
|
|
39421
|
+
for (const e of entries2) {
|
|
39422
39422
|
if (!filter || filter(e)) {
|
|
39423
39423
|
yield withFileTypes ? e : e.fullpath();
|
|
39424
39424
|
}
|
|
@@ -39461,22 +39461,22 @@ var require_commonjs5 = __commonJS({
|
|
|
39461
39461
|
}
|
|
39462
39462
|
processing++;
|
|
39463
39463
|
dirs.add(dir);
|
|
39464
|
-
const onReaddir = (er,
|
|
39464
|
+
const onReaddir = (er, entries2, didRealpaths = false) => {
|
|
39465
39465
|
if (er)
|
|
39466
39466
|
return results.emit("error", er);
|
|
39467
39467
|
if (follow && !didRealpaths) {
|
|
39468
39468
|
const promises = [];
|
|
39469
|
-
for (const e of
|
|
39469
|
+
for (const e of entries2) {
|
|
39470
39470
|
if (e.isSymbolicLink()) {
|
|
39471
39471
|
promises.push(e.realpath().then((r) => r?.isUnknown() ? r.lstat() : r));
|
|
39472
39472
|
}
|
|
39473
39473
|
}
|
|
39474
39474
|
if (promises.length) {
|
|
39475
|
-
Promise.all(promises).then(() => onReaddir(null,
|
|
39475
|
+
Promise.all(promises).then(() => onReaddir(null, entries2, true));
|
|
39476
39476
|
return;
|
|
39477
39477
|
}
|
|
39478
39478
|
}
|
|
39479
|
-
for (const e of
|
|
39479
|
+
for (const e of entries2) {
|
|
39480
39480
|
if (e && (!filter || filter(e))) {
|
|
39481
39481
|
if (!results.write(withFileTypes ? e : e.fullpath())) {
|
|
39482
39482
|
paused = true;
|
|
@@ -39484,7 +39484,7 @@ var require_commonjs5 = __commonJS({
|
|
|
39484
39484
|
}
|
|
39485
39485
|
}
|
|
39486
39486
|
processing--;
|
|
39487
|
-
for (const e of
|
|
39487
|
+
for (const e of entries2) {
|
|
39488
39488
|
const r = e.realpathCached() || e;
|
|
39489
39489
|
if (r.shouldWalk(dirs, walkFilter)) {
|
|
39490
39490
|
queue2.push(r);
|
|
@@ -39530,8 +39530,8 @@ var require_commonjs5 = __commonJS({
|
|
|
39530
39530
|
}
|
|
39531
39531
|
processing++;
|
|
39532
39532
|
dirs.add(dir);
|
|
39533
|
-
const
|
|
39534
|
-
for (const e of
|
|
39533
|
+
const entries2 = dir.readdirSync();
|
|
39534
|
+
for (const e of entries2) {
|
|
39535
39535
|
if (!filter || filter(e)) {
|
|
39536
39536
|
if (!results.write(withFileTypes ? e : e.fullpath())) {
|
|
39537
39537
|
paused = true;
|
|
@@ -39539,7 +39539,7 @@ var require_commonjs5 = __commonJS({
|
|
|
39539
39539
|
}
|
|
39540
39540
|
}
|
|
39541
39541
|
processing--;
|
|
39542
|
-
for (const e of
|
|
39542
|
+
for (const e of entries2) {
|
|
39543
39543
|
let r = e;
|
|
39544
39544
|
if (e.isSymbolicLink()) {
|
|
39545
39545
|
if (!(follow && (r = e.realpathSync())))
|
|
@@ -40072,10 +40072,10 @@ var require_processor = __commonJS({
|
|
|
40072
40072
|
// child entry, and a set of matches, and
|
|
40073
40073
|
// a hasWalkedCache that's a copy of this one
|
|
40074
40074
|
// then we're going to call
|
|
40075
|
-
filterEntries(parent,
|
|
40075
|
+
filterEntries(parent, entries2) {
|
|
40076
40076
|
const patterns = this.subwalks.get(parent);
|
|
40077
40077
|
const results = this.child();
|
|
40078
|
-
for (const e of
|
|
40078
|
+
for (const e of entries2) {
|
|
40079
40079
|
for (const pattern of patterns) {
|
|
40080
40080
|
const absolute = pattern.isAbsolute();
|
|
40081
40081
|
const p = pattern.pattern();
|
|
@@ -40327,13 +40327,13 @@ var require_walker = __commonJS({
|
|
|
40327
40327
|
if (t.calledReaddir())
|
|
40328
40328
|
this.walkCB3(t, childrenCached, processor, next);
|
|
40329
40329
|
else {
|
|
40330
|
-
t.readdirCB((_,
|
|
40330
|
+
t.readdirCB((_, entries2) => this.walkCB3(t, entries2, processor, next), true);
|
|
40331
40331
|
}
|
|
40332
40332
|
}
|
|
40333
40333
|
next();
|
|
40334
40334
|
}
|
|
40335
|
-
walkCB3(target,
|
|
40336
|
-
processor = processor.filterEntries(target,
|
|
40335
|
+
walkCB3(target, entries2, processor, cb) {
|
|
40336
|
+
processor = processor.filterEntries(target, entries2);
|
|
40337
40337
|
let tasks = 1;
|
|
40338
40338
|
const next = () => {
|
|
40339
40339
|
if (--tasks === 0)
|
|
@@ -40386,8 +40386,8 @@ var require_walker = __commonJS({
|
|
|
40386
40386
|
}
|
|
40387
40387
|
next();
|
|
40388
40388
|
}
|
|
40389
|
-
walkCB3Sync(target,
|
|
40390
|
-
processor = processor.filterEntries(target,
|
|
40389
|
+
walkCB3Sync(target, entries2, processor, cb) {
|
|
40390
|
+
processor = processor.filterEntries(target, entries2);
|
|
40391
40391
|
let tasks = 1;
|
|
40392
40392
|
const next = () => {
|
|
40393
40393
|
if (--tasks === 0)
|
|
@@ -42874,13 +42874,13 @@ var require_dirList = __commonJS({
|
|
|
42874
42874
|
* note: can't use glob because don't get error on non existing dir
|
|
42875
42875
|
*/
|
|
42876
42876
|
list: async function(dir, options, dotfiles) {
|
|
42877
|
-
const
|
|
42877
|
+
const entries2 = { dirs: [], files: [] };
|
|
42878
42878
|
let files2 = await fs2.readdir(dir);
|
|
42879
42879
|
if (dotfiles === "deny" || dotfiles === "ignore") {
|
|
42880
42880
|
files2 = files2.filter((file) => file.charAt(0) !== ".");
|
|
42881
42881
|
}
|
|
42882
42882
|
if (files2.length < 1) {
|
|
42883
|
-
return
|
|
42883
|
+
return entries2;
|
|
42884
42884
|
}
|
|
42885
42885
|
const worker = async (filename) => {
|
|
42886
42886
|
let stats;
|
|
@@ -42894,16 +42894,16 @@ var require_dirList = __commonJS({
|
|
|
42894
42894
|
if (options.extendedFolderInfo) {
|
|
42895
42895
|
entry2.extendedInfo = await dirList.getExtendedInfo(path.join(dir, filename));
|
|
42896
42896
|
}
|
|
42897
|
-
|
|
42897
|
+
entries2.dirs.push(entry2);
|
|
42898
42898
|
} else {
|
|
42899
|
-
|
|
42899
|
+
entries2.files.push(entry2);
|
|
42900
42900
|
}
|
|
42901
42901
|
};
|
|
42902
42902
|
const queue2 = fastq.promise(worker, fastqConcurrency);
|
|
42903
42903
|
await Promise.all(files2.map((filename) => queue2.push(filename)));
|
|
42904
|
-
|
|
42905
|
-
|
|
42906
|
-
return
|
|
42904
|
+
entries2.dirs.sort((a, b) => a.name.localeCompare(b.name));
|
|
42905
|
+
entries2.files.sort((a, b) => a.name.localeCompare(b.name));
|
|
42906
|
+
return entries2;
|
|
42907
42907
|
},
|
|
42908
42908
|
/**
|
|
42909
42909
|
* send dir list content, or 404 on error
|
|
@@ -42917,9 +42917,9 @@ var require_dirList = __commonJS({
|
|
|
42917
42917
|
if (reply.request.query.format === "html" && typeof options.render !== "function") {
|
|
42918
42918
|
throw new TypeError("The `list.render` option must be a function and is required with the URL parameter `format=html`");
|
|
42919
42919
|
}
|
|
42920
|
-
let
|
|
42920
|
+
let entries2;
|
|
42921
42921
|
try {
|
|
42922
|
-
|
|
42922
|
+
entries2 = await dirList.list(dir, options, dotfiles);
|
|
42923
42923
|
} catch {
|
|
42924
42924
|
return reply.callNotFound();
|
|
42925
42925
|
}
|
|
@@ -42927,17 +42927,17 @@ var require_dirList = __commonJS({
|
|
|
42927
42927
|
if (format !== "html") {
|
|
42928
42928
|
if (options.jsonFormat !== "extended") {
|
|
42929
42929
|
const nameEntries = { dirs: [], files: [] };
|
|
42930
|
-
|
|
42931
|
-
|
|
42930
|
+
entries2.dirs.forEach((entry2) => nameEntries.dirs.push(entry2.name));
|
|
42931
|
+
entries2.files.forEach((entry2) => nameEntries.files.push(entry2.name));
|
|
42932
42932
|
await reply.send(nameEntries);
|
|
42933
42933
|
} else {
|
|
42934
|
-
await reply.send(
|
|
42934
|
+
await reply.send(entries2);
|
|
42935
42935
|
}
|
|
42936
42936
|
return;
|
|
42937
42937
|
}
|
|
42938
42938
|
const html = options.render(
|
|
42939
|
-
|
|
42940
|
-
|
|
42939
|
+
entries2.dirs.map((entry2) => dirList.htmlInfo(entry2, route, prefix, options)),
|
|
42940
|
+
entries2.files.map((entry2) => dirList.htmlInfo(entry2, route, prefix, options))
|
|
42941
42941
|
);
|
|
42942
42942
|
await reply.type("text/html").send(html);
|
|
42943
42943
|
},
|
|
@@ -44406,14 +44406,14 @@ var require_foldFlowLines = __commonJS({
|
|
|
44406
44406
|
var FOLD_FLOW = "flow";
|
|
44407
44407
|
var FOLD_BLOCK = "block";
|
|
44408
44408
|
var FOLD_QUOTED = "quoted";
|
|
44409
|
-
function foldFlowLines(
|
|
44409
|
+
function foldFlowLines(text3, indent, mode = "flow", { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) {
|
|
44410
44410
|
if (!lineWidth || lineWidth < 0)
|
|
44411
|
-
return
|
|
44411
|
+
return text3;
|
|
44412
44412
|
if (lineWidth < minContentWidth)
|
|
44413
44413
|
minContentWidth = 0;
|
|
44414
44414
|
const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length);
|
|
44415
|
-
if (
|
|
44416
|
-
return
|
|
44415
|
+
if (text3.length <= endStep)
|
|
44416
|
+
return text3;
|
|
44417
44417
|
const folds = [];
|
|
44418
44418
|
const escapedFolds = {};
|
|
44419
44419
|
let end = lineWidth - indent.length;
|
|
@@ -44430,14 +44430,14 @@ var require_foldFlowLines = __commonJS({
|
|
|
44430
44430
|
let escStart = -1;
|
|
44431
44431
|
let escEnd = -1;
|
|
44432
44432
|
if (mode === FOLD_BLOCK) {
|
|
44433
|
-
i = consumeMoreIndentedLines(
|
|
44433
|
+
i = consumeMoreIndentedLines(text3, i, indent.length);
|
|
44434
44434
|
if (i !== -1)
|
|
44435
44435
|
end = i + endStep;
|
|
44436
44436
|
}
|
|
44437
|
-
for (let ch2; ch2 =
|
|
44437
|
+
for (let ch2; ch2 = text3[i += 1]; ) {
|
|
44438
44438
|
if (mode === FOLD_QUOTED && ch2 === "\\") {
|
|
44439
44439
|
escStart = i;
|
|
44440
|
-
switch (
|
|
44440
|
+
switch (text3[i + 1]) {
|
|
44441
44441
|
case "x":
|
|
44442
44442
|
i += 3;
|
|
44443
44443
|
break;
|
|
@@ -44454,12 +44454,12 @@ var require_foldFlowLines = __commonJS({
|
|
|
44454
44454
|
}
|
|
44455
44455
|
if (ch2 === "\n") {
|
|
44456
44456
|
if (mode === FOLD_BLOCK)
|
|
44457
|
-
i = consumeMoreIndentedLines(
|
|
44457
|
+
i = consumeMoreIndentedLines(text3, i, indent.length);
|
|
44458
44458
|
end = i + indent.length + endStep;
|
|
44459
44459
|
split = void 0;
|
|
44460
44460
|
} else {
|
|
44461
44461
|
if (ch2 === " " && prev && prev !== " " && prev !== "\n" && prev !== " ") {
|
|
44462
|
-
const next =
|
|
44462
|
+
const next = text3[i + 1];
|
|
44463
44463
|
if (next && next !== " " && next !== "\n" && next !== " ")
|
|
44464
44464
|
split = i;
|
|
44465
44465
|
}
|
|
@@ -44471,12 +44471,12 @@ var require_foldFlowLines = __commonJS({
|
|
|
44471
44471
|
} else if (mode === FOLD_QUOTED) {
|
|
44472
44472
|
while (prev === " " || prev === " ") {
|
|
44473
44473
|
prev = ch2;
|
|
44474
|
-
ch2 =
|
|
44474
|
+
ch2 = text3[i += 1];
|
|
44475
44475
|
overflow = true;
|
|
44476
44476
|
}
|
|
44477
44477
|
const j = i > escEnd + 1 ? i - 2 : escStart - 1;
|
|
44478
44478
|
if (escapedFolds[j])
|
|
44479
|
-
return
|
|
44479
|
+
return text3;
|
|
44480
44480
|
folds.push(j);
|
|
44481
44481
|
escapedFolds[j] = true;
|
|
44482
44482
|
end = j + endStep;
|
|
@@ -44491,39 +44491,39 @@ var require_foldFlowLines = __commonJS({
|
|
|
44491
44491
|
if (overflow && onOverflow)
|
|
44492
44492
|
onOverflow();
|
|
44493
44493
|
if (folds.length === 0)
|
|
44494
|
-
return
|
|
44494
|
+
return text3;
|
|
44495
44495
|
if (onFold)
|
|
44496
44496
|
onFold();
|
|
44497
|
-
let res =
|
|
44497
|
+
let res = text3.slice(0, folds[0]);
|
|
44498
44498
|
for (let i2 = 0; i2 < folds.length; ++i2) {
|
|
44499
44499
|
const fold = folds[i2];
|
|
44500
|
-
const end2 = folds[i2 + 1] ||
|
|
44500
|
+
const end2 = folds[i2 + 1] || text3.length;
|
|
44501
44501
|
if (fold === 0)
|
|
44502
44502
|
res = `
|
|
44503
|
-
${indent}${
|
|
44503
|
+
${indent}${text3.slice(0, end2)}`;
|
|
44504
44504
|
else {
|
|
44505
44505
|
if (mode === FOLD_QUOTED && escapedFolds[fold])
|
|
44506
|
-
res += `${
|
|
44506
|
+
res += `${text3[fold]}\\`;
|
|
44507
44507
|
res += `
|
|
44508
|
-
${indent}${
|
|
44508
|
+
${indent}${text3.slice(fold + 1, end2)}`;
|
|
44509
44509
|
}
|
|
44510
44510
|
}
|
|
44511
44511
|
return res;
|
|
44512
44512
|
}
|
|
44513
|
-
function consumeMoreIndentedLines(
|
|
44513
|
+
function consumeMoreIndentedLines(text3, i, indent) {
|
|
44514
44514
|
let end = i;
|
|
44515
44515
|
let start = i + 1;
|
|
44516
|
-
let ch2 =
|
|
44516
|
+
let ch2 = text3[start];
|
|
44517
44517
|
while (ch2 === " " || ch2 === " ") {
|
|
44518
44518
|
if (i < start + indent) {
|
|
44519
|
-
ch2 =
|
|
44519
|
+
ch2 = text3[++i];
|
|
44520
44520
|
} else {
|
|
44521
44521
|
do {
|
|
44522
|
-
ch2 =
|
|
44522
|
+
ch2 = text3[++i];
|
|
44523
44523
|
} while (ch2 && ch2 !== "\n");
|
|
44524
44524
|
end = i;
|
|
44525
44525
|
start = i + 1;
|
|
44526
|
-
ch2 =
|
|
44526
|
+
ch2 = text3[start];
|
|
44527
44527
|
}
|
|
44528
44528
|
}
|
|
44529
44529
|
return end;
|
|
@@ -51716,13 +51716,13 @@ var APPS_DIR = process.env.AWARE_HOME ? (0, import_node_path5.join)(process.env.
|
|
|
51716
51716
|
function normalizeNote(n) {
|
|
51717
51717
|
if (n && typeof n === "object") {
|
|
51718
51718
|
const o = n;
|
|
51719
|
-
const
|
|
51719
|
+
const text4 = typeof o.text === "string" ? o.text : String(o.text ?? "");
|
|
51720
51720
|
const kind2 = o.kind === "warn" || o.kind === "error" ? o.kind : "info";
|
|
51721
|
-
return { kind: kind2, text:
|
|
51721
|
+
return { kind: kind2, text: text4 };
|
|
51722
51722
|
}
|
|
51723
|
-
const
|
|
51724
|
-
const kind = /defaulting to write-mode|not installed/i.test(
|
|
51725
|
-
return { kind, text:
|
|
51723
|
+
const text3 = String(n);
|
|
51724
|
+
const kind = /defaulting to write-mode|not installed/i.test(text3) ? "warn" : "info";
|
|
51725
|
+
return { kind, text: text3 };
|
|
51726
51726
|
}
|
|
51727
51727
|
function isVisualInput(i) {
|
|
51728
51728
|
return i.widget === "file" || i.type === "image" || i.type === "file";
|
|
@@ -51766,8 +51766,8 @@ function firstWithExt(dir, ext) {
|
|
|
51766
51766
|
const hit = (0, import_node_fs6.readdirSync)(dir).find((f) => f.toLowerCase().endsWith(ext));
|
|
51767
51767
|
return hit ? (0, import_node_path5.join)(dir, hit) : null;
|
|
51768
51768
|
}
|
|
51769
|
-
function sha256(
|
|
51770
|
-
return (0, import_node_crypto4.createHash)("sha256").update(
|
|
51769
|
+
function sha256(text3) {
|
|
51770
|
+
return (0, import_node_crypto4.createHash)("sha256").update(text3).digest("hex");
|
|
51771
51771
|
}
|
|
51772
51772
|
function asRecord(v) {
|
|
51773
51773
|
return v && typeof v === "object" && !Array.isArray(v) ? v : {};
|
|
@@ -51784,7 +51784,7 @@ function appMeta(id, bypassCache = false) {
|
|
|
51784
51784
|
const hit = bypassCache ? void 0 : metaCache.get(sourcePath);
|
|
51785
51785
|
if (hit && hit.mtimeMs === st.mtimeMs && hit.size === st.size && hit.ino === st.ino) return hit.meta;
|
|
51786
51786
|
sourceParses++;
|
|
51787
|
-
const
|
|
51787
|
+
const text3 = (0, import_node_fs6.readFileSync)(sourcePath, "utf8");
|
|
51788
51788
|
const after = (0, import_node_fs6.statSync)(sourcePath);
|
|
51789
51789
|
const settled = after.mtimeMs === st.mtimeMs && after.size === st.size && after.ino === st.ino;
|
|
51790
51790
|
const remember = (meta2) => {
|
|
@@ -51793,7 +51793,7 @@ function appMeta(id, bypassCache = false) {
|
|
|
51793
51793
|
};
|
|
51794
51794
|
let src;
|
|
51795
51795
|
try {
|
|
51796
|
-
src = asRecord((0, import_yaml.parse)(
|
|
51796
|
+
src = asRecord((0, import_yaml.parse)(text3));
|
|
51797
51797
|
} catch {
|
|
51798
51798
|
return remember(META_DEFAULT);
|
|
51799
51799
|
}
|
|
@@ -52114,8 +52114,8 @@ function mergeConnectables(base, live, displayName) {
|
|
|
52114
52114
|
}
|
|
52115
52115
|
return [...base, ...extra].sort((a, b) => a.name.localeCompare(b.name));
|
|
52116
52116
|
}
|
|
52117
|
-
function parseTrace(
|
|
52118
|
-
return
|
|
52117
|
+
function parseTrace(text3) {
|
|
52118
|
+
return text3.split(/\r?\n/).filter((l) => l.trim()).map((l) => {
|
|
52119
52119
|
try {
|
|
52120
52120
|
return JSON.parse(l);
|
|
52121
52121
|
} catch {
|
|
@@ -52395,14 +52395,14 @@ function latestTracePath(id, logsRoot = LOGS_DIR) {
|
|
|
52395
52395
|
}
|
|
52396
52396
|
for (const instance of instances) {
|
|
52397
52397
|
const instDir = (0, import_node_path6.join)(appDir2, instance);
|
|
52398
|
-
let
|
|
52398
|
+
let entries2;
|
|
52399
52399
|
try {
|
|
52400
52400
|
if (!(0, import_node_fs7.statSync)(instDir).isDirectory()) continue;
|
|
52401
|
-
|
|
52401
|
+
entries2 = (0, import_node_fs7.readdirSync)(instDir);
|
|
52402
52402
|
} catch {
|
|
52403
52403
|
continue;
|
|
52404
52404
|
}
|
|
52405
|
-
for (const f of
|
|
52405
|
+
for (const f of entries2) {
|
|
52406
52406
|
if (!f.endsWith(".jsonl")) continue;
|
|
52407
52407
|
const p = (0, import_node_path6.join)(instDir, f);
|
|
52408
52408
|
try {
|
|
@@ -52636,8 +52636,8 @@ function agentInvokeArgv(agent, command, inputsRef) {
|
|
|
52636
52636
|
function isInvokeUnsupported(detail) {
|
|
52637
52637
|
if (!detail || typeof detail !== "object") return false;
|
|
52638
52638
|
const d = detail;
|
|
52639
|
-
const
|
|
52640
|
-
return /unrecognized subcommand|unknown subcommand/i.test(
|
|
52639
|
+
const text3 = [d.stdout, d.stderr].filter((s) => typeof s === "string").join("\n");
|
|
52640
|
+
return /unrecognized subcommand|unknown subcommand/i.test(text3);
|
|
52641
52641
|
}
|
|
52642
52642
|
var inFlightConnects = /* @__PURE__ */ new Map();
|
|
52643
52643
|
function cancelAllConnects() {
|
|
@@ -53085,10 +53085,10 @@ function readExtensionsText() {
|
|
|
53085
53085
|
}
|
|
53086
53086
|
}
|
|
53087
53087
|
function readExtensions() {
|
|
53088
|
-
const
|
|
53089
|
-
if (
|
|
53088
|
+
const text3 = readExtensionsText();
|
|
53089
|
+
if (text3 === null) return null;
|
|
53090
53090
|
try {
|
|
53091
|
-
const parsed = JSON.parse(
|
|
53091
|
+
const parsed = JSON.parse(text3);
|
|
53092
53092
|
return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
|
|
53093
53093
|
} catch {
|
|
53094
53094
|
return null;
|
|
@@ -53098,35 +53098,35 @@ function descriptorPanels(d) {
|
|
|
53098
53098
|
if (!d || !Array.isArray(d.panels)) return [];
|
|
53099
53099
|
return d.panels.filter((p) => !!p && typeof p === "object" && !Array.isArray(p));
|
|
53100
53100
|
}
|
|
53101
|
-
function panelsCountOf(
|
|
53102
|
-
if (
|
|
53101
|
+
function panelsCountOf(text3) {
|
|
53102
|
+
if (text3 === null) return 0;
|
|
53103
53103
|
try {
|
|
53104
|
-
const parsed = JSON.parse(
|
|
53104
|
+
const parsed = JSON.parse(text3);
|
|
53105
53105
|
return parsed && typeof parsed === "object" && Array.isArray(parsed.panels) ? parsed.panels.length : 0;
|
|
53106
53106
|
} catch {
|
|
53107
53107
|
return 0;
|
|
53108
53108
|
}
|
|
53109
53109
|
}
|
|
53110
53110
|
function loadTimeline() {
|
|
53111
|
-
let
|
|
53111
|
+
let text3;
|
|
53112
53112
|
try {
|
|
53113
|
-
|
|
53113
|
+
text3 = (0, import_node_fs8.readFileSync)(TIMELINE_FILE, "utf8");
|
|
53114
53114
|
} catch {
|
|
53115
53115
|
return { cursor: -1, entries: [] };
|
|
53116
53116
|
}
|
|
53117
53117
|
try {
|
|
53118
|
-
const parsed = JSON.parse(
|
|
53118
|
+
const parsed = JSON.parse(text3);
|
|
53119
53119
|
if (!parsed || typeof parsed !== "object") return { cursor: -1, entries: [] };
|
|
53120
53120
|
const p = parsed;
|
|
53121
53121
|
const rawEntries = Array.isArray(p.entries) ? p.entries : [];
|
|
53122
|
-
const
|
|
53122
|
+
const entries2 = rawEntries.filter((e) => !!e && typeof e === "object").map((e) => ({
|
|
53123
53123
|
content: typeof e.content === "string" ? e.content : null,
|
|
53124
53124
|
ts: typeof e.ts === "string" ? e.ts : ""
|
|
53125
53125
|
}));
|
|
53126
|
-
let cursor = typeof p.cursor === "number" && Number.isInteger(p.cursor) ? p.cursor :
|
|
53127
|
-
if (
|
|
53128
|
-
else cursor = Math.max(0, Math.min(cursor,
|
|
53129
|
-
return { cursor, entries };
|
|
53126
|
+
let cursor = typeof p.cursor === "number" && Number.isInteger(p.cursor) ? p.cursor : entries2.length - 1;
|
|
53127
|
+
if (entries2.length === 0) cursor = -1;
|
|
53128
|
+
else cursor = Math.max(0, Math.min(cursor, entries2.length - 1));
|
|
53129
|
+
return { cursor, entries: entries2 };
|
|
53130
53130
|
} catch {
|
|
53131
53131
|
return { cursor: -1, entries: [] };
|
|
53132
53132
|
}
|
|
@@ -53137,10 +53137,10 @@ function saveTimeline(t) {
|
|
|
53137
53137
|
(0, import_node_fs8.writeFileSync)(tmp, JSON.stringify(t, null, 2));
|
|
53138
53138
|
(0, import_node_fs8.renameSync)(tmp, TIMELINE_FILE);
|
|
53139
53139
|
}
|
|
53140
|
-
function writeExtensionsText(
|
|
53140
|
+
function writeExtensionsText(text3) {
|
|
53141
53141
|
ensureUiDir();
|
|
53142
53142
|
const tmp = `${extensionsFile}.${process.pid}.tmp`;
|
|
53143
|
-
(0, import_node_fs8.writeFileSync)(tmp,
|
|
53143
|
+
(0, import_node_fs8.writeFileSync)(tmp, text3);
|
|
53144
53144
|
(0, import_node_fs8.renameSync)(tmp, extensionsFile);
|
|
53145
53145
|
}
|
|
53146
53146
|
function applyState(entry2) {
|
|
@@ -53161,21 +53161,21 @@ function seedTimeline() {
|
|
|
53161
53161
|
if (t.entries.length > 0) return;
|
|
53162
53162
|
saveTimeline({ cursor: 0, entries: [{ content: readExtensionsText(), ts: (/* @__PURE__ */ new Date()).toISOString() }] });
|
|
53163
53163
|
}
|
|
53164
|
-
function recordChange(
|
|
53164
|
+
function recordChange(text3) {
|
|
53165
53165
|
const t = loadTimeline();
|
|
53166
53166
|
if (t.entries.length === 0) {
|
|
53167
|
-
saveTimeline({ cursor: 0, entries: [{ content:
|
|
53167
|
+
saveTimeline({ cursor: 0, entries: [{ content: text3, ts: (/* @__PURE__ */ new Date()).toISOString() }] });
|
|
53168
53168
|
return { recorded: true };
|
|
53169
53169
|
}
|
|
53170
|
-
if (
|
|
53171
|
-
const
|
|
53172
|
-
|
|
53173
|
-
let cursor =
|
|
53174
|
-
while (
|
|
53175
|
-
|
|
53170
|
+
if (text3 === currentContent(t)) return { recorded: false };
|
|
53171
|
+
const entries2 = t.entries.slice(0, t.cursor + 1);
|
|
53172
|
+
entries2.push({ content: text3, ts: (/* @__PURE__ */ new Date()).toISOString() });
|
|
53173
|
+
let cursor = entries2.length - 1;
|
|
53174
|
+
while (entries2.length > HISTORY_KEEP) {
|
|
53175
|
+
entries2.shift();
|
|
53176
53176
|
cursor--;
|
|
53177
53177
|
}
|
|
53178
|
-
saveTimeline({ cursor, entries });
|
|
53178
|
+
saveTimeline({ cursor, entries: entries2 });
|
|
53179
53179
|
return { recorded: true };
|
|
53180
53180
|
}
|
|
53181
53181
|
function historyState() {
|
|
@@ -53223,15 +53223,15 @@ function resetExtensions() {
|
|
|
53223
53223
|
t.entries.push({ content: readExtensionsText(), ts: (/* @__PURE__ */ new Date()).toISOString() });
|
|
53224
53224
|
t.cursor = 0;
|
|
53225
53225
|
}
|
|
53226
|
-
const
|
|
53227
|
-
|
|
53228
|
-
let cursor =
|
|
53229
|
-
while (
|
|
53230
|
-
|
|
53226
|
+
const entries2 = t.entries.slice(0, t.cursor + 1);
|
|
53227
|
+
entries2.push({ content: null, ts: (/* @__PURE__ */ new Date()).toISOString() });
|
|
53228
|
+
let cursor = entries2.length - 1;
|
|
53229
|
+
while (entries2.length > HISTORY_KEEP) {
|
|
53230
|
+
entries2.shift();
|
|
53231
53231
|
cursor--;
|
|
53232
53232
|
}
|
|
53233
|
-
saveTimeline({ cursor, entries });
|
|
53234
|
-
applyState(
|
|
53233
|
+
saveTimeline({ cursor, entries: entries2 });
|
|
53234
|
+
applyState(entries2[cursor]);
|
|
53235
53235
|
return { reset: true, canUndo: cursor > 0, canRedo: false };
|
|
53236
53236
|
}
|
|
53237
53237
|
|
|
@@ -53241,8 +53241,8 @@ function isUiAgentMissing(err2) {
|
|
|
53241
53241
|
const detail = err2.detail ?? {};
|
|
53242
53242
|
const stdout = typeof detail.stdout === "string" ? detail.stdout : "";
|
|
53243
53243
|
const stderr = typeof detail.stderr === "string" ? detail.stderr : "";
|
|
53244
|
-
const
|
|
53245
|
-
return /not installed/i.test(
|
|
53244
|
+
const text3 = `${err2.message} ${stdout} ${stderr}`;
|
|
53245
|
+
return /not installed/i.test(text3);
|
|
53246
53246
|
}
|
|
53247
53247
|
function classifyValidateError(err2) {
|
|
53248
53248
|
if (err2 instanceof AwareUnsupportedError) {
|
|
@@ -53792,7 +53792,7 @@ function appVersion() {
|
|
|
53792
53792
|
return resolveVersion({
|
|
53793
53793
|
isSea: isSea2(),
|
|
53794
53794
|
sqVersionXml: readSqVersionXml(),
|
|
53795
|
-
define: true ? "0.
|
|
53795
|
+
define: true ? "0.109.1" : void 0,
|
|
53796
53796
|
pkgVersion: readPkgVersion()
|
|
53797
53797
|
});
|
|
53798
53798
|
}
|
|
@@ -53802,7 +53802,7 @@ function resolveChannel(s) {
|
|
|
53802
53802
|
return "dev";
|
|
53803
53803
|
}
|
|
53804
53804
|
function appChannel() {
|
|
53805
|
-
return resolveChannel({ isSea: isSea2(), define: true ? "0.
|
|
53805
|
+
return resolveChannel({ isSea: isSea2(), define: true ? "0.109.1" : void 0 });
|
|
53806
53806
|
}
|
|
53807
53807
|
|
|
53808
53808
|
// workflow-update.ts
|
|
@@ -54586,12 +54586,12 @@ function checkModelReferences(doc) {
|
|
|
54586
54586
|
if (declared !== parsedCount) add("$.grid.axes", "grid-axis-count", `${dir} has ${parsedCount} parsed entries but ${declared} declared axes`);
|
|
54587
54587
|
};
|
|
54588
54588
|
for (const dir of ["x", "y"]) {
|
|
54589
|
-
const
|
|
54590
|
-
if (
|
|
54589
|
+
const text3 = str(grid[dir]);
|
|
54590
|
+
if (text3 === null) {
|
|
54591
54591
|
compare(dir, 0);
|
|
54592
54592
|
continue;
|
|
54593
54593
|
}
|
|
54594
|
-
const parsed = parseSpacings(
|
|
54594
|
+
const parsed = parseSpacings(text3);
|
|
54595
54595
|
if (parsed.err) add(`$.grid.${dir}`, "grid-spacing-invalid", `${dir} grid string is unparseable: ${parsed.err}`);
|
|
54596
54596
|
else compare(dir, parsed.offsets.length);
|
|
54597
54597
|
}
|
|
@@ -54671,8 +54671,8 @@ function checkModelReferences(doc) {
|
|
|
54671
54671
|
}
|
|
54672
54672
|
const clips = isObj(v.clips) ? v.clips : null;
|
|
54673
54673
|
if (clips) {
|
|
54674
|
-
const
|
|
54675
|
-
const clipCounts = idIndex(
|
|
54674
|
+
const entries2 = arr(clips.clips);
|
|
54675
|
+
const clipCounts = idIndex(entries2.map((c) => isObj(c) ? str(c.id) : null));
|
|
54676
54676
|
for (const [id, n] of clipCounts) if (n > 1) add(`$.views[${vi}].clips.clips`, "clip-id-duplicate", `clip id "${id}" occurs ${n} times`);
|
|
54677
54677
|
arr(clips.selected).forEach((s, i) => {
|
|
54678
54678
|
const id = str(s);
|
|
@@ -55433,8 +55433,8 @@ function parseStepData(input) {
|
|
|
55433
55433
|
if (input.length > MAX_BYTES3) throw new StepParseError("IFC is larger than the supported maximum.");
|
|
55434
55434
|
assertAscii((i) => input[i], input.length);
|
|
55435
55435
|
}
|
|
55436
|
-
const
|
|
55437
|
-
const sc = new Scanner(
|
|
55436
|
+
const text3 = typeof input === "string" ? input : input.toString("utf8");
|
|
55437
|
+
const sc = new Scanner(text3);
|
|
55438
55438
|
sc.expectWord("ISO-10303-21");
|
|
55439
55439
|
sc.expect(";");
|
|
55440
55440
|
sc.expectWord("HEADER");
|
|
@@ -56103,9 +56103,9 @@ var NEUTRAL_TEXT_PARAMS = {
|
|
|
56103
56103
|
};
|
|
56104
56104
|
function boundedNeutralText(value) {
|
|
56105
56105
|
if (typeof value !== "string") return null;
|
|
56106
|
-
const
|
|
56107
|
-
if (!
|
|
56108
|
-
return
|
|
56106
|
+
const text3 = value.trim();
|
|
56107
|
+
if (!text3 || Buffer.byteLength(text3, "utf8") > 64 || /[\u0000-\u001f\u007f]/.test(text3)) return null;
|
|
56108
|
+
return text3;
|
|
56109
56109
|
}
|
|
56110
56110
|
var gridCountsInteger = (p) => (!("boltCols" in p) || Number.isInteger(p.boltCols)) && (!("boltRows" in p) || Number.isInteger(p.boltRows));
|
|
56111
56111
|
function sanitizeRecipe(raw) {
|
|
@@ -56117,8 +56117,8 @@ function sanitizeRecipe(raw) {
|
|
|
56117
56117
|
for (const [k, v] of Object.entries(r.params)) {
|
|
56118
56118
|
if (typeof v === "number" && isFinite(v)) num6[k] = v;
|
|
56119
56119
|
if (NEUTRAL_TEXT_PARAMS[r.kind]?.has(k)) {
|
|
56120
|
-
const
|
|
56121
|
-
if (
|
|
56120
|
+
const text3 = boundedNeutralText(v);
|
|
56121
|
+
if (text3) neutral[k] = text3;
|
|
56122
56122
|
else if (v != null) return void 0;
|
|
56123
56123
|
}
|
|
56124
56124
|
}
|
|
@@ -57869,8 +57869,8 @@ async function exportProjectZip(id) {
|
|
|
57869
57869
|
const projectRootDir = projectDir(id);
|
|
57870
57870
|
const files2 = {};
|
|
57871
57871
|
const walk2 = async (abs, rel) => {
|
|
57872
|
-
const
|
|
57873
|
-
await Promise.all(
|
|
57872
|
+
const entries2 = await (0, import_promises.readdir)(abs, { withFileTypes: true });
|
|
57873
|
+
await Promise.all(entries2.map(async (e) => {
|
|
57874
57874
|
const childAbs = (0, import_node_path19.join)(abs, e.name);
|
|
57875
57875
|
const childRel = rel ? `${rel}/${e.name}` : e.name;
|
|
57876
57876
|
if (e.isDirectory()) await walk2(childAbs, childRel);
|
|
@@ -57884,10 +57884,10 @@ async function exportProjectZip(id) {
|
|
|
57884
57884
|
var IMPORT_MAX_FILES = 1e4;
|
|
57885
57885
|
var IMPORT_MAX_UNCOMPRESSED = 2 * 1024 * 1024 * 1024;
|
|
57886
57886
|
function importProjectZip(data) {
|
|
57887
|
-
let
|
|
57887
|
+
let entries2;
|
|
57888
57888
|
try {
|
|
57889
57889
|
let count = 0, uncompressed = 0;
|
|
57890
|
-
|
|
57890
|
+
entries2 = unzipSync(data, {
|
|
57891
57891
|
filter: (f) => {
|
|
57892
57892
|
if (++count > IMPORT_MAX_FILES) throw new ProjectError("archive has too many entries");
|
|
57893
57893
|
uncompressed += f.originalSize;
|
|
@@ -57899,17 +57899,17 @@ function importProjectZip(data) {
|
|
|
57899
57899
|
if (e instanceof ProjectError) throw e;
|
|
57900
57900
|
throw new ProjectError(`not a valid project archive: ${e instanceof Error ? e.message : String(e)}`);
|
|
57901
57901
|
}
|
|
57902
|
-
|
|
57903
|
-
const reservedEntry = Object.keys(
|
|
57902
|
+
entries2 = Object.fromEntries(Object.entries(entries2).map(([k, v]) => [k.replace(/\\/g, "/"), v]));
|
|
57903
|
+
const reservedEntry = Object.keys(entries2).find(isReservedProjectInternalPath);
|
|
57904
57904
|
if (reservedEntry) {
|
|
57905
57905
|
throw new ProjectError(`archive contains reserved transaction state: ${reservedEntry}`);
|
|
57906
57906
|
}
|
|
57907
|
-
const metaEntry = Object.keys(
|
|
57907
|
+
const metaEntry = Object.keys(entries2).find((p) => /(^|\/)project\.json$/.test(p) && p.split("/").length <= 2);
|
|
57908
57908
|
if (!metaEntry) throw new ProjectError("archive has no project.json \u2014 not a project export");
|
|
57909
57909
|
const rootPrefix = metaEntry.includes("/") ? metaEntry.slice(0, metaEntry.indexOf("/") + 1) : "";
|
|
57910
57910
|
let srcMeta;
|
|
57911
57911
|
try {
|
|
57912
|
-
const parsed = JSON.parse(new TextDecoder().decode(
|
|
57912
|
+
const parsed = JSON.parse(new TextDecoder().decode(entries2[metaEntry]));
|
|
57913
57913
|
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("not an object");
|
|
57914
57914
|
srcMeta = parsed;
|
|
57915
57915
|
} catch {
|
|
@@ -57924,14 +57924,14 @@ function importProjectZip(data) {
|
|
|
57924
57924
|
let id = `${slugify(name)}-${(0, import_node_crypto9.randomBytes)(3).toString("hex")}`;
|
|
57925
57925
|
while ((0, import_node_fs21.existsSync)(projectDir(id)) || (0, import_node_fs21.existsSync)((0, import_node_path19.join)(archiveRoot(), id))) id = `${slugify(name)}-${(0, import_node_crypto9.randomBytes)(3).toString("hex")}`;
|
|
57926
57926
|
const relOf = (entryPath) => rootPrefix && entryPath.startsWith(rootPrefix) ? entryPath.slice(rootPrefix.length) : entryPath;
|
|
57927
|
-
const contractEntries = Object.keys(
|
|
57927
|
+
const contractEntries = Object.keys(entries2).filter((p) => relOf(p) === "contract.json");
|
|
57928
57928
|
if (contractEntries.length > 1) {
|
|
57929
57929
|
throw new ProjectError("archive contains more than one contract.json for the same project");
|
|
57930
57930
|
}
|
|
57931
57931
|
for (const entry2 of contractEntries) {
|
|
57932
57932
|
let parsed;
|
|
57933
57933
|
try {
|
|
57934
|
-
parsed = JSON.parse(new TextDecoder().decode(
|
|
57934
|
+
parsed = JSON.parse(new TextDecoder().decode(entries2[entry2]));
|
|
57935
57935
|
} catch {
|
|
57936
57936
|
throw new ProjectError("archive contract.json is unreadable");
|
|
57937
57937
|
}
|
|
@@ -57948,7 +57948,7 @@ function importProjectZip(data) {
|
|
|
57948
57948
|
const destResolved = (0, import_node_path19.resolve)(dest);
|
|
57949
57949
|
(0, import_node_fs21.mkdirSync)(dest, { recursive: true });
|
|
57950
57950
|
try {
|
|
57951
|
-
for (const [entryPath, bytes] of Object.entries(
|
|
57951
|
+
for (const [entryPath, bytes] of Object.entries(entries2)) {
|
|
57952
57952
|
if (entryPath === metaEntry) continue;
|
|
57953
57953
|
const rel = rootPrefix && entryPath.startsWith(rootPrefix) ? entryPath.slice(rootPrefix.length) : entryPath;
|
|
57954
57954
|
if (!rel || rel.endsWith("/")) continue;
|
|
@@ -57984,9 +57984,9 @@ var HASH_RE = /^[0-9a-f]{64}$/;
|
|
|
57984
57984
|
var versionsDir = (id) => (0, import_node_path20.join)(projectDir(id), "versions");
|
|
57985
57985
|
var objectsDir = (id) => (0, import_node_path20.join)(projectDir(id), "objects");
|
|
57986
57986
|
var logPath = (id) => (0, import_node_path20.join)(versionsDir(id), "log.json");
|
|
57987
|
-
function writeAtomic(path,
|
|
57987
|
+
function writeAtomic(path, text3) {
|
|
57988
57988
|
const tmp = `${path}.${process.pid}.tmp`;
|
|
57989
|
-
(0, import_node_fs22.writeFileSync)(tmp,
|
|
57989
|
+
(0, import_node_fs22.writeFileSync)(tmp, text3);
|
|
57990
57990
|
(0, import_node_fs22.renameSync)(tmp, path);
|
|
57991
57991
|
}
|
|
57992
57992
|
function isVersionMeta(v) {
|
|
@@ -58073,9 +58073,9 @@ function createVersion(id, contract, meta) {
|
|
|
58073
58073
|
(0, import_node_fs22.mkdirSync)(objectsDir(id), { recursive: true });
|
|
58074
58074
|
const blobs = /* @__PURE__ */ new Map();
|
|
58075
58075
|
const skeleton = dehydrate(contract, blobs);
|
|
58076
|
-
for (const [hash2,
|
|
58076
|
+
for (const [hash2, text3] of blobs) {
|
|
58077
58077
|
const p = (0, import_node_path20.join)(objectsDir(id), hash2);
|
|
58078
|
-
if (!(0, import_node_fs22.existsSync)(p)) writeAtomic(p,
|
|
58078
|
+
if (!(0, import_node_fs22.existsSync)(p)) writeAtomic(p, text3);
|
|
58079
58079
|
}
|
|
58080
58080
|
const log2 = loadLog(id);
|
|
58081
58081
|
const n = (log2.versions.at(-1)?.n ?? 0) + 1;
|
|
@@ -58653,15 +58653,15 @@ function eachPage(wikiDir, io, onPage) {
|
|
|
58653
58653
|
let limitHit = false;
|
|
58654
58654
|
let found = false;
|
|
58655
58655
|
const walk2 = (dir) => {
|
|
58656
|
-
let
|
|
58656
|
+
let entries2;
|
|
58657
58657
|
try {
|
|
58658
|
-
|
|
58658
|
+
entries2 = io.readdir(dir);
|
|
58659
58659
|
} catch (e) {
|
|
58660
58660
|
console.warn(`knowledge-store: cannot read wiki dir ${dir}: ${e instanceof Error ? e.message : e}`);
|
|
58661
58661
|
ioError = true;
|
|
58662
58662
|
return "go";
|
|
58663
58663
|
}
|
|
58664
|
-
for (const ent of [...
|
|
58664
|
+
for (const ent of [...entries2].sort((x, y) => x.name.localeCompare(y.name))) {
|
|
58665
58665
|
if (++visits > KB_MAX_VISITS) {
|
|
58666
58666
|
console.warn(`knowledge-store: wiki exceeds KB_MAX_VISITS=${KB_MAX_VISITS}, truncating`);
|
|
58667
58667
|
limitHit = true;
|
|
@@ -59049,10 +59049,10 @@ function failOrganize(id, requestId, opts) {
|
|
|
59049
59049
|
function gcOldGenerations(id, currentGenerationId) {
|
|
59050
59050
|
const dir = generationsDir(id);
|
|
59051
59051
|
if (!(0, import_node_fs23.existsSync)(dir)) return;
|
|
59052
|
-
const
|
|
59053
|
-
const keep = new Set(
|
|
59052
|
+
const entries2 = (0, import_node_fs23.readdirSync)(dir, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => ({ name: e.name, mtimeMs: (0, import_node_fs23.statSync)((0, import_node_path21.join)(dir, e.name)).mtimeMs })).sort((a, b) => b.mtimeMs - a.mtimeMs);
|
|
59053
|
+
const keep = new Set(entries2.slice(0, GEN_KEEP).map((e) => e.name));
|
|
59054
59054
|
keep.add(currentGenerationId);
|
|
59055
|
-
for (const e of
|
|
59055
|
+
for (const e of entries2) {
|
|
59056
59056
|
if (keep.has(e.name)) continue;
|
|
59057
59057
|
try {
|
|
59058
59058
|
(0, import_node_fs23.rmSync)((0, import_node_path21.join)(dir, e.name), { recursive: true, force: true });
|
|
@@ -62004,6 +62004,41 @@ function awareSceneFromModel(contractInput, sourceId) {
|
|
|
62004
62004
|
return { scene, skipped: legacy.skipped, producerUnsupported };
|
|
62005
62005
|
}
|
|
62006
62006
|
|
|
62007
|
+
// ../web/steel-detail-refs.js
|
|
62008
|
+
var text2 = (v) => String(v == null ? "" : v).trim();
|
|
62009
|
+
function calloutRefText(callout) {
|
|
62010
|
+
if (!callout || typeof callout !== "object") return null;
|
|
62011
|
+
const printed = text2(callout.text);
|
|
62012
|
+
if (printed) return printed;
|
|
62013
|
+
const target = callout.target;
|
|
62014
|
+
if (!target || typeof target !== "object") return null;
|
|
62015
|
+
const number = text2(target.number), sheet = text2(target.sheet);
|
|
62016
|
+
return number && sheet ? number + "-" + sheet : null;
|
|
62017
|
+
}
|
|
62018
|
+
function entries(plan) {
|
|
62019
|
+
if (!plan || typeof plan !== "object") return [];
|
|
62020
|
+
const out = [];
|
|
62021
|
+
for (const list of [plan.details, plan.callouts]) if (Array.isArray(list)) out.push(...list);
|
|
62022
|
+
return out;
|
|
62023
|
+
}
|
|
62024
|
+
var NON_DETAIL_KINDS = ["section", "elevation"];
|
|
62025
|
+
function planScoredDetails(plan) {
|
|
62026
|
+
const skip = new Set(NON_DETAIL_KINDS);
|
|
62027
|
+
const seen = /* @__PURE__ */ new Set(), out = [];
|
|
62028
|
+
for (const entry2 of entries(plan)) {
|
|
62029
|
+
if (!entry2 || typeof entry2 !== "object") continue;
|
|
62030
|
+
if (skip.has(text2(entry2.kind).toLowerCase())) continue;
|
|
62031
|
+
const name = calloutRefText(entry2) || "";
|
|
62032
|
+
const t = entry2.target;
|
|
62033
|
+
const targetSheet = t && typeof t === "object" && text2(t.sheet) || "";
|
|
62034
|
+
const key = name + "\0" + targetSheet;
|
|
62035
|
+
if (seen.has(key)) continue;
|
|
62036
|
+
seen.add(key);
|
|
62037
|
+
out.push({ text: name, targetSheet: targetSheet || null, kind: text2(entry2.kind) || "detail" });
|
|
62038
|
+
}
|
|
62039
|
+
return out;
|
|
62040
|
+
}
|
|
62041
|
+
|
|
62007
62042
|
// steel-confidence.ts
|
|
62008
62043
|
var BAND_WEIGHT = { verified: 1, high: 0.9, med: 0.65, low: 0.35, rfi: 0 };
|
|
62009
62044
|
var isBraceMember = (m) => typeof m.memberType === "string" && m.memberType.trim().toLowerCase() === "brace";
|
|
@@ -62209,12 +62244,12 @@ function scoreContract(contractInput) {
|
|
|
62209
62244
|
factors
|
|
62210
62245
|
});
|
|
62211
62246
|
}
|
|
62212
|
-
for (const d of plan
|
|
62213
|
-
const
|
|
62214
|
-
const sheet = detailSheet(
|
|
62247
|
+
for (const d of planScoredDetails(plan)) {
|
|
62248
|
+
const text3 = d.text;
|
|
62249
|
+
const sheet = detailSheet(text3) ?? d.targetSheet;
|
|
62215
62250
|
const resolved = sheet != null && knownSheets.has(sheet.toUpperCase());
|
|
62216
62251
|
byDetail.push({
|
|
62217
|
-
text:
|
|
62252
|
+
text: text3,
|
|
62218
62253
|
planIdx,
|
|
62219
62254
|
sheet: plan.sheet ?? "",
|
|
62220
62255
|
band: resolved ? "high" : "low",
|
|
@@ -62250,8 +62285,8 @@ function scoreContract(contractInput) {
|
|
|
62250
62285
|
}
|
|
62251
62286
|
};
|
|
62252
62287
|
}
|
|
62253
|
-
function detailSheet(
|
|
62254
|
-
const m =
|
|
62288
|
+
function detailSheet(text3) {
|
|
62289
|
+
const m = text3.toUpperCase().match(/S-?\s?\d{2,3}/);
|
|
62255
62290
|
return m ? m[0].replace(/\s/g, "") : null;
|
|
62256
62291
|
}
|
|
62257
62292
|
function rollupDetails(details) {
|
|
@@ -62454,10 +62489,25 @@ function scoreContract2(contractInput) {
|
|
|
62454
62489
|
|
|
62455
62490
|
// revision-read-guard.ts
|
|
62456
62491
|
var STEEL_TYPES = [STEEL_V1, STEEL_V2];
|
|
62492
|
+
function scoreOrRefusal(contract, score = scoreContract2) {
|
|
62493
|
+
try {
|
|
62494
|
+
return { score: score(contract) };
|
|
62495
|
+
} catch (e) {
|
|
62496
|
+
const v = declaredTypeOf(contract) === STEEL_V2 ? validateSteelModelV2(contract) : validateContract(contract);
|
|
62497
|
+
if (v.valid) throw e;
|
|
62498
|
+
const clipPath = (s) => s.length > 200 ? `${s.slice(0, 200)}\u2026` : s;
|
|
62499
|
+
const detail = v.errors.slice(0, 5).map((e2) => `${clipPath(e2.path)}: ${e2.message}`).join("; ");
|
|
62500
|
+
return {
|
|
62501
|
+
refusal: "steel-model revision-read could not read this document as a steel contract" + (detail ? ` \u2014 ${detail}` : "") + ". Fix the contract and post it again."
|
|
62502
|
+
};
|
|
62503
|
+
}
|
|
62504
|
+
}
|
|
62457
62505
|
function revisionReadContractError(appId, contract) {
|
|
62458
62506
|
if (appId !== "steel-model") return null;
|
|
62459
62507
|
if (!STEEL_TYPES.includes(declaredTypeOf(contract))) return null;
|
|
62460
|
-
const
|
|
62508
|
+
const scored = scoreOrRefusal(contract);
|
|
62509
|
+
if ("refusal" in scored) return scored.refusal;
|
|
62510
|
+
const score = scored.score;
|
|
62461
62511
|
if (score.filterMissing) {
|
|
62462
62512
|
return "steel-model revision-read requires the Steel Filter checkpoint first \u2014 populate contract.filter from the drawing layers/thicknesses/colors, have the user Save the filter, then post the member-read contract";
|
|
62463
62513
|
}
|
|
@@ -63462,9 +63512,9 @@ function remapDetailPlacements(v1) {
|
|
|
63462
63512
|
}
|
|
63463
63513
|
function remapDims3d(v1) {
|
|
63464
63514
|
const issues = [];
|
|
63465
|
-
const
|
|
63466
|
-
if (
|
|
63467
|
-
issues.push({ code: "dims3d-ownerless", severity: "block", message: `${
|
|
63515
|
+
const entries2 = isObj3(v1) ? arr3(v1.dims3d).filter(isObj3) : [];
|
|
63516
|
+
if (entries2.length) {
|
|
63517
|
+
issues.push({ code: "dims3d-ownerless", severity: "block", message: `${entries2.length} 3D dimension(s) carry world coordinates in the OLD scene frame and have no owner to recompute from; assign a frame, confirm keep-as-world, or discard them before migrating (epic \xA710)` });
|
|
63468
63518
|
}
|
|
63469
63519
|
return { dims3d: [], issues };
|
|
63470
63520
|
}
|
|
@@ -65413,10 +65463,10 @@ var unavailableSummary = (from, side) => ({
|
|
|
65413
65463
|
function summarizeContractDiff(diff) {
|
|
65414
65464
|
const bullets = [];
|
|
65415
65465
|
let detailCount = 0;
|
|
65416
|
-
const add = (count,
|
|
65466
|
+
const add = (count, text3) => {
|
|
65417
65467
|
if (!count) return;
|
|
65418
65468
|
detailCount += count;
|
|
65419
|
-
bullets.push(
|
|
65469
|
+
bullets.push(text3);
|
|
65420
65470
|
};
|
|
65421
65471
|
add(diff.added.length, `Added ${countWord(diff.added.length, "member")}: ${preview(diff.added.map(refName))}.`);
|
|
65422
65472
|
add(diff.removed.length, `Removed ${countWord(diff.removed.length, "member")}: ${preview(diff.removed.map(refName))}.`);
|
|
@@ -69561,10 +69611,10 @@ function loadJournal(txnDir) {
|
|
|
69561
69611
|
const match = (0, import_node_path29.basename)(txnDir).match(ACTIVE_RE);
|
|
69562
69612
|
if (!match) throw new IfcPublicationError(`unsafe IFC transaction directory "${(0, import_node_path29.basename)(txnDir)}".`);
|
|
69563
69613
|
const txnId = match[1];
|
|
69564
|
-
const
|
|
69565
|
-
if (!
|
|
69566
|
-
const phaseFiles =
|
|
69567
|
-
const unknown =
|
|
69614
|
+
const entries2 = (0, import_node_fs33.readdirSync)(txnDir, { withFileTypes: true });
|
|
69615
|
+
if (!entries2.length) return null;
|
|
69616
|
+
const phaseFiles = entries2.filter((entry2) => entry2.isFile() && PHASE_RE.test(entry2.name)).sort((a, b) => a.name.localeCompare(b.name));
|
|
69617
|
+
const unknown = entries2.filter((entry2) => !(entry2.isFile() && (PHASE_RE.test(entry2.name) || /^\.phase-[a-f0-9-]+\.tmp$/i.test(entry2.name))));
|
|
69568
69618
|
if (unknown.length) throw new IfcPublicationError("IFC transaction directory contains unexpected entries.");
|
|
69569
69619
|
if (!phaseFiles.length) return null;
|
|
69570
69620
|
let first = null;
|
|
@@ -69721,12 +69771,12 @@ async function recoverIfcPublicationsInDirectory(exportDir, expected) {
|
|
|
69721
69771
|
const dir = canonicalPath(exportDir);
|
|
69722
69772
|
if (!(0, import_node_fs33.existsSync)(dir)) return [];
|
|
69723
69773
|
safeTransactionDirectory(dir);
|
|
69724
|
-
const
|
|
69725
|
-
if (
|
|
69726
|
-
throw new IfcPublicationError(`IFC recovery refused ${
|
|
69774
|
+
const entries2 = (0, import_node_fs33.readdirSync)(dir, { withFileTypes: true }).filter((entry2) => ACTIVE_RE.test(entry2.name) || CLEANUP_RE.test(entry2.name));
|
|
69775
|
+
if (entries2.length > MAX_TRANSACTIONS) {
|
|
69776
|
+
throw new IfcPublicationError(`IFC recovery refused ${entries2.length} transaction directories (limit ${MAX_TRANSACTIONS}).`);
|
|
69727
69777
|
}
|
|
69728
69778
|
const recovered = [];
|
|
69729
|
-
for (const entry2 of
|
|
69779
|
+
for (const entry2 of entries2) {
|
|
69730
69780
|
const path = (0, import_node_path29.join)(dir, entry2.name);
|
|
69731
69781
|
safeTransactionDirectory(path);
|
|
69732
69782
|
if (CLEANUP_RE.test(entry2.name)) {
|
|
@@ -70177,13 +70227,13 @@ function windowsCandidates(env2) {
|
|
|
70177
70227
|
}
|
|
70178
70228
|
const found = [];
|
|
70179
70229
|
for (const root3 of roots) {
|
|
70180
|
-
let
|
|
70230
|
+
let entries2;
|
|
70181
70231
|
try {
|
|
70182
|
-
|
|
70232
|
+
entries2 = (0, import_node_fs35.readdirSync)(root3);
|
|
70183
70233
|
} catch {
|
|
70184
70234
|
continue;
|
|
70185
70235
|
}
|
|
70186
|
-
for (const name of
|
|
70236
|
+
for (const name of entries2) {
|
|
70187
70237
|
const match = /^Blender\s+(\d+(?:\.\d+)*)$/i.exec(name);
|
|
70188
70238
|
if (!match) continue;
|
|
70189
70239
|
const binary = (0, import_node_path31.join)(root3, name, "blender.exe");
|
|
@@ -70675,14 +70725,14 @@ function sanitizeRoutine(raw) {
|
|
|
70675
70725
|
}
|
|
70676
70726
|
function loadFromDisk() {
|
|
70677
70727
|
if (!(0, import_node_fs37.existsSync)(ROUTINES_FILE)) return [];
|
|
70678
|
-
let
|
|
70728
|
+
let text3;
|
|
70679
70729
|
try {
|
|
70680
|
-
|
|
70730
|
+
text3 = (0, import_node_fs37.readFileSync)(ROUTINES_FILE, "utf8");
|
|
70681
70731
|
} catch {
|
|
70682
70732
|
return [];
|
|
70683
70733
|
}
|
|
70684
70734
|
try {
|
|
70685
|
-
const parsed = JSON.parse(
|
|
70735
|
+
const parsed = JSON.parse(text3);
|
|
70686
70736
|
return Array.isArray(parsed) ? parsed.map(sanitizeRoutine).filter((r) => r !== null) : [];
|
|
70687
70737
|
} catch {
|
|
70688
70738
|
try {
|
|
@@ -71759,15 +71809,15 @@ function ccType(prefix) {
|
|
|
71759
71809
|
}
|
|
71760
71810
|
}
|
|
71761
71811
|
function parseBulletChanges(body) {
|
|
71762
|
-
const
|
|
71812
|
+
const text3 = body.replace(/\r\n?/g, "\n");
|
|
71763
71813
|
const styled = [];
|
|
71764
71814
|
let m;
|
|
71765
71815
|
STYLED_CHANGE_RE.lastIndex = 0;
|
|
71766
|
-
while ((m = STYLED_CHANGE_RE.exec(
|
|
71816
|
+
while ((m = STYLED_CHANGE_RE.exec(text3)) !== null) styled.push({ type: m[1].toLowerCase(), description: m[2].trim() });
|
|
71767
71817
|
if (styled.length) return styled;
|
|
71768
71818
|
const out = [];
|
|
71769
71819
|
COMMIT_BULLET_RE.lastIndex = 0;
|
|
71770
|
-
while ((m = COMMIT_BULLET_RE.exec(
|
|
71820
|
+
while ((m = COMMIT_BULLET_RE.exec(text3)) !== null) {
|
|
71771
71821
|
const raw = m[1].replace(GH_CREDIT_RE, "").trim();
|
|
71772
71822
|
if (!raw) continue;
|
|
71773
71823
|
if (raw.startsWith("@")) continue;
|
|
@@ -72423,8 +72473,8 @@ function targetConfigDirs() {
|
|
|
72423
72473
|
}
|
|
72424
72474
|
function skillVersion(skillMdPath) {
|
|
72425
72475
|
try {
|
|
72426
|
-
const
|
|
72427
|
-
const m = /^---\r?\n([\s\S]*?)\r?\n---/.exec(
|
|
72476
|
+
const text3 = (0, import_node_fs43.readFileSync)(skillMdPath, "utf8");
|
|
72477
|
+
const m = /^---\r?\n([\s\S]*?)\r?\n---/.exec(text3);
|
|
72428
72478
|
if (!m || m[1] === void 0) return null;
|
|
72429
72479
|
const fm = (0, import_yaml10.parse)(m[1]);
|
|
72430
72480
|
const meta = fm?.metadata;
|
|
@@ -72461,14 +72511,14 @@ function decideAction(installed, bundled) {
|
|
|
72461
72511
|
return "skipped-newer";
|
|
72462
72512
|
}
|
|
72463
72513
|
function bundledSkills(root3) {
|
|
72464
|
-
let
|
|
72514
|
+
let entries2 = [];
|
|
72465
72515
|
try {
|
|
72466
|
-
|
|
72516
|
+
entries2 = selectShippedSkillNames((0, import_node_fs43.readdirSync)(root3));
|
|
72467
72517
|
} catch {
|
|
72468
72518
|
return [];
|
|
72469
72519
|
}
|
|
72470
72520
|
const out = [];
|
|
72471
|
-
for (const name of
|
|
72521
|
+
for (const name of entries2) {
|
|
72472
72522
|
const dir = (0, import_node_path39.join)(root3, name);
|
|
72473
72523
|
let isDir = false;
|
|
72474
72524
|
try {
|
|
@@ -75812,18 +75862,18 @@ async function startServer() {
|
|
|
75812
75862
|
try {
|
|
75813
75863
|
(0, import_node_fs45.mkdirSync)(dir, { recursive: true });
|
|
75814
75864
|
if (format === "csv") {
|
|
75815
|
-
const
|
|
75865
|
+
const text3 = bomToCsv(bom);
|
|
75816
75866
|
if (project && projectSnapshot) {
|
|
75817
75867
|
publishProjectExportArtifact(project, {
|
|
75818
75868
|
kind: "bom-csv",
|
|
75819
75869
|
filename,
|
|
75820
75870
|
encoding: "utf8",
|
|
75821
|
-
bytes: Buffer.byteLength(
|
|
75871
|
+
bytes: Buffer.byteLength(text3),
|
|
75822
75872
|
version: projectSnapshot.version.n,
|
|
75823
75873
|
contractHash: projectSnapshot.contractHash
|
|
75824
|
-
}, Buffer.from(
|
|
75825
|
-
} else (0, import_node_fs45.writeFileSync)(outPath,
|
|
75826
|
-
return { ok: true, filename, encoding: "utf8", content:
|
|
75874
|
+
}, Buffer.from(text3, "utf8"));
|
|
75875
|
+
} else (0, import_node_fs45.writeFileSync)(outPath, text3, "utf8");
|
|
75876
|
+
return { ok: true, filename, encoding: "utf8", content: text3, bytes: Buffer.byteLength(text3), savedTo: outPath };
|
|
75827
75877
|
}
|
|
75828
75878
|
const buf = await bomToXlsx(bom);
|
|
75829
75879
|
if (project && projectSnapshot) {
|