@athrio/loom 0.0.8 → 0.0.9

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.
@@ -149147,15 +149147,13 @@ var VariablesSchema = Record$1(String$1, Union([
149147
149147
  Number$1,
149148
149148
  Boolean$2
149149
149149
  ]));
149150
- var HeaderSchema = Struct({ ascii: optional(Boolean$2) });
149151
149150
  var WorkspaceManifestSchema = Struct({
149152
149151
  languages: optional(Record$1(String$1, LanguageSchema)),
149153
149152
  corpus: optional(String$1),
149154
149153
  primary: optional(String$1),
149155
149154
  anchor: optional(AnchorSchema),
149156
149155
  settings: optional(SettingsSchema),
149157
- variables: optional(VariablesSchema),
149158
- header: optional(HeaderSchema)
149156
+ variables: optional(VariablesSchema)
149159
149157
  });
149160
149158
  var empty = {
149161
149159
  anchor: void 0,
@@ -149163,7 +149161,6 @@ var empty = {
149163
149161
  languages: [],
149164
149162
  settings: {},
149165
149163
  variables: {},
149166
- header: void 0,
149167
149164
  services: {},
149168
149165
  packageRoot: void 0,
149169
149166
  workspaceRoot: void 0,
@@ -149209,7 +149206,6 @@ var resolveFromManifest = (manifest, workspace, fromPath) => {
149209
149206
  languages: Object.keys(manifest.languages ?? {}),
149210
149207
  settings: manifest.settings ?? {},
149211
149208
  variables: variablesOf(manifest.variables),
149212
- header: manifest.header === void 0 ? void 0 : { ascii: manifest.header.ascii ?? false },
149213
149209
  services: servicesOf(manifest.languages),
149214
149210
  packageRoot: containerRoot(dirname(fromPath), container, workspace),
149215
149211
  workspaceRoot: workspace,
@@ -149250,7 +149246,6 @@ var PackageConfig = class extends Service$1()("PackageConfig", { make: gen$1(fun
149250
149246
  delims: anchorDelimsOf(c.anchor),
149251
149247
  primaryLanguage: c.primary,
149252
149248
  variables: c.variables,
149253
- header: c.header,
149254
149249
  packageRoot: c.packageRoot,
149255
149250
  workspaceRoot: c.workspaceRoot,
149256
149251
  corpusDir: c.corpusDir
@@ -149632,12 +149627,12 @@ var outputPath = (packageRoot, entry, sink) => match$13(packageRoot, {
149632
149627
  onNone: () => resolve(dirname(entry), sink),
149633
149628
  onSome: (root) => resolve(root, sink)
149634
149629
  });
149635
- var resolveSinks = (modules, entry, packageRoot, header) => pipe(fromNullishOr$4(modules.get(entry)), match$13({
149630
+ var resolveSinks = (modules, entry, packageRoot) => pipe(fromNullishOr$4(modules.get(entry)), match$13({
149636
149631
  onNone: () => [],
149637
149632
  onSome: (module) => map$24(module.product.files, (file) => ({
149638
149633
  section: file.code.origin.name,
149639
149634
  path: outputPath(packageRoot, entry, file.path),
149640
- content: stamped(header, file.code.languageId, basename(entry), fromProduct(modules, file.code.origin).code)
149635
+ content: fromProduct(modules, file.code.origin).code
149641
149636
  }))
149642
149637
  }));
149643
149638
  var TangleError = class extends TaggedError("TangleError") {
@@ -149647,72 +149642,6 @@ var TangleError = class extends TaggedError("TangleError") {
149647
149642
  return `loom: refusing to tangle ${this.entry} — ${count} error(s) across the corpus:\n${lines.join("\n")}`;
149648
149643
  }
149649
149644
  };
149650
- var cStyle = {
149651
- kind: "block",
149652
- open: "/*",
149653
- mid: " * ",
149654
- close: " */"
149655
- };
149656
- var markupStyle = {
149657
- kind: "block",
149658
- open: "<!--",
149659
- mid: " ",
149660
- close: "-->"
149661
- };
149662
- var hashStyle = {
149663
- kind: "line",
149664
- prefix: "# "
149665
- };
149666
- var commentStyles = /* @__PURE__ */ new Map([
149667
- ["typescript", cStyle],
149668
- ["tsx", cStyle],
149669
- ["javascript", cStyle],
149670
- ["jsx", cStyle],
149671
- ["css", cStyle],
149672
- ["scss", cStyle],
149673
- ["less", cStyle],
149674
- ["html", markupStyle],
149675
- ["xml", markupStyle],
149676
- ["vue", markupStyle],
149677
- ["svelte", markupStyle],
149678
- ["bash", hashStyle],
149679
- ["sh", hashStyle],
149680
- ["shell", hashStyle],
149681
- ["yaml", hashStyle],
149682
- ["yml", hashStyle],
149683
- ["toml", hashStyle],
149684
- ["python", hashStyle],
149685
- ["ruby", hashStyle]
149686
- ]);
149687
- var loomLogo = [
149688
- "L OOOO OOOO M M",
149689
- "L O O O O MM MM",
149690
- "L O O O O M M M",
149691
- "LLLL OOOO OOOO M M"
149692
- ];
149693
- var bannerLines = (ascii, loom) => [
149694
- ...ascii ? [...loomLogo, ""] : [],
149695
- `Tangled by Loom from ${loom} — composed from that`,
149696
- `loom's code sections. Edit the loom and re-tangle;`,
149697
- `changes made here are overwritten.`
149698
- ];
149699
- var commentBlock = (style, lines) => value$1(style).pipe(when({ kind: "block" }, (s) => [
149700
- s.open,
149701
- ...map$24(lines, (text) => `${s.mid}${text}`.trimEnd()),
149702
- s.close
149703
- ].join("\n")), when({ kind: "line" }, (s) => map$24(lines, (text) => `${s.prefix}${text}`.trimEnd()).join("\n")), exhaustive);
149704
- var belowShebang = (content, banner) => {
149705
- const newline = content.indexOf("\n");
149706
- const cut = content.startsWith("#!") && newline !== -1 ? newline + 1 : 0;
149707
- return `${content.slice(0, cut)}${banner}\n\n${content.slice(cut)}`;
149708
- };
149709
- var stamped = (header, languageId, loom, content) => match$13(header, {
149710
- onNone: () => content,
149711
- onSome: ({ ascii }) => match$13(fromNullishOr$4(commentStyles.get(languageId)), {
149712
- onNone: () => content,
149713
- onSome: (style) => belowShebang(content, commentBlock(style, bannerLines(ascii, loom)))
149714
- })
149715
- });
149716
149645
  var lineCharAt = (text, offset) => {
149717
149646
  const before = text.slice(0, offset);
149718
149647
  return {
@@ -149835,7 +149764,7 @@ var LoomCompiler = class extends Service$1()("LoomCompiler", { make: gen$1(funct
149835
149764
  return failures.length > 0 ? fail$8(new TangleError({
149836
149765
  entry: path,
149837
149766
  failures
149838
- })) : config.resolve(path).pipe(map$19(({ packageRoot, header }) => resolveSinks(scoped, path, fromNullishOr$4(packageRoot), fromNullishOr$4(header))));
149767
+ })) : config.resolve(path).pipe(map$19(({ packageRoot }) => resolveSinks(scoped, path, fromNullishOr$4(packageRoot))));
149839
149768
  })),
149840
149769
  composition: (path) => buildCorpus(documents, path).pipe(flatMap$7((modules) => forEach$8(fromIterable$15(modules.values()), (module) => config.resolve(module.path).pipe(map$19(({ packageRoot }) => map$24(module.product.files, (file) => ({
149841
149770
  path: outputPath(fromNullishOr$4(packageRoot), module.path, file.path),
@@ -149932,4 +149861,4 @@ var removeService = (id, dir) => sync$3(() => rmSync(join(storeDir(dir), "node_m
149932
149861
  //#endregion
149933
149862
  export { mkString as $, done$2 as $n, ensuring$3 as $t, log as A, timeoutOrElse$1 as An, none$1 as Ar, mapDone as At, WatchBackend as B, provide$5 as Bn, dual as Br, acquireRelease$1 as Bt, errorExitCode as C, runFork as Cn, fromUndefinedOr as Cr, is$2 as Ct, Crypto as D, suspend$4 as Dn, isSome as Dr, fromIterable$10 as Dt, make$22 as E, succeed$6 as En, isNone as Er, toCodecStringTree as Et, TypeId$33 as F, catchDone as Fn, hasProperty as Fr, offerUnsafe as Ft, empty$9 as G, _await$1 as Gn, callback$2 as Gt, callback as H, succeed$8 as Hn, pipe as Hr, andThen as Ht, FileDescriptor as I, TaggedError as In, isNotNull as Ir, take$7 as It, fromEffect$1 as J, makeUnsafe$16 as Jn, catchTag$2 as Jt, filter$5 as K, doneUnsafe as Kn, catchCause$3 as Kt, FileSystem as L, taggedEnum as Ln, isNotUndefined as Lr, make$50 as Lt, FalseValues as M, try_ as Mn, String$5 as Mr, failCauseUnsafe as Mt, TrueValues as N, uninterruptible as Nn, BaseProto as Nr, make$48 as Nt, make$30 as O, sync$3 as On, map$29 as Or, get$21 as Ot, Path as P, void_$1 as Pn, format$5 as Pr, offer$2 as Pt, merge$1 as Q, UnknownError as Qn, effectify as Qt, FileTypeId as R, effect as Rn, isNullish as Rr, makeUnsafe$12 as Rt, make$13 as S, result$3 as Sn, fromNullishOr$4 as Sr, decodeUnknownEffect as St, makeRunMain as T, serviceOption$1 as Tn, getOrUndefined$2 as Tr, tag$2 as Tt, concat$2 as U, addFinalizer$1 as Un, pipeArguments as Ur, as$1 as Ut, make$33 as V, provideMerge as Vn, identity$1 as Vr, addFinalizer as Vt, decodeText as W, MinimumLogLevel as Wn, asVoid as Wt, isStream as X, succeed$10 as Xn, catch_$3 as Xt, groupedWithin as Y, fail$11 as Yn, catchTags$1 as Yt, mapEffect as Z, Done as Zn, die$3 as Zt, QuitError as _, orElseSucceed$1 as _n, fail$14 as _r, ErrorClass as _t, storeDir as a, forkScoped as an, make$69 as ar, transduce as at, make$11 as b, provideService$3 as bn, contains$3 as br, Struct as bt, LoomCompiler as c, interrupt$3 as cn, filter$15 as cr, make$35 as ct, stringSnapshot as d, map$19 as dn, groupBy$1 as dr, isSink as dt, fail$8 as en, fail$12 as er, orDie as et, PackageConfig as f, mapError$3 as fn, map$24 as fr, BadArgument as ft, dist_exports as g, orDie$2 as gn, sort$1 as gr, Defect as gt, ReadError as h, option$4 as hn, reduce$10 as hr, ArraySchema as ht, servicePackage as i, forever$2 as in, getUnsafe$11 as ir, splitLines$1 as it, Boolean$1 as j, tryPromise as jn, some$13 as jr, endUnsafe as jt, error$1 as k, tap$2 as kn, match$13 as kr, fromTransform$1 as kt, ignoredDirs as l, isEffect as ln, fromIterable$15 as lr, drain$1 as lt, SemanticTokenSchema as m, matchEffect as mn, of$2 as mr, systemError as mt, installedServices as n, fnUntraced as nn, Service$1 as nr, runCollect as nt, workspaceRoot as o, gen$1 as on, Prototype as or, unwrap$1 as ot, LoomConfig as p, match$3 as pn, match$11 as pr, badArgument as pt, fromChannel as q, isDone$1 as qn, catchFilter$2 as qt, removeService as r, forEach$8 as rn, empty$20 as rr, runForEach as rt, DocumentSource as s, ignore$3 as sn, dedupe$1 as sr, get$16 as st, addService as t, flatMap$7 as tn, Reference as tr, run$4 as tt, loomsUnder as u, logWarning as un, getSomes as ur, fromChannel$1 as ut, Terminal as v, provide$3 as vn, match$12 as vr, Literal as vt, errorReported as w, scoped$2 as wn, getOrElse$2 as wr, optional as wt, Stdio as x, raceFirst as xn, flatMap$13 as xr, Union as xt, isQuitError as y, provideContext$3 as yn, succeed$12 as yr, String$1 as yt, Size as z, mergeAll$2 as zn, isUndefined$1 as zr, nominal as zt };
149934
149863
 
149935
- //# sourceMappingURL=LoomStore-C2tWuEsJ.js.map
149864
+ //# sourceMappingURL=LoomStore-BBRhdzet.js.map