@mxpicture/gcp-functions-generator 0.2.6 → 0.2.7
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/dist/common/Barrel.js +1 -1
- package/dist/common/Extractor.js +1 -1
- package/dist/common/GenChangeDetector.d.ts +1 -1
- package/dist/common/GenChangeDetector.js +1 -1
- package/dist/generator/Generator.js +2 -1
- package/dist/generator/GeneratorAnnotations.js +1 -1
- package/dist/meta/meta.imports.js +1 -1
- package/package.json +6 -6
package/dist/common/Barrel.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { basename, dirname, join } from "node:path";
|
|
2
|
-
import { formatCode } from "@mxpicture/gcp-functions-code/common";
|
|
3
2
|
import { mkdir, writeFile, readFile } from "node:fs/promises";
|
|
4
3
|
import { directories } from "./Directories.js";
|
|
4
|
+
import { formatCode } from "@mxpicture/build-api/format";
|
|
5
5
|
export class Barrel {
|
|
6
6
|
targetType;
|
|
7
7
|
static ignorePackageJson = false;
|
package/dist/common/Extractor.js
CHANGED
|
@@ -2,10 +2,10 @@ import ts from "typescript";
|
|
|
2
2
|
import { Evaluate } from "./Evaluate.js";
|
|
3
3
|
import { metaRename } from "../meta/meta.names.js";
|
|
4
4
|
import { dirname, relative } from "node:path";
|
|
5
|
-
import { createSourceFiles } from "@mxpicture/gcp-functions-code/common";
|
|
6
5
|
import { MetaFileType, MetaHeadType, metaMainOptionsMap, metaPropertyOptionsMap, } from "@mxpicture/gcp-functions-common/meta";
|
|
7
6
|
import { findWorkspaceRoot } from "@mxpicture/build-api/workspace";
|
|
8
7
|
import { fileURLToPath } from "node:url";
|
|
8
|
+
import { createSourceFiles } from "@mxpicture/build-api/format";
|
|
9
9
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
10
10
|
export const createExtractors = async (filePaths) => {
|
|
11
11
|
const rootDir = (await findWorkspaceRoot(__dirname)).dirPath;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MetaFileType } from "@mxpicture/gcp-functions-common/meta";
|
|
2
2
|
import { ChangeDetector, ChangeEventHandler, Changelog } from "@mxpicture/gcp-functions-code/changelog";
|
|
3
|
-
import { GitChangesCommit } from "@mxpicture/gcp-functions-code/git";
|
|
4
3
|
import { PackageVersion } from "@mxpicture/build-api/types";
|
|
4
|
+
import { GitChangesCommit } from "@mxpicture/build-api/git";
|
|
5
5
|
export interface GenChangeParams {
|
|
6
6
|
gitSinceCommit: {
|
|
7
7
|
rootDir: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeDetector, ChangeWatchType, Changelog, } from "@mxpicture/gcp-functions-code/changelog";
|
|
2
|
-
import { GitChangesCommit } from "@mxpicture/gcp-functions-code/git";
|
|
3
2
|
import { createGenerators, } from "@mxpicture/gcp-functions-generator/common";
|
|
3
|
+
import { GitChangesCommit } from "@mxpicture/build-api/git";
|
|
4
4
|
export class GenChangeDetector extends ChangeDetector {
|
|
5
5
|
}
|
|
6
6
|
const endsWithName = (path, filenameWoExt) => path.endsWith(`/${filenameWoExt}.ts`) ||
|
|
@@ -2,8 +2,9 @@ import { basename, dirname } from "node:path";
|
|
|
2
2
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
3
3
|
import { MetaFileExtension, MetaTargetType, } from "@mxpicture/gcp-functions-common/meta";
|
|
4
4
|
import { directories } from "../common/Directories.js";
|
|
5
|
-
import { toFilename
|
|
5
|
+
import { toFilename } from "@mxpicture/gcp-functions-code/common";
|
|
6
6
|
import { metaBasenameAsync, metaBackendNamesAsync, metaFrontendNamesAsync, metaNamesAsync, } from "../meta/meta.names.js";
|
|
7
|
+
import { formatCode, formatJson } from "@mxpicture/build-api/format";
|
|
7
8
|
const importToCode = (imp) => imp.props.length > 0
|
|
8
9
|
? `import ${imp.isType ? "type " : ""}{ ${[...imp.props].join(", ")} } from "${imp.path}"`
|
|
9
10
|
: null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MetaFileType, MetaFileExtension, MetaTargetType, mapAnnotationsHeader, } from "@mxpicture/gcp-functions-common/meta";
|
|
2
2
|
import { Generator } from "./Generator.js";
|
|
3
3
|
import { Collector } from "../common/Collector.js";
|
|
4
|
-
import { formatJson2Spaces } from "@mxpicture/
|
|
4
|
+
import { formatJson2Spaces } from "@mxpicture/build-api/format";
|
|
5
5
|
const typeRegex = /\"type\": \"([a-zA-Z][a-zA-Z0-9]*)\"/;
|
|
6
6
|
const itemTypeRegex = /\"itemType\": \"(MetaPropertyType\.|)([a-zA-Z][a-zA-Z0-9]*)\"/;
|
|
7
7
|
const propertyRefRegex = /\"propertyRef\": \"([a-zA-Z][a-zA-Z0-9]*)\"/;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
|
-
import { createSourceFiles } from "@mxpicture/
|
|
2
|
+
import { createSourceFiles } from "@mxpicture/build-api/format";
|
|
3
3
|
export const extractNamedImports = (sourceFile) => {
|
|
4
4
|
if (typeof sourceFile === "string") {
|
|
5
5
|
const files = createSourceFiles([sourceFile]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mxpicture/gcp-functions-generator",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Tools for google cloud functions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "MXPicture",
|
|
@@ -31,11 +31,11 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@mxpicture/build-api": "^0.2.
|
|
35
|
-
"@mxpicture/gcp-functions-backend": "^0.2.
|
|
36
|
-
"@mxpicture/gcp-functions-code": "^0.2.
|
|
37
|
-
"@mxpicture/gcp-functions-common": "^0.2.
|
|
38
|
-
"@mxpicture/gcp-functions-frontend": "^0.2.
|
|
34
|
+
"@mxpicture/build-api": "^0.2.14",
|
|
35
|
+
"@mxpicture/gcp-functions-backend": "^0.2.7",
|
|
36
|
+
"@mxpicture/gcp-functions-code": "^0.2.7",
|
|
37
|
+
"@mxpicture/gcp-functions-common": "^0.2.7",
|
|
38
|
+
"@mxpicture/gcp-functions-frontend": "^0.2.7"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@types/node": "^25.2.3",
|