revisium 2.4.0 → 2.5.0-alpha.1

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.
Files changed (237) hide show
  1. package/.github/workflows/build.yml +11 -30
  2. package/.github/workflows/ci.yml +0 -6
  3. package/.github/workflows/npm-publish.yml +13 -78
  4. package/.github/workflows/release-train.yml +90 -0
  5. package/AGENTS.md +152 -0
  6. package/README.md +31 -13
  7. package/dist/e2e/utils/cli-runner.d.ts +1 -0
  8. package/dist/e2e/utils/cli-runner.js +32 -8
  9. package/dist/e2e/utils/cli-runner.js.map +1 -1
  10. package/dist/e2e/utils/matrix-fixtures.d.ts +26 -0
  11. package/dist/e2e/utils/matrix-fixtures.js +109 -0
  12. package/dist/e2e/utils/matrix-fixtures.js.map +1 -0
  13. package/dist/e2e/utils/matrix-workspace.d.ts +25 -0
  14. package/dist/e2e/utils/matrix-workspace.js +61 -0
  15. package/dist/e2e/utils/matrix-workspace.js.map +1 -0
  16. package/dist/e2e/utils/standalone-api.d.ts +52 -0
  17. package/dist/e2e/utils/standalone-api.js +156 -0
  18. package/dist/e2e/utils/standalone-api.js.map +1 -0
  19. package/dist/e2e/utils/standalone-runner.d.ts +22 -0
  20. package/dist/e2e/utils/standalone-runner.js +208 -0
  21. package/dist/e2e/utils/standalone-runner.js.map +1 -0
  22. package/dist/package.json +8 -4
  23. package/dist/src/app.module.js +51 -0
  24. package/dist/src/app.module.js.map +1 -1
  25. package/dist/src/commands/auth/auth-command.utils.d.ts +8 -0
  26. package/dist/src/commands/auth/auth-command.utils.js +28 -0
  27. package/dist/src/commands/auth/auth-command.utils.js.map +1 -0
  28. package/dist/src/commands/auth/auth-login.command.d.ts +29 -0
  29. package/dist/src/commands/auth/auth-login.command.js +155 -0
  30. package/dist/src/commands/auth/auth-login.command.js.map +1 -0
  31. package/dist/src/commands/auth/auth-logout.command.d.ts +19 -0
  32. package/dist/src/commands/auth/auth-logout.command.js +86 -0
  33. package/dist/src/commands/auth/auth-logout.command.js.map +1 -0
  34. package/dist/src/commands/auth/auth-status.command.d.ts +19 -0
  35. package/dist/src/commands/auth/auth-status.command.js +101 -0
  36. package/dist/src/commands/auth/auth-status.command.js.map +1 -0
  37. package/dist/src/commands/auth/auth.command.d.ts +5 -0
  38. package/dist/src/commands/auth/auth.command.js +35 -0
  39. package/dist/src/commands/auth/auth.command.js.map +1 -0
  40. package/dist/src/commands/base-sync.command.d.ts +2 -2
  41. package/dist/src/commands/base-sync.command.js +1 -2
  42. package/dist/src/commands/base-sync.command.js.map +1 -1
  43. package/dist/src/commands/base.command.d.ts +2 -0
  44. package/dist/src/commands/base.command.js +13 -0
  45. package/dist/src/commands/base.command.js.map +1 -1
  46. package/dist/src/commands/context/context-create.command.d.ts +28 -0
  47. package/dist/src/commands/context/context-create.command.js +172 -0
  48. package/dist/src/commands/context/context-create.command.js.map +1 -0
  49. package/dist/src/commands/context/context-list.command.d.ts +14 -0
  50. package/dist/src/commands/context/context-list.command.js +78 -0
  51. package/dist/src/commands/context/context-list.command.js.map +1 -0
  52. package/dist/src/commands/context/context-remove.command.d.ts +9 -0
  53. package/dist/src/commands/context/context-remove.command.js +48 -0
  54. package/dist/src/commands/context/context-remove.command.js.map +1 -0
  55. package/dist/src/commands/context/context-show.command.d.ts +9 -0
  56. package/dist/src/commands/context/context-show.command.js +64 -0
  57. package/dist/src/commands/context/context-show.command.js.map +1 -0
  58. package/dist/src/commands/context/context-use.command.d.ts +9 -0
  59. package/dist/src/commands/context/context-use.command.js +45 -0
  60. package/dist/src/commands/context/context-use.command.js.map +1 -0
  61. package/dist/src/commands/context/context.command.d.ts +5 -0
  62. package/dist/src/commands/context/context.command.js +43 -0
  63. package/dist/src/commands/context/context.command.js.map +1 -0
  64. package/dist/src/commands/endpoint/endpoint-ensure.command.d.ts +18 -0
  65. package/dist/src/commands/endpoint/endpoint-ensure.command.js +90 -0
  66. package/dist/src/commands/endpoint/endpoint-ensure.command.js.map +1 -0
  67. package/dist/src/commands/endpoint/endpoint-list.command.d.ts +14 -0
  68. package/dist/src/commands/endpoint/endpoint-list.command.js +62 -0
  69. package/dist/src/commands/endpoint/endpoint-list.command.js.map +1 -0
  70. package/dist/src/commands/endpoint/endpoint.command.d.ts +5 -0
  71. package/dist/src/commands/endpoint/endpoint.command.js +34 -0
  72. package/dist/src/commands/endpoint/endpoint.command.js.map +1 -0
  73. package/dist/src/commands/example/example-bootstrap.command.d.ts +24 -0
  74. package/dist/src/commands/example/example-bootstrap.command.js +133 -0
  75. package/dist/src/commands/example/example-bootstrap.command.js.map +1 -0
  76. package/dist/src/commands/example/example.command.d.ts +5 -0
  77. package/dist/src/commands/example/example.command.js +33 -0
  78. package/dist/src/commands/example/example.command.js.map +1 -0
  79. package/dist/src/commands/instance/instance-add.command.d.ts +18 -0
  80. package/dist/src/commands/instance/instance-add.command.js +99 -0
  81. package/dist/src/commands/instance/instance-add.command.js.map +1 -0
  82. package/dist/src/commands/instance/instance-list.command.d.ts +14 -0
  83. package/dist/src/commands/instance/instance-list.command.js +69 -0
  84. package/dist/src/commands/instance/instance-list.command.js.map +1 -0
  85. package/dist/src/commands/instance/instance-remove.command.d.ts +16 -0
  86. package/dist/src/commands/instance/instance-remove.command.js +87 -0
  87. package/dist/src/commands/instance/instance-remove.command.js.map +1 -0
  88. package/dist/src/commands/instance/instance-show.command.d.ts +9 -0
  89. package/dist/src/commands/instance/instance-show.command.js +50 -0
  90. package/dist/src/commands/instance/instance-show.command.js.map +1 -0
  91. package/dist/src/commands/instance/instance.command.d.ts +5 -0
  92. package/dist/src/commands/instance/instance.command.js +41 -0
  93. package/dist/src/commands/instance/instance.command.js.map +1 -0
  94. package/dist/src/commands/migration/apply-migrations.command.js +1 -0
  95. package/dist/src/commands/migration/apply-migrations.command.js.map +1 -1
  96. package/dist/src/commands/project/project-ensure.command.d.ts +16 -0
  97. package/dist/src/commands/project/project-ensure.command.js +71 -0
  98. package/dist/src/commands/project/project-ensure.command.js.map +1 -0
  99. package/dist/src/commands/project/project.command.d.ts +5 -0
  100. package/dist/src/commands/project/project.command.js +33 -0
  101. package/dist/src/commands/project/project.command.js.map +1 -0
  102. package/dist/src/services/bootstrap/bootstrap.service.d.ts +112 -0
  103. package/dist/src/services/bootstrap/bootstrap.service.js +439 -0
  104. package/dist/src/services/bootstrap/bootstrap.service.js.map +1 -0
  105. package/dist/src/services/bootstrap/index.d.ts +1 -0
  106. package/dist/src/services/bootstrap/index.js +6 -0
  107. package/dist/src/services/bootstrap/index.js.map +1 -0
  108. package/dist/src/services/common/logger.service.d.ts +1 -0
  109. package/dist/src/services/common/logger.service.js +3 -0
  110. package/dist/src/services/common/logger.service.js.map +1 -1
  111. package/dist/src/services/connection/api-client.d.ts +4 -0
  112. package/dist/src/services/connection/api-client.js +67 -5
  113. package/dist/src/services/connection/api-client.js.map +1 -1
  114. package/dist/src/services/connection/connection-factory.service.js +4 -3
  115. package/dist/src/services/connection/connection-factory.service.js.map +1 -1
  116. package/dist/src/services/connection/connection.service.d.ts +10 -2
  117. package/dist/src/services/connection/connection.service.js +49 -4
  118. package/dist/src/services/connection/connection.service.js.map +1 -1
  119. package/dist/src/services/credentials/credential-store.service.d.ts +19 -0
  120. package/dist/src/services/credentials/credential-store.service.js +112 -0
  121. package/dist/src/services/credentials/credential-store.service.js.map +1 -0
  122. package/dist/src/services/credentials/credential-target.service.d.ts +22 -0
  123. package/dist/src/services/credentials/credential-target.service.js +107 -0
  124. package/dist/src/services/credentials/credential-target.service.js.map +1 -0
  125. package/dist/src/services/credentials/index.d.ts +2 -0
  126. package/dist/src/services/credentials/index.js +8 -0
  127. package/dist/src/services/credentials/index.js.map +1 -0
  128. package/dist/src/services/index.d.ts +3 -0
  129. package/dist/src/services/index.js +3 -0
  130. package/dist/src/services/index.js.map +1 -1
  131. package/dist/src/services/url/auth-prompt.service.d.ts +3 -1
  132. package/dist/src/services/url/auth-prompt.service.js +3 -0
  133. package/dist/src/services/url/auth-prompt.service.js.map +1 -1
  134. package/dist/src/services/url/url-builder.service.js +3 -0
  135. package/dist/src/services/url/url-builder.service.js.map +1 -1
  136. package/dist/src/services/workspace/index.d.ts +1 -0
  137. package/dist/src/services/workspace/index.js +11 -0
  138. package/dist/src/services/workspace/index.js.map +1 -0
  139. package/dist/src/services/workspace/workspace-config.service.d.ts +66 -0
  140. package/dist/src/services/workspace/workspace-config.service.js +320 -0
  141. package/dist/src/services/workspace/workspace-config.service.js.map +1 -0
  142. package/dist/tsconfig.build.tsbuildinfo +1 -1
  143. package/docs/authentication.md +69 -26
  144. package/docs/bootstrap-commands.md +105 -0
  145. package/docs/configuration.md +49 -22
  146. package/docs/url-format.md +2 -2
  147. package/docs/workspace-config.md +135 -0
  148. package/e2e/jest-matrix.json +14 -0
  149. package/e2e/matrix/M01-auth-commands.e2e-spec.ts +241 -0
  150. package/e2e/matrix/M02-instance-commands.e2e-spec.ts +213 -0
  151. package/e2e/matrix/M03-context-commands.e2e-spec.ts +279 -0
  152. package/e2e/matrix/M04-project-ensure.e2e-spec.ts +218 -0
  153. package/e2e/matrix/M05-endpoint-commands.e2e-spec.ts +172 -0
  154. package/e2e/matrix/M06-example-bootstrap.e2e-spec.ts +437 -0
  155. package/e2e/matrix/M07-migrate.e2e-spec.ts +229 -0
  156. package/e2e/matrix/M08-schema.e2e-spec.ts +163 -0
  157. package/e2e/matrix/M09-rows.e2e-spec.ts +185 -0
  158. package/e2e/matrix/M10-sync.e2e-spec.ts +224 -0
  159. package/e2e/matrix/M11-target-resolution.e2e-spec.ts +177 -0
  160. package/e2e/matrix/M12-error-paths.e2e-spec.ts +162 -0
  161. package/e2e/matrix/M13-no-auth-mode.e2e-spec.ts +119 -0
  162. package/e2e/matrix/M14-multi-instance-workspace.e2e-spec.ts +182 -0
  163. package/e2e/matrix/README.md +388 -0
  164. package/e2e/tests/07-workspace-config.e2e-spec.ts +507 -0
  165. package/e2e/tests/08-bootstrap.e2e-spec.ts +304 -0
  166. package/e2e/utils/cli-runner.ts +69 -8
  167. package/e2e/utils/matrix-fixtures.ts +141 -0
  168. package/e2e/utils/matrix-workspace.ts +106 -0
  169. package/e2e/utils/standalone-api.ts +331 -0
  170. package/e2e/utils/standalone-runner.ts +335 -0
  171. package/package.json +8 -4
  172. package/src/app.module.ts +54 -0
  173. package/src/commands/auth/__tests__/auth-command.utils.spec.ts +41 -0
  174. package/src/commands/auth/__tests__/auth-login.command.spec.ts +131 -0
  175. package/src/commands/auth/__tests__/auth-logout.command.spec.ts +85 -0
  176. package/src/commands/auth/__tests__/auth-status.command.spec.ts +106 -0
  177. package/src/commands/auth/__tests__/auth.command.spec.ts +18 -0
  178. package/src/commands/auth/auth-command.utils.ts +36 -0
  179. package/src/commands/auth/auth-login.command.ts +146 -0
  180. package/src/commands/auth/auth-logout.command.ts +71 -0
  181. package/src/commands/auth/auth-status.command.ts +89 -0
  182. package/src/commands/auth/auth.command.ts +20 -0
  183. package/src/commands/base-sync.command.ts +2 -3
  184. package/src/commands/base.command.ts +11 -0
  185. package/src/commands/context/__tests__/context-list.command.spec.ts +102 -0
  186. package/src/commands/context/context-create.command.ts +173 -0
  187. package/src/commands/context/context-list.command.ts +76 -0
  188. package/src/commands/context/context-remove.command.ts +35 -0
  189. package/src/commands/context/context-show.command.ts +59 -0
  190. package/src/commands/context/context-use.command.ts +31 -0
  191. package/src/commands/context/context.command.ts +28 -0
  192. package/src/commands/endpoint/__tests__/endpoint-ensure.command.spec.ts +129 -0
  193. package/src/commands/endpoint/__tests__/endpoint-list.command.spec.ts +59 -0
  194. package/src/commands/endpoint/__tests__/endpoint.command.spec.ts +14 -0
  195. package/src/commands/endpoint/endpoint-ensure.command.ts +74 -0
  196. package/src/commands/endpoint/endpoint-list.command.ts +48 -0
  197. package/src/commands/endpoint/endpoint.command.ts +19 -0
  198. package/src/commands/example/__tests__/example-bootstrap.command.spec.ts +145 -0
  199. package/src/commands/example/__tests__/example.command.spec.ts +14 -0
  200. package/src/commands/example/example-bootstrap.command.ts +122 -0
  201. package/src/commands/example/example.command.ts +18 -0
  202. package/src/commands/instance/__tests__/instance-add.command.spec.ts +93 -0
  203. package/src/commands/instance/__tests__/instance-list.command.spec.ts +91 -0
  204. package/src/commands/instance/__tests__/instance-remove.command.spec.ts +113 -0
  205. package/src/commands/instance/instance-add.command.ts +88 -0
  206. package/src/commands/instance/instance-list.command.ts +57 -0
  207. package/src/commands/instance/instance-remove.command.ts +80 -0
  208. package/src/commands/instance/instance-show.command.ts +35 -0
  209. package/src/commands/instance/instance.command.ts +26 -0
  210. package/src/commands/migration/apply-migrations.command.ts +1 -0
  211. package/src/commands/project/__tests__/project-ensure.command.spec.ts +119 -0
  212. package/src/commands/project/__tests__/project.command.spec.ts +14 -0
  213. package/src/commands/project/project-ensure.command.ts +61 -0
  214. package/src/commands/project/project.command.ts +18 -0
  215. package/src/services/bootstrap/__tests__/bootstrap.service.spec.ts +812 -0
  216. package/src/services/bootstrap/bootstrap.service.ts +699 -0
  217. package/src/services/bootstrap/index.ts +12 -0
  218. package/src/services/common/logger.service.ts +9 -0
  219. package/src/services/connection/__tests__/api-client.spec.ts +262 -0
  220. package/src/services/connection/__tests__/connection-factory.service.spec.ts +2 -0
  221. package/src/services/connection/__tests__/connection.service.spec.ts +162 -0
  222. package/src/services/connection/api-client.ts +88 -5
  223. package/src/services/connection/connection-factory.service.ts +4 -3
  224. package/src/services/connection/connection.service.ts +74 -3
  225. package/src/services/credentials/__tests__/credential-store.service.spec.ts +128 -0
  226. package/src/services/credentials/__tests__/credential-target.service.spec.ts +126 -0
  227. package/src/services/credentials/credential-store.service.ts +145 -0
  228. package/src/services/credentials/credential-target.service.ts +145 -0
  229. package/src/services/credentials/index.ts +9 -0
  230. package/src/services/index.ts +3 -0
  231. package/src/services/url/__tests__/url-builder.service.spec.ts +17 -0
  232. package/src/services/url/auth-prompt.service.ts +6 -1
  233. package/src/services/url/url-builder.service.ts +4 -0
  234. package/src/services/workspace/__tests__/workspace-config.service.spec.ts +389 -0
  235. package/src/services/workspace/index.ts +14 -0
  236. package/src/services/workspace/workspace-config.service.ts +475 -0
  237. package/.github/workflows/bump-version.yml +0 -86
@@ -3,36 +3,17 @@ name: Build
3
3
  on:
4
4
  workflow_dispatch:
5
5
 
6
- env:
7
- IMAGE_NAME: ${{ github.event.repository.name }}
6
+ permissions:
7
+ contents: read
8
8
 
9
9
  jobs:
10
10
  build-and-push-image:
11
- runs-on: ubuntu-latest
12
- permissions:
13
- contents: read
14
- packages: write
15
-
16
- steps:
17
- - name: Checkout repository
18
- uses: actions/checkout@v4
19
-
20
- - name: Log in to the Container registry
21
- uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #docker/login-action@v3
22
- with:
23
- username: ${{ secrets.DOCKERHUB_USERNAME }}
24
- password: ${{ secrets.DOCKERHUB_TOKEN }}
25
-
26
- - name: Extract metadata (tags, labels) for Docker
27
- id: meta
28
- uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f #docker/metadata-action@v5
29
- with:
30
- images: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}
31
-
32
- - name: Build and push Docker image
33
- uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 #docker/build-push-action@v5
34
- with:
35
- context: .
36
- push: true
37
- tags: ${{ steps.meta.outputs.tags }}
38
- labels: ${{ steps.meta.outputs.labels }}
11
+ uses: revisium/revisium-actions/.github/workflows/docker-build.yml@184b609dcbc1e23f14021141f29226d4e6a0f1ac # v0.3.6
12
+ with:
13
+ image_name: ${{ github.event.repository.name }}
14
+ context: .
15
+ dockerfile: Dockerfile
16
+ emit_latest_tag: ${{ startsWith(github.ref, 'refs/tags/v') }}
17
+ secrets:
18
+ DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
19
+ DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
@@ -88,9 +88,3 @@ jobs:
88
88
  uses: SonarSource/sonarqube-scan-action@8c71dc039c2dd71d3821e89a2b58ecc7fee6ced9 #SonarSource/sonarqube-scan-action@v5
89
89
  env:
90
90
  SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
91
-
92
- - name: Upload results to Codecov
93
- uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 #codecov/codecov-action@v5
94
- with:
95
- token: ${{ secrets.CODECOV_TOKEN }}
96
- files: ./coverage/lcov.info
@@ -6,84 +6,19 @@ on:
6
6
  - 'v*'
7
7
 
8
8
  jobs:
9
- validate-and-publish:
10
- runs-on: ubuntu-latest
9
+ publish:
11
10
  permissions:
12
11
  contents: write
13
12
  id-token: write
14
- steps:
15
- - name: Checkout repository
16
- uses: actions/checkout@v4
17
-
18
- - name: Setup Node.js
19
- uses: actions/setup-node@v4
20
- with:
21
- node-version-file: '.nvmrc'
22
- registry-url: 'https://registry.npmjs.org'
23
-
24
- - name: Validate tag format
25
- run: |
26
- TAG=${GITHUB_REF#refs/tags/}
27
- echo "📌 Publishing for tag: $TAG"
28
-
29
- if [[ ! $TAG =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[a-zA-Z0-9.]+)?$ ]]; then
30
- echo "❌ Invalid tag format: $TAG (expected: vX.Y.Z or vX.Y.Z-prerelease)"
31
- exit 1
32
- fi
33
-
34
- VERSION=${TAG#v}
35
- echo "version=$VERSION" >> $GITHUB_ENV
36
-
37
- - name: Install dependencies
38
- run: npm ci
39
-
40
- - name: Validate package.json version matches tag
41
- run: |
42
- PACKAGE_VERSION=$(node -p "require('./package.json').version")
43
- TAG_VERSION=${{ env.version }}
44
-
45
- echo "📦 package.json version: $PACKAGE_VERSION"
46
- echo "🏷️ Tag version: $TAG_VERSION"
47
-
48
- if [[ "$PACKAGE_VERSION" != "$TAG_VERSION" ]]; then
49
- echo "❌ Version mismatch: package.json ($PACKAGE_VERSION) != tag ($TAG_VERSION)"
50
- exit 1
51
- fi
52
-
53
- echo "✅ Version validation passed"
54
-
55
- - name: Determine npm tag
56
- id: npm-tag
57
- run: |
58
- VERSION=$(node -p "require('./package.json').version")
59
- if [[ "$VERSION" =~ -alpha ]]; then
60
- echo "tag=alpha" >> $GITHUB_OUTPUT
61
- elif [[ "$VERSION" =~ -beta ]]; then
62
- echo "tag=beta" >> $GITHUB_OUTPUT
63
- elif [[ "$VERSION" =~ -rc ]]; then
64
- echo "tag=rc" >> $GITHUB_OUTPUT
65
- else
66
- echo "tag=latest" >> $GITHUB_OUTPUT
67
- fi
68
-
69
- - name: Publish to NPM
70
- run: npm publish --provenance --access public --tag ${{ steps.npm-tag.outputs.tag }}
71
-
72
- - name: Create GitHub Release
73
- uses: softprops/action-gh-release@v1
74
- with:
75
- tag_name: ${{ github.ref_name }}
76
- name: Release ${{ github.ref_name }}
77
- body: |
78
- ## Changes in ${{ github.ref_name }}
79
-
80
- This release was automatically generated from tag ${{ github.ref_name }}.
81
-
82
- ### Installation
83
- ```bash
84
- npm install -g revisium@${{ env.version }}
85
- ```
86
- draft: false
87
- prerelease: false
88
- env:
89
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13
+ uses: revisium/revisium-actions/.github/workflows/npm-publish.yml@184b609dcbc1e23f14021141f29226d4e6a0f1ac # v0.3.6
14
+ with:
15
+ node_version: 24.11.1
16
+ install_command: npm ci
17
+ pre_publish_commands: |
18
+ npm run tsc
19
+ npm run build
20
+ npm_access: public
21
+ publish_auth: token
22
+ create_github_release: true
23
+ secrets:
24
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,90 @@
1
+ name: Release Train
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ action:
7
+ description: Release train transition
8
+ required: true
9
+ type: choice
10
+ options:
11
+ - start-minor-alpha
12
+ - start-major-alpha
13
+ - start-minor-rc
14
+ - start-major-rc
15
+ - start-minor-stable
16
+ - start-major-stable
17
+ - alpha-bump
18
+ - promote-rc
19
+ - rc-bump
20
+ - stable
21
+ - patch
22
+ - patch-alpha-start
23
+ - patch-rc-start
24
+ dry_run:
25
+ description: Validate and show the computed release without pushing.
26
+ required: false
27
+ default: false
28
+ type: boolean
29
+
30
+ concurrency:
31
+ group: ${{ github.repository }}-release-train
32
+ cancel-in-progress: false
33
+
34
+ permissions:
35
+ actions: read
36
+ contents: read
37
+
38
+ jobs:
39
+ release-train:
40
+ name: Release train
41
+ uses: revisium/revisium-actions/.github/workflows/release-train.yml@184b609dcbc1e23f14021141f29226d4e6a0f1ac # v0.3.6
42
+ with:
43
+ action: ${{ inputs.action }}
44
+ dry_run: ${{ inputs.dry_run }}
45
+ base_branch: master
46
+ node_version: 24.11.1
47
+ install_command: npm ci
48
+ validate_command: |
49
+ cleanup() {
50
+ status=$?
51
+ if [ -f .e2e-test.pid ]; then
52
+ kill "$(cat .e2e-test.pid)" 2>/dev/null || true
53
+ rm -f .e2e-test.pid
54
+ fi
55
+ rm -rf .e2e-test
56
+ if [ "$status" -ne 0 ] && [ -f revisium.log ]; then
57
+ cat revisium.log
58
+ fi
59
+ exit "$status"
60
+ }
61
+ trap cleanup EXIT
62
+
63
+ npm run lint:ci
64
+ npm run tsc
65
+ rm -rf dist
66
+
67
+ FILE_PLUGIN_PUBLIC_ENDPOINT=https://cdn.example.com npx @revisium/standalone --auth --port 8082 --data .e2e-test > revisium.log 2>&1 &
68
+ echo $! > .e2e-test.pid
69
+
70
+ for i in $(seq 1 300); do
71
+ revisium_pid="$(cat .e2e-test.pid)"
72
+ if ! kill -0 "$revisium_pid" 2>/dev/null; then
73
+ echo "Revisium exited before becoming ready"
74
+ exit 1
75
+ fi
76
+ if curl -sf http://localhost:8082/health/readiness > /dev/null 2>&1; then
77
+ echo "Revisium ready after ${i}s"
78
+ break
79
+ fi
80
+ if [ "$i" = 300 ]; then
81
+ echo "Timed out waiting for Revisium"
82
+ exit 1
83
+ fi
84
+ sleep 1
85
+ done
86
+
87
+ npm run test:all
88
+ npm run build
89
+ secrets:
90
+ RELEASE_BOT_PRIVATE_KEY: ${{ secrets.RELEASE_BOT_PRIVATE_KEY }}
package/AGENTS.md ADDED
@@ -0,0 +1,152 @@
1
+ # revisium-cli — Agent Guide
2
+
3
+ Context for AI coding assistants (Claude, Cursor, Copilot Workspace, Aider, etc.) working on this repository. Keep edits minimal and scoped; verify with the commands listed below.
4
+
5
+ ## What this is
6
+
7
+ `revisium-cli` is a NestJS / `nest-commander` CLI for managing Revisium instances: schema export/import, migrations, row sync, project/endpoint bootstrap, workspace configuration, and saved API-key auth. It ships as the `revisium` npm binary.
8
+
9
+ Primary command groups:
10
+
11
+ - `migrate save/apply` — schema migrations
12
+ - `schema save/create-migrations` — schema export + offline migration generation
13
+ - `rows save/upload` — data export/import
14
+ - `sync schema/data/all` — direct project-to-project sync
15
+ - `instance add/list/show/remove` — workspace instance config
16
+ - `context create/list/show/use/remove` — workspace contexts
17
+ - `auth login/status/logout` — saved API-key credentials (OS keyring)
18
+ - `project ensure` — idempotent project + branch creation
19
+ - `endpoint ensure/list` — generated REST/GraphQL endpoints
20
+ - `example bootstrap` — end-to-end project seeding from a config file
21
+
22
+ ## Commands
23
+
24
+ | Goal | Command |
25
+ | ----------------- | ------------------------------------------------------------------------------------------------ |
26
+ | Type-check | `npm run tsc` |
27
+ | Lint (CI mode) | `npm run lint:ci` |
28
+ | Lint + autofix | `npm run lint` |
29
+ | Unit tests | `npm test -- --runInBand` |
30
+ | Unit + coverage | `npm run test:cov` |
31
+ | Build the binary | `npm run build` (outputs `dist/src/main.js`) |
32
+ | E2E (default) | `npm run test:e2e` (expects standalone running on `localhost:8082`; bring it up with `test:e2e:up`/`test:e2e:down`) |
33
+ | E2E matrix | `npm run test:e2e:matrix` — opt-in; see `e2e/matrix/README.md` |
34
+ | E2E matrix (alpha) | `npm run test:e2e:matrix:alpha` — runs the matrix against the latest published alpha CLI (resolved from the `revisium@alpha` dist-tag); override with `REVISIUM_CLI_PACKAGE=revisium@<version>` |
35
+
36
+ Local CLI invocation: `node dist/src/main.js <command>` (the `revisium` shim points at the same file).
37
+
38
+ ## Code layout
39
+
40
+ ```
41
+ src/
42
+ app.module.ts # NestJS module wiring all commands + services
43
+ main.ts # CommandFactory entry point
44
+ commands/
45
+ auth/ # auth login/status/logout, AuthCommandTarget helpers
46
+ instance/ # instance add/list/show/remove
47
+ context/ # context create/list/show/use/remove
48
+ project/ # project ensure
49
+ endpoint/ # endpoint ensure/list
50
+ example/ # example bootstrap
51
+ migration/ # migrate save/apply
52
+ schema/ # schema save / create-migrations
53
+ rows/ # rows save / upload
54
+ sync/ # sync schema / data / all
55
+ base.command.ts # shared --url / --context options
56
+ base-sync.command.ts # shared sync flags
57
+ services/
58
+ bootstrap/ # BootstrapService: ensureProject / ensureTable / ensureRow / ensureEndpoint / bootstrapExample
59
+ connection/ # RevisiumApiClient + ConnectionService
60
+ credentials/ # OS keyring-backed API key store + credential-target resolver
61
+ sync/ # sync orchestration helpers
62
+ url/ # URL parsing / building, AuthPromptService
63
+ workspace/ # .revisium/revisium-cli.config.json reader/writer
64
+ common/ # logging, JSON validation, interactive prompts
65
+ utils/ # parse-boolean, env-config, error formatter, stats
66
+ e2e/
67
+ tests/ # default e2e suite (legacy, hits docker-compose standalone)
68
+ matrix/ # opt-in matrix; each suite owns a fresh @revisium/standalone
69
+ utils/ # cli-runner, standalone-runner, standalone-api, fixtures, workspace helpers
70
+ docs/ # public docs surfaced from README.md
71
+ ```
72
+
73
+ ## Conventions
74
+
75
+ - **Strict ESLint config** with `--max-warnings 0` and Prettier integration. Run `npm run lint` after edits — auto-fix handles most issues.
76
+ - **Tests live in `__tests__/` next to the code** and end in `.spec.ts`. Existing patterns: instantiate the command/service directly with hand-rolled fakes (no Nest test module overhead). See `src/commands/auth/__tests__/auth-status.command.spec.ts` for a representative example.
77
+ - **Coverage threshold:** SonarCloud requires `new_coverage ≥ 80%` on each PR. Add tests for new branches in the same PR.
78
+ - **Validation errors** thrown for config-shape problems use `TypeError` (Sonar S7786). Operational errors stay as plain `Error`.
79
+ - **No `--no-input` plumbing yet.** A common-flags PR is planned; until then, don't expose `--no-input` as a per-command option (it would be dead code).
80
+ - **OS keyring service name** can be overridden via `REVISIUM_CREDENTIAL_STORE_SERVICE` for tests so saved keys don't bleed into the developer's keyring.
81
+
82
+ ## Trust-but-verify checklist
83
+
84
+ After making changes, run **all** of:
85
+
86
+ ```sh
87
+ npm run tsc
88
+ npm run lint:ci
89
+ npm test -- --runInBand
90
+ npm run build
91
+ ```
92
+
93
+ If touching e2e helpers or matrix specs, ensure the additions still type-check and lint clean (the matrix is intentionally not run on default CI).
94
+
95
+ ## Running the e2e matrix against an alpha CLI
96
+
97
+ The matrix in `e2e/matrix/` boots a fresh `@revisium/standalone` per suite and exercises a CLI binary against it. By default that's the locally-built `dist/src/main.js`; for release validation you can swap in a published version without rebuilding.
98
+
99
+ `runCli()` honours two env vars (in order of precedence):
100
+
101
+ | Env var | Effect |
102
+ | ---------------------- | ----------------------------------------------------------------------------------------------- |
103
+ | `REVISIUM_CLI_PACKAGE` | invoke via `npx -y --package=<spec> revisium ...` — accepts a dist-tag (`revisium@alpha`, `revisium@latest`) or an exact version (`revisium@2.5.0-alpha.0`) |
104
+ | `REVISIUM_CLI_BIN` | invoke via `node <abs-path>` — useful for a side-checkout build |
105
+
106
+ Stable standalone is pinned via the `@revisium/standalone` `devDependency` in `package.json`; `startStandalone()` resolves it through `npx --yes`, so `npm ci` locks the version.
107
+
108
+ ### Quick recipes
109
+
110
+ ```sh
111
+ # Run the entire matrix against whatever revisium@alpha currently resolves to
112
+ npm run test:e2e:matrix:alpha
113
+
114
+ # Pin to a specific alpha version for the same script
115
+ REVISIUM_CLI_PACKAGE=revisium@2.5.0-alpha.1 npm run test:e2e:matrix:alpha
116
+
117
+ # Drive the matrix by hand against any spec
118
+ REVISIUM_CLI_PACKAGE=revisium@alpha npm run test:e2e:matrix
119
+
120
+ # One suite only (useful for triage)
121
+ REVISIUM_CLI_PACKAGE=revisium@alpha npm run test:e2e:matrix -- --testPathPattern=M06
122
+
123
+ # Stream standalone logs to stderr (debug startup or seeding issues)
124
+ E2E_STANDALONE_LOGS=1 REVISIUM_CLI_PACKAGE=revisium@alpha npm run test:e2e:matrix
125
+ ```
126
+
127
+ ### Prompt template for triaging an alpha matrix run
128
+
129
+ When a suite fails against `revisium@<alpha>`, paste this into your assistant:
130
+
131
+ ```text
132
+ Run `REVISIUM_CLI_PACKAGE=revisium@<alpha-version> npm run test:e2e:matrix -- --testPathPattern=<M0X>` from the revisium-cli repo root.
133
+
134
+ Goal: figure out whether the failure is
135
+ (a) a regression in the alpha CLI vs the previous stable, or
136
+ (b) a stale assumption in the matrix spec.
137
+
138
+ When investigating:
139
+ - Read the failing assertion and the surrounding `it(...)` description in `e2e/matrix/<M0X>-*.e2e-spec.ts`
140
+ - Compare alpha behaviour against the `master` CLI by also running the same suite without `REVISIUM_CLI_PACKAGE`
141
+ - Check the standalone version is the pinned one (`@revisium/standalone` in package.json devDependencies)
142
+ - Inspect `process.stderr` from `runCli` (set `E2E_STANDALONE_LOGS=1` for the sandbox process)
143
+ - Do NOT modify matrix specs to "make them pass" against the alpha unless the spec was wrong; otherwise file a regression issue against revisium-cli with the failing case.
144
+
145
+ Report: failing-suite name, alpha version, root cause, and whether the fix belongs in the CLI or the spec.
146
+ ```
147
+
148
+ ## When to update this file
149
+
150
+ Whenever a convention changes — e.g., a new command surface, a non-obvious testing pattern, a new lint rule — update both the relevant section and the commands table.
151
+
152
+ > Tools that look for `CLAUDE.md` will follow the symlink in repo root to this file. Treat `AGENTS.md` as the single source of truth.
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  # Revisium CLI
4
4
 
5
5
  [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=revisium_revisium-cli&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=revisium_revisium-cli)
6
- [![codecov](https://codecov.io/gh/revisium/revisium-cli/branch/master/graph/badge.svg?token=8XI9VJ6EQR)](https://codecov.io/gh/revisium/revisium-cli)
6
+ [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=revisium_revisium-cli&metric=coverage)](https://sonarcloud.io/summary/new_code?id=revisium_revisium-cli)
7
7
  [![Bugs](https://sonarcloud.io/api/project_badges/measure?project=revisium_revisium-cli&metric=bugs)](https://sonarcloud.io/summary/new_code?id=revisium_revisium-cli)
8
8
  [![GitHub License](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/revisium/revisium-cli/blob/master/LICENSE)
9
9
  [![GitHub Release](https://img.shields.io/github/v/release/revisium/revisium-cli)](https://github.com/revisium/revisium-cli/releases)
@@ -133,21 +133,37 @@ revisium sync all \
133
133
 
134
134
  ## Commands
135
135
 
136
- | Command | Description | Documentation |
137
- |---------|-------------|---------------|
138
- | `schema save` | Export table schemas to JSON files | [Schema Commands](docs/schema-commands.md) |
139
- | `schema create-migrations` | Convert schemas to migration format | [Schema Commands](docs/schema-commands.md) |
140
- | `migrate save` | Export migrations to JSON file | [Migrate Commands](docs/migrate-commands.md) |
141
- | `migrate apply` | Apply migrations from JSON file | [Migrate Commands](docs/migrate-commands.md) |
142
- | `rows save` | Export table data to JSON files | [Rows Commands](docs/rows-commands.md) |
143
- | `rows upload` | Upload table data from JSON files | [Rows Commands](docs/rows-commands.md) |
144
- | `sync schema` | Sync schema between projects | [Sync Commands](docs/sync-commands.md) |
145
- | `sync data` | Sync data between projects | [Sync Commands](docs/sync-commands.md) |
146
- | `sync all` | Full sync (schema + data) | [Sync Commands](docs/sync-commands.md) |
136
+ | Command | Description | Documentation |
137
+ | ------------------------------------- | -------------------------------------- | ------------------------------------------------ |
138
+ | `schema save` | Export table schemas to JSON files | [Schema Commands](docs/schema-commands.md) |
139
+ | `schema create-migrations` | Convert schemas to migration format | [Schema Commands](docs/schema-commands.md) |
140
+ | `migrate save` | Export migrations to JSON file | [Migrate Commands](docs/migrate-commands.md) |
141
+ | `migrate apply` | Apply migrations from JSON file | [Migrate Commands](docs/migrate-commands.md) |
142
+ | `rows save` | Export table data to JSON files | [Rows Commands](docs/rows-commands.md) |
143
+ | `rows upload` | Upload table data from JSON files | [Rows Commands](docs/rows-commands.md) |
144
+ | `sync schema` | Sync schema between projects | [Sync Commands](docs/sync-commands.md) |
145
+ | `sync data` | Sync data between projects | [Sync Commands](docs/sync-commands.md) |
146
+ | `sync all` | Full sync (schema + data) | [Sync Commands](docs/sync-commands.md) |
147
+ | `instance add/list/show/remove` | Manage workspace Revisium instances | [Workspace Config](docs/workspace-config.md) |
148
+ | `context create/list/show/use/remove` | Manage workspace Revisium contexts | [Workspace Config](docs/workspace-config.md) |
149
+ | `auth login/status/logout` | Manage saved API-key credentials | [Authentication](docs/authentication.md) |
150
+ | `project ensure` | Ensure a project and branch exist | [Bootstrap Commands](docs/bootstrap-commands.md) |
151
+ | `endpoint ensure/list` | Ensure or list generated endpoints | [Bootstrap Commands](docs/bootstrap-commands.md) |
152
+ | `example bootstrap` | Bootstrap example projects from config | [Bootstrap Commands](docs/bootstrap-commands.md) |
147
153
 
148
154
  ## Configuration
149
155
 
150
- Configure via environment variables or `.env` file:
156
+ Configure via workspace config, environment variables, or `.env` file:
157
+
158
+ ```bash
159
+ # Workspace-local standalone example without auth
160
+ revisium instance add local --url revisium://localhost:9222 --auth none
161
+ revisium context create dictionary-local \
162
+ --url revisium://localhost:9222/admin/dictionary/master
163
+ revisium context use dictionary-local
164
+ ```
165
+
166
+ Then single-target commands can omit `--url` in that workspace.
151
167
 
152
168
  ```env
153
169
  # Recommended: URL + Token
@@ -178,6 +194,8 @@ See [Configuration](docs/configuration.md) and [URL Format](docs/url-format.md)
178
194
  ## Documentation
179
195
 
180
196
  - [Configuration](docs/configuration.md) - Environment variables and .env files
197
+ - [Workspace Config](docs/workspace-config.md) - non-secret instances and contexts
198
+ - [Bootstrap Commands](docs/bootstrap-commands.md) - project, endpoint, and example bootstrap workflows
181
199
  - [URL Format](docs/url-format.md) - Revisium URL syntax
182
200
  - [Authentication](docs/authentication.md) - Token, API key, and password auth
183
201
  - [Schema Commands](docs/schema-commands.md) - schema save, create-migrations
@@ -7,6 +7,7 @@ export interface CliOptions {
7
7
  env?: Record<string, string>;
8
8
  timeout?: number;
9
9
  cwd?: string;
10
+ stdin?: string;
10
11
  }
11
12
  export declare function runCli(args: string[], options?: CliOptions): Promise<CliResult>;
12
13
  export declare function buildUrl(projectName: string, options?: {
@@ -6,25 +6,35 @@ const child_process_1 = require("child_process");
6
6
  const fs = require("fs");
7
7
  const path = require("path");
8
8
  async function runCli(args, options = {}) {
9
- const { env = {}, timeout = 60000, cwd = process.cwd() } = options;
9
+ const { env = {}, timeout = 60000, cwd = process.cwd(), stdin } = options;
10
10
  const isInstrumented = process.env.E2E_INSTRUMENTED === '1';
11
- const mainPath = isInstrumented
12
- ? 'dist-instrumented/src/main.js'
13
- : 'dist/src/main.js';
14
- const nycOutputDir = path.join(cwd, '.nyc_output');
11
+ const projectRoot = process.cwd();
12
+ const mainPath = path.join(projectRoot, isInstrumented ? 'dist-instrumented/src/main.js' : 'dist/src/main.js');
13
+ const nycOutputDir = path.join(projectRoot, '.nyc_output');
15
14
  if (isInstrumented && !fs.existsSync(nycOutputDir)) {
16
15
  fs.mkdirSync(nycOutputDir, { recursive: true });
17
16
  }
17
+ const effectiveEnv = {
18
+ ...process.env,
19
+ ...env,
20
+ };
21
+ const { command, commandArgs } = resolveCliInvocation(args, mainPath, effectiveEnv);
18
22
  return new Promise((resolve, reject) => {
19
- const child = (0, child_process_1.spawn)('node', [mainPath, ...args], {
23
+ const child = (0, child_process_1.spawn)(command, commandArgs, {
20
24
  cwd,
21
25
  env: {
22
- ...process.env,
23
- ...env,
26
+ ...effectiveEnv,
24
27
  ...(isInstrumented ? { NYC_OUTPUT_DIR: nycOutputDir } : {}),
25
28
  },
26
29
  stdio: ['pipe', 'pipe', 'pipe'],
27
30
  });
31
+ if (stdin !== undefined) {
32
+ child.stdin?.write(stdin);
33
+ child.stdin?.end();
34
+ }
35
+ else {
36
+ child.stdin?.end();
37
+ }
28
38
  let stdout = '';
29
39
  let stderr = '';
30
40
  child.stdout.on('data', (data) => {
@@ -51,6 +61,20 @@ async function runCli(args, options = {}) {
51
61
  });
52
62
  });
53
63
  }
64
+ function resolveCliInvocation(args, defaultMainPath, env) {
65
+ const pkg = env.REVISIUM_CLI_PACKAGE;
66
+ if (pkg && pkg.length > 0) {
67
+ return {
68
+ command: 'npx',
69
+ commandArgs: ['-y', `--package=${pkg}`, 'revisium', ...args],
70
+ };
71
+ }
72
+ const bin = env.REVISIUM_CLI_BIN;
73
+ if (bin && bin.length > 0) {
74
+ return { command: 'node', commandArgs: [bin, ...args] };
75
+ }
76
+ return { command: 'node', commandArgs: [defaultMainPath, ...args] };
77
+ }
54
78
  function buildUrl(projectName, options = {}) {
55
79
  const { orgId = 'admin', branch = 'master', revision, token, protocol, } = options;
56
80
  const scheme = protocol ? `revisium+${protocol}` : 'revisium';
@@ -1 +1 @@
1
- {"version":3,"file":"cli-runner.js","sourceRoot":"","sources":["../../../e2e/utils/cli-runner.ts"],"names":[],"mappings":";;AAgBA,wBA0DC;AAED,4BA8BC;AA1GD,iDAAsC;AACtC,yBAAyB;AACzB,6BAA6B;AActB,KAAK,UAAU,MAAM,CAC1B,IAAc,EACd,UAAsB,EAAE;IAExB,MAAM,EAAE,GAAG,GAAG,EAAE,EAAE,OAAO,GAAG,KAAK,EAAE,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IAEnE,MAAM,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,KAAK,GAAG,CAAC;IAC5D,MAAM,QAAQ,GAAG,cAAc;QAC7B,CAAC,CAAC,+BAA+B;QACjC,CAAC,CAAC,kBAAkB,CAAC;IAEvB,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;IACnD,IAAI,cAAc,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACnD,EAAE,CAAC,SAAS,CAAC,YAAY,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,OAAO,IAA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,UAAU,EAAE,GAAG,IAAI,CAAC;SAC7D,CAAC;IACJ,CAAC;IACD,MAAM,GAAG,GAAG,GAAG,CAAC,gBAAgB,CAAC;IACjC,IAAI,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;IAC1D,CAAC;IACD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC,eAAe,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC;AACtE,CAAC;AAED,SAAgB,QAAQ,CACtB,WAAmB,EACnB,UAMI,EAAE;IAEN,MAAM,EACJ,KAAK,GAAG,OAAO,EACf,MAAM,GAAG,QAAQ,EACjB,QAAQ,EACR,KAAK,EACL,QAAQ,GACT,GAAG,OAAO,CAAC;IAEZ,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,YAAY,QAAQ,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC;IAC9D,IAAI,GAAG,GAAG,GAAG,MAAM,qBAAqB,KAAK,IAAI,WAAW,IAAI,MAAM,EAAE,CAAC;IAEzE,IAAI,QAAQ,EAAE,CAAC;QACb,GAAG,IAAI,IAAI,QAAQ,EAAE,CAAC;IACxB,CAAC;IAED,IAAI,KAAK,EAAE,CAAC;QACV,GAAG,IAAI,UAAU,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -0,0 +1,26 @@
1
+ export interface BootstrapTableConfig {
2
+ id: string;
3
+ schema: object;
4
+ }
5
+ export interface BootstrapRowConfig {
6
+ tableId: string;
7
+ rowId: string;
8
+ data: object;
9
+ }
10
+ export interface BootstrapConfigShape {
11
+ projectName?: string;
12
+ branchName?: string;
13
+ endpoints?: Array<'REST_API' | 'GRAPHQL'>;
14
+ tables?: BootstrapTableConfig[];
15
+ rows?: BootstrapRowConfig[];
16
+ commitMessage?: string;
17
+ }
18
+ export declare function tagSchema(): object;
19
+ export declare function faqSchema(): object;
20
+ export declare function questSchema(): object;
21
+ export declare function tagRows(count?: number): BootstrapRowConfig[];
22
+ export declare function faqRows(): BootstrapRowConfig[];
23
+ export declare function questRows(count?: number): BootstrapRowConfig[];
24
+ export declare function bootstrapConfig(partial?: BootstrapConfigShape): BootstrapConfigShape;
25
+ export declare function tagBootstrapConfig(projectName: string): BootstrapConfigShape;
26
+ export declare function faqBootstrapConfig(projectName: string): BootstrapConfigShape;