miqro 6.2.11 → 6.2.12
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/build/editor.bundle.js +4 -5
- package/build/esm/src/inflate/inflate-sea.js +11 -0
- package/build/jsx.dom.js +34 -36
- package/build/lib.cjs +41 -32
- package/package.json +1 -1
- package/sea/basic-compile.base64.sh +1 -1
- package/sea/basic-compile.sh +1 -1
- package/src/inflate/inflate-sea.ts +12 -0
package/build/editor.bundle.js
CHANGED
|
@@ -1562,7 +1562,7 @@ var require_core = __commonJS({
|
|
|
1562
1562
|
}
|
|
1563
1563
|
});
|
|
1564
1564
|
|
|
1565
|
-
//
|
|
1565
|
+
// node_modules/@miqro/jsx-dom/build/jsx-dom.esm.bundle.js
|
|
1566
1566
|
var debugLogEnabled = false;
|
|
1567
1567
|
function debug(runtime2, message, ...args) {
|
|
1568
1568
|
if (debugLogEnabled) {
|
|
@@ -2809,17 +2809,16 @@ function useQuery(name, defaultValue, watch = true) {
|
|
|
2809
2809
|
const [last, setLast, getLast] = useState(getQueryValue(runtime2, name, defaultValue));
|
|
2810
2810
|
useEffect(function useQueryEffect() {
|
|
2811
2811
|
if (watch) {
|
|
2812
|
-
let
|
|
2812
|
+
let useQueryEffectPathListener = function() {
|
|
2813
2813
|
const current = getQueryValue(runtime2, name, defaultValue);
|
|
2814
2814
|
if (getLast() !== current) {
|
|
2815
2815
|
debug(runtime2, "useQuery listener for %s", key);
|
|
2816
2816
|
setLast(current);
|
|
2817
2817
|
}
|
|
2818
2818
|
};
|
|
2819
|
-
|
|
2820
|
-
runtime2.addPathListener(useQueryEffectPathListener2);
|
|
2819
|
+
runtime2.addPathListener(useQueryEffectPathListener);
|
|
2821
2820
|
return function useQueryEffectUnLoad() {
|
|
2822
|
-
runtime2.removePathListener(
|
|
2821
|
+
runtime2.removePathListener(useQueryEffectPathListener);
|
|
2823
2822
|
};
|
|
2824
2823
|
}
|
|
2825
2824
|
}, []);
|
|
@@ -4,6 +4,7 @@ import { cwd, platform } from "node:process";
|
|
|
4
4
|
import { getAuthConfigPath, getCORSConfigPath, getDBConfigPath, getErrorConfigPath, getMiddlewareConfigPath, getMigrationsPath, getServerConfigPath, getWSConfigPath } from "../common/paths.js";
|
|
5
5
|
import { getAsset } from "../common/assets.js";
|
|
6
6
|
import { migration } from "@miqro/query";
|
|
7
|
+
import { esBuild } from "../common/esbuild.js";
|
|
7
8
|
//export const libCJSBuffer = Buffer.from(getAsset("lib.cjs"));
|
|
8
9
|
/*export const COMPILESH = Buffer.from(Buffer.from(getAsset("compile.base64.sh")).toString(), "base64");
|
|
9
10
|
export const SIGN_REMOVESH = Buffer.from(getAsset("sign-remove.sh"));
|
|
@@ -93,6 +94,16 @@ async function main() {
|
|
|
93
94
|
}
|
|
94
95
|
main().catch(e=>console.error(e));
|
|
95
96
|
`);
|
|
97
|
+
logger.log("writing [%s]", relative(cwd(), join(inflateDir, "sea", "app.bundle.cjs")));
|
|
98
|
+
await esBuild({
|
|
99
|
+
entryPoints: [join(inflateDir, "sea", "app.cjs")],
|
|
100
|
+
bundle: true,
|
|
101
|
+
minify: true,
|
|
102
|
+
jsxFactory: "JSX.createElement",
|
|
103
|
+
jsxFragment: "JSX.Fragment",
|
|
104
|
+
platform: "node",
|
|
105
|
+
outfile: join(inflateDir, "sea", "app.bundle.cjs")
|
|
106
|
+
});
|
|
96
107
|
}
|
|
97
108
|
export async function inflateServiceForSea(logger, inflateDir, service, servicePath /*, serviceMigrations: string[]*/, serviceRouteFileMap, serviceStaticFileMap) {
|
|
98
109
|
const migrationsFolderPath = getMigrationsPath(servicePath);
|
package/build/jsx.dom.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// node_modules/@miqro/jsx/build/esm/vdom/log.js
|
|
2
2
|
var debugLogEnabled = false;
|
|
3
3
|
function debug(runtime2, message, ...args) {
|
|
4
4
|
if (debugLogEnabled) {
|
|
@@ -12,7 +12,7 @@ function enableDebugLog() {
|
|
|
12
12
|
debugLogEnabled = true;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
//
|
|
15
|
+
// node_modules/@miqro/jsx/build/esm/vdom/actions.js
|
|
16
16
|
function createAppendAction(node, runtime2) {
|
|
17
17
|
return {
|
|
18
18
|
isDestructive: true,
|
|
@@ -295,7 +295,7 @@ function createSetInnerHTMLAction(node, innerHTML, runtime2) {
|
|
|
295
295
|
};
|
|
296
296
|
}
|
|
297
297
|
|
|
298
|
-
//
|
|
298
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/base-node.js
|
|
299
299
|
function setDefaultOptions(options) {
|
|
300
300
|
if (defaultOptionsFuse) {
|
|
301
301
|
throw new Error("cannot override default options once and before an element has been created!");
|
|
@@ -411,7 +411,7 @@ function getDefaultOptions() {
|
|
|
411
411
|
return DEFAULT_OPTIONS;
|
|
412
412
|
}
|
|
413
413
|
|
|
414
|
-
//
|
|
414
|
+
// node_modules/@miqro/jsx/build/esm/jsx.js
|
|
415
415
|
var Fragment = Symbol("Fragment");
|
|
416
416
|
function createElement(tag, attributes, ...children) {
|
|
417
417
|
if (!tag) {
|
|
@@ -464,10 +464,10 @@ objectDefineProperty(JSX, "jsxFragmentFactory", {
|
|
|
464
464
|
});
|
|
465
465
|
Object.freeze(JSX);
|
|
466
466
|
|
|
467
|
-
//
|
|
467
|
+
// node_modules/@miqro/jsx/build/esm/vdom/types.js
|
|
468
468
|
var CHANGE_TYPES_SET = /* @__PURE__ */ new Set(["FragmentComponent", "Component", "Element", "Ref", "Fragment", "ContextProvider"]);
|
|
469
469
|
|
|
470
|
-
//
|
|
470
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/context-provider.js
|
|
471
471
|
var ContextProvider = class extends BaseNode {
|
|
472
472
|
constructor(parent) {
|
|
473
473
|
super("ContextProvider", parent);
|
|
@@ -491,7 +491,7 @@ var ContextProvider = class extends BaseNode {
|
|
|
491
491
|
}
|
|
492
492
|
};
|
|
493
493
|
|
|
494
|
-
//
|
|
494
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/fragment.js
|
|
495
495
|
var Fragment2 = class extends BaseNode {
|
|
496
496
|
constructor(parent) {
|
|
497
497
|
super("Fragment", parent);
|
|
@@ -507,7 +507,7 @@ var Fragment2 = class extends BaseNode {
|
|
|
507
507
|
}
|
|
508
508
|
};
|
|
509
509
|
|
|
510
|
-
//
|
|
510
|
+
// node_modules/@miqro/jsx/build/esm/component/render.js
|
|
511
511
|
var currentContext = null;
|
|
512
512
|
function useConditional(name) {
|
|
513
513
|
return pushContextCall(currentContext, name);
|
|
@@ -578,7 +578,7 @@ function pushContextCall(context, name) {
|
|
|
578
578
|
return key;
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
-
//
|
|
581
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/component-fragment.js
|
|
582
582
|
var FragmentComponent = class extends Fragment2 {
|
|
583
583
|
constructor(parent) {
|
|
584
584
|
super(parent);
|
|
@@ -614,7 +614,7 @@ var FragmentComponent = class extends Fragment2 {
|
|
|
614
614
|
}
|
|
615
615
|
};
|
|
616
616
|
|
|
617
|
-
//
|
|
617
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/element.js
|
|
618
618
|
var ATTRIBUTES_WITHOUT_VALUE = /* @__PURE__ */ new Set([
|
|
619
619
|
"disabled",
|
|
620
620
|
"checked",
|
|
@@ -745,7 +745,7 @@ var Element = class extends BaseNode {
|
|
|
745
745
|
}
|
|
746
746
|
};
|
|
747
747
|
|
|
748
|
-
//
|
|
748
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/component.js
|
|
749
749
|
var Component = class extends Element {
|
|
750
750
|
constructor(parent) {
|
|
751
751
|
super(parent);
|
|
@@ -796,7 +796,7 @@ var Component = class extends Element {
|
|
|
796
796
|
}
|
|
797
797
|
};
|
|
798
798
|
|
|
799
|
-
//
|
|
799
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/ref.js
|
|
800
800
|
var Ref = class extends BaseNode {
|
|
801
801
|
constructor(parent) {
|
|
802
802
|
super("Ref", parent);
|
|
@@ -815,7 +815,7 @@ var Ref = class extends BaseNode {
|
|
|
815
815
|
}
|
|
816
816
|
};
|
|
817
817
|
|
|
818
|
-
//
|
|
818
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/text.js
|
|
819
819
|
var Text = class extends BaseNode {
|
|
820
820
|
constructor(parent) {
|
|
821
821
|
super("Text", parent);
|
|
@@ -838,7 +838,7 @@ var Text = class extends BaseNode {
|
|
|
838
838
|
}
|
|
839
839
|
};
|
|
840
840
|
|
|
841
|
-
//
|
|
841
|
+
// node_modules/@miqro/jsx/build/esm/vdom/tree.js
|
|
842
842
|
var Tree = class extends BaseNode {
|
|
843
843
|
name;
|
|
844
844
|
constructor(name, ref, runtime2, shadowInit) {
|
|
@@ -898,7 +898,7 @@ function normalizeChild(runtime2, c) {
|
|
|
898
898
|
};
|
|
899
899
|
}
|
|
900
900
|
|
|
901
|
-
//
|
|
901
|
+
// node_modules/@miqro/jsx/build/esm/vdom/diff.js
|
|
902
902
|
function diff(abortSignal, tree, changes, actions, options, runtime2, lo = false) {
|
|
903
903
|
if (changes === void 0 || changes === null || abortSignal.aborted) {
|
|
904
904
|
return actions;
|
|
@@ -948,7 +948,7 @@ function areActionDestructive(actions) {
|
|
|
948
948
|
return false;
|
|
949
949
|
}
|
|
950
950
|
|
|
951
|
-
//
|
|
951
|
+
// node_modules/@miqro/jsx/build/esm/vdom/execute.js
|
|
952
952
|
function execute(abortSignal, runtime2, actions) {
|
|
953
953
|
if (abortSignal.aborted) {
|
|
954
954
|
return 0;
|
|
@@ -981,7 +981,7 @@ function execute(abortSignal, runtime2, actions) {
|
|
|
981
981
|
return changes;
|
|
982
982
|
}
|
|
983
983
|
|
|
984
|
-
//
|
|
984
|
+
// node_modules/@miqro/jsx/build/esm/vdom/render.js
|
|
985
985
|
function render(runtime2, tree, treeOptions, change, preActions = [], props, children) {
|
|
986
986
|
const meta = tree.state;
|
|
987
987
|
if (!meta) {
|
|
@@ -1006,7 +1006,7 @@ function render(runtime2, tree, treeOptions, change, preActions = [], props, chi
|
|
|
1006
1006
|
}
|
|
1007
1007
|
}
|
|
1008
1008
|
|
|
1009
|
-
//
|
|
1009
|
+
// node_modules/@miqro/jsx/build/esm/component/container.js
|
|
1010
1010
|
var objectDefineProperty2 = Object.defineProperty;
|
|
1011
1011
|
function createContainer(element, runtime2, args) {
|
|
1012
1012
|
const name = `DOMContainer [${String(element)}]`;
|
|
@@ -1050,7 +1050,7 @@ function createContainer(element, runtime2, args) {
|
|
|
1050
1050
|
return container;
|
|
1051
1051
|
}
|
|
1052
1052
|
|
|
1053
|
-
//
|
|
1053
|
+
// node_modules/@miqro/jsx/build/esm/hooks/runtime.js
|
|
1054
1054
|
function useRuntime() {
|
|
1055
1055
|
useConditional("useRuntime");
|
|
1056
1056
|
const currentContext2 = useRenderContext();
|
|
@@ -1060,7 +1060,7 @@ function useRuntime() {
|
|
|
1060
1060
|
return currentContext2.runtime;
|
|
1061
1061
|
}
|
|
1062
1062
|
|
|
1063
|
-
//
|
|
1063
|
+
// node_modules/@miqro/jsx/build/esm/hooks/refresh.js
|
|
1064
1064
|
var REFRESH_TIMEOUT_MS = 0;
|
|
1065
1065
|
function useRefresh() {
|
|
1066
1066
|
useConditional("useRefresh");
|
|
@@ -1097,7 +1097,7 @@ function useRefresh() {
|
|
|
1097
1097
|
};
|
|
1098
1098
|
}
|
|
1099
1099
|
|
|
1100
|
-
//
|
|
1100
|
+
// node_modules/@miqro/jsx/build/esm/hooks/state.js
|
|
1101
1101
|
function useState(defaultValue) {
|
|
1102
1102
|
const key = useConditional("useState");
|
|
1103
1103
|
const currentContext2 = useRenderContext();
|
|
@@ -1149,7 +1149,7 @@ function useState(defaultValue) {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
}
|
|
1151
1151
|
|
|
1152
|
-
//
|
|
1152
|
+
// node_modules/@miqro/jsx/build/esm/hooks/effect.js
|
|
1153
1153
|
function useEffect(effect, condition) {
|
|
1154
1154
|
const currentContext2 = useRenderContext();
|
|
1155
1155
|
if (!currentContext2) {
|
|
@@ -1195,7 +1195,7 @@ function equalArray(a, c) {
|
|
|
1195
1195
|
return true;
|
|
1196
1196
|
}
|
|
1197
1197
|
|
|
1198
|
-
//
|
|
1198
|
+
// node_modules/@miqro/jsx/build/esm/hooks/pathname.js
|
|
1199
1199
|
function usePathname() {
|
|
1200
1200
|
const runtime2 = useRuntime();
|
|
1201
1201
|
const pathname = runtime2.getLocation().pathname;
|
|
@@ -1214,7 +1214,7 @@ function usePathname() {
|
|
|
1214
1214
|
return String(currentLocation);
|
|
1215
1215
|
}
|
|
1216
1216
|
|
|
1217
|
-
//
|
|
1217
|
+
// node_modules/@miqro/jsx/build/esm/component/router.js
|
|
1218
1218
|
function useIsLocationPathNameActive(path) {
|
|
1219
1219
|
useConditional("useIsLocationPathNameMatch");
|
|
1220
1220
|
const runtime2 = useRuntime();
|
|
@@ -1288,7 +1288,7 @@ function normalizePath(path) {
|
|
|
1288
1288
|
return path;
|
|
1289
1289
|
}
|
|
1290
1290
|
|
|
1291
|
-
//
|
|
1291
|
+
// node_modules/@miqro/jsx/build/esm/hooks/ref.js
|
|
1292
1292
|
function useRef() {
|
|
1293
1293
|
const [ref, setRef] = useState(null);
|
|
1294
1294
|
function useRefFunction(newRef) {
|
|
@@ -1299,24 +1299,23 @@ function useRef() {
|
|
|
1299
1299
|
return useRefFunction;
|
|
1300
1300
|
}
|
|
1301
1301
|
|
|
1302
|
-
//
|
|
1302
|
+
// node_modules/@miqro/jsx/build/esm/hooks/query.js
|
|
1303
1303
|
function useAllQuery(watch = true) {
|
|
1304
1304
|
const key = useConditional(`useAllQuery`);
|
|
1305
1305
|
const runtime2 = useRuntime();
|
|
1306
1306
|
const [last, setLast, getLast] = useState(getQueryValue(runtime2));
|
|
1307
1307
|
useEffect(function useQueryEffect() {
|
|
1308
1308
|
if (watch) {
|
|
1309
|
-
let
|
|
1309
|
+
let useQueryEffectPathListener = function() {
|
|
1310
1310
|
const current = getQueryValue(runtime2);
|
|
1311
1311
|
if (getLast() !== current) {
|
|
1312
1312
|
debug(runtime2, "useQuery listener for %s", key);
|
|
1313
1313
|
setLast(current);
|
|
1314
1314
|
}
|
|
1315
1315
|
};
|
|
1316
|
-
|
|
1317
|
-
runtime2.addPathListener(useQueryEffectPathListener2);
|
|
1316
|
+
runtime2.addPathListener(useQueryEffectPathListener);
|
|
1318
1317
|
return function useQueryEffectUnLoad() {
|
|
1319
|
-
runtime2.removePathListener(
|
|
1318
|
+
runtime2.removePathListener(useQueryEffectPathListener);
|
|
1320
1319
|
};
|
|
1321
1320
|
}
|
|
1322
1321
|
}, []);
|
|
@@ -1328,17 +1327,16 @@ function useQuery(name, defaultValue, watch = true) {
|
|
|
1328
1327
|
const [last, setLast, getLast] = useState(getQueryValue(runtime2, name, defaultValue));
|
|
1329
1328
|
useEffect(function useQueryEffect() {
|
|
1330
1329
|
if (watch) {
|
|
1331
|
-
let
|
|
1330
|
+
let useQueryEffectPathListener = function() {
|
|
1332
1331
|
const current = getQueryValue(runtime2, name, defaultValue);
|
|
1333
1332
|
if (getLast() !== current) {
|
|
1334
1333
|
debug(runtime2, "useQuery listener for %s", key);
|
|
1335
1334
|
setLast(current);
|
|
1336
1335
|
}
|
|
1337
1336
|
};
|
|
1338
|
-
|
|
1339
|
-
runtime2.addPathListener(useQueryEffectPathListener2);
|
|
1337
|
+
runtime2.addPathListener(useQueryEffectPathListener);
|
|
1340
1338
|
return function useQueryEffectUnLoad() {
|
|
1341
|
-
runtime2.removePathListener(
|
|
1339
|
+
runtime2.removePathListener(useQueryEffectPathListener);
|
|
1342
1340
|
};
|
|
1343
1341
|
}
|
|
1344
1342
|
}, []);
|
|
@@ -1381,7 +1379,7 @@ function setQueryValue(runtime2, name, value, watch = true) {
|
|
|
1381
1379
|
}
|
|
1382
1380
|
}
|
|
1383
1381
|
|
|
1384
|
-
//
|
|
1382
|
+
// node_modules/@miqro/jsx/build/esm/hooks/useelement.js
|
|
1385
1383
|
function useElement() {
|
|
1386
1384
|
useConditional("useElement");
|
|
1387
1385
|
const currentContext2 = useRenderContext();
|
|
@@ -1391,7 +1389,7 @@ function useElement() {
|
|
|
1391
1389
|
return currentContext2.node.ref ? currentContext2.node.ref : null;
|
|
1392
1390
|
}
|
|
1393
1391
|
|
|
1394
|
-
//
|
|
1392
|
+
// node_modules/@miqro/jsx/build/esm/hooks/context.js
|
|
1395
1393
|
function createContext(defaultValue) {
|
|
1396
1394
|
const symbol = Symbol();
|
|
1397
1395
|
return {
|
package/build/lib.cjs
CHANGED
|
@@ -9405,7 +9405,7 @@ var CONTENT_TYPE_MAP = {
|
|
|
9405
9405
|
".7z": "application/x-7z-compressed"
|
|
9406
9406
|
};
|
|
9407
9407
|
|
|
9408
|
-
//
|
|
9408
|
+
// node_modules/@miqro/jsx/build/esm/vdom/log.js
|
|
9409
9409
|
var debugLogEnabled = false;
|
|
9410
9410
|
function debug(runtime, message2, ...args) {
|
|
9411
9411
|
if (debugLogEnabled) {
|
|
@@ -9419,7 +9419,7 @@ function enableDebugLog() {
|
|
|
9419
9419
|
debugLogEnabled = true;
|
|
9420
9420
|
}
|
|
9421
9421
|
|
|
9422
|
-
//
|
|
9422
|
+
// node_modules/@miqro/jsx/build/esm/vdom/actions.js
|
|
9423
9423
|
function createAppendAction(node, runtime) {
|
|
9424
9424
|
return {
|
|
9425
9425
|
isDestructive: true,
|
|
@@ -9702,7 +9702,7 @@ function createSetInnerHTMLAction(node, innerHTML, runtime) {
|
|
|
9702
9702
|
};
|
|
9703
9703
|
}
|
|
9704
9704
|
|
|
9705
|
-
//
|
|
9705
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/base-node.js
|
|
9706
9706
|
var BaseNode = class {
|
|
9707
9707
|
type;
|
|
9708
9708
|
parent;
|
|
@@ -9810,7 +9810,7 @@ function getDefaultOptions() {
|
|
|
9810
9810
|
return DEFAULT_OPTIONS;
|
|
9811
9811
|
}
|
|
9812
9812
|
|
|
9813
|
-
//
|
|
9813
|
+
// node_modules/@miqro/jsx/build/esm/jsx.js
|
|
9814
9814
|
var Fragment = Symbol("Fragment");
|
|
9815
9815
|
function createElement(tag2, attributes, ...children) {
|
|
9816
9816
|
if (!tag2) {
|
|
@@ -9863,10 +9863,10 @@ objectDefineProperty(JSX, "jsxFragmentFactory", {
|
|
|
9863
9863
|
});
|
|
9864
9864
|
Object.freeze(JSX);
|
|
9865
9865
|
|
|
9866
|
-
//
|
|
9866
|
+
// node_modules/@miqro/jsx/build/esm/vdom/types.js
|
|
9867
9867
|
var CHANGE_TYPES_SET = /* @__PURE__ */ new Set(["FragmentComponent", "Component", "Element", "Ref", "Fragment", "ContextProvider"]);
|
|
9868
9868
|
|
|
9869
|
-
//
|
|
9869
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/context-provider.js
|
|
9870
9870
|
var ContextProvider = class extends BaseNode {
|
|
9871
9871
|
constructor(parent) {
|
|
9872
9872
|
super("ContextProvider", parent);
|
|
@@ -9890,7 +9890,7 @@ var ContextProvider = class extends BaseNode {
|
|
|
9890
9890
|
}
|
|
9891
9891
|
};
|
|
9892
9892
|
|
|
9893
|
-
//
|
|
9893
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/fragment.js
|
|
9894
9894
|
var Fragment2 = class extends BaseNode {
|
|
9895
9895
|
constructor(parent) {
|
|
9896
9896
|
super("Fragment", parent);
|
|
@@ -9906,7 +9906,7 @@ var Fragment2 = class extends BaseNode {
|
|
|
9906
9906
|
}
|
|
9907
9907
|
};
|
|
9908
9908
|
|
|
9909
|
-
//
|
|
9909
|
+
// node_modules/@miqro/jsx/build/esm/component/render.js
|
|
9910
9910
|
var currentContext = null;
|
|
9911
9911
|
function useConditional(name) {
|
|
9912
9912
|
return pushContextCall(currentContext, name);
|
|
@@ -9977,7 +9977,7 @@ function pushContextCall(context, name) {
|
|
|
9977
9977
|
return key;
|
|
9978
9978
|
}
|
|
9979
9979
|
|
|
9980
|
-
//
|
|
9980
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/component-fragment.js
|
|
9981
9981
|
var FragmentComponent = class extends Fragment2 {
|
|
9982
9982
|
constructor(parent) {
|
|
9983
9983
|
super(parent);
|
|
@@ -10013,7 +10013,7 @@ var FragmentComponent = class extends Fragment2 {
|
|
|
10013
10013
|
}
|
|
10014
10014
|
};
|
|
10015
10015
|
|
|
10016
|
-
//
|
|
10016
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/element.js
|
|
10017
10017
|
var ATTRIBUTES_WITHOUT_VALUE = /* @__PURE__ */ new Set([
|
|
10018
10018
|
"disabled",
|
|
10019
10019
|
"checked",
|
|
@@ -10144,7 +10144,7 @@ var Element = class extends BaseNode {
|
|
|
10144
10144
|
}
|
|
10145
10145
|
};
|
|
10146
10146
|
|
|
10147
|
-
//
|
|
10147
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/component.js
|
|
10148
10148
|
var Component = class extends Element {
|
|
10149
10149
|
constructor(parent) {
|
|
10150
10150
|
super(parent);
|
|
@@ -10195,7 +10195,7 @@ var Component = class extends Element {
|
|
|
10195
10195
|
}
|
|
10196
10196
|
};
|
|
10197
10197
|
|
|
10198
|
-
//
|
|
10198
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/ref.js
|
|
10199
10199
|
var Ref = class extends BaseNode {
|
|
10200
10200
|
constructor(parent) {
|
|
10201
10201
|
super("Ref", parent);
|
|
@@ -10214,7 +10214,7 @@ var Ref = class extends BaseNode {
|
|
|
10214
10214
|
}
|
|
10215
10215
|
};
|
|
10216
10216
|
|
|
10217
|
-
//
|
|
10217
|
+
// node_modules/@miqro/jsx/build/esm/vdom/nodes/text.js
|
|
10218
10218
|
var Text = class extends BaseNode {
|
|
10219
10219
|
constructor(parent) {
|
|
10220
10220
|
super("Text", parent);
|
|
@@ -10237,7 +10237,7 @@ var Text = class extends BaseNode {
|
|
|
10237
10237
|
}
|
|
10238
10238
|
};
|
|
10239
10239
|
|
|
10240
|
-
//
|
|
10240
|
+
// node_modules/@miqro/jsx/build/esm/vdom/tree.js
|
|
10241
10241
|
var Tree = class extends BaseNode {
|
|
10242
10242
|
name;
|
|
10243
10243
|
constructor(name, ref, runtime, shadowInit) {
|
|
@@ -10297,7 +10297,7 @@ function normalizeChild(runtime, c) {
|
|
|
10297
10297
|
};
|
|
10298
10298
|
}
|
|
10299
10299
|
|
|
10300
|
-
//
|
|
10300
|
+
// node_modules/@miqro/jsx/build/esm/vdom/diff.js
|
|
10301
10301
|
function diff(abortSignal, tree, changes, actions, options, runtime, lo = false) {
|
|
10302
10302
|
if (changes === void 0 || changes === null || abortSignal.aborted) {
|
|
10303
10303
|
return actions;
|
|
@@ -10347,7 +10347,7 @@ function areActionDestructive(actions) {
|
|
|
10347
10347
|
return false;
|
|
10348
10348
|
}
|
|
10349
10349
|
|
|
10350
|
-
//
|
|
10350
|
+
// node_modules/@miqro/jsx/build/esm/vdom/execute.js
|
|
10351
10351
|
function execute(abortSignal, runtime, actions) {
|
|
10352
10352
|
if (abortSignal.aborted) {
|
|
10353
10353
|
return 0;
|
|
@@ -10380,7 +10380,7 @@ function execute(abortSignal, runtime, actions) {
|
|
|
10380
10380
|
return changes;
|
|
10381
10381
|
}
|
|
10382
10382
|
|
|
10383
|
-
//
|
|
10383
|
+
// node_modules/@miqro/jsx/build/esm/vdom/render.js
|
|
10384
10384
|
function render(runtime, tree, treeOptions, change, preActions = [], props, children) {
|
|
10385
10385
|
const meta = tree.state;
|
|
10386
10386
|
if (!meta) {
|
|
@@ -10405,7 +10405,7 @@ function render(runtime, tree, treeOptions, change, preActions = [], props, chil
|
|
|
10405
10405
|
}
|
|
10406
10406
|
}
|
|
10407
10407
|
|
|
10408
|
-
//
|
|
10408
|
+
// node_modules/@miqro/jsx/build/esm/component/container.js
|
|
10409
10409
|
var objectDefineProperty2 = Object.defineProperty;
|
|
10410
10410
|
function createContainer(element, runtime, args) {
|
|
10411
10411
|
const name = `DOMContainer [${String(element)}]`;
|
|
@@ -10449,7 +10449,7 @@ function createContainer(element, runtime, args) {
|
|
|
10449
10449
|
return container;
|
|
10450
10450
|
}
|
|
10451
10451
|
|
|
10452
|
-
//
|
|
10452
|
+
// node_modules/@miqro/jsx/build/esm/hooks/runtime.js
|
|
10453
10453
|
function useRuntime() {
|
|
10454
10454
|
useConditional("useRuntime");
|
|
10455
10455
|
const currentContext2 = useRenderContext();
|
|
@@ -10459,7 +10459,7 @@ function useRuntime() {
|
|
|
10459
10459
|
return currentContext2.runtime;
|
|
10460
10460
|
}
|
|
10461
10461
|
|
|
10462
|
-
//
|
|
10462
|
+
// node_modules/@miqro/jsx/build/esm/hooks/refresh.js
|
|
10463
10463
|
var REFRESH_TIMEOUT_MS = 0;
|
|
10464
10464
|
function useRefresh() {
|
|
10465
10465
|
useConditional("useRefresh");
|
|
@@ -10496,7 +10496,7 @@ function useRefresh() {
|
|
|
10496
10496
|
};
|
|
10497
10497
|
}
|
|
10498
10498
|
|
|
10499
|
-
//
|
|
10499
|
+
// node_modules/@miqro/jsx/build/esm/hooks/state.js
|
|
10500
10500
|
function useState(defaultValue) {
|
|
10501
10501
|
const key = useConditional("useState");
|
|
10502
10502
|
const currentContext2 = useRenderContext();
|
|
@@ -10548,7 +10548,7 @@ function useState(defaultValue) {
|
|
|
10548
10548
|
}
|
|
10549
10549
|
}
|
|
10550
10550
|
|
|
10551
|
-
//
|
|
10551
|
+
// node_modules/@miqro/jsx/build/esm/hooks/effect.js
|
|
10552
10552
|
function useEffect(effect, condition) {
|
|
10553
10553
|
const currentContext2 = useRenderContext();
|
|
10554
10554
|
if (!currentContext2) {
|
|
@@ -10594,7 +10594,7 @@ function equalArray(a, c) {
|
|
|
10594
10594
|
return true;
|
|
10595
10595
|
}
|
|
10596
10596
|
|
|
10597
|
-
//
|
|
10597
|
+
// node_modules/@miqro/jsx/build/esm/hooks/pathname.js
|
|
10598
10598
|
function usePathname() {
|
|
10599
10599
|
const runtime = useRuntime();
|
|
10600
10600
|
const pathname = runtime.getLocation().pathname;
|
|
@@ -10613,7 +10613,7 @@ function usePathname() {
|
|
|
10613
10613
|
return String(currentLocation);
|
|
10614
10614
|
}
|
|
10615
10615
|
|
|
10616
|
-
//
|
|
10616
|
+
// node_modules/@miqro/jsx/build/esm/component/router.js
|
|
10617
10617
|
function useIsLocationPathNameActive(path) {
|
|
10618
10618
|
useConditional("useIsLocationPathNameMatch");
|
|
10619
10619
|
const runtime = useRuntime();
|
|
@@ -10687,7 +10687,7 @@ function normalizePath2(path) {
|
|
|
10687
10687
|
return path;
|
|
10688
10688
|
}
|
|
10689
10689
|
|
|
10690
|
-
//
|
|
10690
|
+
// node_modules/@miqro/jsx/build/esm/hooks/ref.js
|
|
10691
10691
|
function useRef() {
|
|
10692
10692
|
const [ref, setRef] = useState(null);
|
|
10693
10693
|
function useRefFunction(newRef) {
|
|
@@ -10698,24 +10698,23 @@ function useRef() {
|
|
|
10698
10698
|
return useRefFunction;
|
|
10699
10699
|
}
|
|
10700
10700
|
|
|
10701
|
-
//
|
|
10701
|
+
// node_modules/@miqro/jsx/build/esm/hooks/query.js
|
|
10702
10702
|
function useQuery(name, defaultValue, watch2 = true) {
|
|
10703
10703
|
const key = useConditional(`useQuery-${name}-${defaultValue}`);
|
|
10704
10704
|
const runtime = useRuntime();
|
|
10705
10705
|
const [last, setLast, getLast] = useState(getQueryValue(runtime, name, defaultValue));
|
|
10706
10706
|
useEffect(function useQueryEffect() {
|
|
10707
10707
|
if (watch2) {
|
|
10708
|
-
let
|
|
10708
|
+
let useQueryEffectPathListener = function() {
|
|
10709
10709
|
const current = getQueryValue(runtime, name, defaultValue);
|
|
10710
10710
|
if (getLast() !== current) {
|
|
10711
10711
|
debug(runtime, "useQuery listener for %s", key);
|
|
10712
10712
|
setLast(current);
|
|
10713
10713
|
}
|
|
10714
10714
|
};
|
|
10715
|
-
|
|
10716
|
-
runtime.addPathListener(useQueryEffectPathListener2);
|
|
10715
|
+
runtime.addPathListener(useQueryEffectPathListener);
|
|
10717
10716
|
return function useQueryEffectUnLoad() {
|
|
10718
|
-
runtime.removePathListener(
|
|
10717
|
+
runtime.removePathListener(useQueryEffectPathListener);
|
|
10719
10718
|
};
|
|
10720
10719
|
}
|
|
10721
10720
|
}, []);
|
|
@@ -10758,7 +10757,7 @@ function setQueryValue(runtime, name, value, watch2 = true) {
|
|
|
10758
10757
|
}
|
|
10759
10758
|
}
|
|
10760
10759
|
|
|
10761
|
-
//
|
|
10760
|
+
// node_modules/@miqro/jsx/build/esm/hooks/useelement.js
|
|
10762
10761
|
function useElement() {
|
|
10763
10762
|
useConditional("useElement");
|
|
10764
10763
|
const currentContext2 = useRenderContext();
|
|
@@ -10768,7 +10767,7 @@ function useElement() {
|
|
|
10768
10767
|
return currentContext2.node.ref ? currentContext2.node.ref : null;
|
|
10769
10768
|
}
|
|
10770
10769
|
|
|
10771
|
-
//
|
|
10770
|
+
// node_modules/@miqro/jsx/build/esm/hooks/context.js
|
|
10772
10771
|
function createContext(defaultValue) {
|
|
10773
10772
|
const symbol = Symbol();
|
|
10774
10773
|
return {
|
|
@@ -15622,6 +15621,16 @@ async function main() {
|
|
|
15622
15621
|
main().catch(e=>console.error(e));
|
|
15623
15622
|
`
|
|
15624
15623
|
);
|
|
15624
|
+
logger.log("writing [%s]", (0, import_node_path14.relative)((0, import_node_process10.cwd)(), (0, import_node_path14.join)(inflateDir, "sea", "app.bundle.cjs")));
|
|
15625
|
+
await esBuild({
|
|
15626
|
+
entryPoints: [(0, import_node_path14.join)(inflateDir, "sea", "app.cjs")],
|
|
15627
|
+
bundle: true,
|
|
15628
|
+
minify: true,
|
|
15629
|
+
jsxFactory: "JSX.createElement",
|
|
15630
|
+
jsxFragment: "JSX.Fragment",
|
|
15631
|
+
platform: "node",
|
|
15632
|
+
outfile: (0, import_node_path14.join)(inflateDir, "sea", "app.bundle.cjs")
|
|
15633
|
+
});
|
|
15625
15634
|
}
|
|
15626
15635
|
async function inflateServiceForSea(logger, inflateDir, service, servicePath, serviceRouteFileMap, serviceStaticFileMap) {
|
|
15627
15636
|
const migrationsFolderPath = getMigrationsPath(servicePath);
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
IyEvdXNyL2Jpbi9lbnYgc2gKCnJtIC1SZiBiaW47Cm1rZGlyIC1wIGJpbi87CgpzaCAuL2luc3RhbGwtbm9kZWpzLnNoCgpOT0RFX0JJTj0ic2ggc2VhL25vZGUuc2giClNJR05fUkVNT1ZFX0JJTj0ic2ggc2VhL3NpZ24tcmVtb3ZlLnNoIgpTSUdOX0FERF9CSU49InNoIHNlYS9zaWduLWFkZC5zaCIKUE9TVEpFQ1RfQklOPSIke05PREVfQklOfSBzZWEvcG9zdGplY3QuY2pzIgpFU0JVSUxEX0JJTj0ic2VhL2VzYnVpbGQiCgojJEVTQlVJTERfQklOIHNlYS9hcHAuY2pzIC0tYnVuZGxlIC0tcGxhdGZvcm09bm9kZSAtLWV4dGVybmFsOnNxbGl0ZTMgLS1leHRlcm5hbDpwZyAtLWV4dGVybmFsOmVzYnVpbGQgLS1vdXRmaWxlPXNlYS9hcHAuYnVuZGxlLmNqcwoKJE5PREVfQklOIC0tZXhwZXJpbWVudGFsLXNlYS1jb25maWcgc2VhL2NvbmZpZy5qc29uCgpUQVJHRVRfQklOX05BTUU9ImFwcCIKClRBUkdFVF9MSU5VWF9YNjQ9ImJpbi9saW51eC14NjQvJHtUQVJHRVRfQklOX05BTUV9IgpUQVJHRVRfTElOVVhfQVJNNjQ9ImJpbi9saW51eC1hcm02NC8ke1RBUkdFVF9CSU5fTkFNRX0iCgpUQVJHRVRfREFSV0lOX0FSTTY0PSJiaW4vZGFyd2luLWFybTY0LyR7VEFSR0VUX0JJTl9OQU1FfSIKVEFSR0VUX0RBUldJTl9YNjQ9ImJpbi9kYXJ3aW4teDY0LyR7VEFSR0VUX0JJTl9OQU1FfSIKCiNUQVJHRVRfV0lOX1g2ND0iYmluL3dpbi14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9ERV9TRUFfQkxPQiAke0JMT0J9IC0tc2VudGluZWwtZnVzZSBOT0RFX1NFQV9GVVNFX2ZjZTY4MGFiMmNjNDY3YjZlMDcyYjhiNWRmMTk5NmIyCiMkUE9TVEpFQ1RfQklOICIke1RBUkdFVF9XSU5fQVJNNjR9IiBOT0RFX1NFQV9CTE9CICR7QkxPQn0gLS1zZW50aW5lbC1mdXNlIE5PREVfU0VBX0ZVU0VfZmNlNjgwYWIyY2M0NjdiNmUwNzJiOGI1ZGYxOTk2YjIK
|
package/sea/basic-compile.sh
CHANGED
|
@@ -11,7 +11,7 @@ SIGN_ADD_BIN="sh sea/sign-add.sh"
|
|
|
11
11
|
POSTJECT_BIN="${NODE_BIN} sea/postject.cjs"
|
|
12
12
|
ESBUILD_BIN="sea/esbuild"
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
#$ESBUILD_BIN sea/app.cjs --bundle --platform=node --external:sqlite3 --external:pg --external:esbuild --outfile=sea/app.bundle.cjs
|
|
15
15
|
|
|
16
16
|
$NODE_BIN --experimental-sea-config sea/config.json
|
|
17
17
|
|
|
@@ -7,6 +7,7 @@ import { RouteFileMap, StaticFileMap } from "./setup-http.js";
|
|
|
7
7
|
import { getAuthConfigPath, getCORSConfigPath, getDBConfigPath, getErrorConfigPath, getMiddlewareConfigPath, getMigrationsPath, getServerConfigPath, getServicePath, getWSConfigPath } from "../common/paths.js";
|
|
8
8
|
import { getAsset } from "../common/assets.js";
|
|
9
9
|
import { migration } from "@miqro/query";
|
|
10
|
+
import { esBuild } from "../common/esbuild.js";
|
|
10
11
|
|
|
11
12
|
//export const libCJSBuffer = Buffer.from(getAsset("lib.cjs"));
|
|
12
13
|
/*export const COMPILESH = Buffer.from(Buffer.from(getAsset("compile.base64.sh")).toString(), "base64");
|
|
@@ -107,6 +108,17 @@ async function main() {
|
|
|
107
108
|
main().catch(e=>console.error(e));
|
|
108
109
|
`
|
|
109
110
|
);
|
|
111
|
+
|
|
112
|
+
logger.log("writing [%s]", relative(cwd(), join(inflateDir, "sea", "app.bundle.cjs")));
|
|
113
|
+
await esBuild({
|
|
114
|
+
entryPoints: [join(inflateDir, "sea", "app.cjs")],
|
|
115
|
+
bundle: true,
|
|
116
|
+
minify: true,
|
|
117
|
+
jsxFactory: "JSX.createElement",
|
|
118
|
+
jsxFragment: "JSX.Fragment",
|
|
119
|
+
platform: "node",
|
|
120
|
+
outfile: join(inflateDir, "sea", "app.bundle.cjs")
|
|
121
|
+
});
|
|
110
122
|
}
|
|
111
123
|
|
|
112
124
|
export async function inflateServiceForSea(logger: Logger, inflateDir: string, service: string, servicePath: string/*, serviceMigrations: string[]*/, serviceRouteFileMap: RouteFileMap, serviceStaticFileMap: StaticFileMap) {
|