@akanjs/cli 0.9.7 → 0.9.9
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
|
@@ -2173,17 +2173,28 @@ var AppExecutor = class _AppExecutor extends SysExecutor {
|
|
|
2173
2173
|
}
|
|
2174
2174
|
async syncAssets(libDeps) {
|
|
2175
2175
|
const projectPublicLibPath = `${this.cwdPath}/public/libs`;
|
|
2176
|
-
|
|
2177
|
-
|
|
2176
|
+
const projectAssetsLibPath = `${this.cwdPath}/assets/libs`;
|
|
2177
|
+
await Promise.all([
|
|
2178
|
+
import_fs4.default.existsSync(projectPublicLibPath) && import_promises.default.rm(projectPublicLibPath, { recursive: true }),
|
|
2179
|
+
import_fs4.default.existsSync(projectAssetsLibPath) && import_promises.default.rm(projectAssetsLibPath, { recursive: true })
|
|
2180
|
+
]);
|
|
2178
2181
|
const targetDeps = libDeps.filter((dep) => import_fs4.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`));
|
|
2179
|
-
await Promise.all(
|
|
2180
|
-
|
|
2181
|
-
targetDeps.map(
|
|
2182
|
-
|
|
2182
|
+
await Promise.all([
|
|
2183
|
+
...targetDeps.map((dep) => import_promises.default.mkdir(`${projectPublicLibPath}/${dep}`, { recursive: true })),
|
|
2184
|
+
...targetDeps.map((dep) => import_promises.default.mkdir(`${projectAssetsLibPath}/${dep}`, { recursive: true }))
|
|
2185
|
+
]);
|
|
2186
|
+
await Promise.all([
|
|
2187
|
+
...targetDeps.map(
|
|
2188
|
+
(dep) => import_fs4.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`) && import_promises.default.cp(`${this.workspace.workspaceRoot}/libs/${dep}/public`, `${projectPublicLibPath}/${dep}`, {
|
|
2189
|
+
recursive: true
|
|
2190
|
+
})
|
|
2191
|
+
),
|
|
2192
|
+
...targetDeps.map(
|
|
2193
|
+
(dep) => import_fs4.default.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/assets`) && import_promises.default.cp(`${this.workspace.workspaceRoot}/libs/${dep}/assets`, `${projectAssetsLibPath}/${dep}`, {
|
|
2183
2194
|
recursive: true
|
|
2184
2195
|
})
|
|
2185
2196
|
)
|
|
2186
|
-
);
|
|
2197
|
+
]);
|
|
2187
2198
|
}
|
|
2188
2199
|
};
|
|
2189
2200
|
var LibExecutor = class _LibExecutor extends SysExecutor {
|
|
@@ -3528,6 +3539,8 @@ var ApplicationRunner = class {
|
|
|
3528
3539
|
app.writeFile("next.config.ts", defaultNextConfigFile);
|
|
3529
3540
|
} else if (target === "csr")
|
|
3530
3541
|
await app.workspace.exec("rm -rf node_modules/.vite");
|
|
3542
|
+
else if (target === "backend")
|
|
3543
|
+
await app.cp("assets", import_path4.default.join(app.dist.cwdPath, "backend", "assets"));
|
|
3531
3544
|
return { env: this.#getEnv(app, { AKAN_COMMAND_TYPE: type }) };
|
|
3532
3545
|
}
|
|
3533
3546
|
async buildBackend(app) {
|
|
@@ -31,14 +31,14 @@ import { cnst, st, usePage } from "@${dict.sysName}/client";
|
|
|
31
31
|
import { Layout, Field } from "@akanjs/ui";
|
|
32
32
|
|
|
33
33
|
interface ${dict.Model}EditProps {
|
|
34
|
-
|
|
34
|
+
className?: string;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
export const General = ({
|
|
37
|
+
export const General = ({ className }: ${dict.Model}EditProps) => {
|
|
38
38
|
const ${dict.model}Form = st.use.${dict.model}Form();
|
|
39
39
|
const { l } = usePage();
|
|
40
40
|
return (
|
|
41
|
-
<Layout.Template>
|
|
41
|
+
<Layout.Template className={className}>
|
|
42
42
|
<Field.Text
|
|
43
43
|
label={l.field("${dict.model}", "id")}
|
|
44
44
|
desc={l.desc("${dict.model}", "id")}
|
package/esm/index.js
CHANGED
|
@@ -2160,17 +2160,28 @@ var AppExecutor = class _AppExecutor extends SysExecutor {
|
|
|
2160
2160
|
}
|
|
2161
2161
|
async syncAssets(libDeps) {
|
|
2162
2162
|
const projectPublicLibPath = `${this.cwdPath}/public/libs`;
|
|
2163
|
-
|
|
2164
|
-
|
|
2163
|
+
const projectAssetsLibPath = `${this.cwdPath}/assets/libs`;
|
|
2164
|
+
await Promise.all([
|
|
2165
|
+
fs8.existsSync(projectPublicLibPath) && fsPromise.rm(projectPublicLibPath, { recursive: true }),
|
|
2166
|
+
fs8.existsSync(projectAssetsLibPath) && fsPromise.rm(projectAssetsLibPath, { recursive: true })
|
|
2167
|
+
]);
|
|
2165
2168
|
const targetDeps = libDeps.filter((dep) => fs8.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`));
|
|
2166
|
-
await Promise.all(
|
|
2167
|
-
|
|
2168
|
-
targetDeps.map(
|
|
2169
|
-
|
|
2169
|
+
await Promise.all([
|
|
2170
|
+
...targetDeps.map((dep) => fsPromise.mkdir(`${projectPublicLibPath}/${dep}`, { recursive: true })),
|
|
2171
|
+
...targetDeps.map((dep) => fsPromise.mkdir(`${projectAssetsLibPath}/${dep}`, { recursive: true }))
|
|
2172
|
+
]);
|
|
2173
|
+
await Promise.all([
|
|
2174
|
+
...targetDeps.map(
|
|
2175
|
+
(dep) => fs8.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/public`) && fsPromise.cp(`${this.workspace.workspaceRoot}/libs/${dep}/public`, `${projectPublicLibPath}/${dep}`, {
|
|
2176
|
+
recursive: true
|
|
2177
|
+
})
|
|
2178
|
+
),
|
|
2179
|
+
...targetDeps.map(
|
|
2180
|
+
(dep) => fs8.existsSync(`${this.workspace.workspaceRoot}/libs/${dep}/assets`) && fsPromise.cp(`${this.workspace.workspaceRoot}/libs/${dep}/assets`, `${projectAssetsLibPath}/${dep}`, {
|
|
2170
2181
|
recursive: true
|
|
2171
2182
|
})
|
|
2172
2183
|
)
|
|
2173
|
-
);
|
|
2184
|
+
]);
|
|
2174
2185
|
}
|
|
2175
2186
|
};
|
|
2176
2187
|
var LibExecutor = class _LibExecutor extends SysExecutor {
|
|
@@ -3520,6 +3531,8 @@ var ApplicationRunner = class {
|
|
|
3520
3531
|
app.writeFile("next.config.ts", defaultNextConfigFile);
|
|
3521
3532
|
} else if (target === "csr")
|
|
3522
3533
|
await app.workspace.exec("rm -rf node_modules/.vite");
|
|
3534
|
+
else if (target === "backend")
|
|
3535
|
+
await app.cp("assets", path7.join(app.dist.cwdPath, "backend", "assets"));
|
|
3523
3536
|
return { env: this.#getEnv(app, { AKAN_COMMAND_TYPE: type }) };
|
|
3524
3537
|
}
|
|
3525
3538
|
async buildBackend(app) {
|
|
@@ -8,14 +8,14 @@ import { cnst, st, usePage } from "@${dict.sysName}/client";
|
|
|
8
8
|
import { Layout, Field } from "@akanjs/ui";
|
|
9
9
|
|
|
10
10
|
interface ${dict.Model}EditProps {
|
|
11
|
-
|
|
11
|
+
className?: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export const General = ({
|
|
14
|
+
export const General = ({ className }: ${dict.Model}EditProps) => {
|
|
15
15
|
const ${dict.model}Form = st.use.${dict.model}Form();
|
|
16
16
|
const { l } = usePage();
|
|
17
17
|
return (
|
|
18
|
-
<Layout.Template>
|
|
18
|
+
<Layout.Template className={className}>
|
|
19
19
|
<Field.Text
|
|
20
20
|
label={l.field("${dict.model}", "id")}
|
|
21
21
|
desc={l.desc("${dict.model}", "id")}
|