@akanjs/devkit 0.0.87 → 0.0.89
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/package.json +1 -1
- package/src/executors.cjs +25 -55
- package/src/executors.d.ts +4 -31
- package/src/executors.js +25 -52
- package/src/index.cjs +0 -2
- package/src/index.d.ts +0 -1
- package/src/index.js +0 -1
- package/src/installExternalLib.cjs +0 -33
- package/src/installExternalLib.d.ts +0 -2
- package/src/installExternalLib.js +0 -10
package/package.json
CHANGED
package/src/executors.cjs
CHANGED
|
@@ -28,9 +28,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
28
28
|
var executors_exports = {};
|
|
29
29
|
__export(executors_exports, {
|
|
30
30
|
AppExecutor: () => AppExecutor,
|
|
31
|
-
DistAppExecutor: () => DistAppExecutor,
|
|
32
|
-
DistLibExecutor: () => DistLibExecutor,
|
|
33
|
-
DistPkgExecutor: () => DistPkgExecutor,
|
|
34
31
|
Executor: () => Executor,
|
|
35
32
|
LibExecutor: () => LibExecutor,
|
|
36
33
|
PkgExecutor: () => PkgExecutor,
|
|
@@ -41,10 +38,10 @@ module.exports = __toCommonJS(executors_exports);
|
|
|
41
38
|
var import_common = require("@akanjs/common");
|
|
42
39
|
var import_config = require("@akanjs/config");
|
|
43
40
|
var import_child_process = require("child_process");
|
|
41
|
+
var import_dotenv = __toESM(require("dotenv"), 1);
|
|
44
42
|
var import_fs = __toESM(require("fs"), 1);
|
|
45
43
|
var import_promises = __toESM(require("fs/promises"), 1);
|
|
46
44
|
var import_path = __toESM(require("path"), 1);
|
|
47
|
-
var import_dotenv = __toESM(require("dotenv"), 1);
|
|
48
45
|
var import_dependencyScanner = require("./dependencyScanner");
|
|
49
46
|
class Executor {
|
|
50
47
|
logger;
|
|
@@ -278,7 +275,7 @@ class WorkspaceExecutor extends Executor {
|
|
|
278
275
|
const env = process.env.NEXT_PUBLIC_ENV ?? envFile.NEXT_PUBLIC_ENV ?? "debug";
|
|
279
276
|
if (!env)
|
|
280
277
|
throw new Error("NEXT_PUBLIC_ENV is not set");
|
|
281
|
-
return { ...appName ? { appName } : {}, repoName, serveDomain, env };
|
|
278
|
+
return { ...appName ? { name: appName } : {}, repoName, serveDomain, env };
|
|
282
279
|
}
|
|
283
280
|
async scan() {
|
|
284
281
|
const [appNames, libNames, pkgNames] = await Promise.all([this.getApps(), this.getLibs(), this.getPkgs()]);
|
|
@@ -335,10 +332,10 @@ class WorkspaceExecutor extends Executor {
|
|
|
335
332
|
}
|
|
336
333
|
async commit(message, { init = false, add = true } = {}) {
|
|
337
334
|
if (init)
|
|
338
|
-
await this.exec(`git init`);
|
|
335
|
+
await this.exec(`git init --quiet`);
|
|
339
336
|
if (add)
|
|
340
337
|
await this.exec(`git add .`);
|
|
341
|
-
await this.exec(`git commit -m "${message}"`);
|
|
338
|
+
await this.exec(`git commit --quiet -m "${message}"`);
|
|
342
339
|
}
|
|
343
340
|
async #getDirHasFile(basePath, targetFilename) {
|
|
344
341
|
const AVOID_DIRS = ["node_modules", "dist", "public", "./next"];
|
|
@@ -382,7 +379,7 @@ class SysExecutor extends Executor {
|
|
|
382
379
|
this.type = type;
|
|
383
380
|
}
|
|
384
381
|
async getConfig(command) {
|
|
385
|
-
return this.type === "app" ? await (0, import_config.getAppConfig)(this.cwdPath, { ...this.workspace.getBaseDevEnv(),
|
|
382
|
+
return this.type === "app" ? await (0, import_config.getAppConfig)(this.cwdPath, { ...this.workspace.getBaseDevEnv(), type: "app", name: this.name, command }) : await (0, import_config.getLibConfig)(this.cwdPath, { ...this.workspace.getBaseDevEnv(), type: "lib", name: this.name, command });
|
|
386
383
|
}
|
|
387
384
|
async scan({
|
|
388
385
|
tsconfig = this.getTsConfig(`${this.cwdPath}/tsconfig.json`),
|
|
@@ -498,6 +495,8 @@ class SysExecutor extends Executor {
|
|
|
498
495
|
const scanResult = {
|
|
499
496
|
name: this.name,
|
|
500
497
|
type: this.type,
|
|
498
|
+
repoName: this.workspace.repoName,
|
|
499
|
+
serveDomain: this.workspace.getBaseDevEnv().serveDomain,
|
|
501
500
|
akanConfig,
|
|
502
501
|
files,
|
|
503
502
|
libDeps,
|
|
@@ -571,8 +570,10 @@ class SysExecutor extends Executor {
|
|
|
571
570
|
}
|
|
572
571
|
}
|
|
573
572
|
class AppExecutor extends SysExecutor {
|
|
573
|
+
dist;
|
|
574
574
|
constructor({ workspace, name }) {
|
|
575
575
|
super({ workspace, name, type: "app" });
|
|
576
|
+
this.dist = new Executor(`${name} Dist App Executor`, `${this.workspace.workspaceRoot}/dist/apps/${name}`);
|
|
576
577
|
}
|
|
577
578
|
static from(executor, name) {
|
|
578
579
|
if (executor instanceof WorkspaceExecutor)
|
|
@@ -580,7 +581,12 @@ class AppExecutor extends SysExecutor {
|
|
|
580
581
|
return new AppExecutor({ workspace: executor.workspace, name });
|
|
581
582
|
}
|
|
582
583
|
async getConfig(command) {
|
|
583
|
-
return await (0, import_config.getAppConfig)(this.cwdPath, {
|
|
584
|
+
return await (0, import_config.getAppConfig)(this.cwdPath, {
|
|
585
|
+
...this.workspace.getBaseDevEnv(),
|
|
586
|
+
type: "app",
|
|
587
|
+
name: this.name,
|
|
588
|
+
command
|
|
589
|
+
});
|
|
584
590
|
}
|
|
585
591
|
async syncAssets(libDeps) {
|
|
586
592
|
const projectPublicLibPath = `${this.cwdPath}/public/libs`;
|
|
@@ -597,23 +603,13 @@ class AppExecutor extends SysExecutor {
|
|
|
597
603
|
);
|
|
598
604
|
}
|
|
599
605
|
}
|
|
600
|
-
class DistAppExecutor extends Executor {
|
|
601
|
-
name;
|
|
602
|
-
constructor({ workspace, name }) {
|
|
603
|
-
super(`${name} Dist App Executor`, `${workspace.workspaceRoot}/dist/apps/${name}`);
|
|
604
|
-
this.name = name;
|
|
605
|
-
}
|
|
606
|
-
static from(executor, name) {
|
|
607
|
-
if (executor instanceof WorkspaceExecutor)
|
|
608
|
-
return new DistAppExecutor({ workspace: executor, name });
|
|
609
|
-
return new DistAppExecutor({ workspace: executor.workspace, name });
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
606
|
class LibExecutor extends SysExecutor {
|
|
613
607
|
workspaceRoot;
|
|
614
608
|
repoName;
|
|
609
|
+
dist;
|
|
615
610
|
constructor({ workspace, name }) {
|
|
616
611
|
super({ workspace, name, type: "lib" });
|
|
612
|
+
this.dist = new Executor(`${name} Dist Lib Executor`, `${this.workspace.workspaceRoot}/dist/libs/${name}`);
|
|
617
613
|
}
|
|
618
614
|
static from(executor, name) {
|
|
619
615
|
if (executor instanceof WorkspaceExecutor)
|
|
@@ -621,28 +617,23 @@ class LibExecutor extends SysExecutor {
|
|
|
621
617
|
return new LibExecutor({ workspace: executor.workspace, name });
|
|
622
618
|
}
|
|
623
619
|
async getConfig(command) {
|
|
624
|
-
return await (0, import_config.getLibConfig)(this.cwdPath, {
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
super(`${name} Dist Lib Executor`, `${workspace.workspaceRoot}/dist/libs/${name}`);
|
|
631
|
-
this.name = name;
|
|
632
|
-
}
|
|
633
|
-
static from(executor, name) {
|
|
634
|
-
if (executor instanceof WorkspaceExecutor)
|
|
635
|
-
return new DistAppExecutor({ workspace: executor, name });
|
|
636
|
-
return new DistLibExecutor({ workspace: executor.workspace, name });
|
|
620
|
+
return await (0, import_config.getLibConfig)(this.cwdPath, {
|
|
621
|
+
...this.workspace.getBaseDevEnv(),
|
|
622
|
+
type: "lib",
|
|
623
|
+
name: this.name,
|
|
624
|
+
command
|
|
625
|
+
});
|
|
637
626
|
}
|
|
638
627
|
}
|
|
639
628
|
class PkgExecutor extends Executor {
|
|
640
629
|
workspace;
|
|
641
630
|
name;
|
|
631
|
+
dist;
|
|
642
632
|
constructor({ workspace = WorkspaceExecutor.fromRoot(), name }) {
|
|
643
633
|
super(`${name} Pkg Executor`, `${workspace.workspaceRoot}/pkgs/${name}`);
|
|
644
634
|
this.workspace = workspace;
|
|
645
635
|
this.name = name;
|
|
636
|
+
this.dist = new Executor(`${name} Dist Pkg Executor`, `${this.workspace.workspaceRoot}/dist/pkgs/${name}`);
|
|
646
637
|
}
|
|
647
638
|
static from(executor, name) {
|
|
648
639
|
if (executor instanceof WorkspaceExecutor)
|
|
@@ -672,30 +663,9 @@ class PkgExecutor extends Executor {
|
|
|
672
663
|
return pkgScanResult;
|
|
673
664
|
}
|
|
674
665
|
}
|
|
675
|
-
class DistPkgExecutor extends Executor {
|
|
676
|
-
workspaceRoot;
|
|
677
|
-
repoName;
|
|
678
|
-
name;
|
|
679
|
-
constructor({ workspaceRoot, repoName, name }) {
|
|
680
|
-
super(`${name} Dist Pkg Executor`, `${workspaceRoot}/dist/pkgs/${name}`);
|
|
681
|
-
this.workspaceRoot = workspaceRoot;
|
|
682
|
-
this.repoName = repoName;
|
|
683
|
-
this.name = name;
|
|
684
|
-
}
|
|
685
|
-
static from(workspaceExecutor, name) {
|
|
686
|
-
return new DistPkgExecutor({
|
|
687
|
-
workspaceRoot: workspaceExecutor.workspaceRoot,
|
|
688
|
-
repoName: workspaceExecutor.repoName,
|
|
689
|
-
name
|
|
690
|
-
});
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
666
|
// Annotate the CommonJS export names for ESM import in node:
|
|
694
667
|
0 && (module.exports = {
|
|
695
668
|
AppExecutor,
|
|
696
|
-
DistAppExecutor,
|
|
697
|
-
DistLibExecutor,
|
|
698
|
-
DistPkgExecutor,
|
|
699
669
|
Executor,
|
|
700
670
|
LibExecutor,
|
|
701
671
|
PkgExecutor,
|
package/src/executors.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ export declare class WorkspaceExecutor extends Executor {
|
|
|
53
53
|
repoName: string;
|
|
54
54
|
serveDomain: string;
|
|
55
55
|
env: "debug" | "testing" | "develop" | "main";
|
|
56
|
-
|
|
56
|
+
name?: string | undefined;
|
|
57
57
|
};
|
|
58
58
|
scan(): Promise<WorkspaceScanResult>;
|
|
59
59
|
getApps(): Promise<string[]>;
|
|
@@ -110,20 +110,12 @@ interface AppExecutorOptions {
|
|
|
110
110
|
name: string;
|
|
111
111
|
}
|
|
112
112
|
export declare class AppExecutor extends SysExecutor {
|
|
113
|
+
dist: Executor;
|
|
113
114
|
constructor({ workspace, name }: AppExecutorOptions);
|
|
114
115
|
static from(executor: SysExecutor | WorkspaceExecutor, name: string): AppExecutor;
|
|
115
116
|
getConfig(command?: string): Promise<AppConfigResult>;
|
|
116
117
|
syncAssets(libDeps: string[]): Promise<void>;
|
|
117
118
|
}
|
|
118
|
-
interface DistAppExecutorOptions {
|
|
119
|
-
workspace: WorkspaceExecutor;
|
|
120
|
-
name: string;
|
|
121
|
-
}
|
|
122
|
-
export declare class DistAppExecutor extends Executor {
|
|
123
|
-
name: string;
|
|
124
|
-
constructor({ workspace, name }: DistAppExecutorOptions);
|
|
125
|
-
static from(executor: SysExecutor | WorkspaceExecutor, name: string): DistAppExecutor;
|
|
126
|
-
}
|
|
127
119
|
interface LibExecutorOptions {
|
|
128
120
|
workspace?: WorkspaceExecutor;
|
|
129
121
|
name: string;
|
|
@@ -131,19 +123,11 @@ interface LibExecutorOptions {
|
|
|
131
123
|
export declare class LibExecutor extends SysExecutor {
|
|
132
124
|
workspaceRoot: string;
|
|
133
125
|
repoName: string;
|
|
126
|
+
dist: Executor;
|
|
134
127
|
constructor({ workspace, name }: LibExecutorOptions);
|
|
135
128
|
static from(executor: SysExecutor | WorkspaceExecutor, name: string): LibExecutor;
|
|
136
129
|
getConfig(command?: string): Promise<LibConfigResult>;
|
|
137
130
|
}
|
|
138
|
-
interface DistLibExecutorOptions {
|
|
139
|
-
workspace: WorkspaceExecutor;
|
|
140
|
-
name: string;
|
|
141
|
-
}
|
|
142
|
-
export declare class DistLibExecutor extends Executor {
|
|
143
|
-
name: string;
|
|
144
|
-
constructor({ workspace, name }: DistLibExecutorOptions);
|
|
145
|
-
static from(executor: SysExecutor | WorkspaceExecutor, name: string): DistAppExecutor | DistLibExecutor;
|
|
146
|
-
}
|
|
147
131
|
interface PkgExecutorOptions {
|
|
148
132
|
workspace?: WorkspaceExecutor;
|
|
149
133
|
name: string;
|
|
@@ -151,6 +135,7 @@ interface PkgExecutorOptions {
|
|
|
151
135
|
export declare class PkgExecutor extends Executor {
|
|
152
136
|
workspace: WorkspaceExecutor;
|
|
153
137
|
name: string;
|
|
138
|
+
dist: Executor;
|
|
154
139
|
constructor({ workspace, name }: PkgExecutorOptions);
|
|
155
140
|
static from(executor: SysExecutor | WorkspaceExecutor, name: string): PkgExecutor;
|
|
156
141
|
scan({ packageJson, tsconfig, }?: {
|
|
@@ -158,16 +143,4 @@ export declare class PkgExecutor extends Executor {
|
|
|
158
143
|
tsconfig?: TsConfigJson;
|
|
159
144
|
}): Promise<PkgScanResult>;
|
|
160
145
|
}
|
|
161
|
-
interface DistPkgExecutorOptions {
|
|
162
|
-
workspaceRoot: string;
|
|
163
|
-
repoName: string;
|
|
164
|
-
name: string;
|
|
165
|
-
}
|
|
166
|
-
export declare class DistPkgExecutor extends Executor {
|
|
167
|
-
workspaceRoot: string;
|
|
168
|
-
repoName: string;
|
|
169
|
-
name: string;
|
|
170
|
-
constructor({ workspaceRoot, repoName, name }: DistPkgExecutorOptions);
|
|
171
|
-
static from(workspaceExecutor: WorkspaceExecutor, name: string): DistPkgExecutor;
|
|
172
|
-
}
|
|
173
146
|
export {};
|
package/src/executors.js
CHANGED
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
getLibConfig
|
|
6
6
|
} from "@akanjs/config";
|
|
7
7
|
import { exec, fork, spawn } from "child_process";
|
|
8
|
+
import dotenv from "dotenv";
|
|
8
9
|
import fs from "fs";
|
|
9
10
|
import fsPromise from "fs/promises";
|
|
10
11
|
import path from "path";
|
|
11
|
-
import dotenv from "dotenv";
|
|
12
12
|
import { TypeScriptDependencyScanner } from "./dependencyScanner";
|
|
13
13
|
class Executor {
|
|
14
14
|
logger;
|
|
@@ -242,7 +242,7 @@ class WorkspaceExecutor extends Executor {
|
|
|
242
242
|
const env = process.env.NEXT_PUBLIC_ENV ?? envFile.NEXT_PUBLIC_ENV ?? "debug";
|
|
243
243
|
if (!env)
|
|
244
244
|
throw new Error("NEXT_PUBLIC_ENV is not set");
|
|
245
|
-
return { ...appName ? { appName } : {}, repoName, serveDomain, env };
|
|
245
|
+
return { ...appName ? { name: appName } : {}, repoName, serveDomain, env };
|
|
246
246
|
}
|
|
247
247
|
async scan() {
|
|
248
248
|
const [appNames, libNames, pkgNames] = await Promise.all([this.getApps(), this.getLibs(), this.getPkgs()]);
|
|
@@ -299,10 +299,10 @@ class WorkspaceExecutor extends Executor {
|
|
|
299
299
|
}
|
|
300
300
|
async commit(message, { init = false, add = true } = {}) {
|
|
301
301
|
if (init)
|
|
302
|
-
await this.exec(`git init`);
|
|
302
|
+
await this.exec(`git init --quiet`);
|
|
303
303
|
if (add)
|
|
304
304
|
await this.exec(`git add .`);
|
|
305
|
-
await this.exec(`git commit -m "${message}"`);
|
|
305
|
+
await this.exec(`git commit --quiet -m "${message}"`);
|
|
306
306
|
}
|
|
307
307
|
async #getDirHasFile(basePath, targetFilename) {
|
|
308
308
|
const AVOID_DIRS = ["node_modules", "dist", "public", "./next"];
|
|
@@ -346,7 +346,7 @@ class SysExecutor extends Executor {
|
|
|
346
346
|
this.type = type;
|
|
347
347
|
}
|
|
348
348
|
async getConfig(command) {
|
|
349
|
-
return this.type === "app" ? await getAppConfig(this.cwdPath, { ...this.workspace.getBaseDevEnv(),
|
|
349
|
+
return this.type === "app" ? await getAppConfig(this.cwdPath, { ...this.workspace.getBaseDevEnv(), type: "app", name: this.name, command }) : await getLibConfig(this.cwdPath, { ...this.workspace.getBaseDevEnv(), type: "lib", name: this.name, command });
|
|
350
350
|
}
|
|
351
351
|
async scan({
|
|
352
352
|
tsconfig = this.getTsConfig(`${this.cwdPath}/tsconfig.json`),
|
|
@@ -462,6 +462,8 @@ class SysExecutor extends Executor {
|
|
|
462
462
|
const scanResult = {
|
|
463
463
|
name: this.name,
|
|
464
464
|
type: this.type,
|
|
465
|
+
repoName: this.workspace.repoName,
|
|
466
|
+
serveDomain: this.workspace.getBaseDevEnv().serveDomain,
|
|
465
467
|
akanConfig,
|
|
466
468
|
files,
|
|
467
469
|
libDeps,
|
|
@@ -535,8 +537,10 @@ class SysExecutor extends Executor {
|
|
|
535
537
|
}
|
|
536
538
|
}
|
|
537
539
|
class AppExecutor extends SysExecutor {
|
|
540
|
+
dist;
|
|
538
541
|
constructor({ workspace, name }) {
|
|
539
542
|
super({ workspace, name, type: "app" });
|
|
543
|
+
this.dist = new Executor(`${name} Dist App Executor`, `${this.workspace.workspaceRoot}/dist/apps/${name}`);
|
|
540
544
|
}
|
|
541
545
|
static from(executor, name) {
|
|
542
546
|
if (executor instanceof WorkspaceExecutor)
|
|
@@ -544,7 +548,12 @@ class AppExecutor extends SysExecutor {
|
|
|
544
548
|
return new AppExecutor({ workspace: executor.workspace, name });
|
|
545
549
|
}
|
|
546
550
|
async getConfig(command) {
|
|
547
|
-
return await getAppConfig(this.cwdPath, {
|
|
551
|
+
return await getAppConfig(this.cwdPath, {
|
|
552
|
+
...this.workspace.getBaseDevEnv(),
|
|
553
|
+
type: "app",
|
|
554
|
+
name: this.name,
|
|
555
|
+
command
|
|
556
|
+
});
|
|
548
557
|
}
|
|
549
558
|
async syncAssets(libDeps) {
|
|
550
559
|
const projectPublicLibPath = `${this.cwdPath}/public/libs`;
|
|
@@ -561,23 +570,13 @@ class AppExecutor extends SysExecutor {
|
|
|
561
570
|
);
|
|
562
571
|
}
|
|
563
572
|
}
|
|
564
|
-
class DistAppExecutor extends Executor {
|
|
565
|
-
name;
|
|
566
|
-
constructor({ workspace, name }) {
|
|
567
|
-
super(`${name} Dist App Executor`, `${workspace.workspaceRoot}/dist/apps/${name}`);
|
|
568
|
-
this.name = name;
|
|
569
|
-
}
|
|
570
|
-
static from(executor, name) {
|
|
571
|
-
if (executor instanceof WorkspaceExecutor)
|
|
572
|
-
return new DistAppExecutor({ workspace: executor, name });
|
|
573
|
-
return new DistAppExecutor({ workspace: executor.workspace, name });
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
573
|
class LibExecutor extends SysExecutor {
|
|
577
574
|
workspaceRoot;
|
|
578
575
|
repoName;
|
|
576
|
+
dist;
|
|
579
577
|
constructor({ workspace, name }) {
|
|
580
578
|
super({ workspace, name, type: "lib" });
|
|
579
|
+
this.dist = new Executor(`${name} Dist Lib Executor`, `${this.workspace.workspaceRoot}/dist/libs/${name}`);
|
|
581
580
|
}
|
|
582
581
|
static from(executor, name) {
|
|
583
582
|
if (executor instanceof WorkspaceExecutor)
|
|
@@ -585,28 +584,23 @@ class LibExecutor extends SysExecutor {
|
|
|
585
584
|
return new LibExecutor({ workspace: executor.workspace, name });
|
|
586
585
|
}
|
|
587
586
|
async getConfig(command) {
|
|
588
|
-
return await getLibConfig(this.cwdPath, {
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
super(`${name} Dist Lib Executor`, `${workspace.workspaceRoot}/dist/libs/${name}`);
|
|
595
|
-
this.name = name;
|
|
596
|
-
}
|
|
597
|
-
static from(executor, name) {
|
|
598
|
-
if (executor instanceof WorkspaceExecutor)
|
|
599
|
-
return new DistAppExecutor({ workspace: executor, name });
|
|
600
|
-
return new DistLibExecutor({ workspace: executor.workspace, name });
|
|
587
|
+
return await getLibConfig(this.cwdPath, {
|
|
588
|
+
...this.workspace.getBaseDevEnv(),
|
|
589
|
+
type: "lib",
|
|
590
|
+
name: this.name,
|
|
591
|
+
command
|
|
592
|
+
});
|
|
601
593
|
}
|
|
602
594
|
}
|
|
603
595
|
class PkgExecutor extends Executor {
|
|
604
596
|
workspace;
|
|
605
597
|
name;
|
|
598
|
+
dist;
|
|
606
599
|
constructor({ workspace = WorkspaceExecutor.fromRoot(), name }) {
|
|
607
600
|
super(`${name} Pkg Executor`, `${workspace.workspaceRoot}/pkgs/${name}`);
|
|
608
601
|
this.workspace = workspace;
|
|
609
602
|
this.name = name;
|
|
603
|
+
this.dist = new Executor(`${name} Dist Pkg Executor`, `${this.workspace.workspaceRoot}/dist/pkgs/${name}`);
|
|
610
604
|
}
|
|
611
605
|
static from(executor, name) {
|
|
612
606
|
if (executor instanceof WorkspaceExecutor)
|
|
@@ -636,29 +630,8 @@ class PkgExecutor extends Executor {
|
|
|
636
630
|
return pkgScanResult;
|
|
637
631
|
}
|
|
638
632
|
}
|
|
639
|
-
class DistPkgExecutor extends Executor {
|
|
640
|
-
workspaceRoot;
|
|
641
|
-
repoName;
|
|
642
|
-
name;
|
|
643
|
-
constructor({ workspaceRoot, repoName, name }) {
|
|
644
|
-
super(`${name} Dist Pkg Executor`, `${workspaceRoot}/dist/pkgs/${name}`);
|
|
645
|
-
this.workspaceRoot = workspaceRoot;
|
|
646
|
-
this.repoName = repoName;
|
|
647
|
-
this.name = name;
|
|
648
|
-
}
|
|
649
|
-
static from(workspaceExecutor, name) {
|
|
650
|
-
return new DistPkgExecutor({
|
|
651
|
-
workspaceRoot: workspaceExecutor.workspaceRoot,
|
|
652
|
-
repoName: workspaceExecutor.repoName,
|
|
653
|
-
name
|
|
654
|
-
});
|
|
655
|
-
}
|
|
656
|
-
}
|
|
657
633
|
export {
|
|
658
634
|
AppExecutor,
|
|
659
|
-
DistAppExecutor,
|
|
660
|
-
DistLibExecutor,
|
|
661
|
-
DistPkgExecutor,
|
|
662
635
|
Executor,
|
|
663
636
|
LibExecutor,
|
|
664
637
|
PkgExecutor,
|
package/src/index.cjs
CHANGED
|
@@ -29,7 +29,6 @@ __reExport(src_exports, require("./types"), module.exports);
|
|
|
29
29
|
__reExport(src_exports, require("./capacitorApp"), module.exports);
|
|
30
30
|
__reExport(src_exports, require("./extractDeps"), module.exports);
|
|
31
31
|
__reExport(src_exports, require("./commandDecorators"), module.exports);
|
|
32
|
-
__reExport(src_exports, require("./installExternalLib"), module.exports);
|
|
33
32
|
__reExport(src_exports, require("./aiEditor"), module.exports);
|
|
34
33
|
// Annotate the CommonJS export names for ESM import in node:
|
|
35
34
|
0 && (module.exports = {
|
|
@@ -48,6 +47,5 @@ __reExport(src_exports, require("./aiEditor"), module.exports);
|
|
|
48
47
|
...require("./capacitorApp"),
|
|
49
48
|
...require("./extractDeps"),
|
|
50
49
|
...require("./commandDecorators"),
|
|
51
|
-
...require("./installExternalLib"),
|
|
52
50
|
...require("./aiEditor")
|
|
53
51
|
});
|
package/src/index.d.ts
CHANGED
package/src/index.js
CHANGED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var installExternalLib_exports = {};
|
|
19
|
-
__export(installExternalLib_exports, {
|
|
20
|
-
installExternalLib: () => installExternalLib
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(installExternalLib_exports);
|
|
23
|
-
const utilGitRepo = "git@github.com:akan-team/util.git";
|
|
24
|
-
const sharedGitRepo = "git@github.com:akan-team/shared.git";
|
|
25
|
-
const installExternalLib = async (libName, workspace) => {
|
|
26
|
-
workspace.log(`Installing ${libName} library as git subtree...`);
|
|
27
|
-
await workspace.exec(`git remote add ${libName} git@github.com:akan-team/${libName}.git`);
|
|
28
|
-
await workspace.exec(`git subtree add --prefix=libs/${libName} ${libName} main`);
|
|
29
|
-
};
|
|
30
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
31
|
-
0 && (module.exports = {
|
|
32
|
-
installExternalLib
|
|
33
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const utilGitRepo = "git@github.com:akan-team/util.git";
|
|
2
|
-
const sharedGitRepo = "git@github.com:akan-team/shared.git";
|
|
3
|
-
const installExternalLib = async (libName, workspace) => {
|
|
4
|
-
workspace.log(`Installing ${libName} library as git subtree...`);
|
|
5
|
-
await workspace.exec(`git remote add ${libName} git@github.com:akan-team/${libName}.git`);
|
|
6
|
-
await workspace.exec(`git subtree add --prefix=libs/${libName} ${libName} main`);
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
installExternalLib
|
|
10
|
-
};
|