From a8c98ca2443ba8fbd970e7ae3b80a17d854de717 Mon Sep 17 00:00:00 2001 From: 72161674 Date: Thu, 25 May 2023 10:42:10 +0800 Subject: [PATCH] replace @jayfate/path with path --- packages/hap-compiler/src/style/index.js | 2 +- packages/hap-compiler/src/style/process.js | 2 +- packages/hap-compiler/src/template/validator.js | 2 +- packages/hap-compiler/src/utils.js | 2 +- packages/hap-debugger/src/router/index.js | 2 +- packages/hap-debugger/src/router/routes.js | 2 +- packages/hap-dev-utils/src/index.js | 2 +- packages/hap-dsl-xvm/__tests__/loaders/app-loader.test.js | 2 +- packages/hap-dsl-xvm/__tests__/loaders/ux-loader.test.js | 2 +- packages/hap-dsl-xvm/src/loaders/common/utils.js | 6 ++---- packages/hap-dsl-xvm/src/loaders/ux-fragment-utils.js | 2 +- packages/hap-dsl-xvm/src/loaders/ux-loader.js | 2 +- packages/hap-dsl-xvm/src/template.js | 2 +- packages/hap-dsl-xvm/test/unit/func/part.test.js | 2 +- packages/hap-dsl-xvm/test/unit/func/processImport.test.js | 2 +- packages/hap-dsl-xvm/test/unit/ux/card.test.js | 2 +- packages/hap-dsl-xvm/test/unit/ux/component.test.js | 2 +- packages/hap-dsl-xvm/test/unit/ux/sign.test.js | 2 +- packages/hap-dsl-xvm/test/unit/ux/style.test.js | 2 +- packages/hap-dsl-xvm/test/unit/ux/template.test.js | 2 +- packages/hap-dsl-xvm/test/utils.js | 2 +- packages/hap-dsl-xvm/test/webpack.config.js | 2 +- packages/hap-packager/src/common/info.js | 2 +- packages/hap-packager/src/common/utils.js | 2 +- packages/hap-packager/src/loaders/device-type-loader.js | 2 +- packages/hap-packager/src/loaders/manifest-loader.js | 2 +- packages/hap-packager/src/plugins/device-type-plugin.js | 2 +- packages/hap-packager/src/plugins/resource-plugin.js | 2 +- .../hap-packager/src/plugins/splitchunks-adapt-plugin.js | 2 +- packages/hap-packager/src/plugins/zip-plugin.js | 2 +- packages/hap-packager/src/router/routes.js | 2 +- packages/hap-packager/src/router/service.js | 2 +- packages/hap-packager/src/signature/index.js | 2 +- packages/hap-packager/src/subpackages/service.js | 2 +- packages/hap-packager/src/webpack.post.js | 2 +- packages/hap-server/src/config/index.js | 2 +- packages/hap-server/src/preview/create-preview.js | 2 +- packages/hap-server/src/preview/create-router.js | 2 +- packages/hap-server/src/preview/index.js | 2 +- packages/hap-server/src/preview/remote-preview.js | 2 +- packages/hap-server/src/preview/shared.js | 2 +- packages/hap-shared-utils/src/buildMode/BuildModeManager.js | 2 +- packages/hap-shared-utils/src/buildMode/util.js | 2 +- packages/hap-shared-utils/src/config.js | 2 +- packages/hap-shared-utils/src/index.js | 2 +- packages/hap-shared-utils/src/record-client.js | 2 +- packages/hap-toolkit/__tests__/appchunks.test.js | 2 +- packages/hap-toolkit/__tests__/compile.test.js | 2 +- packages/hap-toolkit/__tests__/customConfig.test.js | 2 +- packages/hap-toolkit/__tests__/dynamicImport.test.js | 2 +- packages/hap-toolkit/__tests__/i18n.test.js | 2 +- packages/hap-toolkit/__tests__/icon.test.js | 2 +- packages/hap-toolkit/__tests__/init.test.js | 2 +- packages/hap-toolkit/__tests__/lottie.test.js | 2 +- packages/hap-toolkit/__tests__/modeOptions.test.js | 2 +- packages/hap-toolkit/__tests__/pack.test.js | 2 +- packages/hap-toolkit/__tests__/record.test.js | 2 +- packages/hap-toolkit/__tests__/resign.test.js | 2 +- packages/hap-toolkit/__tests__/resource.test.js | 2 +- packages/hap-toolkit/__tests__/skeleton.test.js | 2 +- packages/hap-toolkit/__tests__/splitChunks.test.js | 2 +- .../hap-toolkit/__tests__/splitChunksWithSubPkg.test.js | 2 +- packages/hap-toolkit/__tests__/streamPack.test.js | 2 +- packages/hap-toolkit/src/commands/debug.js | 2 +- packages/hap-toolkit/src/commands/init.js | 2 +- packages/hap-toolkit/src/commands/report.js | 2 +- packages/hap-toolkit/src/commands/resign.js | 2 +- packages/hap-toolkit/src/commands/utils.js | 2 +- packages/hap-toolkit/src/gen-webpack-conf/helpers.js | 2 +- packages/hap-toolkit/src/gen-webpack-conf/index.js | 2 +- packages/hap-toolkit/src/gen-webpack-conf/validate.js | 2 +- packages/hap-toolkit/src/plugins/manifest-watch-plugin.js | 2 +- packages/hap-toolkit/src/utils.js | 2 +- 73 files changed, 74 insertions(+), 76 deletions(-) diff --git a/packages/hap-compiler/src/style/index.js b/packages/hap-compiler/src/style/index.js index 9cbdabf9..26bda03d 100644 --- a/packages/hap-compiler/src/style/index.js +++ b/packages/hap-compiler/src/style/index.js @@ -4,7 +4,7 @@ */ 'use strict' -import path from '@jayfate/path' +import path from 'path' import css from 'css' import { compileOptionsObject } from '@hap-toolkit/shared-utils' import { validate as validateDelaration, mightReferlocalResource } from './validator' diff --git a/packages/hap-compiler/src/style/process.js b/packages/hap-compiler/src/style/process.js index 03573d52..c21f3bdd 100644 --- a/packages/hap-compiler/src/style/process.js +++ b/packages/hap-compiler/src/style/process.js @@ -5,7 +5,7 @@ 'use strict' import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import css from 'css' import cssWhat from 'css-what' import { extend, compileOptionsObject } from '@hap-toolkit/shared-utils' diff --git a/packages/hap-compiler/src/template/validator.js b/packages/hap-compiler/src/template/validator.js index b73a0c3f..2dc7252b 100644 --- a/packages/hap-compiler/src/template/validator.js +++ b/packages/hap-compiler/src/template/validator.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import { colorconsole, extend } from '@hap-toolkit/shared-utils' import exp from './exp' import styler from '../style' diff --git a/packages/hap-compiler/src/utils.js b/packages/hap-compiler/src/utils.js index 8835628e..90f7006c 100644 --- a/packages/hap-compiler/src/utils.js +++ b/packages/hap-compiler/src/utils.js @@ -5,7 +5,7 @@ // TODO duplicate of packager/src/common/utils.js import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import { globalConfig } from '@hap-toolkit/shared-utils' /** diff --git a/packages/hap-debugger/src/router/index.js b/packages/hap-debugger/src/router/index.js index 5fd11b37..5424ef9f 100644 --- a/packages/hap-debugger/src/router/index.js +++ b/packages/hap-debugger/src/router/index.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import KoaRouter from 'koa-router' import koaBody from 'koa-body' import serve from 'koa-static' diff --git a/packages/hap-debugger/src/router/routes.js b/packages/hap-debugger/src/router/routes.js index bb75b0e0..b6436a16 100644 --- a/packages/hap-debugger/src/router/routes.js +++ b/packages/hap-debugger/src/router/routes.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import fs from 'fs' import qr from 'qr-image' diff --git a/packages/hap-dev-utils/src/index.js b/packages/hap-dev-utils/src/index.js index 97b3cea5..9037756b 100644 --- a/packages/hap-dev-utils/src/index.js +++ b/packages/hap-dev-utils/src/index.js @@ -7,7 +7,7 @@ const process = require('process') const fs = require('fs-extra') const { spawn } = require('child_process') const JSZip = require('jszip') -const path = require('@jayfate/path') +const path = require('path') const glob = require('glob') /** diff --git a/packages/hap-dsl-xvm/__tests__/loaders/app-loader.test.js b/packages/hap-dsl-xvm/__tests__/loaders/app-loader.test.js index 3d39e15f..26b204f2 100644 --- a/packages/hap-dsl-xvm/__tests__/loaders/app-loader.test.js +++ b/packages/hap-dsl-xvm/__tests__/loaders/app-loader.test.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -const path = require('@jayfate/path') +const path = require('path') const { rowify } = require('hap-dev-utils') const appLoader = require('../../lib/loaders/app-loader').default diff --git a/packages/hap-dsl-xvm/__tests__/loaders/ux-loader.test.js b/packages/hap-dsl-xvm/__tests__/loaders/ux-loader.test.js index 255d77b9..2390a7c1 100644 --- a/packages/hap-dsl-xvm/__tests__/loaders/ux-loader.test.js +++ b/packages/hap-dsl-xvm/__tests__/loaders/ux-loader.test.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -const path = require('@jayfate/path') +const path = require('path') const { rowify } = require('hap-dev-utils') const uxLoader = require('../../lib/loaders/ux-loader').default const { compileOptionsObject } = require('@hap-toolkit/shared-utils') diff --git a/packages/hap-dsl-xvm/src/loaders/common/utils.js b/packages/hap-dsl-xvm/src/loaders/common/utils.js index be47e4c2..0aa84204 100644 --- a/packages/hap-dsl-xvm/src/loaders/common/utils.js +++ b/packages/hap-dsl-xvm/src/loaders/common/utils.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import loaderUtils from 'loader-utils' import hash from 'hash-sum' import { SourceMapGenerator, SourceMapConsumer } from 'source-map' @@ -235,7 +235,5 @@ export function convertPath(filePath) { if (/^[/\\]node_modules/.test(filePath)) { pathBase = globalConfig.projectPath } - return process.platform === 'win32' - ? path.join(pathBase, filePath).replace(/\//g, '\\') - : path.join(pathBase, filePath) + return path.join(pathBase, filePath) } diff --git a/packages/hap-dsl-xvm/src/loaders/ux-fragment-utils.js b/packages/hap-dsl-xvm/src/loaders/ux-fragment-utils.js index 6fcb8d89..671fbc1b 100644 --- a/packages/hap-dsl-xvm/src/loaders/ux-fragment-utils.js +++ b/packages/hap-dsl-xvm/src/loaders/ux-fragment-utils.js @@ -4,7 +4,7 @@ */ import { sync as resolveSync } from 'resolve' -import path from '@jayfate/path' +import path from 'path' import { globalConfig, compileOptionsObject } from '@hap-toolkit/shared-utils' import { getBabelConfigJsPath } from '@hap-toolkit/packager' import { ENTRY_TYPE, FRAG_TYPE, templater } from '@hap-toolkit/compiler' diff --git a/packages/hap-dsl-xvm/src/loaders/ux-loader.js b/packages/hap-dsl-xvm/src/loaders/ux-loader.js index b8da1880..d9441776 100644 --- a/packages/hap-dsl-xvm/src/loaders/ux-loader.js +++ b/packages/hap-dsl-xvm/src/loaders/ux-loader.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import loaderUtils from 'loader-utils' import { parseFragmentsWithCache, ENTRY_TYPE, templater } from '@hap-toolkit/compiler' import { globalConfig, compileOptionsObject } from '@hap-toolkit/shared-utils' diff --git a/packages/hap-dsl-xvm/src/template.js b/packages/hap-dsl-xvm/src/template.js index b7a2a3ca..066806c6 100644 --- a/packages/hap-dsl-xvm/src/template.js +++ b/packages/hap-dsl-xvm/src/template.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' export const template = { app: { diff --git a/packages/hap-dsl-xvm/test/unit/func/part.test.js b/packages/hap-dsl-xvm/test/unit/func/part.test.js index d6896583..93789e00 100644 --- a/packages/hap-dsl-xvm/test/unit/func/part.test.js +++ b/packages/hap-dsl-xvm/test/unit/func/part.test.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -const path = require('@jayfate/path') +const path = require('path') const { resolveTestEntries, compileFiles } = require('../../utils') describe('分包测试', () => { diff --git a/packages/hap-dsl-xvm/test/unit/func/processImport.test.js b/packages/hap-dsl-xvm/test/unit/func/processImport.test.js index e40c8d17..4d9e5829 100644 --- a/packages/hap-dsl-xvm/test/unit/func/processImport.test.js +++ b/packages/hap-dsl-xvm/test/unit/func/processImport.test.js @@ -5,7 +5,7 @@ 'use strict' -const path = require('@jayfate/path') +const path = require('path') const { processImport } = require('@hap-toolkit/compiler') const testCssDir = path.resolve(__dirname, '../../case/ux/Helloworld/Common') diff --git a/packages/hap-dsl-xvm/test/unit/ux/card.test.js b/packages/hap-dsl-xvm/test/unit/ux/card.test.js index b5cc48cb..0d1d29a0 100644 --- a/packages/hap-dsl-xvm/test/unit/ux/card.test.js +++ b/packages/hap-dsl-xvm/test/unit/ux/card.test.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -const path = require('@jayfate/path') +const path = require('path') const { wipeDynamic } = require('hap-dev-utils') const { resolveTestEntries, compileFiles } = require('../../utils') diff --git a/packages/hap-dsl-xvm/test/unit/ux/component.test.js b/packages/hap-dsl-xvm/test/unit/ux/component.test.js index 1824cbb1..efcaca46 100644 --- a/packages/hap-dsl-xvm/test/unit/ux/component.test.js +++ b/packages/hap-dsl-xvm/test/unit/ux/component.test.js @@ -4,7 +4,7 @@ */ -const path = require('@jayfate/path') +const path = require('path') const { wipeDynamic } = require('hap-dev-utils') const { resolveTestEntries, compileFiles } = require('../../utils') diff --git a/packages/hap-dsl-xvm/test/unit/ux/sign.test.js b/packages/hap-dsl-xvm/test/unit/ux/sign.test.js index 7daa2f62..83ac3a13 100644 --- a/packages/hap-dsl-xvm/test/unit/ux/sign.test.js +++ b/packages/hap-dsl-xvm/test/unit/ux/sign.test.js @@ -6,7 +6,7 @@ 'use strict' const fs = require('fs') -const path = require('@jayfate/path') +const path = require('path') const { mkdirsSync } = require('@hap-toolkit/shared-utils') const { doSign } = require('@hap-toolkit/packager') diff --git a/packages/hap-dsl-xvm/test/unit/ux/style.test.js b/packages/hap-dsl-xvm/test/unit/ux/style.test.js index ed600ecf..78adeb85 100644 --- a/packages/hap-dsl-xvm/test/unit/ux/style.test.js +++ b/packages/hap-dsl-xvm/test/unit/ux/style.test.js @@ -4,7 +4,7 @@ */ -const path = require('@jayfate/path') +const path = require('path') const { wipeDynamic } = require('hap-dev-utils') const { resolveTestEntries, compileFiles } = require('../../utils') diff --git a/packages/hap-dsl-xvm/test/unit/ux/template.test.js b/packages/hap-dsl-xvm/test/unit/ux/template.test.js index 9853d55e..74c71ad9 100644 --- a/packages/hap-dsl-xvm/test/unit/ux/template.test.js +++ b/packages/hap-dsl-xvm/test/unit/ux/template.test.js @@ -4,7 +4,7 @@ */ -const path = require('@jayfate/path') +const path = require('path') const { wipeDynamic } = require('hap-dev-utils') const { resolveTestEntries, compileFiles } = require('../../utils') diff --git a/packages/hap-dsl-xvm/test/utils.js b/packages/hap-dsl-xvm/test/utils.js index c894b259..1b34a5f9 100644 --- a/packages/hap-dsl-xvm/test/utils.js +++ b/packages/hap-dsl-xvm/test/utils.js @@ -5,7 +5,7 @@ 'use strict' -import path from '@jayfate/path' +import path from 'path' import fs from 'fs-extra' import glob from 'glob' import del from 'del' diff --git a/packages/hap-dsl-xvm/test/webpack.config.js b/packages/hap-dsl-xvm/test/webpack.config.js index 46d06286..75390dab 100644 --- a/packages/hap-dsl-xvm/test/webpack.config.js +++ b/packages/hap-dsl-xvm/test/webpack.config.js @@ -4,7 +4,7 @@ */ import { sync as resolveSync } from 'resolve' -import path from '@jayfate/path' +import path from 'path' import webpack from 'webpack' import { ResourcePlugin, HandlerPlugin, ZipPlugin } from '@hap-toolkit/packager' import { compileOptionsMeta } from '@hap-toolkit/shared-utils' diff --git a/packages/hap-packager/src/common/info.js b/packages/hap-packager/src/common/info.js index 8f2e43fb..6b10a582 100644 --- a/packages/hap-packager/src/common/info.js +++ b/packages/hap-packager/src/common/info.js @@ -4,7 +4,7 @@ */ import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import { readJson } from '@hap-toolkit/shared-utils' export const name = { diff --git a/packages/hap-packager/src/common/utils.js b/packages/hap-packager/src/common/utils.js index 63d91abb..6c6b27aa 100644 --- a/packages/hap-packager/src/common/utils.js +++ b/packages/hap-packager/src/common/utils.js @@ -4,7 +4,7 @@ */ import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import crypto from 'crypto' import { sync as resolveSync } from 'resolve' diff --git a/packages/hap-packager/src/loaders/device-type-loader.js b/packages/hap-packager/src/loaders/device-type-loader.js index 1f574eb3..834ea908 100644 --- a/packages/hap-packager/src/loaders/device-type-loader.js +++ b/packages/hap-packager/src/loaders/device-type-loader.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import fs from 'fs' import { getOptions } from 'loader-utils' diff --git a/packages/hap-packager/src/loaders/manifest-loader.js b/packages/hap-packager/src/loaders/manifest-loader.js index ad27eb6b..fda72a15 100644 --- a/packages/hap-packager/src/loaders/manifest-loader.js +++ b/packages/hap-packager/src/loaders/manifest-loader.js @@ -4,7 +4,7 @@ */ 'use strict' -import path from '@jayfate/path' +import path from 'path' import fs from 'fs' import loaderUtils from 'loader-utils' diff --git a/packages/hap-packager/src/plugins/device-type-plugin.js b/packages/hap-packager/src/plugins/device-type-plugin.js index cded9daf..d135bd14 100644 --- a/packages/hap-packager/src/plugins/device-type-plugin.js +++ b/packages/hap-packager/src/plugins/device-type-plugin.js @@ -4,7 +4,7 @@ */ import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import { colorconsole } from '@hap-toolkit/shared-utils' import { mergeDeep } from '../common/utils' diff --git a/packages/hap-packager/src/plugins/resource-plugin.js b/packages/hap-packager/src/plugins/resource-plugin.js index 845ec5b2..810021ea 100644 --- a/packages/hap-packager/src/plugins/resource-plugin.js +++ b/packages/hap-packager/src/plugins/resource-plugin.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import fs from 'fs-extra' import aaptjs from '@hap-toolkit/aaptjs' import glob from 'glob' diff --git a/packages/hap-packager/src/plugins/splitchunks-adapt-plugin.js b/packages/hap-packager/src/plugins/splitchunks-adapt-plugin.js index 8b68ba55..1eb97643 100644 --- a/packages/hap-packager/src/plugins/splitchunks-adapt-plugin.js +++ b/packages/hap-packager/src/plugins/splitchunks-adapt-plugin.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import Compilation from 'webpack/lib/Compilation' import { getEntryFiles } from '../common/info' import { compileOptionsMeta } from '@hap-toolkit/shared-utils' diff --git a/packages/hap-packager/src/plugins/zip-plugin.js b/packages/hap-packager/src/plugins/zip-plugin.js index 0e9689ce..2903ccde 100644 --- a/packages/hap-packager/src/plugins/zip-plugin.js +++ b/packages/hap-packager/src/plugins/zip-plugin.js @@ -4,7 +4,7 @@ */ import fs from 'fs-extra' -import path from '@jayfate/path' +import path from 'path' import { colorconsole, readJson, diff --git a/packages/hap-packager/src/router/routes.js b/packages/hap-packager/src/router/routes.js index 6ab5e0e5..ae94beee 100644 --- a/packages/hap-packager/src/router/routes.js +++ b/packages/hap-packager/src/router/routes.js @@ -4,7 +4,7 @@ */ import fs from 'fs-extra' -import path from '@jayfate/path' +import path from 'path' import qr from 'qr-image' import moment from 'moment' diff --git a/packages/hap-packager/src/router/service.js b/packages/hap-packager/src/router/service.js index 8f3cee1d..5c4e366c 100644 --- a/packages/hap-packager/src/router/service.js +++ b/packages/hap-packager/src/router/service.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import fs from 'fs' import { colorconsole, getIPv4IPAddress, getClientIPAddress } from '@hap-toolkit/shared-utils' diff --git a/packages/hap-packager/src/signature/index.js b/packages/hap-packager/src/signature/index.js index 24f2b92f..fd79f10f 100644 --- a/packages/hap-packager/src/signature/index.js +++ b/packages/hap-packager/src/signature/index.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import { calcDataDigest } from '../common/utils' diff --git a/packages/hap-packager/src/subpackages/service.js b/packages/hap-packager/src/subpackages/service.js index 09d7cb21..ba397fcc 100644 --- a/packages/hap-packager/src/subpackages/service.js +++ b/packages/hap-packager/src/subpackages/service.js @@ -77,7 +77,7 @@ function allocateResourceToPackages(files, base, fullPackage, subPackages, build files.forEach((fileBuildPath) => { const fileAbsPath = path.join(base, fileBuildPath) - const fileContentBuffer = fs.readFileSync(fileAbsPath) + const fileContentBuffer = fs.readFileSync(fileAbsPath.replace(/\\/g, '/')) const fileContentDigest = calcDataDigest(fileContentBuffer) // 资源基本信息 const resourceInfo = [fileBuildPath, fileContentBuffer, fileContentDigest] diff --git a/packages/hap-packager/src/webpack.post.js b/packages/hap-packager/src/webpack.post.js index 01693401..e97db6fd 100644 --- a/packages/hap-packager/src/webpack.post.js +++ b/packages/hap-packager/src/webpack.post.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import { sync as resolveSync } from 'resolve' import { globalConfig, diff --git a/packages/hap-server/src/config/index.js b/packages/hap-server/src/config/index.js index c39bdc12..c1e5ce01 100644 --- a/packages/hap-server/src/config/index.js +++ b/packages/hap-server/src/config/index.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' // 路径 const pathToolkit = path.resolve(__dirname, '../../..') diff --git a/packages/hap-server/src/preview/create-preview.js b/packages/hap-server/src/preview/create-preview.js index fa2c2a18..757a4df3 100644 --- a/packages/hap-server/src/preview/create-preview.js +++ b/packages/hap-server/src/preview/create-preview.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import Koa from 'koa' import mount from 'koa-mount' import koaStatic from 'koa-static' diff --git a/packages/hap-server/src/preview/create-router.js b/packages/hap-server/src/preview/create-router.js index 85a2656c..a0b8c7d1 100644 --- a/packages/hap-server/src/preview/create-router.js +++ b/packages/hap-server/src/preview/create-router.js @@ -4,7 +4,7 @@ */ import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import { PassThrough } from 'stream' import util from 'util' import KoaRouter from 'koa-router' diff --git a/packages/hap-server/src/preview/index.js b/packages/hap-server/src/preview/index.js index 3023c5c0..bee3e844 100644 --- a/packages/hap-server/src/preview/index.js +++ b/packages/hap-server/src/preview/index.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import mount from 'koa-mount' import { globalConfig } from '@hap-toolkit/shared-utils' import createPreview from './create-preview' diff --git a/packages/hap-server/src/preview/remote-preview.js b/packages/hap-server/src/preview/remote-preview.js index 294817b1..4937693d 100644 --- a/packages/hap-server/src/preview/remote-preview.js +++ b/packages/hap-server/src/preview/remote-preview.js @@ -5,7 +5,7 @@ import crypto from 'crypto' import chalk from 'chalk' -import path from '@jayfate/path' +import path from 'path' import inquirer from 'inquirer' import { enc, HmacSHA256, MD5 } from 'crypto-js' import request from 'request' diff --git a/packages/hap-server/src/preview/shared.js b/packages/hap-server/src/preview/shared.js index 04cf7a2e..1d4ad2f6 100644 --- a/packages/hap-server/src/preview/shared.js +++ b/packages/hap-server/src/preview/shared.js @@ -4,7 +4,7 @@ */ import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import util from 'util' import { renderString } from '@hap-toolkit/shared-utils' diff --git a/packages/hap-shared-utils/src/buildMode/BuildModeManager.js b/packages/hap-shared-utils/src/buildMode/BuildModeManager.js index 29a0f1bd..0b89567a 100644 --- a/packages/hap-shared-utils/src/buildMode/BuildModeManager.js +++ b/packages/hap-shared-utils/src/buildMode/BuildModeManager.js @@ -4,7 +4,7 @@ */ import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import { readJson } from '../index' import { initProjectConfig, CONFIG_FILE } from './util' import { eventBus } from '../event-bus' diff --git a/packages/hap-shared-utils/src/buildMode/util.js b/packages/hap-shared-utils/src/buildMode/util.js index 7261b6b0..4e09c50a 100644 --- a/packages/hap-shared-utils/src/buildMode/util.js +++ b/packages/hap-shared-utils/src/buildMode/util.js @@ -4,7 +4,7 @@ */ import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import globalConfig from '../config' export const CONFIG_FILE = '.quickapp.preview.json' diff --git a/packages/hap-shared-utils/src/config.js b/packages/hap-shared-utils/src/config.js index 05f43bf2..4c381559 100644 --- a/packages/hap-shared-utils/src/config.js +++ b/packages/hap-shared-utils/src/config.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import { homedir } from 'os' // 用户home目录 diff --git a/packages/hap-shared-utils/src/index.js b/packages/hap-shared-utils/src/index.js index 64f66416..987867cb 100644 --- a/packages/hap-shared-utils/src/index.js +++ b/packages/hap-shared-utils/src/index.js @@ -5,7 +5,7 @@ import os from 'os' import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import http from 'http' import { Console } from 'console' import chalk from 'chalk' diff --git a/packages/hap-shared-utils/src/record-client.js b/packages/hap-shared-utils/src/record-client.js index 3d08eeb3..9d8edb04 100644 --- a/packages/hap-shared-utils/src/record-client.js +++ b/packages/hap-shared-utils/src/record-client.js @@ -4,7 +4,7 @@ */ import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import { colorconsole, mkdirsSync } from './index' import globalConfig from './config' diff --git a/packages/hap-toolkit/__tests__/appchunks.test.js b/packages/hap-toolkit/__tests__/appchunks.test.js index 6dc71cf6..b3155bc8 100644 --- a/packages/hap-toolkit/__tests__/appchunks.test.js +++ b/packages/hap-toolkit/__tests__/appchunks.test.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -const path = require('@jayfate/path') +const path = require('path') const del = require('del') const { copyApp, wipeDynamic } = require('hap-dev-utils') const { compile } = require('../lib') diff --git a/packages/hap-toolkit/__tests__/compile.test.js b/packages/hap-toolkit/__tests__/compile.test.js index 48913815..e23ec4a0 100644 --- a/packages/hap-toolkit/__tests__/compile.test.js +++ b/packages/hap-toolkit/__tests__/compile.test.js @@ -6,7 +6,7 @@ 'use strict' const fs = require('fs') -const path = require('@jayfate/path') +const path = require('path') const { Writable } = require('stream') const del = require('del') const glob = require('glob') diff --git a/packages/hap-toolkit/__tests__/customConfig.test.js b/packages/hap-toolkit/__tests__/customConfig.test.js index 9a6935f2..3eb6153d 100644 --- a/packages/hap-toolkit/__tests__/customConfig.test.js +++ b/packages/hap-toolkit/__tests__/customConfig.test.js @@ -6,7 +6,7 @@ 'use strict' const fs = require('fs') -const path = require('@jayfate/path') +const path = require('path') const del = require('del') const { copyApp } = require('hap-dev-utils') const { compile } = require('../lib') diff --git a/packages/hap-toolkit/__tests__/dynamicImport.test.js b/packages/hap-toolkit/__tests__/dynamicImport.test.js index 2d775e69..19f47392 100644 --- a/packages/hap-toolkit/__tests__/dynamicImport.test.js +++ b/packages/hap-toolkit/__tests__/dynamicImport.test.js @@ -4,7 +4,7 @@ */ const fs = require('fs') -const path = require('@jayfate/path') +const path = require('path') const del = require('del') const { copyApp, wipeDynamic } = require('hap-dev-utils') const { compile } = require('../lib') diff --git a/packages/hap-toolkit/__tests__/i18n.test.js b/packages/hap-toolkit/__tests__/i18n.test.js index c2b503ca..c788b127 100644 --- a/packages/hap-toolkit/__tests__/i18n.test.js +++ b/packages/hap-toolkit/__tests__/i18n.test.js @@ -6,7 +6,7 @@ 'use strict' const fs = require('fs') -const path = require('@jayfate/path') +const path = require('path') const del = require('del') const glob = require('glob') const JSZip = require('jszip') diff --git a/packages/hap-toolkit/__tests__/icon.test.js b/packages/hap-toolkit/__tests__/icon.test.js index 9154f18d..f26160ba 100644 --- a/packages/hap-toolkit/__tests__/icon.test.js +++ b/packages/hap-toolkit/__tests__/icon.test.js @@ -7,7 +7,7 @@ const process = require('process') const fs = require('fs') -const path = require('@jayfate/path') +const path = require('path') const del = require('del') const webpack = require('webpack') const JSZip = require('jszip') diff --git a/packages/hap-toolkit/__tests__/init.test.js b/packages/hap-toolkit/__tests__/init.test.js index 7e14df45..05696ce8 100644 --- a/packages/hap-toolkit/__tests__/init.test.js +++ b/packages/hap-toolkit/__tests__/init.test.js @@ -5,7 +5,7 @@ const process = require('process') const fs = require('fs') -const path = require('@jayfate/path') +const path = require('path') const del = require('del') const { run, lsfiles } = require('hap-dev-utils') diff --git a/packages/hap-toolkit/__tests__/lottie.test.js b/packages/hap-toolkit/__tests__/lottie.test.js index 5ee5f65f..88af7579 100644 --- a/packages/hap-toolkit/__tests__/lottie.test.js +++ b/packages/hap-toolkit/__tests__/lottie.test.js @@ -6,7 +6,7 @@ 'use strict' const fs = require('fs') -const path = require('@jayfate/path') +const path = require('path') const del = require('del') const glob = require('glob') const JSZip = require('jszip') diff --git a/packages/hap-toolkit/__tests__/modeOptions.test.js b/packages/hap-toolkit/__tests__/modeOptions.test.js index e70ae274..c7005852 100644 --- a/packages/hap-toolkit/__tests__/modeOptions.test.js +++ b/packages/hap-toolkit/__tests__/modeOptions.test.js @@ -5,7 +5,7 @@ 'use strict' -const path = require('@jayfate/path') +const path = require('path') const del = require('del') const request = require('supertest') const { copyApp } = require('hap-dev-utils') diff --git a/packages/hap-toolkit/__tests__/pack.test.js b/packages/hap-toolkit/__tests__/pack.test.js index ec16ad5d..d3f2451e 100644 --- a/packages/hap-toolkit/__tests__/pack.test.js +++ b/packages/hap-toolkit/__tests__/pack.test.js @@ -5,7 +5,7 @@ const process = require('process') const fs = require('fs') -const path = require('@jayfate/path') +const path = require('path') const del = require('del') const webpack = require('webpack') const JSZip = require('jszip') diff --git a/packages/hap-toolkit/__tests__/record.test.js b/packages/hap-toolkit/__tests__/record.test.js index 8af13a9c..672d831d 100644 --- a/packages/hap-toolkit/__tests__/record.test.js +++ b/packages/hap-toolkit/__tests__/record.test.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -const path = require('@jayfate/path') +const path = require('path') const { getRecords, clearProjectRecord } = require('@hap-toolkit/shared-utils') const { globalConfig } = require('@hap-toolkit/shared-utils') const { launchServer } = require('../lib') diff --git a/packages/hap-toolkit/__tests__/resign.test.js b/packages/hap-toolkit/__tests__/resign.test.js index 494f7407..b3236c78 100644 --- a/packages/hap-toolkit/__tests__/resign.test.js +++ b/packages/hap-toolkit/__tests__/resign.test.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -const path = require('@jayfate/path') +const path = require('path') const del = require('del') const glob = require('glob') const { copyApp } = require('hap-dev-utils') diff --git a/packages/hap-toolkit/__tests__/resource.test.js b/packages/hap-toolkit/__tests__/resource.test.js index 086210d5..ebd7d677 100644 --- a/packages/hap-toolkit/__tests__/resource.test.js +++ b/packages/hap-toolkit/__tests__/resource.test.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -const path = require('@jayfate/path') +const path = require('path') const glob = require('glob') const del = require('del') const { copyApp } = require('hap-dev-utils') diff --git a/packages/hap-toolkit/__tests__/skeleton.test.js b/packages/hap-toolkit/__tests__/skeleton.test.js index ff5d29d3..d7527c63 100644 --- a/packages/hap-toolkit/__tests__/skeleton.test.js +++ b/packages/hap-toolkit/__tests__/skeleton.test.js @@ -5,7 +5,7 @@ 'use strict' -const path = require('@jayfate/path') +const path = require('path') const fse = require('fs-extra') const del = require('del') const request = require('supertest') diff --git a/packages/hap-toolkit/__tests__/splitChunks.test.js b/packages/hap-toolkit/__tests__/splitChunks.test.js index c5632753..701e6108 100644 --- a/packages/hap-toolkit/__tests__/splitChunks.test.js +++ b/packages/hap-toolkit/__tests__/splitChunks.test.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -const path = require('@jayfate/path') +const path = require('path') const fs = require('fs-extra') const del = require('del') const { copyApp, wipeDynamic } = require('hap-dev-utils') diff --git a/packages/hap-toolkit/__tests__/splitChunksWithSubPkg.test.js b/packages/hap-toolkit/__tests__/splitChunksWithSubPkg.test.js index 4374856a..50800be6 100644 --- a/packages/hap-toolkit/__tests__/splitChunksWithSubPkg.test.js +++ b/packages/hap-toolkit/__tests__/splitChunksWithSubPkg.test.js @@ -6,7 +6,7 @@ const fs = require('fs') const cp = require('child_process') const glob = require('glob') -const path = require('@jayfate/path') +const path = require('path') const del = require('del') const JSZip = require('jszip') const { copyApp } = require('hap-dev-utils') diff --git a/packages/hap-toolkit/__tests__/streamPack.test.js b/packages/hap-toolkit/__tests__/streamPack.test.js index d69cb830..b2cf2d3e 100644 --- a/packages/hap-toolkit/__tests__/streamPack.test.js +++ b/packages/hap-toolkit/__tests__/streamPack.test.js @@ -4,7 +4,7 @@ */ const fs = require('fs') -const path = require('@jayfate/path') +const path = require('path') const del = require('del') const glob = require('glob') const JSZip = require('jszip') diff --git a/packages/hap-toolkit/src/commands/debug.js b/packages/hap-toolkit/src/commands/debug.js index 6b7fec06..d7293d6b 100644 --- a/packages/hap-toolkit/src/commands/debug.js +++ b/packages/hap-toolkit/src/commands/debug.js @@ -4,7 +4,7 @@ */ import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import chalk from 'chalk' import inquirer from 'inquirer' import adbCommander from 'adb-commander' diff --git a/packages/hap-toolkit/src/commands/init.js b/packages/hap-toolkit/src/commands/init.js index b9c3c054..d5a2167d 100644 --- a/packages/hap-toolkit/src/commands/init.js +++ b/packages/hap-toolkit/src/commands/init.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import fs from 'fs-extra' import glob from 'glob' import inquirer from 'inquirer' diff --git a/packages/hap-toolkit/src/commands/report.js b/packages/hap-toolkit/src/commands/report.js index 527c26c7..4a841253 100644 --- a/packages/hap-toolkit/src/commands/report.js +++ b/packages/hap-toolkit/src/commands/report.js @@ -5,7 +5,7 @@ import childProcess from 'child_process' import os from 'os' -import path from '@jayfate/path' +import path from 'path' import fs from 'fs-extra' import chalk from 'chalk' diff --git a/packages/hap-toolkit/src/commands/resign.js b/packages/hap-toolkit/src/commands/resign.js index 3ccab068..a048b817 100644 --- a/packages/hap-toolkit/src/commands/resign.js +++ b/packages/hap-toolkit/src/commands/resign.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import fs from 'fs-extra' import glob from 'glob' diff --git a/packages/hap-toolkit/src/commands/utils.js b/packages/hap-toolkit/src/commands/utils.js index 59ed50b3..4e77bb76 100644 --- a/packages/hap-toolkit/src/commands/utils.js +++ b/packages/hap-toolkit/src/commands/utils.js @@ -4,7 +4,7 @@ */ import fs from 'fs-extra' -import path from '@jayfate/path' +import path from 'path' import request from 'request' import http from 'http' import { diff --git a/packages/hap-toolkit/src/gen-webpack-conf/helpers.js b/packages/hap-toolkit/src/gen-webpack-conf/helpers.js index 08a97981..9ab9ea3b 100644 --- a/packages/hap-toolkit/src/gen-webpack-conf/helpers.js +++ b/packages/hap-toolkit/src/gen-webpack-conf/helpers.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import fs from 'fs-extra' import { builtinModules as builtinList } from 'module' import { readJson, colorconsole, globalConfig } from '@hap-toolkit/shared-utils' diff --git a/packages/hap-toolkit/src/gen-webpack-conf/index.js b/packages/hap-toolkit/src/gen-webpack-conf/index.js index 390b7db8..3fa9ac07 100644 --- a/packages/hap-toolkit/src/gen-webpack-conf/index.js +++ b/packages/hap-toolkit/src/gen-webpack-conf/index.js @@ -4,7 +4,7 @@ */ import { sync as resolveSync } from 'resolve' -import path from '@jayfate/path' +import path from 'path' import fs from 'fs-extra' import webpack from 'webpack' import { diff --git a/packages/hap-toolkit/src/gen-webpack-conf/validate.js b/packages/hap-toolkit/src/gen-webpack-conf/validate.js index 8aff1ea6..21930f90 100644 --- a/packages/hap-toolkit/src/gen-webpack-conf/validate.js +++ b/packages/hap-toolkit/src/gen-webpack-conf/validate.js @@ -4,7 +4,7 @@ */ import fs from 'fs' -import path from '@jayfate/path' +import path from 'path' import Ajv from 'ajv' import AjvErrors from 'ajv-errors' import manifestSchema from './manifest-schema' diff --git a/packages/hap-toolkit/src/plugins/manifest-watch-plugin.js b/packages/hap-toolkit/src/plugins/manifest-watch-plugin.js index 77f92018..c0563315 100644 --- a/packages/hap-toolkit/src/plugins/manifest-watch-plugin.js +++ b/packages/hap-toolkit/src/plugins/manifest-watch-plugin.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import { colorconsole, readJson, logger, eventBus } from '@hap-toolkit/shared-utils' import { resolveEntries } from '../utils' diff --git a/packages/hap-toolkit/src/utils.js b/packages/hap-toolkit/src/utils.js index 08e10e31..d191c08e 100644 --- a/packages/hap-toolkit/src/utils.js +++ b/packages/hap-toolkit/src/utils.js @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -import path from '@jayfate/path' +import path from 'path' import { colorconsole, compileOptionsObject } from '@hap-toolkit/shared-utils' import { ENTRY_TYPE } from '@hap-toolkit/compiler' import { resolveFile } from '@hap-toolkit/packager'