Unverified Commit c311487a authored by Rodrigo Nascimento's avatar Rodrigo Nascimento Committed by GitHub

Merge pull request #31 from RocketChat/apps-engine-merge

Apps engine merge
parents 50755975 94c6ab48
......@@ -20,7 +20,7 @@ The development tools provide a command to quickly scaffold a new Rocket.Chat Ap
### App description
The app description file, named `app.json`, contains basic information about the app. You can check the [app-schema.json](https://github.com/RocketChat/Rocket.Chat.Apps-ts-definition/blob/master/src/app-schema.json) file for all the detailed information and fields allowed in the app description file, the basic structure is similar to this:
The app description file, named `app.json`, contains basic information about the app. You can check the [app-schema.json](https://github.com/RocketChat/Rocket.Chat.Apps-engine/blob/master/src/definition/app-schema.json) file for all the detailed information and fields allowed in the app description file, the basic structure is similar to this:
```
{
......@@ -41,7 +41,7 @@ The app description file, named `app.json`, contains basic information about the
### Extending the App class
The basic creation of an App is based on extending the `App` class from the Rocket.Chat Apps _ts-definition_ library. Your class also has to implement the constructor and optionally the `initialize` function, for more details on those check the [App definition documentation](https://rocketchat.github.io/Rocket.Chat.Apps-ts-definition/classes/app.html).
The basic creation of an App is based on extending the `App` class from the Rocket.Chat Apps _definition_ library. Your class also has to implement the constructor and optionally the `initialize` function, for more details on those check the [App definition documentation](https://rocketchat.github.io/Rocket.Chat.Apps-engine/classes/app.html).
```
import {
......@@ -49,9 +49,9 @@ import {
IConfigurationModify,
IEnvironmentRead,
ILogger,
} from '@rocket.chat/apps-ts-definition/accessors';
import { App } from '@rocket.chat/apps-ts-definition/App';
import { IAppInfo } from '@rocket.chat/apps-ts-definition/metadata';
} from '@rocket.chat/apps-engine/definition/accessors';
import { App } from '@rocket.chat/apps-engine/definition/App';
import { IAppInfo } from '@rocket.chat/apps-engine/definition/metadata';
export class TodoListApp extends App {
constructor(info: IAppInfo, logger: ILogger) {
......
{
"name": "@rocket.chat/apps-cli",
"version": "1.2.0",
"version": "1.2.1",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
......@@ -292,10 +292,18 @@
"tslint-xo": "^0.8.0"
}
},
"@rocket.chat/apps-ts-definition": {
"version": "0.9.13",
"resolved": "https://registry.npmjs.org/@rocket.chat/apps-ts-definition/-/apps-ts-definition-0.9.13.tgz",
"integrity": "sha512-2fqbJG8TPq19o2uZCE3UqRpNobAfAcgu0WkM8PAmhf1de459Z2gbmzbCBAsQJq6eOrGkqDry0GTzEneiCEvwZg=="
"@rocket.chat/apps-engine": {
"version": "1.0.0-beta.0",
"resolved": "https://registry.npmjs.org/@rocket.chat/apps-engine/-/apps-engine-1.0.0-beta.0.tgz",
"integrity": "sha512-7Yf4JErYyQSYfl/odWqB4j3dd78sXoWlsXyNNg90ndwLEuOrofVuf62IeHGmXI6r+c35ynnoVoo9L1zwrxnPcA==",
"requires": {
"adm-zip": "^0.4.9",
"lodash.clonedeep": "^4.5.0",
"semver": "^5.5.0",
"stack-trace": "0.0.10",
"typescript": "^2.8.3",
"uuid": "^3.2.1"
}
},
"@types/chai": {
"version": "4.1.3",
......@@ -573,6 +581,11 @@
"@types/node": "*"
}
},
"adm-zip": {
"version": "0.4.11",
"resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.4.11.tgz",
"integrity": "sha512-L8vcjDTCOIJk7wFvmlEUN7AsSb8T+2JrdP7KINBjzr24TJ5Mwj590sLu3BC7zNZowvJWa/JtPmD8eJCzdtDWjA=="
},
"ansi-escapes": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz",
......@@ -1390,9 +1403,9 @@
}
},
"external-editor": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.0.tgz",
"integrity": "sha512-mpkfj0FEdxrIhOC04zk85X7StNtr0yXnG7zCb+8ikO8OJi2jsHh5YGoknNTyXgsbHOf1WOOcVU3kPFWT2WgCkQ==",
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.1.tgz",
"integrity": "sha512-e1neqvSt5pSwQcFnYc6yfGuJD2Q4336cdbHs5VeUO0zTkqPbrHMyw2q1r47fpfLWbvIG8H8A6YO3sck7upTV6Q==",
"requires": {
"chardet": "^0.5.0",
"iconv-lite": "^0.4.22",
......@@ -1807,9 +1820,9 @@
"integrity": "sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ=="
},
"iconv-lite": {
"version": "0.4.23",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz",
"integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==",
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
......@@ -1846,9 +1859,9 @@
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
"inquirer": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.1.0.tgz",
"integrity": "sha512-f9K2MMx/G/AVmJSaZg2a+GVLRRmTdlGLbwxsibNd6yNTxXujqxPypjCnxnC0y4+Wb/rNY5KyKuq06AO5jrE+7w==",
"version": "6.2.0",
"resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.2.0.tgz",
"integrity": "sha512-QIEQG4YyQ2UYZGDC4srMZ7BjHOmNk1lR2JQj5UknBapklm6WHA+VVH7N+sUdX3A7NeCfGF8o4X1S3Ao7nAcIeg==",
"requires": {
"ansi-escapes": "^3.0.0",
"chalk": "^2.0.0",
......@@ -1856,7 +1869,7 @@
"cli-width": "^2.0.0",
"external-editor": "^3.0.0",
"figures": "^2.0.0",
"lodash": "^4.3.0",
"lodash": "^4.17.10",
"mute-stream": "0.0.7",
"run-async": "^2.2.0",
"rxjs": "^6.1.0",
......@@ -2234,6 +2247,11 @@
"resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
"integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0="
},
"lodash.clonedeep": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8="
},
"lodash.template": {
"version": "4.4.0",
"resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz",
......@@ -5535,6 +5553,11 @@
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
},
"stack-trace": {
"version": "0.0.10",
"resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
"integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA="
},
"static-extend": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
......
import { Command, flags } from '@oclif/command';
import { IAppInfo } from '@rocket.chat/apps-ts-definition/metadata';
import { IAppInfo } from '@rocket.chat/apps-engine/definition/metadata';
import chalk from 'chalk';
import cli from 'cli-ux';
import pascalCase = require('pascal-case');
......
......@@ -32,9 +32,9 @@ export class AppCreator {
const toWrite =
`import {
ILogger,
} from '@rocket.chat/apps-ts-definition/accessors';
import { App } from '@rocket.chat/apps-ts-definition/App';
import { IAppInfo } from '@rocket.chat/apps-ts-definition/metadata';
} from '@rocket.chat/apps-engine/definition/accessors';
import { App } from '@rocket.chat/apps-engine/definition/App';
import { IAppInfo } from '@rocket.chat/apps-engine/definition/metadata';
export class ${ pascalCase(this.fd.info.name) }App extends App {
constructor(info: IAppInfo, logger: ILogger) {
......@@ -70,8 +70,8 @@ Here are some commands to get started:
## Documentation
Here are some links to examples and documentation:
- [Rocket.Chat Apps TypeScript Definitions Documentation](https://rocketchat.github.io/Rocket.Chat.Apps-ts-definition/)
- [Rocket.Chat Apps TypeScript Definitions Repository](https://github.com/RocketChat/Rocket.Chat.Apps-ts-definition)
- [Rocket.Chat Apps TypeScript Definitions Documentation](https://rocketchat.github.io/Rocket.Chat.Apps-engine/)
- [Rocket.Chat Apps TypeScript Definitions Repository](https://github.com/RocketChat/Rocket.Chat.Apps-engine)
- [Example Rocket.Chat Apps](https://github.com/graywolf336/RocketChatApps)
- Community Forums
- [App Requests](https://forums.rocket.chat/c/rocket-chat-apps/requests)
......@@ -133,7 +133,7 @@ Here are some links to examples and documentation:
const toWrite =
`{
"devDependencies": {
"@rocket.chat/apps-ts-definition": "^0.9.13",
"@rocket.chat/apps-engine": "^1.0.0",
"tslint": "^5.10.0",
"typescript": "^2.9.1"
}
......
import Command from '@oclif/command';
import { IAppInfo } from '@rocket.chat/apps-ts-definition/metadata';
import { IAppInfo } from '@rocket.chat/apps-engine/definition/metadata';
import chalk from 'chalk';
import * as figures from 'figures';
import * as fs from 'fs-extra';
......
......@@ -14,7 +14,7 @@ export class VariousUtils {
};
public static getTsDefVersion = function _getTsDefVersion(): string {
const devLocation = 'node_modules/@rocket.chat/apps-ts-definition/package.json';
const devLocation = 'node_modules/@rocket.chat/apps-engine/package.json';
if (fs.existsSync(devLocation)) {
const info = JSON.parse(fs.readFileSync(devLocation, 'utf8'));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment