chore: rename package from @hykocx/zen to @zen/core

Update all references across source files, documentation, and
configuration to reflect the new package scope and name. This includes
updating `.npmrc` registry config, install instructions, module
examples, and all import path comments throughout the codebase.
This commit is contained in:
2026-04-12 15:09:26 -04:00
parent 30067a699d
commit 81172bda94
52 changed files with 153 additions and 153 deletions
+2 -2
View File
@@ -4,8 +4,8 @@
*
* NOTE: Individual modules (like invoice) should NOT be exported from here.
* Access module functionality directly via:
* - import { ... } from '@hykocx/zen/modules/invoice'
* - Or use the dynamic registry functions from @hykocx/zen/core/modules
* - import { ... } from '@zen/core/modules/invoice'
* - Or use the dynamic registry functions from @zen/core/core/modules
*/
// Module registry
+1 -1
View File
@@ -5,7 +5,7 @@
* External modules registered via zen.config.js are resolved through the runtime registry.
*
* Usage:
* import { getModuleActions } from '@hykocx/zen/modules/actions';
* import { getModuleActions } from '@zen/core/modules/actions';
* const { getInvoiceByToken } = getModuleActions('invoice');
*/
+1 -1
View File
@@ -5,7 +5,7 @@
* External modules registered via zen.config.js are resolved through the runtime registry.
*
* Usage:
* import { getMetadataGenerator } from '@hykocx/zen/modules/metadata';
* import { getMetadataGenerator } from '@zen/core/modules/metadata';
* const fn = getMetadataGenerator('invoice', 'payment');
* const meta = await fn(params.token);
*/
+5 -5
View File
@@ -5,16 +5,16 @@
* Users can simply re-export this in their app/zen/[...zen]/page.js:
*
* ```javascript
* export { default, generateMetadata } from '@hykocx/zen/modules/page';
* export { default, generateMetadata } from '@zen/core/modules/page';
* ```
*
* Module actions are loaded from the static modules.actions.js registry.
*/
import { PublicPagesLayout, PublicPagesClient } from '@hykocx/zen/modules/pages';
import { getMetadataGenerator } from '@hykocx/zen/modules/metadata';
import { getAppConfig } from '@hykocx/zen';
import { getModuleActions } from '@hykocx/zen/modules/actions';
import { PublicPagesLayout, PublicPagesClient } from '@zen/core/modules/pages';
import { getMetadataGenerator } from '@zen/core/modules/metadata';
import { getAppConfig } from '@zen/core';
import { getModuleActions } from '@zen/core/modules/actions';
/**
* Per-module path configuration.
+3 -3
View File
@@ -353,7 +353,7 @@ import {
upsertPost, // Créer ou mettre à jour (idempotent)
getPosts, // Liste avec pagination
deletePost, // Supprimer
} from '@hykocx/zen/modules/posts/crud';
} from '@zen/core/modules/posts/crud';
```
### `upsertPost(postType, rawData, uniqueField)`
@@ -384,7 +384,7 @@ Si les posts liés n'existent pas encore, les créer d'abord avec `upsertPost` p
```js
// src/cron/fetch-cves.js
import { upsertPost } from '@hykocx/zen/modules/posts/crud';
import { upsertPost } from '@zen/core/modules/posts/crud';
export async function fetchAndImportCVEs() {
const response = await fetch('https://api.example.com/cves/recent');
@@ -428,7 +428,7 @@ export async function fetchAndImportCVEs() {
### Exemple : fetcher d'actualités avec source
```js
import { upsertPost } from '@hykocx/zen/modules/posts/crud';
import { upsertPost } from '@zen/core/modules/posts/crud';
export async function fetchAndImportActualites(sourceName, articles) {
// S'assurer que la source existe
+1 -1
View File
@@ -3,7 +3,7 @@
import React, { useState, useEffect } from 'react';
import { useRouter, usePathname } from 'next/navigation';
import { Button, Card } from '../../../shared/components';
import { useToast } from '@hykocx/zen/toast';
import { useToast } from '@zen/core/toast';
import { getTodayString } from '../../../shared/lib/dates.js';
import PostFormFields from './PostFormFields.js';
+1 -1
View File
@@ -3,7 +3,7 @@
import React, { useState, useEffect } from 'react';
import { useRouter, usePathname } from 'next/navigation';
import { Button, Card } from '../../../shared/components';
import { useToast } from '@hykocx/zen/toast';
import { useToast } from '@zen/core/toast';
import { formatDateForInput, formatDateTimeForInput } from '../../../shared/lib/dates.js';
import PostFormFields from './PostFormFields.js';
+1 -1
View File
@@ -4,7 +4,7 @@ import React, { useState, useEffect } from 'react';
import { useRouter } from 'next/navigation';
import { Book02Icon, Layers01Icon } from '../../../shared/Icons.js';
import { Card, Button } from '../../../shared/components';
import { useToast } from '@hykocx/zen/toast';
import { useToast } from '@zen/core/toast';
/**
* Posts index page — shows all configured post types.
+1 -1
View File
@@ -4,7 +4,7 @@ import React, { useState, useEffect } from 'react';
import { useRouter, usePathname } from 'next/navigation';
import { PlusSignCircleIcon, PencilEdit01Icon, Delete02Icon, Layers01Icon } from '../../../shared/Icons.js';
import { Table, Button, Card, Pagination } from '../../../shared/components';
import { useToast } from '@hykocx/zen/toast';
import { useToast } from '@zen/core/toast';
import { formatDateForDisplay, formatDateTimeForDisplay } from '../../../shared/lib/dates.js';
/**
+1 -1
View File
@@ -29,7 +29,7 @@ import {
validateUpload,
FILE_TYPE_PRESETS,
FILE_SIZE_LIMITS
} from '@hykocx/zen/storage';
} from '@zen/core/storage';
import { getPostsConfig, getPostType } from './config.js';
@@ -4,7 +4,7 @@ import React, { useState, useEffect } from 'react';
import { useRouter, usePathname } from 'next/navigation';
import { PlusSignCircleIcon, PencilEdit01Icon, Delete02Icon } from '../../../../shared/Icons.js';
import { Table, Button, StatusBadge, Card, Pagination } from '../../../../shared/components';
import { useToast } from '@hykocx/zen/toast';
import { useToast } from '@zen/core/toast';
function getPostTypeFromPath(pathname) {
const segments = (pathname || '').split('/').filter(Boolean);
@@ -3,7 +3,7 @@
import React, { useState } from 'react';
import { useRouter, usePathname } from 'next/navigation';
import { Button, Card, Input, Textarea } from '../../../../shared/components';
import { useToast } from '@hykocx/zen/toast';
import { useToast } from '@zen/core/toast';
function getPostTypeFromPath(pathname) {
const segments = (pathname || '').split('/').filter(Boolean);
@@ -3,7 +3,7 @@
import React, { useState, useEffect } from 'react';
import { useRouter, usePathname } from 'next/navigation';
import { Button, Card, Input, Textarea } from '../../../../shared/components';
import { useToast } from '@hykocx/zen/toast';
import { useToast } from '@zen/core/toast';
function getParamsFromPath(pathname) {
const segments = (pathname || '').split('/').filter(Boolean);
+1 -1
View File
@@ -3,7 +3,7 @@
* Categories are scoped by post_type.
*/
import { query } from '@hykocx/zen/database';
import { query } from '@zen/core/database';
/**
* Create a new category for a post type.
+2 -2
View File
@@ -4,8 +4,8 @@
* Relation fields are stored in zen_posts_relations (many-to-many).
*/
import { query } from '@hykocx/zen/database';
import { deleteFile } from '@hykocx/zen/storage';
import { query } from '@zen/core/database';
import { deleteFile } from '@zen/core/storage';
import { getPostType } from './config.js';
function slugify(text) {
+1 -1
View File
@@ -3,7 +3,7 @@
* Creates zen_posts and zen_posts_category tables.
*/
import { query } from '@hykocx/zen/database';
import { query } from '@zen/core/database';
import { getPostsConfig } from './config.js';
async function tableExists(tableName) {