@okam/directus-node 0.4.0 → 0.5.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/CHANGELOG.md +11 -0
- package/README.md +26 -2
- package/package.json +1 -1
- package/src/lib/redirection.d.ts +34 -2
- package/src/lib/redirection.js +97 -14
- package/src/lib/redirection.js.map +1 -1
- package/src/logger.d.ts +0 -1
- package/src/logger.js +1 -2
- package/src/logger.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 0.5.0 (2025-01-30)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **redirection:** use new variable for redirection ([0c21683](https://github.com/OKAMca/stack/commit/0c21683))
|
|
6
|
+
- **directus-node:** adding unit test, fix logger and adding read/write functions for redirections ([6d68bb4](https://github.com/OKAMca/stack/commit/6d68bb4))
|
|
7
|
+
|
|
8
|
+
### ❤️ Thank You
|
|
9
|
+
|
|
10
|
+
- Yan Morin
|
|
11
|
+
|
|
1
12
|
## 0.3.0 (2024-09-11)
|
|
2
13
|
|
|
3
14
|
|
package/README.md
CHANGED
|
@@ -57,13 +57,22 @@ module.exports = {
|
|
|
57
57
|
redirects: async () => redirects,
|
|
58
58
|
rewrites: async () => rewrites,
|
|
59
59
|
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
4.1 or redirect/index.mjs
|
|
63
|
+
```
|
|
64
|
+
import redirectsData from './redirects.json' with { type: 'json' }
|
|
65
|
+
import rewritesData from './rewrites.json' with { type: 'json' }
|
|
60
66
|
|
|
67
|
+
export const redirects = async () => redirectsData
|
|
68
|
+
export const rewrites = async () => rewritesData
|
|
61
69
|
```
|
|
62
70
|
|
|
63
71
|
5. Define environments variables
|
|
64
72
|
```
|
|
65
|
-
|
|
66
|
-
|
|
73
|
+
NEXT_REDIRECT_GRAPHQL_URL=http://server.some.url/graphql
|
|
74
|
+
NEXT_PUBLIC_GRAPHQL_URL=https://server.external/graphql
|
|
75
|
+
NEXT_API_TOKEN_ADMIN=user_token_for_graphql
|
|
67
76
|
```
|
|
68
77
|
|
|
69
78
|
6. Generate redirect/redirects.json and redirect/rewrites.json using fetch-redirect (or build project with nx)
|
|
@@ -75,13 +84,23 @@ npx env-cmd -f ../../.env.local node fetch-redirect.js
|
|
|
75
84
|
```
|
|
76
85
|
const { rewrites, redirects } = require('./redirect/index')
|
|
77
86
|
```
|
|
87
|
+
|
|
88
|
+
for next.config.mjs
|
|
89
|
+
```
|
|
90
|
+
import { redirects, rewrites } from './redirect/index.mjs'
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
and
|
|
94
|
+
|
|
78
95
|
```
|
|
79
96
|
const nextConfig = {
|
|
80
97
|
...
|
|
81
98
|
async redirects() {
|
|
82
99
|
const rest = await redirects()
|
|
83
100
|
return [
|
|
101
|
+
// optional i18nrouter should be before
|
|
84
102
|
...i18nReRouter({locale: false, permanent: true}, 'redirect'),
|
|
103
|
+
// custom redirect should be here
|
|
85
104
|
...rest,
|
|
86
105
|
]
|
|
87
106
|
return rest
|
|
@@ -90,9 +109,11 @@ const nextConfig = {
|
|
|
90
109
|
const fallback = await rewrites()
|
|
91
110
|
return {
|
|
92
111
|
beforeFiles: [
|
|
112
|
+
// optional i18n router
|
|
93
113
|
...i18nReRouter({locale: false}, 'rewrite'),
|
|
94
114
|
],
|
|
95
115
|
afterFiles: [
|
|
116
|
+
// optional i18n router
|
|
96
117
|
...i18nRewriter({...i18nConfigWithoutLocaleDetector, localeDetector: false}),
|
|
97
118
|
],
|
|
98
119
|
fallback,
|
|
@@ -101,3 +122,6 @@ const nextConfig = {
|
|
|
101
122
|
...
|
|
102
123
|
}
|
|
103
124
|
```
|
|
125
|
+
|
|
126
|
+
## Warning
|
|
127
|
+
In production (build), you can't reload dynamically in next.config.(m?)js in rewrites()/redirects() because it was compiled in `.nx/route-manifest.json`. Updating the files in redirects/ won't work. In dev mode, both rewrites()/redirects() of next.config.(m?)js are runned on each server start.
|
package/package.json
CHANGED
package/src/lib/redirection.d.ts
CHANGED
|
@@ -1,15 +1,47 @@
|
|
|
1
1
|
interface TFetchRedirectsConfig {
|
|
2
2
|
graphqlEndpoint: string;
|
|
3
3
|
graphqlApiKey: string;
|
|
4
|
-
redirectsFilename
|
|
5
|
-
rewritesFilename
|
|
4
|
+
redirectsFilename?: string;
|
|
5
|
+
rewritesFilename?: string;
|
|
6
6
|
limit: number | undefined;
|
|
7
7
|
}
|
|
8
|
+
interface TFetchRedirectsResponse {
|
|
9
|
+
redirects: unknown;
|
|
10
|
+
rewrites: unknown;
|
|
11
|
+
}
|
|
12
|
+
interface TRedirectData {
|
|
13
|
+
source: string;
|
|
14
|
+
destination: string;
|
|
15
|
+
permanent?: boolean;
|
|
16
|
+
locale?: boolean;
|
|
17
|
+
}
|
|
18
|
+
type TRedirectType = 'redirects' | 'rewrites';
|
|
8
19
|
export declare const redirectDefaultLimit = 2000;
|
|
9
20
|
/**
|
|
10
21
|
* Get Fetch Redirects Configuration
|
|
11
22
|
* @returns {object}
|
|
12
23
|
*/
|
|
13
24
|
export declare function getDefaultConfig(): TFetchRedirectsConfig;
|
|
25
|
+
export declare function fetchRedirectsData(config: TFetchRedirectsConfig): Promise<TFetchRedirectsResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Write Redirect Data
|
|
28
|
+
* @param {string} filename filename
|
|
29
|
+
* @param {unknown} data redirects data (rewrites or redirects)
|
|
30
|
+
*/
|
|
31
|
+
export declare function writeRedirectFile(filename: string, data: unknown): Promise<boolean>;
|
|
32
|
+
export declare function readRedirectFileData(filename: string): Promise<unknown>;
|
|
33
|
+
/**
|
|
34
|
+
* Read one redirects or rewrites file
|
|
35
|
+
* @param {string} filePath relative file path like './redirect/redirects.json' to the current working dir
|
|
36
|
+
* @param {TRedirectType} type redirects or rewrites
|
|
37
|
+
* @returns {Promise<TRedirectData[]>} an array of redirect information
|
|
38
|
+
*/
|
|
39
|
+
export declare function readRedirectFile(filePath: string, type?: TRedirectType): Promise<TRedirectData[]>;
|
|
40
|
+
/**
|
|
41
|
+
* Fetch and write redirects and rewrites files
|
|
42
|
+
* @param {TFetchRedirectsConfig} config fetch redirects configuration
|
|
43
|
+
* @returns {Promise<boolean>} true
|
|
44
|
+
* @throws {Error}
|
|
45
|
+
*/
|
|
14
46
|
export declare function fetchRedirects(config: TFetchRedirectsConfig): Promise<boolean>;
|
|
15
47
|
export {};
|
package/src/lib/redirection.js
CHANGED
|
@@ -2,9 +2,14 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.redirectDefaultLimit = void 0;
|
|
4
4
|
exports.getDefaultConfig = getDefaultConfig;
|
|
5
|
+
exports.fetchRedirectsData = fetchRedirectsData;
|
|
6
|
+
exports.writeRedirectFile = writeRedirectFile;
|
|
7
|
+
exports.readRedirectFileData = readRedirectFileData;
|
|
8
|
+
exports.readRedirectFile = readRedirectFile;
|
|
5
9
|
exports.fetchRedirects = fetchRedirects;
|
|
6
10
|
const tslib_1 = require("tslib");
|
|
7
11
|
const promises_1 = require("node:fs/promises");
|
|
12
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
8
13
|
const logger_1 = require("../logger");
|
|
9
14
|
exports.redirectDefaultLimit = 2000;
|
|
10
15
|
/**
|
|
@@ -13,22 +18,22 @@ exports.redirectDefaultLimit = 2000;
|
|
|
13
18
|
*/
|
|
14
19
|
function getDefaultConfig() {
|
|
15
20
|
return {
|
|
16
|
-
graphqlEndpoint: process.env['NEXT_PUBLIC_GRAPHQL_URL'] || '',
|
|
21
|
+
graphqlEndpoint: process.env['NEXT_REDIRECT_GRAPHQL_URL'] || process.env['NEXT_PUBLIC_GRAPHQL_URL'] || '',
|
|
17
22
|
graphqlApiKey: process.env['NEXT_API_TOKEN_ADMIN'] || '',
|
|
18
23
|
redirectsFilename: './redirect/redirects.json',
|
|
19
24
|
rewritesFilename: './redirect/rewrites.json',
|
|
20
25
|
limit: exports.redirectDefaultLimit,
|
|
21
26
|
};
|
|
22
27
|
}
|
|
23
|
-
function
|
|
28
|
+
function fetchRedirectsData(config) {
|
|
24
29
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
25
30
|
var _a, _b;
|
|
26
|
-
const { graphqlEndpoint, graphqlApiKey,
|
|
27
|
-
if (!graphqlEndpoint
|
|
28
|
-
throw new Error('Missing
|
|
31
|
+
const { graphqlEndpoint, graphqlApiKey, limit } = config;
|
|
32
|
+
if (!graphqlEndpoint) {
|
|
33
|
+
throw new Error('Missing fetchRedirects configuration `graphqlEndpoint`. Check environment variables NEXT_REDIRECT_GRAPHQL_URL or NEXT_PUBLIC_GRAPHQL_URL');
|
|
29
34
|
}
|
|
30
|
-
if (!
|
|
31
|
-
throw new Error('Missing
|
|
35
|
+
if (!graphqlApiKey) {
|
|
36
|
+
throw new Error('Missing fetchRedirects configuration `graphqlApiKey`. Check environment variable NEXT_API_TOKEN_ADMIN');
|
|
32
37
|
}
|
|
33
38
|
const query = `query fetchRedirects($limit: Int = 2000) {
|
|
34
39
|
redirects(filter: {status:{_eq:"published"},isrewrite:{_eq:false}}, sort: "sort", limit: $limit) {
|
|
@@ -63,16 +68,94 @@ function fetchRedirects(config) {
|
|
|
63
68
|
body: JSON.stringify(graphqlBody),
|
|
64
69
|
});
|
|
65
70
|
const { data } = yield response.json();
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
logger_1.logger.log(`Fetch redirects count: ${((_a = data.redirects) === null || _a === void 0 ? void 0 : _a.length) || 0}, rewrites count: ${((_b = data.rewrites) === null || _b === void 0 ? void 0 : _b.length) || 0}`);
|
|
72
|
+
return {
|
|
73
|
+
redirects: data.redirects || [],
|
|
74
|
+
rewrites: data.rewrites || [],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
catch (e) {
|
|
78
|
+
logger_1.logger.log(`Error fetching redirects: ${e.message}`, 'error');
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
redirects: [],
|
|
82
|
+
rewrites: [],
|
|
83
|
+
};
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Write Redirect Data
|
|
88
|
+
* @param {string} filename filename
|
|
89
|
+
* @param {unknown} data redirects data (rewrites or redirects)
|
|
90
|
+
*/
|
|
91
|
+
function writeRedirectFile(filename, data) {
|
|
92
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
try {
|
|
94
|
+
const writeData = JSON.stringify(data || []);
|
|
95
|
+
yield (0, promises_1.writeFile)(filename, writeData);
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
catch (e) {
|
|
99
|
+
logger_1.logger.log(`Error writing redirect file ${filename}: ${e.message}`, 'error');
|
|
100
|
+
}
|
|
101
|
+
return false;
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function readRedirectFileData(filename) {
|
|
105
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
106
|
+
try {
|
|
107
|
+
const file = yield (0, promises_1.readFile)(filename, { encoding: 'utf8' });
|
|
108
|
+
const data = JSON.parse(file);
|
|
109
|
+
return data;
|
|
71
110
|
}
|
|
72
111
|
catch (e) {
|
|
73
|
-
|
|
74
|
-
|
|
112
|
+
logger_1.logger.log(`Failed loading redirects JSON from ${filename}: ${e.message}`, 'error');
|
|
113
|
+
}
|
|
114
|
+
return [];
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Read one redirects or rewrites file
|
|
119
|
+
* @param {string} filePath relative file path like './redirect/redirects.json' to the current working dir
|
|
120
|
+
* @param {TRedirectType} type redirects or rewrites
|
|
121
|
+
* @returns {Promise<TRedirectData[]>} an array of redirect information
|
|
122
|
+
*/
|
|
123
|
+
function readRedirectFile(filePath_1) {
|
|
124
|
+
return tslib_1.__awaiter(this, arguments, void 0, function* (filePath, type = 'redirects') {
|
|
125
|
+
const absolutePath = path.resolve(process.cwd(), filePath);
|
|
126
|
+
const data = yield readRedirectFileData(absolutePath);
|
|
127
|
+
if (Array.isArray(data)) {
|
|
128
|
+
// check data integrity
|
|
129
|
+
const checkedData = data.filter((x) => {
|
|
130
|
+
return x && typeof (x === null || x === void 0 ? void 0 : x.source) === 'string' && typeof (x === null || x === void 0 ? void 0 : x.destination) === 'string';
|
|
131
|
+
});
|
|
132
|
+
logger_1.logger.log(`Loading ${type} length: ${checkedData.length}`);
|
|
133
|
+
return checkedData;
|
|
134
|
+
}
|
|
135
|
+
logger_1.logger.log(`Failed loading ${type}, not a valid array`, 'error');
|
|
136
|
+
return [];
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Fetch and write redirects and rewrites files
|
|
141
|
+
* @param {TFetchRedirectsConfig} config fetch redirects configuration
|
|
142
|
+
* @returns {Promise<boolean>} true
|
|
143
|
+
* @throws {Error}
|
|
144
|
+
*/
|
|
145
|
+
function fetchRedirects(config) {
|
|
146
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
const { redirectsFilename, rewritesFilename } = config;
|
|
148
|
+
if (!redirectsFilename) {
|
|
149
|
+
throw new Error('Missing fetchRedirects configuration `redirectsFilename`');
|
|
150
|
+
}
|
|
151
|
+
if (!rewritesFilename) {
|
|
152
|
+
throw new Error('Missing fetchRedirects configuration `rewritesFilename`');
|
|
75
153
|
}
|
|
154
|
+
// fetch can throw
|
|
155
|
+
const data = yield fetchRedirectsData(config);
|
|
156
|
+
// should not throw
|
|
157
|
+
yield writeRedirectFile(redirectsFilename, data.redirects);
|
|
158
|
+
yield writeRedirectFile(rewritesFilename, data.rewrites);
|
|
76
159
|
return true;
|
|
77
160
|
});
|
|
78
161
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redirection.js","sourceRoot":"","sources":["../../../../../../libs/directus/directus-node/src/lib/redirection.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"redirection.js","sourceRoot":"","sources":["../../../../../../libs/directus/directus-node/src/lib/redirection.ts"],"names":[],"mappings":";;;AAgCA,4CAQC;AAED,gDA8DC;AAOD,8CASC;AAED,oDASC;AAQD,4CAaC;AAQD,wCAkBC;;AAlLD,+CAAsD;AACtD,wDAAiC;AACjC,sCAAkC;AAwBrB,QAAA,oBAAoB,GAAG,IAAI,CAAA;AAExC;;;GAGG;AACH,SAAgB,gBAAgB;IAC9B,OAAO;QACL,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,IAAI,EAAE;QACzG,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,IAAI,EAAE;QACxD,iBAAiB,EAAE,2BAA2B;QAC9C,gBAAgB,EAAE,0BAA0B;QAC5C,KAAK,EAAE,4BAAoB;KAC5B,CAAA;AACH,CAAC;AAED,SAAsB,kBAAkB,CAAC,MAA6B;;;QACpE,MAAM,EAAE,eAAe,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,MAAM,CAAA;QAExD,IAAI,CAAC,eAAe,EAAE,CAAC;YACrB,MAAM,IAAI,KAAK,CACb,0IAA0I,CAC3I,CAAA;QACH,CAAC;QACD,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,MAAM,IAAI,KAAK,CACb,uGAAuG,CACxG,CAAA;QACH,CAAC;QAED,MAAM,KAAK,GAAG;;;;;;;;;;;;;EAad,CAAA;QAEA,MAAM,WAAW,GAAG;YAClB,KAAK;YACL,uBAAuB;YACvB,SAAS,EAAE;gBACT,KAAK,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,4BAAoB;aAC7C;SACF,CAAA;QAED,IAAI,CAAC;YACH,2DAA2D;YAC3D,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,eAAe,EAAE;gBAC5C,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,gEAAgE;o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KG;AACH,SAAsB,cAAc,CAAC,MAA6B;;QAChE,MAAM,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAA;QAEtD,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAA;QAC7E,CAAC;QAED,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAA;QAC5E,CAAC;QAED,kBAAkB;QAClB,MAAM,IAAI,GAAG,MAAM,kBAAkB,CAAC,MAAM,CAAC,CAAA;QAE7C,mBAAmB;QACnB,MAAM,iBAAiB,CAAC,iBAAiB,EAAE,IAAI,CAAC,SAAS,CAAC,CAAA;QAC1D,MAAM,iBAAiB,CAAC,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;QACxD,OAAO,IAAI,CAAA;IACb,CAAC;CAAA"}
|
package/src/logger.d.ts
CHANGED
package/src/logger.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.logger = void 0;
|
|
4
4
|
const logger_1 = require("@okam/logger");
|
|
5
5
|
exports.logger = (0, logger_1.createLogger)('[DirectusNode]');
|
|
6
|
-
exports.log = exports.logger.log;
|
|
7
6
|
//# sourceMappingURL=logger.js.map
|
package/src/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../../libs/directus/directus-node/src/logger.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;AAE9B,QAAA,MAAM,GAAG,IAAA,qBAAY,EAAC,gBAAgB,CAAC,CAAA
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../../../libs/directus/directus-node/src/logger.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;AAE9B,QAAA,MAAM,GAAG,IAAA,qBAAY,EAAC,gBAAgB,CAAC,CAAA"}
|