@rhino-dev/rhino-nestjs 0.2.5
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/LICENSE +21 -0
- package/README.md +427 -0
- package/dist/blueprint/blueprint-parser.d.ts +130 -0
- package/dist/blueprint/blueprint-parser.js +276 -0
- package/dist/blueprint/blueprint-parser.js.map +1 -0
- package/dist/blueprint/blueprint-runner.d.ts +51 -0
- package/dist/blueprint/blueprint-runner.js +238 -0
- package/dist/blueprint/blueprint-runner.js.map +1 -0
- package/dist/blueprint/blueprint-validator.d.ts +19 -0
- package/dist/blueprint/blueprint-validator.js +163 -0
- package/dist/blueprint/blueprint-validator.js.map +1 -0
- package/dist/blueprint/generators/policy-generator.d.ts +40 -0
- package/dist/blueprint/generators/policy-generator.js +157 -0
- package/dist/blueprint/generators/policy-generator.js.map +1 -0
- package/dist/blueprint/generators/prisma-schema-generator.d.ts +43 -0
- package/dist/blueprint/generators/prisma-schema-generator.js +197 -0
- package/dist/blueprint/generators/prisma-schema-generator.js.map +1 -0
- package/dist/blueprint/generators/resource-definition-generator.d.ts +52 -0
- package/dist/blueprint/generators/resource-definition-generator.js +229 -0
- package/dist/blueprint/generators/resource-definition-generator.js.map +1 -0
- package/dist/blueprint/generators/seeder-generator.d.ts +21 -0
- package/dist/blueprint/generators/seeder-generator.js +135 -0
- package/dist/blueprint/generators/seeder-generator.js.map +1 -0
- package/dist/blueprint/generators/test-generator.d.ts +28 -0
- package/dist/blueprint/generators/test-generator.js +275 -0
- package/dist/blueprint/generators/test-generator.js.map +1 -0
- package/dist/blueprint/manifest-manager.d.ts +58 -0
- package/dist/blueprint/manifest-manager.js +137 -0
- package/dist/blueprint/manifest-manager.js.map +1 -0
- package/dist/cli/commands/blueprint.command.d.ts +16 -0
- package/dist/cli/commands/blueprint.command.js +35 -0
- package/dist/cli/commands/blueprint.command.js.map +1 -0
- package/dist/cli/commands/export-postman.command.d.ts +5 -0
- package/dist/cli/commands/export-postman.command.js +39 -0
- package/dist/cli/commands/export-postman.command.js.map +1 -0
- package/dist/cli/commands/export-types.command.d.ts +4 -0
- package/dist/cli/commands/export-types.command.js +36 -0
- package/dist/cli/commands/export-types.command.js.map +1 -0
- package/dist/cli/commands/generate.command.d.ts +6 -0
- package/dist/cli/commands/generate.command.js +212 -0
- package/dist/cli/commands/generate.command.js.map +1 -0
- package/dist/cli/commands/install.command.d.ts +8 -0
- package/dist/cli/commands/install.command.js +205 -0
- package/dist/cli/commands/install.command.js.map +1 -0
- package/dist/cli/index.d.ts +17 -0
- package/dist/cli/index.js +123 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/utils/io.d.ts +12 -0
- package/dist/cli/utils/io.js +74 -0
- package/dist/cli/utils/io.js.map +1 -0
- package/dist/cli/utils/prompt.d.ts +12 -0
- package/dist/cli/utils/prompt.js +78 -0
- package/dist/cli/utils/prompt.js.map +1 -0
- package/dist/constants/tokens.d.ts +3 -0
- package/dist/constants/tokens.js +7 -0
- package/dist/constants/tokens.js.map +1 -0
- package/dist/controllers/auth.controller.d.ts +59 -0
- package/dist/controllers/auth.controller.js +121 -0
- package/dist/controllers/auth.controller.js.map +1 -0
- package/dist/controllers/global.controller.d.ts +44 -0
- package/dist/controllers/global.controller.js +357 -0
- package/dist/controllers/global.controller.js.map +1 -0
- package/dist/controllers/invitation.controller.d.ts +30 -0
- package/dist/controllers/invitation.controller.js +111 -0
- package/dist/controllers/invitation.controller.js.map +1 -0
- package/dist/controllers/nested.controller.d.ts +12 -0
- package/dist/controllers/nested.controller.js +69 -0
- package/dist/controllers/nested.controller.js.map +1 -0
- package/dist/decorators/index.d.ts +33 -0
- package/dist/decorators/index.js +79 -0
- package/dist/decorators/index.js.map +1 -0
- package/dist/errors/rhino-exception.d.ts +24 -0
- package/dist/errors/rhino-exception.js +47 -0
- package/dist/errors/rhino-exception.js.map +1 -0
- package/dist/exporters/postman-exporter.d.ts +21 -0
- package/dist/exporters/postman-exporter.js +396 -0
- package/dist/exporters/postman-exporter.js.map +1 -0
- package/dist/exporters/typescript-exporter.d.ts +23 -0
- package/dist/exporters/typescript-exporter.js +129 -0
- package/dist/exporters/typescript-exporter.js.map +1 -0
- package/dist/guards/jwt-auth.guard.d.ts +16 -0
- package/dist/guards/jwt-auth.guard.js +61 -0
- package/dist/guards/jwt-auth.guard.js.map +1 -0
- package/dist/guards/resource-policy.guard.d.ts +12 -0
- package/dist/guards/resource-policy.guard.js +111 -0
- package/dist/guards/resource-policy.guard.js.map +1 -0
- package/dist/index.d.ts +60 -0
- package/dist/index.js +171 -0
- package/dist/index.js.map +1 -0
- package/dist/interceptors/hidden-columns.interceptor.d.ts +18 -0
- package/dist/interceptors/hidden-columns.interceptor.js +66 -0
- package/dist/interceptors/hidden-columns.interceptor.js.map +1 -0
- package/dist/interceptors/response.interceptor.d.ts +19 -0
- package/dist/interceptors/response.interceptor.js +47 -0
- package/dist/interceptors/response.interceptor.js.map +1 -0
- package/dist/interfaces/rhino-config.interface.d.ts +103 -0
- package/dist/interfaces/rhino-config.interface.js +3 -0
- package/dist/interfaces/rhino-config.interface.js.map +1 -0
- package/dist/interfaces/rhino-request.interface.d.ts +12 -0
- package/dist/interfaces/rhino-request.interface.js +3 -0
- package/dist/interfaces/rhino-request.interface.js.map +1 -0
- package/dist/middleware/resolve-organization.middleware.d.ts +15 -0
- package/dist/middleware/resolve-organization.middleware.js +38 -0
- package/dist/middleware/resolve-organization.middleware.js.map +1 -0
- package/dist/middleware/route-group.middleware.d.ts +17 -0
- package/dist/middleware/route-group.middleware.js +60 -0
- package/dist/middleware/route-group.middleware.js.map +1 -0
- package/dist/middleware/tenant-route-rewrite.d.ts +76 -0
- package/dist/middleware/tenant-route-rewrite.js +124 -0
- package/dist/middleware/tenant-route-rewrite.js.map +1 -0
- package/dist/policies/resource-policy.d.ts +25 -0
- package/dist/policies/resource-policy.js +77 -0
- package/dist/policies/resource-policy.js.map +1 -0
- package/dist/prisma/prisma-soft-delete.extension.d.ts +16 -0
- package/dist/prisma/prisma-soft-delete.extension.js +57 -0
- package/dist/prisma/prisma-soft-delete.extension.js.map +1 -0
- package/dist/prisma/prisma-uuid.extension.d.ts +9 -0
- package/dist/prisma/prisma-uuid.extension.js +28 -0
- package/dist/prisma/prisma-uuid.extension.js.map +1 -0
- package/dist/prisma/prisma.service.d.ts +38 -0
- package/dist/prisma/prisma.service.js +100 -0
- package/dist/prisma/prisma.service.js.map +1 -0
- package/dist/rhino.config.d.ts +43 -0
- package/dist/rhino.config.js +130 -0
- package/dist/rhino.config.js.map +1 -0
- package/dist/rhino.module.d.ts +61 -0
- package/dist/rhino.module.js +268 -0
- package/dist/rhino.module.js.map +1 -0
- package/dist/services/audit.service.d.ts +35 -0
- package/dist/services/audit.service.js +92 -0
- package/dist/services/audit.service.js.map +1 -0
- package/dist/services/auth.service.d.ts +33 -0
- package/dist/services/auth.service.js +157 -0
- package/dist/services/auth.service.js.map +1 -0
- package/dist/services/invitation.service.d.ts +37 -0
- package/dist/services/invitation.service.js +143 -0
- package/dist/services/invitation.service.js.map +1 -0
- package/dist/services/nested.service.d.ts +34 -0
- package/dist/services/nested.service.js +163 -0
- package/dist/services/nested.service.js.map +1 -0
- package/dist/services/organization.service.d.ts +13 -0
- package/dist/services/organization.service.js +60 -0
- package/dist/services/organization.service.js.map +1 -0
- package/dist/services/query-builder.service.d.ts +31 -0
- package/dist/services/query-builder.service.js +151 -0
- package/dist/services/query-builder.service.js.map +1 -0
- package/dist/services/resource.service.d.ts +38 -0
- package/dist/services/resource.service.js +230 -0
- package/dist/services/resource.service.js.map +1 -0
- package/dist/services/route-registration.service.d.ts +40 -0
- package/dist/services/route-registration.service.js +68 -0
- package/dist/services/route-registration.service.js.map +1 -0
- package/dist/services/scope.service.d.ts +16 -0
- package/dist/services/scope.service.js +32 -0
- package/dist/services/scope.service.js.map +1 -0
- package/dist/services/serializer.service.d.ts +36 -0
- package/dist/services/serializer.service.js +90 -0
- package/dist/services/serializer.service.js.map +1 -0
- package/dist/services/validation.service.d.ts +50 -0
- package/dist/services/validation.service.js +203 -0
- package/dist/services/validation.service.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -0
- package/dist/utils/fk-chain-walker.d.ts +30 -0
- package/dist/utils/fk-chain-walker.js +23 -0
- package/dist/utils/fk-chain-walker.js.map +1 -0
- package/dist/utils/format.d.ts +7 -0
- package/dist/utils/format.js +28 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/model-builder.d.ts +64 -0
- package/dist/utils/model-builder.js +67 -0
- package/dist/utils/model-builder.js.map +1 -0
- package/dist/utils/permission-matcher.d.ts +46 -0
- package/dist/utils/permission-matcher.js +120 -0
- package/dist/utils/permission-matcher.js.map +1 -0
- package/dist/utils/scope-discovery.d.ts +34 -0
- package/dist/utils/scope-discovery.js +102 -0
- package/dist/utils/scope-discovery.js.map +1 -0
- package/package.json +64 -0
- package/stubs/skills/rhino-audit.md +184 -0
- package/stubs/skills/rhino-bugfix.md +117 -0
- package/stubs/skills/rhino-deploy.md +5 -0
- package/stubs/skills/rhino-docs.md +147 -0
- package/stubs/skills/rhino-feature.md +146 -0
- package/stubs/skills/rhino-migrate.md +181 -0
- package/stubs/skills/rhino-model.md +180 -0
- package/stubs/skills/rhino-plan.md +5 -0
- package/stubs/skills/rhino-policy.md +183 -0
- package/stubs/skills/rhino-refactor.md +147 -0
- package/stubs/skills/rhino-review.md +113 -0
- package/stubs/skills/rhino-scope.md +140 -0
- package/stubs/skills/rhino-test.md +233 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.fileExists = fileExists;
|
|
37
|
+
exports.writeFileSafely = writeFileSafely;
|
|
38
|
+
exports.appendIfMissing = appendIfMissing;
|
|
39
|
+
/**
|
|
40
|
+
* Thin filesystem helpers for the CLI.
|
|
41
|
+
*/
|
|
42
|
+
const fs = __importStar(require("fs"));
|
|
43
|
+
const path = __importStar(require("path"));
|
|
44
|
+
/** Return true when a file (or directory) exists. */
|
|
45
|
+
function fileExists(filePath) {
|
|
46
|
+
return fs.existsSync(filePath);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Write content to a file, creating parent directories as needed.
|
|
50
|
+
* Writes to a tmp path first then renames for an atomic-ish write.
|
|
51
|
+
*/
|
|
52
|
+
function writeFileSafely(filePath, content) {
|
|
53
|
+
const dir = path.dirname(filePath);
|
|
54
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
55
|
+
const tmp = `${filePath}.tmp_${process.pid}`;
|
|
56
|
+
fs.writeFileSync(tmp, content, 'utf8');
|
|
57
|
+
fs.renameSync(tmp, filePath);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Append `content` to `filePath` only when the exact string is not
|
|
61
|
+
* already present (prevents duplicate entries on re-runs).
|
|
62
|
+
*/
|
|
63
|
+
function appendIfMissing(filePath, content) {
|
|
64
|
+
if (fileExists(filePath)) {
|
|
65
|
+
const existing = fs.readFileSync(filePath, 'utf8');
|
|
66
|
+
if (existing.includes(content.trim()))
|
|
67
|
+
return;
|
|
68
|
+
fs.appendFileSync(filePath, `\n${content}`, 'utf8');
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
writeFileSafely(filePath, content);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=io.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"io.js","sourceRoot":"","sources":["../../../src/cli/utils/io.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,gCAEC;AAMD,0CAOC;AAMD,0CAQC;AApCD;;GAEG;AACH,uCAAyB;AACzB,2CAA6B;AAE7B,qDAAqD;AACrD,SAAgB,UAAU,CAAC,QAAgB;IACzC,OAAO,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACjC,CAAC;AAED;;;GAGG;AACH,SAAgB,eAAe,CAAC,QAAgB,EAAE,OAAe;IAC/D,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnC,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAEvC,MAAM,GAAG,GAAG,GAAG,QAAQ,QAAQ,OAAO,CAAC,GAAG,EAAE,CAAC;IAC7C,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACvC,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;AAC/B,CAAC;AAED;;;GAGG;AACH,SAAgB,eAAe,CAAC,QAAgB,EAAE,OAAe;IAC/D,IAAI,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzB,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACnD,IAAI,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAAE,OAAO;QAC9C,EAAE,CAAC,cAAc,CAAC,QAAQ,EAAE,KAAK,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC;IACtD,CAAC;SAAM,CAAC;QACN,eAAe,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface ReadlineInterface {
|
|
2
|
+
question(query: string, callback: (answer: string) => void): void;
|
|
3
|
+
close(): void;
|
|
4
|
+
}
|
|
5
|
+
/** Factory so callers can inject a mock in tests. */
|
|
6
|
+
export declare function createInterface(input?: NodeJS.ReadableStream, output?: NodeJS.WritableStream): ReadlineInterface;
|
|
7
|
+
/** Ask a free-text question. Returns the trimmed answer. */
|
|
8
|
+
export declare function ask(rl: ReadlineInterface, question: string): Promise<string>;
|
|
9
|
+
/** Ask a yes/no question. Defaults shown in brackets. Returns boolean. */
|
|
10
|
+
export declare function confirm(rl: ReadlineInterface, question: string, defaultValue?: boolean): Promise<boolean>;
|
|
11
|
+
/** Present a numbered list, returns the selected value. */
|
|
12
|
+
export declare function selectFromList(rl: ReadlineInterface, question: string, options: string[], defaultIndex?: number): Promise<string>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.createInterface = createInterface;
|
|
37
|
+
exports.ask = ask;
|
|
38
|
+
exports.confirm = confirm;
|
|
39
|
+
exports.selectFromList = selectFromList;
|
|
40
|
+
/**
|
|
41
|
+
* Minimal readline-based prompt utilities.
|
|
42
|
+
* Pass a custom ReadlineInterface for testing (avoids real stdin/stdout).
|
|
43
|
+
*/
|
|
44
|
+
const readline = __importStar(require("readline"));
|
|
45
|
+
/** Factory so callers can inject a mock in tests. */
|
|
46
|
+
function createInterface(input = process.stdin, output = process.stdout) {
|
|
47
|
+
return readline.createInterface({ input, output });
|
|
48
|
+
}
|
|
49
|
+
/** Ask a free-text question. Returns the trimmed answer. */
|
|
50
|
+
function ask(rl, question) {
|
|
51
|
+
return new Promise((resolve) => {
|
|
52
|
+
rl.question(question, (answer) => {
|
|
53
|
+
resolve(answer.trim());
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/** Ask a yes/no question. Defaults shown in brackets. Returns boolean. */
|
|
58
|
+
async function confirm(rl, question, defaultValue = true) {
|
|
59
|
+
const hint = defaultValue ? '[Y/n]' : '[y/N]';
|
|
60
|
+
const answer = await ask(rl, `${question} ${hint}: `);
|
|
61
|
+
if (!answer)
|
|
62
|
+
return defaultValue;
|
|
63
|
+
return answer.toLowerCase().startsWith('y');
|
|
64
|
+
}
|
|
65
|
+
/** Present a numbered list, returns the selected value. */
|
|
66
|
+
async function selectFromList(rl, question, options, defaultIndex = 0) {
|
|
67
|
+
process.stdout.write(`${question}\n`);
|
|
68
|
+
options.forEach((opt, i) => {
|
|
69
|
+
process.stdout.write(` ${i + 1}) ${opt}\n`);
|
|
70
|
+
});
|
|
71
|
+
const answer = await ask(rl, `Enter number (default: ${defaultIndex + 1}): `);
|
|
72
|
+
const num = parseInt(answer, 10);
|
|
73
|
+
if (!answer || isNaN(num) || num < 1 || num > options.length) {
|
|
74
|
+
return options[defaultIndex];
|
|
75
|
+
}
|
|
76
|
+
return options[num - 1];
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../../src/cli/utils/prompt.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,0CAKC;AAGD,kBAMC;AAGD,0BASC;AAGD,wCAgBC;AAzDD;;;GAGG;AACH,mDAAqC;AAOrC,qDAAqD;AACrD,SAAgB,eAAe,CAC7B,QAA+B,OAAO,CAAC,KAAK,EAC5C,SAAgC,OAAO,CAAC,MAAM;IAE9C,OAAO,QAAQ,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;AACrD,CAAC;AAED,4DAA4D;AAC5D,SAAgB,GAAG,CAAC,EAAqB,EAAE,QAAgB;IACzD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,EAAE;YAC/B,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;QACzB,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,0EAA0E;AACnE,KAAK,UAAU,OAAO,CAC3B,EAAqB,EACrB,QAAgB,EAChB,YAAY,GAAG,IAAI;IAEnB,MAAM,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAC9C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE,EAAE,GAAG,QAAQ,IAAI,IAAI,IAAI,CAAC,CAAC;IACtD,IAAI,CAAC,MAAM;QAAE,OAAO,YAAY,CAAC;IACjC,OAAO,MAAM,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC9C,CAAC;AAED,2DAA2D;AACpD,KAAK,UAAU,cAAc,CAClC,EAAqB,EACrB,QAAgB,EAChB,OAAiB,EACjB,YAAY,GAAG,CAAC;IAEhB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,IAAI,CAAC,CAAC;IACtC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE;QACzB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,EAAE,EAAE,0BAA0B,YAAY,GAAG,CAAC,KAAK,CAAC,CAAC;IAC9E,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACjC,IAAI,CAAC,MAAM,IAAI,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,GAAG,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QAC7D,OAAO,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RHINO_MODULE_OPTIONS = exports.RHINO_PRISMA_CLIENT = exports.RHINO_CONFIG = void 0;
|
|
4
|
+
exports.RHINO_CONFIG = Symbol('RHINO_CONFIG');
|
|
5
|
+
exports.RHINO_PRISMA_CLIENT = Symbol('RHINO_PRISMA_CLIENT');
|
|
6
|
+
exports.RHINO_MODULE_OPTIONS = Symbol('RHINO_MODULE_OPTIONS');
|
|
7
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/constants/tokens.ts"],"names":[],"mappings":";;;AAAa,QAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AACtC,QAAA,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AACpD,QAAA,oBAAoB,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { AuthService } from '../services/auth.service';
|
|
2
|
+
import { InvitationService } from '../services/invitation.service';
|
|
3
|
+
import { PrismaService } from '../prisma/prisma.service';
|
|
4
|
+
import { RhinoConfigService } from '../rhino.config';
|
|
5
|
+
export interface LoginDto {
|
|
6
|
+
email: string;
|
|
7
|
+
password: string;
|
|
8
|
+
}
|
|
9
|
+
export interface RecoverDto {
|
|
10
|
+
email: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ResetDto {
|
|
13
|
+
email: string;
|
|
14
|
+
token: string;
|
|
15
|
+
password: string;
|
|
16
|
+
}
|
|
17
|
+
export interface RegisterDto {
|
|
18
|
+
email: string;
|
|
19
|
+
password: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
invitationToken: string;
|
|
22
|
+
}
|
|
23
|
+
export declare class AuthController {
|
|
24
|
+
private readonly authService;
|
|
25
|
+
private readonly invitationService;
|
|
26
|
+
private readonly prisma;
|
|
27
|
+
private readonly config;
|
|
28
|
+
constructor(authService: AuthService, invitationService: InvitationService, prisma: PrismaService, config: RhinoConfigService);
|
|
29
|
+
login(dto: LoginDto): Promise<{
|
|
30
|
+
token: string;
|
|
31
|
+
organization_slug: string;
|
|
32
|
+
}>;
|
|
33
|
+
logout(req: any): Promise<{
|
|
34
|
+
success: boolean;
|
|
35
|
+
}>;
|
|
36
|
+
recover(dto: RecoverDto): Promise<{
|
|
37
|
+
success: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
reset(dto: ResetDto): Promise<{
|
|
40
|
+
success: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
register(dto: RegisterDto): Promise<{
|
|
43
|
+
requiresRegistration: boolean;
|
|
44
|
+
organization: any;
|
|
45
|
+
role: any;
|
|
46
|
+
email: any;
|
|
47
|
+
accepted?: undefined;
|
|
48
|
+
token: string;
|
|
49
|
+
user: any;
|
|
50
|
+
} | {
|
|
51
|
+
accepted: boolean;
|
|
52
|
+
organization: any;
|
|
53
|
+
requiresRegistration?: undefined;
|
|
54
|
+
role?: undefined;
|
|
55
|
+
email?: undefined;
|
|
56
|
+
token: string;
|
|
57
|
+
user: any;
|
|
58
|
+
}>;
|
|
59
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
+
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.AuthController = void 0;
|
|
16
|
+
const common_1 = require("@nestjs/common");
|
|
17
|
+
const auth_service_1 = require("../services/auth.service");
|
|
18
|
+
const invitation_service_1 = require("../services/invitation.service");
|
|
19
|
+
const prisma_service_1 = require("../prisma/prisma.service");
|
|
20
|
+
const rhino_config_1 = require("../rhino.config");
|
|
21
|
+
let AuthController = class AuthController {
|
|
22
|
+
authService;
|
|
23
|
+
invitationService;
|
|
24
|
+
prisma;
|
|
25
|
+
config;
|
|
26
|
+
constructor(authService, invitationService, prisma, config) {
|
|
27
|
+
this.authService = authService;
|
|
28
|
+
this.invitationService = invitationService;
|
|
29
|
+
this.prisma = prisma;
|
|
30
|
+
this.config = config;
|
|
31
|
+
}
|
|
32
|
+
async login(dto) {
|
|
33
|
+
if (!dto?.email || !dto?.password) {
|
|
34
|
+
throw new common_1.BadRequestException('Email and password required');
|
|
35
|
+
}
|
|
36
|
+
const { token, organizationSlug } = await this.authService.login(dto.email, dto.password);
|
|
37
|
+
return { token, organization_slug: organizationSlug };
|
|
38
|
+
}
|
|
39
|
+
async logout(req) {
|
|
40
|
+
await this.authService.logout(req.user);
|
|
41
|
+
return { success: true };
|
|
42
|
+
}
|
|
43
|
+
async recover(dto) {
|
|
44
|
+
if (!dto?.email)
|
|
45
|
+
throw new common_1.BadRequestException('Email required');
|
|
46
|
+
await this.authService.requestPasswordRecovery(dto.email);
|
|
47
|
+
return { success: true };
|
|
48
|
+
}
|
|
49
|
+
async reset(dto) {
|
|
50
|
+
if (!dto?.email || !dto?.token || !dto?.password) {
|
|
51
|
+
throw new common_1.BadRequestException('Email, token and password required');
|
|
52
|
+
}
|
|
53
|
+
await this.authService.resetPassword(dto.email, dto.token, dto.password);
|
|
54
|
+
return { success: true };
|
|
55
|
+
}
|
|
56
|
+
async register(dto) {
|
|
57
|
+
if (!dto?.email || !dto?.password || !dto?.invitationToken) {
|
|
58
|
+
throw new common_1.BadRequestException('Email, password and invitationToken required');
|
|
59
|
+
}
|
|
60
|
+
const auth = this.config.authConfig();
|
|
61
|
+
const hashed = await this.authService.hashPassword(dto.password);
|
|
62
|
+
const user = await this.prisma.model(auth.userModel).create({
|
|
63
|
+
data: {
|
|
64
|
+
email: dto.email,
|
|
65
|
+
password: hashed,
|
|
66
|
+
name: dto.name ?? '',
|
|
67
|
+
},
|
|
68
|
+
});
|
|
69
|
+
const acceptance = await this.invitationService.accept(dto.invitationToken, user.id);
|
|
70
|
+
const token = this.authService.signToken({ sub: user.id, email: dto.email });
|
|
71
|
+
return {
|
|
72
|
+
token,
|
|
73
|
+
user,
|
|
74
|
+
...acceptance,
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
exports.AuthController = AuthController;
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, common_1.Post)('login'),
|
|
81
|
+
__param(0, (0, common_1.Body)()),
|
|
82
|
+
__metadata("design:type", Function),
|
|
83
|
+
__metadata("design:paramtypes", [Object]),
|
|
84
|
+
__metadata("design:returntype", Promise)
|
|
85
|
+
], AuthController.prototype, "login", null);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, common_1.Post)('logout'),
|
|
88
|
+
__param(0, (0, common_1.Req)()),
|
|
89
|
+
__metadata("design:type", Function),
|
|
90
|
+
__metadata("design:paramtypes", [Object]),
|
|
91
|
+
__metadata("design:returntype", Promise)
|
|
92
|
+
], AuthController.prototype, "logout", null);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, common_1.Post)('password/recover'),
|
|
95
|
+
__param(0, (0, common_1.Body)()),
|
|
96
|
+
__metadata("design:type", Function),
|
|
97
|
+
__metadata("design:paramtypes", [Object]),
|
|
98
|
+
__metadata("design:returntype", Promise)
|
|
99
|
+
], AuthController.prototype, "recover", null);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, common_1.Post)('password/reset'),
|
|
102
|
+
__param(0, (0, common_1.Body)()),
|
|
103
|
+
__metadata("design:type", Function),
|
|
104
|
+
__metadata("design:paramtypes", [Object]),
|
|
105
|
+
__metadata("design:returntype", Promise)
|
|
106
|
+
], AuthController.prototype, "reset", null);
|
|
107
|
+
__decorate([
|
|
108
|
+
(0, common_1.Post)('register'),
|
|
109
|
+
__param(0, (0, common_1.Body)()),
|
|
110
|
+
__metadata("design:type", Function),
|
|
111
|
+
__metadata("design:paramtypes", [Object]),
|
|
112
|
+
__metadata("design:returntype", Promise)
|
|
113
|
+
], AuthController.prototype, "register", null);
|
|
114
|
+
exports.AuthController = AuthController = __decorate([
|
|
115
|
+
(0, common_1.Controller)('auth'),
|
|
116
|
+
__metadata("design:paramtypes", [auth_service_1.AuthService,
|
|
117
|
+
invitation_service_1.InvitationService,
|
|
118
|
+
prisma_service_1.PrismaService,
|
|
119
|
+
rhino_config_1.RhinoConfigService])
|
|
120
|
+
], AuthController);
|
|
121
|
+
//# sourceMappingURL=auth.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.controller.js","sourceRoot":"","sources":["../../src/controllers/auth.controller.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { RhinoConfigService } from '../rhino.config';
|
|
2
|
+
import { ResourceService } from '../services/resource.service';
|
|
3
|
+
import { SerializerService } from '../services/serializer.service';
|
|
4
|
+
import { ValidationService } from '../services/validation.service';
|
|
5
|
+
import { AuditService } from '../services/audit.service';
|
|
6
|
+
import type { RhinoRequest } from '../interfaces/rhino-request.interface';
|
|
7
|
+
type ReqWithCtx = RhinoRequest;
|
|
8
|
+
/**
|
|
9
|
+
* The automatic CRUD controller. Registered with the dynamic route prefix
|
|
10
|
+
* by the route-registration helper (see services/route-registration.service.ts).
|
|
11
|
+
*
|
|
12
|
+
* All HTTP endpoints for any registered model flow through this controller
|
|
13
|
+
* via the `:modelSlug` parameter — matching Laravel's `GlobalController`.
|
|
14
|
+
*/
|
|
15
|
+
export declare class GlobalController {
|
|
16
|
+
private readonly config;
|
|
17
|
+
private readonly resources;
|
|
18
|
+
private readonly serializer;
|
|
19
|
+
private readonly validator;
|
|
20
|
+
private readonly audit;
|
|
21
|
+
constructor(config: RhinoConfigService, resources: ResourceService, serializer: SerializerService, validator: ValidationService, audit: AuditService);
|
|
22
|
+
private assertActionAllowed;
|
|
23
|
+
/**
|
|
24
|
+
* Enforce include-level authorization: every `?include=relation` must be
|
|
25
|
+
* a resource the user can `viewAny`. This mirrors Laravel's Gate::authorize
|
|
26
|
+
* check run inside GlobalController when resolving includes.
|
|
27
|
+
*/
|
|
28
|
+
private assertIncludesAuthorized;
|
|
29
|
+
trashed(modelSlug: string, query: any, req: ReqWithCtx): Promise<import("../interceptors/response.interceptor").PaginatedShape | {
|
|
30
|
+
data: any[];
|
|
31
|
+
}>;
|
|
32
|
+
index(modelSlug: string, query: any, req: ReqWithCtx): Promise<import("../interceptors/response.interceptor").PaginatedShape | {
|
|
33
|
+
data: any[];
|
|
34
|
+
}>;
|
|
35
|
+
show(modelSlug: string, id: string, query: any, req: ReqWithCtx): Promise<Record<string, any>>;
|
|
36
|
+
store(modelSlug: string, body: Record<string, any>, req: ReqWithCtx): Promise<Record<string, any>>;
|
|
37
|
+
update(modelSlug: string, id: string, body: Record<string, any>, req: ReqWithCtx): Promise<Record<string, any>>;
|
|
38
|
+
destroy(modelSlug: string, id: string, req: ReqWithCtx): Promise<void>;
|
|
39
|
+
restore(modelSlug: string, id: string, req: ReqWithCtx): Promise<{
|
|
40
|
+
restored: boolean;
|
|
41
|
+
}>;
|
|
42
|
+
forceDelete(modelSlug: string, id: string, req: ReqWithCtx): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
export {};
|