Skip to content

Commit

Permalink
add cinnabarMeta to anca.json
Browse files Browse the repository at this point in the history
update npm package 'express' to 4.21.2
remove build-bundle from actions
  • Loading branch information
TimurRin committed Dec 11, 2024
1 parent fbbd28c commit 5c5b11d
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 47 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,3 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
name: "Build distribution bundle and publish to registry"
build-bundle:
permissions: write-all
runs-on: ubuntu-latest
env:
ANCA_CI: true
name: Build bundle
steps:
- uses: actions/checkout@v4
name: Checkout repo
- uses: actions/setup-node@v4
with:
node-version: 22.11.0
name: Install Node.js
- run: npm ci
name: Install dependencies
- run: npm run build:bundle
name: Build bundle
- run: |
mv build/bundle/index.js build/bundle/${{ github.event.repository.name }}-${{ github.ref_name }}.js
shell: bash
name: Rename bundle
- uses: softprops/action-gh-release@v1
with:
files: |
build/bundle/${{ github.event.repository.name }}-${{ github.ref_name }}.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: Attach bundle to release
27 changes: 27 additions & 0 deletions anca.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,31 @@
{
"cinnabarMeta": {
"dataVersion": 0,
"version": {
"latest": "0.0.0",
"timestamp": 0
},
"files": [
{
"path": "./package.json",
"type": "nodejs-package-json"
},
{
"path": "./package-lock.json",
"type": "nodejs-package-lock-json"
},
{
"path": "./src/cinnabar.ts",
"type": "typescript",
"updateBuild": true
}
],
"repo": {
"type": "github",
"value": "cinnabar-forge/snapcrud"
},
"updateChangelog": true
},
"development": {
"nodejsOpenapi": {
"modelsLocation": "./src/types/openapi.ts",
Expand Down
23 changes: 15 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@cinnabar-forge/utils": "0.2.0",
"clivo": "0.5.2",
"dotenv": "16.4.5",
"express": "4.21.1",
"express": "4.21.2",
"helmet": "8.0.0",
"knex": "3.1.0",
"mysql2": "3.11.4",
Expand Down
5 changes: 1 addition & 4 deletions src/controllers/deleteTableEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ export default async function (
res: Response<string>,
) {
try {
const result: string = await deleteTableEntity(
req.params,
req.query,
);
const result: string = await deleteTableEntity(req.params, req.query);
res.status(200).contentType("text/html").send(result);
} catch (error) {
console.error(error);
Expand Down
4 changes: 1 addition & 3 deletions src/controllers/getTableCreateEntityPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ export default async function (
res: Response<string>,
) {
try {
const result: string = await getTableCreateEntityPage(
req.params,
);
const result: string = await getTableCreateEntityPage(req.params);
res.status(200).contentType("text/html").send(result);
} catch (error) {
console.error(error);
Expand Down
4 changes: 1 addition & 3 deletions src/services/deleteTableEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ export async function deleteTableEntity(
}

try {
const deletedRows = await knex(tableName)
.where(primaryKeys)
.del();
const deletedRows = await knex(tableName).where(primaryKeys).del();

if (deletedRows === 0) {
throw new Error("No rows deleted");
Expand Down

0 comments on commit 5c5b11d

Please sign in to comment.