@prostgles/prostgles 2.3.6-dev.1787077577 → 2.3.6-dev.1787160729

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.
Files changed (66) hide show
  1. package/client/build/js/main.bundle.js +1 -1
  2. package/dist/server/package.json +5 -1
  3. package/dist/server/src/ConnectionManager/getHotReloadConfigs.d.ts.map +1 -1
  4. package/dist/server/src/ConnectionManager/getHotReloadConfigs.js +3 -3
  5. package/dist/server/src/ConnectionManager/getHotReloadConfigs.js.map +1 -1
  6. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Web/getDocumentText.d.ts +2 -1
  7. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Web/getDocumentText.d.ts.map +1 -1
  8. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/Web/getDocumentText.js.map +1 -1
  9. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/tools/searchWebDevFiles.spec.js +1 -0
  10. package/dist/server/src/McpHub/ProstglesMcpHub/ProstglesMCPServers/WebDev/tools/searchWebDevFiles.spec.js.map +1 -1
  11. package/dist/server/src/ServiceManager/ServiceManager.d.ts +19 -11
  12. package/dist/server/src/ServiceManager/ServiceManager.d.ts.map +1 -1
  13. package/dist/server/src/ServiceManager/ServiceManager.js +13 -2
  14. package/dist/server/src/ServiceManager/ServiceManager.js.map +1 -1
  15. package/dist/server/src/ServiceManager/ServiceManager.spec.d.ts.map +1 -1
  16. package/dist/server/src/ServiceManager/ServiceManager.spec.js +5 -1
  17. package/dist/server/src/ServiceManager/ServiceManager.spec.js.map +1 -1
  18. package/dist/server/src/ServiceManager/ServiceManagerTypes.d.ts +7 -0
  19. package/dist/server/src/ServiceManager/ServiceManagerTypes.d.ts.map +1 -1
  20. package/dist/server/src/ServiceManager/ServiceManagerTypes.js.map +1 -1
  21. package/dist/server/src/ServiceManager/buildService.d.ts +3 -3
  22. package/dist/server/src/ServiceManager/buildService.d.ts.map +1 -1
  23. package/dist/server/src/ServiceManager/buildService.js +10 -6
  24. package/dist/server/src/ServiceManager/buildService.js.map +1 -1
  25. package/dist/server/src/ServiceManager/enableService.d.ts +1 -2
  26. package/dist/server/src/ServiceManager/enableService.d.ts.map +1 -1
  27. package/dist/server/src/ServiceManager/enableService.js.map +1 -1
  28. package/dist/server/src/ServiceManager/getSelectedConfigEnvs.d.ts +2 -3
  29. package/dist/server/src/ServiceManager/getSelectedConfigEnvs.d.ts.map +1 -1
  30. package/dist/server/src/ServiceManager/getSelectedConfigEnvs.js +3 -3
  31. package/dist/server/src/ServiceManager/getSelectedConfigEnvs.js.map +1 -1
  32. package/dist/server/src/ServiceManager/startService.d.ts +3 -3
  33. package/dist/server/src/ServiceManager/startService.d.ts.map +1 -1
  34. package/dist/server/src/ServiceManager/startService.js +9 -7
  35. package/dist/server/src/ServiceManager/startService.js.map +1 -1
  36. package/dist/server/src/ServiceManager/stopService.d.ts +1 -2
  37. package/dist/server/src/ServiceManager/stopService.d.ts.map +1 -1
  38. package/dist/server/src/ServiceManager/stopService.js +1 -1
  39. package/dist/server/src/ServiceManager/stopService.js.map +1 -1
  40. package/dist/server/src/cli/cli.js +4 -34
  41. package/dist/server/src/cli/cli.js.map +1 -1
  42. package/dist/server/src/cli/cliTemplateFiles.d.ts +8 -0
  43. package/dist/server/src/cli/cliTemplateFiles.d.ts.map +1 -0
  44. package/dist/server/src/cli/cliTemplateFiles.js +381 -0
  45. package/dist/server/src/cli/cliTemplateFiles.js.map +1 -0
  46. package/dist/server/src/init/prostglesOnReady.d.ts +677 -1
  47. package/dist/server/src/init/prostglesOnReady.d.ts.map +1 -1
  48. package/dist/server/src/init/prostglesOnReady.js +7 -1
  49. package/dist/server/src/init/prostglesOnReady.js.map +1 -1
  50. package/dist/server/src/services.d.ts +3 -0
  51. package/dist/server/src/services.d.ts.map +1 -0
  52. package/dist/server/src/services.js +6 -0
  53. package/dist/server/src/services.js.map +1 -0
  54. package/package.json +5 -1
  55. package/dist/server/src/cli/cliUtils.d.ts +0 -64
  56. package/dist/server/src/cli/cliUtils.d.ts.map +0 -1
  57. package/dist/server/src/cli/cliUtils.js +0 -201
  58. package/dist/server/src/cli/cliUtils.js.map +0 -1
  59. package/dist/server/src/testing/createTestDeployment.d.ts +0 -37
  60. package/dist/server/src/testing/createTestDeployment.d.ts.map +0 -1
  61. package/dist/server/src/testing/createTestDeployment.js +0 -393
  62. package/dist/server/src/testing/createTestDeployment.js.map +0 -1
  63. package/dist/server/src/testing/index.d.ts +0 -2
  64. package/dist/server/src/testing/index.d.ts.map +0 -1
  65. package/dist/server/src/testing/index.js +0 -6
  66. package/dist/server/src/testing/index.js.map +0 -1
@@ -2,13 +2,12 @@
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const tslib_1 = require("tslib");
5
- const utils_1 = require("../../../common/utils");
6
5
  const child_process_1 = require("child_process");
7
6
  const dotenv_1 = require("dotenv");
8
7
  const fs_1 = require("fs");
9
8
  const path_1 = tslib_1.__importDefault(require("path"));
10
9
  const compileSchemaConfigProject_1 = require("../ConnectionManager/compileSchemaConfigProject");
11
- const cliUtils_1 = require("./cliUtils");
10
+ const cliTemplateFiles_1 = require("./cliTemplateFiles");
12
11
  const ensureCliDatabases_1 = require("./ensureCliDatabases");
13
12
  const usage = `Usage:
14
13
  prostgles create <directory> [--skip-install]
@@ -39,41 +38,12 @@ const createConfig = (targetPath, skipInstall) => {
39
38
  if ((0, fs_1.existsSync)(targetPath) && (0, fs_1.readdirSync)(targetPath).length) {
40
39
  throw new Error(`${targetPath} already exists and is not empty`);
41
40
  }
42
- (0, fs_1.mkdirSync)(path_1.default.join(targetPath, "src"), { recursive: true });
43
- (0, fs_1.mkdirSync)(path_1.default.join(targetPath, "generated"), { recursive: true });
44
- (0, fs_1.mkdirSync)(path_1.default.join(targetPath, cliUtils_1.testsFolderName), { recursive: true });
45
- cliUtils_1.srcSubfolderNames.forEach((folderName) => {
46
- (0, fs_1.mkdirSync)(path_1.default.join(targetPath, cliUtils_1.srcFolderName, folderName));
47
- });
48
41
  const packageName = path_1.default
49
42
  .basename(targetPath)
50
43
  .replace(/[^a-z0-9-]/gi, "-")
51
44
  .toLowerCase();
52
45
  const configId = packageName || "my-prostgles-app";
53
- (0, fs_1.writeFileSync)(path_1.default.join(targetPath, "package.json"), JSON.stringify({
54
- name: configId,
55
- ...cliUtils_1.cliTemplateFiles.package,
56
- }, null, 2) + "\n");
57
- (0, fs_1.writeFileSync)(path_1.default.join(targetPath, "tsconfig.json"), JSON.stringify(cliUtils_1.cliTemplateFiles.tsconfig, null, 2) + "\n");
58
- (0, fs_1.writeFileSync)(path_1.default.join(targetPath, "eslint.config.mjs"), cliUtils_1.cliTemplateFiles.eslintConfig);
59
- (0, fs_1.writeFileSync)(path_1.default.join(targetPath, cliUtils_1.generatedFolderName, "DBGeneratedSchema.ts"), cliUtils_1.cliTemplateFiles.DBGeneratedSchema);
60
- (0, fs_1.writeFileSync)(path_1.default.join(targetPath, "AGENTS.md"), cliUtils_1.cliTemplateFiles.agents);
61
- (0, fs_1.writeFileSync)(path_1.default.join(targetPath, cliUtils_1.testsFolderName, "deployment.test.ts"), cliUtils_1.cliTemplateFiles.deploymentTest({ configId }));
62
- (0, fs_1.writeFileSync)(path_1.default.join(targetPath, cliUtils_1.srcFolderName, "index.ts"), (0, utils_1.fixIndent)(`
63
- import { defineConfig } from "@prostgles/prostgles";
64
- import type { DBGeneratedSchema } from "../${cliUtils_1.generatedFolderName}/DBGeneratedSchema";
65
-
66
- const prostgles = defineConfig<DBGeneratedSchema>();
67
-
68
- export default prostgles({
69
- id: ${JSON.stringify(configId)},
70
- connection: {
71
- table_options: {},
72
- },
73
- tableConfig: {},
74
- });`));
75
- (0, fs_1.writeFileSync)(path_1.default.join(targetPath, ".env.example"), cliUtils_1.cliTemplateFiles.envExample({ configId }));
76
- (0, fs_1.writeFileSync)(path_1.default.join(targetPath, ".gitignore"), cliUtils_1.cliTemplateFiles.gitignore);
46
+ (0, cliTemplateFiles_1.saveCliTemplateFiles)({ configId, targetPath });
77
47
  if (skipInstall) {
78
48
  console.log(`Created config project in ${targetPath}. Run npm install, copy .env.example to .env, configure both database URLs, then run npm run dev.`);
79
49
  return;
@@ -122,12 +92,12 @@ const watchConfig = (configPath, onChange) => {
122
92
  .filter((entry) => entry.isDirectory() && entry.name !== "node_modules")
123
93
  .forEach((entry) => visit(path_1.default.join(directory, entry.name)));
124
94
  };
125
- visit(path_1.default.join(configPath, cliUtils_1.srcFolderName));
95
+ visit(path_1.default.join(configPath, cliTemplateFiles_1.srcFolderName));
126
96
  return () => watchers.forEach((watcher) => watcher.close());
127
97
  };
128
98
  const run = async (configPath, isDev) => {
129
99
  const environment = validateEnvironmentSetup(configPath);
130
- (0, fs_1.mkdirSync)(path_1.default.join(configPath, cliUtils_1.generatedFolderName), { recursive: true });
100
+ (0, fs_1.mkdirSync)(path_1.default.join(configPath, cliTemplateFiles_1.generatedFolderName), { recursive: true });
131
101
  await (0, compileSchemaConfigProject_1.compileSchemaConfigProject)(configPath);
132
102
  await (0, ensureCliDatabases_1.ensureCliDatabases)(environment);
133
103
  let server;
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../../src/cli/cli.ts"],"names":[],"mappings":";;;;AAEA,yCAA0C;AAC1C,iDAAoE;AACpE,mCAA+B;AAC/B,2BAOY;AACZ,wDAAwB;AACxB,gGAA6F;AAC7F,yCAMoB;AACpB,6DAA0D;AAE1D,MAAM,KAAK,GAAG;;;yCAG2B,CAAC;AAE1C,MAAM,aAAa,GAAG,CAAC,IAAc,EAAE,EAAE;IACvC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IAC7C,IAAI,WAAW,KAAK,CAAC,CAAC;QAAE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC;IAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,GAAG,CAAC,CAA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CAAC,KAAc,EAAE,EAAE;IACnC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export declare const saveCliTemplateFiles: ({ configId, targetPath, }: {
2
+ configId: string;
3
+ targetPath: string;
4
+ }) => void;
5
+ export declare const srcFolderName = "src";
6
+ export declare const generatedFolderName = "generated";
7
+ export declare const srcSubfolderNames: readonly ["functions", "tableConfigs", "tableOptions", "tableHooks", "services"];
8
+ //# sourceMappingURL=cliTemplateFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cliTemplateFiles.d.ts","sourceRoot":"","sources":["../../../../src/cli/cliTemplateFiles.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB,GAAI,2BAGlC;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,SAEA,CAAC;AAEF,eAAO,MAAM,aAAa,QAAQ,CAAC;AACnC,eAAO,MAAM,mBAAmB,cAAc,CAAC;AAI/C,eAAO,MAAM,iBAAiB,kFAMpB,CAAC"}
@@ -0,0 +1,381 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.srcSubfolderNames = exports.generatedFolderName = exports.srcFolderName = exports.saveCliTemplateFiles = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const utils_1 = require("../../../common/utils");
6
+ const crypto_1 = require("crypto");
7
+ const package_json_1 = tslib_1.__importDefault(require("../../package.json"));
8
+ const prostgles_types_1 = require("prostgles-types");
9
+ const path_1 = require("path");
10
+ const fs_1 = require("fs");
11
+ const saveCliTemplateFiles = ({ configId, targetPath, }) => {
12
+ saveFolderFiles(targetPath, getCliTemplateFiles({ configId }));
13
+ };
14
+ exports.saveCliTemplateFiles = saveCliTemplateFiles;
15
+ exports.srcFolderName = "src";
16
+ exports.generatedFolderName = "generated";
17
+ const testsFolderName = "tests";
18
+ const servicesFolderName = "services";
19
+ exports.srcSubfolderNames = [
20
+ "functions",
21
+ "tableConfigs",
22
+ "tableOptions",
23
+ "tableHooks",
24
+ servicesFolderName,
25
+ ];
26
+ const saveFolderFiles = (targetPath, folderFiles) => {
27
+ for (const [relativePath, content] of Object.entries(folderFiles)) {
28
+ const fullPath = (0, path_1.join)(targetPath, relativePath);
29
+ const fullPathDirectory = (0, path_1.dirname)(fullPath);
30
+ if (typeof content === "string") {
31
+ (0, fs_1.mkdirSync)(fullPathDirectory, { recursive: true });
32
+ (0, fs_1.writeFileSync)(fullPath, (0, utils_1.fixIndent)(content));
33
+ }
34
+ else {
35
+ (0, fs_1.mkdirSync)(fullPath, { recursive: true });
36
+ saveFolderFiles(fullPath, content);
37
+ }
38
+ }
39
+ };
40
+ const getCliTemplateFiles = ({ configId }) => ({
41
+ "package.json": JSON.stringify(getPackageJson(configId), null, 2) + "\n",
42
+ "tsconfig.json": JSON.stringify({
43
+ compilerOptions: {
44
+ target: "ES2022",
45
+ module: "Node16",
46
+ moduleResolution: "Node16",
47
+ rootDir: ".",
48
+ outDir: "build",
49
+ esModuleInterop: true,
50
+ forceConsistentCasingInFileNames: true,
51
+ noImplicitAny: true,
52
+ noUncheckedIndexedAccess: true,
53
+ skipLibCheck: true,
54
+ strict: true,
55
+ strictFunctionTypes: true,
56
+ },
57
+ include: [exports.srcFolderName, exports.generatedFolderName, testsFolderName],
58
+ exclude: [`${exports.srcFolderName}/services/**/src`],
59
+ }, null, 2) + "\n",
60
+ "AGENTS.md": getCliAgentsFile(),
61
+ [exports.generatedFolderName]: {
62
+ "DBGeneratedSchema.ts": "export type DBGeneratedSchema = Record<string, { columns: Record<string, unknown> }>\n",
63
+ },
64
+ [exports.srcFolderName]: {
65
+ ...(0, prostgles_types_1.fromEntries)(exports.srcSubfolderNames.map((folderName) => [folderName, {}])),
66
+ "index.ts": `
67
+ import { defineConfig } from "@prostgles/prostgles";
68
+ import type { DBGeneratedSchema } from "../${exports.generatedFolderName}/DBGeneratedSchema";
69
+
70
+ const prostgles = defineConfig<DBGeneratedSchema>();
71
+
72
+ export default prostgles({
73
+ id: ${JSON.stringify(configId)},
74
+ connection: {
75
+ table_options: {},
76
+ },
77
+ tableConfig: {},
78
+ });`,
79
+ [servicesFolderName]: {
80
+ myService: {
81
+ "myService.service.ts": `
82
+ import type { ProstglesService } from "@prostgles/prostgles/services";
83
+
84
+ export const myService = {
85
+ buildContext: "myService",
86
+ icon: "Extension",
87
+ label: "My service",
88
+ description: "Example local Docker service.",
89
+ port: 8080,
90
+ healthCheck: { endpoint: "/health" },
91
+ endpoints: {},
92
+ } as const satisfies ProstglesService;`,
93
+ src: {
94
+ Dockerfile: `
95
+ FROM python:3.13-alpine
96
+
97
+ EXPOSE 8080
98
+
99
+ CMD ["python", "-m", "http.server", "8080", "--bind", "0.0.0.0"]`,
100
+ },
101
+ },
102
+ },
103
+ "serviceManager.ts": `
104
+ import { ServiceManager } from "@prostgles/prostgles/services";
105
+ import { myService } from "./services/myService/myService.service";
106
+ import path from "node:path";
107
+
108
+ export const serviceManager = new ServiceManager({
109
+ services: { myService },
110
+ serviceRoot: path.resolve(__dirname, "..", "..", "src", "services"),
111
+ });`,
112
+ },
113
+ [testsFolderName]: {
114
+ "deployment.test.ts": `
115
+ import assert from "node:assert/strict";
116
+ import { resolve } from "node:path";
117
+ import test from "node:test";
118
+ import { createTestDeployment } from "@prostgles/prostgles/testing";
119
+ import type { DBGeneratedSchema } from "../generated/DBGeneratedSchema";
120
+
121
+ void test("starts the configured app with an isolated database", async (context) => {
122
+ const deployment = await createTestDeployment<DBGeneratedSchema>({
123
+ configPath: resolve(__dirname, "../.."),
124
+ configId: ${JSON.stringify(configId)},
125
+ users: [
126
+ { key: "admin", type: "admin" },
127
+ { key: "member", type: "default" },
128
+ ],
129
+ // Add deterministic rows with:
130
+ // seed: async ({ projectDatabase }) => {
131
+ // await projectDatabase.query("INSERT INTO ...");
132
+ // },
133
+ });
134
+ context.after(async () => await deployment.dispose());
135
+
136
+ const client = await deployment.connectProjectAs("admin");
137
+
138
+ assert.equal(client.socket.connected, true);
139
+ assert.equal(client.auth.user?.type, "admin");
140
+ assert.ok(client.db);
141
+
142
+ const memberClient = await deployment.connectProjectAs("member");
143
+ assert.equal(memberClient.socket.connected, true);
144
+ assert.equal(memberClient.auth.user?.type, "default");
145
+ });`,
146
+ },
147
+ "eslint.config.mjs": eslintConfig,
148
+ ".gitignore": `
149
+ node_modules/
150
+ build/
151
+ .env
152
+ .prostgles/test-logs/
153
+ *.log`,
154
+ ".env.example": `
155
+ # Fixed admin credentials for CLI development.
156
+ PRGL_USERNAME=admin
157
+ PRGL_PASSWORD=${(0, crypto_1.randomBytes)(24).toString("base64url")}
158
+
159
+ # Prostgles UI state. Created automatically when missing.
160
+ PROSTGLES_STATE_DATABASE_URL=postgres://user:password@localhost:5432/prostgles_state_database
161
+
162
+ # Database exposed by this config. Must use the same server as the state database.
163
+ PROSTGLES_DATABASE_URL=postgres://user:password@localhost:5432/${configId}
164
+
165
+ # npm test starts an ephemeral PostgreSQL Docker container bound to 127.0.0.1 only.
166
+ # Override only when the app needs a different PostgreSQL/PostGIS version.
167
+ # PROSTGLES_TEST_POSTGRES_IMAGE=postgis/postgis:17-3.4`,
168
+ });
169
+ const getPackageJson = (configId) => ({
170
+ name: configId,
171
+ private: true,
172
+ version: "0.0.0",
173
+ main: "build/src/index.js",
174
+ scripts: {
175
+ build: "npm run lint && tsc --project tsconfig.json",
176
+ dev: "prostgles dev --config .",
177
+ lint: "eslint .",
178
+ "lint:fix": "eslint . --fix",
179
+ start: "prostgles start --config .",
180
+ test: 'npm run build && node --env-file-if-exists=.env --test "build/tests/**/*.test.js"',
181
+ },
182
+ dependencies: { [package_json_1.default.name]: `^${package_json_1.default.version}` },
183
+ devDependencies: {
184
+ ...(0, prostgles_types_1.pickKeys)(package_json_1.default.dependencies, ["typescript"]),
185
+ ...(0, prostgles_types_1.pickKeys)(package_json_1.default.devDependencies, [
186
+ "@eslint/js",
187
+ "eslint",
188
+ "eslint-plugin-security",
189
+ "typescript-eslint",
190
+ "@types/node",
191
+ ]),
192
+ },
193
+ exports: {
194
+ "./generated": {
195
+ types: "./build/generated/index.d.ts",
196
+ default: "./build/generated/index.js",
197
+ },
198
+ },
199
+ });
200
+ const eslintConfig = `
201
+ import eslint from "@eslint/js";
202
+ import pluginSecurity from "eslint-plugin-security";
203
+ import path from "node:path";
204
+ import tseslint from "typescript-eslint";
205
+ import { defineConfig } from "eslint/config";
206
+
207
+ const semanticFilenameRule = {
208
+ meta: {
209
+ type: "problem",
210
+ schema: [{ type: "string" }],
211
+ messages: {
212
+ invalidSuffix: "Files in this folder must end in '{{suffix}}'.",
213
+ },
214
+ },
215
+ create(context) {
216
+ const suffix = context.options[0];
217
+ return {
218
+ Program(node) {
219
+ if (!path.basename(context.filename).endsWith(suffix)) {
220
+ context.report({
221
+ node,
222
+ messageId: "invalidSuffix",
223
+ data: { suffix },
224
+ });
225
+ }
226
+ },
227
+ };
228
+ },
229
+ };
230
+
231
+ const semanticFileConfig = (folder, suffix) => ({
232
+ files: [\`${exports.srcFolderName}/\${folder}/**/*.ts\`],
233
+ rules: {
234
+ "prostgles-config/semantic-filename": ["error", suffix],
235
+ },
236
+ });
237
+
238
+ export default defineConfig(
239
+ {
240
+ ignores: [
241
+ "build",
242
+ "${exports.generatedFolderName}",
243
+ "node_modules",
244
+ "eslint.config.mjs",
245
+ "src/${servicesFolderName}/*/src",
246
+ ],
247
+ },
248
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
249
+ pluginSecurity.configs.recommended,
250
+ eslint.configs.recommended,
251
+ tseslint.configs.recommendedTypeChecked,
252
+ {
253
+ files: ["${exports.srcFolderName}/**/*.ts", "${testsFolderName}/**/*.ts"],
254
+ languageOptions: {
255
+ parserOptions: {
256
+ projectService: true,
257
+ tsconfigRootDir: import.meta.dirname,
258
+ },
259
+ },
260
+ plugins: {
261
+ "prostgles-config": {
262
+ rules: { "semantic-filename": semanticFilenameRule },
263
+ },
264
+ },
265
+ rules: {
266
+ "no-cond-assign": "error",
267
+ "no-unused-vars": "off",
268
+ "security/detect-object-injection": "off",
269
+ "@typescript-eslint/no-explicit-any": "off",
270
+ "@typescript-eslint/no-floating-promises": "error",
271
+ "@typescript-eslint/no-unnecessary-condition": "error",
272
+ "@typescript-eslint/no-unused-vars": [
273
+ "error",
274
+ {
275
+ argsIgnorePattern: "^_",
276
+ varsIgnorePattern: "^_",
277
+ caughtErrorsIgnorePattern: "^_",
278
+ },
279
+ ],
280
+ },
281
+ },
282
+ ${exports.srcSubfolderNames
283
+ .filter((f) => f !== "services")
284
+ .map((folderName) => `semanticFileConfig("${folderName}", ".${folderName.slice(0, -1)}.ts")`)
285
+ .join(",\n ")}
286
+ );`;
287
+ /**
288
+ * This exhaustive map keeps the generated guidance in step with SchemaConfig.
289
+ * Adding or removing a config property requires its guidance to be updated too.
290
+ */
291
+ const schemaConfigGuidance = {
292
+ access_control: "Configure database permissions with `access_control` using the Prostgles `dbPermissions` shape.",
293
+ connection: "Keep non-secret connection presentation settings in `connection`; database URLs belong in `.env`.",
294
+ databaseConfig: "Use `databaseConfig` for host-managed database features such as file storage and REST access.",
295
+ functions: "Put privileged operations, cross-table workflows, and server-only business logic in top-level `functions`.",
296
+ id: "Keep `id` stable because it identifies the deployed configuration.",
297
+ joins: "Use `joins` only for relationships that cannot be inferred from foreign keys.",
298
+ onInitSQL: "Use `onInitSQL` only for SQL initialization that cannot be expressed by `tableConfig`.",
299
+ onMount: "Use `onMount` for startup integration work and return cleanup logic when resources are opened.",
300
+ tableConfig: "Define tables and columns in `tableConfig`, including constraints and indexes.",
301
+ tableConfigMigrations: "For schema changes that transform existing data, increment `tableConfigMigrations.version` and use `onMigrate`.",
302
+ tableHooks: "Define `tableHooks` as a separate top-level config property.",
303
+ watchSchemaType: "Set `watchSchemaType` only when schema watching must differ from the default.",
304
+ workspaces: "Define typed `workspaces` as useful default dashboards that bring related data together.",
305
+ };
306
+ const connectionGuidance = {
307
+ db_schema_filter: "Use `connection.db_schema_filter` only for connection-level schema visibility.",
308
+ display_options: "Use `connection.display_options` for connection-wide display behavior.",
309
+ 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.",
310
+ };
311
+ const getCliAgentsFile = () => `
312
+ # Prostgles configuration
313
+
314
+ Build the application around the typed Prostgles schema config.
315
+
316
+ ## Config structure
317
+
318
+ - 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.
319
+ - Run \`npm run dev\` after schema or function changes. It rebuilds the config and refreshes \`generated/DBGeneratedSchema.ts\`, including \`GeneratedFunctionSchema\` for clients.
320
+ - ${schemaConfigGuidance.id}
321
+ - ${schemaConfigGuidance.connection} ${connectionGuidance.db_schema_filter} ${connectionGuidance.display_options}
322
+ - ${schemaConfigGuidance.databaseConfig}
323
+ - ${schemaConfigGuidance.access_control}
324
+ - ${schemaConfigGuidance.watchSchemaType}
325
+ - ${schemaConfigGuidance.onInitSQL} ${schemaConfigGuidance.onMount}
326
+
327
+ ## Typed database object
328
+
329
+ - 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.
330
+ - 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.
331
+ - 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.
332
+ - 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.
333
+
334
+ ## Project structure
335
+
336
+ - Keep \`src/index.ts\` focused on composing and exporting the config.
337
+ - 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.
338
+ - 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\`.
339
+ - The generated ESLint config enforces these suffixes inside their corresponding folders. Run \`npm run lint\` before committing.
340
+
341
+ ## Tests
342
+
343
+ - Run \`npm test\` before committing. Tests use \`@prostgles/prostgles/testing\` to start the real app against fresh state and project databases without opening the UI.
344
+ - Keep deployment tests in \`tests/\`. Each call to \`createTestDeployment\` starts a disposable PostgreSQL Docker container bound only to \`127.0.0.1\`, creates fresh state and project databases, and removes the container during cleanup.
345
+ - Deployment stdout and stderr remain available after cleanup in \`.prostgles/test-logs/\`. The exact file is returned as \`deployment.logPath\`.
346
+ - Test logs may be large. Inspect them with \`tail\` or search them with \`rg\`; do not read an entire log unless its size is known to be small.
347
+ - If the deployment fixture blocks a valid scenario, inspect \`deployment.logPath\` and report the issue against \`@prostgles/prostgles\`; do not weaken the app or its assertions to work around the fixture.
348
+ - Add test users through the fixture's \`users\` option and connect with \`connectProjectAs(userKey)\`. Sessions are seeded directly, so deployment tests do not need to exercise the login UI.
349
+ - Add deterministic database state with the fixture's \`seed\` callback. Never use development or production database URLs for test setup.
350
+
351
+ ## Tables, display options, and hooks
352
+
353
+ - ${schemaConfigGuidance.tableConfig} ${schemaConfigGuidance.tableConfigMigrations}
354
+ - ${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.
355
+ - ${connectionGuidance.table_options} Keep each table's options in its matching \`*.tableOptions.ts\` module and merge them under \`connection.table_options\`.
356
+ - Give every JSONB column a \`jsonbSchema\` or \`jsonbSchemaType\` so its contents are validated and typed.
357
+ - 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.
358
+ - ${schemaConfigGuidance.joins}
359
+
360
+ ## Workspaces
361
+
362
+ - ${schemaConfigGuidance.workspaces} Include tables and, where useful, aggregate SQL results, bar charts, time charts, maps, and summary statistics.
363
+ - Keep window IDs stable and ensure every layout item references the matching window ID.
364
+
365
+ ## File storage
366
+
367
+ - 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.
368
+ - For S3 storage, use \`storageType: { type: "S3", credential_id }\`; configure the credential in Prostgles and never put access keys in this repository.
369
+ - 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.
370
+ - 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.
371
+ - Local file data lives outside PostgreSQL. Use persistent storage and include it in deployment backups.
372
+
373
+ ## Server-side functions
374
+
375
+ - ${schemaConfigGuidance.functions}
376
+ - Organize \`functions\` into groups shaped as \`{ userFilter, functions }\`. The group filter controls which authenticated users receive those functions.
377
+ - 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.
378
+ - Define individual functions with \`defineFunction({ input, description, run })\`. Inputs use Prostgles JSONB field definitions and are validated before \`run\` executes.
379
+ - Functions have restricted database access by default. Set \`unrestrictedDbAccess: true\` only when the function needs raw SQL, transactions, or client DB-handler generation.
380
+ - Keep secrets on the server and use database transactions for multi-step writes.`;
381
+ //# sourceMappingURL=cliTemplateFiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cliTemplateFiles.js","sourceRoot":"","sources":["../../../../src/cli/cliTemplateFiles.ts"],"names":[],"mappings":";;;;AAAA,yCAA0C;AAC1C,mCAAqC;AAErC,8EAA6C;AAC7C,qDAAwD;AACxD,+BAAqC;AACrC,2BAA8C;AAEvC,MAAM,oBAAoB,GAAG,CAAC,EACnC,QAAQ,EACR,UAAU,GAIX,EAAE,EAAE;IACH,eAAe,CAAC,UAAU,EAAE,mBAAmB,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;AACjE,CAAC,CAAC;AARW,QAAA,oBAAoB,wBAQ/B;AAEW,QAAA,aAAa,GAAG,KAAK,CAAC;AACtB,QAAA,mBAAmB,GAAG,WAAW,CAAC;AAC/C,MAAM,eAAe,GAAG,OAAO,CAAC;AAEhC,MAAM,kBAAkB,GAAG,UAAU,CAAC;AACzB,QAAA,iBAAiB,GAAG;IAC/B,WAAW;IACX,cAAc;IACd,cAAc;IACd,YAAY;IACZ,kBAAkB;CACV,CAAC;AAMX,MAAM,eAAe,GAAG,CAAC,UAAkB,EAAE,WAAwB,EAAE,EAAE;IACvE,KAAK,MAAM,CAAC,YAAY,EAAE,OAAO,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAClE,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;QAChD,MAAM,iBAAiB,GAAG,IAAA,cAAO,EAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;YAChC,IAAA,cAAS,EAAC,iBAAiB,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;YAClD,IAAA,kBAAa,EAAC,QAAQ,EAAE,IAAA,iBAAS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