appstage 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin.js
CHANGED
|
@@ -433,12 +433,9 @@ async function getEntryPoints(path) {
|
|
|
433
433
|
}
|
|
434
434
|
|
|
435
435
|
// src/scripts/utils/buildClient.ts
|
|
436
|
+
var entryClientPaths = ["ui/index", "client/index", "index", "src/index"];
|
|
436
437
|
async function buildClient({ clientDir, watch, watchClient }, plugins) {
|
|
437
|
-
let clientEntries = await getEntryPoints(
|
|
438
|
-
"ui/index",
|
|
439
|
-
"client/index",
|
|
440
|
-
"index"
|
|
441
|
-
]);
|
|
438
|
+
let clientEntries = await getEntryPoints(entryClientPaths);
|
|
442
439
|
let buildOptions = {
|
|
443
440
|
...commonBuildOptions,
|
|
444
441
|
entryPoints: clientEntries.map(({ path }) => path),
|
|
@@ -502,12 +499,13 @@ ${content}
|
|
|
502
499
|
}
|
|
503
500
|
|
|
504
501
|
// src/scripts/utils/buildServer.ts
|
|
502
|
+
var appServerEntryPoints = ["src/server/index.ts"];
|
|
505
503
|
async function buildServer(params, plugins) {
|
|
506
504
|
let { serverDir, watch, watchServer } = params;
|
|
507
505
|
await populateEntries(params);
|
|
508
506
|
let buildOptions = {
|
|
509
507
|
...commonBuildOptions,
|
|
510
|
-
entryPoints:
|
|
508
|
+
entryPoints: appServerEntryPoints,
|
|
511
509
|
bundle: true,
|
|
512
510
|
splitting: true,
|
|
513
511
|
outdir: `${serverDir}/server`,
|
|
@@ -528,8 +526,9 @@ async function buildServer(params, plugins) {
|
|
|
528
526
|
|
|
529
527
|
// src/scripts/utils/buildServerCSS.ts
|
|
530
528
|
import esbuild3 from "esbuild";
|
|
529
|
+
var entryServerPaths = ["server", "server/index"];
|
|
531
530
|
async function buildServerCSS({ serverDir, watch, watchServer }, plugins) {
|
|
532
|
-
let serverEntries = await getEntryPoints(
|
|
531
|
+
let serverEntries = await getEntryPoints(entryServerPaths);
|
|
533
532
|
let buildOptions = {
|
|
534
533
|
...commonBuildOptions,
|
|
535
534
|
entryPoints: serverEntries.map(({ name, path }) => ({
|
package/dist/index.cjs
CHANGED
|
@@ -363,15 +363,17 @@ async function getEntryPoints(path) {
|
|
|
363
363
|
}))).filter((item) => item !== void 0);
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
+
const entryClientPaths = [
|
|
367
|
+
"ui/index",
|
|
368
|
+
"client/index",
|
|
369
|
+
"index",
|
|
370
|
+
"src/index"
|
|
371
|
+
];
|
|
366
372
|
/**
|
|
367
373
|
* Builds the client-side code.
|
|
368
374
|
*/
|
|
369
375
|
async function buildClient({ clientDir, watch, watchClient }, plugins) {
|
|
370
|
-
let clientEntries = await getEntryPoints(
|
|
371
|
-
"ui/index",
|
|
372
|
-
"client/index",
|
|
373
|
-
"index"
|
|
374
|
-
]);
|
|
376
|
+
let clientEntries = await getEntryPoints(entryClientPaths);
|
|
375
377
|
let buildOptions = {
|
|
376
378
|
...commonBuildOptions,
|
|
377
379
|
entryPoints: clientEntries.map(({ path }) => path),
|
|
@@ -417,12 +419,13 @@ ${content}
|
|
|
417
419
|
`);
|
|
418
420
|
}
|
|
419
421
|
|
|
422
|
+
const appServerEntryPoints = ["src/server/index.ts"];
|
|
420
423
|
async function buildServer(params, plugins) {
|
|
421
424
|
let { serverDir, watch, watchServer } = params;
|
|
422
425
|
await populateEntries(params);
|
|
423
426
|
let buildOptions = {
|
|
424
427
|
...commonBuildOptions,
|
|
425
|
-
entryPoints:
|
|
428
|
+
entryPoints: appServerEntryPoints,
|
|
426
429
|
bundle: true,
|
|
427
430
|
splitting: true,
|
|
428
431
|
outdir: `${serverDir}/server`,
|
|
@@ -441,8 +444,9 @@ async function buildServer(params, plugins) {
|
|
|
441
444
|
await esbuild.default.build(buildOptions);
|
|
442
445
|
}
|
|
443
446
|
|
|
447
|
+
const entryServerPaths = ["server", "server/index"];
|
|
444
448
|
async function buildServerCSS({ serverDir, watch, watchServer }, plugins) {
|
|
445
|
-
let serverEntries = await getEntryPoints(
|
|
449
|
+
let serverEntries = await getEntryPoints(entryServerPaths);
|
|
446
450
|
let buildOptions = {
|
|
447
451
|
...commonBuildOptions,
|
|
448
452
|
entryPoints: serverEntries.map(({ name, path }) => ({
|
package/dist/index.mjs
CHANGED
|
@@ -337,15 +337,17 @@ async function getEntryPoints(path) {
|
|
|
337
337
|
}))).filter((item) => item !== void 0);
|
|
338
338
|
}
|
|
339
339
|
|
|
340
|
+
const entryClientPaths = [
|
|
341
|
+
"ui/index",
|
|
342
|
+
"client/index",
|
|
343
|
+
"index",
|
|
344
|
+
"src/index"
|
|
345
|
+
];
|
|
340
346
|
/**
|
|
341
347
|
* Builds the client-side code.
|
|
342
348
|
*/
|
|
343
349
|
async function buildClient({ clientDir, watch, watchClient }, plugins) {
|
|
344
|
-
let clientEntries = await getEntryPoints(
|
|
345
|
-
"ui/index",
|
|
346
|
-
"client/index",
|
|
347
|
-
"index"
|
|
348
|
-
]);
|
|
350
|
+
let clientEntries = await getEntryPoints(entryClientPaths);
|
|
349
351
|
let buildOptions = {
|
|
350
352
|
...commonBuildOptions,
|
|
351
353
|
entryPoints: clientEntries.map(({ path }) => path),
|
|
@@ -391,12 +393,13 @@ ${content}
|
|
|
391
393
|
`);
|
|
392
394
|
}
|
|
393
395
|
|
|
396
|
+
const appServerEntryPoints = ["src/server/index.ts"];
|
|
394
397
|
async function buildServer(params, plugins) {
|
|
395
398
|
let { serverDir, watch, watchServer } = params;
|
|
396
399
|
await populateEntries(params);
|
|
397
400
|
let buildOptions = {
|
|
398
401
|
...commonBuildOptions,
|
|
399
|
-
entryPoints:
|
|
402
|
+
entryPoints: appServerEntryPoints,
|
|
400
403
|
bundle: true,
|
|
401
404
|
splitting: true,
|
|
402
405
|
outdir: `${serverDir}/server`,
|
|
@@ -415,8 +418,9 @@ async function buildServer(params, plugins) {
|
|
|
415
418
|
await esbuild.build(buildOptions);
|
|
416
419
|
}
|
|
417
420
|
|
|
421
|
+
const entryServerPaths = ["server", "server/index"];
|
|
418
422
|
async function buildServerCSS({ serverDir, watch, watchServer }, plugins) {
|
|
419
|
-
let serverEntries = await getEntryPoints(
|
|
423
|
+
let serverEntries = await getEntryPoints(entryServerPaths);
|
|
420
424
|
let buildOptions = {
|
|
421
425
|
...commonBuildOptions,
|
|
422
426
|
entryPoints: serverEntries.map(({ name, path }) => ({
|
package/package.json
CHANGED
|
@@ -3,6 +3,8 @@ import { commonBuildOptions } from "../const/commonBuildOptions.ts";
|
|
|
3
3
|
import type { BuildParams } from "../types/BuildParams.ts";
|
|
4
4
|
import { getEntryPoints } from "./getEntryPoints.ts";
|
|
5
5
|
|
|
6
|
+
const entryClientPaths = ["ui/index", "client/index", "index", "src/index"];
|
|
7
|
+
|
|
6
8
|
/**
|
|
7
9
|
* Builds the client-side code.
|
|
8
10
|
*/
|
|
@@ -10,11 +12,7 @@ export async function buildClient(
|
|
|
10
12
|
{ clientDir, watch, watchClient }: BuildParams,
|
|
11
13
|
plugins?: Plugin[],
|
|
12
14
|
) {
|
|
13
|
-
let clientEntries = await getEntryPoints(
|
|
14
|
-
"ui/index",
|
|
15
|
-
"client/index",
|
|
16
|
-
"index",
|
|
17
|
-
]);
|
|
15
|
+
let clientEntries = await getEntryPoints(entryClientPaths);
|
|
18
16
|
|
|
19
17
|
let buildOptions: BuildOptions = {
|
|
20
18
|
...commonBuildOptions,
|
|
@@ -3,6 +3,8 @@ import { commonBuildOptions } from "../const/commonBuildOptions.ts";
|
|
|
3
3
|
import type { BuildParams } from "../types/BuildParams.ts";
|
|
4
4
|
import { populateEntries } from "./populateEntries.ts";
|
|
5
5
|
|
|
6
|
+
const appServerEntryPoints = ["src/server/index.ts"];
|
|
7
|
+
|
|
6
8
|
export async function buildServer(params: BuildParams, plugins?: Plugin[]) {
|
|
7
9
|
let { serverDir, watch, watchServer } = params;
|
|
8
10
|
|
|
@@ -10,7 +12,7 @@ export async function buildServer(params: BuildParams, plugins?: Plugin[]) {
|
|
|
10
12
|
|
|
11
13
|
let buildOptions: BuildOptions = {
|
|
12
14
|
...commonBuildOptions,
|
|
13
|
-
entryPoints:
|
|
15
|
+
entryPoints: appServerEntryPoints,
|
|
14
16
|
bundle: true,
|
|
15
17
|
splitting: true,
|
|
16
18
|
outdir: `${serverDir}/server`,
|
|
@@ -3,11 +3,13 @@ import { commonBuildOptions } from "../const/commonBuildOptions.ts";
|
|
|
3
3
|
import type { BuildParams } from "../types/BuildParams.ts";
|
|
4
4
|
import { getEntryPoints } from "./getEntryPoints.ts";
|
|
5
5
|
|
|
6
|
+
const entryServerPaths = ["server", "server/index"];
|
|
7
|
+
|
|
6
8
|
export async function buildServerCSS(
|
|
7
9
|
{ serverDir, watch, watchServer }: BuildParams,
|
|
8
10
|
plugins?: Plugin[],
|
|
9
11
|
) {
|
|
10
|
-
let serverEntries = await getEntryPoints(
|
|
12
|
+
let serverEntries = await getEntryPoints(entryServerPaths);
|
|
11
13
|
|
|
12
14
|
let buildOptions: BuildOptions = {
|
|
13
15
|
...commonBuildOptions,
|