@oak-digital/types-4-strapi-2 1.0.0-beta.1 → 1.0.0

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.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,29 @@
1
+ // remote.js should be started with it's cwd in the strapi project's root
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ const Strapi = require('@strapi/strapi');
12
+ (() => __awaiter(this, void 0, void 0, function* () {
13
+ const base = yield Strapi({
14
+ distDir: 'dist',
15
+ });
16
+ // Do not remove log.error since it writes to stderr
17
+ base.log.warn = () => { };
18
+ base.log.info = () => { };
19
+ const instance = yield base.load();
20
+ yield instance.server.mount();
21
+ console.log(JSON.stringify([instance.contentTypes, instance.components]));
22
+ const dbSettings = instance.config.get('database.connection');
23
+ //close server to release the db-file
24
+ yield instance.server.httpServer.close();
25
+ // close the connection to the database before deletion
26
+ yield instance.db.connection.destroy();
27
+ // Force exit, because else it hangs
28
+ process.exit(0);
29
+ }))();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oak-digital/types-4-strapi-2",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0",
4
4
  "description": "Typescript interface generator for Strapi 4 models",
5
5
  "bin": {
6
6
  "t4s": "./bin/index.js"