appstage 0.2.6 → 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,8 +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
|
+
let clientEntries = await getEntryPoints(entryClientPaths);
|
|
438
439
|
let buildOptions = {
|
|
439
440
|
...commonBuildOptions,
|
|
440
441
|
entryPoints: clientEntries.map(({ path }) => path),
|
|
@@ -498,12 +499,13 @@ ${content}
|
|
|
498
499
|
}
|
|
499
500
|
|
|
500
501
|
// src/scripts/utils/buildServer.ts
|
|
502
|
+
var appServerEntryPoints = ["src/server/index.ts"];
|
|
501
503
|
async function buildServer(params, plugins) {
|
|
502
504
|
let { serverDir, watch, watchServer } = params;
|
|
503
505
|
await populateEntries(params);
|
|
504
506
|
let buildOptions = {
|
|
505
507
|
...commonBuildOptions,
|
|
506
|
-
entryPoints:
|
|
508
|
+
entryPoints: appServerEntryPoints,
|
|
507
509
|
bundle: true,
|
|
508
510
|
splitting: true,
|
|
509
511
|
outdir: `${serverDir}/server`,
|
|
@@ -524,8 +526,9 @@ async function buildServer(params, plugins) {
|
|
|
524
526
|
|
|
525
527
|
// src/scripts/utils/buildServerCSS.ts
|
|
526
528
|
import esbuild3 from "esbuild";
|
|
529
|
+
var entryServerPaths = ["server", "server/index"];
|
|
527
530
|
async function buildServerCSS({ serverDir, watch, watchServer }, plugins) {
|
|
528
|
-
let serverEntries = await getEntryPoints(
|
|
531
|
+
let serverEntries = await getEntryPoints(entryServerPaths);
|
|
529
532
|
let buildOptions = {
|
|
530
533
|
...commonBuildOptions,
|
|
531
534
|
entryPoints: serverEntries.map(({ name, path }) => ({
|
package/dist/index.cjs
CHANGED
|
@@ -363,14 +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
|
-
* Builds the client-side code
|
|
368
|
-
* directories. The directories should preferrably be called 'ui' rather
|
|
369
|
-
* than client since their contents can also be used with the server-side
|
|
370
|
-
* rendering.
|
|
373
|
+
* Builds the client-side code.
|
|
371
374
|
*/
|
|
372
375
|
async function buildClient({ clientDir, watch, watchClient }, plugins) {
|
|
373
|
-
let clientEntries = await getEntryPoints(
|
|
376
|
+
let clientEntries = await getEntryPoints(entryClientPaths);
|
|
374
377
|
let buildOptions = {
|
|
375
378
|
...commonBuildOptions,
|
|
376
379
|
entryPoints: clientEntries.map(({ path }) => path),
|
|
@@ -416,12 +419,13 @@ ${content}
|
|
|
416
419
|
`);
|
|
417
420
|
}
|
|
418
421
|
|
|
422
|
+
const appServerEntryPoints = ["src/server/index.ts"];
|
|
419
423
|
async function buildServer(params, plugins) {
|
|
420
424
|
let { serverDir, watch, watchServer } = params;
|
|
421
425
|
await populateEntries(params);
|
|
422
426
|
let buildOptions = {
|
|
423
427
|
...commonBuildOptions,
|
|
424
|
-
entryPoints:
|
|
428
|
+
entryPoints: appServerEntryPoints,
|
|
425
429
|
bundle: true,
|
|
426
430
|
splitting: true,
|
|
427
431
|
outdir: `${serverDir}/server`,
|
|
@@ -440,8 +444,9 @@ async function buildServer(params, plugins) {
|
|
|
440
444
|
await esbuild.default.build(buildOptions);
|
|
441
445
|
}
|
|
442
446
|
|
|
447
|
+
const entryServerPaths = ["server", "server/index"];
|
|
443
448
|
async function buildServerCSS({ serverDir, watch, watchServer }, plugins) {
|
|
444
|
-
let serverEntries = await getEntryPoints(
|
|
449
|
+
let serverEntries = await getEntryPoints(entryServerPaths);
|
|
445
450
|
let buildOptions = {
|
|
446
451
|
...commonBuildOptions,
|
|
447
452
|
entryPoints: serverEntries.map(({ name, path }) => ({
|
package/dist/index.mjs
CHANGED
|
@@ -337,14 +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
|
-
* Builds the client-side code
|
|
342
|
-
* directories. The directories should preferrably be called 'ui' rather
|
|
343
|
-
* than client since their contents can also be used with the server-side
|
|
344
|
-
* rendering.
|
|
347
|
+
* Builds the client-side code.
|
|
345
348
|
*/
|
|
346
349
|
async function buildClient({ clientDir, watch, watchClient }, plugins) {
|
|
347
|
-
let clientEntries = await getEntryPoints(
|
|
350
|
+
let clientEntries = await getEntryPoints(entryClientPaths);
|
|
348
351
|
let buildOptions = {
|
|
349
352
|
...commonBuildOptions,
|
|
350
353
|
entryPoints: clientEntries.map(({ path }) => path),
|
|
@@ -390,12 +393,13 @@ ${content}
|
|
|
390
393
|
`);
|
|
391
394
|
}
|
|
392
395
|
|
|
396
|
+
const appServerEntryPoints = ["src/server/index.ts"];
|
|
393
397
|
async function buildServer(params, plugins) {
|
|
394
398
|
let { serverDir, watch, watchServer } = params;
|
|
395
399
|
await populateEntries(params);
|
|
396
400
|
let buildOptions = {
|
|
397
401
|
...commonBuildOptions,
|
|
398
|
-
entryPoints:
|
|
402
|
+
entryPoints: appServerEntryPoints,
|
|
399
403
|
bundle: true,
|
|
400
404
|
splitting: true,
|
|
401
405
|
outdir: `${serverDir}/server`,
|
|
@@ -414,8 +418,9 @@ async function buildServer(params, plugins) {
|
|
|
414
418
|
await esbuild.build(buildOptions);
|
|
415
419
|
}
|
|
416
420
|
|
|
421
|
+
const entryServerPaths = ["server", "server/index"];
|
|
417
422
|
async function buildServerCSS({ serverDir, watch, watchServer }, plugins) {
|
|
418
|
-
let serverEntries = await getEntryPoints(
|
|
423
|
+
let serverEntries = await getEntryPoints(entryServerPaths);
|
|
419
424
|
let buildOptions = {
|
|
420
425
|
...commonBuildOptions,
|
|
421
426
|
entryPoints: serverEntries.map(({ name, path }) => ({
|
package/package.json
CHANGED
|
@@ -3,17 +3,16 @@ 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
|
-
* Builds the client-side code
|
|
8
|
-
* directories. The directories should preferrably be called 'ui' rather
|
|
9
|
-
* than client since their contents can also be used with the server-side
|
|
10
|
-
* rendering.
|
|
9
|
+
* Builds the client-side code.
|
|
11
10
|
*/
|
|
12
11
|
export async function buildClient(
|
|
13
12
|
{ clientDir, watch, watchClient }: BuildParams,
|
|
14
13
|
plugins?: Plugin[],
|
|
15
14
|
) {
|
|
16
|
-
let clientEntries = await getEntryPoints(
|
|
15
|
+
let clientEntries = await getEntryPoints(entryClientPaths);
|
|
17
16
|
|
|
18
17
|
let buildOptions: BuildOptions = {
|
|
19
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,
|