@open-xchange/vite-plugin-ox-manifests 0.6.0 → 0.6.2
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 +17 -1
- package/dist/index.d.ts +4 -10
- package/dist/index.js +8 -9
- package/dist/plugins/gettext.d.ts +1 -1
- package/dist/plugins/gettext.js +2 -3
- package/dist/plugins/manifests.d.ts +1 -1
- package/dist/plugins/manifests.js +2 -3
- package/dist/plugins/meta.d.ts +1 -1
- package/dist/plugins/meta.js +2 -3
- package/dist/plugins/plugin.d.ts +2 -1
- package/dist/plugins/relative-paths.d.ts +1 -1
- package/dist/plugins/relative-paths.js +2 -2
- package/dist/plugins/serve.d.ts +1 -1
- package/dist/plugins/serve.js +2 -2
- package/dist/plugins/settings.d.ts +1 -1
- package/dist/plugins/settings.js +2 -3
- package/dist/util.d.ts +8 -1
- package/dist/util.js +1 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,20 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.6.2] - 2023-06-21
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Missing production dependency [`c65e16e`](https://gitlab.open-xchange.com/frontend/vite-plugin-ox-manifests/commit/c65e16e335a598caab34cb7e36893001dccf4e3e)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [0.6.1] - 2023-05-31
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Add file extensions to local imports [`06a01f5`](https://gitlab.open-xchange.com/frontend/vite-plugin-ox-manifests/commit/06a01f59ba0e8c8350f066c1e18e880a83e9679b)
|
|
19
|
+
|
|
20
|
+
|
|
7
21
|
## [0.6.0] - 2023-05-16
|
|
8
22
|
|
|
9
23
|
### Changed
|
|
@@ -33,7 +47,9 @@ All notable changes to this project will be documented in this file.
|
|
|
33
47
|
|
|
34
48
|
- Start Changelog
|
|
35
49
|
|
|
36
|
-
[unreleased]: https://gitlab.open-xchange.com/frontend/vite-plugin-ox-manifests/compare/0.6.
|
|
50
|
+
[unreleased]: https://gitlab.open-xchange.com/frontend/vite-plugin-ox-manifests/compare/0.6.2...main
|
|
51
|
+
[0.6.2]: https://gitlab.open-xchange.com/frontend/vite-plugin-ox-manifests/compare/0.6.1...0.6.2
|
|
52
|
+
[0.6.1]: https://gitlab.open-xchange.com/frontend/vite-plugin-ox-manifests/compare/0.6.0...0.6.1
|
|
37
53
|
[0.6.0]: https://gitlab.open-xchange.com/frontend/vite-plugin-ox-manifests/compare/0.5.4...0.6.0
|
|
38
54
|
[0.5.4]: https://gitlab.open-xchange.com/frontend/vite-plugin-ox-manifests/compare/0.5.3...0.5.4
|
|
39
55
|
[0.5.3]: https://gitlab.open-xchange.com/frontend/vite-plugin-ox-manifests/compare/0.5.2...0.5.3
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import type { Plugin } from 'vite';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
path: string;
|
|
7
|
-
requires?: string;
|
|
8
|
-
raw?: string;
|
|
9
|
-
generator?: string;
|
|
10
|
-
}
|
|
2
|
+
import type { OxManifest } from './util.js';
|
|
3
|
+
import { PROJECT_NAME, mergeManifests } from './util.js';
|
|
4
|
+
export type { OxManifest };
|
|
5
|
+
export { PROJECT_NAME, mergeManifests };
|
|
11
6
|
/**
|
|
12
7
|
* Configuration options for the Vite plugin "vite-plugin-ox-manifests".
|
|
13
8
|
*/
|
|
@@ -49,7 +44,6 @@ export interface VitePluginOxManifestsOptions {
|
|
|
49
44
|
export interface VitePluginOxManifests extends Plugin {
|
|
50
45
|
getManifests(): Promise<OxManifest[]>;
|
|
51
46
|
}
|
|
52
|
-
export declare const PROJECT_NAME = "@open-xchange/vite-plugin-ox-manifests";
|
|
53
47
|
/**
|
|
54
48
|
* Creates a vite-plugin to include manifests in dev and production mode
|
|
55
49
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { deepMergeObject, mergeManifests } from './util';
|
|
2
|
-
import manifestsPlugin from './plugins/manifests';
|
|
3
|
-
import relativePathsPlugin from './plugins/relative-paths';
|
|
4
|
-
import settingsPlugin from './plugins/settings';
|
|
5
|
-
import servePlugin from './plugins/serve';
|
|
6
|
-
import gettextPlugin from './plugins/gettext';
|
|
7
|
-
import metaPlugin from './plugins/meta';
|
|
8
|
-
export { mergeManifests };
|
|
9
|
-
export const PROJECT_NAME = '@open-xchange/vite-plugin-ox-manifests';
|
|
1
|
+
import { PROJECT_NAME, deepMergeObject, mergeManifests } from './util.js';
|
|
2
|
+
import manifestsPlugin from './plugins/manifests.js';
|
|
3
|
+
import relativePathsPlugin from './plugins/relative-paths.js';
|
|
4
|
+
import settingsPlugin from './plugins/settings.js';
|
|
5
|
+
import servePlugin from './plugins/serve.js';
|
|
6
|
+
import gettextPlugin from './plugins/gettext.js';
|
|
7
|
+
import metaPlugin from './plugins/meta.js';
|
|
8
|
+
export { PROJECT_NAME, mergeManifests };
|
|
10
9
|
/**
|
|
11
10
|
* Creates a vite-plugin to include manifests in dev and production mode
|
|
12
11
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("./plugin").VitePluginOxManifestsPluginFn;
|
|
1
|
+
declare const _default: import("./plugin.js").VitePluginOxManifestsPluginFn;
|
|
2
2
|
export default _default;
|
package/dist/plugins/gettext.js
CHANGED
|
@@ -2,9 +2,8 @@ import { dirname, posix } from 'node:path';
|
|
|
2
2
|
import { readdir } from 'node:fs/promises';
|
|
3
3
|
import { normalizePath } from 'vite';
|
|
4
4
|
import { PROJECT_NAME as GETTEXT_PROJECT_NAME, parsePoFile, namespacesFrom } from '@open-xchange/rollup-plugin-po2json';
|
|
5
|
-
import { definePlugin } from './plugin';
|
|
6
|
-
import { applyInputToOptions } from '../util';
|
|
7
|
-
import { PROJECT_NAME } from '../index';
|
|
5
|
+
import { definePlugin } from './plugin.js';
|
|
6
|
+
import { PROJECT_NAME, applyInputToOptions } from '../util.js';
|
|
8
7
|
export default definePlugin(() => {
|
|
9
8
|
const manifests = [];
|
|
10
9
|
let resolvedConfig;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("./plugin").VitePluginOxManifestsPluginFn;
|
|
1
|
+
declare const _default: import("./plugin.js").VitePluginOxManifestsPluginFn;
|
|
2
2
|
export default _default;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import fs from 'node:fs';
|
|
3
3
|
import fastGlob from 'fast-glob';
|
|
4
|
-
import { definePlugin } from './plugin';
|
|
5
|
-
import { applyInputToOptions, basepath, joinUrlPaths, stringifyJSON } from '../util';
|
|
6
|
-
import { PROJECT_NAME } from '../index';
|
|
4
|
+
import { definePlugin } from './plugin.js';
|
|
5
|
+
import { PROJECT_NAME, applyInputToOptions, basepath, joinUrlPaths, stringifyJSON } from '../util.js';
|
|
7
6
|
async function getManifestEntryFile(basePath, extensions) {
|
|
8
7
|
if (path.extname(basePath)) {
|
|
9
8
|
try {
|
package/dist/plugins/meta.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("./plugin").VitePluginOxManifestsPluginFn;
|
|
1
|
+
declare const _default: import("./plugin.js").VitePluginOxManifestsPluginFn;
|
|
2
2
|
export default _default;
|
package/dist/plugins/meta.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { definePlugin } from './plugin';
|
|
2
|
-
import { stringifyJSON } from '../util';
|
|
3
|
-
import { PROJECT_NAME } from '../index';
|
|
1
|
+
import { definePlugin } from './plugin.js';
|
|
2
|
+
import { PROJECT_NAME, stringifyJSON } from '../util.js';
|
|
4
3
|
export default definePlugin(({ meta }) => {
|
|
5
4
|
let resolvedConfig;
|
|
6
5
|
return {
|
package/dist/plugins/plugin.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Plugin } from 'vite';
|
|
2
2
|
import type { GettextPluginModuleMeta } from '@open-xchange/rollup-plugin-po2json';
|
|
3
|
-
import type { OxManifest
|
|
3
|
+
import type { OxManifest } from '../util.js';
|
|
4
|
+
import type { VitePluginOxManifests, VitePluginOxManifestsOptions } from '../index.js';
|
|
4
5
|
/**
|
|
5
6
|
* Type shape of an internal manifests implementation plugin.
|
|
6
7
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("./plugin").VitePluginOxManifestsPluginFn;
|
|
1
|
+
declare const _default: import("./plugin.js").VitePluginOxManifestsPluginFn;
|
|
2
2
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { definePlugin } from './plugin';
|
|
2
|
-
import { PROJECT_NAME } from '../
|
|
1
|
+
import { definePlugin } from './plugin.js';
|
|
2
|
+
import { PROJECT_NAME } from '../util.js';
|
|
3
3
|
export default definePlugin(options => {
|
|
4
4
|
if ('transformAbsolutePaths' in options)
|
|
5
5
|
console.warn("transformAbsolutePaths is no longer used. Use `base: './'` with vite 3");
|
package/dist/plugins/serve.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("./plugin").VitePluginOxManifestsPluginFn;
|
|
1
|
+
declare const _default: import("./plugin.js").VitePluginOxManifestsPluginFn;
|
|
2
2
|
export default _default;
|
package/dist/plugins/serve.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import path, { posix } from 'node:path';
|
|
2
2
|
import parseurl from 'parseurl';
|
|
3
3
|
import chokidar from 'chokidar';
|
|
4
|
-
import { definePlugin } from './plugin';
|
|
5
|
-
import { PROJECT_NAME } from '../
|
|
4
|
+
import { definePlugin } from './plugin.js';
|
|
5
|
+
import { PROJECT_NAME } from '../util.js';
|
|
6
6
|
function sendJSON(res, data) {
|
|
7
7
|
res.statusCode = 200;
|
|
8
8
|
res.setHeader('Content-Type', 'application/json');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("./plugin").VitePluginOxManifestsPluginFn;
|
|
1
|
+
declare const _default: import("./plugin.js").VitePluginOxManifestsPluginFn;
|
|
2
2
|
export default _default;
|
package/dist/plugins/settings.js
CHANGED
|
@@ -2,9 +2,8 @@ import fs from 'node:fs/promises';
|
|
|
2
2
|
import path, { posix } from 'node:path';
|
|
3
3
|
import fastGlob from 'fast-glob';
|
|
4
4
|
import { PROJECT_NAME as EXTERNALS_PROJECT_NAME } from '@open-xchange/vite-plugin-ox-externals';
|
|
5
|
-
import { definePlugin } from './plugin';
|
|
6
|
-
import { applyInputToOptions, basepath } from '../util';
|
|
7
|
-
import { PROJECT_NAME } from '../index';
|
|
5
|
+
import { definePlugin } from './plugin.js';
|
|
6
|
+
import { PROJECT_NAME, applyInputToOptions, basepath } from '../util.js';
|
|
8
7
|
function shiftSet(set) {
|
|
9
8
|
const result = set.values().next();
|
|
10
9
|
if (result.done)
|
package/dist/util.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { ResolvedConfig, ViteDevServer, Rollup } from 'vite';
|
|
2
|
-
import type { OxManifest } from './index';
|
|
3
2
|
export type Dict<T = unknown> = Record<string, T>;
|
|
3
|
+
export interface OxManifest {
|
|
4
|
+
namespace: string;
|
|
5
|
+
path: string;
|
|
6
|
+
requires?: string;
|
|
7
|
+
raw?: string;
|
|
8
|
+
generator?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const PROJECT_NAME = "@open-xchange/vite-plugin-ox-manifests";
|
|
4
11
|
export declare function applyInputToOptions(input: Dict<string>, options: Rollup.InputOptions): void;
|
|
5
12
|
export declare function joinUrlPaths(...paths: string[]): string;
|
|
6
13
|
export declare function basepath(src: string): string;
|
package/dist/util.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-xchange/vite-plugin-ox-manifests",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "A vite plugin to concat and serve ox manifests",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -12,18 +12,18 @@
|
|
|
12
12
|
"prepare": "husky install",
|
|
13
13
|
"lint": "tsc --noEmit && eslint . --ext .js,.cjs,.mjs,.ts",
|
|
14
14
|
"build": "npx --yes rimraf dist && tsc",
|
|
15
|
-
"test": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --max_old_space_size=1792\" jest --
|
|
15
|
+
"test": "yarn build && cross-env NODE_OPTIONS=\"--experimental-vm-modules --max_old_space_size=1792\" jest --runInBand"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@open-xchange/rollup-plugin-po2json": "^0.8.0",
|
|
19
|
+
"@open-xchange/vite-plugin-ox-externals": "^0.5.0",
|
|
19
20
|
"chokidar": "^3.5.1",
|
|
20
21
|
"fast-glob": "^3.2.12",
|
|
21
22
|
"magic-string": "^0.30.0",
|
|
22
23
|
"parseurl": "^1.3.3"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
|
-
"@open-xchange/lint": "^0.0.
|
|
26
|
-
"@open-xchange/vite-plugin-ox-externals": "^0.5.0",
|
|
26
|
+
"@open-xchange/lint": "^0.0.3",
|
|
27
27
|
"@types/node": "^20.1.5",
|
|
28
28
|
"@types/parseurl": "^1.3.1",
|
|
29
29
|
"@typescript-eslint/eslint-plugin": "^5.59.0",
|