@cicore/cli 1.0.0
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/bin/ci.js +13 -0
- package/dist/commands/addon/api-actions.d.ts +45 -0
- package/dist/commands/addon/api-actions.d.ts.map +1 -0
- package/dist/commands/addon/api-actions.js +281 -0
- package/dist/commands/addon/api-actions.js.map +1 -0
- package/dist/commands/addon/build.d.ts +11 -0
- package/dist/commands/addon/build.d.ts.map +1 -0
- package/dist/commands/addon/build.js +182 -0
- package/dist/commands/addon/build.js.map +1 -0
- package/dist/commands/addon/create.d.ts +11 -0
- package/dist/commands/addon/create.d.ts.map +1 -0
- package/dist/commands/addon/create.js +1186 -0
- package/dist/commands/addon/create.js.map +1 -0
- package/dist/commands/addon/delete.d.ts +13 -0
- package/dist/commands/addon/delete.d.ts.map +1 -0
- package/dist/commands/addon/delete.js +83 -0
- package/dist/commands/addon/delete.js.map +1 -0
- package/dist/commands/addon/deploy.d.ts +27 -0
- package/dist/commands/addon/deploy.d.ts.map +1 -0
- package/dist/commands/addon/deploy.js +459 -0
- package/dist/commands/addon/deploy.js.map +1 -0
- package/dist/commands/addon/dev-deploy.d.ts +31 -0
- package/dist/commands/addon/dev-deploy.d.ts.map +1 -0
- package/dist/commands/addon/dev-deploy.js +128 -0
- package/dist/commands/addon/dev-deploy.js.map +1 -0
- package/dist/commands/addon/dev.d.ts +36 -0
- package/dist/commands/addon/dev.d.ts.map +1 -0
- package/dist/commands/addon/dev.js +323 -0
- package/dist/commands/addon/dev.js.map +1 -0
- package/dist/commands/addon/extract-classes.d.ts +23 -0
- package/dist/commands/addon/extract-classes.d.ts.map +1 -0
- package/dist/commands/addon/extract-classes.js +281 -0
- package/dist/commands/addon/extract-classes.js.map +1 -0
- package/dist/commands/addon/generate-safelist.d.ts +24 -0
- package/dist/commands/addon/generate-safelist.d.ts.map +1 -0
- package/dist/commands/addon/generate-safelist.js +276 -0
- package/dist/commands/addon/generate-safelist.js.map +1 -0
- package/dist/commands/addon/index.d.ts +19 -0
- package/dist/commands/addon/index.d.ts.map +1 -0
- package/dist/commands/addon/index.js +296 -0
- package/dist/commands/addon/index.js.map +1 -0
- package/dist/commands/addon/init-repo.d.ts +25 -0
- package/dist/commands/addon/init-repo.d.ts.map +1 -0
- package/dist/commands/addon/init-repo.js +171 -0
- package/dist/commands/addon/init-repo.js.map +1 -0
- package/dist/commands/addon/install.d.ts +23 -0
- package/dist/commands/addon/install.d.ts.map +1 -0
- package/dist/commands/addon/install.js +84 -0
- package/dist/commands/addon/install.js.map +1 -0
- package/dist/commands/addon/list.d.ts +10 -0
- package/dist/commands/addon/list.d.ts.map +1 -0
- package/dist/commands/addon/list.js +102 -0
- package/dist/commands/addon/list.js.map +1 -0
- package/dist/commands/addon/manifest-refresh.d.ts +17 -0
- package/dist/commands/addon/manifest-refresh.d.ts.map +1 -0
- package/dist/commands/addon/manifest-refresh.js +48 -0
- package/dist/commands/addon/manifest-refresh.js.map +1 -0
- package/dist/commands/addon/migrate.d.ts +40 -0
- package/dist/commands/addon/migrate.d.ts.map +1 -0
- package/dist/commands/addon/migrate.js +236 -0
- package/dist/commands/addon/migrate.js.map +1 -0
- package/dist/commands/addon/publish.d.ts +33 -0
- package/dist/commands/addon/publish.d.ts.map +1 -0
- package/dist/commands/addon/publish.js +236 -0
- package/dist/commands/addon/publish.js.map +1 -0
- package/dist/commands/addon/scaffold-quality.d.ts +21 -0
- package/dist/commands/addon/scaffold-quality.d.ts.map +1 -0
- package/dist/commands/addon/scaffold-quality.js +90 -0
- package/dist/commands/addon/scaffold-quality.js.map +1 -0
- package/dist/commands/addon/sign.d.ts +9 -0
- package/dist/commands/addon/sign.d.ts.map +1 -0
- package/dist/commands/addon/sign.js +83 -0
- package/dist/commands/addon/sign.js.map +1 -0
- package/dist/commands/addon/toggle.d.ts +6 -0
- package/dist/commands/addon/toggle.d.ts.map +1 -0
- package/dist/commands/addon/toggle.js +46 -0
- package/dist/commands/addon/toggle.js.map +1 -0
- package/dist/commands/agent/index.d.ts +34 -0
- package/dist/commands/agent/index.d.ts.map +1 -0
- package/dist/commands/agent/index.js +564 -0
- package/dist/commands/agent/index.js.map +1 -0
- package/dist/commands/brand/index.d.ts +54 -0
- package/dist/commands/brand/index.d.ts.map +1 -0
- package/dist/commands/brand/index.js +367 -0
- package/dist/commands/brand/index.js.map +1 -0
- package/dist/commands/build/index.d.ts +53 -0
- package/dist/commands/build/index.d.ts.map +1 -0
- package/dist/commands/build/index.js +726 -0
- package/dist/commands/build/index.js.map +1 -0
- package/dist/commands/cache/flush-local.d.ts +31 -0
- package/dist/commands/cache/flush-local.d.ts.map +1 -0
- package/dist/commands/cache/flush-local.js +161 -0
- package/dist/commands/cache/flush-local.js.map +1 -0
- package/dist/commands/cache/index.d.ts +14 -0
- package/dist/commands/cache/index.d.ts.map +1 -0
- package/dist/commands/cache/index.js +453 -0
- package/dist/commands/cache/index.js.map +1 -0
- package/dist/commands/check/index.d.ts +8 -0
- package/dist/commands/check/index.d.ts.map +1 -0
- package/dist/commands/check/index.js +1316 -0
- package/dist/commands/check/index.js.map +1 -0
- package/dist/commands/cloudflare/index.d.ts +8 -0
- package/dist/commands/cloudflare/index.d.ts.map +1 -0
- package/dist/commands/cloudflare/index.js +453 -0
- package/dist/commands/cloudflare/index.js.map +1 -0
- package/dist/commands/core/create.d.ts +12 -0
- package/dist/commands/core/create.d.ts.map +1 -0
- package/dist/commands/core/create.js +206 -0
- package/dist/commands/core/create.js.map +1 -0
- package/dist/commands/core/delete.d.ts +11 -0
- package/dist/commands/core/delete.d.ts.map +1 -0
- package/dist/commands/core/delete.js +64 -0
- package/dist/commands/core/delete.js.map +1 -0
- package/dist/commands/core/env.d.ts +12 -0
- package/dist/commands/core/env.d.ts.map +1 -0
- package/dist/commands/core/env.js +95 -0
- package/dist/commands/core/env.js.map +1 -0
- package/dist/commands/core/health.d.ts +6 -0
- package/dist/commands/core/health.d.ts.map +1 -0
- package/dist/commands/core/health.js +215 -0
- package/dist/commands/core/health.js.map +1 -0
- package/dist/commands/core/index.d.ts +15 -0
- package/dist/commands/core/index.d.ts.map +1 -0
- package/dist/commands/core/index.js +86 -0
- package/dist/commands/core/index.js.map +1 -0
- package/dist/commands/core/list.d.ts +11 -0
- package/dist/commands/core/list.d.ts.map +1 -0
- package/dist/commands/core/list.js +58 -0
- package/dist/commands/core/list.js.map +1 -0
- package/dist/commands/core/rebuild.d.ts +13 -0
- package/dist/commands/core/rebuild.d.ts.map +1 -0
- package/dist/commands/core/rebuild.js +119 -0
- package/dist/commands/core/rebuild.js.map +1 -0
- package/dist/commands/db/index.d.ts +23 -0
- package/dist/commands/db/index.d.ts.map +1 -0
- package/dist/commands/db/index.js +355 -0
- package/dist/commands/db/index.js.map +1 -0
- package/dist/commands/db/promote-silo.d.ts +320 -0
- package/dist/commands/db/promote-silo.d.ts.map +1 -0
- package/dist/commands/db/promote-silo.js +930 -0
- package/dist/commands/db/promote-silo.js.map +1 -0
- package/dist/commands/db/relocate.d.ts +41 -0
- package/dist/commands/db/relocate.d.ts.map +1 -0
- package/dist/commands/db/relocate.js +482 -0
- package/dist/commands/db/relocate.js.map +1 -0
- package/dist/commands/db/rollback-silo.d.ts +44 -0
- package/dist/commands/db/rollback-silo.d.ts.map +1 -0
- package/dist/commands/db/rollback-silo.js +402 -0
- package/dist/commands/db/rollback-silo.js.map +1 -0
- package/dist/commands/deploy/index.d.ts +26 -0
- package/dist/commands/deploy/index.d.ts.map +1 -0
- package/dist/commands/deploy/index.js +107 -0
- package/dist/commands/deploy/index.js.map +1 -0
- package/dist/commands/devops/index.d.ts +6 -0
- package/dist/commands/devops/index.d.ts.map +1 -0
- package/dist/commands/devops/index.js +220 -0
- package/dist/commands/devops/index.js.map +1 -0
- package/dist/commands/domain/index.d.ts +8 -0
- package/dist/commands/domain/index.d.ts.map +1 -0
- package/dist/commands/domain/index.js +386 -0
- package/dist/commands/domain/index.js.map +1 -0
- package/dist/commands/image/index.d.ts +8 -0
- package/dist/commands/image/index.d.ts.map +1 -0
- package/dist/commands/image/index.js +308 -0
- package/dist/commands/image/index.js.map +1 -0
- package/dist/commands/install/factory-reset.d.ts +21 -0
- package/dist/commands/install/factory-reset.d.ts.map +1 -0
- package/dist/commands/install/factory-reset.js +83 -0
- package/dist/commands/install/factory-reset.js.map +1 -0
- package/dist/commands/install/index.d.ts +17 -0
- package/dist/commands/install/index.d.ts.map +1 -0
- package/dist/commands/install/index.js +44 -0
- package/dist/commands/install/index.js.map +1 -0
- package/dist/commands/install/install.d.ts +35 -0
- package/dist/commands/install/install.d.ts.map +1 -0
- package/dist/commands/install/install.js +171 -0
- package/dist/commands/install/install.js.map +1 -0
- package/dist/commands/login/index.d.ts +15 -0
- package/dist/commands/login/index.d.ts.map +1 -0
- package/dist/commands/login/index.js +58 -0
- package/dist/commands/login/index.js.map +1 -0
- package/dist/commands/nginx/index.d.ts +11 -0
- package/dist/commands/nginx/index.d.ts.map +1 -0
- package/dist/commands/nginx/index.js +580 -0
- package/dist/commands/nginx/index.js.map +1 -0
- package/dist/commands/server/bootstrap.d.ts +25 -0
- package/dist/commands/server/bootstrap.d.ts.map +1 -0
- package/dist/commands/server/bootstrap.js +260 -0
- package/dist/commands/server/bootstrap.js.map +1 -0
- package/dist/commands/server/index.d.ts +8 -0
- package/dist/commands/server/index.d.ts.map +1 -0
- package/dist/commands/server/index.js +2524 -0
- package/dist/commands/server/index.js.map +1 -0
- package/dist/commands/setup/index.d.ts +34 -0
- package/dist/commands/setup/index.d.ts.map +1 -0
- package/dist/commands/setup/index.js +423 -0
- package/dist/commands/setup/index.js.map +1 -0
- package/dist/commands/ssl/index.d.ts +8 -0
- package/dist/commands/ssl/index.d.ts.map +1 -0
- package/dist/commands/ssl/index.js +275 -0
- package/dist/commands/ssl/index.js.map +1 -0
- package/dist/commands/superadmin/index.d.ts +16 -0
- package/dist/commands/superadmin/index.d.ts.map +1 -0
- package/dist/commands/superadmin/index.js +81 -0
- package/dist/commands/superadmin/index.js.map +1 -0
- package/dist/commands/tenant/index.d.ts +6 -0
- package/dist/commands/tenant/index.d.ts.map +1 -0
- package/dist/commands/tenant/index.js +192 -0
- package/dist/commands/tenant/index.js.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +107 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/addon-sign.d.ts +23 -0
- package/dist/lib/addon-sign.d.ts.map +1 -0
- package/dist/lib/addon-sign.js +39 -0
- package/dist/lib/addon-sign.js.map +1 -0
- package/dist/lib/addon-sign.test.d.ts +2 -0
- package/dist/lib/addon-sign.test.d.ts.map +1 -0
- package/dist/lib/addon-sign.test.js +27 -0
- package/dist/lib/addon-sign.test.js.map +1 -0
- package/dist/lib/cdn.d.ts +25 -0
- package/dist/lib/cdn.d.ts.map +1 -0
- package/dist/lib/cdn.js +131 -0
- package/dist/lib/cdn.js.map +1 -0
- package/dist/lib/cloudflare.d.ts +133 -0
- package/dist/lib/cloudflare.d.ts.map +1 -0
- package/dist/lib/cloudflare.js +435 -0
- package/dist/lib/cloudflare.js.map +1 -0
- package/dist/lib/config.d.ts +96 -0
- package/dist/lib/config.d.ts.map +1 -0
- package/dist/lib/config.js +132 -0
- package/dist/lib/config.js.map +1 -0
- package/dist/lib/env.d.ts +8 -0
- package/dist/lib/env.d.ts.map +1 -0
- package/dist/lib/env.js +64 -0
- package/dist/lib/env.js.map +1 -0
- package/dist/lib/hosts.d.ts +194 -0
- package/dist/lib/hosts.d.ts.map +1 -0
- package/dist/lib/hosts.js +183 -0
- package/dist/lib/hosts.js.map +1 -0
- package/dist/lib/logger.d.ts +68 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +130 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/nginx-config.d.ts +78 -0
- package/dist/lib/nginx-config.d.ts.map +1 -0
- package/dist/lib/nginx-config.js +736 -0
- package/dist/lib/nginx-config.js.map +1 -0
- package/dist/lib/ops/addon-dev.d.ts +93 -0
- package/dist/lib/ops/addon-dev.d.ts.map +1 -0
- package/dist/lib/ops/addon-dev.js +237 -0
- package/dist/lib/ops/addon-dev.js.map +1 -0
- package/dist/lib/ops/addon-quality.d.ts +38 -0
- package/dist/lib/ops/addon-quality.d.ts.map +1 -0
- package/dist/lib/ops/addon-quality.js +338 -0
- package/dist/lib/ops/addon-quality.js.map +1 -0
- package/dist/lib/ops/addon-routes.d.ts +49 -0
- package/dist/lib/ops/addon-routes.d.ts.map +1 -0
- package/dist/lib/ops/addon-routes.js +189 -0
- package/dist/lib/ops/addon-routes.js.map +1 -0
- package/dist/lib/ops/addon.d.ts +120 -0
- package/dist/lib/ops/addon.d.ts.map +1 -0
- package/dist/lib/ops/addon.js +260 -0
- package/dist/lib/ops/addon.js.map +1 -0
- package/dist/lib/ops/cdn.d.ts +87 -0
- package/dist/lib/ops/cdn.d.ts.map +1 -0
- package/dist/lib/ops/cdn.js +170 -0
- package/dist/lib/ops/cdn.js.map +1 -0
- package/dist/lib/ops/cf.d.ts +36 -0
- package/dist/lib/ops/cf.d.ts.map +1 -0
- package/dist/lib/ops/cf.js +114 -0
- package/dist/lib/ops/cf.js.map +1 -0
- package/dist/lib/ops/compose.d.ts +95 -0
- package/dist/lib/ops/compose.d.ts.map +1 -0
- package/dist/lib/ops/compose.js +165 -0
- package/dist/lib/ops/compose.js.map +1 -0
- package/dist/lib/ops/core.d.ts +117 -0
- package/dist/lib/ops/core.d.ts.map +1 -0
- package/dist/lib/ops/core.js +322 -0
- package/dist/lib/ops/core.js.map +1 -0
- package/dist/lib/ops/db.d.ts +116 -0
- package/dist/lib/ops/db.d.ts.map +1 -0
- package/dist/lib/ops/db.js +351 -0
- package/dist/lib/ops/db.js.map +1 -0
- package/dist/lib/ops/dns.d.ts +111 -0
- package/dist/lib/ops/dns.d.ts.map +1 -0
- package/dist/lib/ops/dns.js +306 -0
- package/dist/lib/ops/dns.js.map +1 -0
- package/dist/lib/ops/image.d.ts +94 -0
- package/dist/lib/ops/image.d.ts.map +1 -0
- package/dist/lib/ops/image.js +159 -0
- package/dist/lib/ops/image.js.map +1 -0
- package/dist/lib/ops/nginx.d.ts +114 -0
- package/dist/lib/ops/nginx.d.ts.map +1 -0
- package/dist/lib/ops/nginx.js +388 -0
- package/dist/lib/ops/nginx.js.map +1 -0
- package/dist/lib/ops/redis.d.ts +7 -0
- package/dist/lib/ops/redis.d.ts.map +1 -0
- package/dist/lib/ops/redis.js +35 -0
- package/dist/lib/ops/redis.js.map +1 -0
- package/dist/lib/ops/ssh.d.ts +127 -0
- package/dist/lib/ops/ssh.d.ts.map +1 -0
- package/dist/lib/ops/ssh.js +269 -0
- package/dist/lib/ops/ssh.js.map +1 -0
- package/dist/lib/prompts.d.ts +46 -0
- package/dist/lib/prompts.d.ts.map +1 -0
- package/dist/lib/prompts.js +113 -0
- package/dist/lib/prompts.js.map +1 -0
- package/dist/lib/sast.d.ts +43 -0
- package/dist/lib/sast.d.ts.map +1 -0
- package/dist/lib/sast.js +79 -0
- package/dist/lib/sast.js.map +1 -0
- package/dist/lib/sast.test.d.ts +2 -0
- package/dist/lib/sast.test.d.ts.map +1 -0
- package/dist/lib/sast.test.js +33 -0
- package/dist/lib/sast.test.js.map +1 -0
- package/dist/lib/shell.d.ts +61 -0
- package/dist/lib/shell.d.ts.map +1 -0
- package/dist/lib/shell.js +183 -0
- package/dist/lib/shell.js.map +1 -0
- package/dist/lib/ssh-config.d.ts +37 -0
- package/dist/lib/ssh-config.d.ts.map +1 -0
- package/dist/lib/ssh-config.js +122 -0
- package/dist/lib/ssh-config.js.map +1 -0
- package/dist/lib/tenant-scope.d.ts +38 -0
- package/dist/lib/tenant-scope.d.ts.map +1 -0
- package/dist/lib/tenant-scope.js +129 -0
- package/dist/lib/tenant-scope.js.map +1 -0
- package/dist/lib/tenant-scope.test.d.ts +2 -0
- package/dist/lib/tenant-scope.test.d.ts.map +1 -0
- package/dist/lib/tenant-scope.test.js +223 -0
- package/dist/lib/tenant-scope.test.js.map +1 -0
- package/package.json +58 -0
- package/templates/bootstrap/.env.template +54 -0
- package/templates/bootstrap/docker-compose.yml +145 -0
- package/templates/vhost.conf.tmpl +446 -0
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Quality stack templates shared by `ci addon create` (new addons) and
|
|
3
|
+
* `ci addon scaffold-quality` (existing addon backport — Faz 5B).
|
|
4
|
+
*
|
|
5
|
+
* Tooling binaries (eslint, vue-tsc, prettier) live in dev-shell's
|
|
6
|
+
* top-level node_modules so a single `npm install` covers every addon
|
|
7
|
+
* on the machine — the configs here just point each addon's source
|
|
8
|
+
* files at the shared toolchain.
|
|
9
|
+
*
|
|
10
|
+
* Legacy .eslintrc.json instead of flat config: ESLint 9's flat config
|
|
11
|
+
* requires a JS module file in every addon (with explicit plugin
|
|
12
|
+
* imports). The legacy JSON form works fine in ESLint 8.x and stays
|
|
13
|
+
* personnel-friendly. We'll switch when the Vue + TypeScript plugin
|
|
14
|
+
* ecosystem catches up to flat config.
|
|
15
|
+
*/
|
|
16
|
+
export function genEslintConfig() {
|
|
17
|
+
return {
|
|
18
|
+
root: true,
|
|
19
|
+
env: { browser: true, es2022: true, node: true },
|
|
20
|
+
parser: 'vue-eslint-parser',
|
|
21
|
+
parserOptions: {
|
|
22
|
+
parser: '@typescript-eslint/parser',
|
|
23
|
+
ecmaVersion: 'latest',
|
|
24
|
+
sourceType: 'module',
|
|
25
|
+
extraFileExtensions: ['.vue'],
|
|
26
|
+
},
|
|
27
|
+
plugins: ['vue', '@typescript-eslint'],
|
|
28
|
+
extends: [
|
|
29
|
+
'eslint:recommended',
|
|
30
|
+
'plugin:vue/vue3-recommended',
|
|
31
|
+
'plugin:@typescript-eslint/recommended',
|
|
32
|
+
],
|
|
33
|
+
rules: {
|
|
34
|
+
// Single-word component names are common in addon page files
|
|
35
|
+
// (index.vue, list.vue). Vue's default rule would force PascalCase
|
|
36
|
+
// multi-word; ergonomically wrong for our routing layout.
|
|
37
|
+
'vue/multi-word-component-names': 'off',
|
|
38
|
+
'vue/html-self-closing': ['error', { html: { void: 'always', normal: 'always', component: 'always' } }],
|
|
39
|
+
// any-warnings rather than errors so addon authors can ship a TODO
|
|
40
|
+
// explicitly; the warning surfaces in the deploy quality gate.
|
|
41
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
42
|
+
'no-unused-vars': 'off',
|
|
43
|
+
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
|
|
44
|
+
'prefer-const': 'error',
|
|
45
|
+
'no-var': 'error',
|
|
46
|
+
},
|
|
47
|
+
ignorePatterns: ['dist/', 'node_modules/', '.vite-cache/', '*.d.ts', 'empty-devtools.js'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export function genPrettierConfig() {
|
|
51
|
+
return {
|
|
52
|
+
semi: false,
|
|
53
|
+
singleQuote: true,
|
|
54
|
+
tabWidth: 2,
|
|
55
|
+
printWidth: 100,
|
|
56
|
+
trailingComma: 'es5',
|
|
57
|
+
vueIndentScriptAndStyle: false,
|
|
58
|
+
endOfLine: 'lf',
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export function genEditorConfig() {
|
|
62
|
+
return `root = true
|
|
63
|
+
|
|
64
|
+
[*]
|
|
65
|
+
charset = utf-8
|
|
66
|
+
end_of_line = lf
|
|
67
|
+
indent_style = space
|
|
68
|
+
indent_size = 2
|
|
69
|
+
insert_final_newline = true
|
|
70
|
+
trim_trailing_whitespace = true
|
|
71
|
+
|
|
72
|
+
[*.md]
|
|
73
|
+
trim_trailing_whitespace = false
|
|
74
|
+
`;
|
|
75
|
+
}
|
|
76
|
+
export function genTsConfig() {
|
|
77
|
+
return {
|
|
78
|
+
compilerOptions: {
|
|
79
|
+
target: 'ES2022',
|
|
80
|
+
module: 'ESNext',
|
|
81
|
+
moduleResolution: 'Bundler',
|
|
82
|
+
// Lenient by default — addon authors are mostly writing Vue SFC
|
|
83
|
+
// glue code over @cicore/shared composables, not isolated TS
|
|
84
|
+
// libraries. Forcing strict mode out of the box would block deploys
|
|
85
|
+
// on every implicit-any parameter (callback args, event handlers,
|
|
86
|
+
// template refs). Personnel who want stronger guarantees can flip
|
|
87
|
+
// strict: true once their addon's @cicore/shared usage stabilises;
|
|
88
|
+
// the FUTURE typed SDK will let us re-enable globally.
|
|
89
|
+
strict: false,
|
|
90
|
+
noImplicitAny: false,
|
|
91
|
+
esModuleInterop: true,
|
|
92
|
+
skipLibCheck: true,
|
|
93
|
+
isolatedModules: true,
|
|
94
|
+
resolveJsonModule: true,
|
|
95
|
+
noEmit: true,
|
|
96
|
+
jsx: 'preserve',
|
|
97
|
+
lib: ['ES2022', 'DOM', 'DOM.Iterable'],
|
|
98
|
+
// vue types resolved from dev-shell/node_modules/vue (parent
|
|
99
|
+
// lookup) so the addon doesn't need its own node_modules.
|
|
100
|
+
types: ['vue'],
|
|
101
|
+
paths: {
|
|
102
|
+
'@/*': ['./*'],
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
include: ['**/*.ts', '**/*.vue', 'ui/entry.ts'],
|
|
106
|
+
exclude: ['node_modules', 'dist', '.vite-cache'],
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Ambient type declarations for the addon source. The runtime resolves
|
|
111
|
+
* `@cicore/shared` via the host's import map and `$fetch` is Nuxt's
|
|
112
|
+
* global, but vue-tsc has no way to find either without these shims.
|
|
113
|
+
* Declared as `any` for now — Faz 6 (SDK docs) ships richer type
|
|
114
|
+
* surfaces alongside the API reference and replaces these stubs.
|
|
115
|
+
*/
|
|
116
|
+
export function genAmbientTypes() {
|
|
117
|
+
return `// Ambient types for ciCore addon runtime. Replaced by the real
|
|
118
|
+
// @cicore/shared types when the SDK package ships (Faz 6 FUTURE).
|
|
119
|
+
|
|
120
|
+
declare module '@cicore/shared' {
|
|
121
|
+
// Runtime exports come from the host's import map — every Vue Composition
|
|
122
|
+
// API name, the useApi/useAuth/useI18n composables, and the Nuxt UI
|
|
123
|
+
// components are re-exported here. Typed as generic any-functions so
|
|
124
|
+
// calls like \`useApi<MyType>()\` and \`ref<MyType>(initial)\` work without
|
|
125
|
+
// raising TS error 2347 (Untyped function calls may not accept type
|
|
126
|
+
// arguments). Faz 6 (SDK docs) replaces these stubs with typed surfaces.
|
|
127
|
+
//
|
|
128
|
+
// NOTE: TypeScript doesn't have a "catch-all named exports" syntax, so
|
|
129
|
+
// every name an addon imports must appear here. If vue-tsc rejects an
|
|
130
|
+
// import you need, add it to this list (and to docs/addon-sdk in Faz 6).
|
|
131
|
+
|
|
132
|
+
// Generic any-callable — accepts type args, accepts any positional args,
|
|
133
|
+
// returns any. Permissive but lets vue-tsc see something callable.
|
|
134
|
+
type AnyFn = <T = any, R = any>(...args: any[]) => any
|
|
135
|
+
|
|
136
|
+
// Vue Composition API surface (re-exported by @cicore/shared)
|
|
137
|
+
export const ref: AnyFn
|
|
138
|
+
export const reactive: AnyFn
|
|
139
|
+
export const computed: AnyFn
|
|
140
|
+
export const watch: AnyFn
|
|
141
|
+
export const watchEffect: AnyFn
|
|
142
|
+
export const onMounted: AnyFn
|
|
143
|
+
export const onUnmounted: AnyFn
|
|
144
|
+
export const onBeforeMount: AnyFn
|
|
145
|
+
export const onBeforeUnmount: AnyFn
|
|
146
|
+
export const nextTick: AnyFn
|
|
147
|
+
export const defineComponent: AnyFn
|
|
148
|
+
export const defineProps: AnyFn
|
|
149
|
+
export const defineEmits: AnyFn
|
|
150
|
+
|
|
151
|
+
// ciCore platform composables
|
|
152
|
+
export const useI18n: AnyFn
|
|
153
|
+
export const useAuth: AnyFn
|
|
154
|
+
export const useApi: AnyFn
|
|
155
|
+
export const useAddons: AnyFn
|
|
156
|
+
export const useTenant: AnyFn
|
|
157
|
+
export const usePermissions: AnyFn
|
|
158
|
+
export const useIcon: AnyFn
|
|
159
|
+
export const useNuxtUI: AnyFn
|
|
160
|
+
export const useRuntimeConfig: AnyFn
|
|
161
|
+
export const useToast: AnyFn
|
|
162
|
+
export const useRouter: AnyFn
|
|
163
|
+
export const useRoute: AnyFn
|
|
164
|
+
export const useGsap: AnyFn
|
|
165
|
+
|
|
166
|
+
// Nuxt UI components — opaque to TS (real types in Faz 6)
|
|
167
|
+
export const Icon: any
|
|
168
|
+
export const UButton: any
|
|
169
|
+
export const UCard: any
|
|
170
|
+
export const UInput: any
|
|
171
|
+
export const UInputMenu: any
|
|
172
|
+
export const UModal: any
|
|
173
|
+
export const USelectMenu: any
|
|
174
|
+
export const USwitch: any
|
|
175
|
+
export const UAlert: any
|
|
176
|
+
export const UBadge: any
|
|
177
|
+
export const UTooltip: any
|
|
178
|
+
export const UFieldGroup: any
|
|
179
|
+
export const UForm: any
|
|
180
|
+
export const UFormField: any
|
|
181
|
+
export const UTextarea: any
|
|
182
|
+
export const UCheckbox: any
|
|
183
|
+
export const UTable: any
|
|
184
|
+
export const UPagination: any
|
|
185
|
+
export const UAvatar: any
|
|
186
|
+
export const UDropdownMenu: any
|
|
187
|
+
|
|
188
|
+
const _default: any
|
|
189
|
+
export default _default
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Nuxt global available to addon pages without explicit import.
|
|
193
|
+
declare const $fetch: <T = unknown>(url: string, opts?: Record<string, unknown>) => Promise<T>
|
|
194
|
+
|
|
195
|
+
// Vue SFC module shim so .vue imports resolve to a component type.
|
|
196
|
+
declare module '*.vue' {
|
|
197
|
+
import type { DefineComponent } from 'vue'
|
|
198
|
+
const component: DefineComponent<Record<string, unknown>, Record<string, unknown>, unknown>
|
|
199
|
+
export default component
|
|
200
|
+
}
|
|
201
|
+
`;
|
|
202
|
+
}
|
|
203
|
+
export function genGitlabCi(addonName) {
|
|
204
|
+
return `# Auto-generated by \`ci addon create ${addonName}\`. FAZ-3 git-workflow template.
|
|
205
|
+
#
|
|
206
|
+
# Pipeline: check (every push/MR) → build (every commit/MR/tag) → publish (tag + PUBLISH_TRIGGER)
|
|
207
|
+
#
|
|
208
|
+
# CI/CD variables — cicore-addons group #63'te tanımlı olmalı:
|
|
209
|
+
# Mevcut : CICORE_CLOUDFLARE_ZONE_ID, CICORE_CLOUDFLARE_API_TOKEN, CICORE_CDN_BASE_URL
|
|
210
|
+
# Ekle : CDN_GRANT_SECRET (HMAC-imza, publish.ts:L92)
|
|
211
|
+
# CICORE_CDN_API_KEY (CDN Gateway API key — Kasa vault: ci kasa get cicore cdn-api-key)
|
|
212
|
+
# CICORE_SSH_KEY (file — runner→cicore-host, enqueue için)
|
|
213
|
+
# CICORE_SSH_HOST (cicore deploy host IP/adı)
|
|
214
|
+
# CICORE_SSH_USER (deploy SSH kullanıcısı)
|
|
215
|
+
|
|
216
|
+
stages:
|
|
217
|
+
- check
|
|
218
|
+
- build
|
|
219
|
+
- publish
|
|
220
|
+
|
|
221
|
+
# ── Stage 1: Kalite kontrolü (her push + MR) ─────────────────────────────────
|
|
222
|
+
# KARAR-1 (erhan): Addon kendi devDeps kullanır — dev-shell coupling yok.
|
|
223
|
+
quality:
|
|
224
|
+
stage: check
|
|
225
|
+
image: node:22-alpine
|
|
226
|
+
cache:
|
|
227
|
+
key: \${CI_PROJECT_NAME}-node_modules
|
|
228
|
+
paths: [node_modules/]
|
|
229
|
+
script:
|
|
230
|
+
- npm ci --no-audit --no-fund
|
|
231
|
+
- npx eslint . --max-warnings 0
|
|
232
|
+
- npx vue-tsc --noEmit
|
|
233
|
+
allow_failure: false
|
|
234
|
+
rules:
|
|
235
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
236
|
+
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
237
|
+
|
|
238
|
+
# ── Stage 2: Frontend build (her commit + MR + tag) ──────────────────────────
|
|
239
|
+
# KARAR-1 (erhan): Addon kendi devDeps kullanır — dev-shell coupling yok, sürüm kayması önlenir.
|
|
240
|
+
build:
|
|
241
|
+
stage: build
|
|
242
|
+
image: node:22-alpine
|
|
243
|
+
cache:
|
|
244
|
+
key: \${CI_PROJECT_NAME}-node_modules
|
|
245
|
+
paths: [node_modules/]
|
|
246
|
+
script:
|
|
247
|
+
- npm ci --no-audit --no-fund
|
|
248
|
+
- npm run build
|
|
249
|
+
- test -f dist/entry.js || (echo "❌ dist/entry.js not found" && exit 1)
|
|
250
|
+
artifacts:
|
|
251
|
+
paths:
|
|
252
|
+
- dist/
|
|
253
|
+
expire_in: 1 hour
|
|
254
|
+
allow_failure: false
|
|
255
|
+
rules:
|
|
256
|
+
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
257
|
+
- if: $CI_COMMIT_BRANCH
|
|
258
|
+
- if: $CI_COMMIT_TAG
|
|
259
|
+
|
|
260
|
+
# ── Stage 3: Publish — 8-adım (main branch + tag, build başarılıysa) ─────────
|
|
261
|
+
# Erhan mimari onaylı sıra (publish.ts akışını yansıtır):
|
|
262
|
+
# Adım 1: Vite build → dist/ (build stage artifact)
|
|
263
|
+
# Adım 2: SAST (Semgrep) fail-closed
|
|
264
|
+
# Adım 3: Package Backend/ → pkg.tar.gz + dist/ → fe.zip
|
|
265
|
+
# Adım 4: SHA256 + HMAC-sign CDN_GRANT_SECRET ile (publish.ts:L92)
|
|
266
|
+
# Adım 5: Frontend → R2 CDN Gateway /upload-coreui-zip
|
|
267
|
+
# Adım 6: Backend pkg.tar.gz → R2 CDN Worker (zip wrapper)
|
|
268
|
+
# Adım 7: CF cache purge CICORE_CLOUDFLARE_ZONE_ID
|
|
269
|
+
# Adım 8: SSH enqueue cp_provisioning_jobs → AddonRegistryService
|
|
270
|
+
publish:
|
|
271
|
+
stage: publish
|
|
272
|
+
image: node:22-alpine
|
|
273
|
+
needs: [build]
|
|
274
|
+
before_script:
|
|
275
|
+
- apk add --no-cache openssh-client git
|
|
276
|
+
# CLI: VPN içi GitLab'dan git clone (npmjs publish beklenmez)
|
|
277
|
+
# CI/CD variable: CICORE_CLI_REPO (örn. http://10.20.20.28/cicore/cli.git)
|
|
278
|
+
# GITLAB_TOKEN (okuma yetkili PAT, group #63'te tanımlı)
|
|
279
|
+
- git clone --depth 1 "http://oauth2:$\{GITLAB_TOKEN}@$\{CICORE_CLI_REPO#http://}" /tmp/cicore-cli
|
|
280
|
+
- cd /tmp/cicore-cli && npm ci --no-audit --no-fund --prefer-offline
|
|
281
|
+
- export PATH="$PATH:/tmp/cicore-cli/bin"
|
|
282
|
+
- cd "$CI_PROJECT_DIR"
|
|
283
|
+
# SSH key kurulumu (Adım 8: enqueue)
|
|
284
|
+
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
|
|
285
|
+
- echo "$CICORE_SSH_KEY" > ~/.ssh/id_deploy && chmod 600 ~/.ssh/id_deploy
|
|
286
|
+
- ssh-keyscan -H "$CICORE_SSH_HOST" >> ~/.ssh/known_hosts 2>/dev/null
|
|
287
|
+
script:
|
|
288
|
+
# CI/CD variables (cicore-addons group #63'te tanımlı olmalı):
|
|
289
|
+
# CDN_GRANT_SECRET — HMAC-imza (publish.ts)
|
|
290
|
+
# CICORE_CDN_API_KEY — CDN Gateway API key
|
|
291
|
+
# CICORE_CDN_BASE_URL — CDN base URL
|
|
292
|
+
# CICORE_CLOUDFLARE_API_TOKEN
|
|
293
|
+
# CICORE_CLOUDFLARE_ZONE_ID
|
|
294
|
+
# CICORE_SSH_HOST + CICORE_SSH_USER + CICORE_SSH_KEY
|
|
295
|
+
# CICORE_CLI_REPO — http://10.20.20.28/cicore/cli.git
|
|
296
|
+
# GITLAB_TOKEN — okuma PAT
|
|
297
|
+
- VERSION=$(node -p "require('./addon.json').version")
|
|
298
|
+
- echo "Publishing ${addonName} v$VERSION..."
|
|
299
|
+
- ci addon publish ${addonName} --version "$VERSION" --requested-by ci
|
|
300
|
+
environment:
|
|
301
|
+
name: marketplace
|
|
302
|
+
allow_failure: false
|
|
303
|
+
rules:
|
|
304
|
+
- if: $CI_COMMIT_TAG
|
|
305
|
+
- if: $PUBLISH_TRIGGER
|
|
306
|
+
`;
|
|
307
|
+
}
|
|
308
|
+
export async function applyQualityTemplate(addonDir, addonName, options = {}) {
|
|
309
|
+
const fs = await import('fs-extra');
|
|
310
|
+
const path = await import('node:path');
|
|
311
|
+
const files = [
|
|
312
|
+
{ rel: '.eslintrc.json', content: genEslintConfig() },
|
|
313
|
+
{ rel: '.prettierrc.json', content: genPrettierConfig() },
|
|
314
|
+
{ rel: '.editorconfig', content: genEditorConfig() },
|
|
315
|
+
{ rel: 'tsconfig.json', content: genTsConfig() },
|
|
316
|
+
{ rel: '.gitlab-ci.yml', content: genGitlabCi(addonName) },
|
|
317
|
+
{ rel: 'env.d.ts', content: genAmbientTypes() },
|
|
318
|
+
];
|
|
319
|
+
const written = [];
|
|
320
|
+
const skipped = [];
|
|
321
|
+
for (const { rel, content } of files) {
|
|
322
|
+
const target = path.join(addonDir, rel);
|
|
323
|
+
if (!options.overwrite && (await fs.default.pathExists(target))) {
|
|
324
|
+
skipped.push(rel);
|
|
325
|
+
continue;
|
|
326
|
+
}
|
|
327
|
+
await fs.default.ensureDir(path.dirname(target));
|
|
328
|
+
if (typeof content === 'object') {
|
|
329
|
+
await fs.default.writeJson(target, content, { spaces: 2 });
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
await fs.default.writeFile(target, content, 'utf8');
|
|
333
|
+
}
|
|
334
|
+
written.push(rel);
|
|
335
|
+
}
|
|
336
|
+
return { written, skipped };
|
|
337
|
+
}
|
|
338
|
+
//# sourceMappingURL=addon-quality.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addon-quality.js","sourceRoot":"","sources":["../../../src/lib/ops/addon-quality.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,UAAU,eAAe;IAC7B,OAAO;QACL,IAAI,EAAE,IAAI;QACV,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;QAChD,MAAM,EAAE,mBAAmB;QAC3B,aAAa,EAAE;YACb,MAAM,EAAE,2BAA2B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AAE,OAAO,EAAE,MAAM,CAAC,CAAA;QACrD,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACnB,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAA;AAC7B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic nginx PHP routes regex generation.
|
|
3
|
+
*
|
|
4
|
+
* The PHP location block in dev.conf used to be a hand-maintained
|
|
5
|
+
* alternation of ~30 path prefixes — every new addon required the
|
|
6
|
+
* developer to read its Backend/Routes/*.php files, eyeball the
|
|
7
|
+
* `$app->get('/<prefix>/...')` calls, and append the prefix to the
|
|
8
|
+
* regex. A miss surfaced as Nuxt 404'ing API requests until the regex
|
|
9
|
+
* was patched. The old comment in dev.conf even documented this as a
|
|
10
|
+
* known gotcha: "When you `ci addon dev-deploy` a new addon, eyeball
|
|
11
|
+
* its `$app->get('/<prefix>/...')` and `$app->group('/<prefix>')`
|
|
12
|
+
* calls and add the missing token to this alternation."
|
|
13
|
+
*
|
|
14
|
+
* This module scans every active addon's route files, extracts the
|
|
15
|
+
* first path segment of each registered route, merges it with a
|
|
16
|
+
* baseline list of core PHP routes, and renders an nginx location
|
|
17
|
+
* snippet. `ci addon dev`, `ci cache flush`, and `init.sh` all call
|
|
18
|
+
* `regeneratePhpRoutes()` so personnel never edits the regex by hand.
|
|
19
|
+
*
|
|
20
|
+
* Output lives at `nginx/snippets/00-php-routes.conf` (gitignored; CLI-
|
|
21
|
+
* owned). The `00-` prefix orders it before the per-addon HMR snippets
|
|
22
|
+
* in the include glob.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Scan every addon's Backend/Routes/*.php under the dev tenant and
|
|
26
|
+
* return the set of first-path-segments (sorted, unique). Run from
|
|
27
|
+
* the dev-shell root; absolute paths are derived from there.
|
|
28
|
+
*/
|
|
29
|
+
export declare function scanAddonPrefixes(shellRoot: string): Promise<string[]>;
|
|
30
|
+
/** Compose the full alternation list (core + addon prefixes, deduped). */
|
|
31
|
+
export declare function buildPhpRoutesRegex(addonPrefixes: string[]): string;
|
|
32
|
+
/** Render the full nginx location block. The CORS + fastcgi config
|
|
33
|
+
* mirrors what dev.conf used to inline — keeping it in the snippet so
|
|
34
|
+
* the static dev.conf can drop the whole block. */
|
|
35
|
+
export declare function buildPhpRoutesSnippet(addonPrefixes: string[]): string;
|
|
36
|
+
/**
|
|
37
|
+
* High-level entry point used by `ci addon dev`, `ci cache flush`, and
|
|
38
|
+
* init.sh. Scans, renders, writes, reloads (best-effort). Returns the
|
|
39
|
+
* full result so callers can log meaningfully.
|
|
40
|
+
*/
|
|
41
|
+
export declare function regeneratePhpRoutes(shellRoot: string): Promise<{
|
|
42
|
+
prefixesAdded: string[];
|
|
43
|
+
totalPrefixes: number;
|
|
44
|
+
reload: {
|
|
45
|
+
method: 'reload' | 'startup' | 'failed';
|
|
46
|
+
detail: string;
|
|
47
|
+
};
|
|
48
|
+
}>;
|
|
49
|
+
//# sourceMappingURL=addon-routes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addon-routes.d.ts","sourceRoot":"","sources":["../../../src/lib/ops/addon-routes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AA2CH;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAmB5E;AAED,0EAA0E;AAC1E,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,MAAM,CAOnE;AAED;;oDAEoD;AACpD,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,MAAM,CA0CrE;AAgCD;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IACpE,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE;QAAE,MAAM,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;CACpE,CAAC,CAcD"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Dynamic nginx PHP routes regex generation.
|
|
3
|
+
*
|
|
4
|
+
* The PHP location block in dev.conf used to be a hand-maintained
|
|
5
|
+
* alternation of ~30 path prefixes — every new addon required the
|
|
6
|
+
* developer to read its Backend/Routes/*.php files, eyeball the
|
|
7
|
+
* `$app->get('/<prefix>/...')` calls, and append the prefix to the
|
|
8
|
+
* regex. A miss surfaced as Nuxt 404'ing API requests until the regex
|
|
9
|
+
* was patched. The old comment in dev.conf even documented this as a
|
|
10
|
+
* known gotcha: "When you `ci addon dev-deploy` a new addon, eyeball
|
|
11
|
+
* its `$app->get('/<prefix>/...')` and `$app->group('/<prefix>')`
|
|
12
|
+
* calls and add the missing token to this alternation."
|
|
13
|
+
*
|
|
14
|
+
* This module scans every active addon's route files, extracts the
|
|
15
|
+
* first path segment of each registered route, merges it with a
|
|
16
|
+
* baseline list of core PHP routes, and renders an nginx location
|
|
17
|
+
* snippet. `ci addon dev`, `ci cache flush`, and `init.sh` all call
|
|
18
|
+
* `regeneratePhpRoutes()` so personnel never edits the regex by hand.
|
|
19
|
+
*
|
|
20
|
+
* Output lives at `nginx/snippets/00-php-routes.conf` (gitignored; CLI-
|
|
21
|
+
* owned). The `00-` prefix orders it before the per-addon HMR snippets
|
|
22
|
+
* in the include glob.
|
|
23
|
+
*/
|
|
24
|
+
import path from 'node:path';
|
|
25
|
+
import { spawnSync } from 'node:child_process';
|
|
26
|
+
import fs from 'fs-extra';
|
|
27
|
+
import { glob } from 'glob';
|
|
28
|
+
// Core PHP route prefixes that the platform always reserves. Mirrors
|
|
29
|
+
// the previous static list in dev.conf. `core(?!s)` is the negative
|
|
30
|
+
// lookahead Faz 1 POC introduced — without it the token matches
|
|
31
|
+
// `cores/<x>/shared/` and shoves static paths into PHP-FPM.
|
|
32
|
+
const CORE_PHP_PREFIXES = [
|
|
33
|
+
'api', 'v1', 'v2', 'auth', 'system', 'system-settings', 'upload',
|
|
34
|
+
'addons', 'core_addons', 'core(?!s)', 'analyzer', 'summary',
|
|
35
|
+
'metrics', 'jobs', 'worker', 'setup', 'tenant-manager',
|
|
36
|
+
'tenant-admin', 'user-admin', 'users', 'csrf-token', 'refresh',
|
|
37
|
+
'languages', 'institutions', 'sectors', 'security', 'odeme',
|
|
38
|
+
'builds', 'catalog', 'web-index', 'login', 'logout', 'me',
|
|
39
|
+
'public', 'status',
|
|
40
|
+
];
|
|
41
|
+
// First-path-segment extractor for Slim routes. Captures both the
|
|
42
|
+
// shorthand methods (`$app->get('/foo/...', ...)`) and group prefix
|
|
43
|
+
// (`$app->group('/foo', ...)`). Surrounding whitespace is permissive
|
|
44
|
+
// so reformatted route files don't slip through.
|
|
45
|
+
const ROUTE_REGEX = /\$app->(?:get|post|put|delete|patch|group)\s*\(\s*['"]\/([a-zA-Z][a-zA-Z0-9_-]*)/g;
|
|
46
|
+
const SNIPPET_REL_PATH = 'nginx/snippets/00-php-routes.conf';
|
|
47
|
+
const NGINX_CONTAINER = 'addon_dev_nginx';
|
|
48
|
+
const SNIPPET_HEADER = `# AUTO-GENERATED by \`ci addon routes regenerate\`. Do not edit by hand.
|
|
49
|
+
# Sourced from cores/dev/addons/*/Backend/Routes/*.php — every new addon's
|
|
50
|
+
# first-path-segment is added automatically. The regex alternation is the
|
|
51
|
+
# load-bearing piece: nginx routes any URL matching ^/<token>(/|EOL|...)
|
|
52
|
+
# to PHP-FPM. Tokens NOT in this list fall through to the catch-all
|
|
53
|
+
# location (Nuxt SSR) — that's how /admin/* etc. reaches the front-end.
|
|
54
|
+
#
|
|
55
|
+
# To force a regenerate after editing addon routes:
|
|
56
|
+
# ci addon routes regenerate # (Faz 4.3 — coming)
|
|
57
|
+
# Or, currently:
|
|
58
|
+
# ci cache flush # also rebuilds this file
|
|
59
|
+
`;
|
|
60
|
+
/**
|
|
61
|
+
* Scan every addon's Backend/Routes/*.php under the dev tenant and
|
|
62
|
+
* return the set of first-path-segments (sorted, unique). Run from
|
|
63
|
+
* the dev-shell root; absolute paths are derived from there.
|
|
64
|
+
*/
|
|
65
|
+
export async function scanAddonPrefixes(shellRoot) {
|
|
66
|
+
const phpFiles = await glob('cores/dev/addons/*/Backend/Routes/*.php', { cwd: shellRoot, absolute: true });
|
|
67
|
+
const prefixes = new Set();
|
|
68
|
+
for (const file of phpFiles) {
|
|
69
|
+
let content;
|
|
70
|
+
try {
|
|
71
|
+
content = await fs.readFile(file, 'utf8');
|
|
72
|
+
}
|
|
73
|
+
catch {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
// Reset lastIndex because the regex is shared across iterations
|
|
77
|
+
// (JS global regexes are stateful).
|
|
78
|
+
ROUTE_REGEX.lastIndex = 0;
|
|
79
|
+
let match;
|
|
80
|
+
while ((match = ROUTE_REGEX.exec(content)) !== null) {
|
|
81
|
+
prefixes.add(match[1]);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return [...prefixes].sort();
|
|
85
|
+
}
|
|
86
|
+
/** Compose the full alternation list (core + addon prefixes, deduped). */
|
|
87
|
+
export function buildPhpRoutesRegex(addonPrefixes) {
|
|
88
|
+
// Strip the `(?!s)` decoration when checking for duplicates against
|
|
89
|
+
// the addon list — an addon called "core" would otherwise sneak past
|
|
90
|
+
// the de-dup because `core(?!s)` !== `core` as strings.
|
|
91
|
+
const coreTokens = new Set(CORE_PHP_PREFIXES.map((t) => t.replace(/\(\?!.*?\)$/, '')));
|
|
92
|
+
const additions = addonPrefixes.filter((p) => !coreTokens.has(p));
|
|
93
|
+
return [...CORE_PHP_PREFIXES, ...additions].join('|');
|
|
94
|
+
}
|
|
95
|
+
/** Render the full nginx location block. The CORS + fastcgi config
|
|
96
|
+
* mirrors what dev.conf used to inline — keeping it in the snippet so
|
|
97
|
+
* the static dev.conf can drop the whole block. */
|
|
98
|
+
export function buildPhpRoutesSnippet(addonPrefixes) {
|
|
99
|
+
const regex = buildPhpRoutesRegex(addonPrefixes);
|
|
100
|
+
return `${SNIPPET_HEADER}
|
|
101
|
+
location ~ ^/(${regex}) {
|
|
102
|
+
# CORS preflight (browser fetch from http://localhost:3000 hits 3080)
|
|
103
|
+
if ($request_method = 'OPTIONS') {
|
|
104
|
+
add_header 'Access-Control-Allow-Origin' $http_origin always;
|
|
105
|
+
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE, OPTIONS' always;
|
|
106
|
+
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, X-Requested-With, X-CSRF-Token, X-Core-Path, X-Tenant-Host, Cache-Control, Accept' always;
|
|
107
|
+
add_header 'Access-Control-Allow-Credentials' 'true' always;
|
|
108
|
+
add_header 'Access-Control-Max-Age' '86400' always;
|
|
109
|
+
add_header 'Content-Type' 'text/plain; charset=utf-8' always;
|
|
110
|
+
add_header 'Content-Length' '0' always;
|
|
111
|
+
return 204;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
add_header 'Access-Control-Allow-Origin' $http_origin always;
|
|
115
|
+
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, PATCH, DELETE, OPTIONS' always;
|
|
116
|
+
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type, X-Requested-With, X-CSRF-Token, X-Core-Path, X-Tenant-Host, Accept' always;
|
|
117
|
+
add_header 'Access-Control-Allow-Credentials' 'true' always;
|
|
118
|
+
add_header 'Access-Control-Expose-Headers' 'X-CSRF-Token' always;
|
|
119
|
+
|
|
120
|
+
fastcgi_pass addon_dev_php:9000;
|
|
121
|
+
fastcgi_param SCRIPT_FILENAME /var/www/public/index.php;
|
|
122
|
+
fastcgi_param CORE_PATH /var/www/cores/dev;
|
|
123
|
+
include fastcgi_params;
|
|
124
|
+
fastcgi_param REQUEST_URI $request_uri;
|
|
125
|
+
fastcgi_param SCRIPT_NAME /index.php;
|
|
126
|
+
fastcgi_param HTTP_HOST $host;
|
|
127
|
+
fastcgi_param HTTP_TENANT_HOST $host;
|
|
128
|
+
# Dev: HTTP (production'da HTTPS on, X-Forwarded-Proto https)
|
|
129
|
+
fastcgi_param HTTP_X_FORWARDED_PROTO http;
|
|
130
|
+
|
|
131
|
+
fastcgi_connect_timeout 300s;
|
|
132
|
+
fastcgi_send_timeout 300s;
|
|
133
|
+
fastcgi_read_timeout 300s;
|
|
134
|
+
fastcgi_buffer_size 128k;
|
|
135
|
+
fastcgi_buffers 4 256k;
|
|
136
|
+
fastcgi_busy_buffers_size 256k;
|
|
137
|
+
fastcgi_temp_file_write_size 256k;
|
|
138
|
+
}
|
|
139
|
+
`;
|
|
140
|
+
}
|
|
141
|
+
/** Atomic write via tmp+rename so a kill mid-write doesn't truncate
|
|
142
|
+
* the snippet. */
|
|
143
|
+
async function writeSnippet(shellRoot, content) {
|
|
144
|
+
const filePath = path.join(shellRoot, SNIPPET_REL_PATH);
|
|
145
|
+
await fs.ensureDir(path.dirname(filePath));
|
|
146
|
+
const tmp = `${filePath}.tmp.${process.pid}`;
|
|
147
|
+
await fs.writeFile(tmp, content, 'utf8');
|
|
148
|
+
await fs.move(tmp, filePath, { overwrite: true });
|
|
149
|
+
}
|
|
150
|
+
/** Try `docker exec nginx -t && nginx -s reload`. Skip cleanly when the
|
|
151
|
+
* container isn't running — init.sh's first pass writes the snippet
|
|
152
|
+
* before `docker compose up -d` and that's fine; nginx will pick the
|
|
153
|
+
* file up at startup. */
|
|
154
|
+
async function reloadNginxIfRunning() {
|
|
155
|
+
const ps = spawnSync('docker', ['ps', '--filter', `name=${NGINX_CONTAINER}`, '--filter', 'status=running', '--format', '{{.Names}}'], { encoding: 'utf8' });
|
|
156
|
+
if (ps.status !== 0 || !String(ps.stdout || '').includes(NGINX_CONTAINER)) {
|
|
157
|
+
return { method: 'startup', detail: `${NGINX_CONTAINER} not running — snippet picked up on next start` };
|
|
158
|
+
}
|
|
159
|
+
const test = spawnSync('docker', ['exec', NGINX_CONTAINER, 'nginx', '-t'], { encoding: 'utf8' });
|
|
160
|
+
if (test.status !== 0) {
|
|
161
|
+
return { method: 'failed', detail: String(test.stderr || test.stdout || '').trim() };
|
|
162
|
+
}
|
|
163
|
+
const reload = spawnSync('docker', ['exec', NGINX_CONTAINER, 'nginx', '-s', 'reload'], { encoding: 'utf8' });
|
|
164
|
+
if (reload.status !== 0) {
|
|
165
|
+
return { method: 'failed', detail: String(reload.stderr || reload.stdout || '').trim() };
|
|
166
|
+
}
|
|
167
|
+
return { method: 'reload', detail: 'nginx -s reload OK' };
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* High-level entry point used by `ci addon dev`, `ci cache flush`, and
|
|
171
|
+
* init.sh. Scans, renders, writes, reloads (best-effort). Returns the
|
|
172
|
+
* full result so callers can log meaningfully.
|
|
173
|
+
*/
|
|
174
|
+
export async function regeneratePhpRoutes(shellRoot) {
|
|
175
|
+
const addonPrefixes = await scanAddonPrefixes(shellRoot);
|
|
176
|
+
// Distinguish "added by addons" from baseline — only the additions
|
|
177
|
+
// are interesting to log.
|
|
178
|
+
const coreTokens = new Set(CORE_PHP_PREFIXES.map((t) => t.replace(/\(\?!.*?\)$/, '')));
|
|
179
|
+
const prefixesAdded = addonPrefixes.filter((p) => !coreTokens.has(p));
|
|
180
|
+
const content = buildPhpRoutesSnippet(addonPrefixes);
|
|
181
|
+
await writeSnippet(shellRoot, content);
|
|
182
|
+
const reload = await reloadNginxIfRunning();
|
|
183
|
+
return {
|
|
184
|
+
prefixesAdded,
|
|
185
|
+
totalPrefixes: CORE_PHP_PREFIXES.length + prefixesAdded.length,
|
|
186
|
+
reload,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=addon-routes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addon-routes.js","sourceRoot":"","sources":["../../../src/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