gdcore-tools 2.0.0-beta8 → 2.0.0-beta9
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/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gdcore-tools",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-beta9",
|
|
4
4
|
"description": "A package of GDevelop's Core library with additional helper tools.",
|
|
5
|
-
"type": "module",
|
|
6
5
|
"types": "./types/index.d.ts",
|
|
7
6
|
"exports": {
|
|
8
7
|
".": {
|
|
9
8
|
"import": {
|
|
10
9
|
"types": "./types/index.d.ts",
|
|
11
|
-
"default": "./src/index.
|
|
10
|
+
"default": "./src/index.mjs"
|
|
12
11
|
}
|
|
13
12
|
}
|
|
14
13
|
},
|
|
@@ -17,7 +16,7 @@
|
|
|
17
16
|
"url": "git+https://github.com/arthuro555/gdcore-tools.git"
|
|
18
17
|
},
|
|
19
18
|
"engines": {
|
|
20
|
-
"node": "
|
|
19
|
+
"node": ">=18"
|
|
21
20
|
},
|
|
22
21
|
"files": [
|
|
23
22
|
"src",
|
|
@@ -2,7 +2,7 @@ import { join } from "node:path";
|
|
|
2
2
|
//@ts-ignore It's this file's job to apply the types, the imported file cannot yet be typed.
|
|
3
3
|
import initializeGDevelopJs from "../dist/lib/libGD.cjs";
|
|
4
4
|
import { __dirname } from "./utils.mjs";
|
|
5
|
-
import { createProjectLoader, createProjectSaver } from "./open_project.
|
|
5
|
+
import { createProjectLoader, createProjectSaver } from "./open_project.mjs";
|
|
6
6
|
|
|
7
7
|
export let gd_internal_logs = "";
|
|
8
8
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {gd.Project} project
|
|
3
|
+
* @param {string} outputDirectory
|
|
4
|
+
* @param {"electron" | "cordova" | "facebookInstantGames"} [exportTarget]
|
|
5
|
+
*/
|
|
6
|
+
export function exportProject(project: gd.Project, outputDirectory: string, exportTarget?: "electron" | "cordova" | "facebookInstantGames" | undefined): void;
|
|
7
|
+
export let gd_internal_logs: string;
|
|
8
|
+
/** @type {typeof import("../gd.js")} */
|
|
9
|
+
export const gd: typeof import("../gd.js");
|
|
10
|
+
export const runtimePath: string;
|
|
11
|
+
/** @type {gd.AbstractFileSystemJS} */
|
|
12
|
+
export const localFileSystem: gd.AbstractFileSystemJS;
|
|
13
|
+
/**
|
|
14
|
+
* @param {string} path
|
|
15
|
+
* @returns {Promise<gd.Project>}
|
|
16
|
+
*/
|
|
17
|
+
export const loadProject: (projectFilePath: string) => Promise<gd.Project>;
|
|
18
|
+
/**
|
|
19
|
+
* @param {gd.Project} project
|
|
20
|
+
* @param {string} [pathToProjectFile]
|
|
21
|
+
* @returns {Promise<void>}
|
|
22
|
+
*/
|
|
23
|
+
export const saveProject: (project: gd.Project, pathToProjectFile?: string) => Promise<void>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export function createProjectLoader({ gd, unsplit, loadProjectEventsFunctionsExtensions, makeLocalEventsFunctionCodeWriter, }: {
|
|
2
|
+
gd: typeof import("../gd.js");
|
|
3
|
+
unsplit: (object: any, opts: {
|
|
4
|
+
getReferencePartialObject: ((path: string) => Promise<string>);
|
|
5
|
+
isReferenceMagicPropertyName: string;
|
|
6
|
+
maxUnsplitDepth: number;
|
|
7
|
+
}) => any;
|
|
8
|
+
loadProjectEventsFunctionsExtensions: ((project: gd.Project, writer: any, i18n: any) => Promise<void>);
|
|
9
|
+
makeLocalEventsFunctionCodeWriter: ((opts: {
|
|
10
|
+
onWriteFile: () => void;
|
|
11
|
+
}) => any);
|
|
12
|
+
}): (projectFilePath: string) => Promise<gd.Project>;
|
|
13
|
+
export function createProjectSaver({ gd, split, getSlugifiedUniqueNameFromProperty, }: {
|
|
14
|
+
gd: typeof import("../gd.js");
|
|
15
|
+
split: (object: any, opts: {
|
|
16
|
+
pathSeparator: string;
|
|
17
|
+
getArrayItemReferenceName: (object: Object, currentReference: string) => string;
|
|
18
|
+
shouldSplit: (path: string) => boolean;
|
|
19
|
+
isReferenceMagicPropertyName: string;
|
|
20
|
+
}) => {
|
|
21
|
+
reference: string;
|
|
22
|
+
object: {};
|
|
23
|
+
}[];
|
|
24
|
+
getSlugifiedUniqueNameFromProperty: (propertyName: string) => (object: Object, currentReference: string) => string;
|
|
25
|
+
}): (project: gd.Project, pathToProjectFile?: string) => Promise<void>;
|
|
File without changes
|