@mxpicture/gcp-functions-generator 0.2.1 → 0.2.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/dist/4testing/templates/template.settings.js +1 -1
- package/dist/4testing/utils.d.ts +0 -1
- package/dist/4testing/utils.js +3 -4
- package/dist/common/Barrel.js +1 -1
- package/dist/common/GenChangeDetector.d.ts +2 -1
- package/dist/common/generator.common.d.ts +0 -1
- package/dist/common/generator.common.js +0 -1
- package/dist/generator/GeneratorZod.js +0 -2
- package/package.json +8 -9
- package/dist/4testing/index.d.ts +0 -1
- package/dist/4testing/index.js +0 -2
package/dist/4testing/utils.d.ts
CHANGED
package/dist/4testing/utils.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { rm } from "node:fs/promises";
|
|
2
2
|
import { join, resolve } from "node:path";
|
|
3
|
-
export const
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const createTestWorkspace = async () => join(testingDir, `generator-test-${Date.now()}`);
|
|
3
|
+
export const wsRoot = resolve(__dirname, "../..");
|
|
4
|
+
export const templatesDir = resolve(__dirname, "./templates");
|
|
5
|
+
export const createTestWorkspace = async () => join(__dirname, `generator-test-${Date.now()}`);
|
|
7
6
|
export const removeTestWorkspace = async (p) => {
|
|
8
7
|
if (!p)
|
|
9
8
|
return;
|
package/dist/common/Barrel.js
CHANGED
|
@@ -50,7 +50,7 @@ export class Barrel {
|
|
|
50
50
|
for (const result of results) {
|
|
51
51
|
const parts = result.barrelFilePath.split("/src/");
|
|
52
52
|
if (parts.length < 2)
|
|
53
|
-
continue;
|
|
53
|
+
continue;
|
|
54
54
|
const indexPath = `./src/${parts[parts.length - 1]}`;
|
|
55
55
|
const expPath = dirname(`./${parts[parts.length - 1]}`);
|
|
56
56
|
if (!pkg.exports)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { MetaFileType } from "@mxpicture/gcp-functions-common/meta";
|
|
2
|
-
import { ChangeDetector, ChangeEventHandler, Changelog
|
|
2
|
+
import { ChangeDetector, ChangeEventHandler, Changelog } from "@mxpicture/gcp-functions-code/changelog";
|
|
3
3
|
import { GitChangesCommit } from "@mxpicture/gcp-functions-code/git";
|
|
4
|
+
import { PackageVersion } from "@mxpicture/gcp-functions-code/common";
|
|
4
5
|
export interface GenChangeParams {
|
|
5
6
|
gitSinceCommit: {
|
|
6
7
|
rootDir: string;
|
|
@@ -2,7 +2,6 @@ import { Generator, GeneratorResultFile } from "../generator/Generator.js";
|
|
|
2
2
|
import { DirectoriesParams } from "./Directories.js";
|
|
3
3
|
import { MetaFile } from "@mxpicture/gcp-functions-common/types";
|
|
4
4
|
export declare const generatorDirPath: string;
|
|
5
|
-
export declare const toolsDirPath: string;
|
|
6
5
|
export interface GeneratorFile {
|
|
7
6
|
filename: string;
|
|
8
7
|
filePath: string;
|
|
@@ -7,7 +7,6 @@ import { createExtractors, extractFiles } from "./Extractor.js";
|
|
|
7
7
|
import { Barrel } from "./Barrel.js";
|
|
8
8
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
export const generatorDirPath = resolve(__dirname, "../generator");
|
|
10
|
-
export const toolsDirPath = resolve(__dirname, "../..");
|
|
11
10
|
const generators = [];
|
|
12
11
|
let generatorFiles = null;
|
|
13
12
|
export const readGeneratorFiles = async () => {
|
|
@@ -72,7 +72,6 @@ export class GeneratorZod extends Generator {
|
|
|
72
72
|
const prop = castMetaPropertyNumber(_prop);
|
|
73
73
|
if (!prop)
|
|
74
74
|
return null;
|
|
75
|
-
// todo format?: MetaNumberFormat;
|
|
76
75
|
let line = this.z("number");
|
|
77
76
|
if (prop.min !== undefined)
|
|
78
77
|
line += `.${prop.minInclusive ? "gte" : "gt"}(${prop.min})`;
|
|
@@ -104,7 +103,6 @@ export class GeneratorZod extends Generator {
|
|
|
104
103
|
const prop = castMetaPropertyString(_prop);
|
|
105
104
|
if (!prop)
|
|
106
105
|
return null;
|
|
107
|
-
// todo format?: MetaStringFormat;
|
|
108
106
|
let line = this.z("string");
|
|
109
107
|
if (prop.minLength !== undefined || prop.exactLength !== undefined)
|
|
110
108
|
line += `.min(${prop.minLength ?? prop.exactLength})`;
|
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.2",
|
|
4
4
|
"description": "Tools for google cloud functions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "MXPicture",
|
|
@@ -26,21 +26,20 @@
|
|
|
26
26
|
"lint": "eslint \"src/**/*.{ts,tsx}\" --ext .ts,.tsx",
|
|
27
27
|
"build": "tsc -b .",
|
|
28
28
|
"test": "vitest run",
|
|
29
|
-
"test:clean": "rm -rf src/4testing/generator-test-*"
|
|
30
|
-
"run:test": "pnpm exec tsx src/scripts/test.mts"
|
|
29
|
+
"test:clean": "rm -rf src/4testing/generator-test-*"
|
|
31
30
|
},
|
|
32
31
|
"publishConfig": {
|
|
33
32
|
"access": "public"
|
|
34
33
|
},
|
|
35
34
|
"dependencies": {
|
|
36
|
-
"@mxpicture/gcp-functions-common": "^0.2.
|
|
37
|
-
"@mxpicture/gcp-functions-code": "^0.2.
|
|
38
|
-
"@mxpicture/gcp-functions-backend": "^0.2.
|
|
39
|
-
"@mxpicture/gcp-functions-frontend": "^0.2.
|
|
35
|
+
"@mxpicture/gcp-functions-common": "^0.2.2",
|
|
36
|
+
"@mxpicture/gcp-functions-code": "^0.2.2",
|
|
37
|
+
"@mxpicture/gcp-functions-backend": "^0.2.2",
|
|
38
|
+
"@mxpicture/gcp-functions-frontend": "^0.2.2"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|
|
42
|
-
"@types/node": "^25.2.
|
|
43
|
-
"eslint": "^
|
|
41
|
+
"@types/node": "^25.2.3",
|
|
42
|
+
"eslint": "^10.0.2",
|
|
44
43
|
"execa": "^9.6.1",
|
|
45
44
|
"typescript": "^5.9.3",
|
|
46
45
|
"vitest": "^4.0.18"
|
package/dist/4testing/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./utils.js";
|
package/dist/4testing/index.js
DELETED