@edifice.io/edifice-nestjs-core 1.0.0-develop-pedago.6 → 1.0.0-develop-pedago.20251204183503
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/README.md +25 -0
- package/dist/bin/update-rn-version.d.ts +2 -0
- package/dist/bin/update-rn-version.js +56 -0
- package/dist/bin/update-rn-version.js.map +1 -0
- package/dist/bin/update-version.d.ts +2 -0
- package/dist/bin/update-version.js +50 -0
- package/dist/bin/update-version.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +23 -8
package/README.md
CHANGED
|
@@ -140,6 +140,31 @@ export class AppModule {
|
|
|
140
140
|
You do not need to configure the configuration system manually; it is ready to use when you import `CoreModule`.
|
|
141
141
|
All modules and services can access configuration via dependency injection of `ConfigService`.
|
|
142
142
|
|
|
143
|
+
|
|
144
|
+
**Additional configuration:**
|
|
145
|
+
|
|
146
|
+
You can also provide additional configuration like so
|
|
147
|
+
```typescript
|
|
148
|
+
import { Module } from '@nestjs/common';
|
|
149
|
+
import { configuration as CoreConfig } from "@edifice.io/edifice-nestjs-core";
|
|
150
|
+
import AppConfig from "./config/configuration"; // Your app's configuration object
|
|
151
|
+
import { CoreModule } from '@edifice.io/edifice-nestjs-core';
|
|
152
|
+
import { ConfigModule } from "@nestjs/config";
|
|
153
|
+
|
|
154
|
+
@Module({
|
|
155
|
+
imports: [
|
|
156
|
+
CoreModule,
|
|
157
|
+
// Use config defined in core + app config
|
|
158
|
+
// (warn: does not override core config fields)
|
|
159
|
+
ConfigModule.forRoot({
|
|
160
|
+
isGlobal: true,
|
|
161
|
+
load: [CoreConfig, AppConfig],
|
|
162
|
+
}),
|
|
163
|
+
],
|
|
164
|
+
})
|
|
165
|
+
export class AppModule {}
|
|
166
|
+
```
|
|
167
|
+
|
|
143
168
|
#### Database (MikroORM Integration)
|
|
144
169
|
|
|
145
170
|
The `DatabaseModule` provides seamless integration with MikroORM and PostgreSQL for your Edifice backend application.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const cwd = process.cwd();
|
|
40
|
+
const pkgPath = path.join(cwd, 'package.json');
|
|
41
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
42
|
+
const now = new Date();
|
|
43
|
+
const pad = (n) => n.toString().padStart(2, '0');
|
|
44
|
+
const timestamp = `${now.getFullYear()}${pad(now.getMonth() + 1)}${pad(now.getDate())}${pad(now.getHours())}${pad(now.getMinutes())}${pad(now.getSeconds())}`;
|
|
45
|
+
const baseVersion = pkg.version.replace(/(\.\d{14})+$/, '');
|
|
46
|
+
const newVersion = `${baseVersion}.${timestamp}`;
|
|
47
|
+
pkg.version = newVersion;
|
|
48
|
+
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
|
|
49
|
+
const rnPath = path.join(cwd, 'package.json.rn');
|
|
50
|
+
if (fs.existsSync(rnPath)) {
|
|
51
|
+
const rn = JSON.parse(fs.readFileSync(rnPath, 'utf-8'));
|
|
52
|
+
rn.version = newVersion;
|
|
53
|
+
fs.writeFileSync(rnPath, JSON.stringify(rn, null, 2) + '\n');
|
|
54
|
+
}
|
|
55
|
+
console.log('Client version updated:', newVersion);
|
|
56
|
+
//# sourceMappingURL=update-rn-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-rn-version.js","sourceRoot":"","sources":["../../src/bin/update-rn-version.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,uCAAyB;AACzB,2CAA6B;AAG7B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAG1B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;AAC/C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAG1D,MAAM,GAAG,GAAG,I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OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const cwd = process.cwd();
|
|
40
|
+
const pkgPath = path.join(cwd, 'package.json');
|
|
41
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
|
42
|
+
const now = new Date();
|
|
43
|
+
const pad = (n) => n.toString().padStart(2, '0');
|
|
44
|
+
const timestamp = `${now.getFullYear()}${pad(now.getMonth() + 1)}${pad(now.getDate())}${pad(now.getHours())}${pad(now.getMinutes())}${pad(now.getSeconds())}`;
|
|
45
|
+
const baseVersion = pkg.version.replace(/(\.\d+)+$/, '');
|
|
46
|
+
const newVersion = `${baseVersion}.${timestamp}`;
|
|
47
|
+
pkg.version = newVersion;
|
|
48
|
+
fs.writeFileSync(pkgPath, JSON.stringify(pkg, null, 2) + '\n');
|
|
49
|
+
console.log('Version updated:', newVersion);
|
|
50
|
+
//# sourceMappingURL=update-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-version.js","sourceRoot":"","sources":["../../src/bin/update-version.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,uCAAyB;AACzB,2CAA6B;AAG7B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAG1B,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;AAC/C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AAG1D,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;AACvB,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AACzD,MAAM,SAAS,GAAG,GAAG,GAAG,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