@akanjs/cli 0.0.47 → 0.0.48
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/index.js +52 -71
- package/package.json +1 -1
- package/pkgs/@akanjs/common/Logger.d.ts +28 -0
- package/pkgs/@akanjs/common/applyMixins.d.ts +3 -0
- package/pkgs/@akanjs/common/capitalize.d.ts +1 -0
- package/pkgs/@akanjs/common/deepObjectify.d.ts +4 -0
- package/pkgs/@akanjs/common/index.d.ts +18 -0
- package/pkgs/@akanjs/common/isDayjs.d.ts +2 -0
- package/pkgs/@akanjs/common/isQueryEqual.d.ts +1 -0
- package/pkgs/@akanjs/common/isValidDate.d.ts +2 -0
- package/pkgs/@akanjs/common/lowerlize.d.ts +1 -0
- package/pkgs/@akanjs/common/mergeVersion.d.ts +10 -0
- package/pkgs/@akanjs/common/objectify.d.ts +1 -0
- package/pkgs/@akanjs/common/pathGet.d.ts +1 -0
- package/pkgs/@akanjs/common/pathSet.d.ts +1 -0
- package/pkgs/@akanjs/common/pluralize.d.ts +2 -0
- package/pkgs/@akanjs/common/randomPick.d.ts +1 -0
- package/pkgs/@akanjs/common/randomPicks.d.ts +1 -0
- package/pkgs/@akanjs/common/sleep.d.ts +1 -0
- package/pkgs/@akanjs/common/splitVersion.d.ts +11 -0
- package/pkgs/@akanjs/common/types.d.ts +15 -0
- package/pkgs/@akanjs/config/index.d.ts +132 -0
- package/pkgs/@akanjs/config/src/akanConfig.d.ts +7 -0
- package/pkgs/@akanjs/config/src/baseConfigEnv.d.ts +8 -0
- package/pkgs/@akanjs/config/src/nextConfig.d.ts +17 -0
- package/pkgs/@akanjs/devkit/index.d.ts +1 -0
- package/pkgs/@akanjs/devkit/src/auth.d.ts +9 -0
- package/pkgs/@akanjs/devkit/src/baseDevEnv.d.ts +10 -0
- package/pkgs/@akanjs/devkit/src/capacitorApp.d.ts +21 -0
- package/pkgs/@akanjs/devkit/src/commandDecorators/argMeta.d.ts +55 -0
- package/pkgs/@akanjs/devkit/src/commandDecorators/command.d.ts +2 -0
- package/pkgs/@akanjs/devkit/src/commandDecorators/commandMeta.d.ts +2 -0
- package/pkgs/@akanjs/devkit/src/commandDecorators/index.d.ts +5 -0
- package/pkgs/@akanjs/devkit/src/commandDecorators/targetMeta.d.ts +18 -0
- package/pkgs/@akanjs/devkit/src/commandDecorators/types.d.ts +1 -0
- package/pkgs/@akanjs/devkit/src/constants.d.ts +19 -0
- package/pkgs/@akanjs/devkit/src/createTunnel.d.ts +7 -0
- package/pkgs/@akanjs/devkit/src/dependencyScanner.d.ts +9 -0
- package/pkgs/@akanjs/devkit/src/executors.d.ts +136 -0
- package/pkgs/@akanjs/devkit/src/extractDeps.d.ts +6 -0
- package/pkgs/@akanjs/devkit/src/getCredentials.d.ts +12 -0
- package/pkgs/@akanjs/devkit/src/getDependencies.d.ts +4 -0
- package/pkgs/@akanjs/devkit/src/getModelFileData.d.ts +16 -0
- package/pkgs/@akanjs/devkit/src/getRelatedCnsts.d.ts +9 -0
- package/pkgs/@akanjs/devkit/src/index.d.ts +18 -0
- package/pkgs/@akanjs/devkit/src/installExternalLib.d.ts +2 -0
- package/pkgs/@akanjs/devkit/src/selectModel.d.ts +1 -0
- package/pkgs/@akanjs/devkit/src/streamAi.d.ts +6 -0
- package/pkgs/@akanjs/devkit/src/types.d.ts +18 -0
- package/pkgs/@akanjs/devkit/src/uploadRelease.d.ts +9 -0
- package/src/templates/libRoot/tsconfig.json.template +3 -1
- package/src/templates/pkgRoot/tsconfig.json.template +8 -5
- package/src/templates/workplaceRoot/tsconfig.json.template +1 -1
- /package/{index.d.ts → pkgs/@akanjs/cli/index.d.ts} +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/application/application.command.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/application/application.prompt.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/application/application.runner.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/application/application.script.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/cloud/cloud.command.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/cloud/cloud.runner.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/cloud/cloud.script.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/library/library.command.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/library/library.runner.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/library/library.script.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/module/module.command.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/module/module.prompt.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/module/module.runner.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/module/module.script.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/package/package.command.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/package/package.runner.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/package/package.script.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/package/page/page.command.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/package/page/page.runner.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/package/page/page.script.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/workspace/workspace.command.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/workspace/workspace.runner.d.ts +0 -0
- /package/{src → pkgs/@akanjs/cli/src}/workspace/workspace.script.d.ts +0 -0
package/index.js
CHANGED
|
@@ -375,46 +375,46 @@
|
|
|
375
375
|
}
|
|
376
376
|
});
|
|
377
377
|
|
|
378
|
-
// pkgs/@akanjs/common/
|
|
378
|
+
// pkgs/@akanjs/common/splitVersion.ts
|
|
379
379
|
var init_splitVersion = __esm({
|
|
380
|
-
"pkgs/@akanjs/common/
|
|
380
|
+
"pkgs/@akanjs/common/splitVersion.ts"() {
|
|
381
381
|
}
|
|
382
382
|
});
|
|
383
383
|
|
|
384
|
-
// pkgs/@akanjs/common/
|
|
384
|
+
// pkgs/@akanjs/common/isDayjs.ts
|
|
385
385
|
var import_dayjs;
|
|
386
386
|
var init_isDayjs = __esm({
|
|
387
|
-
"pkgs/@akanjs/common/
|
|
387
|
+
"pkgs/@akanjs/common/isDayjs.ts"() {
|
|
388
388
|
import_dayjs = __require("dayjs");
|
|
389
389
|
}
|
|
390
390
|
});
|
|
391
391
|
|
|
392
|
-
// pkgs/@akanjs/common/
|
|
392
|
+
// pkgs/@akanjs/common/deepObjectify.ts
|
|
393
393
|
var init_deepObjectify = __esm({
|
|
394
|
-
"pkgs/@akanjs/common/
|
|
394
|
+
"pkgs/@akanjs/common/deepObjectify.ts"() {
|
|
395
395
|
init_isDayjs();
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
398
|
|
|
399
|
-
// pkgs/@akanjs/common/
|
|
399
|
+
// pkgs/@akanjs/common/pathGet.ts
|
|
400
400
|
var init_pathGet = __esm({
|
|
401
|
-
"pkgs/@akanjs/common/
|
|
401
|
+
"pkgs/@akanjs/common/pathGet.ts"() {
|
|
402
402
|
}
|
|
403
403
|
});
|
|
404
404
|
|
|
405
|
-
// pkgs/@akanjs/common/
|
|
405
|
+
// pkgs/@akanjs/common/isQueryEqual.ts
|
|
406
406
|
var import_dayjs2;
|
|
407
407
|
var init_isQueryEqual = __esm({
|
|
408
|
-
"pkgs/@akanjs/common/
|
|
408
|
+
"pkgs/@akanjs/common/isQueryEqual.ts"() {
|
|
409
409
|
import_dayjs2 = __toESM(__require("dayjs"));
|
|
410
410
|
init_isDayjs();
|
|
411
411
|
}
|
|
412
412
|
});
|
|
413
413
|
|
|
414
|
-
// pkgs/@akanjs/common/
|
|
414
|
+
// pkgs/@akanjs/common/isValidDate.ts
|
|
415
415
|
var import_dayjs3, import_customParseFormat;
|
|
416
416
|
var init_isValidDate = __esm({
|
|
417
|
-
"pkgs/@akanjs/common/
|
|
417
|
+
"pkgs/@akanjs/common/isValidDate.ts"() {
|
|
418
418
|
import_dayjs3 = __toESM(__require("dayjs"));
|
|
419
419
|
import_customParseFormat = __toESM(__require("dayjs/plugin/customParseFormat"));
|
|
420
420
|
init_isDayjs();
|
|
@@ -422,22 +422,22 @@
|
|
|
422
422
|
}
|
|
423
423
|
});
|
|
424
424
|
|
|
425
|
-
// pkgs/@akanjs/common/
|
|
425
|
+
// pkgs/@akanjs/common/objectify.ts
|
|
426
426
|
var init_objectify = __esm({
|
|
427
|
-
"pkgs/@akanjs/common/
|
|
427
|
+
"pkgs/@akanjs/common/objectify.ts"() {
|
|
428
428
|
}
|
|
429
429
|
});
|
|
430
430
|
|
|
431
|
-
// pkgs/@akanjs/common/
|
|
431
|
+
// pkgs/@akanjs/common/randomPick.ts
|
|
432
432
|
var init_randomPick = __esm({
|
|
433
|
-
"pkgs/@akanjs/common/
|
|
433
|
+
"pkgs/@akanjs/common/randomPick.ts"() {
|
|
434
434
|
}
|
|
435
435
|
});
|
|
436
436
|
|
|
437
|
-
// pkgs/@akanjs/common/
|
|
437
|
+
// pkgs/@akanjs/common/randomPicks.ts
|
|
438
438
|
var randomPicks;
|
|
439
439
|
var init_randomPicks = __esm({
|
|
440
|
-
"pkgs/@akanjs/common/
|
|
440
|
+
"pkgs/@akanjs/common/randomPicks.ts"() {
|
|
441
441
|
randomPicks = (arr, count = 1, allowDuplicate = false) => {
|
|
442
442
|
if (!allowDuplicate && arr.length <= count)
|
|
443
443
|
return arr;
|
|
@@ -454,46 +454,46 @@
|
|
|
454
454
|
}
|
|
455
455
|
});
|
|
456
456
|
|
|
457
|
-
// pkgs/@akanjs/common/
|
|
457
|
+
// pkgs/@akanjs/common/pathSet.ts
|
|
458
458
|
var init_pathSet = __esm({
|
|
459
|
-
"pkgs/@akanjs/common/
|
|
459
|
+
"pkgs/@akanjs/common/pathSet.ts"() {
|
|
460
460
|
}
|
|
461
461
|
});
|
|
462
462
|
|
|
463
|
-
// pkgs/@akanjs/common/
|
|
463
|
+
// pkgs/@akanjs/common/mergeVersion.ts
|
|
464
464
|
var init_mergeVersion = __esm({
|
|
465
|
-
"pkgs/@akanjs/common/
|
|
465
|
+
"pkgs/@akanjs/common/mergeVersion.ts"() {
|
|
466
466
|
}
|
|
467
467
|
});
|
|
468
468
|
|
|
469
|
-
// pkgs/@akanjs/common/
|
|
469
|
+
// pkgs/@akanjs/common/pluralize.ts
|
|
470
470
|
var import_pluralize;
|
|
471
471
|
var init_pluralize = __esm({
|
|
472
|
-
"pkgs/@akanjs/common/
|
|
472
|
+
"pkgs/@akanjs/common/pluralize.ts"() {
|
|
473
473
|
import_pluralize = __toESM(__require("pluralize"));
|
|
474
474
|
}
|
|
475
475
|
});
|
|
476
476
|
|
|
477
|
-
// pkgs/@akanjs/common/
|
|
477
|
+
// pkgs/@akanjs/common/applyMixins.ts
|
|
478
478
|
var init_applyMixins = __esm({
|
|
479
|
-
"pkgs/@akanjs/common/
|
|
479
|
+
"pkgs/@akanjs/common/applyMixins.ts"() {
|
|
480
480
|
}
|
|
481
481
|
});
|
|
482
482
|
|
|
483
|
-
// pkgs/@akanjs/common/
|
|
483
|
+
// pkgs/@akanjs/common/capitalize.ts
|
|
484
484
|
var capitalize;
|
|
485
485
|
var init_capitalize = __esm({
|
|
486
|
-
"pkgs/@akanjs/common/
|
|
486
|
+
"pkgs/@akanjs/common/capitalize.ts"() {
|
|
487
487
|
capitalize = (str) => {
|
|
488
488
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
491
|
});
|
|
492
492
|
|
|
493
|
-
// pkgs/@akanjs/common/
|
|
493
|
+
// pkgs/@akanjs/common/Logger.ts
|
|
494
494
|
var import_dayjs4, logLevels, clc, colorizeMap, Logger;
|
|
495
495
|
var init_Logger = __esm({
|
|
496
|
-
"pkgs/@akanjs/common/
|
|
496
|
+
"pkgs/@akanjs/common/Logger.ts"() {
|
|
497
497
|
import_dayjs4 = __toESM(__require("dayjs"));
|
|
498
498
|
logLevels = ["trace", "verbose", "debug", "log", "info", "warn", "error"];
|
|
499
499
|
clc = {
|
|
@@ -635,16 +635,16 @@
|
|
|
635
635
|
}
|
|
636
636
|
});
|
|
637
637
|
|
|
638
|
-
// pkgs/@akanjs/common/
|
|
638
|
+
// pkgs/@akanjs/common/lowerlize.ts
|
|
639
639
|
var init_lowerlize = __esm({
|
|
640
|
-
"pkgs/@akanjs/common/
|
|
640
|
+
"pkgs/@akanjs/common/lowerlize.ts"() {
|
|
641
641
|
}
|
|
642
642
|
});
|
|
643
643
|
|
|
644
|
-
// pkgs/@akanjs/common/
|
|
644
|
+
// pkgs/@akanjs/common/sleep.ts
|
|
645
645
|
var sleep;
|
|
646
646
|
var init_sleep = __esm({
|
|
647
|
-
"pkgs/@akanjs/common/
|
|
647
|
+
"pkgs/@akanjs/common/sleep.ts"() {
|
|
648
648
|
sleep = async (ms) => {
|
|
649
649
|
return new Promise((resolve) => {
|
|
650
650
|
setTimeout(() => {
|
|
@@ -655,9 +655,9 @@
|
|
|
655
655
|
}
|
|
656
656
|
});
|
|
657
657
|
|
|
658
|
-
// pkgs/@akanjs/common/
|
|
659
|
-
var
|
|
660
|
-
"pkgs/@akanjs/common/
|
|
658
|
+
// pkgs/@akanjs/common/index.ts
|
|
659
|
+
var init_common = __esm({
|
|
660
|
+
"pkgs/@akanjs/common/index.ts"() {
|
|
661
661
|
init_splitVersion();
|
|
662
662
|
init_deepObjectify();
|
|
663
663
|
init_pathGet();
|
|
@@ -744,25 +744,7 @@
|
|
|
744
744
|
...config.env,
|
|
745
745
|
basePaths: routes.map(({ basePath: basePath2 }) => basePath2).join(",")
|
|
746
746
|
},
|
|
747
|
-
transpilePackages: [
|
|
748
|
-
"swiper",
|
|
749
|
-
"ssr-window",
|
|
750
|
-
"dom7",
|
|
751
|
-
...libs.map((lib) => `@${lib}`),
|
|
752
|
-
"@akanjs/base",
|
|
753
|
-
"@akanjs/common",
|
|
754
|
-
"@akanjs/next",
|
|
755
|
-
"@akanjs/ui",
|
|
756
|
-
"@akanjs/client",
|
|
757
|
-
"@akanjs/server",
|
|
758
|
-
"@akanjs/service",
|
|
759
|
-
"@akanjs/signal",
|
|
760
|
-
"@akanjs/store",
|
|
761
|
-
"@akanjs/dictionary",
|
|
762
|
-
"@akanjs/constant",
|
|
763
|
-
"@akanjs/config",
|
|
764
|
-
"@akanjs/document"
|
|
765
|
-
],
|
|
747
|
+
transpilePackages: ["swiper", "ssr-window", "dom7"],
|
|
766
748
|
reactStrictMode: commandType === "serve" ? false : true,
|
|
767
749
|
experimental: {
|
|
768
750
|
...config.experimental ?? {},
|
|
@@ -1150,7 +1132,7 @@ CMD ["npm", "start"]`,
|
|
|
1150
1132
|
var import_child_process, import_fs7, import_promises, import_path3, Executor, WorkspaceExecutor, SysExecutor, AppExecutor, DistAppExecutor, LibExecutor, PkgExecutor, DistPkgExecutor;
|
|
1151
1133
|
var init_executors = __esm({
|
|
1152
1134
|
"pkgs/@akanjs/devkit/src/executors.ts"() {
|
|
1153
|
-
|
|
1135
|
+
init_common();
|
|
1154
1136
|
init_config();
|
|
1155
1137
|
import_child_process = __require("child_process");
|
|
1156
1138
|
import_fs7 = __toESM(__require("fs"));
|
|
@@ -1753,7 +1735,7 @@ CMD ["npm", "start"]`,
|
|
|
1753
1735
|
var import_project, import_fs9, CapacitorApp;
|
|
1754
1736
|
var init_capacitorApp = __esm({
|
|
1755
1737
|
"pkgs/@akanjs/devkit/src/capacitorApp.ts"() {
|
|
1756
|
-
|
|
1738
|
+
init_common();
|
|
1757
1739
|
import_project = __require("@trapezedev/project");
|
|
1758
1740
|
import_fs9 = __toESM(__require("fs"));
|
|
1759
1741
|
CapacitorApp = class {
|
|
@@ -2057,12 +2039,11 @@ CMD ["npm", "start"]`,
|
|
|
2057
2039
|
});
|
|
2058
2040
|
|
|
2059
2041
|
// pkgs/@akanjs/devkit/src/commandDecorators/command.ts
|
|
2060
|
-
var import_prompts3, import_commander,
|
|
2042
|
+
var import_prompts3, import_commander, camelToKebabCase, handleOption, convertOptionValue, getOptionValue, getArgumentValue, runCommands;
|
|
2061
2043
|
var init_command = __esm({
|
|
2062
2044
|
"pkgs/@akanjs/devkit/src/commandDecorators/command.ts"() {
|
|
2063
2045
|
import_prompts3 = __require("@inquirer/prompts");
|
|
2064
2046
|
import_commander = __require("commander");
|
|
2065
|
-
import_dotenv = __toESM(__require("dotenv"));
|
|
2066
2047
|
init_executors();
|
|
2067
2048
|
init_argMeta();
|
|
2068
2049
|
init_targetMeta();
|
|
@@ -2155,7 +2136,6 @@ CMD ["npm", "start"]`,
|
|
|
2155
2136
|
throw new Error(`Invalid system type: ${argMeta.type}`);
|
|
2156
2137
|
};
|
|
2157
2138
|
runCommands = async (...commands) => {
|
|
2158
|
-
import_dotenv.default.config();
|
|
2159
2139
|
import_commander.program.version("0.0.1").description("An example CLI for managing a directory");
|
|
2160
2140
|
for (const command of commands) {
|
|
2161
2141
|
const targetMetas = getTargetMetas(command);
|
|
@@ -2227,7 +2207,7 @@ CMD ["npm", "start"]`,
|
|
|
2227
2207
|
});
|
|
2228
2208
|
|
|
2229
2209
|
// pkgs/@akanjs/devkit/src/index.ts
|
|
2230
|
-
var
|
|
2210
|
+
var init_src = __esm({
|
|
2231
2211
|
"pkgs/@akanjs/devkit/src/index.ts"() {
|
|
2232
2212
|
init_baseDevEnv();
|
|
2233
2213
|
init_createTunnel();
|
|
@@ -2253,7 +2233,7 @@ CMD ["npm", "start"]`,
|
|
|
2253
2233
|
// pkgs/@akanjs/devkit/index.ts
|
|
2254
2234
|
var init_devkit = __esm({
|
|
2255
2235
|
"pkgs/@akanjs/devkit/index.ts"() {
|
|
2256
|
-
|
|
2236
|
+
init_src();
|
|
2257
2237
|
}
|
|
2258
2238
|
});
|
|
2259
2239
|
|
|
@@ -3402,10 +3382,10 @@ page.tsx_end
|
|
|
3402
3382
|
});
|
|
3403
3383
|
|
|
3404
3384
|
// pkgs/@akanjs/cli/src/application/application.runner.ts
|
|
3405
|
-
var import_prompts4, import_output_parsers, import_prompts5, import_runnables2, import_openai2, import_plugin_react,
|
|
3385
|
+
var import_prompts4, import_output_parsers, import_prompts5, import_runnables2, import_openai2, import_plugin_react, import_dotenv, esbuild, import_fs10, import_promises2, import_js_yaml2, import_ora2, import_path4, vite, import_vite_plugin_node_polyfills, import_vite_tsconfig_paths, ApplicationRunner;
|
|
3406
3386
|
var init_application_runner = __esm({
|
|
3407
3387
|
"pkgs/@akanjs/cli/src/application/application.runner.ts"() {
|
|
3408
|
-
|
|
3388
|
+
init_common();
|
|
3409
3389
|
init_config();
|
|
3410
3390
|
init_devkit();
|
|
3411
3391
|
import_prompts4 = __require("@inquirer/prompts");
|
|
@@ -3414,7 +3394,7 @@ page.tsx_end
|
|
|
3414
3394
|
import_runnables2 = __require("@langchain/core/runnables");
|
|
3415
3395
|
import_openai2 = __require("@langchain/openai");
|
|
3416
3396
|
import_plugin_react = __toESM(__require("@vitejs/plugin-react"));
|
|
3417
|
-
|
|
3397
|
+
import_dotenv = __toESM(__require("dotenv"));
|
|
3418
3398
|
esbuild = __toESM(__require("esbuild"));
|
|
3419
3399
|
import_fs10 = __toESM(__require("fs"));
|
|
3420
3400
|
import_promises2 = __toESM(__require("fs/promises"));
|
|
@@ -3434,7 +3414,7 @@ page.tsx_end
|
|
|
3434
3414
|
}
|
|
3435
3415
|
async #prepareCommand(app, distApp, type, target) {
|
|
3436
3416
|
await distApp.exec(`rm -rf ${target}`);
|
|
3437
|
-
const env =
|
|
3417
|
+
const env = import_dotenv.default.parse(app.workspace.readFile(".env"));
|
|
3438
3418
|
if (target === "frontend")
|
|
3439
3419
|
app.writeFile("next.config.ts", defaultNextConfigFile);
|
|
3440
3420
|
return {
|
|
@@ -4225,7 +4205,7 @@ page.tsx_end
|
|
|
4225
4205
|
} else {
|
|
4226
4206
|
buildResult = await esbuild2.build({
|
|
4227
4207
|
write: false,
|
|
4228
|
-
entryPoints: [`${pkg.cwdPath}
|
|
4208
|
+
entryPoints: [`${pkg.cwdPath}/**/*.ts`, `${pkg.cwdPath}/**/*.tsx`],
|
|
4229
4209
|
bundle: false,
|
|
4230
4210
|
packages: "external",
|
|
4231
4211
|
format: "cjs",
|
|
@@ -4272,7 +4252,7 @@ page.tsx_end
|
|
|
4272
4252
|
var import_prompts6, import_chalk, import_latest_version, import_open, QRcode, import_uuid, CloudRunner;
|
|
4273
4253
|
var init_cloud_runner = __esm({
|
|
4274
4254
|
"pkgs/@akanjs/cli/src/cloud/cloud.runner.ts"() {
|
|
4275
|
-
|
|
4255
|
+
init_common();
|
|
4276
4256
|
init_devkit();
|
|
4277
4257
|
import_prompts6 = __require("@inquirer/prompts");
|
|
4278
4258
|
import_chalk = __toESM(__require("chalk"));
|
|
@@ -4652,7 +4632,7 @@ ${names.Model}.Unit.Card\uC758 \uB9AC\uC561\uD2B8 \uCEF4\uD3EC\uB10C\uD2B8\uB97C
|
|
|
4652
4632
|
var import_prompts8, ModuleScript;
|
|
4653
4633
|
var init_module_script = __esm({
|
|
4654
4634
|
"pkgs/@akanjs/cli/src/module/module.script.ts"() {
|
|
4655
|
-
|
|
4635
|
+
init_common();
|
|
4656
4636
|
init_devkit();
|
|
4657
4637
|
import_prompts8 = __require("@inquirer/prompts");
|
|
4658
4638
|
init_module_prompt();
|
|
@@ -4947,7 +4927,7 @@ ${names.Model}.Unit.Card\uC758 \uB9AC\uC561\uD2B8 \uCEF4\uD3EC\uB10C\uD2B8\uB97C
|
|
|
4947
4927
|
var import_latest_version2, import_path5, WorkspaceScript;
|
|
4948
4928
|
var init_workspace_script = __esm({
|
|
4949
4929
|
"pkgs/@akanjs/cli/src/workspace/workspace.script.ts"() {
|
|
4950
|
-
|
|
4930
|
+
init_common();
|
|
4951
4931
|
init_devkit();
|
|
4952
4932
|
import_latest_version2 = __toESM(__require("latest-version"));
|
|
4953
4933
|
import_path5 = __toESM(__require("path"));
|
|
@@ -5062,6 +5042,7 @@ ${names.Model}.Unit.Card\uC758 \uB9AC\uC561\uD2B8 \uCEF4\uD3EC\uB10C\uD2B8\uB97C
|
|
|
5062
5042
|
init_package_command();
|
|
5063
5043
|
init_page_command();
|
|
5064
5044
|
init_workspace_command();
|
|
5045
|
+
__require("dotenv").config();
|
|
5065
5046
|
void runCommands(
|
|
5066
5047
|
WorkspaceCommand,
|
|
5067
5048
|
ApplicationCommand,
|
package/package.json
CHANGED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
declare const logLevels: readonly ["trace", "verbose", "debug", "log", "info", "warn", "error"];
|
|
2
|
+
type LogLevel = (typeof logLevels)[number];
|
|
3
|
+
export declare class Logger {
|
|
4
|
+
#private;
|
|
5
|
+
static level: LogLevel;
|
|
6
|
+
static setLevel(level: LogLevel): void;
|
|
7
|
+
name?: string;
|
|
8
|
+
constructor(name?: string);
|
|
9
|
+
trace(msg: string, context?: string): void;
|
|
10
|
+
verbose(msg: string, context?: string): void;
|
|
11
|
+
debug(msg: string, context?: string): void;
|
|
12
|
+
log(msg: string, context?: string): void;
|
|
13
|
+
info(msg: string, context?: string): void;
|
|
14
|
+
warn(msg: string, context?: string): void;
|
|
15
|
+
error(msg: string, context?: string): void;
|
|
16
|
+
raw(msg: string, method?: "console" | "process"): void;
|
|
17
|
+
rawLog(msg: string, method?: "console" | "process"): void;
|
|
18
|
+
static trace(msg: string, context?: string): void;
|
|
19
|
+
static verbose(msg: string, context?: string): void;
|
|
20
|
+
static debug(msg: string, context?: string): void;
|
|
21
|
+
static log(msg: string, context?: string): void;
|
|
22
|
+
static info(msg: string, context?: string): void;
|
|
23
|
+
static warn(msg: string, context?: string): void;
|
|
24
|
+
static error(msg: string, context?: string): void;
|
|
25
|
+
static rawLog(msg: string, method?: "console" | "process"): void;
|
|
26
|
+
static raw(msg: string, method?: "console" | "process"): void;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const capitalize: (str: string) => string;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type * from "./types";
|
|
2
|
+
export { splitVersion } from "./splitVersion";
|
|
3
|
+
export { deepObjectify } from "./deepObjectify";
|
|
4
|
+
export { pathGet } from "./pathGet";
|
|
5
|
+
export { isQueryEqual } from "./isQueryEqual";
|
|
6
|
+
export { isValidDate } from "./isValidDate";
|
|
7
|
+
export { objectify } from "./objectify";
|
|
8
|
+
export { randomPick } from "./randomPick";
|
|
9
|
+
export { randomPicks } from "./randomPicks";
|
|
10
|
+
export { pathSet } from "./pathSet";
|
|
11
|
+
export { isDayjs } from "./isDayjs";
|
|
12
|
+
export { mergeVersion } from "./mergeVersion";
|
|
13
|
+
export { pluralize } from "./pluralize";
|
|
14
|
+
export { applyMixins } from "./applyMixins";
|
|
15
|
+
export { capitalize } from "./capitalize";
|
|
16
|
+
export { Logger } from "./Logger";
|
|
17
|
+
export { lowerlize } from "./lowerlize";
|
|
18
|
+
export { sleep } from "./sleep";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isQueryEqual: (value1: object | null, value2: object | null) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const lowerlize: (str: string) => string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* semantic version 규격에 맞게 조합하는 함수
|
|
4
|
+
* https://semver.org/
|
|
5
|
+
* @param major 릴리즈(플랫폼(google,apple,etc...)에 올라가 있는) 버전
|
|
6
|
+
* @param minor 릴리즈(플랫폼(google,apple,etc...)에 올라가 있는) 버전
|
|
7
|
+
* @param patch 코드푸시 (Framework 자체 버전)
|
|
8
|
+
* @returns `major.minor.patch` 형식으로 조합된 버전
|
|
9
|
+
*/
|
|
10
|
+
export declare const mergeVersion: (major: number, minor: number, patch: number) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const objectify: (obj: any, keys?: string[]) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pathGet: (path: string | (string | number)[], obj: any, separator?: string) => unknown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pathSet: (obj: any, path: any, value: any) => any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const randomPick: <T = any>(arr: T[] | readonly T[]) => T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const randomPicks: <T>(arr: T[] | readonly T[], count?: number, allowDuplicate?: boolean) => T[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sleep: (ms: number) => Promise<unknown>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* semantic version 규격에 맞게 major, minor, patch로 나누는 함수
|
|
4
|
+
* https://semver.org/
|
|
5
|
+
* @params version `major.minor.patch` 형식으로 조합된 버전
|
|
6
|
+
*/
|
|
7
|
+
export declare const splitVersion: (version: string) => {
|
|
8
|
+
major: string;
|
|
9
|
+
minor: string;
|
|
10
|
+
patch: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RequestPolicy } from "@urql/core";
|
|
2
|
+
export interface FetchPolicy<Returns = any> {
|
|
3
|
+
cache?: boolean | number | RequestPolicy;
|
|
4
|
+
crystalize?: boolean;
|
|
5
|
+
url?: string;
|
|
6
|
+
onError?: (error: string) => void;
|
|
7
|
+
token?: string;
|
|
8
|
+
partial?: string[];
|
|
9
|
+
transport?: "udp" | "websocket" | "graphql" | "restapi";
|
|
10
|
+
}
|
|
11
|
+
export type SnakeCase<S extends string> = S extends `${infer T}_${infer U}` ? `${Lowercase<T>}_${SnakeCase<U>}` : S;
|
|
12
|
+
export type SnakeCaseObj<T> = {
|
|
13
|
+
[K in keyof T as SnakeCase<K & string>]: T[K] extends object ? SnakeCaseObj<T[K]> : T[K];
|
|
14
|
+
};
|
|
15
|
+
export type SnakeMsg<Msg> = SnakeCaseObj<Msg>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { NextConfig } from "next";
|
|
2
|
+
export * from "./src/akanConfig";
|
|
3
|
+
export * from "./src/nextConfig";
|
|
4
|
+
export interface RunnerProps {
|
|
5
|
+
appName: string;
|
|
6
|
+
repoName: string;
|
|
7
|
+
serveDomain: string;
|
|
8
|
+
env: "testing" | "debug" | "develop" | "main";
|
|
9
|
+
command?: string;
|
|
10
|
+
}
|
|
11
|
+
export type Arch = "amd64" | "arm64";
|
|
12
|
+
export type ExplicitDependencies = string[] | {
|
|
13
|
+
[key in Arch]: string[];
|
|
14
|
+
};
|
|
15
|
+
export interface AppConfigResult {
|
|
16
|
+
rootLib?: string;
|
|
17
|
+
libs: string[];
|
|
18
|
+
backend: {
|
|
19
|
+
dockerfile: string;
|
|
20
|
+
explicitDependencies: ExplicitDependencies;
|
|
21
|
+
};
|
|
22
|
+
frontend: {
|
|
23
|
+
dockerfile: string;
|
|
24
|
+
nextConfig: NextConfig | (() => Promise<NextConfig> | NextConfig);
|
|
25
|
+
routes?: {
|
|
26
|
+
basePath?: string;
|
|
27
|
+
domains: {
|
|
28
|
+
main?: string[];
|
|
29
|
+
develop?: string[];
|
|
30
|
+
debug?: string[];
|
|
31
|
+
};
|
|
32
|
+
}[];
|
|
33
|
+
explicitDependencies: ExplicitDependencies;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface LibConfigResult {
|
|
37
|
+
rootLib?: string;
|
|
38
|
+
libs: string[];
|
|
39
|
+
backend: {
|
|
40
|
+
explicitDependencies: ExplicitDependencies;
|
|
41
|
+
};
|
|
42
|
+
frontend: {
|
|
43
|
+
explicitDependencies: ExplicitDependencies;
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export type DeepPartial<T> = {
|
|
47
|
+
[P in keyof T]?: T[P] extends any[] ? T[P] : T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
48
|
+
};
|
|
49
|
+
export type AppConfig = DeepPartial<AppConfigResult> | ((props: RunnerProps) => DeepPartial<AppConfigResult>);
|
|
50
|
+
export type LibConfig = DeepPartial<LibConfigResult> | ((props: RunnerProps) => DeepPartial<LibConfigResult>);
|
|
51
|
+
export interface AkanConfigFile {
|
|
52
|
+
default: NextConfig;
|
|
53
|
+
}
|
|
54
|
+
export interface FileConventionScanResult {
|
|
55
|
+
constants: {
|
|
56
|
+
databases: string[];
|
|
57
|
+
scalars: string[];
|
|
58
|
+
};
|
|
59
|
+
dictionary: {
|
|
60
|
+
databases: string[];
|
|
61
|
+
services: string[];
|
|
62
|
+
scalars: string[];
|
|
63
|
+
};
|
|
64
|
+
documents: {
|
|
65
|
+
databases: string[];
|
|
66
|
+
scalars: string[];
|
|
67
|
+
};
|
|
68
|
+
services: {
|
|
69
|
+
databases: string[];
|
|
70
|
+
services: string[];
|
|
71
|
+
scalars: string[];
|
|
72
|
+
};
|
|
73
|
+
signal: {
|
|
74
|
+
databases: string[];
|
|
75
|
+
services: string[];
|
|
76
|
+
scalars: string[];
|
|
77
|
+
};
|
|
78
|
+
store: {
|
|
79
|
+
databases: string[];
|
|
80
|
+
services: string[];
|
|
81
|
+
scalars: string[];
|
|
82
|
+
};
|
|
83
|
+
components: {
|
|
84
|
+
databases: string[];
|
|
85
|
+
services: string[];
|
|
86
|
+
scalars: string[];
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export declare const getDefaultFileScan: () => FileConventionScanResult;
|
|
90
|
+
export interface AppScanResult {
|
|
91
|
+
name: string;
|
|
92
|
+
type: "app" | "lib";
|
|
93
|
+
akanConfig: AppConfigResult;
|
|
94
|
+
files: FileConventionScanResult;
|
|
95
|
+
libDeps: string[];
|
|
96
|
+
pkgDeps: string[];
|
|
97
|
+
dependencies: string[];
|
|
98
|
+
libs: {
|
|
99
|
+
[key: string]: LibScanResult;
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
export interface LibScanResult {
|
|
103
|
+
name: string;
|
|
104
|
+
type: "app" | "lib";
|
|
105
|
+
akanConfig: LibConfigResult;
|
|
106
|
+
files: FileConventionScanResult;
|
|
107
|
+
libDeps: string[];
|
|
108
|
+
pkgDeps: string[];
|
|
109
|
+
dependencies: string[];
|
|
110
|
+
libs: {
|
|
111
|
+
[key: string]: LibScanResult;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
export interface PkgScanResult {
|
|
115
|
+
name: string;
|
|
116
|
+
pkgDeps: string[];
|
|
117
|
+
dependencies: string[];
|
|
118
|
+
}
|
|
119
|
+
export interface WorkspaceScanResult {
|
|
120
|
+
appNames: string[];
|
|
121
|
+
libNames: string[];
|
|
122
|
+
pkgNames: string[];
|
|
123
|
+
apps: {
|
|
124
|
+
[key: string]: AppScanResult;
|
|
125
|
+
};
|
|
126
|
+
libs: {
|
|
127
|
+
[key: string]: LibScanResult;
|
|
128
|
+
};
|
|
129
|
+
pkgs: {
|
|
130
|
+
[key: string]: PkgScanResult;
|
|
131
|
+
};
|
|
132
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AppConfig, AppConfigResult, DeepPartial, LibConfigResult, RunnerProps } from "@akanjs/config";
|
|
2
|
+
import type { NextConfig } from "next";
|
|
3
|
+
export declare const makeAppConfig: (config: DeepPartial<AppConfigResult>, props?: Partial<RunnerProps>) => AppConfigResult;
|
|
4
|
+
export declare const getAppConfig: (appRoot: string, props: RunnerProps) => Promise<AppConfigResult>;
|
|
5
|
+
export declare const makeLibConfig: (config: DeepPartial<LibConfigResult>, props?: Partial<RunnerProps>) => LibConfigResult;
|
|
6
|
+
export declare const getLibConfig: (libRoot: string, props: RunnerProps) => Promise<LibConfigResult>;
|
|
7
|
+
export declare const getNextConfig: (configImp: AppConfig, appData: any) => NextConfig | (() => Promise<NextConfig> | NextConfig);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { NextConfig } from "next";
|
|
2
|
+
export type NextConfigFn = (phase: string, context?: any) => Promise<NextConfig> | NextConfig;
|
|
3
|
+
export type NextPlugin = (config: NextConfig) => NextConfig;
|
|
4
|
+
export type NextPluginThatReturnsConfigFn = (config: NextConfig) => NextConfigFn;
|
|
5
|
+
export declare const composePlugins: (...plugins: (NextPlugin | NextPluginThatReturnsConfigFn)[]) => ((baseConfig: NextConfig) => NextConfigFn);
|
|
6
|
+
/**
|
|
7
|
+
* @type { (config: import('@nx/next/plugins/with-nx').WithNxOptions) = import('@nx/next/plugins/with-nx').WithNxOptions }
|
|
8
|
+
**/
|
|
9
|
+
export declare const withBase: (appName: string, config: NextConfig, libs: string[], routes?: {
|
|
10
|
+
basePath?: string;
|
|
11
|
+
domains: {
|
|
12
|
+
main?: string[];
|
|
13
|
+
develop?: string[];
|
|
14
|
+
debug?: string[];
|
|
15
|
+
};
|
|
16
|
+
}[]) => NextConfigFn;
|
|
17
|
+
export declare const defaultNextConfigFile = "import \"tsconfig-paths/register\";\n\nimport { getNextConfig } from \"@akanjs/config\";\n\nimport appInfo from \"./akan.app.json\";\nimport config from \"./akan.config\";\n\nexport default getNextConfig(config, appInfo);\n";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src";
|