@danielx/civet 0.7.30 → 0.7.32

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/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ This changelog is generated automatically by [`build/changelog.civet`](build/cha
4
4
  For each version of Civet, it lists and links to all incorporated PRs,
5
5
  as well as a full diff and commit list.
6
6
 
7
+ ## 0.7.32 (2024-10-03, [diff](https://github.com/DanielXMoore/Civet/compare/v0.7.31...v0.7.32), [commits](https://github.com/DanielXMoore/Civet/commits/v0.7.32))
8
+ * Document how to use Civet Web Workers in Vite [[#1403](https://github.com/DanielXMoore/Civet/pull/1403)]
9
+ * change types order in package.json exports; default config exports [[#1405](https://github.com/DanielXMoore/Civet/pull/1405)]
10
+
11
+ ## 0.7.31 (2024-09-18, [diff](https://github.com/DanielXMoore/Civet/compare/v0.7.30...v0.7.31), [commits](https://github.com/DanielXMoore/Civet/commits/v0.7.31))
12
+ * `--trace` fixes and documentation, cleanup of `getStateKey` [[#1399](https://github.com/DanielXMoore/Civet/pull/1399)]
13
+ * Run `<script type="text/civet">` in browser build [[#1400](https://github.com/DanielXMoore/Civet/pull/1400)]
14
+
7
15
  ## 0.7.30 (2024-09-15, [diff](https://github.com/DanielXMoore/Civet/compare/v0.7.29...v0.7.30), [commits](https://github.com/DanielXMoore/Civet/commits/v0.7.30))
8
16
  * Fix `!` negated indented argument in function call [[#1393](https://github.com/DanielXMoore/Civet/pull/1393)]
9
17
  * `break with` and `continue with` for modifying results array in a loop [[#1396](https://github.com/DanielXMoore/Civet/pull/1396)]
package/README.md CHANGED
@@ -26,7 +26,8 @@ The modern way to write TypeScript.
26
26
  [Babel](source/babel-plugin.civet),
27
27
  [Jest](https://github.com/DanielXMoore/Civet/blob/main/integration/jest),
28
28
  [Gulp](integration/gulp),
29
- [Bun](source/bun-civet.civet)
29
+ [Bun](source/bun-civet.civet),
30
+ [`<script>` tag](https://github.com/DanielXMoore/Civet/tree/main/integration/script)
30
31
  - Starter templates for [Solid](https://github.com/orenelbaum/solid-civet-template) and [Solid Start](https://github.com/orenelbaum/solid-start-civet-template)
31
32
 
32
33
  Quickstart Guide
package/dist/browser.js CHANGED
@@ -492,20 +492,22 @@ ${body}`;
492
492
  }
493
493
  });
494
494
 
495
- // source/main.civet
496
- var main_exports = {};
497
- __export(main_exports, {
495
+ // source/browser.civet
496
+ var browser_exports = {};
497
+ __export(browser_exports, {
498
498
  ParseError: () => import_lib3.ParseError,
499
499
  ParseErrors: () => ParseErrors,
500
500
  SourceMap: () => SourceMap2,
501
+ autoRunScripts: () => autoRunScripts,
501
502
  compile: () => compile,
502
- default: () => main_default,
503
503
  generate: () => generate_default,
504
504
  isCompileError: () => isCompileError,
505
505
  lib: () => lib_exports,
506
506
  parse: () => parse,
507
507
  parseProgram: () => parseProgram,
508
508
  prune: () => prune,
509
+ runScript: () => runScript,
510
+ runScripts: () => runScripts,
509
511
  sourcemap: () => sourcemap_exports
510
512
  });
511
513
 
@@ -4643,7 +4645,7 @@ ${body}`;
4643
4645
  scopes.pop();
4644
4646
  }
4645
4647
 
4646
- // source/browser.civet
4648
+ // source/browser-shim.civet
4647
4649
  function dirname(path) {
4648
4650
  return path.replace(/[^]*\//, "");
4649
4651
  }
@@ -4657,7 +4659,7 @@ ${body}`;
4657
4659
  );
4658
4660
  };
4659
4661
  }
4660
- var browser_default = {
4662
+ var browser_shim_default = {
4661
4663
  dirname,
4662
4664
  resolve,
4663
4665
  createRequire
@@ -4800,12 +4802,12 @@ ${body}`;
4800
4802
  }
4801
4803
  let output, context, contextGlobal;
4802
4804
  try {
4803
- context = browser_default.createContext?.() ?? globalThis;
4805
+ context = browser_shim_default.createContext?.() ?? globalThis;
4804
4806
  const filename2 = context.__filename = resolve(getFilename() ?? "");
4805
4807
  context.__dirname = dirname(filename2);
4806
4808
  context.require = createRequire(filename2);
4807
- if (browser_default.runInContext != null) {
4808
- contextGlobal = browser_default.runInContext("globalThis", context);
4809
+ if (browser_shim_default.runInContext != null) {
4810
+ contextGlobal = browser_shim_default.runInContext("globalThis", context);
4809
4811
  const builtins = new Set(Object.getOwnPropertyNames(contextGlobal));
4810
4812
  for (const name of Object.getOwnPropertyNames(globalThis)) {
4811
4813
  if (builtins.has(name)) {
@@ -4816,9 +4818,9 @@ ${body}`;
4816
4818
  ...Object.getOwnPropertyDescriptor(globalThis, name)
4817
4819
  });
4818
4820
  }
4819
- output = browser_default.runInContext(js, context, {
4821
+ output = browser_shim_default.runInContext(js, context, {
4820
4822
  filename: filename2,
4821
- importModuleDynamically: browser_default.constants?.USE_MAIN_CONTEXT_DEFAULT_LOADER
4823
+ importModuleDynamically: browser_shim_default.constants?.USE_MAIN_CONTEXT_DEFAULT_LOADER
4822
4824
  });
4823
4825
  } else {
4824
4826
  output = eval?.(js);
@@ -17894,19 +17896,6 @@ ${js}`
17894
17896
  }
17895
17897
  });
17896
17898
  Object.assign(config, initialConfig);
17897
- return {
17898
- type: "ParserMeta",
17899
- children: [],
17900
- getStateKey() {
17901
- const stateInt = state.currentIndent.level % 256 << 8 | state.classImplicitCallForbidden << 7 | state.indentedApplicationForbidden << 6 | state.bracedApplicationForbidden << 5 | state.trailingMemberPropertyForbidden << 4 | state.newlineBinaryOpForbidden << 3 | // This is slightly different than the rest of the state,
17902
- // since it is affected by the directive prologue and may be hit
17903
- // by the EOL rule early in the parse. Later if we wanted to
17904
- // allow block scoping of the compat directives we would need to
17905
- // add them all here.
17906
- config.coffeeComment << 2;
17907
- return [stateInt, state.currentJSXTag];
17908
- }
17909
- };
17910
17899
  });
17911
17900
  function Reset(ctx, state2) {
17912
17901
  return (0, import_lib3.$EVENT)(ctx, state2, "Reset", Reset$0);
@@ -18108,6 +18097,15 @@ ${js}`
18108
18097
  }
18109
18098
  }
18110
18099
  });
18100
+ function getStateKey() {
18101
+ const stateInt = state.currentIndent.level % 256 << 8 | state.classImplicitCallForbidden << 7 | state.indentedApplicationForbidden << 6 | state.bracedApplicationForbidden << 5 | state.trailingMemberPropertyForbidden << 4 | state.newlineBinaryOpForbidden << 3 | // This is slightly different than the rest of the state,
18102
+ // since it is affected by the directive prologue and may be hit
18103
+ // by the EOL rule early in the parse. Later if we wanted to
18104
+ // allow block scoping of the compat directives we would need to
18105
+ // add them all here.
18106
+ config.coffeeComment << 2;
18107
+ return [stateInt, state.currentJSXTag];
18108
+ }
18111
18109
  function parseProgram(input, options) {
18112
18110
  filename = options?.filename;
18113
18111
  initialConfig = options?.parseOptions;
@@ -18334,7 +18332,11 @@ ${js}`
18334
18332
  })();
18335
18333
  };
18336
18334
  var base64Encode = function(src) {
18337
- return Buffer.from(src).toString("base64");
18335
+ if (typeof Buffer !== "undefined") {
18336
+ return Buffer.from(src).toString("base64");
18337
+ } else {
18338
+ return btoa(src);
18339
+ }
18338
18340
  };
18339
18341
  var vlqTable = new Uint8Array(128);
18340
18342
  var vlqChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -18638,7 +18640,6 @@ ${counts}`;
18638
18640
  meta.logs = logs;
18639
18641
  }
18640
18642
  const stateCache = new StateCache();
18641
- let getStateKey = null;
18642
18643
  const stack = [];
18643
18644
  const events = {
18644
18645
  meta,
@@ -18667,14 +18668,12 @@ ${counts}`;
18667
18668
  return;
18668
18669
  },
18669
18670
  exit: function(ruleName, state2, result) {
18670
- if (ruleName === "Reset") {
18671
- ({ getStateKey } = result.value);
18672
- }
18673
- if (!uncacheable.has(ruleName)) {
18674
- const [stateKey, tagKey] = getStateKey();
18675
- const key = [tagKey, stateKey, state2.pos, ruleName];
18676
- stateCache.set(key, result);
18671
+ if (uncacheable.has(ruleName)) {
18672
+ return;
18677
18673
  }
18674
+ const [stateKey, tagKey] = getStateKey();
18675
+ const key = [tagKey, stateKey, state2.pos, ruleName];
18676
+ stateCache.set(key, result);
18678
18677
  if (getConfig().verbose && result) {
18679
18678
  console.log(`Parsed ${JSON.stringify(state2.input.slice(state2.pos, result.pos))} [pos ${state2.pos}-${result.pos}] as ${ruleName}`);
18680
18679
  }
@@ -18690,6 +18689,71 @@ ${counts}`;
18690
18689
  var isCompileError = function(err) {
18691
18690
  return err instanceof import_lib3.ParseError || err instanceof ParseErrors;
18692
18691
  };
18693
- var main_default = { parse, parseProgram, ParseError: import_lib3.ParseError, ParseErrors, generate: generate_default, sourcemap: sourcemap_exports, SourceMap: SourceMap2, compile, isCompileError };
18694
- return __toCommonJS(main_exports);
18692
+
18693
+ // source/browser.civet
18694
+ async function runScripts(type = "text/civet") {
18695
+ const scripts = window.document.querySelectorAll(`script[type=${JSON.stringify(type)}]`);
18696
+ for (let i1 = 0, len3 = scripts.length; i1 < len3; i1++) {
18697
+ const i = i1;
18698
+ const script = scripts[i1];
18699
+ runScript(script, `<script>${i}`);
18700
+ }
18701
+ }
18702
+ async function runScript(script, name = "<script>") {
18703
+ const options = {
18704
+ inlineMap: true,
18705
+ js: true
18706
+ };
18707
+ let code;
18708
+ let ref;
18709
+ if (ref = script.src || script.getAttribute("data-src")) {
18710
+ const source = ref;
18711
+ options.filename = source;
18712
+ code = await (await fetch(source)).text();
18713
+ } else {
18714
+ options.filename = script.id || name;
18715
+ code = script.innerHTML;
18716
+ }
18717
+ const js = await compile(code, options);
18718
+ return window.eval(js);
18719
+ }
18720
+ function autoRunScripts(roots, options = {}) {
18721
+ const observer = new MutationObserver(async (mutations) => {
18722
+ for (let i2 = 0, len1 = mutations.length; i2 < len1; i2++) {
18723
+ const mutation = mutations[i2];
18724
+ if (!(mutation.type === "childList")) {
18725
+ continue;
18726
+ }
18727
+ for (let ref1 = mutation.addedNodes, i3 = 0, len22 = ref1.length; i3 < len22; i3++) {
18728
+ const node = ref1[i3];
18729
+ if (node.nodeType === 1 && node.tagName === "SCRIPT" && node.type === "text/civet") {
18730
+ await runScript(node);
18731
+ }
18732
+ }
18733
+ }
18734
+ });
18735
+ options = { ...options, childList: true };
18736
+ for (let i4 = 0, len3 = roots.length; i4 < len3; i4++) {
18737
+ const root = roots[i4];
18738
+ observer.observe(root, options);
18739
+ }
18740
+ return observer;
18741
+ }
18742
+ if (!(typeof window === "undefined")) {
18743
+ const { currentScript } = document;
18744
+ window?.addEventListener?.("DOMContentLoaded", () => {
18745
+ if (currentScript?.hasAttribute("data-no-scripts")) {
18746
+ return;
18747
+ }
18748
+ if (!currentScript?.hasAttribute("data-no-start-scripts")) {
18749
+ runScripts();
18750
+ }
18751
+ if (!currentScript?.hasAttribute("data-no-auto-scripts")) {
18752
+ return autoRunScripts([document.head, document.body]);
18753
+ }
18754
+ ;
18755
+ return;
18756
+ });
18757
+ }
18758
+ return __toCommonJS(browser_exports);
18695
18759
  })();
package/dist/civet CHANGED
@@ -516,6 +516,7 @@ Options:
516
516
  --no-cache Disable compiler caching (slow, for debugging)
517
517
  --typecheck Run TypeScript and output diagnostics
518
518
  --emit-declaration Run TypeScript and emit .d.ts files (if no errors)
519
+ --trace XX Log detailed parsing notes to a file, for parser debugging
519
520
 
520
521
  You can use - to read from stdin or (prefixed by -o) write to stdout.
521
522
 
package/dist/config.js CHANGED
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // source/config.civet
31
31
  var config_exports = {};
32
32
  __export(config_exports, {
33
+ default: () => config_default,
33
34
  findConfig: () => findConfig,
34
35
  findInDir: () => findInDir,
35
36
  loadConfig: () => loadConfig
@@ -151,6 +152,11 @@ async function loadConfig(pathname) {
151
152
  delete data?.parseOptions?.comptime;
152
153
  return data;
153
154
  }
155
+ var config_default = {
156
+ findConfig,
157
+ findInDir,
158
+ loadConfig
159
+ };
154
160
  // Annotate the CommonJS export names for ESM import in node:
155
161
  0 && (module.exports = {
156
162
  findConfig,
package/dist/config.mjs CHANGED
@@ -115,7 +115,13 @@ async function loadConfig(pathname) {
115
115
  delete data?.parseOptions?.comptime;
116
116
  return data;
117
117
  }
118
+ var config_default = {
119
+ findConfig,
120
+ findInDir,
121
+ loadConfig
122
+ };
118
123
  export {
124
+ config_default as default,
119
125
  findConfig,
120
126
  findInDir,
121
127
  loadConfig
package/dist/main.js CHANGED
@@ -17872,19 +17872,6 @@ var Reset$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'Reset ""'), fu
17872
17872
  }
17873
17873
  });
17874
17874
  Object.assign(config, initialConfig);
17875
- return {
17876
- type: "ParserMeta",
17877
- children: [],
17878
- getStateKey() {
17879
- const stateInt = state.currentIndent.level % 256 << 8 | state.classImplicitCallForbidden << 7 | state.indentedApplicationForbidden << 6 | state.bracedApplicationForbidden << 5 | state.trailingMemberPropertyForbidden << 4 | state.newlineBinaryOpForbidden << 3 | // This is slightly different than the rest of the state,
17880
- // since it is affected by the directive prologue and may be hit
17881
- // by the EOL rule early in the parse. Later if we wanted to
17882
- // allow block scoping of the compat directives we would need to
17883
- // add them all here.
17884
- config.coffeeComment << 2;
17885
- return [stateInt, state.currentJSXTag];
17886
- }
17887
- };
17888
17875
  });
17889
17876
  function Reset(ctx, state2) {
17890
17877
  return (0, import_lib3.$EVENT)(ctx, state2, "Reset", Reset$0);
@@ -18086,6 +18073,15 @@ Object.defineProperties(state, {
18086
18073
  }
18087
18074
  }
18088
18075
  });
18076
+ function getStateKey() {
18077
+ const stateInt = state.currentIndent.level % 256 << 8 | state.classImplicitCallForbidden << 7 | state.indentedApplicationForbidden << 6 | state.bracedApplicationForbidden << 5 | state.trailingMemberPropertyForbidden << 4 | state.newlineBinaryOpForbidden << 3 | // This is slightly different than the rest of the state,
18078
+ // since it is affected by the directive prologue and may be hit
18079
+ // by the EOL rule early in the parse. Later if we wanted to
18080
+ // allow block scoping of the compat directives we would need to
18081
+ // add them all here.
18082
+ config.coffeeComment << 2;
18083
+ return [stateInt, state.currentJSXTag];
18084
+ }
18089
18085
  function parseProgram(input, options) {
18090
18086
  filename = options?.filename;
18091
18087
  initialConfig = options?.parseOptions;
@@ -18312,7 +18308,11 @@ var encodeBase64 = function(value) {
18312
18308
  })();
18313
18309
  };
18314
18310
  var base64Encode = function(src) {
18315
- return Buffer.from(src).toString("base64");
18311
+ if (typeof Buffer !== "undefined") {
18312
+ return Buffer.from(src).toString("base64");
18313
+ } else {
18314
+ return btoa(src);
18315
+ }
18316
18316
  };
18317
18317
  var vlqTable = new Uint8Array(128);
18318
18318
  var vlqChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -18616,7 +18616,6 @@ var makeCache = function({ hits, trace } = {}) {
18616
18616
  meta.logs = logs;
18617
18617
  }
18618
18618
  const stateCache = new StateCache();
18619
- let getStateKey = null;
18620
18619
  const stack = [];
18621
18620
  const events = {
18622
18621
  meta,
@@ -18645,14 +18644,12 @@ var makeCache = function({ hits, trace } = {}) {
18645
18644
  return;
18646
18645
  },
18647
18646
  exit: function(ruleName, state2, result) {
18648
- if (ruleName === "Reset") {
18649
- ({ getStateKey } = result.value);
18650
- }
18651
- if (!uncacheable.has(ruleName)) {
18652
- const [stateKey, tagKey] = getStateKey();
18653
- const key = [tagKey, stateKey, state2.pos, ruleName];
18654
- stateCache.set(key, result);
18647
+ if (uncacheable.has(ruleName)) {
18648
+ return;
18655
18649
  }
18650
+ const [stateKey, tagKey] = getStateKey();
18651
+ const key = [tagKey, stateKey, state2.pos, ruleName];
18652
+ stateCache.set(key, result);
18656
18653
  if (getConfig().verbose && result) {
18657
18654
  console.log(`Parsed ${JSON.stringify(state2.input.slice(state2.pos, result.pos))} [pos ${state2.pos}-${result.pos}] as ${ruleName}`);
18658
18655
  }
package/dist/main.mjs CHANGED
@@ -17852,19 +17852,6 @@ var Reset$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L0, 'Reset ""'), fu
17852
17852
  }
17853
17853
  });
17854
17854
  Object.assign(config, initialConfig);
17855
- return {
17856
- type: "ParserMeta",
17857
- children: [],
17858
- getStateKey() {
17859
- const stateInt = state.currentIndent.level % 256 << 8 | state.classImplicitCallForbidden << 7 | state.indentedApplicationForbidden << 6 | state.bracedApplicationForbidden << 5 | state.trailingMemberPropertyForbidden << 4 | state.newlineBinaryOpForbidden << 3 | // This is slightly different than the rest of the state,
17860
- // since it is affected by the directive prologue and may be hit
17861
- // by the EOL rule early in the parse. Later if we wanted to
17862
- // allow block scoping of the compat directives we would need to
17863
- // add them all here.
17864
- config.coffeeComment << 2;
17865
- return [stateInt, state.currentJSXTag];
17866
- }
17867
- };
17868
17855
  });
17869
17856
  function Reset(ctx, state2) {
17870
17857
  return (0, import_lib3.$EVENT)(ctx, state2, "Reset", Reset$0);
@@ -18066,6 +18053,15 @@ Object.defineProperties(state, {
18066
18053
  }
18067
18054
  }
18068
18055
  });
18056
+ function getStateKey() {
18057
+ const stateInt = state.currentIndent.level % 256 << 8 | state.classImplicitCallForbidden << 7 | state.indentedApplicationForbidden << 6 | state.bracedApplicationForbidden << 5 | state.trailingMemberPropertyForbidden << 4 | state.newlineBinaryOpForbidden << 3 | // This is slightly different than the rest of the state,
18058
+ // since it is affected by the directive prologue and may be hit
18059
+ // by the EOL rule early in the parse. Later if we wanted to
18060
+ // allow block scoping of the compat directives we would need to
18061
+ // add them all here.
18062
+ config.coffeeComment << 2;
18063
+ return [stateInt, state.currentJSXTag];
18064
+ }
18069
18065
  function parseProgram(input, options) {
18070
18066
  filename = options?.filename;
18071
18067
  initialConfig = options?.parseOptions;
@@ -18292,7 +18288,11 @@ var encodeBase64 = function(value) {
18292
18288
  })();
18293
18289
  };
18294
18290
  var base64Encode = function(src) {
18295
- return Buffer.from(src).toString("base64");
18291
+ if (typeof Buffer !== "undefined") {
18292
+ return Buffer.from(src).toString("base64");
18293
+ } else {
18294
+ return btoa(src);
18295
+ }
18296
18296
  };
18297
18297
  var vlqTable = new Uint8Array(128);
18298
18298
  var vlqChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
@@ -18596,7 +18596,6 @@ var makeCache = function({ hits, trace } = {}) {
18596
18596
  meta.logs = logs;
18597
18597
  }
18598
18598
  const stateCache = new StateCache();
18599
- let getStateKey = null;
18600
18599
  const stack = [];
18601
18600
  const events = {
18602
18601
  meta,
@@ -18625,14 +18624,12 @@ var makeCache = function({ hits, trace } = {}) {
18625
18624
  return;
18626
18625
  },
18627
18626
  exit: function(ruleName, state2, result) {
18628
- if (ruleName === "Reset") {
18629
- ({ getStateKey } = result.value);
18630
- }
18631
- if (!uncacheable.has(ruleName)) {
18632
- const [stateKey, tagKey] = getStateKey();
18633
- const key = [tagKey, stateKey, state2.pos, ruleName];
18634
- stateCache.set(key, result);
18627
+ if (uncacheable.has(ruleName)) {
18628
+ return;
18635
18629
  }
18630
+ const [stateKey, tagKey] = getStateKey();
18631
+ const key = [tagKey, stateKey, state2.pos, ruleName];
18632
+ stateCache.set(key, result);
18636
18633
  if (getConfig().verbose && result) {
18637
18634
  console.log(`Parsed ${JSON.stringify(state2.input.slice(state2.pos, result.pos))} [pos ${state2.pos}-${result.pos}] as ${ruleName}`);
18638
18635
  }
package/dist/types.d.ts CHANGED
@@ -127,8 +127,8 @@ declare module "@danielx/civet/config" {
127
127
  path: string
128
128
  ): Promise<import("@danielx/civet").CompileOptions>
129
129
  export default {
130
- findInDir: typeof findInDir,
131
- findConfig: typeof findConfig,
132
- loadConfig: typeof loadConfig,
130
+ findInDir,
131
+ findConfig,
132
+ loadConfig,
133
133
  }
134
134
  }
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\astro.civet.jsx
29
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/astro.civet.jsx
30
30
  var astro_civet_exports = {};
31
31
  __export(astro_civet_exports, {
32
32
  default: () => astro_civet_default
@@ -1,4 +1,4 @@
1
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\astro.civet.jsx
1
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/astro.civet.jsx
2
2
  import civetUnplugin, {} from "./unplugin.mjs";
3
3
  var astro_civet_default = function(opts = {}) {
4
4
  return {
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\esbuild.civet.jsx
29
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/esbuild.civet.jsx
30
30
  var esbuild_civet_exports = {};
31
31
  __export(esbuild_civet_exports, {
32
32
  default: () => esbuild_civet_default
@@ -1,4 +1,4 @@
1
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\esbuild.civet.jsx
1
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/esbuild.civet.jsx
2
2
  import civetUnplugin from "./unplugin.mjs";
3
3
  var esbuild_civet_default = civetUnplugin.esbuild;
4
4
  export {
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\rollup.civet.jsx
29
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/rollup.civet.jsx
30
30
  var rollup_civet_exports = {};
31
31
  __export(rollup_civet_exports, {
32
32
  default: () => rollup_civet_default
@@ -1,4 +1,4 @@
1
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\rollup.civet.jsx
1
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/rollup.civet.jsx
2
2
  import civetUnplugin from "./unplugin.mjs";
3
3
  var rollup_civet_default = civetUnplugin.rollup;
4
4
  export {
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\unplugin.civet.jsx
29
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/unplugin.civet.jsx
30
30
  var unplugin_civet_exports = {};
31
31
  __export(unplugin_civet_exports, {
32
32
  default: () => unplugin_civet_default,
@@ -46,7 +46,7 @@ var import_os = __toESM(require("os"));
46
46
  // source/unplugin/constants.mjs
47
47
  var DEFAULT_EXTENSIONS = [".mjs", ".js", ".mts", ".ts", ".jsx", ".tsx", ".json"];
48
48
 
49
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\unplugin.civet.jsx
49
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/unplugin.civet.jsx
50
50
  var DiagnosticCategory = {};
51
51
  DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
52
52
  DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
@@ -1,4 +1,4 @@
1
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\unplugin.civet.jsx
1
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/unplugin.civet.jsx
2
2
  import { createUnplugin } from "unplugin";
3
3
  import civet, { SourceMap } from "@danielx/civet";
4
4
  import { findInDir, loadConfig } from "@danielx/civet/config";
@@ -14,7 +14,7 @@ import os from "os";
14
14
  // source/unplugin/constants.mjs
15
15
  var DEFAULT_EXTENSIONS = [".mjs", ".js", ".mts", ".ts", ".jsx", ".tsx", ".json"];
16
16
 
17
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\unplugin.civet.jsx
17
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/unplugin.civet.jsx
18
18
  var DiagnosticCategory = {};
19
19
  DiagnosticCategory[DiagnosticCategory["Warning"] = 0] = "Warning";
20
20
  DiagnosticCategory[DiagnosticCategory["Error"] = 1] = "Error";
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\vite.civet.jsx
29
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/vite.civet.jsx
30
30
  var vite_civet_exports = {};
31
31
  __export(vite_civet_exports, {
32
32
  default: () => vite_civet_default
@@ -1,4 +1,4 @@
1
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\vite.civet.jsx
1
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/vite.civet.jsx
2
2
  import civetUnplugin from "./unplugin.mjs";
3
3
  var vite_civet_default = civetUnplugin.vite;
4
4
  export {
@@ -26,7 +26,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  ));
27
27
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
28
 
29
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\webpack.civet.jsx
29
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/webpack.civet.jsx
30
30
  var webpack_civet_exports = {};
31
31
  __export(webpack_civet_exports, {
32
32
  default: () => webpack_civet_default
@@ -1,4 +1,4 @@
1
- // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\webpack.civet.jsx
1
+ // unplugin-civet:/home/daniel/apps/Civet/source/unplugin/webpack.civet.jsx
2
2
  import civetUnplugin from "./unplugin.mjs";
3
3
  var webpack_civet_default = civetUnplugin.webpack;
4
4
  export {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@danielx/civet",
3
3
  "type": "commonjs",
4
- "version": "0.7.30",
4
+ "version": "0.7.32",
5
5
  "description": "CoffeeScript style syntax for TypeScript",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/main.mjs",
@@ -11,9 +11,9 @@
11
11
  },
12
12
  "exports": {
13
13
  ".": {
14
+ "types": "./dist/types.d.ts",
14
15
  "import": "./dist/main.mjs",
15
- "require": "./dist/main.js",
16
- "types": "./dist/types.d.ts"
16
+ "require": "./dist/main.js"
17
17
  },
18
18
  "./babel-plugin": {
19
19
  "require": "./dist/babel-plugin.js",
@@ -24,39 +24,39 @@
24
24
  "./esbuild-plugin": "./dist/esbuild-plugin.js",
25
25
  "./register": "./register.js",
26
26
  "./config": {
27
+ "types": "./dist/config.d.ts",
27
28
  "require": "./dist/config.js",
28
- "import": "./dist/config.mjs",
29
- "types": "./dist/config.d.ts"
29
+ "import": "./dist/config.mjs"
30
30
  },
31
31
  "./unplugin": {
32
+ "types": "./dist/unplugin/unplugin.d.ts",
32
33
  "require": "./dist/unplugin/unplugin.js",
33
- "import": "./dist/unplugin/unplugin.mjs",
34
- "types": "./dist/unplugin/unplugin.d.ts"
34
+ "import": "./dist/unplugin/unplugin.mjs"
35
35
  },
36
36
  "./vite": {
37
+ "types": "./dist/unplugin/vite.d.ts",
37
38
  "require": "./dist/unplugin/vite.js",
38
- "import": "./dist/unplugin/vite.mjs",
39
- "types": "./dist/unplugin/vite.d.ts"
39
+ "import": "./dist/unplugin/vite.mjs"
40
40
  },
41
41
  "./webpack": {
42
+ "types": "./dist/unplugin/webpack.d.ts",
42
43
  "require": "./dist/unplugin/webpack.js",
43
- "import": "./dist/unplugin/webpack.mjs",
44
- "types": "./dist/unplugin/webpack.d.ts"
44
+ "import": "./dist/unplugin/webpack.mjs"
45
45
  },
46
46
  "./rollup": {
47
+ "types": "./dist/unplugin/rollup.d.ts",
47
48
  "require": "./dist/unplugin/rollup.js",
48
- "import": "./dist/unplugin/rollup.mjs",
49
- "types": "./dist/unplugin/rollup.d.ts"
49
+ "import": "./dist/unplugin/rollup.mjs"
50
50
  },
51
51
  "./esbuild": {
52
+ "types": "./dist/unplugin/esbuild.d.ts",
52
53
  "require": "./dist/unplugin/esbuild.js",
53
- "import": "./dist/unplugin/esbuild.mjs",
54
- "types": "./dist/unplugin/esbuild.d.ts"
54
+ "import": "./dist/unplugin/esbuild.mjs"
55
55
  },
56
56
  "./astro": {
57
+ "types": "./dist/unplugin/astro.d.ts",
57
58
  "require": "./dist/unplugin/astro.js",
58
- "import": "./dist/unplugin/astro.mjs",
59
- "types": "./dist/unplugin/astro.d.ts"
59
+ "import": "./dist/unplugin/astro.mjs"
60
60
  },
61
61
  "./ts-diagnostic": {
62
62
  "require": "./dist/ts-diagnostic.js",
@@ -95,7 +95,7 @@
95
95
  "unplugin": "^1.12.2"
96
96
  },
97
97
  "devDependencies": {
98
- "@danielx/civet": "0.7.16",
98
+ "@danielx/civet": "0.7.30",
99
99
  "@danielx/hera": "^0.8.16",
100
100
  "@prettier/sync": "^0.5.2",
101
101
  "@types/assert": "^1.5.6",