Skip to content

Commit 755b602

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents b641b14 + 250ecd7 commit 755b602

34 files changed

Lines changed: 3754 additions & 1205 deletions

.circleci/config.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/coveralls.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Coveralls
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- develop
7+
jobs:
8+
install-and-coveralls:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@master
14+
15+
- name: Cache node modules
16+
uses: actions/cache@v1
17+
with:
18+
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
19+
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
20+
restore-keys: |
21+
${{ runner.os }}-build-${{ env.cache-name }}-
22+
${{ runner.os }}-build-
23+
${{ runner.os }}-
24+
25+
- name: install
26+
run: yarn --network-timeout 600000
27+
28+
- name: yarn add coveralls
29+
run: |
30+
yarn add -D coveralls
31+
yarn run test --coverage && cat ./coverage/lcov.info
32+
33+
- name: Coveralls
34+
uses: coverallsapp/github-action@master
35+
with:
36+
github-token: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
## [0.1.24](https://github.com/MicroAppJS/shared-utils/compare/v0.1.23...v0.1.24) (2021-03-24)
2+
3+
## [0.1.23](https://github.com/MicroAppJS/shared-utils/compare/v0.1.22...v0.1.23) (2021-03-24)
4+
5+
## [0.1.22](https://github.com/MicroAppJS/shared-utils/compare/v0.1.21...v0.1.22) (2021-03-24)
6+
7+
8+
### Bug Fixes
9+
10+
* 修复部分逻辑,升级依赖 ([83aed36](https://github.com/MicroAppJS/shared-utils/commit/83aed36bb1809cb8b088a09cececdffafe642fa5))
11+
12+
## [0.1.21](https://github.com/MicroAppJS/shared-utils/compare/v0.1.20...v0.1.21) (2020-06-04)
13+
14+
15+
### Bug Fixes
16+
17+
* fixed bug ([601deed](https://github.com/MicroAppJS/shared-utils/commit/601deedd164eb148671f4957a3070c453b2cb57a))
18+
19+
## [0.1.20](https://github.com/MicroAppJS/shared-utils/compare/v0.1.19...v0.1.20) (2020-06-04)
20+
21+
22+
### Features
23+
24+
* add `CONSTANTS` & `isDocker`, art test file ([5d859f8](https://github.com/MicroAppJS/shared-utils/commit/5d859f844e7c7ce1881c0f1526d3f3e189f10eb5))
25+
26+
## [0.1.19](https://github.com/MicroAppJS/shared-utils/compare/v0.1.18...v0.1.19) (2020-04-18)
27+
28+
29+
### Features
30+
31+
* add `pluginResolution` ([082332b](https://github.com/MicroAppJS/shared-utils/commit/082332b4b4983c67b063899600d74d9e45024cf4))
32+
33+
34+
35+
## [0.1.18](https://github.com/MicroAppJS/shared-utils/compare/v0.1.17...v0.1.18) (2020-04-17)
36+
37+
## [0.1.17](https://github.com/MicroAppJS/shared-utils/compare/v0.1.16...v0.1.17) (2020-03-31)
38+
39+
40+
### Features
41+
42+
* enhance logger ([fac575f](https://github.com/MicroAppJS/shared-utils/commit/fac575f0f5d29b91e4bc113a960ec53a846a8da9))
43+
44+
## [0.1.16](https://github.com/MicroAppJS/shared-utils/compare/0.1.15...0.1.16) (2020-03-18)
45+
46+
47+
### Features
48+
49+
* add pageSize for prompt config ([8d41519](https://github.com/MicroAppJS/shared-utils/commit/8d415193d0271fcaaa8745bdc7a5b76b61621eea))
50+
51+
52+
53+
## [0.1.15](https://github.com/MicroAppJS/shared-utils/compare/0.1.14...0.1.15) (2020-02-08)
54+
55+
56+
57+
## [0.1.14](https://github.com/MicroAppJS/shared-utils/compare/2d4ff12271af26c11d1bf235c19556e6426f5d2c...0.1.14) (2020-01-20)
58+
59+
60+
### Features
61+
62+
* enhance prompt check ([2d4ff12](https://github.com/MicroAppJS/shared-utils/commit/2d4ff12271af26c11d1bf235c19556e6426f5d2c))
63+

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Micro APP 依赖工具库.
99
[![NPM Version][npm-img]][npm-url]
1010
[![NPM Download][download-img]][download-url]
1111

12-
[Coverage-img]: https://coveralls.io/repos/github/MicroAppJS/MicroApp-Shared-Utils/badge.svg?branch=master
13-
[Coverage-url]: https://coveralls.io/github/MicroAppJS/MicroApp-Shared-Utils?branch=master
14-
[CircleCI-img]: https://circleci.com/gh/MicroAppJS/MicroApp-Shared-Utils/tree/master.svg?style=svg
15-
[CircleCI-url]: https://circleci.com/gh/MicroAppJS/MicroApp-Shared-Utils/tree/master
12+
[Coverage-img]: https://coveralls.io/repos/github/MicroAppJS/shared-utils/badge.svg?branch=master
13+
[Coverage-url]: https://coveralls.io/github/MicroAppJS/shared-utils?branch=master
14+
[CircleCI-img]: https://circleci.com/gh/MicroAppJS/shared-utils/tree/master.svg?style=svg
15+
[CircleCI-url]: https://circleci.com/gh/MicroAppJS/shared-utils/tree/master
1616
[npm-img]: https://img.shields.io/npm/v/@micro-app/shared-utils.svg?style=flat-square
1717
[npm-url]: https://npmjs.org/package/@micro-app/shared-utils
1818
[download-img]: https://img.shields.io/npm/dm/@micro-app/shared-utils.svg?style=flat-square

index.d.ts

Lines changed: 42 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,47 @@
11
/// <reference types="node"/>
22

3-
import fs from 'fs-extra';
4-
import chalk from 'chalk';
5-
import cheerio from 'cheerio';
6-
import semver from 'semver';
7-
import semverRegex from 'semver-regex';
8-
import _ from 'lodash';
9-
import ora from 'ora';
10-
import dedent from 'dedent';
11-
import globby from 'globby';
12-
import globParent from 'glob-parent';
13-
import isGlob from 'is-glob';
14-
import npa from 'npm-package-arg';
15-
import parseGitUrl from 'git-url-parse';
16-
import multimatch from 'multimatch';
17-
import stringifyObject from 'stringify-object';
18-
import LRU from 'lru-cache';
3+
export * as fs from 'fs-extra';
4+
export * as chalk from 'chalk';
5+
export * as cheerio from 'cheerio';
6+
export * as semver from 'semver';
7+
export * as semverRegex from 'semver-regex';
8+
export * as _ from 'lodash';
9+
export * as ora from 'ora';
10+
export * as dedent from 'dedent';
11+
export * as globby from 'globby';
12+
export * as globParent from 'glob-parent';
13+
export * as isGlob from 'is-glob';
14+
export * as npa from 'npm-package-arg';
15+
export * as parseGitUrl from 'git-url-parse';
16+
export * as multimatch from 'multimatch';
17+
export * as stringifyObject from 'stringify-object';
18+
export * as LRU from 'lru-cache';
19+
export * as inquirer from 'inquirer';
20+
export * as execa from 'execa';
21+
export * as yParser from 'yargs-parser';
22+
export * as yUnParser from 'yargs-unparser';
23+
export * as debug from 'debug';
24+
export * as importFresh from 'import-fresh';
25+
export * as shell from 'shelljs';
26+
export * as onExit from 'signal-exit';
27+
export * as hash from 'hash-sum';
28+
export * as path from 'path';
29+
export * as tryRequire from 'try-require';
30+
export * as isDocker from 'is-docker';
31+
export * as UUID from 'uuid';
1932

20-
export function tryRequire( id: string, req?: Object): any | null;
2133
export function assert(value: any, message?: string | Error): void;
2234

23-
import * as moduleAlias from './src/moduleAlias';
24-
import * as getPadLength from './src/getPadLength';
25-
import * as injectHtml from './src/injectHtml';
26-
import * as loadFile from './src/loadFile';
27-
import * as logger from './src/logger';
28-
import * as smartMerge from './src/smartMerge';
29-
import * as virtualFile from './src/virtualFile';
30-
import * as openBrowser from './src/openBrowser';
31-
import * as env from './src/env';
32-
import * as validateSchema from './src/validateSchema';
33-
34-
export {
35-
moduleAlias,
36-
getPadLength,
37-
injectHtml,
38-
loadFile,
39-
smartMerge,
40-
virtualFile,
41-
logger,
42-
openBrowser,
43-
env,
44-
};
45-
46-
export {
47-
assert,
48-
fs,
49-
chalk,
50-
cheerio,
51-
semver,
52-
semverRegex,
53-
_,
54-
ora,
55-
dedent,
56-
globby,
57-
globParent,
58-
isGlob,
59-
npa,
60-
parseGitUrl,
61-
multimatch,
62-
stringifyObject,
63-
LRU,
64-
}
35+
export * as moduleAlias from './src/moduleAlias';
36+
export * as getPadLength from './src/getPadLength';
37+
export * as injectHtml from './src/injectHtml';
38+
export * as logger from './src/logger';
39+
export * as prompt from './src/prompt';
40+
export * as smartMerge from './src/smartMerge';
41+
export * as virtualFile from './src/virtualFile';
42+
export * as openBrowser from './src/openBrowser';
43+
export * as Env from './src/Env';
44+
export * as validateSchema from './src/validateSchema';
45+
export * as loadFile from './src/loadFile';
46+
export * as pluginResolution from './src/pluginResolution';
47+
export * as CONSTANTS from './src/constants';

index.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,21 @@ const internal = [
1818
'injectHtml',
1919
'loadFile',
2020
'logger',
21+
'prompt',
2122
'smartMerge',
2223
'virtualFile',
2324
'openBrowser',
2425
'Env',
2526
'validateSchema',
27+
'pluginResolution',
2628
].reduce((obj, key) => {
2729
obj[key] = `./src/${key}`;
2830
return obj;
2931
}, {});
3032

33+
// special
34+
internal.CONSTANTS = './src/constants';
35+
3136
Object.keys(internal).forEach(key => {
3237
defineProperty(key, internal);
3338
});
@@ -50,6 +55,18 @@ const thirdParty = {
5055
multimatch: 'multimatch',
5156
stringifyObject: 'stringify-object',
5257
LRU: 'lru-cache',
58+
inquirer: 'inquirer',
59+
execa: 'execa',
60+
yParser: 'yargs-parser',
61+
yUnParser: 'yargs-unparser',
62+
debug: 'debug',
63+
importFresh: 'import-fresh',
64+
shell: 'shelljs',
65+
onExit: 'signal-exit',
66+
hash: 'hash-sum',
67+
path: 'path',
68+
isDocker: 'is-docker',
69+
UUID: 'uuid',
5370
};
5471

5572
Object.keys(thirdParty).forEach(key => {

microapp/config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
'use strict';
2+
3+
const config = {};
4+
5+
config.plugins = [
6+
'@micro-app/plugin-deploy', // test
7+
];
8+
9+
module.exports = config;

0 commit comments

Comments
 (0)