@xwiki/cristal-page-api 0.20.0 → 0.21.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @xwiki/cristal-page-api
2
2
 
3
+ ## 0.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Cristal 0.21 Release
8
+
3
9
  ## 0.20.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1,3 +1,22 @@
1
+ /**
2
+ * See the LICENSE file distributed with this work for additional
3
+ * information regarding copyright ownership.
4
+ *
5
+ * This is free software; you can redistribute it and/or modify it
6
+ * under the terms of the GNU Lesser General Public License as
7
+ * published by the Free Software Foundation; either version 2.1 of
8
+ * the License, or (at your option) any later version.
9
+ *
10
+ * This software is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
14
+ *
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this software; if not, write to the Free
17
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
+ */
1
20
  /**
2
21
  * Provide the operations to read a page content
3
22
  * @since 0.20
@@ -22,3 +41,4 @@ interface PageWriter {
22
41
  }): string;
23
42
  }
24
43
  export type { PageReader, PageWriter };
44
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH;;;GAGG;AACH,UAAU,UAAU;IAClB;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CAC3D;AAED;;GAEG;AACH,UAAU,UAAU;IAClB,SAAS,CAAC,WAAW,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,MAAM,CAAC;CAC5D;AAED,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xwiki/cristal-page-api",
3
- "version": "0.20.0",
3
+ "version": "0.21.0",
4
4
  "license": "LGPL 2.1",
5
5
  "author": "XWiki Org Community <contact@xwiki.org>",
6
6
  "homepage": "https://cristal.xwiki.org/",
@@ -15,33 +15,23 @@
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
18
- "import": {
19
- "types": "./dist/index.d.ts",
20
- "default": "./dist/index.es.js"
21
- },
22
- "require": {
23
- "types": "./dist/index.d.cts",
24
- "default": "./dist/index.umd.js"
25
- }
18
+ "types": "./dist/index.d.ts"
26
19
  }
27
20
  },
28
- "main": "./dist/index.es.js",
29
- "dependencies": {
30
- "inversify": "7.5.4"
31
- },
21
+ "types": "./src/index.ts",
32
22
  "peerDependencies": {
23
+ "inversify": "7.x",
33
24
  "reflect-metadata": "0.x"
34
25
  },
35
26
  "devDependencies": {
27
+ "inversify": "7.7.0",
36
28
  "reflect-metadata": "0.2.2",
37
- "typescript": "5.8.3",
38
- "vite": "7.0.0",
39
- "@xwiki/cristal-dev-config": "0.20.0"
29
+ "typescript": "5.9.2",
30
+ "@xwiki/cristal-dev-config": "0.21.0"
40
31
  },
41
32
  "scripts": {
42
- "build": "tsc --project tsconfig.json && vite build",
43
- "lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0",
44
- "test": "vitest --run"
45
- },
46
- "types": "./dist/index.d.ts"
33
+ "build": "rimraf dist && tsc --project tsconfig.json",
34
+ "clean": "rimraf dist",
35
+ "lint": "eslint \"./src/**/*.{ts,tsx,vue}\" --max-warnings=0"
36
+ }
47
37
  }
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- /*
1
+ /**
2
2
  * See the LICENSE file distributed with this work for additional
3
3
  * information regarding copyright ownership.
4
4
  *
package/tsconfig.json CHANGED
@@ -2,7 +2,10 @@
2
2
  "compilerOptions": {
3
3
  "rootDir": "src",
4
4
  "outDir": "dist",
5
- "resolveJsonModule": true
5
+ "resolveJsonModule": true,
6
+ "emitDeclarationOnly": true,
7
+ "noEmit": false,
8
+ "declarationMap": true
6
9
  },
7
10
  "extends": "../../../tsconfig.json",
8
11
  "include": [
package/dist/index.d.cts DELETED
@@ -1,24 +0,0 @@
1
- /**
2
- * Provide the operations to read a page content
3
- * @since 0.20
4
- */
5
- interface PageReader {
6
- /**
7
- * Parse the provided page content, and returns a json object containing the actual page content plus the
8
- * available metadata. The metadata are expected to be provided as a yaml object wrapped between two lines
9
- * containing exactly '---'
10
- * @param pageContent - the provided page content
11
- */
12
- readPage(pageContent: string): {
13
- [key: string]: unknown;
14
- };
15
- }
16
- /**
17
- * @since 0.20
18
- */
19
- interface PageWriter {
20
- writePage(pageContent: {
21
- [key: string]: unknown;
22
- }): string;
23
- }
24
- export type { PageReader, PageWriter };
package/dist/index.es.js DELETED
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=index.es.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/dist/index.umd.js DELETED
@@ -1,2 +0,0 @@
1
- (function(n){typeof define=="function"&&define.amd?define(n):n()})(function(){"use strict"});
2
- //# sourceMappingURL=index.umd.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.umd.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/vite.config.ts DELETED
@@ -1,23 +0,0 @@
1
- /*
2
- * See the LICENSE file distributed with this work for additional
3
- * information regarding copyright ownership.
4
- *
5
- * This is free software; you can redistribute it and/or modify it
6
- * under the terms of the GNU Lesser General Public License as
7
- * published by the Free Software Foundation; either version 2.1 of
8
- * the License, or (at your option) any later version.
9
- *
10
- * This software is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * Lesser General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Lesser General Public
16
- * License along with this software; if not, write to the Free
17
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
- */
20
-
21
- import { generateConfig } from "../../../vite.config";
22
-
23
- export default generateConfig(import.meta.url);
package/vitest.config.ts DELETED
@@ -1,25 +0,0 @@
1
- /*
2
- * See the LICENSE file distributed with this work for additional
3
- * information regarding copyright ownership.
4
- *
5
- * This is free software; you can redistribute it and/or modify it
6
- * under the terms of the GNU Lesser General Public License as
7
- * published by the Free Software Foundation; either version 2.1 of
8
- * the License, or (at your option) any later version.
9
- *
10
- * This software is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
- * Lesser General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU Lesser General Public
16
- * License along with this software; if not, write to the Free
17
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
19
- */
20
-
21
- import localConfig from "./vite.config";
22
- import { mergeConfig } from "vitest/config";
23
- import defaultConfig from "@xwiki/cristal-dev-config/vitest-vue.config";
24
-
25
- export default mergeConfig(defaultConfig, localConfig);