@xrystal/core 3.52.5 → 3.52.7
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/README.md +8 -2
- package/package.json +1 -1
- package/x/bin/commands/create.mjs +2 -4
- package/x/bin/commands/project-info.mjs +94 -0
- package/x/bin/commands/projects.mjs +1 -1
- package/x/bin/commands/sync.mjs +67 -101
- package/x/bin/commands/tmp.mjs +12 -9
- package/x/bin/helpers/.generated/seed-from-tmp.mjs +1 -0
- package/x/bin/helpers/.generated/tmp-schema.mjs +1 -0
- package/x/bin/helpers/.generated/workspace.mjs +3 -2
- package/x/bin/helpers/.generated/xrystal-home-registry.mjs +192 -44
- package/x/bin/helpers/cli-help.mjs +43 -13
- package/x/bin/helpers/project-context.mjs +147 -0
- package/x/bin/helpers/scaffold-service.mjs +2 -3
- package/x/bin/helpers/sync-project.mjs +76 -0
- package/x/bin/helpers/sync-scope.mjs +71 -0
- package/x/bin/helpers/tmp-config.mjs +25 -0
- package/x/bin/helpers/tmp-layout.mjs +2 -3
- package/x/bin/helpers/tmp-schema-version.mjs +46 -0
- package/x/bin/helpers/workspace-scaffold.mjs +4 -9
- package/x/bin/main-cli.js +10 -1
- package/x/dist/loader/kafka/index.js +7 -2
- package/x/dist/loader/logger/index.js +8 -6
- package/x/dist/loader/mongo/index.js +9 -0
- package/x/dist/loader/redis/index.js +9 -0
- package/x/dist/project/index.d.ts +1 -0
- package/x/dist/project/index.js +21 -14
- package/x/dist/utils/constants/defaults.json +1 -0
- package/x/dist/utils/helpers/loader-options/index.d.ts +5 -0
- package/x/dist/utils/helpers/loader-options/index.js +16 -0
- package/x/dist/utils/helpers/tmp/index.d.ts +1 -0
- package/x/dist/utils/helpers/tmp/index.js +1 -0
- package/x/dist/utils/helpers/tmp/loader-boot-plan.d.ts +10 -0
- package/x/dist/utils/helpers/tmp/loader-boot-plan.js +36 -0
- package/x/dist/utils/helpers/workspace/index.d.ts +1 -1
- package/x/dist/utils/helpers/workspace/index.js +2 -2
- package/x/templates/api-service/tmp.yml +7 -1
- package/x/templates/frontend/tmp.yml +61 -0
- package/x/tmp.yml +1 -1
- package/x/bin/helpers/tmp-end-version.mjs +0 -35
|
@@ -41,6 +41,12 @@ configs:
|
|
|
41
41
|
options:
|
|
42
42
|
enabled: true
|
|
43
43
|
queueLogEnabled: true
|
|
44
|
+
redis:
|
|
45
|
+
options:
|
|
46
|
+
enabled: true
|
|
47
|
+
mongo:
|
|
48
|
+
options:
|
|
49
|
+
enabled: true
|
|
44
50
|
loggers:
|
|
45
51
|
loadPath: logs
|
|
46
52
|
logLevel: debug
|
|
@@ -56,4 +62,4 @@ configs:
|
|
|
56
62
|
controller:
|
|
57
63
|
|
|
58
64
|
end:
|
|
59
|
-
version:
|
|
65
|
+
version: 1
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
project:
|
|
2
|
+
name: "{{xry}}"
|
|
3
|
+
|
|
4
|
+
configs:
|
|
5
|
+
global:
|
|
6
|
+
type: frontend
|
|
7
|
+
runtime: bun
|
|
8
|
+
framework: fetch
|
|
9
|
+
paths:
|
|
10
|
+
root: ./x
|
|
11
|
+
tmp: tmp.yml
|
|
12
|
+
source: ./source
|
|
13
|
+
special:
|
|
14
|
+
tests: tests
|
|
15
|
+
environments: environments
|
|
16
|
+
dist: dist
|
|
17
|
+
vars:
|
|
18
|
+
xry: xry
|
|
19
|
+
build:
|
|
20
|
+
bundler: auto
|
|
21
|
+
typecheck: false
|
|
22
|
+
tscLenient: true
|
|
23
|
+
options:
|
|
24
|
+
fileWatchIntervalMs: 500
|
|
25
|
+
|
|
26
|
+
depends:
|
|
27
|
+
protocols:
|
|
28
|
+
- http
|
|
29
|
+
loaders:
|
|
30
|
+
configs:
|
|
31
|
+
loadPath: '@/utils/helpers/configs/index'
|
|
32
|
+
system:
|
|
33
|
+
gStore:
|
|
34
|
+
options:
|
|
35
|
+
bootstrap: true
|
|
36
|
+
autoCreateProps: true
|
|
37
|
+
kafka:
|
|
38
|
+
options:
|
|
39
|
+
enabled: false
|
|
40
|
+
queueLogEnabled: false
|
|
41
|
+
redis:
|
|
42
|
+
options:
|
|
43
|
+
enabled: false
|
|
44
|
+
mongo:
|
|
45
|
+
options:
|
|
46
|
+
enabled: false
|
|
47
|
+
loggers:
|
|
48
|
+
loadPath: logs
|
|
49
|
+
logLevel: info
|
|
50
|
+
localization:
|
|
51
|
+
loadPath: assets/langs
|
|
52
|
+
fallbackLang: en
|
|
53
|
+
preloadLangs:
|
|
54
|
+
- en
|
|
55
|
+
- tr
|
|
56
|
+
dto:
|
|
57
|
+
withDefaultHeaders: true
|
|
58
|
+
controller:
|
|
59
|
+
|
|
60
|
+
end:
|
|
61
|
+
version: 1
|
package/x/tmp.yml
CHANGED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import fs from 'node:fs'
|
|
2
|
-
import yaml from 'yaml'
|
|
3
|
-
|
|
4
|
-
/** tmp.yml end.version tracks @xrystal/core CLI semver (not a schema id). */
|
|
5
|
-
export function readTmpEndVersion(tmpFilePath) {
|
|
6
|
-
if (!fs.existsSync(tmpFilePath)) return null
|
|
7
|
-
const doc = yaml.parse(fs.readFileSync(tmpFilePath, 'utf8'))
|
|
8
|
-
const raw = doc?.end?.version
|
|
9
|
-
if (raw === undefined || raw === null || raw === '') return null
|
|
10
|
-
return String(raw).trim()
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export function patchTmpEndVersion(tmpFilePath, coreVersion, { write = true } = {}) {
|
|
14
|
-
if (!fs.existsSync(tmpFilePath)) {
|
|
15
|
-
return { patched: false, reason: 'missing tmp.yml' }
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const version = String(coreVersion ?? '').trim()
|
|
19
|
-
if (!version) {
|
|
20
|
-
return { patched: false, reason: 'empty version' }
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const doc = yaml.parse(fs.readFileSync(tmpFilePath, 'utf8'))
|
|
24
|
-
const prev = doc?.end?.version != null ? String(doc.end.version).trim() : null
|
|
25
|
-
if (prev === version) {
|
|
26
|
-
return { patched: false, reason: 'up-to-date', version, previous: prev }
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
doc.end = { ...(doc.end ?? {}), version }
|
|
30
|
-
if (write) {
|
|
31
|
-
fs.writeFileSync(tmpFilePath, yaml.stringify(doc))
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return { patched: true, version, previous: prev }
|
|
35
|
-
}
|