@akanjs/cli 0.0.133 → 0.0.135
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/cjs/index.js
CHANGED
|
@@ -4801,7 +4801,7 @@ var ApplicationRunner = class {
|
|
|
4801
4801
|
const { env } = await this.#prepareCommand(app, command, "csr");
|
|
4802
4802
|
const tsconfig = app.workspace.getTsConfig();
|
|
4803
4803
|
const processEnv = env;
|
|
4804
|
-
const akanjsPrefix = process.env.USE_AKANJS_PKGS === "true" ? `${app.workspace.workspaceRoot}/pkgs/` :
|
|
4804
|
+
const akanjsPrefix = process.env.USE_AKANJS_PKGS === "true" ? `${app.workspace.workspaceRoot}/pkgs/` : "";
|
|
4805
4805
|
const config = vite.defineConfig({
|
|
4806
4806
|
root: `${app.cwdPath}/app`,
|
|
4807
4807
|
base: "/",
|
|
@@ -4810,7 +4810,7 @@ var ApplicationRunner = class {
|
|
|
4810
4810
|
sourcemap: false,
|
|
4811
4811
|
emptyOutDir: true,
|
|
4812
4812
|
rollupOptions: {
|
|
4813
|
-
...process.env.USE_AKANJS_PKGS === "true" ? {} : { external: ["next/server"] },
|
|
4813
|
+
// ...(process.env.USE_AKANJS_PKGS === "true" ? {} : { external: ["next/server"] }),
|
|
4814
4814
|
input: `${app.cwdPath}/app/index.html`
|
|
4815
4815
|
}
|
|
4816
4816
|
},
|
|
@@ -5854,11 +5854,19 @@ var ModuleRunner = class {
|
|
|
5854
5854
|
async createScalarTemplate(sys2, name) {
|
|
5855
5855
|
const akanConfig = await sys2.getConfig();
|
|
5856
5856
|
const scanResult = await sys2.scan({ akanConfig });
|
|
5857
|
+
const names = (0, import_pluralize.default)(name);
|
|
5857
5858
|
await sys2.applyTemplate({
|
|
5858
5859
|
basePath: "./lib/__scalar",
|
|
5859
5860
|
template: "__scalar",
|
|
5860
5861
|
scanResult,
|
|
5861
|
-
dict: {
|
|
5862
|
+
dict: {
|
|
5863
|
+
model: name,
|
|
5864
|
+
Model: capitalize(name),
|
|
5865
|
+
models: names,
|
|
5866
|
+
Models: capitalize(names),
|
|
5867
|
+
sysName: sys2.name,
|
|
5868
|
+
SysName: capitalize(sys2.name)
|
|
5869
|
+
}
|
|
5862
5870
|
});
|
|
5863
5871
|
await sys2.scan({ akanConfig });
|
|
5864
5872
|
return {
|
|
@@ -5872,11 +5880,19 @@ var ModuleRunner = class {
|
|
|
5872
5880
|
async createModuleTemplate(sys2, name) {
|
|
5873
5881
|
const akanConfig = await sys2.getConfig();
|
|
5874
5882
|
const scanResult = await sys2.scan({ akanConfig });
|
|
5883
|
+
const names = (0, import_pluralize.default)(name);
|
|
5875
5884
|
await sys2.applyTemplate({
|
|
5876
5885
|
basePath: `./lib/${name}`,
|
|
5877
5886
|
template: "module",
|
|
5878
5887
|
scanResult,
|
|
5879
|
-
dict: {
|
|
5888
|
+
dict: {
|
|
5889
|
+
model: name,
|
|
5890
|
+
Model: capitalize(name),
|
|
5891
|
+
models: names,
|
|
5892
|
+
Models: capitalize(names),
|
|
5893
|
+
sysName: sys2.name,
|
|
5894
|
+
SysName: capitalize(sys2.name)
|
|
5895
|
+
}
|
|
5880
5896
|
});
|
|
5881
5897
|
await sys2.scan({ akanConfig });
|
|
5882
5898
|
return {
|
|
@@ -28,7 +28,7 @@ import { createNextMiddleware } from "@akanjs/next";
|
|
|
28
28
|
|
|
29
29
|
export const config = {
|
|
30
30
|
unstable_allowDynamic: ["/node_modules/reflect-metadata/**"],
|
|
31
|
-
matcher: ["/((?!api|_next
|
|
31
|
+
matcher: ["/((?!api|_next|.*\\\\..*).*)"],
|
|
32
32
|
};
|
|
33
33
|
export const middleware = createNextMiddleware();
|
|
34
34
|
`;
|
|
@@ -36,8 +36,8 @@ import { cnst } from "../cnst";
|
|
|
36
36
|
export const register${dict.Model}Module = (option: ModulesOptions) =>
|
|
37
37
|
databaseModuleOf(
|
|
38
38
|
{
|
|
39
|
-
constant: cnst.${dict.
|
|
40
|
-
database: db.${dict.
|
|
39
|
+
constant: cnst.${dict.model}Cnst,
|
|
40
|
+
database: db.${dict.model}Db,
|
|
41
41
|
signal: ${dict.Model}Signal,
|
|
42
42
|
service: ${dict.Model}Service,
|
|
43
43
|
},
|
package/esm/index.js
CHANGED
|
@@ -4788,7 +4788,7 @@ var ApplicationRunner = class {
|
|
|
4788
4788
|
const { env } = await this.#prepareCommand(app, command, "csr");
|
|
4789
4789
|
const tsconfig = app.workspace.getTsConfig();
|
|
4790
4790
|
const processEnv = env;
|
|
4791
|
-
const akanjsPrefix = process.env.USE_AKANJS_PKGS === "true" ? `${app.workspace.workspaceRoot}/pkgs/` :
|
|
4791
|
+
const akanjsPrefix = process.env.USE_AKANJS_PKGS === "true" ? `${app.workspace.workspaceRoot}/pkgs/` : "";
|
|
4792
4792
|
const config = vite.defineConfig({
|
|
4793
4793
|
root: `${app.cwdPath}/app`,
|
|
4794
4794
|
base: "/",
|
|
@@ -4797,7 +4797,7 @@ var ApplicationRunner = class {
|
|
|
4797
4797
|
sourcemap: false,
|
|
4798
4798
|
emptyOutDir: true,
|
|
4799
4799
|
rollupOptions: {
|
|
4800
|
-
...process.env.USE_AKANJS_PKGS === "true" ? {} : { external: ["next/server"] },
|
|
4800
|
+
// ...(process.env.USE_AKANJS_PKGS === "true" ? {} : { external: ["next/server"] }),
|
|
4801
4801
|
input: `${app.cwdPath}/app/index.html`
|
|
4802
4802
|
}
|
|
4803
4803
|
},
|
|
@@ -5841,11 +5841,19 @@ var ModuleRunner = class {
|
|
|
5841
5841
|
async createScalarTemplate(sys2, name) {
|
|
5842
5842
|
const akanConfig = await sys2.getConfig();
|
|
5843
5843
|
const scanResult = await sys2.scan({ akanConfig });
|
|
5844
|
+
const names = pluralize(name);
|
|
5844
5845
|
await sys2.applyTemplate({
|
|
5845
5846
|
basePath: "./lib/__scalar",
|
|
5846
5847
|
template: "__scalar",
|
|
5847
5848
|
scanResult,
|
|
5848
|
-
dict: {
|
|
5849
|
+
dict: {
|
|
5850
|
+
model: name,
|
|
5851
|
+
Model: capitalize(name),
|
|
5852
|
+
models: names,
|
|
5853
|
+
Models: capitalize(names),
|
|
5854
|
+
sysName: sys2.name,
|
|
5855
|
+
SysName: capitalize(sys2.name)
|
|
5856
|
+
}
|
|
5849
5857
|
});
|
|
5850
5858
|
await sys2.scan({ akanConfig });
|
|
5851
5859
|
return {
|
|
@@ -5859,11 +5867,19 @@ var ModuleRunner = class {
|
|
|
5859
5867
|
async createModuleTemplate(sys2, name) {
|
|
5860
5868
|
const akanConfig = await sys2.getConfig();
|
|
5861
5869
|
const scanResult = await sys2.scan({ akanConfig });
|
|
5870
|
+
const names = pluralize(name);
|
|
5862
5871
|
await sys2.applyTemplate({
|
|
5863
5872
|
basePath: `./lib/${name}`,
|
|
5864
5873
|
template: "module",
|
|
5865
5874
|
scanResult,
|
|
5866
|
-
dict: {
|
|
5875
|
+
dict: {
|
|
5876
|
+
model: name,
|
|
5877
|
+
Model: capitalize(name),
|
|
5878
|
+
models: names,
|
|
5879
|
+
Models: capitalize(names),
|
|
5880
|
+
sysName: sys2.name,
|
|
5881
|
+
SysName: capitalize(sys2.name)
|
|
5882
|
+
}
|
|
5867
5883
|
});
|
|
5868
5884
|
await sys2.scan({ akanConfig });
|
|
5869
5885
|
return {
|
|
@@ -5,7 +5,7 @@ import { createNextMiddleware } from "@akanjs/next";
|
|
|
5
5
|
|
|
6
6
|
export const config = {
|
|
7
7
|
unstable_allowDynamic: ["/node_modules/reflect-metadata/**"],
|
|
8
|
-
matcher: ["/((?!api|_next
|
|
8
|
+
matcher: ["/((?!api|_next|.*\\\\..*).*)"],
|
|
9
9
|
};
|
|
10
10
|
export const middleware = createNextMiddleware();
|
|
11
11
|
`;
|
|
@@ -13,8 +13,8 @@ import { cnst } from "../cnst";
|
|
|
13
13
|
export const register${dict.Model}Module = (option: ModulesOptions) =>
|
|
14
14
|
databaseModuleOf(
|
|
15
15
|
{
|
|
16
|
-
constant: cnst.${dict.
|
|
17
|
-
database: db.${dict.
|
|
16
|
+
constant: cnst.${dict.model}Cnst,
|
|
17
|
+
database: db.${dict.model}Db,
|
|
18
18
|
signal: ${dict.Model}Signal,
|
|
19
19
|
service: ${dict.Model}Service,
|
|
20
20
|
},
|