@akanjs/cli 1.0.13 → 1.0.14
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 +20 -8
- package/cjs/src/guidelines/modelStore/modelStore.instruction.md +5 -0
- package/cjs/src/templates/workspaceRoot/infra/app/Chart.yaml.template +6 -0
- package/cjs/src/templates/workspaceRoot/infra/app/templates/frontend.yaml.template +182 -0
- package/cjs/src/templates/workspaceRoot/infra/app/values/_common-values.yaml.template +183 -0
- package/cjs/src/templates/workspaceRoot/tsconfig.json.template +1 -1
- package/esm/index.js +20 -8
- package/esm/src/guidelines/modelStore/modelStore.instruction.md +5 -0
- package/esm/src/templates/workspaceRoot/infra/app/Chart.yaml.template +6 -0
- package/esm/src/templates/workspaceRoot/infra/app/templates/frontend.yaml.template +182 -0
- package/esm/src/templates/workspaceRoot/infra/app/values/_common-values.yaml.template +183 -0
- package/esm/src/templates/workspaceRoot/tsconfig.json.template +1 -1
- package/package.json +1 -1
- package/src/guidelines/modelStore/modelStore.instruction.md +5 -0
- package/src/workspace/workspace.command.d.ts +1 -1
- package/src/workspace/workspace.runner.d.ts +2 -1
- package/src/workspace/workspace.script.d.ts +2 -1
package/cjs/index.js
CHANGED
|
@@ -6950,7 +6950,7 @@ var import_latest_version2 = __toESM(require("latest-version"), 1);
|
|
|
6950
6950
|
var import_path6 = __toESM(require("path"), 1);
|
|
6951
6951
|
var import_uuid2 = require("uuid");
|
|
6952
6952
|
var WorkspaceRunner = class {
|
|
6953
|
-
async createWorkspace(repoName, appName, { dirname: dirname3 = ".", tag = "latest" }) {
|
|
6953
|
+
async createWorkspace(repoName, appName, { dirname: dirname3 = ".", tag = "latest", init = true }) {
|
|
6954
6954
|
const cwdPath = process.cwd();
|
|
6955
6955
|
const workspaceRoot = import_path6.default.join(cwdPath, dirname3, repoName);
|
|
6956
6956
|
const workspace = WorkspaceExecutor.fromRoot({ workspaceRoot, repoName });
|
|
@@ -6993,9 +6993,11 @@ var WorkspaceRunner = class {
|
|
|
6993
6993
|
}
|
|
6994
6994
|
};
|
|
6995
6995
|
workspace.setPackageJson(packageJson);
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6996
|
+
if (init) {
|
|
6997
|
+
const installSpinner = workspace.spinning("Installing dependencies with pnpm...");
|
|
6998
|
+
await workspace.spawn("pnpm", ["install", "--reporter=silent"]);
|
|
6999
|
+
installSpinner.succeed("Dependencies installed with pnpm");
|
|
7000
|
+
}
|
|
6999
7001
|
const gitSpinner = workspace.spinning("Initializing git repository and commit...");
|
|
7000
7002
|
await workspace.commit("Initial commit", { init: true });
|
|
7001
7003
|
gitSpinner.succeed("Git repository initialized and committed");
|
|
@@ -7049,8 +7051,13 @@ var WorkspaceScript = class {
|
|
|
7049
7051
|
#runner = new WorkspaceRunner();
|
|
7050
7052
|
applicationScript = new ApplicationScript();
|
|
7051
7053
|
libraryScript = new LibraryScript();
|
|
7052
|
-
async createWorkspace(repoName, appName, {
|
|
7053
|
-
|
|
7054
|
+
async createWorkspace(repoName, appName, {
|
|
7055
|
+
dirname: dirname3 = ".",
|
|
7056
|
+
installLibs = false,
|
|
7057
|
+
tag = "latest",
|
|
7058
|
+
init = true
|
|
7059
|
+
}) {
|
|
7060
|
+
const workspace = await this.#runner.createWorkspace(repoName, appName, { dirname: dirname3, tag, init });
|
|
7054
7061
|
if (installLibs) {
|
|
7055
7062
|
await this.libraryScript.installLibrary(workspace, "util");
|
|
7056
7063
|
await this.libraryScript.installLibrary(workspace, "shared");
|
|
@@ -7115,11 +7122,11 @@ var WorkspaceScript = class {
|
|
|
7115
7122
|
// pkgs/@akanjs/cli/src/workspace/workspace.command.ts
|
|
7116
7123
|
var WorkspaceCommand = class {
|
|
7117
7124
|
workspaceScript = new WorkspaceScript();
|
|
7118
|
-
async createWorkspace(workspaceName, app, dir, libs, tag) {
|
|
7125
|
+
async createWorkspace(workspaceName, app, dir, libs, tag, init) {
|
|
7119
7126
|
await this.workspaceScript.createWorkspace(
|
|
7120
7127
|
workspaceName.toLowerCase().replace(/ /g, "-"),
|
|
7121
7128
|
app.toLowerCase().replace(/ /g, "-"),
|
|
7122
|
-
{ dirname: dir, installLibs: libs, tag }
|
|
7129
|
+
{ dirname: dir, installLibs: libs, tag, init }
|
|
7123
7130
|
);
|
|
7124
7131
|
}
|
|
7125
7132
|
async generateMongo(workspace) {
|
|
@@ -7161,6 +7168,11 @@ __decorateClass([
|
|
|
7161
7168
|
desc: "tag of the update",
|
|
7162
7169
|
default: "latest",
|
|
7163
7170
|
enum: ["latest", "dev", "canary", "beta", "rc", "alpha"]
|
|
7171
|
+
})),
|
|
7172
|
+
__decorateParam(5, Option("init", {
|
|
7173
|
+
type: "boolean",
|
|
7174
|
+
desc: "Do you want to initialize the workspace? (Recommended)",
|
|
7175
|
+
default: true
|
|
7164
7176
|
}))
|
|
7165
7177
|
], WorkspaceCommand.prototype, "createWorkspace", 1);
|
|
7166
7178
|
__decorateClass([
|
|
@@ -437,16 +437,19 @@ initProductChat(productId: string) {
|
|
|
437
437
|
## Best Practices
|
|
438
438
|
|
|
439
439
|
1. **Naming Conventions**:
|
|
440
|
+
|
|
440
441
|
- Use `modelList{Context}` for slice names (e.g., `productListByCategory`)
|
|
441
442
|
- Use camelCase for state properties
|
|
442
443
|
- Use action verbs for method names
|
|
443
444
|
|
|
444
445
|
2. **State Management**:
|
|
446
|
+
|
|
445
447
|
- Keep UI state (loading, selected items) in the store
|
|
446
448
|
- Use `this.pick()` for accessing multiple properties
|
|
447
449
|
- Create new references for objects/arrays when updating
|
|
448
450
|
|
|
449
451
|
3. **Performance**:
|
|
452
|
+
|
|
450
453
|
- Use selective subscriptions in components:
|
|
451
454
|
```typescript
|
|
452
455
|
// Subscribe to specific state properties
|
|
@@ -456,11 +459,13 @@ initProductChat(productId: string) {
|
|
|
456
459
|
- Clean up subscriptions when components unmount
|
|
457
460
|
|
|
458
461
|
4. **Error Handling**:
|
|
462
|
+
|
|
459
463
|
- Use the `@Toast` decorator for user notifications
|
|
460
464
|
- Always reset loading states in finally blocks
|
|
461
465
|
- Implement retry logic for critical operations
|
|
462
466
|
|
|
463
467
|
5. **Testing**:
|
|
468
|
+
|
|
464
469
|
- Mock stores with initial state for unit tests
|
|
465
470
|
|
|
466
471
|
```typescript
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
{{- $namespaceParts := split "-" .Release.Namespace }}
|
|
2
|
+
{{- $branch := index $namespaceParts "_1" }}
|
|
3
|
+
{{- $config := index .Values $branch }}
|
|
4
|
+
---
|
|
5
|
+
apiVersion: apps/v1
|
|
6
|
+
kind: Deployment
|
|
7
|
+
metadata:
|
|
8
|
+
name: frontend-deployment
|
|
9
|
+
namespace: {{ .Values.appName }}-{{ $branch }}
|
|
10
|
+
labels:
|
|
11
|
+
app: frontend
|
|
12
|
+
spec:
|
|
13
|
+
replicas: {{ $config.frontend.replicas }}
|
|
14
|
+
selector:
|
|
15
|
+
matchLabels:
|
|
16
|
+
app: frontend
|
|
17
|
+
template:
|
|
18
|
+
metadata:
|
|
19
|
+
labels:
|
|
20
|
+
app: frontend
|
|
21
|
+
spec:
|
|
22
|
+
containers:
|
|
23
|
+
- name: frontend
|
|
24
|
+
image: registry.akamir.com/{{ .Values.repoName }}/{{ .Values.appName }}/frontend:{{ $branch }}-live
|
|
25
|
+
imagePullPolicy: Always
|
|
26
|
+
ports:
|
|
27
|
+
- containerPort: 4200
|
|
28
|
+
resources:
|
|
29
|
+
requests:
|
|
30
|
+
memory: {{ $config.frontend.resources.requests.memory }}
|
|
31
|
+
cpu: {{ $config.frontend.resources.requests.cpu }}
|
|
32
|
+
limits:
|
|
33
|
+
memory: {{ $config.frontend.resources.limits.memory }}
|
|
34
|
+
cpu: {{ $config.frontend.resources.limits.cpu }}
|
|
35
|
+
imagePullSecrets:
|
|
36
|
+
- name: regcred
|
|
37
|
+
---
|
|
38
|
+
apiVersion: v1
|
|
39
|
+
kind: Service
|
|
40
|
+
metadata:
|
|
41
|
+
name: frontend-svc
|
|
42
|
+
namespace: {{ .Values.appName }}-{{ $branch }}
|
|
43
|
+
spec:
|
|
44
|
+
selector:
|
|
45
|
+
app: frontend
|
|
46
|
+
ports:
|
|
47
|
+
- protocol: TCP
|
|
48
|
+
port: 4200
|
|
49
|
+
targetPort: 4200
|
|
50
|
+
---
|
|
51
|
+
apiVersion: networking.k8s.io/v1
|
|
52
|
+
kind: Ingress
|
|
53
|
+
metadata:
|
|
54
|
+
name: app-ingress
|
|
55
|
+
namespace: {{ .Values.appName }}-{{ $branch }}
|
|
56
|
+
annotations:
|
|
57
|
+
ingress.kubernetes.io/ssl-redirect: "true"
|
|
58
|
+
kubernetes.io/tls-acme: "true"
|
|
59
|
+
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
60
|
+
nginx.ingress.kubernetes.io/enable-cors: "true"
|
|
61
|
+
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
|
62
|
+
nginx.ingress.kubernetes.io/affinity: "cookie"
|
|
63
|
+
nginx.ingress.kubernetes.io/session-cookie-name: "route"
|
|
64
|
+
nginx.ingress.kubernetes.io/session-cookie-expires: "172800"
|
|
65
|
+
nginx.ingress.kubernetes.io/session-cookie-max-age: "172800"
|
|
66
|
+
nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,apollo-require-preflight"
|
|
67
|
+
nginx.ingress.kubernetes.io/use-regex: "true"
|
|
68
|
+
nginx.ingress.kubernetes.io/allow-snippet-annotations: "true"
|
|
69
|
+
nginx.ingress.kubernetes.io/rewrite-target: /$2$3
|
|
70
|
+
nginx.ingress.kubernetes.io/proxy-buffer-size: "16k"
|
|
71
|
+
nginx.ingress.kubernetes.io/proxy-buffers-number: "4"
|
|
72
|
+
nginx.ingress.kubernetes.io/proxy-busy-buffers-size: "24k"
|
|
73
|
+
spec:
|
|
74
|
+
ingressClassName: nginx
|
|
75
|
+
tls:
|
|
76
|
+
- hosts:
|
|
77
|
+
- {{ .Values.appName }}-{{ $branch }}.akamir.com
|
|
78
|
+
{{- range $i, $subRoute := .Values.subRoutes }}
|
|
79
|
+
- {{ $subRoute }}-{{ $branch }}.akamir.com
|
|
80
|
+
{{ end}}
|
|
81
|
+
{{- range $i, $domain := $config.domains }}
|
|
82
|
+
- {{ $domain }}
|
|
83
|
+
{{ end}}
|
|
84
|
+
secretName: cert-{{ .Values.appName }}-{{ $branch }}
|
|
85
|
+
rules:
|
|
86
|
+
- host: {{ .Values.appName }}-{{ $branch }}.akamir.com
|
|
87
|
+
http:
|
|
88
|
+
paths:
|
|
89
|
+
- path: /(search)(.*)
|
|
90
|
+
pathType: ImplementationSpecific
|
|
91
|
+
backend:
|
|
92
|
+
service:
|
|
93
|
+
name: meili-svc
|
|
94
|
+
port:
|
|
95
|
+
number: 7700
|
|
96
|
+
- path: /()(backend)(.*)
|
|
97
|
+
pathType: ImplementationSpecific
|
|
98
|
+
backend:
|
|
99
|
+
service:
|
|
100
|
+
name: backend-svc
|
|
101
|
+
port:
|
|
102
|
+
number: 8080
|
|
103
|
+
- path: /()(socket.io)(.*)
|
|
104
|
+
pathType: ImplementationSpecific
|
|
105
|
+
backend:
|
|
106
|
+
service:
|
|
107
|
+
name: backend-svc
|
|
108
|
+
port:
|
|
109
|
+
number: 8080
|
|
110
|
+
- path: /()(.*)
|
|
111
|
+
pathType: ImplementationSpecific
|
|
112
|
+
backend:
|
|
113
|
+
service:
|
|
114
|
+
name: frontend-svc
|
|
115
|
+
port:
|
|
116
|
+
number: 4200
|
|
117
|
+
{{- range $i, $subRoute := .Values.subRoutes }}
|
|
118
|
+
- host: {{ $subRoute }}-{{ $branch }}.akamir.com
|
|
119
|
+
http:
|
|
120
|
+
paths:
|
|
121
|
+
- path: /(search)(.*)
|
|
122
|
+
pathType: ImplementationSpecific
|
|
123
|
+
backend:
|
|
124
|
+
service:
|
|
125
|
+
name: meili-svc
|
|
126
|
+
port:
|
|
127
|
+
number: 7700
|
|
128
|
+
- path: /()(backend)(.*)
|
|
129
|
+
pathType: ImplementationSpecific
|
|
130
|
+
backend:
|
|
131
|
+
service:
|
|
132
|
+
name: backend-svc
|
|
133
|
+
port:
|
|
134
|
+
number: 8080
|
|
135
|
+
- path: /()(socket.io)(.*)
|
|
136
|
+
pathType: ImplementationSpecific
|
|
137
|
+
backend:
|
|
138
|
+
service:
|
|
139
|
+
name: backend-svc
|
|
140
|
+
port:
|
|
141
|
+
number: 8080
|
|
142
|
+
- path: /()(.*)
|
|
143
|
+
pathType: ImplementationSpecific
|
|
144
|
+
backend:
|
|
145
|
+
service:
|
|
146
|
+
name: frontend-svc
|
|
147
|
+
port:
|
|
148
|
+
number: 4200
|
|
149
|
+
{{ end }}
|
|
150
|
+
{{- range $i, $domain := $config.domains }}
|
|
151
|
+
- host: {{ $domain }}
|
|
152
|
+
http:
|
|
153
|
+
paths:
|
|
154
|
+
- path: /(search)(.*)
|
|
155
|
+
pathType: ImplementationSpecific
|
|
156
|
+
backend:
|
|
157
|
+
service:
|
|
158
|
+
name: meili-svc
|
|
159
|
+
port:
|
|
160
|
+
number: 7700
|
|
161
|
+
- path: /()(backend)(.*)
|
|
162
|
+
pathType: ImplementationSpecific
|
|
163
|
+
backend:
|
|
164
|
+
service:
|
|
165
|
+
name: backend-svc
|
|
166
|
+
port:
|
|
167
|
+
number: 8080
|
|
168
|
+
- path: /()(socket.io)(.*)
|
|
169
|
+
pathType: ImplementationSpecific
|
|
170
|
+
backend:
|
|
171
|
+
service:
|
|
172
|
+
name: backend-svc
|
|
173
|
+
port:
|
|
174
|
+
number: 8080
|
|
175
|
+
- path: /()(.*)
|
|
176
|
+
pathType: ImplementationSpecific
|
|
177
|
+
backend:
|
|
178
|
+
service:
|
|
179
|
+
name: frontend-svc
|
|
180
|
+
port:
|
|
181
|
+
number: 4200
|
|
182
|
+
{{ end }}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
repoName: undefined
|
|
2
|
+
appName: undefined
|
|
3
|
+
subRoutes: []
|
|
4
|
+
debug:
|
|
5
|
+
domains: []
|
|
6
|
+
backend:
|
|
7
|
+
federation:
|
|
8
|
+
replicas: 1
|
|
9
|
+
resources:
|
|
10
|
+
requests:
|
|
11
|
+
memory: 250M
|
|
12
|
+
cpu: "0.05"
|
|
13
|
+
limits:
|
|
14
|
+
memory: 1G
|
|
15
|
+
cpu: "0.5"
|
|
16
|
+
batch:
|
|
17
|
+
resources:
|
|
18
|
+
requests:
|
|
19
|
+
memory: 250M
|
|
20
|
+
cpu: "0.05"
|
|
21
|
+
limits:
|
|
22
|
+
memory: 1G
|
|
23
|
+
cpu: "0.5"
|
|
24
|
+
frontend:
|
|
25
|
+
replicas: 1
|
|
26
|
+
resources:
|
|
27
|
+
requests:
|
|
28
|
+
memory: 250M
|
|
29
|
+
cpu: "0.1"
|
|
30
|
+
limits:
|
|
31
|
+
memory: 1G
|
|
32
|
+
cpu: "0.5"
|
|
33
|
+
redis:
|
|
34
|
+
replicas: 1
|
|
35
|
+
resources:
|
|
36
|
+
requests:
|
|
37
|
+
cpu: "0.05"
|
|
38
|
+
memory: 200M
|
|
39
|
+
limits:
|
|
40
|
+
cpu: "1"
|
|
41
|
+
memory: 2G
|
|
42
|
+
mongo:
|
|
43
|
+
replicas: 1
|
|
44
|
+
storage:
|
|
45
|
+
data: 2G
|
|
46
|
+
logs: 0.5G
|
|
47
|
+
resources:
|
|
48
|
+
requests:
|
|
49
|
+
cpu: "0.15"
|
|
50
|
+
memory: 200M
|
|
51
|
+
limits:
|
|
52
|
+
cpu: "4"
|
|
53
|
+
memory: 4G
|
|
54
|
+
meili:
|
|
55
|
+
storage:
|
|
56
|
+
data: 2G
|
|
57
|
+
resources:
|
|
58
|
+
requests:
|
|
59
|
+
cpu: "0.15"
|
|
60
|
+
memory: 200M
|
|
61
|
+
limits:
|
|
62
|
+
cpu: "4"
|
|
63
|
+
memory: 4G
|
|
64
|
+
develop:
|
|
65
|
+
domains: []
|
|
66
|
+
backend:
|
|
67
|
+
federation:
|
|
68
|
+
replicas: 1
|
|
69
|
+
resources:
|
|
70
|
+
requests:
|
|
71
|
+
memory: 250M
|
|
72
|
+
cpu: "0.05"
|
|
73
|
+
limits:
|
|
74
|
+
memory: 1G
|
|
75
|
+
cpu: "0.5"
|
|
76
|
+
batch:
|
|
77
|
+
resources:
|
|
78
|
+
requests:
|
|
79
|
+
memory: 250M
|
|
80
|
+
cpu: "0.05"
|
|
81
|
+
limits:
|
|
82
|
+
memory: 1G
|
|
83
|
+
cpu: "0.5"
|
|
84
|
+
frontend:
|
|
85
|
+
replicas: 1
|
|
86
|
+
resources:
|
|
87
|
+
requests:
|
|
88
|
+
memory: 250M
|
|
89
|
+
cpu: "0.1"
|
|
90
|
+
limits:
|
|
91
|
+
memory: 1G
|
|
92
|
+
cpu: "0.5"
|
|
93
|
+
redis:
|
|
94
|
+
replicas: 1
|
|
95
|
+
resources:
|
|
96
|
+
requests:
|
|
97
|
+
cpu: "0.05"
|
|
98
|
+
memory: 200M
|
|
99
|
+
limits:
|
|
100
|
+
cpu: "1"
|
|
101
|
+
memory: 2G
|
|
102
|
+
mongo:
|
|
103
|
+
replicas: 1
|
|
104
|
+
storage:
|
|
105
|
+
data: 2G
|
|
106
|
+
logs: 0.5G
|
|
107
|
+
resources:
|
|
108
|
+
requests:
|
|
109
|
+
cpu: "0.15"
|
|
110
|
+
memory: 200M
|
|
111
|
+
limits:
|
|
112
|
+
cpu: "4"
|
|
113
|
+
memory: 4G
|
|
114
|
+
meili:
|
|
115
|
+
storage:
|
|
116
|
+
data: 2G
|
|
117
|
+
resources:
|
|
118
|
+
requests:
|
|
119
|
+
cpu: "0.15"
|
|
120
|
+
memory: 200M
|
|
121
|
+
limits:
|
|
122
|
+
cpu: "4"
|
|
123
|
+
memory: 4G
|
|
124
|
+
main:
|
|
125
|
+
domains: []
|
|
126
|
+
backend:
|
|
127
|
+
federation:
|
|
128
|
+
replicas: 1
|
|
129
|
+
resources:
|
|
130
|
+
requests:
|
|
131
|
+
memory: 250M
|
|
132
|
+
cpu: "0.05"
|
|
133
|
+
limits:
|
|
134
|
+
memory: 1G
|
|
135
|
+
cpu: "0.5"
|
|
136
|
+
batch:
|
|
137
|
+
resources:
|
|
138
|
+
requests:
|
|
139
|
+
memory: 250M
|
|
140
|
+
cpu: "0.05"
|
|
141
|
+
limits:
|
|
142
|
+
memory: 1G
|
|
143
|
+
cpu: "0.5"
|
|
144
|
+
frontend:
|
|
145
|
+
replicas: 1
|
|
146
|
+
resources:
|
|
147
|
+
requests:
|
|
148
|
+
memory: 1G
|
|
149
|
+
cpu: "1"
|
|
150
|
+
limits:
|
|
151
|
+
memory: 4G
|
|
152
|
+
cpu: "4"
|
|
153
|
+
redis:
|
|
154
|
+
replicas: 1
|
|
155
|
+
resources:
|
|
156
|
+
requests:
|
|
157
|
+
cpu: "0.05"
|
|
158
|
+
memory: 200M
|
|
159
|
+
limits:
|
|
160
|
+
cpu: "1"
|
|
161
|
+
memory: 2G
|
|
162
|
+
mongo:
|
|
163
|
+
replicas: 1
|
|
164
|
+
storage:
|
|
165
|
+
data: 2G
|
|
166
|
+
logs: 0.5G
|
|
167
|
+
resources:
|
|
168
|
+
requests:
|
|
169
|
+
cpu: "0.15"
|
|
170
|
+
memory: 200M
|
|
171
|
+
limits:
|
|
172
|
+
cpu: "4"
|
|
173
|
+
memory: 4G
|
|
174
|
+
meili:
|
|
175
|
+
storage:
|
|
176
|
+
data: 2G
|
|
177
|
+
resources:
|
|
178
|
+
requests:
|
|
179
|
+
cpu: "0.15"
|
|
180
|
+
memory: 200M
|
|
181
|
+
limits:
|
|
182
|
+
cpu: "4"
|
|
183
|
+
memory: 4G
|
package/esm/index.js
CHANGED
|
@@ -6931,7 +6931,7 @@ import latestVersion2 from "latest-version";
|
|
|
6931
6931
|
import path9 from "path";
|
|
6932
6932
|
import { v5 as uuid } from "uuid";
|
|
6933
6933
|
var WorkspaceRunner = class {
|
|
6934
|
-
async createWorkspace(repoName, appName, { dirname: dirname3 = ".", tag = "latest" }) {
|
|
6934
|
+
async createWorkspace(repoName, appName, { dirname: dirname3 = ".", tag = "latest", init = true }) {
|
|
6935
6935
|
const cwdPath = process.cwd();
|
|
6936
6936
|
const workspaceRoot = path9.join(cwdPath, dirname3, repoName);
|
|
6937
6937
|
const workspace = WorkspaceExecutor.fromRoot({ workspaceRoot, repoName });
|
|
@@ -6974,9 +6974,11 @@ var WorkspaceRunner = class {
|
|
|
6974
6974
|
}
|
|
6975
6975
|
};
|
|
6976
6976
|
workspace.setPackageJson(packageJson);
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6977
|
+
if (init) {
|
|
6978
|
+
const installSpinner = workspace.spinning("Installing dependencies with pnpm...");
|
|
6979
|
+
await workspace.spawn("pnpm", ["install", "--reporter=silent"]);
|
|
6980
|
+
installSpinner.succeed("Dependencies installed with pnpm");
|
|
6981
|
+
}
|
|
6980
6982
|
const gitSpinner = workspace.spinning("Initializing git repository and commit...");
|
|
6981
6983
|
await workspace.commit("Initial commit", { init: true });
|
|
6982
6984
|
gitSpinner.succeed("Git repository initialized and committed");
|
|
@@ -7030,8 +7032,13 @@ var WorkspaceScript = class {
|
|
|
7030
7032
|
#runner = new WorkspaceRunner();
|
|
7031
7033
|
applicationScript = new ApplicationScript();
|
|
7032
7034
|
libraryScript = new LibraryScript();
|
|
7033
|
-
async createWorkspace(repoName, appName, {
|
|
7034
|
-
|
|
7035
|
+
async createWorkspace(repoName, appName, {
|
|
7036
|
+
dirname: dirname3 = ".",
|
|
7037
|
+
installLibs = false,
|
|
7038
|
+
tag = "latest",
|
|
7039
|
+
init = true
|
|
7040
|
+
}) {
|
|
7041
|
+
const workspace = await this.#runner.createWorkspace(repoName, appName, { dirname: dirname3, tag, init });
|
|
7035
7042
|
if (installLibs) {
|
|
7036
7043
|
await this.libraryScript.installLibrary(workspace, "util");
|
|
7037
7044
|
await this.libraryScript.installLibrary(workspace, "shared");
|
|
@@ -7096,11 +7103,11 @@ var WorkspaceScript = class {
|
|
|
7096
7103
|
// pkgs/@akanjs/cli/src/workspace/workspace.command.ts
|
|
7097
7104
|
var WorkspaceCommand = class {
|
|
7098
7105
|
workspaceScript = new WorkspaceScript();
|
|
7099
|
-
async createWorkspace(workspaceName, app, dir, libs, tag) {
|
|
7106
|
+
async createWorkspace(workspaceName, app, dir, libs, tag, init) {
|
|
7100
7107
|
await this.workspaceScript.createWorkspace(
|
|
7101
7108
|
workspaceName.toLowerCase().replace(/ /g, "-"),
|
|
7102
7109
|
app.toLowerCase().replace(/ /g, "-"),
|
|
7103
|
-
{ dirname: dir, installLibs: libs, tag }
|
|
7110
|
+
{ dirname: dir, installLibs: libs, tag, init }
|
|
7104
7111
|
);
|
|
7105
7112
|
}
|
|
7106
7113
|
async generateMongo(workspace) {
|
|
@@ -7142,6 +7149,11 @@ __decorateClass([
|
|
|
7142
7149
|
desc: "tag of the update",
|
|
7143
7150
|
default: "latest",
|
|
7144
7151
|
enum: ["latest", "dev", "canary", "beta", "rc", "alpha"]
|
|
7152
|
+
})),
|
|
7153
|
+
__decorateParam(5, Option("init", {
|
|
7154
|
+
type: "boolean",
|
|
7155
|
+
desc: "Do you want to initialize the workspace? (Recommended)",
|
|
7156
|
+
default: true
|
|
7145
7157
|
}))
|
|
7146
7158
|
], WorkspaceCommand.prototype, "createWorkspace", 1);
|
|
7147
7159
|
__decorateClass([
|
|
@@ -437,16 +437,19 @@ initProductChat(productId: string) {
|
|
|
437
437
|
## Best Practices
|
|
438
438
|
|
|
439
439
|
1. **Naming Conventions**:
|
|
440
|
+
|
|
440
441
|
- Use `modelList{Context}` for slice names (e.g., `productListByCategory`)
|
|
441
442
|
- Use camelCase for state properties
|
|
442
443
|
- Use action verbs for method names
|
|
443
444
|
|
|
444
445
|
2. **State Management**:
|
|
446
|
+
|
|
445
447
|
- Keep UI state (loading, selected items) in the store
|
|
446
448
|
- Use `this.pick()` for accessing multiple properties
|
|
447
449
|
- Create new references for objects/arrays when updating
|
|
448
450
|
|
|
449
451
|
3. **Performance**:
|
|
452
|
+
|
|
450
453
|
- Use selective subscriptions in components:
|
|
451
454
|
```typescript
|
|
452
455
|
// Subscribe to specific state properties
|
|
@@ -456,11 +459,13 @@ initProductChat(productId: string) {
|
|
|
456
459
|
- Clean up subscriptions when components unmount
|
|
457
460
|
|
|
458
461
|
4. **Error Handling**:
|
|
462
|
+
|
|
459
463
|
- Use the `@Toast` decorator for user notifications
|
|
460
464
|
- Always reset loading states in finally blocks
|
|
461
465
|
- Implement retry logic for critical operations
|
|
462
466
|
|
|
463
467
|
5. **Testing**:
|
|
468
|
+
|
|
464
469
|
- Mock stores with initial state for unit tests
|
|
465
470
|
|
|
466
471
|
```typescript
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
{{- $namespaceParts := split "-" .Release.Namespace }}
|
|
2
|
+
{{- $branch := index $namespaceParts "_1" }}
|
|
3
|
+
{{- $config := index .Values $branch }}
|
|
4
|
+
---
|
|
5
|
+
apiVersion: apps/v1
|
|
6
|
+
kind: Deployment
|
|
7
|
+
metadata:
|
|
8
|
+
name: frontend-deployment
|
|
9
|
+
namespace: {{ .Values.appName }}-{{ $branch }}
|
|
10
|
+
labels:
|
|
11
|
+
app: frontend
|
|
12
|
+
spec:
|
|
13
|
+
replicas: {{ $config.frontend.replicas }}
|
|
14
|
+
selector:
|
|
15
|
+
matchLabels:
|
|
16
|
+
app: frontend
|
|
17
|
+
template:
|
|
18
|
+
metadata:
|
|
19
|
+
labels:
|
|
20
|
+
app: frontend
|
|
21
|
+
spec:
|
|
22
|
+
containers:
|
|
23
|
+
- name: frontend
|
|
24
|
+
image: registry.akamir.com/{{ .Values.repoName }}/{{ .Values.appName }}/frontend:{{ $branch }}-live
|
|
25
|
+
imagePullPolicy: Always
|
|
26
|
+
ports:
|
|
27
|
+
- containerPort: 4200
|
|
28
|
+
resources:
|
|
29
|
+
requests:
|
|
30
|
+
memory: {{ $config.frontend.resources.requests.memory }}
|
|
31
|
+
cpu: {{ $config.frontend.resources.requests.cpu }}
|
|
32
|
+
limits:
|
|
33
|
+
memory: {{ $config.frontend.resources.limits.memory }}
|
|
34
|
+
cpu: {{ $config.frontend.resources.limits.cpu }}
|
|
35
|
+
imagePullSecrets:
|
|
36
|
+
- name: regcred
|
|
37
|
+
---
|
|
38
|
+
apiVersion: v1
|
|
39
|
+
kind: Service
|
|
40
|
+
metadata:
|
|
41
|
+
name: frontend-svc
|
|
42
|
+
namespace: {{ .Values.appName }}-{{ $branch }}
|
|
43
|
+
spec:
|
|
44
|
+
selector:
|
|
45
|
+
app: frontend
|
|
46
|
+
ports:
|
|
47
|
+
- protocol: TCP
|
|
48
|
+
port: 4200
|
|
49
|
+
targetPort: 4200
|
|
50
|
+
---
|
|
51
|
+
apiVersion: networking.k8s.io/v1
|
|
52
|
+
kind: Ingress
|
|
53
|
+
metadata:
|
|
54
|
+
name: app-ingress
|
|
55
|
+
namespace: {{ .Values.appName }}-{{ $branch }}
|
|
56
|
+
annotations:
|
|
57
|
+
ingress.kubernetes.io/ssl-redirect: "true"
|
|
58
|
+
kubernetes.io/tls-acme: "true"
|
|
59
|
+
cert-manager.io/cluster-issuer: letsencrypt-prod
|
|
60
|
+
nginx.ingress.kubernetes.io/enable-cors: "true"
|
|
61
|
+
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
|
62
|
+
nginx.ingress.kubernetes.io/affinity: "cookie"
|
|
63
|
+
nginx.ingress.kubernetes.io/session-cookie-name: "route"
|
|
64
|
+
nginx.ingress.kubernetes.io/session-cookie-expires: "172800"
|
|
65
|
+
nginx.ingress.kubernetes.io/session-cookie-max-age: "172800"
|
|
66
|
+
nginx.ingress.kubernetes.io/cors-allow-headers: "DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization,apollo-require-preflight"
|
|
67
|
+
nginx.ingress.kubernetes.io/use-regex: "true"
|
|
68
|
+
nginx.ingress.kubernetes.io/allow-snippet-annotations: "true"
|
|
69
|
+
nginx.ingress.kubernetes.io/rewrite-target: /$2$3
|
|
70
|
+
nginx.ingress.kubernetes.io/proxy-buffer-size: "16k"
|
|
71
|
+
nginx.ingress.kubernetes.io/proxy-buffers-number: "4"
|
|
72
|
+
nginx.ingress.kubernetes.io/proxy-busy-buffers-size: "24k"
|
|
73
|
+
spec:
|
|
74
|
+
ingressClassName: nginx
|
|
75
|
+
tls:
|
|
76
|
+
- hosts:
|
|
77
|
+
- {{ .Values.appName }}-{{ $branch }}.akamir.com
|
|
78
|
+
{{- range $i, $subRoute := .Values.subRoutes }}
|
|
79
|
+
- {{ $subRoute }}-{{ $branch }}.akamir.com
|
|
80
|
+
{{ end}}
|
|
81
|
+
{{- range $i, $domain := $config.domains }}
|
|
82
|
+
- {{ $domain }}
|
|
83
|
+
{{ end}}
|
|
84
|
+
secretName: cert-{{ .Values.appName }}-{{ $branch }}
|
|
85
|
+
rules:
|
|
86
|
+
- host: {{ .Values.appName }}-{{ $branch }}.akamir.com
|
|
87
|
+
http:
|
|
88
|
+
paths:
|
|
89
|
+
- path: /(search)(.*)
|
|
90
|
+
pathType: ImplementationSpecific
|
|
91
|
+
backend:
|
|
92
|
+
service:
|
|
93
|
+
name: meili-svc
|
|
94
|
+
port:
|
|
95
|
+
number: 7700
|
|
96
|
+
- path: /()(backend)(.*)
|
|
97
|
+
pathType: ImplementationSpecific
|
|
98
|
+
backend:
|
|
99
|
+
service:
|
|
100
|
+
name: backend-svc
|
|
101
|
+
port:
|
|
102
|
+
number: 8080
|
|
103
|
+
- path: /()(socket.io)(.*)
|
|
104
|
+
pathType: ImplementationSpecific
|
|
105
|
+
backend:
|
|
106
|
+
service:
|
|
107
|
+
name: backend-svc
|
|
108
|
+
port:
|
|
109
|
+
number: 8080
|
|
110
|
+
- path: /()(.*)
|
|
111
|
+
pathType: ImplementationSpecific
|
|
112
|
+
backend:
|
|
113
|
+
service:
|
|
114
|
+
name: frontend-svc
|
|
115
|
+
port:
|
|
116
|
+
number: 4200
|
|
117
|
+
{{- range $i, $subRoute := .Values.subRoutes }}
|
|
118
|
+
- host: {{ $subRoute }}-{{ $branch }}.akamir.com
|
|
119
|
+
http:
|
|
120
|
+
paths:
|
|
121
|
+
- path: /(search)(.*)
|
|
122
|
+
pathType: ImplementationSpecific
|
|
123
|
+
backend:
|
|
124
|
+
service:
|
|
125
|
+
name: meili-svc
|
|
126
|
+
port:
|
|
127
|
+
number: 7700
|
|
128
|
+
- path: /()(backend)(.*)
|
|
129
|
+
pathType: ImplementationSpecific
|
|
130
|
+
backend:
|
|
131
|
+
service:
|
|
132
|
+
name: backend-svc
|
|
133
|
+
port:
|
|
134
|
+
number: 8080
|
|
135
|
+
- path: /()(socket.io)(.*)
|
|
136
|
+
pathType: ImplementationSpecific
|
|
137
|
+
backend:
|
|
138
|
+
service:
|
|
139
|
+
name: backend-svc
|
|
140
|
+
port:
|
|
141
|
+
number: 8080
|
|
142
|
+
- path: /()(.*)
|
|
143
|
+
pathType: ImplementationSpecific
|
|
144
|
+
backend:
|
|
145
|
+
service:
|
|
146
|
+
name: frontend-svc
|
|
147
|
+
port:
|
|
148
|
+
number: 4200
|
|
149
|
+
{{ end }}
|
|
150
|
+
{{- range $i, $domain := $config.domains }}
|
|
151
|
+
- host: {{ $domain }}
|
|
152
|
+
http:
|
|
153
|
+
paths:
|
|
154
|
+
- path: /(search)(.*)
|
|
155
|
+
pathType: ImplementationSpecific
|
|
156
|
+
backend:
|
|
157
|
+
service:
|
|
158
|
+
name: meili-svc
|
|
159
|
+
port:
|
|
160
|
+
number: 7700
|
|
161
|
+
- path: /()(backend)(.*)
|
|
162
|
+
pathType: ImplementationSpecific
|
|
163
|
+
backend:
|
|
164
|
+
service:
|
|
165
|
+
name: backend-svc
|
|
166
|
+
port:
|
|
167
|
+
number: 8080
|
|
168
|
+
- path: /()(socket.io)(.*)
|
|
169
|
+
pathType: ImplementationSpecific
|
|
170
|
+
backend:
|
|
171
|
+
service:
|
|
172
|
+
name: backend-svc
|
|
173
|
+
port:
|
|
174
|
+
number: 8080
|
|
175
|
+
- path: /()(.*)
|
|
176
|
+
pathType: ImplementationSpecific
|
|
177
|
+
backend:
|
|
178
|
+
service:
|
|
179
|
+
name: frontend-svc
|
|
180
|
+
port:
|
|
181
|
+
number: 4200
|
|
182
|
+
{{ end }}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
repoName: undefined
|
|
2
|
+
appName: undefined
|
|
3
|
+
subRoutes: []
|
|
4
|
+
debug:
|
|
5
|
+
domains: []
|
|
6
|
+
backend:
|
|
7
|
+
federation:
|
|
8
|
+
replicas: 1
|
|
9
|
+
resources:
|
|
10
|
+
requests:
|
|
11
|
+
memory: 250M
|
|
12
|
+
cpu: "0.05"
|
|
13
|
+
limits:
|
|
14
|
+
memory: 1G
|
|
15
|
+
cpu: "0.5"
|
|
16
|
+
batch:
|
|
17
|
+
resources:
|
|
18
|
+
requests:
|
|
19
|
+
memory: 250M
|
|
20
|
+
cpu: "0.05"
|
|
21
|
+
limits:
|
|
22
|
+
memory: 1G
|
|
23
|
+
cpu: "0.5"
|
|
24
|
+
frontend:
|
|
25
|
+
replicas: 1
|
|
26
|
+
resources:
|
|
27
|
+
requests:
|
|
28
|
+
memory: 250M
|
|
29
|
+
cpu: "0.1"
|
|
30
|
+
limits:
|
|
31
|
+
memory: 1G
|
|
32
|
+
cpu: "0.5"
|
|
33
|
+
redis:
|
|
34
|
+
replicas: 1
|
|
35
|
+
resources:
|
|
36
|
+
requests:
|
|
37
|
+
cpu: "0.05"
|
|
38
|
+
memory: 200M
|
|
39
|
+
limits:
|
|
40
|
+
cpu: "1"
|
|
41
|
+
memory: 2G
|
|
42
|
+
mongo:
|
|
43
|
+
replicas: 1
|
|
44
|
+
storage:
|
|
45
|
+
data: 2G
|
|
46
|
+
logs: 0.5G
|
|
47
|
+
resources:
|
|
48
|
+
requests:
|
|
49
|
+
cpu: "0.15"
|
|
50
|
+
memory: 200M
|
|
51
|
+
limits:
|
|
52
|
+
cpu: "4"
|
|
53
|
+
memory: 4G
|
|
54
|
+
meili:
|
|
55
|
+
storage:
|
|
56
|
+
data: 2G
|
|
57
|
+
resources:
|
|
58
|
+
requests:
|
|
59
|
+
cpu: "0.15"
|
|
60
|
+
memory: 200M
|
|
61
|
+
limits:
|
|
62
|
+
cpu: "4"
|
|
63
|
+
memory: 4G
|
|
64
|
+
develop:
|
|
65
|
+
domains: []
|
|
66
|
+
backend:
|
|
67
|
+
federation:
|
|
68
|
+
replicas: 1
|
|
69
|
+
resources:
|
|
70
|
+
requests:
|
|
71
|
+
memory: 250M
|
|
72
|
+
cpu: "0.05"
|
|
73
|
+
limits:
|
|
74
|
+
memory: 1G
|
|
75
|
+
cpu: "0.5"
|
|
76
|
+
batch:
|
|
77
|
+
resources:
|
|
78
|
+
requests:
|
|
79
|
+
memory: 250M
|
|
80
|
+
cpu: "0.05"
|
|
81
|
+
limits:
|
|
82
|
+
memory: 1G
|
|
83
|
+
cpu: "0.5"
|
|
84
|
+
frontend:
|
|
85
|
+
replicas: 1
|
|
86
|
+
resources:
|
|
87
|
+
requests:
|
|
88
|
+
memory: 250M
|
|
89
|
+
cpu: "0.1"
|
|
90
|
+
limits:
|
|
91
|
+
memory: 1G
|
|
92
|
+
cpu: "0.5"
|
|
93
|
+
redis:
|
|
94
|
+
replicas: 1
|
|
95
|
+
resources:
|
|
96
|
+
requests:
|
|
97
|
+
cpu: "0.05"
|
|
98
|
+
memory: 200M
|
|
99
|
+
limits:
|
|
100
|
+
cpu: "1"
|
|
101
|
+
memory: 2G
|
|
102
|
+
mongo:
|
|
103
|
+
replicas: 1
|
|
104
|
+
storage:
|
|
105
|
+
data: 2G
|
|
106
|
+
logs: 0.5G
|
|
107
|
+
resources:
|
|
108
|
+
requests:
|
|
109
|
+
cpu: "0.15"
|
|
110
|
+
memory: 200M
|
|
111
|
+
limits:
|
|
112
|
+
cpu: "4"
|
|
113
|
+
memory: 4G
|
|
114
|
+
meili:
|
|
115
|
+
storage:
|
|
116
|
+
data: 2G
|
|
117
|
+
resources:
|
|
118
|
+
requests:
|
|
119
|
+
cpu: "0.15"
|
|
120
|
+
memory: 200M
|
|
121
|
+
limits:
|
|
122
|
+
cpu: "4"
|
|
123
|
+
memory: 4G
|
|
124
|
+
main:
|
|
125
|
+
domains: []
|
|
126
|
+
backend:
|
|
127
|
+
federation:
|
|
128
|
+
replicas: 1
|
|
129
|
+
resources:
|
|
130
|
+
requests:
|
|
131
|
+
memory: 250M
|
|
132
|
+
cpu: "0.05"
|
|
133
|
+
limits:
|
|
134
|
+
memory: 1G
|
|
135
|
+
cpu: "0.5"
|
|
136
|
+
batch:
|
|
137
|
+
resources:
|
|
138
|
+
requests:
|
|
139
|
+
memory: 250M
|
|
140
|
+
cpu: "0.05"
|
|
141
|
+
limits:
|
|
142
|
+
memory: 1G
|
|
143
|
+
cpu: "0.5"
|
|
144
|
+
frontend:
|
|
145
|
+
replicas: 1
|
|
146
|
+
resources:
|
|
147
|
+
requests:
|
|
148
|
+
memory: 1G
|
|
149
|
+
cpu: "1"
|
|
150
|
+
limits:
|
|
151
|
+
memory: 4G
|
|
152
|
+
cpu: "4"
|
|
153
|
+
redis:
|
|
154
|
+
replicas: 1
|
|
155
|
+
resources:
|
|
156
|
+
requests:
|
|
157
|
+
cpu: "0.05"
|
|
158
|
+
memory: 200M
|
|
159
|
+
limits:
|
|
160
|
+
cpu: "1"
|
|
161
|
+
memory: 2G
|
|
162
|
+
mongo:
|
|
163
|
+
replicas: 1
|
|
164
|
+
storage:
|
|
165
|
+
data: 2G
|
|
166
|
+
logs: 0.5G
|
|
167
|
+
resources:
|
|
168
|
+
requests:
|
|
169
|
+
cpu: "0.15"
|
|
170
|
+
memory: 200M
|
|
171
|
+
limits:
|
|
172
|
+
cpu: "4"
|
|
173
|
+
memory: 4G
|
|
174
|
+
meili:
|
|
175
|
+
storage:
|
|
176
|
+
data: 2G
|
|
177
|
+
resources:
|
|
178
|
+
requests:
|
|
179
|
+
cpu: "0.15"
|
|
180
|
+
memory: 200M
|
|
181
|
+
limits:
|
|
182
|
+
cpu: "4"
|
|
183
|
+
memory: 4G
|
package/package.json
CHANGED
|
@@ -437,16 +437,19 @@ initProductChat(productId: string) {
|
|
|
437
437
|
## Best Practices
|
|
438
438
|
|
|
439
439
|
1. **Naming Conventions**:
|
|
440
|
+
|
|
440
441
|
- Use `modelList{Context}` for slice names (e.g., `productListByCategory`)
|
|
441
442
|
- Use camelCase for state properties
|
|
442
443
|
- Use action verbs for method names
|
|
443
444
|
|
|
444
445
|
2. **State Management**:
|
|
446
|
+
|
|
445
447
|
- Keep UI state (loading, selected items) in the store
|
|
446
448
|
- Use `this.pick()` for accessing multiple properties
|
|
447
449
|
- Create new references for objects/arrays when updating
|
|
448
450
|
|
|
449
451
|
3. **Performance**:
|
|
452
|
+
|
|
450
453
|
- Use selective subscriptions in components:
|
|
451
454
|
```typescript
|
|
452
455
|
// Subscribe to specific state properties
|
|
@@ -456,11 +459,13 @@ initProductChat(productId: string) {
|
|
|
456
459
|
- Clean up subscriptions when components unmount
|
|
457
460
|
|
|
458
461
|
4. **Error Handling**:
|
|
462
|
+
|
|
459
463
|
- Use the `@Toast` decorator for user notifications
|
|
460
464
|
- Always reset loading states in finally blocks
|
|
461
465
|
- Implement retry logic for critical operations
|
|
462
466
|
|
|
463
467
|
5. **Testing**:
|
|
468
|
+
|
|
464
469
|
- Mock stores with initial state for unit tests
|
|
465
470
|
|
|
466
471
|
```typescript
|
|
@@ -2,7 +2,7 @@ import { Exec, Workspace } from "@akanjs/devkit";
|
|
|
2
2
|
import { WorkspaceScript } from "./workspace.script";
|
|
3
3
|
export declare class WorkspaceCommand {
|
|
4
4
|
workspaceScript: WorkspaceScript;
|
|
5
|
-
createWorkspace(workspaceName: string, app: string, dir: string, libs: boolean, tag: string): Promise<void>;
|
|
5
|
+
createWorkspace(workspaceName: string, app: string, dir: string, libs: boolean, tag: string, init: boolean): Promise<void>;
|
|
6
6
|
generateMongo(workspace: Workspace): Promise<void>;
|
|
7
7
|
lint(exec: Exec, fix: boolean, workspace: Workspace): Promise<void>;
|
|
8
8
|
lintAll(fix: boolean, workspace: Workspace): Promise<void>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Exec, type Workspace } from "@akanjs/devkit";
|
|
2
2
|
import { WorkspaceExecutor } from "@akanjs/devkit";
|
|
3
3
|
export declare class WorkspaceRunner {
|
|
4
|
-
createWorkspace(repoName: string, appName: string, { dirname, tag }: {
|
|
4
|
+
createWorkspace(repoName: string, appName: string, { dirname, tag, init }: {
|
|
5
5
|
dirname?: string;
|
|
6
6
|
tag?: string;
|
|
7
|
+
init?: boolean;
|
|
7
8
|
}): Promise<WorkspaceExecutor>;
|
|
8
9
|
generateMongo(workspace: Workspace): Promise<void>;
|
|
9
10
|
lint(exec: Exec, workspace: Workspace, { fix }?: {
|
|
@@ -5,10 +5,11 @@ export declare class WorkspaceScript {
|
|
|
5
5
|
#private;
|
|
6
6
|
applicationScript: ApplicationScript;
|
|
7
7
|
libraryScript: LibraryScript;
|
|
8
|
-
createWorkspace(repoName: string, appName: string, { dirname, installLibs, tag }: {
|
|
8
|
+
createWorkspace(repoName: string, appName: string, { dirname, installLibs, tag, init, }: {
|
|
9
9
|
dirname?: string;
|
|
10
10
|
installLibs?: boolean;
|
|
11
11
|
tag?: string;
|
|
12
|
+
init?: boolean;
|
|
12
13
|
}): Promise<void>;
|
|
13
14
|
generateMongo(workspace: Workspace): Promise<void>;
|
|
14
15
|
lint(exec: Exec, workspace: Workspace, { fix }?: {
|