Skip to content

Commit

Permalink
Merge pull request #10 from enflujo/actualizar
Browse files Browse the repository at this point in the history
Actualizar
  • Loading branch information
1cgonza authored Apr 14, 2024
2 parents 6f9dd7e + e16ea87 commit faf71e8
Show file tree
Hide file tree
Showing 27 changed files with 1,295 additions and 782 deletions.
5 changes: 3 additions & 2 deletions docker-compose-desarrollo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
# ----- CONTENEDOR PARA CMS -----
directus:
container_name: arca-cms-desarrollo
image: directus/directus:10.9.3
image: directus/directus:10.10.5
ports:
- ${CMS_PUERTO}:8055
volumes:
Expand All @@ -44,6 +44,7 @@ services:
CORS_ORIGIN: 'true'
# LOG_LEVEL: 'trace'
# LOG_LEVEL: 'fatal'
# EXTENSIONS_AUTO_RELOAD: true

DB_CLIENT: 'pg'
DB_HOST: 'arca-cms-bd-desarrollo'
Expand Down Expand Up @@ -88,7 +89,7 @@ services:

meilisearch:
container_name: arca-bdbuscador-desarrollo
image: getmeili/meilisearch:v1.3
image: getmeili/meilisearch:v1.7
volumes:
- ./datos-buscador-desarrollo:/meili_data
networks:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
# ----- CONTENEDOR PARA CMS -----
directus:
container_name: arca-cms
image: directus/directus:10.9.3
image: directus/directus:10.10.5
restart: unless-stopped
ports:
- ${CMS_PUERTO}:8055
Expand Down Expand Up @@ -77,7 +77,7 @@ services:
# ----- CONTENEDOR PARA BUSCADOR -----
buscador:
container_name: arca-bdbuscador
image: getmeili/meilisearch:v1.3
image: getmeili/meilisearch:v1.7
restart: unless-stopped
volumes:
- ./datos-buscador:/meili_data
Expand Down
674 changes: 674 additions & 0 deletions extensions/.registry/9bde3cf6-c3bd-4bbf-befe-e65294d4b632/LICENSE.txt

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# WP Slug Interface

WordPress alike slug/permalink interface

![](https://raw.githubusercontent.com/dimitrov-adrian/directus-extension-wpslug-interface/main/screenshot.png)

## Installation

In your Directus installation root

```bash
npm install directus-extension-wpslug-interface
```

Restart directus

## How to use

1. Create new standard field with String type
2. For interface select **Slug**

## FAQ

### What does the update "Create" and "Update" options do?

Simply these options enables/disables the automatic update based on content change.

- Having "On Create" will enable automattic updating when creating new item.
- Having "On Update" will enable automattic updating when editing existing item.

It's possible to have both, one or none, depending of your needs.

### There is magic wand appearing

The magic stick button appears when the automatic updates are disabled, but there is content change so the field is
differing from the template. When clicked, the automatic update will be executed.

### Does this works when performing changes throught the API?

No, this is just an interface. It works only on Directus App
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"name": "directus-extension-wpslug-interface",
"version": "1.1.0",
"author": {
"email": "[email protected]",
"name": "Adrian Dimitrov"
},
"license": "gpl-3.0",
"keywords": [
"directus",
"directus-extension",
"directus-custom-interface",
"permalink",
"slug",
"wordpress permalink"
],
"directus:extension": {
"type": "interface",
"path": "dist/index.js",
"source": "src/index.ts",
"host": "^v9.9.0",
"hidden": false
},
"files": [
"dist"
],
"scripts": {
"build": "directus-extension build",
"dev": "directus-extension build --no-minify --watch"
},
"devDependencies": {
"@directus/extensions-sdk": "^9.10.0",
"@sindresorhus/slugify": "^2.1.0",
"directus-codestyle": "dimitrov-adrian/directus-codestyle",
"micromustache": "^8.0.3",
"typescript": "^4.6.4"
},
"prettier": "directus-codestyle/prettier",
"stylelint": {
"extends": "directus-codestyle/stylelint"
},
"eslintConfig": {
"extends": "./node_modules/directus-codestyle/.eslintrc.js",
"parserOptions": {
"sourceType": "module"
}
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"version": "1.0.0",
"description": "Interface para obtener información del estado de Meilisearch dentro de Directus.",
"license": "MIT",
"type": "module",
"scripts": {
"build": "directus-extension build",
"dev": "directus-extension build -w --no-minify",
"link": "directus-extension link"
},
"directus:extension": {
"type": "module",
"path": "../../extensions/modules/arca-buscador-directus/index.cjs",
"path": "dist/index.js",
"source": "src/index.ts",
"host": "^9.23.1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default defineComponent({
inject: ['api'],
methods: {
async indexar() {
if (!this.api) return;
this.procesando = true;
const respuesta = await this.api('/arca-datos/reindexar');
this.resultado = respuesta.data;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
"version": "1.0.0",
"description": "Hook de Directus para crear espejo de la base de datos en Meilisearch.",
"license": "MIT",
"type": "module",
"scripts": {
"build": "directus-extension build",
"dev": "directus-extension build -w --no-minify",
"link": "directus-extension link"
},
"directus:extension": {
"type": "hook",
"path": "../../extensions/hooks/arca-buscador/index.cjs",
"path": "dist/index.js",
"source": "src/index.ts",
"host": "^9.23.1"
"host": "^10.10.0"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"description": "Otros puntos para obtener datos específicos a la aplicación",
"icon": "extension",
"version": "1.0.0",
"type": "module",
"scripts": {
"build": "directus-extension build",
"dev": "directus-extension build -w --no-minify",
"link": "directus-extension link"
},
"directus:extension": {
"type": "endpoint",
"path": "../../extensions/endpoints/arca-datos/index.cjs",
"path": "dist/index.js",
"source": "src/index.ts",
"host": "^10.0.0"
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
"version": "1.0.0",
"description": "Sincroniza obras con las colecciones países y ciudades.",
"license": "MIT",
"type": "module",
"scripts": {
"build": "directus-extension build",
"dev": "directus-extension build -w --no-minify",
"link": "directus-extension link"
},
"directus:extension": {
"type": "hook",
"path": "../../extensions/hooks/arca-lugares-obras/index.cjs",
"path": "dist/index.js",
"source": "src/index.ts",
"host": "^9.26.0"
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"name": "arca-registros",
"version": "1.0.0",
"license": "MIT",
"type": "module",
"scripts": {
"build": "directus-extension build",
"dev": "directus-extension build --no-minify --watch"
},
"directus:extension": {
"type": "interface",
"path": "../../extensions/interfaces/arca-registros/index.cjs",
"path": "dist/index.js",
"source": "src/index.ts",
"host": "^9.23.1",
"hidden": false
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 6 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@
"license": "MIT",
"private": true,
"workspaces": [
"paquetes-arca/*"
"extensions/*"
],
"scripts": {
"lint": "prettier --check . '!./datos' '!./datos-buscador' '!./datos-buscador-desarrollo' '!./pgadmin' '!./extensions'",
"lint:fix": "prettier --write --list-different .",
"limpiar": "run-s --print-label limpiar:*",
"limpiar:hooks": "rimraf extensions/hooks/",
"limpiar:interfaces": "rimraf extensions/interfaces/",
"limpiar:modules": "rimraf extensions/modules/",
"limpiar:endpoints": "rimraf extensions/endpoints/",
"dev": "run-p --print-label dev:*",
"dev:buscador": "yarn workspace arca-buscador dev",
"dev:buscador-directus": "yarn workspace arca-buscador-directus dev",
Expand All @@ -28,21 +23,17 @@
"build:buscador-directus": "yarn workspace arca-buscador-directus build",
"build:registros": "yarn workspace arca-registros build",
"build:lugares": "yarn workspace arca-lugares-obras build",
"build:datos": "yarn workspace arca-datos build",
"build:slugs": "copyfiles -f ./node_modules/directus-extension-wpslug-interface/dist/index.js ./extensions/interfaces/slugs"
"build:datos": "yarn workspace arca-datos build"
},
"devDependencies": {
"@directus/extensions-sdk": "^10.3.4",
"@types/node": "^20.11.24",
"@directus/extensions-sdk": "^11.0.2",
"@types/node": "^20.12.7",
"@types/pino": "^7.0.5",
"copyfiles": "^2.4.1",
"npm-run-all": "^4.1.5",
"prettier": "^3.2.5",
"typescript": "^5.3.3"
"typescript": "^5.4.5"
},
"dependencies": {
"directus-extension-wpslug-interface": "^1.1.0",
"meilisearch": "^0.34.2",
"rimraf": "^5.0.5"
"meilisearch": "^0.34.2"
}
}
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"forceConsistentCasingInFileNames": true,
"allowSyntheticDefaultImports": true,
"isolatedModules": true,
"rootDir": "./paquetes-arca"
"rootDir": "extensions"
},
"include": ["./paquetes-arca/**/*.ts"]
"include": ["extensions/**/*.ts"]
}
Loading

0 comments on commit faf71e8

Please sign in to comment.