@tarojs/service 3.5.0-alpha.9 → 3.5.0-beta.2
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/dist/Config.js +2 -2
- package/dist/Kernel.d.ts +3 -3
- package/dist/Kernel.js +6 -6
- package/dist/Plugin.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +2 -2
- package/index.js +1 -0
- package/package.json +5 -5
- package/src/Config.ts +8 -9
- package/src/Kernel.ts +23 -23
- package/src/Plugin.ts +1 -1
- package/src/platform-plugin-base.ts +1 -0
- package/src/utils/index.ts +4 -6
package/dist/Config.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const helper_1 = require("@tarojs/helper");
|
|
4
4
|
const fs = require("fs-extra");
|
|
5
|
+
const path = require("path");
|
|
5
6
|
const merge = require("webpack-merge");
|
|
6
|
-
const helper_1 = require("@tarojs/helper");
|
|
7
7
|
const constants_1 = require("./utils/constants");
|
|
8
8
|
class Config {
|
|
9
9
|
constructor(opts) {
|
package/dist/Kernel.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { EventEmitter } from 'events';
|
|
3
2
|
import { IProjectConfig, PluginItem } from '@tarojs/taro/types/compile';
|
|
4
|
-
import {
|
|
5
|
-
import Plugin from './Plugin';
|
|
3
|
+
import { EventEmitter } from 'events';
|
|
6
4
|
import Config from './Config';
|
|
5
|
+
import Plugin from './Plugin';
|
|
6
|
+
import { ICommand, IHook, IPaths, IPlatform, IPlugin, IPluginsObject, IPreset } from './utils/types';
|
|
7
7
|
interface IKernelOptions {
|
|
8
8
|
appPath: string;
|
|
9
9
|
presets?: PluginItem[];
|
package/dist/Kernel.js
CHANGED
|
@@ -9,16 +9,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const
|
|
12
|
+
const helper_1 = require("@tarojs/helper");
|
|
13
|
+
const helper = require("@tarojs/helper");
|
|
13
14
|
const events_1 = require("events");
|
|
14
15
|
const lodash_1 = require("lodash");
|
|
16
|
+
const path = require("path");
|
|
15
17
|
const tapable_1 = require("tapable");
|
|
16
|
-
const helper_1 = require("@tarojs/helper");
|
|
17
|
-
const helper = require("@tarojs/helper");
|
|
18
|
-
const constants_1 = require("./utils/constants");
|
|
19
|
-
const utils_1 = require("./utils");
|
|
20
|
-
const Plugin_1 = require("./Plugin");
|
|
21
18
|
const Config_1 = require("./Config");
|
|
19
|
+
const Plugin_1 = require("./Plugin");
|
|
20
|
+
const utils_1 = require("./utils");
|
|
21
|
+
const constants_1 = require("./utils/constants");
|
|
22
22
|
class Kernel extends events_1.EventEmitter {
|
|
23
23
|
constructor(options) {
|
|
24
24
|
super();
|
package/dist/Plugin.d.ts
CHANGED
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PluginItem } from '@tarojs/taro/types/compile';
|
|
2
2
|
import { PluginType } from './constants';
|
|
3
|
-
import {
|
|
3
|
+
import { IPlugin, IPluginsObject } from './types';
|
|
4
4
|
export declare const isNpmPkg: (name: string) => boolean;
|
|
5
5
|
export declare function getPluginPath(pluginPath: string): string;
|
|
6
6
|
export declare function convertPluginsToObject(items: PluginItem[]): () => IPluginsObject;
|
package/dist/utils/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.printHelpLog = exports.resolvePresetsOrPlugins = exports.mergePlugins = exports.convertPluginsToObject = exports.getPluginPath = exports.isNpmPkg = void 0;
|
|
4
|
-
const
|
|
4
|
+
const helper_1 = require("@tarojs/helper");
|
|
5
5
|
const lodash_1 = require("lodash");
|
|
6
|
+
const path = require("path");
|
|
6
7
|
const resolve = require("resolve");
|
|
7
|
-
const helper_1 = require("@tarojs/helper");
|
|
8
8
|
const isNpmPkg = name => !(/^(\.|\/)/.test(name));
|
|
9
9
|
exports.isNpmPkg = isNpmPkg;
|
|
10
10
|
function getPluginPath(pluginPath) {
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/service",
|
|
3
|
-
"version": "3.5.0-
|
|
3
|
+
"version": "3.5.0-beta.2",
|
|
4
4
|
"description": "Taro Service",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/NervJS/taro#readme",
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tarojs/helper": "3.5.0-
|
|
37
|
-
"@tarojs/shared": "3.5.0-
|
|
38
|
-
"@tarojs/taro": "3.5.0-
|
|
36
|
+
"@tarojs/helper": "3.5.0-beta.2",
|
|
37
|
+
"@tarojs/shared": "3.5.0-beta.2",
|
|
38
|
+
"@tarojs/taro": "3.5.0-beta.2",
|
|
39
39
|
"fs-extra": "^8.1.0",
|
|
40
40
|
"joi": "^17.6.0",
|
|
41
41
|
"lodash": "^4.17.21",
|
|
@@ -43,5 +43,5 @@
|
|
|
43
43
|
"tapable": "^1.1.3",
|
|
44
44
|
"webpack-merge": "^4.2.2"
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "c85adaa45959e6cafc15e6531f4735a7dfa2aab0"
|
|
47
47
|
}
|
package/src/Config.ts
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import * as path from 'path'
|
|
2
|
-
import * as fs from 'fs-extra'
|
|
3
|
-
|
|
4
|
-
import * as merge from 'webpack-merge'
|
|
5
|
-
import { IProjectConfig } from '@tarojs/taro/types/compile'
|
|
6
1
|
import {
|
|
7
|
-
|
|
8
|
-
OUTPUT_DIR,
|
|
2
|
+
createSwcRegister,
|
|
9
3
|
ENTRY,
|
|
4
|
+
getModuleDefaultExport,
|
|
5
|
+
OUTPUT_DIR,
|
|
10
6
|
resolveScriptPath,
|
|
11
|
-
|
|
12
|
-
getModuleDefaultExport
|
|
7
|
+
SOURCE_DIR
|
|
13
8
|
} from '@tarojs/helper'
|
|
9
|
+
import { IProjectConfig } from '@tarojs/taro/types/compile'
|
|
10
|
+
import * as fs from 'fs-extra'
|
|
11
|
+
import * as path from 'path'
|
|
12
|
+
import * as merge from 'webpack-merge'
|
|
14
13
|
|
|
15
14
|
import {
|
|
16
15
|
CONFIG_DIR_NAME,
|
package/src/Kernel.ts
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import * as path from 'path'
|
|
2
|
-
import { EventEmitter } from 'events'
|
|
3
|
-
import { merge } from 'lodash'
|
|
4
|
-
import { AsyncSeriesWaterfallHook } from 'tapable'
|
|
5
|
-
import { IProjectConfig, PluginItem } from '@tarojs/taro/types/compile'
|
|
6
1
|
import {
|
|
7
|
-
|
|
8
|
-
recursiveFindNodeModules,
|
|
2
|
+
createDebug,
|
|
9
3
|
createSwcRegister,
|
|
10
|
-
|
|
4
|
+
NODE_MODULES,
|
|
5
|
+
recursiveFindNodeModules
|
|
11
6
|
} from '@tarojs/helper'
|
|
12
7
|
import * as helper from '@tarojs/helper'
|
|
8
|
+
import { IProjectConfig, PluginItem } from '@tarojs/taro/types/compile'
|
|
9
|
+
import { EventEmitter } from 'events'
|
|
10
|
+
import { merge } from 'lodash'
|
|
11
|
+
import * as path from 'path'
|
|
12
|
+
import { AsyncSeriesWaterfallHook } from 'tapable'
|
|
13
13
|
|
|
14
|
+
import Config from './Config'
|
|
15
|
+
import Plugin from './Plugin'
|
|
16
|
+
import { convertPluginsToObject, mergePlugins, printHelpLog, resolvePresetsOrPlugins } from './utils'
|
|
14
17
|
import {
|
|
15
|
-
IPreset,
|
|
16
|
-
IPluginsObject,
|
|
17
|
-
IPlugin,
|
|
18
|
-
IPaths,
|
|
19
|
-
IHook,
|
|
20
|
-
ICommand,
|
|
21
|
-
IPlatform
|
|
22
|
-
} from './utils/types'
|
|
23
|
-
import {
|
|
24
|
-
PluginType,
|
|
25
|
-
IS_MODIFY_HOOK,
|
|
26
18
|
IS_ADD_HOOK,
|
|
27
|
-
IS_EVENT_HOOK
|
|
19
|
+
IS_EVENT_HOOK,
|
|
20
|
+
IS_MODIFY_HOOK,
|
|
21
|
+
PluginType
|
|
28
22
|
} from './utils/constants'
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
import {
|
|
24
|
+
ICommand,
|
|
25
|
+
IHook,
|
|
26
|
+
IPaths,
|
|
27
|
+
IPlatform,
|
|
28
|
+
IPlugin,
|
|
29
|
+
IPluginsObject,
|
|
30
|
+
IPreset
|
|
31
|
+
} from './utils/types'
|
|
32
32
|
|
|
33
33
|
interface IKernelOptions {
|
|
34
34
|
appPath: string
|
package/src/Plugin.ts
CHANGED
package/src/utils/index.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { chalk, getModuleDefaultExport } from '@tarojs/helper'
|
|
2
|
+
import { PluginItem } from '@tarojs/taro/types/compile'
|
|
3
3
|
import { merge } from 'lodash'
|
|
4
|
+
import * as path from 'path'
|
|
4
5
|
import * as resolve from 'resolve'
|
|
5
|
-
import { getModuleDefaultExport, chalk } from '@tarojs/helper'
|
|
6
|
-
|
|
7
|
-
import { PluginItem } from '@tarojs/taro/types/compile'
|
|
8
6
|
|
|
9
7
|
import { PluginType } from './constants'
|
|
10
|
-
import {
|
|
8
|
+
import { IPlugin, IPluginsObject } from './types'
|
|
11
9
|
|
|
12
10
|
export const isNpmPkg: (name: string) => boolean = name => !(/^(\.|\/)/.test(name))
|
|
13
11
|
|