@prostgles/prostgles 2.3.6-dev.1787001473 → 2.3.6-dev.1787052142
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/client/build/js/main.bundle.js +1 -1
- package/dist/server/package.json +1 -1
- package/dist/server/src/ConnectionManager/getHotReloadConfigs.d.ts.map +1 -1
- package/dist/server/src/ConnectionManager/getHotReloadConfigs.js +1 -2
- package/dist/server/src/ConnectionManager/getHotReloadConfigs.js.map +1 -1
- package/dist/server/src/cli/cli.js +8 -1
- package/dist/server/src/cli/cli.js.map +1 -1
- package/dist/server/src/cli/cliUtils.d.ts +14 -2
- package/dist/server/src/cli/cliUtils.d.ts.map +1 -1
- package/dist/server/src/cli/cliUtils.js +108 -43
- package/dist/server/src/cli/cliUtils.js.map +1 -1
- package/dist/server/src/cli/getCliAgentsFile.d.ts +2 -0
- package/dist/server/src/cli/getCliAgentsFile.d.ts.map +1 -0
- package/dist/server/src/cli/getCliAgentsFile.js +90 -0
- package/dist/server/src/cli/getCliAgentsFile.js.map +1 -0
- package/dist/server/src/schemaConfig.d.ts +2 -2
- package/dist/server/src/schemaConfig.d.ts.map +1 -1
- package/dist/server/src/schemaConfig.js.map +1 -1
- package/package.json +1 -1
package/dist/server/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHotReloadConfigs.d.ts","sourceRoot":"","sources":["../../../../src/ConnectionManager/getHotReloadConfigs.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,iCAAiC,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIlE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAq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AAC;iCAAoB,CAAC;mCAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;6BAA7T,CAAC;6BAAoB,CAAC;6BAAoB,CAAC;+BAAsB,CAAC;;;;6BAA0E,CAAC;6BAAoB,CAAC;6BAAoB,CAAC;+BAAsB,CAAC;;;6BAA6C,CAAC;6BAAoB,CAAC;6BAAoB,CAAC;+BAAsB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAAhqC,CAAC;;;;gCAA4E,CAAC;;;;;;;;;;;;;;;;;;;8BAAkS,CAAC;mCAA2B,CAAC;;;;;+BAAmG,CAAC;;;;;;;;;;;+BAA+M,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAD/nQ,CAAC"}
|
|
@@ -78,8 +78,7 @@ const getHotReloadConfigs = async ({ dbs, _dbs, connection, databaseConfig, conn
|
|
|
78
78
|
tableConfig,
|
|
79
79
|
tableHooks,
|
|
80
80
|
auth,
|
|
81
|
-
schemaFilter:
|
|
82
|
-
db_schema_filter ?? { public: 1 },
|
|
81
|
+
schemaFilter: db_schema_filter ?? { public: 1 },
|
|
83
82
|
tsGeneratedTypesDir: utils_1.IS_PROD ? undefined
|
|
84
83
|
: web_app_templated && web_app_directory ?
|
|
85
84
|
(0, path_1.join)(web_app_directory, "client", "src", "api")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getHotReloadConfigs.js","sourceRoot":"","sources":["../../../../src/ConnectionManager/getHotReloadConfigs.ts"],"names":[],"mappings":";;;AAAA,6FAA+E;AAK/E,qEAA4D;AAC5D,2DAAwD;AACxD,uEAAoE;AAEpE,+BAA4B;AAC5B,iFAA8E;AAE9E,yDAAsD;AAEtD,6DAA0D;AAE1D,uDAAoD;AACpD,2CAA0C;AAC1C,gDAAuE;AAwBvE,MAAM,cAAc,GAAG,CACrB,eAAsD,EACtD,mBAA8C,EACN,EAAE;IAC1C,IAAI,CAAC,eAAe;QAClB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ACnB,wBAAwB,EAAE,wBAAwB;QAClD,UAAU,EAAE,oBAAoB;QAChC,iBAAiB,EAAE,IAAA,8CAAgB,GAAE,CAAC,iBAAiB;KACxD,CAAC,CAAC;IACH,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,6BAA6B,CACtE,UAAU,CAAC,EAAE,CACd,CAAC;IAEF,IAAI,gBAAgB,EAAE,CAAC;QACrB,gBAAgB,CAAC,GAAG,GAAG,GAAG,CAAC;QAC3B,gBAAgB,CAAC,EAAE,GAAG,iBAAiB,CAAC,YAAY,CAAC;QACrD,gBAAgB,CAAC,UAAU,GAAG,UAAU,CAAC;QACzC,gBAAgB,CAAC,SAAS,GAAG,SAAS,CAAC;IACzC,CAAC;IAED,MAAM,EAAE,WAAW,EAAE,GAAG,wBAAwB,CAAC;IACjD,MAAM,EACJ,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,GAChB,GAAG,oBAAoB,CAAC;IAEzB,MAAM,mBAAmB,GAAG,MAAM,IAAA,2DAA4B,EAAC;QAC7D,cAAc;QACd,GAAG;QACH,UAAU;QACV,iBAAiB;KAClB,CAAC,CAAC;IAEH,OAAO;QACL,MAAM,EAAE;YACN,EAAE,EAAE,iBAAiB,CAAC,YAAY;YAClC,OAAO;YACP,SAAS;YACT,WAAW;YACX,UAAU;YACV,IAAI;YACJ,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"getHotReloadConfigs.js","sourceRoot":"","sources":["../../../../src/ConnectionManager/getHotReloadConfigs.ts"],"names":[],"mappings":";;;AAAA,6FAA+E;AAK/E,qEAA4D;AAC5D,2DAAwD;AACxD,uEAAoE;AAEpE,+BAA4B;AAC5B,iFAA8E;AAE9E,yDAAsD;AAEtD,6DAA0D;AAE1D,uDAAoD;AACpD,2CAA0C;AAC1C,gDAAuE;AAwBvE,MAAM,cAAc,GAAG,CACrB,eAAsD,EACtD,mBAA8C,EACN,EAAE;IAC1C,IAAI,CAAC,eAAe;QAClB,OAAO,mB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YACb,6BAA6B,EAC3B,CAAC,eAAO,IAAI,eAAe,IAAI,WAAW,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC;gBAC1D,IAAA,WAAI,EAAC,WAAW,CAAC,UAAU,EAAE,wBAAa,EAAE,UAAU,CAAC;gBACzD,CAAC,CAAC,SAAS;YACb,SAAS,EAAE,cAAc,CAAC,YAAY,EAAE,SAAS,EAAE,mBAAmB,CAAC;YACvE,kBAAkB,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,CACnD,IAAA,uCAAkB,EAAC;gBACjB,UAAU,EAAE,oBAAoB;gBAChC,cAAc,EAAE,wBAAwB;gBACxC,KAAK;gBACL,WAAW;gBACX,QAAQ;aACT,CAAC;SAC4B;QAClC,iBAAiB;QACjB,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAhHW,QAAA,mBAAmB,uBAgH9B"}
|
|
@@ -29,6 +29,9 @@ const createConfig = (targetPath) => {
|
|
|
29
29
|
}
|
|
30
30
|
(0, fs_1.mkdirSync)(path_1.default.join(targetPath, "src"), { recursive: true });
|
|
31
31
|
(0, fs_1.mkdirSync)(path_1.default.join(targetPath, "generated"), { recursive: true });
|
|
32
|
+
cliUtils_1.srcSubfolderNames.forEach((folderName) => {
|
|
33
|
+
(0, fs_1.mkdirSync)(path_1.default.join(targetPath, cliUtils_1.srcFolderName, folderName));
|
|
34
|
+
});
|
|
32
35
|
const packageName = path_1.default
|
|
33
36
|
.basename(targetPath)
|
|
34
37
|
.replace(/[^a-z0-9-]/gi, "-")
|
|
@@ -39,6 +42,7 @@ const createConfig = (targetPath) => {
|
|
|
39
42
|
...cliUtils_1.cliTemplateFiles.package,
|
|
40
43
|
}, null, 2) + "\n");
|
|
41
44
|
(0, fs_1.writeFileSync)(path_1.default.join(targetPath, "tsconfig.json"), JSON.stringify(cliUtils_1.cliTemplateFiles.tsconfig, null, 2) + "\n");
|
|
45
|
+
(0, fs_1.writeFileSync)(path_1.default.join(targetPath, "eslint.config.mjs"), cliUtils_1.cliTemplateFiles.eslintConfig);
|
|
42
46
|
(0, fs_1.writeFileSync)(path_1.default.join(targetPath, cliUtils_1.generatedFolderName, "DBGeneratedSchema.ts"), cliUtils_1.cliTemplateFiles.DBGeneratedSchema);
|
|
43
47
|
(0, fs_1.writeFileSync)(path_1.default.join(targetPath, "AGENTS.md"), cliUtils_1.cliTemplateFiles.agents);
|
|
44
48
|
(0, fs_1.writeFileSync)(path_1.default.join(targetPath, cliUtils_1.srcFolderName, "index.ts"), (0, utils_1.fixIndent)(`
|
|
@@ -49,9 +53,12 @@ const createConfig = (targetPath) => {
|
|
|
49
53
|
|
|
50
54
|
export default prostgles({
|
|
51
55
|
id: ${JSON.stringify(configId)},
|
|
56
|
+
connection: {
|
|
57
|
+
table_options: {},
|
|
58
|
+
},
|
|
52
59
|
tableConfig: {},
|
|
53
60
|
});`));
|
|
54
|
-
(0, fs_1.writeFileSync)(path_1.default.join(targetPath, ".env.example"), cliUtils_1.cliTemplateFiles.envExample);
|
|
61
|
+
(0, fs_1.writeFileSync)(path_1.default.join(targetPath, ".env.example"), cliUtils_1.cliTemplateFiles.envExample());
|
|
55
62
|
(0, fs_1.writeFileSync)(path_1.default.join(targetPath, ".gitignore"), cliUtils_1.cliTemplateFiles.gitignore);
|
|
56
63
|
console.log(`Created config project in ${targetPath}. Copy .env.example to .env, configure both database URLs, run npm install, then npm run dev.`);
|
|
57
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../../src/cli/cli.ts"],"names":[],"mappings":";;;;AAEA,yCAA0C;AAC1C,iDAAyD;AACzD,mCAA+B;AAC/B,2BAOY;AACZ,wDAAwB;AACxB,gGAA6F;AAC7F,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../../src/cli/cli.ts"],"names":[],"mappings":";;;;AAEA,yCAA0C;AAC1C,iDAAyD;AACzD,mCAA+B;AAC/B,2BAOY;AAC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G,IAAI,CAAC,CAAC,CAAC,CAAC;QACvB,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9D,YAAY,CAAC,cAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QACnC,OAAO;IACT,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QAC7C,MAAM,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,KAAK,CAAC,CAAC;QAClD,OAAO;IACT,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC,CAAC;AAEF,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAc,EAAE,EAAE;IACnC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
export declare const srcFolderName = "src";
|
|
2
2
|
export declare const generatedFolderName = "generated";
|
|
3
|
+
export declare const srcSubfolderNames: readonly ["functions", "tableConfigs", "tableOptions", "tableHooks"];
|
|
3
4
|
export declare const cliTemplateFiles: {
|
|
4
5
|
readonly package: {
|
|
5
6
|
readonly private: true;
|
|
6
7
|
readonly version: "0.0.0";
|
|
7
8
|
readonly main: "build/src/index.js";
|
|
8
9
|
readonly scripts: {
|
|
9
|
-
readonly build: "tsc --project tsconfig.json";
|
|
10
|
+
readonly build: "npm run lint && tsc --project tsconfig.json";
|
|
10
11
|
readonly dev: "prostgles dev --config .";
|
|
12
|
+
readonly lint: "eslint .";
|
|
13
|
+
readonly "lint:fix": "eslint . --fix";
|
|
11
14
|
readonly start: "prostgles start --config .";
|
|
12
15
|
};
|
|
13
16
|
readonly dependencies: {
|
|
14
17
|
readonly "@prostgles/prostgles": `^${string}`;
|
|
15
18
|
};
|
|
16
19
|
readonly devDependencies: {
|
|
20
|
+
readonly "@eslint/js": string;
|
|
17
21
|
readonly "@types/node": "^22.20.1";
|
|
22
|
+
readonly eslint: string;
|
|
23
|
+
readonly "eslint-plugin-security": string;
|
|
18
24
|
readonly typescript: string;
|
|
25
|
+
readonly "typescript-eslint": string;
|
|
19
26
|
};
|
|
20
27
|
readonly exports: {
|
|
21
28
|
readonly "./generated": {
|
|
@@ -32,14 +39,19 @@ export declare const cliTemplateFiles: {
|
|
|
32
39
|
readonly rootDir: ".";
|
|
33
40
|
readonly outDir: "build";
|
|
34
41
|
readonly esModuleInterop: true;
|
|
42
|
+
readonly forceConsistentCasingInFileNames: true;
|
|
43
|
+
readonly noImplicitAny: true;
|
|
44
|
+
readonly noUncheckedIndexedAccess: true;
|
|
35
45
|
readonly skipLibCheck: true;
|
|
36
46
|
readonly strict: true;
|
|
47
|
+
readonly strictFunctionTypes: true;
|
|
37
48
|
};
|
|
38
49
|
readonly include: readonly ["src", "generated"];
|
|
39
50
|
};
|
|
40
51
|
readonly DBGeneratedSchema: "export type DBGeneratedSchema = Record<string, { columns: Record<string, unknown> }>\n";
|
|
41
52
|
readonly agents: string;
|
|
53
|
+
readonly eslintConfig: string;
|
|
42
54
|
readonly gitignore: string;
|
|
43
|
-
readonly envExample: string;
|
|
55
|
+
readonly envExample: () => string;
|
|
44
56
|
};
|
|
45
57
|
//# sourceMappingURL=cliUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cliUtils.d.ts","sourceRoot":"","sources":["../../../../src/cli/cliUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cliUtils.d.ts","sourceRoot":"","sources":["../../../../src/cli/cliUtils.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,aAAa,QAAQ,CAAC;AACnC,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAC/C,eAAO,MAAM,iBAAiB,sEAKpB,CAAC;AAoFX,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEnB,CAAC"}
|
|
@@ -1,25 +1,120 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cliTemplateFiles = exports.generatedFolderName = exports.srcFolderName = void 0;
|
|
3
|
+
exports.cliTemplateFiles = exports.srcSubfolderNames = exports.generatedFolderName = exports.srcFolderName = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const utils_1 = require("../../../common/utils");
|
|
6
|
+
const crypto_1 = require("crypto");
|
|
6
7
|
const package_json_1 = tslib_1.__importDefault(require("../../package.json"));
|
|
8
|
+
const getCliAgentsFile_1 = require("./getCliAgentsFile");
|
|
7
9
|
exports.srcFolderName = "src";
|
|
8
10
|
exports.generatedFolderName = "generated";
|
|
11
|
+
exports.srcSubfolderNames = [
|
|
12
|
+
"functions",
|
|
13
|
+
"tableConfigs",
|
|
14
|
+
"tableOptions",
|
|
15
|
+
"tableHooks",
|
|
16
|
+
];
|
|
17
|
+
const eslintConfig = (0, utils_1.fixIndent)(`
|
|
18
|
+
import eslint from "@eslint/js";
|
|
19
|
+
import pluginSecurity from "eslint-plugin-security";
|
|
20
|
+
import path from "node:path";
|
|
21
|
+
import tseslint from "typescript-eslint";
|
|
22
|
+
import { defineConfig } from "eslint/config";
|
|
23
|
+
|
|
24
|
+
const semanticFilenameRule = {
|
|
25
|
+
meta: {
|
|
26
|
+
type: "problem",
|
|
27
|
+
schema: [{ type: "string" }],
|
|
28
|
+
messages: {
|
|
29
|
+
invalidSuffix: "Files in this folder must end in '{{suffix}}'.",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
create(context) {
|
|
33
|
+
const suffix = context.options[0];
|
|
34
|
+
return {
|
|
35
|
+
Program(node) {
|
|
36
|
+
if (!path.basename(context.filename).endsWith(suffix)) {
|
|
37
|
+
context.report({
|
|
38
|
+
node,
|
|
39
|
+
messageId: "invalidSuffix",
|
|
40
|
+
data: { suffix },
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const semanticFileConfig = (folder, suffix) => ({
|
|
49
|
+
files: [\`src/\${folder}/**/*.ts\`],
|
|
50
|
+
rules: {
|
|
51
|
+
"prostgles-config/semantic-filename": ["error", suffix],
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
export default defineConfig(
|
|
56
|
+
{
|
|
57
|
+
ignores: ["build", "generated", "node_modules", "eslint.config.mjs"],
|
|
58
|
+
},
|
|
59
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
60
|
+
pluginSecurity.configs.recommended,
|
|
61
|
+
eslint.configs.recommended,
|
|
62
|
+
tseslint.configs.recommendedTypeChecked,
|
|
63
|
+
{
|
|
64
|
+
files: ["src/**/*.ts"],
|
|
65
|
+
languageOptions: {
|
|
66
|
+
parserOptions: {
|
|
67
|
+
projectService: true,
|
|
68
|
+
tsconfigRootDir: import.meta.dirname,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
plugins: {
|
|
72
|
+
"prostgles-config": {
|
|
73
|
+
rules: { "semantic-filename": semanticFilenameRule },
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
rules: {
|
|
77
|
+
"no-cond-assign": "error",
|
|
78
|
+
"no-unused-vars": "off",
|
|
79
|
+
"security/detect-object-injection": "off",
|
|
80
|
+
"@typescript-eslint/no-explicit-any": "off",
|
|
81
|
+
"@typescript-eslint/no-floating-promises": "error",
|
|
82
|
+
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
83
|
+
"@typescript-eslint/no-unused-vars": [
|
|
84
|
+
"error",
|
|
85
|
+
{
|
|
86
|
+
argsIgnorePattern: "^_",
|
|
87
|
+
varsIgnorePattern: "^_",
|
|
88
|
+
caughtErrorsIgnorePattern: "^_",
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
semanticFileConfig("functions", ".function.ts"),
|
|
94
|
+
semanticFileConfig("tableConfigs", ".tableConfig.ts"),
|
|
95
|
+
semanticFileConfig("tableOptions", ".tableOptions.ts"),
|
|
96
|
+
semanticFileConfig("tableHooks", ".tableHooks.ts"),
|
|
97
|
+
);`);
|
|
9
98
|
exports.cliTemplateFiles = {
|
|
10
99
|
package: {
|
|
11
100
|
private: true,
|
|
12
101
|
version: "0.0.0",
|
|
13
102
|
main: "build/src/index.js",
|
|
14
103
|
scripts: {
|
|
15
|
-
build: "tsc --project tsconfig.json",
|
|
104
|
+
build: "npm run lint && tsc --project tsconfig.json",
|
|
16
105
|
dev: "prostgles dev --config .",
|
|
106
|
+
lint: "eslint .",
|
|
107
|
+
"lint:fix": "eslint . --fix",
|
|
17
108
|
start: "prostgles start --config .",
|
|
18
109
|
},
|
|
19
110
|
dependencies: { "@prostgles/prostgles": `^${package_json_1.default.version}` },
|
|
20
111
|
devDependencies: {
|
|
112
|
+
"@eslint/js": package_json_1.default.devDependencies["@eslint/js"],
|
|
21
113
|
"@types/node": "^22.20.1",
|
|
114
|
+
eslint: package_json_1.default.devDependencies.eslint,
|
|
115
|
+
"eslint-plugin-security": package_json_1.default.devDependencies["eslint-plugin-security"],
|
|
22
116
|
typescript: package_json_1.default.dependencies["typescript"],
|
|
117
|
+
"typescript-eslint": package_json_1.default.devDependencies["typescript-eslint"],
|
|
23
118
|
},
|
|
24
119
|
exports: {
|
|
25
120
|
"./generated": {
|
|
@@ -36,58 +131,28 @@ exports.cliTemplateFiles = {
|
|
|
36
131
|
rootDir: ".",
|
|
37
132
|
outDir: "build",
|
|
38
133
|
esModuleInterop: true,
|
|
134
|
+
forceConsistentCasingInFileNames: true,
|
|
135
|
+
noImplicitAny: true,
|
|
136
|
+
noUncheckedIndexedAccess: true,
|
|
39
137
|
skipLibCheck: true,
|
|
40
138
|
strict: true,
|
|
139
|
+
strictFunctionTypes: true,
|
|
41
140
|
},
|
|
42
141
|
include: [exports.srcFolderName, exports.generatedFolderName],
|
|
43
142
|
},
|
|
44
143
|
DBGeneratedSchema: "export type DBGeneratedSchema = Record<string, { columns: Record<string, unknown> }>\n",
|
|
45
|
-
agents: (0,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
Build the application around these core Prostgles features:
|
|
49
|
-
|
|
50
|
-
## Config structure
|
|
51
|
-
|
|
52
|
-
- Import \`DBGeneratedSchema\` from \`generated/DBGeneratedSchema\`, create the typed config helper with \`const prostgles = defineConfig<DBGeneratedSchema>()\`, and default-export \`prostgles({ ... })\`. Keep the helper name \`prostgles\` so function return types can be discovered during schema generation.
|
|
53
|
-
- Run \`npm run dev\` after schema or function changes. It rebuilds the config and refreshes \`generated/DBGeneratedSchema.ts\`, including \`GeneratedFunctionSchema\` for clients.
|
|
54
|
-
- Configure database permissions with \`access_control\` using the same \`dbPermissions\` shape as Prostgles access-control rules. Do not add a raw \`publish\` callback.
|
|
55
|
-
- Keep database credentials and names out of this config. Set the state and target connection URLs in \`.env\`.
|
|
56
|
-
|
|
57
|
-
## Table configuration
|
|
58
|
-
|
|
59
|
-
- Define tables and columns in \`tableConfig\`. Prostgles applies schema changes automatically. For changes that require existing data to be transformed, increment \`tableConfigMigrations.version\` and use \`onMigrate\`.
|
|
60
|
-
- Use TypeScript table \`hooks\` such as \`beforeEach\`, \`afterEach\`, and \`afterAll\` for application behavior instead of PostgreSQL triggers.
|
|
61
|
-
- Give every JSONB column a \`jsonbSchema\` or \`jsonbSchemaType\` so its contents are validated and typed.
|
|
62
|
-
- Follow PostgreSQL schema best practices: use primary and foreign keys, appropriate nullability, unique constraints, and indexes. Model fixed sets of values as lookup tables with \`isLookupTable\` and references instead of \`CHECK (value IN (...))\` constraints.
|
|
63
|
-
|
|
64
|
-
## Workspaces
|
|
65
|
-
|
|
66
|
-
- Define typed \`workspaces\` as useful default dashboards that bring related data together. Include tables and, where useful, aggregate SQL results, bar charts, time charts, maps, and summary statistics.
|
|
67
|
-
- Keep window IDs stable and ensure every layout item references the matching window ID.
|
|
68
|
-
|
|
69
|
-
## File storage
|
|
70
|
-
|
|
71
|
-
- Enable managed file storage with \`databaseConfig.file_table_config\`. For local storage, use \`{ fileTable: "files", storageType: { type: "local" } }\`. Prostgles creates and manages the file table and serves its files.
|
|
72
|
-
- For S3 storage, use \`storageType: { type: "S3", credential_id }\`; configure the credential in Prostgles and never put access keys in this repository.
|
|
73
|
-
- Reference \`files.id\` from application tables with foreign keys rather than storing file URLs. Referencing tables must have a primary key. Use \`referencedTables\` when file type or size restrictions are required.
|
|
74
|
-
- Use \`delayedDelete\` when files should remain recoverable for a retention period. Enable \`extractText\` and provide an \`annotationsTable\` only when document extraction or annotations are needed.
|
|
75
|
-
- Local file data lives outside PostgreSQL. Use persistent storage and include it in deployment backups.
|
|
76
|
-
|
|
77
|
-
## Server-side functions
|
|
78
|
-
|
|
79
|
-
- Put privileged operations, cross-table workflows, and server-only business logic in \`functions\`.
|
|
80
|
-
- Organize \`functions\` into groups shaped as \`{ userFilter, functions }\`. The group filter controls which authenticated users receive those functions.
|
|
81
|
-
- Create a schema-aware group helper with \`createFunctionGroupDefiner<DBGeneratedSchema>()\`. For function maps kept in separate modules, use \`createFunctionsDefiner<DBGeneratedSchema>()\` so names, database context, inputs, and return types remain inferred across imports.
|
|
82
|
-
- Define individual functions with \`defineFunction({ input, description, run })\`. Inputs use Prostgles JSONB field definitions and are validated before \`run\` executes.
|
|
83
|
-
- Functions have restricted database access by default. Set \`unrestrictedDbAccess: true\` only when the function needs raw SQL, transactions, or client DB-handler generation.
|
|
84
|
-
- Keep secrets on the server and use database transactions for multi-step writes.`),
|
|
144
|
+
agents: (0, getCliAgentsFile_1.getCliAgentsFile)(),
|
|
145
|
+
eslintConfig,
|
|
85
146
|
gitignore: (0, utils_1.fixIndent)(`
|
|
86
147
|
node_modules/
|
|
87
148
|
build/
|
|
88
149
|
.env
|
|
89
150
|
*.log`),
|
|
90
|
-
envExample: (0, utils_1.fixIndent)(`
|
|
151
|
+
envExample: () => (0, utils_1.fixIndent)(`
|
|
152
|
+
# Fixed admin credentials for CLI development.
|
|
153
|
+
PRGL_USERNAME=admin
|
|
154
|
+
PRGL_PASSWORD=${(0, crypto_1.randomBytes)(24).toString("base64url")}
|
|
155
|
+
|
|
91
156
|
# Prostgles UI state. Created automatically when missing.
|
|
92
157
|
PROSTGLES_STATE_DATABASE_URL=postgres://user:password@localhost:5432/prostgles_state_database
|
|
93
158
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cliUtils.js","sourceRoot":"","sources":["../../../../src/cli/cliUtils.ts"],"names":[],"mappings":";;;;AAAA,yCAA0C;AAC1C,8EAA6C;
|
|
1
|
+
{"version":3,"file":"cliUtils.js","sourceRoot":"","sources":["../../../../src/cli/cliUtils.ts"],"names":[],"mappings":";;;;AAAA,yCAA0C;AAC1C,mCAAqC;AACrC,8EAA6C;AAC7C,yDAAsD;AAEzC,QAAA,aAAa,GAAG,KAAK,CAAC;AACtB,QAAA,mBAAmB,GAAG,WAAW,CAAC;AAClC,QAAA,iBAAiB,GAAG;IAC/B,WAAW;IACX,cAAc;IACd,cAAc;IACd,YAAY;CACJ,CAAC;AAEX,MAAM,YAAY,GAAG,IAAA,iBAAS,EAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgF1B,CAAC,CAAC;AAEM,QAAA,gBAAgB,GAAG;IAC9B,OAAO,EAAE;QACP,OAAO,EAAE,IAAI;QACb,OAAO,EAAE,OAAO;QAChB,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE;YACP,KAAK,EAAE,6CAA6C;YACpD,GAAG,EAAE,0BAA0B;YAC/B,IAAI,EAAE,UAAU;YAChB,UAAU,EAAE,gBAAg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AC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCliAgentsFile.d.ts","sourceRoot":"","sources":["../../../../src/cli/getCliAgentsFile.ts"],"names":[],"mappings":"AAmDA,eAAO,MAAM,gBAAgB,cA4D0D,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getCliAgentsFile = void 0;
|
|
4
|
+
const utils_1 = require("../../../common/utils");
|
|
5
|
+
/**
|
|
6
|
+
* This exhaustive map keeps the generated guidance in step with SchemaConfig.
|
|
7
|
+
* Adding or removing a config property requires its guidance to be updated too.
|
|
8
|
+
*/
|
|
9
|
+
const schemaConfigGuidance = {
|
|
10
|
+
access_control: "Configure database permissions with `access_control` using the Prostgles `dbPermissions` shape.",
|
|
11
|
+
connection: "Keep non-secret connection presentation settings in `connection`; database URLs belong in `.env`.",
|
|
12
|
+
databaseConfig: "Use `databaseConfig` for host-managed database features such as file storage and REST access.",
|
|
13
|
+
functions: "Put privileged operations, cross-table workflows, and server-only business logic in top-level `functions`.",
|
|
14
|
+
id: "Keep `id` stable because it identifies the deployed configuration.",
|
|
15
|
+
joins: "Use `joins` only for relationships that cannot be inferred from foreign keys.",
|
|
16
|
+
onInitSQL: "Use `onInitSQL` only for SQL initialization that cannot be expressed by `tableConfig`.",
|
|
17
|
+
onMount: "Use `onMount` for startup integration work and return cleanup logic when resources are opened.",
|
|
18
|
+
tableConfig: "Define tables and columns in `tableConfig`, including constraints and indexes.",
|
|
19
|
+
tableConfigMigrations: "For schema changes that transform existing data, increment `tableConfigMigrations.version` and use `onMigrate`.",
|
|
20
|
+
tableHooks: "Define `tableHooks` as a separate top-level config property.",
|
|
21
|
+
watchSchemaType: "Set `watchSchemaType` only when schema watching must differ from the default.",
|
|
22
|
+
workspaces: "Define typed `workspaces` as useful default dashboards that bring related data together.",
|
|
23
|
+
};
|
|
24
|
+
const connectionGuidance = {
|
|
25
|
+
db_schema_filter: "Use `connection.db_schema_filter` only for connection-level schema visibility.",
|
|
26
|
+
display_options: "Use `connection.display_options` for connection-wide display behavior.",
|
|
27
|
+
table_options: "Populate `connection.table_options` for every user-facing table so data renders clearly. Add useful labels and icons, column renderers and styles, and a practical `card` layout with header, subheader, avatar, and visible columns where appropriate.",
|
|
28
|
+
};
|
|
29
|
+
const getCliAgentsFile = () => (0, utils_1.fixIndent)(`
|
|
30
|
+
# Prostgles configuration
|
|
31
|
+
|
|
32
|
+
Build the application around the typed Prostgles schema config.
|
|
33
|
+
|
|
34
|
+
## Config structure
|
|
35
|
+
|
|
36
|
+
- Import \`DBGeneratedSchema\` from \`generated/DBGeneratedSchema\`, create the typed config helper with \`const prostgles = defineConfig<DBGeneratedSchema>()\`, and default-export \`prostgles({ ... })\`. Keep the helper name \`prostgles\` so function return types can be discovered during schema generation.
|
|
37
|
+
- Run \`npm run dev\` after schema or function changes. It rebuilds the config and refreshes \`generated/DBGeneratedSchema.ts\`, including \`GeneratedFunctionSchema\` for clients.
|
|
38
|
+
- ${schemaConfigGuidance.id}
|
|
39
|
+
- ${schemaConfigGuidance.connection} ${connectionGuidance.db_schema_filter} ${connectionGuidance.display_options}
|
|
40
|
+
- ${schemaConfigGuidance.databaseConfig}
|
|
41
|
+
- ${schemaConfigGuidance.access_control}
|
|
42
|
+
- ${schemaConfigGuidance.watchSchemaType}
|
|
43
|
+
- ${schemaConfigGuidance.onInitSQL} ${schemaConfigGuidance.onMount}
|
|
44
|
+
|
|
45
|
+
## Typed database object
|
|
46
|
+
|
|
47
|
+
- The Prostgles \`dbo\` object available in \`onMount\`, \`tableHooks\`, and server functions is \`DBOFullyTyped<DBGeneratedSchema>\`. Table names, columns, filters, selects, inserts, updates, and results are fully typed.
|
|
48
|
+
- Keep the schema generic connected when moving code into separate modules. Use \`ProstglesOnMount<DBGeneratedSchema>\` for \`onMount\`, \`TableHooks<DBGeneratedSchema>\` for hooks, and the typed function definers for functions.
|
|
49
|
+
- Prefer typed \`dbo\` table handlers and let TypeScript infer values. Casts should be very rare; before adding one, check the table definition, JSONB schema, generated schema, and helper generic.
|
|
50
|
+
- Every table and view handler supports realtime \`subscribe\` and \`subscribeOne\`, for example \`dbo.orders.subscribe(filter, params, onData)\`. Prefer subscriptions over polling the database. Keep the returned subscription handler and call \`unsubscribe()\` during cleanup; an \`onMount\` callback can return that cleanup function.
|
|
51
|
+
|
|
52
|
+
## Project structure
|
|
53
|
+
|
|
54
|
+
- Keep \`src/index.ts\` focused on composing and exporting the config.
|
|
55
|
+
- Put server functions in \`src/functions/\`, table definitions in \`src/tableConfigs/\`, display metadata in \`src/tableOptions/\`, and hooks in \`src/tableHooks/\`. Add domain subfolders when a folder becomes crowded.
|
|
56
|
+
- Use semantic names ending in \`*.function.ts\`, \`*.tableConfig.ts\`, \`*.tableOptions.ts\`, and \`*.tableHooks.ts\`. Examples: \`deployProject.function.ts\`, \`orders.tableConfig.ts\`, \`customers.tableOptions.ts\`, and \`users.tableHooks.ts\`.
|
|
57
|
+
- The generated ESLint config enforces these suffixes inside their corresponding folders. Run \`npm run lint\` before committing.
|
|
58
|
+
|
|
59
|
+
## Tables, display options, and hooks
|
|
60
|
+
|
|
61
|
+
- ${schemaConfigGuidance.tableConfig} ${schemaConfigGuidance.tableConfigMigrations}
|
|
62
|
+
- ${schemaConfigGuidance.tableHooks} Use hooks such as \`beforeEach\`, \`afterEach\`, and \`afterAll\` for application behavior instead of PostgreSQL triggers as this allows interaction with typescript and provides full type safety.
|
|
63
|
+
- ${connectionGuidance.table_options} Keep each table's options in its matching \`*.tableOptions.ts\` module and merge them under \`connection.table_options\`.
|
|
64
|
+
- Give every JSONB column a \`jsonbSchema\` or \`jsonbSchemaType\` so its contents are validated and typed.
|
|
65
|
+
- Follow PostgreSQL schema best practices: use primary and foreign keys, appropriate nullability, unique constraints, and indexes. Model fixed sets of values as lookup tables with \`isLookupTable\` and references instead of \`CHECK (value IN (...))\` constraints.
|
|
66
|
+
- ${schemaConfigGuidance.joins}
|
|
67
|
+
|
|
68
|
+
## Workspaces
|
|
69
|
+
|
|
70
|
+
- ${schemaConfigGuidance.workspaces} Include tables and, where useful, aggregate SQL results, bar charts, time charts, maps, and summary statistics.
|
|
71
|
+
- Keep window IDs stable and ensure every layout item references the matching window ID.
|
|
72
|
+
|
|
73
|
+
## File storage
|
|
74
|
+
|
|
75
|
+
- Enable managed file storage with \`databaseConfig.file_table_config\`. For local storage, use \`{ fileTable: "files", storageType: { type: "local" } }\`. Prostgles creates and manages the file table and serves its files.
|
|
76
|
+
- For S3 storage, use \`storageType: { type: "S3", credential_id }\`; configure the credential in Prostgles and never put access keys in this repository.
|
|
77
|
+
- Reference \`files.id\` from application tables with foreign keys rather than storing file URLs. Referencing tables must have a primary key. Use \`referencedTables\` when file type or size restrictions are required.
|
|
78
|
+
- Use \`delayedDelete\` when files should remain recoverable for a retention period. Enable \`extractText\` and provide an \`annotationsTable\` only when document extraction or annotations are needed.
|
|
79
|
+
- Local file data lives outside PostgreSQL. Use persistent storage and include it in deployment backups.
|
|
80
|
+
|
|
81
|
+
## Server-side functions
|
|
82
|
+
|
|
83
|
+
- ${schemaConfigGuidance.functions}
|
|
84
|
+
- Organize \`functions\` into groups shaped as \`{ userFilter, functions }\`. The group filter controls which authenticated users receive those functions.
|
|
85
|
+
- Create a schema-aware group helper with \`createFunctionGroupDefiner<DBGeneratedSchema>()\`. For function maps kept in separate modules, use \`createFunctionsDefiner<DBGeneratedSchema>()\` so names, database context, inputs, and return types remain inferred across imports.
|
|
86
|
+
- Define individual functions with \`defineFunction({ input, description, run })\`. Inputs use Prostgles JSONB field definitions and are validated before \`run\` executes.
|
|
87
|
+
- Functions have restricted database access by default. Set \`unrestrictedDbAccess: true\` only when the function needs raw SQL, transactions, or client DB-handler generation.
|
|
88
|
+
- Keep secrets on the server and use database transactions for multi-step writes.`);
|
|
89
|
+
exports.getCliAgentsFile = getCliAgentsFile;
|
|
90
|
+
//# sourceMappingURL=getCliAgentsFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getCliAgentsFile.js","sourceRoot":"","sources":["../../../../src/cli/getCliAgentsFile.ts"],"names":[],"mappings":";;;AAAA,yCAA0C;AAW1C;;;GAGG;AACH,MAAM,oBAAoB,GAAG;IAC3B,cAAc,EACZ,iGAAiG;IACnG,UAAU,EACR,mGAAmG;IACrG,cAAc,EACZ,+FAA+F;IACjG,SAAS,EACP,4GAA4G;IAC9G,EAAE,EAAE,oEAAoE;IACxE,KAAK,EACH,+EAA+E;IACjF,SAAS,EACP,wFAAwF;IAC1F,OAAO,EACL,gGAAgG;IAClG,WAAW,EACT,gFAAgF;IAClF,qBAAqB,EACnB,iHAAiH;IACnH,UAAU,EAAE,8DAA8D;IAC1E,eAAe,EACb,+EAA+E;IACjF,UAAU,EACR,0FAA0F;CAC9D,CAAC;AAEjC,MAAM,kBAAkB,GAAG;IACzB,gBAAgB,EACd,gFAAgF;IAClF,eAAe,EACb,wEAAwE;IAC1E,aAAa,EACX,yPAAyP;CAC/N,CAAC;AAExB,MAAM,gBAAgB,GAAG,GAAG,EAAE,CACnC,IAAA,iBAAS,EAAC;;;;;;;;;QASJ,oBAAoB,CAAC,EAAE;QACvB,oBAAoB,CAAC,UAAU,IAAI,kBAAkB,CAAC,gBAAgB,IAAI,kBAAkB,CAAC,eAAe;QAC5G,oBAAoB,CAAC,cAAc;QACnC,oBAAoB,CAAC,cAAc;QACnC,oBAAoB,CAAC,eAAe;QACpC,oBAAoB,CAAC,SAAS,IAAI,oBAAoB,CAAC,OAAO;;;;;;;;;;;;;;;;;;QAkB9D,oBAAoB,CAAC,WAAW,IAAI,oBAAoB,CAAC,qBAAqB;QAC9E,oBAAoB,CAAC,UAAU;QAC/B,kBAAkB,CAAC,aAAa;;;QAGhC,oBAAoB,CAAC,KAAK;;;;QAI1B,oBAAoB,CAAC,UAAU;;;;;;;;;;;;;QAa/B,oBAAoB,CAAC,SAAS;;;;;sFAKgD,CAAC,CAAC;AA5D3E,QAAA,gBAAgB,oBA4D2D"}
|
|
@@ -8,7 +8,7 @@ export type { DBGeneratedSchema } from "../../common/DBGeneratedSchema";
|
|
|
8
8
|
export type * from "../../common/DashboardTypes";
|
|
9
9
|
export type { DBSSchema } from "../../common/publishUtils";
|
|
10
10
|
export type { DBSSchemaForInsert } from "../../common/publishUtils";
|
|
11
|
-
export type { TableConfig } from "prostgles-server";
|
|
11
|
+
export type { DBOFullyTyped, TableConfig, TableHooks } from "prostgles-server";
|
|
12
12
|
export type ProstglesOnMountCleanup = () => void | Promise<void>;
|
|
13
13
|
export type ProstglesOnMount<T = void> = (args: OnReadyParams<T>) => void | ProstglesOnMountCleanup | Promise<void | ProstglesOnMountCleanup>;
|
|
14
14
|
export type TableOptions = NonNullable<DBSSchema["connections"]["table_options"]>[string];
|
|
@@ -21,7 +21,7 @@ export type SchemaConfigAccessControl = DBSSchema["access_control"]["dbPermissio
|
|
|
21
21
|
* instance. Transport, authentication, storage wiring, and connection
|
|
22
22
|
* lifecycle remain owned by the host application.
|
|
23
23
|
*/
|
|
24
|
-
export type SchemaConfigProstglesOptions<S = void, SUser extends SessionUser = SessionUser> = Pick<ProstglesInitOptions<S, SUser>, "functions" | "joins" | "
|
|
24
|
+
export type SchemaConfigProstglesOptions<S = void, SUser extends SessionUser = SessionUser> = Pick<ProstglesInitOptions<S, SUser>, "functions" | "joins" | "tableHooks" | "tableConfig" | "tableConfigMigrations" | "watchSchemaType">;
|
|
25
25
|
export type SchemaConfig<S = void, SUser extends SessionUser = SessionUser> = SchemaConfigProstglesOptions<S, SUser> & {
|
|
26
26
|
/** Stable deployment identifier. Required when starting through the CLI. */
|
|
27
27
|
id?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaConfig.d.ts","sourceRoot":"","sources":["../../../src/schemaConfig.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,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AC,GAAG;IAC3C,4EAA4E;IAC5E,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,+EAA+E;IAC/E,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,8EAA8E;IAC9E,cAAc,CAAC,EAAE,yBAAyB,CAAC;IAC3C,gFAAgF;IAChF,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,oBAAoB,EAAE,CAAC;CACrC,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,YAAY,GACtB,CAAC,GAAG,IAAI,EAAE,KAAK,SAAS,WAAW,GAAG,WAAW,QACjD,CAAC,SAAS,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,QAAQ,CAAC,KAAG,CACvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaConfig.js","sourceRoot":"","sources":["../../../src/schemaConfig.ts"],"names":[],"mappings":";;;AAGA,qDAI0B;AAHxB,kHAAA,cAAc,OAAA;AACd,8HAAA,0BAA0B,OAAA;AAC1B,0HAAA,sBAAsB,OAAA;
|
|
1
|
+
{"version":3,"file":"schemaConfig.js","sourceRoot":"","sources":["../../../src/schemaConfig.ts"],"names":[],"mappings":";;;AAGA,qDAI0B;AAHxB,kHAAA,cAAc,OAAA;AACd,8HAAA,0BAA0B,OAAA;AAC1B,0HAAA,sBAAsB,OAAA;AAgFxB,+EAA+E;AACxE,MAAM,YAAY,GACvB,GAAsD,EAAE,CACxD,CAAmC,MAAS,EAAK,EAAE,CACjD,MAAM,CAAC;AAHE,QAAA,YAAY,gBAGd"}
|
package/package.json
CHANGED