@danielx/civet 0.7.16 → 0.7.18

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.
Files changed (50) hide show
  1. package/README.md +2 -1
  2. package/dist/browser.js +28 -12
  3. package/dist/civet +139 -100
  4. package/dist/config.d.mts +1 -0
  5. package/dist/config.d.ts +1 -0
  6. package/dist/config.mjs +122 -0
  7. package/dist/esm.mjs +1 -1
  8. package/dist/main.js +28 -12
  9. package/dist/main.mjs +28 -12
  10. package/dist/unplugin/astro.d.ts +11 -0
  11. package/dist/unplugin/astro.js +49 -0
  12. package/dist/unplugin/astro.mjs +19 -0
  13. package/dist/unplugin/esbuild.d.ts +2 -0
  14. package/dist/unplugin/esbuild.js +36 -0
  15. package/dist/unplugin/esbuild.mjs +6 -0
  16. package/dist/unplugin/rollup.d.ts +2 -0
  17. package/dist/unplugin/rollup.js +36 -0
  18. package/dist/unplugin/rollup.mjs +6 -0
  19. package/dist/{unplugin.d.ts → unplugin/unplugin.d.ts} +7 -10
  20. package/dist/{unplugin.js → unplugin/unplugin.js} +81 -66
  21. package/dist/{unplugin-shared.mjs → unplugin/unplugin.mjs} +80 -65
  22. package/dist/unplugin/vite.d.ts +2 -0
  23. package/dist/unplugin/vite.js +36 -0
  24. package/dist/unplugin/vite.mjs +6 -0
  25. package/dist/unplugin/webpack.d.ts +2 -0
  26. package/dist/unplugin/webpack.js +36 -0
  27. package/dist/unplugin/webpack.mjs +6 -0
  28. package/package.json +27 -17
  29. package/dist/astro.d.mts +0 -16
  30. package/dist/astro.d.ts +0 -16
  31. package/dist/astro.js +0 -537
  32. package/dist/astro.mjs +0 -22
  33. package/dist/esbuild.d.mts +0 -8
  34. package/dist/esbuild.d.ts +0 -8
  35. package/dist/esbuild.js +0 -524
  36. package/dist/esbuild.mjs +0 -9
  37. package/dist/rollup.d.mts +0 -8
  38. package/dist/rollup.d.ts +0 -8
  39. package/dist/rollup.js +0 -524
  40. package/dist/rollup.mjs +0 -9
  41. package/dist/unplugin.d.mts +0 -26
  42. package/dist/unplugin.mjs +0 -10
  43. package/dist/vite.d.mts +0 -8
  44. package/dist/vite.d.ts +0 -8
  45. package/dist/vite.js +0 -524
  46. package/dist/vite.mjs +0 -9
  47. package/dist/webpack.d.mts +0 -7
  48. package/dist/webpack.d.ts +0 -7
  49. package/dist/webpack.js +0 -524
  50. package/dist/webpack.mjs +0 -9
package/dist/main.js CHANGED
@@ -5631,6 +5631,7 @@ function processAssignments(statements) {
5631
5631
  }
5632
5632
  }
5633
5633
  }
5634
+ const refsToDeclare = /* @__PURE__ */ new Set();
5634
5635
  i = len3 - 1;
5635
5636
  while (i >= 0) {
5636
5637
  const lastAssignment = $1[i];
@@ -5664,6 +5665,7 @@ function processAssignments(statements) {
5664
5665
  }
5665
5666
  } else if (m2 = lhs.type, m2 === "ObjectBindingPattern" || m2 === "ArrayBindingPattern") {
5666
5667
  processBindingPatternLHS(lhs, tail);
5668
+ gatherRecursiveAll(lhs, ($5) => $5.type === "Ref").forEach(refsToDeclare.add.bind(refsToDeclare));
5667
5669
  }
5668
5670
  }
5669
5671
  i--;
@@ -5694,6 +5696,17 @@ function processAssignments(statements) {
5694
5696
  }
5695
5697
  i--;
5696
5698
  }
5699
+ if (refsToDeclare.size) {
5700
+ if (exp.hoistDec) {
5701
+ exp.hoistDec.children.push([...refsToDeclare].map(($6) => [",", $6]));
5702
+ } else {
5703
+ exp.hoistDec = {
5704
+ type: "Declaration",
5705
+ children: ["let ", [...refsToDeclare].map((r, i2) => i2 ? [",", r] : r)],
5706
+ names: []
5707
+ };
5708
+ }
5709
+ }
5697
5710
  exp.names = $1.flatMap(([, l]) => l.names || []);
5698
5711
  if (tail.length) {
5699
5712
  const index = exp.children.indexOf($2);
@@ -5830,7 +5843,7 @@ function processTypes(node) {
5830
5843
  });
5831
5844
  }
5832
5845
  function processStatementExpressions(statements) {
5833
- gatherRecursiveAll(statements, ($5) => $5.type === "StatementExpression").forEach((_exp) => {
5846
+ gatherRecursiveAll(statements, ($7) => $7.type === "StatementExpression").forEach((_exp) => {
5834
5847
  const exp = _exp;
5835
5848
  const { statement } = exp;
5836
5849
  let ref11;
@@ -5960,11 +5973,11 @@ function populateRefs(statements) {
5960
5973
  function processPlaceholders(statements) {
5961
5974
  const placeholderMap = /* @__PURE__ */ new Map();
5962
5975
  const liftedIfs = /* @__PURE__ */ new Set();
5963
- gatherRecursiveAll(statements, ($6) => $6.type === "Placeholder").forEach((_exp) => {
5976
+ gatherRecursiveAll(statements, ($8) => $8.type === "Placeholder").forEach((_exp) => {
5964
5977
  const exp = _exp;
5965
5978
  let ancestor;
5966
5979
  if (exp.subtype === ".") {
5967
- ({ ancestor } = findAncestor(exp, ($7) => $7.type === "Call"));
5980
+ ({ ancestor } = findAncestor(exp, ($9) => $9.type === "Call"));
5968
5981
  ancestor = ancestor?.parent;
5969
5982
  while (ancestor?.parent?.type === "UnaryExpression" || ancestor?.parent?.type === "NewExpression") {
5970
5983
  ancestor = ancestor.parent;
@@ -7086,8 +7099,8 @@ var $L60 = (0, import_lib3.$L)("??=");
7086
7099
  var $L61 = (0, import_lib3.$L)("?=");
7087
7100
  var $L62 = (0, import_lib3.$L)("and=");
7088
7101
  var $L63 = (0, import_lib3.$L)("or=");
7089
- var $L64 = (0, import_lib3.$L)("**");
7090
- var $L65 = (0, import_lib3.$L)("*");
7102
+ var $L64 = (0, import_lib3.$L)("*");
7103
+ var $L65 = (0, import_lib3.$L)("**");
7091
7104
  var $L66 = (0, import_lib3.$L)("/");
7092
7105
  var $L67 = (0, import_lib3.$L)("%%");
7093
7106
  var $L68 = (0, import_lib3.$L)("%");
@@ -8125,13 +8138,15 @@ var TernaryRest$$ = [TernaryRest$0, TernaryRest$1];
8125
8138
  function TernaryRest(ctx, state2) {
8126
8139
  return (0, import_lib3.$EVENT_C)(ctx, state2, "TernaryRest", TernaryRest$$);
8127
8140
  }
8128
- var NestedTernaryRest$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(PushIndent, (0, import_lib3.$E)((0, import_lib3.$S)(Nested, QuestionMark, MaybeNestedExtendedExpression, Nested, Colon, MaybeNestedExtendedExpression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
8141
+ var NestedTernaryRest$0 = (0, import_lib3.$S)(Nested, QuestionMark, MaybeNestedExtendedExpression, Nested, Colon, MaybeNestedExtendedExpression);
8142
+ var NestedTernaryRest$1 = (0, import_lib3.$TS)((0, import_lib3.$S)(PushIndent, (0, import_lib3.$E)((0, import_lib3.$S)(Nested, QuestionMark, MaybeNestedExtendedExpression, Nested, Colon, MaybeNestedExtendedExpression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
8129
8143
  if ($2)
8130
8144
  return $2;
8131
8145
  return $skip;
8132
8146
  });
8147
+ var NestedTernaryRest$$ = [NestedTernaryRest$0, NestedTernaryRest$1];
8133
8148
  function NestedTernaryRest(ctx, state2) {
8134
- return (0, import_lib3.$EVENT)(ctx, state2, "NestedTernaryRest", NestedTernaryRest$0);
8149
+ return (0, import_lib3.$EVENT_C)(ctx, state2, "NestedTernaryRest", NestedTernaryRest$$);
8135
8150
  }
8136
8151
  var ShortCircuitExpression$0 = BinaryOpExpression;
8137
8152
  function ShortCircuitExpression(ctx, state2) {
@@ -11479,11 +11494,12 @@ var NotDedentedBinaryOp$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_
11479
11494
  ws.push(...$2);
11480
11495
  return [ws, $3];
11481
11496
  });
11482
- var NotDedentedBinaryOp$1 = (0, import_lib3.$TS)((0, import_lib3.$S)(Nested, (0, import_lib3.$E)(_), (0, import_lib3.$N)(Identifier), BinaryOp), function($skip, $loc, $0, $1, $2, $3, $4) {
11497
+ var NotDedentedBinaryOp$1 = (0, import_lib3.$TS)((0, import_lib3.$S)(Nested, (0, import_lib3.$E)(_), (0, import_lib3.$N)(Identifier), (0, import_lib3.$C)((0, import_lib3.$N)((0, import_lib3.$EXPECT)($L64, 'NotDedentedBinaryOp "*"')), (0, import_lib3.$N)(ImportDeclaration)), BinaryOp), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
11498
+ var op = $5;
11483
11499
  const ws = [...$1];
11484
11500
  if ($2)
11485
11501
  ws.push(...$2);
11486
- return [ws, $4];
11502
+ return [ws, op];
11487
11503
  });
11488
11504
  var NotDedentedBinaryOp$$ = [NotDedentedBinaryOp$0, NotDedentedBinaryOp$1];
11489
11505
  function NotDedentedBinaryOp(ctx, state2) {
@@ -11537,8 +11553,8 @@ var _BinaryOp$$ = [_BinaryOp$0, _BinaryOp$1, _BinaryOp$2];
11537
11553
  function _BinaryOp(ctx, state2) {
11538
11554
  return (0, import_lib3.$EVENT_C)(ctx, state2, "_BinaryOp", _BinaryOp$$);
11539
11555
  }
11540
- var BinaryOpSymbol$0 = (0, import_lib3.$EXPECT)($L64, 'BinaryOpSymbol "**"');
11541
- var BinaryOpSymbol$1 = (0, import_lib3.$EXPECT)($L65, 'BinaryOpSymbol "*"');
11556
+ var BinaryOpSymbol$0 = (0, import_lib3.$EXPECT)($L65, 'BinaryOpSymbol "**"');
11557
+ var BinaryOpSymbol$1 = (0, import_lib3.$EXPECT)($L64, 'BinaryOpSymbol "*"');
11542
11558
  var BinaryOpSymbol$2 = (0, import_lib3.$EXPECT)($L66, 'BinaryOpSymbol "/"');
11543
11559
  var BinaryOpSymbol$3 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L67, 'BinaryOpSymbol "%%"'), function($skip, $loc, $0, $1) {
11544
11560
  return {
@@ -14473,7 +14489,7 @@ var SingleQuote$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L188, `Single
14473
14489
  function SingleQuote(ctx, state2) {
14474
14490
  return (0, import_lib3.$EVENT)(ctx, state2, "SingleQuote", SingleQuote$0);
14475
14491
  }
14476
- var Star$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L65, 'Star "*"'), function($skip, $loc, $0, $1) {
14492
+ var Star$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L64, 'Star "*"'), function($skip, $loc, $0, $1) {
14477
14493
  return { $loc, token: $1 };
14478
14494
  });
14479
14495
  function Star(ctx, state2) {
package/dist/main.mjs CHANGED
@@ -5611,6 +5611,7 @@ function processAssignments(statements) {
5611
5611
  }
5612
5612
  }
5613
5613
  }
5614
+ const refsToDeclare = /* @__PURE__ */ new Set();
5614
5615
  i = len3 - 1;
5615
5616
  while (i >= 0) {
5616
5617
  const lastAssignment = $1[i];
@@ -5644,6 +5645,7 @@ function processAssignments(statements) {
5644
5645
  }
5645
5646
  } else if (m2 = lhs.type, m2 === "ObjectBindingPattern" || m2 === "ArrayBindingPattern") {
5646
5647
  processBindingPatternLHS(lhs, tail);
5648
+ gatherRecursiveAll(lhs, ($5) => $5.type === "Ref").forEach(refsToDeclare.add.bind(refsToDeclare));
5647
5649
  }
5648
5650
  }
5649
5651
  i--;
@@ -5674,6 +5676,17 @@ function processAssignments(statements) {
5674
5676
  }
5675
5677
  i--;
5676
5678
  }
5679
+ if (refsToDeclare.size) {
5680
+ if (exp.hoistDec) {
5681
+ exp.hoistDec.children.push([...refsToDeclare].map(($6) => [",", $6]));
5682
+ } else {
5683
+ exp.hoistDec = {
5684
+ type: "Declaration",
5685
+ children: ["let ", [...refsToDeclare].map((r, i2) => i2 ? [",", r] : r)],
5686
+ names: []
5687
+ };
5688
+ }
5689
+ }
5677
5690
  exp.names = $1.flatMap(([, l]) => l.names || []);
5678
5691
  if (tail.length) {
5679
5692
  const index = exp.children.indexOf($2);
@@ -5810,7 +5823,7 @@ function processTypes(node) {
5810
5823
  });
5811
5824
  }
5812
5825
  function processStatementExpressions(statements) {
5813
- gatherRecursiveAll(statements, ($5) => $5.type === "StatementExpression").forEach((_exp) => {
5826
+ gatherRecursiveAll(statements, ($7) => $7.type === "StatementExpression").forEach((_exp) => {
5814
5827
  const exp = _exp;
5815
5828
  const { statement } = exp;
5816
5829
  let ref11;
@@ -5940,11 +5953,11 @@ function populateRefs(statements) {
5940
5953
  function processPlaceholders(statements) {
5941
5954
  const placeholderMap = /* @__PURE__ */ new Map();
5942
5955
  const liftedIfs = /* @__PURE__ */ new Set();
5943
- gatherRecursiveAll(statements, ($6) => $6.type === "Placeholder").forEach((_exp) => {
5956
+ gatherRecursiveAll(statements, ($8) => $8.type === "Placeholder").forEach((_exp) => {
5944
5957
  const exp = _exp;
5945
5958
  let ancestor;
5946
5959
  if (exp.subtype === ".") {
5947
- ({ ancestor } = findAncestor(exp, ($7) => $7.type === "Call"));
5960
+ ({ ancestor } = findAncestor(exp, ($9) => $9.type === "Call"));
5948
5961
  ancestor = ancestor?.parent;
5949
5962
  while (ancestor?.parent?.type === "UnaryExpression" || ancestor?.parent?.type === "NewExpression") {
5950
5963
  ancestor = ancestor.parent;
@@ -7066,8 +7079,8 @@ var $L60 = (0, import_lib3.$L)("??=");
7066
7079
  var $L61 = (0, import_lib3.$L)("?=");
7067
7080
  var $L62 = (0, import_lib3.$L)("and=");
7068
7081
  var $L63 = (0, import_lib3.$L)("or=");
7069
- var $L64 = (0, import_lib3.$L)("**");
7070
- var $L65 = (0, import_lib3.$L)("*");
7082
+ var $L64 = (0, import_lib3.$L)("*");
7083
+ var $L65 = (0, import_lib3.$L)("**");
7071
7084
  var $L66 = (0, import_lib3.$L)("/");
7072
7085
  var $L67 = (0, import_lib3.$L)("%%");
7073
7086
  var $L68 = (0, import_lib3.$L)("%");
@@ -8105,13 +8118,15 @@ var TernaryRest$$ = [TernaryRest$0, TernaryRest$1];
8105
8118
  function TernaryRest(ctx, state2) {
8106
8119
  return (0, import_lib3.$EVENT_C)(ctx, state2, "TernaryRest", TernaryRest$$);
8107
8120
  }
8108
- var NestedTernaryRest$0 = (0, import_lib3.$TS)((0, import_lib3.$S)(PushIndent, (0, import_lib3.$E)((0, import_lib3.$S)(Nested, QuestionMark, MaybeNestedExtendedExpression, Nested, Colon, MaybeNestedExtendedExpression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
8121
+ var NestedTernaryRest$0 = (0, import_lib3.$S)(Nested, QuestionMark, MaybeNestedExtendedExpression, Nested, Colon, MaybeNestedExtendedExpression);
8122
+ var NestedTernaryRest$1 = (0, import_lib3.$TS)((0, import_lib3.$S)(PushIndent, (0, import_lib3.$E)((0, import_lib3.$S)(Nested, QuestionMark, MaybeNestedExtendedExpression, Nested, Colon, MaybeNestedExtendedExpression)), PopIndent), function($skip, $loc, $0, $1, $2, $3) {
8109
8123
  if ($2)
8110
8124
  return $2;
8111
8125
  return $skip;
8112
8126
  });
8127
+ var NestedTernaryRest$$ = [NestedTernaryRest$0, NestedTernaryRest$1];
8113
8128
  function NestedTernaryRest(ctx, state2) {
8114
- return (0, import_lib3.$EVENT)(ctx, state2, "NestedTernaryRest", NestedTernaryRest$0);
8129
+ return (0, import_lib3.$EVENT_C)(ctx, state2, "NestedTernaryRest", NestedTernaryRest$$);
8115
8130
  }
8116
8131
  var ShortCircuitExpression$0 = BinaryOpExpression;
8117
8132
  function ShortCircuitExpression(ctx, state2) {
@@ -11459,11 +11474,12 @@ var NotDedentedBinaryOp$0 = (0, import_lib3.$TS)((0, import_lib3.$S)((0, import_
11459
11474
  ws.push(...$2);
11460
11475
  return [ws, $3];
11461
11476
  });
11462
- var NotDedentedBinaryOp$1 = (0, import_lib3.$TS)((0, import_lib3.$S)(Nested, (0, import_lib3.$E)(_), (0, import_lib3.$N)(Identifier), BinaryOp), function($skip, $loc, $0, $1, $2, $3, $4) {
11477
+ var NotDedentedBinaryOp$1 = (0, import_lib3.$TS)((0, import_lib3.$S)(Nested, (0, import_lib3.$E)(_), (0, import_lib3.$N)(Identifier), (0, import_lib3.$C)((0, import_lib3.$N)((0, import_lib3.$EXPECT)($L64, 'NotDedentedBinaryOp "*"')), (0, import_lib3.$N)(ImportDeclaration)), BinaryOp), function($skip, $loc, $0, $1, $2, $3, $4, $5) {
11478
+ var op = $5;
11463
11479
  const ws = [...$1];
11464
11480
  if ($2)
11465
11481
  ws.push(...$2);
11466
- return [ws, $4];
11482
+ return [ws, op];
11467
11483
  });
11468
11484
  var NotDedentedBinaryOp$$ = [NotDedentedBinaryOp$0, NotDedentedBinaryOp$1];
11469
11485
  function NotDedentedBinaryOp(ctx, state2) {
@@ -11517,8 +11533,8 @@ var _BinaryOp$$ = [_BinaryOp$0, _BinaryOp$1, _BinaryOp$2];
11517
11533
  function _BinaryOp(ctx, state2) {
11518
11534
  return (0, import_lib3.$EVENT_C)(ctx, state2, "_BinaryOp", _BinaryOp$$);
11519
11535
  }
11520
- var BinaryOpSymbol$0 = (0, import_lib3.$EXPECT)($L64, 'BinaryOpSymbol "**"');
11521
- var BinaryOpSymbol$1 = (0, import_lib3.$EXPECT)($L65, 'BinaryOpSymbol "*"');
11536
+ var BinaryOpSymbol$0 = (0, import_lib3.$EXPECT)($L65, 'BinaryOpSymbol "**"');
11537
+ var BinaryOpSymbol$1 = (0, import_lib3.$EXPECT)($L64, 'BinaryOpSymbol "*"');
11522
11538
  var BinaryOpSymbol$2 = (0, import_lib3.$EXPECT)($L66, 'BinaryOpSymbol "/"');
11523
11539
  var BinaryOpSymbol$3 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L67, 'BinaryOpSymbol "%%"'), function($skip, $loc, $0, $1) {
11524
11540
  return {
@@ -14453,7 +14469,7 @@ var SingleQuote$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L188, `Single
14453
14469
  function SingleQuote(ctx, state2) {
14454
14470
  return (0, import_lib3.$EVENT)(ctx, state2, "SingleQuote", SingleQuote$0);
14455
14471
  }
14456
- var Star$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L65, 'Star "*"'), function($skip, $loc, $0, $1) {
14472
+ var Star$0 = (0, import_lib3.$TV)((0, import_lib3.$EXPECT)($L64, 'Star "*"'), function($skip, $loc, $0, $1) {
14457
14473
  return { $loc, token: $1 };
14458
14474
  });
14459
14475
  function Star(ctx, state2) {
@@ -0,0 +1,11 @@
1
+ interface AstroIntegration {
2
+ name: string;
3
+ hooks: {
4
+ "astro:config:setup": (data: {
5
+ updateConfig: (config: unknown) => void;
6
+ }) => void;
7
+ };
8
+ }
9
+ import { type PluginOptions } from "./unplugin.js";
10
+ declare const _default: (opts?: PluginOptions) => AstroIntegration;
11
+ export default _default;
@@ -0,0 +1,49 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\astro.civet.jsx
30
+ var astro_civet_exports = {};
31
+ __export(astro_civet_exports, {
32
+ default: () => astro_civet_default
33
+ });
34
+ module.exports = __toCommonJS(astro_civet_exports);
35
+ var import_unplugin = __toESM(require("./unplugin.js"));
36
+ var astro_civet_default = function(opts = {}) {
37
+ return {
38
+ name: "@danielx/civet",
39
+ hooks: {
40
+ "astro:config:setup": ({ updateConfig }) => {
41
+ return updateConfig({
42
+ vite: {
43
+ plugins: [import_unplugin.default.vite(opts)]
44
+ }
45
+ });
46
+ }
47
+ }
48
+ };
49
+ };
@@ -0,0 +1,19 @@
1
+ // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\astro.civet.jsx
2
+ import civetUnplugin, {} from "./unplugin.mjs";
3
+ var astro_civet_default = function(opts = {}) {
4
+ return {
5
+ name: "@danielx/civet",
6
+ hooks: {
7
+ "astro:config:setup": ({ updateConfig }) => {
8
+ return updateConfig({
9
+ vite: {
10
+ plugins: [civetUnplugin.vite(opts)]
11
+ }
12
+ });
13
+ }
14
+ }
15
+ };
16
+ };
17
+ export {
18
+ astro_civet_default as default
19
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: (options: import("./unplugin.js").PluginOptions) => import("esbuild").Plugin;
2
+ export default _default;
@@ -0,0 +1,36 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\esbuild.civet.jsx
30
+ var esbuild_civet_exports = {};
31
+ __export(esbuild_civet_exports, {
32
+ default: () => esbuild_civet_default
33
+ });
34
+ module.exports = __toCommonJS(esbuild_civet_exports);
35
+ var import_unplugin = __toESM(require("./unplugin.js"));
36
+ var esbuild_civet_default = import_unplugin.default.esbuild;
@@ -0,0 +1,6 @@
1
+ // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\esbuild.civet.jsx
2
+ import civetUnplugin from "./unplugin.mjs";
3
+ var esbuild_civet_default = civetUnplugin.esbuild;
4
+ export {
5
+ esbuild_civet_default as default
6
+ };
@@ -0,0 +1,2 @@
1
+ declare const _default: (options: import("./unplugin.js").PluginOptions) => import("rollup").Plugin | import("rollup").Plugin[];
2
+ export default _default;
@@ -0,0 +1,36 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\rollup.civet.jsx
30
+ var rollup_civet_exports = {};
31
+ __export(rollup_civet_exports, {
32
+ default: () => rollup_civet_default
33
+ });
34
+ module.exports = __toCommonJS(rollup_civet_exports);
35
+ var import_unplugin = __toESM(require("./unplugin.js"));
36
+ var rollup_civet_default = import_unplugin.default.rollup;
@@ -0,0 +1,6 @@
1
+ // unplugin-civet:C:\Users\edemaine\Projects\Civet\source\unplugin\rollup.civet.jsx
2
+ import civetUnplugin from "./unplugin.mjs";
3
+ var rollup_civet_default = civetUnplugin.rollup;
4
+ export {
5
+ rollup_civet_default as default
6
+ };
@@ -1,8 +1,6 @@
1
- import * as _unplugin from 'unplugin';
2
- import { TransformResult, createUnplugin } from 'unplugin';
3
- import { ParseOptions } from '@danielx/civet';
4
-
5
- type PluginOptions = {
1
+ import { type TransformResult, createUnplugin } from 'unplugin';
2
+ import { type ParseOptions } from '@danielx/civet';
3
+ export type PluginOptions = {
6
4
  implicitExtension?: boolean;
7
5
  outputExtension?: string;
8
6
  transformOutput?: (code: string, id: string) => TransformResult | Promise<TransformResult>;
@@ -19,8 +17,7 @@ type PluginOptions = {
19
17
  config?: string | null | undefined;
20
18
  parseOptions?: ParseOptions;
21
19
  };
22
- declare function slash(p: string): string;
23
- declare const rawPlugin: Parameters<typeof createUnplugin<PluginOptions>>[0];
24
- declare var unplugin: _unplugin.UnpluginInstance<PluginOptions, boolean>;
25
-
26
- export { PluginOptions, unplugin as default, rawPlugin, slash };
20
+ export declare function slash(p: string): string;
21
+ export declare const rawPlugin: Parameters<typeof createUnplugin<PluginOptions>>[0];
22
+ declare var unplugin: import("unplugin").UnpluginInstance<PluginOptions, boolean>;
23
+ export default unplugin;