everything-dev 1.19.0 → 1.20.0
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/cli/timing.cjs +21 -1
- package/dist/cli/timing.cjs.map +1 -1
- package/dist/cli/timing.mjs +21 -1
- package/dist/cli/timing.mjs.map +1 -1
- package/dist/contract.d.cts +6 -6
- package/dist/contract.d.mts +6 -6
- package/dist/plugin.cjs +33 -27
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +5 -5
- package/dist/plugin.d.mts +5 -5
- package/dist/plugin.mjs +33 -27
- package/dist/plugin.mjs.map +1 -1
- package/dist/types.d.cts +4 -4
- package/dist/types.d.mts +4 -4
- package/package.json +5 -5
- package/src/cli/timing.ts +27 -0
- package/src/plugin.ts +108 -59
package/dist/cli/timing.cjs
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
|
|
2
2
|
//#region src/cli/timing.ts
|
|
3
|
-
|
|
3
|
+
const PHASE_LABELS = {
|
|
4
|
+
"parent config": "Fetching parent config...",
|
|
5
|
+
"template source": "Resolving template source...",
|
|
6
|
+
"scaffold project": "Creating project scaffold...",
|
|
7
|
+
"copy files": "Copying template files...",
|
|
8
|
+
"personalize config": "Personalizing config...",
|
|
9
|
+
"write snapshot": "Writing snapshot...",
|
|
10
|
+
"resolve config": "Resolving config...",
|
|
11
|
+
"generate env/docker": "Generating environment config...",
|
|
12
|
+
"create env file": "Creating .env file...",
|
|
13
|
+
"install dependencies": "Installing dependencies...",
|
|
14
|
+
"generate types": "Generating types...",
|
|
15
|
+
"generate migrations": "Generating database migrations...",
|
|
16
|
+
"generate code artifacts": "Generating code artifacts...",
|
|
17
|
+
"docker compose up": "Starting Docker services..."
|
|
18
|
+
};
|
|
19
|
+
function phaseLabel(name) {
|
|
20
|
+
return PHASE_LABELS[name] ?? name;
|
|
21
|
+
}
|
|
22
|
+
async function timePhase(timings, name, fn, spinner) {
|
|
23
|
+
spinner?.message(phaseLabel(name));
|
|
4
24
|
const startedAt = Date.now();
|
|
5
25
|
try {
|
|
6
26
|
return await fn();
|
package/dist/cli/timing.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing.cjs","names":[],"sources":["../../src/cli/timing.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"timing.cjs","names":[],"sources":["../../src/cli/timing.ts"],"sourcesContent":["import type { spinner as clackSpinner } from \"@clack/prompts\";\n\ntype Spinner = ReturnType<typeof clackSpinner>;\n\nexport interface PhaseTiming {\n name: string;\n durationMs: number;\n}\n\nconst PHASE_LABELS: Record<string, string> = {\n \"parent config\": \"Fetching parent config...\",\n \"template source\": \"Resolving template source...\",\n \"scaffold project\": \"Creating project scaffold...\",\n \"copy files\": \"Copying template files...\",\n \"personalize config\": \"Personalizing config...\",\n \"write snapshot\": \"Writing snapshot...\",\n \"resolve config\": \"Resolving config...\",\n \"generate env/docker\": \"Generating environment config...\",\n \"create env file\": \"Creating .env file...\",\n \"install dependencies\": \"Installing dependencies...\",\n \"generate types\": \"Generating types...\",\n \"generate migrations\": \"Generating database migrations...\",\n \"generate code artifacts\": \"Generating code artifacts...\",\n \"docker compose up\": \"Starting Docker services...\",\n};\n\nfunction phaseLabel(name: string): string {\n return PHASE_LABELS[name] ?? name;\n}\n\nexport async function timePhase<T>(\n timings: PhaseTiming[],\n name: string,\n fn: () => Promise<T>,\n spinner?: Spinner,\n): Promise<T> {\n spinner?.message(phaseLabel(name));\n const startedAt = Date.now();\n try {\n return await fn();\n } finally {\n timings.push({ name, durationMs: Date.now() - startedAt });\n }\n}\n\nexport function sumPhaseDurations(timings: PhaseTiming[]): number {\n return timings.reduce((total, timing) => total + timing.durationMs, 0);\n}\n\nexport function formatDuration(durationMs: number): string {\n if (durationMs < 1000) {\n return `${durationMs}ms`;\n }\n\n if (durationMs < 60_000) {\n const seconds = durationMs / 1000;\n return `${seconds.toFixed(seconds >= 10 ? 0 : 1)}s`;\n }\n\n const minutes = Math.floor(durationMs / 60_000);\n const seconds = Math.round((durationMs % 60_000) / 1000);\n return `${minutes}m ${seconds}s`;\n}\n"],"mappings":";;AASA,MAAM,eAAuC;CAC3C,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CACpB,cAAc;CACd,sBAAsB;CACtB,kBAAkB;CAClB,kBAAkB;CAClB,uBAAuB;CACvB,mBAAmB;CACnB,wBAAwB;CACxB,kBAAkB;CAClB,uBAAuB;CACvB,2BAA2B;CAC3B,qBAAqB;CACtB;AAED,SAAS,WAAW,MAAsB;AACxC,QAAO,aAAa,SAAS;;AAG/B,eAAsB,UACpB,SACA,MACA,IACA,SACY;AACZ,UAAS,QAAQ,WAAW,KAAK,CAAC;CAClC,MAAM,YAAY,KAAK,KAAK;AAC5B,KAAI;AACF,SAAO,MAAM,IAAI;WACT;AACR,UAAQ,KAAK;GAAE;GAAM,YAAY,KAAK,KAAK,GAAG;GAAW,CAAC;;;AAI9D,SAAgB,kBAAkB,SAAgC;AAChE,QAAO,QAAQ,QAAQ,OAAO,WAAW,QAAQ,OAAO,YAAY,EAAE;;AAGxE,SAAgB,eAAe,YAA4B;AACzD,KAAI,aAAa,IACf,QAAO,GAAG,WAAW;AAGvB,KAAI,aAAa,KAAQ;EACvB,MAAM,UAAU,aAAa;AAC7B,SAAO,GAAG,QAAQ,QAAQ,WAAW,KAAK,IAAI,EAAE,CAAC;;AAKnD,QAAO,GAFS,KAAK,MAAM,aAAa,IAAO,CAE7B,IADF,KAAK,MAAO,aAAa,MAAU,IAAK,CAC1B"}
|
package/dist/cli/timing.mjs
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
//#region src/cli/timing.ts
|
|
2
|
-
|
|
2
|
+
const PHASE_LABELS = {
|
|
3
|
+
"parent config": "Fetching parent config...",
|
|
4
|
+
"template source": "Resolving template source...",
|
|
5
|
+
"scaffold project": "Creating project scaffold...",
|
|
6
|
+
"copy files": "Copying template files...",
|
|
7
|
+
"personalize config": "Personalizing config...",
|
|
8
|
+
"write snapshot": "Writing snapshot...",
|
|
9
|
+
"resolve config": "Resolving config...",
|
|
10
|
+
"generate env/docker": "Generating environment config...",
|
|
11
|
+
"create env file": "Creating .env file...",
|
|
12
|
+
"install dependencies": "Installing dependencies...",
|
|
13
|
+
"generate types": "Generating types...",
|
|
14
|
+
"generate migrations": "Generating database migrations...",
|
|
15
|
+
"generate code artifacts": "Generating code artifacts...",
|
|
16
|
+
"docker compose up": "Starting Docker services..."
|
|
17
|
+
};
|
|
18
|
+
function phaseLabel(name) {
|
|
19
|
+
return PHASE_LABELS[name] ?? name;
|
|
20
|
+
}
|
|
21
|
+
async function timePhase(timings, name, fn, spinner) {
|
|
22
|
+
spinner?.message(phaseLabel(name));
|
|
3
23
|
const startedAt = Date.now();
|
|
4
24
|
try {
|
|
5
25
|
return await fn();
|
package/dist/cli/timing.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timing.mjs","names":[],"sources":["../../src/cli/timing.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"timing.mjs","names":[],"sources":["../../src/cli/timing.ts"],"sourcesContent":["import type { spinner as clackSpinner } from \"@clack/prompts\";\n\ntype Spinner = ReturnType<typeof clackSpinner>;\n\nexport interface PhaseTiming {\n name: string;\n durationMs: number;\n}\n\nconst PHASE_LABELS: Record<string, string> = {\n \"parent config\": \"Fetching parent config...\",\n \"template source\": \"Resolving template source...\",\n \"scaffold project\": \"Creating project scaffold...\",\n \"copy files\": \"Copying template files...\",\n \"personalize config\": \"Personalizing config...\",\n \"write snapshot\": \"Writing snapshot...\",\n \"resolve config\": \"Resolving config...\",\n \"generate env/docker\": \"Generating environment config...\",\n \"create env file\": \"Creating .env file...\",\n \"install dependencies\": \"Installing dependencies...\",\n \"generate types\": \"Generating types...\",\n \"generate migrations\": \"Generating database migrations...\",\n \"generate code artifacts\": \"Generating code artifacts...\",\n \"docker compose up\": \"Starting Docker services...\",\n};\n\nfunction phaseLabel(name: string): string {\n return PHASE_LABELS[name] ?? name;\n}\n\nexport async function timePhase<T>(\n timings: PhaseTiming[],\n name: string,\n fn: () => Promise<T>,\n spinner?: Spinner,\n): Promise<T> {\n spinner?.message(phaseLabel(name));\n const startedAt = Date.now();\n try {\n return await fn();\n } finally {\n timings.push({ name, durationMs: Date.now() - startedAt });\n }\n}\n\nexport function sumPhaseDurations(timings: PhaseTiming[]): number {\n return timings.reduce((total, timing) => total + timing.durationMs, 0);\n}\n\nexport function formatDuration(durationMs: number): string {\n if (durationMs < 1000) {\n return `${durationMs}ms`;\n }\n\n if (durationMs < 60_000) {\n const seconds = durationMs / 1000;\n return `${seconds.toFixed(seconds >= 10 ? 0 : 1)}s`;\n }\n\n const minutes = Math.floor(durationMs / 60_000);\n const seconds = Math.round((durationMs % 60_000) / 1000);\n return `${minutes}m ${seconds}s`;\n}\n"],"mappings":";AASA,MAAM,eAAuC;CAC3C,iBAAiB;CACjB,mBAAmB;CACnB,oBAAoB;CACpB,cAAc;CACd,sBAAsB;CACtB,kBAAkB;CAClB,kBAAkB;CAClB,uBAAuB;CACvB,mBAAmB;CACnB,wBAAwB;CACxB,kBAAkB;CAClB,uBAAuB;CACvB,2BAA2B;CAC3B,qBAAqB;CACtB;AAED,SAAS,WAAW,MAAsB;AACxC,QAAO,aAAa,SAAS;;AAG/B,eAAsB,UACpB,SACA,MACA,IACA,SACY;AACZ,UAAS,QAAQ,WAAW,KAAK,CAAC;CAClC,MAAM,YAAY,KAAK,KAAK;AAC5B,KAAI;AACF,SAAO,MAAM,IAAI;WACT;AACR,UAAQ,KAAK;GAAE;GAAM,YAAY,KAAK,KAAK,GAAG;GAAW,CAAC;;;AAI9D,SAAgB,kBAAkB,SAAgC;AAChE,QAAO,QAAQ,QAAQ,OAAO,WAAW,QAAQ,OAAO,YAAY,EAAE;;AAGxE,SAAgB,eAAe,YAA4B;AACzD,KAAI,aAAa,IACf,QAAO,GAAG,WAAW;AAGvB,KAAI,aAAa,KAAQ;EACvB,MAAM,UAAU,aAAa;AAC7B,SAAO,GAAG,QAAQ,QAAQ,WAAW,KAAK,IAAI,EAAE,CAAC;;AAKnD,QAAO,GAFS,KAAK,MAAM,aAAa,IAAO,CAE7B,IADF,KAAK,MAAO,aAAa,MAAU,IAAK,CAC1B"}
|
package/dist/contract.d.cts
CHANGED
|
@@ -263,8 +263,8 @@ declare const PublishOptionsSchema: z.ZodObject<{
|
|
|
263
263
|
dryRun: z.ZodDefault<z.ZodBoolean>;
|
|
264
264
|
packages: z.ZodDefault<z.ZodString>;
|
|
265
265
|
network: z.ZodOptional<z.ZodEnum<{
|
|
266
|
-
mainnet: "mainnet";
|
|
267
266
|
testnet: "testnet";
|
|
267
|
+
mainnet: "mainnet";
|
|
268
268
|
}>>;
|
|
269
269
|
privateKey: z.ZodOptional<z.ZodString>;
|
|
270
270
|
}, z.core.$strip>;
|
|
@@ -290,8 +290,8 @@ declare const KeyPublishResultSchema: z.ZodObject<{
|
|
|
290
290
|
}>;
|
|
291
291
|
account: z.ZodString;
|
|
292
292
|
network: z.ZodEnum<{
|
|
293
|
-
mainnet: "mainnet";
|
|
294
293
|
testnet: "testnet";
|
|
294
|
+
mainnet: "mainnet";
|
|
295
295
|
}>;
|
|
296
296
|
contract: z.ZodString;
|
|
297
297
|
allowance: z.ZodString;
|
|
@@ -411,8 +411,8 @@ declare const StatusResultSchema: z.ZodObject<{
|
|
|
411
411
|
}, z.core.$strip>;
|
|
412
412
|
declare const TypesGenOptionsSchema: z.ZodObject<{
|
|
413
413
|
env: z.ZodOptional<z.ZodEnum<{
|
|
414
|
-
development: "development";
|
|
415
414
|
production: "production";
|
|
415
|
+
development: "development";
|
|
416
416
|
}>>;
|
|
417
417
|
dryRun: z.ZodDefault<z.ZodBoolean>;
|
|
418
418
|
}, z.core.$strip>;
|
|
@@ -687,8 +687,8 @@ declare const bosContract: {
|
|
|
687
687
|
dryRun: z.ZodDefault<z.ZodBoolean>;
|
|
688
688
|
packages: z.ZodDefault<z.ZodString>;
|
|
689
689
|
network: z.ZodOptional<z.ZodEnum<{
|
|
690
|
-
mainnet: "mainnet";
|
|
691
690
|
testnet: "testnet";
|
|
691
|
+
mainnet: "mainnet";
|
|
692
692
|
}>>;
|
|
693
693
|
privateKey: z.ZodOptional<z.ZodString>;
|
|
694
694
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -712,8 +712,8 @@ declare const bosContract: {
|
|
|
712
712
|
}>;
|
|
713
713
|
account: z.ZodString;
|
|
714
714
|
network: z.ZodEnum<{
|
|
715
|
-
mainnet: "mainnet";
|
|
716
715
|
testnet: "testnet";
|
|
716
|
+
mainnet: "mainnet";
|
|
717
717
|
}>;
|
|
718
718
|
contract: z.ZodString;
|
|
719
719
|
allowance: z.ZodString;
|
|
@@ -826,8 +826,8 @@ declare const bosContract: {
|
|
|
826
826
|
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
827
827
|
typesGen: ContractProcedure<z.ZodObject<{
|
|
828
828
|
env: z.ZodOptional<z.ZodEnum<{
|
|
829
|
-
development: "development";
|
|
830
829
|
production: "production";
|
|
830
|
+
development: "development";
|
|
831
831
|
}>>;
|
|
832
832
|
dryRun: z.ZodDefault<z.ZodBoolean>;
|
|
833
833
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/contract.d.mts
CHANGED
|
@@ -263,8 +263,8 @@ declare const PublishOptionsSchema: z.ZodObject<{
|
|
|
263
263
|
dryRun: z.ZodDefault<z.ZodBoolean>;
|
|
264
264
|
packages: z.ZodDefault<z.ZodString>;
|
|
265
265
|
network: z.ZodOptional<z.ZodEnum<{
|
|
266
|
-
mainnet: "mainnet";
|
|
267
266
|
testnet: "testnet";
|
|
267
|
+
mainnet: "mainnet";
|
|
268
268
|
}>>;
|
|
269
269
|
privateKey: z.ZodOptional<z.ZodString>;
|
|
270
270
|
}, z.core.$strip>;
|
|
@@ -290,8 +290,8 @@ declare const KeyPublishResultSchema: z.ZodObject<{
|
|
|
290
290
|
}>;
|
|
291
291
|
account: z.ZodString;
|
|
292
292
|
network: z.ZodEnum<{
|
|
293
|
-
mainnet: "mainnet";
|
|
294
293
|
testnet: "testnet";
|
|
294
|
+
mainnet: "mainnet";
|
|
295
295
|
}>;
|
|
296
296
|
contract: z.ZodString;
|
|
297
297
|
allowance: z.ZodString;
|
|
@@ -411,8 +411,8 @@ declare const StatusResultSchema: z.ZodObject<{
|
|
|
411
411
|
}, z.core.$strip>;
|
|
412
412
|
declare const TypesGenOptionsSchema: z.ZodObject<{
|
|
413
413
|
env: z.ZodOptional<z.ZodEnum<{
|
|
414
|
-
development: "development";
|
|
415
414
|
production: "production";
|
|
415
|
+
development: "development";
|
|
416
416
|
}>>;
|
|
417
417
|
dryRun: z.ZodDefault<z.ZodBoolean>;
|
|
418
418
|
}, z.core.$strip>;
|
|
@@ -687,8 +687,8 @@ declare const bosContract: {
|
|
|
687
687
|
dryRun: z.ZodDefault<z.ZodBoolean>;
|
|
688
688
|
packages: z.ZodDefault<z.ZodString>;
|
|
689
689
|
network: z.ZodOptional<z.ZodEnum<{
|
|
690
|
-
mainnet: "mainnet";
|
|
691
690
|
testnet: "testnet";
|
|
691
|
+
mainnet: "mainnet";
|
|
692
692
|
}>>;
|
|
693
693
|
privateKey: z.ZodOptional<z.ZodString>;
|
|
694
694
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -712,8 +712,8 @@ declare const bosContract: {
|
|
|
712
712
|
}>;
|
|
713
713
|
account: z.ZodString;
|
|
714
714
|
network: z.ZodEnum<{
|
|
715
|
-
mainnet: "mainnet";
|
|
716
715
|
testnet: "testnet";
|
|
716
|
+
mainnet: "mainnet";
|
|
717
717
|
}>;
|
|
718
718
|
contract: z.ZodString;
|
|
719
719
|
allowance: z.ZodString;
|
|
@@ -826,8 +826,8 @@ declare const bosContract: {
|
|
|
826
826
|
}, z.core.$strip>, MergedErrorMap<Record<never, never>, Record<never, never>>, Record<never, never>>;
|
|
827
827
|
typesGen: ContractProcedure<z.ZodObject<{
|
|
828
828
|
env: z.ZodOptional<z.ZodEnum<{
|
|
829
|
-
development: "development";
|
|
830
829
|
production: "production";
|
|
830
|
+
development: "development";
|
|
831
831
|
}>>;
|
|
832
832
|
dryRun: z.ZodDefault<z.ZodBoolean>;
|
|
833
833
|
}, z.core.$strip>, z.ZodObject<{
|
package/dist/plugin.cjs
CHANGED
|
@@ -795,13 +795,16 @@ var plugin_default = (0, every_plugin.createPlugin)({
|
|
|
795
795
|
}
|
|
796
796
|
extendsAccount = extendsAccount || "dev.everything.near";
|
|
797
797
|
extendsGateway = extendsGateway || "everything.dev";
|
|
798
|
+
const s = _clack_prompts.spinner();
|
|
799
|
+
s.start("Initializing project");
|
|
798
800
|
let parentPluginKeys = [];
|
|
799
801
|
let parentConfig = null;
|
|
800
802
|
try {
|
|
801
|
-
parentConfig = await require_timing.timePhase(timings, "parent config", () => require_cli_init.fetchParentConfig(extendsAccount, extendsGateway));
|
|
803
|
+
parentConfig = await require_timing.timePhase(timings, "parent config", () => require_cli_init.fetchParentConfig(extendsAccount, extendsGateway), s);
|
|
802
804
|
if (parentConfig?.plugins && typeof parentConfig.plugins === "object") parentPluginKeys = Object.keys(parentConfig.plugins);
|
|
803
805
|
} catch {}
|
|
804
806
|
if (!input.noInteractive) {
|
|
807
|
+
s.stop("Config fetched");
|
|
805
808
|
const prompted = await require_prompts.promptInitOptions({
|
|
806
809
|
extends: `bos://${extendsAccount}/${extendsGateway}`,
|
|
807
810
|
directory,
|
|
@@ -818,14 +821,16 @@ var plugin_default = (0, every_plugin.createPlugin)({
|
|
|
818
821
|
domain = prompted.domain;
|
|
819
822
|
withHost = prompted.withHost;
|
|
820
823
|
plugins = prompted.plugins;
|
|
824
|
+
s.start("Setting up project");
|
|
821
825
|
}
|
|
822
826
|
directory = directory || domain || extendsGateway;
|
|
823
827
|
const targetDir = (0, node_path.resolve)(directory);
|
|
824
828
|
plugins = plugins ?? [];
|
|
825
829
|
const extendsRef = `bos://${extendsAccount}/${extendsGateway}`;
|
|
826
830
|
if (!parentConfig) try {
|
|
827
|
-
parentConfig = await require_timing.timePhase(timings, "parent config", () => require_cli_init.fetchParentConfig(extendsAccount, extendsGateway));
|
|
831
|
+
parentConfig = await require_timing.timePhase(timings, "parent config", () => require_cli_init.fetchParentConfig(extendsAccount, extendsGateway), s);
|
|
828
832
|
} catch {
|
|
833
|
+
s.stop("Failed");
|
|
829
834
|
return {
|
|
830
835
|
status: "error",
|
|
831
836
|
directory,
|
|
@@ -843,12 +848,10 @@ var plugin_default = (0, every_plugin.createPlugin)({
|
|
|
843
848
|
extendsAccount,
|
|
844
849
|
extendsGateway,
|
|
845
850
|
source: input.source
|
|
846
|
-
}));
|
|
851
|
+
}), s);
|
|
847
852
|
parentConfig = resolvedParentConfig;
|
|
848
853
|
const isMinimalScaffold = sourceDir === "";
|
|
849
854
|
try {
|
|
850
|
-
const s = _clack_prompts.spinner();
|
|
851
|
-
s.start("Setting up project");
|
|
852
855
|
let filesCopied;
|
|
853
856
|
if (isMinimalScaffold) filesCopied = await require_timing.timePhase(timings, "scaffold project", () => require_cli_init.scaffoldMinimalProject(targetDir, parentConfig, {
|
|
854
857
|
extendsAccount,
|
|
@@ -857,20 +860,23 @@ var plugin_default = (0, every_plugin.createPlugin)({
|
|
|
857
860
|
domain,
|
|
858
861
|
plugins,
|
|
859
862
|
withHost
|
|
860
|
-
}));
|
|
863
|
+
}), s);
|
|
861
864
|
else {
|
|
862
865
|
const patterns = await require_cli_init.readTemplatekeep(sourceDir);
|
|
863
|
-
if (patterns.length === 0)
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
866
|
+
if (patterns.length === 0) {
|
|
867
|
+
s.stop("Failed");
|
|
868
|
+
return {
|
|
869
|
+
status: "error",
|
|
870
|
+
directory,
|
|
871
|
+
extendsRef,
|
|
872
|
+
account,
|
|
873
|
+
domain,
|
|
874
|
+
extends: extendsRef,
|
|
875
|
+
plugins: plugins ?? [],
|
|
876
|
+
filesCopied: 0,
|
|
877
|
+
error: "No .templatekeep found in template source"
|
|
878
|
+
};
|
|
879
|
+
}
|
|
874
880
|
const pluginRoutes = {};
|
|
875
881
|
const parentRuntimePlugins = await require_config.buildRuntimePluginsForConfig(parentConfig, sourceDir, "production");
|
|
876
882
|
for (const [key, plugin] of Object.entries(parentRuntimePlugins ?? {})) if (plugin.routes && plugin.routes.length > 0) pluginRoutes[key] = plugin.routes;
|
|
@@ -878,7 +884,7 @@ var plugin_default = (0, every_plugin.createPlugin)({
|
|
|
878
884
|
withHost,
|
|
879
885
|
plugins,
|
|
880
886
|
pluginRoutes
|
|
881
|
-
}));
|
|
887
|
+
}), s);
|
|
882
888
|
await require_timing.timePhase(timings, "personalize config", () => require_cli_init.personalizeConfig(targetDir, {
|
|
883
889
|
extendsAccount,
|
|
884
890
|
extendsGateway,
|
|
@@ -888,26 +894,26 @@ var plugin_default = (0, every_plugin.createPlugin)({
|
|
|
888
894
|
pluginRoutes,
|
|
889
895
|
workspaceOpts: { sourceDir },
|
|
890
896
|
withHost
|
|
891
|
-
}));
|
|
897
|
+
}), s);
|
|
892
898
|
await require_timing.timePhase(timings, "write snapshot", () => require_cli_init.writeInitSnapshot(targetDir, extendsAccount, extendsGateway, sourceDir, patterns, {
|
|
893
899
|
withHost,
|
|
894
900
|
plugins,
|
|
895
901
|
pluginRoutes
|
|
896
|
-
}));
|
|
902
|
+
}), s);
|
|
897
903
|
}
|
|
898
|
-
const initConfig = await require_timing.timePhase(timings, "resolve config", () => require_config.loadConfig({ cwd: targetDir }));
|
|
904
|
+
const initConfig = await require_timing.timePhase(timings, "resolve config", () => require_config.loadConfig({ cwd: targetDir }), s);
|
|
899
905
|
if (initConfig?.runtime) await require_timing.timePhase(timings, "generate env/docker", async () => {
|
|
900
906
|
require_infra.writeGeneratedInfra(targetDir, initConfig.runtime);
|
|
901
|
-
});
|
|
907
|
+
}, s);
|
|
902
908
|
await require_timing.timePhase(timings, "create env file", async () => {
|
|
903
909
|
require_infra.ensureEnvFile(targetDir);
|
|
904
|
-
});
|
|
910
|
+
}, s);
|
|
905
911
|
if (!input.noInstall) {
|
|
906
|
-
await require_timing.timePhase(timings, "install dependencies", () => require_cli_init.runBunInstall(targetDir));
|
|
907
|
-
await require_timing.timePhase(timings, "generate types", () => require_cli_init.runTypesGen(targetDir));
|
|
908
|
-
await require_timing.timePhase(timings, "generate migrations", () => require_cli_init.generateDatabaseMigrations(targetDir));
|
|
912
|
+
await require_timing.timePhase(timings, "install dependencies", () => require_cli_init.runBunInstall(targetDir), s);
|
|
913
|
+
await require_timing.timePhase(timings, "generate types", () => require_cli_init.runTypesGen(targetDir), s);
|
|
914
|
+
await require_timing.timePhase(timings, "generate migrations", () => require_cli_init.generateDatabaseMigrations(targetDir), s);
|
|
909
915
|
}
|
|
910
|
-
if (input.noInstall && initConfig?.config) await require_timing.timePhase(timings, "generate code artifacts", () => generateCodeArtifacts(targetDir, initConfig.config));
|
|
916
|
+
if (input.noInstall && initConfig?.config) await require_timing.timePhase(timings, "generate code artifacts", () => generateCodeArtifacts(targetDir, initConfig.config), s);
|
|
911
917
|
s.stop("Project initialized");
|
|
912
918
|
if (!input.noInteractive) {
|
|
913
919
|
if (await _clack_prompts.confirm({
|