Compare commits
49 Commits
Author | SHA1 | Date | |
---|---|---|---|
c83e56af34 | |||
5eb125d63b | |||
07fce25dbc | |||
c124978aa1 | |||
4b5853072b | |||
f5b3178cb4 | |||
8001353b91 | |||
2a3c36e139 | |||
91a99261d6 | |||
04872e7ae9 | |||
7937d9aeff | |||
07ea092dea | |||
ccc2fc689f | |||
9e3808bfee | |||
717dcab4ad | |||
6a8946f2b1 | |||
84e1624e64 | |||
b46d958f35 | |||
d044085739 | |||
3510767a72 | |||
ec17d7835e | |||
cb072d0f6a | |||
1240505227 | |||
09c0bc4e6f | |||
41f98b6869 | |||
e854a62eae | |||
ec86352b58 | |||
47f1e97386 | |||
f7e1df2e64 | |||
552d3dc211 | |||
f0d7e5c998 | |||
eeb1a99884 | |||
55e75766b7 | |||
7012782480 | |||
4cec262ed8 | |||
7d1f7c28d6 | |||
eb379cf028 | |||
0192cb65fd | |||
cac6b9befa | |||
a65815a83d | |||
9dce7ec37e | |||
8992f1e879 | |||
f4bff3551e | |||
c0b318cd73 | |||
823b92aa72 | |||
2eae91d9e0 | |||
2b34315495 | |||
df3bf79e2f | |||
3fc712af8a |
66
.gitea/workflows/default_nottags.yaml
Normal file
66
.gitea/workflows/default_nottags.yaml
Normal file
@ -0,0 +1,66 @@
|
||||
name: Default (not tags)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags-ignore:
|
||||
- '**'
|
||||
|
||||
env:
|
||||
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||
|
||||
jobs:
|
||||
security:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install pnpm and npmci
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
|
||||
- name: Run npm prepare
|
||||
run: npmci npm prepare
|
||||
|
||||
- name: Audit production dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --prod
|
||||
continue-on-error: true
|
||||
|
||||
- name: Audit development dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --dev
|
||||
continue-on-error: true
|
||||
|
||||
test:
|
||||
if: ${{ always() }}
|
||||
needs: security
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Test stable
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm test
|
||||
|
||||
- name: Test build
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm build
|
124
.gitea/workflows/default_tags.yaml
Normal file
124
.gitea/workflows/default_tags.yaml
Normal file
@ -0,0 +1,124 @@
|
||||
name: Default (tags)
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
env:
|
||||
IMAGE: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
NPMCI_COMPUTED_REPOURL: https://${{gitea.repository_owner}}:${{secrets.GITEA_TOKEN}}@gitea.lossless.digital/${{gitea.repository}}.git
|
||||
NPMCI_TOKEN_NPM: ${{secrets.NPMCI_TOKEN_NPM}}
|
||||
NPMCI_TOKEN_NPM2: ${{secrets.NPMCI_TOKEN_NPM2}}
|
||||
NPMCI_GIT_GITHUBTOKEN: ${{secrets.NPMCI_GIT_GITHUBTOKEN}}
|
||||
NPMCI_URL_CLOUDLY: ${{secrets.NPMCI_URL_CLOUDLY}}
|
||||
|
||||
jobs:
|
||||
security:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Audit production dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --prod
|
||||
continue-on-error: true
|
||||
|
||||
- name: Audit development dependencies
|
||||
run: |
|
||||
npmci command npm config set registry https://registry.npmjs.org
|
||||
npmci command pnpm audit --audit-level=high --dev
|
||||
continue-on-error: true
|
||||
|
||||
test:
|
||||
if: ${{ always() }}
|
||||
needs: security
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Test stable
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm test
|
||||
|
||||
- name: Test build
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
npmci npm build
|
||||
|
||||
release:
|
||||
needs: test
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Release
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm publish
|
||||
|
||||
metadata:
|
||||
needs: test
|
||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ${{ env.IMAGE }}
|
||||
continue-on-error: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Prepare
|
||||
run: |
|
||||
pnpm install -g pnpm
|
||||
pnpm install -g @shipzone/npmci
|
||||
npmci npm prepare
|
||||
|
||||
- name: Code quality
|
||||
run: |
|
||||
npmci command npm install -g typescript
|
||||
npmci npm install
|
||||
|
||||
- name: Trigger
|
||||
run: npmci trigger
|
||||
|
||||
- name: Build docs and upload artifacts
|
||||
run: |
|
||||
npmci node install stable
|
||||
npmci npm install
|
||||
pnpm install -g @git.zone/tsdoc
|
||||
npmci command tsdoc
|
||||
continue-on-error: true
|
17
.gitignore
vendored
17
.gitignore
vendored
@ -1,5 +1,20 @@
|
||||
.nogit/
|
||||
node_modules/
|
||||
|
||||
# artifacts
|
||||
coverage/
|
||||
public/
|
||||
pages/
|
||||
|
||||
# installs
|
||||
node_modules/
|
||||
|
||||
# caches
|
||||
.yarn/
|
||||
.cache/
|
||||
.rpt2_cache
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_*/
|
||||
|
||||
# custom
|
@ -1,86 +0,0 @@
|
||||
# gitzone standard
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .yarn/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
|
||||
stages:
|
||||
- mirror
|
||||
- test
|
||||
- release
|
||||
- trigger
|
||||
- pages
|
||||
|
||||
mirror:
|
||||
stage: mirror
|
||||
script:
|
||||
- npmci git mirror
|
||||
tags:
|
||||
- docker
|
||||
|
||||
testLEGACY:
|
||||
stage: test
|
||||
script:
|
||||
- npmci node install legacy
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
allow_failure: true
|
||||
|
||||
testLTS:
|
||||
stage: test
|
||||
script:
|
||||
- npmci node install lts
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
testSTABLE:
|
||||
stage: test
|
||||
script:
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
|
||||
release:
|
||||
stage: release
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci npm publish
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
|
||||
trigger:
|
||||
stage: trigger
|
||||
script:
|
||||
- npmci trigger
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
|
||||
pages:
|
||||
image: hosttoday/ht-docker-node:npmci
|
||||
stage: pages
|
||||
script:
|
||||
- npmci command yarn global add npmpage
|
||||
- npmci command npmpage
|
||||
tags:
|
||||
- docker
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- public
|
11
.vscode/launch.json
vendored
Normal file
11
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"request": "launch",
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
27
.vscode/settings.json
vendored
Normal file
27
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"json.schemas": [
|
||||
{
|
||||
"fileMatch": ["/npmextra.json"],
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"npmci": {
|
||||
"type": "object",
|
||||
"description": "settings for npmci"
|
||||
},
|
||||
"gitzone": {
|
||||
"type": "object",
|
||||
"description": "settings for gitzone",
|
||||
"properties": {
|
||||
"projectType": {
|
||||
"type": "string",
|
||||
"enum": ["website", "element", "service", "npm", "wcc"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"typescript.tsdk": "node_modules/typescript/lib"
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
module.name: smartmodule
|
||||
module.description: a smart description
|
||||
module.author: Lossless GmbH
|
||||
module.license: MIT
|
1
dist/index.d.ts
vendored
1
dist/index.d.ts
vendored
@ -1 +0,0 @@
|
||||
export declare let standardExport: string;
|
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -1,4 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.standardExport = 'Hi there! :) This is a exported string';
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVXLFFBQUEsY0FBYyxHQUFHLHdDQUF3QyxDQUFBIn0=
|
1
dist/slackme.plugins.d.ts
vendored
1
dist/slackme.plugins.d.ts
vendored
@ -1 +0,0 @@
|
||||
import 'typings-global';
|
4
dist/slackme.plugins.js
vendored
4
dist/slackme.plugins.js
vendored
@ -1,4 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("typings-global");
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2xhY2ttZS5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc2xhY2ttZS5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMEJBQXVCIn0=
|
@ -1,7 +1,17 @@
|
||||
{
|
||||
"npmci": {
|
||||
"npmGlobalTools": [
|
||||
"npmts"
|
||||
]
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"gitzone": {
|
||||
"projectType": "npm",
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "apiclient.xyz",
|
||||
"gitrepo": "slack",
|
||||
"description": "slack api abstraction for the mojo.io ecosystem",
|
||||
"npmPackagename": "@apiclient.xyz/slack",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
48
package.json
48
package.json
@ -1,18 +1,48 @@
|
||||
{
|
||||
"name": "slackme",
|
||||
"version": "1.0.2",
|
||||
"description": "API abstraction for mojoio",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"name": "@apiclient.xyz/slack",
|
||||
"version": "3.0.9",
|
||||
"private": false,
|
||||
"description": "slack api abstraction for the mojo.io ecosystem",
|
||||
"main": "dist_ts/index.js",
|
||||
"typings": "dist_ts/index.d.ts",
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(npmts)"
|
||||
"test": "tstest test/",
|
||||
"build": "tsbuild --web"
|
||||
},
|
||||
"devDependencies": {
|
||||
"tapbundle": "^1.0.13"
|
||||
"@git.zone/tsbuild": "^2.1.25",
|
||||
"@git.zone/tsrun": "^1.2.17",
|
||||
"@git.zone/tstest": "^1.0.54",
|
||||
"@push.rocks/qenv": "^6.0.4",
|
||||
"@push.rocks/tapbundle": "^5.0.15",
|
||||
"@types/node": "^20.11.6",
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"typings-global": "^1.0.16"
|
||||
}
|
||||
"@push.rocks/smartpromise": "^4.0.3",
|
||||
"@push.rocks/smartrequest": "^2.0.21"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
"ts_web/**/*",
|
||||
"dist/**/*",
|
||||
"dist_*/**/*",
|
||||
"dist_ts/**/*",
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://gitlab.com/apiclient.xyz/slack.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://gitlab.com/apiclient.xyz/slack/issues"
|
||||
},
|
||||
"homepage": "https://gitlab.com/apiclient.xyz/slack#readme",
|
||||
"type": "module"
|
||||
}
|
||||
|
5711
pnpm-lock.yaml
generated
Normal file
5711
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
115
readme.md
115
readme.md
@ -1,29 +1,106 @@
|
||||
# slackme
|
||||
API abstraction for mojoio
|
||||
# @mojoio/slack
|
||||
slack api abstraction for the mojo.io ecosystem
|
||||
|
||||
## Availabililty
|
||||
[](https://www.npmjs.com/package/slackme)
|
||||
[](https://GitLab.com/mojoio/slackme)
|
||||
[](https://github.com/mojoio/slackme)
|
||||
[](https://mojoio.gitlab.io/slackme/)
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@mojoio/slack)
|
||||
* [gitlab.com (source)](https://gitlab.com/mojoio/slack)
|
||||
* [github.com (source mirror)](https://github.com/mojoio/slack)
|
||||
* [docs (typedoc)](https://mojoio.gitlab.io/slack/)
|
||||
|
||||
## Status for master
|
||||
[](https://GitLab.com/mojoio/slackme/commits/master)
|
||||
[](https://GitLab.com/mojoio/slackme/commits/master)
|
||||
[](https://www.npmjs.com/package/slackme)
|
||||
[](https://david-dm.org/mojoio/slackme)
|
||||
[](https://www.bithound.io/github/mojoio/slackme/master/dependencies/npm)
|
||||
[](https://www.bithound.io/github/mojoio/slackme)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](http://standardjs.com/)
|
||||
[](https://gitlab.com/mojoio/slack/commits/master)
|
||||
[](https://gitlab.com/mojoio/slack/commits/master)
|
||||
[](https://www.npmjs.com/package/@mojoio/slack)
|
||||
[](https://snyk.io/test/npm/@mojoio/slack)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://prettier.io/)
|
||||
|
||||
## Usage
|
||||
|
||||
Use TypeScript for best in class instellisense.
|
||||
|
||||
For further information read the linked docs at the top of this README.
|
||||
```javascript
|
||||
import * as slackme from 'slackme'
|
||||
|
||||
// First setup the hook
|
||||
const mySlackme = new Slackme('https://some.slack.webhook.url')
|
||||
mySlackme.sendMessage:{{
|
||||
// MessageOptions here
|
||||
}, 'myAwesomeChannel'}
|
||||
```
|
||||
|
||||
The message interface follows [Slack's docs (click here)](https://api.slack.com/docs/message-formatting) and looks like this:
|
||||
|
||||
```javascript
|
||||
interface IAttachmentField {
|
||||
title: string
|
||||
value: string
|
||||
short?: boolean
|
||||
}
|
||||
|
||||
interface IMessageOptions {
|
||||
/**
|
||||
* "Required plain-text summary of the attachment."
|
||||
*/
|
||||
fallback?: string,
|
||||
/**
|
||||
* a side color
|
||||
*/
|
||||
color?: string,
|
||||
/**
|
||||
* a message to show above
|
||||
*/
|
||||
pretext?: string,
|
||||
/**
|
||||
* author name of the attachment
|
||||
*/
|
||||
author_name?: string,
|
||||
/**
|
||||
* a link to the author
|
||||
*/
|
||||
author_link?: string,
|
||||
/**
|
||||
* a string to the author
|
||||
*/
|
||||
author_icon?: string,
|
||||
/**
|
||||
* a title for the attachment
|
||||
*/
|
||||
title?: string,
|
||||
/**
|
||||
* a link for the title
|
||||
*/
|
||||
title_link?: string,
|
||||
/**
|
||||
* the main text of the message
|
||||
*/
|
||||
text?: string,
|
||||
fields?: IAttachmentField[],
|
||||
image_url?: string,
|
||||
thumb_url?: string,
|
||||
footer?: string,
|
||||
footer_icon?: string,
|
||||
/**
|
||||
* timestamp as epoch time
|
||||
*/
|
||||
ts?: number
|
||||
}
|
||||
```
|
||||
|
||||
Alternatively, there is the option of specifying a SlackMessage class
|
||||
|
||||
```javascript
|
||||
const mySlackMessage = new SlackMessage({ /* message options here } */, mySlackme)
|
||||
mySlackMessage.title = 'new Title' // modify message options
|
||||
mySlackMessage.sendToRoom('general')
|
||||
mySlackMessage.title = 'another Title'
|
||||
mySlackMessage.sendToRoom('anotherroom')
|
||||
```
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
|
||||
[](https://mojo.io)
|
||||
[](https://maintainedby.lossless.com)
|
||||
|
134
test/test.ts
134
test/test.ts
@ -1,8 +1,130 @@
|
||||
import { expect, tap } from 'tapbundle'
|
||||
import * as slackme from '../ts/index'
|
||||
import { expect, tap } from '@push.rocks/tapbundle';
|
||||
import { Qenv } from '@push.rocks/qenv';
|
||||
|
||||
tap.test('first test', async () => {
|
||||
console.log(slackme.standardExport)
|
||||
})
|
||||
let testQenv = new Qenv(process.cwd(), process.cwd() + '/.nogit');
|
||||
|
||||
tap.start()
|
||||
import * as slackme from '../ts/index.js';
|
||||
|
||||
let testSlackAccount: slackme.SlackAccount;
|
||||
let testSlackMessage: slackme.SlackMessage;
|
||||
|
||||
tap.test('should create a valid slackme instance', async tools => {
|
||||
testSlackAccount = new slackme.SlackAccount(await testQenv.getEnvVarOnDemand('SLACK_TOKEN'));
|
||||
});
|
||||
|
||||
tap.test('should send a message to Slack', async tools => {
|
||||
const messageOptions = {
|
||||
author_name: 'GitLab CI',
|
||||
author_link: 'https://gitlab.com/',
|
||||
pretext: '*Good News*: Build successfull!',
|
||||
color: '#3cb371',
|
||||
fields: [
|
||||
{
|
||||
title: 'Branch',
|
||||
value: 'Lossless Cloud',
|
||||
short: true
|
||||
},
|
||||
{
|
||||
title: 'Product ID',
|
||||
value: 'pushrocks',
|
||||
short: true
|
||||
}
|
||||
]
|
||||
};
|
||||
await testSlackAccount.sendMessage({
|
||||
channelArg: 'random',
|
||||
messageOptions: messageOptions,
|
||||
mode: 'new'
|
||||
});
|
||||
});
|
||||
|
||||
tap.test('should send a message to Slack by directly calling the message', async tools => {
|
||||
testSlackMessage = new slackme.SlackMessage(testSlackAccount, {
|
||||
author_name: 'GitLab CI',
|
||||
author_link: 'https://gitlab.com/',
|
||||
pretext: '*Good News*: Build successfull!',
|
||||
color: '#3cb371',
|
||||
fields: [
|
||||
{
|
||||
title: 'Branch',
|
||||
value: 'Lossless Cloud',
|
||||
short: true
|
||||
},
|
||||
{
|
||||
title: 'Product ID',
|
||||
value: 'pushrocks',
|
||||
short: true
|
||||
}
|
||||
]
|
||||
});
|
||||
await testSlackMessage.sendToRoom('random');
|
||||
await tools.delayFor(1000);
|
||||
await testSlackMessage.updateAndSend({
|
||||
author_name: 'GitLab CI',
|
||||
author_link: 'https://gitlab.com/',
|
||||
pretext: '*Good News*: Build successfull!',
|
||||
color: '#3cb371',
|
||||
fields: [
|
||||
{
|
||||
title: 'Branch',
|
||||
value: 'Lossless Studio',
|
||||
short: true
|
||||
},
|
||||
{
|
||||
title: 'Product ID',
|
||||
value: 'pushrocks',
|
||||
short: true
|
||||
}
|
||||
]
|
||||
});
|
||||
await testSlackMessage.updateAndSend({
|
||||
author_name: 'GitLab CI',
|
||||
author_link: 'https://gitlab.com/',
|
||||
pretext: '*Good News*: Build successfull!',
|
||||
color: '#3cb371',
|
||||
fields: [
|
||||
{
|
||||
title: 'Branch',
|
||||
value: 'Lossless Studio',
|
||||
short: true
|
||||
},
|
||||
{
|
||||
title: 'Product ID',
|
||||
value: 'onboard.me',
|
||||
short: true
|
||||
}
|
||||
]
|
||||
});
|
||||
await testSlackMessage.startThread({
|
||||
author_name: 'Lossless Compliance',
|
||||
author_link: 'https://gitlab.com/',
|
||||
pretext: '*Good News*: Build successfull!',
|
||||
color: '#3cb371',
|
||||
fields: [
|
||||
{
|
||||
title: 'Branch',
|
||||
value: 'Lossless Studio',
|
||||
short: true
|
||||
},
|
||||
{
|
||||
title: 'Product ID',
|
||||
value: 'pushrocks',
|
||||
short: true
|
||||
}
|
||||
]
|
||||
});
|
||||
});
|
||||
|
||||
tap.test('should send logs', async () => {
|
||||
const slackLog = new slackme.SlackLog({
|
||||
slackAccount: testSlackAccount,
|
||||
channelName: 'random'
|
||||
});
|
||||
for (let i = 0; i < 30; i++) {
|
||||
await slackLog.sendLogLine('hi there');
|
||||
await slackLog.sendLogLine('so awesome');
|
||||
await slackLog.sendLogLine('really');
|
||||
}
|
||||
});
|
||||
|
||||
tap.start();
|
||||
|
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@ -0,0 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@apiclient.xyz/slack',
|
||||
version: '3.0.9',
|
||||
description: 'slack api abstraction for the mojo.io ecosystem'
|
||||
}
|
63
ts/classes.slackaccount.ts
Normal file
63
ts/classes.slackaccount.ts
Normal file
@ -0,0 +1,63 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import { type IMessageOptions } from './classes.slackmessage.js';
|
||||
|
||||
export class SlackAccount {
|
||||
private postUrl = 'https://slack.com/api/chat.postMessage';
|
||||
private updateUrl = 'https://slack.com/api/chat.update';
|
||||
private slackToken: string;
|
||||
constructor(slackTokenArg: string) {
|
||||
this.slackToken = slackTokenArg;
|
||||
}
|
||||
|
||||
async sendMessage(optionsArg: {
|
||||
messageOptions: IMessageOptions;
|
||||
channelArg: string;
|
||||
ts?: string;
|
||||
mode: 'new' | 'threaded' | 'update';
|
||||
}) {
|
||||
let requestBody: any = {
|
||||
channel: optionsArg.channelArg,
|
||||
text: optionsArg.messageOptions.text
|
||||
};
|
||||
|
||||
if (optionsArg.messageOptions.fields) {
|
||||
requestBody = {
|
||||
...requestBody,
|
||||
attachments: [
|
||||
{
|
||||
pretext: optionsArg.messageOptions.pretext,
|
||||
fields: optionsArg.messageOptions.fields,
|
||||
ts: optionsArg.messageOptions.ts,
|
||||
color: optionsArg.messageOptions.color
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
|
||||
let postUrl = this.postUrl;
|
||||
|
||||
switch (true) {
|
||||
case optionsArg.ts && optionsArg.mode === 'update':
|
||||
requestBody = {
|
||||
...requestBody,
|
||||
ts: optionsArg.ts
|
||||
};
|
||||
postUrl = this.updateUrl;
|
||||
break;
|
||||
case optionsArg.ts && optionsArg.mode === 'threaded':
|
||||
requestBody = {
|
||||
...requestBody,
|
||||
thread_ts: optionsArg.ts
|
||||
};
|
||||
break;
|
||||
}
|
||||
|
||||
const response = await plugins.smartrequest.postJson(postUrl, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${this.slackToken}`
|
||||
},
|
||||
requestBody
|
||||
});
|
||||
return response;
|
||||
}
|
||||
}
|
29
ts/classes.slacklog.ts
Normal file
29
ts/classes.slacklog.ts
Normal file
@ -0,0 +1,29 @@
|
||||
import { SlackAccount } from './classes.slackaccount.js';
|
||||
import { SlackMessage } from './classes.slackmessage.js';
|
||||
|
||||
export class SlackLog {
|
||||
public slackAccount: SlackAccount;
|
||||
public slackMessage: SlackMessage;
|
||||
public channelName: string;
|
||||
|
||||
public completeLog = ``;
|
||||
|
||||
constructor(optionsArg: { slackAccount: SlackAccount; channelName: string }) {
|
||||
this.slackAccount = optionsArg.slackAccount;
|
||||
this.channelName = optionsArg.channelName;
|
||||
}
|
||||
public async sendLogLine(logText: string) {
|
||||
if (!this.slackMessage) {
|
||||
this.slackMessage = new SlackMessage(this.slackAccount, {
|
||||
text: '``` log is loading... ```'
|
||||
});
|
||||
await this.slackMessage.sendToRoom(this.channelName);
|
||||
}
|
||||
const date = new Date();
|
||||
this.completeLog +=
|
||||
`${date.getHours()}:${date.getMinutes()}:${date.getSeconds()} - ` + logText + '\n';
|
||||
await this.slackMessage.updateAndSend({
|
||||
text: '```\n' + this.completeLog + '\n```'
|
||||
});
|
||||
}
|
||||
}
|
98
ts/classes.slackmessage.ts
Normal file
98
ts/classes.slackmessage.ts
Normal file
@ -0,0 +1,98 @@
|
||||
import * as plugins from './plugins.js';
|
||||
import { SlackAccount } from './classes.slackaccount.js';
|
||||
|
||||
export interface IAttachmentField {
|
||||
title: string;
|
||||
value: string;
|
||||
short?: boolean;
|
||||
}
|
||||
|
||||
export interface IMessageOptions {
|
||||
/**
|
||||
* "Required plain-text summary of the attachment."
|
||||
*/
|
||||
fallback?: string;
|
||||
/**
|
||||
* a side color
|
||||
*/
|
||||
color?: string;
|
||||
/**
|
||||
* a message to show above
|
||||
*/
|
||||
pretext?: string;
|
||||
/**
|
||||
* author name of the attachment
|
||||
*/
|
||||
author_name?: string;
|
||||
/**
|
||||
* a link to the author
|
||||
*/
|
||||
author_link?: string;
|
||||
/**
|
||||
* a string to the author
|
||||
*/
|
||||
author_icon?: string;
|
||||
/**
|
||||
* a title for the attachment
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* a link for the title
|
||||
*/
|
||||
title_link?: string;
|
||||
/**
|
||||
* the main text of the message
|
||||
*/
|
||||
text?: string;
|
||||
fields?: IAttachmentField[];
|
||||
image_url?: string;
|
||||
thumb_url?: string;
|
||||
footer?: string;
|
||||
footer_icon?: string;
|
||||
ts?: number;
|
||||
}
|
||||
|
||||
export class SlackMessage {
|
||||
public slackAccountRef: SlackAccount;
|
||||
public messageOptions: IMessageOptions;
|
||||
public channel: string;
|
||||
public ts: string;
|
||||
|
||||
public requestRunning = plugins.smartpromise.defer();
|
||||
|
||||
constructor(slackAccountArg: SlackAccount, messageOptionsArg: IMessageOptions) {
|
||||
if (slackAccountArg) {
|
||||
this.slackAccountRef = slackAccountArg;
|
||||
}
|
||||
this.messageOptions = messageOptionsArg;
|
||||
this.requestRunning.resolve();
|
||||
}
|
||||
|
||||
async updateAndSend(messageOptionsArg: IMessageOptions) {
|
||||
this.messageOptions = messageOptionsArg;
|
||||
await this.sendToRoom(this.channel, 'update');
|
||||
}
|
||||
|
||||
async startThread(messageOptionsArg: IMessageOptions) {
|
||||
this.messageOptions = messageOptionsArg;
|
||||
this.sendToRoom(this.channel, 'threaded');
|
||||
}
|
||||
|
||||
async sendToRoom(channelNameArg: string, modeArg: 'new' | 'update' | 'threaded' = 'new') {
|
||||
this.channel = channelNameArg;
|
||||
if (this.slackAccountRef) {
|
||||
const response = await this.slackAccountRef.sendMessage({
|
||||
channelArg: this.channel,
|
||||
messageOptions: this.messageOptions,
|
||||
mode: modeArg,
|
||||
ts: this.ts
|
||||
});
|
||||
if (modeArg === 'new') {
|
||||
this.ts = response.body.message.ts;
|
||||
this.channel = response.body.channel;
|
||||
}
|
||||
} else {
|
||||
throw new Error('you need to set a slackRef before sending the message!');
|
||||
}
|
||||
}
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
import * as plugins from './slackme.plugins'
|
||||
|
||||
export let standardExport = 'Hi there! :) This is a exported string'
|
||||
export * from './classes.slackaccount.js';
|
||||
export * from './classes.slackmessage.js';
|
||||
export * from './classes.slacklog.js';
|
||||
|
5
ts/plugins.ts
Normal file
5
ts/plugins.ts
Normal file
@ -0,0 +1,5 @@
|
||||
// pushrocks scope
|
||||
import * as smartpromise from '@push.rocks/smartpromise';
|
||||
import * as smartrequest from '@push.rocks/smartrequest';
|
||||
|
||||
export { smartpromise, smartrequest };
|
@ -1 +0,0 @@
|
||||
import 'typings-global'
|
14
tsconfig.json
Normal file
14
tsconfig.json
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"experimentalDecorators": true,
|
||||
"useDefineForClassFields": false,
|
||||
"target": "ES2022",
|
||||
"module": "NodeNext",
|
||||
"moduleResolution": "NodeNext",
|
||||
"esModuleInterop": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
"exclude": [
|
||||
"dist_*/**/*.d.ts"
|
||||
]
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
{
|
||||
"extends": "tslint-config-standard"
|
||||
}
|
386
yarn.lock
386
yarn.lock
@ -1,386 +0,0 @@
|
||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@types/chai-as-promised@0.0.29":
|
||||
version "0.0.29"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai-as-promised/-/chai-as-promised-0.0.29.tgz#43d52892aa998e185a3de3e2477edb8573be1d77"
|
||||
dependencies:
|
||||
"@types/chai" "*"
|
||||
"@types/promises-a-plus" "*"
|
||||
|
||||
"@types/chai-string@^1.1.30":
|
||||
version "1.1.31"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai-string/-/chai-string-1.1.31.tgz#a22f75d713f69da8c5cf34f8bc808a62cd249405"
|
||||
dependencies:
|
||||
"@types/chai" "*"
|
||||
|
||||
"@types/chai@*":
|
||||
version "4.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.0.4.tgz#fe86315d9a66827feeb16f73bc954688ec950e18"
|
||||
|
||||
"@types/chai@^3.4.35":
|
||||
version "3.5.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/chai/-/chai-3.5.2.tgz#c11cd2817d3a401b7ba0f5a420f35c56139b1c1e"
|
||||
|
||||
"@types/glob@*":
|
||||
version "5.0.32"
|
||||
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.32.tgz#aec5cfe987c72f099fdb1184452986aa506d5e8f"
|
||||
dependencies:
|
||||
"@types/minimatch" "*"
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/minimatch@*":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.1.tgz#b683eb60be358304ef146f5775db4c0e3696a550"
|
||||
|
||||
"@types/node@*":
|
||||
version "8.0.28"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.28.tgz#86206716f8d9251cf41692e384264cbd7058ad60"
|
||||
|
||||
"@types/promises-a-plus@*":
|
||||
version "0.0.27"
|
||||
resolved "https://registry.yarnpkg.com/@types/promises-a-plus/-/promises-a-plus-0.0.27.tgz#c64651134614c84b8f5d7114ce8901d36a609780"
|
||||
|
||||
"@types/shelljs@^0.7.4":
|
||||
version "0.7.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.7.4.tgz#137b5f31306eaff4de120ffe5b9d74b297809cfc"
|
||||
dependencies:
|
||||
"@types/glob" "*"
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/which@^1.0.28":
|
||||
version "1.0.28"
|
||||
resolved "https://registry.yarnpkg.com/@types/which/-/which-1.0.28.tgz#016e387629b8817bed653fe32eab5d11279c8df6"
|
||||
|
||||
ansi-256-colors@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-256-colors/-/ansi-256-colors-1.1.0.tgz#910de50efcc7c09e3d82f2f87abd6b700c18818a"
|
||||
|
||||
assertion-error@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.0.2.tgz#13ca515d86206da0bac66e834dd397d87581094c"
|
||||
|
||||
balanced-match@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
|
||||
|
||||
beautycolor@^1.0.7:
|
||||
version "1.0.11"
|
||||
resolved "https://registry.yarnpkg.com/beautycolor/-/beautycolor-1.0.11.tgz#71c5568d5a7ed5c144d3a54f753ad1b08862aea5"
|
||||
dependencies:
|
||||
ansi-256-colors "^1.1.0"
|
||||
typings-global "^1.0.14"
|
||||
|
||||
bindings@^1.2.1:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7"
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.8"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
|
||||
dependencies:
|
||||
balanced-match "^1.0.0"
|
||||
concat-map "0.0.1"
|
||||
|
||||
chai-as-promised@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-6.0.0.tgz#1a02a433a6f24dafac63b9c96fa1684db1aa8da6"
|
||||
dependencies:
|
||||
check-error "^1.0.2"
|
||||
|
||||
chai-string@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/chai-string/-/chai-string-1.4.0.tgz#359140c051d36a4e4b1a5fc6b910152f438a8d49"
|
||||
|
||||
chai@^3.5.0:
|
||||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/chai/-/chai-3.5.0.tgz#4d02637b067fe958bdbfdd3a40ec56fef7373247"
|
||||
dependencies:
|
||||
assertion-error "^1.0.1"
|
||||
deep-eql "^0.1.3"
|
||||
type-detect "^1.0.0"
|
||||
|
||||
check-error@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
|
||||
|
||||
concat-map@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
|
||||
deep-eql@^0.1.3:
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-0.1.3.tgz#ef558acab8de25206cd713906d74e56930eb69f2"
|
||||
dependencies:
|
||||
type-detect "0.1.1"
|
||||
|
||||
define-properties@^1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
|
||||
dependencies:
|
||||
foreach "^2.0.5"
|
||||
object-keys "^1.0.8"
|
||||
|
||||
early@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/early/-/early-2.1.1.tgz#841e23254ea5dc54d8afaeee82f5ab65c00ee23c"
|
||||
dependencies:
|
||||
beautycolor "^1.0.7"
|
||||
smartq "^1.1.1"
|
||||
typings-global "^1.0.16"
|
||||
|
||||
es-abstract@^1.5.1:
|
||||
version "1.8.2"
|
||||
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.8.2.tgz#25103263dc4decbda60e0c737ca32313518027ee"
|
||||
dependencies:
|
||||
es-to-primitive "^1.1.1"
|
||||
function-bind "^1.1.1"
|
||||
has "^1.0.1"
|
||||
is-callable "^1.1.3"
|
||||
is-regex "^1.0.4"
|
||||
|
||||
es-to-primitive@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.1.1.tgz#45355248a88979034b6792e19bb81f2b7975dd0d"
|
||||
dependencies:
|
||||
is-callable "^1.1.1"
|
||||
is-date-object "^1.0.1"
|
||||
is-symbol "^1.0.1"
|
||||
|
||||
es6-error@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.0.2.tgz#eec5c726eacef51b7f6b73c20db6e1b13b069c98"
|
||||
|
||||
foreach@^2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
|
||||
function-bind@^1.0.2, function-bind@^1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||
|
||||
glob@^7.0.0:
|
||||
version "7.1.2"
|
||||
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
|
||||
dependencies:
|
||||
fs.realpath "^1.0.0"
|
||||
inflight "^1.0.4"
|
||||
inherits "2"
|
||||
minimatch "^3.0.4"
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
has@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28"
|
||||
dependencies:
|
||||
function-bind "^1.0.2"
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
dependencies:
|
||||
once "^1.3.0"
|
||||
wrappy "1"
|
||||
|
||||
inherits@2:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
|
||||
|
||||
interpret@^1.0.0:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.4.tgz#820cdd588b868ffb191a809506d6c9c8f212b1b0"
|
||||
|
||||
is-callable@^1.1.1, is-callable@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
|
||||
|
||||
is-date-object@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
|
||||
|
||||
is-regex@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491"
|
||||
dependencies:
|
||||
has "^1.0.1"
|
||||
|
||||
is-symbol@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
|
||||
|
||||
isexe@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
|
||||
|
||||
leakage@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/leakage/-/leakage-0.3.0.tgz#15d698abdc76bbc6439601f4f3020e77e2d50c39"
|
||||
dependencies:
|
||||
es6-error "^4.0.2"
|
||||
left-pad "^1.1.3"
|
||||
memwatch-next "^0.3.0"
|
||||
minimist "^1.2.0"
|
||||
pretty-bytes "^4.0.2"
|
||||
|
||||
left-pad@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.1.3.tgz#612f61c033f3a9e08e939f1caebeea41b6f3199a"
|
||||
|
||||
memwatch-next@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/memwatch-next/-/memwatch-next-0.3.0.tgz#2111050f9a906e0aa2d72a4ec0f0089c78726f8f"
|
||||
dependencies:
|
||||
bindings "^1.2.1"
|
||||
nan "^2.3.2"
|
||||
|
||||
minimatch@^3.0.4:
|
||||
version "3.0.4"
|
||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
||||
dependencies:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
minimist@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
||||
|
||||
nan@^2.3.2:
|
||||
version "2.7.0"
|
||||
resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46"
|
||||
|
||||
object-keys@^1.0.8:
|
||||
version "1.0.11"
|
||||
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
|
||||
|
||||
object.getownpropertydescriptors@^2.0.3:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"
|
||||
dependencies:
|
||||
define-properties "^1.1.2"
|
||||
es-abstract "^1.5.1"
|
||||
|
||||
once@^1.3.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||
dependencies:
|
||||
wrappy "1"
|
||||
|
||||
path-is-absolute@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
|
||||
|
||||
path-parse@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
|
||||
|
||||
pretty-bytes@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"
|
||||
|
||||
rechoir@^0.6.2:
|
||||
version "0.6.2"
|
||||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
|
||||
dependencies:
|
||||
resolve "^1.1.6"
|
||||
|
||||
resolve@^1.1.6:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.4.0.tgz#a75be01c53da25d934a98ebd0e4c4a7312f92a86"
|
||||
dependencies:
|
||||
path-parse "^1.0.5"
|
||||
|
||||
semver@^5.3.0:
|
||||
version "5.4.1"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
|
||||
|
||||
shelljs@^0.7.8:
|
||||
version "0.7.8"
|
||||
resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3"
|
||||
dependencies:
|
||||
glob "^7.0.0"
|
||||
interpret "^1.0.0"
|
||||
rechoir "^0.6.2"
|
||||
|
||||
smartchai@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/smartchai/-/smartchai-1.0.3.tgz#de6d010bb8b5aef24cb70b31a5f5334e8c41b72f"
|
||||
dependencies:
|
||||
"@types/chai" "^3.4.35"
|
||||
"@types/chai-as-promised" "0.0.29"
|
||||
"@types/chai-string" "^1.1.30"
|
||||
chai "^3.5.0"
|
||||
chai-as-promised "^6.0.0"
|
||||
chai-string "^1.3.0"
|
||||
|
||||
smartdelay@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.3.tgz#5fd44dad77262d110702f0293efa80c072cfb579"
|
||||
dependencies:
|
||||
smartq "^1.1.1"
|
||||
typings-global "^1.0.16"
|
||||
|
||||
smartq@^1.1.1, smartq@^1.1.6:
|
||||
version "1.1.6"
|
||||
resolved "https://registry.yarnpkg.com/smartq/-/smartq-1.1.6.tgz#0c1ff4336d95e95b4f1fdd8ccd7e2c5a323b8412"
|
||||
dependencies:
|
||||
typings-global "^1.0.19"
|
||||
util.promisify "^1.0.0"
|
||||
|
||||
smartshell@^1.0.6:
|
||||
version "1.0.18"
|
||||
resolved "https://registry.yarnpkg.com/smartshell/-/smartshell-1.0.18.tgz#b84ccc65cedf3a875bf676cec78ee07f4b4aa9e5"
|
||||
dependencies:
|
||||
"@types/shelljs" "^0.7.4"
|
||||
"@types/which" "^1.0.28"
|
||||
shelljs "^0.7.8"
|
||||
smartq "^1.1.6"
|
||||
typings-global "^1.0.20"
|
||||
which "^1.3.0"
|
||||
|
||||
tapbundle@^1.0.13:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/tapbundle/-/tapbundle-1.1.1.tgz#ec4172c0e82a77b1f6133fef2606311ede28a62d"
|
||||
dependencies:
|
||||
early "^2.1.1"
|
||||
leakage "^0.3.0"
|
||||
smartchai "^1.0.3"
|
||||
smartdelay "^1.0.3"
|
||||
smartq "^1.1.1"
|
||||
typings-global "^1.0.19"
|
||||
|
||||
type-detect@0.1.1:
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-0.1.1.tgz#0ba5ec2a885640e470ea4e8505971900dac58822"
|
||||
|
||||
type-detect@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-1.0.0.tgz#762217cc06db258ec48908a1298e8b95121e8ea2"
|
||||
|
||||
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19, typings-global@^1.0.20:
|
||||
version "1.0.20"
|
||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.20.tgz#3da769c54db538247c5d877d1d9e97eb2ec981ff"
|
||||
dependencies:
|
||||
semver "^5.3.0"
|
||||
smartshell "^1.0.6"
|
||||
|
||||
util.promisify@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030"
|
||||
dependencies:
|
||||
define-properties "^1.1.2"
|
||||
object.getownpropertydescriptors "^2.0.3"
|
||||
|
||||
which@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
|
||||
dependencies:
|
||||
isexe "^2.0.0"
|
||||
|
||||
wrappy@1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
Loading…
x
Reference in New Issue
Block a user